/*! This file is auto-generated */ this.wp=this.wp||{},this.wp.formatLibrary=function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=430)}({0:function(t,e){!function(){t.exports=this.wp.element}()},1:function(t,e){!function(){t.exports=this.wp.i18n}()},12:function(t,e,n){"use strict";function r(){return(r=Object.assign||function(t){for(var e=1;e=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(c[n]=t[n])}return c}},192:function(t,e,n){"use strict";var r=n(0),o=n(9),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(r.createElement)(o.Path,{d:"M16 4h2v9H7v3l-5-4 5-4v3h9V4z"}));e.a=c},2:function(t,e){!function(){t.exports=this.lodash}()},20:function(t,e,n){"use strict";var r=n(38);var o=n(27),c=n(39);function i(t,e){return Object(r.a)(t)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,o=!1,c=void 0;try{for(var i,a=t[Symbol.iterator]();!(r=(i=a.next()).done)&&(n.push(i.value),!e||n.length!==e);r=!0);}catch(t){o=!0,c=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw c}}return n}}(t,e)||Object(o.a)(t,e)||Object(c.a)()}n.d(e,"a",(function(){return i}))},22:function(t,e){!function(){t.exports=this.wp.keycodes}()},24:function(t,e){!function(){t.exports=this.wp.richText}()},25:function(t,e,n){"use strict";function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=0||(o[n]=t[n]);return o}n.d(e,"a",(function(){return r}))},430:function(t,e,n){"use strict";n.r(e);var r=n(19),o=n(24),c=n(0),i=n(1),a=n(6),l=n(9),u=Object(c.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(c.createElement)(l.Path,{d:"M6 4v13h4.54c1.37 0 2.46-.33 3.26-1 .8-.66 1.2-1.58 1.2-2.77 0-.84-.17-1.51-.51-2.01s-.9-.85-1.67-1.03v-.09c.57-.1 1.02-.4 1.36-.9s.51-1.13.51-1.91c0-1.14-.39-1.98-1.17-2.5C12.75 4.26 11.5 4 9.78 4H6zm2.57 5.15V6.26h1.36c.73 0 1.27.11 1.61.32.34.22.51.58.51 1.07 0 .54-.16.92-.47 1.15s-.82.35-1.51.35h-1.5zm0 2.19h1.6c1.44 0 2.16.53 2.16 1.61 0 .6-.17 1.05-.51 1.34s-.86.43-1.57.43H8.57v-3.38z"})),s="core/bold",b=Object(i.__)("Bold"),f={name:s,title:b,tagName:"strong",className:null,edit:function(t){var e=t.isActive,n=t.value,r=t.onChange,i=t.onFocus;function l(){r(Object(o.toggleFormat)(n,{type:s}))}return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(a.RichTextShortcut,{type:"primary",character:"b",onUse:l}),Object(c.createElement)(a.RichTextToolbarButton,{name:"bold",icon:u,title:b,onClick:function(){l(),i()},isActive:e,shortcutType:"primary",shortcutCharacter:"b"}),Object(c.createElement)(a.__unstableRichTextInputEvent,{inputType:"formatBold",onInput:l}))}},p=n(290),m="core/code",O=Object(i.__)("Inline Code"),v={name:m,title:O,tagName:"code",className:null,__unstableInputRule:function(t){var e=t,n=e.start,r=e.text;if("`"!==r.slice(n-1,n))return t;var c=r.slice(0,n-1).lastIndexOf("`");if(-1===c)return t;var i=c,a=n-2;return i===a?t:(t=Object(o.remove)(t,i,i+1),t=Object(o.remove)(t,a,a+1),t=Object(o.applyFormat)(t,{type:m},i,a))},edit:function(t){var e=t.value,n=t.onChange,r=t.onFocus,i=t.isActive;return Object(c.createElement)(a.RichTextToolbarButton,{icon:p.a,title:O,onClick:function(){n(Object(o.toggleFormat)(e,{type:m})),r()},isActive:i})}},h=n(5),d=n(14),j=n(13),g=n(15),y=n(16),w=n(7),E=n(17),k=n(3),C=n(22),x=n(192);function _(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function S(t){for(var e=1;e-1&&t.stopPropagation()}},{key:"openModal",value:function(){this.setState({modal:!0})}},{key:"closeModal",value:function(){this.setState({modal:!1})}},{key:"componentDidMount",value:function(){this.anchorRef=M()}},{key:"componentDidUpdate",value:function(t){(!t.isObjectActive&&this.props.isObjectActive||t.activeObjectAttributes.url!==this.props.activeObjectAttributes.url)&&(this.anchorRef=M())}},{key:"render",value:function(){var t=this,e=this.props,n=e.value,r=e.onChange,l=e.onFocus,u=e.isObjectActive,s=e.activeObjectAttributes;return Object(c.createElement)(a.MediaUploadCheck,null,Object(c.createElement)(a.RichTextToolbarButton,{icon:Object(c.createElement)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(c.createElement)(k.Path,{d:"M4 16h10c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2zM4 5h10v9H4V5zm14 9v2h4v-2h-4zM2 20h20v-2H2v2zm6.4-8.8L7 9.4 5 12h8l-2.6-3.4-2 2.6z"})),title:P,onClick:this.openModal,isActive:u}),this.state.modal&&Object(c.createElement)(a.MediaUpload,{allowedTypes:T,onSelect:function(e){var c=e.id,i=e.url,a=e.alt,u=e.width;t.closeModal(),r(Object(o.insertObject)(n,{type:"core/image",attributes:{className:"wp-image-".concat(c),style:"width: ".concat(Math.min(u,150),"px;"),url:i,alt:a}})),l()},onClose:this.closeModal,render:function(t){return(0,t.open)(),null}}),u&&Object(c.createElement)(k.Popover,{position:"bottom center",focusOnMount:!1,anchorRef:this.anchorRef},Object(c.createElement)("form",{className:"block-editor-format-toolbar__image-container-content",onKeyPress:A,onKeyDown:this.onKeyDown,onSubmit:function(e){var o=n.replacements.slice();o[n.start]={type:"core/image",attributes:S({},s,{style:"width: ".concat(t.state.width,"px;")})},r(S({},n,{replacements:o})),e.preventDefault()}},Object(c.createElement)(k.TextControl,{className:"block-editor-format-toolbar__image-container-value",type:"number",label:Object(i.__)("Width"),value:this.state.width,min:1,onChange:this.onChange}),Object(c.createElement)(k.Button,{icon:x.a,label:Object(i.__)("Apply"),type:"submit"}))))}}],[{key:"getDerivedStateFromProps",value:function(t,e){var n=t.activeObjectAttributes.style;return n===e.previousStyle?null:n?{width:n.replace(/\D/g,""),previousStyle:n}:{width:void 0,previousStyle:n}}}]),e}(c.Component)},L=Object(c.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(c.createElement)(l.Path,{d:"M14.78 6h-2.13l-2.8 9h2.12l-.62 2H4.6l.62-2h2.14l2.8-9H8.03l.62-2h6.75z"})),F="core/italic",N=Object(i.__)("Italic"),z={name:F,title:N,tagName:"em",className:null,edit:function(t){var e=t.isActive,n=t.value,r=t.onChange,i=t.onFocus;function l(){r(Object(o.toggleFormat)(n,{type:F}))}return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(a.RichTextShortcut,{type:"primary",character:"i",onUse:l}),Object(c.createElement)(a.RichTextToolbarButton,{name:"italic",icon:L,title:N,onClick:function(){l(),i()},isActive:e,shortcutType:"primary",shortcutCharacter:"i"}),Object(c.createElement)(a.__unstableRichTextInputEvent,{inputType:"formatItalic",onInput:l}))}},I=n(30),B=n(58),H=Object(c.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(c.createElement)(l.Path,{d:"M17.74 2.26c1.68 1.69 1.68 4.41 0 6.1l-1.53 1.52c-.32.33-.69.58-1.08.77L13 10l1.69-1.64.76-.77.76-.76c.84-.84.84-2.2 0-3.04-.84-.85-2.2-.85-3.04 0l-.77.76-.76.76L10 7l-.65-2.14c.19-.38.44-.75.77-1.07l1.52-1.53c1.69-1.68 4.42-1.68 6.1 0zM2 4l8 6-6-8zm4-2l4 8-2-8H6zM2 6l8 4-8-2V6zm7.36 7.69L10 13l.74 2.35-1.38 1.39c-1.69 1.68-4.41 1.68-6.1 0-1.68-1.68-1.68-4.42 0-6.1l1.39-1.38L7 10l-.69.64-1.52 1.53c-.85.84-.85 2.2 0 3.04.84.85 2.2.85 3.04 0zM18 16l-8-6 6 8zm-4 2l-4-8 2 8h2zm4-4l-8-4 8 2v2z"})),V=n(159),D=n(20),U=n(2);function G(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function K(t){for(var e=1;e]+>/g,"").trim();return Object(I.isURL)(c)?(window.console.log("Created link:\n\n",c),Object(o.applyFormat)(t,{type:"core/link",attributes:{url:Object(B.decodeEntities)(c)}})):t},edit:Object(k.withSpokenMessages)(function(t){function e(){var t;return Object(d.a)(this,e),(t=Object(g.a)(this,Object(y.a)(e).apply(this,arguments))).addLink=t.addLink.bind(Object(w.a)(t)),t.stopAddingLink=t.stopAddingLink.bind(Object(w.a)(t)),t.onRemoveFormat=t.onRemoveFormat.bind(Object(w.a)(t)),t.state={addingLink:!1},t}return Object(E.a)(e,t),Object(j.a)(e,[{key:"addLink",value:function(){var t=this.props,e=t.value,n=t.onChange,r=Object(o.getTextContent)(Object(o.slice)(e));r&&Object(I.isURL)(r)?n(Object(o.applyFormat)(e,{type:"core/link",attributes:{url:r}})):r&&Object(I.isEmail)(r)?n(Object(o.applyFormat)(e,{type:"core/link",attributes:{url:"mailto:".concat(r)}})):this.setState({addingLink:!0})}},{key:"stopAddingLink",value:function(){this.setState({addingLink:!1}),this.props.onFocus()}},{key:"onRemoveFormat",value:function(){var t=this.props,e=t.value,n=t.onChange,r=t.speak;n(Object(o.removeFormat)(e,"core/link")),r(Object(i.__)("Link removed."),"assertive")}},{key:"render",value:function(){var t=this.props,e=t.isActive,n=t.activeAttributes,r=t.value,o=t.onChange;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(a.RichTextShortcut,{type:"primary",character:"k",onUse:this.addLink}),Object(c.createElement)(a.RichTextShortcut,{type:"primaryShift",character:"k",onUse:this.onRemoveFormat}),e&&Object(c.createElement)(a.RichTextToolbarButton,{name:"link",icon:H,title:Object(i.__)("Unlink"),onClick:this.onRemoveFormat,isActive:e,shortcutType:"primaryShift",shortcutCharacter:"k"}),!e&&Object(c.createElement)(a.RichTextToolbarButton,{name:"link",icon:V.a,title:Q,onClick:this.addLink,isActive:e,shortcutType:"primary",shortcutCharacter:"k"}),(this.state.addingLink||e)&&Object(c.createElement)(W,{addingLink:this.state.addingLink,stopAddingLink:this.stopAddingLink,isActive:e,activeAttributes:n,value:r,onChange:o}))}}]),e}(c.Component))},q=Object(c.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(c.createElement)(l.Path,{d:"M15.82 12.25c.26 0 .5-.02.74-.07.23-.05.48-.12.73-.2v.84c-.46.17-.99.26-1.58.26-.88 0-1.54-.26-2.01-.79-.39-.44-.62-1.04-.68-1.79h-.94c.12.21.18.48.18.79 0 .54-.18.95-.55 1.26-.38.3-.9.45-1.56.45H8v-2.5H6.59l.93 2.5H6.49l-.59-1.67H3.62L3.04 13H2l.93-2.5H2v-1h1.31l.93-2.49H5.3l.92 2.49H8V7h1.77c1 0 1.41.17 1.77.41.37.24.55.62.55 1.13 0 .35-.09.64-.27.87l-.08.09h1.29c.05-.4.15-.77.31-1.1.23-.46.55-.82.98-1.06.43-.25.93-.37 1.51-.37.61 0 1.17.12 1.69.38l-.35.81c-.2-.1-.42-.18-.64-.25s-.46-.11-.71-.11c-.55 0-.99.2-1.31.59-.23.29-.38.66-.44 1.11H17v1h-2.95c.06.5.2.9.44 1.19.3.37.75.56 1.33.56zM4.44 8.96l-.18.54H5.3l-.22-.61c-.04-.11-.09-.28-.17-.51-.07-.24-.12-.41-.14-.51-.08.33-.18.69-.33 1.09zm4.53-1.09V9.5h1.19c.28-.02.49-.09.64-.18.19-.13.28-.35.28-.66 0-.28-.1-.48-.3-.61-.2-.12-.53-.18-.97-.18h-.84zm-3.33 2.64v-.01H3.91v.01h1.73zm5.28.01l-.03-.02H8.97v1.68h1.04c.4 0 .71-.08.92-.23.21-.16.31-.4.31-.74 0-.31-.11-.54-.32-.69z"})),J="core/strikethrough",X=Object(i.__)("Strikethrough"),Y={name:J,title:X,tagName:"s",className:null,edit:function(t){var e=t.isActive,n=t.value,r=t.onChange,i=t.onFocus;return Object(c.createElement)(a.RichTextToolbarButton,{icon:q,title:X,onClick:function(){r(Object(o.toggleFormat)(n,{type:J})),i()},isActive:e})}},Z={name:"core/underline",title:Object(i.__)("Underline"),tagName:"span",className:null,attributes:{style:"style"},edit:function(t){var e=t.value,n=t.onChange,r=function(){n(Object(o.toggleFormat)(e,{type:"core/underline",attributes:{style:"text-decoration: underline;"}}))};return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(a.RichTextShortcut,{type:"primary",character:"u",onUse:r}),Object(c.createElement)(a.__unstableRichTextInputEvent,{inputType:"formatUnderline",onInput:r}))}},tt=n(4),et=n(12),nt=n(28);function rt(t,e,n){var r=Object(o.getActiveFormat)(e,t);if(r){var c=r.attributes.style;if(c)return c.replace(new RegExp("^color:\\s*"),"");var i=r.attributes.class;if(i){var l=i.replace(/.*has-(.*?)-color.*/,"$1");return Object(a.getColorObjectByAttributeValues)(n,l).color}}}var ot=function(t){var e=t.addingColor,n=Object(r.a)(t,["addingColor"]),o=Object(c.useMemo)((function(){var t=window.getSelection(),n=t.rangeCount>0?t.getRangeAt(0):null;if(n){if(e)return Object(nt.getRectangleFromRange)(n);var r=n.startContainer;for(r=r.nextElementSibling||r;r.nodeType!==window.Node.ELEMENT_NODE;)r=r.parentNode;var o=r.closest("span");return o?o.getBoundingClientRect():void 0}}),[]);return o?Object(c.createElement)(a.URLPopover,Object(et.a)({anchorRect:o},n)):null},ct=function(t){var e=t.name,n=t.value,r=t.onChange,i=Object(tt.useSelect)((function(t){var e=t("core/block-editor").getSettings;return Object(U.get)(e(),["colors"],[])})),l=Object(c.useCallback)((function(t){if(t){var c=Object(a.getColorObjectByColorValue)(i,t);r(Object(o.applyFormat)(n,{type:e,attributes:c?{class:Object(a.getColorClassName)("color",c.slug)}:{style:"color:".concat(t)}}))}else r(Object(o.removeFormat)(n,e))}),[i,r]),u=Object(c.useMemo)((function(){return rt(e,n,i)}),[e,n,i]);return Object(c.createElement)(a.ColorPalette,{value:u,onChange:l})},it=Object(k.withSpokenMessages)((function(t){var e=t.name,n=t.value,r=t.onChange,o=t.onClose,i=t.isActive,a=t.addingColor;return Object(c.createElement)(ot,{value:n,isActive:i,addingColor:a,onClose:o,className:"components-inline-color-popover"},Object(c.createElement)(ct,{name:e,value:n,onChange:r}))})),at="core/text-color",lt=Object(i.__)("Text Color"),ut=[];[f,v,R,z,$,Y,Z,{name:at,title:lt,tagName:"span",className:"has-inline-color",attributes:{style:"style",class:"class"},edit:function(t){var e=t.value,n=t.onChange,r=t.isActive,i=t.activeAttributes,l=Object(tt.useSelect)((function(t){var e,n=t("core/block-editor");return e=n&&n.getSettings?n.getSettings():{},{colors:Object(U.get)(e,["colors"],ut),disableCustomColors:e.disableCustomColors}})),u=l.colors,s=l.disableCustomColors,b=Object(c.useState)(!1),f=Object(D.a)(b,2),p=f[0],m=f[1],O=Object(c.useCallback)((function(){return m(!0)}),[m]),v=Object(c.useCallback)((function(){return m(!1)}),[m]),h=Object(c.useMemo)((function(){var t=rt(at,e,u);if(t)return{backgroundColor:t}}),[e,u]),d=!Object(U.isEmpty)(u)||!0!==s;return d||r?Object(c.createElement)(c.Fragment,null,Object(c.createElement)(a.RichTextToolbarButton,{key:r?"text-color":"text-color-not-active",className:"format-library-text-color-button",name:r?"text-color":void 0,icon:Object(c.createElement)(c.Fragment,null,Object(c.createElement)(k.Dashicon,{icon:"editor-textcolor"}),r&&Object(c.createElement)("span",{className:"format-library-text-color-button__indicator",style:h})),title:lt,onClick:d?O:function(){return n(Object(o.removeFormat)(e,at))}}),p&&Object(c.createElement)(it,{name:at,addingColor:p,onClose:v,isActive:r,activeAttributes:i,value:e,onChange:n})):null}}].forEach((function(t){var e=t.name,n=Object(r.a)(t,["name"]);return Object(o.registerFormatType)(e,n)}))},5:function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,"a",(function(){return r}))},58:function(t,e){!function(){t.exports=this.wp.htmlEntities}()},6:function(t,e){!function(){t.exports=this.wp.blockEditor}()},7:function(t,e,n){"use strict";function r(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}n.d(e,"a",(function(){return r}))},9:function(t,e){!function(){t.exports=this.wp.primitives}()}});