custom-app
Version:
ITIMS��Ʒ�鿪��ר��React���,�Dz��ý��ּ�dhcc-app���������
17 lines • 147 kB
JavaScript
/**
* Draft v0.10.5
*
* 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.
*/
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("immutable"),require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["immutable","react","react-dom"],e):"object"==typeof exports?exports.Draft=e(require("immutable"),require("react"),require("react-dom")):t.Draft=e(t.Immutable,t.React,t.ReactDOM)}(this,function(t,e,n){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";var r=n(64),o=n(17),i=n(5),s=n(65),a=n(12),c=n(25),u=n(26),l=n(39),f=n(67),p=n(40),d=n(22),g=n(4),h=n(41),y=n(3),m=n(27),v=n(44),b=n(15),S=n(86),w=n(45),x=n(87),C=n(10),k=n(46),E=n(110),O={Editor:f,EditorBlock:p,EditorState:y,CompositeDecorator:s,Entity:d,EntityInstance:h,BlockMapBuilder:o,CharacterMetadata:i,ContentBlock:a,ContentState:c,SelectionState:b,AtomicBlockUtils:r,KeyBindingUtil:m,Modifier:g,RichUtils:v,DefaultDraftBlockRenderMap:u,DefaultDraftInlineStyle:l,convertFromHTML:w,convertFromRaw:x,convertToRaw:S,genKey:C,getDefaultKeyBinding:k,getVisibleSelectionRect:E};t.exports=O},function(t,e,n){"use strict";function r(t,e,n,r,i,s,a,c){var u,l,f;if(o(e),!t)throw void 0===e?u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings."):(l=[n,r,i,s,a,c],f=0,u=new Error(e.replace(/%s/g,function(){return l[f++]})),u.name="Invariant Violation"),u.framesToPop=1,u}var o=function(t){};t.exports=r},function(e,n){e.exports=t},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e,n){return k.set(t,{selection:e,forceSelection:n,nativelyRenderedContent:null,inlineStyleOverride:null})}function i(t,e){return t.getBlockMap().map(function(n){return g.generate(t,n,e)}).toOrderedMap()}function s(t,e,n,r){var o=t.getCurrentContent().set("entityMap",n),i=o.getBlockMap(),s=t.getImmutable().get("treeMap");return s.merge(e.toSeq().filter(function(t,e){return t!==i.get(e)}).map(function(t){return g.generate(o,t,r)}))}function a(t,e,n,r,o){return n.merge(e.toSeq().filter(function(e){return r.getDecorations(e,t)!==o.getDecorations(e,t)}).map(function(e){return g.generate(t,e,r)}))}function c(t,e){var n=t.getLastChangeType();return e!==n||"insert-characters"!==e&&"backspace-character"!==e&&"delete-character"!==e}function u(t,e){var n=e.getStartKey(),r=e.getStartOffset(),o=t.getBlockForKey(n);return r>0?o.getInlineStyleAt(r-1):o.getLength()?o.getInlineStyleAt(0):f(t,n)}function l(t,e){var n=e.getStartKey(),r=e.getStartOffset(),o=t.getBlockForKey(n);return r<o.getLength()?o.getInlineStyleAt(r):r>0?o.getInlineStyleAt(r-1):f(t,n)}function f(t,e){var n=t.getBlockMap().reverse().skipUntil(function(t,n){return n===e}).skip(1).skipUntil(function(t,e){return t.getLength()}).first();return n?n.getInlineStyleAt(n.getLength()-1):b()}var p=n(7),d=p||function(t){var e,n,r;for(e=1;e<arguments.length;e++){n=arguments[e];for(r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},g=n(38),h=n(25),y=n(81),m=n(2),v=n(15),b=m.OrderedSet,S=m.Record,w=m.Stack,x={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=S(x),k=function(){function t(e){r(this,t),this._immutable=e}return t.createEmpty=function(e){return t.createWithContent(h.createFromText(""),e)},t.createWithContent=function(e,n){var r=e.getBlockMap().first().getKey();return t.create({currentContent:e,undoStack:w(),redoStack:w(),decorator:n||null,selection:v.createEmpty(r)})},t.create=function(e){var n=e.currentContent,r=e.decorator,o=d({},e,{treeMap:i(n,r),directionMap:y.getDirectionMap(n)});return new t(new C(o))},t.set=function(e,n){var r=e.getImmutable().withMutations(function(t){var r,o,c,u,l=t.get("decorator"),f=l;return null===n.decorator?f=null:n.decorator&&(f=n.decorator),r=n.currentContent||e.getCurrentContent(),f!==l?(o=t.get("treeMap"),c=f&&l?a(r,r.getBlockMap(),o,f,l):i(r,f),void t.merge({decorator:f,treeMap:c,nativelyRenderedContent:null})):(u=e.getCurrentContent(),r!==u&&t.set("treeMap",s(e,r.getBlockMap(),r.getEntityMap(),f)),void t.merge(n))});return new t(r)},t.prototype.toJS=function(){return this.getImmutable().toJS()},t.prototype.getAllowUndo=function(){return this.getImmutable().get("allowUndo")},t.prototype.getCurrentContent=function(){return this.getImmutable().get("currentContent")},t.prototype.getUndoStack=function(){return this.getImmutable().get("undoStack")},t.prototype.getRedoStack=function(){return this.getImmutable().get("redoStack")},t.prototype.getSelection=function(){return this.getImmutable().get("selection")},t.prototype.getDecorator=function(){return this.getImmutable().get("decorator")},t.prototype.isInCompositionMode=function(){return this.getImmutable().get("inCompositionMode")},t.prototype.mustForceSelection=function(){return this.getImmutable().get("forceSelection")},t.prototype.getNativelyRenderedContent=function(){return this.getImmutable().get("nativelyRenderedContent")},t.prototype.getLastChangeType=function(){return this.getImmutable().get("lastChangeType")},t.prototype.getInlineStyleOverride=function(){return this.getImmutable().get("inlineStyleOverride")},t.setInlineStyleOverride=function(e,n){return t.set(e,{inlineStyleOverride:n})},t.prototype.getCurrentInlineStyle=function(){var t,e,n=this.getInlineStyleOverride();return null!=n?n:(t=this.getCurrentContent(),e=this.getSelection(),e.isCollapsed()?u(t,e):l(t,e))},t.prototype.getBlockTree=function(t){return this.getImmutable().getIn(["treeMap",t])},t.prototype.isSelectionAtStartOfContent=function(){var t=this.getCurrentContent().getBlockMap().first().getKey();return this.getSelection().hasEdgeWithin(t,0,0)},t.prototype.isSelectionAtEndOfContent=function(){var t=this.getCurrentContent(),e=t.getBlockMap(),n=e.last(),r=n.getLength();return this.getSelection().hasEdgeWithin(n.getKey(),r,r)},t.prototype.getDirectionMap=function(){return this.getImmutable().get("directionMap")},t.acceptSelection=function(t,e){return o(t,e,!1)},t.forceSelection=function(t,e){return e.getHasFocus()||(e=e.set("hasFocus",!0)),o(t,e,!0)},t.moveSelectionToEnd=function(e){var n=e.getCurrentContent(),r=n.getLastBlock(),o=r.getKey(),i=r.getLength();return t.acceptSelection(e,new v({anchorKey:o,anchorOffset:i,focusKey:o,focusOffset:i,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,i,s,a,u,l,f,p,d;return e.getCurrentContent()===n?e:(o="insert-characters"!==r,i=y.getDirectionMap(n,e.getDirectionMap()),e.getAllowUndo()?(s=e.getSelection(),a=e.getCurrentContent(),u=e.getUndoStack(),l=n,s!==a.getSelectionAfter()||c(e,r)?(u=u.push(a),l=l.set("selectionBefore",s)):"insert-characters"!==r&&"backspace-character"!==r&&"delete-character"!==r||(l=l.set("selectionBefore",a.getSelectionBefore())),f=e.getInlineStyleOverride(),p=["adjust-depth","change-block-type","split-block"],p.indexOf(r)===-1&&(f=null),d={currentContent:l,directionMap:i,undoStack:u,redoStack:w(),lastChangeType:r,selection:n.getSelectionAfter(),forceSelection:o,inlineStyleOverride:f},t.set(e,d)):t.set(e,{currentContent:n,directionMap:i,lastChangeType:r,selection:n.getSelectionAfter(),forceSelection:o,inlineStyleOverride:null}))},t.undo=function(e){var n,r,o,i;return e.getAllowUndo()?(n=e.getUndoStack(),(r=n.peek())?(o=e.getCurrentContent(),i=y.getDirectionMap(r,e.getDirectionMap()),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()})):e):e},t.redo=function(e){var n,r,o,i;return e.getAllowUndo()?(n=e.getRedoStack(),(r=n.peek())?(o=e.getCurrentContent(),i=y.getDirectionMap(r,e.getDirectionMap()),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):e},t.prototype.getImmutable=function(){return this._immutable},t}();t.exports=k},function(t,e,n){"use strict";var r=n(5),o=n(66),i=n(11),s=n(2),a=n(85),c=n(106),u=n(24),l=n(111),f=n(112),p=n(1),d=n(123),g=n(59),h=n(125),y=n(127),m=s.OrderedSet,v={replaceText:function(t,e,n,o,i){var s=g(t,e),a=h(s,e),c=r.create({style:o||m(),entity:i||null});return f(a,a.getSelectionAfter(),n,c)},insertText:function(t,e,n,r,o){return e.isCollapsed()?void 0:p(!1),v.replaceText(t,e,n,r,o)},moveText:function(t,e,n){var r=u(t,e),o=v.removeRange(t,e,"backward");return v.replaceWithFragment(o,n,r)},replaceWithFragment:function(t,e,n){var r=g(t,e),o=h(r,e);return l(o,o.getSelectionAfter(),n)},removeRange:function(t,e,n){var r,o,s,a,u,l,f,p=void 0,d=void 0,y=void 0,m=void 0;return e.getIsBackward()&&(e=e.merge({anchorKey:e.getFocusKey(),anchorOffset:e.getFocusOffset(),focusKey:e.getAnchorKey(),focusOffset:e.getAnchorOffset(),isBackward:!1})),p=e.getAnchorKey(),d=e.getFocusKey(),y=t.getBlockForKey(p),m=t.getBlockForKey(d),r=e.getStartOffset(),o=e.getEndOffset(),s=y.getEntityAt(r),a=m.getEntityAt(o-1),p===d&&s&&s===a?(u=c(t.getEntityMap(),y,m,e,n),h(t,u)):(l=e,i.draft_segmented_entities_behavior&&(l=c(t.getEntityMap(),y,m,e,n)),f=g(t,l),h(f,l))},splitBlock:function(t,e){var n=g(t,e),r=h(n,e);return y(r,r.getSelectionAfter())},applyInlineStyle:function(t,e,n){return o.add(t,e,n)},removeInlineStyle:function(t,e,n){return o.remove(t,e,n)},setBlockType:function(t,e,n){return d(t,e,function(t){return t.merge({type:n,depth:0})})},setBlockData:function(t,e,n){return d(t,e,function(t){return t.merge({data:n})})},mergeBlockData:function(t,e,n){return d(t,e,function(t){return t.merge({data:t.getData().merge(n)})})},applyEntity:function(t,e,n){var r=g(t,e);return a(r,e,n)}};t.exports=v},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var s=n(2),a=s.Map,c=s.OrderedSet,u=s.Record,l=c(),f={style:l,entity:null},p=u(f),d=function(t){function e(){return r(this,e),o(this,t.apply(this,arguments))}return i(e,t),e.prototype.getStyle=function(){return this.get("style")},e.prototype.getEntity=function(){return this.get("entity")},e.prototype.hasStyle=function(t){return this.getStyle().includes(t)},e.applyStyle=function(t,n){var r=t.set("style",t.getStyle().add(n));return e.create(r)},e.removeStyle=function(t,n){var r=t.set("style",t.getStyle().remove(n));return e.create(r)},e.applyEntity=function(t,n){var r=t.getEntity()===n?t:t.set("entity",n);return e.create(r)},e.create=function(t){var n,r,o,i;return t?(n={style:l,entity:null},r=a(n).merge(t),(o=h.get(r))?o:(i=new e(r),h=h.set(r,i),i)):g},e}(p),g=new d,h=a([[a(f),g]]);d.EMPTY=g,t.exports=d},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var s=n(5),a=n(2),c=n(18),u=a.List,l=a.Map,f=a.OrderedSet,p=a.Record,d=a.Repeat,g=f(),h={parent:null,characterList:u(),data:l(),depth:0,key:"",text:"",type:"unstyled",children:u(),prevSibling:null,nextSibling:null},y=function(t,e){return t.getStyle()===e.getStyle()},m=function(t,e){return t.getEntity()===e.getEntity()},v=function(t){if(!t)return t;var e=t.characterList,n=t.text;return n&&!e&&(t.characterList=u(d(s.EMPTY,n.length))),t},b=function(t){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h;return r(this,e),o(this,t.call(this,v(n)))}return i(e,t),e.prototype.getKey=function(){return this.get("key")},e.prototype.getType=function(){return this.get("type")},e.prototype.getText=function(){return this.get("text")},e.prototype.getCharacterList=function(){return this.get("characterList")},e.prototype.getLength=function(){return this.getText().length},e.prototype.getDepth=function(){return this.get("depth")},e.prototype.getData=function(){return this.get("data")},e.prototype.getInlineStyleAt=function(t){var e=this.getCharacterList().get(t);return e?e.getStyle():g},e.prototype.getEntityAt=function(t){var e=this.getCharacterList().get(t);return e?e.getEntity():null},e.prototype.getChildKeys=function(){return this.get("children")},e.prototype.getParentKey=function(){return this.get("parent")},e.prototype.getPrevSiblingKey=function(){return this.get("prevSibling")},e.prototype.getNextSiblingKey=function(){return this.get("nextSibling")},e.prototype.findStyleRanges=function(t,e){c(this.getCharacterList(),y,t,e)},e.prototype.findEntityRanges=function(t,e){c(this.getCharacterList(),m,t,e)},e}(p(h));t.exports=b},function(t,e){/*
object-assign
(c) Sindre Sorhus
@license MIT
*/
"use strict";function n(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function r(){var t,e,n,r,o;try{if(!Object.assign)return!1;if(t=new String("abc"),t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;return r=Object.getOwnPropertyNames(e).map(function(t){return e[t]}),"0123456789"===r.join("")&&(o={},"abcdefghijklmnopqrst".split("").forEach(function(t){o[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join(""))}catch(t){return!1}}var o=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable;t.exports=r()?Object.assign:function(t,e){var r,a,c,u,l,f=n(t);for(c=1;c<arguments.length;c++){r=Object(arguments[c]);for(u in r)i.call(r,u)&&(f[u]=r[u]);if(o)for(a=o(r),l=0;l<a.length;l++)s.call(r,a[l])&&(f[a[l]]=r[a[l]])}return f}},function(t,e){"use strict";var n=function(t){if(null!=t)return t;throw new Error("Got unexpected null or undefined")};t.exports=n},function(t,e,n){"use strict";function r(t,e,n,r){if(t===n)return!0;if(!n.startsWith(t))return!1;var o=n.slice(t.length);return!!e&&(o=r?r(o):o,s.contains(o,e))}function o(t){return"Windows"===i.platformName?t.replace(/^\s*NT/,""):t}var i=n(133),s=n(134),a=n(147),c=n(148),u={isBrowser:function(t){return r(i.browserName,i.browserFullVersion,t)},isBrowserArchitecture:function(t){return r(i.browserArchitecture,null,t)},isDevice:function(t){return r(i.deviceName,null,t)},isEngine:function(t){return r(i.engineName,i.engineVersion,t)},isPlatform:function(t){return r(i.platformName,i.platformFullVersion,t,o)},isPlatformArchitecture:function(t){return r(i.platformArchitecture,null,t)}};t.exports=a(u,c)},function(t,e){"use strict";function n(){for(var t=void 0;void 0===t||r.hasOwnProperty(t)||!isNaN(+t);)t=Math.floor(Math.random()*o).toString(32);return r[t]=!0,t}var r={},o=Math.pow(2,24);t.exports=n},function(t,e,n){"use strict";var r=n(77);t.exports=r},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function s(t,e){return t.getStyle()===e.getStyle()}function a(t,e){return t.getEntity()===e.getEntity()}var c=n(5),u=n(2),l=n(18),f=u.List,p=u.Map,d=u.OrderedSet,g=u.Record,h=u.Repeat,y=d(),m={key:"",type:"unstyled",text:"",characterList:f(),depth:0,data:p()},v=g(m),b=function(t){if(!t)return t;var e=t.characterList,n=t.text;return n&&!e&&(t.characterList=f(h(c.EMPTY,n.length))),t},S=function(t){function e(n){return r(this,e),o(this,t.call(this,b(n)))}return i(e,t),e.prototype.getKey=function(){return this.get("key")},e.prototype.getType=function(){return this.get("type")},e.prototype.getText=function(){return this.get("text")},e.prototype.getCharacterList=function(){return this.get("characterList")},e.prototype.getLength=function(){return this.getText().length},e.prototype.getDepth=function(){return this.get("depth")},e.prototype.getData=function(){return this.get("data")},e.prototype.getInlineStyleAt=function(t){var e=this.getCharacterList().get(t);return e?e.getStyle():y},e.prototype.getEntityAt=function(t){var e=this.getCharacterList().get(t);return e?e.getEntity():null},e.prototype.findStyleRanges=function(t,e){l(this.getCharacterList(),s,t,e)},e.prototype.findEntityRanges=function(t,e){l(this.getCharacterList(),a,t,e)},e}(v);t.exports=S},function(t,e,n){"use strict";function r(t){return p<=t&&t<=h}function o(t,e){var n,r;return 0<=e&&e<t.length?void 0:f(!1),e+1!==t.length&&(n=t.charCodeAt(e),r=t.charCodeAt(e+1),p<=n&&n<=d&&g<=r&&r<=h)}function i(t){return y.test(t)}function s(t,e){return 1+r(t.charCodeAt(e))}function a(t){var e,n;if(!i(t))return t.length;for(e=0,n=0;n<t.length;n+=s(t,n))e++;return e}function c(t,e,n){var r,o,a;if(e=e||0,n=void 0===n?1/0:n||0,!i(t))return t.substr(e,n);if(r=t.length,r<=0||e>r||n<=0)return"";if(o=0,e>0){for(;e>0&&o<r;e--)o+=s(t,o);if(o>=r)return""}else if(e<0){for(o=r;e<0&&0<o;e++)o-=s(t,o-1);o<0&&(o=0)}if(a=r,n<r)for(a=o;n>0&&a<r;n--)a+=s(t,a);return t.substring(o,a)}function u(t,e,n){e=e||0,n=void 0===n?1/0:n||0,e<0&&(e=0),n<0&&(n=0);var r=Math.abs(n-e);return e=e<n?e:n,c(t,e,r)}function l(t){var e,n=[];for(e=0;e<t.length;e+=s(t,e))n.push(t.codePointAt(e));return n}var f=n(1),p=55296,d=56319,g=56320,h=57343,y=/[\uD800-\uDFFF]/,m={getCodePoints:l,getUTF16Length:s,hasSurrogateUnit:i,isCodeUnitInSurrogateRange:r,isSurrogatePair:o,strlen:a,substring:u,substr:c};t.exports=m},function(t,n){t.exports=e},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var s=n(2),a=s.Record,c={anchorKey:"",anchorOffset:0,focusKey:"",focusOffset:0,isBackward:!1,hasFocus:!1},u=a(c),l=function(t){function e(){return r(this,e),o(this,t.apply(this,arguments))}return i(e,t),e.prototype.serialize=function(){return"Anchor: "+this.getAnchorKey()+":"+this.getAnchorOffset()+", Focus: "+this.getFocusKey()+":"+this.getFocusOffset()+", Is Backward: "+String(this.getIsBackward())+", Has Focus: "+String(this.getHasFocus())},e.prototype.getAnchorKey=function(){return this.get("anchorKey")},e.prototype.getAnchorOffset=function(){return this.get("anchorOffset")},e.prototype.getFocusKey=function(){return this.get("focusKey")},e.prototype.getFocusOffset=function(){return this.get("focusOffset")},e.prototype.getIsBackward=function(){return this.get("isBackward")},e.prototype.getHasFocus=function(){return this.get("hasFocus")},e.prototype.hasEdgeWithin=function(t,e,n){var r,o,i,s=this.getAnchorKey(),a=this.getFocusKey();return s===a&&s===t?(r=this.getStartOffset(),o=this.getEndOffset(),e<=o&&r<=n):(t===s||t===a)&&(i=t===s?this.getAnchorOffset():this.getFocusOffset(),e<=i&&n>=i)},e.prototype.isCollapsed=function(){return this.getAnchorKey()===this.getFocusKey()&&this.getAnchorOffset()===this.getFocusOffset()},e.prototype.getStartKey=function(){return this.getIsBackward()?this.getFocusKey():this.getAnchorKey()},e.prototype.getStartOffset=function(){return this.getIsBackward()?this.getFocusOffset():this.getAnchorOffset()},e.prototype.getEndKey=function(){return this.getIsBackward()?this.getAnchorKey():this.getFocusKey()},e.prototype.getEndOffset=function(){return this.getIsBackward()?this.getAnchorOffset():this.getFocusOffset()},e.createEmpty=function(t){return new e({anchorKey:t,anchorOffset:0,focusKey:t,focusOffset:0,isBackward:!1,hasFocus:!1})},e}(u);t.exports=l},function(t,e){"use strict";function n(t){return"object"==typeof t?Object.keys(t).filter(function(e){return t[e]}).map(r).join(" "):Array.prototype.map.call(arguments,r).join(" ")}function r(t){return t.replace(/\//g,"-")}t.exports=n},function(t,e,n){"use strict";var r=n(2),o=r.OrderedMap,i={createFromArray:function(t){return o(t.map(function(t){return[t.getKey(),t]}))}};t.exports=i},function(t,e){"use strict";function n(t,e,n,r){if(t.size){var o=0;t.reduce(function(t,i,s){return e(t,i)||(n(t)&&r(o,s),o=s),i}),n(t.last())&&r(o,t.count())}}t.exports=n},function(t,e){"use strict";function n(t){return"handled"===t||t===!0}t.exports=n},function(t,e,n){"use strict";function r(t,e,n){var r=t.getSelection(),i=t.getCurrentContent(),s=r;if(r.isCollapsed()){if("forward"===n){if(t.isSelectionAtEndOfContent())return i}else if(t.isSelectionAtStartOfContent())return i;if(s=e(t),s===r)return i}return o.removeRange(i,s,n)}var o=n(4);t.exports=r},function(t,e){t.exports=n},function(t,e,n){"use strict";function r(t,e){console.warn("WARNING: "+t+' will be deprecated soon!\nPlease use "'+e+'" instead.')}var o=n(7),i=o||function(t){var e,n,r;for(e=1;e<arguments.length;e++){n=arguments[e];for(r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},s=n(41),a=n(2),c=n(1),u=a.Map,l=u(),f=0,p={getLastCreatedEntityKey:function(){return r("DraftEntity.getLastCreatedEntityKey","contentState.getLastCreatedEntityKey"),p.__getLastCreatedEntityKey()},create:function(t,e,n){return r("DraftEntity.create","contentState.createEntity"),p.__create(t,e,n)},add:function(t){return r("DraftEntity.add","contentState.addEntity"),p.__add(t)},get:function(t){return r("DraftEntity.get","contentState.getEntity"),p.__get(t)},mergeData:function(t,e){return r("DraftEntity.mergeData","contentState.mergeEntityData"),p.__mergeData(t,e)},replaceData:function(t,e){return r("DraftEntity.replaceData","contentState.replaceEntityData"),p.__replaceData(t,e)},__getLastCreatedEntityKey:function(){return""+f},__create:function(t,e,n){return p.__add(new s({type:t,mutability:e,data:n||{}}))},__add:function(t){var e=""+ ++f;return l=l.set(e,t),e},__get:function(t){var e=l.get(t);return e?void 0:c(!1),e},__mergeData:function(t,e){var n=p.__get(t),r=i({},n.getData(),e),o=n.set("data",r);return l=l.set(t,o),o},__replaceData:function(t,e){var n=p.__get(t),r=n.set("data",e);return l=l.set(t,r),r}};t.exports=p},function(t,e){"use strict";var n="-",r={encode:function(t,e,r){return t+n+e+n+r},decode:function(t){var e=t.split(n),r=e[0],o=e[1],i=e[2];return{blockKey:r,decoratorKey:parseInt(o,10),leafKey:parseInt(i,10)}}};t.exports=r},function(t,e,n){"use strict";var r=n(58),o=n(59),i=function(t,e){var n=e.getStartKey(),i=e.getStartOffset(),s=e.getEndKey(),a=e.getEndOffset(),c=o(t,e),u=c.getBlockMap(),l=u.keySeq(),f=l.indexOf(n),p=l.indexOf(s)+1;return r(u.slice(f,p).map(function(t,e){var r=t.getText(),o=t.getCharacterList();return n===s?t.merge({text:r.slice(i,a),characterList:o.slice(i,a)}):e===n?t.merge({text:r.slice(i),characterList:o.slice(i)}):e===s?t.merge({text:r.slice(0,a),characterList:o.slice(0,a)}):t}))};t.exports=i},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var s=n(17),a=n(5),c=n(12),u=n(6),l=n(22),f=n(11),p=n(2),d=n(15),g=n(10),h=n(31),y=p.List,m=p.Record,v=p.Repeat,b=f.draft_tree_data_support,S={entityMap:null,blockMap:null,selectionBefore:null,selectionAfter:null},w=b?u:c,x=m(S),C=function(t){function e(){return r(this,e),o(this,t.apply(this,arguments))}return i(e,t),e.prototype.getEntityMap=function(){return l},e.prototype.getBlockMap=function(){return this.get("blockMap")},e.prototype.getSelectionBefore=function(){return this.get("selectionBefore")},e.prototype.getSelectionAfter=function(){return this.get("selectionAfter")},e.prototype.getBlockForKey=function(t){var e=this.getBlockMap().get(t);return e},e.prototype.getKeyBefore=function(t){return this.getBlockMap().reverse().keySeq().skipUntil(function(e){return e===t}).skip(1).first()},e.prototype.getKeyAfter=function(t){return this.getBlockMap().keySeq().skipUntil(function(e){return e===t}).skip(1).first()},e.prototype.getBlockAfter=function(t){return this.getBlockMap().skipUntil(function(e,n){return n===t}).skip(1).first()},e.prototype.getBlockBefore=function(t){return this.getBlockMap().reverse().skipUntil(function(e,n){return n===t}).skip(1).first()},e.prototype.getBlocksAsArray=function(){return this.getBlockMap().toArray()},e.prototype.getFirstBlock=function(){return this.getBlockMap().first()},e.prototype.getLastBlock=function(){return this.getBlockMap().last()},e.prototype.getPlainText=function(t){return this.getBlockMap().map(function(t){return t?t.getText():""}).join(t||"\n")},e.prototype.getLastCreatedEntityKey=function(){return l.__getLastCreatedEntityKey()},e.prototype.hasText=function(){var t=this.getBlockMap();return t.size>1||t.first().getLength()>0},e.prototype.createEntity=function(t,e,n){return l.__create(t,e,n),this},e.prototype.mergeEntityData=function(t,e){return l.__mergeData(t,e),this},e.prototype.replaceEntityData=function(t,e){return l.__replaceData(t,e),this},e.prototype.addEntity=function(t){return l.__add(t),this},e.prototype.getEntity=function(t){return l.__get(t)},e.createFromBlockArray=function(t,n){var r=Array.isArray(t)?t:t.contentBlocks,o=s.createFromArray(r),i=o.isEmpty()?new d:d.createEmpty(o.first().getKey());return new e({blockMap:o,entityMap:n||l,selectionBefore:i,selectionAfter:i})},e.createFromText=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:/\r\n?|\n/g,r=t.split(n),o=r.map(function(t){return t=h(t),new w({key:g(),text:t,type:"unstyled",characterList:y(v(a.EMPTY,t.length))})});return e.createFromBlockArray(o)},e}(x);t.exports=C},function(t,e,n){"use strict";var r=n(2),o=r.Map,i=n(14),s=n(16),a=i.createElement("ul",{className:s("public/DraftStyleDefault/ul")}),c=i.createElement("ol",{className:s("public/DraftStyleDefault/ol")}),u=i.createElement("pre",{className:s("public/DraftStyleDefault/pre")}),l=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:c},blockquote:{element:"blockquote"},atomic:{element:"figure"},"code-block":{element:"pre",wrapper:u},unstyled:{element:"div",aliasedElements:["p"]}});t.exports=l},function(t,e,n){"use strict";var r=n(9),o=r.isPlatform("Mac OS X"),i={isCtrlKeyCommand:function(t){return!!t.ctrlKey&&!t.altKey},isOptionKeyCommand:function(t){return o&&t.altKey},hasCommandModifier:function(t){return o?!!t.metaKey&&!t.altKey:i.isCtrlKeyCommand(t)}};t.exports=i},function(t,e,n){"use strict";function r(t){for(var e,n=t;n&&n!==document.documentElement;){if(e=o(n),null!=e)return e;n=n.parentNode}return null}var o=n(52);t.exports=r},function(t,e){"use strict";function n(t,e){var n,o,i,s,a,c;return e.isCollapsed()?(o=e.getAnchorKey(),i=e.getAnchorOffset(),i>0?(n=t.getBlockForKey(o).getEntityAt(i-1),n!==t.getBlockForKey(o).getEntityAt(i)?null:r(t.getEntityMap(),n)):null):(s=e.getStartKey(),a=e.getStartOffset(),c=t.getBlockForKey(s),n=a===c.getLength()?null:c.getEntityAt(a),r(t.getEntityMap(),n))}function r(t,e){if(e){var n=t.__get(e);return"MUTABLE"===n.getMutability()?e:null}return null}t.exports=n},function(t,e){"use strict";function n(t,e){var n,r,o=t.getSelection(),i=t.getCurrentContent(),s=o.getStartKey(),a=o.getStartOffset(),c=s,u=0;return e>a?(n=i.getKeyBefore(s),null==n?c=s:(c=n,r=i.getBlockForKey(n),u=r.getText().length)):u=a-e,o.merge({focusKey:c,focusOffset:u,isBackward:!0})}t.exports=n},function(t,e){"use strict";function n(t){return t.replace(r,"")}var r=new RegExp("\r","g");t.exports=n},function(t,e){"use strict";t.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(t,e,n){"use strict";function r(t,e){var n=i.get(t,e);return"auto"===n||"scroll"===n}var o=n(140),i={get:o,getScrollParent:function(t){if(!t)return null;for(var e=t.ownerDocument;t&&t!==e.body;){if(r(t,"overflow")||r(t,"overflowY")||r(t,"overflowX"))return t;t=t.parentNode}return e.defaultView||e.parentWindow}};t.exports=i},function(t,e,n){"use strict";function r(t){return t===f||t===p}function o(t){return r(t)?void 0:u(!1),t===f?"ltr":"rtl"}function i(t,e){return r(t)?void 0:u(!1),r(e)?void 0:u(!1),t===e?null:o(t)}function s(t){d=t}function a(){s(f)}function c(){return d||this.initGlobalDir(),d?void 0:u(!1),d}var u=n(1),l="NEUTRAL",f="LTR",p="RTL",d=null,g={NEUTRAL:l,LTR:f,RTL:p,isStrong:r,getHTMLDir:o,getHTMLDirIfDifferent:i,setGlobalDir:s,initGlobalDir:a,getGlobalDir:c};t.exports=g},function(t,e,n){"use strict";function r(t,e){return!(!t||!e)&&(t===e||!o(t)&&(o(e)?r(t,e.parentNode):"contains"in t?t.contains(e):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(e))))}var o=n(145);t.exports=r},function(t,e){"use strict";function n(t){return function(){return t}}var r=function(){};r.thatReturns=n,r.thatReturnsFalse=n(!1),r.thatReturnsTrue=n(!0),r.thatReturnsNull=n(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(t){return t},t.exports=r},function(t,e,n){"use strict";function r(t){var e,n,r,s,a=o(t.ownerDocument||t.document);return t.Window&&t instanceof t.Window&&(t=a),e=i(t),n=t===a?t.ownerDocument.documentElement:t,r=t.scrollWidth-n.clientWidth,s=t.scrollHeight-n.clientHeight,e.x=Math.max(0,Math.min(e.x,r)),e.y=Math.max(0,Math.min(e.y,s)),e}var o=n(137),i=n(141);t.exports=r},function(t,e,n){"use strict";function r(t,e){var n=[],r=t.map(function(t){return t.getStyle()}).toList();return a(r,o,f,function(t,r){n.push(new g({start:t+e,end:r+e}))}),c(n)}function o(t,e){return t===e}var i=n(2),s=n(36),a=n(18),c=i.List,u=i.Repeat,l=i.Record,f=s.thatReturnsTrue,p="-",d={start:null,end:null},g=l(d),h={start:null,end:null,decoratorKey:null,leaves:null},y=l(h),m={generate:function(t,e,n){var i,s,l,p=e.getLength();return p?(i=[],s=n?n.getDecorations(e,t):c(u(null,p)),l=e.getCharacterList(),a(s,o,f,function(t,e){i.push(new y({start:t,end:e,decoratorKey:s.get(t),leaves:r(l.slice(t,e).toList(),t)}))}),c(i)):c.of(new y({start:0,end:0,decoratorKey:null,leaves:c.of(new g({start:0,end:0}))}))},getFingerprint:function(t){return t.map(function(t){var e=t.get("decoratorKey"),n=null!==e?e+"."+(t.get("end")-t.get("start")):"";return""+n+"."+t.get("leaves").size}).join(p)}};t.exports=m},function(t,e){"use strict";t.exports={BOLD:{fontWeight:"bold"},CODE:{fontFamily:"monospace",wordWrap:"break-word"},ITALIC:{fontStyle:"italic"},STRIKETHROUGH:{textDecoration:"line-through"},UNDERLINE:{textDecoration:"underline"}}},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var s=n(7),a=s||function(t){var e,n,r;for(e=1;e<arguments.length;e++){n=arguments[e];for(r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},c=n(73),u=n(23),l=n(14),f=n(21),p=n(61),d=n(33),g=n(62),h=n(34),y=n(16),m=n(138),v=n(37),b=n(142),S=n(1),w=n(8),x=10,C=function(t,e){return t.getAnchorKey()===e||t.getFocusKey()===e},k=function(t){function e(){return r(this,e),o(this,t.apply(this,arguments))}return i(e,t),e.prototype.shouldComponentUpdate=function(t){return this.props.block!==t.block||this.props.tree!==t.tree||this.props.direction!==t.direction||C(t.selection,t.block.getKey())&&t.forceSelection},e.prototype.componentDidMount=function(){var t,e,n,r,o,i,s,a,c,u=this.props.selection,l=u.getEndKey();u.getHasFocus()&&l===this.props.block.getKey()&&(t=f.findDOMNode(this),e=d.getScrollParent(t),n=v(e),r=void 0,e===window?(o=m(t),i=o.y+o.height,s=b().height,r=i-s,r>0&&window.scrollTo(n.x,n.y+r+x)):(t instanceof HTMLElement?void 0:S(!1),a=t.offsetHeight+t.offsetTop,c=e.offsetHeight+n.y,r=a-c,r>0&&p.setTop(e,p.getTop(e)+r+x)))},e.prototype._renderChildren=function(){var t=this,e=this.props.block,n=e.getKey(),r=e.getText(),o=this.props.tree.size-1,i=C(this.props.selection,n);return this.props.tree.map(function(s,f){var p,d,y,m,v,b,S=s.get("leaves"),x=S.size-1,C=S.map(function(s,a){var p=u.encode(n,f,a),d=s.get("start"),g=s.get("end");return l.createElement(c,{key:p,offsetKey:p,block:e,start:d,selection:i?t.props.selection:null,forceSelection:t.props.forceSelection,text:r.slice(d,g),styleSet:e.getInlineStyleAt(d),customStyleMap:t.props.customStyleMap,customStyleFn:t.props.customStyleFn,isLast:f===o&&a===x})}).toArray(),k=s.get("decoratorKey");return null==k?C:t.props.decorator?(p=w(t.props.decorator),(d=p.getComponentForKey(k))?(y=p.getPropsForKey(k),m=u.encode(n,f,0),v=r.slice(S.first().get("start"),S.last().get("end")),b=h.getHTMLDirIfDifferent(g.getDirection(v),t.props.direction),l.createElement(d,a({},y,{contentState:t.props.contentState,decoratedText:v,dir:b,key:m,entityKey:e.getEntityAt(s.get("start")),offsetKey:m}),C)):C):C}).toArray()},e.prototype.render=function(){var t=this.props,e=t.direction,n=t.offsetKey,r=y({"public/DraftStyleDefault/block":!0,"public/DraftStyleDefault/ltr":"LTR"===e,"public/DraftStyleDefault/rtl":"RTL"===e});return l.createElement("div",{"data-offset-key":n,className:r},this._renderChildren())},e}(l.Component);t.exports=k},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var s=n(2),a=s.Record,c=a({type:"TOKEN",mutability:"IMMUTABLE",data:Object}),u=function(t){function e(){return r(this,e),o(this,t.apply(this,arguments))}return i(e,t),e.prototype.getType=function(){return this.get("type")},e.prototype.getMutability=function(){return this.get("mutability")},e.prototype.getData=function(){return this.get("data")},e}(c);t.exports=u},function(t,e,n){"use strict";function r(t,e){var n=e?f.exec(t):u.exec(t);return n?n[0]:t}var o=n(130),i=o.getPunctuation(),s="['‘’]",a="\\s|(?![_])"+i,c="^(?:"+a+")*(?:"+s+"|(?!"+a+").)*(?:(?!"+a+").)",u=new RegExp(c),l="(?:(?!"+a+").)(?:"+s+"|(?!"+a+").)*(?:"+a+")*$",f=new RegExp(l),p={getBackward:function(t){return r(t,!0)},getForward:function(t){return r(t,!1)}};t.exports=p},function(t,e){"use strict";var n={stringify:function(t){return"_"+String(t)},unstringify:function(t){return t.slice(1)}};t.exports=n},function(t,e,n){"use strict";var r=n(4),o=n(3),i=(n(15),n(83)),s=n(8),a={currentBlockContainsLink:function(t){var e=t.getSelection(),n=t.getCurrentContent(),r=n.getEntityMap();return n.getBlockForKey(e.getAnchorKey()).getCharacterList().slice(e.getStartOffset(),e.getEndOffset()).some(function(t){var e=t.getEntity();return!!e&&"LINK"===r.__get(e).getType()})},getCurrentBlockType:function(t){var e=t.getSelection();return t.getCurrentContent().getBlockForKey(e.getStartKey()).getType()},getDataObjectForLinkURL:function(t){return{url:t.toString()}},handleKeyCommand:function(t,e){switch(e){case"bold":return a.toggleInlineStyle(t,"BOLD");case"italic":return a.toggleInlineStyle(t,"ITALIC");case"underline":return a.toggleInlineStyle(t,"UNDERLINE");case"code":return a.toggleCode(t);case"backspace":case"backspace-word":case"backspace-to-start-of-line":return a.onBackspace(t);case"delete":case"delete-word":case"delete-to-end-of-block":return a.onDelete(t);default:return null}},insertSoftNewline:function(t){var e=r.insertText(t.getCurrentContent(),t.getSelection(),"\n",t.getCurrentInlineStyle(),null),n=o.push(t,e,"insert-characters");return o.forceSelection(n,e.getSelectionAfter())},onBackspace:function(t){var e,n,r,i,s,c,u=t.getSelection();return!u.isCollapsed()||u.getAnchorOffset()||u.getFocusOffset()?null:(e=t.getCurrentContent(),n=u.getStartKey(),r=e.getBlockBefore(n),r&&"atomic"===r.getType()&&(i=e.getBlockMap().delete(r.getKey()),s=e.merge({blockMap:i,selectionAfter:u}),s!==e)?o.push(t,s,"remove-range"):(c=a.tryToRemoveBlockStyle(t),c?o.push(t,c,"change-block-type"):null))},onDelete:function(t){var e,n,i,s,a,c,u,l=t.getSelection();return l.isCollapsed()?(e=t.getCurrentContent(),n=l.getStartKey(),i=e.getBlockForKey(n),s=i.getLength(),l.getStartOffset()<s?null:(a=e.getBlockAfter(n),a&&"atomic"===a.getType()?(c=l.merge({focusKey:a.getKey(),focusOffset:a.getLength()}),u=r.removeRange(e,c,"forward"),u!==e?o.push(t,u,"remove-range"):null):null)):null},onTab:function(t,e,n){var r,s,a,c,u,l,f,p=e.getSelection(),d=p.getAnchorKey();return d!==p.getFocusKey()?e:(r=e.getCurrentContent(),s=r.getBlockForKey(d),a=s.getType(),"unordered-list-item"!==a&&"ordered-list-item"!==a?e:(t.preventDefault(),(c=r.getBlockBefore(d))?(u=c.getType(),"unordered-list-item"!==u&&"ordered-list-item"!==u?e:(l=s.getDepth(),t.shiftKey||l!==n?(n=Math.min(c.getDepth()+1,n),f=i(r,p,t.shiftKey?-1:1,n),o.push(e,f,"adjust-depth")):e)):e))},toggleBlockType:function(t,e){var n,i,a,c=t.getSelection(),u=c.getStartKey(),l=c.getEndKey(),f=t.getCurrentContent(),p=c;return u!==l&&0===c.getEndOffset()&&(n=s(f.getBlockBefore(l)),l=n.getKey(),p=p.merge({anchorKey:u,anchorOffset:c.getStartOffset(),focusKey:l,focusOffset:n.getLength(),isBackward:!1})),(i=f.getBlockMap().skipWhile(function(t,e){return e!==u}).reverse().skipWhile(function(t,e){return e!==l}).some(function(t){return"atomic"===t.getType()}))?t:(a=f.getBlockForKey(u).getType()===e?"unstyled":e,o.push(t,r.setBlockType(f,p,a),"change-block-type"))},toggleCode:function(t){var e=t.getSelection(),n=e.getAnchorKey(),r=e.getFocusKey();return e.isCollapsed()||n!==r?a.toggleBlockType(t,"code-block"):a.toggleInlineStyle(t,"CODE")},toggleInlineStyle:function(t,e){var n,i,s=t.getSelection(),a=t.getCurrentInlineStyle();return s.isCollapsed()?o.setInlineStyleOverride(t,a.has(e)?a.remove(e):a.add(e)):(n=t.getCurrentContent(),i=a.has(e)?r.removeInlineStyle(n,s,e):r.applyInlineStyle(n,s,e),o.push(t,i,"change-inline-style"))},toggleLink:function(t,e,n){var i=r.applyEntity(t.getCurrentContent(),e,n);return o.push(t,i,"apply-entity")},tryToRemoveBlockStyle:function(t){var e,n,o,i,s,a,c=t.getSelection(),u=c.getAnchorOffset();if(c.isCollapsed()&&0===u){if(e=c.getAnchorKey(),n=t.getCurrentContent(),o=n.getBlockForKey(e),i=n.getFirstBlock(),o.getLength()>0&&o!==i)return null;if(s=o.getType(),a=n.getBlockBefore(e),"code-block"===s&&a&&"code-block"===a.getType()&&0!==a.getLength())return null;if("unstyled"!==s)return r.setBlockType(n,c,"unstyled")}return null}};t.exports=a},function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var o,i=s||function(t){var e,n,r;for(e=1;e<arguments.length;e++){n=arguments[e];for(r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},s=n(7),a=n(5),c=n(12),u=n(6),l=n(26),f=n(22),p=n(11),d=n(2),g=n(2),h=g.Set,y=n(131),m=n(16),v=n(10),b=n(51),S=n(1),w=n(31),x=p.draft_tree_data_support,C=d.List,k=d.OrderedSet,E=" ",O=" ",T=4,K=new RegExp("\r","g"),_=new RegExp("\n","g"),D=new RegExp(E,"g"),A=new RegExp(" ?","g"),M=new RegExp("​?","g"),B=["bold","bolder","500","600","700","800","900"],L=["light","lighter","100","200","300","400"],R={b:"BOLD",code:"CODE",del:"STRIKETHROUGH",em:"ITALIC",i:"ITALIC",s:"STRIKETHROUGH",strike:"STRIKETHROUGH",strong:"BOLD",u:"UNDERLINE"},N=(o={},r(o,m("public/DraftStyleDefault/depth0"),0),r(o,m("public/DraftStyleDefault/depth1"),1),r(o,m("public/DraftStyleDefault/depth2"),2),r(o,m("public/DraftStyleDefault/depth3"),3),r(o,m("public/DraftStyleDefault/depth4"),4),o),F=["className","href","rel","target","title"],I=["alt","className","height","src","width"],P=void 0,j={text:"",inlines:[],entities:[],blocks:[]},U={children:C(),depth:0,key:"",type:""},H=function(t,e){return"li"===t?"ol"===e?"ordered-list-item":"unordered-list-item":null},z=function(t){var e=t.get("unstyled").element,n=h([]);return t.forEach(function(t){t.aliasedElements&&t.aliasedElements.forEach(function(t){n=n.add(t)}),n=n.add(t.element)}),n.filter(function(t){return t&&t!==e}).toArray().sort()},W=function(t,e,n){var r,o;for(r=0;r<n.length;r++)if(o=n[r](t,e))return o;return null},V=function(t,e,n){var r=n.filter(function(e){return e.element===t||e.wrapper===t||e.aliasedElements&&e.aliasedElements.some(function(e){return e===t})}).keySeq().toSet().toArray().sort();switch(r.length){case 0:return"unstyled";case 1:return r[0];default:return W(t,e,[H])||"unstyled"}},G=function(t,e,n){var r,o=R[t];return o?n=n.add(o).toOrderedSet():e instanceof HTMLElement&&(r=e,n=n.withMutations(function(t){var e=r.style.fontWeight,n=r.style.fontStyle,o=r.style.textDecoration;B.indexOf(e)>=0?t.add("BOLD"):L.indexOf(e)>=0&&t.remove("BOLD"),"italic"===n?t.add("ITALIC"):"normal"===n&&t.remove("ITALIC"),"underline"===o&&t.add("UNDERLINE"),"line-through"===o&&t.add("STRIKETHROUGH"),"none"===o&&(t.remove("UNDERLINE"),t.remove("STRIKETHROUGH"))}).toOrderedSet()),n},q=function(t,e,n){var r=t.text.slice(-1),o=e.text.slice(0,1);if("\r"!==r||"\r"!==o||n||(t.text=t.text.slice(0,-1),t.inlines.pop(),t.entities.pop(),t.blocks.pop()),"\r"===r){if(e.text===O||"\n"===e.text)return t;o!==O&&"\n"!==o||(e.text=e.text.slice(1),e.inlines.shift(),e.entities.shift())}return{text:t.text+e.text,inlines:t.inlines.concat(e.inlines),entities:t.entities.concat(e.entities),blocks:t.blocks.concat(e.blocks)}},X=function(t,e){return e.some(function(e){return t.indexOf("<"+e)!==-1})},J=function(t){t instanceof HTMLAnchorElement?void 0:S(!1);var e=t.protocol;return"http:"===e||"https:"===e||"mailto:"===e},$=function(t){var e=new Array(1);return t&&(e[0]=t),i({},j,{text:O,inlines:[k()],entities:e})},Y=function(){return i({},j,{text:"\n",inlines:[k()],entities:new Array(1)})},Z=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i({},U,t)},Q=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return{text:"\r",inlines:[k()],entities:new Array(1),blocks:[Z({parent:n,key:v(),type:t,depth:Math.max(0,Math.min(T,e))})]}},tt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Object.keys(N).some(function(n){t.classList.contains(n)&&(e=N[n])}),e},et=function t(e,n,r,o,s,a,c,u,l,p){var d,g,h,m,v,b,S,w,C,k,E,T,K,D,A=P,M=n.nodeName.toLowerCase(),B=e,L="unstyled",R=!1,N=s&&V(s,o,u),U=i({},j),H=null,z=void 0;if("#text"===M)return d=n.textContent,g=d.trim(),o&&""===g&&n.parentElement&&(h=n.parentElement.nodeName.toLowerCase(),"ol"===h||"ul"===h)?{chunk:i({},j),entityMap:e}:""===g&&"pre"!==s?{chunk:$(l),entityMap:e}:("pre"!==s&&(d=d.replace(_,O)),P=M,{chunk:{text:d,inlines:Array(d.length).fill(r),entities:Array(d.length).fill(l),blocks:[]},entityMap:e});if(P=M,"br"===M)return"br"!==A||s&&"unstyled"!==N?{chunk:Y(),entityMap:e}:{chunk:Q("unstyled",c,p),entityMap:e};for("img"===M&&n instanceof HTMLImageElement&&n.attributes.getNamedItem("src")&&n.attributes.getNamedItem("src").value&&(m=n,v={},I.forEach(function(t){var e=m.getAttribute(t);e&&(v[t]=e)}),n.textContent="📷",l=f.__create("IMAGE","MUTABLE",v||{})),r=G(M,n,r),"ul"!==M&&"ol"!==M||(o&&(c+=1),o=M),!x&&"li"===M&&n instanceof HTMLElement&&(c=tt(n,c)),b=V(M,o,u),S=o&&"li"===s&&"li"===M,w=(!s||x)&&a.indexOf(M)!==-1,(S||w)&&(U=Q(b,c,p),
z=U.blocks[0].key,s=M,R=!x),S&&(L="ul"===o?"unordered-list-item":"ordered-list-item"),C=n.firstChild,null!=C&&(M=C.nodeName.toLowerCase()),k=null;C;)C instanceof HTMLAnchorElement&&C.href&&J(C)?!function(){var t=C,e={};F.forEach(function(n){var r=t.getAttribute(n);r&&(e[n]=r)}),e.url=new y(t.href).toString(),k=f.__create("LINK","MUTABLE",e||{})}():k=void 0,E=t(B,C,r,o,s,a,c,u,k||l,x?z:null),T=E.chunk,K=E.entityMap,H=T,B=K,U=q(U,H,x),D=C.nextSibling,!p&&D&&a.indexOf(M)>=0&&s&&(U=q(U,Y())),D&&(M=D.nodeName.toLowerCase()),C=D;return R&&(U=q(U,Q(L,c,p))),{chunk:U,entityMap:B}},nt=function(t,e,n,r){var o,s,a,c,u,l;return t=t.trim().replace(K,"").replace(D,O).replace(A,"").replace(M,""),o=z(n),(s=e(t))?(P=null,a=X(t,o)?o:["div"],c=et(r,s,k(),"ul",null,a,-1,n),u=c.chunk,l=c.entityMap,0===u.text.indexOf("\r")&&(u={text:u.text.slice(1),inlines:u.inlines.slice(1),entities:u.entities.slice(1),blocks:u.blocks}),"\r"===u.text.slice(-1)&&(u.text=u.text.slice(0,-1),u.inlines=u.inlines.slice(0,-1),u.entities=u.entities.slice(0,-1),u.blocks.pop()),0===u.blocks.length&&u.blocks.push(i({},j,{type:"unstyled",depth:0})),u.text.split("\r").length===u.blocks.length+1&&u.blocks.unshift({type:"unstyled",depth:0}),{chunk:u,entityMap:l}):null},rt=function(t){var e,n,r,o,i,s;return t&&t.text&&Array.isArray(t.blocks)?(e={cacheRef:{},contentBlocks:[]},n=0,r=t.blocks,o=t.inlines,i=t.entities,s=x?u:c,t.text.split("\r").reduce(function(t,e,c){var l,f,p,d,g,h,y,m,b,S,x,k,E,O,T,K;return e=w(e),l=r[c],f=n+e.length,p=o.slice(n,f),d=i.slice(n,f),g=C(p.map(function(t,e){var n={style:t,entity:null};return d[e]&&(n.entity=d[e]),a.create(n)})),n=f+1,h=l.depth,y=l.type,m=l.parent,b=l.key||v(),S=null,m&&(x=t.cacheRef[m],k=t.contentBlocks[x],k.getChildKeys().isEmpty()&&k.getText()&&(E=k.getCharacterList(),O=k.getText(),S=v(),T=new u({key:S,text:O,characterList:E,parent:m,nextSibling:b}),t.contentBlocks.push(T),k=k.withMutations(function(t){t.set("characterList",C()).set("text","").set("children",k.children.push(T.getKey()))})),t.contentBlocks[x]=k.set("children",k.children.push(b))),K=new s({key:b,parent:m,type:y,depth:h,text:e,characterList:g,prevSibling:S||(0===c||r[c-1].parent!==m?null:r[c-1].key),nextSibling:c===r.length-1||r[c+1].parent!==m?null:r[c+1].key}),t.contentBlocks.push(K),t.cacheRef[K.key]=c,t},e).contentBlocks):null},ot=function(t){var e,n,r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:b,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l,s=nt(t,o,i,f);return null==s?null:(e=s.chunk,n=s.entityMap,r=rt(e),{contentBlocks:r,entityMap:n})};t.exports=ot},function(t,e,n){"use strict";function r(t){return f&&t.altKey||h(t)}function o(t){return g(t)?t.shiftKey?"redo":"undo":null}function i(t){return p&&t.shiftKey?null:r(t)?"delete-word":"delete"}function s(t){return g(t)&&f?"backspace-to-start-of-line":r(t)?"backspace-word":"backspace"}function a(t){switch(t.keyCode){case 66:return g(t)?"bold":null;case 68:return h(t)?"delete":null;case 72:return h(t)?"backspace":null;case 73:return g(t)?"italic":null;case 74:return g(t)?"code":null;case 75:return!p&&h(t)?"secondary-cut":null;case 77:return h(t)?"split-block":null;case 79:return h(t)?"split-block":null;case 84:return f&&h(t)?"transpose-characters":null;case 85:return g(t)?"underline":null;case 87:return f&&h(t)?"backspace-word":null;case 89:return h(t)?p?"redo":"secondary-paste":null;case 90:return o(t)||null;case u.RETURN:return"split-block";case u.DELETE:return i(t);case u.BACKSPACE:return s(t);case u.LEFT:return d&&g(t)?"move-selection-to-start-of-block":null;case u.RIGHT:return d&&g(t)?"move-selection-to-end-of-block":null;default:return null}}var c=n(27),u=n(32),l=n(9),f=l.isPlatform("Mac OS X"),p=l.isPlatform("Windows"),d=f&&l.isBrowser("Firefox < 29"),g=c.hasCommandModifier,h=c.isC