".concat(t,"
")})}},{type:"block",blocks:["core/pullquote"],transform:function(e){var t=e.value,n=e.citation;return Object(G.createBlock)("core/quote",{value:t,citation:n})}},{type:"prefix",prefix:">",transform:function(e){return Object(G.createBlock)("core/quote",{value:"".concat(e,"
")})}},{type:"raw",isMatch:function(e){var t,n=(t=!1,function(e){return"P"===e.nodeName||(t||"CITE"!==e.nodeName?void 0:(t=!0,!0))});return"BLOCKQUOTE"===e.nodeName&&Array.from(e.childNodes).every(n)},schema:{blockquote:{children:{p:{children:Object(G.getPhrasingContentSchema)()},cite:{children:Object(G.getPhrasingContentSchema)()}}}}}],to:[{type:"block",blocks:["core/paragraph"],transform:function(e){var t=e.value,n=e.citation,r=[];return t&&""!==t&&r.push.apply(r,Object(U.a)(Object(It.split)(Object(It.create)({html:t,multilineTag:"p"}),"\u2028").map((function(e){return Object(G.createBlock)("core/paragraph",{content:Object(It.toHTMLString)({value:e})})})))),n&&""!==n&&r.push(Object(G.createBlock)("core/paragraph",{content:n})),0===r.length?Object(G.createBlock)("core/paragraph",{content:""}):r}},{type:"block",blocks:["core/heading"],transform:function(e){var t=e.value,n=e.citation,r=Object(Bt.a)(e,["value","citation"]);if(""===t)return Object(G.createBlock)("core/heading",{content:n});var o=Object(It.split)(Object(It.create)({html:t,multilineTag:"p"}),"\u2028"),a=Object(G.createBlock)("core/heading",{content:Object(It.toHTMLString)({value:o[0]})});if(!n&&1===o.length)return a;var c=o.slice(1);return[a,Object(G.createBlock)("core/quote",Object(Z.a)({},r,{citation:n,value:Object(It.toHTMLString)({value:c.length?Object(It.join)(o.slice(1),"\u2028"):Object(It.create)(),multilineTag:"p"})}))]}},{type:"block",blocks:["core/pullquote"],transform:function(e){var t=e.value,n=e.citation;return Object(G.createBlock)("core/pullquote",{value:t,citation:n})}}]},Pt={name:"core/quote",category:"common",attributes:{value:{type:"string",source:"html",selector:"blockquote",multiline:"p",default:""},citation:{type:"string",source:"html",selector:"cite",default:""},align:{type:"string"}}},Lt=Pt.name,Ht={title:Object(K.__)("Quote"),description:Object(K.__)('Give quoted text visual emphasis. "In quoting others, we cite ourselves." — Julio Cortázar'),icon:At,keywords:[Object(K.__)("blockquote"),Object(K.__)("cite")],example:{attributes:{value:""+Object(K.__)("In quoting others, we cite ourselves.")+"
",citation:"Julio Cortázar",className:"is-style-large"}},styles:[{name:"default",label:Object(K._x)("Default","block style"),isDefault:!0},{name:"large",label:Object(K._x)("Large","block style")}],transforms:Mt,edit:function(e){var t=e.attributes,n=e.setAttributes,r=e.isSelected,o=e.mergeBlocks,a=e.onReplace,c=e.className,i=t.align,l=t.value,s=t.citation;return Object($.createElement)($.Fragment,null,Object($.createElement)(W.BlockControls,null,Object($.createElement)(W.AlignmentToolbar,{value:i,onChange:function(e){n({align:e})}})),Object($.createElement)(se.BlockQuotation,{className:Q()(c,Object(q.a)({},"has-text-align-".concat(i),i))},Object($.createElement)(W.RichText,{identifier:"value",multiline:!0,value:l,onChange:function(e){return n({value:e})},onMerge:o,onRemove:function(e){var t=!s||0===s.length;!e&&t&&a([])},placeholder:Object(K.__)("Write quote…"),onReplace:a,onSplit:function(e){return Object(G.createBlock)("core/quote",Object(Z.a)({},t,{value:e}))},__unstableOnSplitMiddle:function(){return Object(G.createBlock)("core/paragraph")}}),(!W.RichText.isEmpty(s)||r)&&Object($.createElement)(W.RichText,{identifier:"citation",value:s,onChange:function(e){return n({citation:e})},__unstableMobileNoFocusOnMount:!0,placeholder:Object(K.__)("Write citation…"),className:"wp-block-quote__citation"})))},save:function(e){var t=e.attributes,n=t.align,r=t.value,o=t.citation,a=Q()(Object(q.a)({},"has-text-align-".concat(n),n));return Object($.createElement)("blockquote",{className:a},Object($.createElement)(W.RichText.Content,{multiline:!0,value:r}),!W.RichText.isEmpty(o)&&Object($.createElement)(W.RichText.Content,{tagName:"cite",value:o}))},merge:function(e,t){var n=t.value,r=t.citation;return r||(r=e.citation),n&&""!==n?Object(Z.a)({},e,{value:e.value+n,citation:r}):Object(Z.a)({},e,{citation:r})},deprecated:Rt};function zt(e){return Math.min(3,e.images.length)}var Vt=function(e){var t=Object(J.pick)(e,["alt","id","link","caption"]);t.url=Object(J.get)(e,["sizes","large","url"])||Object(J.get)(e,["media_details","sizes","large","source_url"])||e.url;var n=Object(J.get)(e,["sizes","full","url"])||Object(J.get)(e,["media_details","sizes","full","source_url"]);return n&&(t.fullUrl=n),t},Dt=[{attributes:{images:{type:"array",default:[],source:"query",selector:"ul.wp-block-gallery .blocks-gallery-item",query:{url:{source:"attribute",selector:"img",attribute:"src"},fullUrl:{source:"attribute",selector:"img",attribute:"data-full-url"},alt:{source:"attribute",selector:"img",attribute:"alt",default:""},id:{source:"attribute",selector:"img",attribute:"data-id"},link:{source:"attribute",selector:"img",attribute:"data-link"},caption:{type:"array",source:"children",selector:"figcaption"}}},ids:{type:"array",default:[]},columns:{type:"number"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"}},save:function(e){var t=e.attributes,n=t.images,r=t.columns,o=void 0===r?zt(t):r,a=t.imageCrop,c=t.linkTo;return Object($.createElement)("ul",{className:"columns-".concat(o," ").concat(a?"is-cropped":"")},n.map((function(e){var t;switch(c){case"media":t=e.fullUrl||e.url;break;case"attachment":t=e.link}var n=Object($.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id,"data-full-url":e.fullUrl,"data-link":e.link,className:e.id?"wp-image-".concat(e.id):null});return Object($.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},Object($.createElement)("figure",null,t?Object($.createElement)("a",{href:t},n):n,e.caption&&e.caption.length>0&&Object($.createElement)(W.RichText.Content,{tagName:"figcaption",value:e.caption})))})))}},{attributes:{images:{type:"array",default:[],source:"query",selector:"ul.wp-block-gallery .blocks-gallery-item",query:{url:{source:"attribute",selector:"img",attribute:"src"},alt:{source:"attribute",selector:"img",attribute:"alt",default:""},id:{source:"attribute",selector:"img",attribute:"data-id"},link:{source:"attribute",selector:"img",attribute:"data-link"},caption:{type:"array",source:"children",selector:"figcaption"}}},columns:{type:"number"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"}},isEligible:function(e){var t=e.images,n=e.ids;return t&&t.length>0&&(!n&&t||n&&t&&n.length!==t.length||Object(J.some)(t,(function(e,t){return!e&&null!==n[t]||parseInt(e,10)!==n[t]})))},migrate:function(e){return Object(Z.a)({},e,{ids:Object(J.map)(e.images,(function(e){var t=e.id;return t?parseInt(t,10):null}))})},save:function(e){var t=e.attributes,n=t.images,r=t.columns,o=void 0===r?zt(t):r,a=t.imageCrop,c=t.linkTo;return Object($.createElement)("ul",{className:"columns-".concat(o," ").concat(a?"is-cropped":"")},n.map((function(e){var t;switch(c){case"media":t=e.url;break;case"attachment":t=e.link}var n=Object($.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id,"data-link":e.link,className:e.id?"wp-image-".concat(e.id):null});return Object($.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},Object($.createElement)("figure",null,t?Object($.createElement)("a",{href:t},n):n,e.caption&&e.caption.length>0&&Object($.createElement)(W.RichText.Content,{tagName:"figcaption",value:e.caption})))})))}},{attributes:{images:{type:"array",default:[],source:"query",selector:"div.wp-block-gallery figure.blocks-gallery-image img",query:{url:{source:"attribute",attribute:"src"},alt:{source:"attribute",attribute:"alt",default:""},id:{source:"attribute",attribute:"data-id"}}},columns:{type:"number"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"},align:{type:"string",default:"none"}},save:function(e){var t=e.attributes,n=t.images,r=t.columns,o=void 0===r?zt(t):r,a=t.align,c=t.imageCrop,i=t.linkTo,l=Q()("columns-".concat(o),{alignnone:"none"===a,"is-cropped":c});return Object($.createElement)("div",{className:l},n.map((function(e){var t;switch(i){case"media":t=e.url;break;case"attachment":t=e.link}var n=Object($.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id});return Object($.createElement)("figure",{key:e.id||e.url,className:"blocks-gallery-image"},t?Object($.createElement)("a",{href:t},n):n)})))}}],Ft=Object($.createElement)(se.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(se.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object($.createElement)(se.G,null,Object($.createElement)(se.Path,{d:"M20 4v12H8V4h12m0-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-8.5 9.67l1.69 2.26 2.48-3.1L19 15H9zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z"}))),Ut=Object($.createElement)(se.SVG,{width:"18",height:"18",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(se.Path,{d:"M5 8.70002L10.6 14.4L12 12.9L7.8 8.70002L12 4.50002L10.6 3.00002L5 8.70002Z"})),qt=Object($.createElement)(se.SVG,{width:"18",height:"18",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(se.Path,{d:"M13 8.7L7.4 3L6 4.5L10.2 8.7L6 12.9L7.4 14.4L13 8.7Z"})),Wt=function(e){function t(){var e;return Object(re.a)(this,t),(e=Object(ae.a)(this,Object(ce.a)(t).apply(this,arguments))).onSelectImage=e.onSelectImage.bind(Object(ie.a)(e)),e.onSelectCaption=e.onSelectCaption.bind(Object(ie.a)(e)),e.onRemoveImage=e.onRemoveImage.bind(Object(ie.a)(e)),e.bindContainer=e.bindContainer.bind(Object(ie.a)(e)),e.state={captionSelected:!1},e}return Object(le.a)(t,e),Object(oe.a)(t,[{key:"bindContainer",value:function(e){this.container=e}},{key:"onSelectCaption",value:function(){this.state.captionSelected||this.setState({captionSelected:!0}),this.props.isSelected||this.props.onSelect()}},{key:"onSelectImage",value:function(){this.props.isSelected||this.props.onSelect(),this.state.captionSelected&&this.setState({captionSelected:!1})}},{key:"onRemoveImage",value:function(e){this.container===document.activeElement&&this.props.isSelected&&-1!==[we.BACKSPACE,we.DELETE].indexOf(e.keyCode)&&(e.stopPropagation(),e.preventDefault(),this.props.onRemove())}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isSelected,r=t.image,o=t.url;r&&!o&&this.props.setAttributes({url:r.source_url,alt:r.alt_text}),this.state.captionSelected&&!n&&e.isSelected&&this.setState({captionSelected:!1})}},{key:"render",value:function(){var e,t=this.props,n=t.url,r=t.alt,o=t.id,a=t.linkTo,c=t.link,i=t.isFirstItem,l=t.isLastItem,s=t.isSelected,u=t.caption,b=t.onRemove,m=t.onMoveForward,d=t.onMoveBackward,h=t.setAttributes,p=t["aria-label"];switch(a){case"media":e=n;break;case"attachment":e=c}var g=Object($.createElement)($.Fragment,null,Object($.createElement)("img",{src:n,alt:r,"data-id":o,onClick:this.onSelectImage,onFocus:this.onSelectImage,onKeyDown:this.onRemoveImage,tabIndex:"0","aria-label":p,ref:this.bindContainer}),Object(Ce.isBlobURL)(n)&&Object($.createElement)(se.Spinner,null)),f=Q()({"is-selected":s,"is-transient":Object(Ce.isBlobURL)(n)});return Object($.createElement)("figure",{className:f},e?Object($.createElement)("a",{href:e},g):g,Object($.createElement)("div",{className:"block-library-gallery-item__move-menu"},Object($.createElement)(se.IconButton,{icon:Ut,onClick:i?void 0:d,className:"blocks-gallery-item__move-backward",label:Object(K.__)("Move image backward"),"aria-disabled":i,disabled:!s}),Object($.createElement)(se.IconButton,{icon:qt,onClick:l?void 0:m,className:"blocks-gallery-item__move-forward",label:Object(K.__)("Move image forward"),"aria-disabled":l,disabled:!s})),Object($.createElement)("div",{className:"block-library-gallery-item__inline-menu"},Object($.createElement)(se.IconButton,{icon:"no-alt",onClick:b,className:"blocks-gallery-item__remove",label:Object(K.__)("Remove image"),disabled:!s})),(s||u)&&Object($.createElement)(W.RichText,{tagName:"figcaption",placeholder:s?Object(K.__)("Write caption…"):null,value:u,isSelected:this.state.captionSelected,onChange:function(e){return h({caption:e})},unstableOnFocus:this.onSelectCaption,inlineToolbar:!0}))}}]),t}($.Component),Gt=Object(be.withSelect)((function(e,t){var n=e("core").getMedia,r=t.id;return{image:r?n(r):null}}))(Wt),Kt=[{value:"attachment",label:Object(K.__)("Attachment Page")},{value:"media",label:Object(K.__)("Media File")},{value:"none",label:Object(K.__)("None")}],Zt=["image"],$t=function(e){function t(){var e;return Object(re.a)(this,t),(e=Object(ae.a)(this,Object(ce.a)(t).apply(this,arguments))).onSelectImage=e.onSelectImage.bind(Object(ie.a)(e)),e.onSelectImages=e.onSelectImages.bind(Object(ie.a)(e)),e.setLinkTo=e.setLinkTo.bind(Object(ie.a)(e)),e.setColumnsNumber=e.setColumnsNumber.bind(Object(ie.a)(e)),e.toggleImageCrop=e.toggleImageCrop.bind(Object(ie.a)(e)),e.onMove=e.onMove.bind(Object(ie.a)(e)),e.onMoveForward=e.onMoveForward.bind(Object(ie.a)(e)),e.onMoveBackward=e.onMoveBackward.bind(Object(ie.a)(e)),e.onRemoveImage=e.onRemoveImage.bind(Object(ie.a)(e)),e.onUploadError=e.onUploadError.bind(Object(ie.a)(e)),e.setImageAttributes=e.setImageAttributes.bind(Object(ie.a)(e)),e.setAttributes=e.setAttributes.bind(Object(ie.a)(e)),e.onFocusGalleryCaption=e.onFocusGalleryCaption.bind(Object(ie.a)(e)),e.state={selectedImage:null,attachmentCaptions:null},e}return Object(le.a)(t,e),Object(oe.a)(t,[{key:"setAttributes",value:function(e){if(e.ids)throw new Error('The "ids" attribute should not be changed directly. It is managed automatically when "images" attribute changes');e.images&&(e=Object(Z.a)({},e,{ids:Object(J.map)(e.images,"id")})),this.props.setAttributes(e)}},{key:"onSelectImage",value:function(e){var t=this;return function(){t.state.selectedImage!==e&&t.setState({selectedImage:e})}}},{key:"onMove",value:function(e,t){var n=Object(U.a)(this.props.attributes.images);n.splice(t,1,this.props.attributes.images[e]),n.splice(e,1,this.props.attributes.images[t]),this.setState({selectedImage:t}),this.setAttributes({images:n})}},{key:"onMoveForward",value:function(e){var t=this;return function(){e!==t.props.attributes.images.length-1&&t.onMove(e,e+1)}}},{key:"onMoveBackward",value:function(e){var t=this;return function(){0!==e&&t.onMove(e,e-1)}}},{key:"onRemoveImage",value:function(e){var t=this;return function(){var n=Object(J.filter)(t.props.attributes.images,(function(t,n){return e!==n})),r=t.props.attributes.columns;t.setState({selectedImage:null}),t.setAttributes({images:n,columns:r?Math.min(n.length,r):r})}}},{key:"selectCaption",value:function(e,t,n){var r=Object(J.find)(t,{id:e.id}),o=r?r.caption:e.caption;if(!n)return o;var a=Object(J.find)(n,{id:e.id});return a&&a.caption!==e.caption?e.caption:o}},{key:"onSelectImages",value:function(e){var t=this,n=this.props.attributes,r=n.columns,o=n.images,a=this.state.attachmentCaptions;this.setState({attachmentCaptions:e.map((function(e){return{id:e.id,caption:e.caption}}))}),this.setAttributes({images:e.map((function(e){return Object(Z.a)({},Vt(e),{caption:t.selectCaption(e,o,a)})})),columns:r?Math.min(e.length,r):r})}},{key:"onUploadError",value:function(e){var t=this.props.noticeOperations;t.removeAllNotices(),t.createErrorNotice(e)}},{key:"setLinkTo",value:function(e){this.setAttributes({linkTo:e})}},{key:"setColumnsNumber",value:function(e){this.setAttributes({columns:e})}},{key:"toggleImageCrop",value:function(){this.setAttributes({imageCrop:!this.props.attributes.imageCrop})}},{key:"getImageCropHelp",value:function(e){return e?Object(K.__)("Thumbnails are cropped to align."):Object(K.__)("Thumbnails are not cropped.")}},{key:"onFocusGalleryCaption",value:function(){this.setState({selectedImage:null})}},{key:"setImageAttributes",value:function(e,t){var n=this.props.attributes.images,r=this.setAttributes;n[e]&&r({images:[].concat(Object(U.a)(n.slice(0,e)),[Object(Z.a)({},n[e],t)],Object(U.a)(n.slice(e+1)))})}},{key:"componentDidMount",value:function(){var e=this.props,t=e.attributes,n=e.mediaUpload,r=t.images;if(Object(J.every)(r,(function(e){var t=e.url;return Object(Ce.isBlobURL)(t)}))){var o=Object(J.map)(r,(function(e){var t=e.url;return Object(Ce.getBlobByURL)(t)}));Object(J.forEach)(r,(function(e){var t=e.url;return Object(Ce.revokeBlobURL)(t)})),n({filesList:o,onFileChange:this.onSelectImages,allowedTypes:["image"]})}}},{key:"componentDidUpdate",value:function(e){!this.props.isSelected&&e.isSelected&&this.setState({selectedImage:null,captionSelected:!1})}},{key:"render",value:function(){var e,t=this,n=this.props,r=n.attributes,o=n.className,a=n.isSelected,c=n.noticeUI,i=n.setAttributes,l=r.align,s=r.columns,u=void 0===s?zt(r):s,b=r.caption,m=r.imageCrop,d=r.images,h=r.linkTo,p=!!d.length,g=p&&Object(J.some)(d,(function(e){return e.id})),f=Object($.createElement)(W.MediaPlaceholder,{addToGallery:g,isAppender:p,className:o,dropZoneUIOnly:p&&!a,icon:!p&&Object($.createElement)(W.BlockIcon,{icon:Ft}),labels:{title:!p&&Object(K.__)("Gallery"),instructions:!p&&Object(K.__)("Drag images, upload new ones or select files from your library.")},onSelect:this.onSelectImages,accept:"image/*",allowedTypes:Zt,multiple:!0,value:g?d:void 0,onError:this.onUploadError,notices:p?void 0:c});if(!p)return f;var v=Q()("blocks-gallery-caption",{"screen-reader-text":!a&&W.RichText.isEmpty(b)});return Object($.createElement)($.Fragment,null,Object($.createElement)(W.InspectorControls,null,Object($.createElement)(se.PanelBody,{title:Object(K.__)("Gallery Settings")},d.length>1&&Object($.createElement)(se.RangeControl,{label:Object(K.__)("Columns"),value:u,onChange:this.setColumnsNumber,min:1,max:Math.min(8,d.length),required:!0}),Object($.createElement)(se.ToggleControl,{label:Object(K.__)("Crop Images"),checked:!!m,onChange:this.toggleImageCrop,help:this.getImageCropHelp}),Object($.createElement)(se.SelectControl,{label:Object(K.__)("Link To"),value:h,onChange:this.setLinkTo,options:Kt}))),c,Object($.createElement)("figure",{className:Q()(o,(e={},Object(q.a)(e,"align".concat(l),l),Object(q.a)(e,"columns-".concat(u),u),Object(q.a)(e,"is-cropped",m),e))},Object($.createElement)("ul",{className:"blocks-gallery-grid"},d.map((function(e,n){var r=Object(K.sprintf)(Object(K.__)("image %1$d of %2$d in gallery"),n+1,d.length);return Object($.createElement)("li",{className:"blocks-gallery-item",key:e.id||e.url},Object($.createElement)(Gt,{url:e.url,alt:e.alt,id:e.id,isFirstItem:0===n,isLastItem:n+1===d.length,isSelected:a&&t.state.selectedImage===n,onMoveBackward:t.onMoveBackward(n),onMoveForward:t.onMoveForward(n),onRemove:t.onRemoveImage(n),onSelect:t.onSelectImage(n),setAttributes:function(e){return t.setImageAttributes(n,e)},caption:e.caption,"aria-label":r}))}))),f,Object($.createElement)(W.RichText,{tagName:"figcaption",className:v,placeholder:Object(K.__)("Write gallery caption…"),value:b,unstableOnFocus:this.onFocusGalleryCaption,onChange:function(e){return i({caption:e})},inlineToolbar:!0})))}}]),t}($.Component),Yt=Object(ue.compose)([Object(be.withSelect)((function(e){return{mediaUpload:(0,e("core/block-editor").getSettings)().__experimentalMediaUpload}})),se.withNotices])($t);var Qt=function(e){return e?e.split(",").map((function(e){return parseInt(e,10)})):[]},Jt={from:[{type:"block",isMultiBlock:!0,blocks:["core/image"],transform:function(e){var t=e[0].align;t=Object(J.every)(e,["align",t])?t:void 0;var n=Object(J.filter)(e,(function(e){return e.url}));return Object(G.createBlock)("core/gallery",{images:n.map((function(e){return{id:e.id,url:e.url,alt:e.alt,caption:e.caption}})),ids:n.map((function(e){return e.id})),align:t})}},{type:"shortcode",tag:"gallery",attributes:{images:{type:"array",shortcode:function(e){var t=e.named.ids;return Qt(t).map((function(e){return{id:e}}))}},ids:{type:"array",shortcode:function(e){var t=e.named.ids;return Qt(t)}},columns:{type:"number",shortcode:function(e){var t=e.named.columns;return parseInt(void 0===t?"3":t,10)}},linkTo:{type:"string",shortcode:function(e){var t=e.named.link,n=void 0===t?"attachment":t;return"file"===n?"media":n}}}},{type:"files",isMatch:function(e){return 1!==e.length&&Object(J.every)(e,(function(e){return 0===e.type.indexOf("image/")}))},transform:function(e){return Object(G.createBlock)("core/gallery",{images:e.map((function(e){return Vt({url:Object(Ce.createBlobURL)(e)})}))})}}],to:[{type:"block",blocks:["core/image"],transform:function(e){var t=e.images,n=e.align;return t.length>0?t.map((function(e){var t=e.id,r=e.url,o=e.alt,a=e.caption;return Object(G.createBlock)("core/image",{id:t,url:r,alt:o,caption:a,align:n})})):Object(G.createBlock)("core/image",{align:n})}}]},Xt={name:"core/gallery",category:"common",attributes:{images:{type:"array",default:[],source:"query",selector:".blocks-gallery-item",query:{url:{source:"attribute",selector:"img",attribute:"src"},fullUrl:{source:"attribute",selector:"img",attribute:"data-full-url"},link:{source:"attribute",selector:"img",attribute:"data-link"},alt:{source:"attribute",selector:"img",attribute:"alt",default:""},id:{source:"attribute",selector:"img",attribute:"data-id"},caption:{type:"string",source:"html",selector:".blocks-gallery-item__caption"}}},ids:{type:"array",default:[]},columns:{type:"number"},caption:{type:"string",source:"html",selector:".blocks-gallery-caption"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"}}},en=Xt.name,tn={title:Object(K.__)("Gallery"),description:Object(K.__)("Display multiple images in a rich gallery."),icon:Ft,keywords:[Object(K.__)("images"),Object(K.__)("photos")],example:{attributes:{columns:2,images:[{url:"https://s.w.org/images/core/5.3/Glacial_lakes%2C_Bhutan.jpg"},{url:"https://s.w.org/images/core/5.3/Sediment_off_the_Yucatan_Peninsula.jpg"}]}},supports:{align:!0},transforms:Jt,edit:Yt,save:function(e){var t=e.attributes,n=t.images,r=t.columns,o=void 0===r?zt(t):r,a=t.imageCrop,c=t.caption,i=t.linkTo;return Object($.createElement)("figure",{className:"columns-".concat(o," ").concat(a?"is-cropped":"")},Object($.createElement)("ul",{className:"blocks-gallery-grid"},n.map((function(e){var t;switch(i){case"media":t=e.fullUrl||e.url;break;case"attachment":t=e.link}var n=Object($.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id,"data-full-url":e.fullUrl,"data-link":e.link,className:e.id?"wp-image-".concat(e.id):null});return Object($.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},Object($.createElement)("figure",null,t?Object($.createElement)("a",{href:t},n):n,!W.RichText.isEmpty(e.caption)&&Object($.createElement)(W.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-item__caption",value:e.caption})))}))),!W.RichText.isEmpty(c)&&Object($.createElement)(W.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-caption",value:c}))},deprecated:Dt},nn=n(58),rn=n.n(nn);var on=Object($.createElement)(se.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(se.Path,{d:"M21 6V20C21 21.1 20.1 22 19 22H5C3.89 22 3 21.1 3 20L3.01 6C3.01 4.9 3.89 4 5 4H6V2H8V4H16V2H18V4H19C20.1 4 21 4.9 21 6ZM5 8H19V6H5V8ZM19 20V10H5V20H19ZM11 12H17V14H11V12ZM17 16H11V18H17V16ZM7 12H9V14H7V12ZM9 18V16H7V18H9Z"})),an="core/archives",cn={title:Object(K.__)("Archives"),description:Object(K.__)("Display a monthly archive of your posts."),icon:on,category:"widgets",supports:{align:!0,html:!1},edit:function(e){var t=e.attributes,n=e.setAttributes,r=t.showPostCounts,o=t.displayAsDropdown;return Object($.createElement)($.Fragment,null,Object($.createElement)(W.InspectorControls,null,Object($.createElement)(se.PanelBody,{title:Object(K.__)("Archives Settings")},Object($.createElement)(se.ToggleControl,{label:Object(K.__)("Display as Dropdown"),checked:o,onChange:function(){return n({displayAsDropdown:!o})}}),Object($.createElement)(se.ToggleControl,{label:Object(K.__)("Show Post Counts"),checked:r,onChange:function(){return n({showPostCounts:!r})}}))),Object($.createElement)(se.Disabled,null,Object($.createElement)(rn.a,{block:"core/archives",attributes:t})))}},ln=Object($.createElement)(se.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(se.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),Object($.createElement)(se.Path,{d:"m12 3l0.01 10.55c-0.59-0.34-1.27-0.55-2-0.55-2.22 0-4.01 1.79-4.01 4s1.79 4 4.01 4 3.99-1.79 3.99-4v-10h4v-4h-6zm-1.99 16c-1.1 0-2-0.9-2-2s0.9-2 2-2 2 0.9 2 2-0.9 2-2 2z"})),sn=["audio"],un=function(e){function t(){var e;return Object(re.a)(this,t),(e=Object(ae.a)(this,Object(ce.a)(t).apply(this,arguments))).state={editing:!e.props.attributes.src},e.toggleAttribute=e.toggleAttribute.bind(Object(ie.a)(e)),e.onSelectURL=e.onSelectURL.bind(Object(ie.a)(e)),e.onUploadError=e.onUploadError.bind(Object(ie.a)(e)),e}return Object(le.a)(t,e),Object(oe.a)(t,[{key:"componentDidMount",value:function(){var e=this,t=this.props,n=t.attributes,r=t.mediaUpload,o=t.noticeOperations,a=t.setAttributes,c=n.id,i=n.src,l=void 0===i?"":i;if(!c&&Object(Ce.isBlobURL)(l)){var s=Object(Ce.getBlobByURL)(l);s&&r({filesList:[s],onFileChange:function(e){var t=Object(ke.a)(e,1)[0],n=t.id,r=t.url;a({id:n,src:r})},onError:function(t){a({src:void 0,id:void 0}),e.setState({editing:!0}),o.createErrorNotice(t)},allowedTypes:sn})}}},{key:"toggleAttribute",value:function(e){var t=this;return function(n){t.props.setAttributes(Object(q.a)({},e,n))}}},{key:"onSelectURL",value:function(e){var t=this.props,n=t.attributes,r=t.setAttributes;if(e!==n.src){var o=et({attributes:{url:e}});if(void 0!==o)return void this.props.onReplace(o);r({src:e,id:void 0})}this.setState({editing:!1})}},{key:"onUploadError",value:function(e){var t=this.props.noticeOperations;t.removeAllNotices(),t.createErrorNotice(e)}},{key:"getAutoplayHelp",value:function(e){return e?Object(K.__)("Note: Autoplaying audio may cause usability issues for some visitors."):null}},{key:"render",value:function(){var e=this,t=this.props.attributes,n=t.autoplay,r=t.caption,o=t.loop,a=t.preload,c=t.src,i=this.props,l=i.setAttributes,s=i.isSelected,u=i.className,b=i.noticeUI,m=this.state.editing,d=function(){e.setState({editing:!0})};return m?Object($.createElement)(W.MediaPlaceholder,{icon:Object($.createElement)(W.BlockIcon,{icon:ln}),className:u,onSelect:function(t){if(!t||!t.url)return l({src:void 0,id:void 0}),void d();l({src:t.url,id:t.id}),e.setState({src:t.url,editing:!1})},onSelectURL:this.onSelectURL,accept:"audio/*",allowedTypes:sn,value:this.props.attributes,notices:b,onError:this.onUploadError}):Object($.createElement)($.Fragment,null,Object($.createElement)(W.BlockControls,null,Object($.createElement)(se.Toolbar,null,Object($.createElement)(se.IconButton,{className:"components-icon-button components-toolbar__control",label:Object(K.__)("Edit audio"),onClick:d,icon:"edit"}))),Object($.createElement)(W.InspectorControls,null,Object($.createElement)(se.PanelBody,{title:Object(K.__)("Audio Settings")},Object($.createElement)(se.ToggleControl,{label:Object(K.__)("Autoplay"),onChange:this.toggleAttribute("autoplay"),checked:n,help:this.getAutoplayHelp}),Object($.createElement)(se.ToggleControl,{label:Object(K.__)("Loop"),onChange:this.toggleAttribute("loop"),checked:o}),Object($.createElement)(se.SelectControl,{label:Object(K.__)("Preload"),value:void 0!==a?a:"none",onChange:function(e){return l({preload:"none"!==e?e:void 0})},options:[{value:"auto",label:Object(K.__)("Auto")},{value:"metadata",label:Object(K.__)("Metadata")},{value:"none",label:Object(K.__)("None")}]}))),Object($.createElement)("figure",{className:u},Object($.createElement)(se.Disabled,null,Object($.createElement)("audio",{controls:"controls",src:c})),(!W.RichText.isEmpty(r)||s)&&Object($.createElement)(W.RichText,{tagName:"figcaption",placeholder:Object(K.__)("Write caption…"),value:r,onChange:function(e){return l({caption:e})},inlineToolbar:!0})))}}]),t}($.Component),bn=Object(ue.compose)([Object(be.withSelect)((function(e){return{mediaUpload:(0,e("core/block-editor").getSettings)().__experimentalMediaUpload}})),se.withNotices])(un);var mn={from:[{type:"files",isMatch:function(e){return 1===e.length&&0===e[0].type.indexOf("audio/")},transform:function(e){var t=e[0];return Object(G.createBlock)("core/audio",{src:Object(Ce.createBlobURL)(t)})}},{type:"shortcode",tag:"audio",attributes:{src:{type:"string",shortcode:function(e){return e.named.src}},loop:{type:"string",shortcode:function(e){return e.named.loop}},autoplay:{type:"string",shortcode:function(e){return e.named.autoplay}},preload:{type:"string",shortcode:function(e){return e.named.preload}}}}]},dn={name:"core/audio",category:"common",attributes:{src:{type:"string",source:"attribute",selector:"audio",attribute:"src"},caption:{type:"string",source:"html",selector:"figcaption"},id:{type:"number"},autoplay:{type:"boolean",source:"attribute",selector:"audio",attribute:"autoplay"},loop:{type:"boolean",source:"attribute",selector:"audio",attribute:"loop"},preload:{type:"string",source:"attribute",selector:"audio",attribute:"preload"}}},hn=dn.name,pn={title:Object(K.__)("Audio"),description:Object(K.__)("Embed a simple audio player."),icon:ln,transforms:mn,supports:{align:!0},edit:bn,save:function(e){var t=e.attributes,n=t.autoplay,r=t.caption,o=t.loop,a=t.preload,c=t.src;return Object($.createElement)("figure",null,Object($.createElement)("audio",{controls:"controls",src:c,autoPlay:n,loop:o,preload:a}),!W.RichText.isEmpty(r)&&Object($.createElement)(W.RichText.Content,{tagName:"figcaption",value:r}))}},gn=function(e){return Object(J.omit)(Object(Z.a)({},e,{customTextColor:e.textColor&&"#"===e.textColor[0]?e.textColor:void 0,customBackgroundColor:e.color&&"#"===e.color[0]?e.color:void 0}),["color","textColor"])},fn={url:{type:"string",source:"attribute",selector:"a",attribute:"href"},title:{type:"string",source:"attribute",selector:"a",attribute:"title"},text:{type:"string",source:"html",selector:"a"}},vn=[{attributes:Object(Z.a)({},fn,{align:{type:"string",default:"none"},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"}}),isEligible:function(e){return e.className&&e.className.includes("is-style-squared")},migrate:function(e){var t=e.className;return t&&(t=t.replace(/is-style-squared[\s]?/,"").trim()),Object(Z.a)({},e,{className:t||void 0,borderRadius:0})},save:function(e){var t,n=e.attributes,r=n.backgroundColor,o=n.customBackgroundColor,a=n.customTextColor,c=n.linkTarget,i=n.rel,l=n.text,s=n.textColor,u=n.title,b=n.url,m=Object(W.getColorClassName)("color",s),d=Object(W.getColorClassName)("background-color",r),h=Q()("wp-block-button__link",(t={"has-text-color":s||a},Object(q.a)(t,m,m),Object(q.a)(t,"has-background",r||o),Object(q.a)(t,d,d),t)),p={backgroundColor:d?void 0:o,color:m?void 0:a};return Object($.createElement)("div",null,Object($.createElement)(W.RichText.Content,{tagName:"a",className:h,href:b,title:u,style:p,value:l,target:c,rel:i}))}},{attributes:Object(Z.a)({},fn,{align:{type:"string",default:"none"},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"}}),save:function(e){var t,n=e.attributes,r=n.url,o=n.text,a=n.title,c=n.backgroundColor,i=n.textColor,l=n.customBackgroundColor,s=n.customTextColor,u=Object(W.getColorClassName)("color",i),b=Object(W.getColorClassName)("background-color",c),m=Q()("wp-block-button__link",(t={"has-text-color":i||s},Object(q.a)(t,u,u),Object(q.a)(t,"has-background",c||l),Object(q.a)(t,b,b),t)),d={backgroundColor:b?void 0:l,color:u?void 0:s};return Object($.createElement)("div",null,Object($.createElement)(W.RichText.Content,{tagName:"a",className:m,href:r,title:a,style:d,value:o}))},migrate:gn},{attributes:Object(Z.a)({},fn,{color:{type:"string"},textColor:{type:"string"},align:{type:"string",default:"none"}}),save:function(e){var t=e.attributes,n=t.url,r=t.text,o=t.title,a=t.align,c={backgroundColor:t.color,color:t.textColor};return Object($.createElement)("div",{className:"align".concat(a)},Object($.createElement)(W.RichText.Content,{tagName:"a",className:"wp-block-button__link",href:n,title:o,style:c,value:r}))},migrate:gn},{attributes:Object(Z.a)({},fn,{color:{type:"string"},textColor:{type:"string"},align:{type:"string",default:"none"}}),save:function(e){var t=e.attributes,n=t.url,r=t.text,o=t.title,a=t.align,c=t.color,i=t.textColor;return Object($.createElement)("div",{className:"align".concat(a),style:{backgroundColor:c}},Object($.createElement)(W.RichText.Content,{tagName:"a",href:n,title:o,style:{color:i},value:r}))},migrate:gn}],On=window.getComputedStyle,jn=Object(se.withFallbackStyles)((function(e,t){var n=t.textColor,r=t.backgroundColor,o=r&&r.color,a=n&&n.color,c=!a&&e?e.querySelector('[contenteditable="true"]'):null;return{fallbackBackgroundColor:o||!e?void 0:On(e).backgroundColor,fallbackTextColor:a||!c?void 0:On(c).color}})),yn=0,_n=50,kn=5;function Cn(e){var t=e.borderRadius,n=void 0===t?"":t,r=e.setAttributes,o=Object($.useCallback)((function(e){r({borderRadius:e})}),[r]);return Object($.createElement)(se.PanelBody,{title:Object(K.__)("Border Settings")},Object($.createElement)(se.RangeControl,{value:n,label:Object(K.__)("Border Radius"),min:yn,max:_n,initialPosition:kn,allowReset:!0,onChange:o}))}var wn=function(e){function t(){var e;return Object(re.a)(this,t),(e=Object(ae.a)(this,Object(ce.a)(t).apply(this,arguments))).nodeRef=null,e.bindRef=e.bindRef.bind(Object(ie.a)(e)),e.onSetLinkRel=e.onSetLinkRel.bind(Object(ie.a)(e)),e.onToggleOpenInNewTab=e.onToggleOpenInNewTab.bind(Object(ie.a)(e)),e}return Object(le.a)(t,e),Object(oe.a)(t,[{key:"bindRef",value:function(e){e&&(this.nodeRef=e)}},{key:"onSetLinkRel",value:function(e){this.props.setAttributes({rel:e})}},{key:"onToggleOpenInNewTab",value:function(e){var t=this.props.attributes.rel,n=e?"_blank":void 0,r=t;n&&!t?r="noreferrer noopener":n||"noreferrer noopener"!==t||(r=void 0),this.props.setAttributes({linkTarget:n,rel:r})}},{key:"render",value:function(){var e,t=this.props,n=t.attributes,r=t.backgroundColor,o=t.textColor,a=t.setBackgroundColor,c=t.setTextColor,i=t.fallbackBackgroundColor,l=t.fallbackTextColor,s=t.setAttributes,u=t.className,b=t.instanceId,m=t.isSelected,d=n.borderRadius,h=n.linkTarget,p=n.placeholder,g=n.rel,f=n.text,v=n.title,O=n.url,j="wp-block-button__inline-link-".concat(b);return Object($.createElement)("div",{className:u,title:v,ref:this.bindRef},Object($.createElement)(W.RichText,{placeholder:p||Object(K.__)("Add text…"),value:f,onChange:function(e){return s({text:e})},withoutInteractiveFormatting:!0,className:Q()("wp-block-button__link",(e={"has-background":r.color},Object(q.a)(e,r.class,r.class),Object(q.a)(e,"has-text-color",o.color),Object(q.a)(e,o.class,o.class),Object(q.a)(e,"no-border-radius",0===d),e)),style:{backgroundColor:r.color,color:o.color,borderRadius:d?d+"px":void 0}}),Object($.createElement)(se.BaseControl,{label:Object(K.__)("Link"),className:"wp-block-button__inline-link",id:j},Object($.createElement)(W.URLInput,{className:"wp-block-button__inline-link-input",value:O,autoFocus:!1,onChange:function(e){return s({url:e})},disableSuggestions:!m,id:j,isFullWidth:!0,hasBorder:!0})),Object($.createElement)(W.InspectorControls,null,Object($.createElement)(W.PanelColorSettings,{title:Object(K.__)("Color Settings"),colorSettings:[{value:r.color,onChange:a,label:Object(K.__)("Background Color")},{value:o.color,onChange:c,label:Object(K.__)("Text Color")}]},Object($.createElement)(W.ContrastChecker,{isLargeText:!1,textColor:o.color,backgroundColor:r.color,fallbackBackgroundColor:i,fallbackTextColor:l})),Object($.createElement)(Cn,{borderRadius:d,setAttributes:s}),Object($.createElement)(se.PanelBody,{title:Object(K.__)("Link settings")},Object($.createElement)(se.ToggleControl,{label:Object(K.__)("Open in new tab"),onChange:this.onToggleOpenInNewTab,checked:"_blank"===h}),Object($.createElement)(se.TextControl,{label:Object(K.__)("Link rel"),value:g||"",onChange:this.onSetLinkRel}))))}}]),t}($.Component),En=Object(ue.compose)([ue.withInstanceId,Object(W.withColors)("backgroundColor",{textColor:"color"}),jn])(wn),xn=Object($.createElement)(se.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(se.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object($.createElement)(se.G,null,Object($.createElement)(se.Path,{d:"M19 6H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 10H5V8h14v8z"})));var Sn={name:"core/button",category:"layout",attributes:{url:{type:"string",source:"attribute",selector:"a",attribute:"href"},title:{type:"string",source:"attribute",selector:"a",attribute:"title"},text:{type:"string",source:"html",selector:"a"},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},borderRadius:{type:"number"}}},Tn=Sn.name,Nn={title:Object(K.__)("Button"),description:Object(K.__)("Prompt visitors to take action with a button-style link."),icon:xn,keywords:[Object(K.__)("link")],example:{attributes:{className:"is-style-fill",backgroundColor:"vivid-green-cyan",text:Object(K.__)("Call to Action")}},supports:{align:!0,alignWide:!1},styles:[{name:"fill",label:Object(K.__)("Fill"),isDefault:!0},{name:"outline",label:Object(K.__)("Outline")}],edit:En,save:function(e){var t,n=e.attributes,r=n.backgroundColor,o=n.borderRadius,a=n.customBackgroundColor,c=n.customTextColor,i=n.linkTarget,l=n.rel,s=n.text,u=n.textColor,b=n.title,m=n.url,d=Object(W.getColorClassName)("color",u),h=Object(W.getColorClassName)("background-color",r),p=Q()("wp-block-button__link",(t={"has-text-color":u||c},Object(q.a)(t,d,d),Object(q.a)(t,"has-background",r||a),Object(q.a)(t,h,h),Object(q.a)(t,"no-border-radius",0===o),t)),g={backgroundColor:h?void 0:a,color:d?void 0:c,borderRadius:o?o+"px":void 0};return Object($.createElement)("div",null,Object($.createElement)(W.RichText.Content,{tagName:"a",className:p,href:m,title:b,style:g,value:s,target:i,rel:l}))},deprecated:vn},Rn=n(29),An=n.n(Rn),Bn=function(e){function t(){var e;return Object(re.a)(this,t),(e=Object(ae.a)(this,Object(ce.a)(t).apply(this,arguments))).getYearMonth=Qe()(e.getYearMonth.bind(Object(ie.a)(e)),{maxSize:1}),e.getServerSideAttributes=Qe()(e.getServerSideAttributes.bind(Object(ie.a)(e)),{maxSize:1}),e}return Object(le.a)(t,e),Object(oe.a)(t,[{key:"getYearMonth",value:function(e){if(!e)return{};var t=An()(e);return{year:t.year(),month:t.month()+1}}},{key:"getServerSideAttributes",value:function(e,t){return Object(Z.a)({},e,this.getYearMonth(t))}},{key:"render",value:function(){return Object($.createElement)(se.Disabled,null,Object($.createElement)(rn.a,{block:"core/calendar",attributes:this.getServerSideAttributes(this.props.attributes,this.props.date)}))}}]),t}($.Component),In=Object(be.withSelect)((function(e){var t=e("core/editor");if(t){var n=t.getEditedPostAttribute;return{date:"post"===n("type")?n("date"):void 0}}}))(Bn),Mn=Object($.createElement)(se.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(se.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object($.createElement)(se.G,null,Object($.createElement)(se.Path,{d:"M7 11h2v2H7v-2zm14-5v14c0 1.1-.9 2-2 2H5c-1.11 0-2-.9-2-2l.01-14c0-1.1.88-2 1.99-2h1V2h2v2h8V2h2v2h1c1.1 0 2 .9 2 2zM5 8h14V6H5v2zm14 12V10H5v10h14zm-4-7h2v-2h-2v2zm-4 0h2v-2h-2v2z"}))),Pn="core/calendar",Ln={title:Object(K.__)("Calendar"),description:Object(K.__)("A calendar of your site’s posts."),icon:Mn,category:"widgets",keywords:[Object(K.__)("posts"),Object(K.__)("archive")],supports:{align:!0},example:{},edit:In},Hn=function(e){function t(){var e;return Object(re.a)(this,t),(e=Object(ae.a)(this,Object(ce.a)(t).apply(this,arguments))).toggleDisplayAsDropdown=e.toggleDisplayAsDropdown.bind(Object(ie.a)(e)),e.toggleShowPostCounts=e.toggleShowPostCounts.bind(Object(ie.a)(e)),e.toggleShowHierarchy=e.toggleShowHierarchy.bind(Object(ie.a)(e)),e}return Object(le.a)(t,e),Object(oe.a)(t,[{key:"toggleDisplayAsDropdown",value:function(){var e=this.props,t=e.attributes;(0,e.setAttributes)({displayAsDropdown:!t.displayAsDropdown})}},{key:"toggleShowPostCounts",value:function(){var e=this.props,t=e.attributes;(0,e.setAttributes)({showPostCounts:!t.showPostCounts})}},{key:"toggleShowHierarchy",value:function(){var e=this.props,t=e.attributes;(0,e.setAttributes)({showHierarchy:!t.showHierarchy})}},{key:"getCategories",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=this.props.categories;return t&&t.length?null===e?t:t.filter((function(t){return t.parent===e})):[]}},{key:"getCategoryListClassName",value:function(e){return"wp-block-categories__list wp-block-categories__list-level-".concat(e)}},{key:"renderCategoryName",value:function(e){return e.name?Object(J.unescape)(e.name).trim():Object(K.__)("(Untitled)")}},{key:"renderCategoryList",value:function(){var e=this,t=this.props.attributes.showHierarchy?0:null,n=this.getCategories(t);return Object($.createElement)("ul",{className:this.getCategoryListClassName(0)},n.map((function(t){return e.renderCategoryListItem(t,0)})))}},{key:"renderCategoryListItem",value:function(e,t){var n=this,r=this.props.attributes,o=r.showHierarchy,a=r.showPostCounts,c=this.getCategories(e.id);return Object($.createElement)("li",{key:e.id},Object($.createElement)("a",{href:e.link,target:"_blank",rel:"noreferrer noopener"},this.renderCategoryName(e)),a&&Object($.createElement)("span",{className:"wp-block-categories__post-count"}," ","(",e.count,")"),o&&!!c.length&&Object($.createElement)("ul",{className:this.getCategoryListClassName(t+1)},c.map((function(e){return n.renderCategoryListItem(e,t+1)}))))}},{key:"renderCategoryDropdown",value:function(){var e=this,t=this.props.instanceId,n=this.props.attributes.showHierarchy?0:null,r=this.getCategories(n),o="blocks-category-select-".concat(t);return Object($.createElement)($.Fragment,null,Object($.createElement)("label",{htmlFor:o,className:"screen-reader-text"},Object(K.__)("Categories")),Object($.createElement)("select",{id:o,className:"wp-block-categories__dropdown"},r.map((function(t){return e.renderCategoryDropdownItem(t,0)}))))}},{key:"renderCategoryDropdownItem",value:function(e,t){var n=this,r=this.props.attributes,o=r.showHierarchy,a=r.showPostCounts,c=this.getCategories(e.id);return[Object($.createElement)("option",{key:e.id},Object(J.times)(3*t,(function(){return" "})),this.renderCategoryName(e),a?" (".concat(e.count,")"):""),o&&!!c.length&&c.map((function(e){return n.renderCategoryDropdownItem(e,t+1)}))]}},{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.isRequesting,r=t.displayAsDropdown,o=t.showHierarchy,a=t.showPostCounts,c=Object($.createElement)(W.InspectorControls,null,Object($.createElement)(se.PanelBody,{title:Object(K.__)("Categories Settings")},Object($.createElement)(se.ToggleControl,{label:Object(K.__)("Display as Dropdown"),checked:r,onChange:this.toggleDisplayAsDropdown}),Object($.createElement)(se.ToggleControl,{label:Object(K.__)("Show Hierarchy"),checked:o,onChange:this.toggleShowHierarchy}),Object($.createElement)(se.ToggleControl,{label:Object(K.__)("Show Post Counts"),checked:a,onChange:this.toggleShowPostCounts})));return n?Object($.createElement)($.Fragment,null,c,Object($.createElement)(se.Placeholder,{icon:"admin-post",label:Object(K.__)("Categories")},Object($.createElement)(se.Spinner,null))):Object($.createElement)($.Fragment,null,c,Object($.createElement)("div",{className:this.props.className},r?this.renderCategoryDropdown():this.renderCategoryList()))}}]),t}($.Component),zn=Object(ue.compose)(Object(be.withSelect)((function(e){var t=e("core").getEntityRecords,n=e("core/data").isResolving,r={per_page:-1,hide_empty:!0};return{categories:t("taxonomy","category",r),isRequesting:n("core","getEntityRecords",["taxonomy","category",r])}})),ue.withInstanceId)(Hn),Vn=Object($.createElement)(se.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(se.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),Object($.createElement)(se.Path,{d:"M12,2l-5.5,9h11L12,2z M12,5.84L13.93,9h-3.87L12,5.84z"}),Object($.createElement)(se.Path,{d:"m17.5 13c-2.49 0-4.5 2.01-4.5 4.5s2.01 4.5 4.5 4.5 4.5-2.01 4.5-4.5-2.01-4.5-4.5-4.5zm0 7c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"}),Object($.createElement)(se.Path,{d:"m3 21.5h8v-8h-8v8zm2-6h4v4h-4v-4z"})),Dn="core/categories",Fn={title:Object(K.__)("Categories"),description:Object(K.__)("Display a list of all categories."),icon:Vn,category:"widgets",supports:{align:!0,html:!1},edit:zn};function Un(e){return Object(J.flow)(qn,Gn,Zn)(e||"")}function qn(e){return e.replace(/&/g,"&")}function Wn(e){return e.replace(/&/g,"&")}function Gn(e){return e.replace(/\[/g,"[")}function Kn(e){return e.replace(/[/g,"[")}function Zn(e){return e.replace(/^(\s*https?:)\/\/([^\s<>"]+\s*)$/m,"$1//$2")}function $n(e){return e.replace(/^(\s*https?:)//([^\s<>"]+\s*)$/m,"$1//$2")}var Yn=Object($.createElement)(se.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(se.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),Object($.createElement)(se.Path,{d:"M9.4,16.6L4.8,12l4.6-4.6L8,6l-6,6l6,6L9.4,16.6z M14.6,16.6l4.6-4.6l-4.6-4.6L16,6l6,6l-6,6L14.6,16.6z"}));var Qn={from:[{type:"enter",regExp:/^```$/,transform:function(){return Object(G.createBlock)("core/code")}},{type:"raw",isMatch:function(e){return"PRE"===e.nodeName&&1===e.children.length&&"CODE"===e.firstChild.nodeName},schema:{pre:{children:{code:{children:{"#text":{}}}}}}}]},Jn={name:"core/code",category:"formatting",attributes:{content:{type:"string",source:"text",selector:"code"}}},Xn=Jn.name,er={title:Object(K.__)("Code"),description:Object(K.__)("Display code snippets that respect your spacing and tabs."),icon:Yn,example:{attributes:{content:Object(K.__)('// A "block" is the abstract term used')+"\n"+Object(K.__)("// to describe units of markup that,")+"\n"+Object(K.__)("// when composed together, form the")+"\n"+Object(K.__)("// content or layout of a page.")+"\n"+Object(K.__)("registerBlockType( name, settings );")}},supports:{html:!1},transforms:Qn,edit:function(e){var t,n=e.attributes,r=e.setAttributes,o=e.className;return Object($.createElement)("div",{className:o},Object($.createElement)(W.PlainText,{value:(t=n.content,Object(J.flow)($n,Kn,Wn)(t||"")),onChange:function(e){return r({content:Un(e)})},placeholder:Object(K.__)("Write code…"),"aria-label":Object(K.__)("Code")}))},save:function(e){var t=e.attributes;return Object($.createElement)("pre",null,Object($.createElement)("code",null,t.content))}};function tr(e){var t,n=tr.doc;n||(n=document.implementation.createHTMLDocument(""),tr.doc=n),n.body.innerHTML=e;var r=!0,o=!1,a=void 0;try{for(var c,i=n.body.firstChild.classList[Symbol.iterator]();!(r=(c=i.next()).done);r=!0){if(t=c.value.match(/^layout-column-(\d+)$/))return Number(t[1])-1}}catch(e){o=!0,a=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw a}}}var nr=[{attributes:{columns:{type:"number",default:2}},isEligible:function(e,t){return!!t.some((function(e){return/layout-column-\d+/.test(e.originalContent)}))&&t.some((function(e){return void 0!==tr(e.originalContent)}))},migrate:function(e,t){var n=t.reduce((function(e,t){var n=tr(t.originalContent);return void 0===n&&(n=0),e[n]||(e[n]=[]),e[n].push(t),e}),[]).map((function(e){return Object(G.createBlock)("core/column",{},e)}));return[Object(J.omit)(e,["columns"]),n]},save:function(e){var t=e.attributes.columns;return Object($.createElement)("div",{className:"has-".concat(t,"-columns")},Object($.createElement)(W.InnerBlocks.Content,null))}},{attributes:{columns:{type:"number",default:2}},migrate:function(e,t){return[e=Object(J.omit)(e,["columns"]),t]},save:function(e){var t=e.attributes,n=t.verticalAlignment,r=t.columns,o=Q()("has-".concat(r,"-columns"),Object(q.a)({},"are-vertically-aligned-".concat(n),n));return Object($.createElement)("div",{className:o},Object($.createElement)(W.InnerBlocks.Content,null))}}],rr=Qe()((function(e){return void 0===e?null:Object(J.times)(e,(function(){return["core/column"]}))})),or=function(e){return Number.isFinite(e)?parseFloat(e.toFixed(2)):void 0};function ar(e,t){var n=e.attributes.width;return or(void 0===n?100/t:n)}function cr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.length;return Object(J.sumBy)(e,(function(e){return ar(e,t)}))}function ir(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.length;return e.reduce((function(e,n){var r=ar(n,t);return Object.assign(e,Object(q.a)({},n.clientId,r))}),{})}function lr(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=(t-cr(e,n))/e.length;return Object(J.mapValues)(ir(e,n),(function(e){return or(e+r)}))}function sr(e,t){return e.map((function(e){return Object(J.merge)({},e,{attributes:{width:t[e.clientId]}})}))}var ur=["core/column"],br=[{title:Object(K.__)("Two columns; equal split"),icon:Object($.createElement)(se.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(se.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M39 12C40.1046 12 41 12.8954 41 14V34C41 35.1046 40.1046 36 39 36H9C7.89543 36 7 35.1046 7 34V14C7 12.8954 7.89543 12 9 12H39ZM39 34V14H25V34H39ZM23 34H9V14H23V34Z"})),template:[["core/column"],["core/column"]]},{title:Object(K.__)("Two columns; one-third, two-thirds split"),icon:Object($.createElement)(se.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(se.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M39 12C40.1046 12 41 12.8954 41 14V34C41 35.1046 40.1046 36 39 36H9C7.89543 36 7 35.1046 7 34V14C7 12.8954 7.89543 12 9 12H39ZM39 34V14H20V34H39ZM18 34H9V14H18V34Z"})),template:[["core/column",{width:33.33}],["core/column",{width:66.66}]]},{title:Object(K.__)("Two columns; two-thirds, one-third split"),icon:Object($.createElement)(se.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(se.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M39 12C40.1046 12 41 12.8954 41 14V34C41 35.1046 40.1046 36 39 36H9C7.89543 36 7 35.1046 7 34V14C7 12.8954 7.89543 12 9 12H39ZM39 34V14H30V34H39ZM28 34H9V14H28V34Z"})),template:[["core/column",{width:66.66}],["core/column",{width:33.33}]]},{title:Object(K.__)("Three columns; equal split"),icon:Object($.createElement)(se.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(se.Path,{fillRule:"evenodd",d:"M41 14a2 2 0 0 0-2-2H9a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h30a2 2 0 0 0 2-2V14zM28.5 34h-9V14h9v20zm2 0V14H39v20h-8.5zm-13 0H9V14h8.5v20z"})),template:[["core/column"],["core/column"],["core/column"]]},{title:Object(K.__)("Three columns; wide center column"),icon:Object($.createElement)(se.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(se.Path,{fillRule:"evenodd",d:"M41 14a2 2 0 0 0-2-2H9a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h30a2 2 0 0 0 2-2V14zM31 34H17V14h14v20zm2 0V14h6v20h-6zm-18 0H9V14h6v20z"})),template:[["core/column",{width:25}],["core/column",{width:50}],["core/column",{width:25}]]}],mr=2;var dr=Object(be.withDispatch)((function(e,t,n){return{updateAlignment:function(r){var o=t.clientId,a=t.setAttributes,c=e("core/block-editor").updateBlockAttributes,i=n.select("core/block-editor").getBlockOrder;a({verticalAlignment:r}),i(o).forEach((function(e){c(e,{verticalAlignment:r})}))},updateColumns:function(r,o){var a=t.clientId,c=e("core/block-editor").replaceInnerBlocks,i=(0,n.select("core/block-editor").getBlocks)(a),l=i.some((function(e){return Number.isFinite(e.attributes.width)})),s=o>r;if(s&&l){var u=or(100/o),b=lr(i,100-u);i=[].concat(Object(U.a)(sr(i,b)),Object(U.a)(Object(J.times)(o-r,(function(){return Object(G.createBlock)("core/column",{width:u})}))))}else if(s)i=[].concat(Object(U.a)(i),Object(U.a)(Object(J.times)(o-r,(function(){return Object(G.createBlock)("core/column")}))));else{if(i=Object(J.dropRight)(i,r-o),l)i=sr(i,lr(i,100))}c(a,i,!1)}}}))((function(e){var t=e.attributes,n=e.className,r=e.updateAlignment,o=e.updateColumns,a=e.clientId,c=t.verticalAlignment,i=Object(be.useSelect)((function(e){return{count:e("core/block-editor").getBlockCount(a)}})).count,l=Object($.useState)(rr(i)),s=Object(ke.a)(l,2),u=s[0],b=s[1],m=Object($.useState)(!1),d=Object(ke.a)(m,2),h=d[0],p=d[1];Object($.useEffect)((function(){h&&p(!1)}),[h]);var g=Q()(n,Object(q.a)({},"are-vertically-aligned-".concat(c),c)),f=0===i&&!h||!u;return Object($.createElement)($.Fragment,null,!f&&Object($.createElement)($.Fragment,null,Object($.createElement)(W.InspectorControls,null,Object($.createElement)(se.PanelBody,null,Object($.createElement)(se.RangeControl,{label:Object(K.__)("Columns"),value:i,onChange:function(e){return o(i,e)},min:2,max:6}))),Object($.createElement)(W.BlockControls,null,Object($.createElement)(W.BlockVerticalAlignmentToolbar,{onChange:r,value:c}))),Object($.createElement)("div",{className:g},Object($.createElement)(W.InnerBlocks,{__experimentalTemplateOptions:br,__experimentalOnSelectTemplateOption:function(e){void 0===e&&(e=rr(mr)),b(e),p(!0)},__experimentalAllowTemplateOptionSkip:!0,template:f?null:u,templateLock:"all",allowedBlocks:ur})))})),hr=Object($.createElement)(se.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(se.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object($.createElement)(se.G,null,Object($.createElement)(se.Path,{d:"M4,4H20a2,2,0,0,1,2,2V18a2,2,0,0,1-2,2H4a2,2,0,0,1-2-2V6A2,2,0,0,1,4,4ZM4 6V18H8V6Zm6 0V18h4V6Zm6 0V18h4V6Z"})));var pr={name:"core/columns",category:"layout",attributes:{verticalAlignment:{type:"string"}}},gr=pr.name,fr={title:Object(K.__)("Columns"),icon:hr,description:Object(K.__)("Add a block that displays content in multiple columns, then add whatever content blocks you’d like."),supports:{align:["wide","full"],html:!1},example:{innerBlocks:[{name:"core/column",innerBlocks:[{name:"core/paragraph",attributes:{content:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent et eros eu felis."}},{name:"core/image",attributes:{url:"https://s.w.org/images/core/5.3/Windbuchencom.jpg"}},{name:"core/paragraph",attributes:{content:"Suspendisse commodo neque lacus, a dictum orci interdum et."}}]},{name:"core/column",innerBlocks:[{name:"core/paragraph",attributes:{content:Object(K.__)("Etiam et egestas lorem. Vivamus sagittis sit amet dolor quis lobortis. Integer sed fermentum arcu, id vulputate lacus. Etiam fermentum sem eu quam hendrerit.")}},{name:"core/paragraph",attributes:{content:Object(K.__)("Nam risus massa, ullamcorper consectetur eros fermentum, porta aliquet ligula. Sed vel mauris nec enim.")}}]}]},deprecated:nr,edit:dr,save:function(e){var t=e.attributes.verticalAlignment,n=Q()(Object(q.a)({},"are-vertically-aligned-".concat(t),t));return Object($.createElement)("div",{className:n},Object($.createElement)(W.InnerBlocks.Content,null))}};var vr=Object(ue.compose)(Object(be.withSelect)((function(e,t){var n=t.clientId;return{hasChildBlocks:(0,e("core/block-editor").getBlockOrder)(n).length>0}})),Object(be.withDispatch)((function(e,t,n){return{updateAlignment:function(r){var o=t.clientId,a=t.setAttributes,c=e("core/block-editor").updateBlockAttributes,i=n.select("core/block-editor").getBlockRootClientId;a({verticalAlignment:r}),c(i(o),{verticalAlignment:null})},updateWidth:function(r){var o=t.clientId,a=e("core/block-editor").updateBlockAttributes,c=n.select("core/block-editor"),i=c.getBlockRootClientId,l=(0,c.getBlocks)(i(o)),s=function(e,t){var n=Object(J.findIndex)(e,{clientId:t});return n===e.length-1?e.slice(0,n):e.slice(n+1)}(l,o),u=r+cr(Object(J.difference)(l,[Object(J.find)(l,{clientId:o})].concat(Object(U.a)(s)))),b=Object(Z.a)({},ir(l,l.length),Object(q.a)({},o,or(r)),lr(s,100-u,l.length));Object(J.forEach)(b,(function(e,t){a(t,{width:e})}))}}})))((function(e){var t=e.attributes,n=e.className,r=e.updateAlignment,o=e.updateWidth,a=e.hasChildBlocks,c=t.verticalAlignment,i=t.width,l=Q()(n,"block-core-columns",Object(q.a)({},"is-vertically-aligned-".concat(c),c));return Object($.createElement)("div",{className:l},Object($.createElement)(W.BlockControls,null,Object($.createElement)(W.BlockVerticalAlignmentToolbar,{onChange:r,value:c})),Object($.createElement)(W.InspectorControls,null,Object($.createElement)(se.PanelBody,{title:Object(K.__)("Column Settings")},Object($.createElement)(se.RangeControl,{label:Object(K.__)("Percentage width"),value:i||"",onChange:o,min:0,max:100,required:!0,allowReset:!0}))),Object($.createElement)(W.InnerBlocks,{templateLock:!1,renderAppender:a?void 0:function(){return Object($.createElement)(W.InnerBlocks.ButtonBlockAppender,null)}}))})),Or=Object($.createElement)(se.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object($.createElement)(se.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object($.createElement)(se.Path,{d:"M11.99 18.54l-7.37-5.73L3 14.07l9 7 9-7-1.63-1.27zM12 16l7.36-5.73L21 9l-9-7-9 7 1.63 1.27L12 16zm0-11.47L17.74 9 12 13.47 6.26 9 12 4.53z"}));var jr={name:"core/column",category:"common",attributes:{verticalAlignment:{type:"string"},width:{type:"number",min:0,max:100}}},yr=jr.name,_r={title:Object(K.__)("Column"),parent:["core/columns"],icon:Or,description:Object(K.__)("A single column within a columns block."),supports:{inserter:!1,reusable:!1,html:!1},getEditWrapperProps:function(e){var t=e.width;if(Number.isFinite(t))return{style:{flexBasis:t+"%"}}},edit:vr,save:function(e){var t,n=e.attributes,r=n.verticalAlignment,o=n.width,a=Q()(Object(q.a)({},"is-vertically-aligned-".concat(r),r));return Number.isFinite(o)&&(t={flexBasis:o+"%"}),Object($.createElement)("div",{className:a,style:t},Object($.createElement)(W.InnerBlocks.Content,null))}},kr="image",Cr="video",wr=50;function Er(e){return e?{backgroundImage:"url(".concat(e,")")}:{}}function xr(e){return 0===e||50===e?null:"has-background-dim-"+10*Math.round(e/10)}var Sr={url:{type:"string"},id:{type:"number"},hasParallax:{type:"boolean",default:!1},dimRatio:{type:"number",default:50},overlayColor:{type:"string"},customOverlayColor:{type:"string"},backgroundType:{type:"string",default:"image"},focalPoint:{type:"object"}},Tr=[{attributes:Object(Z.a)({},Sr,{title:{type:"string",source:"html",selector:"p"},contentAlign:{type:"string",default:"center"}}),supports:{align:!0},save:function(e){var t=e.attributes,n=t.backgroundType,r=t.contentAlign,o=t.customOverlayColor,a=t.dimRatio,c=t.focalPoint,i=t.hasParallax,l=t.overlayColor,s=t.title,u=t.url,b=Object(W.getColorClassName)("background-color",l),m=n===kr?Er(u):{};b||(m.backgroundColor=o),c&&!i&&(m.backgroundPosition="".concat(100*c.x,"% ").concat(100*c.y,"%"));var d=Q()(xr(a),b,Object(q.a)({"has-background-dim":0!==a,"has-parallax":i},"has-".concat(r,"-content"),"center"!==r));return Object($.createElement)("div",{className:d,style:m},Cr===n&&u&&Object($.createElement)("video",{className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,src:u}),!W.RichText.isEmpty(s)&&Object($.createElement)(W.RichText.Content,{tagName:"p",className:"wp-block-cover-text",value:s}))},migrate:function(e){return[Object(J.omit)(e,["title","contentAlign"]),[Object(G.createBlock)("core/paragraph",{content:e.title,align:e.contentAlign,fontSize:"large",placeholder:Object(K.__)("Write title…")})]]}},{attributes:Object(Z.a)({},Sr,{title:{type:"string",source:"html",selector:"p"},contentAlign:{type:"string",default:"center"},align:{type:"string"}}),supports:{className:!1},save:function(e){var t=e.attributes,n=t.url,r=t.title,o=t.hasParallax,a=t.dimRatio,c=t.align,i=t.contentAlign,l=t.overlayColor,s=t.customOverlayColor,u=Object(W.getColorClassName)("background-color",l),b=Er(n);u||(b.backgroundColor=s);var m=Q()("wp-block-cover-image",xr(a),u,Object(q.a)({"has-background-dim":0!==a,"has-parallax":o},"has-".concat(i,"-content"),"center"!==i),c?"align".concat(c):null);return Object($.createElement)("div",{className:m,style:b},!W.RichText.isEmpty(r)&&Object($.createElement)(W.RichText.Content,{tagName:"p",className:"wp-block-cover-image-text",value:r}))},migrate:function(e){return[Object(J.omit)(e,["title","contentAlign","align"]),[Object(G.createBlock)("core/paragraph",{content:e.title,align:e.contentAlign,fontSize:"large",placeholder:Object(K.__)("Write title…")})]]}},{attributes:Object(Z.a)({},Sr,{title:{type:"string",source:"html",selector:"h2"},align:{type:"string"},contentAlign:{type:"string",default:"center"}}),supports:{className:!1},save:function(e){var t=e.attributes,n=t.url,r=t.title,o=t.hasParallax,a=t.dimRatio,c=t.align,i=Er(n),l=Q()("wp-block-cover-image",xr(a),{"has-background-dim":0!==a,"has-parallax":o},c?"align".concat(c):null);return Object($.createElement)("section",{className:l,style:i},Object($.createElement)(W.RichText.Content,{tagName:"h2",value:r}))},migrate:function(e){return[Object(J.omit)(e,["title","contentAlign","align"]),[Object(G.createBlock)("core/paragraph",{content:e.title,align:e.contentAlign,fontSize:"large",placeholder:Object(K.__)("Write title…")})]]}}],Nr=n(221),Rr=n.n(Nr),Ar=n(48),Br=n.n(Ar),Ir=Object($.createElement)(se.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object($.createElement)(se.Path,{d:"M4 4h7V2H4c-1.1 0-2 .9-2 2v7h2V4zm6 9l-4 5h12l-3-4-2.03 2.71L10 13zm7-4.5c0-.83-.67-1.5-1.5-1.5S14 7.67 14 8.5s.67 1.5 1.5 1.5S17 9.33 17 8.5zM20 2h-7v2h7v7h2V4c0-1.1-.9-2-2-2zm0 18h-7v2h7c1.1 0 2-.9 2-2v-7h-2v7zM4 13H2v7c0 1.1.9 2 2 2h7v-2H4v-7z"}),Object($.createElement)(se.Path,{d:"M0 0h24v24H0z",fill:"none"})),Mr=["image","video"],Pr=[["core/paragraph",{align:"center",fontSize:"large",placeholder:Object(K.__)("Write title…")}]];function Lr(){return Lr.fastAverageColor||(Lr.fastAverageColor=new Rr.a),Lr.fastAverageColor}var Hr=Object(ue.withInstanceId)((function(e){var t=e.value,n=void 0===t?"":t,r=e.instanceId,o=e.onChange,a=Object($.useState)(null),c=Object(ke.a)(a,2),i=c[0],l=c[1],s=Object($.useCallback)((function(e){var t=""!==e.target.value?parseInt(e.target.value,10):void 0;(isNaN(t)||t"+Object(K.__)("One of the hardest things to do in technology is disrupt yourself.")+"
",citation:"Matt Mullenweg"}},styles:[{name:"default",label:Object(K._x)("Default","block style"),isDefault:!0},{name:"solid-color",label:Object(K.__)("Solid Color")}],supports:{align:["left","right","wide","full"]},edit:Na,save:function(e){var t,n,r=e.attributes,o=r.mainColor,a=r.customMainColor,c=r.textColor,i=r.customTextColor,l=r.value,s=r.citation,u=r.className;if(Object(J.includes)(u,Ea)){var b=Object(W.getColorClassName)("background-color",o);t=Q()(Object(q.a)({"has-background":b||a},b,b)),n={backgroundColor:b?void 0:a}}else if(a)n={borderColor:a};else if(o){var m=Object(J.get)(Object(be.select)("core/block-editor").getSettings(),["colors"],[]);n={borderColor:Object(W.getColorObjectByAttributeValues)(m,o).color}}var d=Object(W.getColorClassName)("color",c),h=(c||i)&&Q()("has-text-color",Object(q.a)({},d,d)),p=d?void 0:{color:i};return Object($.createElement)("figure",{className:t,style:n},Object($.createElement)("blockquote",{className:h,style:p},Object($.createElement)(W.RichText.Content,{value:l,multiline:!0}),!W.RichText.isEmpty(s)&&Object($.createElement)(W.RichText.Content,{tagName:"cite",value:s})))},deprecated:Sa},Ma=function(e){function t(){var e;return Object(re.a)(this,t),(e=Object(ae.a)(this,Object(ce.a)(t).apply(this,arguments))).titleField=Object($.createRef)(),e.editButton=Object($.createRef)(),e.handleFormSubmit=e.handleFormSubmit.bind(Object(ie.a)(e)),e.handleTitleChange=e.handleTitleChange.bind(Object(ie.a)(e)),e.handleTitleKeyDown=e.handleTitleKeyDown.bind(Object(ie.a)(e)),e}return Object(le.a)(t,e),Object(oe.a)(t,[{key:"componentDidMount",value:function(){this.props.isEditing&&this.titleField.current&&this.titleField.current.select()}},{key:"componentDidUpdate",value:function(e){!e.isEditing&&this.props.isEditing&&this.titleField.current.select(),!e.isEditing&&!e.isSaving||this.props.isEditing||this.props.isSaving||this.editButton.current.focus()}},{key:"handleFormSubmit",value:function(e){e.preventDefault(),this.props.onSave()}},{key:"handleTitleChange",value:function(e){this.props.onChangeTitle(e.target.value)}},{key:"handleTitleKeyDown",value:function(e){e.keyCode===we.ESCAPE&&(e.stopPropagation(),this.props.onCancel())}},{key:"render",value:function(){var e=this.props,t=e.isEditing,n=e.title,r=e.isSaving,o=e.isEditDisabled,a=e.onEdit,c=e.instanceId;return Object($.createElement)($.Fragment,null,!t&&!r&&Object($.createElement)("div",{className:"reusable-block-edit-panel"},Object($.createElement)("b",{className:"reusable-block-edit-panel__info"},n),Object($.createElement)(se.Button,{ref:this.editButton,isLarge:!0,className:"reusable-block-edit-panel__button",disabled:o,onClick:a},Object(K.__)("Edit"))),(t||r)&&Object($.createElement)("form",{className:"reusable-block-edit-panel",onSubmit:this.handleFormSubmit},Object($.createElement)("label",{htmlFor:"reusable-block-edit-panel__title-".concat(c),className:"reusable-block-edit-panel__label"},Object(K.__)("Name:")),Object($.createElement)("input",{ref:this.titleField,type:"text",disabled:r,className:"reusable-block-edit-panel__title",value:n,onChange:this.handleTitleChange,onKeyDown:this.handleTitleKeyDown,id:"reusable-block-edit-panel__title-".concat(c)}),Object($.createElement)(se.Button,{type:"submit",isLarge:!0,isBusy:r,disabled:!n||r,className:"reusable-block-edit-panel__button"},Object(K.__)("Save"))))}}]),t}($.Component),Pa=Object(ue.withInstanceId)(Ma);var La=function(e){var t=e.title,n=Object(K.sprintf)(Object(K.__)("Reusable Block: %s"),t);return Object($.createElement)(se.Tooltip,{text:n},Object($.createElement)("span",{className:"reusable-block-indicator"},Object($.createElement)(se.Dashicon,{icon:"controls-repeat"})))},Ha=function(e){function t(e){var n,r=e.reusableBlock;return Object(re.a)(this,t),(n=Object(ae.a)(this,Object(ce.a)(t).apply(this,arguments))).startEditing=n.startEditing.bind(Object(ie.a)(n)),n.stopEditing=n.stopEditing.bind(Object(ie.a)(n)),n.setBlocks=n.setBlocks.bind(Object(ie.a)(n)),n.setTitle=n.setTitle.bind(Object(ie.a)(n)),n.save=n.save.bind(Object(ie.a)(n)),n.state=r?{isEditing:r.isTemporary,title:r.title,blocks:Object(G.parse)(r.content)}:{isEditing:!1,title:null,blocks:[]},n}return Object(le.a)(t,e),Object(oe.a)(t,[{key:"componentDidMount",value:function(){this.props.reusableBlock||this.props.fetchReusableBlock()}},{key:"componentDidUpdate",value:function(e){e.reusableBlock!==this.props.reusableBlock&&null===this.state.title&&this.setState({title:this.props.reusableBlock.title,blocks:Object(G.parse)(this.props.reusableBlock.content)})}},{key:"startEditing",value:function(){var e=this.props.reusableBlock;this.setState({isEditing:!0,title:e.title,blocks:Object(G.parse)(e.content)})}},{key:"stopEditing",value:function(){this.setState({isEditing:!1,title:null,blocks:[]})}},{key:"setBlocks",value:function(e){this.setState({blocks:e})}},{key:"setTitle",value:function(e){this.setState({title:e})}},{key:"save",value:function(){var e=this.props,t=e.onChange,n=e.onSave,r=this.state,o=r.blocks;t({title:r.title,content:Object(G.serialize)(o)}),n(),this.stopEditing()}},{key:"render",value:function(){var e=this.props,t=e.isSelected,n=e.reusableBlock,r=e.isFetching,o=e.isSaving,a=e.canUpdateBlock,c=e.settings,i=this.state,l=i.isEditing,s=i.title,u=i.blocks;if(!n&&r)return Object($.createElement)(se.Placeholder,null,Object($.createElement)(se.Spinner,null));if(!n)return Object($.createElement)(se.Placeholder,null,Object(K.__)("Block has been deleted or is unavailable."));var b=Object($.createElement)(W.BlockEditorProvider,{settings:c,value:u,onChange:this.setBlocks,onInput:this.setBlocks},Object($.createElement)(W.WritingFlow,null,Object($.createElement)(W.BlockList,null)));return l||(b=Object($.createElement)(se.Disabled,null,b)),Object($.createElement)("div",{className:"block-library-block__reusable-block-container"},(t||l)&&Object($.createElement)(Pa,{isEditing:l,title:null!==s?s:n.title,isSaving:o&&!n.isTemporary,isEditDisabled:!a,onEdit:this.startEditing,onChangeTitle:this.setTitle,onSave:this.save,onCancel:this.stopEditing}),!t&&!l&&Object($.createElement)(La,{title:n.title}),b)}}]),t}($.Component),za=Object(ue.compose)([Object(be.withSelect)((function(e,t){var n=e("core/editor"),r=n.__experimentalGetReusableBlock,o=n.__experimentalIsFetchingReusableBlock,a=n.__experimentalIsSavingReusableBlock,c=e("core").canUser,i=e("core/block-editor"),l=i.__experimentalGetParsedReusableBlock,s=i.getSettings,u=t.attributes.ref,b=r(u);return{reusableBlock:b,isFetching:o(u),isSaving:a(u),blocks:b?l(b.id):null,canUpdateBlock:!!b&&!b.isTemporary&&!!c("update","blocks",u),settings:s()}})),Object(be.withDispatch)((function(e,t){var n=e("core/editor"),r=n.__experimentalFetchReusableBlocks,o=n.__experimentalUpdateReusableBlock,a=n.__experimentalSaveReusableBlock,c=t.attributes.ref;return{fetchReusableBlock:Object(J.partial)(r,c),onChange:Object(J.partial)(o,c),onSave:Object(J.partial)(a,c)}}))])(Ha),Va="core/block",Da={title:Object(K.__)("Reusable Block"),category:"reusable",description:Object(K.__)("Create content, and save it for you and other contributors to reuse across your site. Update the block, and the changes apply everywhere it’s used."),supports:{customClassName:!1,html:!1,inserter:!1},edit:za},Fa=function(e){function t(){var e;return Object(re.a)(this,t),(e=Object(ae.a)(this,Object(ce.a)(t).apply(this,arguments))).state={editing:!e.props.attributes.feedURL},e.toggleAttribute=e.toggleAttribute.bind(Object(ie.a)(e)),e.onSubmitURL=e.onSubmitURL.bind(Object(ie.a)(e)),e}return Object(le.a)(t,e),Object(oe.a)(t,[{key:"toggleAttribute",value:function(e){var t=this;return function(){var n=t.props.attributes[e];(0,t.props.setAttributes)(Object(q.a)({},e,!n))}}},{key:"onSubmitURL",value:function(e){e.preventDefault(),this.props.attributes.feedURL&&this.setState({editing:!1})}},{key:"render",value:function(){var e=this,t=this.props.attributes,n=t.blockLayout,r=t.columns,o=t.displayAuthor,a=t.displayExcerpt,c=t.displayDate,i=t.excerptLength,l=t.feedURL,s=t.itemsToShow,u=this.props.setAttributes;if(this.state.editing)return Object($.createElement)(se.Placeholder,{icon:"rss",label:"RSS"},Object($.createElement)("form",{onSubmit:this.onSubmitURL},Object($.createElement)(se.TextControl,{placeholder:Object(K.__)("Enter URL here…"),value:l,onChange:function(e){return u({feedURL:e})},className:"components-placeholder__input"}),Object($.createElement)(se.Button,{isLarge:!0,type:"submit"},Object(K.__)("Use URL"))));var b=[{icon:"edit",title:Object(K.__)("Edit RSS URL"),onClick:function(){return e.setState({editing:!0})}},{icon:"list-view",title:Object(K.__)("List view"),onClick:function(){return u({blockLayout:"list"})},isActive:"list"===n},{icon:"grid-view",title:Object(K.__)("Grid view"),onClick:function(){return u({blockLayout:"grid"})},isActive:"grid"===n}];return Object($.createElement)($.Fragment,null,Object($.createElement)(W.BlockControls,null,Object($.createElement)(se.Toolbar,{controls:b})),Object($.createElement)(W.InspectorControls,null,Object($.createElement)(se.PanelBody,{title:Object(K.__)("RSS Settings")},Object($.createElement)(se.RangeControl,{label:Object(K.__)("Number of items"),value:s,onChange:function(e){return u({itemsToShow:e})},min:1,max:10,required:!0}),Object($.createElement)(se.ToggleControl,{label:Object(K.__)("Display author"),checked:o,onChange:this.toggleAttribute("displayAuthor")}),Object($.createElement)(se.ToggleControl,{label:Object(K.__)("Display date"),checked:c,onChange:this.toggleAttribute("displayDate")}),Object($.createElement)(se.ToggleControl,{label:Object(K.__)("Display excerpt"),checked:a,onChange:this.toggleAttribute("displayExcerpt")}),a&&Object($.createElement)(se.RangeControl,{label:Object(K.__)("Max number of words in excerpt"),value:i,onChange:function(e){return u({excerptLength:e})},min:10,max:100,required:!0}),"grid"===n&&Object($.createElement)(se.RangeControl,{label:Object(K.__)("Columns"),value:r,onChange:function(e){return u({columns:e})},min:2,max:6,required:!0}))),Object($.createElement)(se.Disabled,null,Object($.createElement)(rn.a,{block:"core/rss",attributes:this.props.attributes})))}}]),t}($.Component),Ua="core/rss",qa={title:Object(K.__)("RSS"),description:Object(K.__)("Display entries from any RSS or Atom feed."),icon:"rss",category:"widgets",keywords:[Object(K.__)("atom"),Object(K.__)("feed")],supports:{align:!0,html:!1},example:{attributes:{feedURL:"https://wordpress.org"}},edit:Fa};var Wa="core/search",Ga={title:Object(K.__)("Search"),description:Object(K.__)("Help visitors find your content."),icon:"search",category:"widgets",keywords:[Object(K.__)("find")],supports:{align:!0},example:{},edit:function(e){var t=e.className,n=e.attributes,r=e.setAttributes,o=n.label,a=n.placeholder,c=n.buttonText;return Object($.createElement)("div",{className:t},Object($.createElement)(W.RichText,{wrapperClassName:"wp-block-search__label","aria-label":Object(K.__)("Label text"),placeholder:Object(K.__)("Add label…"),withoutInteractiveFormatting:!0,value:o,onChange:function(e){return r({label:e})}}),Object($.createElement)("input",{className:"wp-block-search__input","aria-label":Object(K.__)("Optional placeholder text"),placeholder:a?void 0:Object(K.__)("Optional placeholder…"),value:a,onChange:function(e){return r({placeholder:e.target.value})}}),Object($.createElement)(W.RichText,{wrapperClassName:"wp-block-search__button",className:"wp-block-search__button-rich-text","aria-label":Object(K.__)("Button text"),placeholder:Object(K.__)("Add button text…"),withoutInteractiveFormatting:!0,value:c,onChange:function(e){return r({buttonText:e})}}))}},Ka=[{attributes:{backgroundColor:{type:"string"},customBackgroundColor:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1},save:function(e){var t=e.attributes,n=t.backgroundColor,r=t.customBackgroundColor,o=Object(W.getColorClassName)("background-color",n),a=Q()(o,{"has-background":n||r}),c={backgroundColor:o?void 0:r};return Object($.createElement)("div",{className:a,style:c},Object($.createElement)(W.InnerBlocks.Content,null))}}];var Za=Object(ue.compose)([Object(W.withColors)("backgroundColor"),Object(be.withSelect)((function(e,t){var n=t.clientId,r=(0,e("core/block-editor").getBlock)(n);return{hasInnerBlocks:!(!r||!r.innerBlocks.length)}}))])((function(e){var t=e.className,n=e.setBackgroundColor,r=e.backgroundColor,o=e.hasInnerBlocks,a={backgroundColor:r.color},c=Q()(t,r.class,{"has-background":!!r.color});return Object($.createElement)($.Fragment,null,Object($.createElement)(W.InspectorControls,null,Object($.createElement)(W.PanelColorSettings,{title:Object(K.__)("Color Settings"),colorSettings:[{value:r.color,onChange:n,label:Object(K.__)("Background Color")}]})),Object($.createElement)("div",{className:c,style:a},Object($.createElement)("div",{className:"wp-block-group__inner-container"},Object($.createElement)(W.InnerBlocks,{renderAppender:!o&&W.InnerBlocks.ButtonBlockAppender}))))})),$a=Object($.createElement)(se.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(se.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M9 8a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1h-1v3a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1v-4a1 1 0 0 1 1-1h1V8zm2 3h4V9h-4v2zm2 2H9v2h4v-2z"}),Object($.createElement)(se.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M2 4.732A2 2 0 1 1 4.732 2h14.536A2 2 0 1 1 22 4.732v14.536A2 2 0 1 1 19.268 22H4.732A2 2 0 1 1 2 19.268V4.732zM4.732 4h14.536c.175.304.428.557.732.732v14.536a2.01 2.01 0 0 0-.732.732H4.732A2.01 2.01 0 0 0 4 19.268V4.732A2.01 2.01 0 0 0 4.732 4z"}));var Ya={name:"core/group",category:"layout",attributes:{backgroundColor:{type:"string"},customBackgroundColor:{type:"string"}}},Qa=Ya.name,Ja={title:Object(K.__)("Group"),icon:$a,description:Object(K.__)("A block that groups other blocks."),keywords:[Object(K.__)("container"),Object(K.__)("wrapper"),Object(K.__)("row"),Object(K.__)("section")],example:{attributes:{customBackgroundColor:"#ffffff"},innerBlocks:[{name:"core/paragraph",attributes:{customTextColor:"#cf2e2e",fontSize:"large",content:Object(K.__)("One.")}},{name:"core/paragraph",attributes:{customTextColor:"#ff6900",fontSize:"large",content:Object(K.__)("Two.")}},{name:"core/paragraph",attributes:{customTextColor:"#fcb900",fontSize:"large",content:Object(K.__)("Three.")}},{name:"core/paragraph",attributes:{customTextColor:"#00d084",fontSize:"large",content:Object(K.__)("Four.")}},{name:"core/paragraph",attributes:{customTextColor:"#0693e3",fontSize:"large",content:Object(K.__)("Five.")}},{name:"core/paragraph",attributes:{customTextColor:"#9b51e0",fontSize:"large",content:Object(K.__)("Six.")}}]},supports:{align:["wide","full"],anchor:!0,html:!1},transforms:{from:[{type:"block",isMultiBlock:!0,blocks:["*"],__experimentalConvert:function(e){if(1!==e.length||"core/group"!==e[0].name){var t=["wide","full"],n=e.reduce((function(e,n){var r=n.attributes.align;return t.indexOf(r)>t.indexOf(e)?r:e}),void 0),r=e.map((function(e){return Object(G.createBlock)(e.name,e.attributes,e.innerBlocks)}));return Object(G.createBlock)("core/group",{align:n},r)}}}]},edit:Za,save:function(e){var t=e.attributes,n=t.backgroundColor,r=t.customBackgroundColor,o=Object(W.getColorClassName)("background-color",n),a=Q()(o,{"has-background":n||r}),c={backgroundColor:o?void 0:r};return Object($.createElement)("div",{className:a,style:c},Object($.createElement)("div",{className:"wp-block-group__inner-container"},Object($.createElement)(W.InnerBlocks.Content,null)))},deprecated:Ka};var Xa=Object(W.withColors)("color",{textColor:"color"})((function(e){var t=e.color,n=e.setColor,r=e.className;return Object($.createElement)($.Fragment,null,Object($.createElement)(se.HorizontalRule,{className:Q()(r,Object(q.a)({"has-background":t.color},t.class,t.class)),style:{backgroundColor:t.color,color:t.color}}),Object($.createElement)(W.InspectorControls,null,Object($.createElement)(W.PanelColorSettings,{title:Object(K.__)("Color Settings"),colorSettings:[{value:t.color,onChange:n,label:Object(K.__)("Color")}]})))})),ec=Object($.createElement)(se.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(se.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object($.createElement)(se.Path,{d:"M19 13H5v-2h14v2z"}));var tc={from:[{type:"enter",regExp:/^-{3,}$/,transform:function(){return Object(G.createBlock)("core/separator")}},{type:"raw",selector:"hr",schema:{hr:{}}}]},nc={name:"core/separator",category:"layout",attributes:{color:{type:"string"},customColor:{type:"string"}}},rc=nc.name,oc={title:Object(K.__)("Separator"),description:Object(K.__)("Create a break between ideas or sections with a horizontal separator."),icon:ec,keywords:[Object(K.__)("horizontal-line"),"hr",Object(K.__)("divider")],example:{attributes:{customColor:"#065174",className:"is-style-wide"}},styles:[{name:"default",label:Object(K.__)("Default"),isDefault:!0},{name:"wide",label:Object(K.__)("Wide Line")},{name:"dots",label:Object(K.__)("Dots")}],transforms:tc,edit:Xa,save:function(e){var t,n=e.attributes,r=n.color,o=n.customColor,a=Object(W.getColorClassName)("background-color",r),c=Object(W.getColorClassName)("color",r),i=Q()((t={"has-text-color has-background":r||o},Object(q.a)(t,a,a),Object(q.a)(t,c,c),t)),l={backgroundColor:a?void 0:o,color:c?void 0:o};return Object($.createElement)("hr",{className:i,style:l})}},ac=Object(ue.withInstanceId)((function(e){var t=e.attributes,n=e.setAttributes,r=e.instanceId,o="blocks-shortcode-input-".concat(r);return Object($.createElement)("div",{className:"wp-block-shortcode components-placeholder"},Object($.createElement)("label",{htmlFor:o,className:"components-placeholder__label"},Object($.createElement)(se.Dashicon,{icon:"shortcode"}),Object(K.__)("Shortcode")),Object($.createElement)(W.PlainText,{className:"input-control",id:o,value:t.text,placeholder:Object(K.__)("Write shortcode here…"),onChange:function(e){return n({text:e})}}))})),cc=Object($.createElement)(se.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(se.Path,{d:"M8.5,21.4l1.9,0.5l5.2-19.3l-1.9-0.5L8.5,21.4z M3,19h4v-2H5V7h2V5H3V19z M17,5v2h2v10h-2v2h4V5H17z"}));var ic=n(69),lc={from:[{type:"shortcode",tag:"[a-z][a-z0-9_-]*",attributes:{text:{type:"string",shortcode:function(e,t){var n=t.content;return Object(ic.removep)(Object(ic.autop)(n))}}},priority:20}]},sc="core/shortcode",uc={title:Object(K.__)("Shortcode"),description:Object(K.__)("Insert additional custom elements with a WordPress shortcode."),icon:cc,category:"widgets",transforms:lc,supports:{customClassName:!1,className:!1,html:!1},edit:ac,save:function(e){var t=e.attributes;return Object($.createElement)($.RawHTML,null,t.text)}},bc=Object(ue.compose)([Object(be.withDispatch)((function(e){var t=e("core/block-editor").toggleSelection;return{onResizeStart:function(){return t(!1)},onResizeStop:function(){return t(!0)}}})),ue.withInstanceId])((function(e){var t=e.attributes,n=e.isSelected,r=e.setAttributes,o=e.instanceId,a=e.onResizeStart,c=e.onResizeStop,i=t.height,l="block-spacer-height-input-".concat(o),s=Object($.useState)(i),u=Object(ke.a)(s,2),b=u[0],m=u[1];return Object($.createElement)($.Fragment,null,Object($.createElement)(se.ResizableBox,{className:Q()("block-library-spacer__resize-container",{"is-selected":n}),size:{height:i},minHeight:"20",enable:{top:!1,right:!1,bottom:!0,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},onResizeStart:a,onResizeStop:function(e,t,n,o){c();var a=parseInt(i+o.height,10);r({height:a}),m(a)}}),Object($.createElement)(W.InspectorControls,null,Object($.createElement)(se.PanelBody,{title:Object(K.__)("Spacer Settings")},Object($.createElement)(se.BaseControl,{label:Object(K.__)("Height in pixels"),id:l},Object($.createElement)("input",{type:"number",id:l,onChange:function(e){var t=parseInt(e.target.value,10);m(t),isNaN(t)?(m(""),t=100):t<20&&(t=20),r({height:t})},value:b,min:"20",step:"10"})))))})),mc=Object($.createElement)(se.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(se.G,null,Object($.createElement)(se.Path,{d:"M13 4v2h3.59L6 16.59V13H4v7h7v-2H7.41L18 7.41V11h2V4h-7"})));var dc={name:"core/spacer",category:"layout",attributes:{height:{type:"number",default:100}}},hc=dc.name,pc={title:Object(K.__)("Spacer"),description:Object(K.__)("Add white space between blocks and customize its height."),icon:mc,edit:bc,save:function(e){var t=e.attributes;return Object($.createElement)("div",{style:{height:t.height},"aria-hidden":!0})}},gc=n(37),fc=n.n(gc);var vc=Object($.createElement)(se.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object($.createElement)(se.Path,{d:"M7.1 6l-.5 3h4.5L9.4 19h3l1.8-10h4.5l.5-3H7.1z"}));var Oc={to:[{type:"block",blocks:["core/paragraph"],transform:function(e){return Object(G.createBlock)("core/paragraph",e)}}]},jc={name:"core/subhead",category:"common",attributes:{align:{type:"string"},content:{type:"string",source:"html",selector:"p"}}},yc=jc.name,_c={title:Object(K.__)("Subheading (deprecated)"),description:Object(K.__)("This block is deprecated. Please use the Paragraph block instead."),icon:vc,supports:{inserter:!1,multiple:!1},transforms:Oc,edit:function(e){var t=e.attributes,n=e.setAttributes,r=e.className,o=t.align,a=t.content,c=t.placeholder;return fc()("The Subheading block",{alternative:"the Paragraph block",plugin:"Gutenberg"}),Object($.createElement)($.Fragment,null,Object($.createElement)(W.BlockControls,null,Object($.createElement)(W.AlignmentToolbar,{value:o,onChange:function(e){n({align:e})}})),Object($.createElement)(W.RichText,{tagName:"p",value:a,onChange:function(e){n({content:e})},style:{textAlign:o},className:r,placeholder:c||Object(K.__)("Write subheading…")}))},save:function(e){var t=e.attributes,n=t.align,r=t.content;return Object($.createElement)(W.RichText.Content,{tagName:"p",style:{textAlign:n},value:r})}},kc=[{attributes:{hasFixedLayout:{type:"boolean",default:!1},backgroundColor:{type:"string"},head:{type:"array",default:[],source:"query",selector:"thead tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:{content:{type:"string",source:"html"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"},align:{type:"string",source:"attribute",attribute:"data-align"}}}}},body:{type:"array",default:[],source:"query",selector:"tbody tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:{content:{type:"string",source:"html"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"},align:{type:"string",source:"attribute",attribute:"data-align"}}}}},foot:{type:"array",default:[],source:"query",selector:"tfoot tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:{content:{type:"string",source:"html"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"},align:{type:"string",source:"attribute",attribute:"data-align"}}}}}},supports:{align:!0},save:function(e){var t=e.attributes,n=t.hasFixedLayout,r=t.head,o=t.body,a=t.foot,c=t.backgroundColor;if(!r.length&&!o.length&&!a.length)return null;var i=Object(W.getColorClassName)("background-color",c),l=Q()(i,{"has-fixed-layout":n,"has-background":!!i}),s=function(e){var t=e.type,n=e.rows;if(!n.length)return null;var r="t".concat(t);return Object($.createElement)(r,null,n.map((function(e,t){var n=e.cells;return Object($.createElement)("tr",{key:t},n.map((function(e,t){var n=e.content,r=e.tag,o=e.scope;return Object($.createElement)(W.RichText.Content,{tagName:r,value:n,key:t,scope:"th"===r?o:void 0})})))})))};return Object($.createElement)("table",{className:l},Object($.createElement)(s,{type:"head",rows:r}),Object($.createElement)(s,{type:"body",rows:o}),Object($.createElement)(s,{type:"foot",rows:a}))}}],Cc=["align"];function wc(e,t,n){if(!t)return e;var r=Object(J.pick)(e,["head","body","foot"]),o=t.sectionName,a=t.rowIndex;return Object(J.mapValues)(r,(function(e,r){return o&&o!==r?e:e.map((function(e,o){return a&&a!==o?e:{cells:e.cells.map((function(e,a){return Ec({sectionName:r,columnIndex:a,rowIndex:o},t)?n(e):e}))}}))}))}function Ec(e,t){if(!e||!t)return!1;switch(t.type){case"column":return"column"===t.type&&e.columnIndex===t.columnIndex;case"cell":return"cell"===t.type&&e.sectionName===t.sectionName&&e.columnIndex===t.columnIndex&&e.rowIndex===t.rowIndex}}function xc(e,t){var n=t.sectionName,r=t.rowIndex,o=t.columnCount,a=function(e){return Nc(e.head)?Nc(e.body)?Nc(e.foot)?void 0:e.foot[0]:e.body[0]:e.head[0]}(e),c=void 0===o?Object(J.get)(a,["cells","length"]):o;return c?Object(q.a)({},n,[].concat(Object(U.a)(e[n].slice(0,r)),[{cells:Object(J.times)(c,(function(e){var t=Object(J.get)(a,["cells",e],{}),r=Object(J.pick)(t,Cc);return Object(Z.a)({},r,{content:"",tag:"head"===n?"th":"td"})}))}],Object(U.a)(e[n].slice(r)))):e}function Sc(e,t){var n=t.columnIndex,r=Object(J.pick)(e,["head","body","foot"]);return Object(J.mapValues)(r,(function(e,t){return Nc(e)?e:e.map((function(e){return Rc(e)||e.cells.length".concat(t,"
")})}},{type:"block",blocks:["core/pullquote"],transform:function(e){var t=e.value,n=e.citation;return Object(G.createBlock)("core/quote",{value:t,citation:n})}},{type:"prefix",prefix:">",transform:function(e){return Object(G.createBlock)("core/quote",{value:"".concat(e,"
")})}},{type:"raw",isMatch:function(e){var t,n=(t=!1,function(e){return"P"===e.nodeName||(t||"CITE"!==e.nodeName?void 0:(t=!0,!0))});return"BLOCKQUOTE"===e.nodeName&&Array.from(e.childNodes).every(n)},schema:{blockquote:{children:{p:{children:Object(G.getPhrasingContentSchema)()},cite:{children:Object(G.getPhrasingContentSchema)()}}}}}],to:[{type:"block",blocks:["core/paragraph"],transform:function(e){var t=e.value,n=e.citation,r=[];return t&&""!==t&&r.push.apply(r,Object(U.a)(Object(It.split)(Object(It.create)({html:t,multilineTag:"p"}),"\u2028").map((function(e){return Object(G.createBlock)("core/paragraph",{content:Object(It.toHTMLString)({value:e})})})))),n&&""!==n&&r.push(Object(G.createBlock)("core/paragraph",{content:n})),0===r.length?Object(G.createBlock)("core/paragraph",{content:""}):r}},{type:"block",blocks:["core/heading"],transform:function(e){var t=e.value,n=e.citation,r=Object(Bt.a)(e,["value","citation"]);if(""===t)return Object(G.createBlock)("core/heading",{content:n});var o=Object(It.split)(Object(It.create)({html:t,multilineTag:"p"}),"\u2028"),a=Object(G.createBlock)("core/heading",{content:Object(It.toHTMLString)({value:o[0]})});if(!n&&1===o.length)return a;var c=o.slice(1);return[a,Object(G.createBlock)("core/quote",Object(Z.a)({},r,{citation:n,value:Object(It.toHTMLString)({value:c.length?Object(It.join)(o.slice(1),"\u2028"):Object(It.create)(),multilineTag:"p"})}))]}},{type:"block",blocks:["core/pullquote"],transform:function(e){var t=e.value,n=e.citation;return Object(G.createBlock)("core/pullquote",{value:t,citation:n})}}]},Pt={name:"core/quote",category:"common",attributes:{value:{type:"string",source:"html",selector:"blockquote",multiline:"p",default:""},citation:{type:"string",source:"html",selector:"cite",default:""},align:{type:"string"}}},Lt=Pt.name,Ht={title:Object(K.__)("Quote"),description:Object(K.__)('Give quoted text visual emphasis. "In quoting others, we cite ourselves." — Julio Cortázar'),icon:At,keywords:[Object(K.__)("blockquote"),Object(K.__)("cite")],example:{attributes:{value:""+Object(K.__)("In quoting others, we cite ourselves.")+"
",citation:"Julio Cortázar",className:"is-style-large"}},styles:[{name:"default",label:Object(K._x)("Default","block style"),isDefault:!0},{name:"large",label:Object(K._x)("Large","block style")}],transforms:Mt,edit:function(e){var t=e.attributes,n=e.setAttributes,r=e.isSelected,o=e.mergeBlocks,a=e.onReplace,c=e.className,i=t.align,l=t.value,s=t.citation;return Object($.createElement)($.Fragment,null,Object($.createElement)(W.BlockControls,null,Object($.createElement)(W.AlignmentToolbar,{value:i,onChange:function(e){n({align:e})}})),Object($.createElement)(se.BlockQuotation,{className:Q()(c,Object(q.a)({},"has-text-align-".concat(i),i))},Object($.createElement)(W.RichText,{identifier:"value",multiline:!0,value:l,onChange:function(e){return n({value:e})},onMerge:o,onRemove:function(e){var t=!s||0===s.length;!e&&t&&a([])},placeholder:Object(K.__)("Write quote…"),onReplace:a,onSplit:function(e){return Object(G.createBlock)("core/quote",Object(Z.a)({},t,{value:e}))},__unstableOnSplitMiddle:function(){return Object(G.createBlock)("core/paragraph")}}),(!W.RichText.isEmpty(s)||r)&&Object($.createElement)(W.RichText,{identifier:"citation",value:s,onChange:function(e){return n({citation:e})},__unstableMobileNoFocusOnMount:!0,placeholder:Object(K.__)("Write citation…"),className:"wp-block-quote__citation"})))},save:function(e){var t=e.attributes,n=t.align,r=t.value,o=t.citation,a=Q()(Object(q.a)({},"has-text-align-".concat(n),n));return Object($.createElement)("blockquote",{className:a},Object($.createElement)(W.RichText.Content,{multiline:!0,value:r}),!W.RichText.isEmpty(o)&&Object($.createElement)(W.RichText.Content,{tagName:"cite",value:o}))},merge:function(e,t){var n=t.value,r=t.citation;return r||(r=e.citation),n&&""!==n?Object(Z.a)({},e,{value:e.value+n,citation:r}):Object(Z.a)({},e,{citation:r})},deprecated:Rt};function zt(e){return Math.min(3,e.images.length)}var Vt=function(e){var t=Object(J.pick)(e,["alt","id","link","caption"]);t.url=Object(J.get)(e,["sizes","large","url"])||Object(J.get)(e,["media_details","sizes","large","source_url"])||e.url;var n=Object(J.get)(e,["sizes","full","url"])||Object(J.get)(e,["media_details","sizes","full","source_url"]);return n&&(t.fullUrl=n),t},Dt=[{attributes:{images:{type:"array",default:[],source:"query",selector:"ul.wp-block-gallery .blocks-gallery-item",query:{url:{source:"attribute",selector:"img",attribute:"src"},fullUrl:{source:"attribute",selector:"img",attribute:"data-full-url"},alt:{source:"attribute",selector:"img",attribute:"alt",default:""},id:{source:"attribute",selector:"img",attribute:"data-id"},link:{source:"attribute",selector:"img",attribute:"data-link"},caption:{type:"array",source:"children",selector:"figcaption"}}},ids:{type:"array",default:[]},columns:{type:"number"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"}},save:function(e){var t=e.attributes,n=t.images,r=t.columns,o=void 0===r?zt(t):r,a=t.imageCrop,c=t.linkTo;return Object($.createElement)("ul",{className:"columns-".concat(o," ").concat(a?"is-cropped":"")},n.map((function(e){var t;switch(c){case"media":t=e.fullUrl||e.url;break;case"attachment":t=e.link}var n=Object($.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id,"data-full-url":e.fullUrl,"data-link":e.link,className:e.id?"wp-image-".concat(e.id):null});return Object($.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},Object($.createElement)("figure",null,t?Object($.createElement)("a",{href:t},n):n,e.caption&&e.caption.length>0&&Object($.createElement)(W.RichText.Content,{tagName:"figcaption",value:e.caption})))})))}},{attributes:{images:{type:"array",default:[],source:"query",selector:"ul.wp-block-gallery .blocks-gallery-item",query:{url:{source:"attribute",selector:"img",attribute:"src"},alt:{source:"attribute",selector:"img",attribute:"alt",default:""},id:{source:"attribute",selector:"img",attribute:"data-id"},link:{source:"attribute",selector:"img",attribute:"data-link"},caption:{type:"array",source:"children",selector:"figcaption"}}},columns:{type:"number"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"}},isEligible:function(e){var t=e.images,n=e.ids;return t&&t.length>0&&(!n&&t||n&&t&&n.length!==t.length||Object(J.some)(t,(function(e,t){return!e&&null!==n[t]||parseInt(e,10)!==n[t]})))},migrate:function(e){return Object(Z.a)({},e,{ids:Object(J.map)(e.images,(function(e){var t=e.id;return t?parseInt(t,10):null}))})},save:function(e){var t=e.attributes,n=t.images,r=t.columns,o=void 0===r?zt(t):r,a=t.imageCrop,c=t.linkTo;return Object($.createElement)("ul",{className:"columns-".concat(o," ").concat(a?"is-cropped":"")},n.map((function(e){var t;switch(c){case"media":t=e.url;break;case"attachment":t=e.link}var n=Object($.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id,"data-link":e.link,className:e.id?"wp-image-".concat(e.id):null});return Object($.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},Object($.createElement)("figure",null,t?Object($.createElement)("a",{href:t},n):n,e.caption&&e.caption.length>0&&Object($.createElement)(W.RichText.Content,{tagName:"figcaption",value:e.caption})))})))}},{attributes:{images:{type:"array",default:[],source:"query",selector:"div.wp-block-gallery figure.blocks-gallery-image img",query:{url:{source:"attribute",attribute:"src"},alt:{source:"attribute",attribute:"alt",default:""},id:{source:"attribute",attribute:"data-id"}}},columns:{type:"number"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"},align:{type:"string",default:"none"}},save:function(e){var t=e.attributes,n=t.images,r=t.columns,o=void 0===r?zt(t):r,a=t.align,c=t.imageCrop,i=t.linkTo,l=Q()("columns-".concat(o),{alignnone:"none"===a,"is-cropped":c});return Object($.createElement)("div",{className:l},n.map((function(e){var t;switch(i){case"media":t=e.url;break;case"attachment":t=e.link}var n=Object($.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id});return Object($.createElement)("figure",{key:e.id||e.url,className:"blocks-gallery-image"},t?Object($.createElement)("a",{href:t},n):n)})))}}],Ft=Object($.createElement)(se.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(se.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object($.createElement)(se.G,null,Object($.createElement)(se.Path,{d:"M20 4v12H8V4h12m0-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-8.5 9.67l1.69 2.26 2.48-3.1L19 15H9zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z"}))),Ut=Object($.createElement)(se.SVG,{width:"18",height:"18",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(se.Path,{d:"M5 8.70002L10.6 14.4L12 12.9L7.8 8.70002L12 4.50002L10.6 3.00002L5 8.70002Z"})),qt=Object($.createElement)(se.SVG,{width:"18",height:"18",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(se.Path,{d:"M13 8.7L7.4 3L6 4.5L10.2 8.7L6 12.9L7.4 14.4L13 8.7Z"})),Wt=function(e){function t(){var e;return Object(re.a)(this,t),(e=Object(ae.a)(this,Object(ce.a)(t).apply(this,arguments))).onSelectImage=e.onSelectImage.bind(Object(ie.a)(e)),e.onSelectCaption=e.onSelectCaption.bind(Object(ie.a)(e)),e.onRemoveImage=e.onRemoveImage.bind(Object(ie.a)(e)),e.bindContainer=e.bindContainer.bind(Object(ie.a)(e)),e.state={captionSelected:!1},e}return Object(le.a)(t,e),Object(oe.a)(t,[{key:"bindContainer",value:function(e){this.container=e}},{key:"onSelectCaption",value:function(){this.state.captionSelected||this.setState({captionSelected:!0}),this.props.isSelected||this.props.onSelect()}},{key:"onSelectImage",value:function(){this.props.isSelected||this.props.onSelect(),this.state.captionSelected&&this.setState({captionSelected:!1})}},{key:"onRemoveImage",value:function(e){this.container===document.activeElement&&this.props.isSelected&&-1!==[we.BACKSPACE,we.DELETE].indexOf(e.keyCode)&&(e.stopPropagation(),e.preventDefault(),this.props.onRemove())}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isSelected,r=t.image,o=t.url;r&&!o&&this.props.setAttributes({url:r.source_url,alt:r.alt_text}),this.state.captionSelected&&!n&&e.isSelected&&this.setState({captionSelected:!1})}},{key:"render",value:function(){var e,t=this.props,n=t.url,r=t.alt,o=t.id,a=t.linkTo,c=t.link,i=t.isFirstItem,l=t.isLastItem,s=t.isSelected,u=t.caption,b=t.onRemove,m=t.onMoveForward,d=t.onMoveBackward,h=t.setAttributes,p=t["aria-label"];switch(a){case"media":e=n;break;case"attachment":e=c}var g=Object($.createElement)($.Fragment,null,Object($.createElement)("img",{src:n,alt:r,"data-id":o,onClick:this.onSelectImage,onFocus:this.onSelectImage,onKeyDown:this.onRemoveImage,tabIndex:"0","aria-label":p,ref:this.bindContainer}),Object(Ce.isBlobURL)(n)&&Object($.createElement)(se.Spinner,null)),f=Q()({"is-selected":s,"is-transient":Object(Ce.isBlobURL)(n)});return Object($.createElement)("figure",{className:f},e?Object($.createElement)("a",{href:e},g):g,Object($.createElement)("div",{className:"block-library-gallery-item__move-menu"},Object($.createElement)(se.IconButton,{icon:Ut,onClick:i?void 0:d,className:"blocks-gallery-item__move-backward",label:Object(K.__)("Move image backward"),"aria-disabled":i,disabled:!s}),Object($.createElement)(se.IconButton,{icon:qt,onClick:l?void 0:m,className:"blocks-gallery-item__move-forward",label:Object(K.__)("Move image forward"),"aria-disabled":l,disabled:!s})),Object($.createElement)("div",{className:"block-library-gallery-item__inline-menu"},Object($.createElement)(se.IconButton,{icon:"no-alt",onClick:b,className:"blocks-gallery-item__remove",label:Object(K.__)("Remove image"),disabled:!s})),(s||u)&&Object($.createElement)(W.RichText,{tagName:"figcaption",placeholder:s?Object(K.__)("Write caption…"):null,value:u,isSelected:this.state.captionSelected,onChange:function(e){return h({caption:e})},unstableOnFocus:this.onSelectCaption,inlineToolbar:!0}))}}]),t}($.Component),Gt=Object(be.withSelect)((function(e,t){var n=e("core").getMedia,r=t.id;return{image:r?n(r):null}}))(Wt),Kt=[{value:"attachment",label:Object(K.__)("Attachment Page")},{value:"media",label:Object(K.__)("Media File")},{value:"none",label:Object(K.__)("None")}],Zt=["image"],$t=function(e){function t(){var e;return Object(re.a)(this,t),(e=Object(ae.a)(this,Object(ce.a)(t).apply(this,arguments))).onSelectImage=e.onSelectImage.bind(Object(ie.a)(e)),e.onSelectImages=e.onSelectImages.bind(Object(ie.a)(e)),e.setLinkTo=e.setLinkTo.bind(Object(ie.a)(e)),e.setColumnsNumber=e.setColumnsNumber.bind(Object(ie.a)(e)),e.toggleImageCrop=e.toggleImageCrop.bind(Object(ie.a)(e)),e.onMove=e.onMove.bind(Object(ie.a)(e)),e.onMoveForward=e.onMoveForward.bind(Object(ie.a)(e)),e.onMoveBackward=e.onMoveBackward.bind(Object(ie.a)(e)),e.onRemoveImage=e.onRemoveImage.bind(Object(ie.a)(e)),e.onUploadError=e.onUploadError.bind(Object(ie.a)(e)),e.setImageAttributes=e.setImageAttributes.bind(Object(ie.a)(e)),e.setAttributes=e.setAttributes.bind(Object(ie.a)(e)),e.onFocusGalleryCaption=e.onFocusGalleryCaption.bind(Object(ie.a)(e)),e.state={selectedImage:null,attachmentCaptions:null},e}return Object(le.a)(t,e),Object(oe.a)(t,[{key:"setAttributes",value:function(e){if(e.ids)throw new Error('The "ids" attribute should not be changed directly. It is managed automatically when "images" attribute changes');e.images&&(e=Object(Z.a)({},e,{ids:Object(J.map)(e.images,"id")})),this.props.setAttributes(e)}},{key:"onSelectImage",value:function(e){var t=this;return function(){t.state.selectedImage!==e&&t.setState({selectedImage:e})}}},{key:"onMove",value:function(e,t){var n=Object(U.a)(this.props.attributes.images);n.splice(t,1,this.props.attributes.images[e]),n.splice(e,1,this.props.attributes.images[t]),this.setState({selectedImage:t}),this.setAttributes({images:n})}},{key:"onMoveForward",value:function(e){var t=this;return function(){e!==t.props.attributes.images.length-1&&t.onMove(e,e+1)}}},{key:"onMoveBackward",value:function(e){var t=this;return function(){0!==e&&t.onMove(e,e-1)}}},{key:"onRemoveImage",value:function(e){var t=this;return function(){var n=Object(J.filter)(t.props.attributes.images,(function(t,n){return e!==n})),r=t.props.attributes.columns;t.setState({selectedImage:null}),t.setAttributes({images:n,columns:r?Math.min(n.length,r):r})}}},{key:"selectCaption",value:function(e,t,n){var r=Object(J.find)(t,{id:e.id}),o=r?r.caption:e.caption;if(!n)return o;var a=Object(J.find)(n,{id:e.id});return a&&a.caption!==e.caption?e.caption:o}},{key:"onSelectImages",value:function(e){var t=this,n=this.props.attributes,r=n.columns,o=n.images,a=this.state.attachmentCaptions;this.setState({attachmentCaptions:e.map((function(e){return{id:e.id,caption:e.caption}}))}),this.setAttributes({images:e.map((function(e){return Object(Z.a)({},Vt(e),{caption:t.selectCaption(e,o,a)})})),columns:r?Math.min(e.length,r):r})}},{key:"onUploadError",value:function(e){var t=this.props.noticeOperations;t.removeAllNotices(),t.createErrorNotice(e)}},{key:"setLinkTo",value:function(e){this.setAttributes({linkTo:e})}},{key:"setColumnsNumber",value:function(e){this.setAttributes({columns:e})}},{key:"toggleImageCrop",value:function(){this.setAttributes({imageCrop:!this.props.attributes.imageCrop})}},{key:"getImageCropHelp",value:function(e){return e?Object(K.__)("Thumbnails are cropped to align."):Object(K.__)("Thumbnails are not cropped.")}},{key:"onFocusGalleryCaption",value:function(){this.setState({selectedImage:null})}},{key:"setImageAttributes",value:function(e,t){var n=this.props.attributes.images,r=this.setAttributes;n[e]&&r({images:[].concat(Object(U.a)(n.slice(0,e)),[Object(Z.a)({},n[e],t)],Object(U.a)(n.slice(e+1)))})}},{key:"componentDidMount",value:function(){var e=this.props,t=e.attributes,n=e.mediaUpload,r=t.images;if(Object(J.every)(r,(function(e){var t=e.url;return Object(Ce.isBlobURL)(t)}))){var o=Object(J.map)(r,(function(e){var t=e.url;return Object(Ce.getBlobByURL)(t)}));Object(J.forEach)(r,(function(e){var t=e.url;return Object(Ce.revokeBlobURL)(t)})),n({filesList:o,onFileChange:this.onSelectImages,allowedTypes:["image"]})}}},{key:"componentDidUpdate",value:function(e){!this.props.isSelected&&e.isSelected&&this.setState({selectedImage:null,captionSelected:!1})}},{key:"render",value:function(){var e,t=this,n=this.props,r=n.attributes,o=n.className,a=n.isSelected,c=n.noticeUI,i=n.setAttributes,l=r.align,s=r.columns,u=void 0===s?zt(r):s,b=r.caption,m=r.imageCrop,d=r.images,h=r.linkTo,p=!!d.length,g=p&&Object(J.some)(d,(function(e){return e.id})),f=Object($.createElement)(W.MediaPlaceholder,{addToGallery:g,isAppender:p,className:o,dropZoneUIOnly:p&&!a,icon:!p&&Object($.createElement)(W.BlockIcon,{icon:Ft}),labels:{title:!p&&Object(K.__)("Gallery"),instructions:!p&&Object(K.__)("Drag images, upload new ones or select files from your library.")},onSelect:this.onSelectImages,accept:"image/*",allowedTypes:Zt,multiple:!0,value:g?d:void 0,onError:this.onUploadError,notices:p?void 0:c});if(!p)return f;var O=Q()("blocks-gallery-caption",{"screen-reader-text":!a&&W.RichText.isEmpty(b)});return Object($.createElement)($.Fragment,null,Object($.createElement)(W.InspectorControls,null,Object($.createElement)(se.PanelBody,{title:Object(K.__)("Gallery Settings")},d.length>1&&Object($.createElement)(se.RangeControl,{label:Object(K.__)("Columns"),value:u,onChange:this.setColumnsNumber,min:1,max:Math.min(8,d.length),required:!0}),Object($.createElement)(se.ToggleControl,{label:Object(K.__)("Crop Images"),checked:!!m,onChange:this.toggleImageCrop,help:this.getImageCropHelp}),Object($.createElement)(se.SelectControl,{label:Object(K.__)("Link To"),value:h,onChange:this.setLinkTo,options:Kt}))),c,Object($.createElement)("figure",{className:Q()(o,(e={},Object(q.a)(e,"align".concat(l),l),Object(q.a)(e,"columns-".concat(u),u),Object(q.a)(e,"is-cropped",m),e))},Object($.createElement)("ul",{className:"blocks-gallery-grid"},d.map((function(e,n){var r=Object(K.sprintf)(Object(K.__)("image %1$d of %2$d in gallery"),n+1,d.length);return Object($.createElement)("li",{className:"blocks-gallery-item",key:e.id||e.url},Object($.createElement)(Gt,{url:e.url,alt:e.alt,id:e.id,isFirstItem:0===n,isLastItem:n+1===d.length,isSelected:a&&t.state.selectedImage===n,onMoveBackward:t.onMoveBackward(n),onMoveForward:t.onMoveForward(n),onRemove:t.onRemoveImage(n),onSelect:t.onSelectImage(n),setAttributes:function(e){return t.setImageAttributes(n,e)},caption:e.caption,"aria-label":r}))}))),f,Object($.createElement)(W.RichText,{tagName:"figcaption",className:O,placeholder:Object(K.__)("Write gallery caption…"),value:b,unstableOnFocus:this.onFocusGalleryCaption,onChange:function(e){return i({caption:e})},inlineToolbar:!0})))}}]),t}($.Component),Yt=Object(ue.compose)([Object(be.withSelect)((function(e){return{mediaUpload:(0,e("core/block-editor").getSettings)().__experimentalMediaUpload}})),se.withNotices])($t);var Qt=function(e){return e?e.split(",").map((function(e){return parseInt(e,10)})):[]},Jt={from:[{type:"block",isMultiBlock:!0,blocks:["core/image"],transform:function(e){var t=e[0].align;t=Object(J.every)(e,["align",t])?t:void 0;var n=Object(J.filter)(e,(function(e){return e.url}));return Object(G.createBlock)("core/gallery",{images:n.map((function(e){return{id:e.id,url:e.url,alt:e.alt,caption:e.caption}})),ids:n.map((function(e){return e.id})),align:t})}},{type:"shortcode",tag:"gallery",attributes:{images:{type:"array",shortcode:function(e){var t=e.named.ids;return Qt(t).map((function(e){return{id:e}}))}},ids:{type:"array",shortcode:function(e){var t=e.named.ids;return Qt(t)}},columns:{type:"number",shortcode:function(e){var t=e.named.columns;return parseInt(void 0===t?"3":t,10)}},linkTo:{type:"string",shortcode:function(e){var t=e.named.link,n=void 0===t?"attachment":t;return"file"===n?"media":n}}}},{type:"files",isMatch:function(e){return 1!==e.length&&Object(J.every)(e,(function(e){return 0===e.type.indexOf("image/")}))},transform:function(e){return Object(G.createBlock)("core/gallery",{images:e.map((function(e){return Vt({url:Object(Ce.createBlobURL)(e)})}))})}}],to:[{type:"block",blocks:["core/image"],transform:function(e){var t=e.images,n=e.align;return t.length>0?t.map((function(e){var t=e.id,r=e.url,o=e.alt,a=e.caption;return Object(G.createBlock)("core/image",{id:t,url:r,alt:o,caption:a,align:n})})):Object(G.createBlock)("core/image",{align:n})}}]},Xt={name:"core/gallery",category:"common",attributes:{images:{type:"array",default:[],source:"query",selector:".blocks-gallery-item",query:{url:{source:"attribute",selector:"img",attribute:"src"},fullUrl:{source:"attribute",selector:"img",attribute:"data-full-url"},link:{source:"attribute",selector:"img",attribute:"data-link"},alt:{source:"attribute",selector:"img",attribute:"alt",default:""},id:{source:"attribute",selector:"img",attribute:"data-id"},caption:{type:"string",source:"html",selector:".blocks-gallery-item__caption"}}},ids:{type:"array",default:[]},columns:{type:"number"},caption:{type:"string",source:"html",selector:".blocks-gallery-caption"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"}}},en=Xt.name,tn={title:Object(K.__)("Gallery"),description:Object(K.__)("Display multiple images in a rich gallery."),icon:Ft,keywords:[Object(K.__)("images"),Object(K.__)("photos")],example:{attributes:{columns:2,images:[{url:"https://s.w.org/images/core/5.3/Glacial_lakes%2C_Bhutan.jpg"},{url:"https://s.w.org/images/core/5.3/Sediment_off_the_Yucatan_Peninsula.jpg"}]}},supports:{align:!0},transforms:Jt,edit:Yt,save:function(e){var t=e.attributes,n=t.images,r=t.columns,o=void 0===r?zt(t):r,a=t.imageCrop,c=t.caption,i=t.linkTo;return Object($.createElement)("figure",{className:"columns-".concat(o," ").concat(a?"is-cropped":"")},Object($.createElement)("ul",{className:"blocks-gallery-grid"},n.map((function(e){var t;switch(i){case"media":t=e.fullUrl||e.url;break;case"attachment":t=e.link}var n=Object($.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id,"data-full-url":e.fullUrl,"data-link":e.link,className:e.id?"wp-image-".concat(e.id):null});return Object($.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},Object($.createElement)("figure",null,t?Object($.createElement)("a",{href:t},n):n,!W.RichText.isEmpty(e.caption)&&Object($.createElement)(W.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-item__caption",value:e.caption})))}))),!W.RichText.isEmpty(c)&&Object($.createElement)(W.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-caption",value:c}))},deprecated:Dt},nn=n(58),rn=n.n(nn);var on=Object($.createElement)(se.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(se.Path,{d:"M21 6V20C21 21.1 20.1 22 19 22H5C3.89 22 3 21.1 3 20L3.01 6C3.01 4.9 3.89 4 5 4H6V2H8V4H16V2H18V4H19C20.1 4 21 4.9 21 6ZM5 8H19V6H5V8ZM19 20V10H5V20H19ZM11 12H17V14H11V12ZM17 16H11V18H17V16ZM7 12H9V14H7V12ZM9 18V16H7V18H9Z"})),an="core/archives",cn={title:Object(K.__)("Archives"),description:Object(K.__)("Display a monthly archive of your posts."),icon:on,category:"widgets",supports:{align:!0,html:!1},edit:function(e){var t=e.attributes,n=e.setAttributes,r=t.showPostCounts,o=t.displayAsDropdown;return Object($.createElement)($.Fragment,null,Object($.createElement)(W.InspectorControls,null,Object($.createElement)(se.PanelBody,{title:Object(K.__)("Archives Settings")},Object($.createElement)(se.ToggleControl,{label:Object(K.__)("Display as Dropdown"),checked:o,onChange:function(){return n({displayAsDropdown:!o})}}),Object($.createElement)(se.ToggleControl,{label:Object(K.__)("Show Post Counts"),checked:r,onChange:function(){return n({showPostCounts:!r})}}))),Object($.createElement)(se.Disabled,null,Object($.createElement)(rn.a,{block:"core/archives",attributes:t})))}},ln=Object($.createElement)(se.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(se.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),Object($.createElement)(se.Path,{d:"m12 3l0.01 10.55c-0.59-0.34-1.27-0.55-2-0.55-2.22 0-4.01 1.79-4.01 4s1.79 4 4.01 4 3.99-1.79 3.99-4v-10h4v-4h-6zm-1.99 16c-1.1 0-2-0.9-2-2s0.9-2 2-2 2 0.9 2 2-0.9 2-2 2z"})),sn=["audio"],un=function(e){function t(){var e;return Object(re.a)(this,t),(e=Object(ae.a)(this,Object(ce.a)(t).apply(this,arguments))).state={editing:!e.props.attributes.src},e.toggleAttribute=e.toggleAttribute.bind(Object(ie.a)(e)),e.onSelectURL=e.onSelectURL.bind(Object(ie.a)(e)),e.onUploadError=e.onUploadError.bind(Object(ie.a)(e)),e}return Object(le.a)(t,e),Object(oe.a)(t,[{key:"componentDidMount",value:function(){var e=this,t=this.props,n=t.attributes,r=t.mediaUpload,o=t.noticeOperations,a=t.setAttributes,c=n.id,i=n.src,l=void 0===i?"":i;if(!c&&Object(Ce.isBlobURL)(l)){var s=Object(Ce.getBlobByURL)(l);s&&r({filesList:[s],onFileChange:function(e){var t=Object(ke.a)(e,1)[0],n=t.id,r=t.url;a({id:n,src:r})},onError:function(t){a({src:void 0,id:void 0}),e.setState({editing:!0}),o.createErrorNotice(t)},allowedTypes:sn})}}},{key:"toggleAttribute",value:function(e){var t=this;return function(n){t.props.setAttributes(Object(q.a)({},e,n))}}},{key:"onSelectURL",value:function(e){var t=this.props,n=t.attributes,r=t.setAttributes;if(e!==n.src){var o=et({attributes:{url:e}});if(void 0!==o)return void this.props.onReplace(o);r({src:e,id:void 0})}this.setState({editing:!1})}},{key:"onUploadError",value:function(e){var t=this.props.noticeOperations;t.removeAllNotices(),t.createErrorNotice(e)}},{key:"getAutoplayHelp",value:function(e){return e?Object(K.__)("Note: Autoplaying audio may cause usability issues for some visitors."):null}},{key:"render",value:function(){var e=this,t=this.props.attributes,n=t.autoplay,r=t.caption,o=t.loop,a=t.preload,c=t.src,i=this.props,l=i.setAttributes,s=i.isSelected,u=i.className,b=i.noticeUI,m=this.state.editing,d=function(){e.setState({editing:!0})};return m?Object($.createElement)(W.MediaPlaceholder,{icon:Object($.createElement)(W.BlockIcon,{icon:ln}),className:u,onSelect:function(t){if(!t||!t.url)return l({src:void 0,id:void 0}),void d();l({src:t.url,id:t.id}),e.setState({src:t.url,editing:!1})},onSelectURL:this.onSelectURL,accept:"audio/*",allowedTypes:sn,value:this.props.attributes,notices:b,onError:this.onUploadError}):Object($.createElement)($.Fragment,null,Object($.createElement)(W.BlockControls,null,Object($.createElement)(se.Toolbar,null,Object($.createElement)(se.IconButton,{className:"components-icon-button components-toolbar__control",label:Object(K.__)("Edit audio"),onClick:d,icon:"edit"}))),Object($.createElement)(W.InspectorControls,null,Object($.createElement)(se.PanelBody,{title:Object(K.__)("Audio Settings")},Object($.createElement)(se.ToggleControl,{label:Object(K.__)("Autoplay"),onChange:this.toggleAttribute("autoplay"),checked:n,help:this.getAutoplayHelp}),Object($.createElement)(se.ToggleControl,{label:Object(K.__)("Loop"),onChange:this.toggleAttribute("loop"),checked:o}),Object($.createElement)(se.SelectControl,{label:Object(K.__)("Preload"),value:void 0!==a?a:"none",onChange:function(e){return l({preload:"none"!==e?e:void 0})},options:[{value:"auto",label:Object(K.__)("Auto")},{value:"metadata",label:Object(K.__)("Metadata")},{value:"none",label:Object(K.__)("None")}]}))),Object($.createElement)("figure",{className:u},Object($.createElement)(se.Disabled,null,Object($.createElement)("audio",{controls:"controls",src:c})),(!W.RichText.isEmpty(r)||s)&&Object($.createElement)(W.RichText,{tagName:"figcaption",placeholder:Object(K.__)("Write caption…"),value:r,onChange:function(e){return l({caption:e})},inlineToolbar:!0})))}}]),t}($.Component),bn=Object(ue.compose)([Object(be.withSelect)((function(e){return{mediaUpload:(0,e("core/block-editor").getSettings)().__experimentalMediaUpload}})),se.withNotices])(un);var mn={from:[{type:"files",isMatch:function(e){return 1===e.length&&0===e[0].type.indexOf("audio/")},transform:function(e){var t=e[0];return Object(G.createBlock)("core/audio",{src:Object(Ce.createBlobURL)(t)})}},{type:"shortcode",tag:"audio",attributes:{src:{type:"string",shortcode:function(e){return e.named.src}},loop:{type:"string",shortcode:function(e){return e.named.loop}},autoplay:{type:"string",shortcode:function(e){return e.named.autoplay}},preload:{type:"string",shortcode:function(e){return e.named.preload}}}}]},dn={name:"core/audio",category:"common",attributes:{src:{type:"string",source:"attribute",selector:"audio",attribute:"src"},caption:{type:"string",source:"html",selector:"figcaption"},id:{type:"number"},autoplay:{type:"boolean",source:"attribute",selector:"audio",attribute:"autoplay"},loop:{type:"boolean",source:"attribute",selector:"audio",attribute:"loop"},preload:{type:"string",source:"attribute",selector:"audio",attribute:"preload"}}},hn=dn.name,pn={title:Object(K.__)("Audio"),description:Object(K.__)("Embed a simple audio player."),icon:ln,transforms:mn,supports:{align:!0},edit:bn,save:function(e){var t=e.attributes,n=t.autoplay,r=t.caption,o=t.loop,a=t.preload,c=t.src;return Object($.createElement)("figure",null,Object($.createElement)("audio",{controls:"controls",src:c,autoPlay:n,loop:o,preload:a}),!W.RichText.isEmpty(r)&&Object($.createElement)(W.RichText.Content,{tagName:"figcaption",value:r}))}},gn=function(e){return Object(J.omit)(Object(Z.a)({},e,{customTextColor:e.textColor&&"#"===e.textColor[0]?e.textColor:void 0,customBackgroundColor:e.color&&"#"===e.color[0]?e.color:void 0}),["color","textColor"])},fn={url:{type:"string",source:"attribute",selector:"a",attribute:"href"},title:{type:"string",source:"attribute",selector:"a",attribute:"title"},text:{type:"string",source:"html",selector:"a"}},On=[{attributes:Object(Z.a)({},fn,{align:{type:"string",default:"none"},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"}}),isEligible:function(e){return e.className&&e.className.includes("is-style-squared")},migrate:function(e){var t=e.className;return t&&(t=t.replace(/is-style-squared[\s]?/,"").trim()),Object(Z.a)({},e,{className:t||void 0,borderRadius:0})},save:function(e){var t,n=e.attributes,r=n.backgroundColor,o=n.customBackgroundColor,a=n.customTextColor,c=n.linkTarget,i=n.rel,l=n.text,s=n.textColor,u=n.title,b=n.url,m=Object(W.getColorClassName)("color",s),d=Object(W.getColorClassName)("background-color",r),h=Q()("wp-block-button__link",(t={"has-text-color":s||a},Object(q.a)(t,m,m),Object(q.a)(t,"has-background",r||o),Object(q.a)(t,d,d),t)),p={backgroundColor:d?void 0:o,color:m?void 0:a};return Object($.createElement)("div",null,Object($.createElement)(W.RichText.Content,{tagName:"a",className:h,href:b,title:u,style:p,value:l,target:c,rel:i}))}},{attributes:Object(Z.a)({},fn,{align:{type:"string",default:"none"},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"}}),save:function(e){var t,n=e.attributes,r=n.url,o=n.text,a=n.title,c=n.backgroundColor,i=n.textColor,l=n.customBackgroundColor,s=n.customTextColor,u=Object(W.getColorClassName)("color",i),b=Object(W.getColorClassName)("background-color",c),m=Q()("wp-block-button__link",(t={"has-text-color":i||s},Object(q.a)(t,u,u),Object(q.a)(t,"has-background",c||l),Object(q.a)(t,b,b),t)),d={backgroundColor:b?void 0:l,color:u?void 0:s};return Object($.createElement)("div",null,Object($.createElement)(W.RichText.Content,{tagName:"a",className:m,href:r,title:a,style:d,value:o}))},migrate:gn},{attributes:Object(Z.a)({},fn,{color:{type:"string"},textColor:{type:"string"},align:{type:"string",default:"none"}}),save:function(e){var t=e.attributes,n=t.url,r=t.text,o=t.title,a=t.align,c={backgroundColor:t.color,color:t.textColor};return Object($.createElement)("div",{className:"align".concat(a)},Object($.createElement)(W.RichText.Content,{tagName:"a",className:"wp-block-button__link",href:n,title:o,style:c,value:r}))},migrate:gn},{attributes:Object(Z.a)({},fn,{color:{type:"string"},textColor:{type:"string"},align:{type:"string",default:"none"}}),save:function(e){var t=e.attributes,n=t.url,r=t.text,o=t.title,a=t.align,c=t.color,i=t.textColor;return Object($.createElement)("div",{className:"align".concat(a),style:{backgroundColor:c}},Object($.createElement)(W.RichText.Content,{tagName:"a",href:n,title:o,style:{color:i},value:r}))},migrate:gn}],vn=window.getComputedStyle,jn=Object(se.withFallbackStyles)((function(e,t){var n=t.textColor,r=t.backgroundColor,o=r&&r.color,a=n&&n.color,c=!a&&e?e.querySelector('[contenteditable="true"]'):null;return{fallbackBackgroundColor:o||!e?void 0:vn(e).backgroundColor,fallbackTextColor:a||!c?void 0:vn(c).color}})),yn=0,_n=50,kn=5;function Cn(e){var t=e.borderRadius,n=void 0===t?"":t,r=e.setAttributes,o=Object($.useCallback)((function(e){r({borderRadius:e})}),[r]);return Object($.createElement)(se.PanelBody,{title:Object(K.__)("Border Settings")},Object($.createElement)(se.RangeControl,{value:n,label:Object(K.__)("Border Radius"),min:yn,max:_n,initialPosition:kn,allowReset:!0,onChange:o}))}var wn=function(e){function t(){var e;return Object(re.a)(this,t),(e=Object(ae.a)(this,Object(ce.a)(t).apply(this,arguments))).nodeRef=null,e.bindRef=e.bindRef.bind(Object(ie.a)(e)),e.onSetLinkRel=e.onSetLinkRel.bind(Object(ie.a)(e)),e.onToggleOpenInNewTab=e.onToggleOpenInNewTab.bind(Object(ie.a)(e)),e}return Object(le.a)(t,e),Object(oe.a)(t,[{key:"bindRef",value:function(e){e&&(this.nodeRef=e)}},{key:"onSetLinkRel",value:function(e){this.props.setAttributes({rel:e})}},{key:"onToggleOpenInNewTab",value:function(e){var t=this.props.attributes.rel,n=e?"_blank":void 0,r=t;n&&!t?r="noreferrer noopener":n||"noreferrer noopener"!==t||(r=void 0),this.props.setAttributes({linkTarget:n,rel:r})}},{key:"render",value:function(){var e,t=this.props,n=t.attributes,r=t.backgroundColor,o=t.textColor,a=t.setBackgroundColor,c=t.setTextColor,i=t.fallbackBackgroundColor,l=t.fallbackTextColor,s=t.setAttributes,u=t.className,b=t.instanceId,m=t.isSelected,d=n.borderRadius,h=n.linkTarget,p=n.placeholder,g=n.rel,f=n.text,O=n.title,v=n.url,j="wp-block-button__inline-link-".concat(b);return Object($.createElement)("div",{className:u,title:O,ref:this.bindRef},Object($.createElement)(W.RichText,{placeholder:p||Object(K.__)("Add text…"),value:f,onChange:function(e){return s({text:e})},withoutInteractiveFormatting:!0,className:Q()("wp-block-button__link",(e={"has-background":r.color},Object(q.a)(e,r.class,r.class),Object(q.a)(e,"has-text-color",o.color),Object(q.a)(e,o.class,o.class),Object(q.a)(e,"no-border-radius",0===d),e)),style:{backgroundColor:r.color,color:o.color,borderRadius:d?d+"px":void 0}}),Object($.createElement)(se.BaseControl,{label:Object(K.__)("Link"),className:"wp-block-button__inline-link",id:j},Object($.createElement)(W.URLInput,{className:"wp-block-button__inline-link-input",value:v,autoFocus:!1,onChange:function(e){return s({url:e})},disableSuggestions:!m,id:j,isFullWidth:!0,hasBorder:!0})),Object($.createElement)(W.InspectorControls,null,Object($.createElement)(W.PanelColorSettings,{title:Object(K.__)("Color Settings"),colorSettings:[{value:r.color,onChange:a,label:Object(K.__)("Background Color")},{value:o.color,onChange:c,label:Object(K.__)("Text Color")}]},Object($.createElement)(W.ContrastChecker,{isLargeText:!1,textColor:o.color,backgroundColor:r.color,fallbackBackgroundColor:i,fallbackTextColor:l})),Object($.createElement)(Cn,{borderRadius:d,setAttributes:s}),Object($.createElement)(se.PanelBody,{title:Object(K.__)("Link settings")},Object($.createElement)(se.ToggleControl,{label:Object(K.__)("Open in new tab"),onChange:this.onToggleOpenInNewTab,checked:"_blank"===h}),Object($.createElement)(se.TextControl,{label:Object(K.__)("Link rel"),value:g||"",onChange:this.onSetLinkRel}))))}}]),t}($.Component),En=Object(ue.compose)([ue.withInstanceId,Object(W.withColors)("backgroundColor",{textColor:"color"}),jn])(wn),xn=Object($.createElement)(se.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(se.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object($.createElement)(se.G,null,Object($.createElement)(se.Path,{d:"M19 6H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 10H5V8h14v8z"})));var Sn={name:"core/button",category:"layout",attributes:{url:{type:"string",source:"attribute",selector:"a",attribute:"href"},title:{type:"string",source:"attribute",selector:"a",attribute:"title"},text:{type:"string",source:"html",selector:"a"},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},borderRadius:{type:"number"}}},Tn=Sn.name,Nn={title:Object(K.__)("Button"),description:Object(K.__)("Prompt visitors to take action with a button-style link."),icon:xn,keywords:[Object(K.__)("link")],example:{attributes:{className:"is-style-fill",backgroundColor:"vivid-green-cyan",text:Object(K.__)("Call to Action")}},supports:{align:!0,alignWide:!1},styles:[{name:"fill",label:Object(K.__)("Fill"),isDefault:!0},{name:"outline",label:Object(K.__)("Outline")}],edit:En,save:function(e){var t,n=e.attributes,r=n.backgroundColor,o=n.borderRadius,a=n.customBackgroundColor,c=n.customTextColor,i=n.linkTarget,l=n.rel,s=n.text,u=n.textColor,b=n.title,m=n.url,d=Object(W.getColorClassName)("color",u),h=Object(W.getColorClassName)("background-color",r),p=Q()("wp-block-button__link",(t={"has-text-color":u||c},Object(q.a)(t,d,d),Object(q.a)(t,"has-background",r||a),Object(q.a)(t,h,h),Object(q.a)(t,"no-border-radius",0===o),t)),g={backgroundColor:h?void 0:a,color:d?void 0:c,borderRadius:o?o+"px":void 0};return Object($.createElement)("div",null,Object($.createElement)(W.RichText.Content,{tagName:"a",className:p,href:m,title:b,style:g,value:s,target:i,rel:l}))},deprecated:On},Rn=n(29),An=n.n(Rn),Bn=function(e){function t(){var e;return Object(re.a)(this,t),(e=Object(ae.a)(this,Object(ce.a)(t).apply(this,arguments))).getYearMonth=Qe()(e.getYearMonth.bind(Object(ie.a)(e)),{maxSize:1}),e.getServerSideAttributes=Qe()(e.getServerSideAttributes.bind(Object(ie.a)(e)),{maxSize:1}),e}return Object(le.a)(t,e),Object(oe.a)(t,[{key:"getYearMonth",value:function(e){if(!e)return{};var t=An()(e);return{year:t.year(),month:t.month()+1}}},{key:"getServerSideAttributes",value:function(e,t){return Object(Z.a)({},e,this.getYearMonth(t))}},{key:"render",value:function(){return Object($.createElement)(se.Disabled,null,Object($.createElement)(rn.a,{block:"core/calendar",attributes:this.getServerSideAttributes(this.props.attributes,this.props.date)}))}}]),t}($.Component),In=Object(be.withSelect)((function(e){var t=e("core/editor");if(t){var n=t.getEditedPostAttribute;return{date:"post"===n("type")?n("date"):void 0}}}))(Bn),Mn=Object($.createElement)(se.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(se.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object($.createElement)(se.G,null,Object($.createElement)(se.Path,{d:"M7 11h2v2H7v-2zm14-5v14c0 1.1-.9 2-2 2H5c-1.11 0-2-.9-2-2l.01-14c0-1.1.88-2 1.99-2h1V2h2v2h8V2h2v2h1c1.1 0 2 .9 2 2zM5 8h14V6H5v2zm14 12V10H5v10h14zm-4-7h2v-2h-2v2zm-4 0h2v-2h-2v2z"}))),Pn="core/calendar",Ln={title:Object(K.__)("Calendar"),description:Object(K.__)("A calendar of your site’s posts."),icon:Mn,category:"widgets",keywords:[Object(K.__)("posts"),Object(K.__)("archive")],supports:{align:!0},example:{},edit:In},Hn=function(e){function t(){var e;return Object(re.a)(this,t),(e=Object(ae.a)(this,Object(ce.a)(t).apply(this,arguments))).toggleDisplayAsDropdown=e.toggleDisplayAsDropdown.bind(Object(ie.a)(e)),e.toggleShowPostCounts=e.toggleShowPostCounts.bind(Object(ie.a)(e)),e.toggleShowHierarchy=e.toggleShowHierarchy.bind(Object(ie.a)(e)),e}return Object(le.a)(t,e),Object(oe.a)(t,[{key:"toggleDisplayAsDropdown",value:function(){var e=this.props,t=e.attributes;(0,e.setAttributes)({displayAsDropdown:!t.displayAsDropdown})}},{key:"toggleShowPostCounts",value:function(){var e=this.props,t=e.attributes;(0,e.setAttributes)({showPostCounts:!t.showPostCounts})}},{key:"toggleShowHierarchy",value:function(){var e=this.props,t=e.attributes;(0,e.setAttributes)({showHierarchy:!t.showHierarchy})}},{key:"getCategories",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=this.props.categories;return t&&t.length?null===e?t:t.filter((function(t){return t.parent===e})):[]}},{key:"getCategoryListClassName",value:function(e){return"wp-block-categories__list wp-block-categories__list-level-".concat(e)}},{key:"renderCategoryName",value:function(e){return e.name?Object(J.unescape)(e.name).trim():Object(K.__)("(Untitled)")}},{key:"renderCategoryList",value:function(){var e=this,t=this.props.attributes.showHierarchy?0:null,n=this.getCategories(t);return Object($.createElement)("ul",{className:this.getCategoryListClassName(0)},n.map((function(t){return e.renderCategoryListItem(t,0)})))}},{key:"renderCategoryListItem",value:function(e,t){var n=this,r=this.props.attributes,o=r.showHierarchy,a=r.showPostCounts,c=this.getCategories(e.id);return Object($.createElement)("li",{key:e.id},Object($.createElement)("a",{href:e.link,target:"_blank",rel:"noreferrer noopener"},this.renderCategoryName(e)),a&&Object($.createElement)("span",{className:"wp-block-categories__post-count"}," ","(",e.count,")"),o&&!!c.length&&Object($.createElement)("ul",{className:this.getCategoryListClassName(t+1)},c.map((function(e){return n.renderCategoryListItem(e,t+1)}))))}},{key:"renderCategoryDropdown",value:function(){var e=this,t=this.props.instanceId,n=this.props.attributes.showHierarchy?0:null,r=this.getCategories(n),o="blocks-category-select-".concat(t);return Object($.createElement)($.Fragment,null,Object($.createElement)("label",{htmlFor:o,className:"screen-reader-text"},Object(K.__)("Categories")),Object($.createElement)("select",{id:o,className:"wp-block-categories__dropdown"},r.map((function(t){return e.renderCategoryDropdownItem(t,0)}))))}},{key:"renderCategoryDropdownItem",value:function(e,t){var n=this,r=this.props.attributes,o=r.showHierarchy,a=r.showPostCounts,c=this.getCategories(e.id);return[Object($.createElement)("option",{key:e.id},Object(J.times)(3*t,(function(){return" "})),this.renderCategoryName(e),a?" (".concat(e.count,")"):""),o&&!!c.length&&c.map((function(e){return n.renderCategoryDropdownItem(e,t+1)}))]}},{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.isRequesting,r=t.displayAsDropdown,o=t.showHierarchy,a=t.showPostCounts,c=Object($.createElement)(W.InspectorControls,null,Object($.createElement)(se.PanelBody,{title:Object(K.__)("Categories Settings")},Object($.createElement)(se.ToggleControl,{label:Object(K.__)("Display as Dropdown"),checked:r,onChange:this.toggleDisplayAsDropdown}),Object($.createElement)(se.ToggleControl,{label:Object(K.__)("Show Hierarchy"),checked:o,onChange:this.toggleShowHierarchy}),Object($.createElement)(se.ToggleControl,{label:Object(K.__)("Show Post Counts"),checked:a,onChange:this.toggleShowPostCounts})));return n?Object($.createElement)($.Fragment,null,c,Object($.createElement)(se.Placeholder,{icon:"admin-post",label:Object(K.__)("Categories")},Object($.createElement)(se.Spinner,null))):Object($.createElement)($.Fragment,null,c,Object($.createElement)("div",{className:this.props.className},r?this.renderCategoryDropdown():this.renderCategoryList()))}}]),t}($.Component),zn=Object(ue.compose)(Object(be.withSelect)((function(e){var t=e("core").getEntityRecords,n=e("core/data").isResolving,r={per_page:-1,hide_empty:!0};return{categories:t("taxonomy","category",r),isRequesting:n("core","getEntityRecords",["taxonomy","category",r])}})),ue.withInstanceId)(Hn),Vn=Object($.createElement)(se.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(se.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),Object($.createElement)(se.Path,{d:"M12,2l-5.5,9h11L12,2z M12,5.84L13.93,9h-3.87L12,5.84z"}),Object($.createElement)(se.Path,{d:"m17.5 13c-2.49 0-4.5 2.01-4.5 4.5s2.01 4.5 4.5 4.5 4.5-2.01 4.5-4.5-2.01-4.5-4.5-4.5zm0 7c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"}),Object($.createElement)(se.Path,{d:"m3 21.5h8v-8h-8v8zm2-6h4v4h-4v-4z"})),Dn="core/categories",Fn={title:Object(K.__)("Categories"),description:Object(K.__)("Display a list of all categories."),icon:Vn,category:"widgets",supports:{align:!0,html:!1},edit:zn};function Un(e){return Object(J.flow)(qn,Gn,Zn)(e||"")}function qn(e){return e.replace(/&/g,"&")}function Wn(e){return e.replace(/&/g,"&")}function Gn(e){return e.replace(/\[/g,"[")}function Kn(e){return e.replace(/[/g,"[")}function Zn(e){return e.replace(/^(\s*https?:)\/\/([^\s<>"]+\s*)$/m,"$1//$2")}function $n(e){return e.replace(/^(\s*https?:)//([^\s<>"]+\s*)$/m,"$1//$2")}var Yn=Object($.createElement)(se.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(se.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),Object($.createElement)(se.Path,{d:"M9.4,16.6L4.8,12l4.6-4.6L8,6l-6,6l6,6L9.4,16.6z M14.6,16.6l4.6-4.6l-4.6-4.6L16,6l6,6l-6,6L14.6,16.6z"}));var Qn={from:[{type:"enter",regExp:/^```$/,transform:function(){return Object(G.createBlock)("core/code")}},{type:"raw",isMatch:function(e){return"PRE"===e.nodeName&&1===e.children.length&&"CODE"===e.firstChild.nodeName},schema:{pre:{children:{code:{children:{"#text":{}}}}}}}]},Jn={name:"core/code",category:"formatting",attributes:{content:{type:"string",source:"text",selector:"code"}}},Xn=Jn.name,er={title:Object(K.__)("Code"),description:Object(K.__)("Display code snippets that respect your spacing and tabs."),icon:Yn,example:{attributes:{content:Object(K.__)('// A "block" is the abstract term used')+"\n"+Object(K.__)("// to describe units of markup that,")+"\n"+Object(K.__)("// when composed together, form the")+"\n"+Object(K.__)("// content or layout of a page.")+"\n"+Object(K.__)("registerBlockType( name, settings );")}},supports:{html:!1},transforms:Qn,edit:function(e){var t,n=e.attributes,r=e.setAttributes,o=e.className;return Object($.createElement)("div",{className:o},Object($.createElement)(W.PlainText,{value:(t=n.content,Object(J.flow)($n,Kn,Wn)(t||"")),onChange:function(e){return r({content:Un(e)})},placeholder:Object(K.__)("Write code…"),"aria-label":Object(K.__)("Code")}))},save:function(e){var t=e.attributes;return Object($.createElement)("pre",null,Object($.createElement)("code",null,t.content))}};function tr(e){var t,n=tr.doc;n||(n=document.implementation.createHTMLDocument(""),tr.doc=n),n.body.innerHTML=e;var r=!0,o=!1,a=void 0;try{for(var c,i=n.body.firstChild.classList[Symbol.iterator]();!(r=(c=i.next()).done);r=!0){if(t=c.value.match(/^layout-column-(\d+)$/))return Number(t[1])-1}}catch(e){o=!0,a=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw a}}}var nr=[{attributes:{columns:{type:"number",default:2}},isEligible:function(e,t){return!!t.some((function(e){return/layout-column-\d+/.test(e.originalContent)}))&&t.some((function(e){return void 0!==tr(e.originalContent)}))},migrate:function(e,t){var n=t.reduce((function(e,t){var n=tr(t.originalContent);return void 0===n&&(n=0),e[n]||(e[n]=[]),e[n].push(t),e}),[]).map((function(e){return Object(G.createBlock)("core/column",{},e)}));return[Object(J.omit)(e,["columns"]),n]},save:function(e){var t=e.attributes.columns;return Object($.createElement)("div",{className:"has-".concat(t,"-columns")},Object($.createElement)(W.InnerBlocks.Content,null))}},{attributes:{columns:{type:"number",default:2}},migrate:function(e,t){return[e=Object(J.omit)(e,["columns"]),t]},save:function(e){var t=e.attributes,n=t.verticalAlignment,r=t.columns,o=Q()("has-".concat(r,"-columns"),Object(q.a)({},"are-vertically-aligned-".concat(n),n));return Object($.createElement)("div",{className:o},Object($.createElement)(W.InnerBlocks.Content,null))}}],rr=Qe()((function(e){return void 0===e?null:Object(J.times)(e,(function(){return["core/column"]}))})),or=function(e){return Number.isFinite(e)?parseFloat(e.toFixed(2)):void 0};function ar(e,t){var n=e.attributes.width;return or(void 0===n?100/t:n)}function cr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.length;return Object(J.sumBy)(e,(function(e){return ar(e,t)}))}function ir(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.length;return e.reduce((function(e,n){var r=ar(n,t);return Object.assign(e,Object(q.a)({},n.clientId,r))}),{})}function lr(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=(t-cr(e,n))/e.length;return Object(J.mapValues)(ir(e,n),(function(e){return or(e+r)}))}function sr(e,t){return e.map((function(e){return Object(J.merge)({},e,{attributes:{width:t[e.clientId]}})}))}var ur=["core/column"],br=[{title:Object(K.__)("Two columns; equal split"),icon:Object($.createElement)(se.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(se.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M39 12C40.1046 12 41 12.8954 41 14V34C41 35.1046 40.1046 36 39 36H9C7.89543 36 7 35.1046 7 34V14C7 12.8954 7.89543 12 9 12H39ZM39 34V14H25V34H39ZM23 34H9V14H23V34Z"})),template:[["core/column"],["core/column"]]},{title:Object(K.__)("Two columns; one-third, two-thirds split"),icon:Object($.createElement)(se.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(se.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M39 12C40.1046 12 41 12.8954 41 14V34C41 35.1046 40.1046 36 39 36H9C7.89543 36 7 35.1046 7 34V14C7 12.8954 7.89543 12 9 12H39ZM39 34V14H20V34H39ZM18 34H9V14H18V34Z"})),template:[["core/column",{width:33.33}],["core/column",{width:66.66}]]},{title:Object(K.__)("Two columns; two-thirds, one-third split"),icon:Object($.createElement)(se.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(se.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M39 12C40.1046 12 41 12.8954 41 14V34C41 35.1046 40.1046 36 39 36H9C7.89543 36 7 35.1046 7 34V14C7 12.8954 7.89543 12 9 12H39ZM39 34V14H30V34H39ZM28 34H9V14H28V34Z"})),template:[["core/column",{width:66.66}],["core/column",{width:33.33}]]},{title:Object(K.__)("Three columns; equal split"),icon:Object($.createElement)(se.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(se.Path,{fillRule:"evenodd",d:"M41 14a2 2 0 0 0-2-2H9a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h30a2 2 0 0 0 2-2V14zM28.5 34h-9V14h9v20zm2 0V14H39v20h-8.5zm-13 0H9V14h8.5v20z"})),template:[["core/column"],["core/column"],["core/column"]]},{title:Object(K.__)("Three columns; wide center column"),icon:Object($.createElement)(se.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(se.Path,{fillRule:"evenodd",d:"M41 14a2 2 0 0 0-2-2H9a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h30a2 2 0 0 0 2-2V14zM31 34H17V14h14v20zm2 0V14h6v20h-6zm-18 0H9V14h6v20z"})),template:[["core/column",{width:25}],["core/column",{width:50}],["core/column",{width:25}]]}],mr=2;var dr=Object(be.withDispatch)((function(e,t,n){return{updateAlignment:function(r){var o=t.clientId,a=t.setAttributes,c=e("core/block-editor").updateBlockAttributes,i=n.select("core/block-editor").getBlockOrder;a({verticalAlignment:r}),i(o).forEach((function(e){c(e,{verticalAlignment:r})}))},updateColumns:function(r,o){var a=t.clientId,c=e("core/block-editor").replaceInnerBlocks,i=(0,n.select("core/block-editor").getBlocks)(a),l=i.some((function(e){return Number.isFinite(e.attributes.width)})),s=o>r;if(s&&l){var u=or(100/o),b=lr(i,100-u);i=[].concat(Object(U.a)(sr(i,b)),Object(U.a)(Object(J.times)(o-r,(function(){return Object(G.createBlock)("core/column",{width:u})}))))}else if(s)i=[].concat(Object(U.a)(i),Object(U.a)(Object(J.times)(o-r,(function(){return Object(G.createBlock)("core/column")}))));else{if(i=Object(J.dropRight)(i,r-o),l)i=sr(i,lr(i,100))}c(a,i,!1)}}}))((function(e){var t=e.attributes,n=e.className,r=e.updateAlignment,o=e.updateColumns,a=e.clientId,c=t.verticalAlignment,i=Object(be.useSelect)((function(e){return{count:e("core/block-editor").getBlockCount(a)}})).count,l=Object($.useState)(rr(i)),s=Object(ke.a)(l,2),u=s[0],b=s[1],m=Object($.useState)(!1),d=Object(ke.a)(m,2),h=d[0],p=d[1];Object($.useEffect)((function(){h&&p(!1)}),[h]);var g=Q()(n,Object(q.a)({},"are-vertically-aligned-".concat(c),c)),f=0===i&&!h||!u;return Object($.createElement)($.Fragment,null,!f&&Object($.createElement)($.Fragment,null,Object($.createElement)(W.InspectorControls,null,Object($.createElement)(se.PanelBody,null,Object($.createElement)(se.RangeControl,{label:Object(K.__)("Columns"),value:i,onChange:function(e){return o(i,e)},min:2,max:6}))),Object($.createElement)(W.BlockControls,null,Object($.createElement)(W.BlockVerticalAlignmentToolbar,{onChange:r,value:c}))),Object($.createElement)("div",{className:g},Object($.createElement)(W.InnerBlocks,{__experimentalTemplateOptions:br,__experimentalOnSelectTemplateOption:function(e){void 0===e&&(e=rr(mr)),b(e),p(!0)},__experimentalAllowTemplateOptionSkip:!0,template:f?null:u,templateLock:"all",allowedBlocks:ur})))})),hr=Object($.createElement)(se.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(se.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object($.createElement)(se.G,null,Object($.createElement)(se.Path,{d:"M4,4H20a2,2,0,0,1,2,2V18a2,2,0,0,1-2,2H4a2,2,0,0,1-2-2V6A2,2,0,0,1,4,4ZM4 6V18H8V6Zm6 0V18h4V6Zm6 0V18h4V6Z"})));var pr={name:"core/columns",category:"layout",attributes:{verticalAlignment:{type:"string"}}},gr=pr.name,fr={title:Object(K.__)("Columns"),icon:hr,description:Object(K.__)("Add a block that displays content in multiple columns, then add whatever content blocks you’d like."),supports:{align:["wide","full"],html:!1},example:{innerBlocks:[{name:"core/column",innerBlocks:[{name:"core/paragraph",attributes:{content:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent et eros eu felis."}},{name:"core/image",attributes:{url:"https://s.w.org/images/core/5.3/Windbuchencom.jpg"}},{name:"core/paragraph",attributes:{content:"Suspendisse commodo neque lacus, a dictum orci interdum et."}}]},{name:"core/column",innerBlocks:[{name:"core/paragraph",attributes:{content:Object(K.__)("Etiam et egestas lorem. Vivamus sagittis sit amet dolor quis lobortis. Integer sed fermentum arcu, id vulputate lacus. Etiam fermentum sem eu quam hendrerit.")}},{name:"core/paragraph",attributes:{content:Object(K.__)("Nam risus massa, ullamcorper consectetur eros fermentum, porta aliquet ligula. Sed vel mauris nec enim.")}}]}]},deprecated:nr,edit:dr,save:function(e){var t=e.attributes.verticalAlignment,n=Q()(Object(q.a)({},"are-vertically-aligned-".concat(t),t));return Object($.createElement)("div",{className:n},Object($.createElement)(W.InnerBlocks.Content,null))}};var Or=Object(ue.compose)(Object(be.withSelect)((function(e,t){var n=t.clientId;return{hasChildBlocks:(0,e("core/block-editor").getBlockOrder)(n).length>0}})),Object(be.withDispatch)((function(e,t,n){return{updateAlignment:function(r){var o=t.clientId,a=t.setAttributes,c=e("core/block-editor").updateBlockAttributes,i=n.select("core/block-editor").getBlockRootClientId;a({verticalAlignment:r}),c(i(o),{verticalAlignment:null})},updateWidth:function(r){var o=t.clientId,a=e("core/block-editor").updateBlockAttributes,c=n.select("core/block-editor"),i=c.getBlockRootClientId,l=(0,c.getBlocks)(i(o)),s=function(e,t){var n=Object(J.findIndex)(e,{clientId:t});return n===e.length-1?e.slice(0,n):e.slice(n+1)}(l,o),u=r+cr(Object(J.difference)(l,[Object(J.find)(l,{clientId:o})].concat(Object(U.a)(s)))),b=Object(Z.a)({},ir(l,l.length),Object(q.a)({},o,or(r)),lr(s,100-u,l.length));Object(J.forEach)(b,(function(e,t){a(t,{width:e})}))}}})))((function(e){var t=e.attributes,n=e.className,r=e.updateAlignment,o=e.updateWidth,a=e.hasChildBlocks,c=t.verticalAlignment,i=t.width,l=Q()(n,"block-core-columns",Object(q.a)({},"is-vertically-aligned-".concat(c),c));return Object($.createElement)("div",{className:l},Object($.createElement)(W.BlockControls,null,Object($.createElement)(W.BlockVerticalAlignmentToolbar,{onChange:r,value:c})),Object($.createElement)(W.InspectorControls,null,Object($.createElement)(se.PanelBody,{title:Object(K.__)("Column Settings")},Object($.createElement)(se.RangeControl,{label:Object(K.__)("Percentage width"),value:i||"",onChange:o,min:0,max:100,required:!0,allowReset:!0}))),Object($.createElement)(W.InnerBlocks,{templateLock:!1,renderAppender:a?void 0:function(){return Object($.createElement)(W.InnerBlocks.ButtonBlockAppender,null)}}))})),vr=Object($.createElement)(se.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object($.createElement)(se.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object($.createElement)(se.Path,{d:"M11.99 18.54l-7.37-5.73L3 14.07l9 7 9-7-1.63-1.27zM12 16l7.36-5.73L21 9l-9-7-9 7 1.63 1.27L12 16zm0-11.47L17.74 9 12 13.47 6.26 9 12 4.53z"}));var jr={name:"core/column",category:"common",attributes:{verticalAlignment:{type:"string"},width:{type:"number",min:0,max:100}}},yr=jr.name,_r={title:Object(K.__)("Column"),parent:["core/columns"],icon:vr,description:Object(K.__)("A single column within a columns block."),supports:{inserter:!1,reusable:!1,html:!1},getEditWrapperProps:function(e){var t=e.width;if(Number.isFinite(t))return{style:{flexBasis:t+"%"}}},edit:Or,save:function(e){var t,n=e.attributes,r=n.verticalAlignment,o=n.width,a=Q()(Object(q.a)({},"is-vertically-aligned-".concat(r),r));return Number.isFinite(o)&&(t={flexBasis:o+"%"}),Object($.createElement)("div",{className:a,style:t},Object($.createElement)(W.InnerBlocks.Content,null))}},kr="image",Cr="video",wr=50;function Er(e){return e?{backgroundImage:"url(".concat(e,")")}:{}}function xr(e){return 0===e||50===e?null:"has-background-dim-"+10*Math.round(e/10)}var Sr={url:{type:"string"},id:{type:"number"},hasParallax:{type:"boolean",default:!1},dimRatio:{type:"number",default:50},overlayColor:{type:"string"},customOverlayColor:{type:"string"},backgroundType:{type:"string",default:"image"},focalPoint:{type:"object"}},Tr=[{attributes:Object(Z.a)({},Sr,{title:{type:"string",source:"html",selector:"p"},contentAlign:{type:"string",default:"center"}}),supports:{align:!0},save:function(e){var t=e.attributes,n=t.backgroundType,r=t.contentAlign,o=t.customOverlayColor,a=t.dimRatio,c=t.focalPoint,i=t.hasParallax,l=t.overlayColor,s=t.title,u=t.url,b=Object(W.getColorClassName)("background-color",l),m=n===kr?Er(u):{};b||(m.backgroundColor=o),c&&!i&&(m.backgroundPosition="".concat(100*c.x,"% ").concat(100*c.y,"%"));var d=Q()(xr(a),b,Object(q.a)({"has-background-dim":0!==a,"has-parallax":i},"has-".concat(r,"-content"),"center"!==r));return Object($.createElement)("div",{className:d,style:m},Cr===n&&u&&Object($.createElement)("video",{className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,src:u}),!W.RichText.isEmpty(s)&&Object($.createElement)(W.RichText.Content,{tagName:"p",className:"wp-block-cover-text",value:s}))},migrate:function(e){return[Object(J.omit)(e,["title","contentAlign"]),[Object(G.createBlock)("core/paragraph",{content:e.title,align:e.contentAlign,fontSize:"large",placeholder:Object(K.__)("Write title…")})]]}},{attributes:Object(Z.a)({},Sr,{title:{type:"string",source:"html",selector:"p"},contentAlign:{type:"string",default:"center"},align:{type:"string"}}),supports:{className:!1},save:function(e){var t=e.attributes,n=t.url,r=t.title,o=t.hasParallax,a=t.dimRatio,c=t.align,i=t.contentAlign,l=t.overlayColor,s=t.customOverlayColor,u=Object(W.getColorClassName)("background-color",l),b=Er(n);u||(b.backgroundColor=s);var m=Q()("wp-block-cover-image",xr(a),u,Object(q.a)({"has-background-dim":0!==a,"has-parallax":o},"has-".concat(i,"-content"),"center"!==i),c?"align".concat(c):null);return Object($.createElement)("div",{className:m,style:b},!W.RichText.isEmpty(r)&&Object($.createElement)(W.RichText.Content,{tagName:"p",className:"wp-block-cover-image-text",value:r}))},migrate:function(e){return[Object(J.omit)(e,["title","contentAlign","align"]),[Object(G.createBlock)("core/paragraph",{content:e.title,align:e.contentAlign,fontSize:"large",placeholder:Object(K.__)("Write title…")})]]}},{attributes:Object(Z.a)({},Sr,{title:{type:"string",source:"html",selector:"h2"},align:{type:"string"},contentAlign:{type:"string",default:"center"}}),supports:{className:!1},save:function(e){var t=e.attributes,n=t.url,r=t.title,o=t.hasParallax,a=t.dimRatio,c=t.align,i=Er(n),l=Q()("wp-block-cover-image",xr(a),{"has-background-dim":0!==a,"has-parallax":o},c?"align".concat(c):null);return Object($.createElement)("section",{className:l,style:i},Object($.createElement)(W.RichText.Content,{tagName:"h2",value:r}))},migrate:function(e){return[Object(J.omit)(e,["title","contentAlign","align"]),[Object(G.createBlock)("core/paragraph",{content:e.title,align:e.contentAlign,fontSize:"large",placeholder:Object(K.__)("Write title…")})]]}}],Nr=n(221),Rr=n.n(Nr),Ar=n(48),Br=n.n(Ar),Ir=Object($.createElement)(se.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object($.createElement)(se.Path,{d:"M4 4h7V2H4c-1.1 0-2 .9-2 2v7h2V4zm6 9l-4 5h12l-3-4-2.03 2.71L10 13zm7-4.5c0-.83-.67-1.5-1.5-1.5S14 7.67 14 8.5s.67 1.5 1.5 1.5S17 9.33 17 8.5zM20 2h-7v2h7v7h2V4c0-1.1-.9-2-2-2zm0 18h-7v2h7c1.1 0 2-.9 2-2v-7h-2v7zM4 13H2v7c0 1.1.9 2 2 2h7v-2H4v-7z"}),Object($.createElement)(se.Path,{d:"M0 0h24v24H0z",fill:"none"})),Mr=["image","video"],Pr=[["core/paragraph",{align:"center",fontSize:"large",placeholder:Object(K.__)("Write title…")}]];function Lr(){return Lr.fastAverageColor||(Lr.fastAverageColor=new Rr.a),Lr.fastAverageColor}var Hr=Object(ue.withInstanceId)((function(e){var t=e.value,n=void 0===t?"":t,r=e.instanceId,o=e.onChange,a=Object($.useState)(null),c=Object(ke.a)(a,2),i=c[0],l=c[1],s=Object($.useCallback)((function(e){var t=""!==e.target.value?parseInt(e.target.value,10):void 0;(isNaN(t)||t"+Object(K.__)("One of the hardest things to do in technology is disrupt yourself.")+"
",citation:"Matt Mullenweg"}},styles:[{name:"default",label:Object(K._x)("Default","block style"),isDefault:!0},{name:"solid-color",label:Object(K.__)("Solid Color")}],supports:{align:["left","right","wide","full"]},edit:Na,save:function(e){var t,n,r=e.attributes,o=r.mainColor,a=r.customMainColor,c=r.textColor,i=r.customTextColor,l=r.value,s=r.citation,u=r.className;if(Object(J.includes)(u,Ea)){var b=Object(W.getColorClassName)("background-color",o);t=Q()(Object(q.a)({"has-background":b||a},b,b)),n={backgroundColor:b?void 0:a}}else if(a)n={borderColor:a};else if(o){var m=Object(J.get)(Object(be.select)("core/block-editor").getSettings(),["colors"],[]);n={borderColor:Object(W.getColorObjectByAttributeValues)(m,o).color}}var d=Object(W.getColorClassName)("color",c),h=(c||i)&&Q()("has-text-color",Object(q.a)({},d,d)),p=d?void 0:{color:i};return Object($.createElement)("figure",{className:t,style:n},Object($.createElement)("blockquote",{className:h,style:p},Object($.createElement)(W.RichText.Content,{value:l,multiline:!0}),!W.RichText.isEmpty(s)&&Object($.createElement)(W.RichText.Content,{tagName:"cite",value:s})))},deprecated:Sa},Ma=function(e){function t(){var e;return Object(re.a)(this,t),(e=Object(ae.a)(this,Object(ce.a)(t).apply(this,arguments))).titleField=Object($.createRef)(),e.editButton=Object($.createRef)(),e.handleFormSubmit=e.handleFormSubmit.bind(Object(ie.a)(e)),e.handleTitleChange=e.handleTitleChange.bind(Object(ie.a)(e)),e.handleTitleKeyDown=e.handleTitleKeyDown.bind(Object(ie.a)(e)),e}return Object(le.a)(t,e),Object(oe.a)(t,[{key:"componentDidMount",value:function(){this.props.isEditing&&this.titleField.current&&this.titleField.current.select()}},{key:"componentDidUpdate",value:function(e){!e.isEditing&&this.props.isEditing&&this.titleField.current.select(),!e.isEditing&&!e.isSaving||this.props.isEditing||this.props.isSaving||this.editButton.current.focus()}},{key:"handleFormSubmit",value:function(e){e.preventDefault(),this.props.onSave()}},{key:"handleTitleChange",value:function(e){this.props.onChangeTitle(e.target.value)}},{key:"handleTitleKeyDown",value:function(e){e.keyCode===we.ESCAPE&&(e.stopPropagation(),this.props.onCancel())}},{key:"render",value:function(){var e=this.props,t=e.isEditing,n=e.title,r=e.isSaving,o=e.isEditDisabled,a=e.onEdit,c=e.instanceId;return Object($.createElement)($.Fragment,null,!t&&!r&&Object($.createElement)("div",{className:"reusable-block-edit-panel"},Object($.createElement)("b",{className:"reusable-block-edit-panel__info"},n),Object($.createElement)(se.Button,{ref:this.editButton,isLarge:!0,className:"reusable-block-edit-panel__button",disabled:o,onClick:a},Object(K.__)("Edit"))),(t||r)&&Object($.createElement)("form",{className:"reusable-block-edit-panel",onSubmit:this.handleFormSubmit},Object($.createElement)("label",{htmlFor:"reusable-block-edit-panel__title-".concat(c),className:"reusable-block-edit-panel__label"},Object(K.__)("Name:")),Object($.createElement)("input",{ref:this.titleField,type:"text",disabled:r,className:"reusable-block-edit-panel__title",value:n,onChange:this.handleTitleChange,onKeyDown:this.handleTitleKeyDown,id:"reusable-block-edit-panel__title-".concat(c)}),Object($.createElement)(se.Button,{type:"submit",isLarge:!0,isBusy:r,disabled:!n||r,className:"reusable-block-edit-panel__button"},Object(K.__)("Save"))))}}]),t}($.Component),Pa=Object(ue.withInstanceId)(Ma);var La=function(e){var t=e.title,n=Object(K.sprintf)(Object(K.__)("Reusable Block: %s"),t);return Object($.createElement)(se.Tooltip,{text:n},Object($.createElement)("span",{className:"reusable-block-indicator"},Object($.createElement)(se.Dashicon,{icon:"controls-repeat"})))},Ha=function(e){function t(e){var n,r=e.reusableBlock;return Object(re.a)(this,t),(n=Object(ae.a)(this,Object(ce.a)(t).apply(this,arguments))).startEditing=n.startEditing.bind(Object(ie.a)(n)),n.stopEditing=n.stopEditing.bind(Object(ie.a)(n)),n.setBlocks=n.setBlocks.bind(Object(ie.a)(n)),n.setTitle=n.setTitle.bind(Object(ie.a)(n)),n.save=n.save.bind(Object(ie.a)(n)),n.state=r?{isEditing:r.isTemporary,title:r.title,blocks:Object(G.parse)(r.content)}:{isEditing:!1,title:null,blocks:[]},n}return Object(le.a)(t,e),Object(oe.a)(t,[{key:"componentDidMount",value:function(){this.props.reusableBlock||this.props.fetchReusableBlock()}},{key:"componentDidUpdate",value:function(e){e.reusableBlock!==this.props.reusableBlock&&null===this.state.title&&this.setState({title:this.props.reusableBlock.title,blocks:Object(G.parse)(this.props.reusableBlock.content)})}},{key:"startEditing",value:function(){var e=this.props.reusableBlock;this.setState({isEditing:!0,title:e.title,blocks:Object(G.parse)(e.content)})}},{key:"stopEditing",value:function(){this.setState({isEditing:!1,title:null,blocks:[]})}},{key:"setBlocks",value:function(e){this.setState({blocks:e})}},{key:"setTitle",value:function(e){this.setState({title:e})}},{key:"save",value:function(){var e=this.props,t=e.onChange,n=e.onSave,r=this.state,o=r.blocks;t({title:r.title,content:Object(G.serialize)(o)}),n(),this.stopEditing()}},{key:"render",value:function(){var e=this.props,t=e.isSelected,n=e.reusableBlock,r=e.isFetching,o=e.isSaving,a=e.canUpdateBlock,c=e.settings,i=this.state,l=i.isEditing,s=i.title,u=i.blocks;if(!n&&r)return Object($.createElement)(se.Placeholder,null,Object($.createElement)(se.Spinner,null));if(!n)return Object($.createElement)(se.Placeholder,null,Object(K.__)("Block has been deleted or is unavailable."));var b=Object($.createElement)(W.BlockEditorProvider,{settings:c,value:u,onChange:this.setBlocks,onInput:this.setBlocks},Object($.createElement)(W.WritingFlow,null,Object($.createElement)(W.BlockList,null)));return l||(b=Object($.createElement)(se.Disabled,null,b)),Object($.createElement)("div",{className:"block-library-block__reusable-block-container"},(t||l)&&Object($.createElement)(Pa,{isEditing:l,title:null!==s?s:n.title,isSaving:o&&!n.isTemporary,isEditDisabled:!a,onEdit:this.startEditing,onChangeTitle:this.setTitle,onSave:this.save,onCancel:this.stopEditing}),!t&&!l&&Object($.createElement)(La,{title:n.title}),b)}}]),t}($.Component),za=Object(ue.compose)([Object(be.withSelect)((function(e,t){var n=e("core/editor"),r=n.__experimentalGetReusableBlock,o=n.__experimentalIsFetchingReusableBlock,a=n.__experimentalIsSavingReusableBlock,c=e("core").canUser,i=e("core/block-editor"),l=i.__experimentalGetParsedReusableBlock,s=i.getSettings,u=t.attributes.ref,b=r(u);return{reusableBlock:b,isFetching:o(u),isSaving:a(u),blocks:b?l(b.id):null,canUpdateBlock:!!b&&!b.isTemporary&&!!c("update","blocks",u),settings:s()}})),Object(be.withDispatch)((function(e,t){var n=e("core/editor"),r=n.__experimentalFetchReusableBlocks,o=n.__experimentalUpdateReusableBlock,a=n.__experimentalSaveReusableBlock,c=t.attributes.ref;return{fetchReusableBlock:Object(J.partial)(r,c),onChange:Object(J.partial)(o,c),onSave:Object(J.partial)(a,c)}}))])(Ha),Va="core/block",Da={title:Object(K.__)("Reusable Block"),category:"reusable",description:Object(K.__)("Create content, and save it for you and other contributors to reuse across your site. Update the block, and the changes apply everywhere it’s used."),supports:{customClassName:!1,html:!1,inserter:!1},edit:za},Fa=function(e){function t(){var e;return Object(re.a)(this,t),(e=Object(ae.a)(this,Object(ce.a)(t).apply(this,arguments))).state={editing:!e.props.attributes.feedURL},e.toggleAttribute=e.toggleAttribute.bind(Object(ie.a)(e)),e.onSubmitURL=e.onSubmitURL.bind(Object(ie.a)(e)),e}return Object(le.a)(t,e),Object(oe.a)(t,[{key:"toggleAttribute",value:function(e){var t=this;return function(){var n=t.props.attributes[e];(0,t.props.setAttributes)(Object(q.a)({},e,!n))}}},{key:"onSubmitURL",value:function(e){e.preventDefault(),this.props.attributes.feedURL&&this.setState({editing:!1})}},{key:"render",value:function(){var e=this,t=this.props.attributes,n=t.blockLayout,r=t.columns,o=t.displayAuthor,a=t.displayExcerpt,c=t.displayDate,i=t.excerptLength,l=t.feedURL,s=t.itemsToShow,u=this.props.setAttributes;if(this.state.editing)return Object($.createElement)(se.Placeholder,{icon:"rss",label:"RSS"},Object($.createElement)("form",{onSubmit:this.onSubmitURL},Object($.createElement)(se.TextControl,{placeholder:Object(K.__)("Enter URL here…"),value:l,onChange:function(e){return u({feedURL:e})},className:"components-placeholder__input"}),Object($.createElement)(se.Button,{isLarge:!0,type:"submit"},Object(K.__)("Use URL"))));var b=[{icon:"edit",title:Object(K.__)("Edit RSS URL"),onClick:function(){return e.setState({editing:!0})}},{icon:"list-view",title:Object(K.__)("List view"),onClick:function(){return u({blockLayout:"list"})},isActive:"list"===n},{icon:"grid-view",title:Object(K.__)("Grid view"),onClick:function(){return u({blockLayout:"grid"})},isActive:"grid"===n}];return Object($.createElement)($.Fragment,null,Object($.createElement)(W.BlockControls,null,Object($.createElement)(se.Toolbar,{controls:b})),Object($.createElement)(W.InspectorControls,null,Object($.createElement)(se.PanelBody,{title:Object(K.__)("RSS Settings")},Object($.createElement)(se.RangeControl,{label:Object(K.__)("Number of items"),value:s,onChange:function(e){return u({itemsToShow:e})},min:1,max:10,required:!0}),Object($.createElement)(se.ToggleControl,{label:Object(K.__)("Display author"),checked:o,onChange:this.toggleAttribute("displayAuthor")}),Object($.createElement)(se.ToggleControl,{label:Object(K.__)("Display date"),checked:c,onChange:this.toggleAttribute("displayDate")}),Object($.createElement)(se.ToggleControl,{label:Object(K.__)("Display excerpt"),checked:a,onChange:this.toggleAttribute("displayExcerpt")}),a&&Object($.createElement)(se.RangeControl,{label:Object(K.__)("Max number of words in excerpt"),value:i,onChange:function(e){return u({excerptLength:e})},min:10,max:100,required:!0}),"grid"===n&&Object($.createElement)(se.RangeControl,{label:Object(K.__)("Columns"),value:r,onChange:function(e){return u({columns:e})},min:2,max:6,required:!0}))),Object($.createElement)(se.Disabled,null,Object($.createElement)(rn.a,{block:"core/rss",attributes:this.props.attributes})))}}]),t}($.Component),Ua="core/rss",qa={title:Object(K.__)("RSS"),description:Object(K.__)("Display entries from any RSS or Atom feed."),icon:"rss",category:"widgets",keywords:[Object(K.__)("atom"),Object(K.__)("feed")],supports:{align:!0,html:!1},example:{attributes:{feedURL:"https://wordpress.org"}},edit:Fa};var Wa="core/search",Ga={title:Object(K.__)("Search"),description:Object(K.__)("Help visitors find your content."),icon:"search",category:"widgets",keywords:[Object(K.__)("find")],supports:{align:!0},example:{},edit:function(e){var t=e.className,n=e.attributes,r=e.setAttributes,o=n.label,a=n.placeholder,c=n.buttonText;return Object($.createElement)("div",{className:t},Object($.createElement)(W.RichText,{wrapperClassName:"wp-block-search__label","aria-label":Object(K.__)("Label text"),placeholder:Object(K.__)("Add label…"),withoutInteractiveFormatting:!0,value:o,onChange:function(e){return r({label:e})}}),Object($.createElement)("input",{className:"wp-block-search__input","aria-label":Object(K.__)("Optional placeholder text"),placeholder:a?void 0:Object(K.__)("Optional placeholder…"),value:a,onChange:function(e){return r({placeholder:e.target.value})}}),Object($.createElement)(W.RichText,{wrapperClassName:"wp-block-search__button",className:"wp-block-search__button-rich-text","aria-label":Object(K.__)("Button text"),placeholder:Object(K.__)("Add button text…"),withoutInteractiveFormatting:!0,value:c,onChange:function(e){return r({buttonText:e})}}))}},Ka=[{attributes:{backgroundColor:{type:"string"},customBackgroundColor:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1},save:function(e){var t=e.attributes,n=t.backgroundColor,r=t.customBackgroundColor,o=Object(W.getColorClassName)("background-color",n),a=Q()(o,{"has-background":n||r}),c={backgroundColor:o?void 0:r};return Object($.createElement)("div",{className:a,style:c},Object($.createElement)(W.InnerBlocks.Content,null))}}];var Za=Object(ue.compose)([Object(W.withColors)("backgroundColor"),Object(be.withSelect)((function(e,t){var n=t.clientId,r=(0,e("core/block-editor").getBlock)(n);return{hasInnerBlocks:!(!r||!r.innerBlocks.length)}}))])((function(e){var t=e.className,n=e.setBackgroundColor,r=e.backgroundColor,o=e.hasInnerBlocks,a={backgroundColor:r.color},c=Q()(t,r.class,{"has-background":!!r.color});return Object($.createElement)($.Fragment,null,Object($.createElement)(W.InspectorControls,null,Object($.createElement)(W.PanelColorSettings,{title:Object(K.__)("Color Settings"),colorSettings:[{value:r.color,onChange:n,label:Object(K.__)("Background Color")}]})),Object($.createElement)("div",{className:c,style:a},Object($.createElement)("div",{className:"wp-block-group__inner-container"},Object($.createElement)(W.InnerBlocks,{renderAppender:!o&&W.InnerBlocks.ButtonBlockAppender}))))})),$a=Object($.createElement)(se.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(se.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M9 8a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1h-1v3a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1v-4a1 1 0 0 1 1-1h1V8zm2 3h4V9h-4v2zm2 2H9v2h4v-2z"}),Object($.createElement)(se.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M2 4.732A2 2 0 1 1 4.732 2h14.536A2 2 0 1 1 22 4.732v14.536A2 2 0 1 1 19.268 22H4.732A2 2 0 1 1 2 19.268V4.732zM4.732 4h14.536c.175.304.428.557.732.732v14.536a2.01 2.01 0 0 0-.732.732H4.732A2.01 2.01 0 0 0 4 19.268V4.732A2.01 2.01 0 0 0 4.732 4z"}));var Ya={name:"core/group",category:"layout",attributes:{backgroundColor:{type:"string"},customBackgroundColor:{type:"string"}}},Qa=Ya.name,Ja={title:Object(K.__)("Group"),icon:$a,description:Object(K.__)("A block that groups other blocks."),keywords:[Object(K.__)("container"),Object(K.__)("wrapper"),Object(K.__)("row"),Object(K.__)("section")],example:{attributes:{customBackgroundColor:"#ffffff"},innerBlocks:[{name:"core/paragraph",attributes:{customTextColor:"#cf2e2e",fontSize:"large",content:Object(K.__)("One.")}},{name:"core/paragraph",attributes:{customTextColor:"#ff6900",fontSize:"large",content:Object(K.__)("Two.")}},{name:"core/paragraph",attributes:{customTextColor:"#fcb900",fontSize:"large",content:Object(K.__)("Three.")}},{name:"core/paragraph",attributes:{customTextColor:"#00d084",fontSize:"large",content:Object(K.__)("Four.")}},{name:"core/paragraph",attributes:{customTextColor:"#0693e3",fontSize:"large",content:Object(K.__)("Five.")}},{name:"core/paragraph",attributes:{customTextColor:"#9b51e0",fontSize:"large",content:Object(K.__)("Six.")}}]},supports:{align:["wide","full"],anchor:!0,html:!1},transforms:{from:[{type:"block",isMultiBlock:!0,blocks:["*"],__experimentalConvert:function(e){if(1!==e.length||"core/group"!==e[0].name){var t=["wide","full"],n=e.reduce((function(e,n){var r=n.attributes.align;return t.indexOf(r)>t.indexOf(e)?r:e}),void 0),r=e.map((function(e){return Object(G.createBlock)(e.name,e.attributes,e.innerBlocks)}));return Object(G.createBlock)("core/group",{align:n},r)}}}]},edit:Za,save:function(e){var t=e.attributes,n=t.backgroundColor,r=t.customBackgroundColor,o=Object(W.getColorClassName)("background-color",n),a=Q()(o,{"has-background":n||r}),c={backgroundColor:o?void 0:r};return Object($.createElement)("div",{className:a,style:c},Object($.createElement)("div",{className:"wp-block-group__inner-container"},Object($.createElement)(W.InnerBlocks.Content,null)))},deprecated:Ka};var Xa=Object(W.withColors)("color",{textColor:"color"})((function(e){var t=e.color,n=e.setColor,r=e.className;return Object($.createElement)($.Fragment,null,Object($.createElement)(se.HorizontalRule,{className:Q()(r,Object(q.a)({"has-background":t.color},t.class,t.class)),style:{backgroundColor:t.color,color:t.color}}),Object($.createElement)(W.InspectorControls,null,Object($.createElement)(W.PanelColorSettings,{title:Object(K.__)("Color Settings"),colorSettings:[{value:t.color,onChange:n,label:Object(K.__)("Color")}]})))})),ec=Object($.createElement)(se.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(se.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object($.createElement)(se.Path,{d:"M19 13H5v-2h14v2z"}));var tc={from:[{type:"enter",regExp:/^-{3,}$/,transform:function(){return Object(G.createBlock)("core/separator")}},{type:"raw",selector:"hr",schema:{hr:{}}}]},nc={name:"core/separator",category:"layout",attributes:{color:{type:"string"},customColor:{type:"string"}}},rc=nc.name,oc={title:Object(K.__)("Separator"),description:Object(K.__)("Create a break between ideas or sections with a horizontal separator."),icon:ec,keywords:[Object(K.__)("horizontal-line"),"hr",Object(K.__)("divider")],example:{attributes:{customColor:"#065174",className:"is-style-wide"}},styles:[{name:"default",label:Object(K.__)("Default"),isDefault:!0},{name:"wide",label:Object(K.__)("Wide Line")},{name:"dots",label:Object(K.__)("Dots")}],transforms:tc,edit:Xa,save:function(e){var t,n=e.attributes,r=n.color,o=n.customColor,a=Object(W.getColorClassName)("background-color",r),c=Object(W.getColorClassName)("color",r),i=Q()((t={"has-text-color has-background":r||o},Object(q.a)(t,a,a),Object(q.a)(t,c,c),t)),l={backgroundColor:a?void 0:o,color:c?void 0:o};return Object($.createElement)("hr",{className:i,style:l})}},ac=Object(ue.withInstanceId)((function(e){var t=e.attributes,n=e.setAttributes,r=e.instanceId,o="blocks-shortcode-input-".concat(r);return Object($.createElement)("div",{className:"wp-block-shortcode components-placeholder"},Object($.createElement)("label",{htmlFor:o,className:"components-placeholder__label"},Object($.createElement)(se.Dashicon,{icon:"shortcode"}),Object(K.__)("Shortcode")),Object($.createElement)(W.PlainText,{className:"input-control",id:o,value:t.text,placeholder:Object(K.__)("Write shortcode here…"),onChange:function(e){return n({text:e})}}))})),cc=Object($.createElement)(se.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(se.Path,{d:"M8.5,21.4l1.9,0.5l5.2-19.3l-1.9-0.5L8.5,21.4z M3,19h4v-2H5V7h2V5H3V19z M17,5v2h2v10h-2v2h4V5H17z"}));var ic=n(69),lc={from:[{type:"shortcode",tag:"[a-z][a-z0-9_-]*",attributes:{text:{type:"string",shortcode:function(e,t){var n=t.content;return Object(ic.removep)(Object(ic.autop)(n))}}},priority:20}]},sc="core/shortcode",uc={title:Object(K.__)("Shortcode"),description:Object(K.__)("Insert additional custom elements with a WordPress shortcode."),icon:cc,category:"widgets",transforms:lc,supports:{customClassName:!1,className:!1,html:!1},edit:ac,save:function(e){var t=e.attributes;return Object($.createElement)($.RawHTML,null,t.text)}},bc=Object(ue.compose)([Object(be.withDispatch)((function(e){var t=e("core/block-editor").toggleSelection;return{onResizeStart:function(){return t(!1)},onResizeStop:function(){return t(!0)}}})),ue.withInstanceId])((function(e){var t=e.attributes,n=e.isSelected,r=e.setAttributes,o=e.instanceId,a=e.onResizeStart,c=e.onResizeStop,i=t.height,l="block-spacer-height-input-".concat(o),s=Object($.useState)(i),u=Object(ke.a)(s,2),b=u[0],m=u[1];return Object($.createElement)($.Fragment,null,Object($.createElement)(se.ResizableBox,{className:Q()("block-library-spacer__resize-container",{"is-selected":n}),size:{height:i},minHeight:"20",enable:{top:!1,right:!1,bottom:!0,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},onResizeStart:a,onResizeStop:function(e,t,n,o){c();var a=parseInt(i+o.height,10);r({height:a}),m(a)}}),Object($.createElement)(W.InspectorControls,null,Object($.createElement)(se.PanelBody,{title:Object(K.__)("Spacer Settings")},Object($.createElement)(se.BaseControl,{label:Object(K.__)("Height in pixels"),id:l},Object($.createElement)("input",{type:"number",id:l,onChange:function(e){var t=parseInt(e.target.value,10);m(t),isNaN(t)?(m(""),t=100):t<20&&(t=20),r({height:t})},value:b,min:"20",step:"10"})))))})),mc=Object($.createElement)(se.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(se.G,null,Object($.createElement)(se.Path,{d:"M13 4v2h3.59L6 16.59V13H4v7h7v-2H7.41L18 7.41V11h2V4h-7"})));var dc={name:"core/spacer",category:"layout",attributes:{height:{type:"number",default:100}}},hc=dc.name,pc={title:Object(K.__)("Spacer"),description:Object(K.__)("Add white space between blocks and customize its height."),icon:mc,edit:bc,save:function(e){var t=e.attributes;return Object($.createElement)("div",{style:{height:t.height},"aria-hidden":!0})}},gc=n(37),fc=n.n(gc);var Oc=Object($.createElement)(se.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object($.createElement)(se.Path,{d:"M7.1 6l-.5 3h4.5L9.4 19h3l1.8-10h4.5l.5-3H7.1z"}));var vc={to:[{type:"block",blocks:["core/paragraph"],transform:function(e){return Object(G.createBlock)("core/paragraph",e)}}]},jc={name:"core/subhead",category:"common",attributes:{align:{type:"string"},content:{type:"string",source:"html",selector:"p"}}},yc=jc.name,_c={title:Object(K.__)("Subheading (deprecated)"),description:Object(K.__)("This block is deprecated. Please use the Paragraph block instead."),icon:Oc,supports:{inserter:!1,multiple:!1},transforms:vc,edit:function(e){var t=e.attributes,n=e.setAttributes,r=e.className,o=t.align,a=t.content,c=t.placeholder;return fc()("The Subheading block",{alternative:"the Paragraph block",plugin:"Gutenberg"}),Object($.createElement)($.Fragment,null,Object($.createElement)(W.BlockControls,null,Object($.createElement)(W.AlignmentToolbar,{value:o,onChange:function(e){n({align:e})}})),Object($.createElement)(W.RichText,{tagName:"p",value:a,onChange:function(e){n({content:e})},style:{textAlign:o},className:r,placeholder:c||Object(K.__)("Write subheading…")}))},save:function(e){var t=e.attributes,n=t.align,r=t.content;return Object($.createElement)(W.RichText.Content,{tagName:"p",style:{textAlign:n},value:r})}},kc=[{attributes:{hasFixedLayout:{type:"boolean",default:!1},backgroundColor:{type:"string"},head:{type:"array",default:[],source:"query",selector:"thead tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:{content:{type:"string",source:"html"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"},align:{type:"string",source:"attribute",attribute:"data-align"}}}}},body:{type:"array",default:[],source:"query",selector:"tbody tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:{content:{type:"string",source:"html"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"},align:{type:"string",source:"attribute",attribute:"data-align"}}}}},foot:{type:"array",default:[],source:"query",selector:"tfoot tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:{content:{type:"string",source:"html"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"},align:{type:"string",source:"attribute",attribute:"data-align"}}}}}},supports:{align:!0},save:function(e){var t=e.attributes,n=t.hasFixedLayout,r=t.head,o=t.body,a=t.foot,c=t.backgroundColor;if(!r.length&&!o.length&&!a.length)return null;var i=Object(W.getColorClassName)("background-color",c),l=Q()(i,{"has-fixed-layout":n,"has-background":!!i}),s=function(e){var t=e.type,n=e.rows;if(!n.length)return null;var r="t".concat(t);return Object($.createElement)(r,null,n.map((function(e,t){var n=e.cells;return Object($.createElement)("tr",{key:t},n.map((function(e,t){var n=e.content,r=e.tag,o=e.scope;return Object($.createElement)(W.RichText.Content,{tagName:r,value:n,key:t,scope:"th"===r?o:void 0})})))})))};return Object($.createElement)("table",{className:l},Object($.createElement)(s,{type:"head",rows:r}),Object($.createElement)(s,{type:"body",rows:o}),Object($.createElement)(s,{type:"foot",rows:a}))}}],Cc=["align"];function wc(e,t,n){if(!t)return e;var r=Object(J.pick)(e,["head","body","foot"]),o=t.sectionName,a=t.rowIndex;return Object(J.mapValues)(r,(function(e,r){return o&&o!==r?e:e.map((function(e,o){return a&&a!==o?e:{cells:e.cells.map((function(e,a){return Ec({sectionName:r,columnIndex:a,rowIndex:o},t)?n(e):e}))}}))}))}function Ec(e,t){if(!e||!t)return!1;switch(t.type){case"column":return"column"===t.type&&e.columnIndex===t.columnIndex;case"cell":return"cell"===t.type&&e.sectionName===t.sectionName&&e.columnIndex===t.columnIndex&&e.rowIndex===t.rowIndex}}function xc(e,t){var n=t.sectionName,r=t.rowIndex,o=t.columnCount,a=function(e){return Nc(e.head)?Nc(e.body)?Nc(e.foot)?void 0:e.foot[0]:e.body[0]:e.head[0]}(e),c=void 0===o?Object(J.get)(a,["cells","length"]):o;return c?Object(q.a)({},n,[].concat(Object(U.a)(e[n].slice(0,r)),[{cells:Object(J.times)(c,(function(e){var t=Object(J.get)(a,["cells",e],{}),r=Object(J.pick)(t,Cc);return Object(Z.a)({},r,{content:"",tag:"head"===n?"th":"td"})}))}],Object(U.a)(e[n].slice(r)))):e}function Sc(e,t){var n=t.columnIndex,r=Object(J.pick)(e,["head","body","foot"]);return Object(J.mapValues)(r,(function(e,t){return Nc(e)?e:e.map((function(e){return Rc(e)||e.cells.length