AlkantarClanX12

Your IP : 13.58.28.196


Current Path : /home/thanudqk/siampokernew.org/wp-includes/js/dist/
Upload File :
Current File : /home/thanudqk/siampokernew.org/wp-includes/js/dist/rich-text.min.js

/*! This file is auto-generated */
this.wp=this.wp||{},this.wp.richText=function(e){var t={};function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)r.d(n,a,function(t){return e[t]}.bind(null,a));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s="yyEc")}({"1ZqX":function(e,t){!function(){e.exports=this.wp.data}()},"25BE":function(e,t,r){"use strict";function n(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}r.d(t,"a",(function(){return n}))},BsWD:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r("a3WO");function a(e,t){if(e){if("string"==typeof e)return Object(n.a)(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Object(n.a)(e,t):void 0}}},DSFK:function(e,t,r){"use strict";function n(e){if(Array.isArray(e))return e}r.d(t,"a",(function(){return n}))},Ff2n:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r("zLVn");function a(e,t){if(null==e)return{};var r,a,o=Object(n.a)(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}},GRId:function(e,t){!function(){e.exports=this.wp.element}()},KQm4:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r("a3WO");var a=r("25BE"),o=r("BsWD");function i(e){return function(e){if(Array.isArray(e))return Object(n.a)(e)}(e)||Object(a.a)(e)||Object(o.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},NMb1:function(e,t){!function(){e.exports=this.wp.deprecated}()},ODXe:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r("DSFK");var a=r("BsWD"),o=r("PYwp");function i(e,t){return Object(n.a)(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,a=!1,o=void 0;try{for(var i,c=e[Symbol.iterator]();!(n=(i=c.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){a=!0,o=e}finally{try{n||null==c.return||c.return()}finally{if(a)throw o}}return r}}(e,t)||Object(a.a)(e,t)||Object(o.a)()}},PYwp:function(e,t,r){"use strict";function n(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}r.d(t,"a",(function(){return n}))},RxS6:function(e,t){!function(){e.exports=this.wp.keycodes}()},TSYQ:function(e,t,r){var n;
/*!
  Copyright (c) 2017 Jed Watson.
  Licensed under the MIT License (MIT), see
  http://jedwatson.github.io/classnames
*/!function(){"use strict";var r={}.hasOwnProperty;function a(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var o=typeof n;if("string"===o||"number"===o)e.push(n);else if(Array.isArray(n)&&n.length){var i=a.apply(null,n);i&&e.push(i)}else if("object"===o)for(var c in n)r.call(n,c)&&n[c]&&e.push(c)}}return e.join(" ")}e.exports?(a.default=a,e.exports=a):void 0===(n=function(){return a}.apply(t,[]))||(e.exports=n)}()},U8pU:function(e,t,r){"use strict";function n(e){return(n="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)}r.d(t,"a",(function(){return n}))},Vx3V:function(e,t){!function(){e.exports=this.wp.escapeHtml}()},YLtl:function(e,t){!function(){e.exports=this.lodash}()},a3WO:function(e,t,r){"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}r.d(t,"a",(function(){return n}))},pPDe:function(e,t,r){"use strict";var n,a;function o(e){return[e]}function i(){var e={clear:function(){e.head=null}};return e}function c(e,t,r){var n;if(e.length!==t.length)return!1;for(n=r;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}n={},a="undefined"!=typeof WeakMap,t.a=function(e,t){var r,u;function s(){r=a?new WeakMap:i()}function l(){var r,n,a,o,i,s=arguments.length;for(o=new Array(s),a=0;a<s;a++)o[a]=arguments[a];for(i=t.apply(null,o),(r=u(i)).isUniqueByDependants||(r.lastDependants&&!c(i,r.lastDependants,0)&&r.clear(),r.lastDependants=i),n=r.head;n;){if(c(n.args,o,1))return n!==r.head&&(n.prev.next=n.next,n.next&&(n.next.prev=n.prev),n.next=r.head,n.prev=null,r.head.prev=n,r.head=n),n.val;n=n.next}return n={val:e.apply(null,o)},o[0]=null,n.args=o,r.head&&(r.head.prev=n,n.next=r.head),r.head=n,n.val}return t||(t=o),u=a?function(e){var t,a,o,c,u,s=r,l=!0;for(t=0;t<e.length;t++){if(a=e[t],!(u=a)||"object"!=typeof u){l=!1;break}s.has(a)?s=s.get(a):(o=new WeakMap,s.set(a,o),s=o)}return s.has(n)||((c=i()).isUniqueByDependants=l,s.set(n,c)),s.get(n)}:function(){return r},l.getDependants=t,l.clear=s,s(),l}},rePB:function(e,t,r){"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.d(t,"a",(function(){return n}))},wx14:function(e,t,r){"use strict";function n(){return(n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}r.d(t,"a",(function(){return n}))},yyEc:function(e,t,r){"use strict";r.r(t),r.d(t,"applyFormat",(function(){return _})),r.d(t,"concat",(function(){return M})),r.d(t,"create",(function(){return C})),r.d(t,"getActiveFormat",(function(){return V})),r.d(t,"getActiveObject",(function(){return K})),r.d(t,"getTextContent",(function(){return U})),r.d(t,"__unstableIsListRootSelected",(function(){return z})),r.d(t,"__unstableIsActiveListType",(function(){return Y})),r.d(t,"isCollapsed",(function(){return X})),r.d(t,"isEmpty",(function(){return G})),r.d(t,"__unstableIsEmptyLine",(function(){return q})),r.d(t,"join",(function(){return Q})),r.d(t,"registerFormatType",(function(){return $})),r.d(t,"removeFormat",(function(){return te})),r.d(t,"remove",(function(){return ae})),r.d(t,"replace",(function(){return oe})),r.d(t,"insert",(function(){return ne})),r.d(t,"__unstableInsertLineSeparator",(function(){return ie})),r.d(t,"__unstableRemoveLineSeparator",(function(){return se})),r.d(t,"insertObject",(function(){return le})),r.d(t,"slice",(function(){return de})),r.d(t,"split",(function(){return be})),r.d(t,"__unstableToDom",(function(){return Ce})),r.d(t,"toHTMLString",(function(){return Ie})),r.d(t,"toggleFormat",(function(){return ze})),r.d(t,"__UNSTABLE_LINE_SEPARATOR",(function(){return D})),r.d(t,"unregisterFormatType",(function(){return Ye})),r.d(t,"__unstableCanIndentListItems",(function(){return Xe})),r.d(t,"__unstableCanOutdentListItems",(function(){return Ge})),r.d(t,"__unstableIndentListItems",(function(){return Qe})),r.d(t,"__unstableOutdentListItems",(function(){return Je})),r.d(t,"__unstableChangeListType",(function(){return tt})),r.d(t,"__unstableCreateElement",(function(){return P})),r.d(t,"__experimentalRichText",(function(){return Tt})),r.d(t,"__unstableFormatEdit",(function(){return pt}));var n={};r.r(n),r.d(n,"getFormatTypes",(function(){return p})),r.d(n,"getFormatType",(function(){return d})),r.d(n,"getFormatTypeForBareElement",(function(){return b})),r.d(n,"getFormatTypeForClassName",(function(){return m}));var a={};r.r(a),r.d(a,"addFormatTypes",(function(){return v})),r.d(a,"removeFormatTypes",(function(){return g}));var o=r("1ZqX"),i=r("rePB"),c=r("YLtl");function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){Object(i.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var l=Object(o.combineReducers)({formatTypes:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_FORMAT_TYPES":return s({},e,{},Object(c.keyBy)(t.formatTypes,"name"));case"REMOVE_FORMAT_TYPES":return Object(c.omit)(e,t.names)}return e}}),f=r("pPDe"),p=Object(f.a)((function(e){return Object.values(e.formatTypes)}),(function(e){return[e.formatTypes]}));function d(e,t){return e.formatTypes[t]}function b(e,t){return Object(c.find)(p(e),(function(e){var r=e.className,n=e.tagName;return null===r&&t===n}))}function m(e,t){return Object(c.find)(p(e),(function(e){var r=e.className;return null!==r&&" ".concat(t," ").indexOf(" ".concat(r," "))>=0}))}function v(e){return{type:"ADD_FORMAT_TYPES",formatTypes:Object(c.castArray)(e)}}function g(e){return{type:"REMOVE_FORMAT_TYPES",names:Object(c.castArray)(e)}}Object(o.registerStore)("core/rich-text",{reducer:l,selectors:n,actions:a});var h=r("KQm4");function O(e,t){if(e===t)return!0;if(!e||!t)return!1;if(e.type!==t.type)return!1;var r=e.attributes,n=t.attributes;if(r===n)return!0;if(!r||!n)return!1;var a=Object.keys(r),o=Object.keys(n);if(a.length!==o.length)return!1;for(var i=a.length,c=0;c<i;c++){var u=a[c];if(r[u]!==n[u])return!1}return!0}function y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function j(e){var t=e.formats.slice();return t.forEach((function(e,r){var n=t[r-1];if(n){var a=e.slice();a.forEach((function(e,t){var r=n[t];O(e,r)&&(a[t]=r)})),t[r]=a}})),function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?y(Object(r),!0).forEach((function(t){Object(i.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e,{formats:t})}function x(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function w(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?x(Object(r),!0).forEach((function(t){Object(i.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):x(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function T(e,t,r){return(e=e.slice())[t]=r,e}function _(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.start,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.end,a=e.formats,o=e.activeFormats,i=a.slice();if(r===n){var u=Object(c.find)(i[r],{type:t.type});if(u){for(var s=i[r].indexOf(u);i[r]&&i[r][s]===u;)i[r]=T(i[r],s,t),r--;for(n++;i[n]&&i[n][s]===u;)i[n]=T(i[n],s,t),n++}}else{for(var l=1/0,f=r;f<n;f++)if(i[f]){i[f]=i[f].filter((function(e){return e.type!==t.type}));var p=i[f].length;p<l&&(l=p)}else i[f]=[],l=0;for(var d=r;d<n;d++)i[d].splice(l,0,t)}return j(w({},e,{formats:i,activeFormats:[].concat(Object(h.a)(Object(c.reject)(o,{type:t.type})),[t])}))}var E=r("U8pU");function P(e,t){var r=e.implementation;return P.body||(P.body=r.createHTMLDocument("").body),P.body.innerHTML=t,P.body}var D="\u2028";function S(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function F(e,t){for(var r in e)if(e[r]===t)return r}function C(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.element,r=e.text,n=e.html,a=e.range,o=e.multilineTag,i=e.multilineWrapperTags,c=e.__unstableIsEditableTree,u=e.preserveWhiteSpace;return"string"==typeof r&&r.length>0?{formats:Array(r.length),replacements:Array(r.length),text:r}:("string"==typeof n&&n.length>0&&(t=P(document,n)),"object"!==Object(E.a)(t)?{formats:[],replacements:[],text:""}:o?k({element:t,range:a,multilineTag:o,multilineWrapperTags:i,isEditableTree:c,preserveWhiteSpace:u}):R({element:t,range:a,isEditableTree:c,preserveWhiteSpace:u}))}function A(e,t,r,n){if(r){var a=t.parentNode,o=r.startContainer,i=r.startOffset,c=r.endContainer,u=r.endOffset,s=e.text.length;void 0!==n.start?e.start=s+n.start:t===o&&t.nodeType===t.TEXT_NODE?e.start=s+i:a===o&&t===o.childNodes[i]?e.start=s:a===o&&t===o.childNodes[i-1]?e.start=s+n.text.length:t===o&&(e.start=s),void 0!==n.end?e.end=s+n.end:t===c&&t.nodeType===t.TEXT_NODE?e.end=s+u:a===c&&t===c.childNodes[u-1]?e.end=s+n.text.length:a===c&&t===c.childNodes[u]?e.end=s:t===c&&(e.end=s+u)}}var N=new RegExp("\ufeff","g");function I(e){return e.replace(N,"")}function R(e){var t=e.element,r=e.range,n=e.multilineTag,a=e.multilineWrapperTags,c=e.currentWrapperTags,u=void 0===c?[]:c,s=e.isEditableTree,l=e.preserveWhiteSpace,f={formats:[],replacements:[],text:""};if(!t)return f;if(!t.hasChildNodes())return A(f,t,r,{formats:[],replacements:[],text:""}),f;for(var p=t.childNodes.length,d=function(e){var c=t.childNodes[e],p=c.nodeName.toLowerCase();if(c.nodeType===c.TEXT_NODE){var d=I;l||(d=function(e){return I(function(e){return e.replace(/[\n\r\t]+/g," ")}(e))});var b=d(c.nodeValue);return r=function(e,t,r){if(t){var n=t.startContainer,a=t.endContainer,o=t.startOffset,i=t.endOffset;return e===n&&(o=r(e.nodeValue.slice(0,o)).length),e===a&&(i=r(e.nodeValue.slice(0,i)).length),{startContainer:n,startOffset:o,endContainer:a,endOffset:i}}}(c,r,d),A(f,c,r,{text:b}),f.formats.length+=b.length,f.replacements.length+=b.length,f.text+=b,"continue"}if(c.nodeType!==c.ELEMENT_NODE)return"continue";if(s&&(c.getAttribute("data-rich-text-placeholder")||"br"===p&&!c.getAttribute("data-rich-text-line-break")))return A(f,c,r,{formats:[],replacements:[],text:""}),"continue";if("script"===p){var m={formats:[,],replacements:[{type:p,attributes:{"data-rich-text-script":c.getAttribute("data-rich-text-script")||encodeURIComponent(c.innerHTML)}}],text:""};return A(f,c,r,m),L(f,m),"continue"}if("br"===p)return A(f,c,r,{formats:[],replacements:[],text:""}),L(f,C({text:"\n"})),"continue";var v=f.formats[f.formats.length-1],g=v&&v[v.length-1],y=function(e){var t,r=e.type,n=e.attributes;if(n&&n.class&&(t=Object(o.select)("core/rich-text").getFormatTypeForClassName(n.class))&&(n.class=" ".concat(n.class," ").replace(" ".concat(t.className," ")," ").trim(),n.class||delete n.class),t||(t=Object(o.select)("core/rich-text").getFormatTypeForBareElement(r)),!t)return n?{type:r,attributes:n}:{type:r};if(t.__experimentalCreatePrepareEditableTree&&!t.__experimentalCreateOnChangeEditableValue)return null;if(!n)return{type:t.name};var a={},i={};for(var c in n){var u=F(t.attributes,c);u?a[u]=n[c]:i[c]=n[c]}return{type:t.name,attributes:a,unregisteredAttributes:i}}({type:p,attributes:W({element:c})}),j=O(y,g)?g:y;if(a&&-1!==a.indexOf(p)){var x=k({element:c,range:r,multilineTag:n,multilineWrapperTags:a,currentWrapperTags:[].concat(Object(h.a)(u),[j]),isEditableTree:s,preserveWhiteSpace:l});return A(f,c,r,x),L(f,x),"continue"}var w=R({element:c,range:r,multilineTag:n,multilineWrapperTags:a,isEditableTree:s,preserveWhiteSpace:l});if(A(f,c,r,w),j)if(0===w.text.length)j.attributes&&L(f,{formats:[,],replacements:[j],text:""});else{function T(e){if(T.formats===e)return T.newFormats;var t=e?[j].concat(Object(h.a)(e)):[j];return T.formats=e,T.newFormats=t,t}T.newFormats=[j],L(f,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?S(Object(r),!0).forEach((function(t){Object(i.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):S(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},w,{formats:Array.from(w.formats,T)}))}else L(f,w)},b=0;b<p;b++)d(b);return f}function k(e){var t=e.element,r=e.range,n=e.multilineTag,a=e.multilineWrapperTags,o=e.currentWrapperTags,i=void 0===o?[]:o,c=e.isEditableTree,u=e.preserveWhiteSpace,s={formats:[],replacements:[],text:""};if(!t||!t.hasChildNodes())return s;for(var l=t.children.length,f=0;f<l;f++){var p=t.children[f];if(p.nodeName.toLowerCase()===n){var d=R({element:p,range:r,multilineTag:n,multilineWrapperTags:a,currentWrapperTags:i,isEditableTree:c,preserveWhiteSpace:u});(0!==f||i.length>0)&&L(s,{formats:[,],replacements:i.length>0?[i]:[,],text:D}),A(s,p,r,d),L(s,d)}}return s}function W(e){var t=e.element;if(t.hasAttributes()){for(var r,n=t.attributes.length,a=0;a<n;a++){var o=t.attributes[a],i=o.name,c=o.value;if(0!==i.indexOf("data-rich-text-"))(r=r||{})[/^on/i.test(i)?"data-disable-rich-text-"+i:i]=c}return r}}function L(e,t){return e.formats=e.formats.concat(t.formats),e.replacements=e.replacements.concat(t.replacements),e.text+=t.text,e}function M(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return j(t.reduce(L,C()))}function B(e){var t=e.formats,r=e.start,n=e.end,a=e.activeFormats,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(void 0===r)return o;if(r===n){if(a)return a;var i=t[r-1]||o,c=t[r]||o;return i.length<c.length?i:c}return t[r]||o}function V(e,t){return Object(c.find)(B(e),{type:t})}function K(e){var t=e.start,r=e.end,n=e.replacements,a=e.text;if(t+1===r&&""===a[t])return n[t]}function U(e){return e.text}function H(e){for(var t=e.start,r=e.text,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,a=n;a--;)if(r[a]===D)return a}function z(e){var t=e.replacements[H(e,e.start)];return!t||t.length<1}function Y(e,t,r){var n=e.replacements[H(e,e.start)];return n&&0!==n.length?n[n.length-1].type===t:t===r}function X(e){var t=e.start,r=e.end;if(void 0!==t&&void 0!==r)return t===r}function G(e){return 0===e.text.length}function q(e){var t=e.text,r=e.start,n=e.end;return r===n&&(0===t.length||(0===r&&t.slice(0,1)===D||(r===t.length&&t.slice(-1)===D||t.slice(r-1,n+1)==="".concat(D).concat(D))))}function Q(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return"string"==typeof t&&(t=C({text:t})),j(e.reduce((function(e,r){var n=r.formats,a=r.replacements,o=r.text;return{formats:e.formats.concat(t.formats,n),replacements:e.replacements.concat(t.replacements,a),text:e.text+t.text+o}})))}function Z(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function $(e,t){if("string"==typeof(t=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Z(Object(r),!0).forEach((function(t){Object(i.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Z(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({name:e},t)).name)if(/^[a-z][a-z0-9-]*\/[a-z][a-z0-9-]*$/.test(t.name))if(Object(o.select)("core/rich-text").getFormatType(t.name))window.console.error('Format "'+t.name+'" is already registered.');else if("string"==typeof t.tagName&&""!==t.tagName)if("string"==typeof t.className&&""!==t.className||null===t.className)if(/^[_a-zA-Z]+[a-zA-Z0-9-]*$/.test(t.className)){if(null===t.className){var r=Object(o.select)("core/rich-text").getFormatTypeForBareElement(t.tagName);if(r)return void window.console.error('Format "'.concat(r.name,'" is already registered to handle bare tag name "').concat(t.tagName,'".'))}else{var n=Object(o.select)("core/rich-text").getFormatTypeForClassName(t.className);if(n)return void window.console.error('Format "'.concat(n.name,'" is already registered to handle class name "').concat(t.className,'".'))}if("title"in t&&""!==t.title)if("keywords"in t&&t.keywords.length>3)window.console.error('The format "'+t.name+'" can have a maximum of 3 keywords.');else{if("string"==typeof t.title)return Object(o.dispatch)("core/rich-text").addFormatTypes(t),t;window.console.error("Format titles must be strings.")}else window.console.error('The format "'+t.name+'" must have a title.')}else window.console.error("A class name must begin with a letter, followed by any number of hyphens, letters, or numbers.");else window.console.error("Format class names must be a string, or null to handle bare elements.");else window.console.error("Format tag names must be a string.");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 J(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ee(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?J(Object(r),!0).forEach((function(t){Object(i.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):J(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function te(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.start,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.end,a=e.formats,o=e.activeFormats,i=a.slice();if(r===n){var u=Object(c.find)(i[r],{type:t});if(u){for(;Object(c.find)(i[r],u);)re(i,r,t),r--;for(n++;Object(c.find)(i[n],u);)re(i,n,t),n++}}else for(var s=r;s<n;s++)i[s]&&re(i,s,t);return j(ee({},e,{formats:i,activeFormats:Object(c.reject)(o,{type:t})}))}function re(e,t,r){var n=e[t].filter((function(e){return e.type!==r}));n.length?e[t]=n:delete e[t]}function ne(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.start,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.end,a=e.formats,o=e.replacements,i=e.text;"string"==typeof t&&(t=C({text:t}));var c=r+t.text.length;return j({formats:a.slice(0,r).concat(t.formats,a.slice(n)),replacements:o.slice(0,r).concat(t.replacements,o.slice(n)),text:i.slice(0,r)+t.text+i.slice(n),start:c,end:c})}function ae(e,t,r){return ne(e,C(),t,r)}function oe(e,t,r){var n=e.formats,a=e.replacements,o=e.text,i=e.start,c=e.end;return o=o.replace(t,(function(e){for(var t=arguments.length,o=new Array(t>1?t-1:0),u=1;u<t;u++)o[u-1]=arguments[u];var s,l,f=o[o.length-2],p=r;return"function"==typeof p&&(p=r.apply(void 0,[e].concat(o))),"object"===Object(E.a)(p)?(s=p.formats,l=p.replacements,p=p.text):(s=Array(p.length),l=Array(p.length),n[f]&&(s=s.fill(n[f]))),n=n.slice(0,f).concat(s,n.slice(f+e.length)),a=a.slice(0,f).concat(l,a.slice(f+e.length)),i&&(i=c=f+p.length),p})),j({formats:n,replacements:a,text:o,start:i,end:c})}function ie(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.start,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.end,n=U(e).slice(0,t),a=n.lastIndexOf(D),o=e.replacements[a],i=[,];o&&(i=[o]);var c={formats:[,],replacements:i,text:D};return ne(e,c,t,r)}function ce(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ue(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ce(Object(r),!0).forEach((function(t){Object(i.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ce(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function se(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=e.replacements,n=e.text,a=e.start,o=e.end,i=X(e),c=a-1,u=i?a-1:a,s=o;if(t||(c=o,u=a,s=i?o+1:o),n[c]===D){var l;if(i&&r[c]&&r[c].length){var f=r.slice();f[c]=r[c].slice(0,-1),l=ue({},e,{replacements:f})}else l=ae(e,u,s);return l}}function le(e,t,r,n){return ne(e,{formats:[,],replacements:[t],text:""},r,n)}function fe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function pe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?fe(Object(r),!0).forEach((function(t){Object(i.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function de(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.start,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.end,n=e.formats,a=e.replacements,o=e.text;return void 0===t||void 0===r?pe({},e):{formats:n.slice(t,r),replacements:a.slice(t,r),text:o.slice(t,r)}}function be(e,t){var r=e.formats,n=e.replacements,a=e.text,o=e.start,i=e.end;if("string"!=typeof t)return me.apply(void 0,arguments);var c=0;return a.split(t).map((function(e){var a=c,u={formats:r.slice(a,a+e.length),replacements:n.slice(a,a+e.length),text:e};return c+=t.length+e.length,void 0!==o&&void 0!==i&&(o>=a&&o<c?u.start=o-a:o<a&&i>a&&(u.start=0),i>=a&&i<c?u.end=i-a:o<c&&i>c&&(u.end=e.length)),u}))}function me(e){var t=e.formats,r=e.replacements,n=e.text,a=e.start,o=e.end,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o,u={formats:t.slice(0,i),replacements:r.slice(0,i),text:n.slice(0,i)},s={formats:t.slice(c),replacements:r.slice(c),text:n.slice(c),start:0,end:0};return[oe(u,/\u2028+$/,""),oe(s,/^\u2028+/,"")]}function ve(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ge(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ve(Object(r),!0).forEach((function(t){Object(i.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ve(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function he(e,t){if(t)return e;var r={};for(var n in e){var a=n;n.startsWith("data-disable-rich-text-")&&(a=n.slice("data-disable-rich-text-".length)),r[a]=e[n]}return r}function Oe(e){var t=e.type,r=e.attributes,n=e.unregisteredAttributes,a=e.object,i=e.boundaryClass,c=e.isEditableTree,u=function(e){return Object(o.select)("core/rich-text").getFormatType(e)}(t),s={};if(i&&(s["data-rich-text-format-boundary"]="true"),!u)return r&&(s=ge({},r,{},s)),{type:t,attributes:he(s,c),object:a};for(var l in s=ge({},n,{},s),r){var f=!!u.attributes&&u.attributes[l];f?s[f]=r[l]:s[l]=r[l]}return u.className&&(s.class?s.class="".concat(u.className," ").concat(s.class):s.class=u.className),{type:u.tagName,object:u.object,attributes:he(s,c)}}function ye(e){var t,r,n,a=e.value,o=e.multilineTag,i=e.preserveWhiteSpace,c=e.createEmpty,u=e.append,s=e.getLastChild,l=e.getParent,f=e.isText,p=e.getText,d=e.remove,b=e.appendText,m=e.onStartIndex,v=e.onEndIndex,g=e.isEditableTree,O=e.placeholder,y=a.formats,j=a.replacements,x=a.text,w=a.start,T=a.end,_=y.length+1,E=c(),P={type:o},S=B(a),F=S[S.length-1];o?(u(u(E,{type:o}),""),r=t=[P]):u(E,"");for(var C=function(e){var a=x.charAt(e),c=g&&(!n||n===D||"\n"===n),_=y[e];o&&(_=a===D?t=(j[e]||[]).reduce((function(e,t){return e.push(t,P),e}),[P]):[].concat(Object(h.a)(t),Object(h.a)(_||[])));var S=s(E);if(c&&a===D){for(var C=S;!f(C);)C=s(C);u(l(C),"\ufeff")}if(n===D){for(var A=S;!f(A);)A=s(A);m&&w===e&&m(E,A),v&&T===e&&v(E,A)}if(_&&_.forEach((function(e,t){if(S&&r&&function(e,t,r){do{if(e[r]!==t[r])return!1}while(r--);return!0}(_,r,t)&&(a!==D||_.length-1!==t))S=s(S);else{var n=e.type,o=e.attributes,i=e.unregisteredAttributes,c=g&&a!==D&&e===F,b=l(S),m=u(b,Oe({type:n,attributes:o,unregisteredAttributes:i,boundaryClass:c,isEditableTree:g}));f(S)&&0===p(S).length&&d(S),S=u(m,"")}})),a===D)return r=_,n=a,"continue";0===e&&(m&&0===w&&m(E,S),v&&0===T&&v(E,S)),""===a?(g||"script"!==j[e].type?S=u(l(S),Oe(ge({},j[e],{object:!0,isEditableTree:g}))):(S=u(l(S),Oe({type:"script",isEditableTree:g})),u(S,{html:decodeURIComponent(j[e].attributes["data-rich-text-script"])})),S=u(l(S),"")):i||"\n"!==a?f(S)?b(S,a):S=u(l(S),a):(S=u(l(S),{type:"br",attributes:g?{"data-rich-text-line-break":"true"}:void 0,object:!0}),S=u(l(S),"")),m&&w===e+1&&m(E,S),v&&T===e+1&&v(E,S),c&&e===x.length&&(u(l(S),"\ufeff"),O&&0===x.length&&u(l(S),{type:"span",attributes:{"data-rich-text-placeholder":O,contenteditable:"false"}})),r=_,n=a},A=0;A<_;A++)C(A);return E}function je(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function xe(e,t,r){for(var n=e.parentNode,a=0;e=e.previousSibling;)a++;return r=[a].concat(Object(h.a)(r)),n!==t&&(r=xe(n,t,r)),r}function we(e,t){for(t=Object(h.a)(t);e&&t.length>1;)e=e.childNodes[t.shift()];return{node:e,offset:t[0]}}function Te(e,t){"string"==typeof t&&(t=e.ownerDocument.createTextNode(t));var r=t,n=r.type,a=r.attributes;if(n)for(var o in t=e.ownerDocument.createElement(n),a)t.setAttribute(o,a[o]);return e.appendChild(t)}function _e(e,t){e.appendData(t)}function Ee(e){return e.lastChild}function Pe(e){return e.parentNode}function De(e){return e.nodeType===e.TEXT_NODE}function Se(e){return e.nodeValue}function Fe(e){return e.parentNode.removeChild(e)}function Ce(e){var t=e.value,r=e.multilineTag,n=e.prepareEditableTree,a=e.isEditableTree,o=void 0===a||a,c=e.placeholder,u=e.doc,s=void 0===u?document:u,l=[],f=[];n&&(t=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?je(Object(r),!0).forEach((function(t){Object(i.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):je(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},t,{formats:n(t)}));return{body:ye({value:t,multilineTag:r,createEmpty:function(){return P(s,"")},append:Te,getLastChild:Ee,getParent:Pe,isText:De,getText:Se,remove:Fe,appendText:_e,onStartIndex:function(e,t){l=xe(t,e,[t.nodeValue.length])},onEndIndex:function(e,t){f=xe(t,e,[t.nodeValue.length])},isEditableTree:o,placeholder:c}),selection:{startPath:l,endPath:f}}}function Ae(e){var t=e.value,r=e.current,n=e.multilineTag,a=e.prepareEditableTree,o=e.__unstableDomOnly,i=Ce({value:t,multilineTag:n,prepareEditableTree:a,placeholder:e.placeholder,doc:r.ownerDocument}),c=i.body,u=i.selection;!function e(t,r){var n,a=0;for(;n=t.firstChild;){var o=r.childNodes[a];if(o)if(o.isEqualNode(n))t.removeChild(n);else if(o.nodeName!==n.nodeName||o.nodeType===o.TEXT_NODE&&o.data!==n.data)r.replaceChild(n,o);else{var i=o.attributes,c=n.attributes;if(i)for(var u=i.length;u--;){var s=i[u].name;n.getAttribute(s)||o.removeAttribute(s)}if(c)for(var l=0;l<c.length;l++){var f=c[l],p=f.name,d=f.value;o.getAttribute(p)!==d&&o.setAttribute(p,d)}e(n,o),t.removeChild(n)}else r.appendChild(n);a++}for(;r.childNodes[a];)r.removeChild(r.childNodes[a])}(c,r),void 0===t.start||o||function(e,t){var r=e.startPath,n=e.endPath,a=we(t,r),o=a.node,i=a.offset,c=we(t,n),u=c.node,s=c.offset,l=t.ownerDocument,f=l.defaultView,p=f.getSelection(),d=l.createRange();d.setStart(o,i),d.setEnd(u,s);var b=l.activeElement;if(p.rangeCount>0){if(m=d,v=p.getRangeAt(0),m.startContainer===v.startContainer&&m.startOffset===v.startOffset&&m.endContainer===v.endContainer&&m.endOffset===v.endOffset)return;p.removeAllRanges()}var m,v;p.addRange(d),b!==l.activeElement&&b instanceof f.HTMLElement&&b.focus()}(u,r)}var Ne=r("Vx3V");function Ie(e){return He(ye({value:e.value,multilineTag:e.multilineTag,preserveWhiteSpace:e.preserveWhiteSpace,createEmpty:Re,append:We,getLastChild:ke,getParent:Me,isText:Be,getText:Ve,remove:Ke,appendText:Le}).children)}function Re(){return{}}function ke(e){var t=e.children;return t&&t[t.length-1]}function We(e,t){return"string"==typeof t&&(t={text:t}),t.parent=e,e.children=e.children||[],e.children.push(t),t}function Le(e,t){e.text+=t}function Me(e){return e.parent}function Be(e){return"string"==typeof e.text}function Ve(e){return e.text}function Ke(e){var t=e.parent.children.indexOf(e);return-1!==t&&e.parent.children.splice(t,1),e}function Ue(e){var t=e.type,r=e.attributes,n=e.object,a=e.children,o="";for(var i in r)Object(Ne.isValidAttributeName)(i)&&(o+=" ".concat(i,'="').concat(Object(Ne.escapeAttribute)(r[i]),'"'));return n?"<".concat(t).concat(o,">"):"<".concat(t).concat(o,">").concat(He(a),"</").concat(t,">")}function He(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map((function(e){return void 0!==e.html?e.html:void 0===e.text?Ue(e):Object(Ne.escapeEditableHTML)(e.text)})).join("")}function ze(e,t){return V(e,t.type)?te(e,t.type):_(e,t)}function Ye(e){var t=Object(o.select)("core/rich-text").getFormatType(e);if(t)return Object(o.dispatch)("core/rich-text").removeFormatTypes(e),t;window.console.error("Format ".concat(e," is not registered."))}function Xe(e){var t=H(e);if(void 0===t)return!1;var r=e.replacements,n=H(e,t),a=r[t]||[],o=r[n]||[];return a.length<=o.length}function Ge(e){return void 0!==e.replacements[H(e,e.start)]}function qe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Qe(e,t){if(!Xe(e))return e;for(var r=H(e),n=H(e,r),a=e.text,o=e.replacements,c=e.end,u=o.slice(),s=function(e,t){for(var r=e.text,n=e.replacements,a=n[t]||[],o=t;o-- >=0;)if(r[o]===D){var i=n[o]||[];if(i.length===a.length+1)return o;if(i.length<=a.length)return}}(e,r),l=r;l<c;l++)if(a[l]===D)if(s){var f=o[s]||[];u[l]=f.concat((u[l]||[]).slice(f.length-1))}else{var p=o[n]||[],d=p[p.length-1]||t;u[l]=p.concat([d],(u[l]||[]).slice(p.length))}return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?qe(Object(r),!0).forEach((function(t){Object(i.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e,{replacements:u})}function Ze(e,t){for(var r=e.text,n=e.replacements,a=n[t]||[],o=t;o-- >=0;){if(r[o]===D)if((n[o]||[]).length===a.length-1)return o}}function $e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Je(e){if(!Ge(e))return e;for(var t=e.text,r=e.replacements,n=e.start,a=e.end,o=H(e,n),c=r.slice(0),u=r[Ze(e,o)]||[],s=function(e,t){for(var r=e.text,n=e.replacements,a=n[t]||[],o=t,i=t||0;i<r.length;i++)if(r[i]===D){if(!((n[i]||[]).length>=a.length))return o;o=i}return o}(e,H(e,a)),l=o;l<=s;l++)if(t[l]===D){var f=c[l]||[];c[l]=u.concat(f.slice(u.length+1)),0===c[l].length&&delete c[l]}return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?$e(Object(r),!0).forEach((function(t){Object(i.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$e(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e,{replacements:c})}function et(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function tt(e,t){for(var r,n=e.text,a=e.replacements,o=e.start,c=e.end,u=H(e,o),s=a[u]||[],l=a[H(e,c)]||[],f=Ze(e,u),p=a.slice(),d=s.length-1,b=l.length-1,m=f+1||0;m<n.length;m++)if(n[m]===D){if((p[m]||[]).length<=d)break;p[m]&&(r=!0,p[m]=p[m].map((function(e,r){return r<d||r>b?e:t})))}return r?function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?et(Object(r),!0).forEach((function(t){Object(i.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):et(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e,{replacements:p}):e}var rt=r("wx14"),nt=r("ODXe"),at=r("Ff2n"),ot=r("GRId"),it=r("TSYQ"),ct=r.n(it),ut=r("RxS6"),st=r("NMb1"),lt=r.n(st),ft=new Set(["a","audio","button","details","embed","iframe","input","label","select","textarea","video"]);function pt(e){var t=e.formatTypes,r=e.onChange,n=e.onFocus,a=e.value,o=e.allowedFormats,i=e.withoutInteractiveFormatting;return t.map((function(e){var t=e.name,c=e.edit,u=e.tagName;if(!c)return null;if(o&&-1===o.indexOf(t))return null;if(i&&ft.has(u))return null;var s=V(a,t),l=void 0!==s,f=K(a),p=void 0!==f&&f.type===t;return Object(ot.createElement)(c,{key:t,isActive:l,activeAttributes:l&&s.attributes||{},isObjectActive:p,activeObjectAttributes:p&&f.attributes||{},value:a,onChange:r,onFocus:n})}))}function dt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function bt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?dt(Object(r),!0).forEach((function(t){Object(i.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function mt(e){return e("core/rich-text").getFormatTypes()}function vt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function gt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?vt(Object(r),!0).forEach((function(t){Object(i.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ht=new Set(["insertParagraph","insertOrderedList","insertUnorderedList","insertHorizontalRule","insertLink"]),Ot={whiteSpace:"pre-wrap"},yt=[];function jt(e,t){var r=Object.keys(e).reduce((function(r,n){return n.startsWith(t)&&r.push(e[n]),r}),[]);return function(e){return r.reduce((function(t,r){return r(t,e.text)}),e.formats)}}var xt,wt=(xt=function(e){var t=e.tagName,r=void 0===t?"div":t,n=e.value,a=void 0===n?"":n,o=e.selectionStart,i=e.selectionEnd,u=e.children,s=e.allowedFormats,l=e.withoutInteractiveFormatting,f=e.formatTypes,p=e.style,d=e.className,b=e.placeholder,m=e.disabled,v=e.preserveWhiteSpace,g=e.onPaste,h=e.format,y=void 0===h?"string":h,j=e.onDelete,x=e.onEnter,w=e.onSelectionChange,T=e.onChange,_=e.unstableOnFocus,E=e.setFocusedElement,P=e.instanceId,S=e.__unstableMultilineTag,F=e.__unstableMultilineRootTag,A=e.__unstableDisableFormats,N=e.__unstableDidAutomaticChange,I=e.__unstableInputRule,R=e.__unstableMarkAutomaticChange,k=e.__unstableAllowPrefixTransformations,W=e.__unstableUndo,L=e.__unstableIsCaretWithinFormattedText,M=e.__unstableOnEnterFormattedText,V=e.__unstableOnExitFormattedText,K=e.__unstableOnCreateUndoLevel,U=e.__unstableIsSelected,H=e.forwardedRef,z=Object(at.a)(e,["tagName","value","selectionStart","selectionEnd","children","allowedFormats","withoutInteractiveFormatting","formatTypes","style","className","placeholder","disabled","preserveWhiteSpace","onPaste","format","onDelete","onEnter","onSelectionChange","onChange","unstableOnFocus","setFocusedElement","instanceId","__unstableMultilineTag","__unstableMultilineRootTag","__unstableDisableFormats","__unstableDidAutomaticChange","__unstableInputRule","__unstableMarkAutomaticChange","__unstableAllowPrefixTransformations","__unstableUndo","__unstableIsCaretWithinFormattedText","__unstableOnEnterFormattedText","__unstableOnExitFormattedText","__unstableOnCreateUndoLevel","__unstableIsSelected","forwardedRef"]),Y=Object(ot.useState)(),G=Object(nt.a)(Y,2),Q=G[0],Z=void 0===Q?[]:Q,$=G[1];function J(){return H.current.ownerDocument}function ee(){return J().defaultView}function re(e){if(A)return{text:e,formats:Array(e.length),replacements:Array(e.length)};if("string"!==y)return e;var t=jt(z,"format_value_functions"),r=C({html:e,multilineTag:S,multilineWrapperTags:"li"===S?["ul","ol"]:void 0,preserveWhiteSpace:v});return r.formats=t(r),r}function oe(e){return f.forEach((function(t){t.__experimentalCreatePrepareEditableTree&&(e=te(e,t.name,0,e.text.length))})),e}function ie(e){return A?e.text:(e=oe(e),"string"===y?Ie({value:e,multilineTag:S,preserveWhiteSpace:v}):void 0)}F||"string"!=typeof r||(F=r);var ce=Object(ot.useRef)(a),ue=Object(ot.useRef)(Object(ot.useMemo)((function(){var e=re(a);return e.start=o,e.end=i,e}),[]));function le(){var e=ee().getSelection(),t=e.rangeCount>0?e.getRangeAt(0):null;return C({element:H.current,range:t,multilineTag:S,multilineWrapperTags:"li"===S?["ul","ol"]:void 0,__unstableIsEditableTree:!0,preserveWhiteSpace:v})}function fe(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.domOnly;Ae({value:e,current:H.current,multilineTag:S,multilineWrapperTags:"li"===S?["ul","ol"]:void 0,prepareEditableTree:jt(z,"format_prepare_functions"),__unstableDomOnly:r,placeholder:b})}var pe=Object(ot.useRef)(a);function de(){pe.current!==ce.current&&(K(),pe.current=ce.current)}var be=Object(ot.useRef)(!1),me=Object(ot.useRef)();function ve(e){var t;if(!be.current)if(e&&(t=e.inputType),!t&&e&&e.nativeEvent&&(t=e.nativeEvent.inputType),!t||0!==t.indexOf("format")&&!ht.has(t)){var r=le(),n=ue.current,a=n.start,o=n.activeFormats,i=void 0===o?[]:o,c=function(e){var t=e.value,r=e.start,n=e.end,a=e.formats,o=t.formats[r-1]||[],i=t.formats[n]||[];for(t.activeFormats=a.map((function(e,t){if(o[t]){if(O(e,o[t]))return o[t]}else if(i[t]&&O(e,i[t]))return i[t];return e}));--n>=r;)t.activeFormats.length>0?t.formats[n]=t.activeFormats:delete t.formats[n];return t}({value:r,start:a,end:r.start,formats:i});if(Oe(c,{withoutHistory:!0}),ee().clearTimeout(me.current),me.current=ee().setTimeout(de,1e3),"insertText"===t){k&&I&&I(c,ie);var u=f.reduce((function(e,t){var r=t.__unstableInputRule;return r&&(e=r(e)),e}),c);u!==c&&(de(),Oe(gt({},u,{activeFormats:i})),R())}}else fe(ue.current)}var ge=Object(ot.useRef)(!1);function he(e){if(H.current&&document.activeElement===H.current&&("selectionchange"===e.type||U)&&!m&&!be.current){var t=le(),r=t.start,n=t.end,a=t.text,o=ue.current;if(a===o.text)if(r!==o.start||n!==o.end){var i=gt({},o,{start:r,end:n,activeFormats:void 0}),c=B(i,yt);i.activeFormats=c,!L&&c.length?M():L&&!c.length&&V(),ue.current=i,fe(i,{domOnly:!0}),w(r,n),$(c)}else 0===o.text.length&&0===r&&function(e){var t=e.getSelection(),r=t.anchorNode,n=t.anchorOffset;if(r.nodeType===r.ELEMENT_NODE){var a=r.childNodes[n];a&&a.nodeType===a.ELEMENT_NODE&&a.getAttribute("data-rich-text-placeholder")&&t.collapseToStart()}}(ee());else ve()}}function Oe(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.withoutHistory;A&&(e.formats=Array(e.text.length),e.replacements=Array(e.text.length)),fe(e);var n=e.start,a=e.end,o=e.activeFormats,i=void 0===o?[]:o,u=Object(c.pickBy)(z,(function(e,t){return t.startsWith("format_on_change_functions_")}));Object.values(u).forEach((function(t){t(e.formats,e.text)})),ce.current=ie(e),ue.current=e,w(n,a),T(ce.current),$(i),r||de()}function ye(e){var t=e.target;if(t!==H.current&&!t.textContent){var r=t.parentNode,n=Array.from(r.childNodes).indexOf(t),a=J().createRange(),o=ee().getSelection();a.setStart(t.parentNode,n),a.setEnd(t.parentNode,n+1),o.removeAllRanges(),o.addRange(a)}}var je=Object(ot.useRef)();function xe(){ce.current=a,ue.current=re(a),ue.current.start=o,ue.current.end=i,fe(ue.current)}Object(ot.useEffect)((function(){ge.current&&xe()}),[r,b]),Object(ot.useEffect)((function(){ge.current&&a!==ce.current&&xe()}),[a]),Object(ot.useEffect)((function(){ge.current&&(!U||o===ue.current.start&&i===ue.current.end?ue.current=gt({},ue.current,{start:o,end:i}):xe())}),[o,i,U]);var we=Object(c.pickBy)(z,(function(e,t){return t.startsWith("format_prepare_props_")}));function Te(){H.current.focus(),fe(ue.current)}Object(ot.useEffect)((function(){ge.current&&xe()}),Object.values(we)),Object(ot.useLayoutEffect)((function(){return fe(ue.current,{domOnly:!0}),ge.current=!0,function(){J().removeEventListener("selectionchange",he),ee().cancelAnimationFrame(je.current),ee().clearTimeout(me.current)}}),[]);var _e=Object(c.pickBy)(z,(function(e,t){return Object(c.startsWith)(t,"aria-")})),Ee=gt({role:"textbox","aria-multiline":!0,"aria-label":b},_e,{ref:H,style:p?gt({},p,{whiteSpace:"pre-wrap"}):Ot,className:ct()("rich-text",d),onPaste:function(e){if(U){var t=e.clipboardData,r=t.items,n=t.files;r=Object(c.isNil)(r)?[]:r,n=Object(c.isNil)(n)?[]:n;var a="",o="";try{a=t.getData("text/plain"),o=t.getData("text/html")}catch(e){try{o=t.getData("Text")}catch(e){return}}if(e.preventDefault(),window.console.log("Received HTML:\n\n",o),window.console.log("Received plain text:\n\n",a),A)Oe(ne(ue.current,a));else{var i=f.reduce((function(e,t){var r=t.__unstablePasteRule;return r&&e===ue.current&&(e=r(ue.current,{html:o,plainText:a})),e}),ue.current);i===ue.current?g&&(n=Array.from(n),Array.from(r).forEach((function(e){if(e.getAsFile){var t=e.getAsFile();if(t){var r=t.name,a=t.type,o=t.size;Object(c.find)(n,{name:r,type:a,size:o})||n.push(t)}}})),g({value:oe(ue.current),onChange:Oe,html:o,plainText:a,files:n,activeFormats:Z})):Oe(i)}}else e.preventDefault()},onInput:ve,onCompositionStart:function(){be.current=!0,J().removeEventListener("selectionchange",he)},onCompositionEnd:function(){be.current=!1,ve({inputType:"insertText"}),J().addEventListener("selectionchange",he)},onKeyDown:function(e){e.defaultPrevented||(function(e){var t=e.keyCode;if(t===ut.DELETE||t===ut.BACKSPACE||t===ut.ESCAPE){if(N)return e.preventDefault(),void W();if(t!==ut.ESCAPE){var r,n=le(),a=n.start,o=n.end,i=n.text,c=t===ut.BACKSPACE;if(0===a&&0!==o&&o===i.length)return Oe(ae(n)),void e.preventDefault();if(S&&(r=c&&0===n.start&&0===n.end&&q(n)?se(n,!c):se(n,c)))return Oe(r),void e.preventDefault();!j||!X(n)||Z.length||c&&0!==a||!c&&o!==i.length||(j({isReverse:c,value:n}),e.preventDefault())}}}(e),function(e){e.keyCode===ut.ENTER&&(e.preventDefault(),x&&x({value:oe(le()),onChange:Oe,shiftKey:e.shiftKey}))}(e),function(e){var t=e.keyCode,r=e.shiftKey,n=e.altKey,a=e.metaKey,o=e.ctrlKey;if(!(r||n||a||o||t!==ut.SPACE||"li"!==S)){var i=le();if(X(i)){var c=i.text[i.start-1];c&&c!==D||(Oe(Qe(i,{type:F})),e.preventDefault())}}}(e),function(e){var t=e.keyCode,r=e.shiftKey,n=e.altKey,a=e.metaKey,o=e.ctrlKey;if(!(r||n||a||o||t!==ut.LEFT&&t!==ut.RIGHT)){var i=ue.current,c=i.text,u=i.formats,s=i.start,l=i.end,f=i.activeFormats,p=void 0===f?[]:f,d=X(ue.current),b="rtl"===ee().getComputedStyle(H.current).direction?ut.RIGHT:ut.LEFT,m=e.keyCode===b;if(d&&0===p.length){if(0===s&&m)return;if(l===c.length&&!m)return}if(d){e.preventDefault();var v=u[s-1]||yt,g=u[s]||yt,h=p.length,O=g;if(v.length>g.length&&(O=v),v.length<g.length?(!m&&p.length<g.length&&h++,m&&p.length>v.length&&h--):v.length>g.length&&(!m&&p.length>g.length&&h--,m&&p.length<v.length&&h++),h!==p.length){var y=O.slice(0,h),j=gt({},ue.current,{activeFormats:y});return ue.current=j,fe(j),void $(y)}var x=s+(m?-1:1),T=m?v:g,_=gt({},ue.current,{start:x,end:x,activeFormats:T});ue.current=_,fe(_),w(x,x),$(T)}}}(e))},onFocus:function(){_&&_(),U?(w(ue.current.start,ue.current.end),$(B(gt({},ue.current,{activeFormats:void 0}),yt))):(ue.current=gt({},ue.current,{start:void 0,end:void 0,activeFormats:yt}),w(void 0,void 0),$(yt)),je.current=ee().requestAnimationFrame(he),J().addEventListener("selectionchange",he),E&&(lt()("wp.blockEditor.RichText setFocusedElement prop",{alternative:"selection state from the block editor store."}),E(P))},onBlur:function(){J().removeEventListener("selectionchange",he)},onMouseDown:ye,onTouchStart:ye,onKeyUp:he,onMouseUp:he,onTouchEnd:he,contentEditable:!m||void 0,suppressContentEditableWarning:!m});return function(e){var t=e.activeFormats,r=e.ref;Object(ot.useEffect)((function(){if(t&&t.length){var e=r.current.querySelector("*[data-rich-text-format-boundary]");if(e){var n=e.ownerDocument,a=n.defaultView.getComputedStyle(e).color.replace(")",", 0.2)").replace("rgb","rgba"),o=".rich-text:focus ".concat("*[data-rich-text-format-boundary]"),i="background-color: ".concat(a),c="".concat(o," {").concat(i,"}"),u=n.getElementById("rich-text-boundary-style");u||((u=n.createElement("style")).id="rich-text-boundary-style",n.head.appendChild(u)),u.innerHTML!==c&&(u.innerHTML=c)}}}),[t])}({ref:H,activeFormats:Z}),function(e){e.ref,Object(ot.useEffect)((function(){}),[])}({ref:H}),Object(ot.createElement)(ot.Fragment,null,U&&Object(ot.createElement)(pt,{allowedFormats:s,withoutInteractiveFormatting:l,value:ue.current,onChange:Oe,onFocus:Te,formatTypes:f}),u&&u({isSelected:U,value:ue.current,onChange:Oe,onFocus:Te,editableProps:Ee,editableTagName:r}),!u&&Object(ot.createElement)(r,Ee))},function(e){var t=e.clientId,r=e.identifier,n=Object(o.useSelect)(mt,[]),a=Object(o.useSelect)((function(e){return n.reduce((function(n,a){if(!a.__experimentalGetPropsForEditableTreePreparation)return n;var o="format_prepare_props_(".concat(a.name,")_");return bt({},n,{},Object(c.mapKeys)(a.__experimentalGetPropsForEditableTreePreparation(e,{richTextIdentifier:r,blockClientId:t}),(function(e,t){return o+t})))}),{})}),[n,t,r]),u=Object(o.__unstableUseDispatchWithMap)((function(e){return n.reduce((function(n,a){if(!a.__experimentalGetPropsForEditableTreeChangeHandler)return n;var o="format_on_change_props_(".concat(a.name,")_");return bt({},n,{},Object(c.mapKeys)(a.__experimentalGetPropsForEditableTreeChangeHandler(e,{richTextIdentifier:r,blockClientId:t}),(function(e,t){return o+t})))}),{})}),[n,t,r]),s=Object(ot.useMemo)((function(){return n.reduce((function(e,n){if(!n.__experimentalCreatePrepareEditableTree)return e;var o,c={richTextIdentifier:r,blockClientId:t},s=bt({},a,{},u),l=n.name,f="format_prepare_props_(".concat(l,")_"),p="format_on_change_props_(".concat(l,")_"),d=Object.keys(s).reduce((function(e,t){return t.startsWith(f)&&(e[t.slice(f.length)]=s[t]),t.startsWith(p)&&(e[t.slice(p.length)]=s[t]),e}),{});return n.__experimentalCreateOnChangeEditableValue?bt({},e,(o={},Object(i.a)(o,"format_value_functions_(".concat(l,")"),n.__experimentalCreatePrepareEditableTree(d,c)),Object(i.a)(o,"format_on_change_functions_(".concat(l,")"),n.__experimentalCreateOnChangeEditableValue(d,c)),o)):bt({},e,Object(i.a)({},"format_prepare_functions_(".concat(l,")"),n.__experimentalCreatePrepareEditableTree(d,c)))}),{})}),[n,t,r,a,u]);return Object(ot.createElement)(xt,Object(rt.a)({},e,a,s,{formatTypes:n}))}),Tt=Object(ot.forwardRef)((function(e,t){return Object(ot.createElement)(wt,Object(rt.a)({},e,{forwardedRef:t}))}))},zLVn:function(e,t,r){"use strict";function n(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}r.d(t,"a",(function(){return n}))}});