WordPress/wp-includes/js/dist/block-library.min.js

23 lines
182 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

this.wp=this.wp||{},this.wp.blockLibrary=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=368)}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.lodash}()},10:function(e,t){!function(){e.exports=this.wp.blocks}()},11:function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}n.d(t,"a",function(){return o})},12:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",function(){return r})},13:function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(27),o=n(3);function a(e,t){return!t||"object"!==Object(r.a)(t)&&"function"!=typeof t?Object(o.a)(e):t}},14:function(e,t,n){"use strict";function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",function(){return r})},15:function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}n.d(t,"a",function(){return o})},16:function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",function(){return r})},17:function(e,t,n){var r;
/*!
Copyright (c) 2017 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/
/*!
Copyright (c) 2017 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/
!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var a=typeof r;if("string"===a||"number"===a)e.push(r);else if(Array.isArray(r)&&r.length){var c=o.apply(null,r);c&&e.push(c)}else if("object"===a)for(var i in r)n.call(r,i)&&r[i]&&e.push(i)}}return e.join(" ")}void 0!==e&&e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},19:function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,"a",function(){return r})},2:function(e,t){!function(){e.exports=this.wp.i18n}()},20:function(e,t){!function(){e.exports=this.wp.keycodes}()},21:function(e,t,n){"use strict";var r=n(33);function o(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||Object(r.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}n.d(t,"a",function(){return o})},22:function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}n.d(t,"a",function(){return r})},23:function(e,t){!function(){e.exports=this.wp.richText}()},26:function(e,t,n){"use strict";var r=n(34);var o=n(35);function a(e,t){return Object(r.a)(e)||function(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var c,i=e[Symbol.iterator]();!(r=(c=i.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw a}}return n}(e,t)||Object(o.a)()}n.d(t,"a",function(){return a})},27:function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e){return(o="function"==typeof Symbol&&"symbol"===r(Symbol.iterator)?function(e){return r(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":r(e)})(e)}n.d(t,"a",function(){return o})},28:function(e,t){!function(){e.exports=this.moment}()},3:function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",function(){return r})},31:function(e,t){!function(){e.exports=this.wp.deprecated}()},33:function(e,t,n){"use strict";function r(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}n.d(t,"a",function(){return r})},34:function(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,"a",function(){return r})},35:function(e,t,n){"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}n.d(t,"a",function(){return r})},36:function(e,t){!function(){e.exports=this.wp.blob}()},368:function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"name",function(){return le}),n.d(r,"settings",function(){return se});var o={};n.r(o),n.d(o,"name",function(){return we}),n.d(o,"settings",function(){return _e});var a={};n.r(a),n.d(a,"getLevelFromHeadingNodeName",function(){return Ne}),n.d(a,"name",function(){return Ae}),n.d(a,"settings",function(){return Re});var c={};n.r(c),n.d(c,"name",function(){return Le}),n.d(c,"settings",function(){return ze});var i={};n.r(i),n.d(i,"name",function(){return $e}),n.d(i,"settings",function(){return Ge});var l={};n.r(l),n.d(l,"name",function(){return Qe}),n.d(l,"settings",function(){return Ye});var s={};n.r(s),n.d(s,"name",function(){return et}),n.d(s,"settings",function(){return tt});var u={};n.r(u),n.d(u,"name",function(){return it}),n.d(u,"settings",function(){return st});var b={};n.r(b),n.d(b,"name",function(){return mt}),n.d(b,"settings",function(){return ht});var m={};n.r(m),n.d(m,"name",function(){return pt}),n.d(m,"settings",function(){return dt});var h={};n.r(h),n.d(h,"name",function(){return jt}),n.d(h,"settings",function(){return vt});var p={};n.r(p),n.d(p,"name",function(){return yt}),n.d(p,"settings",function(){return wt});var d={};n.r(d),n.d(d,"name",function(){return Et}),n.d(d,"settings",function(){return xt});var g={};n.r(g),n.d(g,"getEmbedEdit",function(){return Mt}),n.d(g,"name",function(){return Ht}),n.d(g,"settings",function(){return Wt}),n.d(g,"common",function(){return Kt}),n.d(g,"others",function(){return $t});var O={};n.r(O),n.d(O,"name",function(){return Jt}),n.d(O,"settings",function(){return Xt});var f={};n.r(f),n.d(f,"name",function(){return en}),n.d(f,"settings",function(){return tn});var j={};n.r(j),n.d(j,"name",function(){return rn}),n.d(j,"settings",function(){return on});var v={};n.r(v),n.d(v,"name",function(){return bn}),n.d(v,"settings",function(){return mn});var y={};n.r(y),n.d(y,"name",function(){return gn}),n.d(y,"settings",function(){return On});var w={};n.r(w),n.d(w,"name",function(){return jn}),n.d(w,"settings",function(){return vn});var C={};n.r(C),n.d(C,"name",function(){return yn}),n.d(C,"settings",function(){return wn});var k={};n.r(k),n.d(k,"name",function(){return Cn}),n.d(k,"settings",function(){return kn});var E={};n.r(E),n.d(E,"name",function(){return Nn}),n.d(E,"settings",function(){return Tn});var _={};n.r(_),n.d(_,"name",function(){return zn}),n.d(_,"settings",function(){return Mn});var x={};n.r(x),n.d(x,"name",function(){return Pn}),n.d(x,"settings",function(){return Dn});var S={};n.r(S),n.d(S,"name",function(){return Fn}),n.d(S,"settings",function(){return Vn});var N={};n.r(N),n.d(N,"name",function(){return Un}),n.d(N,"settings",function(){return qn});var T={};n.r(T),n.d(T,"name",function(){return $n}),n.d(T,"settings",function(){return Gn});var B={};n.r(B),n.d(B,"name",function(){return Xn}),n.d(B,"settings",function(){return er});var A={};n.r(A),n.d(A,"name",function(){return tr}),n.d(A,"settings",function(){return nr});var R={};n.r(R),n.d(R,"name",function(){return rr}),n.d(R,"settings",function(){return or});var I={};n.r(I),n.d(I,"name",function(){return ar}),n.d(I,"settings",function(){return cr});var L={};n.r(L),n.d(L,"name",function(){return ur}),n.d(L,"settings",function(){return br});var z={};n.r(z),n.d(z,"name",function(){return hr}),n.d(z,"settings",function(){return pr});var M=n(21),P=(n(73),n(10)),D=n(16),H=n(9),F=n(0),V=n(17),U=n.n(V),q=n(1),W=n(2),K=n(8),$=n(19),G=n(12),Q=n(11),Y=n(13),Z=n(14),J=n(15),X=n(3),ee=n(4),te=n(6),ne=window.getComputedStyle,re=Object(ee.withFallbackStyles)(function(e,t){var n=t.attributes,r=n.textColor,o=n.backgroundColor,a=n.fontSize,c=n.customFontSize,i=e.querySelector('[contenteditable="true"]'),l=i?ne(i):null;return{fallbackBackgroundColor:o||!l?void 0:l.backgroundColor,fallbackTextColor:r||!l?void 0:l.color,fallbackFontSize:a||c||!l?void 0:parseInt(l.fontSize)||void 0}}),oe=function(e){function t(){var e;return Object(G.a)(this,t),(e=Object(Y.a)(this,Object(Z.a)(t).apply(this,arguments))).onReplace=e.onReplace.bind(Object(X.a)(Object(X.a)(e))),e.toggleDropCap=e.toggleDropCap.bind(Object(X.a)(Object(X.a)(e))),e.splitBlock=e.splitBlock.bind(Object(X.a)(Object(X.a)(e))),e}return Object(J.a)(t,e),Object(Q.a)(t,[{key:"onReplace",value:function(e){var t=this.props,n=t.attributes,r=t.onReplace;r(e.map(function(e,t){return 0===t&&"core/paragraph"===e.name?Object(H.a)({},e,{attributes:Object(H.a)({},n,e.attributes)}):e}))}},{key:"toggleDropCap",value:function(){var e=this.props,t=e.attributes;(0,e.setAttributes)({dropCap:!t.dropCap})}},{key:"getDropCapHelp",value:function(e){return e?Object(W.__)("Showing large initial letter."):Object(W.__)("Toggle to show a large initial letter.")}},{key:"splitBlock",value:function(e,t){for(var n=this.props,r=n.attributes,o=n.insertBlocksAfter,a=n.setAttributes,c=n.onReplace,i=arguments.length,l=new Array(i>2?i-2:0),s=2;s<i;s++)l[s-2]=arguments[s];null!==t&&l.push(Object(P.createBlock)("core/paragraph",{content:t})),l.length&&o&&o(l);var u=r.content;null===e?c([]):u!==e&&a({content:e})}},{key:"render",value:function(){var e,t=this.props,n=t.attributes,r=t.setAttributes,o=t.mergeBlocks,a=t.onReplace,c=t.className,i=t.backgroundColor,l=t.textColor,s=t.setBackgroundColor,u=t.setTextColor,b=t.fallbackBackgroundColor,m=t.fallbackTextColor,h=t.fallbackFontSize,p=t.fontSize,d=t.setFontSize,g=n.align,O=n.content,f=n.dropCap,j=n.placeholder;return Object(F.createElement)(F.Fragment,null,Object(F.createElement)(K.BlockControls,null,Object(F.createElement)(K.AlignmentToolbar,{value:g,onChange:function(e){r({align:e})}})),Object(F.createElement)(K.InspectorControls,null,Object(F.createElement)(ee.PanelBody,{title:Object(W.__)("Text Settings"),className:"blocks-font-size"},Object(F.createElement)(K.FontSizePicker,{fallbackFontSize:h,value:p.size,onChange:d}),Object(F.createElement)(ee.ToggleControl,{label:Object(W.__)("Drop Cap"),checked:!!f,onChange:this.toggleDropCap,help:this.getDropCapHelp})),Object(F.createElement)(K.PanelColorSettings,{title:Object(W.__)("Color Settings"),initialOpen:!1,colorSettings:[{value:i.color,onChange:s,label:Object(W.__)("Background Color")},{value:l.color,onChange:u,label:Object(W.__)("Text Color")}]},Object(F.createElement)(K.ContrastChecker,Object($.a)({textColor:l.color,backgroundColor:i.color,fallbackTextColor:m,fallbackBackgroundColor:b},{fontSize:p.size})))),Object(F.createElement)(K.RichText,{tagName:"p",className:U()("wp-block-paragraph",c,(e={"has-text-color":l.color,"has-background":i.color,"has-drop-cap":f},Object(D.a)(e,i.class,i.class),Object(D.a)(e,l.class,l.class),Object(D.a)(e,p.class,p.class),e)),style:{backgroundColor:i.color,color:l.color,fontSize:p.size?p.size+"px":void 0,textAlign:g},value:O,onChange:function(e){r({content:e})},onSplit:this.splitBlock,onMerge:o,onReplace:this.onReplace,onRemove:function(){return a([])},placeholder:j||Object(W.__)("Add text or type / to add content")}))}}]),t}(F.Component),ae=Object(te.compose)([Object(K.withColors)("backgroundColor",{textColor:"color"}),Object(K.withFontSizes)("fontSize"),re])(oe),ce={className:!1},ie={content:{source:"html",selector:"p",default:""},align:{type:"string"},dropCap:{type:"boolean",default:!1},placeholder:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"number"}},le="core/paragraph",se={title:Object(W.__)("Paragraph"),description:Object(W.__)("Add some basic text."),icon:Object(F.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(F.createElement)("path",{d:"M11 5v7H9.5C7.6 12 6 10.4 6 8.5S7.6 5 9.5 5H11m8-2H9.5C6.5 3 4 5.5 4 8.5S6.5 14 9.5 14H11v7h2V5h2v16h2V5h2V3z"})),category:"common",keywords:[Object(W.__)("text")],supports:ce,attributes:ie,transforms:{from:[{type:"raw",priority:20,selector:"p",schema:{p:{children:Object(P.getPhrasingContentSchema)()}}}]},deprecated:[{supports:ce,attributes:Object(H.a)({},ie,{width:{type:"string"}}),save:function(e){var t,n=e.attributes,r=n.width,o=n.align,a=n.content,c=n.dropCap,i=n.backgroundColor,l=n.textColor,s=n.customBackgroundColor,u=n.customTextColor,b=n.fontSize,m=n.customFontSize,h=Object(K.getColorClassName)("color",l),p=Object(K.getColorClassName)("background-color",i),d=b&&"is-".concat(b,"-text"),g=U()((t={},Object(D.a)(t,"align".concat(r),r),Object(D.a)(t,"has-background",i||s),Object(D.a)(t,"has-drop-cap",c),Object(D.a)(t,d,d),Object(D.a)(t,h,h),Object(D.a)(t,p,p),t)),O={backgroundColor:p?void 0:s,color:h?void 0:u,fontSize:d?void 0:m,textAlign:o};return Object(F.createElement)(K.RichText.Content,{tagName:"p",style:O,className:g||void 0,value:a})}},{supports:ce,attributes:Object(q.omit)(Object(H.a)({},ie,{fontSize:{type:"number"}}),"customFontSize","customTextColor","customBackgroundColor"),save:function(e){var t,n=e.attributes,r=n.width,o=n.align,a=n.content,c=n.dropCap,i=n.backgroundColor,l=n.textColor,s=n.fontSize,u=U()((t={},Object(D.a)(t,"align".concat(r),r),Object(D.a)(t,"has-background",i),Object(D.a)(t,"has-drop-cap",c),t)),b={backgroundColor:i,color:l,fontSize:s,textAlign:o};return Object(F.createElement)("p",{style:b,className:u||void 0},a)},migrate:function(e){return Object(q.omit)(Object(H.a)({},e,{customFontSize:Object(q.isFinite)(e.fontSize)?e.fontSize:void 0,customTextColor:e.textColor&&"#"===e.textColor[0]?e.textColor:void 0,customBackgroundColor:e.backgroundColor&&"#"===e.backgroundColor[0]?e.backgroundColor:void 0}),["fontSize","textColor","backgroundColor"])}},{supports:ce,attributes:Object(H.a)({},ie,{content:{type:"string",source:"html"}}),save:function(e){var t=e.attributes;return Object(F.createElement)(F.RawHTML,null,t.content)},migrate:function(e){return e}}],merge:function(e,t){return{content:e.content+t.content}},getEditWrapperProps:function(e){var t=e.width;if(-1!==["wide","full","left","right"].indexOf(t))return{"data-align":t}},edit:ae,save:function(e){var t,n=e.attributes,r=n.align,o=n.content,a=n.dropCap,c=n.backgroundColor,i=n.textColor,l=n.customBackgroundColor,s=n.customTextColor,u=n.fontSize,b=n.customFontSize,m=Object(K.getColorClassName)("color",i),h=Object(K.getColorClassName)("background-color",c),p=Object(K.getFontSizeClass)(u),d=U()((t={"has-text-color":i||s,"has-background":c||l,"has-drop-cap":a},Object(D.a)(t,p,p),Object(D.a)(t,m,m),Object(D.a)(t,h,h),t)),g={backgroundColor:h?void 0:l,color:m?void 0:s,fontSize:p?void 0:b,textAlign:r};return Object(F.createElement)(K.RichText.Content,{tagName:"p",style:g,className:d||void 0,value:o})}},ue=n(36),be=n(26),me=n(27),he=n(5),pe=n(40),de=n(23),ge=function(e){function t(){var e;return Object(G.a)(this,t),(e=Object(Y.a)(this,Object(Z.a)(t).apply(this,arguments))).state={width:void 0,height:void 0},e.bindContainer=e.bindContainer.bind(Object(X.a)(Object(X.a)(e))),e.calculateSize=e.calculateSize.bind(Object(X.a)(Object(X.a)(e))),e}return Object(J.a)(t,e),Object(Q.a)(t,[{key:"bindContainer",value:function(e){this.container=e}},{key:"componentDidUpdate",value:function(e){this.props.src!==e.src&&(this.setState({width:void 0,height:void 0}),this.fetchImageSize()),this.props.dirtynessTrigger!==e.dirtynessTrigger&&this.calculateSize()}},{key:"componentDidMount",value:function(){this.fetchImageSize()}},{key:"componentWillUnmount",value:function(){this.image&&(this.image.onload=q.noop)}},{key:"fetchImageSize",value:function(){this.image=new window.Image,this.image.onload=this.calculateSize,this.image.src=this.props.src}},{key:"calculateSize",value:function(){var e=this.container.clientWidth,t=this.image.width>e,n=this.image.height/this.image.width,r=t?e:this.image.width,o=t?e*n:this.image.height;this.setState({width:r,height:o})}},{key:"render",value:function(){var e={imageWidth:this.image&&this.image.width,imageHeight:this.image&&this.image.height,containerWidth:this.container&&this.container.clientWidth,containerHeight:this.container&&this.container.clientHeight,imageWidthWithinContainer:this.state.width,imageHeightWithinContainer:this.state.height};return Object(F.createElement)("div",{ref:this.bindContainer},this.props.children(e))}}]),t}(F.Component),Oe=Object(te.withGlobalEvents)({resize:"calculateSize"})(ge),fe=["image"],je=function(e){var t=e.caption;return"object"!==Object(me.a)(t)&&(t=Object(de.create)({html:t})),Object(H.a)({},Object(q.pick)(e,["alt","id","link","url"]),{caption:t})},ve=function(e){function t(){var e;return Object(G.a)(this,t),(e=Object(Y.a)(this,Object(Z.a)(t).apply(this,arguments))).updateAlt=e.updateAlt.bind(Object(X.a)(Object(X.a)(e))),e.updateAlignment=e.updateAlignment.bind(Object(X.a)(Object(X.a)(e))),e.onFocusCaption=e.onFocusCaption.bind(Object(X.a)(Object(X.a)(e))),e.onImageClick=e.onImageClick.bind(Object(X.a)(Object(X.a)(e))),e.onSelectImage=e.onSelectImage.bind(Object(X.a)(Object(X.a)(e))),e.updateImageURL=e.updateImageURL.bind(Object(X.a)(Object(X.a)(e))),e.updateWidth=e.updateWidth.bind(Object(X.a)(Object(X.a)(e))),e.updateHeight=e.updateHeight.bind(Object(X.a)(Object(X.a)(e))),e.updateDimensions=e.updateDimensions.bind(Object(X.a)(Object(X.a)(e))),e.onSetCustomHref=e.onSetCustomHref.bind(Object(X.a)(Object(X.a)(e))),e.onSetLinkDestination=e.onSetLinkDestination.bind(Object(X.a)(Object(X.a)(e))),e.state={captionFocused:!1},e}return Object(J.a)(t,e),Object(Q.a)(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.attributes,n=e.setAttributes,r=t.id,o=t.url,a=void 0===o?"":o;if(!r&&0===a.indexOf("blob:")){var c=Object(ue.getBlobByURL)(a);c&&Object(K.mediaUpload)({filesList:[c],onFileChange:function(e){var t=Object(be.a)(e,1)[0];n(je(t))},allowedTypes:fe})}}},{key:"componentDidUpdate",value:function(e){var t=e.attributes,n=t.id,r=t.url,o=void 0===r?"":r,a=this.props.attributes,c=a.id,i=a.url,l=void 0===i?"":i;!n&&0===o.indexOf("blob:")&&c&&-1===l.indexOf("blob:")&&Object(ue.revokeBlobURL)(l),!this.props.isSelected&&e.isSelected&&this.state.captionFocused&&this.setState({captionFocused:!1})}},{key:"onSelectImage",value:function(e){e&&e.url?this.props.setAttributes(Object(H.a)({},je(e),{width:void 0,height:void 0})):this.props.setAttributes({url:void 0,alt:void 0,id:void 0,caption:Object(de.create)()})}},{key:"onSetLinkDestination",value:function(e){var t;t="none"===e?void 0:"media"===e?this.props.attributes.url:"attachment"===e?this.props.image&&this.props.image.link:this.props.attributes.href,this.props.setAttributes({linkDestination:e,href:t})}},{key:"onSetCustomHref",value:function(e){this.props.setAttributes({href:e})}},{key:"onFocusCaption",value:function(){this.state.captionFocused||this.setState({captionFocused:!0})}},{key:"onImageClick",value:function(){this.state.captionFocused&&this.setState({captionFocused:!1})}},{key:"updateAlt",value:function(e){this.props.setAttributes({alt:e})}},{key:"updateAlignment",value:function(e){var t=-1!==["wide","full"].indexOf(e)?{width:void 0,height:void 0}:{};this.props.setAttributes(Object(H.a)({},t,{align:e}))}},{key:"updateImageURL",value:function(e){this.props.setAttributes({url:e,width:void 0,height:void 0})}},{key:"updateWidth",value:function(e){this.props.setAttributes({width:parseInt(e,10)})}},{key:"updateHeight",value:function(e){this.props.setAttributes({height:parseInt(e,10)})}},{key:"updateDimensions",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return function(){e.props.setAttributes({width:t,height:n})}}},{key:"getAvailableSizes",value:function(){return Object(q.get)(this.props.image,["media_details","sizes"],{})}},{key:"getLinkDestinationOptions",value:function(){return[{value:"none",label:Object(W.__)("None")},{value:"media",label:Object(W.__)("Media File")},{value:"attachment",label:Object(W.__)("Attachment Page")},{value:"custom",label:Object(W.__)("Custom URL")}]}},{key:"render",value:function(){var e=this,t=this.props,n=t.attributes,r=t.setAttributes,o=t.isLargeViewport,a=t.isSelected,c=t.className,i=t.maxWidth,l=t.noticeOperations,s=t.noticeUI,u=t.toggleSelection,b=t.isRTL,m=n.url,h=n.alt,p=n.caption,d=n.align,g=n.id,O=n.href,f=n.linkDestination,j=n.width,v=n.height,y=Object(F.createElement)(K.BlockControls,null,Object(F.createElement)(K.BlockAlignmentToolbar,{value:d,onChange:this.updateAlignment}),Object(F.createElement)(ee.Toolbar,null,Object(F.createElement)(K.MediaUpload,{onSelect:this.onSelectImage,allowedTypes:fe,value:g,render:function(e){var t=e.open;return Object(F.createElement)(ee.IconButton,{className:"components-toolbar__control",label:Object(W.__)("Edit image"),icon:"edit",onClick:t})}})));if(!m)return Object(F.createElement)(F.Fragment,null,y,Object(F.createElement)(K.MediaPlaceholder,{icon:"format-image",labels:{title:Object(W.__)("Image"),name:Object(W.__)("an image")},className:c,onSelect:this.onSelectImage,notices:s,onError:l.createErrorNotice,accept:"image/*",allowedTypes:fe}));var w=U()(c,{"is-transient":0===m.indexOf("blob:"),"is-resized":!!j||!!v,"is-focused":a}),C=this.getAvailableSizes(),k=-1===["wide","full"].indexOf(d)&&o,E="custom"!==f,_=function(t,n){return Object(F.createElement)(K.InspectorControls,null,Object(F.createElement)(ee.PanelBody,{title:Object(W.__)("Image Settings")},Object(F.createElement)(ee.TextareaControl,{label:Object(W.__)("Alt Text (Alternative Text)"),value:h,onChange:e.updateAlt,help:Object(W.__)("Describe the purpose of the image. Leave empty if the image is not a key part of the content.")}),!Object(q.isEmpty)(C)&&Object(F.createElement)(ee.SelectControl,{label:Object(W.__)("Image Size"),value:m,options:Object(q.map)(C,function(e,t){return{value:e.source_url,label:Object(q.startCase)(t)}}),onChange:e.updateImageURL}),k&&Object(F.createElement)("div",{className:"block-library-image__dimensions"},Object(F.createElement)("p",{className:"block-library-image__dimensions__row"},Object(W.__)("Image Dimensions")),Object(F.createElement)("div",{className:"block-library-image__dimensions__row"},Object(F.createElement)(ee.TextControl,{type:"number",className:"block-library-image__dimensions__width",label:Object(W.__)("Width"),value:void 0!==j?j:"",placeholder:t,min:1,onChange:e.updateWidth}),Object(F.createElement)(ee.TextControl,{type:"number",className:"block-library-image__dimensions__height",label:Object(W.__)("Height"),value:void 0!==v?v:"",placeholder:n,min:1,onChange:e.updateHeight})),Object(F.createElement)("div",{className:"block-library-image__dimensions__row"},Object(F.createElement)(ee.ButtonGroup,{"aria-label":Object(W.__)("Image Size")},[25,50,75,100].map(function(r){var o=Math.round(t*(r/100)),a=Math.round(n*(r/100)),c=j===o&&v===a;return Object(F.createElement)(ee.Button,{key:r,isSmall:!0,isPrimary:c,"aria-pressed":c,onClick:e.updateDimensions(o,a)},r,"%")})),Object(F.createElement)(ee.Button,{isSmall:!0,onClick:e.updateDimensions()},Object(W.__)("Reset"))))),Object(F.createElement)(ee.PanelBody,{title:Object(W.__)("Link Settings")},Object(F.createElement)(ee.SelectControl,{label:Object(W.__)("Link To"),value:f,options:e.getLinkDestinationOptions(),onChange:e.onSetLinkDestination}),"none"!==f&&Object(F.createElement)(ee.TextControl,{label:Object(W.__)("Link URL"),value:O||"",onChange:e.onSetCustomHref,placeholder:E?void 0:"https://",disabled:E})))};return Object(F.createElement)(F.Fragment,null,y,Object(F.createElement)("figure",{className:w},Object(F.createElement)(Oe,{src:m,dirtynessTrigger:d},function(t){var n=t.imageWidthWithinContainer,o=t.imageHeightWithinContainer,a=t.imageWidth,c=t.imageHeight,l=Object(F.createElement)("img",{src:m,alt:h,onClick:e.onImageClick});if(!k||!n)return Object(F.createElement)(F.Fragment,null,_(a,c),Object(F.createElement)("div",{style:{width:j,height:v}},l));var s=j||n,p=v||o,g=a/c,O=a<c?20:20*g,f=c<a?20:20/g,y=!1,w=!1;return"center"===d?(y=!0,w=!0):b?"left"===d?y=!0:w=!0:"right"===d?w=!0:y=!0,Object(F.createElement)(F.Fragment,null,_(a,c),Object(F.createElement)(ee.ResizableBox,{size:j&&v?{width:j,height:v}:void 0,minWidth:O,maxWidth:i,minHeight:f,maxHeight:i/g,lockAspectRatio:!0,enable:{top:!1,right:y,bottom:!0,left:w},onResizeStart:function(){u(!1)},onResizeStop:function(e,t,n,o){r({width:parseInt(s+o.width,10),height:parseInt(p+o.height,10)}),u(!0)}},l))}),(!K.RichText.isEmpty(p)||a)&&Object(F.createElement)(K.RichText,{tagName:"figcaption",placeholder:Object(W.__)("Write caption…"),value:p,unstableOnFocus:this.onFocusCaption,onChange:function(e){return r({caption:e})},isSelected:this.state.captionFocused,inlineToolbar:!0})))}}]),t}(F.Component),ye=Object(te.compose)([Object(he.withSelect)(function(e,t){var n=e("core").getMedia,r=e("core/editor").getEditorSettings,o=t.attributes.id,a=r(),c=a.maxWidth,i=a.isRTL;return{image:o?n(o):null,maxWidth:c,isRTL:i}}),Object(pe.withViewportMatch)({isLargeViewport:"medium"}),ee.withNotices])(ve),we="core/image",Ce={url:{type:"string",source:"attribute",selector:"img",attribute:"src"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},caption:{source:"html",selector:"figcaption"},href:{type:"string",source:"attribute",selector:"figure > a",attribute:"href"},id:{type:"number"},align:{type:"string"},width:{type:"number"},height:{type:"number"},linkDestination:{type:"string",default:"none"}},ke={img:{attributes:["src","alt"],classes:["alignleft","aligncenter","alignright","alignnone",/^wp-image-\d+$/]}},Ee={figure:{require:["img"],children:Object(H.a)({},ke,{a:{attributes:["href"],children:ke},figcaption:{children:Object(P.getPhrasingContentSchema)()}})}},_e={title:Object(W.__)("Image"),description:Object(W.__)("Theyre worth 1,000 words! Insert a single image."),icon:Object(F.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(F.createElement)("path",{d:"M0,0h24v24H0V0z",fill:"none"}),Object(F.createElement)("path",{d:"m19 5v14h-14v-14h14m0-2h-14c-1.1 0-2 0.9-2 2v14c0 1.1 0.9 2 2 2h14c1.1 0 2-0.9 2-2v-14c0-1.1-0.9-2-2-2z"}),Object(F.createElement)("path",{d:"m14.14 11.86l-3 3.87-2.14-2.59-3 3.86h12l-3.86-5.14z"})),category:"common",keywords:[Object(W.__)("photo")],attributes:Ce,transforms:{from:[{type:"raw",isMatch:function(e){return"FIGURE"===e.nodeName&&!!e.querySelector("img")},schema:Ee,transform:function(e){var t=e.className+" "+e.querySelector("img").className,n=/(?:^|\s)align(left|center|right)(?:$|\s)/.exec(t),r=n?n[1]:void 0,o=/(?:^|\s)wp-image-(\d+)(?:$|\s)/.exec(t),a=o?Number(o[1]):void 0,c=e.querySelector("a"),i=c&&c.href?"custom":void 0,l=c&&c.href?c.href:void 0,s=Object(P.getBlockType)("core/image"),u=Object(P.getBlockAttributes)(s,e.outerHTML,{align:r,id:a,linkDestination:i,href:l});return Object(P.createBlock)("core/image",u)}},{type:"files",isMatch:function(e){return 1===e.length&&0===e[0].type.indexOf("image/")},transform:function(e){var t=e[0];return Object(P.createBlock)("core/image",{url:Object(ue.createBlobURL)(t)})}},{type:"shortcode",tag:"caption",attributes:{url:{type:"string",source:"attribute",attribute:"src",selector:"img"},alt:{type:"string",source:"attribute",attribute:"alt",selector:"img"},caption:{shortcode:function(e,t){return t.shortcode.content.replace(/\s*<img[^>]*>\s/,"")}},href:{type:"string",source:"attribute",attribute:"href",selector:"a"},id:{type:"number",shortcode:function(e){var t=e.named.id;if(t)return parseInt(t.replace("attachment_",""),10)}},align:{type:"string",shortcode:function(e){var t=e.named.align;return(void 0===t?"alignnone":t).replace("align","")}}}}]},getEditWrapperProps:function(e){var t=e.align,n=e.width;if("left"===t||"center"===t||"right"===t||"wide"===t||"full"===t)return{"data-align":t,"data-resized":!!n}},edit:ye,save:function(e){var t,n=e.attributes,r=n.url,o=n.alt,a=n.caption,c=n.align,i=n.href,l=n.width,s=n.height,u=n.id,b=U()((t={},Object(D.a)(t,"align".concat(c),c),Object(D.a)(t,"is-resized",l||s),t)),m=Object(F.createElement)("img",{src:r,alt:o,className:u?"wp-image-".concat(u):null,width:l,height:s}),h=Object(F.createElement)(F.Fragment,null,i?Object(F.createElement)("a",{href:i},m):m,!K.RichText.isEmpty(a)&&Object(F.createElement)(K.RichText.Content,{tagName:"figcaption",value:a}));return"left"===c||"right"===c||"center"===c?Object(F.createElement)("div",null,Object(F.createElement)("figure",{className:b},h)):Object(F.createElement)("figure",{className:b},h)},deprecated:[{attributes:Ce,save:function(e){var t,n=e.attributes,r=n.url,o=n.alt,a=n.caption,c=n.align,i=n.href,l=n.width,s=n.height,u=n.id,b=U()((t={},Object(D.a)(t,"align".concat(c),c),Object(D.a)(t,"is-resized",l||s),t)),m=Object(F.createElement)("img",{src:r,alt:o,className:u?"wp-image-".concat(u):null,width:l,height:s});return Object(F.createElement)("figure",{className:b},i?Object(F.createElement)("a",{href:i},m):m,!K.RichText.isEmpty(a)&&Object(F.createElement)(K.RichText.Content,{tagName:"figcaption",value:a}))}},{attributes:Ce,save:function(e){var t=e.attributes,n=t.url,r=t.alt,o=t.caption,a=t.align,c=t.href,i=t.width,l=t.height,s=t.id,u=Object(F.createElement)("img",{src:n,alt:r,className:s?"wp-image-".concat(s):null,width:i,height:l});return Object(F.createElement)("figure",{className:a?"align".concat(a):null},c?Object(F.createElement)("a",{href:c},u):u,!K.RichText.isEmpty(o)&&Object(F.createElement)(K.RichText.Content,{tagName:"figcaption",value:o}))}},{attributes:Ce,save:function(e){var t=e.attributes,n=t.url,r=t.alt,o=t.caption,a=t.align,c=t.href,i=t.width,l=t.height,s=i||l?{width:i,height:l}:{},u=Object(F.createElement)("img",Object($.a)({src:n,alt:r},s)),b={};return i?b={width:i}:"left"!==a&&"right"!==a||(b={maxWidth:"50%"}),Object(F.createElement)("figure",{className:a?"align".concat(a):null,style:b},c?Object(F.createElement)("a",{href:c},u):u,!K.RichText.isEmpty(o)&&Object(F.createElement)(K.RichText.Content,{tagName:"figcaption",value:o}))}}]},xe=n(22),Se=function(e){function t(){return Object(G.a)(this,t),Object(Y.a)(this,Object(Z.a)(t).apply(this,arguments))}return Object(J.a)(t,e),Object(Q.a)(t,[{key:"createLevelControl",value:function(e,t,n){return{icon:"heading",title:Object(W.sprintf)(Object(W.__)("Heading %d"),e),isActive:e===t,onClick:function(){return n(e)},subscript:String(e)}}},{key:"render",value:function(){var e=this,t=this.props,n=t.minLevel,r=t.maxLevel,o=t.selectedLevel,a=t.onChange;return Object(F.createElement)(ee.Toolbar,{controls:Object(q.range)(n,r).map(function(t){return e.createLevelControl(t,o,a)})})}}]),t}(F.Component);function Ne(e){return Number(e.substr(1))}var Te={className:!1,anchor:!0},Be={content:{source:"html",selector:"h1,h2,h3,h4,h5,h6"},level:{type:"number",default:2},align:{type:"string"},placeholder:{type:"string"}},Ae="core/heading",Re={title:Object(W.__)("Heading"),description:Object(W.__)("Introduce topics and help visitors (and search engines!) understand how your content is organized."),icon:Object(F.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(F.createElement)("path",{d:"M5 4v3h5.5v12h3V7H19V4z"}),Object(F.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"})),category:"common",keywords:[Object(W.__)("title"),Object(W.__)("subtitle")],supports:Te,attributes:Be,transforms:{from:[{type:"block",blocks:["core/paragraph"],transform:function(e){var t=e.content;return Object(P.createBlock)("core/heading",{content:t})}},{type:"raw",selector:"h1,h2,h3,h4,h5,h6",schema:{h1:{children:Object(P.getPhrasingContentSchema)()},h2:{children:Object(P.getPhrasingContentSchema)()},h3:{children:Object(P.getPhrasingContentSchema)()},h4:{children:Object(P.getPhrasingContentSchema)()},h5:{children:Object(P.getPhrasingContentSchema)()},h6:{children:Object(P.getPhrasingContentSchema)()}},transform:function(e){return Object(P.createBlock)("core/heading",Object(H.a)({},Object(P.getBlockAttributes)(Object(P.getBlockType)("core/heading"),e.outerHTML),{level:Ne(e.nodeName)}))}},{type:"pattern",regExp:/^(#{2,6})\s/,transform:function(e){var t=e.content,n=e.match[1].length;return Object(P.createBlock)("core/heading",{level:n,content:t})}}],to:[{type:"block",blocks:["core/paragraph"],transform:function(e){var t=e.content;return Object(P.createBlock)("core/paragraph",{content:t})}}]},deprecated:[{supports:Te,attributes:Object(H.a)({},Object(q.omit)(Be,["level"]),{nodeName:{type:"string",source:"property",selector:"h1,h2,h3,h4,h5,h6",property:"nodeName",default:"H2"}}),migrate:function(e){var t=e.nodeName,n=Object(xe.a)(e,["nodeName"]);return Object(H.a)({},n,{level:Ne(t)})},save:function(e){var t=e.attributes,n=t.align,r=t.nodeName,o=t.content;return Object(F.createElement)(K.RichText.Content,{tagName:r.toLowerCase(),style:{textAlign:n},value:o})}}],merge:function(e,t){return{content:e.content+t.content}},edit:function(e){var t=e.attributes,n=e.setAttributes,r=e.mergeBlocks,o=e.insertBlocksAfter,a=e.onReplace,c=e.className,i=t.align,l=t.content,s=t.level,u=t.placeholder,b="h"+s;return Object(F.createElement)(F.Fragment,null,Object(F.createElement)(K.BlockControls,null,Object(F.createElement)(Se,{minLevel:2,maxLevel:5,selectedLevel:s,onChange:function(e){return n({level:e})}})),Object(F.createElement)(K.InspectorControls,null,Object(F.createElement)(ee.PanelBody,{title:Object(W.__)("Heading Settings")},Object(F.createElement)("p",null,Object(W.__)("Level")),Object(F.createElement)(Se,{minLevel:1,maxLevel:7,selectedLevel:s,onChange:function(e){return n({level:e})}}),Object(F.createElement)("p",null,Object(W.__)("Text Alignment")),Object(F.createElement)(K.AlignmentToolbar,{value:i,onChange:function(e){n({align:e})}}))),Object(F.createElement)(K.RichText,{wrapperClassName:"wp-block-heading",tagName:b,value:l,onChange:function(e){return n({content:e})},onMerge:r,onSplit:o?function(e,t){n({content:e});for(var r=arguments.length,a=new Array(r>2?r-2:0),c=2;c<r;c++)a[c-2]=arguments[c];o(a.concat([Object(P.createBlock)("core/paragraph",{content:t})]))}:void 0,onRemove:function(){return a([])},style:{textAlign:i},className:c,placeholder:u||Object(W.__)("Write heading…")}))},save:function(e){var t=e.attributes,n=t.align,r=t.level,o=t.content,a="h"+r;return Object(F.createElement)(K.RichText.Content,{tagName:a,style:{textAlign:n},value:o})}},Ie={value:{source:"html",selector:"blockquote",multiline:"p"},citation:{source:"html",selector:"cite"},align:{type:"string"}},Le="core/quote",ze={title:Object(W.__)("Quote"),description:Object(W.__)("Maybe someone else said it better -- add some quoted text."),icon:Object(F.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(F.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(F.createElement)("g",null,Object(F.createElement)("path",{d:"M19 18h-6l2-4h-2V6h8v7l-2 5zm-2-2l2-3V8h-4v4h4l-2 4zm-8 2H3l2-4H3V6h8v7l-2 5zm-2-2l2-3V8H5v4h4l-2 4z"}))),category:"common",keywords:[Object(W.__)("blockquote")],attributes:Ie,styles:[{name:"default",label:Object(W.__)("Regular"),isDefault:!0},{name:"large",label:Object(W.__)("Large")}],transforms:{from:[{type:"block",isMultiBlock:!0,blocks:["core/paragraph"],transform:function(e){return Object(P.createBlock)("core/quote",{value:Object(de.toHTMLString)(Object(de.join)(e.map(function(e){var t=e.content;return Object(de.create)({html:t})}),"\u2028"),"p")})}},{type:"block",blocks:["core/heading"],transform:function(e){var t=e.content;return Object(P.createBlock)("core/quote",{value:t})}},{type:"pattern",regExp:/^>\s/,transform:function(e){var t=e.content;return Object(P.createBlock)("core/quote",{value:t})}},{type:"raw",selector:"blockquote",schema:{blockquote:{children:{p:{children:Object(P.getPhrasingContentSchema)()}}}}}],to:[{type:"block",blocks:["core/paragraph"],transform:function(e){var t=e.value;return Object(de.split)(Object(de.create)({html:t,multilineTag:"p"}),"\u2028").map(function(e){return Object(P.createBlock)("core/paragraph",{content:Object(de.toHTMLString)(e)})})}},{type:"block",blocks:["core/heading"],transform:function(e){var t=e.value,n=e.citation,r=Object(xe.a)(e,["value","citation"]);if("<p></p>"===t)return Object(P.createBlock)("core/heading",{content:n});var o=Object(de.split)(Object(de.create)({html:t,multilineTag:"p"}),"\u2028"),a=o.slice(1);return[Object(P.createBlock)("core/heading",{content:Object(de.toHTMLString)(o[0])}),Object(P.createBlock)("core/quote",Object(H.a)({},r,{citation:n,value:Object(de.toHTMLString)(a.length?Object(de.join)(o.slice(1),"\u2028"):Object(de.create)(),"p")}))]}}]},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(F.createElement)(F.Fragment,null,Object(F.createElement)(K.BlockControls,null,Object(F.createElement)(K.AlignmentToolbar,{value:i,onChange:function(e){n({align:e})}})),Object(F.createElement)("blockquote",{className:c,style:{textAlign:i}},Object(F.createElement)(K.RichText,{multiline:"p",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(W.__)("Write quote…")}),(!K.RichText.isEmpty(s)||r)&&Object(F.createElement)(K.RichText,{value:s,onChange:function(e){return n({citation:e})},placeholder:Object(W.__)("Write citation…"),className:"wp-block-quote__citation"})))},save:function(e){var t=e.attributes,n=t.align,r=t.value,o=t.citation;return Object(F.createElement)("blockquote",{style:{textAlign:n||null}},Object(F.createElement)(K.RichText.Content,{multiline:"p",value:r}),!K.RichText.isEmpty(o)&&Object(F.createElement)(K.RichText.Content,{tagName:"cite",value:o}))},merge:function(e,t){return Object(H.a)({},e,{value:e.value+t.value,citation:e.citation+t.citation})},deprecated:[{attributes:Object(H.a)({},Ie,{style:{type:"number",default:1}}),migrate:function(e){return 2===e.style?Object(H.a)({},Object(q.omit)(e,["style"]),{className:e.className?e.className+" is-style-large":"is-style-large"}):e},save:function(e){var t=e.attributes,n=t.align,r=t.value,o=t.citation,a=t.style;return Object(F.createElement)("blockquote",{className:2===a?"is-large":"",style:{textAlign:n||null}},Object(F.createElement)(K.RichText.Content,{multiline:"p",value:r}),!K.RichText.isEmpty(o)&&Object(F.createElement)(K.RichText.Content,{tagName:"cite",value:o}))}},{attributes:Object(H.a)({},Ie,{citation:{source:"html",selector:"footer"},style:{type:"number",default:1}}),save:function(e){var t=e.attributes,n=t.align,r=t.value,o=t.citation,a=t.style;return Object(F.createElement)("blockquote",{className:"blocks-quote-style-".concat(a),style:{textAlign:n||null}},Object(F.createElement)(K.RichText.Content,{multiline:"p",value:r}),!K.RichText.isEmpty(o)&&Object(F.createElement)(K.RichText.Content,{tagName:"footer",value:o}))}}]},Me=n(20),Pe=function(e){function t(){var e;return Object(G.a)(this,t),(e=Object(Y.a)(this,Object(Z.a)(t).apply(this,arguments))).onImageClick=e.onImageClick.bind(Object(X.a)(Object(X.a)(e))),e.onSelectCaption=e.onSelectCaption.bind(Object(X.a)(Object(X.a)(e))),e.onKeyDown=e.onKeyDown.bind(Object(X.a)(Object(X.a)(e))),e.bindContainer=e.bindContainer.bind(Object(X.a)(Object(X.a)(e))),e.state={captionSelected:!1},e}return Object(J.a)(t,e),Object(Q.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:"onImageClick",value:function(){this.props.isSelected||this.props.onSelect(),this.state.captionSelected&&this.setState({captionSelected:!1})}},{key:"onKeyDown",value:function(e){this.container===document.activeElement&&this.props.isSelected&&-1!==[Me.BACKSPACE,Me.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.isSelected,l=t.caption,s=t.onRemove,u=t.setAttributes;switch(a){case"media":e=n;break;case"attachment":e=c}var b=n?Object(F.createElement)("img",{src:n,alt:r,"data-id":o,onClick:this.onImageClick}):Object(F.createElement)(ee.Spinner,null),m=U()({"is-selected":i,"is-transient":n&&0===n.indexOf("blob:")});return Object(F.createElement)("figure",{className:m,tabIndex:"-1",onKeyDown:this.onKeyDown,ref:this.bindContainer},i&&Object(F.createElement)("div",{className:"block-library-gallery-item__inline-menu"},Object(F.createElement)(ee.IconButton,{icon:"no-alt",onClick:s,className:"blocks-gallery-item__remove",label:Object(W.__)("Remove Image")})),e?Object(F.createElement)("a",{href:e},b):b,!K.RichText.isEmpty(l)||i?Object(F.createElement)(K.RichText,{tagName:"figcaption",placeholder:Object(W.__)("Write caption…"),value:l,isSelected:this.state.captionSelected,onChange:function(e){return u({caption:e})},unstableOnFocus:this.onSelectCaption,inlineToolbar:!0}):null)}}]),t}(F.Component),De=Object(he.withSelect)(function(e,t){var n=e("core").getMedia,r=t.id;return{image:r?n(r):null}})(Pe),He=[{value:"attachment",label:Object(W.__)("Attachment Page")},{value:"media",label:Object(W.__)("Media File")},{value:"none",label:Object(W.__)("None")}],Fe=["image"];function Ve(e){return Math.min(3,e.images.length)}var Ue=function(e){var t=e.caption;return"object"!==Object(me.a)(t)&&(t=Object(de.create)({html:t})),Object(H.a)({},Object(q.pick)(e,["alt","id","link","url"]),{caption:t})},qe=function(e){function t(){var e;return Object(G.a)(this,t),(e=Object(Y.a)(this,Object(Z.a)(t).apply(this,arguments))).onSelectImage=e.onSelectImage.bind(Object(X.a)(Object(X.a)(e))),e.onSelectImages=e.onSelectImages.bind(Object(X.a)(Object(X.a)(e))),e.setLinkTo=e.setLinkTo.bind(Object(X.a)(Object(X.a)(e))),e.setColumnsNumber=e.setColumnsNumber.bind(Object(X.a)(Object(X.a)(e))),e.toggleImageCrop=e.toggleImageCrop.bind(Object(X.a)(Object(X.a)(e))),e.onRemoveImage=e.onRemoveImage.bind(Object(X.a)(Object(X.a)(e))),e.setImageAttributes=e.setImageAttributes.bind(Object(X.a)(Object(X.a)(e))),e.addFiles=e.addFiles.bind(Object(X.a)(Object(X.a)(e))),e.uploadFromFiles=e.uploadFromFiles.bind(Object(X.a)(Object(X.a)(e))),e.state={selectedImage:null},e}return Object(J.a)(t,e),Object(Q.a)(t,[{key:"onSelectImage",value:function(e){var t=this;return function(){t.state.selectedImage!==e&&t.setState({selectedImage:e})}}},{key:"onRemoveImage",value:function(e){var t=this;return function(){var n=Object(q.filter)(t.props.attributes.images,function(t,n){return e!==n}),r=t.props.attributes.columns;t.setState({selectedImage:null}),t.props.setAttributes({images:n,columns:r?Math.min(n.length,r):r})}}},{key:"onSelectImages",value:function(e){this.props.setAttributes({images:e.map(function(e){return Ue(e)})})}},{key:"setLinkTo",value:function(e){this.props.setAttributes({linkTo:e})}},{key:"setColumnsNumber",value:function(e){this.props.setAttributes({columns:e})}},{key:"toggleImageCrop",value:function(){this.props.setAttributes({imageCrop:!this.props.attributes.imageCrop})}},{key:"getImageCropHelp",value:function(e){return e?Object(W.__)("Thumbnails are cropped to align."):Object(W.__)("Thumbnails are not cropped.")}},{key:"setImageAttributes",value:function(e,t){var n=this.props,r=n.attributes.images,o=n.setAttributes;r[e]&&o({images:Object(M.a)(r.slice(0,e)).concat([Object(H.a)({},r[e],t)],Object(M.a)(r.slice(e+1)))})}},{key:"uploadFromFiles",value:function(e){this.addFiles(e.target.files)}},{key:"addFiles",value:function(e){var t=this.props.attributes.images||[],n=this.props,r=n.noticeOperations,o=n.setAttributes;Object(K.mediaUpload)({allowedTypes:Fe,filesList:e,onFileChange:function(e){var n=e.map(function(e){return Ue(e)});o({images:t.concat(n)})},onError:r.createErrorNotice})}},{key:"componentDidUpdate",value:function(e){!this.props.isSelected&&e.isSelected&&this.setState({selectedImage:null,captionSelected:!1})}},{key:"render",value:function(){var e=this,t=this.props,n=t.attributes,r=t.isSelected,o=t.className,a=t.noticeOperations,c=t.noticeUI,i=n.images,l=n.columns,s=void 0===l?Ve(n):l,u=n.align,b=n.imageCrop,m=n.linkTo,h=Object(F.createElement)(ee.DropZone,{onFilesDrop:this.addFiles}),p=Object(F.createElement)(K.BlockControls,null,!!i.length&&Object(F.createElement)(ee.Toolbar,null,Object(F.createElement)(K.MediaUpload,{onSelect:this.onSelectImages,allowedTypes:Fe,multiple:!0,gallery:!0,value:i.map(function(e){return e.id}),render:function(e){var t=e.open;return Object(F.createElement)(ee.IconButton,{className:"components-toolbar__control",label:Object(W.__)("Edit Gallery"),icon:"edit",onClick:t})}})));return 0===i.length?Object(F.createElement)(F.Fragment,null,p,Object(F.createElement)(K.MediaPlaceholder,{icon:"format-gallery",className:o,labels:{title:Object(W.__)("Gallery"),name:Object(W.__)("images")},onSelect:this.onSelectImages,accept:"image/*",allowedTypes:Fe,multiple:!0,notices:c,onError:a.createErrorNotice})):Object(F.createElement)(F.Fragment,null,p,Object(F.createElement)(K.InspectorControls,null,Object(F.createElement)(ee.PanelBody,{title:Object(W.__)("Gallery Settings")},i.length>1&&Object(F.createElement)(ee.RangeControl,{label:Object(W.__)("Columns"),value:s,onChange:this.setColumnsNumber,min:1,max:Math.min(8,i.length)}),Object(F.createElement)(ee.ToggleControl,{label:Object(W.__)("Crop Images"),checked:!!b,onChange:this.toggleImageCrop,help:this.getImageCropHelp}),Object(F.createElement)(ee.SelectControl,{label:Object(W.__)("Link To"),value:m,onChange:this.setLinkTo,options:He}))),c,Object(F.createElement)("ul",{className:"".concat(o," align").concat(u," columns-").concat(s," ").concat(b?"is-cropped":"")},h,i.map(function(t,n){return Object(F.createElement)("li",{className:"blocks-gallery-item",key:t.id||t.url},Object(F.createElement)(De,{url:t.url,alt:t.alt,id:t.id,isSelected:r&&e.state.selectedImage===n,onRemove:e.onRemoveImage(n),onSelect:e.onSelectImage(n),setAttributes:function(t){return e.setImageAttributes(n,t)},caption:t.caption}))}),r&&Object(F.createElement)("li",{className:"blocks-gallery-item has-add-item-button"},Object(F.createElement)(ee.FormFileUpload,{multiple:!0,isLarge:!0,className:"block-library-gallery-add-item-button",onChange:this.uploadFromFiles,accept:"image/*",icon:"insert"},Object(W.__)("Upload an image")))))}}]),t}(F.Component),We=Object(ee.withNotices)(qe),Ke={images:{type:"array",default:[],source:"query",selector:"ul.wp-block-gallery .blocks-gallery-item",query:{url:{source:"attribute",selector:"img",attribute:"src"},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:{source:"html",selector:"figcaption"}}},columns:{type:"number"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"}},$e="core/gallery",Ge={title:Object(W.__)("Gallery"),description:Object(W.__)("Display multiple images in an elegantly organized tiled layout."),icon:Object(F.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(F.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(F.createElement)("g",null,Object(F.createElement)("path",{d:"M20 4v12H8V4h12m0-2H8L6 4v12l2 2h12l2-2V4l-2-2z"}),Object(F.createElement)("path",{d:"M12 12l1 2 3-3 3 4H9z"}),Object(F.createElement)("path",{d:"M2 6v14l2 2h14v-2H4V6H2z"}))),category:"common",keywords:[Object(W.__)("images"),Object(W.__)("photos")],attributes:Ke,supports:{align:!0},transforms:{from:[{type:"block",isMultiBlock:!0,blocks:["core/image"],transform:function(e){var t=Object(q.filter)(e,function(e){var t=e.id,n=e.url;return t&&n});return t.length>0?Object(P.createBlock)("core/gallery",{images:t.map(function(e){return{id:e.id,url:e.url,alt:e.alt,caption:e.caption}})}):Object(P.createBlock)("core/gallery")}},{type:"shortcode",tag:"gallery",attributes:{images:{type:"array",shortcode:function(e){var t=e.named.ids;return t?t.split(",").map(function(e){return{id:parseInt(e,10)}}):[]}},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(q.every)(e,function(e){return 0===e.type.indexOf("image/")})},transform:function(e,t){var n=Object(P.createBlock)("core/gallery",{images:e.map(function(e){return Ue({url:Object(ue.createBlobURL)(e)})})});return Object(K.mediaUpload)({filesList:e,onFileChange:function(e){t(n.clientId,{images:e.map(function(e){return Ue(e)})})},allowedTypes:["image"]}),n}}],to:[{type:"block",blocks:["core/image"],transform:function(e){var t=e.images;return t.length>0?t.map(function(e){var t=e.id,n=e.url,r=e.alt,o=e.caption;return Object(P.createBlock)("core/image",{id:t,url:n,alt:r,caption:o})}):Object(P.createBlock)("core/image")}}]},edit:We,save:function(e){var t=e.attributes,n=t.images,r=t.columns,o=void 0===r?Ve(t):r,a=t.imageCrop,c=t.linkTo;return Object(F.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(F.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(F.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},Object(F.createElement)("figure",null,t?Object(F.createElement)("a",{href:t},n):n,e.caption&&e.caption.length>0&&Object(F.createElement)(K.RichText.Content,{tagName:"figcaption",value:e.caption})))}))},deprecated:[{attributes:Ke,save:function(e){var t=e.attributes,n=t.images,r=t.columns,o=void 0===r?Ve(t):r,a=t.imageCrop,c=t.linkTo;return Object(F.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(F.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id,"data-link":e.link});return Object(F.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},Object(F.createElement)("figure",null,t?Object(F.createElement)("a",{href:t},n):n,e.caption&&e.caption.length>0&&Object(F.createElement)(K.RichText.Content,{tagName:"figcaption",value:e.caption})))}))}},{attributes:Object(H.a)({},Ke,{images:Object(H.a)({},Ke.images,{selector:"div.wp-block-gallery figure.blocks-gallery-image img"}),align:{type:"string",default:"none"}}),save:function(e){var t=e.attributes,n=t.images,r=t.columns,o=void 0===r?Ve(t):r,a=t.align,c=t.imageCrop,i=t.linkTo;return Object(F.createElement)("div",{className:"align".concat(a," columns-").concat(o," ").concat(c?"is-cropped":"")},n.map(function(e){var t;switch(i){case"media":t=e.url;break;case"attachment":t=e.link}var n=Object(F.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id});return Object(F.createElement)("figure",{key:e.id||e.url,className:"blocks-gallery-image"},t?Object(F.createElement)("a",{href:t},n):n)}))}}]};var Qe="core/archives",Ye={title:Object(W.__)("Archives"),description:Object(W.__)("Display a monthly archive of your sites Posts."),icon:Object(F.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(F.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(F.createElement)("g",null,Object(F.createElement)("path",{d:"M7 11h2v2H7v-2zm14-5v14l-2 2H5l-2-2V6l2-2h1V2h2v2h8V2h2v2h1l2 2zM5 8h14V6H5v2zm14 12V10H5v10h14zm-4-7h2v-2h-2v2zm-4 0h2v-2h-2v2z"}))),category:"widgets",supports:{html:!1},getEditWrapperProps:function(e){var t=e.align;if(["left","center","right"].includes(t))return{"data-align":t}},edit:function(e){var t=e.attributes,n=e.setAttributes,r=t.align,o=t.showPostCounts,a=t.displayAsDropdown;return Object(F.createElement)(F.Fragment,null,Object(F.createElement)(K.InspectorControls,null,Object(F.createElement)(ee.PanelBody,{title:Object(W.__)("Archives Settings")},Object(F.createElement)(ee.ToggleControl,{label:Object(W.__)("Display as Dropdown"),checked:a,onChange:function(){return n({displayAsDropdown:!a})}}),Object(F.createElement)(ee.ToggleControl,{label:Object(W.__)("Show Post Counts"),checked:o,onChange:function(){return n({showPostCounts:!o})}}))),Object(F.createElement)(K.BlockControls,null,Object(F.createElement)(K.BlockAlignmentToolbar,{value:r,onChange:function(e){n({align:e})},controls:["left","center","right"]})),Object(F.createElement)(ee.Disabled,null,Object(F.createElement)(K.ServerSideRender,{block:"core/archives",attributes:t})))},save:function(){return null}},Ze=["audio"],Je=function(e){function t(){var e;return Object(G.a)(this,t),(e=Object(Y.a)(this,Object(Z.a)(t).apply(this,arguments))).state={editing:!e.props.attributes.src},e.toggleAttribute=e.toggleAttribute.bind(Object(X.a)(Object(X.a)(e))),e.onSelectURL=e.onSelectURL.bind(Object(X.a)(Object(X.a)(e))),e}return Object(J.a)(t,e),Object(Q.a)(t,[{key:"componentDidMount",value:function(){var e=this,t=this.props,n=t.attributes,r=t.noticeOperations,o=t.setAttributes,a=n.id,c=n.src,i=void 0===c?"":c;if(!a&&0===i.indexOf("blob:")){var l=Object(ue.getBlobByURL)(i);l&&Object(K.mediaUpload)({filesList:[l],onFileChange:function(e){var t=Object(be.a)(e,1)[0],n=t.id,r=t.url;o({id:n,src:r})},onError:function(t){o({src:void 0,id:void 0}),e.setState({editing:!0}),r.createErrorNotice(t)},allowedTypes:Ze})}}},{key:"toggleAttribute",value:function(e){var t=this;return function(n){t.props.setAttributes(Object(D.a)({},e,n))}}},{key:"onSelectURL",value:function(e){var t=this.props,n=t.attributes,r=t.setAttributes;e!==n.src&&r({src:e,id:void 0}),this.setState({editing:!1})}},{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.noticeOperations,m=i.noticeUI,h=function(){e.setState({editing:!0})};return this.state.editing?Object(F.createElement)(K.MediaPlaceholder,{icon:"media-audio",labels:{title:Object(W.__)("Audio"),name:Object(W.__)("an audio")},className:u,onSelect:function(t){if(!t||!t.url)return l({src:void 0,id:void 0}),void h();l({src:t.url,id:t.id}),e.setState({src:t.url,editing:!1})},onSelectURL:this.onSelectURL,accept:"audio/*",allowedTypes:Ze,value:this.props.attributes,notices:m,onError:b.createErrorNotice}):Object(F.createElement)(F.Fragment,null,Object(F.createElement)(K.BlockControls,null,Object(F.createElement)(ee.Toolbar,null,Object(F.createElement)(ee.IconButton,{className:"components-icon-button components-toolbar__control",label:Object(W.__)("Edit audio"),onClick:h,icon:"edit"}))),Object(F.createElement)(K.InspectorControls,null,Object(F.createElement)(ee.PanelBody,{title:Object(W.__)("Audio Settings")},Object(F.createElement)(ee.ToggleControl,{label:Object(W.__)("Autoplay"),onChange:this.toggleAttribute("autoplay"),checked:n}),Object(F.createElement)(ee.ToggleControl,{label:Object(W.__)("Loop"),onChange:this.toggleAttribute("loop"),checked:o}),Object(F.createElement)(ee.SelectControl,{label:Object(W.__)("Preload"),value:void 0!==a?a:"none",onChange:function(e){return l({preload:"none"!==e?e:void 0})},options:[{value:"auto",label:Object(W.__)("Auto")},{value:"metadata",label:Object(W.__)("Metadata")},{value:"none",label:Object(W.__)("None")}]}))),Object(F.createElement)("figure",{className:u},Object(F.createElement)(ee.Disabled,null,Object(F.createElement)("audio",{controls:"controls",src:c})),(!K.RichText.isEmpty(r)||s)&&Object(F.createElement)(K.RichText,{tagName:"figcaption",placeholder:Object(W.__)("Write caption…"),value:r,onChange:function(e){return l({caption:e})},inlineToolbar:!0})))}}]),t}(F.Component),Xe=Object(ee.withNotices)(Je),et="core/audio",tt={title:Object(W.__)("Audio"),description:Object(W.__)("Embed an audio file and a simple audio player."),icon:Object(F.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(F.createElement)("path",{d:"M0,0h24v24H0V0z",fill:"none"}),Object(F.createElement)("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"})),category:"common",attributes:{src:{type:"string",source:"attribute",selector:"audio",attribute:"src"},caption:{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"}},transforms:{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(P.createBlock)("core/audio",{src:Object(ue.createBlobURL)(t)})}}]},supports:{align:!0},edit:Xe,save:function(e){var t=e.attributes,n=t.autoplay,r=t.caption,o=t.loop,a=t.preload,c=t.src;return Object(F.createElement)("figure",null,Object(F.createElement)("audio",{controls:"controls",src:c,autoPlay:n,loop:o,preload:a}),!K.RichText.isEmpty(r)&&Object(F.createElement)(K.RichText.Content,{tagName:"figcaption",value:r}))}},nt=window.getComputedStyle,rt=Object(ee.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:nt(e).backgroundColor,fallbackTextColor:a||!c?void 0:nt(c).color}}),ot=function(e){function t(){var e;return Object(G.a)(this,t),(e=Object(Y.a)(this,Object(Z.a)(t).apply(this,arguments))).nodeRef=null,e.bindRef=e.bindRef.bind(Object(X.a)(Object(X.a)(e))),e}return Object(J.a)(t,e),Object(Q.a)(t,[{key:"bindRef",value:function(e){e&&(this.nodeRef=e)}},{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.isSelected,b=t.className,m=n.text,h=n.url,p=n.title;return Object(F.createElement)(F.Fragment,null,Object(F.createElement)("div",{className:b,title:p,ref:this.bindRef},Object(F.createElement)(K.RichText,{placeholder:Object(W.__)("Add text…"),value:m,onChange:function(e){return s({text:e})},formattingControls:["bold","italic","strikethrough"],className:U()("wp-block-button__link",(e={"has-background":r.color},Object(D.a)(e,r.class,r.class),Object(D.a)(e,"has-text-color",o.color),Object(D.a)(e,o.class,o.class),e)),style:{backgroundColor:r.color,color:o.color},keepPlaceholderOnFocus:!0}),Object(F.createElement)(K.InspectorControls,null,Object(F.createElement)(K.PanelColorSettings,{title:Object(W.__)("Color Settings"),colorSettings:[{value:r.color,onChange:a,label:Object(W.__)("Background Color")},{value:o.color,onChange:c,label:Object(W.__)("Text Color")}]},Object(F.createElement)(K.ContrastChecker,{isLargeText:!0,textColor:o.color,backgroundColor:r.color,fallbackBackgroundColor:i,fallbackTextColor:l})))),u&&Object(F.createElement)("form",{className:"block-library-button__inline-link",onSubmit:function(e){return e.preventDefault()}},Object(F.createElement)(ee.Dashicon,{icon:"admin-links"}),Object(F.createElement)(K.URLInput,{value:h,onChange:function(e){return s({url:e})}}),Object(F.createElement)(ee.IconButton,{icon:"editor-break",label:Object(W.__)("Apply"),type:"submit"})))}}]),t}(F.Component),at=Object(te.compose)([Object(K.withColors)("backgroundColor",{textColor:"color"}),rt])(ot),ct={url:{type:"string",source:"attribute",selector:"a",attribute:"href"},title:{type:"string",source:"attribute",selector:"a",attribute:"title"},text:{source:"html",selector:"a"},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"}},it="core/button",lt=function(e){return Object(q.omit)(Object(H.a)({},e,{customTextColor:e.textColor&&"#"===e.textColor[0]?e.textColor:void 0,customBackgroundColor:e.color&&"#"===e.color[0]?e.color:void 0}),["color","textColor"])},st={title:Object(W.__)("Button"),description:Object(W.__)("Want visitors to click to subscribe, buy, or read more? Get their attention with a button."),icon:Object(F.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(F.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(F.createElement)("g",null,Object(F.createElement)("path",{d:"M19 6H5L3 8v8l2 2h14l2-2V8l-2-2zm0 10H5V8h14v8z"}))),category:"layout",attributes:ct,supports:{align:!0,alignWide:!1},styles:[{name:"default",label:Object(W.__)("Rounded"),isDefault:!0},{name:"outline",label:Object(W.__)("Outline")},{name:"squared",label:Object(W.__)("Squared")}],edit:at,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(K.getColorClassName)("color",i),b=Object(K.getColorClassName)("background-color",c),m=U()("wp-block-button__link",(t={"has-text-color":i||s},Object(D.a)(t,u,u),Object(D.a)(t,"has-background",c||l),Object(D.a)(t,b,b),t)),h={backgroundColor:b?void 0:l,color:u?void 0:s};return Object(F.createElement)("div",null,Object(F.createElement)(K.RichText.Content,{tagName:"a",className:m,href:r,title:a,style:h,value:o}))},deprecated:[{attributes:Object(H.a)({},Object(q.pick)(ct,["url","title","text"]),{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(F.createElement)("div",{className:"align".concat(a)},Object(F.createElement)(K.RichText.Content,{tagName:"a",className:"wp-block-button__link",href:n,title:o,style:c,value:r}))},migrate:lt},{attributes:Object(H.a)({},Object(q.pick)(ct,["url","title","text"]),{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(F.createElement)("div",{className:"align".concat(a),style:{backgroundColor:c}},Object(F.createElement)(K.RichText.Content,{tagName:"a",href:n,title:o,style:{color:i},value:r}))},migrate:lt}]},ut=function(e){function t(){var e;return Object(G.a)(this,t),(e=Object(Y.a)(this,Object(Z.a)(t).apply(this,arguments))).toggleDisplayAsDropdown=e.toggleDisplayAsDropdown.bind(Object(X.a)(Object(X.a)(e))),e.toggleShowPostCounts=e.toggleShowPostCounts.bind(Object(X.a)(Object(X.a)(e))),e.toggleShowHierarchy=e.toggleShowHierarchy.bind(Object(X.a)(Object(X.a)(e))),e}return Object(J.a)(t,e),Object(Q.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){var t=this.props.className;return"".concat(t,"__list ").concat(t,"__list-level-").concat(e)}},{key:"renderCategoryName",value:function(e){return e.name?Object(q.unescape)(e.name).trim():Object(W.__)("(Untitled)")}},{key:"renderCategoryList",value:function(){var e=this,t=this.props.attributes.showHierarchy?0:null,n=this.getCategories(t);return Object(F.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(F.createElement)("li",{key:e.id},Object(F.createElement)("a",{href:e.link,target:"_blank"},this.renderCategoryName(e)),a&&Object(F.createElement)("span",{className:"".concat(this.props.className,"__post-count")}," ","(",e.count,")"),o&&!!c.length&&Object(F.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.attributes.showHierarchy?0:null,n=this.getCategories(t);return Object(F.createElement)("select",{className:"".concat(this.props.className,"__dropdown")},n.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(F.createElement)("option",{key:e.id},Object(q.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.setAttributes,r=e.isRequesting,o=t.align,a=t.displayAsDropdown,c=t.showHierarchy,i=t.showPostCounts,l=Object(F.createElement)(K.InspectorControls,null,Object(F.createElement)(ee.PanelBody,{title:Object(W.__)("Categories Settings")},Object(F.createElement)(ee.ToggleControl,{label:Object(W.__)("Display as Dropdown"),checked:a,onChange:this.toggleDisplayAsDropdown}),Object(F.createElement)(ee.ToggleControl,{label:Object(W.__)("Show Hierarchy"),checked:c,onChange:this.toggleShowHierarchy}),Object(F.createElement)(ee.ToggleControl,{label:Object(W.__)("Show Post Counts"),checked:i,onChange:this.toggleShowPostCounts})));return r?Object(F.createElement)(F.Fragment,null,l,Object(F.createElement)(ee.Placeholder,{icon:"admin-post",label:Object(W.__)("Categories")},Object(F.createElement)(ee.Spinner,null))):Object(F.createElement)(F.Fragment,null,l,Object(F.createElement)(K.BlockControls,null,Object(F.createElement)(K.BlockAlignmentToolbar,{value:o,onChange:function(e){n({align:e})},controls:["left","center","right","full"]})),Object(F.createElement)("div",{className:this.props.className},a?this.renderCategoryDropdown():this.renderCategoryList()))}}]),t}(F.Component),bt=Object(he.withSelect)(function(e){var t=e("core").getEntityRecords,n=e("core/data").isResolving,r={per_page:-1};return{categories:t("taxonomy","category",r),isRequesting:n("core","getEntityRecords",["taxonomy","category",r])}})(ut),mt="core/categories",ht={title:Object(W.__)("Categories"),description:Object(W.__)("Display a list of all your sites categories."),icon:Object(F.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(F.createElement)("path",{d:"M0,0h24v24H0V0z",fill:"none"}),Object(F.createElement)("path",{d:"M12,2l-5.5,9h11L12,2z M12,5.84L13.93,9h-3.87L12,5.84z"}),Object(F.createElement)("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(F.createElement)("path",{d:"m3 21.5h8v-8h-8v8zm2-6h4v4h-4v-4z"})),category:"widgets",attributes:{showPostCounts:{type:"boolean",default:!1},displayAsDropdown:{type:"boolean",default:!1},showHierarchy:{type:"boolean",default:!1},align:{type:"string"}},supports:{html:!1},getEditWrapperProps:function(e){var t=e.align;if("left"===t||"right"===t||"full"===t)return{"data-align":t}},edit:bt,save:function(){return null}};var pt="core/code",dt={title:Object(W.__)("Code"),description:Object(W.__)("Add text that respects your spacing and tabs -- perfect for displaying code."),icon:Object(F.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(F.createElement)("path",{d:"M0,0h24v24H0V0z",fill:"none"}),Object(F.createElement)("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"})),category:"formatting",attributes:{content:{type:"string",source:"text",selector:"code"}},supports:{html:!1},transforms:{from:[{type:"pattern",trigger:"enter",regExp:/^```$/,transform:function(){return Object(P.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":{}}}}}}}]},edit:function(e){var t=e.attributes,n=e.setAttributes,r=e.className;return Object(F.createElement)("div",{className:r},Object(F.createElement)(K.PlainText,{value:t.content,onChange:function(e){return n({content:e})},placeholder:Object(W.__)("Write code…"),"aria-label":Object(W.__)("Code")}))},save:function(e){var t=e.attributes;return Object(F.createElement)("pre",null,Object(F.createElement)("code",null,t.content))}},gt=n(44),Ot=["core/column"],ft=n.n(gt)()(function(e){return Object(q.times)(e,function(){return["core/column"]})}),jt="core/columns",vt={title:Object(W.sprintf)(Object(W.__)("%1$s (%2$s)"),Object(W.__)("Columns"),Object(W.__)("beta")),icon:Object(F.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(F.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(F.createElement)("g",null,Object(F.createElement)("path",{d:"M21 4H3L2 5v14l1 1h18l1-1V5l-1-1zM8 18H4V6h4v12zm6 0h-4V6h4v12zm6 0h-4V6h4v12z"}))),category:"layout",attributes:{columns:{type:"number",default:2}},description:Object(W.__)("Add a block that displays content in multiple columns, then add whatever content blocks youd like."),supports:{align:["wide","full"]},deprecated:[{attributes:{columns:{type:"number",default:2}},isEligible:function(e,t){return t.some(Object(q.property)(["attributes","layout"]))},migrate:function(e,t){return[e,t.reduce(function(e,t){var n,r,o=t.attributes.layout;return e[n=o&&(r=o.match(/^column-(\d+)$/))?Number(r[1])-1:0]||(e[n]=[]),e[n].push(function(e){return Object(H.a)({},e,{attributes:Object(q.omit)(e.attributes,["layout"])})}(t)),e},[]).map(function(e){return Object(P.createBlock)("core/column",{},e)})]},save:function(e){var t=e.attributes.columns;return Object(F.createElement)("div",{className:"has-".concat(t,"-columns")},Object(F.createElement)(K.InnerBlocks.Content,null))}}],edit:function(e){var t=e.attributes,n=e.setAttributes,r=e.className,o=t.columns,a=U()(r,"has-".concat(o,"-columns"));return Object(F.createElement)(F.Fragment,null,Object(F.createElement)(K.InspectorControls,null,Object(F.createElement)(ee.PanelBody,null,Object(F.createElement)(ee.RangeControl,{label:Object(W.__)("Columns"),value:o,onChange:function(e){n({columns:e})},min:2,max:6}))),Object(F.createElement)("div",{className:a},Object(F.createElement)(K.InnerBlocks,{template:ft(o),templateLock:"all",allowedBlocks:Ot})))},save:function(e){var t=e.attributes.columns;return Object(F.createElement)("div",{className:"has-".concat(t,"-columns")},Object(F.createElement)(K.InnerBlocks.Content,null))}},yt="core/column",wt={title:Object(W.__)("Column"),parent:["core/columns"],icon:"columns",description:Object(W.__)("A single column within a columns block."),category:"common",supports:{inserter:!1},edit:function(){return Object(F.createElement)(K.InnerBlocks,{templateLock:!1})},save:function(){return Object(F.createElement)("div",null,Object(F.createElement)(K.InnerBlocks.Content,null))}},Ct=["left","center","right","wide","full"],kt={title:{source:"html",selector:"p"},url:{type:"string"},align:{type:"string"},contentAlign:{type:"string",default:"center"},id:{type:"number"},hasParallax:{type:"boolean",default:!1},dimRatio:{type:"number",default:50},overlayColor:{type:"string"},customOverlayColor:{type:"string"}},Et="core/cover-image",_t=["image"],xt={title:Object(W.__)("Cover Image"),description:Object(W.__)("Add a full-width image, and layer text over it — great for headers."),icon:Object(F.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(F.createElement)("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(F.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"})),category:"common",attributes:kt,transforms:{from:[{type:"block",blocks:["core/heading"],transform:function(e){var t=e.content;return Object(P.createBlock)("core/cover-image",{title:t})}},{type:"block",blocks:["core/image"],transform:function(e){var t=e.caption,n=e.url,r=e.align,o=e.id;return Object(P.createBlock)("core/cover-image",{title:t,url:n,align:r,id:o})}}],to:[{type:"block",blocks:["core/heading"],transform:function(e){var t=e.title;return Object(P.createBlock)("core/heading",{content:t})}},{type:"block",blocks:["core/image"],transform:function(e){var t=e.title,n=e.url,r=e.align,o=e.id;return Object(P.createBlock)("core/image",{caption:t,url:n,align:r,id:o})}}]},getEditWrapperProps:function(e){var t=e.align;if(-1!==Ct.indexOf(t))return{"data-align":t}},edit:Object(te.compose)([Object(K.withColors)({overlayColor:"background-color"}),ee.withNotices])(function(e){var t=e.attributes,n=e.setAttributes,r=e.isSelected,o=e.className,a=e.noticeOperations,c=e.noticeUI,i=e.overlayColor,l=e.setOverlayColor,s=t.url,u=t.title,b=t.align,m=t.contentAlign,h=t.id,p=t.hasParallax,d=t.dimRatio,g=function(e){e&&e.url?n({url:e.url,id:e.id}):n({url:void 0,id:void 0})},O=function(e){return n({title:e})},f=Object(H.a)({},Nt(s),{backgroundColor:i.color}),j=U()(o,"center"!==m&&"has-".concat(m,"-content"),St(d),{"has-background-dim":0!==d,"has-parallax":p}),v=Object(F.createElement)(F.Fragment,null,Object(F.createElement)(K.BlockControls,null,Object(F.createElement)(K.BlockAlignmentToolbar,{value:b,onChange:function(e){return n({align:e})}}),Object(F.createElement)(K.AlignmentToolbar,{value:m,onChange:function(e){n({contentAlign:e})}}),Object(F.createElement)(ee.Toolbar,null,Object(F.createElement)(K.MediaUpload,{onSelect:g,allowedTypes:_t,value:h,render:function(e){var t=e.open;return Object(F.createElement)(ee.IconButton,{className:"components-toolbar__control",label:Object(W.__)("Edit image"),icon:"edit",onClick:t})}}))),!!s&&Object(F.createElement)(K.InspectorControls,null,Object(F.createElement)(ee.PanelBody,{title:Object(W.__)("Cover Image Settings")},Object(F.createElement)(ee.ToggleControl,{label:Object(W.__)("Fixed Background"),checked:p,onChange:function(){return n({hasParallax:!p})}}),Object(F.createElement)(K.PanelColorSettings,{title:Object(W.__)("Overlay"),initialOpen:!0,colorSettings:[{value:i.color,onChange:l,label:Object(W.__)("Overlay Color")}]},Object(F.createElement)(ee.RangeControl,{label:Object(W.__)("Background Opacity"),value:d,onChange:function(e){return n({dimRatio:e})},min:0,max:100,step:10})))));if(!s){var y=!K.RichText.isEmpty(u),w=y?void 0:"format-image",C=y?Object(F.createElement)(K.RichText,{tagName:"h2",value:u,onChange:O,inlineToolbar:!0}):Object(W.__)("Cover Image");return Object(F.createElement)(F.Fragment,null,v,Object(F.createElement)(K.MediaPlaceholder,{icon:w,className:o,labels:{title:C,name:Object(W.__)("an image")},onSelect:g,accept:"image/*",allowedTypes:_t,notices:c,onError:a.createErrorNotice}))}return Object(F.createElement)(F.Fragment,null,v,Object(F.createElement)("div",{"data-url":s,style:f,className:j},(!K.RichText.isEmpty(u)||r)&&Object(F.createElement)(K.RichText,{tagName:"p",className:"wp-block-cover-image-text",placeholder:Object(W.__)("Write title…"),value:u,onChange:O,inlineToolbar:!0})))}),save:function(e){var t=e.attributes,n=e.className,r=t.url,o=t.title,a=t.hasParallax,c=t.dimRatio,i=t.align,l=t.contentAlign,s=t.overlayColor,u=t.customOverlayColor,b=Object(K.getColorClassName)("background-color",s),m=Nt(r);b||(m.backgroundColor=u);var h=U()(n,St(c),b,Object(D.a)({"has-background-dim":0!==c,"has-parallax":a},"has-".concat(l,"-content"),"center"!==l),i?"align".concat(i):null);return Object(F.createElement)("div",{className:h,style:m},!K.RichText.isEmpty(o)&&Object(F.createElement)(K.RichText.Content,{tagName:"p",className:"wp-block-cover-image-text",value:o}))},deprecated:[{attributes:Object(H.a)({},kt,{title:{source:"html",selector:"h2"}}),save:function(e){var t=e.attributes,n=e.className,r=t.url,o=t.title,a=t.hasParallax,c=t.dimRatio,i=t.align,l=Nt(r),s=U()(n,St(c),{"has-background-dim":0!==c,"has-parallax":a},i?"align".concat(i):null);return Object(F.createElement)("section",{className:s,style:l},Object(F.createElement)(K.RichText.Content,{tagName:"h2",value:o}))}}]};function St(e){return 0===e||50===e?null:"has-background-dim-"+10*Math.round(e/10)}function Nt(e){return e?{backgroundImage:"url(".concat(e,")")}:{}}var Tt=n(69),Bt=n(68),At=n.n(Bt),Rt=["facebook.com"],It=[{ratio:"2.33",className:"wp-embed-aspect-21-9"},{ratio:"2.00",className:"wp-embed-aspect-18-9"},{ratio:"1.78",className:"wp-embed-aspect-16-9"},{ratio:"1.33",className:"wp-embed-aspect-4-3"},{ratio:"1.00",className:"wp-embed-aspect-1-1"},{ratio:"0.56",className:"wp-embed-aspect-9-16"},{ratio:"0.50",className:"wp-embed-aspect-1-2"}],Lt=function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).some(function(t){return e.match(t)})},zt=function(e){for(var t=Kt.concat($t),n=0;n<t.length;n++){var r=t[n];if(Lt(e,r.patterns))return r.name}return"core/embed"};function Mt(e,t){return function(n){function r(){var e;return Object(G.a)(this,r),(e=Object(Y.a)(this,Object(Z.a)(r).apply(this,arguments))).switchBackToURLInput=e.switchBackToURLInput.bind(Object(X.a)(Object(X.a)(e))),e.setUrl=e.setUrl.bind(Object(X.a)(Object(X.a)(e))),e.maybeSwitchBlock=e.maybeSwitchBlock.bind(Object(X.a)(Object(X.a)(e))),e.setAttributesFromPreview=e.setAttributesFromPreview.bind(Object(X.a)(Object(X.a)(e))),e.setAspectRatioClassNames=e.setAspectRatioClassNames.bind(Object(X.a)(Object(X.a)(e))),e.getResponsiveHelp=e.getResponsiveHelp.bind(Object(X.a)(Object(X.a)(e))),e.toggleResponsive=e.toggleResponsive.bind(Object(X.a)(Object(X.a)(e))),e.handleIncomingPreview=e.handleIncomingPreview.bind(Object(X.a)(Object(X.a)(e))),e.state={editingURL:!1,url:e.props.attributes.url},e.props.preview&&e.handleIncomingPreview(),e}return Object(J.a)(r,n),Object(Q.a)(r,[{key:"handleIncomingPreview",value:function(){this.setAttributesFromPreview(),this.maybeSwitchBlock()}},{key:"componentDidUpdate",value:function(e){var t=void 0!==this.props.preview,n=void 0!==e.preview,r=this.props.preview&&this.props.attributes.url!==e.attributes.url;if((!(this.props.attributes.url!==e.attributes.url)||!this.maybeSwitchBlock())&&(t&&!n||r)){if(this.props.previewIsFallback)return void this.setState({editingURL:!0});this.handleIncomingPreview()}}},{key:"getPhotoHtml",value:function(e){var t=Object(F.createElement)("p",null,Object(F.createElement)("img",{src:e.thumbnail_url,alt:e.title,width:"100%"}));return Object(F.renderToString)(t)}},{key:"setUrl",value:function(e){e&&e.preventDefault();var t=this.state.url,n=this.props.setAttributes;this.setState({editingURL:!1}),n({url:t})}},{key:"maybeSwitchBlock",value:function(){var e=this.props.preview,t=this.props.attributes.url;if(!t)return!1;var n=zt(t);if("core-embed/wordpress"!==this.props.name&&"core/embed"!==n&&this.props.name!==n)return this.props.onReplace(Object(P.createBlock)(n,{url:t})),!0;if(e){var r=e.html;if(Object(q.includes)(r,'class="wp-embedded-content" data-secret')&&"core-embed/wordpress"!==this.props.name)return this.props.onReplace(Object(P.createBlock)("core-embed/wordpress",{url:t})),!0}return!1}},{key:"getAspectRatioClassNames",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=document.implementation.createHTMLDocument("");n.body.innerHTML=e;var r=n.body.querySelector("iframe");if(r&&r.height&&r.width)for(var o=(r.width/r.height).toFixed(2),a=0;a<It.length;a++){var c,i=It[a];if(o>=i.ratio)return c={},Object(D.a)(c,i.className,t),Object(D.a)(c,"wp-has-aspect-ratio",t),c}}},{key:"setAspectRatioClassNames",value:function(e){if(this.props.attributes.allowResponsive){var t=At()(this.props.attributes.className,this.getAspectRatioClassNames(e));this.props.setAttributes({className:t})}}},{key:"setAttributesFromPreview",value:function(){var t=this.props,n=t.setAttributes,r=t.preview,o=r.type,a=void 0===o?"rich":o,c=r.html,i=r.provider_name,l=Object(q.kebabCase)(Object(q.toLower)(""!==i?i:e));Object(q.includes)(c,'class="wp-embedded-content" data-secret')&&(a="wp-embed"),(c||"photo"===a)&&n({type:a,providerNameSlug:l}),this.setAspectRatioClassNames(c)}},{key:"switchBackToURLInput",value:function(){this.setState({editingURL:!0})}},{key:"getResponsiveHelp",value:function(e){return e?Object(W.__)("Videos and other content automatically resizes."):Object(W.__)("Content is fixed size.")}},{key:"toggleResponsive",value:function(){var e=this.props.attributes,t=e.allowResponsive,n=e.className,r=this.props.preview.html,o=this.getAspectRatioClassNames(r,!t);this.props.setAttributes({allowResponsive:!t,className:At()(n,o)})}},{key:"render",value:function(){var n=this,r=this.state,o=r.url,a=r.editingURL,c=this.props.attributes,i=c.caption,l=c.type,s=c.allowResponsive,u=this.props,b=u.fetching,m=u.setAttributes,h=u.isSelected,p=u.className,d=u.preview,g=u.previewIsFallback,O=o&&(!d||g),f=Object(F.createElement)(F.Fragment,null,Object(F.createElement)(K.BlockControls,null,Object(F.createElement)(ee.Toolbar,null,d&&!g&&Object(F.createElement)(ee.IconButton,{className:"components-toolbar__control",label:Object(W.__)("Edit URL"),icon:"edit",onClick:this.switchBackToURLInput}))),Object(F.createElement)(K.InspectorControls,null,Object(F.createElement)(ee.PanelBody,{title:Object(W.__)("Media Settings"),className:"blocks-responsive"},Object(F.createElement)(ee.ToggleControl,{label:Object(W.__)("Automatically scale content"),checked:s,help:this.getResponsiveHelp,onChange:this.toggleResponsive}))));if(b)return Object(F.createElement)("div",{className:"wp-block-embed is-loading"},Object(F.createElement)(ee.Spinner,null),Object(F.createElement)("p",null,Object(W.__)("Embedding…")));var j=Object(W.sprintf)(Object(W.__)("%s URL"),e);if(!d||g||a)return Object(F.createElement)(ee.Placeholder,{icon:Object(F.createElement)(K.BlockIcon,{icon:t,showColors:!0}),label:j,className:"wp-block-embed"},Object(F.createElement)("form",{onSubmit:this.setUrl},Object(F.createElement)("input",{type:"url",value:o||"",className:"components-placeholder__input","aria-label":j,placeholder:Object(W.__)("Enter URL to embed here…"),onChange:function(e){return n.setState({url:e.target.value})}}),Object(F.createElement)(ee.Button,{isLarge:!0,type:"submit"},Object(W.__)("Embed")),O&&Object(F.createElement)("p",{className:"components-placeholder__error"},Object(W.__)("Sorry, we could not embed that content."))));var v="photo"===l?this.getPhotoHtml(d):d.html,y=d.scripts,w=Object(Tt.parse)(o),C=Object(q.includes)(Rt,w.host.replace(/^www\./,"")),k=Object(W.sprintf)(Object(W.__)("Embedded content from %s"),w.host),E=At()(l,p),_="wp-embed"===l?Object(F.createElement)("div",{className:"wp-block-embed__wrapper",dangerouslySetInnerHTML:{__html:v}}):Object(F.createElement)("div",{className:"wp-block-embed__wrapper"},Object(F.createElement)(ee.SandBox,{html:v,scripts:y,title:k,type:E}));return Object(F.createElement)("figure",{className:At()(p,"wp-block-embed",{"is-video":"video"===l})},f,C?Object(F.createElement)(ee.Placeholder,{icon:Object(F.createElement)(K.BlockIcon,{icon:t,showColors:!0}),label:j},Object(F.createElement)("p",{className:"components-placeholder__error"},Object(F.createElement)("a",{href:o},o)),Object(F.createElement)("p",{className:"components-placeholder__error"},Object(W.__)("Previews for this are unavailable in the editor, sorry!"))):_,(!K.RichText.isEmpty(i)||h)&&Object(F.createElement)(K.RichText,{tagName:"figcaption",placeholder:Object(W.__)("Write caption…"),value:i,onChange:function(e){return m({caption:e})},inlineToolbar:!0}))}}]),r}(F.Component)}var Pt={url:{type:"string"},caption:{source:"html",selector:"figcaption"},type:{type:"string"},providerNameSlug:{type:"string"},allowResponsive:{type:"boolean",default:!0}};function Dt(e){var t=e.title,n=e.description,r=e.icon,o=e.category,a=void 0===o?"embed":o,c=e.transforms,i=e.keywords,l=void 0===i?[]:i,s=e.supports,u=void 0===s?{}:s;return{title:t,description:n||Object(W.sprintf)(Object(W.__)("Add a block that displays content pulled from other sites, like Twitter, Instagram or YouTube."),t),icon:r,category:a,keywords:l,attributes:Pt,supports:Object(H.a)({align:!0},u),transforms:c,edit:Object(te.compose)(Object(he.withSelect)(function(e,t){var n=t.attributes.url,r=e("core"),o=r.getEmbedPreview,a=r.isPreviewEmbedFallback,c=r.isRequestingEmbedPreview,i=n&&o(n),l=n&&a(n),s=void 0!==n&&c(n);return{preview:i&&!(i.data&&404===i.data.status)&&i,previewIsFallback:l,fetching:s}}))(Mt(t,r)),save:function(e){var t,n=e.attributes,r=n.url,o=n.caption,a=n.type,c=n.providerNameSlug;if(!r)return null;var i=At()("wp-block-embed",(t={},Object(D.a)(t,"is-type-".concat(a),a),Object(D.a)(t,"is-provider-".concat(c),c),t));return Object(F.createElement)("figure",{className:i},Object(F.createElement)("div",{className:"wp-block-embed__wrapper"},"\n".concat(r,"\n")),!K.RichText.isEmpty(o)&&Object(F.createElement)(K.RichText.Content,{tagName:"figcaption",value:o}))},deprecated:[{attributes:Pt,save:function(e){var t,n=e.attributes,r=n.url,o=n.caption,a=n.type,c=n.providerNameSlug;if(!r)return null;var i=At()("wp-block-embed",(t={},Object(D.a)(t,"is-type-".concat(a),a),Object(D.a)(t,"is-provider-".concat(c),c),t));return Object(F.createElement)("figure",{className:i},"\n".concat(r,"\n"),!K.RichText.isEmpty(o)&&Object(F.createElement)(K.RichText.Content,{tagName:"figcaption",value:o}))}}]}}var Ht="core/embed",Ft=Object(F.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(F.createElement)("path",{d:"M0,0h24v24H0V0z",fill:"none"}),Object(F.createElement)("path",{d:"M19,4H5C3.89,4,3,4.9,3,6v12c0,1.1,0.89,2,2,2h14c1.1,0,2-0.9,2-2V6C21,4.9,20.11,4,19,4z M19,18H5V8h14V18z"})),Vt=Object(F.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(F.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(F.createElement)("path",{d:"M21 3H3L1 5v14l2 2h18l2-2V5l-2-2zm0 16H3V5h18v14zM8 15a3 3 0 0 1 4-3V6h5v2h-3v7a3 3 0 0 1-6 0z"})),Ut=Object(F.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(F.createElement)("path",{d:"M0,0h24v24H0V0z",fill:"none"}),Object(F.createElement)("path",{d:"M21,4H3C1.9,4,1,4.9,1,6v12c0,1.1,0.9,2,2,2h18c1.1,0,2-0.9,2-2V6C23,4.9,22.1,4,21,4z M21,18H3V6h18V18z"}),Object(F.createElement)("polygon",{points:"14.5 11 11 15.51 8.5 12.5 5 17 19 17"})),qt=Object(F.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(F.createElement)("path",{d:"M0,0h24v24H0V0z",fill:"none"}),Object(F.createElement)("path",{d:"m10 8v8l5-4-5-4zm9-5h-14c-1.1 0-2 0.9-2 2v14c0 1.1 0.9 2 2 2h14c1.1 0 2-0.9 2-2v-14c0-1.1-0.9-2-2-2zm0 16h-14v-14h14v14z"})),Wt=Dt({title:Object(W.__)("Embed"),description:Object(W.__)("The Embed block allows you to easily add videos, images, tweets, audio, and other content to your post or page."),icon:Ft,transforms:{from:[{type:"raw",isMatch:function(e){return"P"===e.nodeName&&/^\s*(https?:\/\/\S+)\s*$/i.test(e.textContent)},transform:function(e){return Object(P.createBlock)("core/embed",{url:e.textContent.trim()})}}]}}),Kt=[{name:"core-embed/twitter",settings:Dt({title:"Twitter",icon:{foreground:"#1da1f2",src:Object(F.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(F.createElement)("g",null,Object(F.createElement)("path",{d:"M22.23 5.924c-.736.326-1.527.547-2.357.646.847-.508 1.498-1.312 1.804-2.27-.793.47-1.67.812-2.606.996C18.325 4.498 17.258 4 16.078 4c-2.266 0-4.103 1.837-4.103 4.103 0 .322.036.635.106.935-3.41-.17-6.433-1.804-8.457-4.287-.353.607-.556 1.312-.556 2.064 0 1.424.724 2.68 1.825 3.415-.673-.022-1.305-.207-1.86-.514v.052c0 1.988 1.415 3.647 3.293 4.023-.344.095-.707.145-1.08.145-.265 0-.522-.026-.773-.074.522 1.63 2.038 2.817 3.833 2.85-1.404 1.1-3.174 1.757-5.096 1.757-.332 0-.66-.02-.98-.057 1.816 1.164 3.973 1.843 6.29 1.843 7.547 0 11.675-6.252 11.675-11.675 0-.178-.004-.355-.012-.53.802-.578 1.497-1.3 2.047-2.124z"})))},keywords:["tweet"]}),patterns:[/^https?:\/\/(www\.)?twitter\.com\/.+/i]},{name:"core-embed/youtube",settings:Dt({title:"YouTube",icon:{foreground:"#ff0000",src:Object(F.createElement)("svg",{viewBox:"0 0 24 24"},Object(F.createElement)("path",{d:"M21.8 8s-.195-1.377-.795-1.984c-.76-.797-1.613-.8-2.004-.847-2.798-.203-6.996-.203-6.996-.203h-.01s-4.197 0-6.996.202c-.39.046-1.242.05-2.003.846C2.395 6.623 2.2 8 2.2 8S2 9.62 2 11.24v1.517c0 1.618.2 3.237.2 3.237s.195 1.378.795 1.985c.76.797 1.76.77 2.205.855 1.6.153 6.8.2 6.8.2s4.203-.005 7-.208c.392-.047 1.244-.05 2.005-.847.6-.607.795-1.985.795-1.985s.2-1.618.2-3.237v-1.517C22 9.62 21.8 8 21.8 8zM9.935 14.595v-5.62l5.403 2.82-5.403 2.8z"}))},keywords:[Object(W.__)("music"),Object(W.__)("video")]}),patterns:[/^https?:\/\/((m|www)\.)?youtube\.com\/.+/i,/^https?:\/\/youtu\.be\/.+/i]},{name:"core-embed/facebook",settings:Dt({title:"Facebook",icon:{foreground:"#3b5998",src:Object(F.createElement)("svg",{viewBox:"0 0 24 24"},Object(F.createElement)("path",{d:"M20 3H4c-.6 0-1 .4-1 1v16c0 .5.4 1 1 1h8.6v-7h-2.3v-2.7h2.3v-2c0-2.3 1.4-3.6 3.5-3.6 1 0 1.8.1 2.1.1v2.4h-1.4c-1.1 0-1.3.5-1.3 1.3v1.7h2.7l-.4 2.8h-2.3v7H20c.5 0 1-.4 1-1V4c0-.6-.4-1-1-1z"}))}}),patterns:[/^https?:\/\/www\.facebook.com\/.+/i]},{name:"core-embed/instagram",settings:Dt({title:"Instagram",icon:Object(F.createElement)("svg",{viewBox:"0 0 24 24"},Object(F.createElement)("g",null,Object(F.createElement)("path",{d:"M12 4.622c2.403 0 2.688.01 3.637.052.877.04 1.354.187 1.67.31.42.163.72.358 1.036.673.315.315.51.615.673 1.035.123.317.27.794.31 1.67.043.95.052 1.235.052 3.638s-.01 2.688-.052 3.637c-.04.877-.187 1.354-.31 1.67-.163.42-.358.72-.673 1.036-.315.315-.615.51-1.035.673-.317.123-.794.27-1.67.31-.95.043-1.234.052-3.638.052s-2.688-.01-3.637-.052c-.877-.04-1.354-.187-1.67-.31-.42-.163-.72-.358-1.036-.673-.315-.315-.51-.615-.673-1.035-.123-.317-.27-.794-.31-1.67-.043-.95-.052-1.235-.052-3.638s.01-2.688.052-3.637c.04-.877.187-1.354.31-1.67.163-.42.358-.72.673-1.036.315-.315.615-.51 1.035-.673.317-.123.794-.27 1.67-.31.95-.043 1.235-.052 3.638-.052M12 3c-2.444 0-2.75.01-3.71.054s-1.613.196-2.185.418c-.592.23-1.094.538-1.594 1.04-.5.5-.807 1-1.037 1.593-.223.572-.375 1.226-.42 2.184C3.01 9.25 3 9.555 3 12s.01 2.75.054 3.71.196 1.613.418 2.186c.23.592.538 1.094 1.038 1.594s1.002.808 1.594 1.038c.572.222 1.227.375 2.185.418.96.044 1.266.054 3.71.054s2.75-.01 3.71-.054 1.613-.196 2.186-.418c.592-.23 1.094-.538 1.594-1.038s.808-1.002 1.038-1.594c.222-.572.375-1.227.418-2.185.044-.96.054-1.266.054-3.71s-.01-2.75-.054-3.71-.196-1.613-.418-2.186c-.23-.592-.538-1.094-1.038-1.594s-1.002-.808-1.594-1.038c-.572-.222-1.227-.375-2.185-.418C14.75 3.01 14.445 3 12 3zm0 4.378c-2.552 0-4.622 2.07-4.622 4.622s2.07 4.622 4.622 4.622 4.622-2.07 4.622-4.622S14.552 7.378 12 7.378zM12 15c-1.657 0-3-1.343-3-3s1.343-3 3-3 3 1.343 3 3-1.343 3-3 3zm4.804-8.884c-.596 0-1.08.484-1.08 1.08s.484 1.08 1.08 1.08c.596 0 1.08-.484 1.08-1.08s-.483-1.08-1.08-1.08z"}))),keywords:[Object(W.__)("image")]}),patterns:[/^https?:\/\/(www\.)?instagr(\.am|am\.com)\/.+/i]},{name:"core-embed/wordpress",settings:Dt({title:"WordPress",icon:{foreground:"#0073AA",src:Object(F.createElement)("svg",{viewBox:"0 0 24 24"},Object(F.createElement)("g",null,Object(F.createElement)("path",{d:"M12.158 12.786l-2.698 7.84c.806.236 1.657.365 2.54.365 1.047 0 2.05-.18 2.986-.51-.024-.037-.046-.078-.065-.123l-2.762-7.57zM3.008 12c0 3.56 2.07 6.634 5.068 8.092L3.788 8.342c-.5 1.117-.78 2.354-.78 3.658zm15.06-.454c0-1.112-.398-1.88-.74-2.48-.456-.74-.883-1.368-.883-2.11 0-.825.627-1.595 1.51-1.595.04 0 .078.006.116.008-1.598-1.464-3.73-2.36-6.07-2.36-3.14 0-5.904 1.613-7.512 4.053.21.008.41.012.58.012.94 0 2.395-.114 2.395-.114.484-.028.54.684.057.74 0 0-.487.058-1.03.086l3.275 9.74 1.968-5.902-1.4-3.838c-.485-.028-.944-.085-.944-.085-.486-.03-.43-.77.056-.742 0 0 1.484.114 2.368.114.94 0 2.397-.114 2.397-.114.486-.028.543.684.058.74 0 0-.488.058-1.03.086l3.25 9.665.897-2.997c.456-1.17.684-2.137.684-2.907zm1.82-3.86c.04.286.06.593.06.924 0 .912-.17 1.938-.683 3.22l-2.746 7.94c2.672-1.558 4.47-4.454 4.47-7.77 0-1.564-.4-3.033-1.1-4.314zM12 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10z"})))},keywords:[Object(W.__)("post"),Object(W.__)("blog")]})},{name:"core-embed/soundcloud",settings:Dt({title:"SoundCloud",icon:Vt,keywords:[Object(W.__)("music"),Object(W.__)("audio")]}),patterns:[/^https?:\/\/(www\.)?soundcloud\.com\/.+/i]},{name:"core-embed/spotify",settings:Dt({title:"Spotify",icon:{foreground:"#1db954",src:Object(F.createElement)("svg",{viewBox:"0 0 24 24"},Object(F.createElement)("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2m4.586 14.424c-.18.295-.563.387-.857.207-2.35-1.434-5.305-1.76-8.786-.963-.335.077-.67-.133-.746-.47-.077-.334.132-.67.47-.745 3.808-.87 7.076-.496 9.712 1.115.293.18.386.563.206.857M17.81 13.7c-.226.367-.706.482-1.072.257-2.687-1.652-6.785-2.13-9.965-1.166-.413.127-.848-.106-.973-.517-.125-.413.108-.848.52-.973 3.632-1.102 8.147-.568 11.234 1.328.366.226.48.707.256 1.072m.105-2.835C14.692 8.95 9.375 8.775 6.297 9.71c-.493.15-1.016-.13-1.166-.624-.148-.495.13-1.017.625-1.167 3.532-1.073 9.404-.866 13.115 1.337.445.264.59.838.327 1.282-.264.443-.838.59-1.282.325"}))},keywords:[Object(W.__)("music"),Object(W.__)("audio")]}),patterns:[/^https?:\/\/(open|play)\.spotify\.com\/.+/i]},{name:"core-embed/flickr",settings:Dt({title:"Flickr",icon:Object(F.createElement)("svg",{viewBox:"0 0 24 24"},Object(F.createElement)("path",{d:"m6.5 7c-2.75 0-5 2.25-5 5s2.25 5 5 5 5-2.25 5-5-2.25-5-5-5zm11 0c-2.75 0-5 2.25-5 5s2.25 5 5 5 5-2.25 5-5-2.25-5-5-5z"})),keywords:[Object(W.__)("image")]}),patterns:[/^https?:\/\/(www\.)?flickr\.com\/.+/i,/^https?:\/\/flic\.kr\/.+/i]},{name:"core-embed/vimeo",settings:Dt({title:"Vimeo",icon:{foreground:"#1ab7ea",src:Object(F.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(F.createElement)("g",null,Object(F.createElement)("path",{d:"M22.396 7.164c-.093 2.026-1.507 4.8-4.245 8.32C15.323 19.16 12.93 21 10.97 21c-1.214 0-2.24-1.12-3.08-3.36-.56-2.052-1.118-4.105-1.68-6.158-.622-2.24-1.29-3.36-2.004-3.36-.156 0-.7.328-1.634.98l-.978-1.26c1.027-.903 2.04-1.806 3.037-2.71C6 3.95 7.03 3.328 7.716 3.265c1.62-.156 2.616.95 2.99 3.32.404 2.558.685 4.148.84 4.77.468 2.12.982 3.18 1.543 3.18.435 0 1.09-.687 1.963-2.064.872-1.376 1.34-2.422 1.402-3.142.125-1.187-.343-1.782-1.4-1.782-.5 0-1.013.115-1.542.34 1.023-3.35 2.977-4.976 5.862-4.883 2.14.063 3.148 1.45 3.024 4.16z"})))},keywords:[Object(W.__)("video")]}),patterns:[/^https?:\/\/(www\.)?vimeo\.com\/.+/i]}],$t=[{name:"core-embed/animoto",settings:Dt({title:"Animoto",icon:qt}),patterns:[/^https?:\/\/(www\.)?(animoto|video214)\.com\/.+/i]},{name:"core-embed/cloudup",settings:Dt({title:"Cloudup",icon:Ft}),patterns:[/^https?:\/\/cloudup\.com\/.+/i]},{name:"core-embed/collegehumor",settings:Dt({title:"CollegeHumor",icon:qt}),patterns:[/^https?:\/\/(www\.)?collegehumor\.com\/.+/i]},{name:"core-embed/dailymotion",settings:Dt({title:"Dailymotion",icon:qt}),patterns:[/^https?:\/\/(www\.)?dailymotion\.com\/.+/i]},{name:"core-embed/funnyordie",settings:Dt({title:"Funny or Die",icon:qt}),patterns:[/^https?:\/\/(www\.)?funnyordie\.com\/.+/i]},{name:"core-embed/hulu",settings:Dt({title:"Hulu",icon:qt}),patterns:[/^https?:\/\/(www\.)?hulu\.com\/.+/i]},{name:"core-embed/imgur",settings:Dt({title:"Imgur",icon:Ut}),patterns:[/^https?:\/\/(.+\.)?imgur\.com\/.+/i]},{name:"core-embed/issuu",settings:Dt({title:"Issuu",icon:Ft}),patterns:[/^https?:\/\/(www\.)?issuu\.com\/.+/i]},{name:"core-embed/kickstarter",settings:Dt({title:"Kickstarter",icon:Ft}),patterns:[/^https?:\/\/(www\.)?kickstarter\.com\/.+/i,/^https?:\/\/kck\.st\/.+/i]},{name:"core-embed/meetup-com",settings:Dt({title:"Meetup.com",icon:Ft}),patterns:[/^https?:\/\/(www\.)?meetu(\.ps|p\.com)\/.+/i]},{name:"core-embed/mixcloud",settings:Dt({title:"Mixcloud",icon:Vt,keywords:[Object(W.__)("music"),Object(W.__)("audio")]}),patterns:[/^https?:\/\/(www\.)?mixcloud\.com\/.+/i]},{name:"core-embed/photobucket",settings:Dt({title:"Photobucket",icon:Ut}),patterns:[/^http:\/\/g?i*\.photobucket\.com\/.+/i]},{name:"core-embed/polldaddy",settings:Dt({title:"Polldaddy",icon:Ft}),patterns:[/^https?:\/\/(www\.)?polldaddy\.com\/.+/i]},{name:"core-embed/reddit",settings:Dt({title:"Reddit",icon:Object(F.createElement)("svg",{viewBox:"0 0 24 24"},Object(F.createElement)("path",{d:"M22 11.816c0-1.256-1.02-2.277-2.277-2.277-.593 0-1.122.24-1.526.613-1.48-.965-3.455-1.594-5.647-1.69l1.17-3.702 3.18.75c.01 1.027.847 1.86 1.877 1.86 1.035 0 1.877-.84 1.877-1.877 0-1.035-.842-1.877-1.877-1.877-.77 0-1.43.466-1.72 1.13L13.55 3.92c-.204-.047-.4.067-.46.26l-1.35 4.27c-2.317.037-4.412.67-5.97 1.67-.402-.355-.917-.58-1.493-.58C3.02 9.54 2 10.56 2 11.815c0 .814.433 1.523 1.078 1.925-.037.222-.06.445-.06.673 0 3.292 4.01 5.97 8.94 5.97s8.94-2.678 8.94-5.97c0-.214-.02-.424-.052-.632.687-.39 1.154-1.12 1.154-1.964zm-3.224-7.422c.606 0 1.1.493 1.1 1.1s-.493 1.1-1.1 1.1-1.1-.494-1.1-1.1.493-1.1 1.1-1.1zm-16 7.422c0-.827.673-1.5 1.5-1.5.313 0 .598.103.838.27-.85.675-1.477 1.478-1.812 2.36-.32-.274-.525-.676-.525-1.13zm9.183 7.79c-4.502 0-8.165-2.33-8.165-5.193S7.457 9.22 11.96 9.22s8.163 2.33 8.163 5.193-3.663 5.193-8.164 5.193zM20.635 13c-.326-.89-.948-1.7-1.797-2.383.247-.186.55-.3.882-.3.827 0 1.5.672 1.5 1.5 0 .482-.23.91-.586 1.184zm-11.64 1.704c-.76 0-1.397-.616-1.397-1.376 0-.76.636-1.397 1.396-1.397.76 0 1.376.638 1.376 1.398 0 .76-.616 1.376-1.376 1.376zm7.405-1.376c0 .76-.615 1.376-1.375 1.376s-1.4-.616-1.4-1.376c0-.76.64-1.397 1.4-1.397.76 0 1.376.638 1.376 1.398zm-1.17 3.38c.15.152.15.398 0 .55-.675.674-1.728 1.002-3.22 1.002l-.01-.002-.012.002c-1.492 0-2.544-.328-3.218-1.002-.152-.152-.152-.398 0-.55.152-.152.4-.15.55 0 .52.52 1.394.775 2.67.775l.01.002.01-.002c1.276 0 2.15-.253 2.67-.775.15-.152.398-.152.55 0z"}))}),patterns:[/^https?:\/\/(www\.)?reddit\.com\/.+/i]},{name:"core-embed/reverbnation",settings:Dt({title:"ReverbNation",icon:Vt}),patterns:[/^https?:\/\/(www\.)?reverbnation\.com\/.+/i]},{name:"core-embed/screencast",settings:Dt({title:"Screencast",icon:qt}),patterns:[/^https?:\/\/(www\.)?screencast\.com\/.+/i]},{name:"core-embed/scribd",settings:Dt({title:"Scribd",icon:Ft}),patterns:[/^https?:\/\/(www\.)?scribd\.com\/.+/i]},{name:"core-embed/slideshare",settings:Dt({title:"Slideshare",icon:Ft}),patterns:[/^https?:\/\/(.+?\.)?slideshare\.net\/.+/i]},{name:"core-embed/smugmug",settings:Dt({title:"SmugMug",icon:Ut}),patterns:[/^https?:\/\/(www\.)?smugmug\.com\/.+/i]},{name:"core-embed/speaker",settings:Dt({title:"Speaker",icon:Vt,supports:{inserter:!1}}),patterns:[]},{name:"core-embed/speaker-deck",settings:Dt({title:"Speaker Deck",icon:Ft,transform:[{type:"block",blocks:["core-embed/speaker"],transform:function(e){return Object(P.createBlock)("core-embed/speaker-deck",{content:e})}}]}),patterns:[/^https?:\/\/(www\.)?speakerdeck\.com\/.+/i]},{name:"core-embed/ted",settings:Dt({title:"TED",icon:qt}),patterns:[/^https?:\/\/(www\.|embed\.)?ted\.com\/.+/i]},{name:"core-embed/tumblr",settings:Dt({title:"Tumblr",icon:{foreground:"#35465c",src:Object(F.createElement)("svg",{viewBox:"0 0 24 24"},Object(F.createElement)("path",{d:"M19 3H5c-1.105 0-2 .895-2 2v14c0 1.105.895 2 2 2h14c1.105 0 2-.895 2-2V5c0-1.105-.895-2-2-2zm-5.57 14.265c-2.445.042-3.37-1.742-3.37-2.998V10.6H8.922V9.15c1.703-.615 2.113-2.15 2.21-3.026.006-.06.053-.084.08-.084h1.645V8.9h2.246v1.7H12.85v3.495c.008.476.182 1.13 1.08 1.107.3-.008.698-.094.907-.194l.54 1.6c-.205.297-1.12.642-1.946.657z"}))}}),patterns:[/^https?:\/\/(www\.)?tumblr\.com\/.+/i]},{name:"core-embed/videopress",settings:Dt({title:"VideoPress",icon:qt,keywords:[Object(W.__)("video")]}),patterns:[/^https?:\/\/videopress\.com\/.+/i]},{name:"core-embed/wordpress-tv",settings:Dt({title:"WordPress.tv",icon:qt}),patterns:[/^https?:\/\/wordpress\.tv\/.+/i]}];function Gt(e){return e?Object(W.__)("The download button is visible."):Object(W.__)("The download button is hidden.")}function Qt(e){var t=e.hrefs,n=e.openInNewWindow,r=e.showDownloadButton,o=e.changeLinkDestinationOption,a=e.changeOpenInNewWindow,c=e.changeShowDownloadButton,i=t.href,l=t.textLinkHref,s=t.attachmentPage,u=[{value:i,label:Object(W.__)("URL")}];return s&&(u=[{value:i,label:Object(W.__)("Media File")},{value:s,label:Object(W.__)("Attachment Page")}]),Object(F.createElement)(F.Fragment,null,Object(F.createElement)(K.InspectorControls,null,Object(F.createElement)(ee.PanelBody,{title:Object(W.__)("Text Link Settings")},Object(F.createElement)(ee.SelectControl,{label:Object(W.__)("Link To"),value:l,options:u,onChange:o}),Object(F.createElement)(ee.ToggleControl,{label:Object(W.__)("Open in New Window"),checked:n,onChange:a})),Object(F.createElement)(ee.PanelBody,{title:Object(W.__)("Download Button Settings")},Object(F.createElement)(ee.ToggleControl,{label:Object(W.__)("Show Download Button"),help:Gt,checked:r,onChange:c}))))}var Yt=function(e){function t(){var e;return Object(G.a)(this,t),(e=Object(Y.a)(this,Object(Z.a)(t).apply(this,arguments))).onSelectFile=e.onSelectFile.bind(Object(X.a)(Object(X.a)(e))),e.confirmCopyURL=e.confirmCopyURL.bind(Object(X.a)(Object(X.a)(e))),e.resetCopyConfirmation=e.resetCopyConfirmation.bind(Object(X.a)(Object(X.a)(e))),e.changeLinkDestinationOption=e.changeLinkDestinationOption.bind(Object(X.a)(Object(X.a)(e))),e.changeOpenInNewWindow=e.changeOpenInNewWindow.bind(Object(X.a)(Object(X.a)(e))),e.changeShowDownloadButton=e.changeShowDownloadButton.bind(Object(X.a)(Object(X.a)(e))),e.state={hasError:!1,showCopyConfirmation:!1},e}return Object(J.a)(t,e),Object(Q.a)(t,[{key:"componentDidMount",value:function(){var e=this,t=this.props,n=t.attributes,r=t.noticeOperations,o=n.href;if(this.isBlobURL(o)){var a=Object(ue.getBlobByURL)(o);Object(K.mediaUpload)({filesList:[a],onFileChange:function(t){var n=Object(be.a)(t,1)[0];return e.onSelectFile(n)},onError:function(t){e.setState({hasError:!0}),r.createErrorNotice(t)}}),Object(ue.revokeBlobURL)(o)}}},{key:"componentDidUpdate",value:function(e){e.isSelected&&!this.props.isSelected&&this.setState({showCopyConfirmation:!1})}},{key:"onSelectFile",value:function(e){e&&e.url&&(this.setState({hasError:!1}),this.props.setAttributes({href:e.url,fileName:Object(de.create)({text:e.title}),textLinkHref:e.url,id:e.id}))}},{key:"isBlobURL",value:function(){return 0===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").indexOf("blob:")}},{key:"confirmCopyURL",value:function(){this.setState({showCopyConfirmation:!0})}},{key:"resetCopyConfirmation",value:function(){this.setState({showCopyConfirmation:!1})}},{key:"changeLinkDestinationOption",value:function(e){this.props.setAttributes({textLinkHref:e})}},{key:"changeOpenInNewWindow",value:function(e){this.props.setAttributes({textLinkTarget:!!e&&"_blank"})}},{key:"changeShowDownloadButton",value:function(e){this.props.setAttributes({showDownloadButton:e})}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.isSelected,r=e.attributes,o=e.setAttributes,a=e.noticeUI,c=e.noticeOperations,i=e.media,l=r.fileName,s=r.href,u=r.textLinkHref,b=r.textLinkTarget,m=r.showDownloadButton,h=r.downloadButtonText,p=r.id,d=this.state,g=d.hasError,O=d.showCopyConfirmation,f=i&&i.link;if(!s||g)return Object(F.createElement)(K.MediaPlaceholder,{icon:"media-default",labels:{title:Object(W.__)("File"),name:Object(W.__)("a file")},onSelect:this.onSelectFile,notices:a,onError:c.createErrorNotice,accept:"*"});var j=U()(t,{"is-transient":this.isBlobURL(s)});return Object(F.createElement)(F.Fragment,null,Object(F.createElement)(Qt,Object($.a)({hrefs:{href:s,textLinkHref:u,attachmentPage:f}},{openInNewWindow:!!b,showDownloadButton:m,changeLinkDestinationOption:this.changeLinkDestinationOption,changeOpenInNewWindow:this.changeOpenInNewWindow,changeShowDownloadButton:this.changeShowDownloadButton})),Object(F.createElement)(K.BlockControls,null,Object(F.createElement)(ee.Toolbar,null,Object(F.createElement)(K.MediaUpload,{onSelect:this.onSelectFile,value:p,render:function(e){var t=e.open;return Object(F.createElement)(ee.IconButton,{className:"components-toolbar__control",label:Object(W.__)("Edit file"),onClick:t,icon:"edit"})}}))),Object(F.createElement)("div",{className:j},Object(F.createElement)("div",{className:"".concat(t,"__content-wrapper")},Object(F.createElement)(K.RichText,{wrapperClassName:"".concat(t,"__textlink"),tagName:"div",value:l,placeholder:Object(W.__)("Write file name…"),keepPlaceholderOnFocus:!0,formattingControls:[],onChange:function(e){return o({fileName:e})}}),m&&Object(F.createElement)("div",{className:"".concat(t,"__button-richtext-wrapper")},Object(F.createElement)(K.RichText,{tagName:"div",className:"".concat(t,"__button"),value:h,formattingControls:[],placeholder:Object(W.__)("Add text…"),keepPlaceholderOnFocus:!0,onChange:function(e){return o({downloadButtonText:e})}}))),n&&Object(F.createElement)(ee.ClipboardButton,{isDefault:!0,text:s,className:"".concat(t,"__copy-url-button"),onCopy:this.confirmCopyURL,onFinishCopy:this.resetCopyConfirmation},O?Object(W.__)("Copied!"):Object(W.__)("Copy URL"))))}}]),t}(F.Component),Zt=Object(te.compose)([Object(he.withSelect)(function(e,t){var n=e("core").getMedia,r=t.attributes.id;return{media:void 0===r?void 0:n(r)}}),ee.withNotices])(Yt),Jt="core/file",Xt={title:Object(W.__)("File"),description:Object(W.__)("Add a link to a file that visitors can download."),icon:Object(F.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(F.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(F.createElement)("path",{d:"M9 6l2 2h9v10H4V6h5m1-2H4L2 6v12l2 2h16l2-2V8l-2-2h-8l-2-2z"})),category:"common",keywords:[Object(W.__)("document"),Object(W.__)("pdf")],attributes:{id:{type:"number"},href:{type:"string"},fileName:{source:"html",selector:"a:not([download])"},textLinkHref:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"href"},textLinkTarget:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"target"},showDownloadButton:{type:"boolean",default:!0},downloadButtonText:{source:"html",selector:"a[download]",default:Object(W.__)("Download")}},supports:{align:!0},transforms:{from:[{type:"files",isMatch:function(e){return 1===e.length},priority:15,transform:function(e){var t=e[0],n=Object(ue.createBlobURL)(t);return Object(P.createBlock)("core/file",{href:n,fileName:t.name,textLinkHref:n})}},{type:"block",blocks:["core/audio"],transform:function(e){return Object(P.createBlock)("core/file",{href:e.src,fileName:e.caption,textLinkHref:e.src,id:e.id})}},{type:"block",blocks:["core/video"],transform:function(e){return Object(P.createBlock)("core/file",{href:e.src,fileName:e.caption,textLinkHref:e.src,id:e.id})}},{type:"block",blocks:["core/image"],transform:function(e){return Object(P.createBlock)("core/file",{href:e.url,fileName:e.caption,textLinkHref:e.url,id:e.id})}}],to:[{type:"block",blocks:["core/audio"],isMatch:function(e){var t=e.id;if(!t)return!1;var n=(0,Object(he.select)("core").getMedia)(t);return!!n&&Object(q.includes)(n.mime_type,"audio")},transform:function(e){return Object(P.createBlock)("core/audio",{src:e.href,caption:e.fileName,id:e.id})}},{type:"block",blocks:["core/video"],isMatch:function(e){var t=e.id;if(!t)return!1;var n=(0,Object(he.select)("core").getMedia)(t);return!!n&&Object(q.includes)(n.mime_type,"video")},transform:function(e){return Object(P.createBlock)("core/video",{src:e.href,caption:e.fileName,id:e.id})}},{type:"block",blocks:["core/image"],isMatch:function(e){var t=e.id;if(!t)return!1;var n=(0,Object(he.select)("core").getMedia)(t);return!!n&&Object(q.includes)(n.mime_type,"image")},transform:function(e){return Object(P.createBlock)("core/image",{url:e.href,caption:e.fileName,id:e.id})}}]},edit:Zt,save:function(e){var t=e.attributes,n=t.href,r=t.fileName,o=t.textLinkHref,a=t.textLinkTarget,c=t.showDownloadButton,i=t.downloadButtonText;return n&&Object(F.createElement)("div",null,!K.RichText.isEmpty(r)&&Object(F.createElement)("a",{href:o,target:a,rel:!!a&&"noreferrer noopener"},Object(F.createElement)(K.RichText.Content,{value:r})),c&&Object(F.createElement)("a",{href:n,className:"wp-block-file__button",download:Object(de.getTextContent)(Object(de.create)({html:r}))},Object(F.createElement)(K.RichText.Content,{value:i})))}},en="core/html",tn={title:Object(W.__)("Custom HTML"),description:Object(W.__)("Add your own HTML (and view it right here as you edit!)."),icon:Object(F.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(F.createElement)("path",{d:"M4.5,11h-2V9H1v6h1.5v-2.5h2V15H6V9H4.5V11z M7,10.5h1.5V15H10v-4.5h1.5V9H7V10.5z M14.5,10l-1-1H12v6h1.5v-3.9 l1,1l1-1V15H17V9h-1.5L14.5,10z M19.5,13.5V9H18v6h5v-1.5H19.5z"})),category:"formatting",keywords:[Object(W.__)("embed")],supports:{customClassName:!1,className:!1,html:!1},attributes:{content:{type:"string",source:"html"}},transforms:{from:[{type:"raw",isMatch:function(e){return"FIGURE"===e.nodeName&&!!e.querySelector("iframe")},schema:{figure:{require:["iframe"],children:{iframe:{attributes:["src","allowfullscreen","height","width"]},figcaption:{children:Object(P.getPhrasingContentSchema)()}}}}}]},edit:Object(te.withState)({isPreview:!1})(function(e){var t=e.attributes,n=e.setAttributes,r=e.setState,o=e.isPreview;return Object(F.createElement)("div",{className:"wp-block-html"},Object(F.createElement)(K.BlockControls,null,Object(F.createElement)("div",{className:"components-toolbar"},Object(F.createElement)("button",{className:"components-tab-button ".concat(o?"":"is-active"),onClick:function(){return r({isPreview:!1})}},Object(F.createElement)("span",null,"HTML")),Object(F.createElement)("button",{className:"components-tab-button ".concat(o?"is-active":""),onClick:function(){return r({isPreview:!0})}},Object(F.createElement)("span",null,Object(W.__)("Preview"))))),Object(F.createElement)(ee.Disabled.Consumer,null,function(e){return o||e?Object(F.createElement)(ee.SandBox,{html:t.content}):Object(F.createElement)(K.PlainText,{value:t.content,onChange:function(e){return n({content:e})},placeholder:Object(W.__)("Write HTML…"),"aria-label":Object(W.__)("HTML")})}))}),save:function(e){var t=e.attributes;return Object(F.createElement)(F.RawHTML,null,t.content)}},nn=function(e){function t(){var e;return Object(G.a)(this,t),(e=Object(Y.a)(this,Object(Z.a)(t).apply(this,arguments))).setAlignment=e.setAlignment.bind(Object(X.a)(Object(X.a)(e))),e.setCommentsToShow=e.setCommentsToShow.bind(Object(X.a)(Object(X.a)(e))),e.toggleDisplayAvatar=e.createToggleAttribute("displayAvatar"),e.toggleDisplayDate=e.createToggleAttribute("displayDate"),e.toggleDisplayExcerpt=e.createToggleAttribute("displayExcerpt"),e}return Object(J.a)(t,e),Object(Q.a)(t,[{key:"createToggleAttribute",value:function(e){var t=this;return function(){var n=t.props.attributes[e];(0,t.props.setAttributes)(Object(D.a)({},e,!n))}}},{key:"setAlignment",value:function(e){this.props.setAttributes({align:e})}},{key:"setCommentsToShow",value:function(e){this.props.setAttributes({commentsToShow:e})}},{key:"render",value:function(){var e=this.props.attributes,t=e.align,n=e.commentsToShow,r=e.displayAvatar,o=e.displayDate,a=e.displayExcerpt;return Object(F.createElement)(F.Fragment,null,Object(F.createElement)(K.BlockControls,null,Object(F.createElement)(K.BlockAlignmentToolbar,{value:t,onChange:this.setAlignment})),Object(F.createElement)(K.InspectorControls,null,Object(F.createElement)(ee.PanelBody,{title:Object(W.__)("Latest Comments Settings")},Object(F.createElement)(ee.ToggleControl,{label:Object(W.__)("Display Avatar"),checked:r,onChange:this.toggleDisplayAvatar}),Object(F.createElement)(ee.ToggleControl,{label:Object(W.__)("Display Date"),checked:o,onChange:this.toggleDisplayDate}),Object(F.createElement)(ee.ToggleControl,{label:Object(W.__)("Display Excerpt"),checked:a,onChange:this.toggleDisplayExcerpt}),Object(F.createElement)(ee.RangeControl,{label:Object(W.__)("Number of Comments"),value:n,onChange:this.setCommentsToShow,min:1,max:100}))),Object(F.createElement)(ee.Disabled,null,Object(F.createElement)(K.ServerSideRender,{block:"core/latest-comments",attributes:this.props.attributes})))}}]),t}(F.Component),rn="core/latest-comments",on={title:Object(W.__)("Latest Comments"),description:Object(W.__)("Show a list of your sites most recent comments."),icon:Object(F.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(F.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(F.createElement)("g",null,Object(F.createElement)("path",{d:"M22 4l-2-2H4L2 4v12l2 2h14l4 4V4zm-2 0v13l-1-1H4V4h16z"}),Object(F.createElement)("path",{d:"M6 12h12v2H6zM6 9h12v2H6zM6 6h12v2H6z"}))),category:"widgets",keywords:[Object(W.__)("recent comments")],supports:{html:!1},getEditWrapperProps:function(e){var t=e.align;if(["left","center","right","wide","full"].includes(t))return{"data-align":t}},edit:nn,save:function(){return null}},an=n(28),cn=n.n(an),ln=n(42),sn=function(e){function t(){var e;return Object(G.a)(this,t),(e=Object(Y.a)(this,Object(Z.a)(t).apply(this,arguments))).toggleDisplayPostDate=e.toggleDisplayPostDate.bind(Object(X.a)(Object(X.a)(e))),e}return Object(J.a)(t,e),Object(Q.a)(t,[{key:"toggleDisplayPostDate",value:function(){var e=this.props.attributes.displayPostDate;(0,this.props.setAttributes)({displayPostDate:!e})}},{key:"render",value:function(){var e=this,t=this.props,n=t.attributes,r=t.categoriesList,o=t.setAttributes,a=t.latestPosts,c=n.displayPostDate,i=n.align,l=n.postLayout,s=n.columns,u=n.order,b=n.orderBy,m=n.categories,h=n.postsToShow,p=Object(F.createElement)(K.InspectorControls,null,Object(F.createElement)(ee.PanelBody,{title:Object(W.__)("Latest Posts Settings")},Object(F.createElement)(ee.QueryControls,Object($.a)({order:u,orderBy:b},{numberOfItems:h,categoriesList:r,selectedCategoryId:m,onOrderChange:function(e){return o({order:e})},onOrderByChange:function(e){return o({orderBy:e})},onCategoryChange:function(e){return o({categories:""!==e?e:void 0})},onNumberOfItemsChange:function(e){return o({postsToShow:e})}})),Object(F.createElement)(ee.ToggleControl,{label:Object(W.__)("Display post date"),checked:c,onChange:this.toggleDisplayPostDate}),"grid"===l&&Object(F.createElement)(ee.RangeControl,{label:Object(W.__)("Columns"),value:s,onChange:function(e){return o({columns:e})},min:2,max:d?Math.min(6,a.length):6}))),d=Array.isArray(a)&&a.length;if(!d)return Object(F.createElement)(F.Fragment,null,p,Object(F.createElement)(ee.Placeholder,{icon:"admin-post",label:Object(W.__)("Latest Posts")},Array.isArray(a)?Object(W.__)("No posts found."):Object(F.createElement)(ee.Spinner,null)));var g=a.length>h?a.slice(0,h):a,O=[{icon:"list-view",title:Object(W.__)("List View"),onClick:function(){return o({postLayout:"list"})},isActive:"list"===l},{icon:"grid-view",title:Object(W.__)("Grid View"),onClick:function(){return o({postLayout:"grid"})},isActive:"grid"===l}];return Object(F.createElement)(F.Fragment,null,p,Object(F.createElement)(K.BlockControls,null,Object(F.createElement)(K.BlockAlignmentToolbar,{value:i,onChange:function(e){o({align:e})},controls:["center","wide","full"]}),Object(F.createElement)(ee.Toolbar,{controls:O})),Object(F.createElement)("ul",{className:U()(this.props.className,Object(D.a)({"is-grid":"grid"===l},"columns-".concat(s),"grid"===l))},g.map(function(t,n){return Object(F.createElement)("li",{key:n},Object(F.createElement)("a",{href:t.link,target:"_blank"},Object(ln.decodeEntities)(t.title.rendered.trim())||Object(W.__)("(Untitled)")),c&&t.date_gmt&&Object(F.createElement)("time",{dateTime:cn()(t.date_gmt).utc().format(),className:"".concat(e.props.className,"__post-date")},cn()(t.date_gmt).local().format("MMMM DD, Y")))})))}}]),t}(F.Component),un=Object(he.withSelect)(function(e,t){var n=t.attributes,r=n.postsToShow,o=n.order,a=n.orderBy,c=n.categories,i=e("core").getEntityRecords;return{latestPosts:i("postType","post",Object(q.pickBy)({categories:c,order:o,orderby:a,per_page:r},function(e){return!Object(q.isUndefined)(e)})),categoriesList:i("taxonomy","category",{per_page:100})}})(sn),bn="core/latest-posts",mn={title:Object(W.__)("Latest Posts"),description:Object(W.__)("Display a list of your most recent posts."),icon:Object(F.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(F.createElement)("path",{d:"M0,0h24v24H0V0z",fill:"none"}),Object(F.createElement)("rect",{x:"11",y:"7",width:"6",height:"2"}),Object(F.createElement)("rect",{x:"11",y:"11",width:"6",height:"2"}),Object(F.createElement)("rect",{x:"11",y:"15",width:"6",height:"2"}),Object(F.createElement)("rect",{x:"7",y:"7",width:"2",height:"2"}),Object(F.createElement)("rect",{x:"7",y:"11",width:"2",height:"2"}),Object(F.createElement)("rect",{x:"7",y:"15",width:"2",height:"2"}),Object(F.createElement)("path",{d:"M20.1,3H3.9C3.4,3,3,3.4,3,3.9v16.2C3,20.5,3.4,21,3.9,21h16.2c0.4,0,0.9-0.5,0.9-0.9V3.9C21,3.4,20.5,3,20.1,3z M19,19H5V5h14V19z"})),category:"widgets",keywords:[Object(W.__)("recent posts")],supports:{html:!1},getEditWrapperProps:function(e){var t=e.align;if("left"===t||"right"===t||"wide"===t||"full"===t)return{"data-align":t}},edit:un,save:function(){return null}},hn=Object(H.a)({},Object(P.getPhrasingContentSchema)(),{ul:{},ol:{attributes:["type"]}});["ul","ol"].forEach(function(e){hn[e].children={li:{children:hn}}});var pn={className:!1},dn={ordered:{type:"boolean",default:!1},values:{source:"html",selector:"ol,ul",multiline:"li"}},gn="core/list",On={title:Object(W.__)("List"),description:Object(W.__)("Numbers, bullets, up to you. Add a list of items."),icon:Object(F.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(F.createElement)("g",null,Object(F.createElement)("path",{d:"M9 19h12v-2H9v2zm0-6h12v-2H9v2zm0-8v2h12V5H9zm-4-.5c-.828 0-1.5.672-1.5 1.5S4.172 7.5 5 7.5 6.5 6.828 6.5 6 5.828 4.5 5 4.5zm0 6c-.828 0-1.5.672-1.5 1.5s.672 1.5 1.5 1.5 1.5-.672 1.5-1.5-.672-1.5-1.5-1.5zm0 6c-.828 0-1.5.672-1.5 1.5s.672 1.5 1.5 1.5 1.5-.672 1.5-1.5-.672-1.5-1.5-1.5z"}))),category:"common",keywords:[Object(W.__)("bullet list"),Object(W.__)("ordered list"),Object(W.__)("numbered list")],attributes:dn,supports:pn,transforms:{from:[{type:"block",isMultiBlock:!0,blocks:["core/paragraph"],transform:function(e){return Object(P.createBlock)("core/list",{values:Object(de.toHTMLString)(Object(de.join)(e.map(function(e){var t=e.content;return Object(de.replace)(Object(de.create)({html:t}),/\n/g,"\u2028")}),"\u2028"),"li")})}},{type:"block",blocks:["core/quote"],transform:function(e){var t=e.value;return Object(P.createBlock)("core/list",{values:t})}},{type:"raw",selector:"ol,ul",schema:{ol:hn.ol,ul:hn.ul},transform:function(e){return Object(P.createBlock)("core/list",Object(H.a)({},Object(P.getBlockAttributes)(Object(P.getBlockType)("core/list"),e.outerHTML),{ordered:"OL"===e.nodeName}))}},{type:"pattern",regExp:/^[*-]\s/,transform:function(e){var t=e.content;return Object(P.createBlock)("core/list",{values:t})}},{type:"pattern",regExp:/^1[.)]\s/,transform:function(e){var t=e.content;return Object(P.createBlock)("core/list",{ordered:!0,values:t})}}],to:[{type:"block",blocks:["core/paragraph"],transform:function(e){var t=e.values;return Object(de.split)(Object(de.create)({html:t,multilineTag:"li"}),"\u2028").map(function(e){return Object(P.createBlock)("core/paragraph",{content:Object(de.toHTMLString)(e)})})}},{type:"block",blocks:["core/quote"],transform:function(e){var t=e.values;return Object(P.createBlock)("core/quote",{value:t})}}]},deprecated:[{supports:pn,attributes:Object(H.a)({},Object(q.omit)(dn,["ordered"]),{nodeName:{type:"string",source:"property",selector:"ol,ul",property:"nodeName",default:"UL"}}),migrate:function(e){var t=e.nodeName,n=Object(xe.a)(e,["nodeName"]);return Object(H.a)({},n,{ordered:"OL"===t})},save:function(e){var t=e.attributes,n=t.nodeName,r=t.values;return Object(F.createElement)(K.RichText.Content,{tagName:n.toLowerCase(),value:r})}}],merge:function(e,t){var n=t.values;return n&&"<li></li>"!==n?Object(H.a)({},e,{values:e.values+n}):e},edit:function(e){function t(){var e;return Object(G.a)(this,t),(e=Object(Y.a)(this,Object(Z.a)(t).apply(this,arguments))).setupEditor=e.setupEditor.bind(Object(X.a)(Object(X.a)(e))),e.getEditorSettings=e.getEditorSettings.bind(Object(X.a)(Object(X.a)(e))),e.setNextValues=e.setNextValues.bind(Object(X.a)(Object(X.a)(e))),e.state={internalListType:null},e}return Object(J.a)(t,e),Object(Q.a)(t,[{key:"findInternalListType",value:function(e){var t=e.parents,n=Object(q.find)(t,function(e){return"UL"===e.nodeName||"OL"===e.nodeName});return n?n.nodeName:null}},{key:"setupEditor",value:function(e){var t=this;e.on("nodeChange",function(e){t.setState({internalListType:t.findInternalListType(e)})});var n=window.navigator.browserLanguage||window.navigator.language;!/^(?:fr|nl|sv|ru|de|es|it)/.test(n)?(e.shortcuts.add("meta+219","Decrease indent","Outdent"),e.shortcuts.add("meta+221","Increase indent","Indent")):(e.shortcuts.add("meta+shift+m","Decrease indent","Outdent"),e.shortcuts.add("meta+m","Increase indent","Indent")),this.editor=e}},{key:"createSetListType",value:function(e,t){var n=this;return function(){var r=n.props.setAttributes,o=n.state.internalListType;o?o!==e&&n.editor&&n.editor.execCommand(t):r({ordered:"OL"===e})}}},{key:"createExecCommand",value:function(e){var t=this;return function(){t.editor&&t.editor.execCommand(e)}}},{key:"getEditorSettings",value:function(e){return Object(H.a)({},e,{plugins:(e.plugins||[]).concat("lists"),lists_indent_on_tab:!1})}},{key:"setNextValues",value:function(e){this.props.setAttributes({values:e})}},{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.insertBlocksAfter,r=e.setAttributes,o=e.mergeBlocks,a=e.onReplace,c=e.className,i=t.ordered,l=t.values,s=i?"ol":"ul";return Object(F.createElement)(F.Fragment,null,Object(F.createElement)(K.BlockControls,{controls:[{icon:"editor-ul",title:Object(W.__)("Convert to unordered list"),isActive:!i,onClick:this.createSetListType("UL","InsertUnorderedList")},{icon:"editor-ol",title:Object(W.__)("Convert to ordered list"),isActive:i,onClick:this.createSetListType("OL","InsertOrderedList")},{icon:"editor-outdent",title:Object(W.__)("Outdent list item"),onClick:this.createExecCommand("Outdent")},{icon:"editor-indent",title:Object(W.__)("Indent list item"),onClick:this.createExecCommand("Indent")}]}),Object(F.createElement)(K.RichText,{multiline:"li",tagName:s,unstableGetSettings:this.getEditorSettings,unstableOnSetup:this.setupEditor,onChange:this.setNextValues,value:l,wrapperClassName:"block-library-list",className:c,placeholder:Object(W.__)("Write list…"),onMerge:o,onSplit:n?function(e,t){for(var o=arguments.length,a=new Array(o>2?o-2:0),c=2;c<o;c++)a[c-2]=arguments[c];a.length||a.push(Object(P.createBlock)("core/paragraph")),"<li></li>"!==t&&a.push(Object(P.createBlock)("core/list",{ordered:i,values:t})),r({values:e}),n(a)}:void 0,onRemove:function(){return a([])}}))}}]),t}(F.Component),save:function(e){var t=e.attributes,n=t.ordered,r=t.values,o=n?"ol":"ul";return Object(F.createElement)(K.RichText.Content,{tagName:o,value:r,multiline:"li"})}},fn=function(e){function t(){var e;return Object(G.a)(this,t),(e=Object(Y.a)(this,Object(Z.a)(t).apply(this,arguments))).onChangeInput=e.onChangeInput.bind(Object(X.a)(Object(X.a)(e))),e.onKeyDown=e.onKeyDown.bind(Object(X.a)(Object(X.a)(e))),e.state={defaultText:Object(W.__)("Read more")},e}return Object(J.a)(t,e),Object(Q.a)(t,[{key:"onChangeInput",value:function(e){this.setState({defaultText:""});var t=0===e.target.value.length?void 0:e.target.value;this.props.setAttributes({customText:t})}},{key:"onKeyDown",value:function(e){var t=e.keyCode,n=this.props.insertBlocksAfter;t===Me.ENTER&&n([Object(P.createBlock)(Object(P.getDefaultBlockName)())])}},{key:"render",value:function(){var e=this.props.attributes,t=e.customText,n=e.noTeaser,r=this.props.setAttributes,o=this.state.defaultText,a=void 0!==t?t:o,c=a.length+1;return Object(F.createElement)(F.Fragment,null,Object(F.createElement)(K.InspectorControls,null,Object(F.createElement)(ee.PanelBody,null,Object(F.createElement)(ee.ToggleControl,{label:Object(W.__)('Hide the teaser before the "More" tag'),checked:!!n,onChange:function(){return r({noTeaser:!n})}}))),Object(F.createElement)("div",{className:"wp-block-more"},Object(F.createElement)("input",{type:"text",value:a,size:c,onChange:this.onChangeInput,onKeyDown:this.onKeyDown})))}}]),t}(F.Component),jn="core/more",vn={title:Object(W._x)("More","block name"),description:Object(W.__)('Want to show only part of this post on your blogs home page? Insert a "More" block where you want the split.'),icon:Object(F.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(F.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(F.createElement)("g",null,Object(F.createElement)("path",{d:"M2 9v2h19V9H2zm0 6h5v-2H2v2zm7 0h5v-2H9v2zm7 0h5v-2h-5v2z"}))),category:"layout",supports:{customClassName:!1,className:!1,html:!1,multiple:!1},attributes:{customText:{type:"string"},noTeaser:{type:"boolean",default:!1}},transforms:{from:[{type:"raw",schema:{"wp-block":{attributes:["data-block"]}},isMatch:function(e){return e.dataset&&"core/more"===e.dataset.block},transform:function(e){var t=e.dataset,n=t.customText,r=t.noTeaser,o={};return n&&(o.customText=n),""===r&&(o.noTeaser=!0),Object(P.createBlock)("core/more",o)}}]},edit:fn,save:function(e){var t=e.attributes,n=t.customText,r=t.noTeaser,o=n?"\x3c!--more ".concat(n,"--\x3e"):"\x3c!--more--\x3e",a=r?"\x3c!--noteaser--\x3e":"";return Object(F.createElement)(F.RawHTML,null,Object(q.compact)([o,a]).join("\n"))}},yn="core/nextpage",wn={title:Object(W.__)("Page break"),description:Object(W.__)("This block allows you to set break points on your post. Visitors of your blog are then presented with content split into multiple pages."),icon:Object(F.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(F.createElement)("g",null,Object(F.createElement)("path",{d:"M9 12h6v-2H9zm-7 0h5v-2H2zm15 0h5v-2h-5zm3 2v2l-6 6H6a2 2 0 0 1-2-2v-6h2v6h6v-4a2 2 0 0 1 2-2h6zM4 8V4a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v4h-2V4H6v4z"}))),category:"layout",keywords:[Object(W.__)("next page"),Object(W.__)("pagination")],supports:{customClassName:!1,className:!1,html:!1},attributes:{},transforms:{from:[{type:"raw",schema:{"wp-block":{attributes:["data-block"]}},isMatch:function(e){return e.dataset&&"core/nextpage"===e.dataset.block},transform:function(){return Object(P.createBlock)("core/nextpage",{})}}]},edit:function(){return Object(F.createElement)("div",{className:"wp-block-nextpage"},Object(F.createElement)("span",null,Object(W.__)("Page break")))},save:function(){return Object(F.createElement)(F.RawHTML,null,"\x3c!--nextpage--\x3e")}},Cn="core/preformatted",kn={title:Object(W.__)("Preformatted"),description:Object(W.__)("Add text that respects your spacing and tabs, and also allows styling."),icon:Object(F.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(F.createElement)("path",{d:"M0,0h24v24H0V0z",fill:"none"}),Object(F.createElement)("path",{d:"M20,4H4C2.9,4,2,4.9,2,6v12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V6C22,4.9,21.1,4,20,4z M20,18H4V6h16V18z"}),Object(F.createElement)("rect",{x:"6",y:"10",width:"2",height:"2"}),Object(F.createElement)("rect",{x:"6",y:"14",width:"8",height:"2"}),Object(F.createElement)("rect",{x:"16",y:"14",width:"2",height:"2"}),Object(F.createElement)("rect",{x:"10",y:"10",width:"8",height:"2"})),category:"formatting",attributes:{content:{source:"html",selector:"pre"}},transforms:{from:[{type:"block",blocks:["core/code","core/paragraph"],transform:function(e){var t=e.content;return Object(P.createBlock)("core/preformatted",{content:t})}},{type:"raw",isMatch:function(e){return"PRE"===e.nodeName&&!(1===e.children.length&&"CODE"===e.firstChild.nodeName)},schema:{pre:{children:Object(P.getPhrasingContentSchema)()}}}],to:[{type:"block",blocks:["core/paragraph"],transform:function(e){return Object(P.createBlock)("core/paragraph",e)}}]},edit:function(e){var t=e.attributes,n=e.mergeBlocks,r=e.setAttributes,o=e.className,a=t.content;return Object(F.createElement)(K.RichText,{tagName:"pre",value:a,onChange:function(e){r({content:e})},placeholder:Object(W.__)("Write preformatted text…"),wrapperClassName:o,onMerge:n})},save:function(e){var t=e.attributes.content;return Object(F.createElement)(K.RichText.Content,{tagName:"pre",value:t})},merge:function(e,t){return{content:e.content+t.content}}},En="is-style-".concat("solid-color"),_n=function(e){function t(e){var n;return Object(G.a)(this,t),(n=Object(Y.a)(this,Object(Z.a)(t).call(this,e))).wasTextColorAutomaticallyComputed=!1,n.pullQuoteMainColorSetter=n.pullQuoteMainColorSetter.bind(Object(X.a)(Object(X.a)(n))),n.pullQuoteTextColorSetter=n.pullQuoteTextColorSetter.bind(Object(X.a)(Object(X.a)(n))),n}return Object(J.a)(t,e),Object(Q.a)(t,[{key:"pullQuoteMainColorSetter",value:function(e){var t=this.props,n=t.colorUtils,r=t.textColor,o=t.setTextColor;(0,t.setMainColor)(e),r.color&&!this.wasTextColorAutomaticallyComputed||(this.wasTextColorAutomaticallyComputed=!0,o(n.getMostReadableColor(e)))}},{key:"pullQuoteTextColorSetter",value:function(e){(0,this.props.setTextColor)(e),this.wasTextColorAutomaticallyComputed=!1}},{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.mainColor,r=e.textColor,o=e.setAttributes,a=e.isSelected,c=e.className,i=t.value,l=t.citation,s=Object(q.includes)(c,En),u=s?{backgroundColor:n.color}:{borderColor:n.color},b={color:r.color},m=r.color?U()("has-text-color",Object(D.a)({},r.class,r.class)):void 0;return Object(F.createElement)(F.Fragment,null,Object(F.createElement)("figure",{style:u,className:U()(c,Object(D.a)({},n.class,s&&n.class))},Object(F.createElement)("blockquote",{style:b,className:m},Object(F.createElement)(K.RichText,{multiline:"p",value:i,onChange:function(e){return o({value:e})},placeholder:Object(W.__)("Write quote…"),wrapperClassName:"block-library-pullquote__content"}),(!K.RichText.isEmpty(l)||a)&&Object(F.createElement)(K.RichText,{value:l,placeholder:Object(W.__)("Write citation…"),onChange:function(e){return o({citation:e})},className:"wp-block-pullquote__citation"}))),Object(F.createElement)(K.InspectorControls,null,Object(F.createElement)(K.PanelColorSettings,{title:Object(W.__)("Color Settings"),colorSettings:[{value:n.color,onChange:this.pullQuoteMainColorSetter,label:Object(W.__)("Main Color")},{value:r.color,onChange:this.pullQuoteTextColorSetter,label:Object(W.__)("Text Color")}]},s&&Object(F.createElement)(K.ContrastChecker,Object($.a)({textColor:r.color,backgroundColor:n.color},{isLargeText:!1})))))}}]),t}(F.Component),xn=Object(K.withColors)({mainColor:"background-color",textColor:"color"})(_n),Sn={value:{source:"html",selector:"blockquote",multiline:"p"},citation:{source:"html",selector:"cite"},mainColor:{type:"string"},customMainColor:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"}},Nn="core/pullquote",Tn={title:Object(W.__)("Pullquote"),description:Object(W.__)("Highlight a quote from your post or page by displaying it as a graphic element."),icon:Object(F.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(F.createElement)("path",{d:"M0,0h24v24H0V0z",fill:"none"}),Object(F.createElement)("polygon",{points:"21 18 2 18 2 20 21 20"}),Object(F.createElement)("path",{d:"m19 10v4h-15v-4h15m1-2h-17c-0.55 0-1 0.45-1 1v6c0 0.55 0.45 1 1 1h17c0.55 0 1-0.45 1-1v-6c0-0.55-0.45-1-1-1z"}),Object(F.createElement)("polygon",{points:"21 4 2 4 2 6 21 6"})),category:"formatting",attributes:Sn,styles:[{name:"default",label:Object(W.__)("Regular"),isDefault:!0},{name:"solid-color",label:Object(W.__)("Solid Color")}],supports:{align:["left","right","wide","full"]},edit:xn,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(q.includes)(u,En))(t=Object(K.getColorClassName)("background-color",o))||(n={backgroundColor:a});else if(a)n={borderColor:a};else if(o){var b=Object(q.get)(Object(he.select)("core/editor").getEditorSettings(),["colors"],[]);n={borderColor:Object(K.getColorObjectByAttributeValues)(b,o).color}}var m=Object(K.getColorClassName)("color",c),h=c||i?U()("has-text-color",Object(D.a)({},m,m)):void 0,p=m?void 0:{color:i};return Object(F.createElement)("figure",{className:t,style:n},Object(F.createElement)("blockquote",{className:h,style:p},Object(F.createElement)(K.RichText.Content,{value:l,multiline:"p"}),!K.RichText.isEmpty(s)&&Object(F.createElement)(K.RichText.Content,{tagName:"cite",value:s})))},deprecated:[{attributes:Object(H.a)({},Sn),save:function(e){var t=e.attributes,n=t.value,r=t.citation;return Object(F.createElement)("blockquote",null,Object(F.createElement)(K.RichText.Content,{value:n,multiline:"p"}),!K.RichText.isEmpty(r)&&Object(F.createElement)(K.RichText.Content,{tagName:"cite",value:r}))}},{attributes:Object(H.a)({},Sn,{citation:{source:"html",selector:"footer"},align:{type:"string",default:"none"}}),save:function(e){var t=e.attributes,n=t.value,r=t.citation,o=t.align;return Object(F.createElement)("blockquote",{className:"align".concat(o)},Object(F.createElement)(K.RichText.Content,{value:n}),!K.RichText.isEmpty(r)&&Object(F.createElement)(K.RichText.Content,{tagName:"footer",value:r}))}}]},Bn=function(e){function t(){var e;return Object(G.a)(this,t),(e=Object(Y.a)(this,Object(Z.a)(t).apply(this,arguments))).titleField=Object(F.createRef)(),e.editButton=Object(F.createRef)(),e.handleFormSubmit=e.handleFormSubmit.bind(Object(X.a)(Object(X.a)(e))),e.handleTitleChange=e.handleTitleChange.bind(Object(X.a)(Object(X.a)(e))),e.handleTitleKeyDown=e.handleTitleKeyDown.bind(Object(X.a)(Object(X.a)(e))),e}return Object(J.a)(t,e),Object(Q.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===Me.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.onEdit,a=e.instanceId;return Object(F.createElement)(F.Fragment,null,!t&&!r&&Object(F.createElement)("div",{className:"reusable-block-edit-panel"},Object(F.createElement)("b",{className:"reusable-block-edit-panel__info"},n),Object(F.createElement)(ee.Button,{ref:this.editButton,isLarge:!0,className:"reusable-block-edit-panel__button",onClick:o},Object(W.__)("Edit"))),(t||r)&&Object(F.createElement)("form",{className:"reusable-block-edit-panel",onSubmit:this.handleFormSubmit},Object(F.createElement)("label",{htmlFor:"reusable-block-edit-panel__title-".concat(a),className:"reusable-block-edit-panel__label"},Object(W.__)("Name:")),Object(F.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(a)}),Object(F.createElement)(ee.Button,{type:"submit",isLarge:!0,isBusy:r,disabled:!n||r,className:"reusable-block-edit-panel__button"},Object(W.__)("Save"))))}}]),t}(F.Component),An=Object(te.withInstanceId)(Bn);var Rn=function(e){var t=e.title,n=Object(W.sprintf)(Object(W.__)("Reusable Block: %s"),t);return Object(F.createElement)(ee.Tooltip,{text:n},Object(F.createElement)("span",{className:"reusable-block-indicator"},Object(F.createElement)(ee.Dashicon,{icon:"controls-repeat"})))},In=function(e){function t(e){var n,r=e.reusableBlock;return Object(G.a)(this,t),(n=Object(Y.a)(this,Object(Z.a)(t).apply(this,arguments))).startEditing=n.startEditing.bind(Object(X.a)(Object(X.a)(n))),n.stopEditing=n.stopEditing.bind(Object(X.a)(Object(X.a)(n))),n.setAttributes=n.setAttributes.bind(Object(X.a)(Object(X.a)(n))),n.setTitle=n.setTitle.bind(Object(X.a)(Object(X.a)(n))),n.save=n.save.bind(Object(X.a)(Object(X.a)(n))),r&&r.isTemporary?n.state={isEditing:!0,title:r.title,changedAttributes:{}}:n.state={isEditing:!1,title:null,changedAttributes:null},n}return Object(J.a)(t,e),Object(Q.a)(t,[{key:"componentDidMount",value:function(){this.props.reusableBlock||this.props.fetchReusableBlock()}},{key:"startEditing",value:function(){var e=this.props.reusableBlock;this.setState({isEditing:!0,title:e.title,changedAttributes:{}})}},{key:"stopEditing",value:function(){this.setState({isEditing:!1,title:null,changedAttributes:null})}},{key:"setAttributes",value:function(e){this.setState(function(t){if(null!==t.changedAttributes)return{changedAttributes:Object(H.a)({},t.changedAttributes,e)}})}},{key:"setTitle",value:function(e){this.setState({title:e})}},{key:"save",value:function(){var e=this.props,t=e.reusableBlock,n=e.onUpdateTitle,r=e.updateAttributes,o=e.block,a=e.onSave,c=this.state,i=c.title,l=c.changedAttributes;i!==t.title&&n(i),r(o.clientId,l),a(),this.stopEditing()}},{key:"render",value:function(){var e=this.props,t=e.isSelected,n=e.reusableBlock,r=e.block,o=e.isFetching,a=e.isSaving,c=this.state,i=c.isEditing,l=c.title,s=c.changedAttributes;if(!n&&o)return Object(F.createElement)(ee.Placeholder,null,Object(F.createElement)(ee.Spinner,null));if(!n||!r)return Object(F.createElement)(ee.Placeholder,null,Object(W.__)("Block has been deleted or is unavailable."));var u=Object(F.createElement)(K.BlockEdit,Object($.a)({},this.props,{isSelected:i&&t,clientId:r.clientId,name:r.name,attributes:Object(H.a)({},r.attributes,s),setAttributes:i?this.setAttributes:q.noop}));return i||(u=Object(F.createElement)(ee.Disabled,null,u)),Object(F.createElement)(F.Fragment,null,(t||i)&&Object(F.createElement)(An,{isEditing:i,title:null!==l?l:n.title,isSaving:a&&!n.isTemporary,onEdit:this.startEditing,onChangeTitle:this.setTitle,onSave:this.save,onCancel:this.stopEditing}),!t&&!i&&Object(F.createElement)(Rn,{title:n.title}),u)}}]),t}(F.Component),Ln=Object(te.compose)([Object(he.withSelect)(function(e,t){var n=e("core/editor"),r=n.getReusableBlock,o=n.isFetchingReusableBlock,a=n.isSavingReusableBlock,c=n.getBlock,i=t.attributes.ref,l=r(i);return{reusableBlock:l,isFetching:o(i),isSaving:a(i),block:l?c(l.clientId):null}}),Object(he.withDispatch)(function(e,t){var n=e("core/editor"),r=n.fetchReusableBlocks,o=n.updateBlockAttributes,a=n.updateReusableBlockTitle,c=n.saveReusableBlock,i=t.attributes.ref;return{fetchReusableBlock:Object(q.partial)(r,i),updateAttributes:o,onUpdateTitle:Object(q.partial)(a,i),onSave:Object(q.partial)(c,i)}})])(In),zn="core/block",Mn={title:Object(W.__)("Reusable Block"),category:"reusable",description:Object(W.__)("Create content, and save it to reuse across your site. Update the block, and the changes apply everywhere its used."),attributes:{ref:{type:"number"}},supports:{customClassName:!1,html:!1,inserter:!1},edit:Ln,save:function(){return null}},Pn="core/separator",Dn={title:Object(W.__)("Separator"),description:Object(W.__)("Insert a horizontal line where you want to create a break between ideas."),icon:Object(F.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(F.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(F.createElement)("path",{d:"M19 13H5v-2h14v2z"})),category:"layout",keywords:[Object(W.__)("horizontal-line"),"hr",Object(W.__)("divider")],styles:[{name:"default",label:Object(W.__)("Short Line"),isDefault:!0},{name:"wide",label:Object(W.__)("Wide Line")},{name:"dots",label:Object(W.__)("Dots")}],transforms:{from:[{type:"pattern",trigger:"enter",regExp:/^-{3,}$/,transform:function(){return Object(P.createBlock)("core/separator")}},{type:"raw",selector:"hr",schema:{hr:{}}}]},edit:function(e){var t=e.className;return Object(F.createElement)("hr",{className:t})},save:function(){return Object(F.createElement)("hr",null)}},Hn=n(57),Fn="core/shortcode",Vn={title:Object(W.__)("Shortcode"),description:Object(W.__)("Add a shortcode -- a WordPress-specific snippet of code written between square brackets."),icon:Object(F.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(F.createElement)("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"})),category:"widgets",attributes:{text:{type:"string",source:"text"}},transforms:{from:[{type:"shortcode",tag:"[a-z][a-z0-9_-]*",attributes:{text:{type:"string",shortcode:function(e,t){var n=t.content;return Object(Hn.removep)(Object(Hn.autop)(n))}}},priority:20}]},supports:{customClassName:!1,className:!1,html:!1},edit:Object(te.withInstanceId)(function(e){var t=e.attributes,n=e.setAttributes,r=e.instanceId,o="blocks-shortcode-input-".concat(r);return Object(F.createElement)("div",{className:"wp-block-shortcode"},Object(F.createElement)("label",{htmlFor:o},Object(F.createElement)(ee.Dashicon,{icon:"shortcode"}),Object(W.__)("Shortcode")),Object(F.createElement)(K.PlainText,{className:"input-control",id:o,value:t.text,placeholder:Object(W.__)("Write shortcode here…"),onChange:function(e){return n({text:e})}}))}),save:function(e){var t=e.attributes;return Object(F.createElement)(F.RawHTML,null,t.text)}},Un="core/spacer",qn={title:Object(W.__)("Spacer"),description:Object(W.__)("Add an element with empty space and custom height."),icon:Object(F.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(F.createElement)("g",null,Object(F.createElement)("path",{d:"M13 4v2h3.59L6 16.59V13H4v7h7v-2H7.41L18 7.41V11h2V4h-7"}))),category:"layout",attributes:{height:{type:"number",default:100}},edit:Object(te.withInstanceId)(function(e){var t=e.attributes,n=e.isSelected,r=e.setAttributes,o=e.toggleSelection,a=e.instanceId,c=t.height,i="block-spacer-height-input-".concat(a);return Object(F.createElement)(F.Fragment,null,Object(F.createElement)(ee.ResizableBox,{className:U()("block-library-spacer__resize-container",{"is-selected":n}),size:{height:c},minHeight:"20",enable:{top:!1,right:!1,bottom:!0,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},onResizeStop:function(e,t,n,a){r({height:parseInt(c+a.height,10)}),o(!0)},onResizeStart:function(){o(!1)}}),Object(F.createElement)(K.InspectorControls,null,Object(F.createElement)(ee.PanelBody,{title:Object(W.__)("Spacer Settings")},Object(F.createElement)(ee.BaseControl,{label:Object(W.__)("Height in pixels"),id:i},Object(F.createElement)("input",{type:"number",id:i,onChange:function(e){r({height:parseInt(e.target.value,10)})},value:c,min:"20",step:"10"})))))}),save:function(e){var t=e.attributes;return Object(F.createElement)("div",{style:{height:t.height},"aria-hidden":!0})}},Wn=n(31),Kn=n.n(Wn),$n="core/subhead",Gn={title:Object(W.__)("Subheading (deprecated)"),description:Object(W.__)("This block is deprecated. Please use the Paragraph block instead."),icon:Object(F.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(F.createElement)("path",{d:"M7.1 6l-.5 3h4.5L9.4 19h3l1.8-10h4.5l.5-3H7.1z"})),category:"common",supports:{inserter:!1,multiple:!1},attributes:{content:{source:"html",selector:"p"},align:{type:"string"}},transforms:{to:[{type:"block",blocks:["core/paragraph"],transform:function(e){return Object(P.createBlock)("core/paragraph",e)}}]},edit:function(e){var t=e.attributes,n=e.setAttributes,r=e.className,o=t.align,a=t.content,c=t.placeholder;return Kn()("The Subheading block",{alternative:"the Paragraph block",plugin:"Gutenberg"}),Object(F.createElement)(F.Fragment,null,Object(F.createElement)(K.BlockControls,null,Object(F.createElement)(K.AlignmentToolbar,{value:o,onChange:function(e){n({align:e})}})),Object(F.createElement)(K.RichText,{tagName:"p",value:a,onChange:function(e){n({content:e})},style:{textAlign:o},className:r,placeholder:c||Object(W.__)("Write subheading…")}))},save:function(e){var t=e.attributes,n=e.className,r=t.align,o=t.content;return Object(F.createElement)(K.RichText.Content,{tagName:"p",className:n,style:{textAlign:r},value:o})}};var Qn=function(e){function t(){var e;return Object(G.a)(this,t),(e=Object(Y.a)(this,Object(Z.a)(t).apply(this,arguments))).onCreateTable=e.onCreateTable.bind(Object(X.a)(Object(X.a)(e))),e.onChangeFixedLayout=e.onChangeFixedLayout.bind(Object(X.a)(Object(X.a)(e))),e.onChange=e.onChange.bind(Object(X.a)(Object(X.a)(e))),e.onChangeInitialColumnCount=e.onChangeInitialColumnCount.bind(Object(X.a)(Object(X.a)(e))),e.onChangeInitialRowCount=e.onChangeInitialRowCount.bind(Object(X.a)(Object(X.a)(e))),e.renderSection=e.renderSection.bind(Object(X.a)(Object(X.a)(e))),e.getTableControls=e.getTableControls.bind(Object(X.a)(Object(X.a)(e))),e.onInsertRow=e.onInsertRow.bind(Object(X.a)(Object(X.a)(e))),e.onInsertRowBefore=e.onInsertRowBefore.bind(Object(X.a)(Object(X.a)(e))),e.onInsertRowAfter=e.onInsertRowAfter.bind(Object(X.a)(Object(X.a)(e))),e.onDeleteRow=e.onDeleteRow.bind(Object(X.a)(Object(X.a)(e))),e.onInsertColumn=e.onInsertColumn.bind(Object(X.a)(Object(X.a)(e))),e.onInsertColumnBefore=e.onInsertColumnBefore.bind(Object(X.a)(Object(X.a)(e))),e.onInsertColumnAfter=e.onInsertColumnAfter.bind(Object(X.a)(Object(X.a)(e))),e.onDeleteColumn=e.onDeleteColumn.bind(Object(X.a)(Object(X.a)(e))),e.state={initialRowCount:2,initialColumnCount:2,selectedCell:null},e}return Object(J.a)(t,e),Object(Q.a)(t,[{key:"onChangeInitialColumnCount",value:function(e){this.setState({initialColumnCount:e})}},{key:"onChangeInitialRowCount",value:function(e){this.setState({initialRowCount:e})}},{key:"onCreateTable",value:function(){var e=this.props.setAttributes,t=this.state,n=t.initialRowCount,r=t.initialColumnCount;e(function(e){var t=e.rowCount,n=e.columnCount;return{body:Object(q.times)(t,function(){return{cells:Object(q.times)(n,function(){return{content:"",tag:"td"}})}})}}({rowCount:n=parseInt(n,10)||2,columnCount:r=parseInt(r,10)||2}))}},{key:"onChangeFixedLayout",value:function(){var e=this.props,t=e.attributes;(0,e.setAttributes)({hasFixedLayout:!t.hasFixedLayout})}},{key:"onChange",value:function(e){var t=this.state.selectedCell;if(t){var n=this.props,r=n.attributes;(0,n.setAttributes)(function(e,t){var n=t.section,r=t.rowIndex,o=t.columnIndex,a=t.content;return Object(D.a)({},n,e[n].map(function(e,t){return t!==r?e:{cells:e.cells.map(function(e,t){return t!==o?e:Object(H.a)({},e,{content:a})})}}))}(r,{section:t.section,rowIndex:t.rowIndex,columnIndex:t.columnIndex,content:e}))}}},{key:"onInsertRow",value:function(e){var t=this.state.selectedCell;if(t){var n=this.props,r=n.attributes,o=n.setAttributes,a=t.section,c=t.rowIndex;this.setState({selectedCell:null}),o(function(e,t){var n=t.section,r=t.rowIndex,o=e[n][0].cells.length;return Object(D.a)({},n,Object(M.a)(e[n].slice(0,r)).concat([{cells:Object(q.times)(o,function(){return{content:"",tag:"td"}})}],Object(M.a)(e[n].slice(r))))}(r,{section:a,rowIndex:c+e}))}}},{key:"onInsertRowBefore",value:function(){this.onInsertRow(0)}},{key:"onInsertRowAfter",value:function(){this.onInsertRow(1)}},{key:"onDeleteRow",value:function(){var e=this.state.selectedCell;if(e){var t=this.props,n=t.attributes,r=t.setAttributes,o=e.section,a=e.rowIndex;this.setState({selectedCell:null}),r(function(e,t){var n=t.section,r=t.rowIndex;return Object(D.a)({},n,e[n].filter(function(e,t){return t!==r}))}(n,{section:o,rowIndex:a}))}}},{key:"onInsertColumn",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=this.state.selectedCell;if(t){var n=this.props,r=n.attributes,o=n.setAttributes,a=t.section,c=t.columnIndex;this.setState({selectedCell:null}),o(function(e,t){var n=t.section,r=t.columnIndex;return Object(D.a)({},n,e[n].map(function(e){return{cells:Object(M.a)(e.cells.slice(0,r)).concat([{content:"",tag:"td"}],Object(M.a)(e.cells.slice(r)))}}))}(r,{section:a,columnIndex:c+e}))}}},{key:"onInsertColumnBefore",value:function(){this.onInsertColumn(0)}},{key:"onInsertColumnAfter",value:function(){this.onInsertColumn(1)}},{key:"onDeleteColumn",value:function(){var e=this.state.selectedCell;if(e){var t=this.props,n=t.attributes,r=t.setAttributes,o=e.section,a=e.columnIndex;this.setState({selectedCell:null}),r(function(e,t){var n=t.section,r=t.columnIndex;return Object(D.a)({},n,e[n].map(function(e){return{cells:e.cells.filter(function(e,t){return t!==r})}}).filter(function(e){return e.cells.length}))}(n,{section:o,columnIndex:a}))}}},{key:"createOnFocus",value:function(e){var t=this;return function(){t.setState({selectedCell:e})}}},{key:"getTableControls",value:function(){var e=this.state.selectedCell;return[{icon:"table-row-before",title:Object(W.__)("Add Row Before"),isDisabled:!e,onClick:this.onInsertRowBefore},{icon:"table-row-after",title:Object(W.__)("Add Row After"),isDisabled:!e,onClick:this.onInsertRowAfter},{icon:"table-row-delete",title:Object(W.__)("Delete Row"),isDisabled:!e,onClick:this.onDeleteRow},{icon:"table-col-before",title:Object(W.__)("Add Column Before"),isDisabled:!e,onClick:this.onInsertColumnBefore},{icon:"table-col-after",title:Object(W.__)("Add Column After"),isDisabled:!e,onClick:this.onInsertColumnAfter},{icon:"table-col-delete",title:Object(W.__)("Delete Column"),isDisabled:!e,onClick:this.onDeleteColumn}]}},{key:"renderSection",value:function(e){var t=this,n=e.type,r=e.rows;if(!r.length)return null;var o="t".concat(n),a=this.state.selectedCell;return Object(F.createElement)(o,null,r.map(function(e,r){var o=e.cells;return Object(F.createElement)("tr",{key:r},o.map(function(e,o){var c=e.content,i=e.tag,l=a&&n===a.section&&r===a.rowIndex&&o===a.columnIndex,s={section:n,rowIndex:r,columnIndex:o},u=U()({"is-selected":l});return Object(F.createElement)(i,{key:o,className:u},Object(F.createElement)(K.RichText,{className:"wp-block-table__cell-content",value:c,onChange:t.onChange,unstableOnFocus:t.createOnFocus(s)}))}))}))}},{key:"componentDidUpdate",value:function(){var e=this.props.isSelected,t=this.state.selectedCell;!e&&t&&this.setState({selectedCell:null})}},{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.className,r=this.state,o=r.initialRowCount,a=r.initialColumnCount,c=t.hasFixedLayout,i=t.head,l=t.body,s=t.foot,u=!i.length&&!l.length&&!s.length,b=this.renderSection;if(u)return Object(F.createElement)("form",{onSubmit:this.onCreateTable},Object(F.createElement)(ee.TextControl,{type:"number",label:Object(W.__)("Column Count"),value:a,onChange:this.onChangeInitialColumnCount,min:"1"}),Object(F.createElement)(ee.TextControl,{type:"number",label:Object(W.__)("Row Count"),value:o,onChange:this.onChangeInitialRowCount,min:"1"}),Object(F.createElement)(ee.Button,{isPrimary:!0,type:"submit"},Object(W.__)("Create")));var m=U()(n,{"has-fixed-layout":c});return Object(F.createElement)(F.Fragment,null,Object(F.createElement)(K.BlockControls,null,Object(F.createElement)(ee.Toolbar,null,Object(F.createElement)(ee.DropdownMenu,{icon:"editor-table",label:Object(W.__)("Edit Table"),controls:this.getTableControls()}))),Object(F.createElement)(K.InspectorControls,null,Object(F.createElement)(ee.PanelBody,{title:Object(W.__)("Table Settings"),className:"blocks-table-settings"},Object(F.createElement)(ee.ToggleControl,{label:Object(W.__)("Fixed width table cells"),checked:!!c,onChange:this.onChangeFixedLayout}))),Object(F.createElement)("table",{className:m},Object(F.createElement)(b,{type:"head",rows:i}),Object(F.createElement)(b,{type:"body",rows:l}),Object(F.createElement)(b,{type:"foot",rows:s})))}}]),t}(F.Component),Yn={tr:{children:{th:{children:Object(P.getPhrasingContentSchema)()},td:{children:Object(P.getPhrasingContentSchema)()}}}},Zn={table:{children:{thead:{children:Yn},tfoot:{children:Yn},tbody:{children:Yn}}}};function Jn(e){return{type:"array",default:[],source:"query",selector:"t".concat(e," tr"),query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:{content:{source:"html"},tag:{type:"string",default:"td",source:"tag"}}}}}}var Xn="core/table",er={title:Object(W.__)("Table"),description:Object(W.__)("Insert a table -- perfect for sharing charts and data."),icon:Object(F.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(F.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(F.createElement)("g",null,Object(F.createElement)("path",{d:"M20 3H5L3 5v14l2 2h15l2-2V5l-2-2zm0 2v3H5V5h15zm-5 14h-5v-9h5v9zM5 10h3v9H5v-9zm12 9v-9h3v9h-3z"}))),category:"formatting",attributes:{hasFixedLayout:{type:"boolean",default:!1},head:Jn("head"),body:Jn("body"),foot:Jn("foot")},supports:{align:!0},transforms:{from:[{type:"raw",selector:"table",schema:Zn}]},edit:Qn,save:function(e){var t=e.attributes,n=t.hasFixedLayout,r=t.head,o=t.body,a=t.foot;if(!r.length&&!o.length&&!a.length)return null;var c=U()({"has-fixed-layout":n}),i=function(e){var t=e.type,n=e.rows;if(!n.length)return null;var r="t".concat(t);return Object(F.createElement)(r,null,n.map(function(e,t){var n=e.cells;return Object(F.createElement)("tr",{key:t},n.map(function(e,t){var n=e.content,r=e.tag;return Object(F.createElement)(K.RichText.Content,{tagName:r,value:n,key:t})}))}))};return Object(F.createElement)("table",{className:c},Object(F.createElement)(i,{type:"head",rows:r}),Object(F.createElement)(i,{type:"body",rows:o}),Object(F.createElement)(i,{type:"foot",rows:a}))}},tr="core/template",nr={title:Object(W.__)("Reusable Template"),category:"reusable",description:Object(W.__)("Template block used as a container."),icon:Object(F.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(F.createElement)("rect",{x:"0",fill:"none",width:"24",height:"24"}),Object(F.createElement)("g",null,Object(F.createElement)("path",{d:"M19 3H5c-1.105 0-2 .895-2 2v14c0 1.105.895 2 2 2h14c1.105 0 2-.895 2-2V5c0-1.105-.895-2-2-2zM6 6h5v5H6V6zm4.5 13C9.12 19 8 17.88 8 16.5S9.12 14 10.5 14s2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5zm3-6l3-5 3 5h-6z"}))),supports:{customClassName:!1,html:!1,inserter:!1},edit:function(){return Object(F.createElement)(K.InnerBlocks,null)},save:function(){return Object(F.createElement)(K.InnerBlocks.Content,null)}},rr="core/text-columns",or={supports:{inserter:!1},title:Object(W.__)("Text Columns (deprecated)"),description:Object(W.__)("This block is deprecated. Please use the Columns block instead."),icon:"columns",category:"layout",attributes:{content:{type:"array",source:"query",selector:"p",query:{children:{source:"html"}},default:[{children:Object(de.create)()},{children:Object(de.create)()}]},columns:{type:"number",default:2},width:{type:"string"}},transforms:{to:[{type:"block",blocks:["core/columns"],transform:function(e){var t=e.className,n=e.columns,r=e.content,o=e.width;return Object(P.createBlock)("core/columns",{align:"wide"===o||"full"===o?o:void 0,className:t,columns:n},r.map(function(e){var t=e.children;return Object(P.createBlock)("core/column",{},[Object(P.createBlock)("core/paragraph",{content:t})])}))}}]},getEditWrapperProps:function(e){var t=e.width;if("wide"===t||"full"===t)return{"data-align":t}},edit:function(e){var t=e.attributes,n=e.setAttributes,r=e.className,o=t.width,a=t.content,c=t.columns;return Kn()("The Text Columns block",{alternative:"the Columns block",plugin:"Gutenberg"}),Object(F.createElement)(F.Fragment,null,Object(F.createElement)(K.BlockControls,null,Object(F.createElement)(K.BlockAlignmentToolbar,{value:o,onChange:function(e){return n({width:e})},controls:["center","wide","full"]})),Object(F.createElement)(K.InspectorControls,null,Object(F.createElement)(ee.PanelBody,null,Object(F.createElement)(ee.RangeControl,{label:Object(W.__)("Columns"),value:c,onChange:function(e){return n({columns:e})},min:2,max:4}))),Object(F.createElement)("div",{className:"".concat(r," align").concat(o," columns-").concat(c)},Object(q.times)(c,function(e){return Object(F.createElement)("div",{className:"wp-block-column",key:"column-".concat(e)},Object(F.createElement)(K.RichText,{tagName:"p",value:Object(q.get)(a,[e,"children"]),onChange:function(t){n({content:Object(M.a)(a.slice(0,e)).concat([{children:t}],Object(M.a)(a.slice(e+1)))})},placeholder:Object(W.__)("New Column")}))})))},save:function(e){var t=e.attributes,n=t.width,r=t.content,o=t.columns;return Object(F.createElement)("div",{className:"align".concat(n," columns-").concat(o)},Object(q.times)(o,function(e){return Object(F.createElement)("div",{className:"wp-block-column",key:"column-".concat(e)},Object(F.createElement)(K.RichText.Content,{tagName:"p",value:Object(q.get)(r,[e,"children"])}))}))}},ar="core/verse",cr={title:Object(W.__)("Verse"),description:Object(W.__)("A block for haiku? Why not? Blocks for all the things! (See what we did here?)"),icon:Object(F.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(F.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(F.createElement)("path",{d:"M3 17v4h4l11-11-4-4L3 17zm3 2H5v-1l9-9 1 1-9 9zM21 6l-3-3h-1l-2 2 4 4 2-2V6z"})),category:"formatting",keywords:[Object(W.__)("poetry")],attributes:{content:{source:"html",selector:"pre"},textAlign:{type:"string"}},transforms:{from:[{type:"block",blocks:["core/paragraph"],transform:function(e){return Object(P.createBlock)("core/verse",e)}}],to:[{type:"block",blocks:["core/paragraph"],transform:function(e){return Object(P.createBlock)("core/paragraph",e)}}]},edit:function(e){var t=e.attributes,n=e.setAttributes,r=e.className,o=e.mergeBlocks,a=t.textAlign,c=t.content;return Object(F.createElement)(F.Fragment,null,Object(F.createElement)(K.BlockControls,null,Object(F.createElement)(K.AlignmentToolbar,{value:a,onChange:function(e){n({textAlign:e})}})),Object(F.createElement)(K.RichText,{tagName:"pre",value:c,onChange:function(e){n({content:e})},style:{textAlign:a},placeholder:Object(W.__)("Write…"),wrapperClassName:r,onMerge:o}))},save:function(e){var t=e.attributes,n=e.className,r=t.textAlign,o=t.content;return Object(F.createElement)(K.RichText.Content,{tagName:"pre",className:n,style:{textAlign:r},value:o})},merge:function(e,t){return{content:e.content+t.content}}},ir=["video"],lr=function(e){function t(){var e;return Object(G.a)(this,t),(e=Object(Y.a)(this,Object(Z.a)(t).apply(this,arguments))).state={editing:!e.props.attributes.src},e.videoPlayer=Object(F.createRef)(),e.toggleAttribute=e.toggleAttribute.bind(Object(X.a)(Object(X.a)(e))),e.onSelectURL=e.onSelectURL.bind(Object(X.a)(Object(X.a)(e))),e.onSelectPoster=e.onSelectPoster.bind(Object(X.a)(Object(X.a)(e))),e.onRemovePoster=e.onRemovePoster.bind(Object(X.a)(Object(X.a)(e))),e}return Object(J.a)(t,e),Object(Q.a)(t,[{key:"componentDidMount",value:function(){var e=this,t=this.props,n=t.attributes,r=t.noticeOperations,o=t.setAttributes,a=n.id,c=n.src,i=void 0===c?"":c;if(!a&&0===i.indexOf("blob:")){var l=Object(ue.getBlobByURL)(i);l&&Object(K.mediaUpload)({filesList:[l],onFileChange:function(e){var t=Object(be.a)(e,1)[0].url;o({src:t})},onError:function(t){e.setState({editing:!0}),r.createErrorNotice(t)},allowedTypes:ir})}}},{key:"componentDidUpdate",value:function(e){this.props.attributes.poster!==e.attributes.poster&&this.videoPlayer.current.load()}},{key:"toggleAttribute",value:function(e){var t=this;return function(n){t.props.setAttributes(Object(D.a)({},e,n))}}},{key:"onSelectURL",value:function(e){var t=this.props,n=t.attributes,r=t.setAttributes;e!==n.src&&r({src:e,id:void 0}),this.setState({editing:!1})}},{key:"onSelectPoster",value:function(e){(0,this.props.setAttributes)({poster:e.url})}},{key:"onRemovePoster",value:function(){(0,this.props.setAttributes)({poster:""})}},{key:"render",value:function(){var e=this,t=this.props.attributes,n=t.autoplay,r=t.caption,o=t.controls,a=t.loop,c=t.muted,i=t.poster,l=t.preload,s=t.src,u=this.props,b=u.setAttributes,m=u.isSelected,h=u.className,p=u.noticeOperations,d=u.noticeUI,g=function(){e.setState({editing:!0})};return this.state.editing?Object(F.createElement)(K.MediaPlaceholder,{icon:"media-video",labels:{title:Object(W.__)("Video"),name:Object(W.__)("a video")},className:h,onSelect:function(t){if(!t||!t.url)return b({src:void 0,id:void 0}),void g();b({src:t.url,id:t.id}),e.setState({src:t.url,editing:!1})},onSelectURL:this.onSelectURL,accept:"video/*",allowedTypes:ir,value:this.props.attributes,notices:d,onError:p.createErrorNotice}):Object(F.createElement)(F.Fragment,null,Object(F.createElement)(K.BlockControls,null,Object(F.createElement)(ee.Toolbar,null,Object(F.createElement)(ee.IconButton,{className:"components-icon-button components-toolbar__control",label:Object(W.__)("Edit video"),onClick:g,icon:"edit"}))),Object(F.createElement)(K.InspectorControls,null,Object(F.createElement)(ee.PanelBody,{title:Object(W.__)("Video Settings")},Object(F.createElement)(ee.ToggleControl,{label:Object(W.__)("Autoplay"),onChange:this.toggleAttribute("autoplay"),checked:n}),Object(F.createElement)(ee.ToggleControl,{label:Object(W.__)("Loop"),onChange:this.toggleAttribute("loop"),checked:a}),Object(F.createElement)(ee.ToggleControl,{label:Object(W.__)("Muted"),onChange:this.toggleAttribute("muted"),checked:c}),Object(F.createElement)(ee.ToggleControl,{label:Object(W.__)("Playback Controls"),onChange:this.toggleAttribute("controls"),checked:o}),Object(F.createElement)(ee.SelectControl,{label:Object(W.__)("Preload"),value:l,onChange:function(e){return b({preload:e})},options:[{value:"auto",label:Object(W.__)("Auto")},{value:"metadata",label:Object(W.__)("Metadata")},{value:"none",label:Object(W.__)("None")}]}),Object(F.createElement)(ee.BaseControl,{className:"editor-video-poster-control",label:Object(W.__)("Poster Image")},Object(F.createElement)(K.MediaUpload,{title:Object(W.__)("Select Poster Image"),onSelect:this.onSelectPoster,allowedTypes:ir,render:function(t){var n=t.open;return Object(F.createElement)(ee.Button,{isDefault:!0,onClick:n},e.props.attributes.poster?Object(W.__)("Replace image"):Object(W.__)("Select Poster Image"))}}),!!this.props.attributes.poster&&Object(F.createElement)(ee.Button,{onClick:this.onRemovePoster,isLink:!0,isDestructive:!0},Object(W.__)("Remove Poster Image"))))),Object(F.createElement)("figure",{className:h},Object(F.createElement)(ee.Disabled,null,Object(F.createElement)("video",{controls:o,poster:i,src:s,ref:this.videoPlayer})),(!K.RichText.isEmpty(r)||m)&&Object(F.createElement)(K.RichText,{tagName:"figcaption",placeholder:Object(W.__)("Write caption…"),value:r,onChange:function(e){return b({caption:e})},inlineToolbar:!0})))}}]),t}(F.Component),sr=Object(ee.withNotices)(lr),ur="core/video",br={title:Object(W.__)("Video"),description:Object(W.__)("Embed a video file and a simple video player."),icon:Object(F.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(F.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(F.createElement)("path",{d:"M4 6l2 4h14v8H4V6m18-2h-4l2 4h-3l-2-4h-2l2 4h-3l-2-4H8l2 4H7L5 4H4L2 6v12l2 2h16l2-2V4z"})),keywords:[Object(W.__)("movie")],category:"common",attributes:{autoplay:{type:"boolean",source:"attribute",selector:"video",attribute:"autoplay"},caption:{source:"html",selector:"figcaption"},controls:{type:"boolean",source:"attribute",selector:"video",attribute:"controls",default:!0},id:{type:"number"},loop:{type:"boolean",source:"attribute",selector:"video",attribute:"loop"},muted:{type:"boolean",source:"attribute",selector:"video",attribute:"muted"},poster:{type:"string",source:"attribute",selector:"video",attribute:"poster"},preload:{type:"string",source:"attribute",selector:"video",attribute:"preload",default:"metadata"},src:{type:"string",source:"attribute",selector:"video",attribute:"src"}},transforms:{from:[{type:"files",isMatch:function(e){return 1===e.length&&0===e[0].type.indexOf("video/")},transform:function(e){var t=e[0];return Object(P.createBlock)("core/video",{src:Object(ue.createBlobURL)(t)})}}]},supports:{align:!0},edit:sr,save:function(e){var t=e.attributes,n=t.autoplay,r=t.caption,o=t.controls,a=t.loop,c=t.muted,i=t.poster,l=t.preload,s=t.src;return Object(F.createElement)("figure",null,s&&Object(F.createElement)("video",{autoPlay:n,controls:o,loop:a,muted:c,poster:i,preload:"metadata"!==l?l:void 0,src:s}),!K.RichText.isEmpty(r)&&Object(F.createElement)(K.RichText.Content,{tagName:"figcaption",value:r}))}};var mr=function(e){function t(e){var n;return Object(G.a)(this,t),(n=Object(Y.a)(this,Object(Z.a)(t).call(this,e))).initialize=n.initialize.bind(Object(X.a)(Object(X.a)(n))),n.onSetup=n.onSetup.bind(Object(X.a)(Object(X.a)(n))),n.focus=n.focus.bind(Object(X.a)(Object(X.a)(n))),n}return Object(J.a)(t,e),Object(Q.a)(t,[{key:"componentDidMount",value:function(){var e=window.wpEditorL10n.tinymce,t=e.baseURL,n=e.suffix;window.tinymce.EditorManager.overrideDefaults({base_url:t,suffix:n}),"complete"===document.readyState?this.initialize():window.addEventListener("DOMContentLoaded",this.initialize)}},{key:"componentWillUnmount",value:function(){window.addEventListener("DOMContentLoaded",this.initialize),wp.oldEditor.remove("editor-".concat(this.props.clientId))}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.clientId,r=t.attributes.content,o=window.tinymce.get("editor-".concat(n));e.attributes.content!==r&&o.setContent(r||"")}},{key:"initialize",value:function(){var e=this.props.clientId,t=window.wpEditorL10n.tinymce.settings;wp.oldEditor.initialize("editor-".concat(e),{tinymce:Object(H.a)({},t,{inline:!0,content_css:!1,fixed_toolbar_container:"#toolbar-".concat(e),setup:this.onSetup})})}},{key:"onSetup",value:function(e){var t=this,n=this.props,r=n.attributes.content,o=n.setAttributes,a=this.ref;this.editor=e,e.on("BeforeExecCommand",function(e){"WP_Help"===e.command&&e.preventDefault()}),r&&e.on("loadContent",function(){return e.setContent(r)}),e.on("blur",function(){return o({content:e.getContent()}),!1}),e.on("keydown",function(n){n.keyCode!==Me.BACKSPACE&&n.keyCode!==Me.DELETE||!function(e){var t=e.getBody();return!(t.childNodes.length>1)&&(0===t.childNodes.length||!(t.childNodes[0].childNodes.length>1)&&/^\n?$/.test(t.innerText||t.textContent))}(e)||(t.props.onReplace([]),n.preventDefault(),n.stopImmediatePropagation()),n.altKey&&n.keyCode===Me.F10&&n.stopPropagation()}),e.addButton("kitchensink",{tooltip:Object(W._x)("More","button to expand options"),icon:"dashicon dashicons-editor-kitchensink",onClick:function(){var t=!this.active();this.active(t),e.dom.toggleClass(a,"has-advanced-toolbar",t)}}),e.addButton("wp_add_media",{tooltip:Object(W.__)("Insert Media"),icon:"dashicon dashicons-admin-media",cmd:"WP_Medialib"}),e.on("init",function(){var e=t.editor.getBody();document.activeElement===e&&(e.blur(),t.editor.focus())})}},{key:"focus",value:function(){this.editor&&this.editor.focus()}},{key:"onToolbarKeyDown",value:function(e){e.stopPropagation(),e.nativeEvent.stopImmediatePropagation()}},{key:"render",value:function(){var e=this,t=this.props.clientId;return[Object(F.createElement)("div",{key:"toolbar",id:"toolbar-".concat(t),ref:function(t){return e.ref=t},className:"block-library-classic__toolbar",onClick:this.focus,"data-placeholder":Object(W.__)("Classic"),onKeyDown:this.onToolbarKeyDown}),Object(F.createElement)("div",{key:"editor",id:"editor-".concat(t),className:"wp-block-freeform block-library-rich-text__tinymce"})]}}]),t}(F.Component),hr="core/freeform",pr={title:Object(W.__)("Classic"),description:Object(W.__)("Its the classic WordPress editor and its a block! Drop the editor right in."),icon:Object(F.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(F.createElement)("path",{d:"M0,0h24v24H0V0z M0,0h24v24H0V0z",fill:"none"}),Object(F.createElement)("path",{d:"m20 7v10h-16v-10h16m0-2h-16c-1.1 0-1.99 0.9-1.99 2l-0.01 10c0 1.1 0.9 2 2 2h16c1.1 0 2-0.9 2-2v-10c0-1.1-0.9-2-2-2z"}),Object(F.createElement)("rect",{x:"11",y:"8",width:"2",height:"2"}),Object(F.createElement)("rect",{x:"11",y:"11",width:"2",height:"2"}),Object(F.createElement)("rect",{x:"8",y:"8",width:"2",height:"2"}),Object(F.createElement)("rect",{x:"8",y:"11",width:"2",height:"2"}),Object(F.createElement)("rect",{x:"5",y:"11",width:"2",height:"2"}),Object(F.createElement)("rect",{x:"5",y:"8",width:"2",height:"2"}),Object(F.createElement)("rect",{x:"8",y:"14",width:"8",height:"2"}),Object(F.createElement)("rect",{x:"14",y:"11",width:"2",height:"2"}),Object(F.createElement)("rect",{x:"14",y:"8",width:"2",height:"2"}),Object(F.createElement)("rect",{x:"17",y:"11",width:"2",height:"2"}),Object(F.createElement)("rect",{x:"17",y:"8",width:"2",height:"2"})),category:"formatting",attributes:{content:{type:"string",source:"html"}},supports:{className:!1,customClassName:!1},edit:mr,save:function(e){var t=e.attributes.content;return Object(F.createElement)(F.RawHTML,null,t)}};n.d(t,"registerCoreBlocks",function(){return dr});var dr=function(){[r,o,a,i,y,c,S,l,s,u,b,m,h,p,d,g].concat(Object(M.a)(Kt),Object(M.a)($t),[O,window.wp&&window.wp.oldEditor?z:null,f,j,v,w,C,k,E,x,_,N,T,B,A,R,I,L]).forEach(function(e){if(e){var t=e.name,n=e.settings;Object(P.registerBlockType)(t,n)}}),Object(P.setDefaultBlockName)(le),window.wp&&window.wp.oldEditor&&Object(P.setUnknownTypeHandlerName)(hr)}},4:function(e,t){!function(){e.exports=this.wp.components}()},40:function(e,t){!function(){e.exports=this.wp.viewport}()},42:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},44:function(e,t,n){e.exports=function(e,t){var n,r,o,a=0;function c(){var t,c,i=r,l=arguments.length;e:for(;i;){if(i.args.length===arguments.length){for(c=0;c<l;c++)if(i.args[c]!==arguments[c]){i=i.next;continue e}return i!==r&&(i===o&&(o=i.prev),i.prev.next=i.next,i.next&&(i.next.prev=i.prev),i.next=r,i.prev=null,r.prev=i,r=i),i.val}i=i.next}for(t=new Array(l),c=0;c<l;c++)t[c]=arguments[c];return i={args:t,val:e.apply(null,t)},r?(r.prev=i,i.next=r):o=i,a===n?(o=o.prev).next=null:a++,r=i,i.val}return t&&t.maxSize&&(n=t.maxSize),c.clear=function(){r=null,o=null,a=0},c}},5:function(e,t){!function(){e.exports=this.wp.data}()},51:function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},57:function(e,t){!function(){e.exports=this.wp.autop}()},6:function(e,t){!function(){e.exports=this.wp.compose}()},64:function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},68:function(e,t,n){var r;
/*!
Copyright (c) 2017 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/
/*!
Copyright (c) 2017 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/
!function(){"use strict";var n=function(){function e(){}function t(e,t){for(var n=t.length,r=0;r<n;++r)o(e,t[r])}e.prototype=Object.create(null);var n={}.hasOwnProperty;var r=/\s+/;function o(e,o){if(o){var a=typeof o;"string"===a?function(e,t){for(var n=t.split(r),o=n.length,a=0;a<o;++a)e[n[a]]=!0}(e,o):Array.isArray(o)?t(e,o):"object"===a?function(e,t){for(var r in t)n.call(t,r)&&(e[r]=!!t[r])}(e,o):"number"===a&&function(e,t){e[t]=!0}(e,o)}}return function(){for(var n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];var a=new e;t(a,r);var c=[];for(var i in a)a[i]&&c.push(i);return c.join(" ")}}();void 0!==e&&e.exports?(n.default=n,e.exports=n):void 0===(r=function(){return n}.apply(t,[]))||(e.exports=r)}()},69:function(e,t,n){"use strict";var r=n(93),o=n(94);function a(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=j,t.resolve=function(e,t){return j(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?j(e,!1,!0).resolveObject(t):t},t.format=function(e){o.isString(e)&&(e=j(e));return e instanceof a?e.format():a.prototype.format.call(e)},t.Url=a;var c=/^([a-z0-9.+-]+:)/i,i=/:[0-9]*$/,l=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,s=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),u=["'"].concat(s),b=["%","/","?",";","#"].concat(u),m=["/","?","#"],h=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,d={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},O={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},f=n(95);function j(e,t,n){if(e&&o.isObject(e)&&e instanceof a)return e;var r=new a;return r.parse(e,t,n),r}a.prototype.parse=function(e,t,n){if(!o.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var a=e.indexOf("?"),i=-1!==a&&a<e.indexOf("#")?"?":"#",s=e.split(i);s[0]=s[0].replace(/\\/g,"/");var j=e=s.join(i);if(j=j.trim(),!n&&1===e.split("#").length){var v=l.exec(j);if(v)return this.path=j,this.href=j,this.pathname=v[1],v[2]?(this.search=v[2],this.query=t?f.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var y=c.exec(j);if(y){var w=(y=y[0]).toLowerCase();this.protocol=w,j=j.substr(y.length)}if(n||y||j.match(/^\/\/[^@\/]+@[^@\/]+/)){var C="//"===j.substr(0,2);!C||y&&g[y]||(j=j.substr(2),this.slashes=!0)}if(!g[y]&&(C||y&&!O[y])){for(var k,E,_=-1,x=0;x<m.length;x++){-1!==(S=j.indexOf(m[x]))&&(-1===_||S<_)&&(_=S)}-1!==(E=-1===_?j.lastIndexOf("@"):j.lastIndexOf("@",_))&&(k=j.slice(0,E),j=j.slice(E+1),this.auth=decodeURIComponent(k)),_=-1;for(x=0;x<b.length;x++){var S;-1!==(S=j.indexOf(b[x]))&&(-1===_||S<_)&&(_=S)}-1===_&&(_=j.length),this.host=j.slice(0,_),j=j.slice(_),this.parseHost(),this.hostname=this.hostname||"";var N="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!N)for(var T=this.hostname.split(/\./),B=(x=0,T.length);x<B;x++){var A=T[x];if(A&&!A.match(h)){for(var R="",I=0,L=A.length;I<L;I++)A.charCodeAt(I)>127?R+="x":R+=A[I];if(!R.match(h)){var z=T.slice(0,x),M=T.slice(x+1),P=A.match(p);P&&(z.push(P[1]),M.unshift(P[2])),M.length&&(j="/"+M.join(".")+j),this.hostname=z.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),N||(this.hostname=r.toASCII(this.hostname));var D=this.port?":"+this.port:"",H=this.hostname||"";this.host=H+D,this.href+=this.host,N&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==j[0]&&(j="/"+j))}if(!d[w])for(x=0,B=u.length;x<B;x++){var F=u[x];if(-1!==j.indexOf(F)){var V=encodeURIComponent(F);V===F&&(V=escape(F)),j=j.split(F).join(V)}}var U=j.indexOf("#");-1!==U&&(this.hash=j.substr(U),j=j.slice(0,U));var q=j.indexOf("?");if(-1!==q?(this.search=j.substr(q),this.query=j.substr(q+1),t&&(this.query=f.parse(this.query)),j=j.slice(0,q)):t&&(this.search="",this.query={}),j&&(this.pathname=j),O[w]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){D=this.pathname||"";var W=this.search||"";this.path=D+W}return this.href=this.format(),this},a.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",n=this.pathname||"",r=this.hash||"",a=!1,c="";this.host?a=e+this.host:this.hostname&&(a=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(a+=":"+this.port)),this.query&&o.isObject(this.query)&&Object.keys(this.query).length&&(c=f.stringify(this.query));var i=this.search||c&&"?"+c||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||O[t])&&!1!==a?(a="//"+(a||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):a||(a=""),r&&"#"!==r.charAt(0)&&(r="#"+r),i&&"?"!==i.charAt(0)&&(i="?"+i),t+a+(n=n.replace(/[?#]/g,function(e){return encodeURIComponent(e)}))+(i=i.replace("#","%23"))+r},a.prototype.resolve=function(e){return this.resolveObject(j(e,!1,!0)).format()},a.prototype.resolveObject=function(e){if(o.isString(e)){var t=new a;t.parse(e,!1,!0),e=t}for(var n=new a,r=Object.keys(this),c=0;c<r.length;c++){var i=r[c];n[i]=this[i]}if(n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol){for(var l=Object.keys(e),s=0;s<l.length;s++){var u=l[s];"protocol"!==u&&(n[u]=e[u])}return O[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(e.protocol&&e.protocol!==n.protocol){if(!O[e.protocol]){for(var b=Object.keys(e),m=0;m<b.length;m++){var h=b[m];n[h]=e[h]}return n.href=n.format(),n}if(n.protocol=e.protocol,e.host||g[e.protocol])n.pathname=e.pathname;else{for(var p=(e.pathname||"").split("/");p.length&&!(e.host=p.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==p[0]&&p.unshift(""),p.length<2&&p.unshift(""),n.pathname=p.join("/")}if(n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var d=n.pathname||"",f=n.search||"";n.path=d+f}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var j=n.pathname&&"/"===n.pathname.charAt(0),v=e.host||e.pathname&&"/"===e.pathname.charAt(0),y=v||j||n.host&&e.pathname,w=y,C=n.pathname&&n.pathname.split("/")||[],k=(p=e.pathname&&e.pathname.split("/")||[],n.protocol&&!O[n.protocol]);if(k&&(n.hostname="",n.port=null,n.host&&(""===C[0]?C[0]=n.host:C.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===p[0]?p[0]=e.host:p.unshift(e.host)),e.host=null),y=y&&(""===p[0]||""===C[0])),v)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,C=p;else if(p.length)C||(C=[]),C.pop(),C=C.concat(p),n.search=e.search,n.query=e.query;else if(!o.isNullOrUndefined(e.search)){if(k)n.hostname=n.host=C.shift(),(N=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=N.shift(),n.host=n.hostname=N.shift());return n.search=e.search,n.query=e.query,o.isNull(n.pathname)&&o.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!C.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var E=C.slice(-1)[0],_=(n.host||e.host||C.length>1)&&("."===E||".."===E)||""===E,x=0,S=C.length;S>=0;S--)"."===(E=C[S])?C.splice(S,1):".."===E?(C.splice(S,1),x++):x&&(C.splice(S,1),x--);if(!y&&!w)for(;x--;x)C.unshift("..");!y||""===C[0]||C[0]&&"/"===C[0].charAt(0)||C.unshift(""),_&&"/"!==C.join("/").substr(-1)&&C.push("");var N,T=""===C[0]||C[0]&&"/"===C[0].charAt(0);k&&(n.hostname=n.host=T?"":C.length?C.shift():"",(N=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=N.shift(),n.host=n.hostname=N.shift()));return(y=y||n.host&&C.length)&&!T&&C.unshift(""),C.length?n.pathname=C.join("/"):(n.pathname=null,n.path=null),o.isNull(n.pathname)&&o.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},a.prototype.parseHost=function(){var e=this.host,t=i.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},73:function(e,t){!function(){e.exports=this.wp.coreData}()},8:function(e,t){!function(){e.exports=this.wp.editor}()},9:function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n(16);function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),o.forEach(function(t){Object(r.a)(e,t,n[t])})}return e}},93:function(e,t,n){(function(e,r){var o;/*! https://mths.be/punycode v1.4.1 by @mathias */!function(a){"object"==typeof t&&t&&t.nodeType,"object"==typeof e&&e&&e.nodeType;var c="object"==typeof r&&r;c.global!==c&&c.window!==c&&c.self;var i,l=2147483647,s=36,u=1,b=26,m=38,h=700,p=72,d=128,g="-",O=/^xn--/,f=/[^\x20-\x7E]/,j=/[\x2E\u3002\uFF0E\uFF61]/g,v={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},y=s-u,w=Math.floor,C=String.fromCharCode;function k(e){throw new RangeError(v[e])}function E(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function _(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+E((e=e.replace(j,".")).split("."),t).join(".")}function x(e){for(var t,n,r=[],o=0,a=e.length;o<a;)(t=e.charCodeAt(o++))>=55296&&t<=56319&&o<a?56320==(64512&(n=e.charCodeAt(o++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),o--):r.push(t);return r}function S(e){return E(e,function(e){var t="";return e>65535&&(t+=C((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=C(e)}).join("")}function N(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:s}function T(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function B(e,t,n){var r=0;for(e=n?w(e/h):e>>1,e+=w(e/t);e>y*b>>1;r+=s)e=w(e/y);return w(r+(y+1)*e/(e+m))}function A(e){var t,n,r,o,a,c,i,m,h,O,f=[],j=e.length,v=0,y=d,C=p;for((n=e.lastIndexOf(g))<0&&(n=0),r=0;r<n;++r)e.charCodeAt(r)>=128&&k("not-basic"),f.push(e.charCodeAt(r));for(o=n>0?n+1:0;o<j;){for(a=v,c=1,i=s;o>=j&&k("invalid-input"),((m=N(e.charCodeAt(o++)))>=s||m>w((l-v)/c))&&k("overflow"),v+=m*c,!(m<(h=i<=C?u:i>=C+b?b:i-C));i+=s)c>w(l/(O=s-h))&&k("overflow"),c*=O;C=B(v-a,t=f.length+1,0==a),w(v/t)>l-y&&k("overflow"),y+=w(v/t),v%=t,f.splice(v++,0,y)}return S(f)}function R(e){var t,n,r,o,a,c,i,m,h,O,f,j,v,y,E,_=[];for(j=(e=x(e)).length,t=d,n=0,a=p,c=0;c<j;++c)(f=e[c])<128&&_.push(C(f));for(r=o=_.length,o&&_.push(g);r<j;){for(i=l,c=0;c<j;++c)(f=e[c])>=t&&f<i&&(i=f);for(i-t>w((l-n)/(v=r+1))&&k("overflow"),n+=(i-t)*v,t=i,c=0;c<j;++c)if((f=e[c])<t&&++n>l&&k("overflow"),f==t){for(m=n,h=s;!(m<(O=h<=a?u:h>=a+b?b:h-a));h+=s)E=m-O,y=s-O,_.push(C(T(O+E%y,0))),m=w(E/y);_.push(C(T(m,0))),a=B(n,v,r==o),n=0,++r}++n,++t}return _.join("")}i={version:"1.4.1",ucs2:{decode:x,encode:S},decode:A,encode:R,toASCII:function(e){return _(e,function(e){return f.test(e)?"xn--"+R(e):e})},toUnicode:function(e){return _(e,function(e){return O.test(e)?A(e.slice(4).toLowerCase()):e})}},void 0===(o=function(){return i}.call(t,n,t,e))||(e.exports=o)}()}).call(this,n(64)(e),n(51))},94:function(e,t,n){"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},95:function(e,t,n){"use strict";t.decode=t.parse=n(96),t.encode=t.stringify=n(97)},96:function(e,t,n){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,n,a){t=t||"&",n=n||"=";var c={};if("string"!=typeof e||0===e.length)return c;var i=/\+/g;e=e.split(t);var l=1e3;a&&"number"==typeof a.maxKeys&&(l=a.maxKeys);var s=e.length;l>0&&s>l&&(s=l);for(var u=0;u<s;++u){var b,m,h,p,d=e[u].replace(i,"%20"),g=d.indexOf(n);g>=0?(b=d.substr(0,g),m=d.substr(g+1)):(b=d,m=""),h=decodeURIComponent(b),p=decodeURIComponent(m),r(c,h)?o(c[h])?c[h].push(p):c[h]=[c[h],p]:c[h]=p}return c};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},97:function(e,t,n){"use strict";var r=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,n,i){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?a(c(e),function(c){var i=encodeURIComponent(r(c))+n;return o(e[c])?a(e[c],function(e){return i+encodeURIComponent(r(e))}).join(t):i+encodeURIComponent(r(e[c]))}).join(t):i?encodeURIComponent(r(i))+n+encodeURIComponent(r(e)):""};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function a(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r<e.length;r++)n.push(t(e[r],r));return n}var c=Object.keys||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t}}});