this.wp=this.wp||{},this.wp.richText=function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=308)}({15:function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,"a",function(){return r})},19:function(t,e,n){"use strict";var r=n(31);function o(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"ADD_FORMAT_TYPES":return Object(i.a)({},t,Object(u.keyBy)(e.formatTypes,"name"));case"REMOVE_FORMAT_TYPES":return Object(u.omit)(t,e.names)}return t}}),f=n(33),s=Object(f.a)(function(t){return Object.values(t.formatTypes)},function(t){return[t.formatTypes]});function l(t,e){return t.formatTypes[e]}function d(t){return{type:"ADD_FORMAT_TYPES",formatTypes:Object(u.castArray)(t)}}function m(t){return{type:"REMOVE_FORMAT_TYPES",names:Object(u.castArray)(t)}}Object(a.registerStore)("core/rich-text",{reducer:c,selectors:r,actions:o});var p=n(19);function v(t,e){if(t===e)return!0;if(!t||!e)return!1;if(t.type!==e.type)return!1;var n=t.attributes,r=e.attributes;if(n===r)return!0;if(!n||!r)return!1;var o=Object.keys(n),a=Object.keys(r);if(o.length!==a.length)return!1;for(var i=o.length,u=0;u0&&void 0!==arguments[0]?arguments[0]:{},e=t.element,n=t.text,r=t.html,o=t.range,a=t.multilineTag,i=t.removeNode,u=t.unwrapNode,c=t.filterString,f=t.removeAttribute;return"string"==typeof n&&n.length>0?{formats:Array(n.length),text:n}:("string"==typeof r&&r.length>0&&(e=function(t,e){var n=t.implementation.createHTMLDocument("").body;return n.innerHTML=e,n}(document,r)),"object"!==Object(y.a)(e)?{formats:[],text:""}:a?function(t){var e=t.element,n=t.range,r=t.multilineTag,o=t.removeNode,a=t.unwrapNode,i=t.filterString,u=t.removeAttribute,c={formats:[],text:""};if(!e||!e.hasChildNodes())return c;for(var f=e.children.length,s=0;s2&&void 0!==arguments[2]?arguments[2]:o,u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:a;"string"==typeof e&&(e=E({text:e}));var c=i+e.text.length;return h({formats:n.slice(0,i).concat(e.formats,n.slice(u)),text:r.slice(0,i)+e.text+r.slice(u),start:c,end:c})}var M="\ufeff";function P(t,e){var n=t.formats,r=t.text,o=t.start,a=t.end,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:a,f=n.slice(0);if(i===c){var s=Object(u.find)(f[i],{type:e.type});if(!s){var l=f[i-1]||[];return D({formats:n,text:r,start:o,end:a},{formats:Object(u.find)(l,{type:e.type})?[Object(u.reject)(l,{type:e.type})]:[Object(p.a)(l).concat([e])],text:M})}for(;Object(u.find)(f[i],s);)_(f,i,e),i--;for(c++;Object(u.find)(f[c],s);)_(f,c,e),c++}else for(var d=i;d1&&void 0!==arguments[1]?arguments[1]:"";return"string"==typeof e&&(e=E({text:e})),h(t.reduce(function(t,n){var r=n.formats,o=n.text;return{text:t.text+e.text+o,formats:t.formats.concat(e.formats,r)}}))}function B(t,e){if("string"==typeof(e=Object(i.a)({name:t},e)).name)if(/^[a-z][a-z0-9-]*\/[a-z][a-z0-9-]*$/.test(e.name))if(Object(a.select)("core/rich-text").getFormatType(e.name))window.console.error('Format "'+e.name+'" is already registered.');else if(e&&Object(u.isFunction)(e.edit))if("title"in e&&""!==e.title)if("keywords"in e&&e.keywords.length>3)window.console.error('The format "'+e.name+'" can have a maximum of 3 keywords.');else{if("string"==typeof e.title)return Object(a.dispatch)("core/rich-text").addFormatTypes(e),e;window.console.error("Format titles must be strings.")}else window.console.error('The format "'+e.name+'" must have a title.');else window.console.error('The "edit" property must be specified and must be a valid function.');else window.console.error("Format names must contain a namespace prefix, include only lowercase alphanumeric characters or dashes, and start with a letter. Example: my-plugin/my-custom-format");else window.console.error("Format names must be strings.")}function z(t,e){var n=t.formats,r=t.text,o=t.start,a=t.end,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:a,f=n.slice(0);if(i===c){for(var s=Object(u.find)(f[i],{type:e});Object(u.find)(f[i],s);)Y(f,i,e),i--;for(c++;Object(u.find)(f[c],s);)Y(f,c,e),c++}else for(var l=i;l1?e-1:0),u=1;u1&&void 0!==arguments[1]?arguments[1]:r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o;return void 0===a||void 0===i?{formats:e,text:n}:{formats:e.slice(a,i),text:n.slice(a,i)}}function G(t,e){var n=t.formats,r=t.text,o=t.start,a=t.end;if("string"!=typeof e)return function(t){var e=t.formats,n=t.text,r=t.start,o=t.end,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o,u={formats:e.slice(0,a),text:n.slice(0,a)},c={formats:e.slice(i),text:n.slice(i),start:0,end:0};return[q(u,/\u2028+$/,""),q(c,/^\u2028+/,"")]}.apply(void 0,arguments);var i=0;return r.split(e).map(function(t){var r=i,u={formats:n.slice(r,r+t.length),text:t};return i+=e.length+t.length,void 0!==o&&void 0!==a&&(o>=r&&or&&(u.start=0),a>=r&&ai&&(u.end=t.length)),u})}function J(t,e,n){if(e){var r=n.createEmpty,o=n.append,a=r();return G(t,"\u2028").forEach(function(t,r){o(a,J(t,null,Object(i.a)({},n,{tag:e,multilineIndex:r})))}),a}var u=n.tag,c=n.multilineIndex,f=n.createEmpty,s=n.append,l=n.getLastChild,d=n.getParent,m=n.isText,p=n.getText,v=n.remove,h=n.appendText,y=n.onStartIndex,g=n.onEndIndex,b=n.onEmpty,x=t.formats,O=t.text,j=t.start,T=t.end,w=x.length+1,N=f(u);s(N,"");for(var E=function(t){var e=O.charAt(t),n=x[t],r=x[t-1],o=l(N);n&&n.forEach(function(t,e){if(o&&r&&t===r[e])o=l(o);else{var n=t.type,a=t.attributes,i=t.object,u=d(o),c=s(u,function(t){var e=t.type,n=t.attributes,r=t.object,o=V(e);if(!o)return{type:e,attributes:n,object:r};if(!n)return{type:o.match.tagName,object:o.object};var a={};for(var i in n){var u=o.attributes[i];u?a[u]=n[i]:a[i]=n[i]}return{type:o.match.tagName,object:o.object,attributes:a}}({type:n,attributes:a,object:i}));m(o)&&0===p(o).length&&v(o),o=s(i?u:c,"")}}),y&&0===j&&0===t&&y(N,o,c),g&&0===T&&0===t&&g(N,o,c),""!==e&&("\n"===e?(o=s(d(o),{type:"br",object:!0}),o=s(d(o),"")):m(o)?h(o,e):o=s(d(o),e)),y&&j===t+1&&y(N,o,c),g&&T===t+1&&g(N,o,c)},S=0;S1;)t=t.childNodes[e.shift()];return{node:t,offset:e[0]}}function nt(t){var e=document.implementation.createHTMLDocument("").body;return t?e.appendChild(e.ownerDocument.createElement(t)):e}function rt(t,e){"string"==typeof e&&(e=t.ownerDocument.createTextNode(e));var n=e,r=n.type,o=n.attributes;if(r)for(var a in e=t.ownerDocument.createElement(r),o)e.setAttribute(a,o[a]);return t.appendChild(e)}function ot(t,e){t.appendData(e)}function at(t){return t.lastChild}function it(t){return t.parentNode}function ut(t){return t.nodeType===Q}function ct(t){return t.nodeValue}function ft(t){return t.parentNode.removeChild(t)}function st(t,e){var n=[],r=[];return{body:J(t,e,{createEmpty:nt,append:rt,getLastChild:at,getParent:it,isText:ut,getText:ct,remove:ft,appendText:ot,onStartIndex:function(t,e,r){n=tt(e,t,[e.nodeValue.length]),void 0!==r&&(n=[r].concat(Object(p.a)(n)))},onEndIndex:function(t,e,n){r=tt(e,t,[e.nodeValue.length]),void 0!==n&&(r=[n].concat(Object(p.a)(r)))},onEmpty:function(t){var e=t.ownerDocument.createElement("br");e.setAttribute("data-mce-bogus","1"),t.appendChild(e)}}),selection:{startPath:n,endPath:r}}}function lt(t,e,n){var r=st(t,n),o=r.body,a=r.selection;!function(t,e){var n=0;for(;t.firstChild;){var r=e.childNodes[n],o=t.firstChild.nodeType;r?o!==r.nodeType||o!==Q||t.firstChild.nodeValue!==r.nodeValue?e.replaceChild(t.firstChild,r):t.removeChild(t.firstChild):e.appendChild(t.firstChild),n++}for(;e.childNodes[n];)e.removeChild(e.childNodes[n])}(o,e),void 0!==t.start&&function(t,e){var n=et(e,t.startPath),r=n.node,o=n.offset,a=et(e,t.endPath),i=a.node,u=a.offset,c=window.getSelection(),f=e.ownerDocument.createRange(),s=r===i&&o===u;s&&0===o&&r.previousSibling&&r.previousSibling.nodeType===Z&&"BR"!==r.previousSibling.nodeName?(r.insertData(0,"\ufeff"),f.setStart(r,1),f.setEnd(i,1)):s&&0===o&&r===Q&&0===r.nodeValue.length?(r.insertData(0,"\ufeff"),f.setStart(r,1),f.setEnd(i,1)):(f.setStart(r,o),f.setEnd(i,u));c.removeAllRanges(),c.addRange(f)}(a,e)}var dt=n(59);function mt(t,e){return jt(J(t,e,{createEmpty:pt,append:ht,getLastChild:vt,getParent:gt,isText:bt,getText:xt,remove:Ot,appendText:yt}).children)}function pt(t){return{type:t}}function vt(t){var e=t.children;return e&&e[e.length-1]}function ht(t,e){return"string"==typeof e&&(e={text:e}),e.parent=t,t.children=t.children||[],t.children.push(e),e}function yt(t,e){t.text+=e}function gt(t){return t.parent}function bt(t){return"string"==typeof t.text}function xt(t){return t.text}function Ot(t){var e=t.parent.children.indexOf(t);return-1!==e&&t.parent.children.splice(e,1),t}function jt(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map(function(t){return void 0===t.text?function(t){var e=t.type,n=t.attributes,r=t.object,o=t.children,a="";for(var i in n)Object(dt.isValidAttributeName)(i)&&(a+=" ".concat(i,'="').concat(Object(dt.escapeAttribute)(n[i]),'"'));return r?"<".concat(e).concat(a,">"):"<".concat(e).concat(a,">").concat(jt(o),"")}(t):Object(dt.escapeHTML)(t.text)}).join("")}function Tt(t,e){return R(t,e.type)?z(t,e.type):P(t,e)}function wt(t){var e=Object(a.select)("core/rich-text").getFormatType(t);if(e)return Object(a.dispatch)("core/rich-text").removeFormatTypes(t),e;window.console.error("Format ".concat(t," is not registered."))}n.d(e,"applyFormat",function(){return P}),n.d(e,"concat",function(){return L}),n.d(e,"create",function(){return E}),n.d(e,"getActiveFormat",function(){return R}),n.d(e,"getFormatType",function(){return V}),n.d(e,"getFormatTypes",function(){return x}),n.d(e,"getTextContent",function(){return k}),n.d(e,"isCollapsed",function(){return I}),n.d(e,"isEmpty",function(){return g}),n.d(e,"isEmptyLine",function(){return b}),n.d(e,"join",function(){return H}),n.d(e,"registerFormatType",function(){return B}),n.d(e,"removeFormat",function(){return z}),n.d(e,"remove",function(){return W}),n.d(e,"replace",function(){return q}),n.d(e,"insert",function(){return D}),n.d(e,"insertObject",function(){return X}),n.d(e,"slice",function(){return $}),n.d(e,"split",function(){return G}),n.d(e,"apply",function(){return lt}),n.d(e,"unstableToDom",function(){return st}),n.d(e,"toHTMLString",function(){return mt}),n.d(e,"toggleFormat",function(){return Tt}),n.d(e,"unregisterFormatType",function(){return wt})},31:function(t,e,n){"use strict";function r(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}n.d(e,"a",function(){return r})},33:function(t,e,n){"use strict";var r,o;function a(t){return[t]}function i(){var t={clear:function(){t.head=null}};return t}function u(t,e,n){var r;if(t.length!==e.length)return!1;for(r=n;r