UNPKG

d2-ui

Version:
12 lines 121 kB
/** * Draft v0.7.0 * * Copyright (c) 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ var Draft=function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";var r=n(57),o=n(14),i=n(6),s=n(58),a=n(10),u=n(21),c=n(22),l=n(34),f=n(60),p=n(35),g=n(4),d=n(9),h=n(36),y=n(1),v=n(23),m=n(71),b=n(13),k=n(76),w=n(39),S=n(77),C=n(7),x=n(40),O=n(100),E={Editor:f,EditorBlock:p,EditorState:y,CompositeDecorator:s,Entity:d,EntityInstance:h,BlockMapBuilder:o,CharacterMetadata:i,ContentBlock:a,ContentState:u,SelectionState:b,AtomicBlockUtils:r,KeyBindingUtil:v,Modifier:g,RichUtils:m,DefaultDraftBlockRenderMap:c,DefaultDraftInlineStyle:l,convertFromHTML:w,convertFromRaw:S,convertToRaw:k,genKey:C,getDefaultKeyBinding:x,getVisibleSelectionRect:O};e.exports=E},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t,n){return x.set(e,{selection:t,forceSelection:n,nativelyRenderedContent:null,inlineStyleOverride:null})}function i(e,t){return e.getBlockMap().map(function(e){return d.generate(e,t)}).toOrderedMap()}function s(e,t,n){var r=e.getCurrentContent().getBlockMap(),o=e.getImmutable().get("treeMap");return o.merge(t.toSeq().filter(function(e,t){return e!==r.get(t)}).map(function(e){return d.generate(e,n)}))}function a(e,t,n,r){return t.merge(e.toSeq().filter(function(e){return n.getDecorations(e)!==r.getDecorations(e)}).map(function(e){return d.generate(e,n)}))}function u(e,t){var n=e.getLastChangeType();return t!==n||"insert-characters"!==t&&"backspace-character"!==t&&"delete-character"!==t}function c(e,t){var n=t.getStartKey(),r=t.getStartOffset(),o=e.getBlockForKey(n);return r>0?o.getInlineStyleAt(r-1):o.getLength()?o.getInlineStyleAt(0):f(e,n)}function l(e,t){var n=t.getStartKey(),r=t.getStartOffset(),o=e.getBlockForKey(n);return r<o.getLength()?o.getInlineStyleAt(r):r>0?o.getInlineStyleAt(r-1):f(e,n)}function f(e,t){for(var n,r=e.getBlockBefore(t);r;){if(n=r.getLength())return r.getInlineStyleAt(n-1);r=e.getBlockBefore(r.getKey())}return b()}var p=Object.assign||function(e){var t,n,r;for(t=1;t<arguments.length;t++){n=arguments[t];for(r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},g=function(){function e(e,t){var n,r;for(n=0;n<t.length;n++)r=t[n],r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),d=n(33),h=n(21),y=n(70),v=n(2),m=n(13),b=v.OrderedSet,k=v.Record,w=v.Stack,S={allowUndo:!0,currentContent:null,decorator:null,directionMap:null,forceSelection:!1,inCompositionMode:!1,inlineStyleOverride:null,lastChangeType:null,nativelyRenderedContent:null,redoStack:w(),selection:null,treeMap:null,undoStack:w()},C=k(S),x=function(){function e(t){r(this,e),this._immutable=t}return g(e,[{key:"toJS",value:function(){return this.getImmutable().toJS()}},{key:"getAllowUndo",value:function(){return this.getImmutable().get("allowUndo")}},{key:"getCurrentContent",value:function(){return this.getImmutable().get("currentContent")}},{key:"getUndoStack",value:function(){return this.getImmutable().get("undoStack")}},{key:"getRedoStack",value:function(){return this.getImmutable().get("redoStack")}},{key:"getSelection",value:function(){return this.getImmutable().get("selection")}},{key:"getDecorator",value:function(){return this.getImmutable().get("decorator")}},{key:"isInCompositionMode",value:function(){return this.getImmutable().get("inCompositionMode")}},{key:"mustForceSelection",value:function(){return this.getImmutable().get("forceSelection")}},{key:"getNativelyRenderedContent",value:function(){return this.getImmutable().get("nativelyRenderedContent")}},{key:"getLastChangeType",value:function(){return this.getImmutable().get("lastChangeType")}},{key:"getInlineStyleOverride",value:function(){return this.getImmutable().get("inlineStyleOverride")}},{key:"getCurrentInlineStyle",value:function(){var e,t,n=this.getInlineStyleOverride();return null!=n?n:(e=this.getCurrentContent(),t=this.getSelection(),t.isCollapsed()?c(e,t):l(e,t))}},{key:"getBlockTree",value:function(e){return this.getImmutable().getIn(["treeMap",e])}},{key:"isSelectionAtStartOfContent",value:function(){var e=this.getCurrentContent().getBlockMap().first().getKey();return this.getSelection().hasEdgeWithin(e,0,0)}},{key:"isSelectionAtEndOfContent",value:function(){var e=this.getCurrentContent(),t=e.getBlockMap(),n=t.last(),r=n.getLength();return this.getSelection().hasEdgeWithin(n.getKey(),r,r)}},{key:"getDirectionMap",value:function(){return this.getImmutable().get("directionMap")}}],[{key:"createEmpty",value:function(t){return e.createWithContent(h.createFromText(""),t)}},{key:"createWithContent",value:function(t,n){var r=t.getBlockMap().first().getKey();return e.create({currentContent:t,undoStack:w(),redoStack:w(),decorator:n||null,selection:m.createEmpty(r)})}},{key:"create",value:function(t){var n=t.currentContent,r=t.decorator,o=p({},t,{treeMap:i(n,r),directionMap:y.getDirectionMap(n)});return new e(new C(o))}},{key:"set",value:function(t,n){var r=t.getImmutable().withMutations(function(e){var r,o,u,c,l=e.get("decorator"),f=l;return null===n.decorator?f=null:n.decorator&&(f=n.decorator),r=n.currentContent||t.getCurrentContent(),f!==l?(o=e.get("treeMap"),u=f&&l?a(r.getBlockMap(),o,f,l):i(r,f),void e.merge({decorator:f,treeMap:u,nativelyRenderedContent:null})):(c=t.getCurrentContent(),r!==c&&e.set("treeMap",s(t,r.getBlockMap(),f)),void e.merge(n))});return new e(r)}},{key:"setInlineStyleOverride",value:function(t,n){return e.set(t,{inlineStyleOverride:n})}},{key:"acceptSelection",value:function(e,t){return o(e,t,!1)}},{key:"forceSelection",value:function(e,t){return t.getHasFocus()||(t=t.set("hasFocus",!0)),o(e,t,!0)}},{key:"moveSelectionToEnd",value:function(t){var n=t.getCurrentContent(),r=n.getLastBlock(),o=r.getKey(),i=r.getLength();return e.acceptSelection(t,new m({anchorKey:o,anchorOffset:i,focusKey:o,focusOffset:i,isBackward:!1}))}},{key:"moveFocusToEnd",value:function(t){var n=e.moveSelectionToEnd(t);return e.forceSelection(n,n.getSelection())}},{key:"push",value:function(t,n,r){var o,i,s,a,c,l,f,p;return t.getCurrentContent()===n?t:(o="insert-characters"!==r,i=y.getDirectionMap(n,t.getDirectionMap()),t.getAllowUndo()?(s=t.getSelection(),a=t.getCurrentContent(),c=t.getUndoStack(),l=n,s!==a.getSelectionAfter()||u(t,r)?(c=c.push(a),l=l.set("selectionBefore",s)):"insert-characters"!==r&&"backspace-character"!==r&&"delete-character"!==r||(l=l.set("selectionBefore",a.getSelectionBefore())),f=t.getInlineStyleOverride(),"adjust-depth"!==r&&"change-block-type"!==r&&(f=null),p={currentContent:l,directionMap:i,undoStack:c,redoStack:w(),lastChangeType:r,selection:n.getSelectionAfter(),forceSelection:o,inlineStyleOverride:f},e.set(t,p)):e.set(t,{currentContent:n,directionMap:i,lastChangeType:r,selection:n.getSelectionAfter(),forceSelection:o,inlineStyleOverride:null}))}},{key:"undo",value:function(t){var n,r,o,i;return t.getAllowUndo()?(n=t.getUndoStack(),(r=n.peek())?(o=t.getCurrentContent(),i=y.getDirectionMap(r,t.getDirectionMap()),e.set(t,{currentContent:r,directionMap:i,undoStack:n.shift(),redoStack:t.getRedoStack().push(o),forceSelection:!0,inlineStyleOverride:null,lastChangeType:"undo",nativelyRenderedContent:null,selection:o.getSelectionBefore()})):t):t}},{key:"redo",value:function(t){var n,r,o,i;return t.getAllowUndo()?(n=t.getRedoStack(),(r=n.peek())?(o=t.getCurrentContent(),i=y.getDirectionMap(r,t.getDirectionMap()),e.set(t,{currentContent:r,directionMap:i,undoStack:t.getUndoStack().push(o),redoStack:n.shift(),forceSelection:!0,inlineStyleOverride:null,lastChangeType:"redo",nativelyRenderedContent:null,selection:r.getSelectionAfter()})):t):t}}]),g(e,[{key:"getImmutable",value:function(){return this._immutable}}]),e}();e.exports=x},function(e,t){e.exports=Immutable},function(e,t,n){"use strict";function r(e,t,n,r,o,i,s,a){var u,c,l;if(!e)throw void 0===t?u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings."):(c=[n,r,o,i,s,a],l=0,u=new Error(t.replace(/%s/g,function(){return c[l++]})),u.name="Invariant Violation"),u.framesToPop=1,u}e.exports=r},function(e,t,n){"use strict";var r=n(6),o=n(59),i=n(2),s=i.OrderedSet,a=n(75),u=n(96),c=n(20),l=n(101),f=n(102),p=n(3),g=n(51),d=n(113),h=n(114),y=n(116),v={replaceText:function(e,t,n,o,i){var a=g(e,t),u=d(a,t),c=r.create({style:o||s(),entity:i||null});return f(u,u.getSelectionAfter(),n,c)},insertText:function(e,t,n,r,o){return t.isCollapsed()?void 0:p(!1),v.replaceText(e,t,n,r,o)},moveText:function(e,t,n){var r=c(e,t),o=v.removeRange(e,t,"backward");return v.replaceWithFragment(o,n,r)},replaceWithFragment:function(e,t,n){var r=g(e,t),o=d(r,t);return l(o,o.getSelectionAfter(),n)},removeRange:function(e,t,n){var r,o,i,s,a,c,l,f;return t.getAnchorKey()===t.getFocusKey()&&(r=t.getAnchorKey(),o=t.getStartOffset(),i=t.getEndOffset(),s=e.getBlockForKey(r),a=s.getEntityAt(o),c=s.getEntityAt(i-1),a&&a===c)?(l=u(s,t,n),d(e,l)):(f=g(e,t),d(f,t))},splitBlock:function(e,t){var n=g(e,t),r=d(n,t);return y(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 h(e,t,n)},applyEntity:function(e,t,n){var r=g(e,t);return a(r,t,n)}};e.exports=v},function(e,t){"use strict";var n=function(e){if(null!=e)return e;throw new Error("Got unexpected null or undefined")};e.exports=n},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){var n,r;for(n=0;n<t.length;n++)r=t[n],r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=function(e,t,n){for(var r,o,i,s,a,u,c=!0;c;){if(r=e,o=t,i=n,c=!1,null===r&&(r=Function.prototype),s=Object.getOwnPropertyDescriptor(r,o),void 0!==s){if("value"in s)return s.value;if(u=s.get,void 0===u)return;return u.call(i)}if(a=Object.getPrototypeOf(r),null===a)return;e=a,t=o,n=i,c=!0,s=a=void 0}},a=n(2),u=a.Map,c=a.OrderedSet,l=a.Record,f=c(),p={style:f,entity:null},g=l(p),d=function(e){function t(){r(this,t),s(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return o(t,e),i(t,[{key:"getStyle",value:function(){return this.get("style")}},{key:"getEntity",value:function(){return this.get("entity")}},{key:"hasStyle",value:function(e){return this.getStyle().has(e)}}],[{key:"applyStyle",value:function(e,n){var r=e.set("style",e.getStyle().add(n));return t.create(r)}},{key:"removeStyle",value:function(e,n){var r=e.set("style",e.getStyle().remove(n));return t.create(r)}},{key:"applyEntity",value:function(e,n){var r=e.getEntity()===n?e:e.set("entity",n);return t.create(r)}},{key:"create",value:function(e){var n,r,o;return e?(n=u({style:f,entity:null}).merge(e),(r=y.get(n))?r:(o=new t(n),y=y.set(n,o),o)):h}}]),t}(g),h=new d,y=u([[u(p),h]]);d.EMPTY=h,e.exports=d},function(e,t){"use strict";function n(){for(var e=void 0;void 0===e||r.hasOwnProperty(e)||!isNaN(+e);)e=Math.floor(Math.random()*o).toString(32);return r[e]=!0,e}var r={},o=Math.pow(2,24);e.exports=n},function(e,t,n){"use strict";function r(e,t,n,r){if(e===n)return!0;if(!n.startsWith(e))return!1;var o=n.slice(e.length);return t?(o=r?r(o):o,s.contains(o,t)):!1}function o(e){return"Windows"===i.platformName?e.replace(/^\s*NT/,""):e}var i=n(122),s=n(123),a=n(136),u=n(137),c={isBrowser:function(e){return r(i.browserName,i.browserFullVersion,e)},isBrowserArchitecture:function(e){return r(i.browserArchitecture,null,e)},isDevice:function(e){return r(i.deviceName,null,e)},isEngine:function(e){return r(i.engineName,i.engineVersion,e)},isPlatform:function(e){return r(i.platformName,i.platformFullVersion,e,o)},isPlatformArchitecture:function(e){return r(i.platformArchitecture,null,e)}};e.exports=a(c,u)},function(e,t,n){"use strict";var r=Object.assign||function(e){var t,n,r;for(t=1;t<arguments.length;t++){n=arguments[t];for(r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=n(36),i=n(2),s=n(3),a=i.Map,u=a(),c=0,l={create:function(e,t,n){return l.add(new o({type:e,mutability:t,data:n||{}}))},add:function(e){var t=""+ ++c;return u=u.set(t,e),t},get:function(e){var t=u.get(e);return t?void 0:s(!1),t},mergeData:function(e,t){var n=l.get(e),o=r({},n.getData(),t),i=n.set("data",o);return u=u.set(e,i),i},replaceData:function(e,t){var n=l.get(e),r=n.set("data",t);return u=u.set(e,r),r}};e.exports=l},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function i(e,t){return e.getStyle()===t.getStyle()}function s(e,t){return e.getEntity()===t.getEntity()}var a=function(){function e(e,t){var n,r;for(n=0;n<t.length;n++)r=t[n],r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=function(e,t,n){for(var r,o,i,s,a,u,c=!0;c;){if(r=e,o=t,i=n,c=!1,null===r&&(r=Function.prototype),s=Object.getOwnPropertyDescriptor(r,o),void 0!==s){if("value"in s)return s.value;if(u=s.get,void 0===u)return;return u.call(i)}if(a=Object.getPrototypeOf(r),null===a)return;e=a,t=o,n=i,c=!0,s=a=void 0}},c=n(2),l=n(19),f=c.List,p=c.OrderedSet,g=c.Record,d=p(),h={key:"",type:"unstyled",text:"",characterList:f(),depth:0},y=g(h),v=function(e){function t(){r(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return o(t,e),a(t,[{key:"getKey",value:function(){return this.get("key")}},{key:"getType",value:function(){return this.get("type")}},{key:"getText",value:function(){return this.get("text")}},{key:"getCharacterList",value:function(){return this.get("characterList")}},{key:"getLength",value:function(){return this.getText().length}},{key:"getDepth",value:function(){return this.get("depth")}},{key:"getInlineStyleAt",value:function(e){var t=this.getCharacterList().get(e);return t?t.getStyle():d}},{key:"getEntityAt",value:function(e){var t=this.getCharacterList().get(e);return t?t.getEntity():null}},{key:"findStyleRanges",value:function(e,t){l(this.getCharacterList(),i,e,t)}},{key:"findEntityRanges",value:function(e,t){l(this.getCharacterList(),s,e,t)}}]),t}(y);e.exports=v},function(e,t,n){"use strict";function r(e){return e>=p&&h>=e}function o(e,t){var n,r;return t>=0&&t<e.length?void 0:f(!1),t+1===e.length?!1:(n=e.charCodeAt(t),r=e.charCodeAt(t+1),n>=p&&g>=n&&r>=d&&h>=r)}function i(e){return y.test(e)}function s(e,t){return 1+r(e.charCodeAt(t))}function a(e){var t,n;if(!i(e))return e.length;for(t=0,n=0;n<e.length;n+=s(e,n))t++;return t}function u(e,t,n){var r,o,a;if(t=t||0,n=void 0===n?1/0:n||0,!i(e))return e.substr(t,n);if(r=e.length,0>=r||t>r||0>=n)return"";if(o=0,t>0){for(;t>0&&r>o;t--)o+=s(e,o);if(o>=r)return""}else if(0>t){for(o=r;0>t&&o>0;t++)o-=s(e,o-1);0>o&&(o=0)}if(a=r,r>n)for(a=o;n>0&&r>a;n--)a+=s(e,a);return e.substring(o,a)}function c(e,t,n){t=t||0,n=void 0===n?1/0:n||0,0>t&&(t=0),0>n&&(n=0);var r=Math.abs(n-t);return t=n>t?t:n,u(e,t,r)}function l(e){var t,n=[];for(t=0;t<e.length;t+=s(e,t))n.push(e.codePointAt(t));return n}var f=n(3),p=55296,g=56319,d=56320,h=57343,y=/[\uD800-\uDFFF]/,v={getCodePoints:l,getUTF16Length:s,hasSurrogateUnit:i,isCodeUnitInSurrogateRange:r,isSurrogatePair:o,strlen:a,substring:c,substr:u};e.exports=v},function(e,t){e.exports=React},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){var n,r;for(n=0;n<t.length;n++)r=t[n],r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=function(e,t,n){for(var r,o,i,s,a,u,c=!0;c;){if(r=e,o=t,i=n,c=!1,null===r&&(r=Function.prototype),s=Object.getOwnPropertyDescriptor(r,o),void 0!==s){if("value"in s)return s.value;if(u=s.get,void 0===u)return;return u.call(i)}if(a=Object.getPrototypeOf(r),null===a)return;e=a,t=o,n=i,c=!0,s=a=void 0}},a=n(2),u=a.Record,c={anchorKey:"",anchorOffset:0,focusKey:"",focusOffset:0,isBackward:!1,hasFocus:!1},l=u(c),f=function(e){function t(){r(this,t),s(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return o(t,e),i(t,[{key:"serialize",value:function(){return"Anchor: "+this.getAnchorKey()+":"+this.getAnchorOffset()+", Focus: "+this.getFocusKey()+":"+this.getFocusOffset()+", Is Backward: "+String(this.getIsBackward())+", Has Focus: "+String(this.getHasFocus())}},{key:"getAnchorKey",value:function(){return this.get("anchorKey")}},{key:"getAnchorOffset",value:function(){return this.get("anchorOffset")}},{key:"getFocusKey",value:function(){return this.get("focusKey")}},{key:"getFocusOffset",value:function(){return this.get("focusOffset")}},{key:"getIsBackward",value:function(){return this.get("isBackward")}},{key:"getHasFocus",value:function(){return this.get("hasFocus")}},{key:"hasEdgeWithin",value:function(e,t,n){var r,o,i,s=this.getAnchorKey(),a=this.getFocusKey();return s===a&&s===e?(r=this.getStartOffset(),o=this.getEndOffset(),o>=t&&n>=r):e!==s&&e!==a?!1:(i=e===s?this.getAnchorOffset():this.getFocusOffset(),i>=t&&n>=i)}},{key:"isCollapsed",value:function(){return this.getAnchorKey()===this.getFocusKey()&&this.getAnchorOffset()===this.getFocusOffset()}},{key:"getStartKey",value:function(){return this.getIsBackward()?this.getFocusKey():this.getAnchorKey()}},{key:"getStartOffset",value:function(){return this.getIsBackward()?this.getFocusOffset():this.getAnchorOffset()}},{key:"getEndKey",value:function(){return this.getIsBackward()?this.getAnchorKey():this.getFocusKey()}},{key:"getEndOffset",value:function(){return this.getIsBackward()?this.getAnchorOffset():this.getFocusOffset()}}],[{key:"createEmpty",value:function(e){return new t({anchorKey:e,anchorOffset:0,focusKey:e,focusOffset:0,isBackward:!1,hasFocus:!1})}}]),t}(l);e.exports=f},function(e,t,n){"use strict";var r=n(2),o=r.OrderedMap,i={createFromArray:function(e){return o(e.map(function(e){return[e.getKey(),e]}))}};e.exports=i},function(e,t,n){"use strict";function r(e,t,n){var r=e.getSelection(),i=e.getCurrentContent(),s=r;if(r.isCollapsed()){if("forward"===n){if(e.isSelectionAtEndOfContent())return i}else if(e.isSelectionAtStartOfContent())return i;if(s=t(e),s===r)return i}return o.removeRange(i,s,n)}var o=n(4);e.exports=r},function(e,t){"use strict";function n(e){return"object"==typeof e?Object.keys(e).filter(function(t){return e[t]}).map(r).join(" "):Array.prototype.map.call(arguments,r).join(" ")}function r(e){return e.replace(/\//g,"-")}e.exports=n},function(e,t){e.exports=ReactDOM},function(e,t){"use strict";var n=function(){function e(e,t){var n,r,o=[],i=!0,s=!1,a=void 0;try{for(n=e[Symbol.iterator]();!(i=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);i=!0);}catch(u){s=!0,a=u}finally{try{!i&&n.return&&n.return()}finally{if(s)throw a}}return o}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r="-",o={encode:function(e,t,n){return e+r+t+r+n},decode:function(e){var t=e.split(r),o=n(t,3),i=o[0],s=o[1],a=o[2];return{blockKey:i,decoratorKey:parseInt(s,10),leafKey:parseInt(a,10)}}};e.exports=o},function(e,t){"use strict";function n(e,t,n,r){if(e.size){var o=0;e.reduce(function(e,i,s){return t(e,i)||(n(e)&&r(o,s),o=s),i}),n(e.last())&&r(o,e.count())}}e.exports=n},function(e,t,n){"use strict";function r(e,t){var n=t.getStartKey(),r=t.getStartOffset(),s=t.getEndKey(),a=t.getEndOffset(),u=i(e,t),c=u.getBlockMap(),l=c.keySeq(),f=l.indexOf(n),p=l.indexOf(s)+1,g=c.slice(f,p).map(function(e,t){var i=o(),u=e.getText(),c=e.getCharacterList();return n===s?e.merge({key:i,text:u.slice(r,a),characterList:c.slice(r,a)}):t===n?e.merge({key:i,text:u.slice(r),characterList:c.slice(r)}):t===s?e.merge({key:i,text:u.slice(0,a),characterList:c.slice(0,a)}):e.set("key",i)});return g.toOrderedMap()}var o=n(7),i=n(51);e.exports=r},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){var n,r;for(n=0;n<t.length;n++)r=t[n],r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=function(e,t,n){for(var r,o,i,s,a,u,c=!0;c;){if(r=e,o=t,i=n,c=!1,null===r&&(r=Function.prototype),s=Object.getOwnPropertyDescriptor(r,o),void 0!==s){if("value"in s)return s.value;if(u=s.get,void 0===u)return;return u.call(i)}if(a=Object.getPrototypeOf(r),null===a)return;e=a,t=o,n=i,c=!0,s=a=void 0}},a=n(14),u=n(6),c=n(10),l=n(2),f=n(13),p=n(7),g=n(27),d=l.List,h=l.Record,y=l.Repeat,v={blockMap:null,selectionBefore:null,selectionAfter:null},m=h(v),b=function(e){function t(){r(this,t),s(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return o(t,e),i(t,[{key:"getBlockMap",value:function(){return this.get("blockMap")}},{key:"getSelectionBefore",value:function(){return this.get("selectionBefore")}},{key:"getSelectionAfter",value:function(){return this.get("selectionAfter")}},{key:"getBlockForKey",value:function(e){var t=this.getBlockMap().get(e);return t}},{key:"getKeyBefore",value:function(e){return this.getBlockMap().reverse().keySeq().skipUntil(function(t){return t===e}).skip(1).first()}},{key:"getKeyAfter",value:function(e){return this.getBlockMap().keySeq().skipUntil(function(t){return t===e}).skip(1).first()}},{key:"getBlockAfter",value:function(e){return this.getBlockMap().skipUntil(function(t,n){return n===e}).skip(1).first()}},{key:"getBlockBefore",value:function(e){return this.getBlockMap().reverse().skipUntil(function(t,n){return n===e}).skip(1).first()}},{key:"getBlocksAsArray",value:function(){return this.getBlockMap().toArray()}},{key:"getFirstBlock",value:function(){return this.getBlockMap().first()}},{key:"getLastBlock",value:function(){return this.getBlockMap().last()}},{key:"getPlainText",value:function(e){return this.getBlockMap().map(function(e){return e?e.getText():""}).join(e||"\n")}},{key:"hasText",value:function(){var e=this.getBlockMap();return e.size>1||e.first().getLength()>0}}],[{key:"createFromBlockArray",value:function(e){var n=a.createFromArray(e),r=f.createEmpty(n.first().getKey());return new t({blockMap:n,selectionBefore:r,selectionAfter:r})}},{key:"createFromText",value:function(e){var n=arguments.length<=1||void 0===arguments[1]?/\r\n?|\n/g:arguments[1],r=e.split(n),o=r.map(function(e){return e=g(e),new c({key:p(),text:e,type:"unstyled",characterList:d(y(u.EMPTY,e.length))})});return t.createFromBlockArray(o)}}]),t}(m);e.exports=b},function(e,t,n){"use strict";var r=n(2),o=r.Map,i=n(12),s=n(16),a=i.createElement("ul",{className:s("public/DraftStyleDefault/ul")}),u=i.createElement("ol",{className:s("public/DraftStyleDefault/ol")}),c=i.createElement("pre",{className:s("public/DraftStyleDefault/pre")});e.exports=o({"header-one":{element:"h1"},"header-two":{element:"h2"},"header-three":{element:"h3"},"header-four":{element:"h4"},"header-five":{element:"h5"},"header-six":{element:"h6"},"unordered-list-item":{element:"li",wrapper:a},"ordered-list-item":{element:"li",wrapper:u},blockquote:{element:"blockquote"},atomic:{element:"figure"},"code-block":{element:"pre",wrapper:c},unstyled:{element:"div"}})},function(e,t,n){"use strict";var r=n(8),o=r.isPlatform("Mac OS X"),i={isCtrlKeyCommand:function(e){return!!e.ctrlKey&&!e.altKey},isOptionKeyCommand:function(e){return o&&e.altKey},hasCommandModifier:function(e){return o?!!e.metaKey&&!e.altKey:i.isCtrlKeyCommand(e)}};e.exports=i},function(e,t,n){"use strict";function r(e){for(;e&&e!==document.documentElement;){var t=o(e);if(null!=t)return t;e=e.parentNode}return null}var o=n(45);e.exports=r},function(e,t,n){"use strict";function r(e,t){var n,r,i,s,a,u;return t.isCollapsed()?(r=t.getAnchorKey(),i=t.getAnchorOffset(),i>0?(n=e.getBlockForKey(r).getEntityAt(i-1),o(n)):null):(s=t.getStartKey(),a=t.getStartOffset(),u=e.getBlockForKey(s),n=a===u.getLength()?null:u.getEntityAt(a),o(n))}function o(e){if(e){var t=i.get(e);return"MUTABLE"===t.getMutability()?e:null}return null}var i=n(9);e.exports=r},function(e,t){"use strict";function n(e,t){var n,r,o=e.getSelection(),i=e.getCurrentContent(),s=o.getStartKey(),a=o.getStartOffset(),u=s,c=0;return t>a?(n=i.getKeyBefore(s),null==n?u=s:(u=n,r=i.getBlockForKey(n),c=r.getText().length)):c=a-t,o.merge({focusKey:u,focusOffset:c,isBackward:!0})}e.exports=n},function(e,t){"use strict";function n(e){return e.replace(r,"")}var r=new RegExp("\r","g");e.exports=n},function(e,t){"use strict";e.exports={BACKSPACE:8,TAB:9,RETURN:13,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46,COMMA:188,PERIOD:190,A:65,Z:90,ZERO:48,NUMPAD_0:96,NUMPAD_9:105}},function(e,t,n){"use strict";function r(e,t){var n=i.get(e,t);return"auto"===n||"scroll"===n}var o=n(129),i={get:o,getScrollParent:function(e){if(!e)return null;for(;e&&e!==document.body;){if(r(e,"overflow")||r(e,"overflowY")||r(e,"overflowX"))return e;e=e.parentNode}return window}};e.exports=i},function(e,t,n){"use strict";function r(e){return e===f||e===p}function o(e){return r(e)?void 0:c(!1),e===f?"ltr":"rtl"}function i(e,t){return r(e)?void 0:c(!1),r(t)?void 0:c(!1),e===t?null:o(e)}function s(e){g=e}function a(){s(f)}function u(){return g||this.initGlobalDir(),g?void 0:c(!1),g}var c=n(3),l="NEUTRAL",f="LTR",p="RTL",g=null,d={NEUTRAL:l,LTR:f,RTL:p,isStrong:r,getHTMLDir:o,getHTMLDirIfDifferent:i,setGlobalDir:s,initGlobalDir:a,getGlobalDir:u};e.exports=d},function(e,t){"use strict";function n(e){return function(){return e}}function r(){}r.thatReturns=n,r.thatReturnsFalse=n(!1),r.thatReturnsTrue=n(!0),r.thatReturnsNull=n(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(e){return e},e.exports=r},function(e,t,n){"use strict";function r(e){var t,n,r,s,a=o();return e===window&&(e=a),t=i(e),n=e===a?document.documentElement:e,r=e.scrollWidth-n.clientWidth,s=e.scrollHeight-n.clientHeight,t.x=Math.max(0,Math.min(t.x,r)),t.y=Math.max(0,Math.min(t.y,s)),t}var o=n(126),i=n(130);e.exports=r},function(e,t,n){"use strict";function r(e,t){var n=[],r=e.map(function(e){return e.getStyle()}).toList();return a(r,o,f,function(e,r){n.push(new d({start:e+t,end:r+t}))}),u(n)}function o(e,t){return e===t}var i=n(2),s=n(31),a=n(19),u=i.List,c=i.Repeat,l=i.Record,f=s.thatReturnsTrue,p="-",g={start:null,end:null},d=l(g),h={start:null,end:null,decoratorKey:null,leaves:null},y=l(h),v={generate:function(e,t){var n,i,s,l=e.getLength();return l?(n=[],i=t?t.getDecorations(e):u(c(null,l)),s=e.getCharacterList(),a(i,o,f,function(e,t){n.push(new y({start:e,end:t,decoratorKey:i.get(e),leaves:r(s.slice(e,t).toList(),e)}))}),u(n)):u.of(new y({start:0,end:0,decoratorKey:null,leaves:u.of(new d({start:0,end:0}))}))},getFingerprint:function(e){return e.map(function(e){var t=e.get("decoratorKey"),n=null!==t?t+"."+(e.get("end")-e.get("start")):"";return""+n+"."+e.get("leaves").size}).join(p)}};e.exports=v},function(e,t){"use strict";e.exports={BOLD:{fontWeight:"bold"},CODE:{fontFamily:"monospace",wordWrap:"break-word"},ITALIC:{fontStyle:"italic"},STRIKETHROUGH:{textDecoration:"line-through"},UNDERLINE:{textDecoration:"underline"}}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function i(e,t){return e.getAnchorKey()===t||e.getFocusKey()===t}var s=Object.assign||function(e){var t,n,r;for(t=1;t<arguments.length;t++){n=arguments[t];for(r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=function(){function e(e,t){var n,r;for(n=0;n<t.length;n++)r=t[n],r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=function(e,t,n){for(var r,o,i,s,a,u,c=!0;c;){if(r=e,o=t,i=n,c=!1,null===r&&(r=Function.prototype),s=Object.getOwnPropertyDescriptor(r,o),void 0!==s){if("value"in s)return s.value;if(u=s.get,void 0===u)return;return u.call(i)}if(a=Object.getPrototypeOf(r),null===a)return;e=a,t=o,n=i,c=!0,s=a=void 0}},c=(n(10),n(65)),l=n(18),f=n(12),p=n(17),g=n(53),d=(n(13),n(29)),h=n(54),y=n(30),v=n(16),m=n(127),b=n(32),k=n(131),w=n(5),S=10,C=function(e){function t(){r(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return o(t,e),a(t,[{key:"shouldComponentUpdate",value:function(e){return this.props.block!==e.block||this.props.tree!==e.tree||this.props.direction!==e.direction||i(e.selection,e.block.getKey())&&e.forceSelection}},{key:"componentDidMount",value:function(){var e,t,n,r,o,i,s,a,u,c=this.props.selection,l=c.getEndKey();c.getHasFocus()&&l===this.props.block.getKey()&&(e=p.findDOMNode(this),t=d.getScrollParent(e),n=b(t),t===window?(o=m(e),i=o.y+o.height,s=k().height,r=i-s,r>0&&window.scrollTo(n.x,n.y+r+S)):(a=e.offsetHeight+e.offsetTop,u=t.offsetHeight+n.y,r=a-u,r>0&&g.setTop(t,g.getTop(t)+r+S)))}},{key:"_renderChildren",value:function(){var e=this,t=this.props.block,n=t.getKey(),r=t.getText(),o=this.props.tree.size-1,a=i(this.props.selection,n);return this.props.tree.map(function(i,u){var p,g,d,v,m,b,k=i.get("leaves"),S=k.size-1,C=k.map(function(i,s){var p=l.encode(n,u,s),g=i.get("start"),d=i.get("end");return f.createElement(c,{key:p,offsetKey:p,blockKey:n,start:g,selection:a?e.props.selection:void 0,forceSelection:e.props.forceSelection,text:r.slice(g,d),styleSet:t.getInlineStyleAt(g),customStyleMap:e.props.customStyleMap,isLast:u===o&&s===S})}).toArray(),x=i.get("decoratorKey");return null==x?C:e.props.decorator?(p=w(e.props.decorator),(g=p.getComponentForKey(x))?(d=p.getPropsForKey(x),v=l.encode(n,u,0),m=r.slice(k.first().get("start"),k.last().get("end")),b=y.getHTMLDirIfDifferent(h.getDirection(m),e.props.direction),f.createElement(g,s({},d,{decoratedText:m,dir:b,key:v,entityKey:t.getEntityAt(i.get("start")),offsetKey:v}),C)):C):C}).toArray()}},{key:"render",value:function(){var e=this.props,t=e.direction,n=e.offsetKey,r=v({ "public/DraftStyleDefault/block":!0,"public/DraftStyleDefault/ltr":"LTR"===t,"public/DraftStyleDefault/rtl":"RTL"===t});return f.createElement("div",{"data-offset-key":n,className:r},this._renderChildren())}}]),t}(f.Component);e.exports=C},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){var n,r;for(n=0;n<t.length;n++)r=t[n],r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=function(e,t,n){for(var r,o,i,s,a,u,c=!0;c;){if(r=e,o=t,i=n,c=!1,null===r&&(r=Function.prototype),s=Object.getOwnPropertyDescriptor(r,o),void 0!==s){if("value"in s)return s.value;if(u=s.get,void 0===u)return;return u.call(i)}if(a=Object.getPrototypeOf(r),null===a)return;e=a,t=o,n=i,c=!0,s=a=void 0}},a=n(2),u=a.Record,c=u({type:"TOKEN",mutability:"IMMUTABLE",data:Object}),l=function(e){function t(){r(this,t),s(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return o(t,e),i(t,[{key:"getType",value:function(){return this.get("type")}},{key:"getMutability",value:function(){return this.get("mutability")}},{key:"getData",value:function(){return this.get("data")}}]),t}(c);e.exports=l},function(e,t,n){"use strict";function r(e,t){var n=t?f.exec(e):c.exec(e);return n?n[0]:e}var o=n(119),i=o.getPunctuation(),s="['‘’]",a="\\s|(?![_])"+i,u="^(?:"+a+")*(?:"+s+"|(?!"+a+").)*(?:(?!"+a+").)",c=new RegExp(u),l="(?:(?!"+a+").)(?:"+s+"|(?!"+a+").)*(?:"+a+")*$",f=new RegExp(l),p={getBackward:function(e){return r(e,!0)},getForward:function(e){return r(e,!1)}};e.exports=p},function(e,t){"use strict";var n={stringify:function(e){return"_"+String(e)},unstringify:function(e){return e.slice(1)}};e.exports=n},function(e,t,n){"use strict";function r(){return{text:"",inlines:[],entities:[],blocks:[]}}function o(e){var t=new Array(1);return e&&(t[0]=e),{text:_,inlines:[B()],entities:t,blocks:[]}}function i(){return{text:"\n",inlines:[B()],entities:new Array(1),blocks:[]}}function s(e,t){return{text:"\r",inlines:[B()],entities:new Array(1),blocks:[{type:e,depth:Math.max(0,Math.min(R,t))}]}}function a(e,t){return"li"===e?"ol"===t?"ordered-list-item":"unordered-list-item":null}function u(e){var t=e.get("unstyled").element;return e.map(function(e){return e.element}).valueSeq().toSet().filter(function(e){return e!==t}).toArray().sort()}function c(e,t,n){var r,o;for(r=0;r<n.length;r++)if(o=n[r](e,t))return o;return null}function l(e,t,n){var r=n.filter(function(t){return t.element===e||t.wrapper===e}).keySeq().toSet().toArray().sort();switch(r.length){case 0:return"unstyled";case 1:return r[0];default:return c(e,t,[a])||"unstyled"}}function f(e,t,n){var r=I[e];return r?n=n.add(r).toOrderedSet():t instanceof HTMLElement&&!function(){var e=t;n=n.withMutations(function(t){"bold"===e.style.fontWeight&&t.add("BOLD"),"italic"===e.style.fontStyle&&t.add("ITALIC"),"underline"===e.style.textDecoration&&t.add("UNDERLINE"),"line-through"===e.style.textDecoration&&t.add("STRIKETHROUGH")}).toOrderedSet()}(),n}function p(e,t){var n=t.text.slice(0,1);if("\r"===e.text.slice(-1)&&"\r"===n&&(e.text=e.text.slice(0,-1),e.inlines.pop(),e.entities.pop(),e.blocks.pop()),"\r"===e.text.slice(-1)){if(t.text===_||"\n"===t.text)return e;n!==_&&"\n"!==n||(t.text=t.text.slice(1),t.inlines.shift(),t.entities.shift())}return{text:e.text+t.text,inlines:e.inlines.concat(t.inlines),entities:e.entities.concat(t.entities),blocks:e.blocks.concat(t.blocks)}}function g(e,t){return t.some(function(t){return-1!==e.indexOf("<"+t)})}function d(e){e instanceof HTMLAnchorElement?void 0:T(!1);var t=e.protocol;return"http:"===t||"https:"===t}function h(e,t,n,a,u,c,g,y){var v,b,k,w,C,O,E,T=e.nodeName.toLowerCase(),D=!1,A="unstyled",M=m;if("#text"===T)return v=e.textContent,""===v.trim()&&"pre"!==a?o(y):("pre"!==a&&(v=v.replace(F,_)),m=T,{text:v,inlines:Array(v.length).fill(t),entities:Array(v.length).fill(y),blocks:[]});if(m=T,"br"===T)return"br"!==M||a&&"unstyled"!==l(a,n,g)?i():s("unstyled",c);for(b=r(),k=null,t=f(T,e,t),"ul"!==T&&"ol"!==T||(n&&(c+=1),n=T),a||-1===u.indexOf(T)?n&&"li"===a&&"li"===T&&(b=s(l(T,n,g),c),a=T,D=!0,A="ul"===n?"unordered-list-item":"ordered-list-item"):(b=s(l(T,n,g),c),a=T,D=!0),w=e.firstChild,null!=w&&(T=w.nodeName.toLowerCase()),C=null,O=null;w;)"a"===T&&w.href&&d(w)?(O=new x(w.href).toString(),C=S.create("LINK","MUTABLE",{url:O})):C=void 0,k=h(w,t,n,a,u,c,g,C||y),b=p(b,k),E=w.nextSibling,E&&u.indexOf(T)>=0&&a&&(b=p(b,i())),E&&(T=E.nodeName.toLowerCase()),w=E;return D&&(b=p(b,s(A,c))),b}function y(e,t,n){var r,o,i,s;return e=e.trim().replace(L,"").replace(P,_),r=u(n),(o=t(e))?(m=null,i=g(e,r)?r:["div"],s=h(o,B(),"ul",null,i,-1,n),0===s.text.indexOf("\r")&&(s={text:s.text.slice(1),inlines:s.inlines.slice(1),entities:s.entities.slice(1),blocks:s.blocks}),"\r"===s.text.slice(-1)&&(s.text=s.text.slice(0,-1),s.inlines=s.inlines.slice(0,-1),s.entities=s.entities.slice(0,-1),s.blocks.pop()),0===s.blocks.length&&s.blocks.push({type:"unstyled",depth:0}),s.text.split("\r").length===s.blocks.length+1&&s.blocks.unshift({type:"unstyled",depth:0}),s):null}function v(e){var t,n=arguments.length<=1||void 0===arguments[1]?E:arguments[1],r=arguments.length<=2||void 0===arguments[2]?w:arguments[2],o=y(e,n,r);return null==o?null:(t=0,o.text.split("\r").map(function(e,n){var r,i,s,a;return e=A(e),r=t+e.length,i=D(o).inlines.slice(t,r),s=D(o).entities.slice(t,r),a=M(i.map(function(e,t){var n={style:e,entity:null};return s[t]&&(n.entity=s[t]),b.create(n)})),t=r+1,new k({key:O(),type:D(o).blocks[n].type,depth:D(o).blocks[n].depth,text:e,characterList:a})}))}var m,b=n(6),k=n(10),w=n(22),S=n(9),C=n(2),x=n(120),O=n(7),E=n(44),T=n(3),D=n(5),A=n(27),M=C.List,B=C.OrderedSet,K="&nbsp;",_=" ",R=4,L=new RegExp("\r","g"),F=new RegExp("\n","g"),P=new RegExp(K,"g"),I={b:"BOLD",code:"CODE",del:"STRIKETHROUGH",em:"ITALIC",i:"ITALIC",s:"STRIKETHROUGH",strike:"STRIKETHROUGH",strong:"BOLD",u:"UNDERLINE"};e.exports=v},function(e,t,n){"use strict";function r(e){return f&&e.altKey||h(e)}function o(e){return d(e)?e.shiftKey?"redo":"undo":void 0}function i(e){return p&&e.shiftKey?null:r(e)?"delete-word":"delete"}function s(e){return d(e)&&f?"backspace-to-start-of-line":r(e)?"backspace-word":"backspace"}function a(e){switch(e.keyCode){case 66:return d(e)?"bold":null;case 68:return h(e)?"delete":null;case 72:return h(e)?"backspace":null;case 73:return d(e)?"italic":null;case 74:return d(e)?"code":null;case 75:return!p&&h(e)?"secondary-cut":null;case 77:return h(e)?"split-block":null;case 79:return h(e)?"split-block":null;case 84:return f&&h(e)?"transpose-characters":null;case 85:return d(e)?"underline":null;case 87:return f&&h(e)?"backspace-word":null;case 89:return h(e)?p?"redo":"secondary-paste":null;case 90:return o(e)||null;case c.RETURN:return"split-block";case c.DELETE:return i(e);case c.BACKSPACE:return s(e);case c.LEFT:return g&&d(e)?"move-selection-to-start-of-block":null;case c.RIGHT:return g&&d(e)?"move-selection-to-end-of-block":null;default:return null}}var u=n(23),c=n(28),l=n(8),f=l.isPlatform("Mac OS X"),p=l.isPlatform("Windows"),g=f&&l.isBrowser("Firefox < 29"),d=u.hasCommandModifier,h=u.isCtrlKeyCommand;e.exports=a},function(e,t,n){"use strict";function r(e,t,n,r,o,i){var a,c,f,g=n.nodeType===Node.TEXT_NODE,d=o.nodeType===Node.TEXT_NODE;return g&&d?{selectionState:l(e,p(u(n)),r,p(u(o)),i),needsRecovery:!1}:(a=null,c=null,f=!0,g?(a={key:p(u(n)),offset:r},c=s(t,o,i)):d?(c={key:p(u(o)),offset:i},a=s(t,n,r)):(a=s(t,n,r),c=s(t,o,i),n===o&&r===i&&(f="BR"!==n.firstChild.nodeName)),{selectionState:l(e,a.key,a.offset,c.key,c.offset),needsRecovery:f})}function o(e){for(;e.firstChild&&c(e.firstChild);)e=e.firstChild;return e}function i(e){for(;e.lastChild&&c(e.lastChild);)e=e.lastChild;return e}function s(e,t,n){var r,s,l,g,d,h,y=u(t);return null!=y||e&&(e===t||e.firstChild===t)?void 0:f(!1),e===t&&(t=t.firstChild,t instanceof Element&&"true"===t.getAttribute("data-contents")?void 0:f(!1),n>0&&(n=t.childNodes.length)),0===n?(r=null,null!=y?r=y:(s=o(t),r=p(c(s))),{key:r,offset:0}):(l=t.childNodes[n-1],g=null,d=null,c(l)?(h=i(l),g=p(c(h)),d=a(h)):(g=p(y),d=a(l)),{key:g,offset:d})}function a(e){var t=e.textContent;return"\n"===t?0:t.length}var u=n(24),c=n(45),l=n(47),f=n(3),p=n(5);e.exports=r},function(e,t,n){"use strict";function r(e){var t=e.getSelection();return t.isCollapsed()?void 0:o(e.getCurrentContent(),t)}var o=n(20);e.exports=r},function(e,t,n){"use strict";function r(e){var t,n,r,o,s=e.cloneRange(),a=[];for(t=e.endContainer;null!=t;t=t.parentNode){if(n=t===e.commonAncestorContainer,n?s.setStart(e.startContainer,e.startOffset):s.setStart(s.endContainer,0),r=Array.from(s.getClientRects()),a.push(r),n)return a.reverse(),(o=[]).concat.apply(o,a);s.setEndBefore(t)}i(!1)}var o=n(8),i=n(3),s=o.isBrowser("Chrome"),a=s?r:function(e){return Array.from(e.getClientRects())};e.exports=a},function(e,t,n){"use strict";function r(e){var t,n=null;return!i&&document.implementation&&document.implementation.createHTMLDocument&&(t=document.implementation.createHTMLDocument("foo"),t.documentElement.innerHTML=e,n=t.getElementsByTagName("body")[0]),n}var o=n(8),i=o.isBrowser("IE <= 9");e.exports=r},function(e,t){"use strict";function n(e){return e instanceof Element?e.getAttribute("data-offset-key"):null}e.exports=n},function(e,t){(function(t){"use strict";function n(e,t){var n=0,o=[];e.forEach(function(i){r(i,function(r){n++,r&&o.push(r.slice(0,s)),n==e.length&&t(o.join("\r"))})})}function r(e,n){var r,s;return t.FileReader&&(!e.type||e.type in i)?""===e.type?(r="",o.test(e.name)&&(r=e.name.replace(o,"")),void n(r)):(s=new FileReader,s.onload=function(){n(s.result)},s.onerror=function(){n("")},void s.readAsText(e)):void n("")}var o=/\.textClipping$/,i={"text/plain":!0,"text/html":!0,"text/rtf":!0},s=5e3;e.exports=n}).call(t,function(){return this}())},function(e,t,n){"use strict";function r(e,t,n,r,s){var a,u,c,l,f,p,g,d,h,y,v,m,b,k,w,S=i(e.getSelection());return a=o.decode(t),u=a.blockKey,c=e.getBlockTree(u).getIn([a.decoratorKey,"leaves",a.leafKey]),l=o.decode(r),f=l.blockKey,p=e.getBlockTree(f).getIn([l.decoratorKey,"leaves",l.leafKey]),g=c.get("start"),d=p.get("start"),h=c?g+n:null,y=p?d+s:null,(v=S.getAnchorKey()===u&&S.getAnchorOffset()===h&&S.getFocusKey()===f&&S.getFocusOffset()===y)?S:(m=!1,u===f?(b=c.get("end"),k=p.get("end"),m=d===g&&k===b?n>s:g>d):(w=e.getCurrentContent().getBlockMap().keySeq().skipUntil(function(e){return e===u||e===f}).first(),m=w===f),S.merge({anchorKey:u,anchorOffset:h,focusKey:f,focusOffset:y,isBackward:m}))}var o=n(18),i=n(5);e.exports=r},function(e,t){"use strict";function n(e,t,n){var r,o;return n===e.count()?t.forEach(function(t){e=e.push(t)}):0===n?t.reverse().forEach(function(t){e=e.unshift(t)}):(r=e.slice(0,n),o=e.slice(n),e=r.concat(t,o).toList()),e}e.exports=n},function(e,t){"use strict";function n(e){var t=e.getSelection(),n=t.getAnchorKey(),r=e.getBlockTree(n),o=t.getStartOffset(),i=!1;return r.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):t>o?!1:void 0}):!1}),i}e.exports=n},function(e,t){"use strict";function n(e,t){var n,r=e.getSelection(),o=r.getStartKey(),i=r.getStartOffset(),s=e.getCurrentContent(),a=o,u=s.getBlockForKey(o);return t>u.getText().length-i?(a=s.getKeyAfter(o),n=0):n=i+t,r.merge({focusKey:a,focusOffset:n})}e.exports=n},function(e,t,n){"use strict";function r(e,t){var n,r,o,s,a=e.getBlockMap(),u={},c=t.getStartKey(),l=t.getStartOffset(),f=a.get(c),p=i(f,l);return p!==f&&(u[c]=p),n=t.getEndKey(),r=t.getEndOffset(),o=a.get(n),c===n&&(o=p),s=i(o,r),s!==o&&(u[n]=s),Object.keys(u).length?e.merge({blockMap:a.merge(u),selectionAfter:t}):e.set("selectionAfter",t)}function o(e,t,n){var r;return u(e,function(e,t){return e.getEntity()===t.getEntity()},function(e){return e.getEntity()===t},function(e,t){n>=e&&t>=n&&(r={start:e,end:t})}),"object"!=typeof r?c(!1):void 0,r}function i(e,t){var n,r,i,u,c,l=e.getCharacterList(),f=t>0?l.get(t-1):void 0,p=t<l.count()?l.get(t):void 0,g=f?f.getEntity():void 0,d=p?p.getEntity():void 0;if(d&&d===g&&(n=a.get(d),"MUTABLE"!==n.getMutability())){for(r=o(l,d,t),i=r.start,u=r.end;u>i;)c=l.get(i),l=l.set(i,s.applyEntity(c,null)),i++;return e.set("characterList",l)}return e}var s=n(6),a=n(9),u=n(19),c=n(3);e.exports=r},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e){return"file"==e.kind?e.getAsFile():void 0}var i=n(118),s=n(125),a=n(31),u=new RegExp("\r\n","g"),c="\n",l={"text/rtf":1,"text/html":1},f=function(){function e(t){r(this,e),this.data=t,this.types=t.types?s(t.types):[]}return e.prototype.isRichText=function(){return this.getHTML()&&this.getText()?!0:this.isImage()?!1:this.types.some(function(e){return l[e]})},e.prototype.getText=function(){var e;return this.data.getData&&(this.types.length?-1!=this.types.indexOf("text/plain")&&(e=this.data.getData("text/plain")):e=this.data.getData("Text")),e?e.replace(u,c):null},e.prototype.getHTML=function(){if(this.data.getData){if(!this.types.length)return this.data.getData("Text");if(-1!=this.types.indexOf("text/html"))return this.data.getData("text/html")}},e.prototype.isLink=function(){return this.types.some(function(e){return-1!=e.indexOf("Url")||-1!=e.indexOf("text/uri-list")})},e.prototype.getLink=function(){return this.data.getData?-1!=this.types.indexOf("text/uri-list")?this.data.getData("text/uri-list"):this.data.getData("url"):null},e.prototype.isImage=function t(){var e,n,r,t=this.types.some(function(e){return-1!=e.indexOf("application/x-moz-file")});if(t)return!0;for(e=this.getFiles(),n=0;n<e.length;n++)if(r=e[n].type,!i.isImage(r))return!1;return!0},e.prototype.getCount=function(){return this.data.hasOwnProperty("items")?this.data.items.length:this.data.hasOwnProperty("mozItemCount")?this.data.mozItemCount:this.data.files?this.data.files.length:null},e.prototype.getFiles=function(){return this.data.items?Array.prototype.slice.call(this.data.items).map(o).filter(a.thatReturnsArgument):this.data.files?Array.prototype.slice.call(this.data.files):[]},e.prototype.hasFiles=function(){return this.getFiles().length>0},e}();e.exports=f},function(e,t){"use strict";function n(e,t){return!!t&&(e===t.documentElement||e===t.body)}var r={getTop:function(e){var t=e.ownerDocument;return n(e,t)?t.body.scrollTop||t.documentElement.scrollTop:e.scrollTop},setTop:function(e,t){var r=e.ownerDocument;n(e,r)?r.body.scrollTop=r.documentElement.scrollTop=t:e.scrollTop=t},getLeft:function(e){var t=e.ownerDocument;return n(e,t)?t.body.scrollLeft||t.documentElement.scrollLeft:e.scrollLeft},setLeft:function(e,t){var r=e.ownerDocument;n(e,r)?r.body.scrollLeft=r.documentElement.scrollLeft=t:e.scrollLeft=t}};e.exports=r},function(e,t,n){"use strict";function r(e){var t=p.exec(e);return null==t?null:t[0]}function o(e){var t=r(e);return null==t?c.NEUTRAL:g.exec(t)?c.RTL:c.LTR}function i(e,t){if(t=t||c.NEUTRAL,!e.length)return t;var n=o(e);return n===c.NEUTRAL?t:n}function s(e,t){return t||(t=c.getGlobalDir()),c.isStrong(t)?void 0:l(!1),i(e,t)}function a(e,t){return s(e,t)===c.LTR}function u(e,t){return s(e,t)===c.RTL}var c=n(30),l=n(3),f={L:"A-Za-zªµºÀ-ÖØ-öø-ƺƻƼ-ƿǀ-ǃDŽ-ʓʔʕ-ʯʰ-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͷͺͻ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҂Ҋ-ԯԱ-Ֆՙ՚-՟ա-և։ःऄ-हऻऽा-ीॉ-ौॎ-ॏॐक़-ॡ।-॥०-९॰ॱॲ-ঀং-ঃঅ-ঌএ-ঐও-নপ-রলশ-হঽা-ীে-ৈো-ৌৎৗড়-ঢ়য়-ৡ০-৯ৰ-ৱ৴-৹৺ਃਅ-ਊਏ-ਐਓ-ਨਪ-ਰਲ-ਲ਼ਵ-ਸ਼ਸ-ਹਾ-ੀਖ਼-ੜਫ਼੦-੯ੲ-ੴઃઅ-ઍએ-ઑઓ-નપ-રલ-ળવ-હઽા-ીૉો-ૌૐૠ-ૡ૦-૯૰ଂ-ଃଅ-ଌଏ-ଐଓ-ନପ-ରଲ-ଳଵ-ହଽାୀେ-ୈୋ-ୌୗଡ଼-ଢ଼ୟ-ୡ୦-୯୰ୱ୲-୷ஃஅ-ஊஎ-ஐஒ-கங-சஜஞ-டண-தந-பம-ஹா-ிு-ூெ-ைொ-ௌௐௗ௦-௯௰-௲ఁ-ఃఅ-ఌఎ-ఐఒ-నప-హఽు-ౄౘ-ౙౠ-ౡ౦-౯౿ಂ-ಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽಾಿೀ-ೄೆೇ-ೈೊ-ೋೕ-ೖೞೠ-ೡ೦-೯ೱ-ೲം-ഃഅ-ഌഎ-ഐഒ-ഺഽാ-ീെ-ൈൊ-ൌൎൗൠ-ൡ൦-൯൰-൵൹ൺ-ൿං-ඃඅ-ඖක-නඳ-රලව-ෆා-ෑෘ-ෟ෦-෯ෲ-ෳ෴ก-ะา-ำเ-ๅๆ๏๐-๙๚-๛ກ-ຂຄງ-ຈຊຍດ-ທນ-ຟມ-ຣລວສ-ຫອ-ະາ-ຳຽເ-ໄໆ໐-໙ໜ-ໟༀ༁-༃༄-༒༓༔༕-༗༚-༟༠-༩༪-༳༴༶༸༾-༿ཀ-ཇཉ-ཬཿ྅ྈ-ྌ྾-࿅࿇-࿌࿎-࿏࿐-࿔࿕-࿘࿙-࿚က-ဪါ-ာေးျ-ြဿ၀-၉၊-၏ၐ-ၕၖ-ၗၚ-ၝၡၢ-ၤၥ-ၦၧ-ၭၮ-ၰၵ-ႁႃ-ႄႇ-ႌႎႏ႐-႙ႚ-ႜ႞-႟Ⴀ-ჅჇჍა-ჺ჻ჼჽ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፠-፨፩-፼ᎀ-ᎏᎠ-Ᏼᐁ-ᙬ᙭-᙮ᙯ-ᙿᚁ-ᚚᚠ-ᛪ᛫-᛭ᛮ-ᛰᛱ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱ᜵-᜶ᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳាើ-ៅះ-ៈ។-៖ៗ៘-៚ៜ០-៩᠐-᠙ᠠ-ᡂᡃᡄ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᤣ-ᤦᤩ-ᤫᤰ-ᤱᤳ-ᤸ᥆-᥏ᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧀᧁ-ᧇᧈ-ᧉ᧐-᧙᧚ᨀ-ᨖᨙ-ᨚ᨞-᨟ᨠ-ᩔᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪉᪐-᪙᪠-᪦ᪧ᪨-᪭ᬄᬅ-ᬳᬵᬻᬽ-ᭁᭃ-᭄ᭅ-ᭋ᭐-᭙᭚-᭠᭡-᭪᭴-᭼ᮂᮃ-ᮠᮡᮦ-ᮧ᮪ᮮ-ᮯ᮰-᮹ᮺ-ᯥᯧᯪ-ᯬᯮ᯲-᯳᯼-᯿ᰀ-ᰣᰤ-ᰫᰴ-ᰵ᰻-᰿᱀-᱉ᱍ-ᱏ᱐-᱙ᱚ-ᱷᱸ-ᱽ᱾-᱿᳀-᳇᳓᳡ᳩ-ᳬᳮ-ᳱᳲ-ᳳᳵ-ᳶᴀ-ᴫᴬ-ᵪᵫ-ᵷᵸᵹ-ᶚᶛ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℴℵ-ℸℹℼ-ℿⅅ-ⅉⅎ⅏Ⅰ-ↂↃ-ↄↅ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-Ⱞⰰ-ⱞⱠ-ⱻⱼ-ⱽⱾ-ⳤⳫ-ⳮⳲ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵰ⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々〆〇〡-〩〮-〯〱-〵〸-〺〻〼ぁ-ゖゝ-ゞゟァ-ヺー-ヾヿㄅ-ㄭㄱ-ㆎ㆐-㆑㆒-㆕㆖-㆟ㆠ-ㆺㇰ-ㇿ㈀-㈜㈠-㈩㈪-㉇㉈-㉏㉠-㉻㉿㊀-㊉㊊-㊰㋀-㋋㋐-㋾㌀-㍶㍻-㏝㏠-㏾㐀-䶵一-鿌ꀀ-ꀔꀕꀖ-ꒌꓐ-ꓷꓸ-ꓽ꓾-꓿ꔀ-ꘋꘌꘐ-ꘟ꘠-꘩ꘪ-ꘫꙀ-ꙭꙮꚀ-ꚛꚜ-ꚝꚠ-ꛥꛦ-ꛯ꛲-꛷Ꜣ-ꝯꝰꝱ-ꞇ꞉-꞊Ꞌ-ꞎꞐ-ꞭꞰ-Ʇꟷꟸ-ꟹꟺꟻ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꠣ-ꠤꠧ꠰-꠵꠶-꠷ꡀ-ꡳꢀ-ꢁꢂ-ꢳꢴ-ꣃ꣎-꣏꣐-꣙ꣲ-ꣷ꣸-꣺ꣻ꤀-꤉ꤊ-ꤥ꤮-꤯ꤰ-ꥆꥒ-꥓꥟ꥠ-ꥼꦃꦄ-ꦲꦴ-ꦵꦺ-ꦻꦽ-꧀꧁-꧍ꧏ꧐-꧙꧞-꧟ꧠ-ꧤꧦꧧ-ꧯ꧰-꧹ꧺ-ꧾꨀ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ꩐-꩙꩜-꩟ꩠ-ꩯꩰꩱ-ꩶ꩷-꩹ꩺꩻꩽꩾ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂꫛ-ꫜꫝ꫞-꫟ꫠ-ꫪꫫꫮ-ꫯ꫰-꫱ꫲꫳ-ꫴꫵꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚ꭛ꭜ-ꭟꭤ-ꭥꯀ-ꯢꯣ-ꯤꯦ-ꯧꯩ-ꯪ꯫꯬꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ-豈-舘並-龎ff-stﬓ-ﬗA-Za-zヲ-ッーア-ン゙-゚ᅠ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",R:"֐־׀׃׆׈-׏א-ת׫-ׯװ-ײ׳-״׵-׿߀-߉ߊ-ߪߴ-ߵߺ߻-߿ࠀ-ࠕࠚࠤࠨ࠮-࠯࠰-࠾࠿ࡀ-ࡘ࡜-࡝࡞࡟-࢟‏יִײַ-ﬨשׁ-זּ﬷טּ-לּ﬽מּ﬿נּ-סּ﭂ףּ-פּ﭅צּ-ﭏ",AL:"؈؋؍؛؜؝؞-؟ؠ-ؿـف-ي٭ٮ-ٯٱ-ۓ۔ەۥ-ۦۮ-ۯۺ-ۼ۽-۾ۿ܀-܍܎܏ܐܒ-ܯ݋-݌ݍ-ޥޱ޲-޿ࢠ-ࢲࢳ-ࣣﭐ-ﮱ﮲-﯁﯂-﯒ﯓ-ﴽ﵀-﵏ﵐ-ﶏ﶐-﶑ﶒ-ﷇ﷈-﷏ﷰ-ﷻ﷼﷾-﷿ﹰ-ﹴ﹵ﹶ-ﻼ﻽-﻾"},p=new RegExp("["+f.L+f.R+f.AL+"]"),g=new RegExp("["+f.R+f.AL+"]"),d={firstStrongChar:r,firstStrongCharDir:o,resolveBlockDir:i,getDirection:s,isDirectionLTR:a,isDirectionRTL:u};e.exports=d},function(e,t,n){"use strict