/*! This file is auto-generated */ this.wp=this.wp||{},this.wp.blockEditor=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="./node_modules/@wordpress/block-editor/build-module/index.js")}({"./node_modules/@babel/runtime/helpers/assertThisInitialized.js":function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},"./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js":function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(c[n]=e[n])}return c}},"./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js":function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}n.d(t,"a",(function(){return r}))},"./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js":function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n("./node_modules/@babel/runtime/helpers/esm/typeof.js"),o=n("./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js");function c(e,t){return!t||"object"!==Object(r.a)(t)&&"function"!=typeof t?Object(o.a)(e):t}},"./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js":function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}n.d(t,"a",(function(){return r}))},"./node_modules/@babel/runtime/helpers/esm/slicedToArray.js":function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n("./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js");var o=n("./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js"),c=n("./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js");function i(e,t){return Object(r.a)(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,c=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw c}}return n}}(e,t)||Object(o.a)(e,t)||Object(c.a)()}},"./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js":function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n("./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js");var o=n("./node_modules/@babel/runtime/helpers/esm/iterableToArray.js"),c=n("./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js");function i(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||Object(o.a)(e)||Object(c.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},"./node_modules/@babel/runtime/helpers/esm/typeof.js":function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n.d(t,"a",(function(){return r}))},"./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js":function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n("./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js");function o(e,t){if(e){if("string"==typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},"./node_modules/@babel/runtime/helpers/extends.js":function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}},"./node_modules/@babel/runtime/helpers/setPrototypeOf.js":function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},"./node_modules/@wordpress/block-editor/build-module/index.js":function(e,t,n){"use strict";n.r(t),n.d(t,"getColorClassName",(function(){return Pe})),n.d(t,"getColorObjectByAttributeValues",(function(){return Be})),n.d(t,"getColorObjectByColorValue",(function(){return xe})),n.d(t,"createCustomColorsHOC",(function(){return Yn})),n.d(t,"withColors",(function(){return Xn})),n.d(t,"__experimentalUseColors",(function(){return br})),n.d(t,"__experimentalGetGradientClass",(function(){return Ne})),n.d(t,"getGradientValueBySlug",(function(){return De})),n.d(t,"__experimentalGetGradientObjectByGradientValue",(function(){return Ae})),n.d(t,"getGradientSlugByValue",(function(){return Re})),n.d(t,"__experimentalUseGradient",(function(){return Le})),n.d(t,"getFontSize",(function(){return un})),n.d(t,"getFontSizeClass",(function(){return bn})),n.d(t,"getFontSizeObjectByValue",(function(){return dn})),n.d(t,"FontSizePicker",(function(){return fn})),n.d(t,"withFontSizes",(function(){return gr})),n.d(t,"AlignmentToolbar",(function(){return wr})),n.d(t,"Autocomplete",(function(){return Gr})),n.d(t,"BlockAlignmentToolbar",(function(){return z})),n.d(t,"__experimentalBlockFullHeightAligmentToolbar",(function(){return Wr})),n.d(t,"__experimentalBlockAlignmentMatrixToolbar",(function(){return Kr})),n.d(t,"BlockBreadcrumb",(function(){return Rl})),n.d(t,"BlockContextProvider",(function(){return Vl})),n.d(t,"BlockControls",(function(){return w})),n.d(t,"BlockColorsStyleSelector",(function(){return Ul})),n.d(t,"BlockEdit",(function(){return ql})),n.d(t,"useBlockEditContext",(function(){return h})),n.d(t,"BlockFormatControls",(function(){return Zl})),n.d(t,"BlockIcon",(function(){return Vr})),n.d(t,"BlockNavigationDropdown",(function(){return Yd})),n.d(t,"__experimentalBlockNavigationBlockFill",(function(){return Td})),n.d(t,"__experimentalBlockNavigationEditor",(function(){return ub})),n.d(t,"__experimentalBlockNavigationTree",(function(){return Wd})),n.d(t,"__experimentalBlockVariationPicker",(function(){return bb})),n.d(t,"__experimentalBlockVariationTransforms",(function(){return mb})),n.d(t,"BlockVerticalAlignmentToolbar",(function(){return _b})),n.d(t,"ButtonBlockerAppender",(function(){return Ms})),n.d(t,"ColorPalette",(function(){return Sb})),n.d(t,"ColorPaletteControl",(function(){return Ib})),n.d(t,"ContrastChecker",(function(){return it})),n.d(t,"__experimentalGradientPicker",(function(){return Pb})),n.d(t,"__experimentalGradientPickerControl",(function(){return Tb})),n.d(t,"__experimentalGradientPickerPanel",(function(){return Nb})),n.d(t,"__experimentalFontAppearanceControl",(function(){return Yt})),n.d(t,"__experimentalFontFamilyControl",(function(){return nn})),n.d(t,"__experimentalColorGradientControl",(function(){return $e})),n.d(t,"__experimentalPanelColorGradientSettings",(function(){return rt})),n.d(t,"__experimentalImageSizeControl",(function(){return Ab})),n.d(t,"InnerBlocks",(function(){return $b})),n.d(t,"__experimentalUseInnerBlocksProps",(function(){return qb})),n.d(t,"InspectorAdvancedControls",(function(){return ee})),n.d(t,"InspectorControls",(function(){return ce})),n.d(t,"__experimentalLinkControl",(function(){return Sf})),n.d(t,"__experimentalLinkControlSearchInput",(function(){return jf})),n.d(t,"__experimentalLinkControlSearchResults",(function(){return sf})),n.d(t,"__experimentalLinkControlSearchItem",(function(){return af})),n.d(t,"LineHeightControl",(function(){return zt})),n.d(t,"MediaReplaceFlow",(function(){return Tf})),n.d(t,"MediaPlaceholder",(function(){return Mf})),n.d(t,"MediaUpload",(function(){return xf})),n.d(t,"MediaUploadCheck",(function(){return Pf})),n.d(t,"PanelColorSettings",(function(){return tr})),n.d(t,"PlainText",(function(){return Hf})),n.d(t,"__experimentalResponsiveBlockControl",(function(){return Gf})),n.d(t,"RichText",(function(){return sb})),n.d(t,"RichTextShortcut",(function(){return Uf})),n.d(t,"RichTextToolbarButton",(function(){return Wf})),n.d(t,"__unstableRichTextInputEvent",(function(){return qf})),n.d(t,"ToolSelector",(function(){return Yf})),n.d(t,"__experimentalUnitControl",(function(){return _n})),n.d(t,"URLInput",(function(){return of})),n.d(t,"URLInputButton",(function(){return Jf})),n.d(t,"URLPopover",(function(){return Rf})),n.d(t,"__experimentalImageURLInputUI",(function(){return rp})),n.d(t,"withColorContext",(function(){return Cb})),n.d(t,"__experimentalBlockSettingsMenuFirstItem",(function(){return Pu})),n.d(t,"__experimentalInserterMenuExtension",(function(){return Es})),n.d(t,"__experimentalPreviewOptions",(function(){return cp})),n.d(t,"__experimentalUseResizeCanvas",(function(){return bp})),n.d(t,"BlockInspector",(function(){return hp})),n.d(t,"BlockList",(function(){return ed})),n.d(t,"useBlockProps",(function(){return gd})),n.d(t,"__experimentalBlock",(function(){return Ep})),n.d(t,"BlockMover",(function(){return ru})),n.d(t,"BlockPreview",(function(){return Qa})),n.d(t,"BlockSelectionClearer",(function(){return Cp})),n.d(t,"__unstableUseBlockSelectionClearer",(function(){return wp})),n.d(t,"BlockSettingsMenu",(function(){return Hu})),n.d(t,"BlockSettingsMenuControls",(function(){return Mu})),n.d(t,"BlockTitle",(function(){return Al})),n.d(t,"BlockToolbar",(function(){return Ku})),n.d(t,"CopyHandler",(function(){return Eu})),n.d(t,"__unstableUseClipboardHandler",(function(){return _u})),n.d(t,"DefaultBlockAppender",(function(){return Ls})),n.d(t,"__unstableUseEditorStyles",(function(){return Qp})),n.d(t,"Inserter",(function(){return Rs})),n.d(t,"__experimentalLibrary",(function(){return Zp})),n.d(t,"__experimentalSearchForm",(function(){return za})),n.d(t,"BlockEditorKeyboardShortcuts",(function(){return em})),n.d(t,"MultiSelectScrollIntoView",(function(){return nm})),n.d(t,"__unstableUseScrollMultiSelectionIntoView",(function(){return tm})),n.d(t,"NavigableToolbar",(function(){return tu})),n.d(t,"ObserveTyping",(function(){return im})),n.d(t,"__unstableUseTypingObserver",(function(){return cm})),n.d(t,"__unstableUseMouseMoveTypingReset",(function(){return om})),n.d(t,"PreserveScrollInReorder",(function(){return lm})),n.d(t,"SkipToSelectedBlock",(function(){return fp})),n.d(t,"Typewriter",(function(){return dm})),n.d(t,"__unstableUseTypewriter",(function(){return um})),n.d(t,"Warning",(function(){return ya})),n.d(t,"WritingFlow",(function(){return fd})),n.d(t,"__unstableUseCanvasClickRedirect",(function(){return fm})),n.d(t,"useBlockDisplayInformation",(function(){return Dl})),n.d(t,"__unstableIframe",(function(){return Om})),n.d(t,"__experimentalUseNoRecursiveRenders",(function(){return jm})),n.d(t,"BlockEditorProvider",(function(){return $a})),n.d(t,"__experimentalUseSimulatedMediaQuery",(function(){return dp})),n.d(t,"__experimentalUseEditorFeature",(function(){return ge})),n.d(t,"transformStyles",(function(){return Xp})),n.d(t,"validateThemeColors",(function(){return km})),n.d(t,"validateThemeGradients",(function(){return ym})),n.d(t,"__experimentalGetMatchingVariation",(function(){return fb})),n.d(t,"storeConfig",(function(){return Tl})),n.d(t,"store",(function(){return Nl})),n.d(t,"SETTINGS_DEFAULTS",(function(){return $r}));var r={};n.r(r),n.d(r,"getBlockName",(function(){return jo})),n.d(r,"isBlockValid",(function(){return ko})),n.d(r,"getBlockAttributes",(function(){return yo})),n.d(r,"getBlock",(function(){return _o})),n.d(r,"__unstableGetBlockWithoutInnerBlocks",(function(){return Eo})),n.d(r,"getBlocks",(function(){return wo})),n.d(r,"__unstableGetBlockWithBlockTree",(function(){return Co})),n.d(r,"__unstableGetBlockTree",(function(){return So})),n.d(r,"getClientIdsOfDescendants",(function(){return Io})),n.d(r,"getClientIdsWithDescendants",(function(){return Bo})),n.d(r,"getGlobalBlockCount",(function(){return xo})),n.d(r,"getBlocksByClientId",(function(){return Po})),n.d(r,"getBlockCount",(function(){return To})),n.d(r,"getSelectionStart",(function(){return No})),n.d(r,"getSelectionEnd",(function(){return Do})),n.d(r,"getBlockSelectionStart",(function(){return Ao})),n.d(r,"getBlockSelectionEnd",(function(){return Ro})),n.d(r,"getSelectedBlockCount",(function(){return Lo})),n.d(r,"hasSelectedBlock",(function(){return Mo})),n.d(r,"getSelectedBlockClientId",(function(){return Fo})),n.d(r,"getSelectedBlock",(function(){return Vo})),n.d(r,"getBlockRootClientId",(function(){return Ho})),n.d(r,"getBlockParents",(function(){return zo})),n.d(r,"getBlockParentsByBlockName",(function(){return Go})),n.d(r,"getBlockHierarchyRootClientId",(function(){return Uo})),n.d(r,"getLowestCommonAncestorWithSelectedBlock",(function(){return Wo})),n.d(r,"getAdjacentBlockClientId",(function(){return Ko})),n.d(r,"getPreviousBlockClientId",(function(){return qo})),n.d(r,"getNextBlockClientId",(function(){return $o})),n.d(r,"getSelectedBlocksInitialCaretPosition",(function(){return Yo})),n.d(r,"getSelectedBlockClientIds",(function(){return Xo})),n.d(r,"getMultiSelectedBlockClientIds",(function(){return Qo})),n.d(r,"getMultiSelectedBlocks",(function(){return Zo})),n.d(r,"getFirstMultiSelectedBlockClientId",(function(){return Jo})),n.d(r,"getLastMultiSelectedBlockClientId",(function(){return ec})),n.d(r,"isFirstMultiSelectedBlock",(function(){return tc})),n.d(r,"isBlockMultiSelected",(function(){return nc})),n.d(r,"isAncestorMultiSelected",(function(){return rc})),n.d(r,"getMultiSelectedBlocksStartClientId",(function(){return oc})),n.d(r,"getMultiSelectedBlocksEndClientId",(function(){return cc})),n.d(r,"getBlockOrder",(function(){return ic})),n.d(r,"getBlockIndex",(function(){return lc})),n.d(r,"isBlockSelected",(function(){return ac})),n.d(r,"hasSelectedInnerBlock",(function(){return sc})),n.d(r,"isBlockWithinSelection",(function(){return uc})),n.d(r,"hasMultiSelection",(function(){return dc})),n.d(r,"isMultiSelecting",(function(){return bc})),n.d(r,"isSelectionEnabled",(function(){return fc})),n.d(r,"getBlockMode",(function(){return pc})),n.d(r,"isTyping",(function(){return mc})),n.d(r,"isDraggingBlocks",(function(){return vc})),n.d(r,"getDraggedBlockClientIds",(function(){return gc})),n.d(r,"isBlockBeingDragged",(function(){return Oc})),n.d(r,"isAncestorBeingDragged",(function(){return hc})),n.d(r,"isCaretWithinFormattedText",(function(){return jc})),n.d(r,"getBlockInsertionPoint",(function(){return kc})),n.d(r,"isBlockInsertionPointVisible",(function(){return yc})),n.d(r,"isValidTemplate",(function(){return _c})),n.d(r,"getTemplate",(function(){return Ec})),n.d(r,"getTemplateLock",(function(){return wc})),n.d(r,"canInsertBlockType",(function(){return Sc})),n.d(r,"canInsertBlocks",(function(){return Ic})),n.d(r,"getInserterItems",(function(){return Dc})),n.d(r,"getBlockTransformItems",(function(){return Ac})),n.d(r,"hasInserterItems",(function(){return Rc})),n.d(r,"__experimentalGetAllowedBlocks",(function(){return Lc})),n.d(r,"getBlockListSettings",(function(){return Mc})),n.d(r,"getSettings",(function(){return Fc})),n.d(r,"isLastBlockChangePersistent",(function(){return Vc})),n.d(r,"__experimentalGetBlockListSettingsForBlocks",(function(){return Hc})),n.d(r,"__experimentalGetParsedReusableBlock",(function(){return zc})),n.d(r,"__experimentalGetReusableBlockTitle",(function(){return Gc})),n.d(r,"__unstableIsLastBlockChangeIgnored",(function(){return Uc})),n.d(r,"__experimentalGetLastBlockAttributeChanges",(function(){return Wc})),n.d(r,"isNavigationMode",(function(){return qc})),n.d(r,"hasBlockMovingClientId",(function(){return $c})),n.d(r,"didAutomaticChange",(function(){return Yc})),n.d(r,"isBlockHighlighted",(function(){return Xc})),n.d(r,"areInnerBlocksControlled",(function(){return Qc})),n.d(r,"__experimentalGetActiveBlockIdByBlockNames",(function(){return Zc}));var o={};n.r(o),n.d(o,"resetBlocks",(function(){return Si})),n.d(o,"validateBlocksToTemplate",(function(){return Ii})),n.d(o,"resetSelection",(function(){return Bi})),n.d(o,"receiveBlocks",(function(){return xi})),n.d(o,"updateBlockAttributes",(function(){return Pi})),n.d(o,"updateBlock",(function(){return Ti})),n.d(o,"selectBlock",(function(){return Ni})),n.d(o,"selectPreviousBlock",(function(){return Di})),n.d(o,"selectNextBlock",(function(){return Ai})),n.d(o,"startMultiSelect",(function(){return Ri})),n.d(o,"stopMultiSelect",(function(){return Li})),n.d(o,"multiSelect",(function(){return Mi})),n.d(o,"clearSelectedBlock",(function(){return Fi})),n.d(o,"toggleSelection",(function(){return Vi})),n.d(o,"replaceBlocks",(function(){return zi})),n.d(o,"replaceBlock",(function(){return Gi})),n.d(o,"moveBlocksDown",(function(){return Wi})),n.d(o,"moveBlocksUp",(function(){return Ki})),n.d(o,"moveBlocksToPosition",(function(){return qi})),n.d(o,"moveBlockToPosition",(function(){return $i})),n.d(o,"insertBlock",(function(){return Yi})),n.d(o,"insertBlocks",(function(){return Xi})),n.d(o,"__unstableSetInsertionPoint",(function(){return Qi})),n.d(o,"showInsertionPoint",(function(){return Zi})),n.d(o,"hideInsertionPoint",(function(){return Ji})),n.d(o,"setTemplateValidity",(function(){return el})),n.d(o,"synchronizeTemplate",(function(){return tl})),n.d(o,"mergeBlocks",(function(){return nl})),n.d(o,"removeBlocks",(function(){return rl})),n.d(o,"removeBlock",(function(){return ol})),n.d(o,"replaceInnerBlocks",(function(){return cl})),n.d(o,"toggleBlockMode",(function(){return il})),n.d(o,"startTyping",(function(){return ll})),n.d(o,"stopTyping",(function(){return al})),n.d(o,"startDraggingBlocks",(function(){return sl})),n.d(o,"stopDraggingBlocks",(function(){return ul})),n.d(o,"enterFormattedText",(function(){return dl})),n.d(o,"exitFormattedText",(function(){return bl})),n.d(o,"selectionChange",(function(){return fl})),n.d(o,"insertDefaultBlock",(function(){return pl})),n.d(o,"updateBlockListSettings",(function(){return ml})),n.d(o,"updateSettings",(function(){return vl})),n.d(o,"__unstableSaveReusableBlock",(function(){return gl})),n.d(o,"__unstableMarkLastChangeAsPersistent",(function(){return Ol})),n.d(o,"__unstableMarkNextChangeAsNotPersistent",(function(){return hl})),n.d(o,"__unstableMarkAutomaticChange",(function(){return jl})),n.d(o,"__unstableMarkAutomaticChangeFinal",(function(){return kl})),n.d(o,"setNavigationMode",(function(){return yl})),n.d(o,"setBlockMovingClientId",(function(){return _l})),n.d(o,"duplicateBlocks",(function(){return El})),n.d(o,"insertBeforeBlock",(function(){return wl})),n.d(o,"insertAfterBlock",(function(){return Cl})),n.d(o,"toggleBlockHighlight",(function(){return Sl})),n.d(o,"flashBlock",(function(){return Il})),n.d(o,"setHasControlledInnerBlocks",(function(){return Bl}));var c=n("@wordpress/rich-text"),i=n("./node_modules/@babel/runtime/helpers/esm/extends.js"),l=n("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),a=n("@wordpress/element"),s=n("./node_modules/classnames/index.js"),u=n.n(s),d=n("lodash"),b=n("@wordpress/compose"),f=n("@wordpress/hooks"),p=n("@wordpress/blocks"),m=n("@wordpress/data"),v=n("@wordpress/components"),g=Object(a.createContext)({name:"",isSelected:!1,focusedElement:null,setFocusedElement:d.noop,clientId:null}),O=g.Provider;function h(){return Object(a.useContext)(g)}function j(){var e=h(),t=e.isSelected,n=e.clientId,r=e.name,o=Object(m.useSelect)((function(e){if(!t){var o=e("core/block-editor"),c=o.getBlockName,i=o.isFirstMultiSelectedBlock,l=o.getMultiSelectedBlockClientIds;return!!i(n)&&l().every((function(e){return c(e)===r}))}}),[n,t,r]);return t||o}var k=Object(v.createSlotFill)("BlockControls"),y=k.Fill,_=k.Slot;var E=function(e){var t=e.controls,n=e.children;return j()?Object(a.createElement)(y,null,(function(e){var r=Object(d.isEmpty)(e)?null:e;return Object(a.createElement)(v.__experimentalToolbarContext.Provider,{value:r},Object(a.createElement)(v.ToolbarGroup,{controls:t}),n)})):null};E.Slot=function(e){var t=Object(a.useContext)(v.__experimentalToolbarContext);return Object(a.createElement)(_,Object(i.a)({},e,{fillProps:t}))};var w=E,C=n("@wordpress/i18n"),S=n("@wordpress/primitives"),I=Object(a.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(S.Path,{d:"M4 9v6h14V9H4zm8-4.8H4v1.5h8V4.2zM4 19.8h8v-1.5H4v1.5z"})),B=Object(a.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(S.Path,{d:"M5 15h14V9H5v6zm0 4.8h14v-1.5H5v1.5zM5 4.2v1.5h14V4.2H5z"})),x=Object(a.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(S.Path,{d:"M6 15h14V9H6v6zm6-10.8v1.5h8V4.2h-8zm0 15.6h8v-1.5h-8v1.5z"})),P=Object(a.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(S.Path,{d:"M5 9v6h14V9H5zm11-4.8H8v1.5h8V4.2zM8 19.8h8v-1.5H8v1.5z"})),T=Object(a.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(S.Path,{d:"M5 4v11h14V4H5zm3 15.8h8v-1.5H8v1.5z"})),N={type:"default"},D=Object(a.createContext)(N),A=D.Provider;function R(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function L(e){for(var t=1;t1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return t=Array.isArray(e)?W.filter((function(t){return e.includes(t)})):!0===e?W:[],!r||!0===e&&!n?d.without.apply(void 0,[t].concat(K)):t}var $=Object(b.createHigherOrderComponent)((function(e){return function(t){var n=t.name,r=q(Object(p.getBlockSupport)(n,"align"),Object(p.hasBlockSupport)(n,"alignWide",!0));return[r.length>0&&t.isSelected&&Object(a.createElement)(w,{key:"align-controls"},Object(a.createElement)(z,{value:t.attributes.align,onChange:function(e){var n,r;e||(null===(n=Object(p.getBlockType)(t.name).attributes)||void 0===n||null===(r=n.align)||void 0===r?void 0:r.default)&&(e="");t.setAttributes({align:e})},controls:r})),Object(a.createElement)(e,Object(i.a)({key:"edit"},t))]}}),"withToolbarControls"),Y=Object(b.createHigherOrderComponent)((function(e){return function(t){var n=t.name,r=t.attributes.align,o=Object(m.useSelect)((function(e){return!!e("core/block-editor").getSettings().alignWide}),[]);if(void 0===r)return Object(a.createElement)(e,t);var c=q(Object(p.getBlockSupport)(n,"align"),Object(p.hasBlockSupport)(n,"alignWide",!0),o),l=t.wrapperProps;return c.includes(r)&&(l=U(U({},l),{},{"data-align":r})),Object(a.createElement)(e,Object(i.a)({},t,{wrapperProps:l}))}}));Object(f.addFilter)("blocks.registerBlockType","core/align/addAttribute",(function(e){return Object(d.has)(e.attributes,["align","type"])||Object(p.hasBlockSupport)(e,"align")&&(e.attributes=U(U({},e.attributes),{},{align:{type:"string",enum:[].concat(W,[""])}})),e})),Object(f.addFilter)("editor.BlockListBlock","core/editor/align/with-data-align",Y),Object(f.addFilter)("editor.BlockEdit","core/editor/align/with-toolbar-controls",$),Object(f.addFilter)("blocks.getSaveContent.extraProps","core/align/addAssignedAlign",(function(e,t,n){var r=n.align;return q(Object(p.getBlockSupport)(t,"align"),Object(p.hasBlockSupport)(t,"alignWide",!0)).includes(r)&&(e.className=u()("align".concat(r),e.className)),e}));var X=Object(v.createSlotFill)("InspectorAdvancedControls"),Q=X.Fill,Z=X.Slot;function J(e){var t=e.children;return h().isSelected?Object(a.createElement)(Q,null,t):null}J.slotName="InspectorAdvancedControls",J.Slot=Z;var ee=J,te=Object(v.createSlotFill)("InspectorControls"),ne=te.Fill,re=te.Slot;function oe(e){var t=e.children;return j()?Object(a.createElement)(ne,null,t):null}oe.Slot=re;var ce=oe;function ie(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function le(e){for(var t=1;t");var t=Object(p.parseWithAttributeSchema)(e,{type:"string",source:"attribute",selector:"[data-custom-class-name] > *",attribute:"class"});return t?t.trim().split(/\s+/):[]}Object(f.addFilter)("blocks.registerBlockType","core/custom-class-name/attribute",(function(e){return Object(p.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes=de(de({},e.attributes),{},{className:{type:"string"}})),e})),Object(f.addFilter)("editor.BlockEdit","core/editor/custom-class-name/with-inspector-control",be),Object(f.addFilter)("blocks.getSaveContent.extraProps","core/custom-class-name/save-props",(function(e,t,n){return Object(p.hasBlockSupport)(t,"customClassName",!0)&&n.className&&(e.className=u()(e.className,n.className)),e})),Object(f.addFilter)("blocks.getBlockAttributes","core/custom-class-name/addParsedDifference",(function(e,t,n){if(Object(p.hasBlockSupport)(t,"customClassName",!0)){var r=Object(d.omit)(e,["className"]),o=Object(p.getSaveContent)(t,r),c=fe(o),i=fe(n),l=Object(d.difference)(i,c);l.length?e.className=l.join(" "):o&&delete e.className}return e}));var pe=n("./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js");Object(f.addFilter)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",(function(e,t){return Object(p.hasBlockSupport)(t,"className",!0)&&("string"==typeof e.className?e.className=Object(d.uniq)([Object(p.getBlockDefaultClassName)(t.name)].concat(Object(pe.a)(e.className.split(" ")))).join(" ").trim():e.className=Object(p.getBlockDefaultClassName)(t.name)),e}));var me={"color.palette":function(e){return void 0===e.colors?void 0:e.colors},"color.gradients":function(e){return void 0===e.gradients?void 0:e.gradients},"color.custom":function(e){return void 0===e.disableCustomColors?void 0:!e.disableCustomColors},"color.customGradient":function(e){return void 0===e.disableCustomGradients?void 0:!e.disableCustomGradients},"typography.fontSizes":function(e){return void 0===e.fontSizes?void 0:e.fontSizes},"typography.customFontSize":function(e){return void 0===e.disableCustomFontSizes?void 0:!e.disableCustomFontSizes},"typography.customLineHeight":function(e){return e.enableCustomLineHeight},"spacing.units":function(e){if(void 0!==e.enableCustomUnits)return!0===e.enableCustomUnits?["px","em","rem","vh","vw"]:e.enableCustomUnits},"spacing.customPadding":function(e){return e.enableCustomSpacing}};function ve(e,t){for(var n in t)if(t[n]!==e[n])return!1;return!0}function ge(e){var t=h(),n=t.name,r=t.clientId;return Object(m.useSelect)((function(t){var o,c=t("core/block-editor"),i=c.getBlockAttributes,l=(0,c.getSettings)(),a=t(p.store).getBlockType(n),s=n,u=Object(d.get)(a,["supports","__experimentalSelector"]);if(Object(d.isObject)(u)){var b=i(r)||{};for(var f in u){if(ve(b,u[f].attributes)){s=f;break}}}var m="__experimentalFeatures.defaults.".concat(e),v="__experimentalFeatures.".concat(s,".").concat(e),g=null!==(o=Object(d.get)(l,v))&&void 0!==o?o:Object(d.get)(l,m);if(void 0!==g)return g;var O=me[e]?me[e](l):void 0;return void 0!==O?O:"typography.dropCap"===e||void 0}),[n,r,e])}var Oe=function e(t){if(!Object(d.isObject)(t))return t;var n=Object(d.pickBy)(Object(d.mapValues)(t,e),d.identity);return Object(d.isEqual)(n,{})?void 0:n};function he(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function je(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=!ge("border.customRadius");return!ye(t)||n}var Ee="__experimentalBorder";function we(e){var t=Ce(e),n=function(e){if("web"!==a.Platform.OS)return!1;var t=Object(p.getBlockSupport)(e,Ee);return!!(!0===t||null!=t&&t.radius)}(e.name);return t||!n?null:Object(a.createElement)(ce,null,Object(a.createElement)(v.PanelBody,{title:Object(C.__)("Border settings")},Object(a.createElement)(ke,e)))}var Ce=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=[_e(e)];return t.every(Boolean)},Se=n("./node_modules/tinycolor2/tinycolor.js"),Ie=n.n(Se),Be=function(e,t,n){if(t){var r=Object(d.find)(e,{slug:t});if(r)return r}return{color:n}},xe=function(e,t){return Object(d.find)(e,{color:t})};function Pe(e,t){if(e&&t)return"has-".concat(Object(d.kebabCase)(t),"-").concat(e)}var Te=[];function Ne(e){if(e)return"has-".concat(e,"-gradient-background")}function De(e,t){var n=Object(d.find)(e,["slug",t]);return n&&n.gradient}function Ae(e,t){return Object(d.find)(e,["gradient",t])}function Re(e,t){var n=Ae(e,t);return n&&n.slug}function Le(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.gradientAttribute,n=void 0===t?"gradient":t,r=e.customGradientAttribute,o=void 0===r?"customGradient":r,c=h(),i=c.clientId,s=ge("color.gradients")||Te,u=Object(m.useSelect)((function(e){var t=(0,e("core/block-editor").getBlockAttributes)(i)||{};return{customGradient:t[o],gradient:t[n]}}),[i,n,o]),d=u.gradient,b=u.customGradient,f=Object(m.useDispatch)("core/block-editor"),p=f.updateBlockAttributes,v=Object(a.useCallback)((function(e){var t,r,c=Re(s,e);c?p(i,(r={},Object(l.a)(r,n,c),Object(l.a)(r,o,void 0),r)):p(i,(t={},Object(l.a)(t,n,void 0),Object(l.a)(t,o,e),t))}),[s,i,p]),g=Ne(d);return{gradientClass:g,gradientValue:d?De(s,d):b,setGradient:v}}var Me=n("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),Fe=n("./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js");function Ve(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function He(e){for(var t=1;t=24?"large":"small"})?null:Object(a.createElement)(ct,{backgroundColor:t,textColor:i,tinyBackgroundColor:l,tinyTextColor:s})};function lt(e,t){return t.getElementById("block-"+e)}function at(e,t){return t.closest(".block-editor-block-list__block")===e}function st(e){for(;e&&e.nodeType!==e.ELEMENT_NODE;)e=e.parentNode;if(e){var t=e.closest(".block-editor-block-list__block");if(t)return t.id.slice("block-".length)}}function ut(e){return e.ownerDocument.defaultView.getComputedStyle(e)}function dt(e){var t=e.settings,n=e.clientId,r=e.enableContrastChecking,o=void 0===r||r,c=Object(a.useState)(),i=Object(Me.a)(c,2),l=i[0],s=i[1],u=Object(a.useState)(),d=Object(Me.a)(u,2),b=d[0],f=d[1];return Object(a.useEffect)((function(){if(o){var e=lt(n,document);if(e){f(ut(e).color);for(var t=e,r=ut(t).backgroundColor;"rgba(0, 0, 0, 0)"===r&&t.parentNode&&t.parentNode.nodeType===t.parentNode.ELEMENT_NODE;)r=ut(t=t.parentNode).backgroundColor;s(r)}}})),Object(a.createElement)(ce,null,Object(a.createElement)(rt,{title:Object(C.__)("Color settings"),initialOpen:!1,settings:t},o&&Object(a.createElement)(it,{backgroundColor:l,textColor:b})))}function bt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ft(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=!Object(p.hasBlockSupport)(t,"__experimentalTextDecoration"),r=ge("typography.customTextDecorations");return n||!r}var Pt=Object(a.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(S.Path,{d:"M6.1 6.8L2.1 18h1.6l1.1-3h4.3l1.1 3h1.6l-4-11.2H6.1zm-.8 6.8L7 8.9l1.7 4.7H5.3zm15.1-.7c-.4-.5-.9-.8-1.6-1 .4-.2.7-.5.8-.9.2-.4.3-.9.3-1.4 0-.9-.3-1.6-.8-2-.6-.5-1.3-.7-2.4-.7h-3.5V18h4.2c1.1 0 2-.3 2.6-.8.6-.6 1-1.4 1-2.4-.1-.8-.3-1.4-.6-1.9zm-5.7-4.7h1.8c.6 0 1.1.1 1.4.4.3.2.5.7.5 1.3 0 .6-.2 1.1-.5 1.3-.3.2-.8.4-1.4.4h-1.8V8.2zm4 8c-.4.3-.9.5-1.5.5h-2.6v-3.8h2.6c1.4 0 2 .6 2 1.9.1.6-.1 1-.5 1.4z"})),Tt=Object(a.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(S.Path,{d:"M10.8 16.8c-.1-.1-.2-.3-.3-.5v-2.6c0-.9-.1-1.7-.3-2.2-.2-.5-.5-.9-.9-1.1-.4-.3-.9-.4-1.6-.4-.5 0-1 .1-1.5.2s-.9.3-1.2.6l.3 1.2c.4-.3.7-.4 1.1-.5.3-.1.7-.2 1-.2.6 0 1 .1 1.3.4.3.2.4.7.4 1.4-1.2 0-2.3.2-3.3.7s-1.4 1.1-1.4 2.1c0 .7.2 1.2.7 1.6.4.4 1 .6 1.8.6.9 0 1.7-.4 2.4-1.2.1.3.2.5.4.7.1.2.3.3.6.4.3.1.6.1 1.1.1h.1l.2-1.2h-.1c-.5.1-.7 0-.8-.1zM9.1 16c-.2.3-.5.6-.9.8-.4.1-.7.2-1.1.2-.4 0-.7-.1-.9-.3-.2-.2-.3-.5-.3-.9 0-.6.2-1 .7-1.3.5-.3 1.3-.4 2.5-.5v2zm10.5-3.9c-.3-.6-.7-1.1-1.2-1.5-.5-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1 0-.6-.2-1.3-.5-1.9zm-1.6 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.5-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2s-.2 1.4-.6 2z"})),Nt=Object(a.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(S.Path,{d:"M7.1 6.8L3.1 18h1.6l1.1-3h4.3l1.1 3h1.6l-4-11.2H7.1zm-.8 6.8L8 8.9l1.7 4.7H6.3zm14.5-1.5c-.3-.6-.7-1.1-1.2-1.5-.6-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1-.1-.6-.2-1.3-.5-1.9zm-1.7 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.4-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2 .1.8-.2 1.4-.6 2z"})),Dt=[{name:Object(C.__)("Uppercase"),value:"uppercase",icon:Pt},{name:Object(C.__)("Lowercase"),value:"lowercase",icon:Tt},{name:Object(C.__)("Capitalize"),value:"capitalize",icon:Nt}];function At(e){var t=e.value,n=e.onChange;return Object(a.createElement)("fieldset",{className:"block-editor-text-transform-control"},Object(a.createElement)("legend",null,Object(C.__)("Letter case")),Object(a.createElement)("div",{className:"block-editor-text-transform-control__buttons"},Dt.map((function(e){return Object(a.createElement)(v.Button,{key:e.value,icon:e.icon,isSmall:!0,isPressed:t===e.value,"aria-label":e.name,onClick:function(){return n(t===e.value?void 0:e.value)}})}))))}function Rt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Lt(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=!Object(p.hasBlockSupport)(t,"__experimentalTextTransform"),r=ge("typography.customTextTransforms");return n||!r}function Vt(e){var t=!xt(e),n=!Ft(e);return t||n?Object(a.createElement)("div",{className:"block-editor-text-decoration-and-transform"},t&&Object(a.createElement)(Bt,e),n&&Object(a.createElement)(Mt,e)):null}var Ht=n("@wordpress/keycodes");function zt(e){var t=e.value,n=e.onChange,r=function(e){return void 0!==e&&""!==e}(t),o=r?t:"";return Object(a.createElement)("div",{className:"block-editor-line-height-control"},Object(a.createElement)(v.TextControl,{autoComplete:"off",onKeyDown:function(e){e.keyCode!==Ht.ZERO||r||(e.preventDefault(),n("0"))},onChange:function(e){if(r)n(e);else{var t=e;switch(e){case"".concat(.1):t=1.6;break;case"0":t=1.4}n(t)}},label:Object(C.__)("Line height"),placeholder:1.5,step:.1,type:"number",value:o,min:0}))}function Gt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ut(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=!ge("typography.customLineHeight");return!Object(p.hasBlockSupport)(t,"lineHeight")||n}var qt=[{name:Object(C.__)("Regular"),value:"normal"},{name:Object(C.__)("Italic"),value:"italic"}],$t=[{name:Object(C.__)("Thin"),value:"100"},{name:Object(C.__)("Extra Light"),value:"200"},{name:Object(C.__)("Light"),value:"300"},{name:Object(C.__)("Regular"),value:"400"},{name:Object(C.__)("Medium"),value:"500"},{name:Object(C.__)("Semi Bold"),value:"600"},{name:Object(C.__)("Bold"),value:"700"},{name:Object(C.__)("Extra Bold"),value:"800"},{name:Object(C.__)("Black"),value:"900"}];function Yt(e){var t=e.onChange,n=e.hasFontStyles,r=void 0===n||n,o=e.hasFontWeights,c=void 0===o||o,i=e.value,l=i.fontStyle,s=i.fontWeight,u=r||c,d={key:"default",name:Object(C.__)("Default"),style:{fontStyle:void 0,fontWeight:void 0}},b=Object(a.useMemo)((function(){return r&&c?(e=[d],qt.forEach((function(t){var n=t.name,r=t.value;$t.forEach((function(t){var o=t.name,c=t.value,i="normal"===r?o:Object(C.sprintf)(Object(C.__)("%1$s %2$s"),o,n);e.push({key:"".concat(r,"-").concat(c),name:i,style:{fontStyle:r,fontWeight:c}})}))})),e):r?function(){var e=[d];return qt.forEach((function(t){var n=t.name,r=t.value;e.push({key:r,name:n,style:{fontStyle:r,fontWeight:void 0}})})),e}():function(){var e=[d];return $t.forEach((function(t){var n=t.name,r=t.value;e.push({key:r,name:n,style:{fontStyle:void 0,fontWeight:r}})})),e}();var e}),[e.options]),f=b.find((function(e){return e.style.fontStyle===l&&e.style.fontWeight===s}));return Object(a.createElement)("fieldset",{className:"components-font-appearance-control"},u&&Object(a.createElement)(v.CustomSelectControl,{className:"components-font-appearance-control__select",label:r?c?Object(C.__)("Appearance"):Object(C.__)("Font style"):Object(C.__)("Font weight"),options:b,value:f,onChange:function(e){var n=e.selectedItem;return t(n.style)}}))}function Xt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Qt(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=Object(p.hasBlockSupport)(t,"__experimentalFontStyle"),r=ge("typography.customFontStyle");return!n||!r}function en(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=Object(p.hasBlockSupport)(t,"__experimentalFontWeight"),r=ge("typography.customFontWeight");return!n||!r}function tn(e){var t=Jt(e),n=en(e);return t&&n}function nn(e){var t=e.value,n=void 0===t?"":t,r=e.onChange,o=e.fontFamilies,c=Object(Fe.a)(e,["value","onChange","fontFamilies"]),l=ge("typography.fontFamilies");if(o||(o=l),Object(d.isEmpty)(o))return null;var s=[{value:"",label:Object(C.__)("Default")}].concat(Object(pe.a)(o.map((function(e){var t=e.fontFamily;return{value:t,label:e.name||t}}))));return Object(a.createElement)(v.SelectControl,Object(i.a)({label:Object(C.__)("Font family"),options:s,value:n,onChange:r,labelPosition:"top"},c))}function rn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function on(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=ge("typography.fontSizes"),r=!(null==n||!n.length);return!Object(p.hasBlockSupport)(t,"fontSize")||!r}var hn=Object(b.createHigherOrderComponent)((function(e){return function(t){var n,r=ge("typography.fontSizes"),o=t.name,c=t.attributes,i=c.fontSize,l=c.style,s=t.wrapperProps,u=mn({},t);if(Object(p.hasBlockSupport)(o,"fontSize")&&i&&(null==l||null===(n=l.typography)||void 0===n||!n.fontSize)){var d,b=un(r,i,null==l||null===(d=l.typography)||void 0===d?void 0:d.fontSize).size;u.wrapperProps=mn(mn({},s),{},{style:mn({fontSize:b},null==s?void 0:s.style)})}return Object(a.createElement)(e,u)}}),"withFontSizeInlineStyles");Object(f.addFilter)("blocks.registerBlockType","core/font/addAttribute",(function(e){return Object(p.hasBlockSupport)(e,"fontSize")?(e.attributes.fontSize||Object.assign(e.attributes,{fontSize:{type:"string"}}),e):e})),Object(f.addFilter)("blocks.getSaveContent.extraProps","core/font/addSaveProps",vn),Object(f.addFilter)("blocks.registerBlockType","core/font/addEditProps",(function(e){if(!Object(p.hasBlockSupport)(e,"fontSize"))return e;var t=e.getEditWrapperProps;return e.getEditWrapperProps=function(n){var r={};return t&&(r=t(n)),vn(r,e,n)},e})),Object(f.addFilter)("editor.BlockListBlock","core/font-size/with-font-size-inline-styles",hn);var jn=["lineHeight","fontSize","__experimentalFontStyle","__experimentalFontWeight","__experimentalFontFamily","__experimentalTextDecoration","__experimentalTextTransform"];function kn(e){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=[tn(e),On(e),Kt(e),ln(e),xt(e),Ft(e)];return t.filter(Boolean).length===t.length}(e),n=yn(e.name);return t||!n?null:Object(a.createElement)(ce,null,Object(a.createElement)(v.PanelBody,{title:Object(C.__)("Typography")},Object(a.createElement)(v.__unstableComponentSystemProvider,{__unstableNextInclude:["WPComponentsFontSizePicker"]},Object(a.createElement)(cn,e),Object(a.createElement)(gn,e),Object(a.createElement)(Zt,e),Object(a.createElement)(Wt,e),Object(a.createElement)(Vt,e))))}var yn=function(e){return"web"===a.Platform.OS&&jn.some((function(t){return Object(p.hasBlockSupport)(e,t)}))};function _n(e){var t=e.units,n=Object(Fe.a)(e,["units"]),r=En(t);return Object(a.createElement)(v.__experimentalUnitControl,Object(i.a)({units:r},n))}function En(e){var t=ge("spacing.units"),n=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.filter((function(t){return e.includes(t.value)}))}(t||[],e);return 0!==n.length&&n}function wn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Cn(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t={};return Object.keys(p.__EXPERIMENTAL_STYLE_PROPERTY).forEach((function(n){var r=p.__EXPERIMENTAL_STYLE_PROPERTY[n].value,o=p.__EXPERIMENTAL_STYLE_PROPERTY[n].properties;Object(d.has)(e,r)&&(o?o.forEach((function(o){t[n+Object(d.capitalize)(o)]=Nn(Object(d.get)(e,[].concat(Object(pe.a)(r),[o])))})):t[n]=Nn(Object(d.get)(e,r)))})),t}(r)),e.style),e}var An=Object(b.createHigherOrderComponent)((function(e){return function(t){var n=t.name,r=Object(p.hasBlockSupport)(n,"spacing");return[Object(a.createElement)(kn,Object(i.a)({key:"typography"},t)),Object(a.createElement)(we,Object(i.a)({key:"border"},t)),Object(a.createElement)(kt,Object(i.a)({key:"colors"},t)),Object(a.createElement)(e,Object(i.a)({key:"edit"},t)),r&&Object(a.createElement)(In,{key:"spacing"},Object(a.createElement)(Sn,t))]}}),"withToolbarControls");Object(f.addFilter)("blocks.registerBlockType","core/style/addAttribute",(function(e){return Tn(e)?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e})),Object(f.addFilter)("blocks.getSaveContent.extraProps","core/style/addSaveProps",Dn),Object(f.addFilter)("blocks.registerBlockType","core/style/addEditProps",(function(e){if(!Tn(e))return e;var t=e.getEditWrapperProps;return e.getEditWrapperProps=function(n){var r={};return t&&(r=t(n)),Dn(r,e,n)},e})),Object(f.addFilter)("editor.BlockEdit","core/style/with-block-controls",An);var Rn=n("./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"),Ln=n("./node_modules/@babel/runtime/helpers/esm/createClass.js"),Mn=n("./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"),Fn=n("./node_modules/@babel/runtime/helpers/esm/inherits.js"),Vn=n("./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"),Hn=n("./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js");function zn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(Hn.a)(e);if(t){var o=Object(Hn.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(Vn.a)(this,n)}}function Gn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Un(e){for(var t=1;t=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,i=!0,l=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){l=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw c}}}}function cr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:{panelTitle:Object(C.__)("Color settings")},n=t.panelTitle,r=void 0===n?Object(C.__)("Color settings"):n,o=t.colorPanelProps,c=t.contrastCheckers,i=t.panelChildren,s=t.colorDetector,b=(s=void 0===s?{}:s).targetRef,f=s.backgroundColorTargetRef,p=void 0===f?b:f,v=s.textColorTargetRef,g=void 0===v?b:v,O=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],j=h(),k=j.clientId,y=ge("color.palette")||sr,_=Object(m.useSelect)((function(e){return{attributes:(0,e("core/block-editor").getBlockAttributes)(k)}}),[k]),E=_.attributes,w=Object(m.useDispatch)("core/block-editor"),S=w.updateBlockAttributes,I=Object(a.useCallback)((function(e){return S(k,e)}),[S,k]),B=Object(a.useMemo)((function(){return Zn()((function(e,t,n,r,o,c){return function(i){var s,b=i.children,f=i.className,p=void 0===f?"":f,m=i.style,v=void 0===m?{}:m,g={};r?g=Object(l.a)({},t,o):c&&(g=Object(l.a)({},t,c));var O={className:u()(p,(s={},Object(l.a)(s,"has-".concat(Object(d.kebabCase)(r),"-").concat(Object(d.kebabCase)(t)),r),Object(l.a)(s,n||"has-".concat(Object(d.kebabCase)(e)),r||c),s)),style:lr(lr({},g),v)};return Object(d.isFunction)(b)?b(O):a.Children.map(b,(function(e){return Object(a.cloneElement)(e,{className:u()(e.props.className,O.className),style:lr(lr({},O.style),e.props.style||{})})}))}}),{maxSize:e.length})}),[e.length]),x=Object(a.useMemo)((function(){return Zn()((function(e,t){return function(n){var r=t.find((function(e){return e.color===n}));I(Object(l.a)({},r?Object(d.camelCase)("custom ".concat(e)):e,void 0)),I(Object(l.a)({},r?e:Object(d.camelCase)("custom ".concat(e)),r?r.slug:n))}}),{maxSize:e.length})}),[I,e.length]),P=Object(a.useState)(),T=Object(Me.a)(P,2),N=T[0],D=T[1],A=Object(a.useState)(),R=Object(Me.a)(A,2),L=R[0],M=R[1];return Object(a.useEffect)((function(){if(c){var e,t=!1,n=!1,r=or(Object(d.castArray)(c));try{for(r.s();!(e=r.n()).done;){var o=e.value,i=o.backgroundColor,l=o.textColor;if(t||(t=!0===i),n||(n=!0===l),t&&n)break}}catch(e){r.e(e)}finally{r.f()}if(n&&M(ar(g.current).color),t){for(var a=p.current,s=ar(a).backgroundColor;"rgba(0, 0, 0, 0)"===s&&a.parentNode&&a.parentNode.nodeType===a.parentNode.ELEMENT_NODE;)s=ar(a=a.parentNode).backgroundColor;D(s)}}}),[e.reduce((function(e,t){return"".concat(e," | ").concat(E[t.name]," | ").concat(E[Object(d.camelCase)("custom ".concat(t.name))])}),"")].concat(Object(pe.a)(O))),Object(a.useMemo)((function(){var t={},n=e.reduce((function(e,n){"string"==typeof n&&(n={name:n});var r=lr(lr({},n),{},{color:E[n.name]}),o=r.name,c=r.property,i=void 0===c?o:c,l=r.className,a=r.panelLabel,s=void 0===a?n.label||ur[o]||Object(d.startCase)(o):a,u=r.componentName,b=void 0===u?Object(d.startCase)(o).replace(/\s/g,""):u,f=r.color,p=void 0===f?n.color:f,m=r.colors,v=void 0===m?y:m,g=E[Object(d.camelCase)("custom ".concat(o))],O=g?void 0:v.find((function(e){return e.slug===p}));return e[b]=B(o,i,l,p,O&&O.color,g),e[b].displayName=b,e[b].color=g||O&&O.color,e[b].slug=p,e[b].setColor=x(o,v),t[b]={value:O?O.color:E[Object(d.camelCase)("custom ".concat(o))],onChange:e[b].setColor,label:s,colors:v},v||delete t[b].colors,e}),{}),l={title:r,initialOpen:!1,colorSettings:t,colorPanelProps:o,contrastCheckers:c,detectedBackgroundColor:N,detectedColor:L,panelChildren:i};return lr(lr({},n),{},{ColorPanel:Object(a.createElement)(rr,l),InspectorControlsColorPanel:Object(a.createElement)(dr,l)})}),[E,I,L,N].concat(Object(pe.a)(O)))}function fr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function pr(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"";return e=(e=(e=Object(d.deburr)(e)).replace(/^\//,"")).toLowerCase()}var Nr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Object(d.words)(Tr(e))},Dr=function(e,t){return Object(d.differenceWith)(e,Nr(t),(function(e,t){return t.includes(e)}))},Ar=function(e,t,n,r){return 0===Nr(r).length?e:Rr(e,r,{getCategory:function(e){var n;return null===(n=Object(d.find)(t,{slug:e.category}))||void 0===n?void 0:n.title},getCollection:function(e){var t;return null===(t=n[e.name.split("/")[0]])||void 0===t?void 0:t.title}})},Rr=function(){var 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]:{},r=Nr(t);if(0===r.length)return e;var o=e.map((function(e){return[e,Lr(e,t,n)]})).filter((function(e){return Object(Me.a)(e,2)[1]>0}));return o.sort((function(e,t){var n=Object(Me.a)(e,2)[1];return Object(Me.a)(t,2)[1]-n})),o.map((function(e){return Object(Me.a)(e,1)[0]}))};function Lr(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.getName,o=void 0===r?Cr:r,c=n.getTitle,i=void 0===c?Sr:c,l=n.getDescription,a=void 0===l?Ir:l,s=n.getKeywords,u=void 0===s?Br:s,b=n.getCategory,f=void 0===b?xr:b,p=n.getCollection,m=void 0===p?Pr:p,v=o(e),g=i(e),O=a(e),h=u(e),j=f(e),k=m(e),y=Tr(t),_=Tr(g),E=0;if(y===_)E+=30;else if(_.startsWith(y))E+=20;else{var w=[v,g,O].concat(Object(pe.a)(h),[j,k]).join(" "),C=Object(d.words)(y),S=Dr(C,w);0===S.length&&(E+=10)}return 0!==E&&v.startsWith("core/")&&E++,E}var Mr=function(e,t){var n=Object(m.useSelect)((function(t){var n=t("core/block-editor").getInserterItems,r=t(p.store),o=r.getCategories,c=r.getCollections;return{categories:o(),collections:c(),items:n(e)}}),[e]),r=n.categories,o=n.collections;return[n.items,r,o,Object(a.useCallback)((function(e){var n=e.name,r=e.initialAttributes,o=e.innerBlocks,c=Object(p.createBlock)(n,r,Object(p.createBlocksFromInnerBlocksTemplate)(o));t(c)}),[t])]},Fr=n("./node_modules/@wordpress/icons/build-module/library/block-default.js");function Vr(e){var t,n=e.icon,r=e.showColors,o=void 0!==r&&r,c=e.className;"block-default"===(null===(t=n)||void 0===t?void 0:t.src)&&(n={src:Fr.a});var i=Object(a.createElement)(v.Icon,{icon:n&&n.src?n.src:n}),l=o?{backgroundColor:n&&n.background,color:n&&n.foreground}:{};return Object(a.createElement)("span",{style:l,className:u()("block-editor-block-icon",c,{"has-colors":o})},i)}var Hr={name:"blocks",className:"block-editor-autocompleters__block",triggerPrefix:"/",useItems:function(e){var t=Object(m.useSelect)((function(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientId,r=t.getBlockName,o=t.getBlockInsertionPoint,c=n();return{selectedBlockName:c?r(c):null,rootClientId:o().rootClientId}}),[]),n=t.rootClientId,r=t.selectedBlockName,o=Mr(n,d.noop),c=Object(Me.a)(o,3),i=c[0],l=c[1],s=c[2],u=Object(a.useMemo)((function(){return(e.trim()?Ar(i,l,s,e):Object(d.orderBy)(i,["frecency"],["desc"])).filter((function(e){return e.name!==r})).slice(0,9)}),[e,r,i,l,s]);return[Object(a.useMemo)((function(){return u.map((function(e){var t=e.title,n=e.icon,r=e.isDisabled;return{key:"block-".concat(e.id),value:e,label:Object(a.createElement)(a.Fragment,null,Object(a.createElement)(Vr,{key:"icon",icon:n,showColors:!0}),t),isDisabled:r}}))}),[u])]},allowContext:function(e,t){return!(/\S/.test(e)||/\S/.test(t))},getOptionCompletion:function(e){var t=e.name,n=e.initialAttributes,r=e.innerBlocks;return{action:"replace",value:Object(p.createBlock)(t,n,Object(p.createBlocksFromInnerBlocksTemplate)(r))}}},zr=[];var Gr=function(e){var t=h().name,n=e.completers,r=void 0===n?zr:n;return r=Object(a.useMemo)((function(){var e=r;return t===Object(p.getDefaultBlockName)()&&(e=e.concat([Hr])),Object(f.hasFilter)("editor.Autocomplete.completers")&&(e===r&&(e=e.map(d.clone)),e=Object(f.applyFilters)("editor.Autocomplete.completers",e,t)),e}),[r,t]),Object(a.createElement)(v.Autocomplete,Object(i.a)({},e,{completers:r}))},Ur=Object(a.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(S.Path,{d:"M4.2 9h1.5V5.8H9V4.2H4.2V9zm14 9.2H15v1.5h4.8V15h-1.5v3.2zM15 4.2v1.5h3.2V9h1.5V4.2H15zM5.8 15H4.2v4.8H9v-1.5H5.8V15z"}));var Wr=function(e){var t=e.isActive,n=e.label,r=void 0===n?Object(C.__)("Toggle full height"):n,o=e.onToggle,c=e.isDisabled;return Object(a.createElement)(v.ToolbarGroup,null,Object(a.createElement)(v.ToolbarButton,{isActive:t,icon:Ur,label:r,onClick:function(){return o(!t)},disabled:c}))};var Kr=function(e){var t=e.label,n=void 0===t?Object(C.__)("Change matrix alignment"):t,r=e.onChange,o=void 0===r?d.noop:r,c=e.value,i=void 0===c?"center":c,l=e.isDisabled,s=Object(a.createElement)(v.__experimentalAlignmentMatrixControl.Icon,{value:i}),u="block-editor-block-alignment-matrix-toolbar",b="".concat(u,"__popover");return Object(a.createElement)(v.Dropdown,{position:"bottom right",className:u,popoverProps:{className:b,isAlternate:!0},renderToggle:function(e){var t=e.onToggle,r=e.isOpen;return Object(a.createElement)(v.ToolbarGroup,null,Object(a.createElement)(v.ToolbarButton,{onClick:t,"aria-haspopup":"true","aria-expanded":r,onKeyDown:function(e){r||e.keyCode!==Ht.DOWN||(e.preventDefault(),e.stopPropagation(),t())},label:n,icon:s,showTooltip:!0,disabled:l}))},renderContent:function(){return Object(a.createElement)(v.__experimentalAlignmentMatrixControl,{hasFocusBorder:!1,onChange:o,value:i})}})},qr={insertUsage:{}},$r={alignWide:!1,colors:[{name:Object(C.__)("Black"),slug:"black",color:"#000000"},{name:Object(C.__)("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:Object(C.__)("White"),slug:"white",color:"#ffffff"},{name:Object(C.__)("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:Object(C.__)("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:Object(C.__)("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:Object(C.__)("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:Object(C.__)("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:Object(C.__)("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:Object(C.__)("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:Object(C.__)("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:Object(C.__)("Vivid purple"),slug:"vivid-purple",color:"#9b51e0"}],fontSizes:[{name:Object(C._x)("Small","font size name"),size:13,slug:"small"},{name:Object(C._x)("Normal","font size name"),size:16,slug:"normal"},{name:Object(C._x)("Medium","font size name"),size:20,slug:"medium"},{name:Object(C._x)("Large","font size name"),size:36,slug:"large"},{name:Object(C._x)("Huge","font size name"),size:42,slug:"huge"}],imageSizes:[{slug:"thumbnail",name:Object(C.__)("Thumbnail")},{slug:"medium",name:Object(C.__)("Medium")},{slug:"large",name:Object(C.__)("Large")},{slug:"full",name:Object(C.__)("Full Size")}],imageEditing:!0,maxWidth:580,allowedBlockTypes:!0,maxUploadFileSize:0,allowedMimeTypes:null,availableLegacyWidgets:{},__experimentalCanUserUseUnfilteredHTML:!1,__experimentalBlockDirectory:!1,__mobileEnablePageTemplates:!1,__experimentalBlockPatterns:[],__experimentalBlockPatternCategories:[],__experimentalSpotlightEntityBlocks:[],gradients:[{name:Object(C.__)("Vivid cyan blue to vivid purple"),gradient:"linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)",slug:"vivid-cyan-blue-to-vivid-purple"},{name:Object(C.__)("Light green cyan to vivid green cyan"),gradient:"linear-gradient(135deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%)",slug:"light-green-cyan-to-vivid-green-cyan"},{name:Object(C.__)("Luminous vivid amber to luminous vivid orange"),gradient:"linear-gradient(135deg,rgba(252,185,0,1) 0%,rgba(255,105,0,1) 100%)",slug:"luminous-vivid-amber-to-luminous-vivid-orange"},{name:Object(C.__)("Luminous vivid orange to vivid red"),gradient:"linear-gradient(135deg,rgba(255,105,0,1) 0%,rgb(207,46,46) 100%)",slug:"luminous-vivid-orange-to-vivid-red"},{name:Object(C.__)("Very light gray to cyan bluish gray"),gradient:"linear-gradient(135deg,rgb(238,238,238) 0%,rgb(169,184,195) 100%)",slug:"very-light-gray-to-cyan-bluish-gray"},{name:Object(C.__)("Cool to warm spectrum"),gradient:"linear-gradient(135deg,rgb(74,234,220) 0%,rgb(151,120,209) 20%,rgb(207,42,186) 40%,rgb(238,44,130) 60%,rgb(251,105,98) 80%,rgb(254,248,76) 100%)",slug:"cool-to-warm-spectrum"},{name:Object(C.__)("Blush light purple"),gradient:"linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)",slug:"blush-light-purple"},{name:Object(C.__)("Blush bordeaux"),gradient:"linear-gradient(135deg,rgb(254,205,165) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%)",slug:"blush-bordeaux"},{name:Object(C.__)("Luminous dusk"),gradient:"linear-gradient(135deg,rgb(255,203,112) 0%,rgb(199,81,192) 50%,rgb(65,88,208) 100%)",slug:"luminous-dusk"},{name:Object(C.__)("Pale ocean"),gradient:"linear-gradient(135deg,rgb(255,245,203) 0%,rgb(182,227,212) 50%,rgb(51,167,181) 100%)",slug:"pale-ocean"},{name:Object(C.__)("Electric grass"),gradient:"linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)",slug:"electric-grass"},{name:Object(C.__)("Midnight"),gradient:"linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)",slug:"midnight"}]};function Yr(e,t,n){return[].concat(Object(pe.a)(e.slice(0,n)),Object(pe.a)(Object(d.castArray)(t)),Object(pe.a)(e.slice(n)))}function Xr(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=Object(pe.a)(e);return o.splice(t,r),Yr(o,e.slice(t,t+r),n)}function Qr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Zr(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"",n=Object(l.a)({},t,[]);return e.forEach((function(e){var r=e.clientId,o=e.innerBlocks;n[t].push(r),Object.assign(n,Jr(o,r))})),n}function eo(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.reduce((function(e,n){return Object.assign(e,Object(l.a)({},n.clientId,t),eo(n.innerBlocks,n.clientId))}),{})}function to(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.identity,n={},r=Object(pe.a)(e);r.length;){var o=r.shift(),c=o.innerBlocks,i=Object(Fe.a)(o,["innerBlocks"]);r.push.apply(r,Object(pe.a)(c)),n[i.clientId]=t(i)}return n}function no(e){return to(e,(function(e){return Object(d.omit)(e,"attributes")}))}function ro(e){return to(e,(function(e){return e.attributes}))}function oo(e,t){return e===t?Zr({},e):t}function co(e,t){return"UPDATE_BLOCK_ATTRIBUTES"===e.type&&void 0!==t&&"UPDATE_BLOCK_ATTRIBUTES"===t.type&&Object(d.isEqual)(e.clientIds,t.clientIds)&&(n=e.attributes,r=t.attributes,Object(d.isEqual)(Object(d.keys)(n),Object(d.keys)(r)));var n,r}var io=function(e){return e.reduce((function(e,t){return e[t]={},e}),{})};var lo=Object(d.flow)(m.combineReducers,(function(e){return function(t,n){if(t&&"SAVE_REUSABLE_BLOCK_SUCCESS"===n.type){var r=n.id,o=n.updatedId;if(r===o)return t;(t=Zr({},t)).attributes=Object(d.mapValues)(t.attributes,(function(e,n){return"core/block"===t.byClientId[n].name&&e.ref===r?Zr(Zr({},e),{},{ref:o}):e}))}return e(t,n)}}),(function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,r=e(t,n);if(r===t)return t;r.cache=t.cache?t.cache:{};var o=function(e){return e.reduce((function(e,n){var r=n;do{e.push(r),r=t.parents[r]}while(r&&!t.controlledInnerBlocks[r]);return e}),[])};switch(n.type){case"RESET_BLOCKS":r.cache=Object(d.mapValues)(to(n.blocks),(function(){return{}}));break;case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":var c=Object(d.keys)(to(n.blocks));n.rootClientId&&!t.controlledInnerBlocks[n.rootClientId]&&c.push(n.rootClientId),r.cache=Zr(Zr({},r.cache),io(o(c)));break;case"UPDATE_BLOCK":r.cache=Zr(Zr({},r.cache),io(o([n.clientId])));break;case"UPDATE_BLOCK_ATTRIBUTES":r.cache=Zr(Zr({},r.cache),io(o(n.clientIds)));break;case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":var i=io(o(n.replacedClientIds));r.cache=Zr(Zr(Zr({},Object(d.omit)(r.cache,n.replacedClientIds)),Object(d.omit)(i,n.replacedClientIds)),io(Object(d.keys)(to(n.blocks))));break;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":r.cache=Zr(Zr({},Object(d.omit)(r.cache,n.removedClientIds)),io(Object(d.difference)(o(n.clientIds),n.clientIds)));break;case"MOVE_BLOCKS_TO_POSITION":var l=Object(pe.a)(n.clientIds);n.fromRootClientId&&l.push(n.fromRootClientId),n.toRootClientId&&l.push(n.toRootClientId),r.cache=Zr(Zr({},r.cache),io(o(l)));break;case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":var a=[];n.rootClientId&&a.push(n.rootClientId),r.cache=Zr(Zr({},r.cache),io(o(a)));break;case"SAVE_REUSABLE_BLOCK_SUCCESS":var s=Object(d.keys)(Object(d.omitBy)(r.attributes,(function(e,t){return"core/block"!==r.byClientId[t].name||e.ref!==n.updatedId})));r.cache=Zr(Zr({},r.cache),io(o(s)))}return r}}),(function(e){return function(t,n){var r=function(e){for(var r=e,o=0;o1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object(d.reduce)(t[n],(function(n,o){return r[o]?n:[].concat(Object(pe.a)(n),[o],Object(pe.a)(e(t,o)))}),[])}(t.order,"",t.controlledInnerBlocks),o=Object.keys(Object(d.pickBy)(t.controlledInnerBlocks));return Zr(Zr({},t),{},{byClientId:Zr(Zr({},Object(d.omit)(t.byClientId,r)),no(n.blocks)),attributes:Zr(Zr({},Object(d.omit)(t.attributes,r)),ro(n.blocks)),order:Zr(Zr({},Object(d.omit)(t.order,r)),Object(d.omit)(Jr(n.blocks),o)),parents:Zr(Zr({},Object(d.omit)(t.parents,r)),eo(n.blocks)),cache:Zr(Zr({},Object(d.omit)(t.cache,r)),Object(d.omit)(Object(d.mapValues)(to(n.blocks),(function(){return{}})),o))})}return e(t,n)}}),(function(e){var t,n=!1;return function(r,o){var c=e(r,o),i="MARK_LAST_CHANGE_AS_PERSISTENT"===o.type||n;if(r===c&&!i){var l;n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===o.type;var a=null===(l=null==r?void 0:r.isPersistentChange)||void 0===l||l;return r.isPersistentChange===a?r:Zr(Zr({},c),{},{isPersistentChange:a})}return c=Zr(Zr({},c),{},{isPersistentChange:i?!n:!co(o,t)}),t=o,n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===o.type,c}}),(function(e){var t=new Set(["RECEIVE_BLOCKS"]);return function(n,r){var o=e(n,r);return o!==n&&(o.isIgnoredChange=t.has(r.type)),o}}))({byClientId:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RESET_BLOCKS":return no(t.blocks);case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return Zr(Zr({},e),no(t.blocks));case"UPDATE_BLOCK":if(!e[t.clientId])return e;var n=Object(d.omit)(t.updates,"attributes");return Object(d.isEmpty)(n)?e:Zr(Zr({},e),{},Object(l.a)({},t.clientId,Zr(Zr({},e[t.clientId]),n)));case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?Zr(Zr({},Object(d.omit)(e,t.replacedClientIds)),no(t.blocks)):e;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(d.omit)(e,t.removedClientIds)}return e},attributes:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RESET_BLOCKS":return ro(t.blocks);case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return Zr(Zr({},e),ro(t.blocks));case"UPDATE_BLOCK":return e[t.clientId]&&t.updates.attributes?Zr(Zr({},e),{},Object(l.a)({},t.clientId,Zr(Zr({},e[t.clientId]),t.updates.attributes))):e;case"UPDATE_BLOCK_ATTRIBUTES":if(t.clientIds.every((function(t){return!e[t]})))return e;var n=t.clientIds.reduce((function(n,r){return Zr(Zr({},n),{},Object(l.a)({},r,Object(d.reduce)(t.attributes,(function(t,n,o){return n!==t[o]&&((t=oo(e[r],t))[o]=n),t}),e[r])))}),{});return t.clientIds.every((function(t){return n[t]===e[t]}))?e:Zr(Zr({},e),n);case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?Zr(Zr({},Object(d.omit)(e,t.replacedClientIds)),ro(t.blocks)):e;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(d.omit)(e,t.removedClientIds)}return e},order:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RESET_BLOCKS":return Jr(t.blocks);case"RECEIVE_BLOCKS":return Zr(Zr({},e),Object(d.omit)(Jr(t.blocks),""));case"INSERT_BLOCKS":var n=t.rootClientId,r=void 0===n?"":n,o=e[r]||[],c=Jr(t.blocks,r),i=t.index,a=void 0===i?o.length:i;return Zr(Zr(Zr({},e),c),{},Object(l.a)({},r,Yr(o,c[r],a)));case"MOVE_BLOCKS_TO_POSITION":var s,u=t.fromRootClientId,b=void 0===u?"":u,f=t.toRootClientId,p=void 0===f?"":f,m=t.clientIds,v=t.index,g=void 0===v?e[p].length:v;if(b===p){var O=e[p],h=O.indexOf(m[0]);return Zr(Zr({},e),{},Object(l.a)({},p,Xr(e[p],h,g,m.length)))}return Zr(Zr({},e),{},(s={},Object(l.a)(s,b,d.without.apply(void 0,[e[b]].concat(Object(pe.a)(m)))),Object(l.a)(s,p,Yr(e[p],m,g)),s));case"MOVE_BLOCKS_UP":var j=t.clientIds,k=t.rootClientId,y=void 0===k?"":k,_=Object(d.first)(j),E=e[y];if(!E.length||_===Object(d.first)(E))return e;var w=E.indexOf(_);return Zr(Zr({},e),{},Object(l.a)({},y,Xr(E,w,w-1,j.length)));case"MOVE_BLOCKS_DOWN":var C=t.clientIds,S=t.rootClientId,I=void 0===S?"":S,B=Object(d.first)(C),x=Object(d.last)(C),P=e[I];if(!P.length||x===Object(d.last)(P))return e;var T=P.indexOf(B);return Zr(Zr({},e),{},Object(l.a)({},I,Xr(P,T,T+1,C.length)));case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":var N=t.clientIds;if(!t.blocks)return e;var D=Jr(t.blocks);return Object(d.flow)([function(e){return Object(d.omit)(e,t.replacedClientIds)},function(e){return Zr(Zr({},e),Object(d.omit)(D,""))},function(e){return Object(d.mapValues)(e,(function(e){return Object(d.reduce)(e,(function(e,t){return t===N[0]?[].concat(Object(pe.a)(e),Object(pe.a)(D[""])):(-1===N.indexOf(t)&&e.push(t),e)}),[])}))}])(e);case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(d.flow)([function(e){return Object(d.omit)(e,t.removedClientIds)},function(e){return Object(d.mapValues)(e,(function(e){return d.without.apply(void 0,[e].concat(Object(pe.a)(t.removedClientIds)))}))}])(e)}return e},parents:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RESET_BLOCKS":return eo(t.blocks);case"RECEIVE_BLOCKS":return Zr(Zr({},e),eo(t.blocks));case"INSERT_BLOCKS":return Zr(Zr({},e),eo(t.blocks,t.rootClientId||""));case"MOVE_BLOCKS_TO_POSITION":return Zr(Zr({},e),t.clientIds.reduce((function(e,n){return e[n]=t.toRootClientId||"",e}),{}));case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Zr(Zr({},Object(d.omit)(e,t.replacedClientIds)),eo(t.blocks,e[t.clientIds[0]]));case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(d.omit)(e,t.removedClientIds)}return e},controlledInnerBlocks:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=t.type,r=t.clientId,o=t.hasControlledInnerBlocks;return"SET_HAS_CONTROLLED_INNER_BLOCKS"===n?Zr(Zr({},e),{},Object(l.a)({},r,o)):e}});function ao(){var 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;var n=t.indexToSelect||t.blocks.length-1,r=t.blocks[n];if(!r)return{};if(r.clientId===e.clientId)return e;var o={clientId:r.clientId};return"number"==typeof t.initialPosition&&(o.initialPosition=t.initialPosition),o}return e}function so(e,t,n){switch(t.type){case"CLEAR_SELECTED_BLOCK":case"SELECT_BLOCK":case"SELECTION_CHANGE":case"REPLACE_INNER_BLOCKS":case"INSERT_BLOCKS":case"REMOVE_BLOCKS":case"REPLACE_BLOCKS":return n}return e}var uo=Object(m.combineReducers)({blocks:lo,isTyping:function(){var 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},draggedBlocks:function(){var 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},isCaretWithinFormattedText:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ENTER_FORMATTED_TEXT":return!0;case"EXIT_FORMATTED_TEXT":return!1}return e},selection:function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;switch(r.type){case"SELECTION_CHANGE":return{selectionStart:{clientId:r.clientId,attributeKey:r.attributeKey,offset:r.startOffset},selectionEnd:{clientId:r.clientId,attributeKey:r.attributeKey,offset:r.endOffset}};case"RESET_SELECTION":var o=r.selectionStart,c=r.selectionEnd;return{selectionStart:o,selectionEnd:c};case"MULTI_SELECT":var i=r.start,l=r.end;return{selectionStart:{clientId:i},selectionEnd:{clientId:l}};case"RESET_BLOCKS":var a=null==n||null===(e=n.selectionStart)||void 0===e?void 0:e.clientId,s=null==n||null===(t=n.selectionEnd)||void 0===t?void 0:t.clientId;if(!a&&!s)return n;if(!r.blocks.some((function(e){return e.clientId===a})))return{selectionStart:{},selectionEnd:{}};if(!r.blocks.some((function(e){return e.clientId===s})))return Zr(Zr({},n),{},{selectionEnd:n.selectionStart})}return{selectionStart:ao(n.selectionStart,r),selectionEnd:ao(n.selectionEnd,r)}},isMultiSelecting:function(){var 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(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"TOGGLE_SELECTION":return t.isSelectionEnabled}return e},initialPosition:function(e,t){return"REPLACE_BLOCKS"===t.type&&"number"==typeof t.initialPosition||"SELECT_BLOCK"===t.type?t.initialPosition:"REMOVE_BLOCKS"===t.type||"START_TYPING"===t.type?e:void 0},blocksMode:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if("TOGGLE_BLOCK_MODE"===t.type){var n=t.clientId;return Zr(Zr({},e),{},Object(l.a)({},n,e[n]&&"html"===e[n]?"visual":"html"))}return e},blockListSettings:function(){var 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(d.omit)(e,t.clientIds);case"UPDATE_BLOCK_LIST_SETTINGS":var n=t.clientId;return t.settings?Object(d.isEqual)(e[n],t.settings)?e:Zr(Zr({},e),{},Object(l.a)({},n,t.settings)):e.hasOwnProperty(n)?Object(d.omit)(e,n):e}return e},insertionPoint:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_INSERTION_POINT":case"SHOW_INSERTION_POINT":var n=t.rootClientId,r=t.index;return{rootClientId:n,index:r}}return so(e,t,null)},insertionPointVisibility:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SHOW_INSERTION_POINT":return!0;case"HIDE_INSERTION_POINT":return!1}return so(e,t,!1)},template:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isValid:!0},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_TEMPLATE_VALIDITY":return Zr(Zr({},e),{},{isValid:t.isValid})}return e},settings:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:$r,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_SETTINGS":return Zr(Zr({},e),t.settings)}return e},preferences:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:qr,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":return t.blocks.reduce((function(e,n){var r=n.name,o={name:n.name};return Object(p.isReusableBlock)(n)&&(o.ref=n.attributes.ref,r+="/"+n.attributes.ref),Zr(Zr({},e),{},{insertUsage:Zr(Zr({},e.insertUsage),{},Object(l.a)({},r,{time:t.time,count:e.insertUsage[r]?e.insertUsage[r].count+1:1,insert:o}))})}),e)}return e},lastBlockAttributesChange:function(e,t){switch(t.type){case"UPDATE_BLOCK":if(!t.updates.attributes)break;return Object(l.a)({},t.clientId,t.updates.attributes);case"UPDATE_BLOCK_ATTRIBUTES":return t.clientIds.reduce((function(e,n){return Zr(Zr({},e),{},Object(l.a)({},n,t.attributes))}),{})}return null},isNavigationMode:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return"INSERT_BLOCKS"!==t.type&&("SET_NAVIGATION_MODE"===t.type?t.isNavigationMode:e)},hasBlockMovingClientId:function(){var 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_NAVIGATION_MODE"===t.type?null:e},automaticChangeStatus:function(e,t){switch(t.type){case"MARK_AUTOMATIC_CHANGE":return"pending";case"MARK_AUTOMATIC_CHANGE_FINAL":return"pending"===e?"final":void 0;case"SELECTION_CHANGE":return"final"!==e?e:void 0;case"START_TYPING":case"STOP_TYPING":return e}},highlightedBlock:function(e,t){switch(t.type){case"TOGGLE_BLOCK_HIGHLIGHT":var n=t.clientId;return t.isHighlighted?n:e===n?null:e;case"SELECT_BLOCK":if(t.clientId!==e)return null}return e}}),bo=n("./node_modules/@babel/runtime/helpers/esm/typeof.js"),fo=n("./node_modules/rememo/es/rememo.js");function po(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return mo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return mo(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,i=!0,l=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){l=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw c}}}}function mo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:"";return Object(d.map)(ic(e,t),(function(t){return Co(e,t)}))}),(function(e){return[e.blocks.byClientId,e.blocks.order,e.blocks.attributes]})),Io=function e(t,n){return Object(d.flatMap)(n,(function(n){var r=ic(t,n);return[].concat(Object(pe.a)(r),Object(pe.a)(e(t,r)))}))},Bo=Object(fo.a)((function(e){var t=ic(e);return[].concat(Object(pe.a)(t),Object(pe.a)(Io(e,t)))}),(function(e){return[e.blocks.order]})),xo=Object(fo.a)((function(e,t){var n=Bo(e);return t?Object(d.reduce)(n,(function(n,r){return e.blocks.byClientId[r].name===t?n+1:n}),0):n.length}),(function(e){return[e.blocks.order,e.blocks.byClientId]})),Po=Object(fo.a)((function(e,t){return Object(d.map)(Object(d.castArray)(t),(function(t){return _o(e,t)}))}),(function(e){return[e.blocks.byClientId,e.blocks.order,e.blocks.attributes]}));function To(e,t){return ic(e,t).length}function No(e){return e.selection.selectionStart}function Do(e){return e.selection.selectionEnd}function Ao(e){return e.selection.selectionStart.clientId}function Ro(e){return e.selection.selectionEnd.clientId}function Lo(e){var t=Qo(e).length;return t||(e.selection.selectionStart.clientId?1:0)}function Mo(e){var t=e.selection,n=t.selectionStart,r=t.selectionEnd;return!!n.clientId&&n.clientId===r.clientId}function Fo(e){var t=e.selection,n=t.selectionStart,r=t.selectionEnd,o=n.clientId;return o&&o===r.clientId?o:null}function Vo(e){var t=Fo(e);return t?_o(e,t):null}function Ho(e,t){return void 0!==e.blocks.parents[t]?e.blocks.parents[t]:null}var zo=Object(fo.a)((function(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=[],o=t;e.blocks.parents[o];)o=e.blocks.parents[o],r.push(o);return n?r:r.reverse()}),(function(e){return[e.blocks.parents]})),Go=Object(fo.a)((function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=zo(e,t,r);return Object(d.map)(Object(d.filter)(Object(d.map)(o,(function(t){return{id:t,name:jo(e,t)}})),(function(e){var t=e.name;return Array.isArray(n)?n.includes(t):t===n})),(function(e){return e.id}))}),(function(e){return[e.blocks.parents]}));function Uo(e,t){var n,r=t;do{n=r,r=e.blocks.parents[r]}while(r);return n}function Wo(e,t){for(var n,r=Fo(e),o=[].concat(Object(pe.a)(zo(e,t)),[t]),c=[].concat(Object(pe.a)(zo(e,r)),[r]),i=Math.min(o.length,c.length),l=0;l2&&void 0!==arguments[2]?arguments[2]:1;if(void 0===t&&(t=Fo(e)),void 0===t&&(t=n<0?Jo(e):ec(e)),!t)return null;var r=Ho(e,t);if(null===r)return null;var o=e.blocks.order,c=o[r],i=c.indexOf(t),l=i+1*n;return l<0||l===c.length?null:c[l]}function qo(e,t){return Ko(e,t,-1)}function $o(e,t){return Ko(e,t,1)}function Yo(e){return e.initialPosition}var Xo=Object(fo.a)((function(e){var t=e.selection,n=t.selectionStart,r=t.selectionEnd;if(void 0===n.clientId||void 0===r.clientId)return ho;if(n.clientId===r.clientId)return[n.clientId];var o=Ho(e,n.clientId);if(null===o)return ho;var c=ic(e,o),i=c.indexOf(n.clientId),l=c.indexOf(r.clientId);return i>l?c.slice(l,i+1):c.slice(i,l+1)}),(function(e){return[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]}));function Qo(e){var t=e.selection,n=t.selectionStart,r=t.selectionEnd;return n.clientId===r.clientId?ho:Xo(e)}var Zo=Object(fo.a)((function(e){var t=Qo(e);return t.length?t.map((function(t){return _o(e,t)})):ho}),(function(e){return[].concat(Object(pe.a)(Xo.getDependants(e)),[e.blocks.byClientId,e.blocks.order,e.blocks.attributes])}));function Jo(e){return Object(d.first)(Qo(e))||null}function ec(e){return Object(d.last)(Qo(e))||null}function tc(e,t){return Jo(e)===t}function nc(e,t){return-1!==Qo(e).indexOf(t)}var rc=Object(fo.a)((function(e,t){for(var n=t,r=!1;n&&!r;)r=nc(e,n=Ho(e,n));return r}),(function(e){return[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]}));function oc(e){var t=e.selection,n=t.selectionStart,r=t.selectionEnd;return n.clientId===r.clientId?null:n.clientId||null}function cc(e){var t=e.selection,n=t.selectionStart,r=t.selectionEnd;return n.clientId===r.clientId?null:r.clientId||null}function ic(e,t){return e.blocks.order[t||""]||ho}function lc(e,t,n){return ic(e,n).indexOf(t)}function ac(e,t){var n=e.selection,r=n.selectionStart,o=n.selectionEnd;return r.clientId===o.clientId&&r.clientId===t}function sc(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Object(d.some)(ic(e,t),(function(t){return ac(e,t)||nc(e,t)||n&&sc(e,t,n)}))}function uc(e,t){if(!t)return!1;var n=Qo(e),r=n.indexOf(t);return r>-1&&r2&&void 0!==arguments[2]?arguments[2]:null,o=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return Object(d.isBoolean)(e)?e:Object(d.isArray)(e)?!(!e.includes("core/post-content")||null!==t)||e.includes(t):n};if(t&&"object"===Object(bo.a)(t)?t=(n=t).name:n=Object(p.getBlockType)(t),!n)return!1;var c=Fc(e),i=c.allowedBlockTypes,l=o(i,t,!0);if(!l)return!1;var a=!!wc(e,r);if(a)return!1;var s=Mc(e,r);if(r&&void 0===s)return!1;var u=null==s?void 0:s.allowedBlocks,b=o(u,t),f=n.parent,m=jo(e,r),v=o(f,m);return null!==b&&null!==v?b||v:null!==b?b:null===v||v},Sc=Object(fo.a)(Cc,(function(e,t,n){return[e.blockListSettings[n],e.blocks.byClientId[n],e.settings.allowedBlockTypes,e.settings.templateLock]}));function Ic(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((function(t){return Sc(e,jo(e,t),n)}))}function Bc(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}var xc=function(e,t,n){return!!Object(p.hasBlockSupport)(t,"inserter",!0)&&Cc(e,t.name,n)},Pc=function(e){return function(t){return go(go({},e),{},{id:"".concat(e.id,"-").concat(t.name),icon:t.icon||e.icon,title:t.title||e.title,description:t.description||e.description,category:t.category||e.category,example:t.hasOwnProperty("example")?t.example:e.example,initialAttributes:go(go({},e.initialAttributes),t.attributes),innerBlocks:t.innerBlocks,keywords:t.keywords||e.keywords})}},Tc=function(e,t){if(!e)return t;var 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}},Nc=function(e,t){var n=t.buildScope,r=void 0===n?"inserter":n;return function(t){var n=t.name,o=!1;Object(p.hasBlockSupport)(t.name,"multiple",!0)||(o=Object(d.some)(Po(e,Bo(e)),{name:t.name}));var c=Bc(e,n)||{},i=c.time,l=c.count,a=void 0===l?0:l,s={id:n,name:t.name,title:t.title,icon:t.icon,isDisabled:o,frecency:Tc(i,a)};if("transform"===r)return s;var u=t.variations.filter((function(e){var t=e.scope;return!t||t.includes("inserter")}));return go(go({},s),{},{initialAttributes:{},description:t.description,category:t.category,keywords:t.keywords,variations:u,example:t.example,utility:1})}},Dc=Object(fo.a)((function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=Nc(e,{buildScope:"inserter"}),o=function(t){var n,r="core/block/".concat(t.id),o=zc(e,t.id);1===o.length&&(n=Object(p.getBlockType)(o[0].name));var c=Bc(e,r)||{},i=c.time,l=c.count,a=Tc(i,void 0===l?0:l);return{id:r,name:"core/block",initialAttributes:{ref:t.id},title:t.title.raw,icon:n?n.icon:Oo,category:"reusable",keywords:[],isDisabled:!1,utility:1,frecency:a}},c=Object(p.getBlockTypes)().filter((function(t){return xc(e,t,n)})).map(r),i=Cc(e,"core/block",n)?Kc(e).map(o):[],l=c.filter((function(e){var t=e.variations;return!(void 0===t?[]:t).some((function(e){return e.isDefault}))})),a=[],s=po(c);try{for(s.s();!(t=s.n()).done;){var u=t.value,d=u.variations,b=void 0===d?[]:d;if(b.length){var f=Pc(u);a.push.apply(a,Object(pe.a)(b.map(f)))}}}catch(e){s.e(e)}finally{s.f()}return[].concat(Object(pe.a)(l),a,Object(pe.a)(i))}),(function(e,t){return[e.blockListSettings[t],e.blocks.byClientId,e.blocks.order,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,Kc(e),Object(p.getBlockTypes)()]})),Ac=Object(fo.a)((function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=Nc(e,{buildScope:"transform"}),o=Object(p.getBlockTypes)().filter((function(t){return xc(e,t,n)})).map(r),c=Object(d.mapKeys)(o,(function(e){return e.name})),i=Object(p.getPossibleBlockTransformations)(t).reduce((function(e,t){return c[null==t?void 0:t.name]&&e.push(c[t.name]),e}),[]),l=Object(d.orderBy)(i,(function(e){return c[e.name].frecency}),"desc");return l}),(function(e,t){return[e.blockListSettings[t],e.blocks.byClientId,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,Object(p.getBlockTypes)()]})),Rc=Object(fo.a)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=Object(d.some)(Object(p.getBlockTypes)(),(function(n){return xc(e,n,t)}));if(n)return!0;var r=Cc(e,"core/block",t)&&Kc(e).length>0;return r}),(function(e,t){return[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,Kc(e),Object(p.getBlockTypes)()]})),Lc=Object(fo.a)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(t)return Object(d.filter)(Object(p.getBlockTypes)(),(function(n){return xc(e,n,t)}))}),(function(e,t){return[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,Object(p.getBlockTypes)()]}));function Mc(e,t){return e.blockListSettings[t]}function Fc(e){return e.settings}function Vc(e){return e.blocks.isPersistentChange}var Hc=Object(fo.a)((function(e,t){return Object(d.filter)(e.blockListSettings,(function(e,n){return t.includes(n)}))}),(function(e){return[e.blockListSettings]})),zc=Object(fo.a)((function(e,t){var n=Object(d.find)(Kc(e),(function(e){return e.id===t}));return n?Object(p.parse)("string"==typeof n.content.raw?n.content.raw:n.content):null}),(function(e){return[Kc(e)]})),Gc=Object(fo.a)((function(e,t){var n,r=Object(d.find)(Kc(e),(function(e){return e.id===t}));return r?null===(n=r.title)||void 0===n?void 0:n.raw:null}),(function(e){return[Kc(e)]}));function Uc(e){return e.blocks.isIgnoredChange}function Wc(e){return e.lastBlockAttributesChange}function Kc(e){var t,n;return null!==(t=null==e||null===(n=e.settings)||void 0===n?void 0:n.__experimentalReusableBlocks)&&void 0!==t?t:ho}function qc(e){return e.isNavigationMode}function $c(e){return e.hasBlockMovingClientId}function Yc(e){return!!e.automaticChangeStatus}function Xc(e,t){return e.highlightedBlock===t}function Qc(e,t){return!!e.blocks.controlledInnerBlocks[t]}var Zc=Object(fo.a)((function(e,t){if(!t.length)return null;var n=Fo(e);if(t.includes(jo(e,n)))return n;var r=Qo(e),o=Go(e,n||r[0],t);return o?Object(d.last)(o):null}),(function(e,t){return[e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId,t]})),Jc=n("@babel/runtime/regenerator"),ei=n.n(Jc),ti={SLEEP:function(e){var t=e.duration;return new Promise((function(e){setTimeout(e,t)}))},MARK_AUTOMATIC_CHANGE_FINAL_CONTROL:Object(m.createRegistryControl)((function(e){return function(){var t=window.requestIdleCallback;(void 0===t?function(e){return setTimeout(e,100)}:t)((function(){return e.dispatch("core/block-editor").__unstableMarkAutomaticChangeFinal()}))}}))};function ni(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return ri(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ri(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,i=!0,l=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){l=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw c}}}}function ri(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:null;return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}function Di(e){var t;return ei.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,m.controls.select("core/block-editor","getPreviousBlockClientId",e);case 2:if(!(t=n.sent)){n.next=7;break}return n.next=6,Ni(t,-1);case 6:return n.abrupt("return",[t]);case 7:case"end":return n.stop()}}),si)}function Ai(e){var t;return ei.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,m.controls.select("core/block-editor","getNextBlockClientId",e);case 2:if(!(t=n.sent)){n.next=7;break}return n.next=6,Ni(t);case 6:return n.abrupt("return",[t]);case 7:case"end":return n.stop()}}),ui)}function Ri(){return{type:"START_MULTI_SELECT"}}function Li(){return{type:"STOP_MULTI_SELECT"}}function Mi(e,t){var n;return ei.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,{type:"MULTI_SELECT",start:e,end:t};case 2:return r.next=4,m.controls.select("core/block-editor","getSelectedBlockCount");case 4:n=r.sent,Object(ot.speak)(Object(C.sprintf)(Object(C._n)("%s block selected.","%s blocks selected.",n),n),"assertive");case 6:case"end":return r.stop()}}),di)}function Fi(){return{type:"CLEAR_SELECTED_BLOCK"}}function Vi(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}function Hi(e,t){var n,r,o=null!==(n=null==t||null===(r=t.__experimentalPreferredStyleVariations)||void 0===r?void 0:r.value)&&void 0!==n?n:{};return e.map((function(e){var t,n=e.name;if(!Object(p.hasBlockSupport)(n,"defaultStylePicker",!0))return e;if(!o[n])return e;var r=null===(t=e.attributes)||void 0===t?void 0:t.className;if(null!=r&&r.includes("is-style-"))return e;var c=e.attributes,i=void 0===c?{}:c,l=o[n];return ci(ci({},e),{},{attributes:ci(ci({},i),{},{className:"".concat(r||""," is-style-").concat(l).trim()})})}))}function zi(e,t,n,r,o){var c,i,l;return ei.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return e=Object(d.castArray)(e),a.t0=Hi,a.t1=Object(d.castArray)(t),a.next=5,m.controls.select("core/block-editor","getSettings");case 5:return a.t2=a.sent,t=(0,a.t0)(a.t1,a.t2),a.next=9,m.controls.select("core/block-editor","getBlockRootClientId",Object(d.first)(e));case 9:c=a.sent,i=0;case 11:if(!(i1&&void 0!==i[1]?i[1]:"",n=i.length>2&&void 0!==i[2]?i[2]:"",r=i.length>3?i[3]:void 0,l.next=5,m.controls.select("core/block-editor","getTemplateLock",t);case 5:if("all"!==(o=l.sent)){l.next=8;break}return l.abrupt("return");case 8:if(c={type:"MOVE_BLOCKS_TO_POSITION",fromRootClientId:t,toRootClientId:n,clientIds:e,index:r},t!==n){l.next=13;break}return l.next=12,c;case 12:return l.abrupt("return");case 13:if("insert"!==o){l.next=15;break}return l.abrupt("return");case 15:return l.next=17,m.controls.select("core/block-editor","canInsertBlocks",e,n);case 17:if(!l.sent){l.next=21;break}return l.next=21,c;case 21:case"end":return l.stop()}}),fi)}function $i(e){var t,n,r,o=arguments;return ei.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return t=o.length>1&&void 0!==o[1]?o[1]:"",n=o.length>2&&void 0!==o[2]?o[2]:"",r=o.length>3?o[3]:void 0,c.next=5,qi([e],t,n,r);case 5:case"end":return c.stop()}}),pi)}function Yi(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return Xi([e],t,n,r)}function Xi(e,t,n){var r,o,c,i,l,a,s=arguments;return ei.a.wrap((function(u){for(;;)switch(u.prev=u.next){case 0:return r=!(s.length>3&&void 0!==s[3])||s[3],o=s.length>4?s[4]:void 0,u.t0=Hi,u.t1=Object(d.castArray)(e),u.next=6,m.controls.select("core/block-editor","getSettings");case 6:u.t2=u.sent,e=(0,u.t0)(u.t1,u.t2),c=[],i=ni(e),u.prev=10,i.s();case 12:if((l=i.n()).done){u.next=20;break}return a=l.value,u.next=16,m.controls.select("core/block-editor","canInsertBlockType",a.name,n);case 16:u.sent&&c.push(a);case 18:u.next=12;break;case 20:u.next=25;break;case 22:u.prev=22,u.t3=u.catch(10),i.e(u.t3);case 25:return u.prev=25,i.f(),u.finish(25);case 28:if(!c.length){u.next=30;break}return u.abrupt("return",{type:"INSERT_BLOCKS",blocks:c,index:t,rootClientId:n,time:Date.now(),updateSelection:r,meta:o});case 30:case"end":return u.stop()}}),mi,null,[[10,22,25,28]])}function Qi(e,t){return{type:"SET_INSERTION_POINT",rootClientId:e,index:t}}function Zi(e,t){return{type:"SHOW_INSERTION_POINT",rootClientId:e,index:t}}function Ji(){return{type:"HIDE_INSERTION_POINT"}}function el(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}function tl(){var e,t,n;return ei.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,{type:"SYNCHRONIZE_TEMPLATE"};case 2:return r.next=4,m.controls.select("core/block-editor","getBlocks");case 4:return e=r.sent,r.next=7,m.controls.select("core/block-editor","getTemplate");case 7:return t=r.sent,n=Object(p.synchronizeBlocksWithTemplate)(e,t),r.next=11,Si(n);case 11:return r.abrupt("return",r.sent);case 12:case"end":return r.stop()}}),vi)}function nl(e,t){var n,r,o,i,l,a,s,u,b,f,v,g,O,h,j,k,y,_,E,w,C,S,I,B,x,P,T,N,D,A,R,L,M,F;return ei.a.wrap((function(V){for(;;)switch(V.prev=V.next){case 0:return n=[e,t],V.next=3,{type:"MERGE_BLOCKS",blocks:n};case 3:return r=n[0],o=n[1],V.next=6,m.controls.select("core/block-editor","getBlock",r);case 6:if(i=V.sent,(l=Object(p.getBlockType)(i.name)).merge){V.next=12;break}return V.next=11,Ni(i.clientId);case 11:return V.abrupt("return");case 12:return V.next=14,m.controls.select("core/block-editor","getBlock",o);case 14:return a=V.sent,s=Object(p.getBlockType)(a.name),V.next=18,m.controls.select("core/block-editor","getSelectionStart");case 18:if(u=V.sent,b=u.clientId,f=u.attributeKey,v=u.offset,g=(b===r?l:s).attributes[f],O=(b===r||b===o)&&void 0!==f&&void 0!==v&&!!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 ".concat(Object(bo.a)(f))):window.console.error("The RichText identifier prop does not match any attributes defined by the block.")),h="†",j=Object(p.cloneBlock)(i),k=Object(p.cloneBlock)(a),O&&(_=(y=b===r?j:k).attributes[f],E=g.multiline,w=g.__unstableMultilineWrapperTags,C=g.__unstablePreserveWhiteSpace,S=Object(c.insert)(Object(c.create)({html:_,multilineTag:E,multilineWrapperTags:w,preserveWhiteSpace:C}),h,v,v),y.attributes[f]=Object(c.toHTMLString)({value:S,multilineTag:E,preserveWhiteSpace:C})),(I=i.name===a.name?[k]:Object(p.switchToBlockType)(k,i.name))&&I.length){V.next=33;break}return V.abrupt("return");case 33:if(B=l.merge(j.attributes,I[0].attributes),!O){V.next=45;break}return x=Object(d.findKey)(B,(function(e){return"string"==typeof e&&-1!==e.indexOf(h)})),P=B[x],T=l.attributes[x],N=T.multiline,D=T.__unstableMultilineWrapperTags,A=T.__unstablePreserveWhiteSpace,R=Object(c.create)({html:P,multilineTag:N,multilineWrapperTags:D,preserveWhiteSpace:A}),L=R.text.indexOf(h),M=Object(c.remove)(R,L,L+1),F=Object(c.toHTMLString)({value:M,multilineTag:N,preserveWhiteSpace:A}),B[x]=F,V.next=45,fl(i.clientId,x,L,L);case 45:return V.delegateYield(zi([i.clientId,a.clientId],[ci(ci({},i),{},{attributes:ci(ci({},i.attributes),B)})].concat(Object(pe.a)(I.slice(1)))),"t0",46);case 46:case"end":return V.stop()}}),gi)}function rl(e){var t,n,r,o,c=arguments;return ei.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(t=!(c.length>1&&void 0!==c[1])||c[1],e&&e.length){i.next=3;break}return i.abrupt("return");case 3:return e=Object(d.castArray)(e),i.next=6,m.controls.select("core/block-editor","getBlockRootClientId",e[0]);case 6:return n=i.sent,i.next=9,m.controls.select("core/block-editor","getTemplateLock",n);case 9:if(!i.sent){i.next=12;break}return i.abrupt("return");case 12:if(!t){i.next=18;break}return i.next=15,Di(e[0]);case 15:r=i.sent,i.next=21;break;case 18:return i.next=20,m.controls.select("core/block-editor","getPreviousBlockClientId",e[0]);case 20:r=i.sent;case 21:return i.next=23,{type:"REMOVE_BLOCKS",clientIds:e};case 23:return i.delegateYield(Ci(),"t0",24);case 24:return o=i.t0,i.abrupt("return",[r||o]);case 26:case"end":return i.stop()}}),Oi)}function ol(e,t){return rl([e],t)}function cl(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{type:"REPLACE_INNER_BLOCKS",rootClientId:e,blocks:t,updateSelection:n,time:Date.now()}}function il(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function ll(){return{type:"START_TYPING"}}function al(){return{type:"STOP_TYPING"}}function sl(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{type:"START_DRAGGING_BLOCKS",clientIds:e}}function ul(){return{type:"STOP_DRAGGING_BLOCKS"}}function dl(){return{type:"ENTER_FORMATTED_TEXT"}}function bl(){return{type:"EXIT_FORMATTED_TEXT"}}function fl(e,t,n,r){return{type:"SELECTION_CHANGE",clientId:e,attributeKey:t,startOffset:n,endOffset:r}}function pl(e,t,n){var r=Object(p.getDefaultBlockName)();if(r)return Yi(Object(p.createBlock)(r,e),n,t)}function ml(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function vl(e){return{type:"UPDATE_SETTINGS",settings:e}}function gl(e,t){return{type:"SAVE_REUSABLE_BLOCK_SUCCESS",id:e,updatedId:t}}function Ol(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}function hl(){return{type:"MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"}}function jl(){return ei.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,{type:"MARK_AUTOMATIC_CHANGE"};case 2:return e.next=4,{type:"MARK_AUTOMATIC_CHANGE_FINAL_CONTROL"};case 4:case"end":return e.stop()}}),hi)}function kl(){return{type:"MARK_AUTOMATIC_CHANGE_FINAL"}}function yl(){var e,t=arguments;return ei.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return e=!(t.length>0&&void 0!==t[0])||t[0],n.next=3,{type:"SET_NAVIGATION_MODE",isNavigationMode:e};case 3:e?Object(ot.speak)(Object(C.__)("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.")):Object(ot.speak)(Object(C.__)("You are currently in edit mode. To return to the navigation mode, press Escape."));case 4:case"end":return n.stop()}}),ji)}function _l(){var e,t=arguments;return ei.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return e=t.length>0&&void 0!==t[0]?t[0]:null,n.next=3,{type:"SET_BLOCK_MOVING_MODE",hasBlockMovingClientId:e};case 3:e&&Object(ot.speak)(Object(C.__)("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."));case 4:case"end":return n.stop()}}),ki)}function El(e){var t,n,r,o,c,i,l=arguments;return ei.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(t=!(l.length>1&&void 0!==l[1])||l[1],e||e.length){a.next=3;break}return a.abrupt("return");case 3:return a.next=5,m.controls.select("core/block-editor","getBlocksByClientId",e);case 5:return n=a.sent,a.next=8,m.controls.select("core/block-editor","getBlockRootClientId",e[0]);case 8:if(r=a.sent,!Object(d.some)(n,(function(e){return!e}))){a.next=11;break}return a.abrupt("return");case 11:if(o=n.map((function(e){return e.name})),!Object(d.some)(o,(function(e){return!Object(p.hasBlockSupport)(e,"multiple",!0)}))){a.next=14;break}return a.abrupt("return");case 14:return a.next=16,m.controls.select("core/block-editor","getBlockIndex",Object(d.last)(Object(d.castArray)(e)),r);case 16:return c=a.sent,i=n.map((function(e){return Object(p.__experimentalCloneSanitizedBlock)(e)})),a.next=20,Xi(i,c+1,r,t);case 20:if(!(i.length>1&&t)){a.next=23;break}return a.next=23,Mi(Object(d.first)(i).clientId,Object(d.last)(i).clientId);case 23:return a.abrupt("return",i.map((function(e){return e.clientId})));case 24:case"end":return a.stop()}}),yi)}function wl(e){var t,n;return ei.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e){r.next=2;break}return r.abrupt("return");case 2:return r.next=4,m.controls.select("core/block-editor","getBlockRootClientId",e);case 4:return t=r.sent,r.next=7,m.controls.select("core/block-editor","getTemplateLock",t);case 7:if(!r.sent){r.next=10;break}return r.abrupt("return");case 10:return r.next=12,m.controls.select("core/block-editor","getBlockIndex",e,t);case 12:return n=r.sent,r.next=15,pl({},t,n);case 15:return r.abrupt("return",r.sent);case 16:case"end":return r.stop()}}),_i)}function Cl(e){var t,n;return ei.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e){r.next=2;break}return r.abrupt("return");case 2:return r.next=4,m.controls.select("core/block-editor","getBlockRootClientId",e);case 4:return t=r.sent,r.next=7,m.controls.select("core/block-editor","getTemplateLock",t);case 7:if(!r.sent){r.next=10;break}return r.abrupt("return");case 10:return r.next=12,m.controls.select("core/block-editor","getBlockIndex",e,t);case 12:return n=r.sent,r.next=15,pl({},t,n+1);case 15:return r.abrupt("return",r.sent);case 16:case"end":return r.stop()}}),Ei)}function Sl(e,t){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId:e,isHighlighted:t}}function Il(e){return ei.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Sl(e,!0);case 2:return t.next=4,{type:"SLEEP",duration:150};case 4:return t.next=6,Sl(e,!1);case 6:case"end":return t.stop()}}),wi)}function Bl(e,t){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks:t,clientId:e}}function xl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Pl(e){for(var t=1;t1||Object(p.hasBlockSupport)(o,"lightBlockWrapper",!1))return Object(a.createElement)(s,Object(i.a)({},e,{context:l}));var b=Object(p.hasBlockSupport)(o,"className",!0)?Object(p.getBlockDefaultClassName)(r):null,f=u()(b,n.className);return Object(a.createElement)(s,Object(i.a)({},e,{context:l,className:f}))}));function ql(e){var t={name:e.name,isSelected:e.isSelected,clientId:e.clientId,onFocus:e.onFocus,onCaretVerticalPositionChange:e.onCaretVerticalPositionChange};return Object(a.createElement)(O,{value:Object(a.useMemo)((function(){return t}),Object.values(t))},Object(a.createElement)(Kl,e))}var $l=Object(v.createSlotFill)("BlockFormatControls"),Yl=$l.Fill,Xl=$l.Slot;var Ql=function(e){return h().isSelected?Object(a.createElement)(Yl,null,(function(t){var n=Object(d.isEmpty)(t)?null:t;return Object(a.createElement)(v.__experimentalToolbarContext.Provider,{value:n},e.children)})):null};Ql.Slot=function(e){var t=Object(a.useContext)(v.__experimentalToolbarContext);return Object(a.createElement)(Xl,Object(i.a)({},e,{fillProps:t}))};var Zl=Ql,Jl=n("@wordpress/keyboard-shortcuts"),ea=n("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),ta=n("./node_modules/@wordpress/icons/build-module/library/more-vertical.js"),na=n("./node_modules/react-spring/web.cjs.js"),ra=n("@wordpress/dom"),oa=function(e){return e+1},ca=function(e){return{top:e.offsetTop,left:e.offsetLeft}};var ia=function(e,t,n,r,o){var c=Object(b.useReducedMotion)()||!r,i=Object(a.useReducer)(oa,0),l=Object(Me.a)(i,2),s=l[0],u=l[1],d=Object(a.useReducer)(oa,0),f=Object(Me.a)(d,2),p=f[0],m=f[1],v=Object(a.useState)({x:0,y:0}),g=Object(Me.a)(v,2),O=g[0],h=g[1],j=Object(a.useMemo)((function(){return e.current?ca(e.current):null}),[o]),k=Object(a.useMemo)((function(){if(!n||!e.current)return function(){};var t=Object(ra.getScrollContainer)(e.current);if(!t)return function(){};var r=e.current.getBoundingClientRect();return function(){var n=e.current.getBoundingClientRect().top-r.top;n&&(t.scrollTop+=n)}}),[o,n]);function y(n){var r=n.x,o=n.y;r=Math.round(r),o=Math.round(o),r===y.x&&o===y.y||(!function(n){var r=n.x,o=n.y;if(e.current){var c=0===r&&0===o;e.current.style.transformOrigin=c?"":"center",e.current.style.transform=c?"":"translate3d(".concat(r,"px,").concat(o,"px,0)"),e.current.style.zIndex=!t||c?"":"1",k()}}({x:r,y:o}),y.x=r,y.y=o)}Object(a.useLayoutEffect)((function(){s&&m()}),[s]),Object(a.useLayoutEffect)((function(){if(j)if(c)k();else{e.current.style.transform="";var t=ca(e.current);u(),h({x:Math.round(j.left-t.left),y:Math.round(j.top-t.top)})}}),[o]),y.x=0,y.y=0,Object(na.useSpring)({from:{x:O.x,y:O.y},to:{x:0,y:0},reset:s!==p,config:{mass:5,tension:2e3,friction:200},immediate:c,onFrame:y})},la=Object(na.animated)(v.__experimentalTreeGridRow);function aa(e){var t=e.isSelected,n=e.position,r=e.level,o=e.rowCount,c=e.children,l=e.className,s=e.path,d=Object(Fe.a)(e,["isSelected","position","level","rowCount","children","className","path"]),b=Object(a.useRef)(null),f=s.join("_"),p=ia(b,t,!1,!0,f);return Object(a.createElement)(la,Object(i.a)({ref:b,style:p,className:u()("block-editor-block-navigation-leaf",l),level:r,positionInSet:n,setSize:o},d),c)}var sa=n("./node_modules/@wordpress/icons/build-module/library/chevron-right.js"),ua=n("./node_modules/@wordpress/icons/build-module/library/chevron-left.js"),da=n("./node_modules/@wordpress/icons/build-module/library/chevron-up.js"),ba=n("./node_modules/@wordpress/icons/build-module/library/chevron-down.js");function fa(e,t,n,r,o,c,i){var l=n+1,a=function(e){return"up"===e?"horizontal"===i?Object(C.isRTL)()?"right":"left":"up":"down"===e?"horizontal"===i?Object(C.isRTL)()?"left":"right":"down":null};if(e>1)return function(e,t,n,r,o){var c=t+1;if(o<0&&n)return Object(C.__)("Blocks cannot be moved up as they are already at the top");if(o>0&&r)return Object(C.__)("Blocks cannot be moved down as they are already at the bottom");if(o<0&&!n)return Object(C.sprintf)(Object(C._n)("Move %1$d block from position %2$d up by one place","Move %1$d blocks from position %2$d up by one place",e),e,c);if(o>0&&!r)return Object(C.sprintf)(Object(C._n)("Move %1$d block from position %2$d down by one place","Move %1$d blocks from position %2$d down by one place",e),e,c)}(e,n,r,o,c);if(r&&o)return Object(C.sprintf)(Object(C.__)("Block %s is the only block, and cannot be moved"),t);if(c>0&&!o){var s=a("down");if("down"===s)return Object(C.sprintf)(Object(C.__)("Move %1$s block from position %2$d down to position %3$d"),t,l,l+1);if("left"===s)return Object(C.sprintf)(Object(C.__)("Move %1$s block from position %2$d left to position %3$d"),t,l,l+1);if("right"===s)return Object(C.sprintf)(Object(C.__)("Move %1$s block from position %2$d right to position %3$d"),t,l,l+1)}if(c>0&&o){var u=a("down");if("down"===u)return Object(C.sprintf)(Object(C.__)("Block %1$s is at the end of the content and can’t be moved down"),t);if("left"===u)return Object(C.sprintf)(Object(C.__)("Block %1$s is at the end of the content and can’t be moved left"),t);if("right"===u)return Object(C.sprintf)(Object(C.__)("Block %1$s is at the end of the content and can’t be moved right"),t)}if(c<0&&!r){var d=a("up");if("up"===d)return Object(C.sprintf)(Object(C.__)("Move %1$s block from position %2$d up to position %3$d"),t,l,l-1);if("left"===d)return Object(C.sprintf)(Object(C.__)("Move %1$s block from position %2$d left to position %3$d"),t,l,l-1);if("right"===d)return Object(C.sprintf)(Object(C.__)("Move %1$s block from position %2$d right to position %3$d"),t,l,l-1)}if(c<0&&r){var b=a("up");if("up"===b)return Object(C.sprintf)(Object(C.__)("Block %1$s is at the beginning of the content and can’t be moved up"),t);if("left"===b)return Object(C.sprintf)(Object(C.__)("Block %1$s is at the beginning of the content and can’t be moved left"),t);if("right"===b)return Object(C.sprintf)(Object(C.__)("Block %1$s is at the beginning of the content and can’t be moved right"),t)}}var pa=function(e,t){return"up"===e?"horizontal"===t?Object(C.isRTL)()?sa.a:ua.a:da.a:"down"===e?"horizontal"===t?Object(C.isRTL)()?ua.a:sa.a:ba.a:null},ma=function(e,t){return"up"===e?"horizontal"===t?Object(C.isRTL)()?Object(C.__)("Move right"):Object(C.__)("Move left"):Object(C.__)("Move up"):"down"===e?"horizontal"===t?Object(C.isRTL)()?Object(C.__)("Move left"):Object(C.__)("Move right"):Object(C.__)("Move down"):null},va=Object(a.forwardRef)((function(e,t){var n=e.clientIds,r=e.direction,o=e.orientation,c=Object(Fe.a)(e,["clientIds","direction","orientation"]),l=Object(b.useInstanceId)(va),s=Object(d.castArray)(n).length,f=Object(m.useSelect)((function(e){var t=e("core/block-editor"),c=t.getBlockIndex,i=t.getBlockRootClientId,l=t.getBlockOrder,a=t.getBlock,s=t.getBlockListSettings,u=Object(d.castArray)(n),b=Object(d.first)(u),f=i(b),m=c(b,f),v=c(Object(d.last)(u),f),g=l(f),O=a(b),h=0===m,j=v===g.length-1,k=(s(f)||{}).orientation;return{blockType:O?Object(p.getBlockType)(O.name):null,isDisabled:"up"===r?h:j,rootClientId:f,firstIndex:m,isFirst:h,isLast:j,orientation:o||k}}),[n,r]),g=f.blockType,O=f.isDisabled,h=f.rootClientId,j=f.isFirst,k=f.isLast,y=f.firstIndex,_=f.orientation,E=void 0===_?"vertical":_,w=Object(m.useDispatch)("core/block-editor"),C=w.moveBlocksDown,S=w.moveBlocksUp,I="up"===r?S:C,B="block-editor-block-mover-button__description-".concat(l);return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(v.Button,Object(i.a)({ref:t,className:u()("block-editor-block-mover-button","is-".concat(r,"-button")),icon:pa(r,E),label:ma(r,E),"aria-describedby":B},c,{onClick:O?null:function(e){I(n,h),c.onClick&&c.onClick(e)},"aria-disabled":O})),Object(a.createElement)("span",{id:B,className:"block-editor-block-mover-button__description"},fa(s,g&&g.title,y,j,k,"up"===r?-1:1,E)))})),ga=Object(a.forwardRef)((function(e,t){return Object(a.createElement)(va,Object(i.a)({direction:"up",ref:t},e))})),Oa=Object(a.forwardRef)((function(e,t){return Object(a.createElement)(va,Object(i.a)({direction:"down",ref:t},e))})),ha=Object(a.createContext)({__experimentalFeatures:!1}),ja=function(){return Object(a.useContext)(ha)},ka=Object(a.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(S.Path,{d:"M11 13h2v-2h-2v2zm-6 0h2v-2H5v2zm12-2v2h2v-2h-2z"}));var ya=function(e){var t=e.className,n=e.actions,r=e.children,o=e.secondaryActions;return Object(a.createElement)("div",{className:u()(t,"block-editor-warning")},Object(a.createElement)("div",{className:"block-editor-warning__contents"},Object(a.createElement)("p",{className:"block-editor-warning__message"},r),(a.Children.count(n)>0||o)&&Object(a.createElement)("div",{className:"block-editor-warning__actions"},a.Children.count(n)>0&&a.Children.map(n,(function(e,t){return Object(a.createElement)("span",{key:t,className:"block-editor-warning__action"},e)})),o&&Object(a.createElement)(v.DropdownMenu,{className:"block-editor-warning__secondary",icon:ka,label:Object(C.__)("More options"),popoverProps:{position:"bottom left",className:"block-editor-warning__dropdown"},noIcons:!0},(function(){return Object(a.createElement)(v.MenuGroup,null,o.map((function(e,t){return Object(a.createElement)(v.MenuItem,{onClick:e.onClick,key:t},e.title)})))})))))},_a=n("./node_modules/diff/lib/diff/character.js"),Ea=function(e){var t=e.title,n=e.rawContent,r=e.renderedContent,o=e.action,c=e.actionText,i=e.className;return Object(a.createElement)("div",{className:i},Object(a.createElement)("div",{className:"block-editor-block-compare__content"},Object(a.createElement)("h2",{className:"block-editor-block-compare__heading"},t),Object(a.createElement)("div",{className:"block-editor-block-compare__html"},n),Object(a.createElement)("div",{className:"block-editor-block-compare__preview edit-post-visual-editor"},r)),Object(a.createElement)("div",{className:"block-editor-block-compare__action"},Object(a.createElement)(v.Button,{isSecondary:!0,tabIndex:"0",onClick:o},c)))};var wa=function(e){var t,n,r,o,c=e.block,i=e.onKeep,l=e.onConvert,s=e.convertor,b=e.convertButtonText,f={rawContent:c.originalContent,renderedContent:Object(p.getSaveElement)(c.name,c.attributes)},m=(t=s(c),n=Object(d.castArray)(t),r=n.map((function(e){return Object(p.getSaveContent)(e.name,e.attributes,e.innerBlocks)})),o=n.map((function(e){return Object(p.getSaveElement)(e.name,e.attributes,e.innerBlocks)})),{rawContent:r.join(""),renderedContent:o}),v=function(e,t){return Object(_a.diffChars)(e,t).map((function(e,t){var n=u()({"block-editor-block-compare__added":e.added,"block-editor-block-compare__removed":e.removed});return Object(a.createElement)("span",{key:t,className:n},e.value)}))}(f.rawContent,m.rawContent);return Object(a.createElement)("div",{className:"block-editor-block-compare__wrapper"},Object(a.createElement)(Ea,{title:Object(C.__)("Current"),className:"block-editor-block-compare__current",action:i,actionText:Object(C.__)("Convert to HTML"),rawContent:f.rawContent,renderedContent:f.renderedContent}),Object(a.createElement)(Ea,{title:Object(C.__)("After Conversion"),className:"block-editor-block-compare__converted",action:l,actionText:b,rawContent:v,renderedContent:m.renderedContent}))};var Ca=function(e){return Object(p.rawHandler)({HTML:e.originalContent})},Sa=Object(b.compose)([Object(m.withSelect)((function(e,t){var n=t.clientId;return{block:e("core/block-editor").getBlock(n)}})),Object(m.withDispatch)((function(e,t){var n=t.block,r=e("core/block-editor").replaceBlock;return{convertToClassic:function(){r(n.clientId,function(e){return Object(p.createBlock)("core/freeform",{content:e.originalContent})}(n))},convertToHTML:function(){r(n.clientId,function(e){return Object(p.createBlock)("core/html",{content:e.originalContent})}(n))},convertToBlocks:function(){r(n.clientId,Ca(n))},attemptBlockRecovery:function(){var e,t,o,c;r(n.clientId,(t=(e=n).name,o=e.attributes,c=e.innerBlocks,Object(p.createBlock)(t,o,c)))}}}))])((function(e){var t=e.convertToHTML,n=e.convertToBlocks,r=e.convertToClassic,o=e.attemptBlockRecovery,c=e.block,i=!!Object(p.getBlockType)("core/html"),l=Object(a.useState)(!1),s=Object(Me.a)(l,2),u=s[0],d=s[1],b=Object(a.useCallback)((function(){return d(!0)}),[]),f=Object(a.useCallback)((function(){return d(!1)}),[]),m=Object(a.useMemo)((function(){return[{title:Object(C._x)("Resolve","imperative verb"),onClick:b},i&&{title:Object(C.__)("Convert to HTML"),onClick:t},{title:Object(C.__)("Convert to Classic Block"),onClick:r}].filter(Boolean)}),[b,t,r]);return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(ya,{actions:[Object(a.createElement)(v.Button,{key:"recover",onClick:o,isPrimary:!0},Object(C.__)("Attempt Block Recovery"))],secondaryActions:m},Object(C.__)("This block contains unexpected or invalid content.")),u&&Object(a.createElement)(v.Modal,{title:Object(C.__)("Resolve Block"),onRequestClose:f,className:"block-editor-block-compare"},Object(a.createElement)(wa,{block:c,onKeep:t,onConvert:n,convertor:Ca,convertButtonText:Object(C.__)("Convert to Blocks")})))})),Ia=Object(a.createElement)(ya,{className:"block-editor-block-list__block-crash-warning"},Object(C.__)("This block has encountered an error and cannot be previewed.")),Ba=function(){return Ia};function xa(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(Hn.a)(e);if(t){var o=Object(Hn.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(Vn.a)(this,n)}}var Pa=function(e){Object(Fn.a)(n,e);var t=xa(n);function n(){var e;return Object(Rn.a)(this,n),(e=t.apply(this,arguments)).state={hasError:!1},e}return Object(Ln.a)(n,[{key:"componentDidCatch",value:function(e){this.props.onError(e),this.setState({hasError:!0})}},{key:"render",value:function(){return this.state.hasError?null:this.props.children}}]),n}(a.Component),Ta=n("./node_modules/react-autosize-textarea/lib/index.js"),Na=n.n(Ta);var Da=function(e){var t=e.clientId,n=Object(a.useState)(""),r=Object(Me.a)(n,2),o=r[0],c=r[1],i=Object(m.useSelect)((function(e){return e("core/block-editor").getBlock(t)}),[t]),l=Object(m.useDispatch)("core/block-editor").updateBlock;return Object(a.useEffect)((function(){c(Object(p.getBlockContent)(i))}),[i]),Object(a.createElement)(Na.a,{className:"block-editor-block-list__block-html-textarea",value:o,onBlur:function(){var e=Object(p.getBlockType)(i.name),n=Object(p.getBlockAttributes)(e,o,i.attributes),r=o||Object(p.getSaveContent)(e,n),a=!o||Object(p.isValidBlockContent)(e,n,r);l(t,{attributes:n,originalContent:r,isValid:a}),o||c({content:r})},onChange:function(e){return c(e.target.value)}})},Aa=n("@wordpress/html-entities"),Ra=n("./node_modules/@wordpress/icons/build-module/library/plus.js"),La=[Object(a.createInterpolateElement)(Object(C.__)("While writing, you can press / to quickly insert new blocks."),{kbd:Object(a.createElement)("kbd",null)}),Object(a.createInterpolateElement)(Object(C.__)("Indent a list by pressing space at the beginning of a line."),{kbd:Object(a.createElement)("kbd",null)}),Object(a.createInterpolateElement)(Object(C.__)("Outdent a list by pressing backspace at the beginning of a line."),{kbd:Object(a.createElement)("kbd",null)}),Object(C.__)("Drag files into the editor to automatically insert media blocks."),Object(C.__)("Change a block's type by pressing the block icon on the toolbar.")];var Ma=function(){var e=Object(a.useState)(Math.floor(Math.random()*La.length)),t=Object(Me.a)(e,1)[0];return Object(a.createElement)(v.Tip,null,La[t])},Fa=n("./node_modules/@wordpress/icons/build-module/library/close-small.js"),Va=n("./node_modules/@wordpress/icons/build-module/icon/index.js"),Ha=n("./node_modules/@wordpress/icons/build-module/library/search.js");var za=function e(t){var n=t.className,r=t.onChange,o=t.value,c=t.placeholder,i=Object(b.useInstanceId)(e),l=Object(a.useRef)();return Object(a.createElement)("div",{className:u()("block-editor-inserter__search",n)},Object(a.createElement)(v.VisuallyHidden,{as:"label",htmlFor:"block-editor-inserter__search-".concat(i)},c),Object(a.createElement)("input",{ref:l,className:"block-editor-inserter__search-input",id:"block-editor-inserter__search-".concat(i),type:"search",placeholder:c,onChange:function(e){return r(e.target.value)},autoComplete:"off",value:o||""}),Object(a.createElement)("div",{className:"block-editor-inserter__search-icon"},!!o&&Object(a.createElement)(v.Button,{icon:Fa.a,label:Object(C.__)("Reset search"),onClick:function(){r(""),l.current.focus()}}),!o&&Object(a.createElement)(Va.a,{icon:Ha.a})))},Ga=n("@wordpress/deprecated"),Ua=n.n(Ga);var Wa=function(e){var t=e.title,n=e.icon,r=e.description,o=e.blockType;return o&&(Ua()("`blockType` property in `BlockCard component`",{alternative:"`title, icon and description` properties"}),t=o.title,n=o.icon,r=o.description),Object(a.createElement)("div",{className:"block-editor-block-card"},Object(a.createElement)(Vr,{icon:n,showColors:!0}),Object(a.createElement)("div",{className:"block-editor-block-card__content"},Object(a.createElement)("h2",{className:"block-editor-block-card__title"},t),Object(a.createElement)("span",{className:"block-editor-block-card__description"},r)))};function Ka(e){var t=e.clientId,n=void 0===t?null:t,r=e.value,o=e.selectionStart,c=e.selectionEnd,i=e.onChange,l=void 0===i?d.noop:i,s=e.onInput,u=void 0===s?d.noop:s,b=Object(m.useRegistry)(),f=b.dispatch("core/block-editor"),v=f.resetBlocks,g=f.resetSelection,O=f.replaceInnerBlocks,h=f.setHasControlledInnerBlocks,j=f.__unstableMarkNextChangeAsNotPersistent,k=b.select("core/block-editor"),y=k.getBlockName,_=k.getBlocks,E=Object(a.useRef)({incoming:null,outgoing:[]}),w=Object(a.useRef)(!1),C=Object(a.useRef)(u),S=Object(a.useRef)(l);Object(a.useEffect)((function(){C.current=u,S.current=l}),[u,l]),Object(a.useEffect)((function(){E.current.outgoing.includes(r)?Object(d.last)(E.current.outgoing)===r&&(E.current.outgoing=[]):_(n)!==r&&(E.current.outgoing=[],function(){if(r)if(j(),n){h(n,!0),j();var e=r.map((function(e){return Object(p.cloneBlock)(e)}));w.current&&(E.current.incoming=e),O(n,e)}else w.current&&(E.current.incoming=r),v(r)}(),o&&c&&g(o,c))}),[r,n]),Object(a.useEffect)((function(){var e=b.select("core/block-editor"),t=e.getSelectionStart,r=e.getSelectionEnd,o=e.isLastBlockChangePersistent,c=e.__unstableIsLastBlockChangeIgnored,i=_(n),l=o(),a=!1;w.current=!0;var s=b.subscribe((function(){if(null===n||null!==y(n)){var e=o(),s=_(n),u=s!==i;if(i=s,u&&(E.current.incoming||c()))return E.current.incoming=null,void(l=e);if(u||a&&!u&&e&&!l)l=e,E.current.outgoing.push(i),(l?S.current:C.current)(i,{selectionStart:t(),selectionEnd:r()});a=u}}));return function(){return s()}}),[b,n])}var qa,$a=Object(b.createHigherOrderComponent)((function(e){return Object(m.withRegistry)((function(t){var n=t.useSubRegistry,r=void 0===n||n,o=t.registry,c=Object(Fe.a)(t,["useSubRegistry","registry"]);if(!r)return Object(a.createElement)(e,Object(i.a)({registry:o},c));var l=Object(a.useState)(null),s=Object(Me.a)(l,2),u=s[0],d=s[1];return Object(a.useEffect)((function(){var e=Object(m.createRegistry)({},o);e.registerStore("core/block-editor",Tl),d(e)}),[o]),u?Object(a.createElement)(m.RegistryProvider,{value:u},Object(a.createElement)(e,Object(i.a)({registry:u},c))):null}))}),"withRegistryProvider")((function(e){var t=e.children,n=e.settings,r=Object(m.useDispatch)("core/block-editor").updateSettings;return Object(a.useEffect)((function(){r(n)}),[n]),Ka(e),t}));function Ya(e){var t=e.onClick;return Object(a.createElement)("div",{tabIndex:0,role:"button",onClick:t,onKeyPress:t},Object(a.createElement)(v.Disabled,null,Object(a.createElement)(ed,null)))}var Xa=function(e){var t=e.viewportWidth,n=e.__experimentalPadding,r=Object(b.useResizeObserver)(),o=Object(Me.a)(r,2),c=o[0],i=o[1].width,l=Object(b.useResizeObserver)(),s=Object(Me.a)(l,2),u=s[0],d=s[1].height;qa=qa||Object(b.pure)(ed);var f=(i-2*n)/t;return Object(a.createElement)("div",{className:"block-editor-block-preview__container editor-styles-wrapper","aria-hidden":!0,style:{height:d*f+2*n}},c,Object(a.createElement)(v.Disabled,{style:{transform:"scale(".concat(f,")"),width:t,left:n,right:n,top:n},className:"block-editor-block-preview__content"},u,Object(a.createElement)(qa,null)))};var Qa=Object(a.memo)((function(e){var t=e.blocks,n=e.__experimentalPadding,r=void 0===n?0:n,o=e.viewportWidth,c=void 0===o?1200:o,i=e.__experimentalLive,l=void 0!==i&&i,s=e.__experimentalOnClick,u=Object(m.useSelect)((function(e){return e("core/block-editor").getSettings()}),[]),b=Object(a.useMemo)((function(){return Object(d.castArray)(t)}),[t]);return t&&0!==t.length?Object(a.createElement)($a,{value:b,settings:u},l?Object(a.createElement)(Ya,{onClick:s}):Object(a.createElement)(Xa,{viewportWidth:c,__experimentalPadding:r})):null}));function Za(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ja(e){for(var t=1;t0&&Object(a.createElement)(is,{className:"block-editor-inserter__uncategorized-blocks-panel",title:Object(C.__)("Uncategorized")},Object(a.createElement)(cs,{items:m,onSelect:f,onHover:r,label:Object(C.__)("Uncategorized")})),Object(d.map)(b,(function(e,t){var n=g[t];return n&&n.length?Object(a.createElement)(is,{key:t,title:e.title,icon:e.icon},Object(a.createElement)(cs,{items:n,onSelect:f,onHover:r,label:e.title})):null})))};var ss=function(e){var t,n=e.selectedCategory,r=e.patternCategories,o=e.onClickCategory,c=e.children;return Object(a.createElement)(a.Fragment,null,Object(a.createElement)("div",{className:u()("block-editor-inserter__panel-header","block-editor-inserter__panel-header-patterns")},Object(a.createElement)(v.SelectControl,{className:"block-editor-inserter__panel-dropdown",label:Object(C.__)("Filter patterns"),hideLabelFromVision:!0,value:n.name,onChange:function(e){o(r.find((function(t){return e===t.name})))},options:(t=[],r.map((function(e){return t.push({value:e.name,label:e.label})})),t)})),Object(a.createElement)("div",{className:"block-editor-inserter__panel-content"},c))},us=n("@wordpress/notices"),ds=function(e){var t=Object(m.useSelect)((function(e){var t=e("core/block-editor").getSettings();return{patterns:t.__experimentalBlockPatterns,patternCategories:t.__experimentalBlockPatternCategories}}),[]),n=t.patternCategories,r=t.patterns,o=Object(m.useDispatch)(us.store).createSuccessNotice;return[r,n,Object(a.useCallback)((function(t,n){e(Object(d.map)(n,(function(e){return Object(p.cloneBlock)(e)})),t.name),o(Object(C.sprintf)(Object(C.__)('Block pattern "%s" inserted.'),t.title),{type:"snackbar"})}),[])]};function bs(e){var t=e.isDraggable,n=e.pattern,r=e.onClick,o=n.content,c=n.viewportWidth,i=Object(a.useMemo)((function(){return Object(p.parse)(o)}),[o]),l=Object(b.useInstanceId)(bs),s="block-editor-block-patterns-list__item-description-".concat(l);return Object(a.createElement)(rs,{isEnabled:t,blocks:i},(function(e){var t=e.draggable,o=e.onDragStart,l=e.onDragEnd;return Object(a.createElement)("div",{className:"block-editor-block-patterns-list__item",role:"button",onClick:function(){return r(n,i)},onKeyDown:function(e){Ht.ENTER!==e.keyCode&&Ht.SPACE!==e.keyCode||r(n,i)},tabIndex:0,"aria-label":n.title,"aria-describedby":n.description?s:void 0,draggable:t,onDragStart:o,onDragEnd:l},Object(a.createElement)(Qa,{blocks:i,viewportWidth:c}),Object(a.createElement)("div",{className:"block-editor-block-patterns-list__item-title"},n.title),!!n.description&&Object(a.createElement)(v.VisuallyHidden,{id:s},n.description))}))}function fs(){return Object(a.createElement)("div",{className:"block-editor-block-patterns-list__item is-placeholder"})}var ps=function(e){var t=e.isDraggable,n=e.blockPatterns,r=e.shownPatterns,o=e.onClickPattern;return n.map((function(e){return r.includes(e)?Object(a.createElement)(bs,{key:e.name,pattern:e,onClick:o,isDraggable:t}):Object(a.createElement)(fs,{key:e.name})}))};function ms(e){var t=e.onInsert,n=e.selectedCategory,r=e.onClickCategory,o=ds(t),c=Object(Me.a)(o,3),i=c[0],l=c[1],s=c[2],u=Object(a.useMemo)((function(){return l.filter((function(e){return i.some((function(t){var n;return null===(n=t.categories)||void 0===n?void 0:n.includes(e.name)}))}))}),[i,l]),f=n||u[0];Object(a.useEffect)((function(){i.some((function(e){return p(e)===1/0}))&&!u.find((function(e){return"uncategorized"===e.name}))&&u.push({name:"uncategorized",label:Object(C._x)("Uncategorized")})}),[u,i]);var p=Object(a.useCallback)((function(e){if(!e.categories||!e.categories.length)return 1/0;var t=Object(d.fromPairs)(u.map((function(e,t){return[e.name,t]})));return Math.min.apply(Math,Object(pe.a)(e.categories.map((function(e){return void 0!==t[e]?t[e]:1/0}))))}),[u]),m=Object(a.useMemo)((function(){return i.filter((function(e){return"uncategorized"===f.name?p(e)===1/0:e.categories&&e.categories.includes(f.name)}))}),[i,f]),v=Object(a.useMemo)((function(){return m.sort((function(e,t){return p(e)-p(t)}))}),[m,p]),g=Object(b.useAsyncList)(v);return Object(a.createElement)(a.Fragment,null,!!m.length&&Object(a.createElement)(ss,{title:f.title,selectedCategory:f,patternCategories:u,onClickCategory:r},Object(a.createElement)(ps,{shownPatterns:g,blockPatterns:m,onClickPattern:s,isDraggable:!0})))}var vs=function(e){var t=e.onInsert,n=e.onClickCategory,r=e.selectedCategory;return Object(a.createElement)(ms,{selectedCategory:r,onInsert:t,onClickCategory:n})},gs=n("@wordpress/url");var Os=function(){return Object(a.createElement)("div",{className:"block-editor-inserter__no-results"},Object(a.createElement)(Va.a,{className:"block-editor-inserter__no-results-icon",icon:Fr.a}),Object(a.createElement)("p",null,Object(C.__)("No results found.")))};function hs(e){var t=e.onHover,n=e.onInsert,r=e.rootClientId,o=Mr(r,n),c=Object(Me.a)(o,4),i=c[0],l=c[3],s=Object(a.useMemo)((function(){return i.filter((function(e){return"reusable"===e.category}))}),[i]);return 0===s.length?Object(a.createElement)(Os,null):Object(a.createElement)(is,{title:Object(C.__)("Reusable blocks")},Object(a.createElement)(cs,{items:s,onSelect:l,onHover:t,label:Object(C.__)("Reusable blocks")}))}var js=function(e){var t=e.rootClientId,n=e.onInsert,r=e.onHover;return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(hs,{onHover:r,onInsert:n,rootClientId:t}),Object(a.createElement)("div",{className:"block-editor-inserter__manage-reusable-blocks-container"},Object(a.createElement)("a",{className:"block-editor-inserter__manage-reusable-blocks",href:Object(gs.addQueryArgs)("edit.php",{post_type:"wp_block"})},Object(C.__)("Manage all reusable blocks"))))},ks=Object(v.createSlotFill)("__experimentalInserterMenuExtension"),ys=ks.Fill,_s=ks.Slot;ys.Slot=_s;var Es=ys;var ws=function(e){var t=e.rootClientId,n=e.insertionIndex,r=e.clientId,o=e.isAppender,c=e.selectBlockOnInsert,i=e.onSelect,l=Object(m.useSelect)((function(e){var c,i,l=e("core/block-editor"),a=l.getSelectedBlock,s=l.getBlockIndex,u=l.getBlockOrder,d=l.getBlockInsertionPoint;if(t||n||r||o)c=t,i=n||(r?s(r,c):u(c).length);else{var b=d();c=b.rootClientId,i=b.index}return{selectedBlock:a(),destinationRootClientId:c,destinationIndex:i}}),[t,n,r,o]),s=l.selectedBlock,u=l.destinationRootClientId,b=l.destinationIndex,f=Object(m.useDispatch)("core/block-editor"),v=f.replaceBlocks,g=f.insertBlocks,O=f.showInsertionPoint,h=f.hideInsertionPoint,j=Object(a.useCallback)((function(e,t){if(!o&&s&&Object(p.isUnmodifiedDefaultBlock)(s)?v(s.clientId,e,null,null,t):g(e,b,u,c,t),!c){var n=Object(C.sprintf)(Object(C._n)("%d block added.","%d blocks added.",Object(d.castArray)(e).length),Object(d.castArray)(e).length);Object(ot.speak)(n)}i&&i()}),[o,s,v,g,u,b,c,i]),k=Object(a.useCallback)((function(e){e?O(u,b):h()}),[O,h,u,b]);return[u,j,k]};var Cs=function(e){var t=e.filterValue,n=e.onSelect,r=e.onHover,o=e.rootClientId,c=e.clientId,i=e.isAppender,l=e.selectBlockOnInsert,s=e.maxBlockPatterns,u=e.maxBlockTypes,f=e.showBlockDirectory,p=void 0!==f&&f,m=e.isDraggable,g=void 0===m||m,O=Object(b.useDebounce)(ot.speak,500),h=ws({onSelect:n,rootClientId:o,clientId:c,isAppender:i,selectBlockOnInsert:l}),j=Object(Me.a)(h,2),k=j[0],y=j[1],_=Mr(k,y),E=Object(Me.a)(_,4),w=E[0],S=E[1],I=E[2],B=E[3],x=ds(y),P=Object(Me.a)(x,3),T=P[0],N=P[2],D=Object(a.useMemo)((function(){var e=Ar(Object(d.orderBy)(w,["frecency"],["desc"]),S,I,t);return void 0!==u?e.slice(0,u):e}),[t,w,S,I,u]),A=Object(a.useMemo)((function(){var e=Rr(T,t);return void 0!==s?e.slice(0,s):e}),[t,T,s]);Object(a.useEffect)((function(){if(t){var e=D.length+A.length,n=Object(C.sprintf)(Object(C._n)("%d result found.","%d results found.",e),e);O(n)}}),[t,O]);var R=Object(b.useAsyncList)(A),L=!Object(d.isEmpty)(D)||!Object(d.isEmpty)(A);return Object(a.createElement)(a.Fragment,null,!p&&!L&&Object(a.createElement)(Os,null),!!D.length&&Object(a.createElement)(is,{title:Object(a.createElement)(v.VisuallyHidden,null,Object(C.__)("Blocks"))},Object(a.createElement)(cs,{items:D,onSelect:B,onHover:r,label:Object(C.__)("Blocks"),isDraggable:g})),!!D.length&&!!A.length&&Object(a.createElement)("div",{className:"block-editor-inserter__quick-inserter-separator"}),!!A.length&&Object(a.createElement)(is,{title:Object(a.createElement)(v.VisuallyHidden,null,Object(C.__)("Block Patterns"))},Object(a.createElement)("div",{className:"block-editor-inserter__quick-inserter-patterns"},Object(a.createElement)(ps,{shownPatterns:R,blockPatterns:A,onClickPattern:N,isDraggable:g}))),p&&Object(a.createElement)(Es.Slot,{fillProps:{onSelect:B,onHover:r,filterValue:t,hasItems:L,rootClientId:k}},(function(e){return e.length?e:L?null:Object(a.createElement)(Os,null)})))},Ss={name:"blocks",title:Object(C.__)("Blocks")},Is={name:"patterns",title:Object(C.__)("Patterns")},Bs={name:"reusable",title:Object(C.__)("Reusable")};var xs=function(e){var t=e.children,n=e.showPatterns,r=void 0!==n&&n,o=e.showReusableBlocks,c=void 0!==o&&o,i=e.onSelect,l=Object(a.useMemo)((function(){var e=[Ss];return r&&e.push(Is),c&&e.push(Bs),e}),[Ss,r,Is,c,Bs]);return Object(a.createElement)(v.TabPanel,{className:"block-editor-inserter__tabs",tabs:l,onSelect:i},t)};var Ps=function(e){var t=e.rootClientId,n=e.clientId,r=e.isAppender,o=e.__experimentalSelectBlockOnInsert,c=e.__experimentalInsertionIndex,i=e.onSelect,l=e.showInserterHelpPanel,s=e.showMostUsedBlocks,u=Object(a.useState)(""),d=Object(Me.a)(u,2),b=d[0],f=d[1],p=Object(a.useState)(null),g=Object(Me.a)(p,2),O=g[0],h=g[1],j=Object(a.useState)(null),k=Object(Me.a)(j,2),y=k[0],_=k[1],E=ws({rootClientId:t,clientId:n,isAppender:r,selectBlockOnInsert:o,insertionIndex:c}),w=Object(Me.a)(E,3),S=w[0],I=w[1],B=w[2],x=Object(m.useSelect)((function(e){var t=e("core/block-editor").getSettings(),n=t.__experimentalBlockPatterns,r=t.__experimentalReusableBlocks;return{hasPatterns:!(null==n||!n.length),hasReusableBlocks:!(null==r||!r.length)}}),[]),P=x.hasPatterns,T=x.hasReusableBlocks,N=!S&&P,D=Object(a.useCallback)((function(e){I(e),i()}),[I,i]),A=Object(a.useCallback)((function(e,t){I(e,{patternName:t}),i()}),[I,i]),R=Object(a.useCallback)((function(e){B(!!e),h(e)}),[B,h]),L=Object(a.useCallback)((function(e){_(e)}),[_]),M=Object(a.useMemo)((function(){return Object(a.createElement)(a.Fragment,null,Object(a.createElement)("div",{className:"block-editor-inserter__block-list"},Object(a.createElement)(as,{rootClientId:S,onInsert:D,onHover:R,showMostUsedBlocks:s})),l&&Object(a.createElement)("div",{className:"block-editor-inserter__tips"},Object(a.createElement)(v.VisuallyHidden,{as:"h2"},Object(C.__)("A tip for using the block editor")),Object(a.createElement)(Ma,null)))}),[S,D,R,b,s,l]),F=Object(a.useMemo)((function(){return Object(a.createElement)(vs,{onInsert:A,onClickCategory:L,selectedCategory:y})}),[A,L,y]),V=Object(a.useMemo)((function(){return Object(a.createElement)(js,{rootClientId:S,onInsert:D,onHover:R})}),[S,D,R]),H=Object(a.useCallback)((function(e){return"blocks"===e.name?M:"patterns"===e.name?F:V}),[M,F,V]);return Object(a.createElement)("div",{className:"block-editor-inserter__menu"},Object(a.createElement)("div",{className:"block-editor-inserter__main-area"},Object(a.createElement)("div",{className:"block-editor-inserter__content"},Object(a.createElement)(za,{onChange:function(e){O&&h(null),f(e)},value:b,placeholder:Object(C.__)("Search")}),!!b&&Object(a.createElement)(Cs,{filterValue:b,onSelect:i,onHover:R,rootClientId:t,clientId:n,isAppender:r,selectBlockOnInsert:o,showBlockDirectory:!0}),!b&&(N||T)&&Object(a.createElement)(xs,{showPatterns:N,showReusableBlocks:T},H),!b&&!N&&!T&&M)),l&&O&&Object(a.createElement)(es,{item:O}))};function Ts(e){var t=e.onSelect,n=e.rootClientId,r=e.clientId,o=e.isAppender,c=e.selectBlockOnInsert,i=Object(a.useState)(""),l=Object(Me.a)(i,2),s=l[0],d=l[1],b=ws({onSelect:t,rootClientId:n,clientId:r,isAppender:o,selectBlockOnInsert:c}),f=Object(Me.a)(b,2),p=f[0],g=f[1],O=Mr(p,g),h=Object(Me.a)(O,1)[0],j=ds(g),k=Object(Me.a)(j,1)[0],y=!p&&k.length&&!!s,_=y&&k.length>6||h.length>6,E=Object(m.useSelect)((function(e){var t=e("core/block-editor"),o=t.getSettings,c=t.getBlockIndex;return{setInserterIsOpened:o().__experimentalSetIsInserterOpened,blockIndex:c(r,n)}}),[r,n]),w=E.setInserterIsOpened,S=E.blockIndex;Object(a.useEffect)((function(){w&&w(!1)}),[w]);var I=Object(m.useDispatch)("core/block-editor").__unstableSetInsertionPoint;return Object(a.createElement)("div",{className:u()("block-editor-inserter__quick-inserter",{"has-search":_,"has-expand":w})},_&&Object(a.createElement)(za,{value:s,onChange:function(e){d(e)},placeholder:Object(C.__)("Search for a block")}),Object(a.createElement)("div",{className:"block-editor-inserter__quick-inserter-results"},Object(a.createElement)(Cs,{filterValue:s,onSelect:t,rootClientId:n,clientId:r,isAppender:o,selectBlockOnInsert:c,maxBlockPatterns:y?2:0,maxBlockTypes:6,isDraggable:!1})),w&&Object(a.createElement)(v.Button,{className:"block-editor-inserter__quick-inserter-expand",onClick:function(){I(n,S),w(!0)},"aria-label":Object(C.__)("Browse all. This will open the main inserter panel in the editor toolbar.")},Object(C.__)("Browse all")))}function Ns(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(Hn.a)(e);if(t){var o=Object(Hn.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(Vn.a)(this,n)}}var Ds=function(e){var t,n=e.onToggle,r=e.disabled,o=e.isOpen,c=e.blockTitle,l=e.hasSingleBlockType,s=e.toggleProps,u=void 0===s?{}:s;t=l?Object(C.sprintf)(Object(C._x)("Add %s","directly add the only allowed block"),c):Object(C._x)("Add block","Generic label for block inserter button");var d=u.onClick,b=Object(Fe.a)(u,["onClick"]);return Object(a.createElement)(v.Button,Object(i.a)({icon:Ra.a,label:t,tooltipPosition:"bottom",onClick:function(e){n&&n(e),d&&d(e)},className:"block-editor-inserter__toggle","aria-haspopup":!l&&"true","aria-expanded":!l&&o,disabled:r},b))},As=function(e){Object(Fn.a)(n,e);var t=Ns(n);function n(){var e;return Object(Rn.a)(this,n),(e=t.apply(this,arguments)).onToggle=e.onToggle.bind(Object(Mn.a)(e)),e.renderToggle=e.renderToggle.bind(Object(Mn.a)(e)),e.renderContent=e.renderContent.bind(Object(Mn.a)(e)),e}return Object(Ln.a)(n,[{key:"onToggle",value:function(e){var t=this.props.onToggle;t&&t(e)}},{key:"renderToggle",value:function(e){var t=e.onToggle,n=e.isOpen,r=this.props,o=r.disabled,c=r.blockTitle,i=r.hasSingleBlockType,l=r.toggleProps,a=r.hasItems,s=r.renderToggle,u=void 0===s?Ds:s;return u({onToggle:t,isOpen:n,disabled:o||!a,blockTitle:c,hasSingleBlockType:i,toggleProps:l})}},{key:"renderContent",value:function(e){var t=e.onClose,n=this.props,r=n.rootClientId,o=n.clientId,c=n.isAppender,i=n.showInserterHelpPanel,l=n.__experimentalSelectBlockOnInsert;return n.__experimentalIsQuick?Object(a.createElement)(Ts,{onSelect:function(){t()},rootClientId:r,clientId:o,isAppender:c,selectBlockOnInsert:l}):Object(a.createElement)(Ps,{onSelect:function(){t()},rootClientId:r,clientId:o,isAppender:c,showInserterHelpPanel:i,__experimentalSelectBlockOnInsert:l})}},{key:"render",value:function(){var e=this.props,t=e.position,n=e.hasSingleBlockType,r=e.insertOnlyAllowedBlock,o=e.__experimentalIsQuick,c=e.onSelectOrClose;return n?this.renderToggle({onToggle:r}):Object(a.createElement)(v.Dropdown,{className:"block-editor-inserter",contentClassName:u()("block-editor-inserter__popover",{"is-quick":o}),position:t,onToggle:this.onToggle,expandOnMobile:!0,headerTitle:Object(C.__)("Add a block"),renderToggle:this.renderToggle,renderContent:this.renderContent,onClose:c})}}]),n}(a.Component),Rs=Object(b.compose)([Object(m.withSelect)((function(e,t){var n=t.clientId,r=t.rootClientId,o=e("core/block-editor"),c=o.getBlockRootClientId,i=o.hasInserterItems,l=o.__experimentalGetAllowedBlocks,a=e(p.store).getBlockVariations,s=l(r=r||c(n)||void 0),u=1===Object(d.size)(s)&&0===Object(d.size)(a(s[0].name,"inserter")),b=!1;return u&&(b=s[0]),{hasItems:i(r),hasSingleBlockType:u,blockTitle:b?b.title:"",allowedBlockType:b,rootClientId:r}})),Object(m.withDispatch)((function(e,t,n){var r=n.select;return{insertOnlyAllowedBlock:function(){var n=t.rootClientId,o=t.clientId,c=t.isAppender,i=t.onSelectOrClose,l=t.hasSingleBlockType,a=t.allowedBlockType,s=t.__experimentalSelectBlockOnInsert;if(l&&((0,e("core/block-editor").insertBlock)(Object(p.createBlock)(a.name),function(){var e=r("core/block-editor"),t=e.getBlockIndex,i=e.getBlockSelectionEnd,l=e.getBlockOrder;if(o)return t(o,n);var a=i();return!c&&a?t(a,n)+1:l(n).length}(),n,s),i&&i(),!s)){var u=Object(C.sprintf)(Object(C.__)("%s block added"),a.title);Object(ot.speak)(u)}}}})),Object(b.ifCondition)((function(e){var t=e.hasItems,n=e.isAppender,r=e.rootClientId,o=e.clientId;return t||!n&&!r&&!o}))])(As);var Ls=Object(b.compose)(Object(m.withSelect)((function(e,t){var n=e("core/block-editor"),r=n.getBlockCount,o=n.getBlockName,c=n.isBlockValid,i=n.getSettings,l=n.getTemplateLock,a=!r(t.rootClientId),s=o(t.lastBlockClientId)===Object(p.getDefaultBlockName)(),u=c(t.lastBlockClientId),d=i().bodyPlaceholder;return{isVisible:a||!s||!u,showPrompt:a,isLocked:!!l(t.rootClientId),placeholder:d}})),Object(m.withDispatch)((function(e,t){var n=e("core/block-editor"),r=n.insertDefaultBlock,o=n.startTyping;return{onAppend:function(){var e=t.rootClientId;r(void 0,e),o()}}})))((function(e){var t=e.isLocked,n=e.isVisible,r=e.onAppend,o=e.showPrompt,c=e.placeholder,i=e.rootClientId;if(t||!n)return null;var l=Object(Aa.decodeEntities)(c)||Object(C.__)("Start writing or type / to choose a block");return Object(a.createElement)("div",{"data-root-client-id":i||"",className:"wp-block block-editor-default-block-appender"},Object(a.createElement)(Na.a,{role:"button","aria-label":Object(C.__)("Add block"),className:"block-editor-default-block-appender__content",readOnly:!0,onFocus:r,value:o?l:""}),Object(a.createElement)(Rs,{rootClientId:i,position:"bottom right",isAppender:!0,__experimentalIsQuick:!0}))}));var Ms=Object(a.forwardRef)((function(e,t){var n=e.rootClientId,r=e.className,o=e.__experimentalSelectBlockOnInsert,c=e.onFocus,i=e.tabIndex;return Object(a.createElement)(Rs,{position:"bottom center",rootClientId:n,__experimentalSelectBlockOnInsert:o,__experimentalIsQuick:!0,renderToggle:function(e){var n,o=e.onToggle,l=e.disabled,s=e.isOpen,d=e.blockTitle,b=e.hasSingleBlockType;n=b?Object(C.sprintf)(Object(C._x)("Add %s","directly add the only allowed block"),d):Object(C._x)("Add block","Generic label for block inserter button");var f=!b,p=Object(a.createElement)(v.Button,{ref:t,onFocus:c,tabIndex:i,className:u()(r,"block-editor-button-block-appender"),onClick:o,"aria-haspopup":f?"true":void 0,"aria-expanded":f?s:void 0,disabled:l,label:n},!b&&Object(a.createElement)(v.VisuallyHidden,{as:"span"},n),Object(a.createElement)(Va.a,{icon:Ra.a}));return(f||b)&&(p=Object(a.createElement)(v.Tooltip,{text:n},p)),p},isAppender:!0})}));Object(a.createContext)();function Fs(e){e.stopPropagation()}var Vs=Object(m.withSelect)((function(e,t){var n=t.rootClientId,r=e("core/block-editor"),o=r.getBlockOrder,c=r.canInsertBlockType,i=r.getTemplateLock,l=r.getSelectedBlockClientId;return{isLocked:!!i(n),blockClientIds:o(n),canInsertDefaultBlock:c(Object(p.getDefaultBlockName)(),n),selectedBlockClientId:l()}}))((function(e){var t,n=e.blockClientIds,r=e.rootClientId,o=e.canInsertDefaultBlock,c=e.isLocked,i=e.renderAppender,l=e.className,s=e.selectedBlockClientId,b=e.tagName,f=void 0===b?"div":b;if(c||!1===i)return null;if(i)t=Object(a.createElement)(i,null);else{var p=!r,m=s===r,v=s&&!n.includes(s);if(!p&&!m&&(!s||v))return null;t=o?Object(a.createElement)(Ls,{rootClientId:r,lastBlockClientId:Object(d.last)(n)}):Object(a.createElement)(Ms,{rootClientId:r,className:"block-list-appender__toggle"})}return Object(a.createElement)(f,{tabIndex:-1,onFocus:Fs,className:u()("block-list-appender","wp-block",l)},t)}));function Hs(e,t,n,r,o,c,i){return function(l){var a=function(e){var 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("text")))}catch(e){return t}return t}(l),s=a.srcRootClientId,u=a.srcClientIds,d=a.type,b=a.blocks;if("inserter"===d&&(i(),c(b,t,e,!1)),"block"===d){var f=n(u[0],s);if(s===e&&f===t)return;if(u.includes(e)||r(u).some((function(t){return t===e})))return;var p=s===e,m=u.length;o(u,s,e,p&&f=s&&l<=u?l:l2&&void 0!==arguments[2]?arguments[2]:["top","bottom","left","right"];return o.forEach((function(o){var c=Ws(e,t,o);(void 0===n||c-1&&Object(ot.speak)(N)}),[]);var h=Object(m.useSelect)(Qs,[]),j=h.selectedBlockClientId,k=h.selectionBeforeEndClientId,y=h.selectionAfterEndClientId,_=h.hasBlockMovingClientId,E=h.getBlockIndex,w=h.getBlockRootClientId,C=h.getClientIdsOfDescendants,S=Object(m.useDispatch)("core/block-editor"),I=S.selectBlock,B=S.clearSelectedBlock,x=S.setBlockMovingClientId,P=S.moveBlockToPosition,T=Object(p.getBlockType)(i),N=Object(p.__experimentalGetAccessibleBlockLabel)(T,l,c+1,d),D=u()("block-editor-block-list__block-selection-button",{"is-block-moving-mode":!!s});return Object(a.createElement)("div",{className:D},Object(a.createElement)(v.Button,{ref:O,onClick:function(){return f(!1)},onKeyDown:function(e){var n=e.keyCode,o=n===Ht.UP,c=n===Ht.DOWN,i=n===Ht.LEFT,l=n===Ht.RIGHT,a=n===Ht.TAB,s=n===Ht.ESCAPE,u=n===Ht.ENTER,d=n===Ht.SPACE,b=e.shiftKey;if(n===Ht.BACKSPACE||n===Ht.DELETE)return g(t),void e.preventDefault();var f,p=a&&b||o,m=a&&!b||c,v=i,O=l;if(p)f=k;else if(m)f=y;else if(v){var h;f=null!==(h=w(j))&&void 0!==h?h:j}else if(O){var S;f=null!==(S=C([j])[0])&&void 0!==S?S:j}var T=_();if(s&&T&&x(null),(u||d)&&T){var N=w(T),D=w(j),A=E(T,N),R=E(j,D);Ac){var l=Math.max(o-c-50,0),a=Math.max(i-c-50,0)/l;n.current=25*a}else if(e.clientY=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,i=!0,l=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){l=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw c}}}}function su(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n')})).join(""),n=""),{html:r,plainText:n}}(t),g=v.plainText,O=v.html,h=Object(p.pasteHandler)({HTML:O,plainText:g,mode:"BLOCKS",canUserUseUnfilteredHTML:m});u(i,h,h.length-1,-1)}}}}return e.current.addEventListener("copy",t),e.current.addEventListener("cut",t),e.current.addEventListener("paste",t),function(){e.current.removeEventListener("copy",t),e.current.removeEventListener("cut",t),e.current.removeEventListener("paste",t)}}),[])}var Eu=function(e){var t=e.children,n=Object(a.useRef)();return _u(n),Object(a.createElement)("div",{ref:n},t)};function wu(e){var t=e.clientIds,n=e.children,r=e.__experimentalUpdateSelection,o=Object(m.useSelect)((function(e){return e("core/block-editor")}),[]),c=o.canInsertBlockType,i=o.getBlockRootClientId,l=o.getBlocksByClientId,a=o.getTemplateLock,s=Object(m.useSelect)((function(e){return e(p.store)}),[]),u=s.getDefaultBlockName,b=s.getGroupingBlockName,f=l(t),v=i(t[0]),g=Object(d.every)(f,(function(e){return!!e&&Object(p.hasBlockSupport)(e.name,"multiple",!0)&&c(e.name,v)})),O=c(u(),v),h=Object(m.useDispatch)("core/block-editor"),j=h.removeBlocks,k=h.replaceBlocks,y=h.duplicateBlocks,_=h.insertAfterBlock,E=h.insertBeforeBlock,w=h.flashBlock,C=h.setBlockMovingClientId,S=h.setNavigationMode,I=h.selectBlock,B=yu();return n({canDuplicate:g,canInsertDefaultBlock:O,isLocked:!!a(v),rootClientId:v,blocks:f,onDuplicate:function(){return y(t,r)},onRemove:function(){return j(t,r)},onInsertBefore:function(){E(Object(d.first)(Object(d.castArray)(t)))},onInsertAfter:function(){_(Object(d.last)(Object(d.castArray)(t)))},onMoveTo:function(){S(!0),I(t[0]),C(t[0])},onGroup:function(){if(f.length){var e=b(),n=Object(p.switchToBlockType)(f,e);n&&k(t,n)}},onUngroup:function(){if(f.length){var e=f[0].innerBlocks;e.length&&k(t,e)}},onCopy:function(){var e=f.map((function(e){return e.clientId}));1===f.length&&w(e[0]),B("copy",e)}})}var Cu=Object(b.compose)([Object(m.withSelect)((function(e,t){var n=t.clientId,r=e("core/block-editor"),o=r.getBlock,c=r.getBlockMode,i=r.getSettings,l=o(n),a=i().codeEditingEnabled;return{mode:c(n),blockType:l?Object(p.getBlockType)(l.name):null,isCodeEditingEnabled:a}})),Object(m.withDispatch)((function(e,t){var n=t.onToggle,r=void 0===n?d.noop:n,o=t.clientId;return{onToggleMode:function(){e("core/block-editor").toggleBlockMode(o),r()}}}))])((function(e){var t=e.blockType,n=e.mode,r=e.onToggleMode,o=e.small,c=void 0!==o&&o,i=e.isCodeEditingEnabled,l=void 0===i||i;if(!Object(p.hasBlockSupport)(t,"html",!0)||!l)return null;var s="visual"===n?Object(C.__)("Edit as HTML"):Object(C.__)("Edit visually");return Object(a.createElement)(v.MenuItem,{onClick:r},!c&&s)}));var Su=Object(b.compose)(Object(m.withSelect)((function(e,t){var n=t.clientId,r=e("core/block-editor").getBlock(n);return{block:r,shouldRender:r&&"core/html"===r.name}})),Object(m.withDispatch)((function(e,t){var n=t.block;return{onClick:function(){return e("core/block-editor").replaceBlocks(n.clientId,Object(p.rawHandler)({HTML:Object(p.getBlockContent)(n)}))}}})))((function(e){var t=e.shouldRender,n=e.onClick,r=e.small;if(!t)return null;var o=Object(C.__)("Convert to Blocks");return Object(a.createElement)(v.MenuItem,{onClick:n},!r&&o)})),Iu=Object(v.createSlotFill)("__experimentalBlockSettingsMenuFirstItem"),Bu=Iu.Fill,xu=Iu.Slot;Bu.Slot=xu;var Pu=Bu;function Tu(e){var t=e.clientIds,n=e.isGroupable,r=e.isUngroupable,o=e.blocksSelection,c=e.groupingBlockName,i=e.onClose,l=void 0===i?function(){}:i,s=Object(m.useDispatch)(Nl).replaceBlocks;return n||r?Object(a.createElement)(a.Fragment,null,n&&Object(a.createElement)(v.MenuItem,{onClick:function(){var e;(e=Object(p.switchToBlockType)(o,c))&&s(t,e),l()}},Object(C._x)("Group","verb")),r&&Object(a.createElement)(v.MenuItem,{onClick:function(){var e;(e=o[0].innerBlocks).length&&s(t,e),l()}},Object(C._x)("Ungroup","Ungrouping blocks from within a Group block back into individual blocks within the Editor "))):null}function Nu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Du(e){for(var t=1;t0||s)return Object(a.createElement)(v.MenuGroup,null,e,Object(a.createElement)(Tu,Object(i.a)({},l,{onClose:null==n?void 0:n.onClose})))}))};var Mu=Ru,Fu={className:"block-editor-block-settings-menu__popover",position:"bottom right",isAlternate:!0};var Vu=function(e){var t=e.clientIds,n=e.__experimentalSelectBlock,r=e.children,o=Object(Fe.a)(e,["clientIds","__experimentalSelectBlock","children"]),c=Object(d.castArray)(t),l=c.length,s=c[0],u=Object(m.useSelect)((function(e){var t=e(Jl.store).getShortcutRepresentation;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")}}),[]),b=Object(a.useCallback)(n?function(){var e=Object(ea.a)(ei.a.mark((function e(t){var r;return ei.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t;case 2:(r=e.sent)&&r[0]&&n(r[0]);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}():d.noop,[n]),f=1===l?Object(C.__)("Remove block"):Object(C.__)("Remove blocks");return Object(a.createElement)(wu,{clientIds:t,__experimentalUpdateSelection:!n},(function(e){var n=e.canDuplicate,c=e.canInsertDefaultBlock,m=e.isLocked,g=e.onDuplicate,O=e.onInsertAfter,h=e.onInsertBefore,j=e.onRemove,k=e.onCopy,y=e.onMoveTo,_=e.blocks;return Object(a.createElement)(v.DropdownMenu,Object(i.a)({icon:ta.a,label:Object(C.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:Fu,noIcons:!0},o),(function(e){var o=e.onClose;return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(v.MenuGroup,null,Object(a.createElement)(Pu.Slot,{fillProps:{onClose:o}}),1===l&&Object(a.createElement)(Su,{clientId:s}),Object(a.createElement)(v.ClipboardButton,{text:function(){return Object(p.serialize)(_)},role:"menuitem",className:"components-menu-item__button",onCopy:k},Object(C.__)("Copy")),n&&Object(a.createElement)(v.MenuItem,{onClick:Object(d.flow)(o,g,b),shortcut:u.duplicate},Object(C.__)("Duplicate")),c&&Object(a.createElement)(a.Fragment,null,Object(a.createElement)(v.MenuItem,{onClick:Object(d.flow)(o,h),shortcut:u.insertBefore},Object(C.__)("Insert before")),Object(a.createElement)(v.MenuItem,{onClick:Object(d.flow)(o,O),shortcut:u.insertAfter},Object(C.__)("Insert after"))),!m&&Object(a.createElement)(v.MenuItem,{onClick:Object(d.flow)(o,y)},Object(C.__)("Move to")),1===l&&Object(a.createElement)(Cu,{clientId:s,onToggle:o})),Object(a.createElement)(Mu.Slot,{fillProps:{onClose:o},clientIds:t}),"function"==typeof r?r({onClose:o}):a.Children.map((function(e){return Object(a.cloneElement)(e,{onClose:o})})),Object(a.createElement)(v.MenuGroup,null,!m&&Object(a.createElement)(v.MenuItem,{onClick:Object(d.flow)(o,j,b),shortcut:u.remove},f)))}))}))};var Hu=function(e){var t=e.clientIds,n=Object(Fe.a)(e,["clientIds"]);return Object(a.createElement)(v.ToolbarGroup,null,Object(a.createElement)(v.ToolbarItem,null,(function(e){return Object(a.createElement)(Vu,Object(i.a)({clientIds:t,toggleProps:e},n))})))},zu=window,Gu=zu.clearTimeout,Uu=zu.setTimeout;function Wu(e){var t=e.ref,n=e.isFocused,r=e.debounceTimeout,o=void 0===r?200:r,c=e.onChange,i=void 0===c?d.noop:c,l=Object(a.useState)(!1),s=Object(Me.a)(l,2),u=s[0],b=s[1],f=Object(a.useRef)(),p=function(e){null!=t&&t.current&&b(e),i(e)},m=function(){var e=(null==t?void 0:t.current)&&t.current.matches(":hover");return!n&&!e},v=function(){var e=f.current;e&&Gu&&Gu(e)};return Object(a.useEffect)((function(){return function(){return v()}}),[]),{showMovers:u,debouncedShowMovers:function(e){e&&e.stopPropagation(),v(),u||p(!0)},debouncedHideMovers:function(e){e&&e.stopPropagation(),v(),f.current=Uu((function(){m()&&p(!1)}),o)}}}function Ku(e){var t=e.hideDragHandle,n=Object(m.useSelect)((function(e){var t=e("core/block-editor"),n=t.getBlockName,r=t.getBlockMode,o=t.getSelectedBlockClientIds,c=t.isBlockValid,i=t.getBlockRootClientId,l=t.getSettings,a=o(),s=a[0],u=i(s),d=l();return{blockClientIds:a,blockClientId:s,blockType:s&&Object(p.getBlockType)(n(s)),hasFixedToolbar:d.hasFixedToolbar,hasReducedUI:d.hasReducedUI,rootClientId:u,isValid:a.every((function(e){return c(e)})),isVisual:a.every((function(e){return"visual"===r(e)}))}}),[]),r=n.blockClientIds,o=n.blockClientId,c=n.blockType,l=n.hasFixedToolbar,s=n.hasReducedUI,f=n.isValid,g=n.isVisual,O=Object(m.useDispatch)("core/block-editor").toggleBlockHighlight,h=Object(a.useRef)(),j=function(e){var t=e.ref,n=e.debounceTimeout,r=void 0===n?200:n,o=e.onChange,c=void 0===o?d.noop:o,i=Object(a.useState)(!1),l=Object(Me.a)(i,2),s=l[0],u=l[1],b=Wu({ref:t,debounceTimeout:r,isFocused:s,onChange:c}),f=b.showMovers,p=b.debouncedShowMovers,m=b.debouncedHideMovers,v=Object(a.useRef)(!1),g=function(){return(null==t?void 0:t.current)&&t.current.contains(t.current.ownerDocument.activeElement)};return Object(a.useEffect)((function(){var e=t.current,n=function(){g()&&(u(!0),p())},r=function(){g()||(u(!1),m())};return e&&!v.current&&(e.addEventListener("focus",n,!0),e.addEventListener("blur",r,!0),v.current=!0),function(){e&&(e.removeEventListener("focus",n),e.removeEventListener("blur",r))}}),[t,v,u,p,m]),{showMovers:f,gestures:{onMouseMove:p,onMouseLeave:m}}}({ref:h,onChange:function(e){e&&s||O(o,e)}}),k=j.showMovers,y=j.gestures,_=Object(b.useViewportMatch)("medium","<")||l;if(c&&!Object(p.hasBlockSupport)(c,"__experimentalToolbar",!0))return null;var E=_||k;if(0===r.length)return null;var C=f&&g,S=r.length>1,I=u()("block-editor-block-toolbar",E&&"is-showing-movers");return Object(a.createElement)("div",{className:I},Object(a.createElement)("div",Object(i.a)({ref:h},y),!S&&Object(a.createElement)("div",{className:"block-editor-block-toolbar__block-parent-selector-wrapper"},Object(a.createElement)(ou,{clientIds:r})),(C||S)&&Object(a.createElement)(v.ToolbarGroup,{className:"block-editor-block-toolbar__block-controls"},Object(a.createElement)(ju,{clientIds:r}),Object(a.createElement)(ru,{clientIds:r,hideDragHandle:t||s}))),C&&Object(a.createElement)(a.Fragment,null,Object(a.createElement)(w.Slot,{bubblesVirtually:!0,className:"block-editor-block-toolbar__slot"}),Object(a.createElement)(Zl.Slot,{bubblesVirtually:!0,className:"block-editor-block-toolbar__slot"})),Object(a.createElement)(Hu,{clientIds:r}))}var qu=function(e){var t=e.focusOnMount,n=Object(Fe.a)(e,["focusOnMount"]),r=Object(m.useSelect)((function(e){var t=e("core/block-editor"),n=t.getBlockName,r=t.getSelectedBlockClientIds,o=e(p.store).getBlockType,c=r()[0];return{blockType:c&&o(n(c))}}),[]).blockType;return r&&!Object(p.hasBlockSupport)(r,"__experimentalToolbar",!0)?null:Object(a.createElement)("div",{className:"block-editor-block-contextual-toolbar-wrapper"},Object(a.createElement)(tu,Object(i.a)({focusOnMount:t,className:"block-editor-block-contextual-toolbar","aria-label":Object(C.__)("Block tools")},n),Object(a.createElement)(Ku,null)))};function $u(e){var t=e("core/block-editor"),n=t.isNavigationMode,r=t.isMultiSelecting,o=t.hasMultiSelection,c=t.isTyping,i=t.isCaretWithinFormattedText,l=t.getSettings,a=t.getLastMultiSelectedBlockClientId;return{isNavigationMode:n(),isMultiSelecting:r(),isTyping:c(),isCaretWithinFormattedText:i(),hasMultiSelection:o(),hasFixedToolbar:l().hasFixedToolbar,lastClientId:a()}}function Yu(e){var t=e.clientId,n=e.rootClientId,r=e.isValid,o=e.isEmptyDefaultBlock,c=e.capturingClientId,i=Object(m.useSelect)($u,[]),l=i.isNavigationMode,s=i.isMultiSelecting,d=i.isTyping,f=i.isCaretWithinFormattedText,p=i.hasMultiSelection,g=i.hasFixedToolbar,O=i.lastClientId,h=Object(b.useViewportMatch)("medium"),j=Object(a.useState)(!1),k=Object(Me.a)(j,2),y=k[0],_=k[1],E=Object(a.useState)(!1),w=Object(Me.a)(E,2),C=w[0],S=w[1],I=Object(a.useContext)(Zu),B=Object(m.useDispatch)("core/block-editor").stopTyping,x=!d&&!l&&o&&r,P=l,T=!l&&!g&&h&&!x&&!s&&(!d||f),N=!(l||T||g||o);Object(Jl.useShortcut)("core/block-editor/focus-toolbar",Object(a.useCallback)((function(){_(!0),B(!0)}),[]),{bindGlobal:!0,eventName:"keydown",isDisabled:!N}),Object(a.useEffect)((function(){T||_(!1)}),[T]);var D=Object(a.useRef)();if(Object(a.useEffect)((function(){D.current=void 0}),[t]),!(P||T||y||x))return null;var A=I[t];if(!A)return null;var R=A.ownerDocument;c&&(A=lt(c,R));var L=A;if(p){var M=I[O];if(!M)return null;L={top:A,bottom:M}}var F=x?"top left right":"top right left",V=x?void 0:R.defaultView.frameElement||Object(ra.getScrollContainer)(A)||R.body;return Object(a.createElement)(v.Popover,{noArrow:!0,animate:!1,position:F,focusOnMount:!1,anchorRef:L,className:"block-editor-block-list__block-popover",__unstableStickyBoundaryElement:V,__unstableSlotName:"block-toolbar",__unstableBoundaryParent:!0,__unstableObserveElement:A,shouldAnchorIncludePadding:!0},(T||y)&&Object(a.createElement)("div",{onFocus:function(){S(!0)},onBlur:function(){S(!1)},tabIndex:-1,className:u()("block-editor-block-list__block-popover-inserter",{"is-visible":C})},Object(a.createElement)(Rs,{clientId:t,rootClientId:n,__experimentalIsQuick:!0})),(T||y)&&Object(a.createElement)(qu,{focusOnMount:y,__experimentalInitialIndex:D.current,__experimentalOnIndexChange:function(e){D.current=e}}),P&&Object(a.createElement)(Zs,{clientId:t,rootClientId:n,blockElement:A}),x&&Object(a.createElement)("div",{className:"block-editor-block-list__empty-block-inserter"},Object(a.createElement)(Rs,{position:"bottom right",rootClientId:n,clientId:t,__experimentalIsQuick:!0})))}function Xu(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientId,r=t.getFirstMultiSelectedBlockClientId,o=t.getBlockRootClientId,c=t.__unstableGetBlockWithoutInnerBlocks,i=t.getBlockParents,l=t.__experimentalGetBlockListSettingsForBlocks,a=n()||r();if(a){var s,u=c(a)||{},b=u.name,f=u.attributes,m=void 0===f?{}:f,v=u.isValid,g=i(a),O=l(g),h=Object(d.findIndex)(O,["__experimentalCaptureToolbars",!0]);return-1!==h&&(s=g[h]),{clientId:a,rootClientId:o(a),name:b,isValid:v,isEmptyDefaultBlock:b&&Object(p.isUnmodifiedDefaultBlock)({name:b,attributes:m}),capturingClientId:s}}}function Qu(){var e=Object(m.useSelect)(Xu,[]);if(!e)return null;var t=e.clientId,n=e.rootClientId,r=e.name,o=e.isValid,c=e.isEmptyDefaultBlock,i=e.capturingClientId;return r?Object(a.createElement)(Yu,{clientId:t,rootClientId:n,isValid:o,isEmptyDefaultBlock:c,capturingClientId:i}):null}var Zu=Object(a.createContext)(),Ju=Object(a.createContext)();function ed(e){var t=e.className,n=Object(a.useRef)(),r=Object(a.useState)({}),o=Object(Me.a)(r,2),c=o[0],i=o[1],l=function(e){var t=Object(a.useState)(!1),n=Object(Me.a)(t,2),r=n[0],o=n[1],c=Object(a.useState)(!1),i=Object(Me.a)(c,2),l=i[0],s=i[1],u=Object(a.useState)(null),d=Object(Me.a)(u,2),b=d[0],f=d[1],p=Object(m.useSelect)((function(e){var t=e("core/block-editor"),n=t.isMultiSelecting,r=t.isBlockInsertionPointVisible,o=t.getBlockInsertionPoint,c=t.getBlockOrder,i=t.getBlockListSettings,l=o(),a=c(l.rootClientId);return{getBlockListSettings:i,isMultiSelecting:n(),isInserterVisible:r(),selectedClientId:a[l.index-1],selectedRootClientId:l.rootClientId}}),[]),v=p.isMultiSelecting,g=p.isInserterVisible,O=p.selectedClientId,h=p.selectedRootClientId,j=p.getBlockListSettings,k=Object(a.useCallback)((function(e){var t;if(e.target.classList.contains("block-editor-block-list__layout")){var n;if(!e.target.classList.contains("is-root-container"))n=(e.target.getAttribute("data-block")?e.target:e.target.closest("[data-block]")).getAttribute("data-block");var c=(null===(t=j(n))||void 0===t?void 0:t.orientation)||"vertical",i=e.target.getBoundingClientRect(),l=e.clientY-i.top,a=e.clientX-i.left,s=Array.from(e.target.children),u=s.find((function(e){return"vertical"===c&&e.offsetTop>l||"horizontal"===c&&e.offsetLeft>a})),d=u?s[s.indexOf(u)-1]:s[s.length-1];if(d&&(d.id||(d=d.firstElementChild))){var b=d.id.slice("block-".length);if(b){var p=d.getBoundingClientRect();"horizontal"===c&&(e.clientY>p.bottom||e.clientYp.right||e.clientX=o.right||l.right<=o.left)return!1}if(Object(ra.isTextField)(n))return!0;if(!n.classList.contains("block-editor-block-list__block"))return!1;if(function(e){return e.classList.contains("block-editor-block-list__layout")||!!e.querySelector(".block-editor-block-list__layout")}(n))return!0;if(n.contains(e))return!1;for(var a,s=1;(a=i[c+s])&&n.contains(a);s++)if(t(a,c+s,i))return!1;return!0}))}function bd(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientId,r=t.getMultiSelectedBlocksStartClientId,o=t.getMultiSelectedBlocksEndClientId,c=t.getPreviousBlockClientId,i=t.getNextBlockClientId,l=t.getFirstMultiSelectedBlockClientId,a=t.getLastMultiSelectedBlockClientId,s=t.hasMultiSelection,u=t.getBlockOrder,b=t.isNavigationMode,f=t.isSelectionEnabled,p=t.getBlockSelectionStart,m=t.isMultiSelecting,v=t.getSettings,g=n(),O=r(),h=o(),j=u();return{selectedBlockClientId:g,selectionStartClientId:O,selectionBeforeEndClientId:c(h||g),selectionAfterEndClientId:i(h||g),selectedFirstClientId:l(),selectedLastClientId:a(),hasMultiSelection:s(),firstBlock:Object(d.first)(j),lastBlock:Object(d.last)(j),isNavigationMode:b(),isSelectionEnabled:f(),blockSelectionStart:p(),isMultiSelecting:m(),keepCaretInsideBlock:v().keepCaretInsideBlock}}function fd(e){var t=e.children,n=Object(a.useRef)(),r=Object(a.useRef)(),o=Object(a.useRef)(),c=Object(a.useRef)(),i=Object(a.useRef)(),l=Object(a.useRef)(),s=Object(a.useRef)(),b=function(e){var t=Object(m.useSelect)(ad,[]),n=t.isSelectionEnabled,r=t.isMultiSelecting,o=t.multiSelectedBlockClientIds,c=t.hasMultiSelection,i=t.getBlockParents,l=t.selectedBlockClientId,s=Object(m.useDispatch)("core/block-editor"),u=s.startMultiSelect,d=s.stopMultiSelect,b=s.multiSelect,f=s.selectBlock,p=Object(a.useRef)(),v=Object(a.useRef)(),g=Object(a.useRef)();Object(a.useEffect)((function(){var t=e.current.ownerDocument,n=t.defaultView;if(c&&!r){var i=o.length;if(!(i<2)){var a=o[0],s=o[i-1],u=lt(a,t),d=lt(s,t),b=n.getSelection(),f=t.createRange();u=ld(u,"start"),d=ld(d,"end"),f.setStartBefore(u),f.setEndAfter(d),b.removeAllRanges(),b.addRange(f)}}else{if(!l||r)return;var p=n.getSelection();if(p.rangeCount&&!p.isCollapsed){var m=lt(l,t),v=p.getRangeAt(0),g=v.startContainer,O=v.endContainer;!m||m.contains(g)&&m.contains(O)||p.removeAllRanges()}}}),[c,r,o,f,l]);var O=Object(a.useCallback)((function(t){var n=t.isSelectionEnd,r=e.current.ownerDocument.defaultView.getSelection();if(r.rangeCount&&!r.isCollapsed){var o=st(r.focusNode);if(v.current===o){if(f(o),n&&(sd(e.current,!0),r.rangeCount)){var c=r.getRangeAt(0).commonAncestorContainer;g.current.contains(c)&&g.current.focus()}}else{var l=[].concat(Object(pe.a)(i(v.current)),[v.current]),a=[].concat(Object(pe.a)(i(o)),[o]),s=Math.min(l.length,a.length)-1;b(l[s],a[s])}}else sd(e.current,!0)}),[f,i,b]),h=Object(a.useCallback)((function(){var t=e.current.ownerDocument,n=t.defaultView;t.removeEventListener("selectionchange",O),n.removeEventListener("mouseup",h),p.current=n.requestAnimationFrame((function(){O({isSelectionEnd:!0}),d()}))}),[O,d]);return Object(a.useEffect)((function(){var t=e.current.ownerDocument,n=t.defaultView;return function(){t.removeEventListener("selectionchange",O),n.removeEventListener("mouseup",h),n.cancelAnimationFrame(p.current)}}),[O,h]),Object(a.useCallback)((function(t){if(n){var r=e.current.ownerDocument,o=r.defaultView;v.current=t,g.current=r.activeElement,u(),r.addEventListener("selectionchange",O),o.addEventListener("mouseup",h),sd(e.current,!1)}}),[n,u,h])}(n),f=Object(m.useSelect)(bd,[]),p=f.selectedBlockClientId,v=f.selectionStartClientId,g=f.selectionBeforeEndClientId,O=f.selectionAfterEndClientId,h=f.selectedFirstClientId,j=f.selectedLastClientId,k=f.hasMultiSelection,y=f.firstBlock,_=f.lastBlock,E=f.isNavigationMode,w=f.isSelectionEnabled,S=f.blockSelectionStart,I=f.isMultiSelecting,B=f.keepCaretInsideBlock,x=Object(m.useDispatch)("core/block-editor"),P=x.multiSelect,T=x.selectBlock,N=x.setNavigationMode;function D(e){var t=e?g:O;t&&P(v||p,t)}function A(e){var t=e?h:j;t&&T(t)}Object(a.useEffect)((function(){k&&!I&&c.current.focus()}),[k,I]);var R=u()("block-editor-writing-flow",{"is-navigate-mode":E});return Object(a.createElement)(ud.Provider,{value:b},Object(a.createElement)(id,{ref:r,selectedClientId:p,containerRef:n,noCapture:l,hasMultiSelection:k,multiSelectionContainer:c}),Object(a.createElement)("div",{ref:c,tabIndex:k?"0":void 0,"aria-label":k?Object(C.__)("Multiple selected blocks"):void 0,style:{position:"fixed"},onKeyDown:function(e){var t=e.keyCode,n=e.shiftKey,c=t===Ht.UP,i=t===Ht.DOWN,a=t===Ht.LEFT,s=t===Ht.RIGHT,u=c||a,d=a||s||(c||i);if(t===Ht.TAB)l.current=!0,n?r.current.focus():o.current.focus();else if(d){(n?D:A)(u),e.preventDefault()}}}),Object(a.createElement)("div",{ref:n,className:R,onKeyDown:function(e){var t=e.keyCode,c=e.target;if(n.current.contains(c)){var a=t===Ht.UP,u=t===Ht.DOWN,b=t===Ht.LEFT,f=t===Ht.RIGHT,m=t===Ht.TAB,v=t===Ht.ESCAPE,h=a||b,j=b||f,k=a||u,E=j||k,w=e.shiftKey,C=w||e.ctrlKey||e.altKey||e.metaKey,S=k?ra.isVerticalEdge:ra.isHorizontalEdge,I=n.current.ownerDocument,x=I.defaultView;if(p)if(m){var T=lt(p,I);if(w){if(c===T)return l.current=!0,void r.current.focus()}else{var A=ra.focus.tabbable.find(T);if(c===(Object(d.last)(A)||T))return l.current=!0,void o.current.focus()}}else v&&N(!0);if(k?s.current||(s.current=Object(ra.computeCaretRect)(x)):s.current=null,!E)return Ht.isKeyboardEvent.primary(e)&&(i.current=Object(ra.isEntirelySelected)(c)),void(Ht.isKeyboardEvent.primary(e,"a")&&((c.isContentEditable?i.current:Object(ra.isEntirelySelected)(c))&&(P(y,_),e.preventDefault()),i.current=!0));if(!e.nativeEvent.defaultPrevented&&function(e,t,n){if((t===Ht.UP||t===Ht.DOWN)&&!n)return!0;var r=e.tagName;return"INPUT"!==r&&"TEXTAREA"!==r}(c,t,C)){var R,L="rtl"===(R=c).ownerDocument.defaultView.getComputedStyle(R).direction?!h:h;if(w)(h&&g||!h&&O)&&function(e,t){var r,o,c=dd(e,t,n.current);return!(c&&(r=e,o=c,r.closest(".block-editor-block-list__block")===o.closest(".block-editor-block-list__block")))}(c,h)&&S(c,h)&&(D(h),e.preventDefault());else if(k&&Object(ra.isVerticalEdge)(c,h)&&!B){var M=dd(c,h,n.current,!0);M&&(Object(ra.placeCaretAtVerticalEdge)(M,h,s.current),e.preventDefault())}else if(j&&x.getSelection().isCollapsed&&Object(ra.isHorizontalEdge)(c,L)&&!B){var F=dd(c,L,n.current);Object(ra.placeCaretAtHorizontalEdge)(F,L),e.preventDefault()}}}},onMouseDown:function(e){s.current=null;var t=e.target.ownerDocument;if(E&&p&&at(lt(p,t),e.target)&&N(!1),w&&0===e.button){var n=st(e.target);n&&(e.shiftKey?S!==n&&(P(S,n),e.preventDefault()):k&&T(n))}}},t),Object(a.createElement)(id,{ref:o,selectedClientId:p,containerRef:n,noCapture:l,hasMultiSelection:k,multiSelectionContainer:c,isReverse:!0}))}function pd(e,t){var n=Object(a.useContext)(ud),r=Object(m.useSelect)((function(e){var n=e("core/block-editor"),r=n.isBlockSelected,o=n.getBlockRootClientId,c=n.getBlockIndex;return{isSelected:r(t),rootClientId:o(t),index:c(t)}}),[t]),o=r.isSelected,c=r.rootClientId,i=r.index,l=Object(m.useDispatch)("core/block-editor"),s=l.insertDefaultBlock,u=l.removeBlock,d=l.selectBlock;Object(a.useEffect)((function(){if(!o){function r(n){at(e.current,n.target)&&d(t)}return e.current.addEventListener("focusin",r),function(){e.current.removeEventListener("focusin",r)}}function l(n){var r=n.keyCode,o=n.target;r!==Ht.ENTER&&r!==Ht.BACKSPACE&&r!==Ht.DELETE||o!==e.current||Object(ra.isTextField)(o)||(n.preventDefault(),r===Ht.ENTER?s({},c,i+1):u(t))}function a(e){1===e.buttons&&n(t)}function b(e){e.preventDefault()}return e.current.addEventListener("keydown",l),e.current.addEventListener("mouseleave",a),e.current.addEventListener("dragstart",b),function(){e.current.removeEventListener("mouseleave",a),e.current.removeEventListener("keydown",l),e.current.removeEventListener("dragstart",b)}}),[o,c,i,n,s,u,d])}function md(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function vd(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.__unstableIsHtml,r=Object(a.useRef)(),o=e.ref||r,c=Object(a.useContext)(Ju),i=Object(a.useContext)(jd),s=i.clientId,b=i.isSelected,f=i.isFirstMultiSelected,p=i.isLastMultiSelected,m=i.isPartOfMultiSelection,v=i.enableAnimation,g=i.index,O=i.className,h=i.name,j=i.mode,k=i.blockTitle,y=i.wrapperProps,_=void 0===y?{}:y;Object(a.useEffect)((function(){if(b||f||p){var e=o.current;return c((function(t){return vd(vd({},t),{},Object(l.a)({},s,e))})),function(){c((function(e){return Object(d.omit)(e,s)}))}}}),[b,f,p]),Object(a.useEffect)((function(){var e=o.current;c((function(t){return t[s]&&t[s]!==e?vd(vd({},t),{},Object(l.a)({},s,e)):t}))}));var E=Object(C.sprintf)(Object(C.__)("Block: %s"),k);rd(o,s),pd(o,s),ia(o,b||m,b||f,v,g);var w=od(o),S=cd(s),I="html"!==j||n?"":"-visual";return vd(vd(vd({},_),e),{},{ref:o,id:"block-".concat(s).concat(I),tabIndex:0,role:"group","aria-label":E,"data-block":s,"data-type":h,"data-title":k,className:u()(O,e.className,_.className,S,{"is-hovered":w}),style:vd(vd({},_.style),e.style)})}function Od(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function hd(e){for(var t=1;t1||Object(p.hasBlockSupport)(q,"lightBlockWrapper",!1),Y=_===Object(p.getUnregisteredTypeHandlerName)();q.getEditWrapperProps&&(t=C,n=q.getEditWrapperProps(w),r=hd(hd({},t),n),t&&n&&t.className&&n.className&&(r.className=u()(t.className,n.className)),t&&n&&t.style&&n.style&&(r.style=hd(hd({},t.style),n.style)),C=r);var X=$&&Object(p.hasBlockSupport)(q,"className",!0)?Object(p.getBlockDefaultClassName)(_):null,Q=$?w.className:null,Z=C&&!!C["data-align"],J=u()(X,Q,"block-editor-block-list__block",{"wp-block":!Z,"has-warning":!E||!!W||Y,"is-selected":s&&!L,"is-highlighted":M,"is-multi-selected":f,"is-reusable":Object(p.isReusableBlock)(q),"is-dragging":L,"is-typing":h,"is-focused":F&&A&&(s||j),"is-focus-mode":F&&A,"is-outline-mode":V,"has-child-selected":j&&!L,"is-active-entity":D===l},y),ee=Object(a.createElement)(ql,{name:_,isSelected:s,attributes:w,setAttributes:S,insertBlocksAfter:c?void 0:B,onReplace:c?void 0:I,onRemove:c?void 0:z,mergeBlocks:c?void 0:x,clientId:l,isSelectionEnabled:k,toggleSelection:P});if(Z){var te={"data-align":C["data-align"]};ee=Object(a.createElement)("div",Object(i.a)({className:"wp-block"},te),ee)}var ne,re={clientId:l,isSelected:s,isFirstMultiSelected:g,isLastMultiSelected:O,isPartOfMultiSelection:v,enableAnimation:N,index:T,className:J,isLocked:c,name:_,mode:o,blockTitle:q.title,wrapperProps:Object(d.omit)(C,["data-align"])},oe=Object(a.useMemo)((function(){return re}),Object.values(re));return ne=E?"html"===o?Object(a.createElement)(a.Fragment,null,Object(a.createElement)("div",{style:{display:"none"}},ee),Object(a.createElement)(kd,{isHtml:!0},Object(a.createElement)(Da,{clientId:l}))):$?ee:Object(a.createElement)(kd,C,ee):Object(a.createElement)(kd,null,Object(a.createElement)(Sa,{clientId:l}),Object(a.createElement)("div",null,Object(p.getSaveElement)(q,w))),Object(a.createElement)(jd.Provider,{value:oe},Object(a.createElement)(Pa,{onError:function(){return K(!0)}},ne),!!W&&Object(a.createElement)(kd,null,Object(a.createElement)(Ba,null)))}));function wd(e){var t=e.level;return Object(d.times)(t-1,(function(e){var n=e+2===t;return Object(a.createElement)("div",{key:e,"aria-hidden":"true",className:u()("block-editor-block-navigator-indentation",{"has-item":n})})}))}var Cd=function(e,t,n){return Object(C.sprintf)(Object(C.__)("Block %1$d of %2$d, Level %3$d"),e,t,n)};var Sd=Object(a.forwardRef)((function e(t,n){var r=t.className,o=t.block.clientId,c=t.isSelected,i=t.onClick,l=t.position,s=t.siblingBlockCount,d=t.level,f=t.tabIndex,p=t.onFocus,m=t.onDragStart,g=t.onDragEnd,O=t.draggable,h=Dl(o),j=Object(b.useInstanceId)(e),k="block-navigation-block-select-button__".concat(j),y=Cd(l,s,d);return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(v.Button,{className:u()("block-editor-block-navigation-block-select-button",r),onClick:i,"aria-describedby":k,ref:n,tabIndex:f,onFocus:p,onDragStart:m,onDragEnd:g,draggable:O},Object(a.createElement)(wd,{level:d}),Object(a.createElement)(Vr,{icon:null==h?void 0:h.icon,showColors:!0}),Object(a.createElement)(Al,{clientId:o}),c&&Object(a.createElement)(v.VisuallyHidden,null,Object(C.__)("(selected block)"))),Object(a.createElement)("div",{className:"block-editor-block-navigation-block-select-button__description",id:k},y))}));function Id(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Bd(e){for(var t=1;t=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,i=!0,l=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){l=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw c}}}}function Ad(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0,x=g||k,P=u()("block-editor-block-navigation-block__mover-cell",{"is-visible":x}),T=ja().__experimentalFeatures,N=u()("block-editor-block-navigation-block__menu-cell",{"is-visible":x});return Object(a.useEffect)((function(){T&&n&&b.current.focus()}),[T,n]),Object(a.createElement)(aa,{className:u()({"is-selected":n,"is-dragging":w}),onMouseEnter:function(){return O(!0)},onMouseLeave:function(){return O(!1)},onFocus:function(){return y(!0)},onBlur:function(){return y(!1)},level:c,position:o,rowCount:i,path:d,id:"block-navigation-block-".concat(_),"data-block":_},Object(a.createElement)(v.__experimentalTreeGridCell,{className:"block-editor-block-navigation-block__contents-cell",colSpan:B?void 0:2,ref:b},(function(e){var i=e.ref,s=e.tabIndex,u=e.onFocus;return Object(a.createElement)("div",{className:"block-editor-block-navigation-block__contents-container"},Object(a.createElement)(Nd,{block:t,onClick:function(){return r(t.clientId)},isSelected:n,position:o,siblingBlockCount:l,level:c,ref:i,tabIndex:s,onFocus:u}))})),B&&Object(a.createElement)(a.Fragment,null,Object(a.createElement)(v.__experimentalTreeGridCell,{className:P,withoutGridItem:!0},Object(a.createElement)(v.__experimentalTreeGridItem,null,(function(e){var t=e.ref,n=e.tabIndex,r=e.onFocus;return Object(a.createElement)(ga,{orientation:"vertical",clientIds:[_],ref:t,tabIndex:n,onFocus:r})})),Object(a.createElement)(v.__experimentalTreeGridItem,null,(function(e){var t=e.ref,n=e.tabIndex,r=e.onFocus;return Object(a.createElement)(Oa,{orientation:"vertical",clientIds:[_],ref:t,tabIndex:n,onFocus:r})})))),T&&Object(a.createElement)(v.__experimentalTreeGridCell,{className:N},(function(e){var t=e.ref,n=e.tabIndex,o=e.onFocus;return Object(a.createElement)(Vu,{clientIds:[_],icon:ta.a,toggleProps:{ref:t,tabIndex:n,onFocus:o},disableOpenOnArrowDown:!0,__experimentalSelectBlock:r},(function(e){var t=e.onClose;return Object(a.createElement)(v.MenuGroup,null,Object(a.createElement)(v.MenuItem,{onClick:Object(ea.a)(ei.a.mark((function e(){var n,r,o;return ei.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!S.length){e.next=20;break}n=Dd(S),e.prev=2,n.s();case 4:if((r=n.n()).done){e.next=10;break}return o=r.value,e.next=8,I(o);case 8:e.next=4;break;case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(2),n.e(e.t0);case 15:return e.prev=15,n.f(),e.finish(15);case 18:e.next=22;break;case 20:return e.next=22,I(null);case 22:return e.next=24,I(_);case 24:t();case 25:case"end":return e.stop()}}),e,null,[[2,12,15,18]])})))},Object(C.__)("Go to block")))}))})))}function Ld(e){var t=e.parentBlockClientId,n=e.position,r=e.level,o=e.rowCount,c=e.path,i=Object(m.useSelect)((function(e){var n=e("core/block-editor"),r=n.isBlockBeingDragged,o=n.isAncestorBeingDragged;return r(t)||o(t)}),[t]),l=Object(b.useInstanceId)(Ld),s="block-navigation-appender-row__description_".concat(l),d=Object(C.sprintf)(Object(C.__)("Add block at position %1$d, Level %2$d"),n,r);return Object(a.createElement)(aa,{className:u()({"is-dragging":i}),level:r,position:n,rowCount:o,path:c},Object(a.createElement)(v.__experimentalTreeGridCell,{className:"block-editor-block-navigation-appender__cell",colSpan:"3"},(function(e){var n=e.ref,o=e.tabIndex,c=e.onFocus;return Object(a.createElement)("div",{className:"block-editor-block-navigation-appender__container"},Object(a.createElement)(wd,{level:r}),Object(a.createElement)(Rs,{rootClientId:t,__experimentalIsQuick:!0,__experimentalSelectBlockOnInsert:!1,"aria-describedby":s,toggleProps:{ref:n,tabIndex:o,onFocus:c}}),Object(a.createElement)("div",{className:"block-editor-block-navigation-appender__description",id:s},d))})))}function Md(e){var t=e.blocks,n=e.selectBlock,r=e.selectedBlockClientId,o=e.showAppender,c=e.showBlockMovers,i=e.showNestedBlocks,l=e.parentBlockClientId,s=e.level,u=void 0===s?1:s,b=e.terminatedLevels,f=void 0===b?[]:b,p=e.path,m=void 0===p?[]:p,v=!l,g=Object(d.compact)(t),O=function(e){return o&&!v&&r===e},h=O(l),j=g.length,k=h?j+1:j,y=k;return Object(a.createElement)(a.Fragment,null,Object(d.map)(g,(function(e,t){var l=e.clientId,s=e.innerBlocks,d=t+1,b=k===d?[].concat(Object(pe.a)(f),[u]):f,p=[].concat(Object(pe.a)(m),[d]),v=i&&!!s&&!!s.length,g=O(l);return Object(a.createElement)(a.Fragment,{key:l},Object(a.createElement)(Rd,{block:e,onClick:n,isSelected:r===l,level:u,position:d,rowCount:k,siblingBlockCount:j,showBlockMovers:c,terminatedLevels:f,path:p}),(v||g)&&Object(a.createElement)(Md,{blocks:s,selectedBlockClientId:r,selectBlock:n,showAppender:o,showBlockMovers:c,showNestedBlocks:i,parentBlockClientId:l,level:u+1,terminatedLevels:b,path:p}))})),h&&Object(a.createElement)(Ld,{parentBlockClientId:l,position:k,rowCount:y,level:u,terminatedLevels:f,path:[].concat(Object(pe.a)(m),[y])}))}function Fd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Vd(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Hd(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Hd(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,i=!0,l=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){l=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw c}}}}function Hd(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.x&&t.top<=e.y&&t.bottom>=e.y}Md.defaultProps={selectBlock:function(){}};var Gd=["top","bottom"];function Ud(e){var t=Object(a.useState)(),n=Object(Me.a)(t,2),r=n[0],o=void 0===r?{}:r,c=n[1],i=Us(o.rootClientId,o.blockIndex),s=Object(v.__unstableUseDropZone)(function(e){for(var t=1;t0||function(e,t){var n=t.left+t.width/2;return e.x>n}(t,c)))return{rootClientId:r.clientId,blockIndex:0,dropPosition:"inside"};if(r.canInsertDraggedBlocksAsSibling){var O=g?1:0;return{rootClientId:r.rootClientId,clientId:r.clientId,blockIndex:r.blockIndex+O,dropPosition:n}}}}(b.current,u);e&&c(e)}}),[b,u]),u)return o}function Wd(e){var t=e.__experimentalFeatures,n=Object(Fe.a)(e,["__experimentalFeatures"]),r=Object(a.useRef)(),o=Ud(r);t||(o=void 0);var c=Object(a.useMemo)((function(){return{__experimentalFeatures:t,blockDropTarget:o}}),[t,o]);return Object(a.createElement)(v.__experimentalTreeGrid,{className:"block-editor-block-navigation-tree","aria-label":Object(C.__)("Block navigation structure"),ref:r},Object(a.createElement)(ha.Provider,{value:c},Object(a.createElement)(Md,n)))}var Kd=Object(b.compose)(Object(m.withSelect)((function(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientId,r=t.getBlockHierarchyRootClientId,o=t.__unstableGetBlockWithBlockTree,c=t.__unstableGetBlockTree,i=n();return{rootBlocks:c(),rootBlock:i?o(r(i)):null,selectedBlockClientId:i}})),Object(m.withDispatch)((function(e,t){var n=t.onSelect,r=void 0===n?d.noop:n;return{selectBlock:function(t){e("core/block-editor").selectBlock(t),r(t)}}})))((function(e){var t=e.rootBlock,n=e.rootBlocks,r=e.selectedBlockClientId,o=e.selectBlock,c=e.__experimentalFeatures;if(!n||0===n.length)return null;var i=t&&(t.clientId!==r||t.innerBlocks&&0!==t.innerBlocks.length);return Object(a.createElement)("div",{className:"block-editor-block-navigation__container"},Object(a.createElement)("p",{className:"block-editor-block-navigation__label"},Object(C.__)("List view")),Object(a.createElement)(Wd,{blocks:i?[t]:n,selectedBlockClientId:r,selectBlock:o,__experimentalFeatures:c,showNestedBlocks:!0}))})),qd=Object(a.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},Object(a.createElement)(v.Path,{d:"M13.8 5.2H3v1.5h10.8V5.2zm-3.6 12v1.5H21v-1.5H10.2zm7.2-6H6.6v1.5h10.8v-1.5z"}));function $d(e){var t=e.isEnabled,n=e.onToggle,r=e.isOpen,o=e.innerRef,c=Object(Fe.a)(e,["isEnabled","onToggle","isOpen","innerRef"]);Object(Jl.useShortcut)("core/edit-post/toggle-block-navigation",Object(a.useCallback)(n,[n]),{bindGlobal:!0,isDisabled:!t});var l=Object(m.useSelect)((function(e){return e(Jl.store).getShortcutRepresentation("core/edit-post/toggle-block-navigation")}),[]);return Object(a.createElement)(v.Button,Object(i.a)({},c,{ref:o,icon:qd,"aria-expanded":r,"aria-haspopup":"true",onClick:t?n:void 0,label:Object(C.__)("Outline"),className:"block-editor-block-navigation",shortcut:l,"aria-disabled":!t}))}var Yd=Object(a.forwardRef)((function(e,t){var n=e.isDisabled,r=e.__experimentalFeatures,o=Object(Fe.a)(e,["isDisabled","__experimentalFeatures"]),c=Object(m.useSelect)((function(e){return!!e("core/block-editor").getBlockCount()}),[])&&!n;return Object(a.createElement)(v.Dropdown,{contentClassName:"block-editor-block-navigation__popover",position:"bottom right",renderToggle:function(e){var n=e.isOpen,r=e.onToggle;return Object(a.createElement)($d,Object(i.a)({},o,{innerRef:t,isOpen:n,onToggle:r,isEnabled:c}))},renderContent:function(e){var t=e.onClose;return Object(a.createElement)(Kd,{onSelect:t,__experimentalFeatures:r})}})})),Xd=n("@wordpress/shortcode"),Qd=[Ht.rawShortcut.primary("z"),Ht.rawShortcut.primaryShift("z"),Ht.rawShortcut.primary("y")],Zd=Object(a.createElement)(v.KeyboardShortcuts,{bindGlobal:!0,shortcuts:Object(d.fromPairs)(Qd.map((function(e){return[e,function(e){return e.preventDefault()}]})))}),Jd=function(){return Zd};function eb(e){return e.filter((function(e){var t=e.type;return/^image\/(?:jpe?g|png|gif)$/.test(t)})).map((function(e){return'')})).join("")}var tb={position:"bottom right",isAlternate:!0},nb=function(){return Object(a.createElement)("div",{className:"block-editor-format-toolbar"},Object(a.createElement)(v.ToolbarGroup,null,["bold","italic","link","text-color"].map((function(e){return Object(a.createElement)(v.Slot,{name:"RichText.ToolbarControls.".concat(e),key:e})})),Object(a.createElement)(v.Slot,{name:"RichText.ToolbarControls"},(function(e){return 0!==e.length&&Object(a.createElement)(v.ToolbarItem,null,(function(t){return Object(a.createElement)(v.DropdownMenu,{icon:ba.a,label:Object(C.__)("More"),toggleProps:t,controls:Object(d.orderBy)(e.map((function(e){return Object(Me.a)(e,1)[0].props})),"title"),popoverProps:tb})}))}))))},rb=function(e){var t=e.inline,n=e.anchorRef;return t?Object(a.createElement)(v.Popover,{noArrow:!0,position:"top center",focusOnMount:!1,anchorRef:n,className:"block-editor-rich-text__inline-format-toolbar",__unstableSlotName:"block-toolbar"},Object(a.createElement)(nb,null)):Object(a.createElement)(Zl,null,Object(a.createElement)(nb,null))};function ob(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function cb(e){for(var t=1;t0,Be=l,xe=s;Array.isArray(l)&&(Be=p.children.toHTML(l),xe=function(e){return s(p.children.fromDOM(Object(c.__unstableCreateElement)(document,e).childNodes))});var Pe=Object(a.useCallback)((function(e,t){Ee(le,P,e,t)}),[le,P]),Te=Object(a.useCallback)((function(e){var t=e.value,n=e.isReverse;S&&S(!n),C&&Object(c.isEmpty)(t)&&n&&C(!n)}),[S,C]),Ne=Object(a.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(j&&I){var n=[],r=Object(c.split)(e),o=Object(Me.a)(r,2),i=o[0],l=o[1],a=t.length>0,s=-1;a&&Object(c.isEmpty)(i)||(n.push(I(Object(c.toHTMLString)({value:i,multilineTag:Ce}))),s+=1),a?(n.push.apply(n,Object(pe.a)(t)),s+=t.length):x&&n.push(x()),(a||x)&&Object(c.isEmpty)(l)||n.push(I(Object(c.toHTMLString)({value:l,multilineTag:Ce})));var u=a?s:1,d=a?-1:null;j(n,u,d)}}),[j,I,Ce,x]),De=Object(a.useCallback)((function(e){var t=e.value,n=e.onChange,r=e.shiftKey,o=j&&I;if(j){var i=Object(p.getBlockTransforms)("from").filter((function(e){return"enter"===e.type})),l=Object(p.findTransform)(i,(function(e){return e.regExp.test(t.text)}));l&&(j([l.transform({content:t.text})]),we())}if(f)r?R||n(Object(c.insert)(t,"\n")):o&&Object(c.__unstableIsEmptyLine)(t)?Ne(t):n(Object(c.__unstableInsertLineSeparator)(t));else{var a=t.text,s=t.start,u=t.end,d=B&&s===u&&u===a.length;r||!o&&!d?R||n(Object(c.insert)(t,"\n")):!o&&d?B():o&&Ne(t)}}),[j,I,we,f,Ne,B]),Ae=Object(a.useCallback)((function(e){var t=e.value,n=e.onChange,r=e.html,i=e.plainText,l=e.files,a=e.activeFormats;if(N)n(Object(c.insert)(t,Object(c.create)({text:i})));else{if(l&&l.length&&!r){var s=Object(p.pasteHandler)({HTML:eb(l),mode:"BLOCKS",tagName:o,preserveWhiteSpace:T});return window.console.log("Received items:\n\n",l),void(j&&Object(c.isEmpty)(t)?j(s):Ne(t,s))}var u,d=j&&I?"AUTO":"INLINE";"AUTO"===d&&Object(c.isEmpty)(t)&&(u=i,Object(Xd.regexp)(".*").test(u))&&(d="BLOCKS"),D&&Object(c.isEmpty)(t)&&Object(gs.isURL)(i.trim())&&(d="BLOCKS");var b=Object(p.pasteHandler)({HTML:r,plainText:i,mode:d,tagName:o,preserveWhiteSpace:T});if("string"==typeof b){var m=Object(c.create)({html:b});if(a.length)for(var v=m.formats.length;v--;)m.formats[v]=[].concat(Object(pe.a)(a),Object(pe.a)(m.formats[v]||[]));f&&(m=Object(c.replace)(m,/\n+/g,c.__UNSTABLE_LINE_SEPARATOR)),n(Object(c.insert)(t,m))}else b.length>0&&(j&&Object(c.isEmpty)(t)?j(b,b.length-1,-1):Ne(t,b))}}),[o,j,I,Ne,D,f,T,N]),Re=Object(a.useCallback)((function(e,t){if(j){var n=e.start,r=e.text;if(" "===r.slice(n-1,n)){var o=r.slice(0,n).trim(),i=Object(p.getBlockTransforms)("from").filter((function(e){return"prefix"===e.type})),l=Object(p.findTransform)(i,(function(e){var t=e.prefix;return o===t}));if(l){var a=t(Object(c.slice)(e,n,r.length)),s=l.transform(a);j([s]),we()}}}}),[j,we]),Le=Object(a.createElement)(c.__experimentalRichText,{clientId:le,identifier:P,ref:ce,value:Be,onChange:xe,selectionStart:be,selectionEnd:fe,onSelectionChange:Pe,tagName:o,placeholder:k,allowedFormats:Se,withoutInteractiveFormatting:w,onEnter:De,onDelete:Te,onPaste:Ae,__unstableIsSelected:me,__unstableInputRule:Re,__unstableMultilineTag:Ce,__unstableIsCaretWithinFormattedText:de,__unstableOnEnterFormattedText:ye,__unstableOnExitFormattedText:_e,__unstableOnCreateUndoLevel:ke,__unstableMarkAutomaticChange:we,__unstableDidAutomaticChange:ve,__unstableUndo:Oe,__unstableDisableFormats:A,preserveWhiteSpace:T,disabled:ge,unstableOnFocus:L,__unstableAllowPrefixTransformations:M,__unstableMultilineRootTag:F,onCaretVerticalPositionChange:ae,blockIsSelected:void 0!==d?d:se,shouldBlurOnUnmount:he,__unstableMobileNoFocusOnMount:V,deleteEnter:H,placeholderTextColor:z,textAlign:G,selectionColor:U,tagsToEliminate:W,rootTagsToEliminate:K,disableEditingMenu:q,fontSize:$,fontFamily:Y,fontWeight:X,fontStyle:Q,minWidth:Z,maxWidth:J,onBlur:ee,setRef:te,id:ne.id,style:ne.style},(function(e){var t=e.isSelected,n=e.value,o=e.onChange,c=e.onFocus,l=e.editableProps,s=e.editableTagName;return Object(a.createElement)(a.Fragment,null,r&&r({value:n,onChange:o,onFocus:c}),t&&Ie&&Object(a.createElement)(rb,{inline:v,anchorRef:ce.current}),t&&Object(a.createElement)(Jd,null),Object(a.createElement)(Gr,{onReplace:j,completers:O,record:n,onChange:o,isSelected:t,contentRef:ce},(function(e){var t=e.listBoxId,n=e.activeId,r=e.onKeyDown;return Object(a.createElement)(s,Object(i.a)({},l,ne,{style:ne.style?cb(cb({},ne.style),l.style):l.style,className:u()("block-editor-rich-text__editable",ne.className,l.className,{"keep-placeholder-on-focus":y}),"aria-autocomplete":t?"list":void 0,"aria-owns":t,"aria-activedescendant":n,onKeyDown:function(e){r(e),l.onKeyDown(e)}}))})))}));return g?(Ua()("wp.blockEditor.RichText wrapperClassName prop",{alternative:"className prop or create your own wrapper div"}),Object(a.createElement)("div",{className:u()("block-editor-rich-text",g)},Le)):Le}));ab.Content=function(e){var t=e.value,n=e.tagName,r=e.multiline,o=Object(Fe.a)(e,["value","tagName","multiline"]);Array.isArray(t)&&(t=p.children.toHTML(t));var c=ib(r);!t&&c&&(t="<".concat(c,">"));var i=Object(a.createElement)(a.RawHTML,null,t);return n?Object(a.createElement)(n,Object(d.omit)(o,["format"]),i):i},ab.isEmpty=function(e){return!e||0===e.length},ab.Content.defaultProps={format:"string",value:""};var sb=ab;function ub(e){var t=e.value,n=e.onChange;return Object(a.createElement)(Td,null,Object(a.createElement)(sb,{value:t,onChange:n,placeholder:Object(C.__)("Navigation item"),keepPlaceholderOnFocus:!0,withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic","core/image","core/strikethrough"]}))}var db=n("./node_modules/@wordpress/icons/build-module/library/layout.js");var bb=function(e){var t=e.icon,n=void 0===t?db.a:t,r=e.label,o=void 0===r?Object(C.__)("Choose variation"):r,c=e.instructions,i=void 0===c?Object(C.__)("Select a variation to start with."):c,l=e.variations,s=e.onSelect,d=e.allowSkip,b=u()("block-editor-block-variation-picker",{"has-many-variations":l.length>4});return Object(a.createElement)(v.Placeholder,{icon:n,label:o,instructions:i,className:b},Object(a.createElement)("ul",{className:"block-editor-block-variation-picker__variations",role:"list","aria-label":Object(C.__)("Block variations")},l.map((function(e){return Object(a.createElement)("li",{key:e.name},Object(a.createElement)(v.Button,{isSecondary:!0,icon:e.icon,iconSize:48,onClick:function(){return s(e)},className:"block-editor-block-variation-picker__variation",label:e.description||e.title}),Object(a.createElement)("span",{className:"block-editor-block-variation-picker__variation-label",role:"presentation"},e.title))}))),d&&Object(a.createElement)("div",{className:"block-editor-block-variation-picker__skip"},Object(a.createElement)(v.Button,{isLink:!0,onClick:function(){return s()}},Object(C.__)("Skip"))))},fb=function(e,t){if(t&&e){var n=t.filter((function(t){var n=t.attributes;return!(!n||!Object.keys(n).length)&&Object(d.isMatch)(e,n)}));if(1===n.length)return n[0]}};function pb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var mb=function(e){var t=e.blockClientId,n=Object(a.useState)(),r=Object(Me.a)(n,2),o=r[0],c=r[1],i=Object(m.useDispatch)("core/block-editor").updateBlockAttributes,s=Object(m.useSelect)((function(e){var n=e(p.store).getBlockVariations,r=e("core/block-editor"),o=r.getBlockName,c=r.getBlockAttributes,i=t&&o(t);return{variations:i&&n(i,"transform"),blockAttributes:c(t)}}),[t]),u=s.variations,d=s.blockAttributes;if(Object(a.useEffect)((function(){var e;c(null===(e=fb(d,u))||void 0===e?void 0:e.name)}),[d,u]),null==u||!u.length)return null;var b=u.map((function(e){return{value:e.name,label:e.title,info:e.description}})),f=function(e){i(t,function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object(a.useRef)(),r=h(),o=r.clientId,c=Object(b.useViewportMatch)("medium","<"),l=Object(m.useSelect)((function(e){var t=e("core/block-editor"),n=t.getBlockName,r=t.isBlockSelected,i=t.hasSelectedInnerBlock,l=(0,t.isNavigationMode)()||c;return"core/template"!==n(o)&&!r(o)&&!i(o,!0)&&l}),[o,c]),s=e.ref||n,d=t.value&&t.onChange?Wb:Ub;return Gb(Gb({},e),{},{ref:s,className:u()(e.className,"block-editor-block-list__layout",{"has-overlay":l}),children:Object(a.createElement)(d,Object(i.a)({},t,{clientId:o,wrapperRef:s}))})}Kb.DefaultBlockAppender=Mb,Kb.ButtonBlockAppender=Lb,Kb.Content=Object(p.withBlockContentContext)((function(e){var t=e.BlockContent;return Object(a.createElement)(t,null)}));var $b=Kb,Yb=n("./node_modules/@wordpress/icons/build-module/library/keyboard-return.js");function Xb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Qb(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"",n=this.props,r=n.__experimentalFetchLinkSuggestions,o=n.__experimentalHandleURLSuggestions;if(r){var c=!(t&&t.length);if(c||!(t.length<2||!o&&Object(gs.isURL)(t))){this.isUpdatingSuggestions=!0,this.setState({selectedSuggestion:null,loading:!0});var i=r(t,{isInitialSuggestions:c});i.then((function(t){e.suggestionsRequest===i&&(e.setState({suggestions:t,loading:!1,showSuggestions:!!t.length}),t.length?e.props.debouncedSpeak(Object(C.sprintf)(Object(C._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",t.length),t.length),"assertive"):e.props.debouncedSpeak(Object(C.__)("No results."),"assertive"),e.isUpdatingSuggestions=!1)})).catch((function(){e.suggestionsRequest===i&&(e.setState({loading:!1}),e.isUpdatingSuggestions=!1)})),this.suggestionsRequest=i}else this.setState({showSuggestions:!1,selectedSuggestion:null,loading:!1})}}},{key:"onChange",value:function(e){var t=e.target.value;this.props.onChange(t),this.props.disableSuggestions||this.updateSuggestions(t.trim())}},{key:"onFocus",value:function(){var e=this.state.suggestions,t=this.props,n=t.disableSuggestions,r=t.value;!r||n||this.isUpdatingSuggestions||e&&e.length||this.updateSuggestions(r.trim())}},{key:"onKeyDown",value:function(e){var t=this.state,n=t.showSuggestions,r=t.selectedSuggestion,o=t.suggestions,c=t.loading;if(n&&o.length&&!c){var i=this.state.suggestions[this.state.selectedSuggestion];switch(e.keyCode){case Ht.UP:e.stopPropagation(),e.preventDefault();var l=r?r-1:o.length-1;this.setState({selectedSuggestion:l});break;case Ht.DOWN:e.stopPropagation(),e.preventDefault();var a=null===r||r===o.length-1?0:r+1;this.setState({selectedSuggestion:a});break;case Ht.TAB:null!==this.state.selectedSuggestion&&(this.selectLink(i),this.props.speak(Object(C.__)("Link selected.")));break;case Ht.ENTER:null!==this.state.selectedSuggestion&&(e.stopPropagation(),this.selectLink(i))}}else switch(e.keyCode){case Ht.UP:0!==e.target.selectionStart&&(e.stopPropagation(),e.preventDefault(),e.target.setSelectionRange(0,0));break;case Ht.DOWN:this.props.value.length!==e.target.selectionStart&&(e.stopPropagation(),e.preventDefault(),e.target.setSelectionRange(this.props.value.length,this.props.value.length))}}},{key:"selectLink",value:function(e){this.props.onChange(e.url,e),this.setState({selectedSuggestion:null,showSuggestions:!1})}},{key:"handleOnClick",value:function(e){this.selectLink(e),this.inputRef.current.focus()}},{key:"render",value:function(){return Object(a.createElement)(a.Fragment,null,this.renderControl(),this.renderSuggestions())}},{key:"renderControl",value:function(){var e=this.props,t=e.label,n=e.className,r=e.isFullWidth,o=e.instanceId,c=e.placeholder,i=void 0===c?Object(C.__)("Paste URL or type to search"):c,l=e.__experimentalRenderControl,s=e.value,d=void 0===s?"":s,b=this.state,f=b.loading,p=b.showSuggestions,m=b.selectedSuggestion,g=b.suggestionsListboxId,O=b.suggestionOptionIdPrefix,h={id:"url-input-control-".concat(o),label:t,className:u()("block-editor-url-input",n,{"is-full-width":r})},j={value:d,required:!0,className:"block-editor-url-input__input",type:"text",onChange:this.onChange,onFocus:this.onFocus,placeholder:i,onKeyDown:this.onKeyDown,role:"combobox","aria-label":Object(C.__)("URL"),"aria-expanded":p,"aria-autocomplete":"list","aria-owns":g,"aria-activedescendant":null!==m?"".concat(O,"-").concat(m):void 0,ref:this.inputRef};return l?l(h,j,f):Object(a.createElement)(v.BaseControl,h,Object(a.createElement)("input",j),f&&Object(a.createElement)(v.Spinner,null))}},{key:"renderSuggestions",value:function(){var e=this,t=this.props,n=t.className,r=t.__experimentalRenderSuggestions,o=t.value,c=void 0===o?"":o,l=t.__experimentalShowInitialSuggestions,s=void 0!==l&&l,b=this.state,f=b.showSuggestions,p=b.suggestions,m=b.selectedSuggestion,g=b.suggestionsListboxId,O=b.suggestionOptionIdPrefix,h=b.loading,j={id:g,ref:this.autocompleteRef,role:"listbox"},k=function(t,n){return{role:"option",tabIndex:"-1",id:"".concat(O,"-").concat(n),ref:e.bindSuggestionNode(n),"aria-selected":n===m}};return Object(d.isFunction)(r)&&f&&p.length?r({suggestions:p,selectedSuggestion:m,suggestionsListProps:j,buildSuggestionItemProps:k,isLoading:h,handleSuggestionClick:this.handleOnClick,isInitialSuggestions:s&&!(c&&c.length)}):!Object(d.isFunction)(r)&&f&&p.length?Object(a.createElement)(v.Popover,{position:"bottom",noArrow:!0,focusOnMount:!1},Object(a.createElement)("div",Object(i.a)({},j,{className:u()("block-editor-url-input__suggestions","".concat(n,"__suggestions"))}),p.map((function(t,n){return Object(a.createElement)(v.Button,Object(i.a)({},k(0,n),{key:t.id,className:u()("block-editor-url-input__suggestion",{"is-selected":n===m}),onClick:function(){return e.handleOnClick(t)}}),t.title)})))):null}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.value,r=e.instanceId,o=e.disableSuggestions,c=e.__experimentalShowInitialSuggestions,i=void 0!==c&&c,l=t.showSuggestions,a=n&&n.length;return i||a||(l=!1),!0===o&&(l=!1),{showSuggestions:l,suggestionsListboxId:"block-editor-url-input-suggestions-".concat(r),suggestionOptionIdPrefix:"block-editor-url-input-suggestion-".concat(r)}}}]),n}(a.Component),of=Object(b.compose)(b.withSafeTimeout,v.withSpokenMessages,b.withInstanceId,Object(m.withSelect)((function(e,t){if(!Object(d.isFunction)(t.__experimentalFetchLinkSuggestions))return{__experimentalFetchLinkSuggestions:(0,e("core/block-editor").getSettings)().__experimentalFetchLinkSuggestions}})))(rf),cf=function(e){var t,n=e.searchTerm,r=e.onClick,o=e.itemProps,c=e.isSelected,l=e.buttonText;return n?(t=l?Object(d.isFunction)(l)?l(n):l:Object(a.createInterpolateElement)(Object(C.sprintf)(Object(C.__)("Create: %s"),n),{mark:Object(a.createElement)("mark",null)}),Object(a.createElement)(v.Button,Object(i.a)({},o,{className:u()("block-editor-link-control__search-create block-editor-link-control__search-item",{"is-selected":c}),onClick:r}),Object(a.createElement)(Va.a,{className:"block-editor-link-control__search-item-icon",icon:Ra.a}),Object(a.createElement)("span",{className:"block-editor-link-control__search-item-header"},Object(a.createElement)("span",{className:"block-editor-link-control__search-item-title"},t)))):null},lf=Object(a.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(a.createElement)(S.Path,{d:"M9 0C4.03 0 0 4.03 0 9s4.03 9 9 9 9-4.03 9-9-4.03-9-9-9zM1.11 9.68h2.51c.04.91.167 1.814.38 2.7H1.84c-.403-.85-.65-1.764-.73-2.7zm8.57-5.4V1.19c.964.366 1.756 1.08 2.22 2 .205.347.386.708.54 1.08l-2.76.01zm3.22 1.35c.232.883.37 1.788.41 2.7H9.68v-2.7h3.22zM8.32 1.19v3.09H5.56c.154-.372.335-.733.54-1.08.462-.924 1.255-1.64 2.22-2.01zm0 4.44v2.7H4.7c.04-.912.178-1.817.41-2.7h3.21zm-4.7 2.69H1.11c.08-.936.327-1.85.73-2.7H4c-.213.886-.34 1.79-.38 2.7zM4.7 9.68h3.62v2.7H5.11c-.232-.883-.37-1.788-.41-2.7zm3.63 4v3.09c-.964-.366-1.756-1.08-2.22-2-.205-.347-.386-.708-.54-1.08l2.76-.01zm1.35 3.09v-3.04h2.76c-.154.372-.335.733-.54 1.08-.464.92-1.256 1.634-2.22 2v-.04zm0-4.44v-2.7h3.62c-.04.912-.178 1.817-.41 2.7H9.68zm4.71-2.7h2.51c-.08.936-.327 1.85-.73 2.7H14c.21-.87.337-1.757.38-2.65l.01-.05zm0-1.35c-.046-.894-.176-1.78-.39-2.65h2.16c.403.85.65 1.764.73 2.7l-2.5-.05zm1-4H13.6c-.324-.91-.793-1.76-1.39-2.52 1.244.56 2.325 1.426 3.14 2.52h.04zm-9.6-2.52c-.597.76-1.066 1.61-1.39 2.52H2.65c.815-1.094 1.896-1.96 3.14-2.52zm-3.15 12H4.4c.324.91.793 1.76 1.39 2.52-1.248-.567-2.33-1.445-3.14-2.55l-.01.03zm9.56 2.52c.597-.76 1.066-1.61 1.39-2.52h1.76c-.82 1.08-1.9 1.933-3.14 2.48l-.01.04z"})),af=function(e){var t=e.itemProps,n=e.suggestion,r=e.isSelected,o=void 0!==r&&r,c=e.onClick,l=e.isURL,s=void 0!==l&&l,d=e.searchTerm,b=void 0===d?"":d,f=e.shouldShowType,p=void 0!==f&&f;return Object(a.createElement)(v.Button,Object(i.a)({},t,{onClick:c,className:u()("block-editor-link-control__search-item",{"is-selected":o,"is-url":s,"is-entity":!s})}),s&&Object(a.createElement)(Va.a,{className:"block-editor-link-control__search-item-icon",icon:lf}),Object(a.createElement)("span",{className:"block-editor-link-control__search-item-header"},Object(a.createElement)("span",{className:"block-editor-link-control__search-item-title"},Object(a.createElement)(v.TextHighlight,{text:n.title,highlight:b})),Object(a.createElement)("span",{"aria-hidden":!s,className:"block-editor-link-control__search-item-info"},!s&&(Object(gs.filterURLForDisplay)(Object(gs.safeDecodeURI)(n.url))||""),s&&Object(C.__)("Press ENTER to add this link"))),p&&n.type&&Object(a.createElement)("span",{className:"block-editor-link-control__search-item-type"},"post_tag"===n.type?"tag":n.type))};function sf(e){var t=e.instanceId,n=e.withCreateSuggestion,r=e.currentInputValue,o=e.handleSuggestionClick,c=e.suggestionsListProps,l=e.buildSuggestionItemProps,s=e.suggestions,d=e.selectedSuggestion,b=e.isLoading,f=e.isInitialSuggestions,p=e.createSuggestionButtonText,m=e.suggestionsQuery,g=u()("block-editor-link-control__search-results",{"is-loading":b}),O=["url","mailto","tel","internal"],h=1===s.length&&O.includes(s[0].type.toLowerCase()),j=n&&!h&&!f,k=!(null!=m&&m.type),y="block-editor-link-control-search-results-label-".concat(t),_=f?Object(C.__)("Recently updated"):Object(C.sprintf)(Object(C.__)('Search results for "%s"'),r),E=Object(a.createElement)(f?a.Fragment:v.VisuallyHidden,{},Object(a.createElement)("span",{className:"block-editor-link-control__search-results-label",id:y},_));return Object(a.createElement)("div",{className:"block-editor-link-control__search-results-wrapper"},E,Object(a.createElement)("div",Object(i.a)({},c,{className:g,"aria-labelledby":y}),s.map((function(e,t){return j&&"__CREATE__"===e.type?Object(a.createElement)(cf,{searchTerm:r,buttonText:p,onClick:function(){return o(e)},key:e.type,itemProps:l(e,t),isSelected:t===d}):"__CREATE__"===e.type?null:Object(a.createElement)(af,{key:"".concat(e.id,"-").concat(e.type),itemProps:l(e,t),suggestion:e,index:t,onClick:function(){o(e)},isSelected:t===d,isURL:O.includes(e.type.toLowerCase()),searchTerm:r,shouldShowType:k})}))))}function uf(e){var t=Object(d.startsWith)(e,"#");return Object(gs.isURL)(e)||e&&e.includes("www.")||t}function df(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function bf(e){for(var t=1;t=1)&&k(gf(gf({},Object(d.omit)(c,"id","url")),n),n);case 13:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(t){return e.apply(this,arguments)}}();return Object(a.createElement)("form",{onSubmit:function(e){e.preventDefault(),W(G||{url:n})}},Object(a.createElement)(of,{className:l,value:n,onChange:function(e,t){h(e),U(t)},placeholder:null!=u?u:Object(C.__)("Search or type url"),__experimentalRenderSuggestions:_?function(e){return w(gf(gf({},e),{},{instanceId:V,withCreateSuggestion:p,currentInputValue:n,createSuggestionButtonText:L,suggestionsQuery:D,handleSuggestionClick:function(t){e.handleSuggestionClick&&e.handleSuggestionClick(t),W(t)}}))}:null,__experimentalFetchLinkSuggestions:F,__experimentalHandleURLSuggestions:!0,__experimentalShowInitialSuggestions:T,ref:t}),r)})),jf=hf,kf=Object(v.createSlotFill)("BlockEditorLinkControlViewer"),yf=kf.Slot,_f=kf.Fill;function Ef(e){var t=e.value,n=e.onEditClick,r=t&&Object(gs.filterURLForDisplay)(Object(gs.safeDecodeURI)(t.url),16)||"";return Object(a.createElement)("div",{"aria-label":Object(C.__)("Currently selected"),"aria-selected":"true",className:u()("block-editor-link-control__search-item",{"is-current":!0})},Object(a.createElement)("span",{className:"block-editor-link-control__search-item-header"},Object(a.createElement)(v.ExternalLink,{className:"block-editor-link-control__search-item-title",href:t.url},t&&t.title||r),t&&t.title&&Object(a.createElement)("span",{className:"block-editor-link-control__search-item-info"},r)),Object(a.createElement)(v.Button,{isSecondary:!0,onClick:function(){return n()},className:"block-editor-link-control__search-item-action"},Object(C.__)("Edit")),Object(a.createElement)(yf,{fillProps:t}))}var wf=function(e){var t=!1;return{promise:new Promise((function(n,r){e.then((function(e){return t?r({isCanceled:!0}):n(e)}),(function(e){return r(t?{isCanceled:!0}:e)}))})),cancel:function(){t=!0}}};function Cf(e){var t=e.searchInputPlaceholder,n=e.value,r=e.settings,o=e.onChange,c=void 0===o?d.noop:o,i=e.noDirectEntry,l=void 0!==i&&i,s=e.showSuggestions,u=void 0===s||s,b=e.showInitialSuggestions,f=e.forceIsEditingLink,p=e.createSuggestion,m=e.withCreateSuggestion,g=e.inputValue,O=void 0===g?"":g,h=e.suggestionsQuery,j=void 0===h?{}:h,k=e.noURLSuggestion,y=void 0!==k&&k,_=e.createSuggestionButtonText;void 0===m&&p&&(m=!0);var E=Object(a.useRef)(!0),w=Object(a.useRef)(),S=Object(a.useState)(n&&n.url||""),I=Object(Me.a)(S,2),B=I[0],x=I[1],P=O||B,T=Object(a.useState)(void 0!==f?f:!n||!n.url),N=Object(Me.a)(T,2),D=N[0],A=N[1],R=Object(a.useRef)(!1);Object(a.useEffect)((function(){void 0!==f&&f!==D&&A(f)}),[f]),Object(a.useEffect)((function(){if(E.current)E.current=!1;else{if(!w.current.contains(w.current.ownerDocument.activeElement))(ra.focus.focusable.find(w.current)[0]||w.current).focus();R.current=!1}}),[D]);var L=function(e){var t=Object(a.useRef)(),n=Object(a.useState)(!1),r=Object(Me.a)(n,2),o=r[0],c=r[1],i=Object(a.useState)(null),l=Object(Me.a)(i,2),s=l[0],u=l[1],d=function(){var n=Object(ea.a)(ei.a.mark((function n(r){return ei.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return c(!0),u(null),n.prev=2,t.current=wf(Promise.resolve(e(r))),n.next=6,t.current.promise;case 6:return n.abrupt("return",n.sent);case 9:if(n.prev=9,n.t0=n.catch(2),!n.t0||!n.t0.isCanceled){n.next=13;break}return n.abrupt("return");case 13:throw u(n.t0.message||Object(C.__)("An unknown error occurred during creation. Please try again.")),n.t0;case 15:return n.prev=15,c(!1),n.finish(15);case 18:case"end":return n.stop()}}),n,null,[[2,9,15,18]])})));return function(e){return n.apply(this,arguments)}}();return Object(a.useEffect)((function(){return function(){t.current&&t.current.cancel()}}),[]),{createPage:d,isCreatingPage:o,errorMessage:s}}(p),M=L.createPage,F=L.isCreatingPage,V=L.errorMessage;return Object(a.createElement)("div",{tabIndex:-1,ref:w,className:"block-editor-link-control"},F&&Object(a.createElement)("div",{className:"block-editor-link-control__loading"},Object(a.createElement)(v.Spinner,null)," ",Object(C.__)("Creating"),"…"),(D||!n)&&!F&&Object(a.createElement)(a.Fragment,null,Object(a.createElement)("div",{className:"block-editor-link-control__search-input-wrapper"},Object(a.createElement)(jf,{currentLink:n,className:"block-editor-link-control__search-input",placeholder:t,value:P,withCreateSuggestion:m,onCreateSuggestion:M,onChange:x,onSelect:function(e){var t;c(e),R.current=!(null===(t=w.current)||void 0===t||!t.contains(w.current.ownerDocument.activeElement)),A(!1)},showInitialSuggestions:b,allowDirectEntry:!l,showSuggestions:u,suggestionsQuery:j,withURLSuggestion:!y,createSuggestionButtonText:_},Object(a.createElement)("div",{className:"block-editor-link-control__search-actions"},Object(a.createElement)(v.Button,{type:"submit",label:Object(C.__)("Submit"),icon:Yb.a,className:"block-editor-link-control__search-submit"})))),V&&Object(a.createElement)(v.Notice,{className:"block-editor-link-control__search-error",status:"error",isDismissible:!1},V)),n&&!D&&!F&&Object(a.createElement)(Ef,{value:n,onEditClick:function(){return A(!0)}}),Object(a.createElement)(Jb,{value:n,settings:r,onChange:c}))}Cf.ViewerFill=_f;var Sf=Cf,If=n("./node_modules/@wordpress/icons/build-module/library/media.js"),Bf=n("./node_modules/@wordpress/icons/build-module/library/upload.js"),xf=Object(v.withFilters)("editor.MediaUpload")((function(){return null}));var Pf=function(e){var t=e.fallback,n=void 0===t?null:t,r=e.children;return Object(m.useSelect)((function(e){return!!(0,e("core/block-editor").getSettings)().mediaUpload}),[])?r:n},Tf=Object(b.compose)([Object(m.withDispatch)((function(e){var t=e(us.store);return{createNotice:t.createNotice,removeNotice:t.removeNotice}})),Object(v.withFilters)("editor.MediaReplaceFlow")])((function(e){var t=e.mediaURL,n=e.mediaId,r=e.allowedTypes,o=e.accept,c=e.onSelect,i=e.onSelectURL,l=e.onFilesUpload,s=void 0===l?d.noop:l,u=e.name,b=void 0===u?Object(C.__)("Replace"):u,f=e.createNotice,p=e.removeNotice,g=Object(a.useState)(t),O=Object(Me.a)(g,2),h=O[0],j=O[1],k=Object(m.useSelect)((function(e){return e("core/block-editor").getSettings().mediaUpload}),[]),y=Object(a.createRef)(),_=Object(d.uniqueId)("block-editor/media-replace-flow/error-notice/"),E=function(e){var t=document.createElement("div");t.innerHTML=Object(a.renderToString)(e);var n=t.textContent||t.innerText||"";setTimeout((function(){f("error",n,{speak:!0,id:_,isDismissible:!0})}),1e3)},w=function(e){c(e),j(e.url),Object(ot.speak)(Object(C.__)("The media file has been replaced")),p(_)},S=function(e){e.keyCode===Ht.DOWN&&(e.preventDefault(),e.stopPropagation(),e.target.click())};return Object(a.createElement)(v.Dropdown,{popoverProps:{isAlternate:!0},contentClassName:"block-editor-media-replace-flow__options",renderToggle:function(e){var t=e.isOpen,n=e.onToggle;return Object(a.createElement)(v.ToolbarGroup,{className:"media-replace-flow"},Object(a.createElement)(v.ToolbarButton,{ref:y,"aria-expanded":t,"aria-haspopup":"true",onClick:n,onKeyDown:S},b))},renderContent:function(e){e.onClose;return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(v.NavigableMenu,{className:"block-editor-media-replace-flow__media-upload-menu"},Object(a.createElement)(xf,{value:n,onSelect:function(e){return w(e)},allowedTypes:r,render:function(e){var t=e.open;return Object(a.createElement)(v.MenuItem,{icon:If.a,onClick:t},Object(C.__)("Open Media Library"))}}),Object(a.createElement)(Pf,null,Object(a.createElement)(v.FormFileUpload,{onChange:function(e){!function(e){var t=e.target.files;s(t);k({allowedTypes:r,filesList:t,onFileChange:function(e){var t=Object(Me.a)(e,1)[0];w(t)},onError:E})}(e)},accept:o,render:function(e){var t=e.openFileDialog;return Object(a.createElement)(v.MenuItem,{icon:Bf.a,onClick:function(){t()}},Object(C.__)("Upload"))}}))),i&&Object(a.createElement)("form",{className:"block-editor-media-flow__url-input",onKeyDown:function(e){[Ht.TAB,Ht.ESCAPE].includes(e.keyCode)||e.stopPropagation()},onKeyPress:function(e){[Ht.TAB,Ht.ESCAPE].includes(e.keyCode)||e.stopPropagation()}},Object(a.createElement)("span",{className:"block-editor-media-replace-flow__image-url-label"},Object(C.__)("Current media URL:")),Object(a.createElement)(Sf,{value:{url:h},settings:[],showSuggestions:!1,onChange:function(e){var t=e.url;j(t),i(t),y.current.focus()}})))}})})),Nf=n("./node_modules/@wordpress/icons/build-module/library/edit.js");function Df(e){var t=e.url,n=e.urlLabel,r=e.className,o=u()(r,"block-editor-url-popover__link-viewer-url");return t?Object(a.createElement)(v.ExternalLink,{className:o,href:t},n||Object(gs.filterURLForDisplay)(Object(gs.safeDecodeURI)(t))):Object(a.createElement)("span",{className:o})}function Af(e){var t=e.additionalControls,n=e.children,r=e.renderSettings,o=e.position,c=void 0===o?"bottom center":o,l=e.focusOnMount,s=void 0===l?"firstElement":l,u=Object(Fe.a)(e,["additionalControls","children","renderSettings","position","focusOnMount"]),d=Object(a.useState)(!1),b=Object(Me.a)(d,2),f=b[0],p=b[1],m=!!r&&f;return Object(a.createElement)(v.Popover,Object(i.a)({className:"block-editor-url-popover",focusOnMount:s,position:c},u),Object(a.createElement)("div",{className:"block-editor-url-popover__input-container"},Object(a.createElement)("div",{className:"block-editor-url-popover__row"},n,!!r&&Object(a.createElement)(v.Button,{className:"block-editor-url-popover__settings-toggle",icon:ba.a,label:Object(C.__)("Link settings"),onClick:function(){p(!f)},"aria-expanded":f})),m&&Object(a.createElement)("div",{className:"block-editor-url-popover__row block-editor-url-popover__settings"},r())),t&&!m&&Object(a.createElement)("div",{className:"block-editor-url-popover__additional-controls"},t))}Af.LinkEditor=function(e){var t=e.autocompleteRef,n=e.className,r=e.onChangeInputValue,o=e.value,c=Object(Fe.a)(e,["autocompleteRef","className","onChangeInputValue","value"]);return Object(a.createElement)("form",Object(i.a)({className:u()("block-editor-url-popover__link-editor",n)},c),Object(a.createElement)(of,{value:o,onChange:r,autocompleteRef:t}),Object(a.createElement)(v.Button,{icon:Yb.a,label:Object(C.__)("Apply"),type:"submit"}))},Af.LinkViewer=function(e){var t=e.className,n=e.linkClassName,r=e.onEditLinkClick,o=e.url,c=e.urlLabel,l=Object(Fe.a)(e,["className","linkClassName","onEditLinkClick","url","urlLabel"]);return Object(a.createElement)("div",Object(i.a)({className:u()("block-editor-url-popover__link-viewer",t)},l),Object(a.createElement)(Df,{url:o,urlLabel:c,className:n}),r&&Object(a.createElement)(v.Button,{icon:Nf.a,label:Object(C.__)("Edit"),onClick:r}))};var Rf=Af,Lf=function(e){var t=e.src,n=e.onChange,r=e.onSubmit,o=e.onClose;return Object(a.createElement)(Rf,{onClose:o},Object(a.createElement)("form",{className:"block-editor-media-placeholder__url-input-form",onSubmit:r},Object(a.createElement)("input",{className:"block-editor-media-placeholder__url-input-field",type:"url","aria-label":Object(C.__)("URL"),placeholder:Object(C.__)("Paste or type URL"),onChange:n,value:t}),Object(a.createElement)(v.Button,{className:"block-editor-media-placeholder__url-input-submit-button",icon:Yb.a,label:Object(C.__)("Apply"),type:"submit"})))};var Mf=Object(v.withFilters)("editor.MediaPlaceholder")((function(e){var t=e.value,n=void 0===t?{}:t,r=e.allowedTypes,o=e.className,c=e.icon,i=e.labels,l=void 0===i?{}:i,s=e.mediaPreview,b=e.notices,f=e.isAppender,p=e.accept,g=e.addToGallery,O=e.multiple,h=void 0!==O&&O,j=e.dropZoneUIOnly,k=e.disableDropZone,y=e.disableMediaButtons,_=e.onError,E=e.onSelect,w=e.onCancel,S=e.onSelectURL,I=e.onDoubleClick,B=e.onFilesPreUpload,x=void 0===B?d.noop:B,P=e.onHTMLDrop,T=void 0===P?d.noop:P,N=e.children,D=Object(m.useSelect)((function(e){return(0,e("core/block-editor").getSettings)().mediaUpload}),[]),A=Object(a.useState)(""),R=Object(Me.a)(A,2),L=R[0],M=R[1],F=Object(a.useState)(!1),V=Object(Me.a)(F,2),H=V[0],z=V[1];Object(a.useEffect)((function(){var e;M(null!==(e=null==n?void 0:n.src)&&void 0!==e?e:"")}),[null==n?void 0:n.src]);var G=function(e){M(e.target.value)},U=function(){z(!0)},W=function(){z(!1)},K=function(e){e.preventDefault(),L&&S&&(S(L),W())},q=function(e){var t;if(x(e),h)if(g){var o=[];t=function(e){var t=(null!=n?n:[]).filter((function(e){return e.id?!o.some((function(t){var n=t.id;return Number(n)===Number(e.id)})):!o.some((function(t){var n=t.urlSlug;return e.url.includes(n)}))}));E(t.concat(e)),o=e.map((function(e){var t=e.url.lastIndexOf("."),n=e.url.slice(0,t);return{id:e.id,urlSlug:n}}))}}else t=E;else t=function(e){var t=Object(Me.a)(e,1)[0];return E(t)};D({allowedTypes:r,filesList:e,onFileChange:t,onError:_})},$=function(e){q(e.target.files)},Y=function(e,t){var n=l.instructions,i=l.title;if(D||S||(n=Object(C.__)("To edit this block, you need permission to upload media.")),void 0===n||void 0===i){var d=null!=r?r:[],p=Object(Me.a)(d,1)[0],m=1===d.length,g=m&&"audio"===p,O=m&&"image"===p,h=m&&"video"===p;void 0===n&&D&&(n=Object(C.__)("Upload a media file or pick one from your media library."),g?n=Object(C.__)("Upload an audio file, pick one from your media library, or add one with a URL."):O?n=Object(C.__)("Upload an image file, pick one from your media library, or add one with a URL."):h&&(n=Object(C.__)("Upload a video file, pick one from your media library, or add one with a URL."))),void 0===i&&(i=Object(C.__)("Media"),g?i=Object(C.__)("Audio"):O?i=Object(C.__)("Image"):h&&(i=Object(C.__)("Video")))}var j=u()("block-editor-media-placeholder",o,{"is-appender":f});return Object(a.createElement)(v.Placeholder,{icon:c,label:i,instructions:n,className:j,notices:b,onClick:t,onDoubleClick:I,preview:s},e,N)},X=function(){return k?null:Object(a.createElement)(v.DropZone,{onFilesDrop:q,onHTMLDrop:T})},Q=function(){return w&&Object(a.createElement)(v.Button,{className:"block-editor-media-placeholder__cancel-button",title:Object(C.__)("Cancel"),isLink:!0,onClick:w},Object(C.__)("Cancel"))},Z=function(){return S&&Object(a.createElement)("div",{className:"block-editor-media-placeholder__url-input-container"},Object(a.createElement)(v.Button,{className:"block-editor-media-placeholder__button",onClick:U,isPressed:H,isTertiary:!0},Object(C.__)("Insert from URL")),H&&Object(a.createElement)(Lf,{src:L,onChange:G,onSubmit:K,onClose:W}))};return j||y?(j&&Ua()("wp.blockEditor.MediaPlaceholder dropZoneUIOnly prop",{alternative:"disableMediaButtons"}),Object(a.createElement)(Pf,null,X())):Object(a.createElement)(Pf,{fallback:Y(Z())},function(){var e=Object(a.createElement)(xf,{addToGallery:g,gallery:h&&!(!r||0===r.length)&&r.every((function(e){return"image"===e||e.startsWith("image/")})),multiple:h,onSelect:E,allowedTypes:r,value:Array.isArray(n)?n.map((function(e){return e.id})):n.id,render:function(e){var t=e.open;return Object(a.createElement)(v.Button,{isTertiary:!0,onClick:function(e){e.stopPropagation(),t()}},Object(C.__)("Media Library"))}});if(D&&f)return Object(a.createElement)(a.Fragment,null,X(),Object(a.createElement)(v.FormFileUpload,{onChange:$,accept:p,multiple:h,render:function(t){var n=t.openFileDialog,r=Object(a.createElement)(a.Fragment,null,Object(a.createElement)(v.Button,{isPrimary:!0,className:u()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button")},Object(C.__)("Upload")),e,Z(),Q());return Y(r,n)}}));if(D){var t=Object(a.createElement)(a.Fragment,null,X(),Object(a.createElement)(v.FormFileUpload,{isPrimary:!0,className:u()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onChange:$,accept:p,multiple:h},Object(C.__)("Upload")),e,Z(),Q());return Y(t)}return Y(e)}())})),Ff=Object(a.forwardRef)((function(e,t){return Object(a.createElement)(sb,Object(i.a)({ref:t},e,{__unstableDisableFormats:!0,preserveWhiteSpace:!0}))}));Ff.Content=function(e){var t=e.value,n=void 0===t?"":t,r=e.tagName,o=void 0===r?"div":r,c=Object(Fe.a)(e,["value","tagName"]);return Object(a.createElement)(o,c,n)};var Vf=Ff,Hf=Object(a.forwardRef)((function(e,t){var n=e.__experimentalVersion,r=Object(Fe.a)(e,["__experimentalVersion"]);if(2===n)return Object(a.createElement)(Vf,Object(i.a)({ref:t},r));var o=r.className,c=r.onChange,l=Object(Fe.a)(r,["className","onChange"]);return Object(a.createElement)(Na.a,Object(i.a)({ref:t,className:u()("block-editor-plain-text",o),onChange:function(e){return c(e.target.value)}},l))}));function zf(e){var t=e.property,n=e.viewport,r=e.desc,o=Object(b.useInstanceId)(zf),c=r||Object(C.sprintf)(Object(C._x)("Controls the %1$s property for %2$s viewports.","Text labelling a interface as controlling a given layout property (eg: margin) for a given screen size."),t,n.label);return Object(a.createElement)(a.Fragment,null,Object(a.createElement)("span",{"aria-describedby":"rbc-desc-".concat(o)},n.label),Object(a.createElement)(v.VisuallyHidden,{as:"span",id:"rbc-desc-".concat(o)},c))}var Gf=function(e){var t=e.title,n=e.property,r=e.toggleLabel,o=e.onIsResponsiveChange,c=e.renderDefaultControl,i=e.renderResponsiveControls,l=e.isResponsive,s=void 0!==l&&l,d=e.defaultLabel,b=void 0===d?{id:"all",label:Object(C.__)("All")}:d,f=e.viewports,p=void 0===f?[{id:"small",label:Object(C.__)("Small screens")},{id:"medium",label:Object(C.__)("Medium screens")},{id:"large",label:Object(C.__)("Large screens")}]:f;if(!t||!n||!c)return null;var m=r||Object(C.sprintf)(Object(C.__)("Use the same %s on all screensizes."),n),g=Object(C.__)("Toggle between using the same value for all screen sizes or using a unique value per screen size."),O=c(Object(a.createElement)(zf,{property:n,viewport:b}),b);return Object(a.createElement)("fieldset",{className:"block-editor-responsive-block-control"},Object(a.createElement)("legend",{className:"block-editor-responsive-block-control__title"},t),Object(a.createElement)("div",{className:"block-editor-responsive-block-control__inner"},Object(a.createElement)(v.ToggleControl,{className:"block-editor-responsive-block-control__toggle",label:m,checked:!s,onChange:o,help:g}),Object(a.createElement)("div",{className:u()("block-editor-responsive-block-control__group",{"is-responsive":s})},!s&&O,s&&(i?i(p):p.map((function(e){return Object(a.createElement)(a.Fragment,{key:e.id},c(Object(a.createElement)(zf,{property:n,viewport:e}),e))}))))))};function Uf(e){var t=e.character,n=e.type,r=e.onUse;return Object(b.useKeyboardShortcut)(Ht.rawShortcut[n](t),(function(){return r(),!1}),{bindGlobal:!0}),null}function Wf(e){var t,n=e.name,r=e.shortcutType,o=e.shortcutCharacter,c=Object(Fe.a)(e,["name","shortcutType","shortcutCharacter"]),l="RichText.ToolbarControls";return n&&(l+=".".concat(n)),r&&o&&(t=Ht.displayShortcut[r](o)),Object(a.createElement)(v.Fill,{name:l},Object(a.createElement)(v.ToolbarButton,Object(i.a)({},c,{shortcut:t})))}function Kf(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(Hn.a)(e);if(t){var o=Object(Hn.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(Vn.a)(this,n)}}var qf=function(e){Object(Fn.a)(n,e);var t=Kf(n);function n(){var e;return Object(Rn.a)(this,n),(e=t.apply(this,arguments)).onInput=e.onInput.bind(Object(Mn.a)(e)),e}return Object(Ln.a)(n,[{key:"onInput",value:function(e){e.inputType===this.props.inputType&&this.props.onInput()}},{key:"componentDidMount",value:function(){document.addEventListener("input",this.onInput,!0)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("input",this.onInput,!0)}},{key:"render",value:function(){return null}}]),n}(a.Component),$f=Object(a.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(a.createElement)(v.Path,{d:"M9.4 20.5L5.2 3.8l14.6 9-2 .3c-.2 0-.4.1-.7.1-.9.2-1.6.3-2.2.5-.8.3-1.4.5-1.8.8-.4.3-.8.8-1.3 1.5-.4.5-.8 1.2-1.2 2l-.3.6-.9 1.9zM7.6 7.1l2.4 9.3c.2-.4.5-.8.7-1.1.6-.8 1.1-1.4 1.6-1.8.5-.4 1.3-.8 2.2-1.1l1.2-.3-8.1-5z"}));var Yf=Object(a.forwardRef)((function(e,t){var n=Object(m.useSelect)((function(e){return e("core/block-editor").isNavigationMode()}),[]),r=Object(m.useDispatch)("core/block-editor").setNavigationMode,o=function(e){r("edit"!==e)};return Object(a.createElement)(v.Dropdown,{renderToggle:function(r){var o=r.isOpen,c=r.onToggle;return Object(a.createElement)(v.Button,Object(i.a)({},e,{ref:t,icon:n?$f:Nf.a,"aria-expanded":o,"aria-haspopup":"true",onClick:c,label:Object(C.__)("Modes")}))},position:"bottom right",renderContent:function(){return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(v.NavigableMenu,{role:"menu","aria-label":Object(C.__)("Modes")},Object(a.createElement)(v.MenuItemsChoice,{value:n?"select":"edit",onSelect:o,choices:[{value:"edit",label:Object(a.createElement)(a.Fragment,null,Object(a.createElement)(Va.a,{icon:Nf.a}),Object(C.__)("Edit"))},{value:"select",label:Object(a.createElement)(a.Fragment,null,$f,Object(C.__)("Select"))}]})),Object(a.createElement)("div",{className:"block-editor-tool-selector__help"},Object(C.__)("Tools offer different interactions for block selection & editing. To select, press Escape, to go back to editing, press Enter.")))}})})),Xf=n("./node_modules/@wordpress/icons/build-module/library/link.js"),Qf=Object(a.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(S.Path,{d:"M9.737 18.011L3.98 12.255l5.734-6.28 1.107 1.012-4.103 4.494h13.3v1.5H6.828l3.97 3.97-1.06 1.06z"}));function Zf(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(Hn.a)(e);if(t){var o=Object(Hn.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(Vn.a)(this,n)}}var Jf=function(e){Object(Fn.a)(n,e);var t=Zf(n);function n(){var e;return Object(Rn.a)(this,n),(e=t.apply(this,arguments)).toggle=e.toggle.bind(Object(Mn.a)(e)),e.submitLink=e.submitLink.bind(Object(Mn.a)(e)),e.state={expanded:!1},e}return Object(Ln.a)(n,[{key:"toggle",value:function(){this.setState({expanded:!this.state.expanded})}},{key:"submitLink",value:function(e){e.preventDefault(),this.toggle()}},{key:"render",value:function(){var e=this.props,t=e.url,n=e.onChange,r=this.state.expanded,o=t?Object(C.__)("Edit link"):Object(C.__)("Insert link");return Object(a.createElement)("div",{className:"block-editor-url-input__button"},Object(a.createElement)(v.Button,{icon:Xf.a,label:o,onClick:this.toggle,className:"components-toolbar__control",isPressed:!!t}),r&&Object(a.createElement)("form",{className:"block-editor-url-input__button-modal",onSubmit:this.submitLink},Object(a.createElement)("div",{className:"block-editor-url-input__button-modal-line"},Object(a.createElement)(v.Button,{className:"block-editor-url-input__back",icon:Qf,label:Object(C.__)("Close"),onClick:this.toggle}),Object(a.createElement)(of,{value:t||"",onChange:n}),Object(a.createElement)(v.Button,{icon:Yb.a,label:Object(C.__)("Submit"),type:"submit"}))))}}]),n}(a.Component),ep=n("./node_modules/@wordpress/icons/build-module/library/close.js"),tp=["noreferrer","noopener"],np=Object(a.createElement)(v.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(a.createElement)(v.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),Object(a.createElement)(v.Path,{d:"m19 5v14h-14v-14h14m0-2h-14c-1.1 0-2 0.9-2 2v14c0 1.1 0.9 2 2 2h14c1.1 0 2-0.9 2-2v-14c0-1.1-0.9-2-2-2z"}),Object(a.createElement)(v.Path,{d:"m14.14 11.86l-3 3.87-2.14-2.59-3 3.86h12l-3.86-5.14z"})),rp=function(e){var t=e.linkDestination,n=e.onChangeUrl,r=e.url,o=e.mediaType,c=void 0===o?"image":o,i=e.mediaUrl,l=e.mediaLink,s=e.linkTarget,u=e.linkClass,b=e.rel,f=Object(a.useState)(!1),p=Object(Me.a)(f,2),m=p[0],g=p[1],O=Object(a.useCallback)((function(){g(!0)})),h=Object(a.useState)(!1),j=Object(Me.a)(h,2),k=j[0],y=j[1],_=Object(a.useState)(null),E=Object(Me.a)(_,2),w=E[0],S=E[1],I=Object(a.useRef)(null),B=Object(a.useCallback)((function(){"media"!==t&&"attachment"!==t||S(""),y(!0)})),x=Object(a.useCallback)((function(){y(!1)})),P=Object(a.useCallback)((function(){S(null),x(),g(!1)})),T=function(e){var t=e;return void 0===e||Object(d.isEmpty)(t)||Object(d.isEmpty)(t)||(Object(d.each)(tp,(function(e){var n=new RegExp("\\b"+e+"\\b","gi");t=t.replace(n,"")})),t!==e&&(t=t.trim()),Object(d.isEmpty)(t)&&(t=void 0)),t},N=Object(a.useCallback)((function(){return function(e){var t=I.current;t&&t.contains(e.target)||(g(!1),S(null),x())}})),D=Object(a.useCallback)((function(){return function(e){if(w){var t,r=(null===(t=R().find((function(e){return e.url===w})))||void 0===t?void 0:t.linkDestination)||"custom";n({href:w,linkDestination:r})}x(),S(null),e.preventDefault()}})),A=Object(a.useCallback)((function(){n({linkDestination:"none",href:""})})),R=function(){var e=[{linkDestination:"media",title:Object(C.__)("Media File"),url:"image"===c?i:void 0,icon:np}];return"image"===c&&l&&e.push({linkDestination:"attachment",title:Object(C.__)("Attachment Page"),url:"image"===c?l:void 0,icon:Object(a.createElement)(v.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(a.createElement)(v.Path,{d:"M0 0h24v24H0V0z",fill:"none"}),Object(a.createElement)(v.Path,{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zM6 20V4h7v5h5v11H6z"}))}),e},L=Object(a.createElement)(a.Fragment,null,Object(a.createElement)(v.ToggleControl,{label:Object(C.__)("Open in new tab"),onChange:function(e){var t=function(e){var t=e?"_blank":void 0;return{linkTarget:t,rel:t||b?T(b):void 0}}(e);n(t)},checked:"_blank"===s}),Object(a.createElement)(v.TextControl,{label:Object(C.__)("Link Rel"),value:T(b)||"",onChange:function(e){n({rel:e})}}),Object(a.createElement)(v.TextControl,{label:Object(C.__)("Link CSS Class"),value:u||"",onChange:function(e){n({linkClass:e})}})),M=null!==w?w:r,F=(Object(d.find)(R(),["linkDestination",t])||{}).title;return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(v.ToolbarButton,{icon:Xf.a,className:"components-toolbar__control",label:r?Object(C.__)("Edit link"):Object(C.__)("Insert link"),"aria-expanded":m,onClick:O}),m&&Object(a.createElement)(Rf,{onFocusOutside:N(),onClose:P,renderSettings:function(){return L},additionalControls:!M&&Object(a.createElement)(v.NavigableMenu,null,Object(d.map)(R(),(function(e){return Object(a.createElement)(v.MenuItem,{key:e.linkDestination,icon:e.icon,onClick:function(){var t,r,o;S(null),t=e.url,o=R(),r=t?(Object(d.find)(o,(function(e){return e.url===t}))||{linkDestination:"custom"}).linkDestination:"none",n({linkDestination:r,href:t}),x()}},e.title)})))},(!r||k)&&Object(a.createElement)(Rf.LinkEditor,{className:"block-editor-format-toolbar__link-container-content",value:M,onChangeInputValue:S,onSubmit:D(),autocompleteRef:I}),r&&!k&&Object(a.createElement)(a.Fragment,null,Object(a.createElement)(Rf.LinkViewer,{className:"block-editor-format-toolbar__link-container-content",url:r,onEditLinkClick:B,urlLabel:F}),Object(a.createElement)(v.Button,{icon:ep.a,label:Object(C.__)("Remove link"),onClick:A}))))},op=n("./node_modules/@wordpress/icons/build-module/library/check.js");function cp(e){var t=e.children,n=e.className,r=e.isEnabled,o=void 0===r||r,c=e.deviceType,i=e.setDeviceType;if(Object(b.useViewportMatch)("small","<"))return null;var l={className:u()(n,"block-editor-post-preview__dropdown-content"),position:"bottom left"},s={isTertiary:!0,className:"block-editor-post-preview__button-toggle",disabled:!o,children:Object(C.__)("Preview")};return Object(a.createElement)(v.DropdownMenu,{className:"block-editor-post-preview__dropdown",popoverProps:l,toggleProps:s,icon:null},(function(){return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(v.MenuGroup,null,Object(a.createElement)(v.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:function(){return i("Desktop")},icon:"Desktop"===c&&op.a},Object(C.__)("Desktop")),Object(a.createElement)(v.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:function(){return i("Tablet")},icon:"Tablet"===c&&op.a},Object(C.__)("Tablet")),Object(a.createElement)(v.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:function(){return i("Mobile")},icon:"Mobile"===c&&op.a},Object(C.__)("Mobile"))),t)}))}var ip=n("./node_modules/css-mediaquery/index.js"),lp=/\((min|max)-width:[^\(]*?\)/g;function ap(e){return!!e.media&&!!e.media.mediaText.match(lp)}function sp(e,t,n){e.deleteRule(n),e.insertRule(t,n)}function up(e,t){return e.replace(lp,(function(e){return Object(ip.match)(e,{type:"screen",width:t})?"(min-width:0px)":"(min-width:999999px)"}))}function dp(e,t){Object(a.useEffect)((function(){if(t){var n,r,o,c="undefined"==typeof window?[]:Object(d.filter)(null!==(n=null===(r=window)||void 0===r||null===(o=r.document)||void 0===o?void 0:o.styleSheets)&&void 0!==n?n:[],(function(e){return!!e.href&&Object(gs.getProtocol)(e.href)===window.location.protocol&&Object(gs.getAuthority)(e.href)===window.location.host})),i=[];return c.forEach((function(n,r){for(var o=!1,c=0;c0,selectedBlockName:l,selectedBlockClientId:i,blockType:a}}))((function(e){var t=e.blockType,n=e.count,r=e.hasBlockStyles,o=e.selectedBlockClientId,c=e.selectedBlockName,i=e.showNoBlockSelectedMessage,l=void 0===i||i,s=e.bubblesVirtually,u=void 0===s||s;if(n>1)return Object(a.createElement)("div",{className:"block-editor-block-inspector"},Object(a.createElement)(mp,null),Object(a.createElement)(ce.Slot,{bubblesVirtually:u}));var d=c===Object(p.getUnregisteredTypeHandlerName)();return t&&o&&!d?Object(a.createElement)(gp,{clientId:o,blockName:t.name,hasBlockStyles:r,bubblesVirtually:u}):l?Object(a.createElement)("span",{className:"block-editor-block-inspector__no-blocks"},Object(C.__)("No block selected.")):null})),jp=["p","div","h1","h2","h3","h4","h5","h6","ol","ul","li","figure","nav","pre","header","section","aside","footer","main"];function kp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function yp(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:[];return function(n){return"rule"===n.type?qp(qp({},n),{},{selectors:n.selectors.map((function(n){return t.includes(n.trim())?n:n.match($p)?n.replace(/^(body|html|:root)/,e):e+" "+n}))}):n}},Xp=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Object(d.map)(e,(function(e){var n=e.css,r=e.baseURL,o=e.__experimentalNoWrapper,c=[];return t&&!(void 0!==o&&o)&&c.push(Yp(t)),r&&c.push(Wp(r)),c.length?Vp(n,Object(b.compose)(c)):n}))};function Qp(e){var t=Object(a.useRef)([]);return Object(a.useCallback)((function(n){if(n){var r=Xp(e,".editor-styles-wrapper"),o=n.ownerDocument;t.current=Object(d.map)(Object(d.compact)(r),(function(e){var t=o.createElement("style");return t.innerHTML=e,o.body.appendChild(t),t})),function(e){var t=window.getComputedStyle(e,null).getPropertyValue("background-color"),n=e.ownerDocument.getElementsByTagName("body")[0];Ie()(t).getLuminance()>.5?n.classList.remove("is-dark-theme"):n.classList.add("is-dark-theme")}(n)}else t.current.forEach((function(e){return e.ownerDocument.body.removeChild(e)}))}),[e])}var Zp=function(e){var t=e.rootClientId,n=e.clientId,r=e.isAppender,o=e.showInserterHelpPanel,c=e.showMostUsedBlocks,i=void 0!==c&&c,l=e.__experimentalSelectBlockOnInsert,s=e.__experimentalInsertionIndex,u=e.onSelect,b=void 0===u?d.noop:u,f=Object(m.useSelect)((function(e){var r=e("core/block-editor").getBlockRootClientId;return t||r(n)||void 0}),[n,t]);return Object(a.createElement)(Ps,{onSelect:b,rootClientId:f,clientId:n,isAppender:r,showInserterHelpPanel:o,showMostUsedBlocks:i,__experimentalSelectBlockOnInsert:l,__experimentalInsertionIndex:s})};function Jp(){var e=Object(m.useSelect)((function(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientIds,r=t.getBlockOrder,o=t.getBlockRootClientId,c=n(),i=Object(Me.a)(c,1)[0];return{clientIds:c,rootBlocksClientIds:r(),rootClientId:o(i)}}),[]),t=e.clientIds,n=e.rootBlocksClientIds,r=e.rootClientId,o=Object(m.useDispatch)("core/block-editor"),c=o.duplicateBlocks,i=o.removeBlocks,l=o.insertAfterBlock,s=o.insertBeforeBlock,u=o.multiSelect,b=o.clearSelectedBlock,f=o.moveBlocksUp,p=o.moveBlocksDown;return Object(Jl.useShortcut)("core/block-editor/move-up",Object(a.useCallback)((function(e){e.preventDefault(),f(t,r)}),[t,f]),{bindGlobal:!0,isDisabled:0===t.length}),Object(Jl.useShortcut)("core/block-editor/move-down",Object(a.useCallback)((function(e){e.preventDefault(),p(t,r)}),[t,p]),{bindGlobal:!0,isDisabled:0===t.length}),Object(Jl.useShortcut)("core/block-editor/duplicate",Object(a.useCallback)((function(e){e.preventDefault(),c(t)}),[t,c]),{bindGlobal:!0,isDisabled:0===t.length}),Object(Jl.useShortcut)("core/block-editor/remove",Object(a.useCallback)((function(e){e.preventDefault(),i(t)}),[t,i]),{bindGlobal:!0,isDisabled:0===t.length}),Object(Jl.useShortcut)("core/block-editor/insert-after",Object(a.useCallback)((function(e){e.preventDefault(),l(Object(d.last)(t))}),[t,l]),{bindGlobal:!0,isDisabled:0===t.length}),Object(Jl.useShortcut)("core/block-editor/insert-before",Object(a.useCallback)((function(e){e.preventDefault(),s(Object(d.first)(t))}),[t,s]),{bindGlobal:!0,isDisabled:0===t.length}),Object(Jl.useShortcut)("core/block-editor/delete-multi-selection",Object(a.useCallback)((function(e){e.preventDefault(),i(t)}),[t,i]),{isDisabled:t.length<2}),Object(Jl.useShortcut)("core/block-editor/select-all",Object(a.useCallback)((function(e){e.preventDefault(),u(Object(d.first)(n),Object(d.last)(n))}),[n,u])),Object(Jl.useShortcut)("core/block-editor/unselect",Object(a.useCallback)((function(e){e.preventDefault(),b(),e.target.ownerDocument.defaultView.getSelection().removeAllRanges()}),[t,b]),{isDisabled:t.length<2}),null}Jp.Register=function(){var e=Object(m.useDispatch)(Jl.store).registerShortcut;return Object(a.useEffect)((function(){e({name:"core/block-editor/duplicate",category:"block",description:Object(C.__)("Duplicate the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"d"}}),e({name:"core/block-editor/remove",category:"block",description:Object(C.__)("Remove the selected block(s)."),keyCombination:{modifier:"access",character:"z"}}),e({name:"core/block-editor/insert-before",category:"block",description:Object(C.__)("Insert a new block before the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"t"}}),e({name:"core/block-editor/insert-after",category:"block",description:Object(C.__)("Insert a new block after the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"y"}}),e({name:"core/block-editor/delete-multi-selection",category:"block",description:Object(C.__)("Remove multiple selected blocks."),keyCombination:{character:"del"},aliases:[{character:"backspace"}]}),e({name:"core/block-editor/select-all",category:"selection",description:Object(C.__)("Select all text when typing. Press again to select all blocks."),keyCombination:{modifier:"primary",character:"a"}}),e({name:"core/block-editor/unselect",category:"selection",description:Object(C.__)("Clear selection."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/focus-toolbar",category:"global",description:Object(C.__)("Navigate to the nearest toolbar."),keyCombination:{modifier:"alt",character:"F10"}}),e({name:"core/block-editor/move-up",category:"block",description:Object(C.__)("Move the selected block(s) up."),keyCombination:{modifier:"secondary",character:"t"}}),e({name:"core/block-editor/move-down",category:"block",description:Object(C.__)("Move the selected block(s) down."),keyCombination:{modifier:"secondary",character:"y"}})}),[e]),null};var em=Jp;function tm(e){var t=Object(m.useSelect)((function(e){var t=e("core/block-editor"),n=t.getBlockSelectionEnd,r=t.hasMultiSelection,o=t.isMultiSelecting,c=n();if(c&&!o()&&r())return c}),[]);Object(a.useEffect)((function(){if(t){var n=e.current.ownerDocument,r=lt(t,n);if(r){var o=Object(ra.getScrollContainer)(r);o&&tf()(r,o,{onlyScrollIfNeeded:!0})}}}),[t])}function nm(){var e=Object(a.useRef)();return tm(e),Object(a.createElement)("div",{ref:e})}var rm=new Set([Ht.UP,Ht.RIGHT,Ht.DOWN,Ht.LEFT,Ht.ENTER,Ht.BACKSPACE]);function om(e){var t=Object(m.useSelect)((function(e){return e("core/block-editor").isTyping()})),n=Object(m.useDispatch)("core/block-editor").stopTyping;Object(a.useEffect)((function(){if(t){var r,o,c=e.current.ownerDocument;return c.addEventListener("mousemove",i),function(){c.removeEventListener("mousemove",i)}}function i(e){var t=e.clientX,c=e.clientY;r&&o&&(r!==t||o!==c)&&n(),r=t,o=c}}),[t,n])}function cm(e){var t=Object(m.useSelect)((function(e){return e("core/block-editor").isTyping()})),n=Object(m.useDispatch)("core/block-editor"),r=n.startTyping,o=n.stopTyping;om(e),Object(a.useEffect)((function(){var n=e.current,c=n.ownerDocument,i=c.defaultView;if(t){var l;function a(e){var t=e.target;l=i.setTimeout((function(){Object(ra.isTextField)(t)||o()}))}function s(e){var t=e.keyCode;t!==Ht.ESCAPE&&t!==Ht.TAB||o()}function u(){var e=i.getSelection();e.rangeCount>0&&e.getRangeAt(0).collapsed||o()}return n.addEventListener("focus",a),n.addEventListener("keydown",s),c.addEventListener("selectionchange",u),function(){i.clearTimeout(l),n.removeEventListener("focus",a),n.removeEventListener("keydown",s),c.removeEventListener("selectionchange",u)}}function d(e){var t=e.type,o=e.target;Object(ra.isTextField)(o)&&n.contains(o)&&("keydown"!==t||function(e){var t=e.keyCode;return!e.shiftKey&&rm.has(t)}(e))&&r()}return n.addEventListener("keypress",d),n.addEventListener("keydown",d),function(){n.removeEventListener("keypress",d),n.removeEventListener("keydown",d)}}),[t,r,o])}var im=function(e){var t=e.children,n=Object(a.useRef)();return cm(n),Object(a.createElement)("div",{ref:n},t)};function lm(){return Ua()("PreserveScrollInReorder component",{hint:"This behavior is now built-in the block list"}),null}var am=-1!==window.navigator.userAgent.indexOf("Trident"),sm=new Set([Ht.UP,Ht.DOWN,Ht.LEFT,Ht.RIGHT]);function um(e){var t=Object(m.useSelect)((function(e){return e("core/block-editor").hasSelectedBlock()}));Object(a.useEffect)((function(){if(t){var n,r,o,c=e.current.ownerDocument,i=c.defaultView;return i.addEventListener("scroll",l,!0),i.addEventListener("resize",l,!0),e.current.addEventListener("keydown",a),e.current.addEventListener("keyup",s),e.current.addEventListener("mousedown",u),e.current.addEventListener("touchstart",u),function(){i.removeEventListener("scroll",l,!0),i.removeEventListener("resize",l,!0),e.current.removeEventListener("keydown",a),e.current.removeEventListener("keyup",s),e.current.removeEventListener("mousedown",u),e.current.removeEventListener("touchstart",u),c.removeEventListener("selectionchange",d),i.cancelAnimationFrame(n),i.cancelAnimationFrame(r)}}function l(){n||(n=i.requestAnimationFrame((function(){b(),n=null})))}function a(e){r&&i.cancelAnimationFrame(r),r=i.requestAnimationFrame((function(){s(e),r=null}))}function s(t){var n=t.keyCode;if(f()){var r=Object(ra.computeCaretRect)(i);if(r)if(o)if(sm.has(n))o=r;else{var l=r.top-o.top;if(0!==l){var a=Object(ra.getScrollContainer)(e.current);if(a){var s=a===c.body,u=s?i.scrollY:a.scrollTop,d=s?0:a.getBoundingClientRect().top,b=s?o.top/i.innerHeight:(o.top-d)/(i.innerHeight-d);if(0===u&&b<.75&&(p=e.current.querySelectorAll('[contenteditable="true"]'))[p.length-1]===c.activeElement)o=r;else{var p,m=s?i.innerHeight:a.clientHeight;o.top+o.height>d+m||o.top=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,i=!0,l=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){l=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw c}}}}function vm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);nbody{margin:0}"+t}(r,o),gm(r),t=r,Array.from(document.styleSheets).forEach((function(e){try{e.cssRules}catch(e){return}var n=e.ownerNode,r=e.cssRules;r&&Array.from(r).find((function(e){var t=e.selectorText;return t&&(t.includes(".".concat("editor-styles-wrapper"))||t.includes(".".concat("wp-block")))}))&&!t.getElementById(n.id)&&t.head.appendChild(n.cloneNode(!0))})),function(e){var t=e.defaultView,n=t.frameElement;function r(e){var r=Object.getPrototypeOf(e).constructor.name,o=window[r],c={};for(var i in e)c[i]=e[i];if(e instanceof t.MouseEvent){var l=n.getBoundingClientRect();c.clientX+=l.left,c.clientY+=l.top}var a=new o(e.type,c);!n.dispatchEvent(a)&&e.preventDefault()}for(var o=0,c=["keydown","keypress","dragover"];o-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))}}),c=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){c=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}function i(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!o.has(e)){var t,n=null,r=null,i=null,l=function(){e.clientWidth!==r&&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"===(t=window.getComputedStyle(e,null)).resize?e.style.resize="none":"both"===t.resize&&(e.style.resize="horizontal"),n="content-box"===t.boxSizing?-(parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)):parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth),isNaN(n)&&(n=0),d()}function s(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 t=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+n+"px",r=e.clientWidth,t.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),r="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):e.offsetHeight;if(r=o;case"max":return c<=o;default:return c===o}}));return o&&!n||!o&&n}))},t.parse=a;var r=/(?:(only|not)?\s*([^\s\(\)]+)(?:\s*and)?\s*)?(.+)?/i,o=/\(\s*([^\s\:\)]+)\s*(?:\:\s*([^\s\)]+))?\s*\)/,c=/^(?:(min|max)-)?(.+)/,i=/(em|rem|px|cm|mm|in|pt|pc)?$/,l=/(dpi|dpcm|dppx)?$/;function a(e){return e.split(",").map((function(e){var t=(e=e.trim()).match(r),n=t[1],i=t[2],l=t[3]||"",a={};return a.inverse=!!n&&"not"===n.toLowerCase(),a.type=i?i.toLowerCase():"all",l=l.match(/\([^\)]+\)/g)||[],a.expressions=l.map((function(e){var t=e.match(o),n=t[1].toLowerCase().match(c);return{modifier:n[1],feature:n[2],value:t[2]}})),a}))}function s(e){var t,n=Number(e);return n||(n=(t=e.match(/^(\d+)\s*\/\s*(\d+)$/))[1]/t[2]),n}function u(e){var t=parseFloat(e);switch(String(e).match(l)[1]){case"dpcm":return t/2.54;case"dppx":return 96*t;default:return t}}function d(e){var t=parseFloat(e);switch(String(e).match(i)[1]){case"em":case"rem":return 16*t;case"cm":return 96*t/2.54;case"mm":return 96*t/2.54/10;case"in":return 96*t;case"pt":return 72*t;case"pc":return 72*t/12;default:return t}}},"./node_modules/diff/lib/diff/base.js":function(e,t,n){"use strict";function r(){}function o(e,t,n,r,o){for(var c=0,i=t.length,l=0,a=0;ce.length?n:e})),s.value=e.join(d)}else s.value=e.join(n.slice(l,l+s.count));l+=s.count,s.added||(a+=s.count)}}var b=t[i-1];return i>1&&"string"==typeof b.value&&(b.added||b.removed)&&e.equals("",b.value)&&(t[i-2].value+=b.value,t.pop()),t}function c(e){return{newPos:e.newPos,components:e.components.slice(0)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r,r.prototype={diff:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.callback;"function"==typeof n&&(r=n,n={}),this.options=n;var i=this;function l(e){return r?(setTimeout((function(){r(void 0,e)}),0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e));var a=(t=this.removeEmpty(this.tokenize(t))).length,s=e.length,u=1,d=a+s,b=[{newPos:-1,components:[]}],f=this.extractCommon(b[0],t,e,0);if(b[0].newPos+1>=a&&f+1>=s)return l([{value:this.join(t),count:t.length}]);function p(){for(var n=-1*u;n<=u;n+=2){var r=void 0,d=b[n-1],f=b[n+1],p=(f?f.newPos:0)-n;d&&(b[n-1]=void 0);var m=d&&d.newPos+1=a&&p+1>=s)return l(o(i,r.components,t,e,i.useLongestToken));b[n]=r}else b[n]=void 0}u++}if(r)!function e(){setTimeout((function(){if(u>d)return r();p()||e()}),0)}();else for(;u<=d;){var m=p();if(m)return m}},pushComponent:function(e,t,n){var r=e[e.length-1];r&&r.added===t&&r.removed===n?e[e.length-1]={count:r.count+1,added:t,removed:n}:e.push({count:1,added:t,removed:n})},extractCommon:function(e,t,n,r){for(var o=t.length,c=n.length,i=e.newPos,l=i-r,a=0;i+10?!0===i?r.scrollTop(t,h.top+j.top):!1===i?r.scrollTop(t,h.top+k.top):j.top<0?r.scrollTop(t,h.top+j.top):r.scrollTop(t,h.top+k.top):c||((i=void 0===i||!!i)?r.scrollTop(t,h.top+j.top):r.scrollTop(t,h.top+k.top)),o&&(j.left<0||k.left>0?!0===l?r.scrollLeft(t,h.left+j.left):!1===l?r.scrollLeft(t,h.left+k.left):j.left<0?r.scrollLeft(t,h.left+j.left):r.scrollLeft(t,h.left+k.left):c||((l=void 0===l||!!l)?r.scrollLeft(t,h.left+j.left):r.scrollLeft(t,h.left+k.left)))}},"./node_modules/dom-scroll-into-view/lib/index.js":function(e,t,n){"use strict";e.exports=n("./node_modules/dom-scroll-into-view/lib/dom-scroll-into-view.js")},"./node_modules/dom-scroll-into-view/lib/util.js":function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t=1;t1?t-1:0),r=1;r=n.length)break;c=n[o++]}else{if((o=n.next()).done)break;c=o.value}for(var i=c,l=!1,a=0;a=f.startTime+s.duration;else if(s.decay)v=p+h/(1-.998)*(1-Math.exp(-(1-.998)*(t-f.startTime))),(u=Math.abs(f.lastPosition-v)<.1)&&(m=v);else{d=void 0!==f.lastTime?f.lastTime:t,h=void 0!==f.lastVelocity?f.lastVelocity:s.initialVelocity,t>d+64&&(d=t);for(var j=Math.floor(t-d),k=0;km:v=e);++n);return n-1}(e,c);return function(e,t,n,r,o,c,i,l,a){var s=a?a(e):e;if(sn){if("identity"===l)return s;"clamp"===l&&(s=n)}if(r===o)return r;if(t===n)return e<=t?r:o;t===-1/0?s=-s:n===1/0?s-=t:s=(s-t)/(n-t);s=c(s),r===-1/0?s=-s:o===1/0?s+=r:s=s*(o-r)+r;return s}(e,c[t],c[t+1],o[t],o[t+1],a,i,l,r.map)}}var V=function(e){function t(n,r,o,c){var i;return(i=e.call(this)||this).calc=void 0,i.payload=n instanceof h&&!(n instanceof t)?n.getPayload():Array.isArray(n)?n:[n],i.calc=F(r,o,c),i}a(t,e);var n=t.prototype;return n.getValue=function(){return this.calc.apply(this,this.payload.map((function(e){return e.getValue()})))},n.updateConfig=function(e,t,n){this.calc=F(e,t,n)},n.interpolate=function(e,n,r){return new t(this,e,n,r)},t}(h);var H=function(e){function t(t){var n;return(n=e.call(this)||this).animatedStyles=new Set,n.value=void 0,n.startPosition=void 0,n.lastPosition=void 0,n.lastVelocity=void 0,n.startTime=void 0,n.lastTime=void 0,n.done=!1,n.setValue=function(e,t){void 0===t&&(t=!0),n.value=e,t&&n.flush()},n.value=t,n.startPosition=t,n.lastPosition=t,n}a(t,e);var n=t.prototype;return n.flush=function(){0===this.animatedStyles.size&&function e(t,n){"update"in t?n.add(t):t.getChildren().forEach((function(t){return e(t,n)}))}(this,this.animatedStyles),this.animatedStyles.forEach((function(e){return e.update()}))},n.clearStyles=function(){this.animatedStyles.clear()},n.getValue=function(){return this.value},n.interpolate=function(e,t,n){return new V(this,e,t,n)},t}(O),z=function(e){function t(t){var n;return(n=e.call(this)||this).payload=t.map((function(e){return new H(e)})),n}a(t,e);var n=t.prototype;return n.setValue=function(e,t){var n=this;void 0===t&&(t=!0),Array.isArray(e)?e.length===this.payload.length&&e.forEach((function(e,r){return n.payload[r].setValue(e,t)})):this.payload.forEach((function(n){return n.setValue(e,t)}))},n.getValue=function(){return this.payload.map((function(e){return e.getValue()}))},n.interpolate=function(e,t){return new V(this,e,t)},t}(h),G=0,U=function(){function e(){var e=this;this.id=void 0,this.idle=!0,this.hasChanged=!1,this.guid=0,this.local=0,this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.listeners=[],this.queue=[],this.localQueue=void 0,this.getValues=function(){return e.interpolations},this.id=G++}var t=e.prototype;return t.update=function(e){if(!e)return this;var t=m(e),n=t.delay,r=void 0===n?0:n,i=t.to,l=c(t,["delay","to"]);if(u.arr(i)||u.fun(i))this.queue.push(o({},l,{delay:r,to:i}));else if(i){var a={};Object.entries(i).forEach((function(e){var t,n=e[0],c=e[1],i=o({to:(t={},t[n]=c,t),delay:p(r,n)},l),s=a[i.delay]&&a[i.delay].to;a[i.delay]=o({},a[i.delay],i,{to:o({},s,i.to)})})),this.queue=Object.values(a)}return this.queue=this.queue.sort((function(e,t){return e.delay-t.delay})),this.diff(l),this},t.start=function(e){var t,n=this;if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach((function(e){var t=e.from,r=void 0===t?{}:t,c=e.to,i=void 0===c?{}:c;u.obj(r)&&(n.merged=o({},r,n.merged)),u.obj(i)&&(n.merged=o({},n.merged,i))}));var r=this.local=++this.guid,i=this.localQueue=this.queue;this.queue=[],i.forEach((function(t,o){var l=t.delay,a=c(t,["delay"]),s=function(t){o===i.length-1&&r===n.guid&&t&&(n.idle=!0,n.props.onRest&&n.props.onRest(n.merged)),e&&e()},d=u.arr(a.to)||u.fun(a.to);l?setTimeout((function(){r===n.guid&&(d?n.runAsync(a,s):n.diff(a).start(s))}),l):d?n.runAsync(a,s):n.diff(a).start(s)}))}else u.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),t=this,L.has(t)||L.add(t),R||(R=!0,E(P||M));return this},t.stop=function(e){return this.listeners.forEach((function(t){return t(e)})),this.listeners=[],this},t.pause=function(e){var t;return this.stop(!0),e&&(t=this,L.has(t)&&L.delete(t)),this},t.runAsync=function(e,t){var n=this,r=(e.delay,c(e,["delay"])),i=this.local,l=Promise.resolve(void 0);if(u.arr(r.to))for(var a=function(e){var t=e,c=o({},r,m(r.to[t]));u.arr(c.config)&&(c.config=c.config[t]),l=l.then((function(){if(i===n.guid)return new Promise((function(e){return n.diff(c).start(e)}))}))},s=0;s=r.length)return"break";i=r[c++]}else{if((c=r.next()).done)return"break";i=c.value}var n=i.key,l=function(e){return e.key!==n};(u.und(t)||t===n)&&(e.current.instances.delete(n),e.current.transitions=e.current.transitions.filter(l),e.current.deleted=e.current.deleted.filter(l))},r=e.current.deleted,o=Array.isArray(r),c=0;for(r=o?r:r[Symbol.iterator]();;){var i;if("break"===n())break}e.current.forceUpdate()}var X=function(e){function t(t){var n;return void 0===t&&(t={}),n=e.call(this)||this,!t.transform||t.transform instanceof O||(t=v.transform(t)),n.payload=t,n}return a(t,e),t}(j),Q={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},Z="[-+]?\\d*\\.?\\d+";function J(){for(var e=arguments.length,t=new Array(e),n=0;n1&&(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 se(e,t,n){var r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,c=ae(o,r,e+1/3),i=ae(o,r,e),l=ae(o,r,e-1/3);return Math.round(255*c)<<24|Math.round(255*i)<<16|Math.round(255*l)<<8}function ue(e){var t=parseInt(e,10);return t<0?0:t>255?255:t}function de(e){return(parseFloat(e)%360+360)%360/360}function be(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function fe(e){var t=parseFloat(e);return t<0?0:t>100?1:t/100}function pe(e){var t,n,r="number"==typeof(t=e)?t>>>0===t&&t>=0&&t<=4294967295?t:null:(n=ie.exec(t))?parseInt(n[1]+"ff",16)>>>0:Q.hasOwnProperty(t)?Q[t]:(n=ee.exec(t))?(ue(n[1])<<24|ue(n[2])<<16|ue(n[3])<<8|255)>>>0:(n=te.exec(t))?(ue(n[1])<<24|ue(n[2])<<16|ue(n[3])<<8|be(n[4]))>>>0:(n=oe.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+"ff",16)>>>0:(n=le.exec(t))?parseInt(n[1],16)>>>0:(n=ce.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+n[4]+n[4],16)>>>0:(n=ne.exec(t))?(255|se(de(n[1]),fe(n[2]),fe(n[3])))>>>0:(n=re.exec(t))?(se(de(n[1]),fe(n[2]),fe(n[3]))|be(n[4]))>>>0:null;return null===r?e:"rgba("+((4278190080&(r=r||0))>>>24)+", "+((16711680&r)>>>16)+", "+((65280&r)>>>8)+", "+(255&r)/255+")"}var me=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,ve=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,ge=new RegExp("("+Object.keys(Q).join("|")+")","g"),Oe={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},he=["Webkit","Ms","Moz","O"];function je(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||Oe.hasOwnProperty(e)&&Oe[e]?(""+t).trim():t+"px"}Oe=Object.keys(Oe).reduce((function(e,t){return he.forEach((function(n){return e[function(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}(n,t)]=e[t]})),e}),Oe);var ke={};N((function(e){return new X(e)})),B("div"),C((function(e){var t=e.output.map((function(e){return e.replace(ve,pe)})).map((function(e){return e.replace(ge,pe)})),n=t[0].match(me).map((function(){return[]}));t.forEach((function(e){e.match(me).forEach((function(e,t){return n[t].push(+e)}))}));var r=t[0].match(me).map((function(t,r){return F(o({},e,{output:n[r]}))}));return function(e){var n=0;return t[0].replace(me,(function(){return r[n++](e)})).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,(function(e,t,n,r,o){return"rgba("+Math.round(t)+", "+Math.round(n)+", "+Math.round(r)+", "+o+")"}))}})),y(Q),k((function(e,t){if(!e.nodeType||void 0===e.setAttribute)return!1;var n=t.style,r=t.children,o=t.scrollTop,i=t.scrollLeft,l=c(t,["style","children","scrollTop","scrollLeft"]),a="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;for(var s in void 0!==o&&(e.scrollTop=o),void 0!==i&&(e.scrollLeft=i),void 0!==r&&(e.textContent=r),n)if(n.hasOwnProperty(s)){var u=0===s.indexOf("--"),d=je(s,n[s],u);"float"===s&&(s="cssFloat"),u?e.style.setProperty(s,d):e.style[s]=d}for(var b in l){var f=a?b:ke[b]||(ke[b]=b.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()})));void 0!==e.getAttribute(f)&&e.setAttribute(f,l[b])}}),(function(e){return e}));var ye,_e,Ee=(ye=function(e){return i.forwardRef((function(t,n){var r=d(),a=i.useRef(!0),s=i.useRef(null),b=i.useRef(null),f=i.useCallback((function(e){var t=s.current;s.current=new A(e,(function(){var e=!1;b.current&&(e=v.fn(b.current,s.current.getAnimatedValue())),b.current&&!1!==e||r()})),t&&t.detach()}),[]);i.useEffect((function(){return function(){a.current=!1,s.current&&s.current.detach()}}),[]),i.useImperativeHandle(n,(function(){return T(b,a,r)})),f(t);var p,m=s.current.getValue(),g=(m.scrollTop,m.scrollLeft,c(m,["scrollTop","scrollLeft"])),O=(p=e,!u.fun(p)||p.prototype instanceof l.Component?function(e){return b.current=function(e,t){return t&&(u.fun(t)?t(e):u.obj(t)&&(t.current=e)),e}(e,n)}:void 0);return l.createElement(e,o({},g,{ref:O}))}))},void 0===(_e=!1)&&(_e=!0),function(e){return(u.arr(e)?e:Object.keys(e)).reduce((function(e,t){var n=_e?t[0].toLowerCase()+t.substring(1):t;return e[n]=ye(n),e}),ye)}),we=Ee(["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"]);t.apply=Ee,t.config={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},t.update=M,t.animated=we,t.a=we,t.interpolate=function(e,t,n){return e&&new V(e,t,n)},t.Globals=D,t.useSpring=function(e){var t=u.fun(e),n=W(1,t?e:[e]),r=n[0],o=n[1],c=n[2];return t?[r[0],o,c]:r},t.useTrail=function(e,t){var n=i.useRef(!1),r=u.fun(t),c=p(t),l=i.useRef(),a=W(e,(function(e,t){return 0===e&&(l.current=[]),l.current.push(t),o({},c,{config:p(c.config,e),attach:e>0&&function(){return l.current[e-1]}})})),s=a[0],d=a[1],b=a[2],f=i.useMemo((function(){return function(e){return d((function(t,n){e.reverse;var r=e.reverse?t+1:t-1,i=l.current[r];return o({},e,{config:p(e.config||c.config,t),attach:i&&function(){return i}})}))}}),[e,c.reverse]);return i.useEffect((function(){n.current&&!r&&f(t)})),i.useEffect((function(){n.current=!0}),[]),r?[s,f,b]:s},t.useTransition=function(e,t,n){var r=o({items:e,keys:t||function(e){return e}},n),l=$(r),a=l.lazy,s=void 0!==a&&a,u=(l.unique,l.reset),b=void 0!==u&&u,f=(l.enter,l.leave,l.update,l.onDestroyed),m=(l.keys,l.items,l.onFrame),v=l.onRest,g=l.onStart,O=l.ref,h=c(l,["lazy","unique","reset","enter","leave","update","onDestroyed","keys","items","onFrame","onRest","onStart","ref"]),j=d(),k=i.useRef(!1),y=i.useRef({mounted:!1,first:!0,deleted:[],current:{},transitions:[],prevProps:{},paused:!!r.ref,instances:!k.current&&new Map,forceUpdate:j});return i.useImperativeHandle(r.ref,(function(){return{start:function(){return Promise.all(Array.from(y.current.instances).map((function(e){var t=e[1];return new Promise((function(e){return t.start(e)}))})))},stop:function(e){return Array.from(y.current.instances).forEach((function(t){return t[1].stop(e)}))},get controllers(){return Array.from(y.current.instances).map((function(e){return e[1]}))}}})),y.current=function(e,t){var n=e.first,r=e.prevProps,i=c(e,["first","prevProps"]),l=$(t),a=l.items,s=l.keys,u=l.initial,d=l.from,b=l.enter,f=l.leave,m=l.update,v=l.trail,g=void 0===v?0:v,O=l.unique,h=l.config,j=l.order,k=void 0===j?["enter","leave","update"]:j,y=$(r),_=y.keys,E=y.items,w=o({},i.current),C=[].concat(i.deleted),S=Object.keys(w),I=new Set(S),B=new Set(s),x=s.filter((function(e){return!I.has(e)})),P=i.transitions.filter((function(e){return!e.destroyed&&!B.has(e.originalKey)})).map((function(e){return e.originalKey})),T=s.filter((function(e){return I.has(e)})),N=-g;for(;k.length;){switch(k.shift()){case"enter":x.forEach((function(e,t){O&&C.find((function(t){return t.originalKey===e}))&&(C=C.filter((function(t){return t.originalKey!==e})));var r=s.indexOf(e),o=a[r],c=n&&void 0!==u?"initial":"enter";w[e]={slot:c,originalKey:e,key:O?String(e):K++,item:o,trail:N+=g,config:p(h,o,c),from:p(n&&void 0!==u?u||{}:d,o),to:p(b,o)}}));break;case"leave":P.forEach((function(e){var t=_.indexOf(e),n=E[t];C.unshift(o({},w[e],{slot:"leave",destroyed:!0,left:_[Math.max(0,t-1)],right:_[Math.min(_.length,t+1)],trail:N+=g,config:p(h,n,"leave"),to:p(f,n)})),delete w[e]}));break;case"update":T.forEach((function(e){var t=s.indexOf(e),n=a[t];w[e]=o({},w[e],{item:n,slot:"update",trail:N+=g,config:p(h,n,"update"),to:p(m,n)})}))}}var D=s.map((function(e){return w[e]}));return C.forEach((function(e){var t,n=e.left,r=(e.right,c(e,["left","right"]));-1!==(t=D.findIndex((function(e){return e.originalKey===n})))&&(t+=1),t=Math.max(0,t),D=[].concat(D.slice(0,t),[r],D.slice(t))})),o({},i,{changed:x.length||P.length||T.length,first:n&&0===x.length,transitions:D,current:w,deleted:C,prevProps:t})}(y.current,r),y.current.changed&&y.current.transitions.forEach((function(e){var t=e.slot,n=e.from,r=e.to,c=e.config,i=e.trail,l=e.key,a=e.item;y.current.instances.has(l)||y.current.instances.set(l,new U);var u=y.current.instances.get(l),d=o({},h,{to:r,from:n,config:c,ref:O,onRest:function(n){y.current.mounted&&(e.destroyed&&(O||s||Y(y,l),f&&f(a)),!Array.from(y.current.instances).some((function(e){return!e[1].idle}))&&(O||s)&&y.current.deleted.length>0&&Y(y),v&&v(a,t,n))},onStart:g&&function(){return g(a,t)},onFrame:m&&function(e){return m(a,t,e)},delay:i,reset:b&&"enter"===t});u.update(d),y.current.paused||u.start()})),i.useEffect((function(){return y.current.mounted=k.current=!0,function(){y.current.mounted=k.current=!1,Array.from(y.current.instances).map((function(e){return e[1].destroy()})),y.current.instances.clear()}}),[]),y.current.transitions.map((function(e){var t=e.item,n=e.slot,r=e.key;return{item:t,key:r,state:n,props:y.current.instances.get(r).getValues()}}))},t.useChain=function(e,t,n){void 0===n&&(n=1e3);var r=i.useRef();i.useEffect((function(){u.equ(e,r.current)?e.forEach((function(e){var t=e.current;return t&&t.start()})):t?e.forEach((function(e,r){var c=e.current;if(c){var i=c.controllers;if(i.length){var l=n*t[r];i.forEach((function(e){e.queue=e.queue.map((function(e){return o({},e,{delay:e.delay+l})})),e.start()}))}}})):e.reduce((function(e,t,n){var r=t.current;return e.then((function(){return r.start()}))}),Promise.resolve()),r.current=e}))},t.useSprings=W},"./node_modules/rememo/es/rememo.js":function(e,t,n){"use strict";var r,o;function c(e){return[e]}function i(){var e={clear:function(){e.head=null}};return e}function l(e,t,n){var r;if(e.length!==t.length)return!1;for(r=n;r1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=N(e,360),t=N(t,100),n=N(n,100),0===t)r=o=c=n;else{var l=n<.5?n*(1+t):n+t-n*t,a=2*n-l;r=i(a,l,e+1/3),o=i(a,l,e),c=i(a,l,e-1/3)}return{r:255*r,g:255*o,b:255*c}}(e.h,r,a),d=!0,b="hsl"),e.hasOwnProperty("a")&&(n=e.a));var f,p,m;return n=T(n),{ok:d,format:e.format||b,r:s(255,u(t.r,0)),g:s(255,u(t.g,0)),b:s(255,u(t.b,0)),a:n}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=a(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=a(this._r)),this._g<1&&(this._g=a(this._g)),this._b<1&&(this._b=a(this._b)),this._ok=n.ok,this._tc_id=l++}function f(e,t,n){e=N(e,255),t=N(t,255),n=N(n,255);var r,o,c=u(e,t,n),i=s(e,t,n),l=(c+i)/2;if(c==i)r=o=0;else{var a=c-i;switch(o=l>.5?a/(2-c-i):a/(c+i),c){case e:r=(t-n)/a+(t>1)+720)%360;--t;)r.h=(r.h+o)%360,c.push(b(r));return c}function B(e,t){t=t||6;for(var n=b(e).toHsv(),r=n.h,o=n.s,c=n.v,i=[],l=1/t;t--;)i.push(b({h:r,s:o,v:c})),c=(c+l)%1;return i}b.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:o.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:o.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:o.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=T(e),this._roundA=a(100*this._a)/100,this},toHsv:function(){var e=p(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=p(this._r,this._g,this._b),t=a(360*e.h),n=a(100*e.s),r=a(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=f(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=f(this._r,this._g,this._b),t=a(360*e.h),n=a(100*e.s),r=a(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return m(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,o){var c=[R(a(e).toString(16)),R(a(t).toString(16)),R(a(n).toString(16)),R(M(r))];if(o&&c[0].charAt(0)==c[0].charAt(1)&&c[1].charAt(0)==c[1].charAt(1)&&c[2].charAt(0)==c[2].charAt(1)&&c[3].charAt(0)==c[3].charAt(1))return c[0].charAt(0)+c[1].charAt(0)+c[2].charAt(0)+c[3].charAt(0);return c.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:a(this._r),g:a(this._g),b:a(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+a(this._r)+", "+a(this._g)+", "+a(this._b)+")":"rgba("+a(this._r)+", "+a(this._g)+", "+a(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:a(100*N(this._r,255))+"%",g:a(100*N(this._g,255))+"%",b:a(100*N(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+a(100*N(this._r,255))+"%, "+a(100*N(this._g,255))+"%, "+a(100*N(this._b,255))+"%)":"rgba("+a(100*N(this._r,255))+"%, "+a(100*N(this._g,255))+"%, "+a(100*N(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(P[m(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+v(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var o=b(e);n="#"+v(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return b(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(j,arguments)},brighten:function(){return this._applyModification(k,arguments)},darken:function(){return this._applyModification(y,arguments)},desaturate:function(){return this._applyModification(g,arguments)},saturate:function(){return this._applyModification(O,arguments)},greyscale:function(){return this._applyModification(h,arguments)},spin:function(){return this._applyModification(_,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(I,arguments)},complement:function(){return this._applyCombination(E,arguments)},monochromatic:function(){return this._applyCombination(B,arguments)},splitcomplement:function(){return this._applyCombination(S,arguments)},triad:function(){return this._applyCombination(w,arguments)},tetrad:function(){return this._applyCombination(C,arguments)}},b.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:L(e[r]));e=n}return b(e,t)},b.equals=function(e,t){return!(!e||!t)&&b(e).toRgbString()==b(t).toRgbString()},b.random=function(){return b.fromRatio({r:d(),g:d(),b:d()})},b.mix=function(e,t,n){n=0===n?0:n||50;var r=b(e).toRgb(),o=b(t).toRgb(),c=n/100;return b({r:(o.r-r.r)*c+r.r,g:(o.g-r.g)*c+r.g,b:(o.b-r.b)*c+r.b,a:(o.a-r.a)*c+r.a})},b.readability=function(e,t){var n=b(e),r=b(t);return(o.max(n.getLuminance(),r.getLuminance())+.05)/(o.min(n.getLuminance(),r.getLuminance())+.05)},b.isReadable=function(e,t,n){var r,o,c=b.readability(e,t);switch(o=!1,(r=function(e){var t,n;t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA");"small"!==n&&"large"!==n&&(n="small");return{level:t,size:n}}(n)).level+r.size){case"AAsmall":case"AAAlarge":o=c>=4.5;break;case"AAlarge":o=c>=3;break;case"AAAsmall":o=c>=7}return o},b.mostReadable=function(e,t,n){var r,o,c,i,l=null,a=0;o=(n=n||{}).includeFallbackColors,c=n.level,i=n.size;for(var s=0;sa&&(a=r,l=b(t[s]));return b.isReadable(e,l,{level:c,size:i})||!o?l:(n.includeFallbackColors=!1,b.mostReadable(e,["#fff","#000"],n))};var x=b.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},P=b.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(x);function T(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function N(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=s(t,u(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),o.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function D(e){return s(1,u(0,e))}function A(e){return parseInt(e,16)}function R(e){return 1==e.length?"0"+e:""+e}function L(e){return e<=1&&(e=100*e+"%"),e}function M(e){return o.round(255*parseFloat(e)).toString(16)}function F(e){return A(e)/255}var V,H,z,G=(H="[\\s|\\(]+("+(V="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",z="[\\s|\\(]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",{CSS_UNIT:new RegExp(V),rgb:new RegExp("rgb"+H),rgba:new RegExp("rgba"+z),hsl:new RegExp("hsl"+H),hsla:new RegExp("hsla"+z),hsv:new RegExp("hsv"+H),hsva:new RegExp("hsva"+z),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function U(e){return!!G.CSS_UNIT.exec(e)}e.exports?e.exports=b:void 0===(r=function(){return b}.call(t,n,t,e))||(e.exports=r)}(Math)},"./node_modules/traverse/index.js":function(e,t){var n=e.exports=function(e){return new r(e)};function r(e){this.value=e}function o(e,t,n){var r=[],o=[],l=!0;return function e(d){var b=n?c(d):d,f={},p=!0,m={node:b,node_:d,path:[].concat(r),parent:o[o.length-1],parents:o,key:r.slice(-1)[0],isRoot:0===r.length,level:r.length,circular:null,update:function(e,t){m.isRoot||(m.parent.node[m.key]=e),m.node=e,t&&(p=!1)},delete:function(e){delete m.parent.node[m.key],e&&(p=!1)},remove:function(e){a(m.parent.node)?m.parent.node.splice(m.key,1):delete m.parent.node[m.key],e&&(p=!1)},keys:null,before:function(e){f.before=e},after:function(e){f.after=e},pre:function(e){f.pre=e},post:function(e){f.post=e},stop:function(){l=!1},block:function(){p=!1}};if(!l)return m;function v(){if("object"==typeof m.node&&null!==m.node){m.keys&&m.node_===m.node||(m.keys=i(m.node)),m.isLeaf=0==m.keys.length;for(var e=0;e