static.kuangkie.hydrogen.bundle.4c8798b9491c7e94ee5c.js Maven / Gradle / Ivy
The newest version!
"use strict";(self.webpackChunkhydrogen_react=self.webpackChunkhydrogen_react||[]).push([[6137],{64461:function(e,t,n){function r(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,["leaves"]);return new p(function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:p;return e.call(this,function(e){if(!e)return e;var t=e.characterList,n=e.text;return n&&!t&&(e.characterList=a(s(r.EMPTY,n.length))),e}(t))||this}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var c=i.prototype;return c.getKey=function(){return this.get("key")},c.getType=function(){return this.get("type")},c.getText=function(){return this.get("text")},c.getCharacterList=function(){return this.get("characterList")},c.getLength=function(){return this.getText().length},c.getDepth=function(){return this.get("depth")},c.getData=function(){return this.get("data")},c.getInlineStyleAt=function(e){var t=this.getCharacterList().get(e);return t?t.getStyle():f},c.getEntityAt=function(e){var t=this.getCharacterList().get(e);return t?t.getEntity():null},c.getChildKeys=function(){return this.get("children")},c.getParentKey=function(){return this.get("parent")},c.getPrevSiblingKey=function(){return this.get("prevSibling")},c.getNextSiblingKey=function(){return this.get("nextSibling")},c.findStyleRanges=function(e,t){o(this.getCharacterList(),d,e,t)},c.findEntityRanges=function(e,t){o(this.getCharacterList(),g,e,t)},i}(u(p));e.exports=h},27052:function(e,t,n){function r(e){for(var t=1;t1||escape(e.first().getText()).replace(/%u200B/g,"").length>0},c.createEntity=function(e,t,n){return u.__create(e,t,n),this},c.mergeEntityData=function(e,t){return u.__mergeData(e,t),this},c.replaceEntityData=function(e,t){return u.__replaceData(e,t),this},c.addEntity=function(e){return u.__add(e),this},c.getEntity=function(e){return u.__get(e)},c.getAllEntities=function(){return u.__getAll()},c.loadWithEntities=function(e){return u.__loadWithEntities(e)},o.createFromBlockArray=function(e,t){var n=Array.isArray(e)?e:e.contentBlocks,r=i.createFromArray(n),a=r.isEmpty()?new s:s.createEmpty(r.first().getKey());return new o({blockMap:r,entityMap:t||u,selectionBefore:a,selectionAfter:a})},o.createFromText=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:/\r\n?|\n/g,n=e.split(t).map((function(e){return e=h(e),new C({key:f(),text:e,type:"unstyled",characterList:y(m(a.EMPTY,e.length))})}));return o.createFromBlockArray(n)},o.fromJS=function(e){return new o(r({},e,{blockMap:b(e.blockMap).map(o.createContentBlockFromJS),selectionBefore:new s(e.selectionBefore),selectionAfter:new s(e.selectionAfter)}))},o.createContentBlockFromJS=function(e){var t=e.characterList;return new C(r({},e,{data:S(e.data),characterList:null!=t?y((Array.isArray(t)?t:p(t)).map((function(e){return a.fromJS(e)}))):void 0}))},o}(k);e.exports=_},25418:function(e,t,n){var r=n(87446),o=n(85820).Map,i={add:function(e,t,n){return a(e,t,n,!0)},remove:function(e,t,n){return a(e,t,n,!1)}};function a(e,t,n,i){var a=e.getBlockMap(),c=t.getStartKey(),l=t.getStartOffset(),u=t.getEndKey(),s=t.getEndOffset(),f=a.skipUntil((function(e,t){return t===c})).takeUntil((function(e,t){return t===u})).concat(o([[u,a.get(u)]])).map((function(e,t){var o,a;c===u?(o=l,a=s):(o=t===c?l:0,a=t===u?s:e.getLength());for(var f,p=e.getCharacterList();o0&&window.scrollTo(i.x,i.y+r+10)}else v(n)||y(!1),(r=n.offsetHeight+n.offsetTop-(o.offsetTop+o.offsetHeight+i.y))>0&&l.setTop(o,l.getTop(o)+r+10)}}}},b._renderChildren=function(){var e=this,t=this.props.block,n=t.getKey(),r=t.getText(),l=this.props.tree.size-1,u=S(this.props.selection,n);return this.props.tree.map((function(p,d){var g=p.get("leaves");if(0===g.size)return null;var h=g.size-1,y=g.map((function(o,s){var f=a.encode(n,d,s),p=o.get("start"),g=o.get("end");return c.createElement(i,{key:f,offsetKey:f,block:t,start:p,selection:u?e.props.selection:null,forceSelection:e.props.forceSelection,text:r.slice(p,g),styleSet:t.getInlineStyleAt(p),customStyleMap:e.props.customStyleMap,customStyleFn:e.props.customStyleFn,isLast:d===l&&s===h})})).toArray(),v=p.get("decoratorKey");if(null==v)return y;if(!e.props.decorator)return y;var S=m(e.props.decorator),b=S.getComponentForKey(v);if(!b)return y;var k=S.getPropsForKey(v),C=a.encode(n,d,0),_=g.first().get("start"),E=g.last().get("end"),O=r.slice(_,E),D=t.getEntityAt(p.get("start")),x=f.getHTMLDirIfDifferent(s.getDirection(O),e.props.direction),w={contentState:e.props.contentState,decoratedText:O,dir:x,start:_,end:E,blockKey:n,entityKey:D,offsetKey:C};return c.createElement(b,o({},k,w,{key:C}),y)})).toArray()},b.render=function(){var e=this,t=this.props,n=t.direction,r=t.offsetKey,o=p({"public/DraftStyleDefault/block":!0,"public/DraftStyleDefault/ltr":"LTR"===n,"public/DraftStyleDefault/rtl":"RTL"===n});return c.createElement("div",{"data-offset-key":r,className:o,ref:function(t){return e._node=t}},this._renderChildren())},r}(c.Component);e.exports=b},56164:function(e,t,n){var r=n(37347);function o(){return o=r||function(e){for(var t=1;t0&&window.scrollTo(i.x,i.y+r+10)}else{v(n)||y(!1);var c=n;(r=c.offsetHeight+c.offsetTop-(o.offsetHeight+i.y))>0&&s.setTop(o,s.getTop(o)+r+10)}}}},h.render=function(){var e=this,t=this.props,n=t.block,a=t.blockRenderMap,s=t.blockRendererFn,f=t.blockStyleFn,p=t.contentState,d=t.decorator,g=t.editorKey,h=t.editorState,y=t.customStyleFn,v=t.customStyleMap,C=t.direction,_=t.forceSelection,E=t.selection,O=t.tree,D=null;n.children.size&&(D=n.children.reduce((function(t,n){var o=l.encode(n,0,0),c=p.getBlockForKey(n),d=b(c,s),y=d.CustomComponent||r,v=S(c,a),m=v.Element,C=v.wrapperTemplate,_=k(c,g,o,f,d,null),E=i({},e.props,{tree:h.getBlockTree(n),blockProps:d.customProps,offsetKey:o,block:c});return t.push(u.createElement(m,_,u.createElement(y,E))),!C||function(e,t){var n=e.getNextSiblingKey();return!!n&&t.getBlockForKey(n).getType()===e.getType()}(c,p)||function(e,t,n){var r=[],o=!0,i=!1,a=void 0;try{for(var c,s=n.reverse()[Symbol.iterator]();!(o=(c=s.next()).done);o=!0){var f=c.value;if(f.type!==t)break;r.push(f)}}catch(e){i=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}n.splice(n.indexOf(r[0]),r.length+1);var p=r.reverse(),d=p[0].key;n.push(u.cloneElement(e,{key:"".concat(d,"-wrap"),"data-offset-key":l.encode(d,0,0)},p))}(C,m,t),t}),[]));var x=n.getKey(),w=l.encode(x,0,0),K=b(n,s),T=K.CustomComponent,M=null!=T?u.createElement(T,o({},this.props,{tree:h.getBlockTree(x),blockProps:K.customProps,offsetKey:w,block:n})):u.createElement(c,{block:n,children:D,contentState:p,customStyleFn:y,customStyleMap:v,decorator:d,direction:C,forceSelection:_,hasSelection:m(E,x),selection:E,tree:O});if(n.getParentKey())return M;var B=S(n,a).Element,A=k(n,g,w,f,K,this.wrapperRef);return u.createElement(B,A,M)},r}(u.Component);e.exports=C},30782:function(e,t,n){var r=n(83365),o=n(98011),i=n(46209),a=n(36949),c=n(40356),l=n(86128),u=n(9753),s=n(71683),f=n(36071),p=n(29625),d=n(65614),g=l.isBrowser("IE"),h=!1,y=!1,v=null,m={onCompositionStart:function(e){y=!0,function(e){v||(v=new r(s(e))).start()}(e)},onCompositionEnd:function(e){h=!1,y=!1,setTimeout((function(){h||m.resolveComposition(e)}),20)},onSelect:u,onKeyDown:function(e,t){if(!y)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(!y){var t=d(v).stopAndFlushMutations();v=null,h=!0;var n=a.set(e._latestEditorState,{inCompositionMode:!1});if(e.exitCurrentMode(),t.size){var r=n.getCurrentContent();t.forEach((function(e,t){var c=i.decode(t),l=c.blockKey,u=c.decoratorKey,s=c.leafKey,f=n.getBlockTree(l).getIn([u,"leaves",s]),d=f.start,g=f.end,h=n.getSelection().merge({anchorKey:l,focusKey:l,anchorOffset:d,focusOffset:g,isBackward:!1}),y=p(r,h),v=r.getBlockForKey(l).getInlineStyleAt(d);r=o.replaceText(r,h,e,v,y),n=a.set(n,{currentContent:r})}));var c=f(n,s(e)).selectionState;e.restoreEditorDOM();var l=g?a.forceSelection(n,c):a.acceptSelection(n,c);e.update(a.push(l,r,"insert-characters"))}else e.update(n)}}};e.exports=m},44321:function(e,t,n){var r=n(37347);function o(){return o=r||function(e){for(var t=1;t=4,"public/DraftStyleDefault/listLTR":"LTR"===r,"public/DraftStyleDefault/listRTL":"RTL"===r})},g=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var a=r.prototype;return a.shouldComponentUpdate=function(e){var t=this.props.editorState,n=e.editorState;if(t.getDirectionMap()!==n.getDirectionMap())return!0;if(t.getSelection().getHasFocus()!==n.getSelection().getHasFocus())return!0;var r=n.getNativelyRenderedContent(),o=t.isInCompositionMode(),i=n.isInCompositionMode();if(t===n||null!==r&&n.getCurrentContent()===r||o&&i)return!1;var a=t.getCurrentContent(),c=n.getCurrentContent(),l=t.getDecorator(),u=n.getDecorator();return o!==i||a!==c||l!==u||n.mustForceSelection()},a.render=function(){for(var e=this.props,t=e.blockRenderMap,n=e.blockRendererFn,r=e.blockStyleFn,a=e.customStyleMap,s=e.customStyleFn,g=e.editorState,h=e.editorKey,y=e.preventScroll,v=e.textDirectionality,m=g.getCurrentContent(),S=g.getSelection(),b=g.mustForceSelection(),k=g.getDecorator(),C=p(g.getDirectionMap()),_=m.getBlocksAsArray(),E=[],O=null,D=null,x=0;x<_.length;x++){var w=_[x],K=w.getKey(),T=w.getType(),M=n(w),B=void 0,A=void 0,F=void 0;M&&(B=M.component,A=M.props,F=M.editable);var R=v||C.get(K),L=l.encode(K,0,0),I={contentState:m,block:w,blockProps:A,blockStyleFn:r,customStyleMap:a,customStyleFn:s,decorator:k,direction:R,forceSelection:b,offsetKey:L,preventScroll:y,selection:S,tree:g.getBlockTree(K)},P=t.get(T)||t.get("unstyled"),N=P.wrapper,j=P.element||t.get("unstyled").element,U=w.getDepth(),H="";r&&(H=r(w)),"li"===j&&(H=f(H,d(T,U,D!==N||null===O||U>O,R)));var W=B||c,z={className:H,"data-block":!0,"data-editor":h,"data-offset-key":L,key:K};void 0!==F&&(z=i({},z,{contentEditable:F,suppressContentEditableWarning:!0}));var J=u.createElement(j,z,u.createElement(W,o({},I,{key:K})));E.push({block:J,wrapperTemplate:N,key:K,offsetKey:L}),O=N?w.getDepth():null,D=N}for(var G=[],q=0;q0){if(e.props.handleDroppedFiles&&f(e.props.handleDroppedFiles(d,y)))return;l(y,(function(t){t&&e.update(h(s,d,t))}))}else{var v=e._internalDrag?"internal":"external";e.props.handleDrop&&f(e.props.handleDrop(d,n,v))||(e._internalDrag?e.update(function(e,t){var n=o.moveText(e.getCurrentContent(),e.getSelection(),t);return i.push(e,n,"insert-fragment")}(s,d)):e.update(h(s,d,n.getText()))),g(e)}}}};function g(e){e._internalDrag=!1;var t=e.editorContainer;if(t){var n=new MouseEvent("mouseup",{view:s(t),bubbles:!0,cancelable:!0});t.dispatchEvent(n)}}function h(e,t,n){var r=o.insertText(e.getCurrentContent(),t,n,e.getCurrentInlineStyle());return i.push(e,r,"insert-fragment")}e.exports=d},47340:function(e,t,n){var r=n(86128),o=n(44187),i=n(85071),a=n(48198),c=n(16880),l=n(63313),u=n(42075),s=n(50329),f=n(97418),p=n(20059),d=n(70835),g=n(64146),h=n(9753),y=r.isBrowser("Chrome"),v=r.isBrowser("Firefox"),m=y||v?h:function(e){},S={onBeforeInput:o,onBlur:i,onCompositionStart:a,onCopy:c,onCut:l,onDragOver:u,onDragStart:s,onFocus:f,onInput:p,onKeyDown:d,onPaste:g,onSelect:h,onMouseUp:m,onKeyUp:m};e.exports=S},48501:function(e,t,n){var r=n(46116).unstable_flushControlled;e.exports=r},42316:function(e,t,n){var r=n(37347),o=n(40004),i=n(35466),a=n(86913),c=n(74982),l=n(85587).setDraftEditorSelection,u=function(e){var t,n;function u(){for(var t,n,r,o,i=arguments.length,a=new Array(i),c=0;c0)return" "+e}else if(t3&&void 0!==arguments[3]?arguments[3]:"REPLACE_WITH_NEW_DATA",o=d(e,t),i=g(o,t);return u(i,i.getSelectionAfter(),n,r)},removeRange:function(e,t,n){var r,o,i,c;t.getIsBackward()&&(t=t.merge({anchorKey:t.getFocusKey(),anchorOffset:t.getFocusOffset(),focusKey:t.getAnchorKey(),focusOffset:t.getAnchorOffset(),isBackward:!1})),r=t.getAnchorKey(),o=t.getFocusKey(),i=e.getBlockForKey(r),c=e.getBlockForKey(o);var l=t.getStartOffset(),u=t.getEndOffset(),s=i.getEntityAt(l),f=c.getEntityAt(u-1);if(r===o&&s&&s===f){var p=a(e.getEntityMap(),i,c,t,n);return g(e,p)}var h=d(e,t);return g(h,t)},splitBlock:function(e,t){var n=d(e,t),r=g(n,t);return h(r,r.getSelectionAfter())},applyInlineStyle:function(e,t,n){return o.add(e,t,n)},removeInlineStyle:function(e,t,n){return o.remove(e,t,n)},setBlockType:function(e,t,n){return p(e,t,(function(e){return e.merge({type:n,depth:0})}))},setBlockData:function(e,t,n){return p(e,t,(function(e){return e.merge({data:n})}))},mergeBlockData:function(e,t,n){return p(e,t,(function(e){return e.merge({data:e.getData().merge(n)})}))},applyEntity:function(e,t,n){var r=d(e,t);return i(r,t,n)}};e.exports=v},46209:function(e){var t="-",n={encode:function(e,n,r){return e+t+n+t+r},decode:function(e){var n=e.split(t).reverse(),r=n[0],o=n[1];return{blockKey:n.slice(2).reverse().join(t),decoratorKey:parseInt(o,10),leafKey:parseInt(r,10)}}};e.exports=n},41349:function(e,t,n){function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o=n(81467),i=n(80914),a=n(8493),c=n(60717),l=n(72499),u=n(97510),s=n(85820),f=n(55558),p=s.List,d=s.Repeat,g=u("draft_tree_data_support"),h=g?i:o,y={processHTML:function(e,t){return a(e,l,t)},processText:function(e,t,n){return e.reduce((function(e,o,i){o=f(o);var a=c(),l={key:a,type:n,text:o,characterList:p(d(t,o.length))};if(g&&0!==i){var u=i-1;l=function(e){for(var t=1;t0)||(delete s.children,n.push(s));var l=i.children;Array.isArray(l)||a(!1),o=o.concat([].concat(l.reverse()))}var u,s}(t),e.blocks=n,r({},e,{blocks:n})):e},fromRawStateToRawTreeState:function(e){var t=[],n=[];return e.blocks.forEach((function(e){var o=c(e),a=e.depth||0,l=r({},e,{children:[]});if(o){var u=n[0];if(null==u&&0===a)t.push(l);else if(null==u||u.depth=a;)n.shift(),u=n[0];a>0?u.children.push(l):t.push(l)}}else t.push(l)})),r({},e,{blocks:t})}};e.exports=l},76106:function(e,t,n){n(93960),e.exports={isValidBlock:function(e,t){var n=e.getKey(),r=e.getParentKey();if(null!=r&&!t.get(r).getChildKeys().includes(n))return!1;if(!e.getChildKeys().map((function(e){return t.get(e)})).every((function(e){return e.getParentKey()===n})))return!1;var o=e.getPrevSiblingKey();if(null!=o&&t.get(o).getNextSiblingKey()!==n)return!1;var i=e.getNextSiblingKey();return(null==i||t.get(i).getPrevSiblingKey()===n)&&!(null!==i&&null!==o&&o===i||""!=e.text&&e.getChildKeys().size>0)},isConnectedTree:function(e){var t=e.toArray().filter((function(e){return null==e.getParentKey()&&null==e.getPrevSiblingKey()}));if(1!==t.length)return!1;for(var n=0,r=t.shift().getKey(),o=[];null!=r;){var i=e.get(r),a=i.getChildKeys(),c=i.getNextSiblingKey();if(a.size>0){null!=c&&o.unshift(c);var l=a.map((function(t){return e.get(t)})).find((function(e){return null==e.getPrevSiblingKey()}));if(null==l)return!1;r=l.getKey()}else r=null!=i.getNextSiblingKey()?i.getNextSiblingKey():o.shift();n++}return n===e.size},isValidTree:function(e){var t=this;return!!e.toArray().every((function(n){return t.isValidBlock(n,e)}))&&this.isConnectedTree(e)}}},28724:function(e,t,n){var r,o=n(19374),i=n(85820),a=n(65614),c=i.OrderedMap,l={getDirectionMap:function(e,t){r?r.reset():r=new o;var n=e.getBlockMap(),l=n.valueSeq().map((function(e){return a(r).getDirection(e.getText())})),u=c(n.keySeq().zip(l));return null!=t&&i.is(t,u)?t:u}};e.exports=l},36949:function(e,t,n){function r(e){for(var t=1;t0?o.getInlineStyleAt(r-1):o.getLength()?o.getInlineStyleAt(0):S(e,n)}(t,n):function(e,t){var n=t.getStartKey(),r=t.getStartOffset(),o=e.getBlockForKey(n);return r0?o.getInlineStyleAt(r-1):S(e,n)}(t,n)},e.getBlockTree=function(e){return this.getImmutable().getIn(["treeMap",e])},e.isSelectionAtStartOfContent=function(){var e=this.getCurrentContent().getBlockMap().first().getKey();return this.getSelection().hasEdgeWithin(e,0,0)},e.isSelectionAtEndOfContent=function(){var e=this.getCurrentContent().getBlockMap().last(),t=e.getLength();return this.getSelection().hasEdgeWithin(e.getKey(),t,t)},e.getDirectionMap=function(){return this.getImmutable().get("directionMap")},t.acceptSelection=function(e,t){return v(e,t,!1)},t.forceSelection=function(e,t){return t.getHasFocus()||(t=t.set("hasFocus",!0)),v(e,t,!0)},t.moveSelectionToEnd=function(e){var n=e.getCurrentContent().getLastBlock(),r=n.getKey(),o=n.getLength();return t.acceptSelection(e,new l({anchorKey:r,anchorOffset:o,focusKey:r,focusOffset:o,isBackward:!1}))},t.moveFocusToEnd=function(e){var n=t.moveSelectionToEnd(e);return t.forceSelection(n,n.getSelection())},t.push=function(e,n,r){var o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(e.getCurrentContent()===n)return e;var i=c.getDirectionMap(n,e.getDirectionMap());if(!e.getAllowUndo())return t.set(e,{currentContent:n,directionMap:i,lastChangeType:r,selection:n.getSelectionAfter(),forceSelection:o,inlineStyleOverride:null});var a=e.getSelection(),l=e.getCurrentContent(),u=e.getUndoStack(),s=n;a!==l.getSelectionAfter()||function(e,t){return t!==e.getLastChangeType()||"insert-characters"!==t&&"backspace-character"!==t&&"delete-character"!==t}(e,r)?(u=u.push(l),s=s.set("selectionBefore",a)):"insert-characters"!==r&&"backspace-character"!==r&&"delete-character"!==r||(s=s.set("selectionBefore",l.getSelectionBefore()));var f=e.getInlineStyleOverride();-1===["adjust-depth","change-block-type","split-block"].indexOf(r)&&(f=null);var d={currentContent:s,directionMap:i,undoStack:u,redoStack:p(),lastChangeType:r,selection:n.getSelectionAfter(),forceSelection:o,inlineStyleOverride:f};return t.set(e,d)},t.undo=function(e){if(!e.getAllowUndo())return e;var n=e.getUndoStack(),r=n.peek();if(!r)return e;var o=e.getCurrentContent(),i=c.getDirectionMap(r,e.getDirectionMap());return t.set(e,{currentContent:r,directionMap:i,undoStack:n.shift(),redoStack:e.getRedoStack().push(o),forceSelection:!0,inlineStyleOverride:null,lastChangeType:"undo",nativelyRenderedContent:null,selection:o.getSelectionBefore()})},t.redo=function(e){if(!e.getAllowUndo())return e;var n=e.getRedoStack(),r=n.peek();if(!r)return e;var o=e.getCurrentContent(),i=c.getDirectionMap(r,e.getDirectionMap());return t.set(e,{currentContent:r,directionMap:i,undoStack:e.getUndoStack().push(o),redoStack:n.shift(),forceSelection:!0,inlineStyleOverride:null,lastChangeType:"redo",nativelyRenderedContent:null,selection:r.getSelectionAfter()})},e.getImmutable=function(){return this._immutable},t}();function v(e,t,n){return y.set(e,{selection:t,forceSelection:n,nativelyRenderedContent:null,inlineStyleOverride:null})}function m(e,t){return e.getBlockMap().map((function(n){return i.generate(e,n,t)})).toOrderedMap()}function S(e,t){var n=e.getBlockMap().reverse().skipUntil((function(e,n){return n===t})).skip(1).skipUntil((function(e,t){return e.getLength()})).first();return n?n.getInlineStyleAt(n.getLength()-1):s()}e.exports=y},69645:function(e,t,n){var r=n(86128),o=n(31413),i=r.isPlatform("Mac OS X"),a={isCtrlKeyCommand:function(e){return!!e.ctrlKey&&!e.altKey},isOptionKeyCommand:function(e){return i&&e.altKey},usesMacOSHeuristics:function(){return i},hasCommandModifier:function(e){return i?!!e.metaKey&&!e.altKey:a.isCtrlKeyCommand(e)},isSoftNewlineEvent:o};e.exports=a},33930:function(){},55463:function(e,t,n){var r=n(98011),o=n(36949),i=n(40896),a=n(65614),c={currentBlockContainsLink:function(e){var t=e.getSelection(),n=e.getCurrentContent(),r=n.getEntityMap();return n.getBlockForKey(t.getAnchorKey()).getCharacterList().slice(t.getStartOffset(),t.getEndOffset()).some((function(e){var t=e.getEntity();return!!t&&"LINK"===r.__get(t).getType()}))},getCurrentBlockType:function(e){var t=e.getSelection();return e.getCurrentContent().getBlockForKey(t.getStartKey()).getType()},getDataObjectForLinkURL:function(e){return{url:e.toString()}},handleKeyCommand:function(e,t,n){switch(t){case"bold":return c.toggleInlineStyle(e,"BOLD");case"italic":return c.toggleInlineStyle(e,"ITALIC");case"underline":return c.toggleInlineStyle(e,"UNDERLINE");case"code":return c.toggleCode(e);case"backspace":case"backspace-word":case"backspace-to-start-of-line":return c.onBackspace(e);case"delete":case"delete-word":case"delete-to-end-of-block":return c.onDelete(e);default:return null}},insertSoftNewline:function(e){var t=r.insertText(e.getCurrentContent(),e.getSelection(),"\n",e.getCurrentInlineStyle(),null),n=o.push(e,t,"insert-characters");return o.forceSelection(n,t.getSelectionAfter())},onBackspace:function(e){var t=e.getSelection();if(!t.isCollapsed()||t.getAnchorOffset()||t.getFocusOffset())return null;var n=e.getCurrentContent(),r=t.getStartKey(),i=n.getBlockBefore(r);if(i&&"atomic"===i.getType()){var a=n.getBlockMap().delete(i.getKey()),l=n.merge({blockMap:a,selectionAfter:t});if(l!==n)return o.push(e,l,"remove-range")}var u=c.tryToRemoveBlockStyle(e);return u?o.push(e,u,"change-block-type"):null},onDelete:function(e){var t=e.getSelection();if(!t.isCollapsed())return null;var n=e.getCurrentContent(),i=t.getStartKey(),a=n.getBlockForKey(i).getLength();if(t.getStartOffset()=c},o.isCollapsed=function(){return this.getAnchorKey()===this.getFocusKey()&&this.getAnchorOffset()===this.getFocusOffset()},o.getStartKey=function(){return this.getIsBackward()?this.getFocusKey():this.getAnchorKey()},o.getStartOffset=function(){return this.getIsBackward()?this.getFocusOffset():this.getAnchorOffset()},o.getEndKey=function(){return this.getIsBackward()?this.getAnchorKey():this.getFocusKey()},o.getEndOffset=function(){return this.getIsBackward()?this.getAnchorOffset():this.getFocusOffset()},r.createEmpty=function(e){return new r({anchorKey:e,anchorOffset:0,focusKey:e,focusOffset:0,isBackward:!1,hasFocus:!1})},r}((0,n(85820).Record)({anchorKey:"",anchorOffset:0,focusKey:"",focusOffset:0,isBackward:!1,hasFocus:!1}));e.exports=r},40896:function(e){e.exports=function(e,t,n,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([[i,a.get(i)]]).map((function(e){var t=e.getDepth()+n;return t=Math.max(0,Math.min(t,r)),e.set("depth",t)}));return a=a.merge(c),e.merge({blockMap:a,selectionBefore:t,selectionAfter:t})}},48521:function(e,t,n){var r=n(87446);e.exports=function(e,t,n,o){for(var i=t,a=e.getCharacterList();i1&&void 0!==arguments[1]?arguments[1]:0;return Object.keys(R).some((function(n){e.classList.contains(n)&&(t=R[n])})),t},N=function(e){if(!b(e))return!1;var t=e;if(!t.href||"http:"!==t.protocol&&"https:"!==t.protocol&&"mailto:"!==t.protocol&&"tel:"!==t.protocol)return!1;try{return new f(t.href),!0}catch(e){return!1}},j=function(e){if(!_(e))return!1;var t=e;return!(!t.attributes.getNamedItem("src")||!t.attributes.getNamedItem("src").value)},U=function(e,t){if(!C(e))return t;var n=e,r=n.style.fontWeight,o=n.style.fontStyle,i=n.style.textDecoration;return t.withMutations((function(e){M.indexOf(r)>=0?e.add("BOLD"):B.indexOf(r)>=0&&e.remove("BOLD"),"italic"===o?e.add("ITALIC"):"normal"===o&&e.remove("ITALIC"),"underline"===i&&e.add("UNDERLINE"),"line-through"===i&&e.add("STRIKETHROUGH"),"none"===i&&(e.remove("UNDERLINE"),e.remove("STRIKETHROUGH"))}))},H=function(e){return"ul"===e||"ol"===e},W=function(){function e(e,t){i(this,"characterList",v()),i(this,"currentBlockType","unstyled"),i(this,"currentDepth",0),i(this,"currentEntity",null),i(this,"currentText",""),i(this,"wrapper",null),i(this,"blockConfigs",[]),i(this,"contentBlocks",[]),i(this,"entityMap",s),i(this,"blockTypeMap",void 0),i(this,"disambiguate",void 0),this.clear(),this.blockTypeMap=e,this.disambiguate=t}var t=e.prototype;return t.clear=function(){this.characterList=v(),this.blockConfigs=[],this.currentBlockType="unstyled",this.currentDepth=0,this.currentEntity=null,this.currentText="",this.entityMap=s,this.wrapper=null,this.contentBlocks=[]},t.addDOMNode=function(e){var t;return this.contentBlocks=[],this.currentDepth=0,(t=this.blockConfigs).push.apply(t,this._toBlockConfigs([e],S())),this._trimCurrentText(),""!==this.currentText&&this.blockConfigs.push(this._makeBlockConfig()),this},t.getContentBlocks=function(){return 0===this.contentBlocks.length&&(E?this._toContentBlocks(this.blockConfigs):this._toFlatContentBlocks(this.blockConfigs)),{contentBlocks:this.contentBlocks,entityMap:this.entityMap}},t._makeBlockConfig=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=o({key:e.key||d(),type:this.currentBlockType,text:this.currentText,characterList:this.characterList,depth:this.currentDepth,parent:null,children:v(),prevSibling:null,nextSibling:null,childConfigs:[]},e);return this.characterList=v(),this.currentBlockType="unstyled",this.currentText="",t},t._toBlockConfigs=function(e,t){for(var n=[],r=0;r(n=void 0!==(r=this.characterList.reverse().findEntry((function(e){return null!==e.getEntity()})))?Math.max(n,e-r[0]):n)?(this.currentText="",this.characterList=v()):(this.currentText=this.currentText.slice(t,n),this.characterList=this.characterList.slice(t,n))},t._addTextNode=function(e,t){var n=e.textContent;""===n.trim()&&"pre"!==this.wrapper&&(n=" "),"pre"!==this.wrapper&&(n=(n=n.replace(x,"")).replace(D," ")),this._appendText(n,t)},t._addBreakNode=function(e,t){k(e)&&this._appendText("\n",t)},t._addImgNode=function(e,t){if(_(e)){var n=e,r={};F.forEach((function(e){var t=n.getAttribute(e);t&&(r[e]=t)})),this.currentEntity=this.entityMap.__create("IMAGE","IMMUTABLE",r),h("draftjs_fix_paste_for_img")?"presentation"!==n.getAttribute("role")&&this._appendText("📷",t):this._appendText("📷",t),this.currentEntity=null}},t._addAnchorNode=function(e,t,n){if(b(e)){var r=e,o={};A.forEach((function(e){var t=r.getAttribute(e);t&&(o[e]=t)})),o.url=new f(r.href).toString(),this.currentEntity=this.entityMap.__create("LINK","MUTABLE",o||{}),t.push.apply(t,this._toBlockConfigs(Array.from(e.childNodes),n)),this.currentEntity=null}},t._toContentBlocks=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=e.length-1,r=0;r<=n;r++){var i=e[r];i.parent=t,i.prevSibling=r>0?e[r-1].key:null,i.nextSibling=r2&&void 0!==arguments[2]?arguments[2]:u,n=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:g)(e=e.trim().replace(O,"").replace(w," ").replace(K,"").replace(T,""));if(!n)return null;var r=function(e){var t={};return e.mapKeys((function(e,n){var r=[n.element];void 0!==n.aliasedElements&&r.push.apply(r,n.aliasedElements),r.forEach((function(n){void 0===t[n]?t[n]=e:"string"==typeof t[n]?t[n]=[t[n],e]:t[n].push(e)}))})),m(t)}(t);return new W(r,(function(e,t){return"li"===e?"ol"===t?"ordered-list-item":"unordered-list-item":null})).addDOMNode(n).getContentBlocks()}},53292:function(e,t,n){function r(e){for(var t=1;t0})),o=m&&!n?u.fromRawStateToRawTreeState(e).blocks:e.blocks;if(!m)return function(e,t){return k(e.map((function(e){var n=new i(C(e,t));return[n.getKey(),n]})))}(n?u.fromRawTreeStateToRawState(e).blocks:o,t);var c=function(e,t){return e.map(E).reduce((function(n,o,i){Array.isArray(o.children)||v(!1);var c=o.children.map(E),l=new a(r({},C(o,t),{prevSibling:0===i?null:e[i-1].key,nextSibling:i===e.length-1?null:e[i+1].key,children:S(c.map((function(e){return e.key})))}));n=n.set(l.getKey(),l);for(var u=O([],c,l);u.length>0;){var s=u.pop(),f=s.parentRef,p=f.getChildKeys(),d=p.indexOf(s.key),g=Array.isArray(s.children);if(!g){g||v(!1);break}var h=s.children.map(E),y=new a(r({},C(s,t),{parent:f.getKey(),children:S(h.map((function(e){return e.key}))),prevSibling:0===d?null:p.get(d-1),nextSibling:d===p.size-1?null:p.get(d+1)}));n=n.set(y.getKey(),y),u=O(u,h,y)}return n}),k())}(o,t);return c}(e,t),o=n.isEmpty()?new s:s.createEmpty(n.first().getKey());return new c({blockMap:n,entityMap:t,selectionBefore:o,selectionAfter:o})}},52769:function(e,t,n){var r=n(87446),o=n(85820).List;e.exports=function(e,t){var n=e.map((function(e,n){var o=t[n];return r.create({style:e,entity:o})}));return o(n)}},96527:function(e,t,n){var r=n(14065).substr;e.exports=function(e,t){var n=Array(e.length).fill(null);return t&&t.forEach((function(t){for(var o=r(e,0,t.offset).length,i=o+r(e,t.offset,t.length).length,a=o;a=d?r.length:0),a=t.get("end"),c=a+(a>=d?r.length:0),l=n.get("start"),u=n.get("end"),s=n.get("decoratorKey");return t.get("decoratorKey")!==s||t.get("leaves").size!==n.get("leaves").size||i!==l||c!==u||null!=s&&u-l!=a-o}))}if(v||(h=r,v=f&&("'"==h||"/"==h)),v||(v=u(y.getDirectionMap()).get(g)!==u(n.getDirectionMap()).get(g)),v)return t.preventDefault(),y=o.set(y,{forceSelection:!0}),void e.update(y);y=o.set(y,{nativelyRenderedContent:y.getCurrentContent()}),e._pendingStateFromBeforeInput=y,s((function(){void 0!==e._pendingStateFromBeforeInput&&(e.update(e._pendingStateFromBeforeInput),e._pendingStateFromBeforeInput=void 0)}))}}},85071:function(e,t,n){var r=n(36949),o=n(13031),i=n(11581);e.exports=function(e,t){var n=t.currentTarget.ownerDocument;if(!Boolean(e.props.preserveSelectionOnBlur)&&i(n)===n.body){var a=n.defaultView.getSelection(),c=e.editor;1===a.rangeCount&&o(c,a.anchorNode)&&o(c,a.focusNode)&&a.removeAllRanges()}var l=e._latestEditorState,u=l.getSelection();if(u.getHasFocus()){var s=u.set("hasFocus",!1);e.props.onBlur&&e.props.onBlur(t),e.update(r.acceptSelection(l,s))}}},48198:function(e,t,n){var r=n(36949);e.exports=function(e,t){e.setMode("composite"),e.update(r.set(e._latestEditorState,{inCompositionMode:!0})),e._onCompositionStart(t)}},16880:function(e,t,n){var r=n(95482);e.exports=function(e,t){e._latestEditorState.getSelection().isCollapsed()?t.preventDefault():e.setClipboard(r(e._latestEditorState))}},63313:function(e,t,n){var r=n(98011),o=n(36949),i=n(18539),a=n(95482),c=n(75124),l=n(56577);e.exports=function(e,t){var n,u=e._latestEditorState,s=u.getSelection(),f=t.target;if(s.isCollapsed())t.preventDefault();else{if(l(f)){var p=f;n=c(i.getScrollParent(p))}var d=a(u);e.setClipboard(d),e.setMode("cut"),setTimeout((function(){e.restoreEditorDOM(n),e.exitCurrentMode(),e.update(function(e){var t=r.removeRange(e.getCurrentContent(),e.getSelection(),"forward");return o.push(e,t,"remove-range")}(u))}),0)}}},42075:function(e){e.exports=function(e,t){e.setMode("drag"),t.preventDefault()}},50329:function(e){e.exports=function(e){e._internalDrag=!0,e.setMode("drag")}},97418:function(e,t,n){var r=n(36949),o=n(86128);e.exports=function(e,t){var n=e._latestEditorState,i=n.getSelection();if(!i.getHasFocus()){var a=i.set("hasFocus",!0);e.props.onFocus&&e.props.onFocus(t),o.isBrowser("Chrome < 60.0.3081.0")?e.update(r.forceSelection(n,a)):e.update(r.acceptSelection(n,a))}}},20059:function(e,t,n){var r=n(98011),o=n(46209),i=n(36949),a=n(86128),c=n(97269).notEmptyKey,l=n(46142),u=n(72740),s=n(65614),f=a.isEngine("Gecko");e.exports=function(e,t){void 0!==e._pendingStateFromBeforeInput&&(e.update(e._pendingStateFromBeforeInput),e._pendingStateFromBeforeInput=void 0);var n=e.editor.ownerDocument.defaultView.getSelection(),a=n.anchorNode,p=n.isCollapsed,d=(null==a?void 0:a.nodeType)!==Node.TEXT_NODE&&(null==a?void 0:a.nodeType)!==Node.ELEMENT_NODE;if(null!=a&&!d){if(a.nodeType===Node.TEXT_NODE&&(null!==a.previousSibling||null!==a.nextSibling)){var g=a.parentNode;if(null==g)return;a.nodeValue=g.textContent;for(var h=g.firstChild;null!=h;h=h.nextSibling)h!==a&&g.removeChild(h)}var y=a.textContent,v=e._latestEditorState,m=s(l(a)),S=o.decode(m),b=S.blockKey,k=S.decoratorKey,C=S.leafKey,_=v.getBlockTree(b).getIn([k,"leaves",C]),E=_.start,O=_.end,D=v.getCurrentContent(),x=D.getBlockForKey(b),w=x.getText().slice(E,O);if(y.endsWith("\n\n")&&(y=y.slice(0,-1)),y!==w){var K,T,M,B,A=v.getSelection(),F=A.merge({anchorOffset:E,focusOffset:O,isBackward:!1}),R=x.getEntityAt(E),L=c(R)?D.getEntity(R):null,I="MUTABLE"===(null!=L?L.getMutability():null),P=I?"spellcheck-change":"apply-entity",N=r.replaceText(D,F,y,x.getInlineStyleAt(E),I?x.getEntityAt(E):null);if(f)K=n.anchorOffset,T=n.focusOffset,B=(M=E+Math.min(K,T))+Math.abs(K-T),K=M,T=B;else{var j=y.length-w.length;M=A.getStartOffset(),B=A.getEndOffset(),K=p?B+j:M,T=B+j}var U=N.merge({selectionBefore:D.getSelectionAfter(),selectionAfter:A.merge({anchorOffset:K,focusOffset:T})});e.update(i.push(v,U,P))}else{var H=t.nativeEvent.inputType;if(H){var W=function(e,t){return"deleteContentBackward"===e?u(t):t}(H,v);if(W!==v)return e.restoreEditorDOM(),void e.update(W)}}}}},70835:function(e,t,n){var r=n(98011),o=n(36949),i=n(69645),a=n(40356),c=n(61312),l=n(86128),u=n(26590),s=n(38115),f=n(87049),p=n(89756),d=n(22820),g=n(40637),h=n(45451),y=n(72740),v=n(28533),m=n(91776),S=n(675),b=i.isOptionKeyCommand,k=l.isBrowser("Chrome");e.exports=function(e,t){var n=t.which,i=e._latestEditorState;function l(n){var r=e.props[n];return!!r&&(r(t),!0)}switch(n){case a.RETURN:if(t.preventDefault(),e.props.handleReturn&&u(e.props.handleReturn(t,i)))return;break;case a.ESC:if(t.preventDefault(),l("onEscape"))return;break;case a.TAB:if(l("onTab"))return;break;case a.UP:if(l("onUpArrow"))return;break;case a.RIGHT:if(l("onRightArrow"))return;break;case a.DOWN:if(l("onDownArrow"))return;break;case a.LEFT:if(l("onLeftArrow"))return;break;case a.SPACE:k&&b(t)&&t.preventDefault()}var C=e.props.keyBindingFn(t);if(null!=C&&""!==C)if("undo"!==C){if(t.preventDefault(),!e.props.handleKeyCommand||!u(e.props.handleKeyCommand(C,i,t.timeStamp))){var _=function(e,t,n){switch(e){case"redo":return o.redo(t);case"delete":return v(t);case"delete-word":return p(t);case"backspace":return y(t);case"backspace-word":return f(t);case"backspace-to-start-of-line":return s(t,n);case"split-block":return d(t);case"transpose-characters":return m(t);case"move-selection-to-start-of-block":return h(t);case"move-selection-to-end-of-block":return g(t);case"secondary-cut":return c.cut(t);case"secondary-paste":return c.paste(t);default:return t}}(C,i,t);_!==i&&e.update(_)}}else S(t,i,e.update);else if(n===a.SPACE&&k&&b(t)){var E=r.replaceText(i.getCurrentContent(),i.getSelection()," ");e.update(o.push(i,E,"insert-characters"))}}},64146:function(e,t,n){var r=n(75874),o=n(87446),i=n(35775),a=n(98011),c=n(41349),l=n(36949),u=n(55463),s=n(29625),f=n(6838),p=n(26590),d=n(7013);function g(e,t,n){var r=a.replaceWithFragment(e.getCurrentContent(),e.getSelection(),t);return l.push(e,r.set("entityMap",n),"insert-fragment")}e.exports=function(e,t){t.preventDefault();var n=new i(t.clipboardData);if(!n.isRichText()){var h=n.getFiles(),y=n.getText();if(h.length>0){if(e.props.handlePastedFiles&&p(e.props.handlePastedFiles(h)))return;return void f(h,(function(t){if(t=t||y){var n=e._latestEditorState,i=d(t),f=o.create({style:n.getCurrentInlineStyle(),entity:s(n.getCurrentContent(),n.getSelection())}),p=u.getCurrentBlockType(n),g=c.processText(i,f,p),h=r.createFromArray(g),v=a.replaceWithFragment(n.getCurrentContent(),n.getSelection(),h);e.update(l.push(n,v,"insert-fragment"))}}))}}var v=[],m=n.getText(),S=n.getHTML(),b=e._latestEditorState;if(e.props.formatPastedText){var k=e.props.formatPastedText(m,S);m=k.text,S=k.html}if(!e.props.handlePastedText||!p(e.props.handlePastedText(m,S,b))){if(m&&(v=d(m)),!e.props.stripPastedStyles){var C,_=e.getClipboard();if(!e.props.formatPastedText&&n.isRichText()&&_){if(-1!==(null===(C=S)||void 0===C?void 0:C.indexOf(e.getEditorKey()))||1===v.length&&1===_.size&&_.first().getText()===m)return void e.update(g(e._latestEditorState,_))}else if(_&&n.types.includes("com.apple.webarchive")&&!n.types.includes("text/html")&&function(e,t){return e.length===t.size&&t.valueSeq().every((function(t,n){return t.getText()===e[n]}))}(v,_))return void e.update(g(e._latestEditorState,_));if(S){var E=c.processHTML(S,e.props.blockRenderMap);if(E){var O=E.contentBlocks,D=E.entityMap;if(O){var x=r.createFromArray(O);return void e.update(g(e._latestEditorState,x,D))}}}e.setClipboard(null)}if(v.length){var w=o.create({style:b.getCurrentInlineStyle(),entity:s(b.getCurrentContent(),b.getSelection())}),K=u.getCurrentBlockType(b),T=c.processText(v,w,K),M=r.createFromArray(T);e.update(g(e._latestEditorState,M))}}}},9753:function(e,t,n){var r=n(61733),o=n(36949),i=n(71683),a=n(36071);e.exports=function(e){if(e._blockSelectEvents||e._latestEditorState!==e.props.editorState){if(e._blockSelectEvents){var t=e.props.editorState.getSelection();r.logBlockedSelectionEvent({anonymizedDom:"N/A",extraParams:JSON.stringify({stacktrace:(new Error).stack}),selectionState:JSON.stringify(t.toJS())})}}else{var n=e.props.editorState,c=a(n,i(e)),l=c.selectionState;l!==n.getSelection()&&(n=c.needsRecovery?o.forceSelection(n,l):o.acceptSelection(n,l),e.update(n))}}},96840:function(e,t,n){var r=n(87220),o=n(14065).strlen;e.exports=function(e,t){var n=[];return e.findEntityRanges((function(e){return!!e.getEntity()}),(function(i,a){var c=e.getText(),l=e.getEntityAt(i);n.push({offset:o(c.slice(0,i)),length:o(c.slice(i,a)),key:Number(t[r.stringify(l)])})})),n}},51751:function(e,t,n){var r=n(14065),o=n(11925),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(),n=t.flatten().toSet().map((function(n){return function(e,t,n){var c=[],l=t.map((function(e){return e.has(n)})).toList();return o(l,i,a,(function(t,o){var i=e.getText();c.push({offset:r.strlen(i.slice(0,t)),length:r.strlen(i.slice(t,o)),style:n})})),c}(e,t,n)}));return Array.prototype.concat.apply(c,n.toJS())}},58361:function(e,t,n){var r=n(14065),o=n(72177),i=n(61614),a=n(86913);function c(e,t){for(var n=1/0,r=1/0,o=-1/0,i=-1/0,a=0;a=0;g--)if(!(null!=d&&g>0&&r.isSurrogatePair(d,g-1))){if(e.setStart(f,g),!c(i(e),n))break;u=f,s=g}if(-1===g||0===f.childNodes.length)break;p=l(f=f.childNodes[g])}return e.setStart(u,s),e}},46142:function(e,t,n){var r=n(72177),o=n(47271);e.exports=function(e){for(var t=e;t&&t!==r(e).documentElement;){var n=o(t);if(null!=n)return n;t=t.parentNode}return null}},11925:function(e){e.exports=function(e,t,n,r){if(e.size){var o=0;e.reduce((function(e,i,a){return t(e,i)||(n(e)&&r(o,a),o=a),i})),n(e.last())&&r(o,e.count())}}},60717:function(e){var t={},n=Math.pow(2,24);e.exports=function(){for(var e;void 0===e||t.hasOwnProperty(e)||!isNaN(+e);)e=Math.floor(Math.random()*n).toString(32);return t[e]=!0,e}},46582:function(e,t,n){var r=n(26458),o=n(25888),i=n(86913);function a(e,t,n,a,c,l,u){var s=n.getStartOffset(),f=n.getEndOffset(),p=e.__get(c).getMutability(),d=u?s:f;if("MUTABLE"===p)return n;var g=o(t,c).filter((function(e){return d<=e.end&&d>=e.start}));1!=g.length&&i(!1);var h=g[0];if("IMMUTABLE"===p)return n.merge({anchorOffset:h.start,focusOffset:h.end,isBackward:!1});l||(u?f=h.end:s=h.start);var y=r.getRemovalRange(s,f,t.getText().slice(h.start,h.end),h.start,a);return n.merge({anchorOffset:y.start,focusOffset:y.end,isBackward:!1})}e.exports=function(e,t,n,r,o){var i=r.getStartOffset(),c=r.getEndOffset(),l=t.getEntityAt(i),u=n.getEntityAt(c-1);if(!l&&!u)return r;var s=r;if(l&&l===u)s=a(e,t,s,o,l,!0,!0);else if(l&&u){var f=a(e,t,s,o,l,!1,!0),p=a(e,n,s,o,u,!1,!1);s=s.merge({anchorOffset:f.getAnchorOffset(),focusOffset:p.getFocusOffset(),isBackward:!1})}else if(l){var d=a(e,t,s,o,l,!1,!0);s=s.merge({anchorOffset:d.getStartOffset(),isBackward:!1})}else if(u){var g=a(e,n,s,o,u,!1,!1);s=s.merge({focusOffset:g.getEndOffset(),isBackward:!1})}return s}},71683:function(e,t,n){var r=n(86913),o=n(61339);e.exports=function(e){var t=e.editorContainer;return t||r(!1),o(t.firstChild)||r(!1),t.firstChild}},95242:function(e,t,n){var r=n(5762),o=n(49461);e.exports=function(e,t){var n=t.getStartKey(),i=t.getStartOffset(),a=t.getEndKey(),c=t.getEndOffset(),l=o(e,t).getBlockMap(),u=l.keySeq(),s=u.indexOf(n),f=u.indexOf(a)+1;return r(l.slice(s,f).map((function(e,t){var r=e.getText(),o=e.getCharacterList();return n===a?e.merge({text:r.slice(i,c),characterList:o.slice(i,c)}):t===n?e.merge({text:r.slice(i),characterList:o.slice(i)}):t===a?e.merge({text:r.slice(0,c),characterList:o.slice(0,c)}):e})))}},72177:function(e){e.exports=function(e){return e&&e.ownerDocument?e.ownerDocument:document}},45492:function(e,t,n){var r=n(69645),o=n(40356),i=n(86128),a=i.isPlatform("Mac OS X"),c=a&&i.isBrowser("Firefox < 29"),l=r.hasCommandModifier,u=r.isCtrlKeyCommand;function s(e){return a&&e.altKey||u(e)}e.exports=function(e){switch(e.keyCode){case 66:return l(e)?"bold":null;case 68:return u(e)?"delete":null;case 72:return u(e)?"backspace":null;case 73:return l(e)?"italic":null;case 74:return l(e)?"code":null;case 75:return a&&u(e)?"secondary-cut":null;case 77:case 79:return u(e)?"split-block":null;case 84:return a&&u(e)?"transpose-characters":null;case 85:return l(e)?"underline":null;case 87:return a&&u(e)?"backspace-word":null;case 89:return u(e)?a?"secondary-paste":"redo":null;case 90:return function(e){return l(e)?e.shiftKey?"redo":"undo":null}(e)||null;case o.RETURN:return"split-block";case o.DELETE:return function(e){return!a&&e.shiftKey?null:s(e)?"delete-word":"delete"}(e);case o.BACKSPACE:return function(e){return l(e)&&a?"backspace-to-start-of-line":s(e)?"backspace-word":"backspace"}(e);case o.LEFT:return c&&l(e)?"move-selection-to-start-of-block":null;case o.RIGHT:return c&&l(e)?"move-selection-to-end-of-block":null;default:return null}}},36071:function(e,t,n){var r=n(75958);e.exports=function(e,t){var n=t.ownerDocument.defaultView.getSelection(),o=n.anchorNode,i=n.anchorOffset,a=n.focusNode,c=n.focusOffset;return 0===n.rangeCount||null==o||null==a?{selectionState:e.getSelection().set("hasFocus",!1),needsRecovery:!1}:r(e,t,o,i,a,c)}},75958:function(e,t,n){var r=n(46142),o=n(47271),i=n(81261),a=n(86913),c=n(9050),l=n(65614);function u(e,t,n){var i=t,u=r(i);if(null!=u||e&&(e===i||e.firstChild===i)||a(!1),e===i&&(i=i.firstChild,c(i)||a(!1),"true"!==i.getAttribute("data-contents")&&a(!1),n>0&&(n=i.childNodes.length)),0===n){var f=null;if(null!=u)f=u;else{var p=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(p))}return{key:f,offset:0}}var d=i.childNodes[n-1],g=null,h=null;if(o(d)){var y=function(e){for(;e.lastChild&&(c(e.lastChild)&&"true"===e.lastChild.getAttribute("data-blocks")||o(e.lastChild));)e=e.lastChild;return e}(d);g=l(o(y)),h=s(y)}else g=l(u),h=s(d);return{key:g,offset:h}}function s(e){var t=e.textContent;return"\n"===t?0:t.length}e.exports=function(e,t,n,o,a,c){var s=n.nodeType===Node.TEXT_NODE,f=a.nodeType===Node.TEXT_NODE;if(s&&f)return{selectionState:i(e,l(r(n)),o,l(r(a)),c),needsRecovery:!1};var p=null,d=null,g=!0;return s?(p={key:l(r(n)),offset:o},d=u(t,a,c)):f?(d={key:l(r(a)),offset:c},p=u(t,n,o)):(p=u(t,n,o),d=u(t,a,c),n===a&&o===c&&(g=!!n.firstChild&&"BR"!==n.firstChild.nodeName)),{selectionState:i(e,p.key,p.offset,d.key,d.offset),needsRecovery:g}}},29625:function(e,t,n){var r=n(97269).notEmptyKey;function o(e,t){return r(t)&&"MUTABLE"===e.__get(t).getMutability()?t:null}e.exports=function(e,t){var n;if(t.isCollapsed()){var r=t.getAnchorKey(),i=t.getAnchorOffset();return i>0?(n=e.getBlockForKey(r).getEntityAt(i-1))!==e.getBlockForKey(r).getEntityAt(i)?null:o(e.getEntityMap(),n):null}var a=t.getStartKey(),c=t.getStartOffset(),l=e.getBlockForKey(a);return n=c===l.getLength()?null:l.getEntityAt(c),o(e.getEntityMap(),n)}},95482:function(e,t,n){var r=n(95242);e.exports=function(e){var t=e.getSelection();return t.isCollapsed()?null:r(e.getCurrentContent(),t)}},46064:function(e,t,n){var r=n(80914);e.exports=function(e,t){if(!(e instanceof r))return null;var n=e.getNextSiblingKey();if(n)return n;var o=e.getParentKey();if(!o)return null;for(var i=t.get(o);i&&!i.getNextSiblingKey();){var a=i.getParentKey();i=a?t.get(a):null}return i?i.getNextSiblingKey():null}},74346:function(e){e.exports=function(e){return Object.keys(e).map((function(t){return e[t]}))}},5329:function(e,t,n){var r=n(61614);e.exports=function(e){var t=r(e),n=0,o=0,i=0,a=0;if(t.length){if(t.length>1&&0===t[0].width){var c=t[1];n=c.top,o=c.right,i=c.bottom,a=c.left}else{var l=t[0];n=l.top,o=l.right,i=l.bottom,a=l.left}for(var u=1;u