@story-telling-reporter/react-embed-code-generator
Version:
## Installation `yarn install`
1 lines • 127 kB
JavaScript
"use strict";(self.webpackChunk_story_telling_reporter_react_embed_code_generator=self.webpackChunk_story_telling_reporter_react_embed_code_generator||[]).push([[849],{35:(e,t,r)=>{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}var o=r(1255),i=r(8979),a=r(1469),c=r(9680),l=(0,i.Map)(),s=c();function u(e,t){console.warn("WARNING: "+e+' will be deprecated soon!\nPlease use "'+t+'" instead.')}var f={getLastCreatedEntityKey:function(){return u("DraftEntity.getLastCreatedEntityKey","contentState.getLastCreatedEntityKey"),f.__getLastCreatedEntityKey()},create:function(e,t,r){return u("DraftEntity.create","contentState.createEntity"),f.__create(e,t,r)},add:function(e){return u("DraftEntity.add","contentState.addEntity"),f.__add(e)},get:function(e){return u("DraftEntity.get","contentState.getEntity"),f.__get(e)},__getAll:function(){return l},__loadWithEntities:function(e){l=e,s=c()},mergeData:function(e,t){return u("DraftEntity.mergeData","contentState.mergeEntityData"),f.__mergeData(e,t)},replaceData:function(e,t){return u("DraftEntity.replaceData","contentState.replaceEntityData"),f.__replaceData(e,t)},__getLastCreatedEntityKey:function(){return s},__create:function(e,t,r){return f.__add(new o({type:e,mutability:t,data:r||{}}))},__add:function(e){return s=c(),l=l.set(s,e),s},__get:function(e){var t=l.get(e);return t||a(!1),t},__mergeData:function(e,t){var r=f.__get(e),o=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){n(e,t,r[t])}))}return e}({},r.getData(),t),i=r.set("data",o);return l=l.set(e,i),i},__replaceData:function(e,t){var r=f.__get(e).set("data",t);return l=l.set(e,r),r}};e.exports=f},98:e=>{e.exports=function(e){return Object.keys(e).map((function(t){return e[t]}))}},115:(e,t,r)=>{var n=r(2237);e.exports=function(e,t){e._latestEditorState.getSelection().isCollapsed()?t.preventDefault():e.setClipboard(n(e._latestEditorState))}},130:e=>{e.exports=function(e,t){e.setMode("drag"),t.preventDefault()}},159:(e,t,r)=>{var n=r(5186);e.exports=function(e){var t=n(e),r=0,o=0,i=0,a=0;if(t.length){if(t.length>1&&0===t[0].width){var c=t[1];r=c.top,o=c.right,i=c.bottom,a=c.left}else{var l=t[0];r=l.top,o=l.right,i=l.bottom,a=l.left}for(var s=1;s<t.length;s++){var u=t[s];0!==u.height&&0!==u.width&&(r=Math.min(r,u.top),o=Math.max(o,u.right),i=Math.max(i,u.bottom),a=Math.min(a,u.left))}}return{top:r,right:o,bottom:i,left:a,width:o-a,height:i-r}}},517:(e,t,r)=>{var n=r(3341),o=r(8171);e.exports=function(e,t){var r=t.getStartKey(),i=t.getStartOffset(),a=t.getEndKey(),c=t.getEndOffset(),l=o(e,t).getBlockMap(),s=l.keySeq(),u=s.indexOf(r),f=s.indexOf(a)+1;return n(l.slice(u,f).map((function(e,t){var n=e.getText(),o=e.getCharacterList();return r===a?e.merge({text:n.slice(i,c),characterList:o.slice(i,c)}):t===r?e.merge({text:n.slice(i),characterList:o.slice(i)}):t===a?e.merge({text:n.slice(0,c),characterList:o.slice(0,c)}):e})))}},549:(e,t,r)=>{var n,o=r(8709),i=r(8979),a=r(5993),c=i.OrderedMap,l={getDirectionMap:function(e,t){n?n.reset():n=new o;var r=e.getBlockMap(),l=r.valueSeq().map((function(e){return a(n).getDirection(e.getText())})),s=c(r.keySeq().zip(l));return null!=t&&i.is(t,s)?t:s}};e.exports=l},565:e=>{e.exports=function(e){if(!e||!("ownerDocument"in e))return!1;if("ownerDocument"in e){var t=e;if(!t.ownerDocument.defaultView)return t instanceof Node;if(t instanceof t.ownerDocument.defaultView.Node)return!0}return!1}},805:(e,t,r)=>{var n=r(4389),o=r(3372),i=r(1469);function a(e,t,r,a,c,l,s){var u=r.getStartOffset(),f=r.getEndOffset(),g=e.__get(c).getMutability(),p=s?u:f;if("MUTABLE"===g)return r;var d=o(t,c).filter((function(e){return p<=e.end&&p>=e.start}));1!=d.length&&i(!1);var y=d[0];if("IMMUTABLE"===g)return r.merge({anchorOffset:y.start,focusOffset:y.end,isBackward:!1});l||(s?f=y.end:u=y.start);var h=n.getRemovalRange(u,f,t.getText().slice(y.start,y.end),y.start,a);return r.merge({anchorOffset:h.start,focusOffset:h.end,isBackward:!1})}e.exports=function(e,t,r,n,o){var i=n.getStartOffset(),c=n.getEndOffset(),l=t.getEntityAt(i),s=r.getEntityAt(c-1);if(!l&&!s)return n;var u=n;if(l&&l===s)u=a(e,t,u,o,l,!0,!0);else if(l&&s){var f=a(e,t,u,o,l,!1,!0),g=a(e,r,u,o,s,!1,!1);u=u.merge({anchorOffset:f.getAnchorOffset(),focusOffset:g.getFocusOffset(),isBackward:!1})}else if(l){var p=a(e,t,u,o,l,!1,!0);u=u.merge({anchorOffset:p.getStartOffset(),isBackward:!1})}else if(s){var d=a(e,r,u,o,s,!1,!1);u=u.merge({focusOffset:d.getEndOffset(),isBackward:!1})}return u}},833:(e,t,r)=>{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}var o=r(6389),i=r(2483),a=r(2284),c=r(8979),l=r(1469),s=r(5993),u=c.Map,f={subtree:!0,characterData:!0,childList:!0,characterDataOldValue:!1,attributes:!1},g=o.isBrowser("IE <= 11"),p=function(){function e(e){var t=this;n(this,"observer",void 0),n(this,"container",void 0),n(this,"mutations",void 0),n(this,"onCharData",void 0),this.container=e,this.mutations=u();var r=a(e);r.MutationObserver&&!g?this.observer=new r.MutationObserver((function(e){return t.registerMutations(e)})):this.onCharData=function(e){e.target instanceof Node||l(!1),t.registerMutation({type:"characterData",target:e.target})}}var t=e.prototype;return t.start=function(){this.observer?this.observer.observe(this.container,f):this.container.addEventListener("DOMCharacterDataModified",this.onCharData)},t.stopAndFlushMutations=function(){var e=this.observer;e?(this.registerMutations(e.takeRecords()),e.disconnect()):this.container.removeEventListener("DOMCharacterDataModified",this.onCharData);var t=this.mutations;return this.mutations=u(),t},t.registerMutations=function(e){for(var t=0;t<e.length;t++)this.registerMutation(e[t])},t.getMutationTextContent=function(e){var t=e.type,r=e.target,n=e.removedNodes;if("characterData"===t){if(""!==r.textContent)return g?r.textContent.replace("\n",""):r.textContent}else if("childList"===t){if(n&&n.length)return"";if(""!==r.textContent)return r.textContent}return null},t.registerMutation=function(e){var t=this.getMutationTextContent(e);if(null!=t){var r=s(i(e.target));this.mutations=this.mutations.set(r,t)}},e}();e.exports=p},909:(e,t,r)=>{var n=r(1513);function o(){return o=n||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},o.apply(this,arguments)}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){a(e,t,r[t])}))}return e}function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var c=r(6760),l=r(1684),s=r(4041),u=r(6660),f=r(8168),g=r(302),p=r(7524),d=r(6698),y=r(8979),h=r(1469),v=r(2964),m=(y.List,function(e,t){return e.getAnchorKey()===t||e.getFocusKey()===t}),S=function(e,t){var r=t.get(e.getType())||t.get("unstyled"),n=r.wrapper;return{Element:r.element||t.get("unstyled").element,wrapperTemplate:n}},b=function(e,t){var r=t(e);return r?{CustomComponent:r.component,customProps:r.props,customEditable:r.editable}:{}},C=function(e,t,r,n,o,a){var c={"data-block":!0,"data-editor":t,"data-offset-key":r,key:e.getKey(),ref:a},l=n(e);return l&&(c.className=l),void 0!==o.customEditable&&(c=i({},c,{contentEditable:o.customEditable,suppressContentEditableWarning:!0})),c},k=function(e){var t,r;function n(){for(var t,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return a(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t=e.call.apply(e,[this].concat(n))||this),"wrapperRef",s.createRef()),t}r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var y=n.prototype;return y.shouldComponentUpdate=function(e){var t=this.props,r=t.block,n=t.direction,o=t.tree,i=!r.getChildKeys().isEmpty(),a=r!==e.block||o!==e.tree||n!==e.direction||m(e.selection,e.block.getKey())&&e.forceSelection;return i||a},y.componentDidMount=function(){var e=this.props.selection,t=e.getEndKey();if(e.getHasFocus()&&t===this.props.block.getKey()){var r=this.wrapperRef.current;if(r){var n,o=f.getScrollParent(r),i=p(o);if(o===window){var a=g(r);(n=a.y+a.height-d().height)>0&&window.scrollTo(i.x,i.y+n+10)}else{v(r)||h(!1);var c=r;(n=c.offsetHeight+c.offsetTop-(o.offsetHeight+i.y))>0&&u.setTop(o,u.getTop(o)+n+10)}}}},y.render=function(){var e=this,t=this.props,r=t.block,a=t.blockRenderMap,u=t.blockRendererFn,f=t.blockStyleFn,g=t.contentState,p=t.decorator,d=t.editorKey,y=t.editorState,h=t.customStyleFn,v=t.customStyleMap,k=t.direction,x=t.forceSelection,E=t.selection,_=t.tree,K=null;r.children.size&&(K=r.children.reduce((function(t,r){var o=l.encode(r,0,0),c=g.getBlockForKey(r),p=b(c,u),h=p.CustomComponent||n,v=S(c,a),m=v.Element,k=v.wrapperTemplate,x=C(c,d,o,f,p,null),E=i({},e.props,{tree:y.getBlockTree(r),blockProps:p.customProps,offsetKey:o,block:c});return t.push(s.createElement(m,x,s.createElement(h,E))),!k||function(e,t){var r=e.getNextSiblingKey();return!!r&&t.getBlockForKey(r).getType()===e.getType()}(c,g)||function(e,t,r){var n=[],o=!0,i=!1,a=void 0;try{for(var c,u=r.reverse()[Symbol.iterator]();!(o=(c=u.next()).done);o=!0){var f=c.value;if(f.type!==t)break;n.push(f)}}catch(e){i=!0,a=e}finally{try{o||null==u.return||u.return()}finally{if(i)throw a}}r.splice(r.indexOf(n[0]),n.length+1);var g=n.reverse(),p=g[0].key;r.push(s.cloneElement(e,{key:"".concat(p,"-wrap"),"data-offset-key":l.encode(p,0,0)},g))}(k,m,t),t}),[]));var O=r.getKey(),w=l.encode(O,0,0),D=b(r,u),T=D.CustomComponent,B=null!=T?s.createElement(T,o({},this.props,{tree:y.getBlockTree(O),blockProps:D.customProps,offsetKey:w,block:r})):s.createElement(c,{block:r,children:K,contentState:g,customStyleFn:h,customStyleMap:v,decorator:p,direction:k,forceSelection:x,hasSelection:m(E,O),selection:E,tree:_});if(r.getParentKey())return B;var M=S(r,a).Element,A=C(r,d,w,f,D,this.wrapperRef);return s.createElement(M,A,B)},n}(s.Component);e.exports=k},975:e=>{e.exports=function(e){return!(!e||!e.ownerDocument)&&e.nodeType===Node.ELEMENT_NODE}},1088:(e,t,r)=>{function n(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){o(e,t,r[t])}))}return e}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var i=r(6007),a=r(2757),c=r(3861),l=r(6422),s=r(8461),u=r(5693),f=r(7932),g=r(4801),p=r(8979),d=r(2332),y=g("draft_tree_data_support"),h=y?l:c,v=p.List,m=p.Repeat,S={insertAtomicBlock:function(e,t,r){var o=e.getCurrentContent(),c=e.getSelection(),l=s.removeRange(o,c,"backward"),g=l.getSelectionAfter(),p=s.splitBlock(l,g),d=p.getSelectionAfter(),S=s.setBlockType(p,d,"atomic"),b=a.create({entity:t}),C={key:f(),type:"atomic",text:r,characterList:v(m(b,r.length))},k={key:f(),type:"unstyled"};y&&(C=n({},C,{nextSibling:k.key}),k=n({},k,{prevSibling:C.key}));var x=[new h(C),new h(k)],E=i.createFromArray(x),_=s.replaceWithFragment(S,d,E),K=_.merge({selectionBefore:c,selectionAfter:_.getSelectionAfter().set("hasFocus",!0)});return u.push(e,K,"insert-fragment")},moveAtomicBlock:function(e,t,r,n){var o,i=e.getCurrentContent(),a=e.getSelection();if("before"===n||"after"===n){var c=i.getBlockForKey("before"===n?r.getStartKey():r.getEndKey());o=d(i,t,c,n)}else{var l=s.removeRange(i,r,"backward"),f=l.getSelectionAfter(),g=l.getBlockForKey(f.getFocusKey());if(0===f.getStartOffset())o=d(l,t,g,"before");else if(f.getEndOffset()===g.getLength())o=d(l,t,g,"after");else{var p=s.splitBlock(l,f),y=p.getSelectionAfter(),h=p.getBlockForKey(y.getFocusKey());o=d(p,t,h,"before")}}var v=o.merge({selectionBefore:a,selectionAfter:o.getSelectionAfter().set("hasFocus",!0)});return u.push(e,v,"move-block")}};e.exports=S},1140:(e,t,r)=>{var n=r(4231),o=r(5693),i=r(3835),a=r(9101);e.exports=function(e){var t=a(e,(function(e){var t=e.getSelection(),r=t.getStartOffset();if(0===r)return i(e,1);var o=t.getStartKey(),a=e.getCurrentContent().getBlockForKey(o).getText().slice(0,r),c=n.getBackward(a);return i(e,c.length||1)}),"backward");return t===e.getCurrentContent()?e:o.push(e,t,"remove-range")}},1212:(e,t,r)=>{var n=r(1513);function o(){return o=n||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},o.apply(this,arguments)}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){c(e,t,r[t])}))}return e}function a(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function c(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var s=r(9706),u=r(5149),f=r(2247),g=r(4234),p=r(2651),d=r(2917),y=r(3253),h=r(8685),v=r(1388),m=r(5693),S=r(4041),b=r(6660),C=r(8168),k=r(6389),x=r(1134),E=r(7932),_=r(7554),K=r(7524),O=r(4801),w=r(1469),D=r(2964),T=r(5993),B=k.isBrowser("IE"),M=!B,A={edit:d,composite:f,drag:p,cut:null,render:null},F=!1,L=function(e){function t(){return e.apply(this,arguments)||this}l(t,e);var r=t.prototype;return r.render=function(){return null},r.componentDidMount=function(){this._update()},r.componentDidUpdate=function(){this._update()},r._update=function(){var e=this.props.editor;e._latestEditorState=this.props.editorState,e._blockSelectEvents=!0},t}(S.Component),R=function(e){function t(t){var r;return c(a(r=e.call(this,t)||this),"_blockSelectEvents",void 0),c(a(r),"_clipboard",void 0),c(a(r),"_handler",void 0),c(a(r),"_dragCount",void 0),c(a(r),"_internalDrag",void 0),c(a(r),"_editorKey",void 0),c(a(r),"_placeholderAccessibilityID",void 0),c(a(r),"_latestEditorState",void 0),c(a(r),"_latestCommittedEditorState",void 0),c(a(r),"_pendingStateFromBeforeInput",void 0),c(a(r),"_onBeforeInput",void 0),c(a(r),"_onBlur",void 0),c(a(r),"_onCharacterData",void 0),c(a(r),"_onCompositionEnd",void 0),c(a(r),"_onCompositionStart",void 0),c(a(r),"_onCopy",void 0),c(a(r),"_onCut",void 0),c(a(r),"_onDragEnd",void 0),c(a(r),"_onDragOver",void 0),c(a(r),"_onDragStart",void 0),c(a(r),"_onDrop",void 0),c(a(r),"_onInput",void 0),c(a(r),"_onFocus",void 0),c(a(r),"_onKeyDown",void 0),c(a(r),"_onKeyPress",void 0),c(a(r),"_onKeyUp",void 0),c(a(r),"_onMouseDown",void 0),c(a(r),"_onMouseUp",void 0),c(a(r),"_onPaste",void 0),c(a(r),"_onSelect",void 0),c(a(r),"editor",void 0),c(a(r),"editorContainer",void 0),c(a(r),"focus",void 0),c(a(r),"blur",void 0),c(a(r),"setMode",void 0),c(a(r),"exitCurrentMode",void 0),c(a(r),"restoreEditorDOM",void 0),c(a(r),"setClipboard",void 0),c(a(r),"getClipboard",void 0),c(a(r),"getEditorKey",void 0),c(a(r),"update",void 0),c(a(r),"onDragEnter",void 0),c(a(r),"onDragLeave",void 0),c(a(r),"_handleEditorContainerRef",(function(e){r.editorContainer=e,r.editor=null!==e?e.firstChild:null})),c(a(r),"focus",(function(e){var t=r.props.editorState,n=t.getSelection().getHasFocus(),o=r.editor;if(o){var i=C.getScrollParent(o),a=e||K(i),c=a.x,l=a.y;D(o)||w(!1),o.focus(),i===window?window.scrollTo(c,l):b.setTop(i,l),n||r.update(m.forceSelection(t,t.getSelection()))}})),c(a(r),"blur",(function(){var e=r.editor;e&&(D(e)||w(!1),e.blur())})),c(a(r),"setMode",(function(e){var t=r.props,n=t.onPaste,o=t.onCut,a=t.onCopy,c=i({},A.edit);n&&(c.onPaste=n),o&&(c.onCut=o),a&&(c.onCopy=a);var l=i({},A,{edit:c});r._handler=l[e]})),c(a(r),"exitCurrentMode",(function(){r.setMode("edit")})),c(a(r),"restoreEditorDOM",(function(e){r.setState({contentsKey:r.state.contentsKey+1},(function(){r.focus(e)}))})),c(a(r),"setClipboard",(function(e){r._clipboard=e})),c(a(r),"getClipboard",(function(){return r._clipboard})),c(a(r),"update",(function(e){r._latestEditorState=e,r.props.onChange(e)})),c(a(r),"onDragEnter",(function(){r._dragCount++})),c(a(r),"onDragLeave",(function(){r._dragCount--,0===r._dragCount&&r.exitCurrentMode()})),r._blockSelectEvents=!1,r._clipboard=null,r._handler=null,r._dragCount=0,r._editorKey=t.editorKey||E(),r._placeholderAccessibilityID="placeholder-"+r._editorKey,r._latestEditorState=t.editorState,r._latestCommittedEditorState=t.editorState,r._onBeforeInput=r._buildHandler("onBeforeInput"),r._onBlur=r._buildHandler("onBlur"),r._onCharacterData=r._buildHandler("onCharacterData"),r._onCompositionEnd=r._buildHandler("onCompositionEnd"),r._onCompositionStart=r._buildHandler("onCompositionStart"),r._onCopy=r._buildHandler("onCopy"),r._onCut=r._buildHandler("onCut"),r._onDragEnd=r._buildHandler("onDragEnd"),r._onDragOver=r._buildHandler("onDragOver"),r._onDragStart=r._buildHandler("onDragStart"),r._onDrop=r._buildHandler("onDrop"),r._onInput=r._buildHandler("onInput"),r._onFocus=r._buildHandler("onFocus"),r._onKeyDown=r._buildHandler("onKeyDown"),r._onKeyPress=r._buildHandler("onKeyPress"),r._onKeyUp=r._buildHandler("onKeyUp"),r._onMouseDown=r._buildHandler("onMouseDown"),r._onMouseUp=r._buildHandler("onMouseUp"),r._onPaste=r._buildHandler("onPaste"),r._onSelect=r._buildHandler("onSelect"),r.getEditorKey=function(){return r._editorKey},r.state={contentsKey:0},r}l(t,e);var n=t.prototype;return n._buildHandler=function(e){var t=this;return function(r){if(!t.props.readOnly){var n=t._handler&&t._handler[e];n&&(y?y((function(){return n(t,r)})):n(t,r))}}},n._showPlaceholder=function(){return!!this.props.placeholder&&!this.props.editorState.isInCompositionMode()&&!this.props.editorState.getCurrentContent().hasText()},n._renderPlaceholder=function(){if(this._showPlaceholder()){var e={text:T(this.props.placeholder),editorState:this.props.editorState,textAlignment:this.props.textAlignment,accessibilityID:this._placeholderAccessibilityID};return S.createElement(h,e)}return null},n._renderARIADescribedBy=function(){var e=this.props.ariaDescribedBy||"",t=this._showPlaceholder()?this._placeholderAccessibilityID:"";return e.replace("{{editor_id_placeholder}}",t)||void 0},n.render=function(){var e=this.props,t=e.blockRenderMap,r=e.blockRendererFn,n=e.blockStyleFn,a=e.customStyleFn,c=e.customStyleMap,l=e.editorState,s=e.preventScroll,f=e.readOnly,p=e.textAlignment,d=e.textDirectionality,y=x({"DraftEditor/root":!0,"DraftEditor/alignLeft":"left"===p,"DraftEditor/alignRight":"right"===p,"DraftEditor/alignCenter":"center"===p}),h=this.props.role||"textbox",v="combobox"===h?!!this.props.ariaExpanded:null,m={blockRenderMap:t,blockRendererFn:r,blockStyleFn:n,customStyleMap:i({},u,c),customStyleFn:a,editorKey:this._editorKey,editorState:l,preventScroll:s,textDirectionality:d};return S.createElement("div",{className:y},this._renderPlaceholder(),S.createElement("div",{className:x("DraftEditor/editorContainer"),ref:this._handleEditorContainerRef},S.createElement("div",{"aria-activedescendant":f?null:this.props.ariaActiveDescendantID,"aria-autocomplete":f?null:this.props.ariaAutoComplete,"aria-controls":f?null:this.props.ariaControls,"aria-describedby":this._renderARIADescribedBy(),"aria-expanded":f?null:v,"aria-label":this.props.ariaLabel,"aria-labelledby":this.props.ariaLabelledBy,"aria-multiline":this.props.ariaMultiline,"aria-owns":f?null:this.props.ariaOwneeID,autoCapitalize:this.props.autoCapitalize,autoComplete:this.props.autoComplete,autoCorrect:this.props.autoCorrect,className:x({notranslate:!f,"public/DraftEditor/content":!0}),contentEditable:!f,"data-testid":this.props.webDriverTestID,onBeforeInput:this._onBeforeInput,onBlur:this._onBlur,onCompositionEnd:this._onCompositionEnd,onCompositionStart:this._onCompositionStart,onCopy:this._onCopy,onCut:this._onCut,onDragEnd:this._onDragEnd,onDragEnter:this.onDragEnter,onDragLeave:this.onDragLeave,onDragOver:this._onDragOver,onDragStart:this._onDragStart,onDrop:this._onDrop,onFocus:this._onFocus,onInput:this._onInput,onKeyDown:this._onKeyDown,onKeyPress:this._onKeyPress,onKeyUp:this._onKeyUp,onMouseUp:this._onMouseUp,onPaste:this._onPaste,onSelect:this._onSelect,ref:this.props.editorRef,role:f?null:h,spellCheck:M&&this.props.spellCheck,style:{outline:"none",userSelect:"text",WebkitUserSelect:"text",whiteSpace:"pre-wrap",wordWrap:"break-word"},suppressContentEditableWarning:!0,tabIndex:this.props.tabIndex},S.createElement(L,{editor:this,editorState:l}),S.createElement(g,o({},m,{key:"contents"+this.state.contentsKey})))))},n.componentDidMount=function(){this._blockSelectEvents=!1,!F&&O("draft_ods_enabled")&&(F=!0,v.initODS()),this.setMode("edit"),B&&(this.editor?this.editor.ownerDocument.execCommand("AutoUrlDetect",!1,!1):r.g.execCommand("AutoUrlDetect",!1,!1))},n.componentDidUpdate=function(){this._blockSelectEvents=!1,this._latestEditorState=this.props.editorState,this._latestCommittedEditorState=this.props.editorState},t}(S.Component);c(R,"defaultProps",{ariaDescribedBy:"{{editor_id_placeholder}}",blockRenderMap:s,blockRendererFn:function(){return null},blockStyleFn:function(){return""},keyBindingFn:_,readOnly:!1,spellCheck:!1,stripPastedStyles:!1}),e.exports=R},1255:(e,t,r)=>{var n=function(e){var t,r;function n(){return e.apply(this,arguments)||this}r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var o=n.prototype;return o.getType=function(){return this.get("type")},o.getMutability=function(){return this.get("mutability")},o.getData=function(){return this.get("data")},n}((0,r(8979).Record)({type:"TOKEN",mutability:"IMMUTABLE",data:Object}));e.exports=n},1344:(e,t,r)=>{var n=r(8461),o=r(5693),i=r(8168),a=r(2237),c=r(7524),l=r(565);e.exports=function(e,t){var r,s=e._latestEditorState,u=s.getSelection(),f=t.target;if(u.isCollapsed())t.preventDefault();else{if(l(f)){var g=f;r=c(i.getScrollParent(g))}var p=a(s);e.setClipboard(p),e.setMode("cut"),setTimeout((function(){e.restoreEditorDOM(r),e.exitCurrentMode(),e.update(function(e){var t=n.removeRange(e.getCurrentContent(),e.getSelection(),"forward");return o.push(e,t,"remove-range")}(s))}),0)}}},1388:e=>{e.exports={initODS:function(){},handleExtensionCausedError:function(){}}},1438:e=>{e.exports=function(e){var t=e.getSelection(),r=t.getAnchorKey(),n=e.getBlockTree(r),o=t.getStartOffset(),i=!1;return n.some((function(e){return o===e.get("start")?(i=!0,!0):o<e.get("end")&&e.get("leaves").some((function(e){var t=e.get("start");return o===t&&(i=!0,!0)}))})),i}},1684:e=>{var t="-",r={encode:function(e,r,n){return e+t+r+t+n},decode:function(e){var r=e.split(t).reverse(),n=r[0],o=r[1];return{blockKey:r.slice(2).reverse().join(t),decoratorKey:parseInt(o,10),leafKey:parseInt(n,10)}}};e.exports=r},1688:e=>{e.exports=function(e,t,r,n){if(e.size){var o=0;e.reduce((function(e,i,a){return t(e,i)||(r(e)&&n(o,a),o=a),i})),r(e.last())&&n(o,e.count())}}},1762:(e,t,r)=>{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}var o=r(1688),i=r(98),a=r(8979),c=a.List,l=a.Repeat,s=a.Record,u=function(){return!0},f=s({start:null,end:null}),g=s({start:null,end:null,decoratorKey:null,leaves:null}),p={generate:function(e,t,r){var n=t.getLength();if(!n)return c.of(new g({start:0,end:0,decoratorKey:null,leaves:c.of(new f({start:0,end:0}))}));var i=[],a=r?r.getDecorations(t,e):c(l(null,n)),s=t.getCharacterList();return o(a,d,u,(function(e,t){var r,n,l,p;i.push(new g({start:e,end:t,decoratorKey:a.get(e),leaves:(r=s.slice(e,t).toList(),n=e,l=[],p=r.map((function(e){return e.getStyle()})).toList(),o(p,d,u,(function(e,t){l.push(new f({start:e+n,end:t+n}))})),c(l))}))})),c(i)},fromJS:function(e){var t=e.leaves,r=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,["leaves"]);return new g(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){n(e,t,r[t])}))}return e}({},r,{leaves:null!=t?c(Array.isArray(t)?t:i(t)).map((function(e){return f(e)})):null}))}};function d(e,t){return e===t}e.exports=p},1807:(e,t,r)=>{var n=r(1388),o=r(6287),i=r(6389),a=r(1232),c=r(5587),l=r(9632),s=r(1469),u=r(975),f=i.isBrowser("IE");function g(e,t){if(!e)return"[empty]";var r=p(e,t);return r.nodeType===Node.TEXT_NODE?r.textContent:(u(r)||s(!1),r.outerHTML)}function p(e,t){var r=void 0!==t?t(e):[];if(e.nodeType===Node.TEXT_NODE){var n=e.textContent.length;return l(e).createTextNode("[text "+n+(r.length?" | "+r.join(", "):"")+"]")}var o=e.cloneNode();1===o.nodeType&&r.length&&o.setAttribute("data-labels",r.join(", "));for(var i=e.childNodes,a=0;a<i.length;a++)o.appendChild(p(i[a],t));return o}function d(e,t){for(var r=e,n=r;r;){if(u(r)&&n.hasAttribute("contenteditable"))return g(r,t);n=r=r.parentNode}return"Could not find contentEditable parent of node"}function y(e){return null===e.nodeValue?e.childNodes.length:e.nodeValue.length}function h(e,t,r,n){var i=c();if(e.extend&&null!=t&&a(i,t)){r>y(t)&&o.logSelectionStateFailure({anonymizedDom:d(t),extraParams:JSON.stringify({offset:r}),selectionState:JSON.stringify(n.toJS())});var l=t===e.focusNode;try{e.rangeCount>0&&e.extend&&e.extend(t,r)}catch(a){throw o.logSelectionStateFailure({anonymizedDom:d(t,(function(t){var r=[];return t===i&&r.push("active element"),t===e.anchorNode&&r.push("selection anchor node"),t===e.focusNode&&r.push("selection focus node"),r})),extraParams:JSON.stringify({activeElementName:i?i.nodeName:null,nodeIsFocus:t===e.focusNode,nodeWasFocus:l,selectionRangeCount:e.rangeCount,selectionAnchorNodeName:e.anchorNode?e.anchorNode.nodeName:null,selectionAnchorOffset:e.anchorOffset,selectionFocusNodeName:e.focusNode?e.focusNode.nodeName:null,selectionFocusOffset:e.focusOffset,message:a?""+a:null,offset:r},null,2),selectionState:JSON.stringify(n.toJS(),null,2)}),a}}else if(t&&e.rangeCount>0){var s=e.getRangeAt(0);s.setEnd(t,r),e.addRange(s.cloneRange())}}function v(e,t,r,i){var a=l(t).createRange();if(r>y(t)&&(o.logSelectionStateFailure({anonymizedDom:d(t),extraParams:JSON.stringify({offset:r}),selectionState:JSON.stringify(i.toJS())}),n.handleExtensionCausedError()),a.setStart(t,r),f)try{e.addRange(a)}catch(e){}else e.addRange(a)}e.exports={setDraftEditorSelection:function(e,t,r,n,o){var i=l(t);if(a(i.documentElement,t)){var c=i.defaultView.getSelection(),s=e.getAnchorKey(),u=e.getAnchorOffset(),f=e.getFocusKey(),g=e.getFocusOffset(),p=e.getIsBackward();if(!c.extend&&p){var d=s,y=u;s=f,u=g,f=d,g=y,p=!1}var m=s===r&&n<=u&&o>=u,S=f===r&&n<=g&&o>=g;if(m&&S)return c.removeAllRanges(),v(c,t,u-n,e),void h(c,t,g-n,e);if(p){if(S&&(c.removeAllRanges(),v(c,t,g-n,e)),m){var b=c.focusNode,C=c.focusOffset;c.removeAllRanges(),v(c,t,u-n,e),h(c,b,C,e)}}else m&&(c.removeAllRanges(),v(c,t,u-n,e)),S&&h(c,t,g-n,e)}},addFocusToSelection:h}},1882:(e,t,r)=>{var n=r(2483),o=r(3056),i=r(4439),a=r(1469),c=r(975),l=r(5993);function s(e,t,r){var i=t,s=n(i);if(null!=s||e&&(e===i||e.firstChild===i)||a(!1),e===i&&(i=i.firstChild,c(i)||a(!1),"true"!==i.getAttribute("data-contents")&&a(!1),r>0&&(r=i.childNodes.length)),0===r){var f=null;if(null!=s)f=s;else{var g=function(e){for(;e.firstChild&&(c(e.firstChild)&&"true"===e.firstChild.getAttribute("data-blocks")||o(e.firstChild));)e=e.firstChild;return e}(i);f=l(o(g))}return{key:f,offset:0}}var p=i.childNodes[r-1],d=null,y=null;if(o(p)){var h=function(e){for(;e.lastChild&&(c(e.lastChild)&&"true"===e.lastChild.getAttribute("data-blocks")||o(e.lastChild));)e=e.lastChild;return e}(p);d=l(o(h)),y=u(h)}else d=l(s),y=u(p);return{key:d,offset:y}}function u(e){var t=e.textContent;return"\n"===t?0:t.length}e.exports=function(e,t,r,o,a,c){var u=r.nodeType===Node.TEXT_NODE,f=a.nodeType===Node.TEXT_NODE;if(u&&f)return{selectionState:i(e,l(n(r)),o,l(n(a)),c),needsRecovery:!1};var g=null,p=null,d=!0;return u?(g={key:l(n(r)),offset:o},p=s(t,a,c)):f?(p={key:l(n(a)),offset:c},g=s(t,r,o)):(g=s(t,r,o),p=s(t,a,c),r===a&&o===c&&(d=!!r.firstChild&&"BR"!==r.firstChild.nodeName)),{selectionState:i(e,g.key,g.offset,p.key,p.offset),needsRecovery:d}}},2034:e=>{var t=new RegExp("\r","g");e.exports=function(e){return e.replace(t,"")}},2187:(e,t,r)=>{var n=r(6389),o=r(1469),i=n.isBrowser("IE <= 9");e.exports=function(e){var t,r=null;return!i&&document.implementation&&document.implementation.createHTMLDocument&&((t=document.implementation.createHTMLDocument("foo")).documentElement||o(!1),t.documentElement.innerHTML=e,r=t.getElementsByTagName("body")[0]),r}},2224:(e,t,r)=>{var n=r(1513),o=r(5159),i=r(4041),a=r(1469),c=r(7620),l=r(1807).setDraftEditorSelection,s=function(e){var t,r;function s(){for(var t,r,n,o,i=arguments.length,a=new Array(i),c=0;c<i;c++)a[c]=arguments[c];return o=void 0,(n="leaf")in(r=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t=e.call.apply(e,[this].concat(a))||this))?Object.defineProperty(r,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[n]=o,t}r=e,(t=s).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var u=s.prototype;return u._setSelection=function(){var e=this.props.selection;if(null!=e&&e.getHasFocus()){var t=this.props,r=t.block,n=t.start,o=t.text,i=r.getKey(),s=n+o.length;if(e.hasEdgeWithin(i,n,s)){var u=this.leaf;u||a(!1);var f,g=u.firstChild;g||a(!1),g.nodeType===Node.TEXT_NODE?f=g:c(g)?f=u:(f=g.firstChild)||a(!1),l(e,f,i,n,s)}}},u.shouldComponentUpdate=function(e){var t=this.leaf;return t||a(!1),t.textContent!==e.text||e.styleSet!==this.props.styleSet||e.forceSelection},u.componentDidUpdate=function(){this._setSelection()},u.componentDidMount=function(){this._setSelection()},u.render=function(){var e=this,t=this.props.block,r=this.props.text;r.endsWith("\n")&&this.props.isLast&&(r+="\n");var a=this.props,c=a.customStyleMap,l=a.customStyleFn,s=a.offsetKey,u=a.styleSet,f=u.reduce((function(e,t){var r={},o=c[t];return void 0!==o&&e.textDecoration!==o.textDecoration&&(r.textDecoration=[e.textDecoration,o.textDecoration].join(" ").trim()),n(e,o,r)}),{});if(l){var g=l(u,t);f=n(f,g)}return i.createElement("span",{"data-offset-key":s,ref:function(t){return e.leaf=t},style:f},i.createElement(o,null,r))},s}(i.Component);e.exports=s},2229:(e,t,r)=>{var n=r(5797),o=r(8979).OrderedSet,i=n.substr,a=o();e.exports=function(e,t){var r=Array(e.length).fill(a);return t&&t.forEach((function(t){for(var n=i(e,0,t.offset).length,o=n+i(e,t.offset,t.length).length;n<o;)r[n]=r[n].add(t.style),n++})),r}},2237:(e,t,r)=>{var n=r(517);e.exports=function(e){var t=e.getSelection();return t.isCollapsed()?null:n(e.getCurrentContent(),t)}},2247:(e,t,r)=>{var n=r(833),o=r(8461),i=r(1684),a=r(5693),c=r(8253),l=r(6389),s=r(9278),u=r(3615),f=r(8339),g=r(8854),p=r(5993),d=l.isBrowser("IE"),y=!1,h=!1,v=null,m={onCompositionStart:function(e){h=!0,function(e){v||(v=new n(u(e))).start()}(e)},onCompositionEnd:function(e){y=!1,h=!1,setTimeout((function(){y||m.resolveComposition(e)}),20)},onSelect:s,onKeyDown:function(e,t){if(!h)return m.resolveComposition(e),void e._onKeyDown(t);t.which!==c.RIGHT&&t.which!==c.LEFT||t.preventDefault()},onKeyPress:function(e,t){t.which===c.RETURN&&t.preventDefault()},resolveComposition:function(e){if(!h){var t=p(v).stopAndFlushMutations();v=null,y=!0;var r=a.set(e._latestEditorState,{inCompositionMode:!1});if(e.exitCurrentMode(),t.size){var n=r.getCurrentContent();t.forEach((function(e,t){var c=i.decode(t),l=c.blockKey,s=c.decoratorKey,u=c.leafKey,f=r.getBlockTree(l).getIn([s,"leaves",u]),p=f.start,d=f.end,y=r.getSelection().merge({anchorKey:l,focusKey:l,anchorOffset:p,focusOffset:d,isBackward:!1}),h=g(n,y),v=n.getBlockForKey(l).getInlineStyleAt(p);n=o.replaceText(n,y,e,v,h),r=a.set(r,{currentContent:n})}));var c=f(r,u(e)).selectionState;e.restoreEditorDOM();var l=d?a.forceSelection(r,c):a.acceptSelection(r,c);e.update(a.push(l,n,"insert-characters"))}else e.update(r)}}};e.exports=m},2284:e=>{e.exports=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView:window}},2332:(e,t,r)=>{var n=r(6422),o=r(6153),i=r(8979),a=r(1469),c=i.OrderedMap,l=i.List,s=function(e,t,r){if(e){var n=t.get(e);n&&t.set(e,r(n))}},u=function(e,t,r,n,o){if(!o)return e;var i="after"===n,a=t.getKey(),c=r.getKey(),u=t.getParentKey(),f=t.getNextSiblingKey(),g=t.getPrevSiblingKey(),p=r.getParentKey(),d=i?r.getNextSiblingKey():c,y=i?c:r.getPrevSiblingKey();return e.withMutations((function(e){s(u,e,(function(e){var t=e.getChildKeys();return e.merge({children:t.delete(t.indexOf(a))})})),s(g,e,(function(e){return e.merge({nextSibling:f})})),s(f,e,(function(e){return e.merge({prevSibling:g})})),s(d,e,(function(e){return e.merge({prevSibling:a})})),s(y,e,(function(e){return e.merge({nextSibling:a})})),s(p,e,(function(e){var t=e.getChildKeys(),r=t.indexOf(c),n=i?r+1:0!==r?r-1:0,o=t.toArray();return o.splice(n,0,a),e.merge({children:l(o)})})),s(a,e,(function(e){return e.merge({nextSibling:d,prevSibling:y,parent:p})}))}))};e.exports=function(e,t,r,i){"replace"===i&&a(!1);var l=r.getKey(),s=t.getKey();s===l&&a(!1);var f=e.getBlockMap(),g=t instanceof n,p=[t],d=f.delete(s);g&&(p=[],d=f.withMutations((function(e){var r=t.getNextSiblingKey(),n=o(t,e);e.toSeq().skipUntil((function(e){return e.getKey()===s})).takeWhile((function(e){var t=e.getKey(),o=t===s,i=r&&t!==r,a=!r&&e.getParentKey()&&(!n||t!==n);return!!(o||i||a)})).forEach((function(t){p.push(t),e.delete(t.getKey())}))})));var y=d.toSeq().takeUntil((function(e){return e===r})),h=d.toSeq().skipUntil((function(e){return e===r})).skip(1),v=p.map((function(e){return[e.getKey(),e]})),m=c();if("before"===i){var S=e.getBlockBefore(l);S&&S.getKey()===t.getKey()&&a(!1),m=y.concat([].concat(v,[[l,r]]),h).toOrderedMap()}else if("after"===i){var b=e.getBlockAfter(l);b&&b.getKey()===s&&a(!1),m=y.concat([[l,r]].concat(v),h).toOrderedMap()}return e.merge({blockMap:u(m,t,r,i,g),selectionBefore:e.getSelectionAfter(),selectionAfter:e.getSelectionAfter().merge({anchorKey:s,focusKey:s})})}},2466:(e,t,r)=>{var n=r(5693);e.exports=function(e){var t=e.getSelection(),r=t.getEndKey(),o=e.getCurrentContent().getBlockForKey(r).getLength();return n.set(e,{selection:t.merge({anchorKey:r,anchorOffset:o,focusKey:r,focusOffset:o,isBackward:!1}),forceSelection:!0})}},2483:(e,t,r)=>{var n=r(9632),o=r(3056);e.exports=function(e){for(var t=e;t&&t!==n(e).documentElement;){var r=o(t);if(null!=r)return r;t=t.parentNode}return null}},2535:(e,t,r)=>{var n=r(8979).Map;e.exports=function(e,t,r){var o=t.getStartKey(),i=t.getEndKey(),a=e.getBlockMap(),c=a.toSeq().skipUntil((function(e,t){return t===o})).takeUntil((function(e,t){return t===i})).concat(n([[i,a.get(i)]])).map(r);return e.merge({blockMap:a.merge(c),selectionBefore:t,selectionAfter:t})}},2541:(e,t,r)=>{var n=r(5797),o=r(1688),i=function(e,t){return e===t},a=function(e){return!!e},c=[];e.exports=function(e){var t=e.getCharacterList().map((function(e){return e.getStyle()})).toList(),r=t.flatten().toSet().map((function(r){return function(e,t,r){var c=[],l=t.map((function(e){return e.has(r)})).toList();return o(l,i,a,(function(t,o){var i=e.getText();c.push({offset:n.strlen(i.slice(0,t)),length:n.strlen(i.slice(t,o)),style:r})})),c}(e,t,r)}));return Array.prototype.concat.apply(c,r.toJS())}},2651:(e,t,r)=>{var n=r(7014),o=r(8461),i=r(5693),a=r(2483),c=r(9632),l=r(8480),s=r(4439),u=r(2284),f=r(7025),g=r(5993),p={onDragEnd:function(e){e.exitCurrentMode(),d(e)},onDrop:function(e,t){var r=new n(t.nativeEvent.dataTransfer),u=e._latestEditorState,p=function(e,t){var r=null,n=null,o=c(e.currentTarget);if("function"==typeof o.caretRangeFromPoint){var i=o.caretRangeFromPoint(e.x,e.y);r=i.startContainer,n=i.startOffset}else{if(!e.rangeParent)return null;r=e.rangeParent,n=e.rangeOffset}r=g(r),n=g(n);var l=g(a(r));return s(t,l,n,l,n)}(t.nativeEvent,u);if(t.preventDefault(),e._dragCount=0,e.exitCurrentMode(),null!=p){var h=r.getFiles();if(h.length>0){if(e.props.handleDroppedFiles&&f(e.props.handleDroppedFiles(p,h)))return;l(h,(function(t){t&&e.update(y(u,p,t))}))}else{var v=e._internalDrag?"internal":"external";e.props.handleDrop&&f(e.props.handleDrop(p,r,v))||(e._internalDrag?e.update(function(e,t){var r=o.moveText(e.getCurrentContent(),e.getSelection(),t);return i.push(e,r,"insert-fragment")}(u,p)):e.update(y(u,p,r.getText()))),d(e)}}}};function d(e){e._internalDrag=!1;var t=e.editorContainer;if(t){var r=new MouseEvent("mouseup",{view:u(t),bubbles:!0,cancelable:!0});t.dispatchEvent(r)}}function y(e,t,r){var n=o.insertText(e.getCurrentContent(),t,r,e.getCurrentInlineStyle());return i.push(e,n,"insert-fragment")}e.exports=p},2757:(e,t,r)=>{var n=r(8979),o=n.Map,i=n.OrderedSet,a=n.Record,c=i(),l={style:c,entity:null},s=function(e){var t,r;function n(){return e.apply(this,arguments)||this}r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var a=n.prototype;return a.getStyle=function(){return this.get("style")},a.getEntity=function(){return this.get("entity")},a.hasStyle=function(e){return this.getStyle().includes(e)},n.applyStyle=function(e,t){var r=e.set("style",e.getStyle().add(t));return n.create(r)},n.removeStyle=function(e,t){var r=e.set("style",e.getStyle().remove(t));return n.create(r)},n.applyEntity=function(e,t){var r=e.getEntity()===t?e:e.set("entity",t);return n.create(r)},n.create=function(e){if(!e)return u;var t=o({style:c,entity:null}).merge(e),r=f.get(t);if(r)return r;var i=new n(t);return f=f.set(t,i),i},n.fromJS=function(e){var t=e.style,r=e.entity;return new n({style:Array.isArray(t)?i(t):t,entity:Array.isArray(r)?i(r):r})},n}(a(l)),u=new s,f=o([[o(l),u]]);s.EMPTY=u,e.exports=s},2769:(e,t,r)=>{var n=r(8979),o=r(6752),i=r(1469),a=n.Repeat;e.exports=function(e,t,r,n){t.isCollapsed()||i(!1);var c=null;if(null!=r&&(c=r.length),null==c||0===c)return e;var l=e.getBlockMap(),s=t.getStartKey(),u=t.getStartOffset(),f=l.get(s),g=f.getText(),p=f.merge({text:g.slice(0,u)+r+g.slice(u,f.getLength()),characterList:o(f.getCharacterList(),a(n,c).toList(),u)}),d=u+c;return e.merge({blockMap:l.set(s,p),selectionAfter:t.merge({anchorOffset:d,focusOffset:d})})}},2917:(e,t,r)=>{var n=r(6389),o=r(7589),i=r(5495),a=r(6272),c=r(115),l=r(1344),s=r(130),u=r(9602),f=r(6728),g=r(6544),p=r(7735),d=r(4863),y=r(9278),h=n.isBrowser("Chrome"),v=n.isBrowser("Firefox"),m=h||v?y:function(e){},S={onBeforeInput:o,onBlur:i,onCompositionStart:a,onCopy:c,onCut:l,onDragOver:s,onDragStart:u,onFocus:f,onInput:g,onKeyDown:p,onPaste:d,onSelect:y,onMouseUp:m,onKeyUp:m};e.exports=S},2964:e=>{e.exports=function(e){return!(!e||!e.ownerDocument)&&(e.ownerDocument.defaultView?e instanceof e.ownerDocument.defaultView.HTMLElement:e instanceof HTMLElement)}},3056:(e,t,r)=>{var n=r(975);e.exports=function e(t){if(n(t)){var r=t,o=r.getAttribute("data-offset-key");if(o)return o;for(var i=0;i<r.childNodes.length;i++){var a=e(r.childNodes[i]);if(a)return a}}return null}},3064:(e,t,r)=>{var n=r(4231),o=r(5693),i=r(4613),a=r(9101);e.exports=function(e){var t=a(e,(function(e){var t=e.getSelection(),r=t.getStartOffset(),o=t.getStartKey(),a=e.getCurrentContent().getBlockForKey(o).getText().slice(r),c=n.getForward(a);return i(e,c.length||1)}),"forward");return t===e.getCurrentContent()?e:o.push(e,t,"remove-range")}},3253:(e,t,r)=>{var n=r(3144).unstable_flushControlled;e.exports=n},3341:(e,t,r)=>{var n=r(6422),o=r(7932),i=r(8979).OrderedMap;e.exports=function(e){return e.first()instanceof n?function(e){var t,r={};return i(e.withMutations((function(e){e.forEach((function(n,i){var a=n.getKey(),c=n.getNextSiblingKey(),l=n.getPrevSiblingKey(),s=n.getChildKeys(),u=n.getParentKey(),f=o();if(r[a]=f,c&&(e.get(c)?e.setIn([c,"prevSibling"],f):e.setIn([a,"nextSibling"],null)),l&&(e.get(l)?e.setIn([l,"nextSibling"],f):e.setIn([a,"prevSibling"],null)),u&&e.get(u)){var g=e.get(u).getChildKeys();e.setIn([u,"children"],g.set(g.indexOf(n.getKey()),f))}else e.setIn([a,"parent"],null),t&&(e.setIn([t.getKey(),"nextSibling"],f),e.setIn([a,"prevSibling"],r[t.getKey()])),t=e.get(a);s.forEach((function(t){e.get(t)?e.setIn([t,"parent"],f):e.setIn([a,"children"],n.getChildKeys().filter((function(e){return e!==t})))}))}))})).toArray().map((function(e){return[r[e.getKey()],e.set("key",r[e.getKey()])]})))}(e):function(e){return i(e.toArray().map((function(e){var t=o();return[t,e.set("key",t)]})))}(e)}},3347:(e,t,r)=>{var n=r(2757),o=r(8979).Map,i={add:function(e,t,r){return a(e,t,r,!0)},remove:function(e,t,r){return a(e,t,r,!1)}};function a(e,t,r,i){var a=e.getBlockMap(),c=t.getStartKey(),l=t.getStartOffset(),s=t.getEndKey(),u=t.getEndOffset(),f=a.skipUntil((function(e,t){return t===c})).takeUntil((function(e,t){return t===s})).concat(o([[s,a.get(s)]])).map((function(e,t){var o,a;c===s?(o=l,a=u):(o=t===c?l:0,a=t===s?u:e.getLength());for(var f,g=e.getCharacterList();o<a;)f=g.get(o),g=g.set(o,i?n.applyStyle(f,r):n.removeStyle(f,r)),o++;return e.set("characterList",g)}));return e.merge({blockMap:a.merge(f),selectionBefore:t,selectionAfter:t})}e.exports=i},3372:(e,t,r)=>{var n=r(1469);e.exports=function(e,t){var r=[];return e.findEntityRanges((function(e){return e.getEntity()===t}),(function(e,t){r.push({start:e,end:t})})),r.length||n(!1),r}},3385:(e,t,r)=>{function n(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){o(e,t,r[t])}))}return e}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var i=r(6007),a=r(2757),c=r(3861),l=r(6422),s=r(35),u=r(8816),f=r(7932),g=r(98),p=r(4801),d=r(8979),y=r(2034),h=d.List,v=d.Record,m=d.Repeat,S=d.Map,b=d.OrderedMap,C=v({entityMap:null,blockMap:null,selectionBefore:null,selectionAfter:null}),k=p("draft_tree_data_support")?l:c,x=function(e){var t,r;function o(){return e.apply(this,arguments)||this}r=e,(t=o).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var c=o.prototype;return c.getEntityMap=function(){return s},c.getBlockMap=function(){return this.get("blockMap")},c.getSelectionBefore=function(){return this.get("selectionBefore")},c.getSelectionAfter=function(){return this.get("selectionAfter")},c.getBlockForKey=function(e){return this.getBlockMap().get(e)},c.getKeyBefore=function(e){return this.getBlockMap().reverse().keySeq().skipUntil((function(t){return t===e})).skip(1).first()},c.getKeyAfter=function(e){return this.getBlockMap().keySeq().skipUntil((function(t){return t===e})).skip(1).first()},c.getBlockAfter=function(e){return this.getBlockMap().skipUntil((function(t,r){return r===e})).skip(1).first()},c.getBlockBefore=function(e){return this.getBlockMap().reverse().skipUntil((function(t,r){return r===e})).skip(1).first()},c.getBlocksAsArray=function(){return this.getBlockMap().toArray()},c.getFirstBlock=function(){return this.getBlockMap().first()},c.getLastBlock=function(){return this.getBlockMap().last()},c.getPlainText=function(e){return this.getBlockMap().map((function(e){return e?e.getText():""})).join(e||"\n")},c.getLastCreatedEntityKey=function(){return s.__getLastCreatedEntityKey()},c.hasText=function(){var e=this.getBlockMap();return e.size>1||escape(e.first().getText()).replace(/%u200B/g,"").length>0},c.createEntity=function(e,t,r){return s.__create(e,t,r),this},c.mergeEntityData=function(e,t){return s.__mergeData(e,t),this},c.replaceEntityData=function(e,t){return s.__replaceData(e,t),this},c.addEntity=function(e){return s.__add(e),this},c.getEntity=function(e){return s.__get(e)},c.getAllEntities=function(){return s.__getAll()},c.loadWithEntities=function(e){return s.__loadWithEntities(e)},o.createFromBlockArray=function(e,t){var r=Array.isArray(e)?e:e.contentBlocks,n=i.createFromArray(r),a=n.isEmpty()?new u:u.createEmpty(n.first().getKey());return new o({blockMap:n,entityMap:t||s,selectionBefore:a,selectionAfter:a})},o.createFromText=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:/\r\n?|\n/g,r=e.split(t).map((function(e){return e=y(e),new k({key:f(),text:e,type:"unstyled",characterList:h(m(a.EMPTY,e.length))})}));return o.createFromBlockArray(r)},o.fromJS=function(e){return new o(n({},e,{blockMap:b(e.blockMap).map(o.createContentBlockFromJS),selectionBefore:new u(e.selectionBefore),selectionAfter:new u(e.selectionAfter)}))},o.createContentBlockFromJS=function(e){var t=e.characterList;return new k(n({},e,{data:S(e.data),characterList:null!=t?h((Array.isArray(t)?t:g(t)).map((function(e){return a.fromJS(e)}))):void 0}))},o}(C);e.exports=x},3430:e=>{var t={stringify:function(e){return"_"+String(e)},unstringify:function(e){return e.slice(1)}};e.exports=t},3615:(e,t,r)=>{var n=r(1469),o=r(2964);e.exports=function(e){var t=e.editorContainer;return t||n(!1),o(t.firstChild)||n(!1),t.firstChild}},3636:(e,t,r)=>{var n=r(6422),o=r(6153),i=r(8979),a=(i.List,i.Map),c=function(e,t,r){if(e){var n=t.get(e);n&&t.set(e,r(n))}},l=function(e,t){var r=[];if(!e)return r;for(var n=t.get(e);n&&n.getParentKey();){var o=n.getParentKey();o&&r.push(o),n=o?t.get(o):null}return r},s=function(e,t,r){if(!e)return null;for(var n=r.get(e.getKey()).getNextSiblingKey();n&&!t.get(n);)n=r.get(n).getNextSiblingKey()||null;return n},u=function(e,t,r){if(!e)return null;for(var n=r.get(e.getKey()).getPrevSiblingKey();n&&!t.get(n);)n=r.get(n).getPrevSiblingKey()||null;return n};e.exports=function(e,t){if(t.isCollapsed())return e;var r,i=e.getBlockMap(),f=t.getStartKey(),g=t.getStartOffset(),p=t.getEndKey(),d=t.getEndOffset(),y=i.get(f),h=i.get(p),v=y instanceof n,m=[];if(v){var S=h.getChildKeys(),b=l(p,i);h.getNextSiblingKey()&&(m=m.concat(b)),S.isEmpty()||(m=m.concat(b.concat([p]))),m=m.concat(l(o(h,i),i))}r=y===h?function(e,t,r){if(0===t)for(;t<r;)e=e.shift(),t++;else if(r===e.count())for(;r>t;)e=e.pop(),r--;else{var n=e.slice(0,t),o=e.slice(r);e=n.concat(o).toList()}return e}(y.getCharacterList(),g,d):y.getCharacterList().slice(0,g).concat(h.getCharacterList().slice(d));var C=y.merge({text:y.getText().slice(0,g)+h.getText().slice(d),characterList:r}),k=v&&0===g&&0===d&&h.getParentKey()===f&&null==h.getPrevSiblingKey()?a([[f,null]]):i.toSeq().skipUntil((function(e,t){return t===f})).takeUntil((function(e,t){return t===p})).filter((function(e,t){return-1===m.indexOf(t)})).concat(a([[p,null]])).map((function(e,t){return t===f?C:null})),x=i.merge(k).filter((function(e){return!!e}));return v&&y!==h&&(x=function(e,t,r,n){return e.withMutations((function(i){if(c(t.getKey(),i,(function(e){return e.merge({nextSibling:s(e,i,n),prevSibling:u(e,i,n)})})),c(r.getKey(),i,(function(e){return e.merge({nextSibling:s(e,i,n),prevSibling:u(e,i,n)})})),l(t.getKey(),n).forEach((function(e){return c(e,i,(function(e){return e.merge({children:e.getChildKeys().filter((function(e){return i.get(e)})),nextSibling:s(e,i,n),prevSibling:u(e,i,n)})}))})),c(t.getNextSiblingKey(),i,(function(e){return e.merge({prevSibling:t.getPrevSiblingKey()})})),c(t.getPrevSiblingKey(),i,(function(e){return e.merge({nextSibling:s(e,i,n)})})),c(r.getNextSiblingKey(),i,(function(e){return e.merge({prevSibling:u(e,i,n)})})),c(r.getPrevSiblingKey(),i,(function(e){return e.merge({nextSibling:r.getNextSiblingKey()})})),l(r.getKey(),n).forEach((function(e){c(e,i,(function(e){return e.merge({children:e.getChildKeys().filter((function(e){return i.get(e)})),nextSibling:s(e,i,n),prevSibling:u(e,i,n)})}))})),function(e,t){var r=[];if(!e)return r;for(var n=o(e,t);n&&t.get(n);){var i=t.get(n);r.push(n),n=i.getParentKey()?o(i,t):null}return r}(r,n).forEach((function(e){return c(e,i,(function(e){return e.merge({nextSibling:s(e,i,n),prevSibling:u(e,i,n)})}))})),null==e.get(t.getKey())&&null!=e.get(r.getKey())&&r.getParentKey()===t.getKey()&&null==r.getPrevSiblingKey()){var a=t.getPrevSiblingKey();c(r.getKey(),i,(function(e){return e.merge({prevSibling:a})})),c(a,i,(function(e){return e.merge({nextSibling:r.getKey()})}));var f=a?e.get(a):null,g=f?f.getParentKey():null;if(t.getChildKeys().forEach((function(e){c(e,i,(function(e){return e.merge({parent:g})}))})),null!=g){var p=e.get(g);c(g,i,(function(e){return e.merge({children:p.getChildKeys().concat(t.getChildKeys())})}))}c(t.getChildKeys().find((function(t){return null===e.get(t).getNextSiblingKey()})),i,(function(e){return e.merge({nextSibling:t.getNextSiblingKey()})}))}}))}(x,y,h,i)),e.merge({blockMap:x,selectionBefore:t,selectionAfter:t.merge({anchorKey:f,anchorOffset:g,focusKey:f,focusOffset:g,isBackward:!1})})}},3835:(e,t,r)=>{r(8509),e.exports=function(e,t){var r=e.getSelection(),n=e.getCurrentContent(),o=r.getStartKey(),i=r.getStartOffset(),a=o,c=0;if(t>i){var l=n.getKeyBefore(o);null==l?a=o:(a=l,c=n.getBlockForKey(l).getText().length)}else c=i-t;return r.merge({focusKey:a,focusOffset:c,isBackward:!0})}},3853:(e,t,r)=>{var n=r(1513);function o(){return o=n||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},o.apply(this,arguments)}var i=r(1684),a=r(4041),c=r(60),l=r(9559),s=function(e){var t,r;function n(){return e.apply(this,arguments)||th