From f5a8f2c777c7df077418a8078370e6b42d67707a Mon Sep 17 00:00:00 2001 From: Roman Hergenreder Date: Fri, 26 Jun 2020 17:24:57 +0200 Subject: [PATCH] alot of settings stuff --- core/Configuration/CreateDatabase.class.php | 4 +- js/admin.min.js | 2106 ++++++++++++++++++- src/package-lock.json | 90 + src/package.json | 4 + src/src/views/settings.js | 624 +++--- 5 files changed, 2578 insertions(+), 250 deletions(-) diff --git a/core/Configuration/CreateDatabase.class.php b/core/Configuration/CreateDatabase.class.php index 28a81b9..628995b 100755 --- a/core/Configuration/CreateDatabase.class.php +++ b/core/Configuration/CreateDatabase.class.php @@ -179,7 +179,7 @@ class CreateDatabase { private static function MessageAcceptInvite() : string { return str_replace("\n", "", intendCode( "Hello {{username}},
- You were invited to create an account on {{site_name}}. Please click on the following link to + You were invited to create an account on {{site_name}}. Please click on the following link to confirm your email address and complete your registration by choosing a new password. If you want to decline the invitation, you can simply ignore this email. The link is valid for the next 48 hours:

{{link}}

@@ -191,7 +191,7 @@ class CreateDatabase { private static function MessageResetPassword() : string { return str_replace("\n", "", intendCode( "Hello {{username}},
- you requested a password reset on {{sitename}}. Please click on the following link to + you requested a password reset on {{sitename}}. Please click on the following link to choose a new password. If this request was not intended, you can simply ignore the email. The Link is valid for one hour:

{{link}}

Best Regards
diff --git a/js/admin.min.js b/js/admin.min.js index 2b96b9d..c36e2ea 100644 --- a/js/admin.min.js +++ b/js/admin.min.js @@ -5127,6 +5127,17 @@ eval("// Imports\nvar ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../. /***/ }), +/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/react-draft-wysiwyg/dist/react-draft-wysiwyg.css": +/*!*************************************************************************************************************!*\ + !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/react-draft-wysiwyg/dist/react-draft-wysiwyg.css ***! + \*************************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// Imports\nvar ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.i, \".rdw-option-wrapper {\\n border: 1px solid #F1F1F1;\\n padding: 5px;\\n min-width: 25px;\\n height: 20px;\\n border-radius: 2px;\\n margin: 0 4px;\\n display: flex;\\n justify-content: center;\\n align-items: center;\\n cursor: pointer;\\n background: white;\\n text-transform: capitalize;\\n}\\n.rdw-option-wrapper:hover {\\n box-shadow: 1px 1px 0px #BFBDBD;\\n}\\n.rdw-option-wrapper:active {\\n box-shadow: 1px 1px 0px #BFBDBD inset;\\n}\\n.rdw-option-active {\\n box-shadow: 1px 1px 0px #BFBDBD inset;\\n}\\n.rdw-option-disabled {\\n opacity: 0.3;\\n cursor: default;\\n}\\n\\n.rdw-dropdown-wrapper {\\n height: 30px;\\n background: white;\\n cursor: pointer;\\n border: 1px solid #F1F1F1;\\n border-radius: 2px;\\n margin: 0 3px;\\n text-transform: capitalize;\\n background: white;\\n}\\n.rdw-dropdown-wrapper:focus {\\n outline: none;\\n}\\n.rdw-dropdown-wrapper:hover {\\n box-shadow: 1px 1px 0px #BFBDBD;\\n background-color: #FFFFFF;\\n}\\n.rdw-dropdown-wrapper:active {\\n box-shadow: 1px 1px 0px #BFBDBD inset;\\n}\\n.rdw-dropdown-carettoopen {\\n height: 0px;\\n width: 0px;\\n position: absolute;\\n top: 35%;\\n right: 10%;\\n border-top: 6px solid black;\\n border-left: 5px solid transparent;\\n border-right: 5px solid transparent;\\n}\\n.rdw-dropdown-carettoclose {\\n height: 0px;\\n width: 0px;\\n position: absolute;\\n top: 35%;\\n right: 10%;\\n border-bottom: 6px solid black;\\n border-left: 5px solid transparent;\\n border-right: 5px solid transparent;\\n}\\n.rdw-dropdown-selectedtext {\\n display: flex;\\n position: relative;\\n height: 100%;\\n align-items: center;\\n padding: 0 5px;\\n}\\n.rdw-dropdown-optionwrapper {\\n z-index: 100;\\n position: relative;\\n border: 1px solid #F1F1F1;\\n width: 98%;\\n background: white;\\n border-radius: 2px;\\n margin: 0;\\n padding: 0;\\n max-height: 250px;\\n overflow-y: scroll;\\n}\\n.rdw-dropdown-optionwrapper:hover {\\n box-shadow: 1px 1px 0px #BFBDBD;\\n background-color: #FFFFFF;\\n}\\n\\n.rdw-dropdownoption-default {\\n min-height: 25px;\\n display: flex;\\n align-items: center;\\n padding: 0 5px;\\n}\\n.rdw-dropdownoption-highlighted {\\n background: #F1F1F1;\\n}\\n.rdw-dropdownoption-active {\\n background: #f5f5f5;\\n}\\n.rdw-dropdownoption-disabled {\\n opacity: 0.3;\\n cursor: default;\\n}\\n\\n.rdw-inline-wrapper {\\n display: flex;\\n align-items: center;\\n margin-bottom: 6px;\\n flex-wrap: wrap\\n}\\n.rdw-inline-dropdown {\\n width: 50px;\\n}\\n.rdw-inline-dropdownoption {\\n height: 40px;\\n display: flex;\\n justify-content: center;\\n}\\n\\n.rdw-block-wrapper {\\n display: flex;\\n align-items: center;\\n margin-bottom: 6px;\\n flex-wrap: wrap\\n}\\n.rdw-block-dropdown {\\n width: 110px;\\n}\\n\\n.rdw-fontsize-wrapper {\\n display: flex;\\n align-items: center;\\n margin-bottom: 6px;\\n flex-wrap: wrap\\n}\\n.rdw-fontsize-dropdown {\\n min-width: 40px;\\n}\\n.rdw-fontsize-option {\\n display: flex;\\n justify-content: center;\\n}\\n\\n.rdw-fontfamily-wrapper {\\n display: flex;\\n align-items: center;\\n margin-bottom: 6px;\\n flex-wrap: wrap\\n}\\n.rdw-fontfamily-dropdown {\\n width: 115px;\\n}\\n.rdw-fontfamily-placeholder {\\n white-space: nowrap;\\n max-width: 90px;\\n overflow: hidden;\\n text-overflow: ellipsis;\\n}\\n.rdw-fontfamily-optionwrapper {\\n width: 140px;\\n}\\n\\n.rdw-list-wrapper {\\n display: flex;\\n align-items: center;\\n margin-bottom: 6px;\\n flex-wrap: wrap\\n}\\n.rdw-list-dropdown {\\n width: 50px;\\n z-index: 90;\\n}\\n.rdw-list-dropdownOption {\\n height: 40px;\\n display: flex;\\n justify-content: center;\\n}\\n\\n.rdw-text-align-wrapper {\\n display: flex;\\n align-items: center;\\n margin-bottom: 6px;\\n flex-wrap: wrap\\n}\\n.rdw-text-align-dropdown {\\n width: 50px;\\n z-index: 90;\\n}\\n.rdw-text-align-dropdownOption {\\n height: 40px;\\n display: flex;\\n justify-content: center;\\n}\\n.rdw-right-aligned-block {\\n text-align: right;\\n}\\n.rdw-left-aligned-block {\\n text-align: left !important;\\n}\\n.rdw-center-aligned-block {\\n text-align: center !important;\\n}\\n.rdw-justify-aligned-block {\\n text-align: justify !important;\\n}\\n.rdw-right-aligned-block > div {\\n display: inline-block;\\n}\\n.rdw-left-aligned-block > div {\\n display: inline-block;\\n}\\n.rdw-center-aligned-block > div {\\n display: inline-block;\\n}\\n.rdw-justify-aligned-block > div {\\n display: inline-block;\\n}\\n\\n.rdw-colorpicker-wrapper {\\n display: flex;\\n align-items: center;\\n margin-bottom: 6px;\\n position: relative;\\n flex-wrap: wrap\\n}\\n.rdw-colorpicker-modal {\\n position: absolute;\\n top: 35px;\\n left: 5px;\\n display: flex;\\n flex-direction: column;\\n width: 175px;\\n height: 175px;\\n border: 1px solid #F1F1F1;\\n padding: 15px;\\n border-radius: 2px;\\n z-index: 100;\\n background: white;\\n box-shadow: 3px 3px 5px #BFBDBD;\\n}\\n.rdw-colorpicker-modal-header {\\n display: flex;\\n padding-bottom: 5px;\\n}\\n.rdw-colorpicker-modal-style-label {\\n font-size: 15px;\\n width: 50%;\\n text-align: center;\\n cursor: pointer;\\n padding: 0 10px 5px;\\n}\\n.rdw-colorpicker-modal-style-label-active {\\n border-bottom: 2px solid #0a66b7;\\n}\\n.rdw-colorpicker-modal-options {\\n margin: 5px auto;\\n display: flex;\\n width: 100%;\\n height: 100%;\\n flex-wrap: wrap;\\n overflow: scroll;\\n}\\n.rdw-colorpicker-cube {\\n width: 22px;\\n height: 22px;\\n border: 1px solid #F1F1F1;\\n}\\n.rdw-colorpicker-option {\\n margin: 3px;\\n padding: 0;\\n min-height: 20px;\\n border: none;\\n width: 22px;\\n height: 22px;\\n min-width: 22px;\\n box-shadow: 1px 2px 1px #BFBDBD inset;\\n}\\n.rdw-colorpicker-option:hover {\\n box-shadow: 1px 2px 1px #BFBDBD;\\n}\\n.rdw-colorpicker-option:active {\\n box-shadow: -1px -2px 1px #BFBDBD;\\n}\\n.rdw-colorpicker-option-active {\\n box-shadow: 0px 0px 2px 2px #BFBDBD;\\n}\\n\\n.rdw-link-wrapper {\\n display: flex;\\n align-items: center;\\n margin-bottom: 6px;\\n position: relative;\\n flex-wrap: wrap\\n}\\n.rdw-link-dropdown {\\n width: 50px;\\n}\\n.rdw-link-dropdownOption {\\n height: 40px;\\n display: flex;\\n justify-content: center;\\n}\\n.rdw-link-dropdownPlaceholder {\\n margin-left: 8px;\\n}\\n.rdw-link-modal {\\n position: absolute;\\n top: 35px;\\n left: 5px;\\n display: flex;\\n flex-direction: column;\\n width: 235px;\\n height: 205px;\\n border: 1px solid #F1F1F1;\\n padding: 15px;\\n border-radius: 2px;\\n z-index: 100;\\n background: white;\\n box-shadow: 3px 3px 5px #BFBDBD;\\n}\\n.rdw-link-modal-label {\\n font-size: 15px;\\n}\\n.rdw-link-modal-input {\\n margin-top: 5px;\\n border-radius: 2px;\\n border: 1px solid #F1F1F1;\\n height: 25px;\\n margin-bottom: 15px;\\n padding: 0 5px;\\n}\\n.rdw-link-modal-input:focus {\\n outline: none;\\n}\\n.rdw-link-modal-buttonsection {\\n margin: 0 auto;\\n}\\n.rdw-link-modal-target-option {\\n margin-bottom: 20px;\\n}\\n.rdw-link-modal-target-option > span {\\n margin-left: 5px;\\n}\\n.rdw-link-modal-btn {\\n margin-left: 10px;\\n width: 75px;\\n height: 30px;\\n border: 1px solid #F1F1F1;\\n border-radius: 2px;\\n cursor: pointer;\\n background: white;\\n text-transform: capitalize;\\n}\\n.rdw-link-modal-btn:hover {\\n box-shadow: 1px 1px 0px #BFBDBD;\\n}\\n.rdw-link-modal-btn:active {\\n box-shadow: 1px 1px 0px #BFBDBD inset;\\n}\\n.rdw-link-modal-btn:focus {\\n outline: none !important;\\n}\\n.rdw-link-modal-btn:disabled {\\n background: #ece9e9;\\n}\\n.rdw-link-dropdownoption {\\n height: 40px;\\n display: flex;\\n justify-content: center;\\n}\\n.rdw-history-dropdown {\\n width: 50px;\\n}\\n\\n.rdw-embedded-wrapper {\\n display: flex;\\n align-items: center;\\n margin-bottom: 6px;\\n position: relative;\\n flex-wrap: wrap\\n}\\n.rdw-embedded-modal {\\n position: absolute;\\n top: 35px;\\n left: 5px;\\n display: flex;\\n flex-direction: column;\\n width: 235px;\\n height: 180px;\\n border: 1px solid #F1F1F1;\\n padding: 15px;\\n border-radius: 2px;\\n z-index: 100;\\n background: white;\\n justify-content: space-between;\\n box-shadow: 3px 3px 5px #BFBDBD;\\n}\\n.rdw-embedded-modal-header {\\n font-size: 15px;\\n display: flex;\\n}\\n.rdw-embedded-modal-header-option {\\n width: 50%;\\n cursor: pointer;\\n display: flex;\\n justify-content: center;\\n align-items: center;\\n flex-direction: column;\\n}\\n.rdw-embedded-modal-header-label {\\n width: 95px;\\n border: 1px solid #f1f1f1;\\n margin-top: 5px;\\n background: #6EB8D4;\\n border-bottom: 2px solid #0a66b7;\\n}\\n.rdw-embedded-modal-link-section {\\n display: flex;\\n flex-direction: column;\\n}\\n.rdw-embedded-modal-link-input {\\n width: 88%;\\n height: 35px;\\n margin: 10px 0;\\n border: 1px solid #F1F1F1;\\n border-radius: 2px;\\n font-size: 15px;\\n padding: 0 5px;\\n}\\n.rdw-embedded-modal-link-input-wrapper {\\n display: flex;\\n align-items: center;\\n}\\n.rdw-embedded-modal-link-input:focus {\\n outline: none;\\n}\\n.rdw-embedded-modal-btn-section {\\n display: flex;\\n justify-content: center;\\n}\\n.rdw-embedded-modal-btn {\\n margin: 0 3px;\\n width: 75px;\\n height: 30px;\\n border: 1px solid #F1F1F1;\\n border-radius: 2px;\\n cursor: pointer;\\n background: white;\\n text-transform: capitalize;\\n}\\n.rdw-embedded-modal-btn:hover {\\n box-shadow: 1px 1px 0px #BFBDBD;\\n}\\n.rdw-embedded-modal-btn:active {\\n box-shadow: 1px 1px 0px #BFBDBD inset;\\n}\\n.rdw-embedded-modal-btn:focus {\\n outline: none !important;\\n}\\n.rdw-embedded-modal-btn:disabled {\\n background: #ece9e9;\\n}\\n.rdw-embedded-modal-size {\\n align-items: center;\\n display: flex;\\n margin: 8px 0;\\n justify-content: space-between;\\n}\\n.rdw-embedded-modal-size-input {\\n width: 80%;\\n height: 20px;\\n border: 1px solid #F1F1F1;\\n border-radius: 2px;\\n font-size: 12px;\\n}\\n.rdw-embedded-modal-size-input:focus {\\n outline: none;\\n}\\n\\n.rdw-emoji-wrapper {\\n display: flex;\\n align-items: center;\\n margin-bottom: 6px;\\n position: relative;\\n flex-wrap: wrap\\n}\\n.rdw-emoji-modal {\\n overflow: auto;\\n position: absolute;\\n top: 35px;\\n left: 5px;\\n display: flex;\\n flex-wrap: wrap;\\n width: 235px;\\n height: 180px;\\n border: 1px solid #F1F1F1;\\n padding: 15px;\\n border-radius: 2px;\\n z-index: 100;\\n background: white;\\n box-shadow: 3px 3px 5px #BFBDBD;\\n}\\n.rdw-emoji-icon {\\n margin: 2.5px;\\n height: 24px;\\n width: 24px;\\n cursor: pointer;\\n font-size: 22px;\\n display: flex;\\n justify-content: center;\\n align-items: center;\\n}\\n\\n.rdw-spinner {\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n height: 100%;\\n width: 100%;\\n}\\n.rdw-spinner > div {\\n width: 12px;\\n height: 12px;\\n background-color: #333;\\n\\n border-radius: 100%;\\n display: inline-block;\\n -webkit-animation: sk-bouncedelay 1.4s infinite ease-in-out both;\\n animation: sk-bouncedelay 1.4s infinite ease-in-out both;\\n}\\n.rdw-spinner .rdw-bounce1 {\\n -webkit-animation-delay: -0.32s;\\n animation-delay: -0.32s;\\n}\\n.rdw-spinner .rdw-bounce2 {\\n -webkit-animation-delay: -0.16s;\\n animation-delay: -0.16s;\\n}\\n@-webkit-keyframes sk-bouncedelay {\\n 0%, 80%, 100% { -webkit-transform: scale(0) }\\n 40% { -webkit-transform: scale(1.0) }\\n}\\n@keyframes sk-bouncedelay {\\n 0%, 80%, 100% {\\n -webkit-transform: scale(0);\\n transform: scale(0);\\n } 40% {\\n -webkit-transform: scale(1.0);\\n transform: scale(1.0);\\n }\\n}\\n\\n.rdw-image-wrapper {\\n display: flex;\\n align-items: center;\\n margin-bottom: 6px;\\n position: relative;\\n flex-wrap: wrap\\n}\\n.rdw-image-modal {\\n position: absolute;\\n top: 35px;\\n left: 5px;\\n display: flex;\\n flex-direction: column;\\n width: 235px;\\n border: 1px solid #F1F1F1;\\n padding: 15px;\\n border-radius: 2px;\\n z-index: 100;\\n background: white;\\n box-shadow: 3px 3px 5px #BFBDBD;\\n}\\n.rdw-image-modal-header {\\n font-size: 15px;\\n margin: 10px 0;\\n display: flex;\\n}\\n.rdw-image-modal-header-option {\\n width: 50%;\\n cursor: pointer;\\n display: flex;\\n justify-content: center;\\n align-items: center;\\n flex-direction: column;\\n}\\n.rdw-image-modal-header-label {\\n width: 80px;\\n background: #f1f1f1;\\n border: 1px solid #f1f1f1;\\n margin-top: 5px;\\n}\\n.rdw-image-modal-header-label-highlighted {\\n background: #6EB8D4;\\n border-bottom: 2px solid #0a66b7;\\n}\\n.rdw-image-modal-upload-option {\\n width: 100%;\\n color: gray;\\n cursor: pointer;\\n display: flex;\\n border: none;\\n font-size: 15px;\\n align-items: center;\\n justify-content: center;\\n background-color: #f1f1f1;\\n outline: 2px dashed gray;\\n outline-offset: -10px;\\n margin: 10px 0;\\n padding: 9px 0;\\n}\\n.rdw-image-modal-upload-option-highlighted {\\n outline: 2px dashed #0a66b7;\\n}\\n.rdw-image-modal-upload-option-label {\\n cursor: pointer;\\n height: 100%;\\n width: 100%;\\n display: flex;\\n justify-content: center;\\n align-items: center;\\n padding: 15px;\\n}\\n.rdw-image-modal-upload-option-label span{\\n padding: 0 20px;\\n}\\n.rdw-image-modal-upload-option-image-preview {\\n max-width: 100%;\\n max-height: 200px;\\n}\\n.rdw-image-modal-upload-option-input {\\n\\twidth: 0.1px;\\n\\theight: 0.1px;\\n\\topacity: 0;\\n\\toverflow: hidden;\\n\\tposition: absolute;\\n\\tz-index: -1;\\n}\\n.rdw-image-modal-url-section {\\n display: flex;\\n align-items: center;\\n}\\n.rdw-image-modal-url-input {\\n width: 90%;\\n height: 35px;\\n margin: 15px 0 12px;\\n border: 1px solid #F1F1F1;\\n border-radius: 2px;\\n font-size: 15px;\\n padding: 0 5px;\\n}\\n.rdw-image-modal-btn-section {\\n margin: 10px auto 0;\\n}\\n.rdw-image-modal-url-input:focus {\\n outline: none;\\n}\\n.rdw-image-modal-btn {\\n margin: 0 5px;\\n width: 75px;\\n height: 30px;\\n border: 1px solid #F1F1F1;\\n border-radius: 2px;\\n cursor: pointer;\\n background: white;\\n text-transform: capitalize;\\n}\\n.rdw-image-modal-btn:hover {\\n box-shadow: 1px 1px 0px #BFBDBD;\\n}\\n.rdw-image-modal-btn:active {\\n box-shadow: 1px 1px 0px #BFBDBD inset;\\n}\\n.rdw-image-modal-btn:focus {\\n outline: none !important;\\n}\\n.rdw-image-modal-btn:disabled {\\n background: #ece9e9;\\n}\\n.rdw-image-modal-spinner {\\n position: absolute;\\n top: -3px;\\n left: 0;\\n width: 100%;\\n height: 100%;\\n opacity: 0.5;\\n}\\n.rdw-image-modal-alt-input {\\n width: 70%;\\n height: 20px;\\n border: 1px solid #F1F1F1;\\n border-radius: 2px;\\n font-size: 12px;\\n margin-left: 5px;\\n}\\n.rdw-image-modal-alt-input:focus {\\n outline: none;\\n}\\n.rdw-image-modal-alt-lbl {\\n font-size: 12px;\\n}\\n.rdw-image-modal-size {\\n align-items: center;\\n display: flex;\\n margin: 8px 0;\\n justify-content: space-between;\\n}\\n.rdw-image-modal-size-input {\\n width: 40%;\\n height: 20px;\\n border: 1px solid #F1F1F1;\\n border-radius: 2px;\\n font-size: 12px;\\n}\\n.rdw-image-modal-size-input:focus {\\n outline: none;\\n}\\n.rdw-image-mandatory-sign {\\n color: red;\\n margin-left: 3px;\\n margin-right: 3px;\\n}\\n\\n.rdw-remove-wrapper {\\n display: flex;\\n align-items: center;\\n margin-bottom: 6px;\\n position: relative;\\n flex-wrap: wrap\\n}\\n\\n.rdw-history-wrapper {\\n display: flex;\\n align-items: center;\\n margin-bottom: 6px;\\n flex-wrap: wrap\\n}\\n.rdw-history-dropdownoption {\\n height: 40px;\\n display: flex;\\n justify-content: center;\\n}\\n.rdw-history-dropdown {\\n width: 50px;\\n}\\n\\n.rdw-link-decorator-wrapper {\\n position: relative;\\n}\\n.rdw-link-decorator-icon {\\n position: absolute;\\n left: 40%;\\n top: 0;\\n cursor: pointer;\\n background-color: white;\\n}\\n\\n.rdw-mention-link {\\n text-decoration: none;\\n color: #1236ff;\\n background-color: #f0fbff;\\n padding: 1px 2px;\\n border-radius: 2px;\\n}\\n\\n.rdw-suggestion-wrapper {\\n position: relative;\\n}\\n.rdw-suggestion-dropdown {\\n position: absolute;\\n display: flex;\\n flex-direction: column;\\n border: 1px solid #F1F1F1;\\n min-width: 100px;\\n max-height: 150px;\\n overflow: auto;\\n background: white;\\n z-index: 100;\\n}\\n.rdw-suggestion-option {\\n padding: 7px 5px;\\n border-bottom: 1px solid #f1f1f1;\\n}\\n.rdw-suggestion-option-active {\\n background-color: #F1F1F1;\\n}\\n\\n.rdw-hashtag-link {\\n text-decoration: none;\\n color: #1236ff;\\n background-color: #f0fbff;\\n padding: 1px 2px;\\n border-radius: 2px;\\n}\\n\\n.rdw-image-alignment-options-popup {\\n position: absolute;\\n background: white;\\n display: flex;\\n padding: 5px 2px;\\n border-radius: 2px;\\n border: 1px solid #F1F1F1;\\n width: 105px;\\n cursor: pointer;\\n z-index: 100;\\n}\\n.rdw-alignment-option-left {\\n justify-content: flex-start;\\n}\\n.rdw-image-alignment-option {\\n height: 15px;\\n width: 15px;\\n min-width: 15px;\\n}\\n.rdw-image-alignment {\\n position: relative;\\n}\\n.rdw-image-imagewrapper {\\n position: relative;\\n}\\n.rdw-image-center {\\n display: flex;\\n justify-content: center;\\n}\\n.rdw-image-left {\\n display: flex;\\n}\\n.rdw-image-right {\\n display: flex;\\n justify-content: flex-end;\\n}\\n.rdw-image-alignment-options-popup-right {\\n right: 0;\\n}\\n\\n.rdw-editor-main {\\n height: 100%;\\n overflow: auto;\\n box-sizing: border-box;\\n}\\n.rdw-editor-toolbar {\\n padding: 6px 5px 0;\\n border-radius: 2px;\\n border: 1px solid #F1F1F1;\\n display: flex;\\n justify-content: flex-start;\\n background: white;\\n flex-wrap: wrap;\\n font-size: 15px;\\n margin-bottom: 5px;\\n user-select: none;\\n}\\n.public-DraftStyleDefault-block {\\n margin: 1em 0;\\n}\\n.rdw-editor-wrapper:focus {\\n outline: none;\\n}\\n.rdw-editor-wrapper {\\n box-sizing: content-box;\\n}\\n.rdw-editor-main blockquote {\\n border-left: 5px solid #f1f1f1;\\n padding-left: 5px;\\n}\\n.rdw-editor-main pre {\\n background: #f1f1f1;\\n border-radius: 3px;\\n padding: 1px 10px;\\n}\\n/**\\n * Draft v0.9.1\\n *\\n * Copyright (c) 2013-present, Facebook, Inc.\\n * All rights reserved.\\n *\\n * This source code is licensed under the BSD-style license found in the\\n * LICENSE file in the root directory of this source tree. An additional grant\\n * of patent rights can be found in the PATENTS file in the same directory.\\n */\\n.DraftEditor-editorContainer,.DraftEditor-root,.public-DraftEditor-content{height:inherit;text-align:initial}.public-DraftEditor-content[contenteditable=true]{-webkit-user-modify:read-write-plaintext-only}.DraftEditor-root{position:relative}.DraftEditor-editorContainer{background-color:rgba(255,255,255,0);border-left:.1px solid transparent;position:relative;z-index:1}.public-DraftEditor-block{position:relative}.DraftEditor-alignLeft .public-DraftStyleDefault-block{text-align:left}.DraftEditor-alignLeft .public-DraftEditorPlaceholder-root{left:0;text-align:left}.DraftEditor-alignCenter .public-DraftStyleDefault-block{text-align:center}.DraftEditor-alignCenter .public-DraftEditorPlaceholder-root{margin:0 auto;text-align:center;width:100%}.DraftEditor-alignRight .public-DraftStyleDefault-block{text-align:right}.DraftEditor-alignRight .public-DraftEditorPlaceholder-root{right:0;text-align:right}.public-DraftEditorPlaceholder-root{color:#9197a3;position:absolute;z-index:0}.public-DraftEditorPlaceholder-hasFocus{color:#bdc1c9}.DraftEditorPlaceholder-hidden{display:none}.public-DraftStyleDefault-block{position:relative;white-space:pre-wrap}.public-DraftStyleDefault-ltr{direction:ltr;text-align:left}.public-DraftStyleDefault-rtl{direction:rtl;text-align:right}.public-DraftStyleDefault-listLTR{direction:ltr}.public-DraftStyleDefault-listRTL{direction:rtl}.public-DraftStyleDefault-ol,.public-DraftStyleDefault-ul{margin:16px 0;padding:0}.public-DraftStyleDefault-depth0.public-DraftStyleDefault-listLTR{margin-left:1.5em}.public-DraftStyleDefault-depth0.public-DraftStyleDefault-listRTL{margin-right:1.5em}.public-DraftStyleDefault-depth1.public-DraftStyleDefault-listLTR{margin-left:3em}.public-DraftStyleDefault-depth1.public-DraftStyleDefault-listRTL{margin-right:3em}.public-DraftStyleDefault-depth2.public-DraftStyleDefault-listLTR{margin-left:4.5em}.public-DraftStyleDefault-depth2.public-DraftStyleDefault-listRTL{margin-right:4.5em}.public-DraftStyleDefault-depth3.public-DraftStyleDefault-listLTR{margin-left:6em}.public-DraftStyleDefault-depth3.public-DraftStyleDefault-listRTL{margin-right:6em}.public-DraftStyleDefault-depth4.public-DraftStyleDefault-listLTR{margin-left:7.5em}.public-DraftStyleDefault-depth4.public-DraftStyleDefault-listRTL{margin-right:7.5em}.public-DraftStyleDefault-unorderedListItem{list-style-type:square;position:relative}.public-DraftStyleDefault-unorderedListItem.public-DraftStyleDefault-depth0{list-style-type:disc}.public-DraftStyleDefault-unorderedListItem.public-DraftStyleDefault-depth1{list-style-type:circle}.public-DraftStyleDefault-orderedListItem{list-style-type:none;position:relative}.public-DraftStyleDefault-orderedListItem.public-DraftStyleDefault-listLTR:before{left:-36px;position:absolute;text-align:right;width:30px}.public-DraftStyleDefault-orderedListItem.public-DraftStyleDefault-listRTL:before{position:absolute;right:-36px;text-align:left;width:30px}.public-DraftStyleDefault-orderedListItem:before{content:counter(ol0) \\\". \\\";counter-increment:ol0}.public-DraftStyleDefault-orderedListItem.public-DraftStyleDefault-depth1:before{content:counter(ol1) \\\". \\\";counter-increment:ol1}.public-DraftStyleDefault-orderedListItem.public-DraftStyleDefault-depth2:before{content:counter(ol2) \\\". \\\";counter-increment:ol2}.public-DraftStyleDefault-orderedListItem.public-DraftStyleDefault-depth3:before{content:counter(ol3) \\\". \\\";counter-increment:ol3}.public-DraftStyleDefault-orderedListItem.public-DraftStyleDefault-depth4:before{content:counter(ol4) \\\". \\\";counter-increment:ol4}.public-DraftStyleDefault-depth0.public-DraftStyleDefault-reset{counter-reset:ol0}.public-DraftStyleDefault-depth1.public-DraftStyleDefault-reset{counter-reset:ol1}.public-DraftStyleDefault-depth2.public-DraftStyleDefault-reset{counter-reset:ol2}.public-DraftStyleDefault-depth3.public-DraftStyleDefault-reset{counter-reset:ol3}.public-DraftStyleDefault-depth4.public-DraftStyleDefault-reset{counter-reset:ol4}\", \"\"]);\n// Exports\nmodule.exports = exports;\n\n\n//# sourceURL=webpack:///./node_modules/react-draft-wysiwyg/dist/react-draft-wysiwyg.css?./node_modules/css-loader/dist/cjs.js"); + +/***/ }), + /***/ "./node_modules/css-loader/dist/cjs.js!./src/include/adminlte.min.css": /*!****************************************************************************!*\ !*** ./node_modules/css-loader/dist/cjs.js!./src/include/adminlte.min.css ***! @@ -5184,6 +5195,2033 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) * /***/ }), +/***/ "./node_modules/draft-js/lib/AtomicBlockUtils.js": +/*!*******************************************************!*\ + !*** ./node_modules/draft-js/lib/AtomicBlockUtils.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar BlockMapBuilder = __webpack_require__(/*! ./BlockMapBuilder */ \"./node_modules/draft-js/lib/BlockMapBuilder.js\");\n\nvar CharacterMetadata = __webpack_require__(/*! ./CharacterMetadata */ \"./node_modules/draft-js/lib/CharacterMetadata.js\");\n\nvar ContentBlock = __webpack_require__(/*! ./ContentBlock */ \"./node_modules/draft-js/lib/ContentBlock.js\");\n\nvar ContentBlockNode = __webpack_require__(/*! ./ContentBlockNode */ \"./node_modules/draft-js/lib/ContentBlockNode.js\");\n\nvar DraftModifier = __webpack_require__(/*! ./DraftModifier */ \"./node_modules/draft-js/lib/DraftModifier.js\");\n\nvar EditorState = __webpack_require__(/*! ./EditorState */ \"./node_modules/draft-js/lib/EditorState.js\");\n\nvar generateRandomKey = __webpack_require__(/*! ./generateRandomKey */ \"./node_modules/draft-js/lib/generateRandomKey.js\");\n\nvar gkx = __webpack_require__(/*! ./gkx */ \"./node_modules/draft-js/lib/gkx.js\");\n\nvar Immutable = __webpack_require__(/*! immutable */ \"./node_modules/immutable/dist/immutable.js\");\n\nvar moveBlockInContentState = __webpack_require__(/*! ./moveBlockInContentState */ \"./node_modules/draft-js/lib/moveBlockInContentState.js\");\n\nvar experimentalTreeDataSupport = gkx('draft_tree_data_support');\nvar ContentBlockRecord = experimentalTreeDataSupport ? ContentBlockNode : ContentBlock;\nvar List = Immutable.List,\n Repeat = Immutable.Repeat;\nvar AtomicBlockUtils = {\n insertAtomicBlock: function insertAtomicBlock(editorState, entityKey, character) {\n var contentState = editorState.getCurrentContent();\n var selectionState = editorState.getSelection();\n var afterRemoval = DraftModifier.removeRange(contentState, selectionState, 'backward');\n var targetSelection = afterRemoval.getSelectionAfter();\n var afterSplit = DraftModifier.splitBlock(afterRemoval, targetSelection);\n var insertionTarget = afterSplit.getSelectionAfter();\n var asAtomicBlock = DraftModifier.setBlockType(afterSplit, insertionTarget, 'atomic');\n var charData = CharacterMetadata.create({\n entity: entityKey\n });\n var atomicBlockConfig = {\n key: generateRandomKey(),\n type: 'atomic',\n text: character,\n characterList: List(Repeat(charData, character.length))\n };\n var atomicDividerBlockConfig = {\n key: generateRandomKey(),\n type: 'unstyled'\n };\n\n if (experimentalTreeDataSupport) {\n atomicBlockConfig = _objectSpread({}, atomicBlockConfig, {\n nextSibling: atomicDividerBlockConfig.key\n });\n atomicDividerBlockConfig = _objectSpread({}, atomicDividerBlockConfig, {\n prevSibling: atomicBlockConfig.key\n });\n }\n\n var fragmentArray = [new ContentBlockRecord(atomicBlockConfig), new ContentBlockRecord(atomicDividerBlockConfig)];\n var fragment = BlockMapBuilder.createFromArray(fragmentArray);\n var withAtomicBlock = DraftModifier.replaceWithFragment(asAtomicBlock, insertionTarget, fragment);\n var newContent = withAtomicBlock.merge({\n selectionBefore: selectionState,\n selectionAfter: withAtomicBlock.getSelectionAfter().set('hasFocus', true)\n });\n return EditorState.push(editorState, newContent, 'insert-fragment');\n },\n moveAtomicBlock: function moveAtomicBlock(editorState, atomicBlock, targetRange, insertionMode) {\n var contentState = editorState.getCurrentContent();\n var selectionState = editorState.getSelection();\n var withMovedAtomicBlock;\n\n if (insertionMode === 'before' || insertionMode === 'after') {\n var targetBlock = contentState.getBlockForKey(insertionMode === 'before' ? targetRange.getStartKey() : targetRange.getEndKey());\n withMovedAtomicBlock = moveBlockInContentState(contentState, atomicBlock, targetBlock, insertionMode);\n } else {\n var afterRemoval = DraftModifier.removeRange(contentState, targetRange, 'backward');\n var selectionAfterRemoval = afterRemoval.getSelectionAfter();\n\n var _targetBlock = afterRemoval.getBlockForKey(selectionAfterRemoval.getFocusKey());\n\n if (selectionAfterRemoval.getStartOffset() === 0) {\n withMovedAtomicBlock = moveBlockInContentState(afterRemoval, atomicBlock, _targetBlock, 'before');\n } else if (selectionAfterRemoval.getEndOffset() === _targetBlock.getLength()) {\n withMovedAtomicBlock = moveBlockInContentState(afterRemoval, atomicBlock, _targetBlock, 'after');\n } else {\n var afterSplit = DraftModifier.splitBlock(afterRemoval, selectionAfterRemoval);\n var selectionAfterSplit = afterSplit.getSelectionAfter();\n\n var _targetBlock2 = afterSplit.getBlockForKey(selectionAfterSplit.getFocusKey());\n\n withMovedAtomicBlock = moveBlockInContentState(afterSplit, atomicBlock, _targetBlock2, 'before');\n }\n }\n\n var newContent = withMovedAtomicBlock.merge({\n selectionBefore: selectionState,\n selectionAfter: withMovedAtomicBlock.getSelectionAfter().set('hasFocus', true)\n });\n return EditorState.push(editorState, newContent, 'move-block');\n }\n};\nmodule.exports = AtomicBlockUtils;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/AtomicBlockUtils.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/BlockMapBuilder.js": +/*!******************************************************!*\ + !*** ./node_modules/draft-js/lib/BlockMapBuilder.js ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar Immutable = __webpack_require__(/*! immutable */ \"./node_modules/immutable/dist/immutable.js\");\n\nvar OrderedMap = Immutable.OrderedMap;\nvar BlockMapBuilder = {\n createFromArray: function createFromArray(blocks) {\n return OrderedMap(blocks.map(function (block) {\n return [block.getKey(), block];\n }));\n }\n};\nmodule.exports = BlockMapBuilder;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/BlockMapBuilder.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/BlockTree.js": +/*!************************************************!*\ + !*** ./node_modules/draft-js/lib/BlockTree.js ***! + \************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nvar findRangesImmutable = __webpack_require__(/*! ./findRangesImmutable */ \"./node_modules/draft-js/lib/findRangesImmutable.js\");\n\nvar getOwnObjectValues = __webpack_require__(/*! ./getOwnObjectValues */ \"./node_modules/draft-js/lib/getOwnObjectValues.js\");\n\nvar Immutable = __webpack_require__(/*! immutable */ \"./node_modules/immutable/dist/immutable.js\");\n\nvar List = Immutable.List,\n Repeat = Immutable.Repeat,\n Record = Immutable.Record;\n\nvar returnTrue = function returnTrue() {\n return true;\n};\n\nvar defaultLeafRange = {\n start: null,\n end: null\n};\nvar LeafRange = Record(defaultLeafRange);\nvar defaultDecoratorRange = {\n start: null,\n end: null,\n decoratorKey: null,\n leaves: null\n};\nvar DecoratorRange = Record(defaultDecoratorRange);\nvar BlockTree = {\n /**\n * Generate a block tree for a given ContentBlock/decorator pair.\n */\n generate: function generate(contentState, block, decorator) {\n var textLength = block.getLength();\n\n if (!textLength) {\n return List.of(new DecoratorRange({\n start: 0,\n end: 0,\n decoratorKey: null,\n leaves: List.of(new LeafRange({\n start: 0,\n end: 0\n }))\n }));\n }\n\n var leafSets = [];\n var decorations = decorator ? decorator.getDecorations(block, contentState) : List(Repeat(null, textLength));\n var chars = block.getCharacterList();\n findRangesImmutable(decorations, areEqual, returnTrue, function (start, end) {\n leafSets.push(new DecoratorRange({\n start: start,\n end: end,\n decoratorKey: decorations.get(start),\n leaves: generateLeaves(chars.slice(start, end).toList(), start)\n }));\n });\n return List(leafSets);\n },\n fromJS: function fromJS(_ref) {\n var leaves = _ref.leaves,\n other = _objectWithoutPropertiesLoose(_ref, [\"leaves\"]);\n\n return new DecoratorRange(_objectSpread({}, other, {\n leaves: leaves != null ? List(Array.isArray(leaves) ? leaves : getOwnObjectValues(leaves)).map(function (leaf) {\n return LeafRange(leaf);\n }) : null\n }));\n }\n};\n/**\n * Generate LeafRange records for a given character list.\n */\n\nfunction generateLeaves(characters, offset) {\n var leaves = [];\n var inlineStyles = characters.map(function (c) {\n return c.getStyle();\n }).toList();\n findRangesImmutable(inlineStyles, areEqual, returnTrue, function (start, end) {\n leaves.push(new LeafRange({\n start: start + offset,\n end: end + offset\n }));\n });\n return List(leaves);\n}\n\nfunction areEqual(a, b) {\n return a === b;\n}\n\nmodule.exports = BlockTree;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/BlockTree.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/CharacterMetadata.js": +/*!********************************************************!*\ + !*** ./node_modules/draft-js/lib/CharacterMetadata.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar _require = __webpack_require__(/*! immutable */ \"./node_modules/immutable/dist/immutable.js\"),\n Map = _require.Map,\n OrderedSet = _require.OrderedSet,\n Record = _require.Record; // Immutable.map is typed such that the value for every key in the map\n// must be the same type\n\n\nvar EMPTY_SET = OrderedSet();\nvar defaultRecord = {\n style: EMPTY_SET,\n entity: null\n};\nvar CharacterMetadataRecord = Record(defaultRecord);\n\nvar CharacterMetadata =\n/*#__PURE__*/\nfunction (_CharacterMetadataRec) {\n _inheritsLoose(CharacterMetadata, _CharacterMetadataRec);\n\n function CharacterMetadata() {\n return _CharacterMetadataRec.apply(this, arguments) || this;\n }\n\n var _proto = CharacterMetadata.prototype;\n\n _proto.getStyle = function getStyle() {\n return this.get('style');\n };\n\n _proto.getEntity = function getEntity() {\n return this.get('entity');\n };\n\n _proto.hasStyle = function hasStyle(style) {\n return this.getStyle().includes(style);\n };\n\n CharacterMetadata.applyStyle = function applyStyle(record, style) {\n var withStyle = record.set('style', record.getStyle().add(style));\n return CharacterMetadata.create(withStyle);\n };\n\n CharacterMetadata.removeStyle = function removeStyle(record, style) {\n var withoutStyle = record.set('style', record.getStyle().remove(style));\n return CharacterMetadata.create(withoutStyle);\n };\n\n CharacterMetadata.applyEntity = function applyEntity(record, entityKey) {\n var withEntity = record.getEntity() === entityKey ? record : record.set('entity', entityKey);\n return CharacterMetadata.create(withEntity);\n }\n /**\n * Use this function instead of the `CharacterMetadata` constructor.\n * Since most content generally uses only a very small number of\n * style/entity permutations, we can reuse these objects as often as\n * possible.\n */\n ;\n\n CharacterMetadata.create = function create(config) {\n if (!config) {\n return EMPTY;\n }\n\n var defaultConfig = {\n style: EMPTY_SET,\n entity: null\n }; // Fill in unspecified properties, if necessary.\n\n var configMap = Map(defaultConfig).merge(config);\n var existing = pool.get(configMap);\n\n if (existing) {\n return existing;\n }\n\n var newCharacter = new CharacterMetadata(configMap);\n pool = pool.set(configMap, newCharacter);\n return newCharacter;\n };\n\n CharacterMetadata.fromJS = function fromJS(_ref) {\n var style = _ref.style,\n entity = _ref.entity;\n return new CharacterMetadata({\n style: Array.isArray(style) ? OrderedSet(style) : style,\n entity: Array.isArray(entity) ? OrderedSet(entity) : entity\n });\n };\n\n return CharacterMetadata;\n}(CharacterMetadataRecord);\n\nvar EMPTY = new CharacterMetadata();\nvar pool = Map([[Map(defaultRecord), EMPTY]]);\nCharacterMetadata.EMPTY = EMPTY;\nmodule.exports = CharacterMetadata;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/CharacterMetadata.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/CompositeDraftDecorator.js": +/*!**************************************************************!*\ + !*** ./node_modules/draft-js/lib/CompositeDraftDecorator.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar Immutable = __webpack_require__(/*! immutable */ \"./node_modules/immutable/dist/immutable.js\");\n\nvar List = Immutable.List;\nvar DELIMITER = '.';\n/**\n * A CompositeDraftDecorator traverses through a list of DraftDecorator\n * instances to identify sections of a ContentBlock that should be rendered\n * in a \"decorated\" manner. For example, hashtags, mentions, and links may\n * be intended to stand out visually, be rendered as anchors, etc.\n *\n * The list of decorators supplied to the constructor will be used in the\n * order they are provided. This allows the caller to specify a priority for\n * string matching, in case of match collisions among decorators.\n *\n * For instance, I may have a link with a `#` in its text. Though this section\n * of text may match our hashtag decorator, it should not be treated as a\n * hashtag. I should therefore list my link DraftDecorator\n * before my hashtag DraftDecorator when constructing this composite\n * decorator instance.\n *\n * Thus, when a collision like this is encountered, the earlier match is\n * preserved and the new match is discarded.\n */\n\nvar CompositeDraftDecorator =\n/*#__PURE__*/\nfunction () {\n function CompositeDraftDecorator(decorators) {\n _defineProperty(this, \"_decorators\", void 0);\n\n // Copy the decorator array, since we use this array order to determine\n // precedence of decoration matching. If the array is mutated externally,\n // we don't want to be affected here.\n this._decorators = decorators.slice();\n }\n\n var _proto = CompositeDraftDecorator.prototype;\n\n _proto.getDecorations = function getDecorations(block, contentState) {\n var decorations = Array(block.getText().length).fill(null);\n\n this._decorators.forEach(function (\n /*object*/\n decorator,\n /*number*/\n ii) {\n var counter = 0;\n var strategy = decorator.strategy;\n\n var callback = function callback(\n /*number*/\n start,\n /*number*/\n end) {\n // Find out if any of our matching range is already occupied\n // by another decorator. If so, discard the match. Otherwise, store\n // the component key for rendering.\n if (canOccupySlice(decorations, start, end)) {\n occupySlice(decorations, start, end, ii + DELIMITER + counter);\n counter++;\n }\n };\n\n strategy(block, callback, contentState);\n });\n\n return List(decorations);\n };\n\n _proto.getComponentForKey = function getComponentForKey(key) {\n var componentKey = parseInt(key.split(DELIMITER)[0], 10);\n return this._decorators[componentKey].component;\n };\n\n _proto.getPropsForKey = function getPropsForKey(key) {\n var componentKey = parseInt(key.split(DELIMITER)[0], 10);\n return this._decorators[componentKey].props;\n };\n\n return CompositeDraftDecorator;\n}();\n/**\n * Determine whether we can occupy the specified slice of the decorations\n * array.\n */\n\n\nfunction canOccupySlice(decorations, start, end) {\n for (var ii = start; ii < end; ii++) {\n if (decorations[ii] != null) {\n return false;\n }\n }\n\n return true;\n}\n/**\n * Splice the specified component into our decoration array at the desired\n * range.\n */\n\n\nfunction occupySlice(targetArr, start, end, componentKey) {\n for (var ii = start; ii < end; ii++) {\n targetArr[ii] = componentKey;\n }\n}\n\nmodule.exports = CompositeDraftDecorator;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/CompositeDraftDecorator.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/ContentBlock.js": +/*!***************************************************!*\ + !*** ./node_modules/draft-js/lib/ContentBlock.js ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar CharacterMetadata = __webpack_require__(/*! ./CharacterMetadata */ \"./node_modules/draft-js/lib/CharacterMetadata.js\");\n\nvar findRangesImmutable = __webpack_require__(/*! ./findRangesImmutable */ \"./node_modules/draft-js/lib/findRangesImmutable.js\");\n\nvar Immutable = __webpack_require__(/*! immutable */ \"./node_modules/immutable/dist/immutable.js\");\n\nvar List = Immutable.List,\n Map = Immutable.Map,\n OrderedSet = Immutable.OrderedSet,\n Record = Immutable.Record,\n Repeat = Immutable.Repeat;\nvar EMPTY_SET = OrderedSet();\nvar defaultRecord = {\n key: '',\n type: 'unstyled',\n text: '',\n characterList: List(),\n depth: 0,\n data: Map()\n};\nvar ContentBlockRecord = Record(defaultRecord);\n\nvar decorateCharacterList = function decorateCharacterList(config) {\n if (!config) {\n return config;\n }\n\n var characterList = config.characterList,\n text = config.text;\n\n if (text && !characterList) {\n config.characterList = List(Repeat(CharacterMetadata.EMPTY, text.length));\n }\n\n return config;\n};\n\nvar ContentBlock =\n/*#__PURE__*/\nfunction (_ContentBlockRecord) {\n _inheritsLoose(ContentBlock, _ContentBlockRecord);\n\n function ContentBlock(config) {\n return _ContentBlockRecord.call(this, decorateCharacterList(config)) || this;\n }\n\n var _proto = ContentBlock.prototype;\n\n _proto.getKey = function getKey() {\n return this.get('key');\n };\n\n _proto.getType = function getType() {\n return this.get('type');\n };\n\n _proto.getText = function getText() {\n return this.get('text');\n };\n\n _proto.getCharacterList = function getCharacterList() {\n return this.get('characterList');\n };\n\n _proto.getLength = function getLength() {\n return this.getText().length;\n };\n\n _proto.getDepth = function getDepth() {\n return this.get('depth');\n };\n\n _proto.getData = function getData() {\n return this.get('data');\n };\n\n _proto.getInlineStyleAt = function getInlineStyleAt(offset) {\n var character = this.getCharacterList().get(offset);\n return character ? character.getStyle() : EMPTY_SET;\n };\n\n _proto.getEntityAt = function getEntityAt(offset) {\n var character = this.getCharacterList().get(offset);\n return character ? character.getEntity() : null;\n }\n /**\n * Execute a callback for every contiguous range of styles within the block.\n */\n ;\n\n _proto.findStyleRanges = function findStyleRanges(filterFn, callback) {\n findRangesImmutable(this.getCharacterList(), haveEqualStyle, filterFn, callback);\n }\n /**\n * Execute a callback for every contiguous range of entities within the block.\n */\n ;\n\n _proto.findEntityRanges = function findEntityRanges(filterFn, callback) {\n findRangesImmutable(this.getCharacterList(), haveEqualEntity, filterFn, callback);\n };\n\n return ContentBlock;\n}(ContentBlockRecord);\n\nfunction haveEqualStyle(charA, charB) {\n return charA.getStyle() === charB.getStyle();\n}\n\nfunction haveEqualEntity(charA, charB) {\n return charA.getEntity() === charB.getEntity();\n}\n\nmodule.exports = ContentBlock;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/ContentBlock.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/ContentBlockNode.js": +/*!*******************************************************!*\ + !*** ./node_modules/draft-js/lib/ContentBlockNode.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n *\n * This file is a fork of ContentBlock adding support for nesting references by\n * providing links to children, parent, prevSibling, and nextSibling.\n *\n * This is unstable and not part of the public API and should not be used by\n * production systems. This file may be update/removed without notice.\n */\n\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar CharacterMetadata = __webpack_require__(/*! ./CharacterMetadata */ \"./node_modules/draft-js/lib/CharacterMetadata.js\");\n\nvar findRangesImmutable = __webpack_require__(/*! ./findRangesImmutable */ \"./node_modules/draft-js/lib/findRangesImmutable.js\");\n\nvar Immutable = __webpack_require__(/*! immutable */ \"./node_modules/immutable/dist/immutable.js\");\n\nvar List = Immutable.List,\n Map = Immutable.Map,\n OrderedSet = Immutable.OrderedSet,\n Record = Immutable.Record,\n Repeat = Immutable.Repeat;\nvar EMPTY_SET = OrderedSet();\nvar defaultRecord = {\n parent: null,\n characterList: List(),\n data: Map(),\n depth: 0,\n key: '',\n text: '',\n type: 'unstyled',\n children: List(),\n prevSibling: null,\n nextSibling: null\n};\n\nvar haveEqualStyle = function haveEqualStyle(charA, charB) {\n return charA.getStyle() === charB.getStyle();\n};\n\nvar haveEqualEntity = function haveEqualEntity(charA, charB) {\n return charA.getEntity() === charB.getEntity();\n};\n\nvar decorateCharacterList = function decorateCharacterList(config) {\n if (!config) {\n return config;\n }\n\n var characterList = config.characterList,\n text = config.text;\n\n if (text && !characterList) {\n config.characterList = List(Repeat(CharacterMetadata.EMPTY, text.length));\n }\n\n return config;\n};\n\nvar ContentBlockNode =\n/*#__PURE__*/\nfunction (_ref) {\n _inheritsLoose(ContentBlockNode, _ref);\n\n function ContentBlockNode() {\n var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultRecord;\n\n /* eslint-disable-next-line constructor-super */\n return _ref.call(this, decorateCharacterList(props)) || this;\n }\n\n var _proto = ContentBlockNode.prototype;\n\n _proto.getKey = function getKey() {\n return this.get('key');\n };\n\n _proto.getType = function getType() {\n return this.get('type');\n };\n\n _proto.getText = function getText() {\n return this.get('text');\n };\n\n _proto.getCharacterList = function getCharacterList() {\n return this.get('characterList');\n };\n\n _proto.getLength = function getLength() {\n return this.getText().length;\n };\n\n _proto.getDepth = function getDepth() {\n return this.get('depth');\n };\n\n _proto.getData = function getData() {\n return this.get('data');\n };\n\n _proto.getInlineStyleAt = function getInlineStyleAt(offset) {\n var character = this.getCharacterList().get(offset);\n return character ? character.getStyle() : EMPTY_SET;\n };\n\n _proto.getEntityAt = function getEntityAt(offset) {\n var character = this.getCharacterList().get(offset);\n return character ? character.getEntity() : null;\n };\n\n _proto.getChildKeys = function getChildKeys() {\n return this.get('children');\n };\n\n _proto.getParentKey = function getParentKey() {\n return this.get('parent');\n };\n\n _proto.getPrevSiblingKey = function getPrevSiblingKey() {\n return this.get('prevSibling');\n };\n\n _proto.getNextSiblingKey = function getNextSiblingKey() {\n return this.get('nextSibling');\n };\n\n _proto.findStyleRanges = function findStyleRanges(filterFn, callback) {\n findRangesImmutable(this.getCharacterList(), haveEqualStyle, filterFn, callback);\n };\n\n _proto.findEntityRanges = function findEntityRanges(filterFn, callback) {\n findRangesImmutable(this.getCharacterList(), haveEqualEntity, filterFn, callback);\n };\n\n return ContentBlockNode;\n}(Record(defaultRecord));\n\nmodule.exports = ContentBlockNode;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/ContentBlockNode.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/ContentState.js": +/*!***************************************************!*\ + !*** ./node_modules/draft-js/lib/ContentState.js ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar BlockMapBuilder = __webpack_require__(/*! ./BlockMapBuilder */ \"./node_modules/draft-js/lib/BlockMapBuilder.js\");\n\nvar CharacterMetadata = __webpack_require__(/*! ./CharacterMetadata */ \"./node_modules/draft-js/lib/CharacterMetadata.js\");\n\nvar ContentBlock = __webpack_require__(/*! ./ContentBlock */ \"./node_modules/draft-js/lib/ContentBlock.js\");\n\nvar ContentBlockNode = __webpack_require__(/*! ./ContentBlockNode */ \"./node_modules/draft-js/lib/ContentBlockNode.js\");\n\nvar DraftEntity = __webpack_require__(/*! ./DraftEntity */ \"./node_modules/draft-js/lib/DraftEntity.js\");\n\nvar SelectionState = __webpack_require__(/*! ./SelectionState */ \"./node_modules/draft-js/lib/SelectionState.js\");\n\nvar generateRandomKey = __webpack_require__(/*! ./generateRandomKey */ \"./node_modules/draft-js/lib/generateRandomKey.js\");\n\nvar getOwnObjectValues = __webpack_require__(/*! ./getOwnObjectValues */ \"./node_modules/draft-js/lib/getOwnObjectValues.js\");\n\nvar gkx = __webpack_require__(/*! ./gkx */ \"./node_modules/draft-js/lib/gkx.js\");\n\nvar Immutable = __webpack_require__(/*! immutable */ \"./node_modules/immutable/dist/immutable.js\");\n\nvar sanitizeDraftText = __webpack_require__(/*! ./sanitizeDraftText */ \"./node_modules/draft-js/lib/sanitizeDraftText.js\");\n\nvar List = Immutable.List,\n Record = Immutable.Record,\n Repeat = Immutable.Repeat,\n ImmutableMap = Immutable.Map,\n OrderedMap = Immutable.OrderedMap;\nvar defaultRecord = {\n entityMap: null,\n blockMap: null,\n selectionBefore: null,\n selectionAfter: null\n};\nvar ContentStateRecord = Record(defaultRecord);\n/* $FlowFixMe Supressing a `signature-verification-failure` error here.\n * TODO: T65949050 Clean up the branch for this GK\n */\n\nvar ContentBlockNodeRecord = gkx('draft_tree_data_support') ? ContentBlockNode : ContentBlock;\n\nvar ContentState =\n/*#__PURE__*/\nfunction (_ContentStateRecord) {\n _inheritsLoose(ContentState, _ContentStateRecord);\n\n function ContentState() {\n return _ContentStateRecord.apply(this, arguments) || this;\n }\n\n var _proto = ContentState.prototype;\n\n _proto.getEntityMap = function getEntityMap() {\n // TODO: update this when we fully remove DraftEntity\n return DraftEntity;\n };\n\n _proto.getBlockMap = function getBlockMap() {\n return this.get('blockMap');\n };\n\n _proto.getSelectionBefore = function getSelectionBefore() {\n return this.get('selectionBefore');\n };\n\n _proto.getSelectionAfter = function getSelectionAfter() {\n return this.get('selectionAfter');\n };\n\n _proto.getBlockForKey = function getBlockForKey(key) {\n var block = this.getBlockMap().get(key);\n return block;\n };\n\n _proto.getKeyBefore = function getKeyBefore(key) {\n return this.getBlockMap().reverse().keySeq().skipUntil(function (v) {\n return v === key;\n }).skip(1).first();\n };\n\n _proto.getKeyAfter = function getKeyAfter(key) {\n return this.getBlockMap().keySeq().skipUntil(function (v) {\n return v === key;\n }).skip(1).first();\n };\n\n _proto.getBlockAfter = function getBlockAfter(key) {\n return this.getBlockMap().skipUntil(function (_, k) {\n return k === key;\n }).skip(1).first();\n };\n\n _proto.getBlockBefore = function getBlockBefore(key) {\n return this.getBlockMap().reverse().skipUntil(function (_, k) {\n return k === key;\n }).skip(1).first();\n };\n\n _proto.getBlocksAsArray = function getBlocksAsArray() {\n return this.getBlockMap().toArray();\n };\n\n _proto.getFirstBlock = function getFirstBlock() {\n return this.getBlockMap().first();\n };\n\n _proto.getLastBlock = function getLastBlock() {\n return this.getBlockMap().last();\n };\n\n _proto.getPlainText = function getPlainText(delimiter) {\n return this.getBlockMap().map(function (block) {\n return block ? block.getText() : '';\n }).join(delimiter || '\\n');\n };\n\n _proto.getLastCreatedEntityKey = function getLastCreatedEntityKey() {\n // TODO: update this when we fully remove DraftEntity\n return DraftEntity.__getLastCreatedEntityKey();\n };\n\n _proto.hasText = function hasText() {\n var blockMap = this.getBlockMap();\n return blockMap.size > 1 || // make sure that there are no zero width space chars\n escape(blockMap.first().getText()).replace(/%u200B/g, '').length > 0;\n };\n\n _proto.createEntity = function createEntity(type, mutability, data) {\n // TODO: update this when we fully remove DraftEntity\n DraftEntity.__create(type, mutability, data);\n\n return this;\n };\n\n _proto.mergeEntityData = function mergeEntityData(key, toMerge) {\n // TODO: update this when we fully remove DraftEntity\n DraftEntity.__mergeData(key, toMerge);\n\n return this;\n };\n\n _proto.replaceEntityData = function replaceEntityData(key, newData) {\n // TODO: update this when we fully remove DraftEntity\n DraftEntity.__replaceData(key, newData);\n\n return this;\n };\n\n _proto.addEntity = function addEntity(instance) {\n // TODO: update this when we fully remove DraftEntity\n DraftEntity.__add(instance);\n\n return this;\n };\n\n _proto.getEntity = function getEntity(key) {\n // TODO: update this when we fully remove DraftEntity\n return DraftEntity.__get(key);\n };\n\n _proto.getAllEntities = function getAllEntities() {\n return DraftEntity.__getAll();\n };\n\n _proto.loadWithEntities = function loadWithEntities(entities) {\n return DraftEntity.__loadWithEntities(entities);\n };\n\n ContentState.createFromBlockArray = function createFromBlockArray( // TODO: update flow type when we completely deprecate the old entity API\n blocks, entityMap) {\n // TODO: remove this when we completely deprecate the old entity API\n var theBlocks = Array.isArray(blocks) ? blocks : blocks.contentBlocks;\n var blockMap = BlockMapBuilder.createFromArray(theBlocks);\n var selectionState = blockMap.isEmpty() ? new SelectionState() : SelectionState.createEmpty(blockMap.first().getKey());\n return new ContentState({\n blockMap: blockMap,\n entityMap: entityMap || DraftEntity,\n selectionBefore: selectionState,\n selectionAfter: selectionState\n });\n };\n\n ContentState.createFromText = function createFromText(text) {\n var delimiter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : /\\r\\n?|\\n/g;\n var strings = text.split(delimiter);\n var blocks = strings.map(function (block) {\n block = sanitizeDraftText(block);\n return new ContentBlockNodeRecord({\n key: generateRandomKey(),\n text: block,\n type: 'unstyled',\n characterList: List(Repeat(CharacterMetadata.EMPTY, block.length))\n });\n });\n return ContentState.createFromBlockArray(blocks);\n };\n\n ContentState.fromJS = function fromJS(state) {\n return new ContentState(_objectSpread({}, state, {\n blockMap: OrderedMap(state.blockMap).map(ContentState.createContentBlockFromJS),\n selectionBefore: new SelectionState(state.selectionBefore),\n selectionAfter: new SelectionState(state.selectionAfter)\n }));\n };\n\n ContentState.createContentBlockFromJS = function createContentBlockFromJS(block) {\n var characterList = block.characterList;\n return new ContentBlockNodeRecord(_objectSpread({}, block, {\n data: ImmutableMap(block.data),\n characterList: characterList != null ? List((Array.isArray(characterList) ? characterList : getOwnObjectValues(characterList)).map(function (c) {\n return CharacterMetadata.fromJS(c);\n })) : undefined\n }));\n };\n\n return ContentState;\n}(ContentStateRecord);\n\nmodule.exports = ContentState;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/ContentState.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/ContentStateInlineStyle.js": +/*!**************************************************************!*\ + !*** ./node_modules/draft-js/lib/ContentStateInlineStyle.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar CharacterMetadata = __webpack_require__(/*! ./CharacterMetadata */ \"./node_modules/draft-js/lib/CharacterMetadata.js\");\n\nvar _require = __webpack_require__(/*! immutable */ \"./node_modules/immutable/dist/immutable.js\"),\n Map = _require.Map;\n\nvar ContentStateInlineStyle = {\n add: function add(contentState, selectionState, inlineStyle) {\n return modifyInlineStyle(contentState, selectionState, inlineStyle, true);\n },\n remove: function remove(contentState, selectionState, inlineStyle) {\n return modifyInlineStyle(contentState, selectionState, inlineStyle, false);\n }\n};\n\nfunction modifyInlineStyle(contentState, selectionState, inlineStyle, addOrRemove) {\n var blockMap = contentState.getBlockMap();\n var startKey = selectionState.getStartKey();\n var startOffset = selectionState.getStartOffset();\n var endKey = selectionState.getEndKey();\n var endOffset = selectionState.getEndOffset();\n var newBlocks = blockMap.skipUntil(function (_, k) {\n return k === startKey;\n }).takeUntil(function (_, k) {\n return k === endKey;\n }).concat(Map([[endKey, blockMap.get(endKey)]])).map(function (block, blockKey) {\n var sliceStart;\n var sliceEnd;\n\n if (startKey === endKey) {\n sliceStart = startOffset;\n sliceEnd = endOffset;\n } else {\n sliceStart = blockKey === startKey ? startOffset : 0;\n sliceEnd = blockKey === endKey ? endOffset : block.getLength();\n }\n\n var chars = block.getCharacterList();\n var current;\n\n while (sliceStart < sliceEnd) {\n current = chars.get(sliceStart);\n chars = chars.set(sliceStart, addOrRemove ? CharacterMetadata.applyStyle(current, inlineStyle) : CharacterMetadata.removeStyle(current, inlineStyle));\n sliceStart++;\n }\n\n return block.set('characterList', chars);\n });\n return contentState.merge({\n blockMap: blockMap.merge(newBlocks),\n selectionBefore: selectionState,\n selectionAfter: selectionState\n });\n}\n\nmodule.exports = ContentStateInlineStyle;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/ContentStateInlineStyle.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/DOMObserver.js": +/*!**************************************************!*\ + !*** ./node_modules/draft-js/lib/DOMObserver.js ***! + \**************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar UserAgent = __webpack_require__(/*! fbjs/lib/UserAgent */ \"./node_modules/draft-js/node_modules/fbjs/lib/UserAgent.js\");\n\nvar findAncestorOffsetKey = __webpack_require__(/*! ./findAncestorOffsetKey */ \"./node_modules/draft-js/lib/findAncestorOffsetKey.js\");\n\nvar getWindowForNode = __webpack_require__(/*! ./getWindowForNode */ \"./node_modules/draft-js/lib/getWindowForNode.js\");\n\nvar Immutable = __webpack_require__(/*! immutable */ \"./node_modules/immutable/dist/immutable.js\");\n\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ \"./node_modules/draft-js/node_modules/fbjs/lib/invariant.js\");\n\nvar nullthrows = __webpack_require__(/*! fbjs/lib/nullthrows */ \"./node_modules/draft-js/node_modules/fbjs/lib/nullthrows.js\");\n\nvar Map = Immutable.Map;\n// Heavily based on Prosemirror's DOMObserver https://github.com/ProseMirror/prosemirror-view/blob/master/src/domobserver.js\nvar DOM_OBSERVER_OPTIONS = {\n subtree: true,\n characterData: true,\n childList: true,\n characterDataOldValue: false,\n attributes: false\n}; // IE11 has very broken mutation observers, so we also listen to DOMCharacterDataModified\n\nvar USE_CHAR_DATA = UserAgent.isBrowser('IE <= 11');\n\nvar DOMObserver =\n/*#__PURE__*/\nfunction () {\n function DOMObserver(container) {\n var _this = this;\n\n _defineProperty(this, \"observer\", void 0);\n\n _defineProperty(this, \"container\", void 0);\n\n _defineProperty(this, \"mutations\", void 0);\n\n _defineProperty(this, \"onCharData\", void 0);\n\n this.container = container;\n this.mutations = Map();\n var containerWindow = getWindowForNode(container);\n\n if (containerWindow.MutationObserver && !USE_CHAR_DATA) {\n this.observer = new containerWindow.MutationObserver(function (mutations) {\n return _this.registerMutations(mutations);\n });\n } else {\n this.onCharData = function (e) {\n !(e.target instanceof Node) ? true ? invariant(false, 'Expected target to be an instance of Node') : undefined : void 0;\n\n _this.registerMutation({\n type: 'characterData',\n target: e.target\n });\n };\n }\n }\n\n var _proto = DOMObserver.prototype;\n\n _proto.start = function start() {\n if (this.observer) {\n this.observer.observe(this.container, DOM_OBSERVER_OPTIONS);\n } else {\n /* $FlowFixMe(>=0.68.0 site=www,mobile) This event type is not defined\n * by Flow's standard library */\n this.container.addEventListener('DOMCharacterDataModified', this.onCharData);\n }\n };\n\n _proto.stopAndFlushMutations = function stopAndFlushMutations() {\n var observer = this.observer;\n\n if (observer) {\n this.registerMutations(observer.takeRecords());\n observer.disconnect();\n } else {\n /* $FlowFixMe(>=0.68.0 site=www,mobile) This event type is not defined\n * by Flow's standard library */\n this.container.removeEventListener('DOMCharacterDataModified', this.onCharData);\n }\n\n var mutations = this.mutations;\n this.mutations = Map();\n return mutations;\n };\n\n _proto.registerMutations = function registerMutations(mutations) {\n for (var i = 0; i < mutations.length; i++) {\n this.registerMutation(mutations[i]);\n }\n };\n\n _proto.getMutationTextContent = function getMutationTextContent(mutation) {\n var type = mutation.type,\n target = mutation.target,\n removedNodes = mutation.removedNodes;\n\n if (type === 'characterData') {\n // When `textContent` is '', there is a race condition that makes\n // getting the offsetKey from the target not possible.\n // These events are also followed by a `childList`, which is the one\n // we are able to retrieve the offsetKey and apply the '' text.\n if (target.textContent !== '') {\n // IE 11 considers the enter keypress that concludes the composition\n // as an input char. This strips that newline character so the draft\n // state does not receive spurious newlines.\n if (USE_CHAR_DATA) {\n return target.textContent.replace('\\n', '');\n }\n\n return target.textContent;\n }\n } else if (type === 'childList') {\n if (removedNodes && removedNodes.length) {\n // `characterData` events won't happen or are ignored when\n // removing the last character of a leaf node, what happens\n // instead is a `childList` event with a `removedNodes` array.\n // For this case the textContent should be '' and\n // `DraftModifier.replaceText` will make sure the content is\n // updated properly.\n return '';\n } else if (target.textContent !== '') {\n // Typing Chinese in an empty block in MS Edge results in a\n // `childList` event with non-empty textContent.\n // See https://github.com/facebook/draft-js/issues/2082\n return target.textContent;\n }\n }\n\n return null;\n };\n\n _proto.registerMutation = function registerMutation(mutation) {\n var textContent = this.getMutationTextContent(mutation);\n\n if (textContent != null) {\n var offsetKey = nullthrows(findAncestorOffsetKey(mutation.target));\n this.mutations = this.mutations.set(offsetKey, textContent);\n }\n };\n\n return DOMObserver;\n}();\n\nmodule.exports = DOMObserver;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/DOMObserver.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/DefaultDraftBlockRenderMap.js": +/*!*****************************************************************!*\ + !*** ./node_modules/draft-js/lib/DefaultDraftBlockRenderMap.js ***! + \*****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar React = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar cx = __webpack_require__(/*! fbjs/lib/cx */ \"./node_modules/draft-js/node_modules/fbjs/lib/cx.js\");\n\nvar _require = __webpack_require__(/*! immutable */ \"./node_modules/immutable/dist/immutable.js\"),\n Map = _require.Map;\n\nvar UL_WRAP = React.createElement(\"ul\", {\n className: cx('public/DraftStyleDefault/ul')\n});\nvar OL_WRAP = React.createElement(\"ol\", {\n className: cx('public/DraftStyleDefault/ol')\n});\nvar PRE_WRAP = React.createElement(\"pre\", {\n className: cx('public/DraftStyleDefault/pre')\n});\nvar DefaultDraftBlockRenderMap = Map({\n 'header-one': {\n element: 'h1'\n },\n 'header-two': {\n element: 'h2'\n },\n 'header-three': {\n element: 'h3'\n },\n 'header-four': {\n element: 'h4'\n },\n 'header-five': {\n element: 'h5'\n },\n 'header-six': {\n element: 'h6'\n },\n section: {\n element: 'section'\n },\n article: {\n element: 'article'\n },\n 'unordered-list-item': {\n element: 'li',\n wrapper: UL_WRAP\n },\n 'ordered-list-item': {\n element: 'li',\n wrapper: OL_WRAP\n },\n blockquote: {\n element: 'blockquote'\n },\n atomic: {\n element: 'figure'\n },\n 'code-block': {\n element: 'pre',\n wrapper: PRE_WRAP\n },\n unstyled: {\n element: 'div',\n aliasedElements: ['p']\n }\n});\nmodule.exports = DefaultDraftBlockRenderMap;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/DefaultDraftBlockRenderMap.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/DefaultDraftInlineStyle.js": +/*!**************************************************************!*\ + !*** ./node_modules/draft-js/lib/DefaultDraftInlineStyle.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nmodule.exports = {\n BOLD: {\n fontWeight: 'bold'\n },\n CODE: {\n fontFamily: 'monospace',\n wordWrap: 'break-word'\n },\n ITALIC: {\n fontStyle: 'italic'\n },\n STRIKETHROUGH: {\n textDecoration: 'line-through'\n },\n UNDERLINE: {\n textDecoration: 'underline'\n }\n};\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/DefaultDraftInlineStyle.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/Draft.js": +/*!********************************************!*\ + !*** ./node_modules/draft-js/lib/Draft.js ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n */\n\n\nvar AtomicBlockUtils = __webpack_require__(/*! ./AtomicBlockUtils */ \"./node_modules/draft-js/lib/AtomicBlockUtils.js\");\n\nvar BlockMapBuilder = __webpack_require__(/*! ./BlockMapBuilder */ \"./node_modules/draft-js/lib/BlockMapBuilder.js\");\n\nvar CharacterMetadata = __webpack_require__(/*! ./CharacterMetadata */ \"./node_modules/draft-js/lib/CharacterMetadata.js\");\n\nvar CompositeDraftDecorator = __webpack_require__(/*! ./CompositeDraftDecorator */ \"./node_modules/draft-js/lib/CompositeDraftDecorator.js\");\n\nvar ContentBlock = __webpack_require__(/*! ./ContentBlock */ \"./node_modules/draft-js/lib/ContentBlock.js\");\n\nvar ContentState = __webpack_require__(/*! ./ContentState */ \"./node_modules/draft-js/lib/ContentState.js\");\n\nvar DefaultDraftBlockRenderMap = __webpack_require__(/*! ./DefaultDraftBlockRenderMap */ \"./node_modules/draft-js/lib/DefaultDraftBlockRenderMap.js\");\n\nvar DefaultDraftInlineStyle = __webpack_require__(/*! ./DefaultDraftInlineStyle */ \"./node_modules/draft-js/lib/DefaultDraftInlineStyle.js\");\n\nvar DraftEditor = __webpack_require__(/*! ./DraftEditor.react */ \"./node_modules/draft-js/lib/DraftEditor.react.js\");\n\nvar DraftEditorBlock = __webpack_require__(/*! ./DraftEditorBlock.react */ \"./node_modules/draft-js/lib/DraftEditorBlock.react.js\");\n\nvar DraftEntity = __webpack_require__(/*! ./DraftEntity */ \"./node_modules/draft-js/lib/DraftEntity.js\");\n\nvar DraftModifier = __webpack_require__(/*! ./DraftModifier */ \"./node_modules/draft-js/lib/DraftModifier.js\");\n\nvar DraftEntityInstance = __webpack_require__(/*! ./DraftEntityInstance */ \"./node_modules/draft-js/lib/DraftEntityInstance.js\");\n\nvar EditorState = __webpack_require__(/*! ./EditorState */ \"./node_modules/draft-js/lib/EditorState.js\");\n\nvar KeyBindingUtil = __webpack_require__(/*! ./KeyBindingUtil */ \"./node_modules/draft-js/lib/KeyBindingUtil.js\");\n\nvar RawDraftContentState = __webpack_require__(/*! ./RawDraftContentState */ \"./node_modules/draft-js/lib/RawDraftContentState.js\");\n\nvar RichTextEditorUtil = __webpack_require__(/*! ./RichTextEditorUtil */ \"./node_modules/draft-js/lib/RichTextEditorUtil.js\");\n\nvar SelectionState = __webpack_require__(/*! ./SelectionState */ \"./node_modules/draft-js/lib/SelectionState.js\");\n\nvar convertFromDraftStateToRaw = __webpack_require__(/*! ./convertFromDraftStateToRaw */ \"./node_modules/draft-js/lib/convertFromDraftStateToRaw.js\");\n\nvar convertFromRawToDraftState = __webpack_require__(/*! ./convertFromRawToDraftState */ \"./node_modules/draft-js/lib/convertFromRawToDraftState.js\");\n\nvar generateRandomKey = __webpack_require__(/*! ./generateRandomKey */ \"./node_modules/draft-js/lib/generateRandomKey.js\");\n\nvar getDefaultKeyBinding = __webpack_require__(/*! ./getDefaultKeyBinding */ \"./node_modules/draft-js/lib/getDefaultKeyBinding.js\");\n\nvar getVisibleSelectionRect = __webpack_require__(/*! ./getVisibleSelectionRect */ \"./node_modules/draft-js/lib/getVisibleSelectionRect.js\");\n\nvar convertFromHTML = __webpack_require__(/*! ./convertFromHTMLToContentBlocks */ \"./node_modules/draft-js/lib/convertFromHTMLToContentBlocks.js\");\n\nvar DraftPublic = {\n Editor: DraftEditor,\n EditorBlock: DraftEditorBlock,\n EditorState: EditorState,\n CompositeDecorator: CompositeDraftDecorator,\n Entity: DraftEntity,\n EntityInstance: DraftEntityInstance,\n BlockMapBuilder: BlockMapBuilder,\n CharacterMetadata: CharacterMetadata,\n ContentBlock: ContentBlock,\n ContentState: ContentState,\n RawDraftContentState: RawDraftContentState,\n SelectionState: SelectionState,\n AtomicBlockUtils: AtomicBlockUtils,\n KeyBindingUtil: KeyBindingUtil,\n Modifier: DraftModifier,\n RichUtils: RichTextEditorUtil,\n DefaultDraftBlockRenderMap: DefaultDraftBlockRenderMap,\n DefaultDraftInlineStyle: DefaultDraftInlineStyle,\n convertFromHTML: convertFromHTML,\n convertFromRaw: convertFromRawToDraftState,\n convertToRaw: convertFromDraftStateToRaw,\n genKey: generateRandomKey,\n getDefaultKeyBinding: getDefaultKeyBinding,\n getVisibleSelectionRect: getVisibleSelectionRect\n};\nmodule.exports = DraftPublic;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/Draft.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/DraftEditor.react.js": +/*!********************************************************!*\ + !*** ./node_modules/draft-js/lib/DraftEditor.react.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/* WEBPACK VAR INJECTION */(function(global) {/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @preventMunge\n * @emails oncall+draft_js\n */\n\n\nvar _assign = __webpack_require__(/*! object-assign */ \"./node_modules/object-assign/index.js\");\n\nfunction _extends() { _extends = _assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar DefaultDraftBlockRenderMap = __webpack_require__(/*! ./DefaultDraftBlockRenderMap */ \"./node_modules/draft-js/lib/DefaultDraftBlockRenderMap.js\");\n\nvar DefaultDraftInlineStyle = __webpack_require__(/*! ./DefaultDraftInlineStyle */ \"./node_modules/draft-js/lib/DefaultDraftInlineStyle.js\");\n\nvar DraftEditorCompositionHandler = __webpack_require__(/*! ./DraftEditorCompositionHandler */ \"./node_modules/draft-js/lib/DraftEditorCompositionHandler.js\");\n\nvar DraftEditorContents = __webpack_require__(/*! ./DraftEditorContents.react */ \"./node_modules/draft-js/lib/DraftEditorContents.react.js\");\n\nvar DraftEditorDragHandler = __webpack_require__(/*! ./DraftEditorDragHandler */ \"./node_modules/draft-js/lib/DraftEditorDragHandler.js\");\n\nvar DraftEditorEditHandler = __webpack_require__(/*! ./DraftEditorEditHandler */ \"./node_modules/draft-js/lib/DraftEditorEditHandler.js\");\n\nvar flushControlled = __webpack_require__(/*! ./DraftEditorFlushControlled */ \"./node_modules/draft-js/lib/DraftEditorFlushControlled.js\");\n\nvar DraftEditorPlaceholder = __webpack_require__(/*! ./DraftEditorPlaceholder.react */ \"./node_modules/draft-js/lib/DraftEditorPlaceholder.react.js\");\n\nvar DraftEffects = __webpack_require__(/*! ./DraftEffects */ \"./node_modules/draft-js/lib/DraftEffects.js\");\n\nvar EditorState = __webpack_require__(/*! ./EditorState */ \"./node_modules/draft-js/lib/EditorState.js\");\n\nvar React = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar Scroll = __webpack_require__(/*! fbjs/lib/Scroll */ \"./node_modules/draft-js/node_modules/fbjs/lib/Scroll.js\");\n\nvar Style = __webpack_require__(/*! fbjs/lib/Style */ \"./node_modules/draft-js/node_modules/fbjs/lib/Style.js\");\n\nvar UserAgent = __webpack_require__(/*! fbjs/lib/UserAgent */ \"./node_modules/draft-js/node_modules/fbjs/lib/UserAgent.js\");\n\nvar cx = __webpack_require__(/*! fbjs/lib/cx */ \"./node_modules/draft-js/node_modules/fbjs/lib/cx.js\");\n\nvar generateRandomKey = __webpack_require__(/*! ./generateRandomKey */ \"./node_modules/draft-js/lib/generateRandomKey.js\");\n\nvar getDefaultKeyBinding = __webpack_require__(/*! ./getDefaultKeyBinding */ \"./node_modules/draft-js/lib/getDefaultKeyBinding.js\");\n\nvar getScrollPosition = __webpack_require__(/*! fbjs/lib/getScrollPosition */ \"./node_modules/draft-js/node_modules/fbjs/lib/getScrollPosition.js\");\n\nvar gkx = __webpack_require__(/*! ./gkx */ \"./node_modules/draft-js/lib/gkx.js\");\n\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ \"./node_modules/draft-js/node_modules/fbjs/lib/invariant.js\");\n\nvar isHTMLElement = __webpack_require__(/*! ./isHTMLElement */ \"./node_modules/draft-js/lib/isHTMLElement.js\");\n\nvar nullthrows = __webpack_require__(/*! fbjs/lib/nullthrows */ \"./node_modules/draft-js/node_modules/fbjs/lib/nullthrows.js\");\n\nvar isIE = UserAgent.isBrowser('IE'); // IE does not support the `input` event on contentEditable, so we can't\n// observe spellcheck behavior.\n\nvar allowSpellCheck = !isIE; // Define a set of handler objects to correspond to each possible `mode`\n// of editor behavior.\n\nvar handlerMap = {\n edit: DraftEditorEditHandler,\n composite: DraftEditorCompositionHandler,\n drag: DraftEditorDragHandler,\n cut: null,\n render: null\n};\nvar didInitODS = false;\n\nvar UpdateDraftEditorFlags =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(UpdateDraftEditorFlags, _React$Component);\n\n function UpdateDraftEditorFlags() {\n return _React$Component.apply(this, arguments) || this;\n }\n\n var _proto = UpdateDraftEditorFlags.prototype;\n\n _proto.render = function render() {\n return null;\n };\n\n _proto.componentDidMount = function componentDidMount() {\n this._update();\n };\n\n _proto.componentDidUpdate = function componentDidUpdate() {\n this._update();\n };\n\n _proto._update = function _update() {\n var editor = this.props.editor;\n /**\n * Sometimes a render triggers a 'focus' or other event, and that will\n * schedule a second render pass.\n * In order to make sure the second render pass gets the latest editor\n * state, we update it here.\n * Example:\n * render #1\n * +\n * |\n * | cWU -> Nothing ... latestEditorState = STALE_STATE :(\n * |\n * | render -> this.props.editorState = FRESH_STATE\n * | + *and* set latestEditorState = FRESH_STATE\n * |\n * | |\n * | +--> triggers 'focus' event, calling 'handleFocus' with latestEditorState\n * | +\n * | |\n * +>cdU -> latestEditorState = FRESH_STATE | the 'handleFocus' call schedules render #2\n * | with latestEditorState, which is FRESH_STATE\n * |\n * render #2 <--------------------------------------+\n * +\n * |\n * | cwU -> nothing updates\n * |\n * | render -> this.props.editorState = FRESH_STATE which was passed in above\n * |\n * +>cdU fires and resets latestEditorState = FRESH_STATE\n * ---\n * Note that if we don't set latestEditorState in 'render' in the above\n * diagram, then STALE_STATE gets passed to render #2.\n */\n\n editor._latestEditorState = this.props.editorState;\n /**\n * The reason we set this 'blockSelectEvents' flag is that IE will fire a\n * 'selectionChange' event when we programmatically change the selection,\n * meaning it would trigger a new select event while we are in the middle\n * of updating.\n * We found that the 'selection.addRange' was what triggered the stray\n * selectionchange event in IE.\n * To be clear - we have not been able to reproduce specific bugs related\n * to this stray selection event, but have recorded logs that some\n * conditions do cause it to get bumped into during editOnSelect.\n */\n\n editor._blockSelectEvents = true;\n };\n\n return UpdateDraftEditorFlags;\n}(React.Component);\n/**\n * `DraftEditor` is the root editor component. It composes a `contentEditable`\n * div, and provides a wide variety of useful function props for managing the\n * state of the editor. See `DraftEditorProps` for details.\n */\n\n\nvar DraftEditor =\n/*#__PURE__*/\nfunction (_React$Component2) {\n _inheritsLoose(DraftEditor, _React$Component2);\n\n /**\n * Define proxies that can route events to the current handler.\n */\n function DraftEditor(props) {\n var _this;\n\n _this = _React$Component2.call(this, props) || this;\n\n _defineProperty(_assertThisInitialized(_this), \"_blockSelectEvents\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_clipboard\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_handler\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_dragCount\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_internalDrag\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_editorKey\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_placeholderAccessibilityID\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_latestEditorState\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_latestCommittedEditorState\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_pendingStateFromBeforeInput\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_onBeforeInput\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_onBlur\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_onCharacterData\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_onCompositionEnd\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_onCompositionStart\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_onCopy\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_onCut\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_onDragEnd\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_onDragOver\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_onDragStart\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_onDrop\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_onInput\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_onFocus\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_onKeyDown\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_onKeyPress\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_onKeyUp\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_onMouseDown\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_onMouseUp\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_onPaste\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_onSelect\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"editor\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"editorContainer\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"focus\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"blur\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"setMode\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"exitCurrentMode\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"restoreEditorDOM\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"setClipboard\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"getClipboard\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"getEditorKey\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"update\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"onDragEnter\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"onDragLeave\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_handleEditorContainerRef\", function (node) {\n _this.editorContainer = node; // Instead of having a direct ref on the child, we'll grab it here.\n // This is safe as long as the rendered structure is static (which it is).\n // This lets the child support ref={props.editorRef} without merging refs.\n\n _this.editor = node !== null ? node.firstChild : null;\n });\n\n _defineProperty(_assertThisInitialized(_this), \"focus\", function (scrollPosition) {\n var editorState = _this.props.editorState;\n var alreadyHasFocus = editorState.getSelection().getHasFocus();\n var editorNode = _this.editor;\n\n if (!editorNode) {\n // once in a while people call 'focus' in a setTimeout, and the node has\n // been deleted, so it can be null in that case.\n return;\n }\n\n var scrollParent = Style.getScrollParent(editorNode);\n\n var _ref = scrollPosition || getScrollPosition(scrollParent),\n x = _ref.x,\n y = _ref.y;\n\n !isHTMLElement(editorNode) ? true ? invariant(false, 'editorNode is not an HTMLElement') : undefined : void 0;\n editorNode.focus(); // Restore scroll position\n\n if (scrollParent === window) {\n window.scrollTo(x, y);\n } else {\n Scroll.setTop(scrollParent, y);\n } // On Chrome and Safari, calling focus on contenteditable focuses the\n // cursor at the first character. This is something you don't expect when\n // you're clicking on an input element but not directly on a character.\n // Put the cursor back where it was before the blur.\n\n\n if (!alreadyHasFocus) {\n _this.update(EditorState.forceSelection(editorState, editorState.getSelection()));\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"blur\", function () {\n var editorNode = _this.editor;\n\n if (!editorNode) {\n return;\n }\n\n !isHTMLElement(editorNode) ? true ? invariant(false, 'editorNode is not an HTMLElement') : undefined : void 0;\n editorNode.blur();\n });\n\n _defineProperty(_assertThisInitialized(_this), \"setMode\", function (mode) {\n var _this$props = _this.props,\n onPaste = _this$props.onPaste,\n onCut = _this$props.onCut,\n onCopy = _this$props.onCopy;\n\n var editHandler = _objectSpread({}, handlerMap.edit);\n\n if (onPaste) {\n /* $FlowFixMe(>=0.117.0 site=www,mobile) This comment suppresses an error found\n * when Flow v0.117 was deployed. To see the error delete this comment\n * and run Flow. */\n editHandler.onPaste = onPaste;\n }\n\n if (onCut) {\n editHandler.onCut = onCut;\n }\n\n if (onCopy) {\n editHandler.onCopy = onCopy;\n }\n\n var handler = _objectSpread({}, handlerMap, {\n edit: editHandler\n });\n\n _this._handler = handler[mode];\n });\n\n _defineProperty(_assertThisInitialized(_this), \"exitCurrentMode\", function () {\n _this.setMode('edit');\n });\n\n _defineProperty(_assertThisInitialized(_this), \"restoreEditorDOM\", function (scrollPosition) {\n _this.setState({\n contentsKey: _this.state.contentsKey + 1\n }, function () {\n _this.focus(scrollPosition);\n });\n });\n\n _defineProperty(_assertThisInitialized(_this), \"setClipboard\", function (clipboard) {\n _this._clipboard = clipboard;\n });\n\n _defineProperty(_assertThisInitialized(_this), \"getClipboard\", function () {\n return _this._clipboard;\n });\n\n _defineProperty(_assertThisInitialized(_this), \"update\", function (editorState) {\n _this._latestEditorState = editorState;\n\n _this.props.onChange(editorState);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onDragEnter\", function () {\n _this._dragCount++;\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onDragLeave\", function () {\n _this._dragCount--;\n\n if (_this._dragCount === 0) {\n _this.exitCurrentMode();\n }\n });\n\n _this._blockSelectEvents = false;\n _this._clipboard = null;\n _this._handler = null;\n _this._dragCount = 0;\n _this._editorKey = props.editorKey || generateRandomKey();\n _this._placeholderAccessibilityID = 'placeholder-' + _this._editorKey;\n _this._latestEditorState = props.editorState;\n _this._latestCommittedEditorState = props.editorState;\n _this._onBeforeInput = _this._buildHandler('onBeforeInput');\n _this._onBlur = _this._buildHandler('onBlur');\n _this._onCharacterData = _this._buildHandler('onCharacterData');\n _this._onCompositionEnd = _this._buildHandler('onCompositionEnd');\n _this._onCompositionStart = _this._buildHandler('onCompositionStart');\n _this._onCopy = _this._buildHandler('onCopy');\n _this._onCut = _this._buildHandler('onCut');\n _this._onDragEnd = _this._buildHandler('onDragEnd');\n _this._onDragOver = _this._buildHandler('onDragOver');\n _this._onDragStart = _this._buildHandler('onDragStart');\n _this._onDrop = _this._buildHandler('onDrop');\n _this._onInput = _this._buildHandler('onInput');\n _this._onFocus = _this._buildHandler('onFocus');\n _this._onKeyDown = _this._buildHandler('onKeyDown');\n _this._onKeyPress = _this._buildHandler('onKeyPress');\n _this._onKeyUp = _this._buildHandler('onKeyUp');\n _this._onMouseDown = _this._buildHandler('onMouseDown');\n _this._onMouseUp = _this._buildHandler('onMouseUp');\n _this._onPaste = _this._buildHandler('onPaste');\n _this._onSelect = _this._buildHandler('onSelect');\n\n _this.getEditorKey = function () {\n return _this._editorKey;\n };\n\n if (true) {\n ['onDownArrow', 'onEscape', 'onLeftArrow', 'onRightArrow', 'onTab', 'onUpArrow'].forEach(function (propName) {\n if (props.hasOwnProperty(propName)) {\n // eslint-disable-next-line no-console\n console.warn(\"Supplying an `\".concat(propName, \"` prop to `DraftEditor` has \") + 'been deprecated. If your handler needs access to the keyboard ' + 'event, supply a custom `keyBindingFn` prop that falls back to ' + 'the default one (eg. https://is.gd/wHKQ3W).');\n }\n });\n } // See `restoreEditorDOM()`.\n\n\n _this.state = {\n contentsKey: 0\n };\n return _this;\n }\n /**\n * Build a method that will pass the event to the specified handler method.\n * This allows us to look up the correct handler function for the current\n * editor mode, if any has been specified.\n */\n\n\n var _proto2 = DraftEditor.prototype;\n\n _proto2._buildHandler = function _buildHandler(eventName) {\n var _this2 = this;\n\n // Wrap event handlers in `flushControlled`. In sync mode, this is\n // effectively a no-op. In async mode, this ensures all updates scheduled\n // inside the handler are flushed before React yields to the browser.\n return function (e) {\n if (!_this2.props.readOnly) {\n var method = _this2._handler && _this2._handler[eventName];\n\n if (method) {\n if (flushControlled) {\n flushControlled(function () {\n return method(_this2, e);\n });\n } else {\n method(_this2, e);\n }\n }\n }\n };\n };\n\n _proto2._showPlaceholder = function _showPlaceholder() {\n return !!this.props.placeholder && !this.props.editorState.isInCompositionMode() && !this.props.editorState.getCurrentContent().hasText();\n };\n\n _proto2._renderPlaceholder = function _renderPlaceholder() {\n if (this._showPlaceholder()) {\n var placeHolderProps = {\n text: nullthrows(this.props.placeholder),\n editorState: this.props.editorState,\n textAlignment: this.props.textAlignment,\n accessibilityID: this._placeholderAccessibilityID\n };\n /* $FlowFixMe(>=0.112.0 site=www,mobile) This comment suppresses an error\n * found when Flow v0.112 was deployed. To see the error delete this\n * comment and run Flow. */\n\n return React.createElement(DraftEditorPlaceholder, placeHolderProps);\n }\n\n return null;\n };\n\n _proto2.render = function render() {\n var _this$props2 = this.props,\n blockRenderMap = _this$props2.blockRenderMap,\n blockRendererFn = _this$props2.blockRendererFn,\n blockStyleFn = _this$props2.blockStyleFn,\n customStyleFn = _this$props2.customStyleFn,\n customStyleMap = _this$props2.customStyleMap,\n editorState = _this$props2.editorState,\n preventScroll = _this$props2.preventScroll,\n readOnly = _this$props2.readOnly,\n textAlignment = _this$props2.textAlignment,\n textDirectionality = _this$props2.textDirectionality;\n var rootClass = cx({\n 'DraftEditor/root': true,\n 'DraftEditor/alignLeft': textAlignment === 'left',\n 'DraftEditor/alignRight': textAlignment === 'right',\n 'DraftEditor/alignCenter': textAlignment === 'center'\n });\n var contentStyle = {\n outline: 'none',\n // fix parent-draggable Safari bug. #1326\n userSelect: 'text',\n WebkitUserSelect: 'text',\n whiteSpace: 'pre-wrap',\n wordWrap: 'break-word'\n }; // The aria-expanded and aria-haspopup properties should only be rendered\n // for a combobox.\n\n /* $FlowFixMe(>=0.68.0 site=www,mobile) This comment suppresses an error\n * found when Flow v0.68 was deployed. To see the error delete this comment\n * and run Flow. */\n\n var ariaRole = this.props.role || 'textbox';\n var ariaExpanded = ariaRole === 'combobox' ? !!this.props.ariaExpanded : null;\n var editorContentsProps = {\n blockRenderMap: blockRenderMap,\n blockRendererFn: blockRendererFn,\n blockStyleFn: blockStyleFn,\n customStyleMap: _objectSpread({}, DefaultDraftInlineStyle, customStyleMap),\n customStyleFn: customStyleFn,\n editorKey: this._editorKey,\n editorState: editorState,\n preventScroll: preventScroll,\n textDirectionality: textDirectionality\n };\n return React.createElement(\"div\", {\n className: rootClass\n }, this._renderPlaceholder(), React.createElement(\"div\", {\n className: cx('DraftEditor/editorContainer'),\n ref: this._handleEditorContainerRef\n }, React.createElement(\"div\", {\n \"aria-activedescendant\": readOnly ? null : this.props.ariaActiveDescendantID,\n \"aria-autocomplete\": readOnly ? null : this.props.ariaAutoComplete,\n \"aria-controls\": readOnly ? null : this.props.ariaControls,\n \"aria-describedby\": this.props.ariaDescribedBy || this._placeholderAccessibilityID,\n \"aria-expanded\": readOnly ? null : ariaExpanded,\n \"aria-label\": this.props.ariaLabel,\n \"aria-labelledby\": this.props.ariaLabelledBy,\n \"aria-multiline\": this.props.ariaMultiline,\n \"aria-owns\": readOnly ? null : this.props.ariaOwneeID,\n autoCapitalize: this.props.autoCapitalize,\n autoComplete: this.props.autoComplete,\n autoCorrect: this.props.autoCorrect,\n className: cx({\n // Chrome's built-in translation feature mutates the DOM in ways\n // that Draft doesn't expect (ex: adding tags inside\n // DraftEditorLeaf spans) and causes problems. We add notranslate\n // here which makes its autotranslation skip over this subtree.\n notranslate: !readOnly,\n 'public/DraftEditor/content': true\n }),\n contentEditable: !readOnly,\n \"data-testid\": this.props.webDriverTestID,\n onBeforeInput: this._onBeforeInput,\n onBlur: this._onBlur,\n onCompositionEnd: this._onCompositionEnd,\n onCompositionStart: this._onCompositionStart,\n onCopy: this._onCopy,\n onCut: this._onCut,\n onDragEnd: this._onDragEnd,\n onDragEnter: this.onDragEnter,\n onDragLeave: this.onDragLeave,\n onDragOver: this._onDragOver,\n onDragStart: this._onDragStart,\n onDrop: this._onDrop,\n onFocus: this._onFocus,\n onInput: this._onInput,\n onKeyDown: this._onKeyDown,\n onKeyPress: this._onKeyPress,\n onKeyUp: this._onKeyUp,\n onMouseUp: this._onMouseUp,\n onPaste: this._onPaste,\n onSelect: this._onSelect,\n ref: this.props.editorRef,\n role: readOnly ? null : ariaRole,\n spellCheck: allowSpellCheck && this.props.spellCheck,\n style: contentStyle,\n suppressContentEditableWarning: true,\n tabIndex: this.props.tabIndex\n }, React.createElement(UpdateDraftEditorFlags, {\n editor: this,\n editorState: editorState\n }), React.createElement(DraftEditorContents, _extends({}, editorContentsProps, {\n key: 'contents' + this.state.contentsKey\n })))));\n };\n\n _proto2.componentDidMount = function componentDidMount() {\n this._blockSelectEvents = false;\n\n if (!didInitODS && gkx('draft_ods_enabled')) {\n didInitODS = true;\n DraftEffects.initODS();\n }\n\n this.setMode('edit');\n /**\n * IE has a hardcoded \"feature\" that attempts to convert link text into\n * anchors in contentEditable DOM. This breaks the editor's expectations of\n * the DOM, and control is lost. Disable it to make IE behave.\n * See: http://blogs.msdn.com/b/ieinternals/archive/2010/09/15/\n * ie9-beta-minor-change-list.aspx\n */\n\n if (isIE) {\n // editor can be null after mounting\n // https://stackoverflow.com/questions/44074747/componentdidmount-called-before-ref-callback\n if (!this.editor) {\n global.execCommand('AutoUrlDetect', false, false);\n } else {\n this.editor.ownerDocument.execCommand('AutoUrlDetect', false, false);\n }\n }\n };\n\n _proto2.componentDidUpdate = function componentDidUpdate() {\n this._blockSelectEvents = false;\n this._latestEditorState = this.props.editorState;\n this._latestCommittedEditorState = this.props.editorState;\n }\n /**\n * Used via `this.focus()`.\n *\n * Force focus back onto the editor node.\n *\n * We attempt to preserve scroll position when focusing. You can also pass\n * a specified scroll position (for cases like `cut` behavior where it should\n * be restored to a known position).\n */\n ;\n\n return DraftEditor;\n}(React.Component);\n\n_defineProperty(DraftEditor, \"defaultProps\", {\n blockRenderMap: DefaultDraftBlockRenderMap,\n blockRendererFn: function blockRendererFn() {\n return null;\n },\n blockStyleFn: function blockStyleFn() {\n return '';\n },\n keyBindingFn: getDefaultKeyBinding,\n readOnly: false,\n spellCheck: false,\n stripPastedStyles: false\n});\n\nmodule.exports = DraftEditor;\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/DraftEditor.react.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/DraftEditorBlock.react.js": +/*!*************************************************************!*\ + !*** ./node_modules/draft-js/lib/DraftEditorBlock.react.js ***! + \*************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar _assign = __webpack_require__(/*! object-assign */ \"./node_modules/object-assign/index.js\");\n\nfunction _extends() { _extends = _assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar DraftEditorLeaf = __webpack_require__(/*! ./DraftEditorLeaf.react */ \"./node_modules/draft-js/lib/DraftEditorLeaf.react.js\");\n\nvar DraftOffsetKey = __webpack_require__(/*! ./DraftOffsetKey */ \"./node_modules/draft-js/lib/DraftOffsetKey.js\");\n\nvar React = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar Scroll = __webpack_require__(/*! fbjs/lib/Scroll */ \"./node_modules/draft-js/node_modules/fbjs/lib/Scroll.js\");\n\nvar Style = __webpack_require__(/*! fbjs/lib/Style */ \"./node_modules/draft-js/node_modules/fbjs/lib/Style.js\");\n\nvar UnicodeBidi = __webpack_require__(/*! fbjs/lib/UnicodeBidi */ \"./node_modules/draft-js/node_modules/fbjs/lib/UnicodeBidi.js\");\n\nvar UnicodeBidiDirection = __webpack_require__(/*! fbjs/lib/UnicodeBidiDirection */ \"./node_modules/draft-js/node_modules/fbjs/lib/UnicodeBidiDirection.js\");\n\nvar cx = __webpack_require__(/*! fbjs/lib/cx */ \"./node_modules/draft-js/node_modules/fbjs/lib/cx.js\");\n\nvar getElementPosition = __webpack_require__(/*! fbjs/lib/getElementPosition */ \"./node_modules/draft-js/node_modules/fbjs/lib/getElementPosition.js\");\n\nvar getScrollPosition = __webpack_require__(/*! fbjs/lib/getScrollPosition */ \"./node_modules/draft-js/node_modules/fbjs/lib/getScrollPosition.js\");\n\nvar getViewportDimensions = __webpack_require__(/*! fbjs/lib/getViewportDimensions */ \"./node_modules/draft-js/node_modules/fbjs/lib/getViewportDimensions.js\");\n\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ \"./node_modules/draft-js/node_modules/fbjs/lib/invariant.js\");\n\nvar isHTMLElement = __webpack_require__(/*! ./isHTMLElement */ \"./node_modules/draft-js/lib/isHTMLElement.js\");\n\nvar nullthrows = __webpack_require__(/*! fbjs/lib/nullthrows */ \"./node_modules/draft-js/node_modules/fbjs/lib/nullthrows.js\");\n\nvar SCROLL_BUFFER = 10;\n\n/**\n * Return whether a block overlaps with either edge of the `SelectionState`.\n */\nvar isBlockOnSelectionEdge = function isBlockOnSelectionEdge(selection, key) {\n return selection.getAnchorKey() === key || selection.getFocusKey() === key;\n};\n/**\n * The default block renderer for a `DraftEditor` component.\n *\n * A `DraftEditorBlock` is able to render a given `ContentBlock` to its\n * appropriate decorator and inline style components.\n */\n\n\nvar DraftEditorBlock =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(DraftEditorBlock, _React$Component);\n\n function DraftEditorBlock() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n\n _defineProperty(_assertThisInitialized(_this), \"_node\", void 0);\n\n return _this;\n }\n\n var _proto = DraftEditorBlock.prototype;\n\n _proto.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {\n return this.props.block !== nextProps.block || this.props.tree !== nextProps.tree || this.props.direction !== nextProps.direction || isBlockOnSelectionEdge(nextProps.selection, nextProps.block.getKey()) && nextProps.forceSelection;\n }\n /**\n * When a block is mounted and overlaps the selection state, we need to make\n * sure that the cursor is visible to match native behavior. This may not\n * be the case if the user has pressed `RETURN` or pasted some content, since\n * programmatically creating these new blocks and setting the DOM selection\n * will miss out on the browser natively scrolling to that position.\n *\n * To replicate native behavior, if the block overlaps the selection state\n * on mount, force the scroll position. Check the scroll state of the scroll\n * parent, and adjust it to align the entire block to the bottom of the\n * scroll parent.\n */\n ;\n\n _proto.componentDidMount = function componentDidMount() {\n if (this.props.preventScroll) {\n return;\n }\n\n var selection = this.props.selection;\n var endKey = selection.getEndKey();\n\n if (!selection.getHasFocus() || endKey !== this.props.block.getKey()) {\n return;\n }\n\n var blockNode = this._node;\n\n if (blockNode == null) {\n return;\n }\n\n var scrollParent = Style.getScrollParent(blockNode);\n var scrollPosition = getScrollPosition(scrollParent);\n var scrollDelta;\n\n if (scrollParent === window) {\n var nodePosition = getElementPosition(blockNode);\n var nodeBottom = nodePosition.y + nodePosition.height;\n var viewportHeight = getViewportDimensions().height;\n scrollDelta = nodeBottom - viewportHeight;\n\n if (scrollDelta > 0) {\n window.scrollTo(scrollPosition.x, scrollPosition.y + scrollDelta + SCROLL_BUFFER);\n }\n } else {\n !isHTMLElement(blockNode) ? true ? invariant(false, 'blockNode is not an HTMLElement') : undefined : void 0;\n var blockBottom = blockNode.offsetHeight + blockNode.offsetTop;\n var pOffset = scrollParent.offsetTop + scrollParent.offsetHeight;\n var scrollBottom = pOffset + scrollPosition.y;\n scrollDelta = blockBottom - scrollBottom;\n\n if (scrollDelta > 0) {\n Scroll.setTop(scrollParent, Scroll.getTop(scrollParent) + scrollDelta + SCROLL_BUFFER);\n }\n }\n };\n\n _proto._renderChildren = function _renderChildren() {\n var _this2 = this;\n\n var block = this.props.block;\n var blockKey = block.getKey();\n var text = block.getText();\n var lastLeafSet = this.props.tree.size - 1;\n var hasSelection = isBlockOnSelectionEdge(this.props.selection, blockKey);\n return this.props.tree.map(function (leafSet, ii) {\n var leavesForLeafSet = leafSet.get('leaves'); // T44088704\n\n if (leavesForLeafSet.size === 0) {\n return null;\n }\n\n var lastLeaf = leavesForLeafSet.size - 1;\n var leaves = leavesForLeafSet.map(function (leaf, jj) {\n var offsetKey = DraftOffsetKey.encode(blockKey, ii, jj);\n var start = leaf.get('start');\n var end = leaf.get('end');\n return React.createElement(DraftEditorLeaf, {\n key: offsetKey,\n offsetKey: offsetKey,\n block: block,\n start: start,\n selection: hasSelection ? _this2.props.selection : null,\n forceSelection: _this2.props.forceSelection,\n text: text.slice(start, end),\n styleSet: block.getInlineStyleAt(start),\n customStyleMap: _this2.props.customStyleMap,\n customStyleFn: _this2.props.customStyleFn,\n isLast: ii === lastLeafSet && jj === lastLeaf\n });\n }).toArray();\n var decoratorKey = leafSet.get('decoratorKey');\n\n if (decoratorKey == null) {\n return leaves;\n }\n\n if (!_this2.props.decorator) {\n return leaves;\n }\n\n var decorator = nullthrows(_this2.props.decorator);\n var DecoratorComponent = decorator.getComponentForKey(decoratorKey);\n\n if (!DecoratorComponent) {\n return leaves;\n }\n\n var decoratorProps = decorator.getPropsForKey(decoratorKey);\n var decoratorOffsetKey = DraftOffsetKey.encode(blockKey, ii, 0);\n var start = leavesForLeafSet.first().get('start');\n var end = leavesForLeafSet.last().get('end');\n var decoratedText = text.slice(start, end);\n var entityKey = block.getEntityAt(leafSet.get('start')); // Resetting dir to the same value on a child node makes Chrome/Firefox\n // confused on cursor movement. See http://jsfiddle.net/d157kLck/3/\n\n var dir = UnicodeBidiDirection.getHTMLDirIfDifferent(UnicodeBidi.getDirection(decoratedText), _this2.props.direction);\n var commonProps = {\n contentState: _this2.props.contentState,\n decoratedText: decoratedText,\n dir: dir,\n start: start,\n end: end,\n blockKey: blockKey,\n entityKey: entityKey,\n offsetKey: decoratorOffsetKey\n };\n return React.createElement(DecoratorComponent, _extends({}, decoratorProps, commonProps, {\n key: decoratorOffsetKey\n }), leaves);\n }).toArray();\n };\n\n _proto.render = function render() {\n var _this3 = this;\n\n var _this$props = this.props,\n direction = _this$props.direction,\n offsetKey = _this$props.offsetKey;\n var className = cx({\n 'public/DraftStyleDefault/block': true,\n 'public/DraftStyleDefault/ltr': direction === 'LTR',\n 'public/DraftStyleDefault/rtl': direction === 'RTL'\n });\n return React.createElement(\"div\", {\n \"data-offset-key\": offsetKey,\n className: className,\n ref: function ref(_ref) {\n return _this3._node = _ref;\n }\n }, this._renderChildren());\n };\n\n return DraftEditorBlock;\n}(React.Component);\n\nmodule.exports = DraftEditorBlock;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/DraftEditorBlock.react.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/DraftEditorBlockNode.react.js": +/*!*****************************************************************!*\ + !*** ./node_modules/draft-js/lib/DraftEditorBlockNode.react.js ***! + \*****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n *\n * This file is a fork of DraftEditorBlock.react.js and DraftEditorContents.react.js\n *\n * This is unstable and not part of the public API and should not be used by\n * production systems. This file may be update/removed without notice.\n */\n\n\nvar _assign = __webpack_require__(/*! object-assign */ \"./node_modules/object-assign/index.js\");\n\nfunction _extends() { _extends = _assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar DraftEditorNode = __webpack_require__(/*! ./DraftEditorNode.react */ \"./node_modules/draft-js/lib/DraftEditorNode.react.js\");\n\nvar DraftOffsetKey = __webpack_require__(/*! ./DraftOffsetKey */ \"./node_modules/draft-js/lib/DraftOffsetKey.js\");\n\nvar React = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar Scroll = __webpack_require__(/*! fbjs/lib/Scroll */ \"./node_modules/draft-js/node_modules/fbjs/lib/Scroll.js\");\n\nvar Style = __webpack_require__(/*! fbjs/lib/Style */ \"./node_modules/draft-js/node_modules/fbjs/lib/Style.js\");\n\nvar getElementPosition = __webpack_require__(/*! fbjs/lib/getElementPosition */ \"./node_modules/draft-js/node_modules/fbjs/lib/getElementPosition.js\");\n\nvar getScrollPosition = __webpack_require__(/*! fbjs/lib/getScrollPosition */ \"./node_modules/draft-js/node_modules/fbjs/lib/getScrollPosition.js\");\n\nvar getViewportDimensions = __webpack_require__(/*! fbjs/lib/getViewportDimensions */ \"./node_modules/draft-js/node_modules/fbjs/lib/getViewportDimensions.js\");\n\nvar Immutable = __webpack_require__(/*! immutable */ \"./node_modules/immutable/dist/immutable.js\");\n\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ \"./node_modules/draft-js/node_modules/fbjs/lib/invariant.js\");\n\nvar isHTMLElement = __webpack_require__(/*! ./isHTMLElement */ \"./node_modules/draft-js/lib/isHTMLElement.js\");\n\nvar SCROLL_BUFFER = 10;\nvar List = Immutable.List; // we should harden up the bellow flow types to make them more strict\n\n/**\n * Return whether a block overlaps with either edge of the `SelectionState`.\n */\nvar isBlockOnSelectionEdge = function isBlockOnSelectionEdge(selection, key) {\n return selection.getAnchorKey() === key || selection.getFocusKey() === key;\n};\n/**\n * We will use this helper to identify blocks that need to be wrapped but have siblings that\n * also share the same wrapper element, this way we can do the wrapping once the last sibling\n * is added.\n */\n\n\nvar shouldNotAddWrapperElement = function shouldNotAddWrapperElement(block, contentState) {\n var nextSiblingKey = block.getNextSiblingKey();\n return nextSiblingKey ? contentState.getBlockForKey(nextSiblingKey).getType() === block.getType() : false;\n};\n\nvar applyWrapperElementToSiblings = function applyWrapperElementToSiblings(wrapperTemplate, Element, nodes) {\n var wrappedSiblings = []; // we check back until we find a sibling that does not have same wrapper\n\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n for (var _iterator = nodes.reverse()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var sibling = _step.value;\n\n if (sibling.type !== Element) {\n break;\n }\n\n wrappedSiblings.push(sibling);\n } // we now should remove from acc the wrappedSiblings and add them back under same wrap\n\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator[\"return\"] != null) {\n _iterator[\"return\"]();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n\n nodes.splice(nodes.indexOf(wrappedSiblings[0]), wrappedSiblings.length + 1);\n var childrenIs = wrappedSiblings.reverse();\n var key = childrenIs[0].key;\n nodes.push(React.cloneElement(wrapperTemplate, {\n key: \"\".concat(key, \"-wrap\"),\n 'data-offset-key': DraftOffsetKey.encode(key, 0, 0)\n }, childrenIs));\n return nodes;\n};\n\nvar getDraftRenderConfig = function getDraftRenderConfig(block, blockRenderMap) {\n var configForType = blockRenderMap.get(block.getType()) || blockRenderMap.get('unstyled');\n var wrapperTemplate = configForType.wrapper;\n var Element = configForType.element || blockRenderMap.get('unstyled').element;\n return {\n Element: Element,\n wrapperTemplate: wrapperTemplate\n };\n};\n\nvar getCustomRenderConfig = function getCustomRenderConfig(block, blockRendererFn) {\n var customRenderer = blockRendererFn(block);\n\n if (!customRenderer) {\n return {};\n }\n\n var CustomComponent = customRenderer.component,\n customProps = customRenderer.props,\n customEditable = customRenderer.editable;\n return {\n CustomComponent: CustomComponent,\n customProps: customProps,\n customEditable: customEditable\n };\n};\n\nvar getElementPropsConfig = function getElementPropsConfig(block, editorKey, offsetKey, blockStyleFn, customConfig, ref) {\n var elementProps = {\n 'data-block': true,\n 'data-editor': editorKey,\n 'data-offset-key': offsetKey,\n key: block.getKey(),\n ref: ref\n };\n var customClass = blockStyleFn(block);\n\n if (customClass) {\n elementProps.className = customClass;\n }\n\n if (customConfig.customEditable !== undefined) {\n elementProps = _objectSpread({}, elementProps, {\n contentEditable: customConfig.customEditable,\n suppressContentEditableWarning: true\n });\n }\n\n return elementProps;\n};\n\nvar DraftEditorBlockNode =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(DraftEditorBlockNode, _React$Component);\n\n function DraftEditorBlockNode() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n\n _defineProperty(_assertThisInitialized(_this), \"wrapperRef\", React.createRef());\n\n return _this;\n }\n\n var _proto = DraftEditorBlockNode.prototype;\n\n _proto.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {\n var _this$props = this.props,\n block = _this$props.block,\n direction = _this$props.direction,\n tree = _this$props.tree;\n var isContainerNode = !block.getChildKeys().isEmpty();\n var blockHasChanged = block !== nextProps.block || tree !== nextProps.tree || direction !== nextProps.direction || isBlockOnSelectionEdge(nextProps.selection, nextProps.block.getKey()) && nextProps.forceSelection; // if we have children at this stage we always re-render container nodes\n // else if its a root node we avoid re-rendering by checking for block updates\n\n return isContainerNode || blockHasChanged;\n }\n /**\n * When a block is mounted and overlaps the selection state, we need to make\n * sure that the cursor is visible to match native behavior. This may not\n * be the case if the user has pressed `RETURN` or pasted some content, since\n * programatically creating these new blocks and setting the DOM selection\n * will miss out on the browser natively scrolling to that position.\n *\n * To replicate native behavior, if the block overlaps the selection state\n * on mount, force the scroll position. Check the scroll state of the scroll\n * parent, and adjust it to align the entire block to the bottom of the\n * scroll parent.\n */\n ;\n\n _proto.componentDidMount = function componentDidMount() {\n var selection = this.props.selection;\n var endKey = selection.getEndKey();\n\n if (!selection.getHasFocus() || endKey !== this.props.block.getKey()) {\n return;\n }\n\n var blockNode = this.wrapperRef.current;\n\n if (!blockNode) {\n // This Block Node was rendered without a wrapper element.\n return;\n }\n\n var scrollParent = Style.getScrollParent(blockNode);\n var scrollPosition = getScrollPosition(scrollParent);\n var scrollDelta;\n\n if (scrollParent === window) {\n var nodePosition = getElementPosition(blockNode);\n var nodeBottom = nodePosition.y + nodePosition.height;\n var viewportHeight = getViewportDimensions().height;\n scrollDelta = nodeBottom - viewportHeight;\n\n if (scrollDelta > 0) {\n window.scrollTo(scrollPosition.x, scrollPosition.y + scrollDelta + SCROLL_BUFFER);\n }\n } else {\n !isHTMLElement(blockNode) ? true ? invariant(false, 'blockNode is not an HTMLElement') : undefined : void 0;\n var htmlBlockNode = blockNode;\n var blockBottom = htmlBlockNode.offsetHeight + htmlBlockNode.offsetTop;\n var scrollBottom = scrollParent.offsetHeight + scrollPosition.y;\n scrollDelta = blockBottom - scrollBottom;\n\n if (scrollDelta > 0) {\n Scroll.setTop(scrollParent, Scroll.getTop(scrollParent) + scrollDelta + SCROLL_BUFFER);\n }\n }\n };\n\n _proto.render = function render() {\n var _this2 = this;\n\n var _this$props2 = this.props,\n block = _this$props2.block,\n blockRenderMap = _this$props2.blockRenderMap,\n blockRendererFn = _this$props2.blockRendererFn,\n blockStyleFn = _this$props2.blockStyleFn,\n contentState = _this$props2.contentState,\n decorator = _this$props2.decorator,\n editorKey = _this$props2.editorKey,\n editorState = _this$props2.editorState,\n customStyleFn = _this$props2.customStyleFn,\n customStyleMap = _this$props2.customStyleMap,\n direction = _this$props2.direction,\n forceSelection = _this$props2.forceSelection,\n selection = _this$props2.selection,\n tree = _this$props2.tree;\n var children = null;\n\n if (block.children.size) {\n children = block.children.reduce(function (acc, key) {\n var offsetKey = DraftOffsetKey.encode(key, 0, 0);\n var child = contentState.getBlockForKey(key);\n var customConfig = getCustomRenderConfig(child, blockRendererFn);\n var Component = customConfig.CustomComponent || DraftEditorBlockNode;\n\n var _getDraftRenderConfig = getDraftRenderConfig(child, blockRenderMap),\n Element = _getDraftRenderConfig.Element,\n wrapperTemplate = _getDraftRenderConfig.wrapperTemplate;\n\n var elementProps = getElementPropsConfig(child, editorKey, offsetKey, blockStyleFn, customConfig, null);\n\n var childProps = _objectSpread({}, _this2.props, {\n tree: editorState.getBlockTree(key),\n blockProps: customConfig.customProps,\n offsetKey: offsetKey,\n block: child\n });\n\n acc.push(React.createElement(Element, elementProps, React.createElement(Component, childProps)));\n\n if (!wrapperTemplate || shouldNotAddWrapperElement(child, contentState)) {\n return acc;\n } // if we are here it means we are the last block\n // that has a wrapperTemplate so we should wrap itself\n // and all other previous siblings that share the same wrapper\n\n\n applyWrapperElementToSiblings(wrapperTemplate, Element, acc);\n return acc;\n }, []);\n }\n\n var blockKey = block.getKey();\n var offsetKey = DraftOffsetKey.encode(blockKey, 0, 0);\n var customConfig = getCustomRenderConfig(block, blockRendererFn);\n var Component = customConfig.CustomComponent;\n var blockNode = Component != null ? React.createElement(Component, _extends({}, this.props, {\n tree: editorState.getBlockTree(blockKey),\n blockProps: customConfig.customProps,\n offsetKey: offsetKey,\n block: block\n })) : React.createElement(DraftEditorNode, {\n block: block,\n children: children,\n contentState: contentState,\n customStyleFn: customStyleFn,\n customStyleMap: customStyleMap,\n decorator: decorator,\n direction: direction,\n forceSelection: forceSelection,\n hasSelection: isBlockOnSelectionEdge(selection, blockKey),\n selection: selection,\n tree: tree\n });\n\n if (block.getParentKey()) {\n return blockNode;\n }\n\n var _getDraftRenderConfig2 = getDraftRenderConfig(block, blockRenderMap),\n Element = _getDraftRenderConfig2.Element;\n\n var elementProps = getElementPropsConfig(block, editorKey, offsetKey, blockStyleFn, customConfig, this.wrapperRef); // root block nodes needs to be wrapped\n\n return React.createElement(Element, elementProps, blockNode);\n };\n\n return DraftEditorBlockNode;\n}(React.Component);\n\nmodule.exports = DraftEditorBlockNode;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/DraftEditorBlockNode.react.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/DraftEditorCompositionHandler.js": +/*!********************************************************************!*\ + !*** ./node_modules/draft-js/lib/DraftEditorCompositionHandler.js ***! + \********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar DOMObserver = __webpack_require__(/*! ./DOMObserver */ \"./node_modules/draft-js/lib/DOMObserver.js\");\n\nvar DraftModifier = __webpack_require__(/*! ./DraftModifier */ \"./node_modules/draft-js/lib/DraftModifier.js\");\n\nvar DraftOffsetKey = __webpack_require__(/*! ./DraftOffsetKey */ \"./node_modules/draft-js/lib/DraftOffsetKey.js\");\n\nvar EditorState = __webpack_require__(/*! ./EditorState */ \"./node_modules/draft-js/lib/EditorState.js\");\n\nvar Keys = __webpack_require__(/*! fbjs/lib/Keys */ \"./node_modules/draft-js/node_modules/fbjs/lib/Keys.js\");\n\nvar editOnSelect = __webpack_require__(/*! ./editOnSelect */ \"./node_modules/draft-js/lib/editOnSelect.js\");\n\nvar getContentEditableContainer = __webpack_require__(/*! ./getContentEditableContainer */ \"./node_modules/draft-js/lib/getContentEditableContainer.js\");\n\nvar getDraftEditorSelection = __webpack_require__(/*! ./getDraftEditorSelection */ \"./node_modules/draft-js/lib/getDraftEditorSelection.js\");\n\nvar getEntityKeyForSelection = __webpack_require__(/*! ./getEntityKeyForSelection */ \"./node_modules/draft-js/lib/getEntityKeyForSelection.js\");\n\nvar nullthrows = __webpack_require__(/*! fbjs/lib/nullthrows */ \"./node_modules/draft-js/node_modules/fbjs/lib/nullthrows.js\");\n/**\n * Millisecond delay to allow `compositionstart` to fire again upon\n * `compositionend`.\n *\n * This is used for Korean input to ensure that typing can continue without\n * the editor trying to render too quickly. More specifically, Safari 7.1+\n * triggers `compositionstart` a little slower than Chrome/FF, which\n * leads to composed characters being resolved and re-render occurring\n * sooner than we want.\n */\n\n\nvar RESOLVE_DELAY = 20;\n/**\n * A handful of variables used to track the current composition and its\n * resolution status. These exist at the module level because it is not\n * possible to have compositions occurring in multiple editors simultaneously,\n * and it simplifies state management with respect to the DraftEditor component.\n */\n\nvar resolved = false;\nvar stillComposing = false;\nvar domObserver = null;\n\nfunction startDOMObserver(editor) {\n if (!domObserver) {\n domObserver = new DOMObserver(getContentEditableContainer(editor));\n domObserver.start();\n }\n}\n\nvar DraftEditorCompositionHandler = {\n /**\n * A `compositionstart` event has fired while we're still in composition\n * mode. Continue the current composition session to prevent a re-render.\n */\n onCompositionStart: function onCompositionStart(editor) {\n stillComposing = true;\n startDOMObserver(editor);\n },\n\n /**\n * Attempt to end the current composition session.\n *\n * Defer handling because browser will still insert the chars into active\n * element after `compositionend`. If a `compositionstart` event fires\n * before `resolveComposition` executes, our composition session will\n * continue.\n *\n * The `resolved` flag is useful because certain IME interfaces fire the\n * `compositionend` event multiple times, thus queueing up multiple attempts\n * at handling the composition. Since handling the same composition event\n * twice could break the DOM, we only use the first event. Example: Arabic\n * Google Input Tools on Windows 8.1 fires `compositionend` three times.\n */\n onCompositionEnd: function onCompositionEnd(editor) {\n resolved = false;\n stillComposing = false;\n setTimeout(function () {\n if (!resolved) {\n DraftEditorCompositionHandler.resolveComposition(editor);\n }\n }, RESOLVE_DELAY);\n },\n onSelect: editOnSelect,\n\n /**\n * In Safari, keydown events may fire when committing compositions. If\n * the arrow keys are used to commit, prevent default so that the cursor\n * doesn't move, otherwise it will jump back noticeably on re-render.\n */\n onKeyDown: function onKeyDown(editor, e) {\n if (!stillComposing) {\n // If a keydown event is received after compositionend but before the\n // 20ms timer expires (ex: type option-E then backspace, or type A then\n // backspace in 2-Set Korean), we should immediately resolve the\n // composition and reinterpret the key press in edit mode.\n DraftEditorCompositionHandler.resolveComposition(editor);\n\n editor._onKeyDown(e);\n\n return;\n }\n\n if (e.which === Keys.RIGHT || e.which === Keys.LEFT) {\n e.preventDefault();\n }\n },\n\n /**\n * Keypress events may fire when committing compositions. In Firefox,\n * pressing RETURN commits the composition and inserts extra newline\n * characters that we do not want. `preventDefault` allows the composition\n * to be committed while preventing the extra characters.\n */\n onKeyPress: function onKeyPress(editor, e) {\n if (e.which === Keys.RETURN) {\n e.preventDefault();\n }\n },\n\n /**\n * Attempt to insert composed characters into the document.\n *\n * If we are still in a composition session, do nothing. Otherwise, insert\n * the characters into the document and terminate the composition session.\n *\n * If no characters were composed -- for instance, the user\n * deleted all composed characters and committed nothing new --\n * force a re-render. We also re-render when the composition occurs\n * at the beginning of a leaf, to ensure that if the browser has\n * created a new text node for the composition, we will discard it.\n *\n * Resetting innerHTML will move focus to the beginning of the editor,\n * so we update to force it back to the correct place.\n */\n resolveComposition: function resolveComposition(editor) {\n if (stillComposing) {\n return;\n }\n\n var mutations = nullthrows(domObserver).stopAndFlushMutations();\n domObserver = null;\n resolved = true;\n var editorState = EditorState.set(editor._latestEditorState, {\n inCompositionMode: false\n });\n editor.exitCurrentMode();\n\n if (!mutations.size) {\n editor.update(editorState);\n return;\n } // TODO, check if Facebook still needs this flag or if it could be removed.\n // Since there can be multiple mutations providing a `composedChars` doesn't\n // apply well on this new model.\n // if (\n // gkx('draft_handlebeforeinput_composed_text') &&\n // editor.props.handleBeforeInput &&\n // isEventHandled(\n // editor.props.handleBeforeInput(\n // composedChars,\n // editorState,\n // event.timeStamp,\n // ),\n // )\n // ) {\n // return;\n // }\n\n\n var contentState = editorState.getCurrentContent();\n mutations.forEach(function (composedChars, offsetKey) {\n var _DraftOffsetKey$decod = DraftOffsetKey.decode(offsetKey),\n blockKey = _DraftOffsetKey$decod.blockKey,\n decoratorKey = _DraftOffsetKey$decod.decoratorKey,\n leafKey = _DraftOffsetKey$decod.leafKey;\n\n var _editorState$getBlock = editorState.getBlockTree(blockKey).getIn([decoratorKey, 'leaves', leafKey]),\n start = _editorState$getBlock.start,\n end = _editorState$getBlock.end;\n\n var replacementRange = editorState.getSelection().merge({\n anchorKey: blockKey,\n focusKey: blockKey,\n anchorOffset: start,\n focusOffset: end,\n isBackward: false\n });\n var entityKey = getEntityKeyForSelection(contentState, replacementRange);\n var currentStyle = contentState.getBlockForKey(blockKey).getInlineStyleAt(start);\n contentState = DraftModifier.replaceText(contentState, replacementRange, composedChars, currentStyle, entityKey); // We need to update the editorState so the leaf node ranges are properly\n // updated and multiple mutations are correctly applied.\n\n editorState = EditorState.set(editorState, {\n currentContent: contentState\n });\n }); // When we apply the text changes to the ContentState, the selection always\n // goes to the end of the field, but it should just stay where it is\n // after compositionEnd.\n\n var documentSelection = getDraftEditorSelection(editorState, getContentEditableContainer(editor));\n var compositionEndSelectionState = documentSelection.selectionState;\n editor.restoreEditorDOM();\n var editorStateWithUpdatedSelection = EditorState.acceptSelection(editorState, compositionEndSelectionState);\n editor.update(EditorState.push(editorStateWithUpdatedSelection, contentState, 'insert-characters'));\n }\n};\nmodule.exports = DraftEditorCompositionHandler;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/DraftEditorCompositionHandler.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/DraftEditorContents-core.react.js": +/*!*********************************************************************!*\ + !*** ./node_modules/draft-js/lib/DraftEditorContents-core.react.js ***! + \*********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar _assign = __webpack_require__(/*! object-assign */ \"./node_modules/object-assign/index.js\");\n\nfunction _extends() { _extends = _assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar DraftEditorBlock = __webpack_require__(/*! ./DraftEditorBlock.react */ \"./node_modules/draft-js/lib/DraftEditorBlock.react.js\");\n\nvar DraftOffsetKey = __webpack_require__(/*! ./DraftOffsetKey */ \"./node_modules/draft-js/lib/DraftOffsetKey.js\");\n\nvar React = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar cx = __webpack_require__(/*! fbjs/lib/cx */ \"./node_modules/draft-js/node_modules/fbjs/lib/cx.js\");\n\nvar joinClasses = __webpack_require__(/*! fbjs/lib/joinClasses */ \"./node_modules/draft-js/node_modules/fbjs/lib/joinClasses.js\");\n\nvar nullthrows = __webpack_require__(/*! fbjs/lib/nullthrows */ \"./node_modules/draft-js/node_modules/fbjs/lib/nullthrows.js\");\n\n/**\n * Provide default styling for list items. This way, lists will be styled with\n * proper counters and indentation even if the caller does not specify\n * their own styling at all. If more than five levels of nesting are needed,\n * the necessary CSS classes can be provided via `blockStyleFn` configuration.\n */\nvar getListItemClasses = function getListItemClasses(type, depth, shouldResetCount, direction) {\n return cx({\n 'public/DraftStyleDefault/unorderedListItem': type === 'unordered-list-item',\n 'public/DraftStyleDefault/orderedListItem': type === 'ordered-list-item',\n 'public/DraftStyleDefault/reset': shouldResetCount,\n 'public/DraftStyleDefault/depth0': depth === 0,\n 'public/DraftStyleDefault/depth1': depth === 1,\n 'public/DraftStyleDefault/depth2': depth === 2,\n 'public/DraftStyleDefault/depth3': depth === 3,\n 'public/DraftStyleDefault/depth4': depth >= 4,\n 'public/DraftStyleDefault/listLTR': direction === 'LTR',\n 'public/DraftStyleDefault/listRTL': direction === 'RTL'\n });\n};\n/**\n * `DraftEditorContents` is the container component for all block components\n * rendered for a `DraftEditor`. It is optimized to aggressively avoid\n * re-rendering blocks whenever possible.\n *\n * This component is separate from `DraftEditor` because certain props\n * (for instance, ARIA props) must be allowed to update without affecting\n * the contents of the editor.\n */\n\n\nvar DraftEditorContents =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(DraftEditorContents, _React$Component);\n\n function DraftEditorContents() {\n return _React$Component.apply(this, arguments) || this;\n }\n\n var _proto = DraftEditorContents.prototype;\n\n _proto.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {\n var prevEditorState = this.props.editorState;\n var nextEditorState = nextProps.editorState;\n var prevDirectionMap = prevEditorState.getDirectionMap();\n var nextDirectionMap = nextEditorState.getDirectionMap(); // Text direction has changed for one or more blocks. We must re-render.\n\n if (prevDirectionMap !== nextDirectionMap) {\n return true;\n }\n\n var didHaveFocus = prevEditorState.getSelection().getHasFocus();\n var nowHasFocus = nextEditorState.getSelection().getHasFocus();\n\n if (didHaveFocus !== nowHasFocus) {\n return true;\n }\n\n var nextNativeContent = nextEditorState.getNativelyRenderedContent();\n var wasComposing = prevEditorState.isInCompositionMode();\n var nowComposing = nextEditorState.isInCompositionMode(); // If the state is unchanged or we're currently rendering a natively\n // rendered state, there's nothing new to be done.\n\n if (prevEditorState === nextEditorState || nextNativeContent !== null && nextEditorState.getCurrentContent() === nextNativeContent || wasComposing && nowComposing) {\n return false;\n }\n\n var prevContent = prevEditorState.getCurrentContent();\n var nextContent = nextEditorState.getCurrentContent();\n var prevDecorator = prevEditorState.getDecorator();\n var nextDecorator = nextEditorState.getDecorator();\n return wasComposing !== nowComposing || prevContent !== nextContent || prevDecorator !== nextDecorator || nextEditorState.mustForceSelection();\n };\n\n _proto.render = function render() {\n var _this$props = this.props,\n blockRenderMap = _this$props.blockRenderMap,\n blockRendererFn = _this$props.blockRendererFn,\n blockStyleFn = _this$props.blockStyleFn,\n customStyleMap = _this$props.customStyleMap,\n customStyleFn = _this$props.customStyleFn,\n editorState = _this$props.editorState,\n editorKey = _this$props.editorKey,\n preventScroll = _this$props.preventScroll,\n textDirectionality = _this$props.textDirectionality;\n var content = editorState.getCurrentContent();\n var selection = editorState.getSelection();\n var forceSelection = editorState.mustForceSelection();\n var decorator = editorState.getDecorator();\n var directionMap = nullthrows(editorState.getDirectionMap());\n var blocksAsArray = content.getBlocksAsArray();\n var processedBlocks = [];\n var currentDepth = null;\n var lastWrapperTemplate = null;\n\n for (var ii = 0; ii < blocksAsArray.length; ii++) {\n var _block = blocksAsArray[ii];\n\n var key = _block.getKey();\n\n var blockType = _block.getType();\n\n var customRenderer = blockRendererFn(_block);\n var CustomComponent = void 0,\n customProps = void 0,\n customEditable = void 0;\n\n if (customRenderer) {\n CustomComponent = customRenderer.component;\n customProps = customRenderer.props;\n customEditable = customRenderer.editable;\n }\n\n var direction = textDirectionality ? textDirectionality : directionMap.get(key);\n var offsetKey = DraftOffsetKey.encode(key, 0, 0);\n var componentProps = {\n contentState: content,\n block: _block,\n blockProps: customProps,\n blockStyleFn: blockStyleFn,\n customStyleMap: customStyleMap,\n customStyleFn: customStyleFn,\n decorator: decorator,\n direction: direction,\n forceSelection: forceSelection,\n offsetKey: offsetKey,\n preventScroll: preventScroll,\n selection: selection,\n tree: editorState.getBlockTree(key)\n };\n var configForType = blockRenderMap.get(blockType) || blockRenderMap.get('unstyled');\n var wrapperTemplate = configForType.wrapper;\n var Element = configForType.element || blockRenderMap.get('unstyled').element;\n\n var depth = _block.getDepth();\n\n var _className = '';\n\n if (blockStyleFn) {\n _className = blockStyleFn(_block);\n } // List items are special snowflakes, since we handle nesting and\n // counters manually.\n\n\n if (Element === 'li') {\n var shouldResetCount = lastWrapperTemplate !== wrapperTemplate || currentDepth === null || depth > currentDepth;\n _className = joinClasses(_className, getListItemClasses(blockType, depth, shouldResetCount, direction));\n }\n\n var Component = CustomComponent || DraftEditorBlock;\n var childProps = {\n className: _className,\n 'data-block': true,\n 'data-editor': editorKey,\n 'data-offset-key': offsetKey,\n key: key\n };\n\n if (customEditable !== undefined) {\n childProps = _objectSpread({}, childProps, {\n contentEditable: customEditable,\n suppressContentEditableWarning: true\n });\n }\n\n var child = React.createElement(Element, childProps,\n /* $FlowFixMe(>=0.112.0 site=www,mobile) This comment suppresses an\n * error found when Flow v0.112 was deployed. To see the error delete\n * this comment and run Flow. */\n React.createElement(Component, _extends({}, componentProps, {\n key: key\n })));\n processedBlocks.push({\n block: child,\n wrapperTemplate: wrapperTemplate,\n key: key,\n offsetKey: offsetKey\n });\n\n if (wrapperTemplate) {\n currentDepth = _block.getDepth();\n } else {\n currentDepth = null;\n }\n\n lastWrapperTemplate = wrapperTemplate;\n } // Group contiguous runs of blocks that have the same wrapperTemplate\n\n\n var outputBlocks = [];\n\n for (var _ii = 0; _ii < processedBlocks.length;) {\n var info = processedBlocks[_ii];\n\n if (info.wrapperTemplate) {\n var blocks = [];\n\n do {\n blocks.push(processedBlocks[_ii].block);\n _ii++;\n } while (_ii < processedBlocks.length && processedBlocks[_ii].wrapperTemplate === info.wrapperTemplate);\n\n var wrapperElement = React.cloneElement(info.wrapperTemplate, {\n key: info.key + '-wrap',\n 'data-offset-key': info.offsetKey\n }, blocks);\n outputBlocks.push(wrapperElement);\n } else {\n outputBlocks.push(info.block);\n _ii++;\n }\n }\n\n return React.createElement(\"div\", {\n \"data-contents\": \"true\"\n }, outputBlocks);\n };\n\n return DraftEditorContents;\n}(React.Component);\n\nmodule.exports = DraftEditorContents;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/DraftEditorContents-core.react.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/DraftEditorContents.react.js": +/*!****************************************************************!*\ + !*** ./node_modules/draft-js/lib/DraftEditorContents.react.js ***! + \****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n */\n\n\nvar gkx = __webpack_require__(/*! ./gkx */ \"./node_modules/draft-js/lib/gkx.js\");\n\nvar experimentalTreeDataSupport = gkx('draft_tree_data_support');\nmodule.exports = experimentalTreeDataSupport ? __webpack_require__(/*! ./DraftEditorContentsExperimental.react */ \"./node_modules/draft-js/lib/DraftEditorContentsExperimental.react.js\") : __webpack_require__(/*! ./DraftEditorContents-core.react */ \"./node_modules/draft-js/lib/DraftEditorContents-core.react.js\");\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/DraftEditorContents.react.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/DraftEditorContentsExperimental.react.js": +/*!****************************************************************************!*\ + !*** ./node_modules/draft-js/lib/DraftEditorContentsExperimental.react.js ***! + \****************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n *\n * This file is a fork of DraftEditorContents.react.js for tree nodes\n *\n * This is unstable and not part of the public API and should not be used by\n * production systems. This file may be update/removed without notice.\n */\n\n\nvar _assign = __webpack_require__(/*! object-assign */ \"./node_modules/object-assign/index.js\");\n\nfunction _extends() { _extends = _assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar DraftEditorBlockNode = __webpack_require__(/*! ./DraftEditorBlockNode.react */ \"./node_modules/draft-js/lib/DraftEditorBlockNode.react.js\");\n\nvar DraftOffsetKey = __webpack_require__(/*! ./DraftOffsetKey */ \"./node_modules/draft-js/lib/DraftOffsetKey.js\");\n\nvar React = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar nullthrows = __webpack_require__(/*! fbjs/lib/nullthrows */ \"./node_modules/draft-js/node_modules/fbjs/lib/nullthrows.js\");\n\n/**\n * `DraftEditorContents` is the container component for all block components\n * rendered for a `DraftEditor`. It is optimized to aggressively avoid\n * re-rendering blocks whenever possible.\n *\n * This component is separate from `DraftEditor` because certain props\n * (for instance, ARIA props) must be allowed to update without affecting\n * the contents of the editor.\n */\nvar DraftEditorContentsExperimental =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(DraftEditorContentsExperimental, _React$Component);\n\n function DraftEditorContentsExperimental() {\n return _React$Component.apply(this, arguments) || this;\n }\n\n var _proto = DraftEditorContentsExperimental.prototype;\n\n _proto.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {\n var prevEditorState = this.props.editorState;\n var nextEditorState = nextProps.editorState;\n var prevDirectionMap = prevEditorState.getDirectionMap();\n var nextDirectionMap = nextEditorState.getDirectionMap(); // Text direction has changed for one or more blocks. We must re-render.\n\n if (prevDirectionMap !== nextDirectionMap) {\n return true;\n }\n\n var didHaveFocus = prevEditorState.getSelection().getHasFocus();\n var nowHasFocus = nextEditorState.getSelection().getHasFocus();\n\n if (didHaveFocus !== nowHasFocus) {\n return true;\n }\n\n var nextNativeContent = nextEditorState.getNativelyRenderedContent();\n var wasComposing = prevEditorState.isInCompositionMode();\n var nowComposing = nextEditorState.isInCompositionMode(); // If the state is unchanged or we're currently rendering a natively\n // rendered state, there's nothing new to be done.\n\n if (prevEditorState === nextEditorState || nextNativeContent !== null && nextEditorState.getCurrentContent() === nextNativeContent || wasComposing && nowComposing) {\n return false;\n }\n\n var prevContent = prevEditorState.getCurrentContent();\n var nextContent = nextEditorState.getCurrentContent();\n var prevDecorator = prevEditorState.getDecorator();\n var nextDecorator = nextEditorState.getDecorator();\n return wasComposing !== nowComposing || prevContent !== nextContent || prevDecorator !== nextDecorator || nextEditorState.mustForceSelection();\n };\n\n _proto.render = function render() {\n var _this$props = this.props,\n blockRenderMap = _this$props.blockRenderMap,\n blockRendererFn = _this$props.blockRendererFn,\n blockStyleFn = _this$props.blockStyleFn,\n customStyleMap = _this$props.customStyleMap,\n customStyleFn = _this$props.customStyleFn,\n editorState = _this$props.editorState,\n editorKey = _this$props.editorKey,\n textDirectionality = _this$props.textDirectionality;\n var content = editorState.getCurrentContent();\n var selection = editorState.getSelection();\n var forceSelection = editorState.mustForceSelection();\n var decorator = editorState.getDecorator();\n var directionMap = nullthrows(editorState.getDirectionMap());\n var blocksAsArray = content.getBlocksAsArray();\n var rootBlock = blocksAsArray[0];\n var processedBlocks = [];\n var nodeBlock = rootBlock;\n\n while (nodeBlock) {\n var blockKey = nodeBlock.getKey();\n var blockProps = {\n blockRenderMap: blockRenderMap,\n blockRendererFn: blockRendererFn,\n blockStyleFn: blockStyleFn,\n contentState: content,\n customStyleFn: customStyleFn,\n customStyleMap: customStyleMap,\n decorator: decorator,\n editorKey: editorKey,\n editorState: editorState,\n forceSelection: forceSelection,\n selection: selection,\n block: nodeBlock,\n direction: textDirectionality ? textDirectionality : directionMap.get(blockKey),\n tree: editorState.getBlockTree(blockKey)\n };\n var configForType = blockRenderMap.get(nodeBlock.getType()) || blockRenderMap.get('unstyled');\n var wrapperTemplate = configForType.wrapper;\n processedBlocks.push({\n /* $FlowFixMe(>=0.112.0 site=www,mobile) This comment suppresses an\n * error found when Flow v0.112 was deployed. To see the error delete\n * this comment and run Flow. */\n block: React.createElement(DraftEditorBlockNode, _extends({\n key: blockKey\n }, blockProps)),\n wrapperTemplate: wrapperTemplate,\n key: blockKey,\n offsetKey: DraftOffsetKey.encode(blockKey, 0, 0)\n });\n var nextBlockKey = nodeBlock.getNextSiblingKey();\n nodeBlock = nextBlockKey ? content.getBlockForKey(nextBlockKey) : null;\n } // Group contiguous runs of blocks that have the same wrapperTemplate\n\n\n var outputBlocks = [];\n\n for (var ii = 0; ii < processedBlocks.length;) {\n var info = processedBlocks[ii];\n\n if (info.wrapperTemplate) {\n var blocks = [];\n\n do {\n blocks.push(processedBlocks[ii].block);\n ii++;\n } while (ii < processedBlocks.length && processedBlocks[ii].wrapperTemplate === info.wrapperTemplate);\n\n var wrapperElement = React.cloneElement(info.wrapperTemplate, {\n key: info.key + '-wrap',\n 'data-offset-key': info.offsetKey\n }, blocks);\n outputBlocks.push(wrapperElement);\n } else {\n outputBlocks.push(info.block);\n ii++;\n }\n }\n\n return React.createElement(\"div\", {\n \"data-contents\": \"true\"\n }, outputBlocks);\n };\n\n return DraftEditorContentsExperimental;\n}(React.Component);\n\nmodule.exports = DraftEditorContentsExperimental;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/DraftEditorContentsExperimental.react.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/DraftEditorDecoratedLeaves.react.js": +/*!***********************************************************************!*\ + !*** ./node_modules/draft-js/lib/DraftEditorDecoratedLeaves.react.js ***! + \***********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n *\n * This is unstable and not part of the public API and should not be used by\n * production systems. This file may be update/removed without notice.\n */\n\n\nvar _assign = __webpack_require__(/*! object-assign */ \"./node_modules/object-assign/index.js\");\n\nfunction _extends() { _extends = _assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar DraftOffsetKey = __webpack_require__(/*! ./DraftOffsetKey */ \"./node_modules/draft-js/lib/DraftOffsetKey.js\");\n\nvar React = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar UnicodeBidi = __webpack_require__(/*! fbjs/lib/UnicodeBidi */ \"./node_modules/draft-js/node_modules/fbjs/lib/UnicodeBidi.js\");\n\nvar UnicodeBidiDirection = __webpack_require__(/*! fbjs/lib/UnicodeBidiDirection */ \"./node_modules/draft-js/node_modules/fbjs/lib/UnicodeBidiDirection.js\");\n\nvar DraftEditorDecoratedLeaves =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(DraftEditorDecoratedLeaves, _React$Component);\n\n function DraftEditorDecoratedLeaves() {\n return _React$Component.apply(this, arguments) || this;\n }\n\n var _proto = DraftEditorDecoratedLeaves.prototype;\n\n _proto.render = function render() {\n var _this$props = this.props,\n block = _this$props.block,\n children = _this$props.children,\n contentState = _this$props.contentState,\n decorator = _this$props.decorator,\n decoratorKey = _this$props.decoratorKey,\n direction = _this$props.direction,\n leafSet = _this$props.leafSet,\n text = _this$props.text;\n var blockKey = block.getKey();\n var leavesForLeafSet = leafSet.get('leaves');\n var DecoratorComponent = decorator.getComponentForKey(decoratorKey);\n var decoratorProps = decorator.getPropsForKey(decoratorKey);\n var decoratorOffsetKey = DraftOffsetKey.encode(blockKey, parseInt(decoratorKey, 10), 0);\n var decoratedText = text.slice(leavesForLeafSet.first().get('start'), leavesForLeafSet.last().get('end')); // Resetting dir to the same value on a child node makes Chrome/Firefox\n // confused on cursor movement. See http://jsfiddle.net/d157kLck/3/\n\n var dir = UnicodeBidiDirection.getHTMLDirIfDifferent(UnicodeBidi.getDirection(decoratedText), direction);\n return React.createElement(DecoratorComponent, _extends({}, decoratorProps, {\n contentState: contentState,\n decoratedText: decoratedText,\n dir: dir,\n key: decoratorOffsetKey,\n entityKey: block.getEntityAt(leafSet.get('start')),\n offsetKey: decoratorOffsetKey\n }), children);\n };\n\n return DraftEditorDecoratedLeaves;\n}(React.Component);\n\nmodule.exports = DraftEditorDecoratedLeaves;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/DraftEditorDecoratedLeaves.react.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/DraftEditorDragHandler.js": +/*!*************************************************************!*\ + !*** ./node_modules/draft-js/lib/DraftEditorDragHandler.js ***! + \*************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar DataTransfer = __webpack_require__(/*! fbjs/lib/DataTransfer */ \"./node_modules/draft-js/node_modules/fbjs/lib/DataTransfer.js\");\n\nvar DraftModifier = __webpack_require__(/*! ./DraftModifier */ \"./node_modules/draft-js/lib/DraftModifier.js\");\n\nvar EditorState = __webpack_require__(/*! ./EditorState */ \"./node_modules/draft-js/lib/EditorState.js\");\n\nvar findAncestorOffsetKey = __webpack_require__(/*! ./findAncestorOffsetKey */ \"./node_modules/draft-js/lib/findAncestorOffsetKey.js\");\n\nvar getCorrectDocumentFromNode = __webpack_require__(/*! ./getCorrectDocumentFromNode */ \"./node_modules/draft-js/lib/getCorrectDocumentFromNode.js\");\n\nvar getTextContentFromFiles = __webpack_require__(/*! ./getTextContentFromFiles */ \"./node_modules/draft-js/lib/getTextContentFromFiles.js\");\n\nvar getUpdatedSelectionState = __webpack_require__(/*! ./getUpdatedSelectionState */ \"./node_modules/draft-js/lib/getUpdatedSelectionState.js\");\n\nvar getWindowForNode = __webpack_require__(/*! ./getWindowForNode */ \"./node_modules/draft-js/lib/getWindowForNode.js\");\n\nvar isEventHandled = __webpack_require__(/*! ./isEventHandled */ \"./node_modules/draft-js/lib/isEventHandled.js\");\n\nvar nullthrows = __webpack_require__(/*! fbjs/lib/nullthrows */ \"./node_modules/draft-js/node_modules/fbjs/lib/nullthrows.js\");\n/**\n * Get a SelectionState for the supplied mouse event.\n */\n\n\nfunction getSelectionForEvent(event, editorState) {\n var node = null;\n var offset = null;\n var eventTargetDocument = getCorrectDocumentFromNode(event.currentTarget);\n /* $FlowFixMe(>=0.68.0 site=www,mobile) This comment suppresses an error\n * found when Flow v0.68 was deployed. To see the error delete this comment\n * and run Flow. */\n\n if (typeof eventTargetDocument.caretRangeFromPoint === 'function') {\n /* $FlowFixMe(>=0.68.0 site=www,mobile) This comment suppresses an error\n * found when Flow v0.68 was deployed. To see the error delete this comment\n * and run Flow. */\n var dropRange = eventTargetDocument.caretRangeFromPoint(event.x, event.y);\n node = dropRange.startContainer;\n offset = dropRange.startOffset;\n } else if (event.rangeParent) {\n node = event.rangeParent;\n offset = event.rangeOffset;\n } else {\n return null;\n }\n\n node = nullthrows(node);\n offset = nullthrows(offset);\n var offsetKey = nullthrows(findAncestorOffsetKey(node));\n return getUpdatedSelectionState(editorState, offsetKey, offset, offsetKey, offset);\n}\n\nvar DraftEditorDragHandler = {\n /**\n * Drag originating from input terminated.\n */\n onDragEnd: function onDragEnd(editor) {\n editor.exitCurrentMode();\n endDrag(editor);\n },\n\n /**\n * Handle data being dropped.\n */\n onDrop: function onDrop(editor, e) {\n var data = new DataTransfer(e.nativeEvent.dataTransfer);\n var editorState = editor._latestEditorState;\n var dropSelection = getSelectionForEvent(e.nativeEvent, editorState);\n e.preventDefault();\n editor._dragCount = 0;\n editor.exitCurrentMode();\n\n if (dropSelection == null) {\n return;\n }\n\n var files = data.getFiles();\n\n if (files.length > 0) {\n if (editor.props.handleDroppedFiles && isEventHandled(editor.props.handleDroppedFiles(dropSelection, files))) {\n return;\n }\n /* $FlowFixMe This comment suppresses an error found DataTransfer was\n * typed. getFiles() returns an array of , not Blob\n */\n\n\n getTextContentFromFiles(files, function (fileText) {\n fileText && editor.update(insertTextAtSelection(editorState, dropSelection, fileText));\n });\n return;\n }\n\n var dragType = editor._internalDrag ? 'internal' : 'external';\n\n if (editor.props.handleDrop && isEventHandled(editor.props.handleDrop(dropSelection, data, dragType))) {// handled\n } else if (editor._internalDrag) {\n editor.update(moveText(editorState, dropSelection));\n } else {\n editor.update(insertTextAtSelection(editorState, dropSelection, data.getText()));\n }\n\n endDrag(editor);\n }\n};\n\nfunction endDrag(editor) {\n editor._internalDrag = false; // Fix issue #1383\n // Prior to React v16.5.0 onDrop breaks onSelect event:\n // https://github.com/facebook/react/issues/11379.\n // Dispatching a mouseup event on DOM node will make it go back to normal.\n\n var editorNode = editor.editorContainer;\n\n if (editorNode) {\n var mouseUpEvent = new MouseEvent('mouseup', {\n view: getWindowForNode(editorNode),\n bubbles: true,\n cancelable: true\n });\n editorNode.dispatchEvent(mouseUpEvent);\n }\n}\n\nfunction moveText(editorState, targetSelection) {\n var newContentState = DraftModifier.moveText(editorState.getCurrentContent(), editorState.getSelection(), targetSelection);\n return EditorState.push(editorState, newContentState, 'insert-fragment');\n}\n/**\n * Insert text at a specified selection.\n */\n\n\nfunction insertTextAtSelection(editorState, selection, text) {\n var newContentState = DraftModifier.insertText(editorState.getCurrentContent(), selection, text, editorState.getCurrentInlineStyle());\n return EditorState.push(editorState, newContentState, 'insert-fragment');\n}\n\nmodule.exports = DraftEditorDragHandler;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/DraftEditorDragHandler.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/DraftEditorEditHandler.js": +/*!*************************************************************!*\ + !*** ./node_modules/draft-js/lib/DraftEditorEditHandler.js ***! + \*************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar UserAgent = __webpack_require__(/*! fbjs/lib/UserAgent */ \"./node_modules/draft-js/node_modules/fbjs/lib/UserAgent.js\");\n\nvar onBeforeInput = __webpack_require__(/*! ./editOnBeforeInput */ \"./node_modules/draft-js/lib/editOnBeforeInput.js\");\n\nvar onBlur = __webpack_require__(/*! ./editOnBlur */ \"./node_modules/draft-js/lib/editOnBlur.js\");\n\nvar onCompositionStart = __webpack_require__(/*! ./editOnCompositionStart */ \"./node_modules/draft-js/lib/editOnCompositionStart.js\");\n\nvar onCopy = __webpack_require__(/*! ./editOnCopy */ \"./node_modules/draft-js/lib/editOnCopy.js\");\n\nvar onCut = __webpack_require__(/*! ./editOnCut */ \"./node_modules/draft-js/lib/editOnCut.js\");\n\nvar onDragOver = __webpack_require__(/*! ./editOnDragOver */ \"./node_modules/draft-js/lib/editOnDragOver.js\");\n\nvar onDragStart = __webpack_require__(/*! ./editOnDragStart */ \"./node_modules/draft-js/lib/editOnDragStart.js\");\n\nvar onFocus = __webpack_require__(/*! ./editOnFocus */ \"./node_modules/draft-js/lib/editOnFocus.js\");\n\nvar onInput = __webpack_require__(/*! ./editOnInput */ \"./node_modules/draft-js/lib/editOnInput.js\");\n\nvar onKeyDown = __webpack_require__(/*! ./editOnKeyDown */ \"./node_modules/draft-js/lib/editOnKeyDown.js\");\n\nvar onPaste = __webpack_require__(/*! ./editOnPaste */ \"./node_modules/draft-js/lib/editOnPaste.js\");\n\nvar onSelect = __webpack_require__(/*! ./editOnSelect */ \"./node_modules/draft-js/lib/editOnSelect.js\");\n\nvar isChrome = UserAgent.isBrowser('Chrome');\nvar isFirefox = UserAgent.isBrowser('Firefox');\nvar selectionHandler = isChrome || isFirefox ? onSelect : function (e) {};\nvar DraftEditorEditHandler = {\n onBeforeInput: onBeforeInput,\n onBlur: onBlur,\n onCompositionStart: onCompositionStart,\n onCopy: onCopy,\n onCut: onCut,\n onDragOver: onDragOver,\n onDragStart: onDragStart,\n onFocus: onFocus,\n onInput: onInput,\n onKeyDown: onKeyDown,\n onPaste: onPaste,\n onSelect: onSelect,\n // In certain cases, contenteditable on chrome does not fire the onSelect\n // event, causing problems with cursor positioning. Therefore, the selection\n // state update handler is added to more events to ensure that the selection\n // state is always synced with the actual cursor positions.\n onMouseUp: selectionHandler,\n onKeyUp: selectionHandler\n};\nmodule.exports = DraftEditorEditHandler;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/DraftEditorEditHandler.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/DraftEditorFlushControlled.js": +/*!*****************************************************************!*\ + !*** ./node_modules/draft-js/lib/DraftEditorFlushControlled.js ***! + \*****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\nvar ReactDOMComet = __webpack_require__(/*! react-dom */ \"./node_modules/react-dom/index.js\");\n\nvar flushControlled = ReactDOMComet.unstable_flushControlled;\nmodule.exports = flushControlled;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/DraftEditorFlushControlled.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/DraftEditorLeaf.react.js": +/*!************************************************************!*\ + !*** ./node_modules/draft-js/lib/DraftEditorLeaf.react.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar _assign = __webpack_require__(/*! object-assign */ \"./node_modules/object-assign/index.js\");\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar DraftEditorTextNode = __webpack_require__(/*! ./DraftEditorTextNode.react */ \"./node_modules/draft-js/lib/DraftEditorTextNode.react.js\");\n\nvar React = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ \"./node_modules/draft-js/node_modules/fbjs/lib/invariant.js\");\n\nvar isHTMLBRElement = __webpack_require__(/*! ./isHTMLBRElement */ \"./node_modules/draft-js/lib/isHTMLBRElement.js\");\n\nvar setDraftEditorSelection = __webpack_require__(/*! ./setDraftEditorSelection */ \"./node_modules/draft-js/lib/setDraftEditorSelection.js\").setDraftEditorSelection;\n\n/**\n * All leaf nodes in the editor are spans with single text nodes. Leaf\n * elements are styled based on the merging of an optional custom style map\n * and a default style map.\n *\n * `DraftEditorLeaf` also provides a wrapper for calling into the imperative\n * DOM Selection API. In this way, top-level components can declaratively\n * maintain the selection state.\n */\nvar DraftEditorLeaf =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(DraftEditorLeaf, _React$Component);\n\n function DraftEditorLeaf() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n\n _defineProperty(_assertThisInitialized(_this), \"leaf\", void 0);\n\n return _this;\n }\n\n var _proto = DraftEditorLeaf.prototype;\n\n _proto._setSelection = function _setSelection() {\n var selection = this.props.selection; // If selection state is irrelevant to the parent block, no-op.\n\n if (selection == null || !selection.getHasFocus()) {\n return;\n }\n\n var _this$props = this.props,\n block = _this$props.block,\n start = _this$props.start,\n text = _this$props.text;\n var blockKey = block.getKey();\n var end = start + text.length;\n\n if (!selection.hasEdgeWithin(blockKey, start, end)) {\n return;\n } // Determine the appropriate target node for selection. If the child\n // is not a text node, it is a
spacer. In this case, use the\n // itself as the selection target.\n\n\n var node = this.leaf;\n !node ? true ? invariant(false, 'Missing node') : undefined : void 0;\n var child = node.firstChild;\n !child ? true ? invariant(false, 'Missing child') : undefined : void 0;\n var targetNode;\n\n if (child.nodeType === Node.TEXT_NODE) {\n targetNode = child;\n } else if (isHTMLBRElement(child)) {\n targetNode = node;\n } else {\n targetNode = child.firstChild;\n !targetNode ? true ? invariant(false, 'Missing targetNode') : undefined : void 0;\n }\n\n setDraftEditorSelection(selection, targetNode, blockKey, start, end);\n };\n\n _proto.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {\n var leafNode = this.leaf;\n !leafNode ? true ? invariant(false, 'Missing leafNode') : undefined : void 0;\n var shouldUpdate = leafNode.textContent !== nextProps.text || nextProps.styleSet !== this.props.styleSet || nextProps.forceSelection;\n return shouldUpdate;\n };\n\n _proto.componentDidUpdate = function componentDidUpdate() {\n this._setSelection();\n };\n\n _proto.componentDidMount = function componentDidMount() {\n this._setSelection();\n };\n\n _proto.render = function render() {\n var _this2 = this;\n\n var block = this.props.block;\n var text = this.props.text; // If the leaf is at the end of its block and ends in a soft newline, append\n // an extra line feed character. Browsers collapse trailing newline\n // characters, which leaves the cursor in the wrong place after a\n // shift+enter. The extra character repairs this.\n\n if (text.endsWith('\\n') && this.props.isLast) {\n text += '\\n';\n }\n\n var _this$props2 = this.props,\n customStyleMap = _this$props2.customStyleMap,\n customStyleFn = _this$props2.customStyleFn,\n offsetKey = _this$props2.offsetKey,\n styleSet = _this$props2.styleSet;\n var styleObj = styleSet.reduce(function (map, styleName) {\n var mergedStyles = {};\n var style = customStyleMap[styleName];\n\n if (style !== undefined && map.textDecoration !== style.textDecoration) {\n // .trim() is necessary for IE9/10/11 and Edge\n mergedStyles.textDecoration = [map.textDecoration, style.textDecoration].join(' ').trim();\n }\n\n return _assign(map, style, mergedStyles);\n }, {});\n\n if (customStyleFn) {\n var newStyles = customStyleFn(styleSet, block);\n styleObj = _assign(styleObj, newStyles);\n }\n\n return React.createElement(\"span\", {\n \"data-offset-key\": offsetKey,\n ref: function ref(_ref) {\n return _this2.leaf = _ref;\n },\n style: styleObj\n }, React.createElement(DraftEditorTextNode, null, text));\n };\n\n return DraftEditorLeaf;\n}(React.Component);\n\nmodule.exports = DraftEditorLeaf;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/DraftEditorLeaf.react.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/DraftEditorNode.react.js": +/*!************************************************************!*\ + !*** ./node_modules/draft-js/lib/DraftEditorNode.react.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n *\n * This is unstable and not part of the public API and should not be used by\n * production systems. This file may be update/removed without notice.\n */\n\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar DraftEditorDecoratedLeaves = __webpack_require__(/*! ./DraftEditorDecoratedLeaves.react */ \"./node_modules/draft-js/lib/DraftEditorDecoratedLeaves.react.js\");\n\nvar DraftEditorLeaf = __webpack_require__(/*! ./DraftEditorLeaf.react */ \"./node_modules/draft-js/lib/DraftEditorLeaf.react.js\");\n\nvar DraftOffsetKey = __webpack_require__(/*! ./DraftOffsetKey */ \"./node_modules/draft-js/lib/DraftOffsetKey.js\");\n\nvar Immutable = __webpack_require__(/*! immutable */ \"./node_modules/immutable/dist/immutable.js\");\n\nvar React = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar cx = __webpack_require__(/*! fbjs/lib/cx */ \"./node_modules/draft-js/node_modules/fbjs/lib/cx.js\");\n\nvar List = Immutable.List;\n\nvar DraftEditorNode =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(DraftEditorNode, _React$Component);\n\n function DraftEditorNode() {\n return _React$Component.apply(this, arguments) || this;\n }\n\n var _proto = DraftEditorNode.prototype;\n\n _proto.render = function render() {\n var _this$props = this.props,\n block = _this$props.block,\n contentState = _this$props.contentState,\n customStyleFn = _this$props.customStyleFn,\n customStyleMap = _this$props.customStyleMap,\n decorator = _this$props.decorator,\n direction = _this$props.direction,\n forceSelection = _this$props.forceSelection,\n hasSelection = _this$props.hasSelection,\n selection = _this$props.selection,\n tree = _this$props.tree;\n var blockKey = block.getKey();\n var text = block.getText();\n var lastLeafSet = tree.size - 1;\n var children = this.props.children || tree.map(function (leafSet, ii) {\n var decoratorKey = leafSet.get('decoratorKey');\n var leavesForLeafSet = leafSet.get('leaves');\n var lastLeaf = leavesForLeafSet.size - 1;\n var Leaves = leavesForLeafSet.map(function (leaf, jj) {\n var offsetKey = DraftOffsetKey.encode(blockKey, ii, jj);\n var start = leaf.get('start');\n var end = leaf.get('end');\n return React.createElement(DraftEditorLeaf, {\n key: offsetKey,\n offsetKey: offsetKey,\n block: block,\n start: start,\n selection: hasSelection ? selection : null,\n forceSelection: forceSelection,\n text: text.slice(start, end),\n styleSet: block.getInlineStyleAt(start),\n customStyleMap: customStyleMap,\n customStyleFn: customStyleFn,\n isLast: decoratorKey === lastLeafSet && jj === lastLeaf\n });\n }).toArray();\n\n if (!decoratorKey || !decorator) {\n return Leaves;\n }\n\n return React.createElement(DraftEditorDecoratedLeaves, {\n block: block,\n children: Leaves,\n contentState: contentState,\n decorator: decorator,\n decoratorKey: decoratorKey,\n direction: direction,\n leafSet: leafSet,\n text: text,\n key: ii\n });\n }).toArray();\n return React.createElement(\"div\", {\n \"data-offset-key\": DraftOffsetKey.encode(blockKey, 0, 0),\n className: cx({\n 'public/DraftStyleDefault/block': true,\n 'public/DraftStyleDefault/ltr': direction === 'LTR',\n 'public/DraftStyleDefault/rtl': direction === 'RTL'\n })\n }, children);\n };\n\n return DraftEditorNode;\n}(React.Component);\n\nmodule.exports = DraftEditorNode;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/DraftEditorNode.react.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/DraftEditorPlaceholder.react.js": +/*!*******************************************************************!*\ + !*** ./node_modules/draft-js/lib/DraftEditorPlaceholder.react.js ***! + \*******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar React = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar cx = __webpack_require__(/*! fbjs/lib/cx */ \"./node_modules/draft-js/node_modules/fbjs/lib/cx.js\");\n\n/**\n * This component is responsible for rendering placeholder text for the\n * `DraftEditor` component.\n *\n * Override placeholder style via CSS.\n */\nvar DraftEditorPlaceholder =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(DraftEditorPlaceholder, _React$Component);\n\n function DraftEditorPlaceholder() {\n return _React$Component.apply(this, arguments) || this;\n }\n\n var _proto = DraftEditorPlaceholder.prototype;\n\n _proto.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {\n return this.props.text !== nextProps.text || this.props.editorState.getSelection().getHasFocus() !== nextProps.editorState.getSelection().getHasFocus();\n };\n\n _proto.render = function render() {\n var hasFocus = this.props.editorState.getSelection().getHasFocus();\n var className = cx({\n 'public/DraftEditorPlaceholder/root': true,\n 'public/DraftEditorPlaceholder/hasFocus': hasFocus\n });\n var contentStyle = {\n whiteSpace: 'pre-wrap'\n };\n return React.createElement(\"div\", {\n className: className\n }, React.createElement(\"div\", {\n className: cx('public/DraftEditorPlaceholder/inner'),\n id: this.props.accessibilityID,\n style: contentStyle\n }, this.props.text));\n };\n\n return DraftEditorPlaceholder;\n}(React.Component);\n\nmodule.exports = DraftEditorPlaceholder;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/DraftEditorPlaceholder.react.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/DraftEditorTextNode.react.js": +/*!****************************************************************!*\ + !*** ./node_modules/draft-js/lib/DraftEditorTextNode.react.js ***! + \****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar React = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar UserAgent = __webpack_require__(/*! fbjs/lib/UserAgent */ \"./node_modules/draft-js/node_modules/fbjs/lib/UserAgent.js\");\n\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ \"./node_modules/draft-js/node_modules/fbjs/lib/invariant.js\");\n\nvar isElement = __webpack_require__(/*! ./isElement */ \"./node_modules/draft-js/lib/isElement.js\"); // In IE, spans with
tags render as two newlines. By rendering a span\n// with only a newline character, we can be sure to render a single line.\n\n\nvar useNewlineChar = UserAgent.isBrowser('IE <= 11');\n/**\n * Check whether the node should be considered a newline.\n */\n\nfunction isNewline(node) {\n return useNewlineChar ? node.textContent === '\\n' : node.tagName === 'BR';\n}\n/**\n * Placeholder elements for empty text content.\n *\n * What is this `data-text` attribute, anyway? It turns out that we need to\n * put an attribute on the lowest-level text node in order to preserve correct\n * spellcheck handling. If the is naked, Chrome and Safari may do\n * bizarre things to do the DOM -- split text nodes, create extra spans, etc.\n * If the has an attribute, this appears not to happen.\n * See http://jsfiddle.net/9khdavod/ for the failure case, and\n * http://jsfiddle.net/7pg143f7/ for the fixed case.\n */\n\n\nvar NEWLINE_A = function NEWLINE_A(ref) {\n return useNewlineChar ? React.createElement(\"span\", {\n key: \"A\",\n \"data-text\": \"true\",\n ref: ref\n }, '\\n') : React.createElement(\"br\", {\n key: \"A\",\n \"data-text\": \"true\",\n ref: ref\n });\n};\n\nvar NEWLINE_B = function NEWLINE_B(ref) {\n return useNewlineChar ? React.createElement(\"span\", {\n key: \"B\",\n \"data-text\": \"true\",\n ref: ref\n }, '\\n') : React.createElement(\"br\", {\n key: \"B\",\n \"data-text\": \"true\",\n ref: ref\n });\n};\n\n/**\n * The lowest-level component in a `DraftEditor`, the text node component\n * replaces the default React text node implementation. This allows us to\n * perform custom handling of newline behavior and avoid re-rendering text\n * nodes with DOM state that already matches the expectations of our immutable\n * editor state.\n */\nvar DraftEditorTextNode =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(DraftEditorTextNode, _React$Component);\n\n function DraftEditorTextNode(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this; // By flipping this flag, we also keep flipping keys which forces\n // React to remount this node every time it rerenders.\n\n _defineProperty(_assertThisInitialized(_this), \"_forceFlag\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_node\", void 0);\n\n _this._forceFlag = false;\n return _this;\n }\n\n var _proto = DraftEditorTextNode.prototype;\n\n _proto.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {\n var node = this._node;\n var shouldBeNewline = nextProps.children === '';\n !isElement(node) ? true ? invariant(false, 'node is not an Element') : undefined : void 0;\n var elementNode = node;\n\n if (shouldBeNewline) {\n return !isNewline(elementNode);\n }\n\n return elementNode.textContent !== nextProps.children;\n };\n\n _proto.componentDidMount = function componentDidMount() {\n this._forceFlag = !this._forceFlag;\n };\n\n _proto.componentDidUpdate = function componentDidUpdate() {\n this._forceFlag = !this._forceFlag;\n };\n\n _proto.render = function render() {\n var _this2 = this;\n\n if (this.props.children === '') {\n return this._forceFlag ? NEWLINE_A(function (ref) {\n return _this2._node = ref;\n }) : NEWLINE_B(function (ref) {\n return _this2._node = ref;\n });\n }\n\n return React.createElement(\"span\", {\n key: this._forceFlag ? 'A' : 'B',\n \"data-text\": \"true\",\n ref: function ref(_ref) {\n return _this2._node = _ref;\n }\n }, this.props.children);\n };\n\n return DraftEditorTextNode;\n}(React.Component);\n\nmodule.exports = DraftEditorTextNode;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/DraftEditorTextNode.react.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/DraftEffects.js": +/*!***************************************************!*\ + !*** ./node_modules/draft-js/lib/DraftEffects.js ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n\nmodule.exports = {\n initODS: function initODS() {},\n handleExtensionCausedError: function handleExtensionCausedError() {}\n};\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/DraftEffects.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/DraftEntity.js": +/*!**************************************************!*\ + !*** ./node_modules/draft-js/lib/DraftEntity.js ***! + \**************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\nvar DraftEntityInstance = __webpack_require__(/*! ./DraftEntityInstance */ \"./node_modules/draft-js/lib/DraftEntityInstance.js\");\n\nvar Immutable = __webpack_require__(/*! immutable */ \"./node_modules/immutable/dist/immutable.js\");\n\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ \"./node_modules/draft-js/node_modules/fbjs/lib/invariant.js\");\n\nvar uuid = __webpack_require__(/*! ./uuid */ \"./node_modules/draft-js/lib/uuid.js\");\n\nvar Map = Immutable.Map;\nvar instances = Map();\nvar instanceKey = uuid();\n/**\n * Temporary utility for generating the warnings\n */\n\nfunction logWarning(oldMethodCall, newMethodCall) {\n console.warn('WARNING: ' + oldMethodCall + ' will be deprecated soon!\\nPlease use \"' + newMethodCall + '\" instead.');\n}\n\n/**\n * A \"document entity\" is an object containing metadata associated with a\n * piece of text in a ContentBlock.\n *\n * For example, a `link` entity might include a `uri` property. When a\n * ContentBlock is rendered in the browser, text that refers to that link\n * entity may be rendered as an anchor, with the `uri` as the href value.\n *\n * In a ContentBlock, every position in the text may correspond to zero\n * or one entities. This correspondence is tracked using a key string,\n * generated via DraftEntity.create() and used to obtain entity metadata\n * via DraftEntity.get().\n */\nvar DraftEntity = {\n /**\n * WARNING: This method will be deprecated soon!\n * Please use 'contentState.getLastCreatedEntityKey' instead.\n * ---\n * Get the random key string from whatever entity was last created.\n * We need this to support the new API, as part of transitioning to put Entity\n * storage in contentState.\n */\n getLastCreatedEntityKey: function getLastCreatedEntityKey() {\n logWarning('DraftEntity.getLastCreatedEntityKey', 'contentState.getLastCreatedEntityKey');\n return DraftEntity.__getLastCreatedEntityKey();\n },\n\n /**\n * WARNING: This method will be deprecated soon!\n * Please use 'contentState.createEntity' instead.\n * ---\n * Create a DraftEntityInstance and store it for later retrieval.\n *\n * A random key string will be generated and returned. This key may\n * be used to track the entity's usage in a ContentBlock, and for\n * retrieving data about the entity at render time.\n */\n create: function create(type, mutability, data) {\n logWarning('DraftEntity.create', 'contentState.createEntity');\n return DraftEntity.__create(type, mutability, data);\n },\n\n /**\n * WARNING: This method will be deprecated soon!\n * Please use 'contentState.addEntity' instead.\n * ---\n * Add an existing DraftEntityInstance to the DraftEntity map. This is\n * useful when restoring instances from the server.\n */\n add: function add(instance) {\n logWarning('DraftEntity.add', 'contentState.addEntity');\n return DraftEntity.__add(instance);\n },\n\n /**\n * WARNING: This method will be deprecated soon!\n * Please use 'contentState.getEntity' instead.\n * ---\n * Retrieve the entity corresponding to the supplied key string.\n */\n get: function get(key) {\n logWarning('DraftEntity.get', 'contentState.getEntity');\n return DraftEntity.__get(key);\n },\n\n /**\n * Get all the entities in the content state.\n */\n __getAll: function __getAll() {\n return instances;\n },\n\n /**\n * Load the entity map with the given set of entities.\n */\n __loadWithEntities: function __loadWithEntities(entities) {\n instances = entities;\n instanceKey = uuid();\n },\n\n /**\n * WARNING: This method will be deprecated soon!\n * Please use 'contentState.mergeEntityData' instead.\n * ---\n * Entity instances are immutable. If you need to update the data for an\n * instance, this method will merge your data updates and return a new\n * instance.\n */\n mergeData: function mergeData(key, toMerge) {\n logWarning('DraftEntity.mergeData', 'contentState.mergeEntityData');\n return DraftEntity.__mergeData(key, toMerge);\n },\n\n /**\n * WARNING: This method will be deprecated soon!\n * Please use 'contentState.replaceEntityData' instead.\n * ---\n * Completely replace the data for a given instance.\n */\n replaceData: function replaceData(key, newData) {\n logWarning('DraftEntity.replaceData', 'contentState.replaceEntityData');\n return DraftEntity.__replaceData(key, newData);\n },\n // ***********************************WARNING******************************\n // --- the above public API will be deprecated in the next version of Draft!\n // The methods below this line are private - don't call them directly.\n\n /**\n * Get the random key string from whatever entity was last created.\n * We need this to support the new API, as part of transitioning to put Entity\n * storage in contentState.\n */\n __getLastCreatedEntityKey: function __getLastCreatedEntityKey() {\n return instanceKey;\n },\n\n /**\n * Create a DraftEntityInstance and store it for later retrieval.\n *\n * A random key string will be generated and returned. This key may\n * be used to track the entity's usage in a ContentBlock, and for\n * retrieving data about the entity at render time.\n */\n __create: function __create(type, mutability, data) {\n return DraftEntity.__add(new DraftEntityInstance({\n type: type,\n mutability: mutability,\n data: data || {}\n }));\n },\n\n /**\n * Add an existing DraftEntityInstance to the DraftEntity map. This is\n * useful when restoring instances from the server.\n */\n __add: function __add(instance) {\n instanceKey = uuid();\n instances = instances.set(instanceKey, instance);\n return instanceKey;\n },\n\n /**\n * Retrieve the entity corresponding to the supplied key string.\n */\n __get: function __get(key) {\n var instance = instances.get(key);\n !!!instance ? true ? invariant(false, 'Unknown DraftEntity key: %s.', key) : undefined : void 0;\n return instance;\n },\n\n /**\n * Entity instances are immutable. If you need to update the data for an\n * instance, this method will merge your data updates and return a new\n * instance.\n */\n __mergeData: function __mergeData(key, toMerge) {\n var instance = DraftEntity.__get(key);\n\n var newData = _objectSpread({}, instance.getData(), toMerge);\n\n var newInstance = instance.set('data', newData);\n instances = instances.set(key, newInstance);\n return newInstance;\n },\n\n /**\n * Completely replace the data for a given instance.\n */\n __replaceData: function __replaceData(key, newData) {\n var instance = DraftEntity.__get(key);\n\n var newInstance = instance.set('data', newData);\n instances = instances.set(key, newInstance);\n return newInstance;\n }\n};\nmodule.exports = DraftEntity;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/DraftEntity.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/DraftEntityInstance.js": +/*!**********************************************************!*\ + !*** ./node_modules/draft-js/lib/DraftEntityInstance.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @legacyServerCallableInstance\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar Immutable = __webpack_require__(/*! immutable */ \"./node_modules/immutable/dist/immutable.js\");\n\nvar Record = Immutable.Record;\nvar DraftEntityInstanceRecord = Record({\n type: 'TOKEN',\n mutability: 'IMMUTABLE',\n data: Object\n});\n/**\n * An instance of a document entity, consisting of a `type` and relevant\n * `data`, metadata about the entity.\n *\n * For instance, a \"link\" entity might provide a URI, and a \"mention\"\n * entity might provide the mentioned user's ID. These pieces of data\n * may be used when rendering the entity as part of a ContentBlock DOM\n * representation. For a link, the data would be used as an href for\n * the rendered anchor. For a mention, the ID could be used to retrieve\n * a hovercard.\n */\n\nvar DraftEntityInstance =\n/*#__PURE__*/\nfunction (_DraftEntityInstanceR) {\n _inheritsLoose(DraftEntityInstance, _DraftEntityInstanceR);\n\n function DraftEntityInstance() {\n return _DraftEntityInstanceR.apply(this, arguments) || this;\n }\n\n var _proto = DraftEntityInstance.prototype;\n\n _proto.getType = function getType() {\n return this.get('type');\n };\n\n _proto.getMutability = function getMutability() {\n return this.get('mutability');\n };\n\n _proto.getData = function getData() {\n return this.get('data');\n };\n\n return DraftEntityInstance;\n}(DraftEntityInstanceRecord);\n\nmodule.exports = DraftEntityInstance;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/DraftEntityInstance.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/DraftEntitySegments.js": +/*!**********************************************************!*\ + !*** ./node_modules/draft-js/lib/DraftEntitySegments.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\n/**\n * Identify the range to delete from a segmented entity.\n *\n * Rules:\n *\n * Example: 'John F. Kennedy'\n *\n * - Deletion from within any non-whitespace (i.e. ['John', 'F.', 'Kennedy'])\n * will return the range of that text.\n *\n * 'John F. Kennedy' -> 'John F.'\n * ^\n *\n * - Forward deletion of whitespace will remove the following section:\n *\n * 'John F. Kennedy' -> 'John Kennedy'\n * ^\n *\n * - Backward deletion of whitespace will remove the previous section:\n *\n * 'John F. Kennedy' -> 'F. Kennedy'\n * ^\n */\nvar DraftEntitySegments = {\n getRemovalRange: function getRemovalRange(selectionStart, selectionEnd, text, entityStart, direction) {\n var segments = text.split(' ');\n segments = segments.map(function (\n /*string*/\n segment,\n /*number*/\n ii) {\n if (direction === 'forward') {\n if (ii > 0) {\n return ' ' + segment;\n }\n } else if (ii < segments.length - 1) {\n return segment + ' ';\n }\n\n return segment;\n });\n var segmentStart = entityStart;\n var segmentEnd;\n var segment;\n var removalStart = null;\n var removalEnd = null;\n\n for (var jj = 0; jj < segments.length; jj++) {\n segment = segments[jj];\n segmentEnd = segmentStart + segment.length; // Our selection overlaps this segment.\n\n if (selectionStart < segmentEnd && segmentStart < selectionEnd) {\n if (removalStart !== null) {\n removalEnd = segmentEnd;\n } else {\n removalStart = segmentStart;\n removalEnd = segmentEnd;\n }\n } else if (removalStart !== null) {\n break;\n }\n\n segmentStart = segmentEnd;\n }\n\n var entityEnd = entityStart + text.length;\n var atStart = removalStart === entityStart;\n var atEnd = removalEnd === entityEnd;\n\n if (!atStart && atEnd || atStart && !atEnd) {\n if (direction === 'forward') {\n if (removalEnd !== entityEnd) {\n removalEnd++;\n }\n } else if (removalStart !== entityStart) {\n removalStart--;\n }\n }\n\n return {\n start: removalStart,\n end: removalEnd\n };\n }\n};\nmodule.exports = DraftEntitySegments;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/DraftEntitySegments.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/DraftJsDebugLogging.js": +/*!**********************************************************!*\ + !*** ./node_modules/draft-js/lib/DraftJsDebugLogging.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n\nmodule.exports = {\n logBlockedSelectionEvent: function logBlockedSelectionEvent() {\n return null;\n },\n logSelectionStateFailure: function logSelectionStateFailure() {\n return null;\n }\n};\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/DraftJsDebugLogging.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/DraftModifier.js": +/*!****************************************************!*\ + !*** ./node_modules/draft-js/lib/DraftModifier.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar CharacterMetadata = __webpack_require__(/*! ./CharacterMetadata */ \"./node_modules/draft-js/lib/CharacterMetadata.js\");\n\nvar ContentStateInlineStyle = __webpack_require__(/*! ./ContentStateInlineStyle */ \"./node_modules/draft-js/lib/ContentStateInlineStyle.js\");\n\nvar applyEntityToContentState = __webpack_require__(/*! ./applyEntityToContentState */ \"./node_modules/draft-js/lib/applyEntityToContentState.js\");\n\nvar getCharacterRemovalRange = __webpack_require__(/*! ./getCharacterRemovalRange */ \"./node_modules/draft-js/lib/getCharacterRemovalRange.js\");\n\nvar getContentStateFragment = __webpack_require__(/*! ./getContentStateFragment */ \"./node_modules/draft-js/lib/getContentStateFragment.js\");\n\nvar Immutable = __webpack_require__(/*! immutable */ \"./node_modules/immutable/dist/immutable.js\");\n\nvar insertFragmentIntoContentState = __webpack_require__(/*! ./insertFragmentIntoContentState */ \"./node_modules/draft-js/lib/insertFragmentIntoContentState.js\");\n\nvar insertTextIntoContentState = __webpack_require__(/*! ./insertTextIntoContentState */ \"./node_modules/draft-js/lib/insertTextIntoContentState.js\");\n\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ \"./node_modules/draft-js/node_modules/fbjs/lib/invariant.js\");\n\nvar modifyBlockForContentState = __webpack_require__(/*! ./modifyBlockForContentState */ \"./node_modules/draft-js/lib/modifyBlockForContentState.js\");\n\nvar removeEntitiesAtEdges = __webpack_require__(/*! ./removeEntitiesAtEdges */ \"./node_modules/draft-js/lib/removeEntitiesAtEdges.js\");\n\nvar removeRangeFromContentState = __webpack_require__(/*! ./removeRangeFromContentState */ \"./node_modules/draft-js/lib/removeRangeFromContentState.js\");\n\nvar splitBlockInContentState = __webpack_require__(/*! ./splitBlockInContentState */ \"./node_modules/draft-js/lib/splitBlockInContentState.js\");\n\nvar OrderedSet = Immutable.OrderedSet;\n/**\n * `DraftModifier` provides a set of convenience methods that apply\n * modifications to a `ContentState` object based on a target `SelectionState`.\n *\n * Any change to a `ContentState` should be decomposable into a series of\n * transaction functions that apply the required changes and return output\n * `ContentState` objects.\n *\n * These functions encapsulate some of the most common transaction sequences.\n */\n\nvar DraftModifier = {\n replaceText: function replaceText(contentState, rangeToReplace, text, inlineStyle, entityKey) {\n var withoutEntities = removeEntitiesAtEdges(contentState, rangeToReplace);\n var withoutText = removeRangeFromContentState(withoutEntities, rangeToReplace);\n var character = CharacterMetadata.create({\n style: inlineStyle || OrderedSet(),\n entity: entityKey || null\n });\n return insertTextIntoContentState(withoutText, withoutText.getSelectionAfter(), text, character);\n },\n insertText: function insertText(contentState, targetRange, text, inlineStyle, entityKey) {\n !targetRange.isCollapsed() ? true ? invariant(false, 'Target range must be collapsed for `insertText`.') : undefined : void 0;\n return DraftModifier.replaceText(contentState, targetRange, text, inlineStyle, entityKey);\n },\n moveText: function moveText(contentState, removalRange, targetRange) {\n var movedFragment = getContentStateFragment(contentState, removalRange);\n var afterRemoval = DraftModifier.removeRange(contentState, removalRange, 'backward');\n return DraftModifier.replaceWithFragment(afterRemoval, targetRange, movedFragment);\n },\n replaceWithFragment: function replaceWithFragment(contentState, targetRange, fragment) {\n var mergeBlockData = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'REPLACE_WITH_NEW_DATA';\n var withoutEntities = removeEntitiesAtEdges(contentState, targetRange);\n var withoutText = removeRangeFromContentState(withoutEntities, targetRange);\n return insertFragmentIntoContentState(withoutText, withoutText.getSelectionAfter(), fragment, mergeBlockData);\n },\n removeRange: function removeRange(contentState, rangeToRemove, removalDirection) {\n var startKey, endKey, startBlock, endBlock;\n\n if (rangeToRemove.getIsBackward()) {\n rangeToRemove = rangeToRemove.merge({\n anchorKey: rangeToRemove.getFocusKey(),\n anchorOffset: rangeToRemove.getFocusOffset(),\n focusKey: rangeToRemove.getAnchorKey(),\n focusOffset: rangeToRemove.getAnchorOffset(),\n isBackward: false\n });\n }\n\n startKey = rangeToRemove.getAnchorKey();\n endKey = rangeToRemove.getFocusKey();\n startBlock = contentState.getBlockForKey(startKey);\n endBlock = contentState.getBlockForKey(endKey);\n var startOffset = rangeToRemove.getStartOffset();\n var endOffset = rangeToRemove.getEndOffset();\n var startEntityKey = startBlock.getEntityAt(startOffset);\n var endEntityKey = endBlock.getEntityAt(endOffset - 1); // Check whether the selection state overlaps with a single entity.\n // If so, try to remove the appropriate substring of the entity text.\n\n if (startKey === endKey) {\n if (startEntityKey && startEntityKey === endEntityKey) {\n var adjustedRemovalRange = getCharacterRemovalRange(contentState.getEntityMap(), startBlock, endBlock, rangeToRemove, removalDirection);\n return removeRangeFromContentState(contentState, adjustedRemovalRange);\n }\n }\n\n var withoutEntities = removeEntitiesAtEdges(contentState, rangeToRemove);\n return removeRangeFromContentState(withoutEntities, rangeToRemove);\n },\n splitBlock: function splitBlock(contentState, selectionState) {\n var withoutEntities = removeEntitiesAtEdges(contentState, selectionState);\n var withoutText = removeRangeFromContentState(withoutEntities, selectionState);\n return splitBlockInContentState(withoutText, withoutText.getSelectionAfter());\n },\n applyInlineStyle: function applyInlineStyle(contentState, selectionState, inlineStyle) {\n return ContentStateInlineStyle.add(contentState, selectionState, inlineStyle);\n },\n removeInlineStyle: function removeInlineStyle(contentState, selectionState, inlineStyle) {\n return ContentStateInlineStyle.remove(contentState, selectionState, inlineStyle);\n },\n setBlockType: function setBlockType(contentState, selectionState, blockType) {\n return modifyBlockForContentState(contentState, selectionState, function (block) {\n return block.merge({\n type: blockType,\n depth: 0\n });\n });\n },\n setBlockData: function setBlockData(contentState, selectionState, blockData) {\n return modifyBlockForContentState(contentState, selectionState, function (block) {\n return block.merge({\n data: blockData\n });\n });\n },\n mergeBlockData: function mergeBlockData(contentState, selectionState, blockData) {\n return modifyBlockForContentState(contentState, selectionState, function (block) {\n return block.merge({\n data: block.getData().merge(blockData)\n });\n });\n },\n applyEntity: function applyEntity(contentState, selectionState, entityKey) {\n var withoutEntities = removeEntitiesAtEdges(contentState, selectionState);\n return applyEntityToContentState(withoutEntities, selectionState, entityKey);\n }\n};\nmodule.exports = DraftModifier;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/DraftModifier.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/DraftOffsetKey.js": +/*!*****************************************************!*\ + !*** ./node_modules/draft-js/lib/DraftOffsetKey.js ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar KEY_DELIMITER = '-';\nvar DraftOffsetKey = {\n encode: function encode(blockKey, decoratorKey, leafKey) {\n return blockKey + KEY_DELIMITER + decoratorKey + KEY_DELIMITER + leafKey;\n },\n decode: function decode(offsetKey) {\n // Extracts the last two parts of offsetKey and captures the rest in blockKeyParts\n var _offsetKey$split$reve = offsetKey.split(KEY_DELIMITER).reverse(),\n leafKey = _offsetKey$split$reve[0],\n decoratorKey = _offsetKey$split$reve[1],\n blockKeyParts = _offsetKey$split$reve.slice(2);\n\n return {\n // Recomposes the parts of blockKey after reversing them\n blockKey: blockKeyParts.reverse().join(KEY_DELIMITER),\n decoratorKey: parseInt(decoratorKey, 10),\n leafKey: parseInt(leafKey, 10)\n };\n }\n};\nmodule.exports = DraftOffsetKey;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/DraftOffsetKey.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/DraftPasteProcessor.js": +/*!**********************************************************!*\ + !*** ./node_modules/draft-js/lib/DraftPasteProcessor.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar ContentBlock = __webpack_require__(/*! ./ContentBlock */ \"./node_modules/draft-js/lib/ContentBlock.js\");\n\nvar ContentBlockNode = __webpack_require__(/*! ./ContentBlockNode */ \"./node_modules/draft-js/lib/ContentBlockNode.js\");\n\nvar convertFromHTMLToContentBlocks = __webpack_require__(/*! ./convertFromHTMLToContentBlocks */ \"./node_modules/draft-js/lib/convertFromHTMLToContentBlocks.js\");\n\nvar generateRandomKey = __webpack_require__(/*! ./generateRandomKey */ \"./node_modules/draft-js/lib/generateRandomKey.js\");\n\nvar getSafeBodyFromHTML = __webpack_require__(/*! ./getSafeBodyFromHTML */ \"./node_modules/draft-js/lib/getSafeBodyFromHTML.js\");\n\nvar gkx = __webpack_require__(/*! ./gkx */ \"./node_modules/draft-js/lib/gkx.js\");\n\nvar Immutable = __webpack_require__(/*! immutable */ \"./node_modules/immutable/dist/immutable.js\");\n\nvar sanitizeDraftText = __webpack_require__(/*! ./sanitizeDraftText */ \"./node_modules/draft-js/lib/sanitizeDraftText.js\");\n\nvar List = Immutable.List,\n Repeat = Immutable.Repeat;\nvar experimentalTreeDataSupport = gkx('draft_tree_data_support');\nvar ContentBlockRecord = experimentalTreeDataSupport ? ContentBlockNode : ContentBlock;\nvar DraftPasteProcessor = {\n processHTML: function processHTML(html, blockRenderMap) {\n return convertFromHTMLToContentBlocks(html, getSafeBodyFromHTML, blockRenderMap);\n },\n processText: function processText(textBlocks, character, type) {\n return textBlocks.reduce(function (acc, textLine, index) {\n textLine = sanitizeDraftText(textLine);\n var key = generateRandomKey();\n var blockNodeConfig = {\n key: key,\n type: type,\n text: textLine,\n characterList: List(Repeat(character, textLine.length))\n }; // next block updates previous block\n\n if (experimentalTreeDataSupport && index !== 0) {\n var prevSiblingIndex = index - 1; // update previous block\n\n var previousBlock = acc[prevSiblingIndex] = acc[prevSiblingIndex].merge({\n nextSibling: key\n });\n blockNodeConfig = _objectSpread({}, blockNodeConfig, {\n prevSibling: previousBlock.getKey()\n });\n }\n\n acc.push(new ContentBlockRecord(blockNodeConfig));\n return acc;\n }, []);\n }\n};\nmodule.exports = DraftPasteProcessor;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/DraftPasteProcessor.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/DraftRemovableWord.js": +/*!*********************************************************!*\ + !*** ./node_modules/draft-js/lib/DraftRemovableWord.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar TokenizeUtil = __webpack_require__(/*! fbjs/lib/TokenizeUtil */ \"./node_modules/draft-js/node_modules/fbjs/lib/TokenizeUtil.js\");\n\nvar punctuation = TokenizeUtil.getPunctuation(); // The apostrophe and curly single quotes behave in a curious way: when\n// surrounded on both sides by word characters, they behave as word chars; when\n// either neighbor is punctuation or an end of the string, they behave as\n// punctuation.\n\nvar CHAMELEON_CHARS = \"['\\u2018\\u2019]\"; // Remove the underscore, which should count as part of the removable word. The\n// \"chameleon chars\" also count as punctuation in this regex.\n\nvar WHITESPACE_AND_PUNCTUATION = '\\\\s|(?![_])' + punctuation;\nvar DELETE_STRING = '^' + '(?:' + WHITESPACE_AND_PUNCTUATION + ')*' + '(?:' + CHAMELEON_CHARS + '|(?!' + WHITESPACE_AND_PUNCTUATION + ').)*' + '(?:(?!' + WHITESPACE_AND_PUNCTUATION + ').)';\nvar DELETE_REGEX = new RegExp(DELETE_STRING);\nvar BACKSPACE_STRING = '(?:(?!' + WHITESPACE_AND_PUNCTUATION + ').)' + '(?:' + CHAMELEON_CHARS + '|(?!' + WHITESPACE_AND_PUNCTUATION + ').)*' + '(?:' + WHITESPACE_AND_PUNCTUATION + ')*' + '$';\nvar BACKSPACE_REGEX = new RegExp(BACKSPACE_STRING);\n\nfunction getRemovableWord(text, isBackward) {\n var matches = isBackward ? BACKSPACE_REGEX.exec(text) : DELETE_REGEX.exec(text);\n return matches ? matches[0] : text;\n}\n\nvar DraftRemovableWord = {\n getBackward: function getBackward(text) {\n return getRemovableWord(text, true);\n },\n getForward: function getForward(text) {\n return getRemovableWord(text, false);\n }\n};\nmodule.exports = DraftRemovableWord;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/DraftRemovableWord.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/DraftStringKey.js": +/*!*****************************************************!*\ + !*** ./node_modules/draft-js/lib/DraftStringKey.js ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar DraftStringKey = {\n stringify: function stringify(key) {\n return '_' + String(key);\n },\n unstringify: function unstringify(key) {\n return key.slice(1);\n }\n};\nmodule.exports = DraftStringKey;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/DraftStringKey.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/DraftTreeAdapter.js": +/*!*******************************************************!*\ + !*** ./node_modules/draft-js/lib/DraftTreeAdapter.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n *\n * This is unstable and not part of the public API and should not be used by\n * production systems. This file may be update/removed without notice.\n */\nvar generateRandomKey = __webpack_require__(/*! ./generateRandomKey */ \"./node_modules/draft-js/lib/generateRandomKey.js\");\n\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ \"./node_modules/draft-js/node_modules/fbjs/lib/invariant.js\");\n\nvar traverseInDepthOrder = function traverseInDepthOrder(blocks, fn) {\n var stack = [].concat(blocks).reverse();\n\n while (stack.length) {\n var _block = stack.pop();\n\n fn(_block);\n var children = _block.children;\n !Array.isArray(children) ? true ? invariant(false, 'Invalid tree raw block') : undefined : void 0;\n stack = stack.concat([].concat(children.reverse()));\n }\n};\n\nvar isListBlock = function isListBlock(block) {\n if (!(block && block.type)) {\n return false;\n }\n\n var type = block.type;\n return type === 'unordered-list-item' || type === 'ordered-list-item';\n};\n\nvar addDepthToChildren = function addDepthToChildren(block) {\n if (Array.isArray(block.children)) {\n block.children = block.children.map(function (child) {\n return child.type === block.type ? _objectSpread({}, child, {\n depth: (block.depth || 0) + 1\n }) : child;\n });\n }\n};\n/**\n * This adapter is intended to be be used as an adapter to draft tree data\n *\n * draft state <=====> draft tree state\n */\n\n\nvar DraftTreeAdapter = {\n /**\n * Converts from a tree raw state back to draft raw state\n */\n fromRawTreeStateToRawState: function fromRawTreeStateToRawState(draftTreeState) {\n var blocks = draftTreeState.blocks;\n var transformedBlocks = [];\n !Array.isArray(blocks) ? true ? invariant(false, 'Invalid raw state') : undefined : void 0;\n\n if (!Array.isArray(blocks) || !blocks.length) {\n return draftTreeState;\n }\n\n traverseInDepthOrder(blocks, function (block) {\n var newBlock = _objectSpread({}, block);\n\n if (isListBlock(block)) {\n newBlock.depth = newBlock.depth || 0;\n addDepthToChildren(block); // if it's a non-leaf node, we don't do anything else\n\n if (block.children != null && block.children.length > 0) {\n return;\n }\n }\n\n delete newBlock.children;\n transformedBlocks.push(newBlock);\n });\n draftTreeState.blocks = transformedBlocks;\n return _objectSpread({}, draftTreeState, {\n blocks: transformedBlocks\n });\n },\n\n /**\n * Converts from draft raw state to tree draft state\n */\n fromRawStateToRawTreeState: function fromRawStateToRawTreeState(draftState) {\n var transformedBlocks = [];\n var parentStack = [];\n draftState.blocks.forEach(function (block) {\n var isList = isListBlock(block);\n var depth = block.depth || 0;\n\n var treeBlock = _objectSpread({}, block, {\n children: []\n });\n\n if (!isList) {\n transformedBlocks.push(treeBlock);\n return;\n }\n\n var lastParent = parentStack[0]; // block is non-nested & there are no nested blocks, directly push block\n\n if (lastParent == null && depth === 0) {\n transformedBlocks.push(treeBlock); // block is first nested block or previous nested block is at a lower level\n } else if (lastParent == null || lastParent.depth < depth - 1) {\n // create new parent block\n var newParent = {\n key: generateRandomKey(),\n text: '',\n depth: depth - 1,\n type: block.type,\n children: [],\n entityRanges: [],\n inlineStyleRanges: []\n };\n parentStack.unshift(newParent);\n\n if (depth === 1) {\n // add as a root-level block\n transformedBlocks.push(newParent);\n } else if (lastParent != null) {\n // depth > 1 => also add as previous parent's child\n lastParent.children.push(newParent);\n }\n\n newParent.children.push(treeBlock);\n } else if (lastParent.depth === depth - 1) {\n // add as child of last parent\n lastParent.children.push(treeBlock);\n } else {\n // pop out parents at levels above this one from the parent stack\n while (lastParent != null && lastParent.depth >= depth) {\n parentStack.shift();\n lastParent = parentStack[0];\n }\n\n if (depth > 0) {\n lastParent.children.push(treeBlock);\n } else {\n transformedBlocks.push(treeBlock);\n }\n }\n });\n return _objectSpread({}, draftState, {\n blocks: transformedBlocks\n });\n }\n};\nmodule.exports = DraftTreeAdapter;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/DraftTreeAdapter.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/DraftTreeInvariants.js": +/*!**********************************************************!*\ + !*** ./node_modules/draft-js/lib/DraftTreeInvariants.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n *\n * This is unstable and not part of the public API and should not be used by\n * production systems. This file may be update/removed without notice.\n */\nvar warning = __webpack_require__(/*! fbjs/lib/warning */ \"./node_modules/draft-js/node_modules/fbjs/lib/warning.js\");\n\nvar DraftTreeInvariants = {\n /**\n * Check if the block is valid\n */\n isValidBlock: function isValidBlock(block, blockMap) {\n var key = block.getKey(); // is its parent's child\n\n var parentKey = block.getParentKey();\n\n if (parentKey != null) {\n var parent = blockMap.get(parentKey);\n\n if (!parent.getChildKeys().includes(key)) {\n true ? warning(true, 'Tree is missing parent -> child pointer on %s', key) : undefined;\n return false;\n }\n } // is its children's parent\n\n\n var children = block.getChildKeys().map(function (k) {\n return blockMap.get(k);\n });\n\n if (!children.every(function (c) {\n return c.getParentKey() === key;\n })) {\n true ? warning(true, 'Tree is missing child -> parent pointer on %s', key) : undefined;\n return false;\n } // is its previous sibling's next sibling\n\n\n var prevSiblingKey = block.getPrevSiblingKey();\n\n if (prevSiblingKey != null) {\n var prevSibling = blockMap.get(prevSiblingKey);\n\n if (prevSibling.getNextSiblingKey() !== key) {\n true ? warning(true, \"Tree is missing nextSibling pointer on %s's prevSibling\", key) : undefined;\n return false;\n }\n } // is its next sibling's previous sibling\n\n\n var nextSiblingKey = block.getNextSiblingKey();\n\n if (nextSiblingKey != null) {\n var nextSibling = blockMap.get(nextSiblingKey);\n\n if (nextSibling.getPrevSiblingKey() !== key) {\n true ? warning(true, \"Tree is missing prevSibling pointer on %s's nextSibling\", key) : undefined;\n return false;\n }\n } // no 2-node cycles\n\n\n if (nextSiblingKey !== null && prevSiblingKey !== null) {\n if (prevSiblingKey === nextSiblingKey) {\n true ? warning(true, 'Tree has a two-node cycle at %s', key) : undefined;\n return false;\n }\n } // if it's a leaf node, it has text but no children\n\n\n if (block.text != '') {\n if (block.getChildKeys().size > 0) {\n true ? warning(true, 'Leaf node %s has children', key) : undefined;\n return false;\n }\n }\n\n return true;\n },\n\n /**\n * Checks that this is a connected tree on all the blocks\n * starting from the first block, traversing nextSibling and child pointers\n * should be a tree (preorder traversal - parent, then children)\n * num of connected node === number of blocks\n */\n isConnectedTree: function isConnectedTree(blockMap) {\n // exactly one node has no previous sibling + no parent\n var eligibleFirstNodes = blockMap.toArray().filter(function (block) {\n return block.getParentKey() == null && block.getPrevSiblingKey() == null;\n });\n\n if (eligibleFirstNodes.length !== 1) {\n true ? warning(true, 'Tree is not connected. More or less than one first node') : undefined;\n return false;\n }\n\n var firstNode = eligibleFirstNodes.shift();\n var nodesSeen = 0;\n var currentKey = firstNode.getKey();\n var visitedStack = [];\n\n while (currentKey != null) {\n var currentNode = blockMap.get(currentKey);\n var childKeys = currentNode.getChildKeys();\n var nextSiblingKey = currentNode.getNextSiblingKey(); // if the node has children, add parent's next sibling to stack and go to children\n\n if (childKeys.size > 0) {\n if (nextSiblingKey != null) {\n visitedStack.unshift(nextSiblingKey);\n }\n\n var children = childKeys.map(function (k) {\n return blockMap.get(k);\n });\n\n var _firstNode = children.find(function (block) {\n return block.getPrevSiblingKey() == null;\n });\n\n if (_firstNode == null) {\n true ? warning(true, '%s has no first child', currentKey) : undefined;\n return false;\n }\n\n currentKey = _firstNode.getKey(); // TODO(T32490138): Deal with multi-node cycles here\n } else {\n if (currentNode.getNextSiblingKey() != null) {\n currentKey = currentNode.getNextSiblingKey();\n } else {\n currentKey = visitedStack.shift();\n }\n }\n\n nodesSeen++;\n }\n\n if (nodesSeen !== blockMap.size) {\n true ? warning(true, 'Tree is not connected. %s nodes were seen instead of %s', nodesSeen, blockMap.size) : undefined;\n return false;\n }\n\n return true;\n },\n\n /**\n * Checks that the block map is a connected tree with valid blocks\n */\n isValidTree: function isValidTree(blockMap) {\n var _this = this;\n\n var blocks = blockMap.toArray();\n\n if (!blocks.every(function (block) {\n return _this.isValidBlock(block, blockMap);\n })) {\n return false;\n }\n\n return this.isConnectedTree(blockMap);\n }\n};\nmodule.exports = DraftTreeInvariants;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/DraftTreeInvariants.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/EditorBidiService.js": +/*!********************************************************!*\ + !*** ./node_modules/draft-js/lib/EditorBidiService.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar UnicodeBidiService = __webpack_require__(/*! fbjs/lib/UnicodeBidiService */ \"./node_modules/draft-js/node_modules/fbjs/lib/UnicodeBidiService.js\");\n\nvar Immutable = __webpack_require__(/*! immutable */ \"./node_modules/immutable/dist/immutable.js\");\n\nvar nullthrows = __webpack_require__(/*! fbjs/lib/nullthrows */ \"./node_modules/draft-js/node_modules/fbjs/lib/nullthrows.js\");\n\nvar OrderedMap = Immutable.OrderedMap;\nvar bidiService;\nvar EditorBidiService = {\n getDirectionMap: function getDirectionMap(content, prevBidiMap) {\n if (!bidiService) {\n bidiService = new UnicodeBidiService();\n } else {\n bidiService.reset();\n }\n\n var blockMap = content.getBlockMap();\n var nextBidi = blockMap.valueSeq().map(function (block) {\n return nullthrows(bidiService).getDirection(block.getText());\n });\n var bidiMap = OrderedMap(blockMap.keySeq().zip(nextBidi));\n\n if (prevBidiMap != null && Immutable.is(prevBidiMap, bidiMap)) {\n return prevBidiMap;\n }\n\n return bidiMap;\n }\n};\nmodule.exports = EditorBidiService;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/EditorBidiService.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/EditorState.js": +/*!**************************************************!*\ + !*** ./node_modules/draft-js/lib/EditorState.js ***! + \**************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar BlockTree = __webpack_require__(/*! ./BlockTree */ \"./node_modules/draft-js/lib/BlockTree.js\");\n\nvar ContentState = __webpack_require__(/*! ./ContentState */ \"./node_modules/draft-js/lib/ContentState.js\");\n\nvar EditorBidiService = __webpack_require__(/*! ./EditorBidiService */ \"./node_modules/draft-js/lib/EditorBidiService.js\");\n\nvar SelectionState = __webpack_require__(/*! ./SelectionState */ \"./node_modules/draft-js/lib/SelectionState.js\");\n\nvar Immutable = __webpack_require__(/*! immutable */ \"./node_modules/immutable/dist/immutable.js\");\n\nvar OrderedSet = Immutable.OrderedSet,\n Record = Immutable.Record,\n Stack = Immutable.Stack,\n OrderedMap = Immutable.OrderedMap,\n List = Immutable.List; // When configuring an editor, the user can chose to provide or not provide\n// basically all keys. `currentContent` varies, so this type doesn't include it.\n// (See the types defined below.)\n\nvar defaultRecord = {\n allowUndo: true,\n currentContent: null,\n decorator: null,\n directionMap: null,\n forceSelection: false,\n inCompositionMode: false,\n inlineStyleOverride: null,\n lastChangeType: null,\n nativelyRenderedContent: null,\n redoStack: Stack(),\n selection: null,\n treeMap: null,\n undoStack: Stack()\n};\nvar EditorStateRecord = Record(defaultRecord);\n\nvar EditorState =\n/*#__PURE__*/\nfunction () {\n EditorState.createEmpty = function createEmpty(decorator) {\n return EditorState.createWithContent(ContentState.createFromText(''), decorator);\n };\n\n EditorState.createWithContent = function createWithContent(contentState, decorator) {\n if (contentState.getBlockMap().count() === 0) {\n return EditorState.createEmpty(decorator);\n }\n\n var firstKey = contentState.getBlockMap().first().getKey();\n return EditorState.create({\n currentContent: contentState,\n undoStack: Stack(),\n redoStack: Stack(),\n decorator: decorator || null,\n selection: SelectionState.createEmpty(firstKey)\n });\n };\n\n EditorState.create = function create(config) {\n var currentContent = config.currentContent,\n decorator = config.decorator;\n\n var recordConfig = _objectSpread({}, config, {\n treeMap: generateNewTreeMap(currentContent, decorator),\n directionMap: EditorBidiService.getDirectionMap(currentContent)\n });\n\n return new EditorState(new EditorStateRecord(recordConfig));\n };\n\n EditorState.fromJS = function fromJS(config) {\n return new EditorState(new EditorStateRecord(_objectSpread({}, config, {\n directionMap: config.directionMap != null ? OrderedMap(config.directionMap) : config.directionMap,\n inlineStyleOverride: config.inlineStyleOverride != null ? OrderedSet(config.inlineStyleOverride) : config.inlineStyleOverride,\n nativelyRenderedContent: config.nativelyRenderedContent != null ? ContentState.fromJS(config.nativelyRenderedContent) : config.nativelyRenderedContent,\n redoStack: config.redoStack != null ? Stack(config.redoStack.map(function (v) {\n return ContentState.fromJS(v);\n })) : config.redoStack,\n selection: config.selection != null ? new SelectionState(config.selection) : config.selection,\n treeMap: config.treeMap != null ? OrderedMap(config.treeMap).map(function (v) {\n return List(v).map(function (v) {\n return BlockTree.fromJS(v);\n });\n }) : config.treeMap,\n undoStack: config.undoStack != null ? Stack(config.undoStack.map(function (v) {\n return ContentState.fromJS(v);\n })) : config.undoStack,\n currentContent: ContentState.fromJS(config.currentContent)\n })));\n };\n\n EditorState.set = function set(editorState, put) {\n var map = editorState.getImmutable().withMutations(function (state) {\n var existingDecorator = state.get('decorator');\n var decorator = existingDecorator;\n\n if (put.decorator === null) {\n decorator = null;\n } else if (put.decorator) {\n decorator = put.decorator;\n }\n\n var newContent = put.currentContent || editorState.getCurrentContent();\n\n if (decorator !== existingDecorator) {\n var treeMap = state.get('treeMap');\n var newTreeMap;\n\n if (decorator && existingDecorator) {\n newTreeMap = regenerateTreeForNewDecorator(newContent, newContent.getBlockMap(), treeMap, decorator, existingDecorator);\n } else {\n newTreeMap = generateNewTreeMap(newContent, decorator);\n }\n\n state.merge({\n decorator: decorator,\n treeMap: newTreeMap,\n nativelyRenderedContent: null\n });\n return;\n }\n\n var existingContent = editorState.getCurrentContent();\n\n if (newContent !== existingContent) {\n state.set('treeMap', regenerateTreeForNewBlocks(editorState, newContent.getBlockMap(), newContent.getEntityMap(), decorator));\n }\n\n state.merge(put);\n });\n return new EditorState(map);\n };\n\n var _proto = EditorState.prototype;\n\n _proto.toJS = function toJS() {\n return this.getImmutable().toJS();\n };\n\n _proto.getAllowUndo = function getAllowUndo() {\n return this.getImmutable().get('allowUndo');\n };\n\n _proto.getCurrentContent = function getCurrentContent() {\n return this.getImmutable().get('currentContent');\n };\n\n _proto.getUndoStack = function getUndoStack() {\n return this.getImmutable().get('undoStack');\n };\n\n _proto.getRedoStack = function getRedoStack() {\n return this.getImmutable().get('redoStack');\n };\n\n _proto.getSelection = function getSelection() {\n return this.getImmutable().get('selection');\n };\n\n _proto.getDecorator = function getDecorator() {\n return this.getImmutable().get('decorator');\n };\n\n _proto.isInCompositionMode = function isInCompositionMode() {\n return this.getImmutable().get('inCompositionMode');\n };\n\n _proto.mustForceSelection = function mustForceSelection() {\n return this.getImmutable().get('forceSelection');\n };\n\n _proto.getNativelyRenderedContent = function getNativelyRenderedContent() {\n return this.getImmutable().get('nativelyRenderedContent');\n };\n\n _proto.getLastChangeType = function getLastChangeType() {\n return this.getImmutable().get('lastChangeType');\n }\n /**\n * While editing, the user may apply inline style commands with a collapsed\n * cursor, intending to type text that adopts the specified style. In this\n * case, we track the specified style as an \"override\" that takes precedence\n * over the inline style of the text adjacent to the cursor.\n *\n * If null, there is no override in place.\n */\n ;\n\n _proto.getInlineStyleOverride = function getInlineStyleOverride() {\n return this.getImmutable().get('inlineStyleOverride');\n };\n\n EditorState.setInlineStyleOverride = function setInlineStyleOverride(editorState, inlineStyleOverride) {\n return EditorState.set(editorState, {\n inlineStyleOverride: inlineStyleOverride\n });\n }\n /**\n * Get the appropriate inline style for the editor state. If an\n * override is in place, use it. Otherwise, the current style is\n * based on the location of the selection state.\n */\n ;\n\n _proto.getCurrentInlineStyle = function getCurrentInlineStyle() {\n var override = this.getInlineStyleOverride();\n\n if (override != null) {\n return override;\n }\n\n var content = this.getCurrentContent();\n var selection = this.getSelection();\n\n if (selection.isCollapsed()) {\n return getInlineStyleForCollapsedSelection(content, selection);\n }\n\n return getInlineStyleForNonCollapsedSelection(content, selection);\n };\n\n _proto.getBlockTree = function getBlockTree(blockKey) {\n return this.getImmutable().getIn(['treeMap', blockKey]);\n };\n\n _proto.isSelectionAtStartOfContent = function isSelectionAtStartOfContent() {\n var firstKey = this.getCurrentContent().getBlockMap().first().getKey();\n return this.getSelection().hasEdgeWithin(firstKey, 0, 0);\n };\n\n _proto.isSelectionAtEndOfContent = function isSelectionAtEndOfContent() {\n var content = this.getCurrentContent();\n var blockMap = content.getBlockMap();\n var last = blockMap.last();\n var end = last.getLength();\n return this.getSelection().hasEdgeWithin(last.getKey(), end, end);\n };\n\n _proto.getDirectionMap = function getDirectionMap() {\n return this.getImmutable().get('directionMap');\n }\n /**\n * Incorporate native DOM selection changes into the EditorState. This\n * method can be used when we simply want to accept whatever the DOM\n * has given us to represent selection, and we do not need to re-render\n * the editor.\n *\n * To forcibly move the DOM selection, see `EditorState.forceSelection`.\n */\n ;\n\n EditorState.acceptSelection = function acceptSelection(editorState, selection) {\n return updateSelection(editorState, selection, false);\n }\n /**\n * At times, we need to force the DOM selection to be where we\n * need it to be. This can occur when the anchor or focus nodes\n * are non-text nodes, for instance. In this case, we want to trigger\n * a re-render of the editor, which in turn forces selection into\n * the correct place in the DOM. The `forceSelection` method\n * accomplishes this.\n *\n * This method should be used in cases where you need to explicitly\n * move the DOM selection from one place to another without a change\n * in ContentState.\n */\n ;\n\n EditorState.forceSelection = function forceSelection(editorState, selection) {\n if (!selection.getHasFocus()) {\n selection = selection.set('hasFocus', true);\n }\n\n return updateSelection(editorState, selection, true);\n }\n /**\n * Move selection to the end of the editor without forcing focus.\n */\n ;\n\n EditorState.moveSelectionToEnd = function moveSelectionToEnd(editorState) {\n var content = editorState.getCurrentContent();\n var lastBlock = content.getLastBlock();\n var lastKey = lastBlock.getKey();\n var length = lastBlock.getLength();\n return EditorState.acceptSelection(editorState, new SelectionState({\n anchorKey: lastKey,\n anchorOffset: length,\n focusKey: lastKey,\n focusOffset: length,\n isBackward: false\n }));\n }\n /**\n * Force focus to the end of the editor. This is useful in scenarios\n * where we want to programmatically focus the input and it makes sense\n * to allow the user to continue working seamlessly.\n */\n ;\n\n EditorState.moveFocusToEnd = function moveFocusToEnd(editorState) {\n var afterSelectionMove = EditorState.moveSelectionToEnd(editorState);\n return EditorState.forceSelection(afterSelectionMove, afterSelectionMove.getSelection());\n }\n /**\n * Push the current ContentState onto the undo stack if it should be\n * considered a boundary state, and set the provided ContentState as the\n * new current content.\n */\n ;\n\n EditorState.push = function push(editorState, contentState, changeType) {\n var forceSelection = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;\n\n if (editorState.getCurrentContent() === contentState) {\n return editorState;\n }\n\n var directionMap = EditorBidiService.getDirectionMap(contentState, editorState.getDirectionMap());\n\n if (!editorState.getAllowUndo()) {\n return EditorState.set(editorState, {\n currentContent: contentState,\n directionMap: directionMap,\n lastChangeType: changeType,\n selection: contentState.getSelectionAfter(),\n forceSelection: forceSelection,\n inlineStyleOverride: null\n });\n }\n\n var selection = editorState.getSelection();\n var currentContent = editorState.getCurrentContent();\n var undoStack = editorState.getUndoStack();\n var newContent = contentState;\n\n if (selection !== currentContent.getSelectionAfter() || mustBecomeBoundary(editorState, changeType)) {\n undoStack = undoStack.push(currentContent);\n newContent = newContent.set('selectionBefore', selection);\n } else if (changeType === 'insert-characters' || changeType === 'backspace-character' || changeType === 'delete-character') {\n // Preserve the previous selection.\n newContent = newContent.set('selectionBefore', currentContent.getSelectionBefore());\n }\n\n var inlineStyleOverride = editorState.getInlineStyleOverride(); // Don't discard inline style overrides for the following change types:\n\n var overrideChangeTypes = ['adjust-depth', 'change-block-type', 'split-block'];\n\n if (overrideChangeTypes.indexOf(changeType) === -1) {\n inlineStyleOverride = null;\n }\n\n var editorStateChanges = {\n currentContent: newContent,\n directionMap: directionMap,\n undoStack: undoStack,\n redoStack: Stack(),\n lastChangeType: changeType,\n selection: contentState.getSelectionAfter(),\n forceSelection: forceSelection,\n inlineStyleOverride: inlineStyleOverride\n };\n return EditorState.set(editorState, editorStateChanges);\n }\n /**\n * Make the top ContentState in the undo stack the new current content and\n * push the current content onto the redo stack.\n */\n ;\n\n EditorState.undo = function undo(editorState) {\n if (!editorState.getAllowUndo()) {\n return editorState;\n }\n\n var undoStack = editorState.getUndoStack();\n var newCurrentContent = undoStack.peek();\n\n if (!newCurrentContent) {\n return editorState;\n }\n\n var currentContent = editorState.getCurrentContent();\n var directionMap = EditorBidiService.getDirectionMap(newCurrentContent, editorState.getDirectionMap());\n return EditorState.set(editorState, {\n currentContent: newCurrentContent,\n directionMap: directionMap,\n undoStack: undoStack.shift(),\n redoStack: editorState.getRedoStack().push(currentContent),\n forceSelection: true,\n inlineStyleOverride: null,\n lastChangeType: 'undo',\n nativelyRenderedContent: null,\n selection: currentContent.getSelectionBefore()\n });\n }\n /**\n * Make the top ContentState in the redo stack the new current content and\n * push the current content onto the undo stack.\n */\n ;\n\n EditorState.redo = function redo(editorState) {\n if (!editorState.getAllowUndo()) {\n return editorState;\n }\n\n var redoStack = editorState.getRedoStack();\n var newCurrentContent = redoStack.peek();\n\n if (!newCurrentContent) {\n return editorState;\n }\n\n var currentContent = editorState.getCurrentContent();\n var directionMap = EditorBidiService.getDirectionMap(newCurrentContent, editorState.getDirectionMap());\n return EditorState.set(editorState, {\n currentContent: newCurrentContent,\n directionMap: directionMap,\n undoStack: editorState.getUndoStack().push(currentContent),\n redoStack: redoStack.shift(),\n forceSelection: true,\n inlineStyleOverride: null,\n lastChangeType: 'redo',\n nativelyRenderedContent: null,\n selection: newCurrentContent.getSelectionAfter()\n });\n }\n /**\n * Not for public consumption.\n */\n ;\n\n function EditorState(immutable) {\n _defineProperty(this, \"_immutable\", void 0);\n\n this._immutable = immutable;\n }\n /**\n * Not for public consumption.\n */\n\n\n _proto.getImmutable = function getImmutable() {\n return this._immutable;\n };\n\n return EditorState;\n}();\n/**\n * Set the supplied SelectionState as the new current selection, and set\n * the `force` flag to trigger manual selection placement by the view.\n */\n\n\nfunction updateSelection(editorState, selection, forceSelection) {\n return EditorState.set(editorState, {\n selection: selection,\n forceSelection: forceSelection,\n nativelyRenderedContent: null,\n inlineStyleOverride: null\n });\n}\n/**\n * Regenerate the entire tree map for a given ContentState and decorator.\n * Returns an OrderedMap that maps all available ContentBlock objects.\n */\n\n\nfunction generateNewTreeMap(contentState, decorator) {\n return contentState.getBlockMap().map(function (block) {\n return BlockTree.generate(contentState, block, decorator);\n }).toOrderedMap();\n}\n/**\n * Regenerate tree map objects for all ContentBlocks that have changed\n * between the current editorState and newContent. Returns an OrderedMap\n * with only changed regenerated tree map objects.\n */\n\n\nfunction regenerateTreeForNewBlocks(editorState, newBlockMap, newEntityMap, decorator) {\n var contentState = editorState.getCurrentContent().set('entityMap', newEntityMap);\n var prevBlockMap = contentState.getBlockMap();\n var prevTreeMap = editorState.getImmutable().get('treeMap');\n return prevTreeMap.merge(newBlockMap.toSeq().filter(function (block, key) {\n return block !== prevBlockMap.get(key);\n }).map(function (block) {\n return BlockTree.generate(contentState, block, decorator);\n }));\n}\n/**\n * Generate tree map objects for a new decorator object, preserving any\n * decorations that are unchanged from the previous decorator.\n *\n * Note that in order for this to perform optimally, decoration Lists for\n * decorators should be preserved when possible to allow for direct immutable\n * List comparison.\n */\n\n\nfunction regenerateTreeForNewDecorator(content, blockMap, previousTreeMap, decorator, existingDecorator) {\n return previousTreeMap.merge(blockMap.toSeq().filter(function (block) {\n return decorator.getDecorations(block, content) !== existingDecorator.getDecorations(block, content);\n }).map(function (block) {\n return BlockTree.generate(content, block, decorator);\n }));\n}\n/**\n * Return whether a change should be considered a boundary state, given\n * the previous change type. Allows us to discard potential boundary states\n * during standard typing or deletion behavior.\n */\n\n\nfunction mustBecomeBoundary(editorState, changeType) {\n var lastChangeType = editorState.getLastChangeType();\n return changeType !== lastChangeType || changeType !== 'insert-characters' && changeType !== 'backspace-character' && changeType !== 'delete-character';\n}\n\nfunction getInlineStyleForCollapsedSelection(content, selection) {\n var startKey = selection.getStartKey();\n var startOffset = selection.getStartOffset();\n var startBlock = content.getBlockForKey(startKey); // If the cursor is not at the start of the block, look backward to\n // preserve the style of the preceding character.\n\n if (startOffset > 0) {\n return startBlock.getInlineStyleAt(startOffset - 1);\n } // The caret is at position zero in this block. If the block has any\n // text at all, use the style of the first character.\n\n\n if (startBlock.getLength()) {\n return startBlock.getInlineStyleAt(0);\n } // Otherwise, look upward in the document to find the closest character.\n\n\n return lookUpwardForInlineStyle(content, startKey);\n}\n\nfunction getInlineStyleForNonCollapsedSelection(content, selection) {\n var startKey = selection.getStartKey();\n var startOffset = selection.getStartOffset();\n var startBlock = content.getBlockForKey(startKey); // If there is a character just inside the selection, use its style.\n\n if (startOffset < startBlock.getLength()) {\n return startBlock.getInlineStyleAt(startOffset);\n } // Check if the selection at the end of a non-empty block. Use the last\n // style in the block.\n\n\n if (startOffset > 0) {\n return startBlock.getInlineStyleAt(startOffset - 1);\n } // Otherwise, look upward in the document to find the closest character.\n\n\n return lookUpwardForInlineStyle(content, startKey);\n}\n\nfunction lookUpwardForInlineStyle(content, fromKey) {\n var lastNonEmpty = content.getBlockMap().reverse().skipUntil(function (_, k) {\n return k === fromKey;\n }).skip(1).skipUntil(function (block, _) {\n return block.getLength();\n }).first();\n\n if (lastNonEmpty) {\n return lastNonEmpty.getInlineStyleAt(lastNonEmpty.getLength() - 1);\n }\n\n return OrderedSet();\n}\n\nmodule.exports = EditorState;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/EditorState.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/KeyBindingUtil.js": +/*!*****************************************************!*\ + !*** ./node_modules/draft-js/lib/KeyBindingUtil.js ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar UserAgent = __webpack_require__(/*! fbjs/lib/UserAgent */ \"./node_modules/draft-js/node_modules/fbjs/lib/UserAgent.js\");\n\nvar isSoftNewlineEvent = __webpack_require__(/*! ./isSoftNewlineEvent */ \"./node_modules/draft-js/lib/isSoftNewlineEvent.js\");\n\nvar isOSX = UserAgent.isPlatform('Mac OS X');\nvar KeyBindingUtil = {\n /**\n * Check whether the ctrlKey modifier is *not* being used in conjunction with\n * the altKey modifier. If they are combined, the result is an `altGraph`\n * key modifier, which should not be handled by this set of key bindings.\n */\n isCtrlKeyCommand: function isCtrlKeyCommand(e) {\n return !!e.ctrlKey && !e.altKey;\n },\n isOptionKeyCommand: function isOptionKeyCommand(e) {\n return isOSX && e.altKey;\n },\n usesMacOSHeuristics: function usesMacOSHeuristics() {\n return isOSX;\n },\n hasCommandModifier: function hasCommandModifier(e) {\n return isOSX ? !!e.metaKey && !e.altKey : KeyBindingUtil.isCtrlKeyCommand(e);\n },\n isSoftNewlineEvent: isSoftNewlineEvent\n};\nmodule.exports = KeyBindingUtil;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/KeyBindingUtil.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/RawDraftContentState.js": +/*!***********************************************************!*\ + !*** ./node_modules/draft-js/lib/RawDraftContentState.js ***! + \***********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/RawDraftContentState.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/RichTextEditorUtil.js": +/*!*********************************************************!*\ + !*** ./node_modules/draft-js/lib/RichTextEditorUtil.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar DraftModifier = __webpack_require__(/*! ./DraftModifier */ \"./node_modules/draft-js/lib/DraftModifier.js\");\n\nvar EditorState = __webpack_require__(/*! ./EditorState */ \"./node_modules/draft-js/lib/EditorState.js\");\n\nvar adjustBlockDepthForContentState = __webpack_require__(/*! ./adjustBlockDepthForContentState */ \"./node_modules/draft-js/lib/adjustBlockDepthForContentState.js\");\n\nvar nullthrows = __webpack_require__(/*! fbjs/lib/nullthrows */ \"./node_modules/draft-js/node_modules/fbjs/lib/nullthrows.js\");\n\nvar RichTextEditorUtil = {\n currentBlockContainsLink: function currentBlockContainsLink(editorState) {\n var selection = editorState.getSelection();\n var contentState = editorState.getCurrentContent();\n var entityMap = contentState.getEntityMap();\n return contentState.getBlockForKey(selection.getAnchorKey()).getCharacterList().slice(selection.getStartOffset(), selection.getEndOffset()).some(function (v) {\n var entity = v.getEntity();\n return !!entity && entityMap.__get(entity).getType() === 'LINK';\n });\n },\n getCurrentBlockType: function getCurrentBlockType(editorState) {\n var selection = editorState.getSelection();\n return editorState.getCurrentContent().getBlockForKey(selection.getStartKey()).getType();\n },\n getDataObjectForLinkURL: function getDataObjectForLinkURL(uri) {\n return {\n url: uri.toString()\n };\n },\n handleKeyCommand: function handleKeyCommand(editorState, command, eventTimeStamp) {\n switch (command) {\n case 'bold':\n return RichTextEditorUtil.toggleInlineStyle(editorState, 'BOLD');\n\n case 'italic':\n return RichTextEditorUtil.toggleInlineStyle(editorState, 'ITALIC');\n\n case 'underline':\n return RichTextEditorUtil.toggleInlineStyle(editorState, 'UNDERLINE');\n\n case 'code':\n return RichTextEditorUtil.toggleCode(editorState);\n\n case 'backspace':\n case 'backspace-word':\n case 'backspace-to-start-of-line':\n return RichTextEditorUtil.onBackspace(editorState);\n\n case 'delete':\n case 'delete-word':\n case 'delete-to-end-of-block':\n return RichTextEditorUtil.onDelete(editorState);\n\n default:\n // they may have custom editor commands; ignore those\n return null;\n }\n },\n insertSoftNewline: function insertSoftNewline(editorState) {\n var contentState = DraftModifier.insertText(editorState.getCurrentContent(), editorState.getSelection(), '\\n', editorState.getCurrentInlineStyle(), null);\n var newEditorState = EditorState.push(editorState, contentState, 'insert-characters');\n return EditorState.forceSelection(newEditorState, contentState.getSelectionAfter());\n },\n\n /**\n * For collapsed selections at the start of styled blocks, backspace should\n * just remove the existing style.\n */\n onBackspace: function onBackspace(editorState) {\n var selection = editorState.getSelection();\n\n if (!selection.isCollapsed() || selection.getAnchorOffset() || selection.getFocusOffset()) {\n return null;\n } // First, try to remove a preceding atomic block.\n\n\n var content = editorState.getCurrentContent();\n var startKey = selection.getStartKey();\n var blockBefore = content.getBlockBefore(startKey);\n\n if (blockBefore && blockBefore.getType() === 'atomic') {\n var blockMap = content.getBlockMap()[\"delete\"](blockBefore.getKey());\n var withoutAtomicBlock = content.merge({\n blockMap: blockMap,\n selectionAfter: selection\n });\n\n if (withoutAtomicBlock !== content) {\n return EditorState.push(editorState, withoutAtomicBlock, 'remove-range');\n }\n } // If that doesn't succeed, try to remove the current block style.\n\n\n var withoutBlockStyle = RichTextEditorUtil.tryToRemoveBlockStyle(editorState);\n\n if (withoutBlockStyle) {\n return EditorState.push(editorState, withoutBlockStyle, 'change-block-type');\n }\n\n return null;\n },\n onDelete: function onDelete(editorState) {\n var selection = editorState.getSelection();\n\n if (!selection.isCollapsed()) {\n return null;\n }\n\n var content = editorState.getCurrentContent();\n var startKey = selection.getStartKey();\n var block = content.getBlockForKey(startKey);\n var length = block.getLength(); // The cursor is somewhere within the text. Behave normally.\n\n if (selection.getStartOffset() < length) {\n return null;\n }\n\n var blockAfter = content.getBlockAfter(startKey);\n\n if (!blockAfter || blockAfter.getType() !== 'atomic') {\n return null;\n }\n\n var atomicBlockTarget = selection.merge({\n focusKey: blockAfter.getKey(),\n focusOffset: blockAfter.getLength()\n });\n var withoutAtomicBlock = DraftModifier.removeRange(content, atomicBlockTarget, 'forward');\n\n if (withoutAtomicBlock !== content) {\n return EditorState.push(editorState, withoutAtomicBlock, 'remove-range');\n }\n\n return null;\n },\n onTab: function onTab(event, editorState, maxDepth) {\n var selection = editorState.getSelection();\n var key = selection.getAnchorKey();\n\n if (key !== selection.getFocusKey()) {\n return editorState;\n }\n\n var content = editorState.getCurrentContent();\n var block = content.getBlockForKey(key);\n var type = block.getType();\n\n if (type !== 'unordered-list-item' && type !== 'ordered-list-item') {\n return editorState;\n }\n\n event.preventDefault();\n var depth = block.getDepth();\n\n if (!event.shiftKey && depth === maxDepth) {\n return editorState;\n }\n\n var withAdjustment = adjustBlockDepthForContentState(content, selection, event.shiftKey ? -1 : 1, maxDepth);\n return EditorState.push(editorState, withAdjustment, 'adjust-depth');\n },\n toggleBlockType: function toggleBlockType(editorState, blockType) {\n var selection = editorState.getSelection();\n var startKey = selection.getStartKey();\n var endKey = selection.getEndKey();\n var content = editorState.getCurrentContent();\n var target = selection; // Triple-click can lead to a selection that includes offset 0 of the\n // following block. The `SelectionState` for this case is accurate, but\n // we should avoid toggling block type for the trailing block because it\n // is a confusing interaction.\n\n if (startKey !== endKey && selection.getEndOffset() === 0) {\n var blockBefore = nullthrows(content.getBlockBefore(endKey));\n endKey = blockBefore.getKey();\n target = target.merge({\n anchorKey: startKey,\n anchorOffset: selection.getStartOffset(),\n focusKey: endKey,\n focusOffset: blockBefore.getLength(),\n isBackward: false\n });\n }\n\n var hasAtomicBlock = content.getBlockMap().skipWhile(function (_, k) {\n return k !== startKey;\n }).reverse().skipWhile(function (_, k) {\n return k !== endKey;\n }).some(function (v) {\n return v.getType() === 'atomic';\n });\n\n if (hasAtomicBlock) {\n return editorState;\n }\n\n var typeToSet = content.getBlockForKey(startKey).getType() === blockType ? 'unstyled' : blockType;\n return EditorState.push(editorState, DraftModifier.setBlockType(content, target, typeToSet), 'change-block-type');\n },\n toggleCode: function toggleCode(editorState) {\n var selection = editorState.getSelection();\n var anchorKey = selection.getAnchorKey();\n var focusKey = selection.getFocusKey();\n\n if (selection.isCollapsed() || anchorKey !== focusKey) {\n return RichTextEditorUtil.toggleBlockType(editorState, 'code-block');\n }\n\n return RichTextEditorUtil.toggleInlineStyle(editorState, 'CODE');\n },\n\n /**\n * Toggle the specified inline style for the selection. If the\n * user's selection is collapsed, apply or remove the style for the\n * internal state. If it is not collapsed, apply the change directly\n * to the document state.\n */\n toggleInlineStyle: function toggleInlineStyle(editorState, inlineStyle) {\n var selection = editorState.getSelection();\n var currentStyle = editorState.getCurrentInlineStyle(); // If the selection is collapsed, toggle the specified style on or off and\n // set the result as the new inline style override. This will then be\n // used as the inline style for the next character to be inserted.\n\n if (selection.isCollapsed()) {\n return EditorState.setInlineStyleOverride(editorState, currentStyle.has(inlineStyle) ? currentStyle.remove(inlineStyle) : currentStyle.add(inlineStyle));\n } // If characters are selected, immediately apply or remove the\n // inline style on the document state itself.\n\n\n var content = editorState.getCurrentContent();\n var newContent; // If the style is already present for the selection range, remove it.\n // Otherwise, apply it.\n\n if (currentStyle.has(inlineStyle)) {\n newContent = DraftModifier.removeInlineStyle(content, selection, inlineStyle);\n } else {\n newContent = DraftModifier.applyInlineStyle(content, selection, inlineStyle);\n }\n\n return EditorState.push(editorState, newContent, 'change-inline-style');\n },\n toggleLink: function toggleLink(editorState, targetSelection, entityKey) {\n var withoutLink = DraftModifier.applyEntity(editorState.getCurrentContent(), targetSelection, entityKey);\n return EditorState.push(editorState, withoutLink, 'apply-entity');\n },\n\n /**\n * When a collapsed cursor is at the start of a styled block, changes block\n * type to 'unstyled'. Returns null if selection does not meet that criteria.\n */\n tryToRemoveBlockStyle: function tryToRemoveBlockStyle(editorState) {\n var selection = editorState.getSelection();\n var offset = selection.getAnchorOffset();\n\n if (selection.isCollapsed() && offset === 0) {\n var key = selection.getAnchorKey();\n var content = editorState.getCurrentContent();\n var block = content.getBlockForKey(key);\n var type = block.getType();\n var blockBefore = content.getBlockBefore(key);\n\n if (type === 'code-block' && blockBefore && blockBefore.getType() === 'code-block' && blockBefore.getLength() !== 0) {\n return null;\n }\n\n if (type !== 'unstyled') {\n return DraftModifier.setBlockType(content, selection, 'unstyled');\n }\n }\n\n return null;\n }\n};\nmodule.exports = RichTextEditorUtil;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/RichTextEditorUtil.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/SecondaryClipboard.js": +/*!*********************************************************!*\ + !*** ./node_modules/draft-js/lib/SecondaryClipboard.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar DraftModifier = __webpack_require__(/*! ./DraftModifier */ \"./node_modules/draft-js/lib/DraftModifier.js\");\n\nvar EditorState = __webpack_require__(/*! ./EditorState */ \"./node_modules/draft-js/lib/EditorState.js\");\n\nvar getContentStateFragment = __webpack_require__(/*! ./getContentStateFragment */ \"./node_modules/draft-js/lib/getContentStateFragment.js\");\n\nvar nullthrows = __webpack_require__(/*! fbjs/lib/nullthrows */ \"./node_modules/draft-js/node_modules/fbjs/lib/nullthrows.js\");\n\nvar clipboard = null;\n/**\n * Some systems offer a \"secondary\" clipboard to allow quick internal cut\n * and paste behavior. For instance, Ctrl+K (cut) and Ctrl+Y (paste).\n */\n\nvar SecondaryClipboard = {\n cut: function cut(editorState) {\n var content = editorState.getCurrentContent();\n var selection = editorState.getSelection();\n var targetRange = null;\n\n if (selection.isCollapsed()) {\n var anchorKey = selection.getAnchorKey();\n var blockEnd = content.getBlockForKey(anchorKey).getLength();\n\n if (blockEnd === selection.getAnchorOffset()) {\n var keyAfter = content.getKeyAfter(anchorKey);\n\n if (keyAfter == null) {\n return editorState;\n }\n\n targetRange = selection.set('focusKey', keyAfter).set('focusOffset', 0);\n } else {\n targetRange = selection.set('focusOffset', blockEnd);\n }\n } else {\n targetRange = selection;\n }\n\n targetRange = nullthrows(targetRange); // TODO: This should actually append to the current state when doing\n // successive ^K commands without any other cursor movement\n\n clipboard = getContentStateFragment(content, targetRange);\n var afterRemoval = DraftModifier.removeRange(content, targetRange, 'forward');\n\n if (afterRemoval === content) {\n return editorState;\n }\n\n return EditorState.push(editorState, afterRemoval, 'remove-range');\n },\n paste: function paste(editorState) {\n if (!clipboard) {\n return editorState;\n }\n\n var newContent = DraftModifier.replaceWithFragment(editorState.getCurrentContent(), editorState.getSelection(), clipboard);\n return EditorState.push(editorState, newContent, 'insert-fragment');\n }\n};\nmodule.exports = SecondaryClipboard;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/SecondaryClipboard.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/SelectionState.js": +/*!*****************************************************!*\ + !*** ./node_modules/draft-js/lib/SelectionState.js ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar Immutable = __webpack_require__(/*! immutable */ \"./node_modules/immutable/dist/immutable.js\");\n\nvar Record = Immutable.Record;\nvar defaultRecord = {\n anchorKey: '',\n anchorOffset: 0,\n focusKey: '',\n focusOffset: 0,\n isBackward: false,\n hasFocus: false\n};\n/* $FlowFixMe This comment suppresses an error found when automatically adding\n * a type annotation with the codemod Komodo/Annotate_exports. To see the error\n * delete this comment and run Flow. */\n\nvar SelectionStateRecord = Record(defaultRecord);\n\nvar SelectionState =\n/*#__PURE__*/\nfunction (_SelectionStateRecord) {\n _inheritsLoose(SelectionState, _SelectionStateRecord);\n\n function SelectionState() {\n return _SelectionStateRecord.apply(this, arguments) || this;\n }\n\n var _proto = SelectionState.prototype;\n\n _proto.serialize = function serialize() {\n return 'Anchor: ' + this.getAnchorKey() + ':' + this.getAnchorOffset() + ', ' + 'Focus: ' + this.getFocusKey() + ':' + this.getFocusOffset() + ', ' + 'Is Backward: ' + String(this.getIsBackward()) + ', ' + 'Has Focus: ' + String(this.getHasFocus());\n };\n\n _proto.getAnchorKey = function getAnchorKey() {\n return this.get('anchorKey');\n };\n\n _proto.getAnchorOffset = function getAnchorOffset() {\n return this.get('anchorOffset');\n };\n\n _proto.getFocusKey = function getFocusKey() {\n return this.get('focusKey');\n };\n\n _proto.getFocusOffset = function getFocusOffset() {\n return this.get('focusOffset');\n };\n\n _proto.getIsBackward = function getIsBackward() {\n return this.get('isBackward');\n };\n\n _proto.getHasFocus = function getHasFocus() {\n return this.get('hasFocus');\n }\n /**\n * Return whether the specified range overlaps with an edge of the\n * SelectionState.\n */\n ;\n\n _proto.hasEdgeWithin = function hasEdgeWithin(blockKey, start, end) {\n var anchorKey = this.getAnchorKey();\n var focusKey = this.getFocusKey();\n\n if (anchorKey === focusKey && anchorKey === blockKey) {\n var selectionStart = this.getStartOffset();\n var selectionEnd = this.getEndOffset();\n return start <= selectionStart && selectionStart <= end || // selectionStart is between start and end, or\n start <= selectionEnd && selectionEnd <= end // selectionEnd is between start and end\n ;\n }\n\n if (blockKey !== anchorKey && blockKey !== focusKey) {\n return false;\n }\n\n var offsetToCheck = blockKey === anchorKey ? this.getAnchorOffset() : this.getFocusOffset();\n return start <= offsetToCheck && end >= offsetToCheck;\n };\n\n _proto.isCollapsed = function isCollapsed() {\n return this.getAnchorKey() === this.getFocusKey() && this.getAnchorOffset() === this.getFocusOffset();\n };\n\n _proto.getStartKey = function getStartKey() {\n return this.getIsBackward() ? this.getFocusKey() : this.getAnchorKey();\n };\n\n _proto.getStartOffset = function getStartOffset() {\n return this.getIsBackward() ? this.getFocusOffset() : this.getAnchorOffset();\n };\n\n _proto.getEndKey = function getEndKey() {\n return this.getIsBackward() ? this.getAnchorKey() : this.getFocusKey();\n };\n\n _proto.getEndOffset = function getEndOffset() {\n return this.getIsBackward() ? this.getAnchorOffset() : this.getFocusOffset();\n };\n\n SelectionState.createEmpty = function createEmpty(key) {\n return new SelectionState({\n anchorKey: key,\n anchorOffset: 0,\n focusKey: key,\n focusOffset: 0,\n isBackward: false,\n hasFocus: false\n });\n };\n\n return SelectionState;\n}(SelectionStateRecord);\n\nmodule.exports = SelectionState;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/SelectionState.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/adjustBlockDepthForContentState.js": +/*!**********************************************************************!*\ + !*** ./node_modules/draft-js/lib/adjustBlockDepthForContentState.js ***! + \**********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nfunction adjustBlockDepthForContentState(contentState, selectionState, adjustment, maxDepth) {\n var startKey = selectionState.getStartKey();\n var endKey = selectionState.getEndKey();\n var blockMap = contentState.getBlockMap();\n var blocks = blockMap.toSeq().skipUntil(function (_, k) {\n return k === startKey;\n }).takeUntil(function (_, k) {\n return k === endKey;\n }).concat([[endKey, blockMap.get(endKey)]]).map(function (block) {\n var depth = block.getDepth() + adjustment;\n depth = Math.max(0, Math.min(depth, maxDepth));\n return block.set('depth', depth);\n });\n blockMap = blockMap.merge(blocks);\n return contentState.merge({\n blockMap: blockMap,\n selectionBefore: selectionState,\n selectionAfter: selectionState\n });\n}\n\nmodule.exports = adjustBlockDepthForContentState;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/adjustBlockDepthForContentState.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/applyEntityToContentBlock.js": +/*!****************************************************************!*\ + !*** ./node_modules/draft-js/lib/applyEntityToContentBlock.js ***! + \****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar CharacterMetadata = __webpack_require__(/*! ./CharacterMetadata */ \"./node_modules/draft-js/lib/CharacterMetadata.js\");\n\nfunction applyEntityToContentBlock(contentBlock, startArg, end, entityKey) {\n var start = startArg;\n var characterList = contentBlock.getCharacterList();\n\n while (start < end) {\n characterList = characterList.set(start, CharacterMetadata.applyEntity(characterList.get(start), entityKey));\n start++;\n }\n\n return contentBlock.set('characterList', characterList);\n}\n\nmodule.exports = applyEntityToContentBlock;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/applyEntityToContentBlock.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/applyEntityToContentState.js": +/*!****************************************************************!*\ + !*** ./node_modules/draft-js/lib/applyEntityToContentState.js ***! + \****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar applyEntityToContentBlock = __webpack_require__(/*! ./applyEntityToContentBlock */ \"./node_modules/draft-js/lib/applyEntityToContentBlock.js\");\n\nvar Immutable = __webpack_require__(/*! immutable */ \"./node_modules/immutable/dist/immutable.js\");\n\nfunction applyEntityToContentState(contentState, selectionState, entityKey) {\n var blockMap = contentState.getBlockMap();\n var startKey = selectionState.getStartKey();\n var startOffset = selectionState.getStartOffset();\n var endKey = selectionState.getEndKey();\n var endOffset = selectionState.getEndOffset();\n var newBlocks = blockMap.skipUntil(function (_, k) {\n return k === startKey;\n }).takeUntil(function (_, k) {\n return k === endKey;\n }).toOrderedMap().merge(Immutable.OrderedMap([[endKey, blockMap.get(endKey)]])).map(function (block, blockKey) {\n var sliceStart = blockKey === startKey ? startOffset : 0;\n var sliceEnd = blockKey === endKey ? endOffset : block.getLength();\n return applyEntityToContentBlock(block, sliceStart, sliceEnd, entityKey);\n });\n return contentState.merge({\n blockMap: blockMap.merge(newBlocks),\n selectionBefore: selectionState,\n selectionAfter: selectionState\n });\n}\n\nmodule.exports = applyEntityToContentState;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/applyEntityToContentState.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/convertFromDraftStateToRaw.js": +/*!*****************************************************************!*\ + !*** ./node_modules/draft-js/lib/convertFromDraftStateToRaw.js ***! + \*****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar ContentBlock = __webpack_require__(/*! ./ContentBlock */ \"./node_modules/draft-js/lib/ContentBlock.js\");\n\nvar ContentBlockNode = __webpack_require__(/*! ./ContentBlockNode */ \"./node_modules/draft-js/lib/ContentBlockNode.js\");\n\nvar DraftStringKey = __webpack_require__(/*! ./DraftStringKey */ \"./node_modules/draft-js/lib/DraftStringKey.js\");\n\nvar encodeEntityRanges = __webpack_require__(/*! ./encodeEntityRanges */ \"./node_modules/draft-js/lib/encodeEntityRanges.js\");\n\nvar encodeInlineStyleRanges = __webpack_require__(/*! ./encodeInlineStyleRanges */ \"./node_modules/draft-js/lib/encodeInlineStyleRanges.js\");\n\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ \"./node_modules/draft-js/node_modules/fbjs/lib/invariant.js\");\n\nvar createRawBlock = function createRawBlock(block, entityStorageMap) {\n return {\n key: block.getKey(),\n text: block.getText(),\n type: block.getType(),\n depth: block.getDepth(),\n inlineStyleRanges: encodeInlineStyleRanges(block),\n entityRanges: encodeEntityRanges(block, entityStorageMap),\n data: block.getData().toObject()\n };\n};\n\nvar insertRawBlock = function insertRawBlock(block, entityMap, rawBlocks, blockCacheRef) {\n if (block instanceof ContentBlock) {\n rawBlocks.push(createRawBlock(block, entityMap));\n return;\n }\n\n !(block instanceof ContentBlockNode) ? true ? invariant(false, 'block is not a BlockNode') : undefined : void 0;\n var parentKey = block.getParentKey();\n\n var rawBlock = blockCacheRef[block.getKey()] = _objectSpread({}, createRawBlock(block, entityMap), {\n children: []\n });\n\n if (parentKey) {\n blockCacheRef[parentKey].children.push(rawBlock);\n return;\n }\n\n rawBlocks.push(rawBlock);\n};\n\nvar encodeRawBlocks = function encodeRawBlocks(contentState, rawState) {\n var entityMap = rawState.entityMap;\n var rawBlocks = [];\n var blockCacheRef = {};\n var entityCacheRef = {};\n var entityStorageKey = 0;\n contentState.getBlockMap().forEach(function (block) {\n block.findEntityRanges(function (character) {\n return character.getEntity() !== null;\n }, function (start) {\n var entityKey = block.getEntityAt(start); // Stringify to maintain order of otherwise numeric keys.\n\n var stringifiedEntityKey = DraftStringKey.stringify(entityKey); // This makes this function resilient to two entities\n // erroneously having the same key\n\n if (entityCacheRef[stringifiedEntityKey]) {\n return;\n }\n\n entityCacheRef[stringifiedEntityKey] = entityKey; // we need the `any` casting here since this is a temporary state\n // where we will later on flip the entity map and populate it with\n // real entity, at this stage we just need to map back the entity\n // key used by the BlockNode\n\n entityMap[stringifiedEntityKey] = \"\".concat(entityStorageKey);\n entityStorageKey++;\n });\n insertRawBlock(block, entityMap, rawBlocks, blockCacheRef);\n });\n return {\n blocks: rawBlocks,\n entityMap: entityMap\n };\n}; // Flip storage map so that our storage keys map to global\n// DraftEntity keys.\n\n\nvar encodeRawEntityMap = function encodeRawEntityMap(contentState, rawState) {\n var blocks = rawState.blocks,\n entityMap = rawState.entityMap;\n var rawEntityMap = {};\n Object.keys(entityMap).forEach(function (key, index) {\n var entity = contentState.getEntity(DraftStringKey.unstringify(key));\n rawEntityMap[index] = {\n type: entity.getType(),\n mutability: entity.getMutability(),\n data: entity.getData()\n };\n });\n return {\n blocks: blocks,\n entityMap: rawEntityMap\n };\n};\n\nvar convertFromDraftStateToRaw = function convertFromDraftStateToRaw(contentState) {\n var rawDraftContentState = {\n entityMap: {},\n blocks: []\n }; // add blocks\n\n rawDraftContentState = encodeRawBlocks(contentState, rawDraftContentState); // add entities\n\n rawDraftContentState = encodeRawEntityMap(contentState, rawDraftContentState);\n return rawDraftContentState;\n};\n\nmodule.exports = convertFromDraftStateToRaw;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/convertFromDraftStateToRaw.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/convertFromHTMLToContentBlocks.js": +/*!*********************************************************************!*\ + !*** ./node_modules/draft-js/lib/convertFromHTMLToContentBlocks.js ***! + \*********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar _knownListItemDepthCl;\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar CharacterMetadata = __webpack_require__(/*! ./CharacterMetadata */ \"./node_modules/draft-js/lib/CharacterMetadata.js\");\n\nvar ContentBlock = __webpack_require__(/*! ./ContentBlock */ \"./node_modules/draft-js/lib/ContentBlock.js\");\n\nvar ContentBlockNode = __webpack_require__(/*! ./ContentBlockNode */ \"./node_modules/draft-js/lib/ContentBlockNode.js\");\n\nvar DefaultDraftBlockRenderMap = __webpack_require__(/*! ./DefaultDraftBlockRenderMap */ \"./node_modules/draft-js/lib/DefaultDraftBlockRenderMap.js\");\n\nvar DraftEntity = __webpack_require__(/*! ./DraftEntity */ \"./node_modules/draft-js/lib/DraftEntity.js\");\n\nvar URI = __webpack_require__(/*! fbjs/lib/URI */ \"./node_modules/draft-js/node_modules/fbjs/lib/URI.js\");\n\nvar cx = __webpack_require__(/*! fbjs/lib/cx */ \"./node_modules/draft-js/node_modules/fbjs/lib/cx.js\");\n\nvar generateRandomKey = __webpack_require__(/*! ./generateRandomKey */ \"./node_modules/draft-js/lib/generateRandomKey.js\");\n\nvar getSafeBodyFromHTML = __webpack_require__(/*! ./getSafeBodyFromHTML */ \"./node_modules/draft-js/lib/getSafeBodyFromHTML.js\");\n\nvar gkx = __webpack_require__(/*! ./gkx */ \"./node_modules/draft-js/lib/gkx.js\");\n\nvar _require = __webpack_require__(/*! immutable */ \"./node_modules/immutable/dist/immutable.js\"),\n List = _require.List,\n Map = _require.Map,\n OrderedSet = _require.OrderedSet;\n\nvar isHTMLAnchorElement = __webpack_require__(/*! ./isHTMLAnchorElement */ \"./node_modules/draft-js/lib/isHTMLAnchorElement.js\");\n\nvar isHTMLBRElement = __webpack_require__(/*! ./isHTMLBRElement */ \"./node_modules/draft-js/lib/isHTMLBRElement.js\");\n\nvar isHTMLElement = __webpack_require__(/*! ./isHTMLElement */ \"./node_modules/draft-js/lib/isHTMLElement.js\");\n\nvar isHTMLImageElement = __webpack_require__(/*! ./isHTMLImageElement */ \"./node_modules/draft-js/lib/isHTMLImageElement.js\");\n\nvar experimentalTreeDataSupport = gkx('draft_tree_data_support');\nvar NBSP = ' ';\nvar SPACE = ' '; // used for replacing characters in HTML\n\nvar REGEX_CR = new RegExp('\\r', 'g');\nvar REGEX_LF = new RegExp('\\n', 'g');\nvar REGEX_LEADING_LF = new RegExp('^\\n', 'g');\nvar REGEX_NBSP = new RegExp(NBSP, 'g');\nvar REGEX_CARRIAGE = new RegExp(' ?', 'g');\nvar REGEX_ZWS = new RegExp('​?', 'g'); // https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight\n\nvar boldValues = ['bold', 'bolder', '500', '600', '700', '800', '900'];\nvar notBoldValues = ['light', 'lighter', 'normal', '100', '200', '300', '400'];\nvar anchorAttr = ['className', 'href', 'rel', 'target', 'title'];\nvar imgAttr = ['alt', 'className', 'height', 'src', 'width'];\nvar knownListItemDepthClasses = (_knownListItemDepthCl = {}, _defineProperty(_knownListItemDepthCl, cx('public/DraftStyleDefault/depth0'), 0), _defineProperty(_knownListItemDepthCl, cx('public/DraftStyleDefault/depth1'), 1), _defineProperty(_knownListItemDepthCl, cx('public/DraftStyleDefault/depth2'), 2), _defineProperty(_knownListItemDepthCl, cx('public/DraftStyleDefault/depth3'), 3), _defineProperty(_knownListItemDepthCl, cx('public/DraftStyleDefault/depth4'), 4), _knownListItemDepthCl);\nvar HTMLTagToRawInlineStyleMap = Map({\n b: 'BOLD',\n code: 'CODE',\n del: 'STRIKETHROUGH',\n em: 'ITALIC',\n i: 'ITALIC',\n s: 'STRIKETHROUGH',\n strike: 'STRIKETHROUGH',\n strong: 'BOLD',\n u: 'UNDERLINE',\n mark: 'HIGHLIGHT'\n});\n\n/**\n * Build a mapping from HTML tags to draftjs block types\n * out of a BlockRenderMap.\n *\n * The BlockTypeMap for the default BlockRenderMap looks like this:\n * Map({\n * h1: 'header-one',\n * h2: 'header-two',\n * h3: 'header-three',\n * h4: 'header-four',\n * h5: 'header-five',\n * h6: 'header-six',\n * blockquote: 'blockquote',\n * figure: 'atomic',\n * pre: ['code-block'],\n * div: 'unstyled',\n * p: 'unstyled',\n * li: ['ordered-list-item', 'unordered-list-item'],\n * })\n */\nvar buildBlockTypeMap = function buildBlockTypeMap(blockRenderMap) {\n var blockTypeMap = {};\n blockRenderMap.mapKeys(function (blockType, desc) {\n var elements = [desc.element];\n\n if (desc.aliasedElements !== undefined) {\n elements.push.apply(elements, desc.aliasedElements);\n }\n\n elements.forEach(function (element) {\n if (blockTypeMap[element] === undefined) {\n blockTypeMap[element] = blockType;\n } else if (typeof blockTypeMap[element] === 'string') {\n blockTypeMap[element] = [blockTypeMap[element], blockType];\n } else {\n blockTypeMap[element].push(blockType);\n }\n });\n });\n return Map(blockTypeMap);\n};\n\nvar detectInlineStyle = function detectInlineStyle(node) {\n if (isHTMLElement(node)) {\n var element = node; // Currently only used to detect preformatted inline code\n\n if (element.style.fontFamily.includes('monospace')) {\n return 'CODE';\n }\n }\n\n return null;\n};\n/**\n * If we're pasting from one DraftEditor to another we can check to see if\n * existing list item depth classes are being used and preserve this style\n */\n\n\nvar getListItemDepth = function getListItemDepth(node) {\n var depth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n Object.keys(knownListItemDepthClasses).some(function (depthClass) {\n if (node.classList.contains(depthClass)) {\n depth = knownListItemDepthClasses[depthClass];\n }\n });\n return depth;\n};\n/**\n * Return true if the provided HTML Element can be used to build a\n * Draftjs-compatible link.\n */\n\n\nvar isValidAnchor = function isValidAnchor(node) {\n if (!isHTMLAnchorElement(node)) {\n return false;\n }\n\n var anchorNode = node;\n return !!(anchorNode.href && (anchorNode.protocol === 'http:' || anchorNode.protocol === 'https:' || anchorNode.protocol === 'mailto:' || anchorNode.protocol === 'tel:'));\n};\n/**\n * Return true if the provided HTML Element can be used to build a\n * Draftjs-compatible image.\n */\n\n\nvar isValidImage = function isValidImage(node) {\n if (!isHTMLImageElement(node)) {\n return false;\n }\n\n var imageNode = node;\n return !!(imageNode.attributes.getNamedItem('src') && imageNode.attributes.getNamedItem('src').value);\n};\n/**\n * Try to guess the inline style of an HTML element based on its css\n * styles (font-weight, font-style and text-decoration).\n */\n\n\nvar styleFromNodeAttributes = function styleFromNodeAttributes(node, style) {\n if (!isHTMLElement(node)) {\n return style;\n }\n\n var htmlElement = node;\n var fontWeight = htmlElement.style.fontWeight;\n var fontStyle = htmlElement.style.fontStyle;\n var textDecoration = htmlElement.style.textDecoration;\n return style.withMutations(function (style) {\n if (boldValues.indexOf(fontWeight) >= 0) {\n style.add('BOLD');\n } else if (notBoldValues.indexOf(fontWeight) >= 0) {\n style.remove('BOLD');\n }\n\n if (fontStyle === 'italic') {\n style.add('ITALIC');\n } else if (fontStyle === 'normal') {\n style.remove('ITALIC');\n }\n\n if (textDecoration === 'underline') {\n style.add('UNDERLINE');\n }\n\n if (textDecoration === 'line-through') {\n style.add('STRIKETHROUGH');\n }\n\n if (textDecoration === 'none') {\n style.remove('UNDERLINE');\n style.remove('STRIKETHROUGH');\n }\n });\n};\n/**\n * Determine if a nodeName is a list type, 'ul' or 'ol'\n */\n\n\nvar isListNode = function isListNode(nodeName) {\n return nodeName === 'ul' || nodeName === 'ol';\n};\n/**\n * ContentBlockConfig is a mutable data structure that holds all\n * the information required to build a ContentBlock and an array of\n * all the child nodes (childConfigs).\n * It is being used a temporary data structure by the\n * ContentBlocksBuilder class.\n */\n\n\n/**\n * ContentBlocksBuilder builds a list of ContentBlocks and an Entity Map\n * out of one (or several) HTMLElement(s).\n *\n * The algorithm has two passes: first it builds a tree of ContentBlockConfigs\n * by walking through the HTML nodes and their children, then it walks the\n * ContentBlockConfigs tree to compute parents/siblings and create\n * the actual ContentBlocks.\n *\n * Typical usage is:\n * new ContentBlocksBuilder()\n * .addDOMNode(someHTMLNode)\n * .addDOMNode(someOtherHTMLNode)\n * .getContentBlocks();\n *\n */\nvar ContentBlocksBuilder =\n/*#__PURE__*/\nfunction () {\n // Most of the method in the class depend on the state of the content builder\n // (i.e. currentBlockType, currentDepth, currentEntity etc.). Though it may\n // be confusing at first, it made the code simpler than the alternative which\n // is to pass those values around in every call.\n // The following attributes are used to accumulate text and styles\n // as we are walking the HTML node tree.\n // Describes the future ContentState as a tree of content blocks\n // The content blocks generated from the blockConfigs\n // Entity map use to store links and images found in the HTML nodes\n // Map HTML tags to draftjs block types and disambiguation function\n function ContentBlocksBuilder(blockTypeMap, disambiguate) {\n _defineProperty(this, \"characterList\", List());\n\n _defineProperty(this, \"currentBlockType\", 'unstyled');\n\n _defineProperty(this, \"currentDepth\", 0);\n\n _defineProperty(this, \"currentEntity\", null);\n\n _defineProperty(this, \"currentText\", '');\n\n _defineProperty(this, \"wrapper\", null);\n\n _defineProperty(this, \"blockConfigs\", []);\n\n _defineProperty(this, \"contentBlocks\", []);\n\n _defineProperty(this, \"entityMap\", DraftEntity);\n\n _defineProperty(this, \"blockTypeMap\", void 0);\n\n _defineProperty(this, \"disambiguate\", void 0);\n\n this.clear();\n this.blockTypeMap = blockTypeMap;\n this.disambiguate = disambiguate;\n }\n /**\n * Clear the internal state of the ContentBlocksBuilder\n */\n\n\n var _proto = ContentBlocksBuilder.prototype;\n\n _proto.clear = function clear() {\n this.characterList = List();\n this.blockConfigs = [];\n this.currentBlockType = 'unstyled';\n this.currentDepth = 0;\n this.currentEntity = null;\n this.currentText = '';\n this.entityMap = DraftEntity;\n this.wrapper = null;\n this.contentBlocks = [];\n }\n /**\n * Add an HTMLElement to the ContentBlocksBuilder\n */\n ;\n\n _proto.addDOMNode = function addDOMNode(node) {\n var _this$blockConfigs;\n\n this.contentBlocks = [];\n this.currentDepth = 0; // Converts the HTML node to block config\n\n (_this$blockConfigs = this.blockConfigs).push.apply(_this$blockConfigs, this._toBlockConfigs([node], OrderedSet())); // There might be some left over text in the builder's\n // internal state, if so make a ContentBlock out of it.\n\n\n this._trimCurrentText();\n\n if (this.currentText !== '') {\n this.blockConfigs.push(this._makeBlockConfig());\n } // for chaining\n\n\n return this;\n }\n /**\n * Return the ContentBlocks and the EntityMap that corresponds\n * to the previously added HTML nodes.\n */\n ;\n\n _proto.getContentBlocks = function getContentBlocks() {\n if (this.contentBlocks.length === 0) {\n if (experimentalTreeDataSupport) {\n this._toContentBlocks(this.blockConfigs);\n } else {\n this._toFlatContentBlocks(this.blockConfigs);\n }\n }\n\n return {\n contentBlocks: this.contentBlocks,\n entityMap: this.entityMap\n };\n } // ***********************************WARNING******************************\n // The methods below this line are private - don't call them directly.\n\n /**\n * Generate a new ContentBlockConfig out of the current internal state\n * of the builder, then clears the internal state.\n */\n ;\n\n _proto._makeBlockConfig = function _makeBlockConfig() {\n var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var key = config.key || generateRandomKey();\n\n var block = _objectSpread({\n key: key,\n type: this.currentBlockType,\n text: this.currentText,\n characterList: this.characterList,\n depth: this.currentDepth,\n parent: null,\n children: List(),\n prevSibling: null,\n nextSibling: null,\n childConfigs: []\n }, config);\n\n this.characterList = List();\n this.currentBlockType = 'unstyled';\n this.currentText = '';\n return block;\n }\n /**\n * Converts an array of HTML elements to a multi-root tree of content\n * block configs. Some text content may be left in the builders internal\n * state to enable chaining sucessive calls.\n */\n ;\n\n _proto._toBlockConfigs = function _toBlockConfigs(nodes, style) {\n var blockConfigs = [];\n\n for (var i = 0; i < nodes.length; i++) {\n var node = nodes[i];\n var nodeName = node.nodeName.toLowerCase();\n\n if (nodeName === 'body' || isListNode(nodeName)) {\n // body, ol and ul are 'block' type nodes so create a block config\n // with the text accumulated so far (if any)\n this._trimCurrentText();\n\n if (this.currentText !== '') {\n blockConfigs.push(this._makeBlockConfig());\n } // body, ol and ul nodes are ignored, but their children are inlined in\n // the parent block config.\n\n\n var wasCurrentDepth = this.currentDepth;\n var wasWrapper = this.wrapper;\n\n if (isListNode(nodeName)) {\n this.wrapper = nodeName;\n\n if (isListNode(wasWrapper)) {\n this.currentDepth++;\n }\n }\n\n blockConfigs.push.apply(blockConfigs, this._toBlockConfigs(Array.from(node.childNodes), style));\n this.currentDepth = wasCurrentDepth;\n this.wrapper = wasWrapper;\n continue;\n }\n\n var blockType = this.blockTypeMap.get(nodeName);\n\n if (blockType !== undefined) {\n // 'block' type node means we need to create a block config\n // with the text accumulated so far (if any)\n this._trimCurrentText();\n\n if (this.currentText !== '') {\n blockConfigs.push(this._makeBlockConfig());\n }\n\n var _wasCurrentDepth = this.currentDepth;\n var _wasWrapper = this.wrapper;\n this.wrapper = nodeName === 'pre' ? 'pre' : this.wrapper;\n\n if (typeof blockType !== 'string') {\n blockType = this.disambiguate(nodeName, this.wrapper) || blockType[0] || 'unstyled';\n }\n\n if (!experimentalTreeDataSupport && isHTMLElement(node) && (blockType === 'unordered-list-item' || blockType === 'ordered-list-item')) {\n var htmlElement = node;\n this.currentDepth = getListItemDepth(htmlElement, this.currentDepth);\n }\n\n var key = generateRandomKey();\n\n var childConfigs = this._toBlockConfigs(Array.from(node.childNodes), style);\n\n this._trimCurrentText();\n\n blockConfigs.push(this._makeBlockConfig({\n key: key,\n childConfigs: childConfigs,\n type: blockType\n }));\n this.currentDepth = _wasCurrentDepth;\n this.wrapper = _wasWrapper;\n continue;\n }\n\n if (nodeName === '#text') {\n this._addTextNode(node, style);\n\n continue;\n }\n\n if (nodeName === 'br') {\n this._addBreakNode(node, style);\n\n continue;\n }\n\n if (isValidImage(node)) {\n this._addImgNode(node, style);\n\n continue;\n }\n\n if (isValidAnchor(node)) {\n this._addAnchorNode(node, blockConfigs, style);\n\n continue;\n }\n\n var newStyle = style;\n\n if (HTMLTagToRawInlineStyleMap.has(nodeName)) {\n newStyle = newStyle.add(HTMLTagToRawInlineStyleMap.get(nodeName));\n }\n\n newStyle = styleFromNodeAttributes(node, newStyle);\n var inlineStyle = detectInlineStyle(node);\n\n if (inlineStyle != null) {\n newStyle = newStyle.add(inlineStyle);\n }\n\n blockConfigs.push.apply(blockConfigs, this._toBlockConfigs(Array.from(node.childNodes), newStyle));\n }\n\n return blockConfigs;\n }\n /**\n * Append a string of text to the internal buffer.\n */\n ;\n\n _proto._appendText = function _appendText(text, style) {\n var _this$characterList;\n\n this.currentText += text;\n var characterMetadata = CharacterMetadata.create({\n style: style,\n entity: this.currentEntity\n });\n this.characterList = (_this$characterList = this.characterList).push.apply(_this$characterList, Array(text.length).fill(characterMetadata));\n }\n /**\n * Trim the text in the internal buffer.\n */\n ;\n\n _proto._trimCurrentText = function _trimCurrentText() {\n var l = this.currentText.length;\n var begin = l - this.currentText.trimLeft().length;\n var end = this.currentText.trimRight().length; // We should not trim whitespaces for which an entity is defined.\n\n var entity = this.characterList.findEntry(function (characterMetadata) {\n return characterMetadata.getEntity() !== null;\n });\n begin = entity !== undefined ? Math.min(begin, entity[0]) : begin;\n entity = this.characterList.reverse().findEntry(function (characterMetadata) {\n return characterMetadata.getEntity() !== null;\n });\n end = entity !== undefined ? Math.max(end, l - entity[0]) : end;\n\n if (begin > end) {\n this.currentText = '';\n this.characterList = List();\n } else {\n this.currentText = this.currentText.slice(begin, end);\n this.characterList = this.characterList.slice(begin, end);\n }\n }\n /**\n * Add the content of an HTML text node to the internal state\n */\n ;\n\n _proto._addTextNode = function _addTextNode(node, style) {\n var text = node.textContent;\n var trimmedText = text.trim(); // If we are not in a pre block and the trimmed content is empty,\n // normalize to a single space.\n\n if (trimmedText === '' && this.wrapper !== 'pre') {\n text = ' ';\n }\n\n if (this.wrapper !== 'pre') {\n // Trim leading line feed, which is invisible in HTML\n text = text.replace(REGEX_LEADING_LF, ''); // Can't use empty string because MSWord\n\n text = text.replace(REGEX_LF, SPACE);\n }\n\n this._appendText(text, style);\n };\n\n _proto._addBreakNode = function _addBreakNode(node, style) {\n if (!isHTMLBRElement(node)) {\n return;\n }\n\n this._appendText('\\n', style);\n }\n /**\n * Add the content of an HTML img node to the internal state\n */\n ;\n\n _proto._addImgNode = function _addImgNode(node, style) {\n if (!isHTMLImageElement(node)) {\n return;\n }\n\n var image = node;\n var entityConfig = {};\n imgAttr.forEach(function (attr) {\n var imageAttribute = image.getAttribute(attr);\n\n if (imageAttribute) {\n entityConfig[attr] = imageAttribute;\n }\n }); // TODO: T15530363 update this when we remove DraftEntity entirely\n\n this.currentEntity = this.entityMap.__create('IMAGE', 'IMMUTABLE', entityConfig); // The child text node cannot just have a space or return as content (since\n // we strip those out), unless the image is for presentation only.\n // See https://github.com/facebook/draft-js/issues/231 for some context.\n\n if (gkx('draftjs_fix_paste_for_img')) {\n if (image.getAttribute('role') !== 'presentation') {\n this._appendText(\"\\uD83D\\uDCF7\", style);\n }\n } else {\n this._appendText(\"\\uD83D\\uDCF7\", style);\n }\n\n this.currentEntity = null;\n }\n /**\n * Add the content of an HTML 'a' node to the internal state. Child nodes\n * (if any) are converted to Block Configs and appended to the provided\n * blockConfig array.\n */\n ;\n\n _proto._addAnchorNode = function _addAnchorNode(node, blockConfigs, style) {\n // The check has already been made by isValidAnchor but\n // we have to do it again to keep flow happy.\n if (!isHTMLAnchorElement(node)) {\n return;\n }\n\n var anchor = node;\n var entityConfig = {};\n anchorAttr.forEach(function (attr) {\n var anchorAttribute = anchor.getAttribute(attr);\n\n if (anchorAttribute) {\n entityConfig[attr] = anchorAttribute;\n }\n });\n entityConfig.url = new URI(anchor.href).toString(); // TODO: T15530363 update this when we remove DraftEntity completely\n\n this.currentEntity = this.entityMap.__create('LINK', 'MUTABLE', entityConfig || {});\n blockConfigs.push.apply(blockConfigs, this._toBlockConfigs(Array.from(node.childNodes), style));\n this.currentEntity = null;\n }\n /**\n * Walk the BlockConfig tree, compute parent/children/siblings,\n * and generate the corresponding ContentBlockNode\n */\n ;\n\n _proto._toContentBlocks = function _toContentBlocks(blockConfigs) {\n var parent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n var l = blockConfigs.length - 1;\n\n for (var i = 0; i <= l; i++) {\n var config = blockConfigs[i];\n config.parent = parent;\n config.prevSibling = i > 0 ? blockConfigs[i - 1].key : null;\n config.nextSibling = i < l ? blockConfigs[i + 1].key : null;\n config.children = List(config.childConfigs.map(function (child) {\n return child.key;\n }));\n this.contentBlocks.push(new ContentBlockNode(_objectSpread({}, config)));\n\n this._toContentBlocks(config.childConfigs, config.key);\n }\n }\n /**\n * Remove 'useless' container nodes from the block config hierarchy, by\n * replacing them with their children.\n */\n ;\n\n _proto._hoistContainersInBlockConfigs = function _hoistContainersInBlockConfigs(blockConfigs) {\n var _this = this;\n\n var hoisted = List(blockConfigs).flatMap(function (blockConfig) {\n // Don't mess with useful blocks\n if (blockConfig.type !== 'unstyled' || blockConfig.text !== '') {\n return [blockConfig];\n }\n\n return _this._hoistContainersInBlockConfigs(blockConfig.childConfigs);\n });\n return hoisted;\n } // ***********************************************************************\n // The two methods below are used for backward compatibility when\n // experimentalTreeDataSupport is disabled.\n\n /**\n * Same as _toContentBlocks but replaces nested blocks by their\n * text content.\n */\n ;\n\n _proto._toFlatContentBlocks = function _toFlatContentBlocks(blockConfigs) {\n var _this2 = this;\n\n var cleanConfigs = this._hoistContainersInBlockConfigs(blockConfigs);\n\n cleanConfigs.forEach(function (config) {\n var _this2$_extractTextFr = _this2._extractTextFromBlockConfigs(config.childConfigs),\n text = _this2$_extractTextFr.text,\n characterList = _this2$_extractTextFr.characterList;\n\n _this2.contentBlocks.push(new ContentBlock(_objectSpread({}, config, {\n text: config.text + text,\n characterList: config.characterList.concat(characterList)\n })));\n });\n }\n /**\n * Extract the text and the associated inline styles form an\n * array of content block configs.\n */\n ;\n\n _proto._extractTextFromBlockConfigs = function _extractTextFromBlockConfigs(blockConfigs) {\n var l = blockConfigs.length - 1;\n var text = '';\n var characterList = List();\n\n for (var i = 0; i <= l; i++) {\n var config = blockConfigs[i];\n text += config.text;\n characterList = characterList.concat(config.characterList);\n\n if (text !== '' && config.type !== 'unstyled') {\n text += '\\n';\n characterList = characterList.push(characterList.last());\n }\n\n var children = this._extractTextFromBlockConfigs(config.childConfigs);\n\n text += children.text;\n characterList = characterList.concat(children.characterList);\n }\n\n return {\n text: text,\n characterList: characterList\n };\n };\n\n return ContentBlocksBuilder;\n}();\n/**\n * Converts an HTML string to an array of ContentBlocks and an EntityMap\n * suitable to initialize the internal state of a Draftjs component.\n */\n\n\nvar convertFromHTMLToContentBlocks = function convertFromHTMLToContentBlocks(html) {\n var DOMBuilder = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : getSafeBodyFromHTML;\n var blockRenderMap = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : DefaultDraftBlockRenderMap;\n // Be ABSOLUTELY SURE that the dom builder you pass here won't execute\n // arbitrary code in whatever environment you're running this in. For an\n // example of how we try to do this in-browser, see getSafeBodyFromHTML.\n // Remove funky characters from the HTML string\n html = html.trim().replace(REGEX_CR, '').replace(REGEX_NBSP, SPACE).replace(REGEX_CARRIAGE, '').replace(REGEX_ZWS, ''); // Build a DOM tree out of the HTML string\n\n var safeBody = DOMBuilder(html);\n\n if (!safeBody) {\n return null;\n } // Build a BlockTypeMap out of the BlockRenderMap\n\n\n var blockTypeMap = buildBlockTypeMap(blockRenderMap); // Select the proper block type for the cases where the blockRenderMap\n // uses multiple block types for the same html tag.\n\n var disambiguate = function disambiguate(tag, wrapper) {\n if (tag === 'li') {\n return wrapper === 'ol' ? 'ordered-list-item' : 'unordered-list-item';\n }\n\n return null;\n };\n\n return new ContentBlocksBuilder(blockTypeMap, disambiguate).addDOMNode(safeBody).getContentBlocks();\n};\n\nmodule.exports = convertFromHTMLToContentBlocks;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/convertFromHTMLToContentBlocks.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/convertFromRawToDraftState.js": +/*!*****************************************************************!*\ + !*** ./node_modules/draft-js/lib/convertFromRawToDraftState.js ***! + \*****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar ContentBlock = __webpack_require__(/*! ./ContentBlock */ \"./node_modules/draft-js/lib/ContentBlock.js\");\n\nvar ContentBlockNode = __webpack_require__(/*! ./ContentBlockNode */ \"./node_modules/draft-js/lib/ContentBlockNode.js\");\n\nvar ContentState = __webpack_require__(/*! ./ContentState */ \"./node_modules/draft-js/lib/ContentState.js\");\n\nvar DraftEntity = __webpack_require__(/*! ./DraftEntity */ \"./node_modules/draft-js/lib/DraftEntity.js\");\n\nvar DraftTreeAdapter = __webpack_require__(/*! ./DraftTreeAdapter */ \"./node_modules/draft-js/lib/DraftTreeAdapter.js\");\n\nvar DraftTreeInvariants = __webpack_require__(/*! ./DraftTreeInvariants */ \"./node_modules/draft-js/lib/DraftTreeInvariants.js\");\n\nvar SelectionState = __webpack_require__(/*! ./SelectionState */ \"./node_modules/draft-js/lib/SelectionState.js\");\n\nvar createCharacterList = __webpack_require__(/*! ./createCharacterList */ \"./node_modules/draft-js/lib/createCharacterList.js\");\n\nvar decodeEntityRanges = __webpack_require__(/*! ./decodeEntityRanges */ \"./node_modules/draft-js/lib/decodeEntityRanges.js\");\n\nvar decodeInlineStyleRanges = __webpack_require__(/*! ./decodeInlineStyleRanges */ \"./node_modules/draft-js/lib/decodeInlineStyleRanges.js\");\n\nvar generateRandomKey = __webpack_require__(/*! ./generateRandomKey */ \"./node_modules/draft-js/lib/generateRandomKey.js\");\n\nvar gkx = __webpack_require__(/*! ./gkx */ \"./node_modules/draft-js/lib/gkx.js\");\n\nvar Immutable = __webpack_require__(/*! immutable */ \"./node_modules/immutable/dist/immutable.js\");\n\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ \"./node_modules/draft-js/node_modules/fbjs/lib/invariant.js\");\n\nvar experimentalTreeDataSupport = gkx('draft_tree_data_support');\nvar List = Immutable.List,\n Map = Immutable.Map,\n OrderedMap = Immutable.OrderedMap;\n\nvar decodeBlockNodeConfig = function decodeBlockNodeConfig(block, entityMap) {\n var key = block.key,\n type = block.type,\n data = block.data,\n text = block.text,\n depth = block.depth;\n var blockNodeConfig = {\n text: text,\n depth: depth || 0,\n type: type || 'unstyled',\n key: key || generateRandomKey(),\n data: Map(data),\n characterList: decodeCharacterList(block, entityMap)\n };\n return blockNodeConfig;\n};\n\nvar decodeCharacterList = function decodeCharacterList(block, entityMap) {\n var text = block.text,\n rawEntityRanges = block.entityRanges,\n rawInlineStyleRanges = block.inlineStyleRanges;\n var entityRanges = rawEntityRanges || [];\n var inlineStyleRanges = rawInlineStyleRanges || []; // Translate entity range keys to the DraftEntity map.\n\n return createCharacterList(decodeInlineStyleRanges(text, inlineStyleRanges), decodeEntityRanges(text, entityRanges.filter(function (range) {\n return entityMap.hasOwnProperty(range.key);\n }).map(function (range) {\n return _objectSpread({}, range, {\n key: entityMap[range.key]\n });\n })));\n};\n\nvar addKeyIfMissing = function addKeyIfMissing(block) {\n return _objectSpread({}, block, {\n key: block.key || generateRandomKey()\n });\n};\n/**\n * Node stack is responsible to ensure we traverse the tree only once\n * in depth order, while also providing parent refs to inner nodes to\n * construct their links.\n */\n\n\nvar updateNodeStack = function updateNodeStack(stack, nodes, parentRef) {\n var nodesWithParentRef = nodes.map(function (block) {\n return _objectSpread({}, block, {\n parentRef: parentRef\n });\n }); // since we pop nodes from the stack we need to insert them in reverse\n\n return stack.concat(nodesWithParentRef.reverse());\n};\n/**\n * This will build a tree draft content state by creating the node\n * reference links into a single tree walk. Each node has a link\n * reference to \"parent\", \"children\", \"nextSibling\" and \"prevSibling\"\n * blockMap will be created using depth ordering.\n */\n\n\nvar decodeContentBlockNodes = function decodeContentBlockNodes(blocks, entityMap) {\n return blocks // ensure children have valid keys to enable sibling links\n .map(addKeyIfMissing).reduce(function (blockMap, block, index) {\n !Array.isArray(block.children) ? true ? invariant(false, 'invalid RawDraftContentBlock can not be converted to ContentBlockNode') : undefined : void 0; // ensure children have valid keys to enable sibling links\n\n var children = block.children.map(addKeyIfMissing); // root level nodes\n\n var contentBlockNode = new ContentBlockNode(_objectSpread({}, decodeBlockNodeConfig(block, entityMap), {\n prevSibling: index === 0 ? null : blocks[index - 1].key,\n nextSibling: index === blocks.length - 1 ? null : blocks[index + 1].key,\n children: List(children.map(function (child) {\n return child.key;\n }))\n })); // push root node to blockMap\n\n blockMap = blockMap.set(contentBlockNode.getKey(), contentBlockNode); // this stack is used to ensure we visit all nodes respecting depth ordering\n\n var stack = updateNodeStack([], children, contentBlockNode); // start computing children nodes\n\n while (stack.length > 0) {\n // we pop from the stack and start processing this node\n var node = stack.pop(); // parentRef already points to a converted ContentBlockNode\n\n var parentRef = node.parentRef;\n var siblings = parentRef.getChildKeys();\n\n var _index = siblings.indexOf(node.key);\n\n var isValidBlock = Array.isArray(node.children);\n\n if (!isValidBlock) {\n !isValidBlock ? true ? invariant(false, 'invalid RawDraftContentBlock can not be converted to ContentBlockNode') : undefined : void 0;\n break;\n } // ensure children have valid keys to enable sibling links\n\n\n var _children = node.children.map(addKeyIfMissing);\n\n var _contentBlockNode = new ContentBlockNode(_objectSpread({}, decodeBlockNodeConfig(node, entityMap), {\n parent: parentRef.getKey(),\n children: List(_children.map(function (child) {\n return child.key;\n })),\n prevSibling: _index === 0 ? null : siblings.get(_index - 1),\n nextSibling: _index === siblings.size - 1 ? null : siblings.get(_index + 1)\n })); // push node to blockMap\n\n\n blockMap = blockMap.set(_contentBlockNode.getKey(), _contentBlockNode); // this stack is used to ensure we visit all nodes respecting depth ordering\n\n stack = updateNodeStack(stack, _children, _contentBlockNode);\n }\n\n return blockMap;\n }, OrderedMap());\n};\n\nvar decodeContentBlocks = function decodeContentBlocks(blocks, entityMap) {\n return OrderedMap(blocks.map(function (block) {\n var contentBlock = new ContentBlock(decodeBlockNodeConfig(block, entityMap));\n return [contentBlock.getKey(), contentBlock];\n }));\n};\n\nvar decodeRawBlocks = function decodeRawBlocks(rawState, entityMap) {\n var isTreeRawBlock = rawState.blocks.find(function (block) {\n return Array.isArray(block.children) && block.children.length > 0;\n });\n var rawBlocks = experimentalTreeDataSupport && !isTreeRawBlock ? DraftTreeAdapter.fromRawStateToRawTreeState(rawState).blocks : rawState.blocks;\n\n if (!experimentalTreeDataSupport) {\n return decodeContentBlocks(isTreeRawBlock ? DraftTreeAdapter.fromRawTreeStateToRawState(rawState).blocks : rawBlocks, entityMap);\n }\n\n var blockMap = decodeContentBlockNodes(rawBlocks, entityMap); // in dev mode, check that the tree invariants are met\n\n if (true) {\n !DraftTreeInvariants.isValidTree(blockMap) ? true ? invariant(false, 'Should be a valid tree') : undefined : void 0;\n }\n\n return blockMap;\n};\n\nvar decodeRawEntityMap = function decodeRawEntityMap(rawState) {\n var rawEntityMap = rawState.entityMap;\n var entityMap = {}; // TODO: Update this once we completely remove DraftEntity\n\n Object.keys(rawEntityMap).forEach(function (rawEntityKey) {\n var _rawEntityMap$rawEnti = rawEntityMap[rawEntityKey],\n type = _rawEntityMap$rawEnti.type,\n mutability = _rawEntityMap$rawEnti.mutability,\n data = _rawEntityMap$rawEnti.data; // get the key reference to created entity\n\n entityMap[rawEntityKey] = DraftEntity.__create(type, mutability, data || {});\n });\n return entityMap;\n};\n\nvar convertFromRawToDraftState = function convertFromRawToDraftState(rawState) {\n !Array.isArray(rawState.blocks) ? true ? invariant(false, 'invalid RawDraftContentState') : undefined : void 0; // decode entities\n\n var entityMap = decodeRawEntityMap(rawState); // decode blockMap\n\n var blockMap = decodeRawBlocks(rawState, entityMap); // create initial selection\n\n var selectionState = blockMap.isEmpty() ? new SelectionState() : SelectionState.createEmpty(blockMap.first().getKey());\n return new ContentState({\n blockMap: blockMap,\n entityMap: entityMap,\n selectionBefore: selectionState,\n selectionAfter: selectionState\n });\n};\n\nmodule.exports = convertFromRawToDraftState;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/convertFromRawToDraftState.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/createCharacterList.js": +/*!**********************************************************!*\ + !*** ./node_modules/draft-js/lib/createCharacterList.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar CharacterMetadata = __webpack_require__(/*! ./CharacterMetadata */ \"./node_modules/draft-js/lib/CharacterMetadata.js\");\n\nvar Immutable = __webpack_require__(/*! immutable */ \"./node_modules/immutable/dist/immutable.js\");\n\nvar List = Immutable.List;\n\nfunction createCharacterList(inlineStyles, entities) {\n var characterArray = inlineStyles.map(function (style, ii) {\n var entity = entities[ii];\n return CharacterMetadata.create({\n style: style,\n entity: entity\n });\n });\n return List(characterArray);\n}\n\nmodule.exports = createCharacterList;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/createCharacterList.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/decodeEntityRanges.js": +/*!*********************************************************!*\ + !*** ./node_modules/draft-js/lib/decodeEntityRanges.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar UnicodeUtils = __webpack_require__(/*! fbjs/lib/UnicodeUtils */ \"./node_modules/draft-js/node_modules/fbjs/lib/UnicodeUtils.js\");\n\nvar substr = UnicodeUtils.substr;\n/**\n * Convert to native JavaScript string lengths to determine ranges.\n */\n\nfunction decodeEntityRanges(text, ranges) {\n var entities = Array(text.length).fill(null);\n\n if (ranges) {\n ranges.forEach(function (range) {\n // Using Unicode-enabled substrings converted to JavaScript lengths,\n // fill the output array with entity keys.\n var start = substr(text, 0, range.offset).length;\n var end = start + substr(text, range.offset, range.length).length;\n\n for (var ii = start; ii < end; ii++) {\n entities[ii] = range.key;\n }\n });\n }\n\n return entities;\n}\n\nmodule.exports = decodeEntityRanges;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/decodeEntityRanges.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/decodeInlineStyleRanges.js": +/*!**************************************************************!*\ + !*** ./node_modules/draft-js/lib/decodeInlineStyleRanges.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar UnicodeUtils = __webpack_require__(/*! fbjs/lib/UnicodeUtils */ \"./node_modules/draft-js/node_modules/fbjs/lib/UnicodeUtils.js\");\n\nvar _require = __webpack_require__(/*! immutable */ \"./node_modules/immutable/dist/immutable.js\"),\n OrderedSet = _require.OrderedSet;\n\nvar substr = UnicodeUtils.substr;\nvar EMPTY_SET = OrderedSet();\n/**\n * Convert to native JavaScript string lengths to determine ranges.\n */\n\nfunction decodeInlineStyleRanges(text, ranges) {\n var styles = Array(text.length).fill(EMPTY_SET);\n\n if (ranges) {\n ranges.forEach(function (range) {\n var cursor = substr(text, 0, range.offset).length;\n var end = cursor + substr(text, range.offset, range.length).length;\n\n while (cursor < end) {\n styles[cursor] = styles[cursor].add(range.style);\n cursor++;\n }\n });\n }\n\n return styles;\n}\n\nmodule.exports = decodeInlineStyleRanges;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/decodeInlineStyleRanges.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/draftKeyUtils.js": +/*!****************************************************!*\ + !*** ./node_modules/draft-js/lib/draftKeyUtils.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * Provides utilities for handling draftjs keys.\n *\n * @emails oncall+draft_js\n * \n * @format\n */\n\n\nfunction notEmptyKey(key) {\n return key != null && key != '';\n}\n\nmodule.exports = {\n notEmptyKey: notEmptyKey\n};\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/draftKeyUtils.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/editOnBeforeInput.js": +/*!********************************************************!*\ + !*** ./node_modules/draft-js/lib/editOnBeforeInput.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar DraftModifier = __webpack_require__(/*! ./DraftModifier */ \"./node_modules/draft-js/lib/DraftModifier.js\");\n\nvar EditorState = __webpack_require__(/*! ./EditorState */ \"./node_modules/draft-js/lib/EditorState.js\");\n\nvar UserAgent = __webpack_require__(/*! fbjs/lib/UserAgent */ \"./node_modules/draft-js/node_modules/fbjs/lib/UserAgent.js\");\n\nvar getEntityKeyForSelection = __webpack_require__(/*! ./getEntityKeyForSelection */ \"./node_modules/draft-js/lib/getEntityKeyForSelection.js\");\n\nvar isEventHandled = __webpack_require__(/*! ./isEventHandled */ \"./node_modules/draft-js/lib/isEventHandled.js\");\n\nvar isSelectionAtLeafStart = __webpack_require__(/*! ./isSelectionAtLeafStart */ \"./node_modules/draft-js/lib/isSelectionAtLeafStart.js\");\n\nvar nullthrows = __webpack_require__(/*! fbjs/lib/nullthrows */ \"./node_modules/draft-js/node_modules/fbjs/lib/nullthrows.js\");\n\nvar setImmediate = __webpack_require__(/*! fbjs/lib/setImmediate */ \"./node_modules/draft-js/node_modules/fbjs/lib/setImmediate.js\"); // When nothing is focused, Firefox regards two characters, `'` and `/`, as\n// commands that should open and focus the \"quickfind\" search bar. This should\n// *never* happen while a contenteditable is focused, but as of v28, it\n// sometimes does, even when the keypress event target is the contenteditable.\n// This breaks the input. Special case these characters to ensure that when\n// they are typed, we prevent default on the event to make sure not to\n// trigger quickfind.\n\n\nvar FF_QUICKFIND_CHAR = \"'\";\nvar FF_QUICKFIND_LINK_CHAR = '/';\nvar isFirefox = UserAgent.isBrowser('Firefox');\n\nfunction mustPreventDefaultForCharacter(character) {\n return isFirefox && (character == FF_QUICKFIND_CHAR || character == FF_QUICKFIND_LINK_CHAR);\n}\n/**\n * Replace the current selection with the specified text string, with the\n * inline style and entity key applied to the newly inserted text.\n */\n\n\nfunction replaceText(editorState, text, inlineStyle, entityKey, forceSelection) {\n var contentState = DraftModifier.replaceText(editorState.getCurrentContent(), editorState.getSelection(), text, inlineStyle, entityKey);\n return EditorState.push(editorState, contentState, 'insert-characters', forceSelection);\n}\n/**\n * When `onBeforeInput` executes, the browser is attempting to insert a\n * character into the editor. Apply this character data to the document,\n * allowing native insertion if possible.\n *\n * Native insertion is encouraged in order to limit re-rendering and to\n * preserve spellcheck highlighting, which disappears or flashes if re-render\n * occurs on the relevant text nodes.\n */\n\n\nfunction editOnBeforeInput(editor, e) {\n if (editor._pendingStateFromBeforeInput !== undefined) {\n editor.update(editor._pendingStateFromBeforeInput);\n editor._pendingStateFromBeforeInput = undefined;\n }\n\n var editorState = editor._latestEditorState;\n var chars = e.data; // In some cases (ex: IE ideographic space insertion) no character data\n // is provided. There's nothing to do when this happens.\n\n if (!chars) {\n return;\n } // Allow the top-level component to handle the insertion manually. This is\n // useful when triggering interesting behaviors for a character insertion,\n // Simple examples: replacing a raw text ':)' with a smile emoji or image\n // decorator, or setting a block to be a list item after typing '- ' at the\n // start of the block.\n\n\n if (editor.props.handleBeforeInput && isEventHandled(editor.props.handleBeforeInput(chars, editorState, e.timeStamp))) {\n e.preventDefault();\n return;\n } // If selection is collapsed, conditionally allow native behavior. This\n // reduces re-renders and preserves spellcheck highlighting. If the selection\n // is not collapsed, we will re-render.\n\n\n var selection = editorState.getSelection();\n var selectionStart = selection.getStartOffset();\n var anchorKey = selection.getAnchorKey();\n\n if (!selection.isCollapsed()) {\n e.preventDefault();\n editor.update(replaceText(editorState, chars, editorState.getCurrentInlineStyle(), getEntityKeyForSelection(editorState.getCurrentContent(), editorState.getSelection()), true));\n return;\n }\n\n var newEditorState = replaceText(editorState, chars, editorState.getCurrentInlineStyle(), getEntityKeyForSelection(editorState.getCurrentContent(), editorState.getSelection()), false); // Bunch of different cases follow where we need to prevent native insertion.\n\n var mustPreventNative = false;\n\n if (!mustPreventNative) {\n // Browsers tend to insert text in weird places in the DOM when typing at\n // the start of a leaf, so we'll handle it ourselves.\n mustPreventNative = isSelectionAtLeafStart(editor._latestCommittedEditorState);\n }\n\n if (!mustPreventNative) {\n // Let's say we have a decorator that highlights hashtags. In many cases\n // we need to prevent native behavior and rerender ourselves --\n // particularly, any case *except* where the inserted characters end up\n // anywhere except exactly where you put them.\n //\n // Using [] to denote a decorated leaf, some examples:\n //\n // 1. 'hi #' and append 'f'\n // desired rendering: 'hi [#f]'\n // native rendering would be: 'hi #f' (incorrect)\n //\n // 2. 'x [#foo]' and insert '#' before 'f'\n // desired rendering: 'x #[#foo]'\n // native rendering would be: 'x [##foo]' (incorrect)\n //\n // 3. '[#foobar]' and insert ' ' between 'foo' and 'bar'\n // desired rendering: '[#foo] bar'\n // native rendering would be: '[#foo bar]' (incorrect)\n //\n // 4. '[#foo]' and delete '#' [won't use this beforeinput codepath though]\n // desired rendering: 'foo'\n // native rendering would be: '[foo]' (incorrect)\n //\n // 5. '[#foo]' and append 'b'\n // desired rendering: '[#foob]'\n // native rendering would be: '[#foob]'\n // (native insertion here would be ok for decorators like simple spans,\n // but not more complex decorators. To be safe, we need to prevent it.)\n //\n // It is safe to allow native insertion if and only if the full list of\n // decorator ranges matches what we expect native insertion to give, and\n // the range lengths have not changed. We don't need to compare the content\n // because the only possible mutation to consider here is inserting plain\n // text and decorators can't affect text content.\n var oldBlockTree = editorState.getBlockTree(anchorKey);\n var newBlockTree = newEditorState.getBlockTree(anchorKey);\n mustPreventNative = oldBlockTree.size !== newBlockTree.size || oldBlockTree.zip(newBlockTree).some(function (_ref) {\n var oldLeafSet = _ref[0],\n newLeafSet = _ref[1];\n // selectionStart is guaranteed to be selectionEnd here\n var oldStart = oldLeafSet.get('start');\n var adjustedStart = oldStart + (oldStart >= selectionStart ? chars.length : 0);\n var oldEnd = oldLeafSet.get('end');\n var adjustedEnd = oldEnd + (oldEnd >= selectionStart ? chars.length : 0);\n var newStart = newLeafSet.get('start');\n var newEnd = newLeafSet.get('end');\n var newDecoratorKey = newLeafSet.get('decoratorKey');\n return (// Different decorators\n oldLeafSet.get('decoratorKey') !== newDecoratorKey || // Different number of inline styles\n oldLeafSet.get('leaves').size !== newLeafSet.get('leaves').size || // Different effective decorator position\n adjustedStart !== newStart || adjustedEnd !== newEnd || // Decorator already existed and its length changed\n newDecoratorKey != null && newEnd - newStart !== oldEnd - oldStart\n );\n });\n }\n\n if (!mustPreventNative) {\n mustPreventNative = mustPreventDefaultForCharacter(chars);\n }\n\n if (!mustPreventNative) {\n mustPreventNative = nullthrows(newEditorState.getDirectionMap()).get(anchorKey) !== nullthrows(editorState.getDirectionMap()).get(anchorKey);\n }\n\n if (mustPreventNative) {\n e.preventDefault();\n newEditorState = EditorState.set(newEditorState, {\n forceSelection: true\n });\n editor.update(newEditorState);\n return;\n } // We made it all the way! Let the browser do its thing and insert the char.\n\n\n newEditorState = EditorState.set(newEditorState, {\n nativelyRenderedContent: newEditorState.getCurrentContent()\n }); // The native event is allowed to occur. To allow user onChange handlers to\n // change the inserted text, we wait until the text is actually inserted\n // before we actually update our state. That way when we rerender, the text\n // we see in the DOM will already have been inserted properly.\n\n editor._pendingStateFromBeforeInput = newEditorState;\n setImmediate(function () {\n if (editor._pendingStateFromBeforeInput !== undefined) {\n editor.update(editor._pendingStateFromBeforeInput);\n editor._pendingStateFromBeforeInput = undefined;\n }\n });\n}\n\nmodule.exports = editOnBeforeInput;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/editOnBeforeInput.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/editOnBlur.js": +/*!*************************************************!*\ + !*** ./node_modules/draft-js/lib/editOnBlur.js ***! + \*************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar EditorState = __webpack_require__(/*! ./EditorState */ \"./node_modules/draft-js/lib/EditorState.js\");\n\nvar containsNode = __webpack_require__(/*! fbjs/lib/containsNode */ \"./node_modules/draft-js/node_modules/fbjs/lib/containsNode.js\");\n\nvar getActiveElement = __webpack_require__(/*! fbjs/lib/getActiveElement */ \"./node_modules/draft-js/node_modules/fbjs/lib/getActiveElement.js\");\n\nfunction editOnBlur(editor, e) {\n // In a contentEditable element, when you select a range and then click\n // another active element, this does trigger a `blur` event but will not\n // remove the DOM selection from the contenteditable.\n // This is consistent across all browsers, but we prefer that the editor\n // behave like a textarea, where a `blur` event clears the DOM selection.\n // We therefore force the issue to be certain, checking whether the active\n // element is `body` to force it when blurring occurs within the window (as\n // opposed to clicking to another tab or window).\n var ownerDocument = e.currentTarget.ownerDocument;\n\n if ( // This ESLint rule conflicts with `sketchy-null-bool` flow check\n // eslint-disable-next-line no-extra-boolean-cast\n !Boolean(editor.props.preserveSelectionOnBlur) && getActiveElement(ownerDocument) === ownerDocument.body) {\n var _selection = ownerDocument.defaultView.getSelection();\n\n var editorNode = editor.editor;\n\n if (_selection.rangeCount === 1 && containsNode(editorNode, _selection.anchorNode) && containsNode(editorNode, _selection.focusNode)) {\n _selection.removeAllRanges();\n }\n }\n\n var editorState = editor._latestEditorState;\n var currentSelection = editorState.getSelection();\n\n if (!currentSelection.getHasFocus()) {\n return;\n }\n\n var selection = currentSelection.set('hasFocus', false);\n editor.props.onBlur && editor.props.onBlur(e);\n editor.update(EditorState.acceptSelection(editorState, selection));\n}\n\nmodule.exports = editOnBlur;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/editOnBlur.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/editOnCompositionStart.js": +/*!*************************************************************!*\ + !*** ./node_modules/draft-js/lib/editOnCompositionStart.js ***! + \*************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar EditorState = __webpack_require__(/*! ./EditorState */ \"./node_modules/draft-js/lib/EditorState.js\");\n/**\n * The user has begun using an IME input system. Switching to `composite` mode\n * allows handling composition input and disables other edit behavior.\n */\n\n\nfunction editOnCompositionStart(editor, e) {\n editor.setMode('composite');\n editor.update(EditorState.set(editor._latestEditorState, {\n inCompositionMode: true\n })); // Allow composition handler to interpret the compositionstart event\n\n editor._onCompositionStart(e);\n}\n\nmodule.exports = editOnCompositionStart;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/editOnCompositionStart.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/editOnCopy.js": +/*!*************************************************!*\ + !*** ./node_modules/draft-js/lib/editOnCopy.js ***! + \*************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar getFragmentFromSelection = __webpack_require__(/*! ./getFragmentFromSelection */ \"./node_modules/draft-js/lib/getFragmentFromSelection.js\");\n/**\n * If we have a selection, create a ContentState fragment and store\n * it in our internal clipboard. Subsequent paste events will use this\n * fragment if no external clipboard data is supplied.\n */\n\n\nfunction editOnCopy(editor, e) {\n var editorState = editor._latestEditorState;\n var selection = editorState.getSelection(); // No selection, so there's nothing to copy.\n\n if (selection.isCollapsed()) {\n e.preventDefault();\n return;\n }\n\n editor.setClipboard(getFragmentFromSelection(editor._latestEditorState));\n}\n\nmodule.exports = editOnCopy;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/editOnCopy.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/editOnCut.js": +/*!************************************************!*\ + !*** ./node_modules/draft-js/lib/editOnCut.js ***! + \************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar DraftModifier = __webpack_require__(/*! ./DraftModifier */ \"./node_modules/draft-js/lib/DraftModifier.js\");\n\nvar EditorState = __webpack_require__(/*! ./EditorState */ \"./node_modules/draft-js/lib/EditorState.js\");\n\nvar Style = __webpack_require__(/*! fbjs/lib/Style */ \"./node_modules/draft-js/node_modules/fbjs/lib/Style.js\");\n\nvar getFragmentFromSelection = __webpack_require__(/*! ./getFragmentFromSelection */ \"./node_modules/draft-js/lib/getFragmentFromSelection.js\");\n\nvar getScrollPosition = __webpack_require__(/*! fbjs/lib/getScrollPosition */ \"./node_modules/draft-js/node_modules/fbjs/lib/getScrollPosition.js\");\n\nvar isNode = __webpack_require__(/*! ./isInstanceOfNode */ \"./node_modules/draft-js/lib/isInstanceOfNode.js\");\n/**\n * On `cut` events, native behavior is allowed to occur so that the system\n * clipboard is set properly. This means that we need to take steps to recover\n * the editor DOM state after the `cut` has occurred in order to maintain\n * control of the component.\n *\n * In addition, we can keep a copy of the removed fragment, including all\n * styles and entities, for use as an internal paste.\n */\n\n\nfunction editOnCut(editor, e) {\n var editorState = editor._latestEditorState;\n var selection = editorState.getSelection();\n var element = e.target;\n var scrollPosition; // No selection, so there's nothing to cut.\n\n if (selection.isCollapsed()) {\n e.preventDefault();\n return;\n } // Track the current scroll position so that it can be forced back in place\n // after the editor regains control of the DOM.\n\n\n if (isNode(element)) {\n var node = element;\n scrollPosition = getScrollPosition(Style.getScrollParent(node));\n }\n\n var fragment = getFragmentFromSelection(editorState);\n editor.setClipboard(fragment); // Set `cut` mode to disable all event handling temporarily.\n\n editor.setMode('cut'); // Let native `cut` behavior occur, then recover control.\n\n setTimeout(function () {\n editor.restoreEditorDOM(scrollPosition);\n editor.exitCurrentMode();\n editor.update(removeFragment(editorState));\n }, 0);\n}\n\nfunction removeFragment(editorState) {\n var newContent = DraftModifier.removeRange(editorState.getCurrentContent(), editorState.getSelection(), 'forward');\n return EditorState.push(editorState, newContent, 'remove-range');\n}\n\nmodule.exports = editOnCut;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/editOnCut.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/editOnDragOver.js": +/*!*****************************************************!*\ + !*** ./node_modules/draft-js/lib/editOnDragOver.js ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\n/**\n * Drag behavior has begun from outside the editor element.\n */\nfunction editOnDragOver(editor, e) {\n editor.setMode('drag');\n e.preventDefault();\n}\n\nmodule.exports = editOnDragOver;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/editOnDragOver.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/editOnDragStart.js": +/*!******************************************************!*\ + !*** ./node_modules/draft-js/lib/editOnDragStart.js ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\n/**\n * A `dragstart` event has begun within the text editor component.\n */\nfunction editOnDragStart(editor) {\n editor._internalDrag = true;\n editor.setMode('drag');\n}\n\nmodule.exports = editOnDragStart;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/editOnDragStart.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/editOnFocus.js": +/*!**************************************************!*\ + !*** ./node_modules/draft-js/lib/editOnFocus.js ***! + \**************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar EditorState = __webpack_require__(/*! ./EditorState */ \"./node_modules/draft-js/lib/EditorState.js\");\n\nvar UserAgent = __webpack_require__(/*! fbjs/lib/UserAgent */ \"./node_modules/draft-js/node_modules/fbjs/lib/UserAgent.js\");\n\nfunction editOnFocus(editor, e) {\n var editorState = editor._latestEditorState;\n var currentSelection = editorState.getSelection();\n\n if (currentSelection.getHasFocus()) {\n return;\n }\n\n var selection = currentSelection.set('hasFocus', true);\n editor.props.onFocus && editor.props.onFocus(e); // When the tab containing this text editor is hidden and the user does a\n // find-in-page in a _different_ tab, Chrome on Mac likes to forget what the\n // selection was right after sending this focus event and (if you let it)\n // moves the cursor back to the beginning of the editor, so we force the\n // selection here instead of simply accepting it in order to preserve the\n // old cursor position. See https://crbug.com/540004.\n // But it looks like this is fixed in Chrome 60.0.3081.0.\n // Other browsers also don't have this bug, so we prefer to acceptSelection\n // when possible, to ensure that unfocusing and refocusing a Draft editor\n // doesn't preserve the selection, matching how textareas work.\n\n if (UserAgent.isBrowser('Chrome < 60.0.3081.0')) {\n editor.update(EditorState.forceSelection(editorState, selection));\n } else {\n editor.update(EditorState.acceptSelection(editorState, selection));\n }\n}\n\nmodule.exports = editOnFocus;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/editOnFocus.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/editOnInput.js": +/*!**************************************************!*\ + !*** ./node_modules/draft-js/lib/editOnInput.js ***! + \**************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar DraftModifier = __webpack_require__(/*! ./DraftModifier */ \"./node_modules/draft-js/lib/DraftModifier.js\");\n\nvar DraftOffsetKey = __webpack_require__(/*! ./DraftOffsetKey */ \"./node_modules/draft-js/lib/DraftOffsetKey.js\");\n\nvar EditorState = __webpack_require__(/*! ./EditorState */ \"./node_modules/draft-js/lib/EditorState.js\");\n\nvar UserAgent = __webpack_require__(/*! fbjs/lib/UserAgent */ \"./node_modules/draft-js/node_modules/fbjs/lib/UserAgent.js\");\n\nvar _require = __webpack_require__(/*! ./draftKeyUtils */ \"./node_modules/draft-js/lib/draftKeyUtils.js\"),\n notEmptyKey = _require.notEmptyKey;\n\nvar findAncestorOffsetKey = __webpack_require__(/*! ./findAncestorOffsetKey */ \"./node_modules/draft-js/lib/findAncestorOffsetKey.js\");\n\nvar keyCommandPlainBackspace = __webpack_require__(/*! ./keyCommandPlainBackspace */ \"./node_modules/draft-js/lib/keyCommandPlainBackspace.js\");\n\nvar nullthrows = __webpack_require__(/*! fbjs/lib/nullthrows */ \"./node_modules/draft-js/node_modules/fbjs/lib/nullthrows.js\");\n\nvar isGecko = UserAgent.isEngine('Gecko');\nvar DOUBLE_NEWLINE = '\\n\\n';\n\nfunction onInputType(inputType, editorState) {\n switch (inputType) {\n case 'deleteContentBackward':\n return keyCommandPlainBackspace(editorState);\n }\n\n return editorState;\n}\n/**\n * This function serves two purposes\n *\n * 1. To update the editorState and call onChange method with the new\n * editorState. This editorState is calculated in editOnBeforeInput but the\n * onChange method is not called with the new state until this method does it.\n * It is done to handle a specific case where certain character inputs might\n * be replaced with something else. E.g. snippets ('rc' might be replaced\n * with boilerplate code for react component). More information on the\n * exact problem can be found here -\n * https://github.com/facebook/draft-js/commit/07892ba479bd4dfc6afd1e0ed179aaf51cd138b1\n *\n * 2. intended to handle spellcheck and autocorrect changes,\n * which occur in the DOM natively without any opportunity to observe or\n * interpret the changes before they occur.\n *\n * The `input` event fires in contentEditable elements reliably for non-IE\n * browsers, immediately after changes occur to the editor DOM. Since our other\n * handlers override or otherwise handle cover other varieties of text input,\n * the DOM state should match the model in all controlled input cases. Thus,\n * when an `input` change leads to a DOM/model mismatch, the change should be\n * due to a spellcheck change, and we can incorporate it into our model.\n */\n\n\nfunction editOnInput(editor, e) {\n if (editor._pendingStateFromBeforeInput !== undefined) {\n editor.update(editor._pendingStateFromBeforeInput);\n editor._pendingStateFromBeforeInput = undefined;\n } // at this point editor is not null for sure (after input)\n\n\n var castedEditorElement = editor.editor;\n var domSelection = castedEditorElement.ownerDocument.defaultView.getSelection();\n var anchorNode = domSelection.anchorNode,\n isCollapsed = domSelection.isCollapsed;\n var isNotTextOrElementNode = (anchorNode === null || anchorNode === void 0 ? void 0 : anchorNode.nodeType) !== Node.TEXT_NODE && (anchorNode === null || anchorNode === void 0 ? void 0 : anchorNode.nodeType) !== Node.ELEMENT_NODE;\n\n if (anchorNode == null || isNotTextOrElementNode) {\n // TODO: (t16149272) figure out context for this change\n return;\n }\n\n if (anchorNode.nodeType === Node.TEXT_NODE && (anchorNode.previousSibling !== null || anchorNode.nextSibling !== null)) {\n // When typing at the beginning of a visual line, Chrome splits the text\n // nodes into two. Why? No one knows. This commit is suspicious:\n // https://chromium.googlesource.com/chromium/src/+/a3b600981286b135632371477f902214c55a1724\n // To work around, we'll merge the sibling text nodes back into this one.\n var span = anchorNode.parentNode;\n\n if (span == null) {\n // Handle null-parent case.\n return;\n }\n\n anchorNode.nodeValue = span.textContent;\n\n for (var child = span.firstChild; child != null; child = child.nextSibling) {\n if (child !== anchorNode) {\n span.removeChild(child);\n }\n }\n }\n\n var domText = anchorNode.textContent;\n var editorState = editor._latestEditorState;\n var offsetKey = nullthrows(findAncestorOffsetKey(anchorNode));\n\n var _DraftOffsetKey$decod = DraftOffsetKey.decode(offsetKey),\n blockKey = _DraftOffsetKey$decod.blockKey,\n decoratorKey = _DraftOffsetKey$decod.decoratorKey,\n leafKey = _DraftOffsetKey$decod.leafKey;\n\n var _editorState$getBlock = editorState.getBlockTree(blockKey).getIn([decoratorKey, 'leaves', leafKey]),\n start = _editorState$getBlock.start,\n end = _editorState$getBlock.end;\n\n var content = editorState.getCurrentContent();\n var block = content.getBlockForKey(blockKey);\n var modelText = block.getText().slice(start, end); // Special-case soft newlines here. If the DOM text ends in a soft newline,\n // we will have manually inserted an extra soft newline in DraftEditorLeaf.\n // We want to remove this extra newline for the purpose of our comparison\n // of DOM and model text.\n\n if (domText.endsWith(DOUBLE_NEWLINE)) {\n domText = domText.slice(0, -1);\n } // No change -- the DOM is up to date. Nothing to do here.\n\n\n if (domText === modelText) {\n // This can be buggy for some Android keyboards because they don't fire\n // standard onkeydown/pressed events and only fired editOnInput\n // so domText is already changed by the browser and ends up being equal\n // to modelText unexpectedly.\n // Newest versions of Android support the dom-inputevent-inputtype\n // and we can use the `inputType` to properly apply the state changes.\n\n /* $FlowFixMe inputType is only defined on a draft of a standard.\n * https://w3c.github.io/input-events/#dom-inputevent-inputtype */\n var inputType = e.nativeEvent.inputType;\n\n if (inputType) {\n var newEditorState = onInputType(inputType, editorState);\n\n if (newEditorState !== editorState) {\n editor.restoreEditorDOM();\n editor.update(newEditorState);\n return;\n }\n }\n\n return;\n }\n\n var selection = editorState.getSelection(); // We'll replace the entire leaf with the text content of the target.\n\n var targetRange = selection.merge({\n anchorOffset: start,\n focusOffset: end,\n isBackward: false\n });\n var entityKey = block.getEntityAt(start);\n var entity = notEmptyKey(entityKey) ? content.getEntity(entityKey) : null;\n var entityType = entity != null ? entity.getMutability() : null;\n var preserveEntity = entityType === 'MUTABLE'; // Immutable or segmented entities cannot properly be handled by the\n // default browser undo, so we have to use a different change type to\n // force using our internal undo method instead of falling through to the\n // native browser undo.\n\n var changeType = preserveEntity ? 'spellcheck-change' : 'apply-entity';\n var newContent = DraftModifier.replaceText(content, targetRange, domText, block.getInlineStyleAt(start), preserveEntity ? block.getEntityAt(start) : null);\n var anchorOffset, focusOffset, startOffset, endOffset;\n\n if (isGecko) {\n // Firefox selection does not change while the context menu is open, so\n // we preserve the anchor and focus values of the DOM selection.\n anchorOffset = domSelection.anchorOffset;\n focusOffset = domSelection.focusOffset;\n startOffset = start + Math.min(anchorOffset, focusOffset);\n endOffset = startOffset + Math.abs(anchorOffset - focusOffset);\n anchorOffset = startOffset;\n focusOffset = endOffset;\n } else {\n // Browsers other than Firefox may adjust DOM selection while the context\n // menu is open, and Safari autocorrect is prone to providing an inaccurate\n // DOM selection. Don't trust it. Instead, use our existing SelectionState\n // and adjust it based on the number of characters changed during the\n // mutation.\n var charDelta = domText.length - modelText.length;\n startOffset = selection.getStartOffset();\n endOffset = selection.getEndOffset();\n anchorOffset = isCollapsed ? endOffset + charDelta : startOffset;\n focusOffset = endOffset + charDelta;\n } // Segmented entities are completely or partially removed when their\n // text content changes. For this case we do not want any text to be selected\n // after the change, so we are not merging the selection.\n\n\n var contentWithAdjustedDOMSelection = newContent.merge({\n selectionBefore: content.getSelectionAfter(),\n selectionAfter: selection.merge({\n anchorOffset: anchorOffset,\n focusOffset: focusOffset\n })\n });\n editor.update(EditorState.push(editorState, contentWithAdjustedDOMSelection, changeType));\n}\n\nmodule.exports = editOnInput;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/editOnInput.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/editOnKeyDown.js": +/*!****************************************************!*\ + !*** ./node_modules/draft-js/lib/editOnKeyDown.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar DraftModifier = __webpack_require__(/*! ./DraftModifier */ \"./node_modules/draft-js/lib/DraftModifier.js\");\n\nvar EditorState = __webpack_require__(/*! ./EditorState */ \"./node_modules/draft-js/lib/EditorState.js\");\n\nvar KeyBindingUtil = __webpack_require__(/*! ./KeyBindingUtil */ \"./node_modules/draft-js/lib/KeyBindingUtil.js\");\n\nvar Keys = __webpack_require__(/*! fbjs/lib/Keys */ \"./node_modules/draft-js/node_modules/fbjs/lib/Keys.js\");\n\nvar SecondaryClipboard = __webpack_require__(/*! ./SecondaryClipboard */ \"./node_modules/draft-js/lib/SecondaryClipboard.js\");\n\nvar UserAgent = __webpack_require__(/*! fbjs/lib/UserAgent */ \"./node_modules/draft-js/node_modules/fbjs/lib/UserAgent.js\");\n\nvar isEventHandled = __webpack_require__(/*! ./isEventHandled */ \"./node_modules/draft-js/lib/isEventHandled.js\");\n\nvar keyCommandBackspaceToStartOfLine = __webpack_require__(/*! ./keyCommandBackspaceToStartOfLine */ \"./node_modules/draft-js/lib/keyCommandBackspaceToStartOfLine.js\");\n\nvar keyCommandBackspaceWord = __webpack_require__(/*! ./keyCommandBackspaceWord */ \"./node_modules/draft-js/lib/keyCommandBackspaceWord.js\");\n\nvar keyCommandDeleteWord = __webpack_require__(/*! ./keyCommandDeleteWord */ \"./node_modules/draft-js/lib/keyCommandDeleteWord.js\");\n\nvar keyCommandInsertNewline = __webpack_require__(/*! ./keyCommandInsertNewline */ \"./node_modules/draft-js/lib/keyCommandInsertNewline.js\");\n\nvar keyCommandMoveSelectionToEndOfBlock = __webpack_require__(/*! ./keyCommandMoveSelectionToEndOfBlock */ \"./node_modules/draft-js/lib/keyCommandMoveSelectionToEndOfBlock.js\");\n\nvar keyCommandMoveSelectionToStartOfBlock = __webpack_require__(/*! ./keyCommandMoveSelectionToStartOfBlock */ \"./node_modules/draft-js/lib/keyCommandMoveSelectionToStartOfBlock.js\");\n\nvar keyCommandPlainBackspace = __webpack_require__(/*! ./keyCommandPlainBackspace */ \"./node_modules/draft-js/lib/keyCommandPlainBackspace.js\");\n\nvar keyCommandPlainDelete = __webpack_require__(/*! ./keyCommandPlainDelete */ \"./node_modules/draft-js/lib/keyCommandPlainDelete.js\");\n\nvar keyCommandTransposeCharacters = __webpack_require__(/*! ./keyCommandTransposeCharacters */ \"./node_modules/draft-js/lib/keyCommandTransposeCharacters.js\");\n\nvar keyCommandUndo = __webpack_require__(/*! ./keyCommandUndo */ \"./node_modules/draft-js/lib/keyCommandUndo.js\");\n\nvar isOptionKeyCommand = KeyBindingUtil.isOptionKeyCommand;\nvar isChrome = UserAgent.isBrowser('Chrome');\n/**\n * Map a `DraftEditorCommand` command value to a corresponding function.\n */\n\nfunction onKeyCommand(command, editorState, e) {\n switch (command) {\n case 'redo':\n return EditorState.redo(editorState);\n\n case 'delete':\n return keyCommandPlainDelete(editorState);\n\n case 'delete-word':\n return keyCommandDeleteWord(editorState);\n\n case 'backspace':\n return keyCommandPlainBackspace(editorState);\n\n case 'backspace-word':\n return keyCommandBackspaceWord(editorState);\n\n case 'backspace-to-start-of-line':\n return keyCommandBackspaceToStartOfLine(editorState, e);\n\n case 'split-block':\n return keyCommandInsertNewline(editorState);\n\n case 'transpose-characters':\n return keyCommandTransposeCharacters(editorState);\n\n case 'move-selection-to-start-of-block':\n return keyCommandMoveSelectionToStartOfBlock(editorState);\n\n case 'move-selection-to-end-of-block':\n return keyCommandMoveSelectionToEndOfBlock(editorState);\n\n case 'secondary-cut':\n return SecondaryClipboard.cut(editorState);\n\n case 'secondary-paste':\n return SecondaryClipboard.paste(editorState);\n\n default:\n return editorState;\n }\n}\n/**\n * Intercept keydown behavior to handle keys and commands manually, if desired.\n *\n * Keydown combinations may be mapped to `DraftCommand` values, which may\n * correspond to command functions that modify the editor or its contents.\n *\n * See `getDefaultKeyBinding` for defaults. Alternatively, the top-level\n * component may provide a custom mapping via the `keyBindingFn` prop.\n */\n\n\nfunction editOnKeyDown(editor, e) {\n var keyCode = e.which;\n var editorState = editor._latestEditorState;\n\n function callDeprecatedHandler(handlerName) {\n var deprecatedHandler = editor.props[handlerName];\n\n if (deprecatedHandler) {\n deprecatedHandler(e);\n return true;\n } else {\n return false;\n }\n }\n\n switch (keyCode) {\n case Keys.RETURN:\n e.preventDefault(); // The top-level component may manually handle newline insertion. If\n // no special handling is performed, fall through to command handling.\n\n if (editor.props.handleReturn && isEventHandled(editor.props.handleReturn(e, editorState))) {\n return;\n }\n\n break;\n\n case Keys.ESC:\n e.preventDefault();\n\n if (callDeprecatedHandler('onEscape')) {\n return;\n }\n\n break;\n\n case Keys.TAB:\n if (callDeprecatedHandler('onTab')) {\n return;\n }\n\n break;\n\n case Keys.UP:\n if (callDeprecatedHandler('onUpArrow')) {\n return;\n }\n\n break;\n\n case Keys.RIGHT:\n if (callDeprecatedHandler('onRightArrow')) {\n return;\n }\n\n break;\n\n case Keys.DOWN:\n if (callDeprecatedHandler('onDownArrow')) {\n return;\n }\n\n break;\n\n case Keys.LEFT:\n if (callDeprecatedHandler('onLeftArrow')) {\n return;\n }\n\n break;\n\n case Keys.SPACE:\n // Prevent Chrome on OSX behavior where option + space scrolls.\n if (isChrome && isOptionKeyCommand(e)) {\n e.preventDefault();\n }\n\n }\n\n var command = editor.props.keyBindingFn(e); // If no command is specified, allow keydown event to continue.\n\n if (command == null || command === '') {\n if (keyCode === Keys.SPACE && isChrome && isOptionKeyCommand(e)) {\n // The default keydown event has already been prevented in order to stop\n // Chrome from scrolling. Insert a nbsp into the editor as OSX would for\n // other browsers.\n var contentState = DraftModifier.replaceText(editorState.getCurrentContent(), editorState.getSelection(), \"\\xA0\");\n editor.update(EditorState.push(editorState, contentState, 'insert-characters'));\n }\n\n return;\n }\n\n if (command === 'undo') {\n // Since undo requires some special updating behavior to keep the editor\n // in sync, handle it separately.\n keyCommandUndo(e, editorState, editor.update);\n return;\n } // At this point, we know that we're handling a command of some kind, so\n // we don't want to insert a character following the keydown.\n\n\n e.preventDefault(); // Allow components higher up the tree to handle the command first.\n\n if (editor.props.handleKeyCommand && isEventHandled(editor.props.handleKeyCommand(command, editorState, e.timeStamp))) {\n return;\n }\n\n var newState = onKeyCommand(command, editorState, e);\n\n if (newState !== editorState) {\n editor.update(newState);\n }\n}\n\nmodule.exports = editOnKeyDown;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/editOnKeyDown.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/editOnPaste.js": +/*!**************************************************!*\ + !*** ./node_modules/draft-js/lib/editOnPaste.js ***! + \**************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar BlockMapBuilder = __webpack_require__(/*! ./BlockMapBuilder */ \"./node_modules/draft-js/lib/BlockMapBuilder.js\");\n\nvar CharacterMetadata = __webpack_require__(/*! ./CharacterMetadata */ \"./node_modules/draft-js/lib/CharacterMetadata.js\");\n\nvar DataTransfer = __webpack_require__(/*! fbjs/lib/DataTransfer */ \"./node_modules/draft-js/node_modules/fbjs/lib/DataTransfer.js\");\n\nvar DraftModifier = __webpack_require__(/*! ./DraftModifier */ \"./node_modules/draft-js/lib/DraftModifier.js\");\n\nvar DraftPasteProcessor = __webpack_require__(/*! ./DraftPasteProcessor */ \"./node_modules/draft-js/lib/DraftPasteProcessor.js\");\n\nvar EditorState = __webpack_require__(/*! ./EditorState */ \"./node_modules/draft-js/lib/EditorState.js\");\n\nvar RichTextEditorUtil = __webpack_require__(/*! ./RichTextEditorUtil */ \"./node_modules/draft-js/lib/RichTextEditorUtil.js\");\n\nvar getEntityKeyForSelection = __webpack_require__(/*! ./getEntityKeyForSelection */ \"./node_modules/draft-js/lib/getEntityKeyForSelection.js\");\n\nvar getTextContentFromFiles = __webpack_require__(/*! ./getTextContentFromFiles */ \"./node_modules/draft-js/lib/getTextContentFromFiles.js\");\n\nvar isEventHandled = __webpack_require__(/*! ./isEventHandled */ \"./node_modules/draft-js/lib/isEventHandled.js\");\n\nvar splitTextIntoTextBlocks = __webpack_require__(/*! ./splitTextIntoTextBlocks */ \"./node_modules/draft-js/lib/splitTextIntoTextBlocks.js\");\n/**\n * Paste content.\n */\n\n\nfunction editOnPaste(editor, e) {\n e.preventDefault();\n var data = new DataTransfer(e.clipboardData); // Get files, unless this is likely to be a string the user wants inline.\n\n if (!data.isRichText()) {\n var files = data.getFiles();\n var defaultFileText = data.getText();\n\n if (files.length > 0) {\n // Allow customized paste handling for images, etc. Otherwise, fall\n // through to insert text contents into the editor.\n if (editor.props.handlePastedFiles && isEventHandled(editor.props.handlePastedFiles(files))) {\n return;\n }\n /* $FlowFixMe This comment suppresses an error found DataTransfer was\n * typed. getFiles() returns an array of , not Blob\n */\n\n\n getTextContentFromFiles(files, function (\n /*string*/\n fileText) {\n fileText = fileText || defaultFileText;\n\n if (!fileText) {\n return;\n }\n\n var editorState = editor._latestEditorState;\n var blocks = splitTextIntoTextBlocks(fileText);\n var character = CharacterMetadata.create({\n style: editorState.getCurrentInlineStyle(),\n entity: getEntityKeyForSelection(editorState.getCurrentContent(), editorState.getSelection())\n });\n var currentBlockType = RichTextEditorUtil.getCurrentBlockType(editorState);\n var text = DraftPasteProcessor.processText(blocks, character, currentBlockType);\n var fragment = BlockMapBuilder.createFromArray(text);\n var withInsertedText = DraftModifier.replaceWithFragment(editorState.getCurrentContent(), editorState.getSelection(), fragment);\n editor.update(EditorState.push(editorState, withInsertedText, 'insert-fragment'));\n });\n return;\n }\n }\n\n var textBlocks = [];\n var text = data.getText();\n var html = data.getHTML();\n var editorState = editor._latestEditorState;\n\n if (editor.props.handlePastedText && isEventHandled(editor.props.handlePastedText(text, html, editorState))) {\n return;\n }\n\n if (text) {\n textBlocks = splitTextIntoTextBlocks(text);\n }\n\n if (!editor.props.stripPastedStyles) {\n // If the text from the paste event is rich content that matches what we\n // already have on the internal clipboard, assume that we should just use\n // the clipboard fragment for the paste. This will allow us to preserve\n // styling and entities, if any are present. Note that newlines are\n // stripped during comparison -- this is because copy/paste within the\n // editor in Firefox and IE will not include empty lines. The resulting\n // paste will preserve the newlines correctly.\n var internalClipboard = editor.getClipboard();\n\n if (data.isRichText() && internalClipboard) {\n if ( // If the editorKey is present in the pasted HTML, it should be safe to\n // assume this is an internal paste.\n html.indexOf(editor.getEditorKey()) !== -1 || // The copy may have been made within a single block, in which case the\n // editor key won't be part of the paste. In this case, just check\n // whether the pasted text matches the internal clipboard.\n textBlocks.length === 1 && internalClipboard.size === 1 && internalClipboard.first().getText() === text) {\n editor.update(insertFragment(editor._latestEditorState, internalClipboard));\n return;\n }\n } else if (internalClipboard && data.types.includes('com.apple.webarchive') && !data.types.includes('text/html') && areTextBlocksAndClipboardEqual(textBlocks, internalClipboard)) {\n // Safari does not properly store text/html in some cases.\n // Use the internalClipboard if present and equal to what is on\n // the clipboard. See https://bugs.webkit.org/show_bug.cgi?id=19893.\n editor.update(insertFragment(editor._latestEditorState, internalClipboard));\n return;\n } // If there is html paste data, try to parse that.\n\n\n if (html) {\n var htmlFragment = DraftPasteProcessor.processHTML(html, editor.props.blockRenderMap);\n\n if (htmlFragment) {\n var contentBlocks = htmlFragment.contentBlocks,\n entityMap = htmlFragment.entityMap;\n\n if (contentBlocks) {\n var htmlMap = BlockMapBuilder.createFromArray(contentBlocks);\n editor.update(insertFragment(editor._latestEditorState, htmlMap, entityMap));\n return;\n }\n }\n } // Otherwise, create a new fragment from our pasted text. Also\n // empty the internal clipboard, since it's no longer valid.\n\n\n editor.setClipboard(null);\n }\n\n if (textBlocks.length) {\n var character = CharacterMetadata.create({\n style: editorState.getCurrentInlineStyle(),\n entity: getEntityKeyForSelection(editorState.getCurrentContent(), editorState.getSelection())\n });\n var currentBlockType = RichTextEditorUtil.getCurrentBlockType(editorState);\n var textFragment = DraftPasteProcessor.processText(textBlocks, character, currentBlockType);\n var textMap = BlockMapBuilder.createFromArray(textFragment);\n editor.update(insertFragment(editor._latestEditorState, textMap));\n }\n}\n\nfunction insertFragment(editorState, fragment, entityMap) {\n var newContent = DraftModifier.replaceWithFragment(editorState.getCurrentContent(), editorState.getSelection(), fragment); // TODO: merge the entity map once we stop using DraftEntity\n // like this:\n // const mergedEntityMap = newContent.getEntityMap().merge(entityMap);\n\n return EditorState.push(editorState, newContent.set('entityMap', entityMap), 'insert-fragment');\n}\n\nfunction areTextBlocksAndClipboardEqual(textBlocks, blockMap) {\n return textBlocks.length === blockMap.size && blockMap.valueSeq().every(function (block, ii) {\n return block.getText() === textBlocks[ii];\n });\n}\n\nmodule.exports = editOnPaste;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/editOnPaste.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/editOnSelect.js": +/*!***************************************************!*\ + !*** ./node_modules/draft-js/lib/editOnSelect.js ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar DraftJsDebugLogging = __webpack_require__(/*! ./DraftJsDebugLogging */ \"./node_modules/draft-js/lib/DraftJsDebugLogging.js\");\n\nvar EditorState = __webpack_require__(/*! ./EditorState */ \"./node_modules/draft-js/lib/EditorState.js\");\n\nvar getContentEditableContainer = __webpack_require__(/*! ./getContentEditableContainer */ \"./node_modules/draft-js/lib/getContentEditableContainer.js\");\n\nvar getDraftEditorSelection = __webpack_require__(/*! ./getDraftEditorSelection */ \"./node_modules/draft-js/lib/getDraftEditorSelection.js\");\n\nfunction editOnSelect(editor) {\n if (editor._blockSelectEvents || editor._latestEditorState !== editor.props.editorState) {\n if (editor._blockSelectEvents) {\n var _editorState = editor.props.editorState;\n\n var selectionState = _editorState.getSelection();\n\n DraftJsDebugLogging.logBlockedSelectionEvent({\n // For now I don't think we need any other info\n anonymizedDom: 'N/A',\n extraParams: JSON.stringify({\n stacktrace: new Error().stack\n }),\n selectionState: JSON.stringify(selectionState.toJS())\n });\n }\n\n return;\n }\n\n var editorState = editor.props.editorState;\n var documentSelection = getDraftEditorSelection(editorState, getContentEditableContainer(editor));\n var updatedSelectionState = documentSelection.selectionState;\n\n if (updatedSelectionState !== editorState.getSelection()) {\n if (documentSelection.needsRecovery) {\n editorState = EditorState.forceSelection(editorState, updatedSelectionState);\n } else {\n editorState = EditorState.acceptSelection(editorState, updatedSelectionState);\n }\n\n editor.update(editorState);\n }\n}\n\nmodule.exports = editOnSelect;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/editOnSelect.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/encodeEntityRanges.js": +/*!*********************************************************!*\ + !*** ./node_modules/draft-js/lib/encodeEntityRanges.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar DraftStringKey = __webpack_require__(/*! ./DraftStringKey */ \"./node_modules/draft-js/lib/DraftStringKey.js\");\n\nvar UnicodeUtils = __webpack_require__(/*! fbjs/lib/UnicodeUtils */ \"./node_modules/draft-js/node_modules/fbjs/lib/UnicodeUtils.js\");\n\nvar strlen = UnicodeUtils.strlen;\n/**\n * Convert to UTF-8 character counts for storage.\n */\n\nfunction encodeEntityRanges(block, storageMap) {\n var encoded = [];\n block.findEntityRanges(function (character) {\n return !!character.getEntity();\n }, function (\n /*number*/\n start,\n /*number*/\n end) {\n var text = block.getText();\n var key = block.getEntityAt(start);\n encoded.push({\n offset: strlen(text.slice(0, start)),\n length: strlen(text.slice(start, end)),\n // Encode the key as a number for range storage.\n key: Number(storageMap[DraftStringKey.stringify(key)])\n });\n });\n return encoded;\n}\n\nmodule.exports = encodeEntityRanges;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/encodeEntityRanges.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/encodeInlineStyleRanges.js": +/*!**************************************************************!*\ + !*** ./node_modules/draft-js/lib/encodeInlineStyleRanges.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar UnicodeUtils = __webpack_require__(/*! fbjs/lib/UnicodeUtils */ \"./node_modules/draft-js/node_modules/fbjs/lib/UnicodeUtils.js\");\n\nvar findRangesImmutable = __webpack_require__(/*! ./findRangesImmutable */ \"./node_modules/draft-js/lib/findRangesImmutable.js\");\n\nvar areEqual = function areEqual(a, b) {\n return a === b;\n};\n\nvar isTruthy = function isTruthy(a) {\n return !!a;\n};\n\nvar EMPTY_ARRAY = [];\n/**\n * Helper function for getting encoded styles for each inline style. Convert\n * to UTF-8 character counts for storage.\n */\n\nfunction getEncodedInlinesForType(block, styleList, styleToEncode) {\n var ranges = []; // Obtain an array with ranges for only the specified style.\n\n var filteredInlines = styleList.map(function (style) {\n return style.has(styleToEncode);\n }).toList();\n findRangesImmutable(filteredInlines, areEqual, // We only want to keep ranges with nonzero style values.\n isTruthy, function (start, end) {\n var text = block.getText();\n ranges.push({\n offset: UnicodeUtils.strlen(text.slice(0, start)),\n length: UnicodeUtils.strlen(text.slice(start, end)),\n style: styleToEncode\n });\n });\n return ranges;\n}\n/*\n * Retrieve the encoded arrays of inline styles, with each individual style\n * treated separately.\n */\n\n\nfunction encodeInlineStyleRanges(block) {\n var styleList = block.getCharacterList().map(function (c) {\n return c.getStyle();\n }).toList();\n var ranges = styleList.flatten().toSet().map(function (style) {\n return getEncodedInlinesForType(block, styleList, style);\n });\n return Array.prototype.concat.apply(EMPTY_ARRAY, ranges.toJS());\n}\n\nmodule.exports = encodeInlineStyleRanges;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/encodeInlineStyleRanges.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/expandRangeToStartOfLine.js": +/*!***************************************************************!*\ + !*** ./node_modules/draft-js/lib/expandRangeToStartOfLine.js ***! + \***************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\nvar UnicodeUtils = __webpack_require__(/*! fbjs/lib/UnicodeUtils */ \"./node_modules/draft-js/node_modules/fbjs/lib/UnicodeUtils.js\");\n\nvar getCorrectDocumentFromNode = __webpack_require__(/*! ./getCorrectDocumentFromNode */ \"./node_modules/draft-js/lib/getCorrectDocumentFromNode.js\");\n\nvar getRangeClientRects = __webpack_require__(/*! ./getRangeClientRects */ \"./node_modules/draft-js/lib/getRangeClientRects.js\");\n\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ \"./node_modules/draft-js/node_modules/fbjs/lib/invariant.js\");\n/**\n * Return the computed line height, in pixels, for the provided element.\n */\n\n\nfunction getLineHeightPx(element) {\n var computed = getComputedStyle(element);\n var correctDocument = getCorrectDocumentFromNode(element);\n var div = correctDocument.createElement('div');\n div.style.fontFamily = computed.fontFamily;\n div.style.fontSize = computed.fontSize;\n div.style.fontStyle = computed.fontStyle;\n div.style.fontWeight = computed.fontWeight;\n div.style.lineHeight = computed.lineHeight;\n div.style.position = 'absolute';\n div.textContent = 'M';\n var documentBody = correctDocument.body;\n !documentBody ? true ? invariant(false, 'Missing document.body') : undefined : void 0; // forced layout here\n\n documentBody.appendChild(div);\n var rect = div.getBoundingClientRect();\n documentBody.removeChild(div);\n return rect.height;\n}\n/**\n * Return whether every ClientRect in the provided list lies on the same line.\n *\n * We assume that the rects on the same line all contain the baseline, so the\n * lowest top line needs to be above the highest bottom line (i.e., if you were\n * to project the rects onto the y-axis, their intersection would be nonempty).\n *\n * In addition, we require that no two boxes are lineHeight (or more) apart at\n * either top or bottom, which helps protect against false positives for fonts\n * with extremely large glyph heights (e.g., with a font size of 17px, Zapfino\n * produces rects of height 58px!).\n */\n\n\nfunction areRectsOnOneLine(rects, lineHeight) {\n var minTop = Infinity;\n var minBottom = Infinity;\n var maxTop = -Infinity;\n var maxBottom = -Infinity;\n\n for (var ii = 0; ii < rects.length; ii++) {\n var rect = rects[ii];\n\n if (rect.width === 0 || rect.width === 1) {\n // When a range starts or ends a soft wrap, many browsers (Chrome, IE,\n // Safari) include an empty rect on the previous or next line. When the\n // text lies in a container whose position is not integral (e.g., from\n // margin: auto), Safari makes these empty rects have width 1 (instead of\n // 0). Having one-pixel-wide characters seems unlikely (and most browsers\n // report widths in subpixel precision anyway) so it's relatively safe to\n // skip over them.\n continue;\n }\n\n minTop = Math.min(minTop, rect.top);\n minBottom = Math.min(minBottom, rect.bottom);\n maxTop = Math.max(maxTop, rect.top);\n maxBottom = Math.max(maxBottom, rect.bottom);\n }\n\n return maxTop <= minBottom && maxTop - minTop < lineHeight && maxBottom - minBottom < lineHeight;\n}\n/**\n * Return the length of a node, as used by Range offsets.\n */\n\n\nfunction getNodeLength(node) {\n // http://www.w3.org/TR/dom/#concept-node-length\n switch (node.nodeType) {\n case Node.DOCUMENT_TYPE_NODE:\n return 0;\n\n case Node.TEXT_NODE:\n case Node.PROCESSING_INSTRUCTION_NODE:\n case Node.COMMENT_NODE:\n return node.length;\n\n default:\n return node.childNodes.length;\n }\n}\n/**\n * Given a collapsed range, move the start position backwards as far as\n * possible while the range still spans only a single line.\n */\n\n\nfunction expandRangeToStartOfLine(range) {\n !range.collapsed ? true ? invariant(false, 'expandRangeToStartOfLine: Provided range is not collapsed.') : undefined : void 0;\n range = range.cloneRange();\n var containingElement = range.startContainer;\n\n if (containingElement.nodeType !== 1) {\n containingElement = containingElement.parentNode;\n }\n\n var lineHeight = getLineHeightPx(containingElement); // Imagine our text looks like:\n //
once upon a time, there was a boy\n // who lived under^ the\n // stairs in a small closet.
\n // where the caret represents the cursor. First, we crawl up the tree until\n // the range spans multiple lines (setting the start point to before\n // \"\", then before \"
\"), then at each level we do a search to\n // find the latest point which is still on a previous line. We'll find that\n // the break point is inside the span, then inside the , then in its text\n // node child, the actual break point before \"who\".\n\n var bestContainer = range.endContainer;\n var bestOffset = range.endOffset;\n range.setStart(range.startContainer, 0);\n\n while (areRectsOnOneLine(getRangeClientRects(range), lineHeight)) {\n bestContainer = range.startContainer;\n bestOffset = range.startOffset;\n !bestContainer.parentNode ? true ? invariant(false, 'Found unexpected detached subtree when traversing.') : undefined : void 0;\n range.setStartBefore(bestContainer);\n\n if (bestContainer.nodeType === 1 && getComputedStyle(bestContainer).display !== 'inline') {\n // The start of the line is never in a different block-level container.\n break;\n }\n } // In the above example, range now spans from \"
\" to \"under\",\n // bestContainer is
, and bestOffset is 1 (index of inside
)].\n // Picking out which child to recurse into here is a special case since we\n // don't want to check past -- once we find that the final range starts\n // in , we can look at all of its children (and all of their children)\n // to find the break point.\n // At all times, (bestContainer, bestOffset) is the latest single-line start\n // point that we know of.\n\n\n var currentContainer = bestContainer;\n var maxIndexToConsider = bestOffset - 1;\n\n do {\n var nodeValue = currentContainer.nodeValue;\n var ii = maxIndexToConsider;\n\n for (; ii >= 0; ii--) {\n if (nodeValue != null && ii > 0 && UnicodeUtils.isSurrogatePair(nodeValue, ii - 1)) {\n // We're in the middle of a surrogate pair -- skip over so we never\n // return a range with an endpoint in the middle of a code point.\n continue;\n }\n\n range.setStart(currentContainer, ii);\n\n if (areRectsOnOneLine(getRangeClientRects(range), lineHeight)) {\n bestContainer = currentContainer;\n bestOffset = ii;\n } else {\n break;\n }\n }\n\n if (ii === -1 || currentContainer.childNodes.length === 0) {\n // If ii === -1, then (bestContainer, bestOffset), which is equal to\n // (currentContainer, 0), was a single-line start point but a start\n // point before currentContainer wasn't, so the line break seems to\n // have occurred immediately after currentContainer's start tag\n //\n // If currentContainer.childNodes.length === 0, we're already at a\n // terminal node (e.g., text node) and should return our current best.\n break;\n }\n\n currentContainer = currentContainer.childNodes[ii];\n maxIndexToConsider = getNodeLength(currentContainer);\n } while (true);\n\n range.setStart(bestContainer, bestOffset);\n return range;\n}\n\nmodule.exports = expandRangeToStartOfLine;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/expandRangeToStartOfLine.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/findAncestorOffsetKey.js": +/*!************************************************************!*\ + !*** ./node_modules/draft-js/lib/findAncestorOffsetKey.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar getCorrectDocumentFromNode = __webpack_require__(/*! ./getCorrectDocumentFromNode */ \"./node_modules/draft-js/lib/getCorrectDocumentFromNode.js\");\n\nvar getSelectionOffsetKeyForNode = __webpack_require__(/*! ./getSelectionOffsetKeyForNode */ \"./node_modules/draft-js/lib/getSelectionOffsetKeyForNode.js\");\n/**\n * Get the key from the node's nearest offset-aware ancestor.\n */\n\n\nfunction findAncestorOffsetKey(node) {\n var searchNode = node;\n\n while (searchNode && searchNode !== getCorrectDocumentFromNode(node).documentElement) {\n var key = getSelectionOffsetKeyForNode(searchNode);\n\n if (key != null) {\n return key;\n }\n\n searchNode = searchNode.parentNode;\n }\n\n return null;\n}\n\nmodule.exports = findAncestorOffsetKey;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/findAncestorOffsetKey.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/findRangesImmutable.js": +/*!**********************************************************!*\ + !*** ./node_modules/draft-js/lib/findRangesImmutable.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\n/**\n * Search through an array to find contiguous stretches of elements that\n * match a specified filter function.\n *\n * When ranges are found, execute a specified `found` function to supply\n * the values to the caller.\n */\nfunction findRangesImmutable(haystack, areEqualFn, filterFn, foundFn) {\n if (!haystack.size) {\n return;\n }\n\n var cursor = 0;\n haystack.reduce(function (value, nextValue, nextIndex) {\n if (!areEqualFn(value, nextValue)) {\n if (filterFn(value)) {\n foundFn(cursor, nextIndex);\n }\n\n cursor = nextIndex;\n }\n\n return nextValue;\n });\n filterFn(haystack.last()) && foundFn(cursor, haystack.count());\n}\n\nmodule.exports = findRangesImmutable;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/findRangesImmutable.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/generateRandomKey.js": +/*!********************************************************!*\ + !*** ./node_modules/draft-js/lib/generateRandomKey.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar seenKeys = {};\nvar MULTIPLIER = Math.pow(2, 24);\n\nfunction generateRandomKey() {\n var key;\n\n while (key === undefined || seenKeys.hasOwnProperty(key) || !isNaN(+key)) {\n key = Math.floor(Math.random() * MULTIPLIER).toString(32);\n }\n\n seenKeys[key] = true;\n return key;\n}\n\nmodule.exports = generateRandomKey;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/generateRandomKey.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/getCharacterRemovalRange.js": +/*!***************************************************************!*\ + !*** ./node_modules/draft-js/lib/getCharacterRemovalRange.js ***! + \***************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar DraftEntitySegments = __webpack_require__(/*! ./DraftEntitySegments */ \"./node_modules/draft-js/lib/DraftEntitySegments.js\");\n\nvar getRangesForDraftEntity = __webpack_require__(/*! ./getRangesForDraftEntity */ \"./node_modules/draft-js/lib/getRangesForDraftEntity.js\");\n\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ \"./node_modules/draft-js/node_modules/fbjs/lib/invariant.js\");\n/**\n * Given a SelectionState and a removal direction, determine the entire range\n * that should be removed from a ContentState. This is based on any entities\n * within the target, with their `mutability` values taken into account.\n *\n * For instance, if we are attempting to remove part of an \"immutable\" entity\n * range, the entire entity must be removed. The returned `SelectionState`\n * will be adjusted accordingly.\n */\n\n\nfunction getCharacterRemovalRange(entityMap, startBlock, endBlock, selectionState, direction) {\n var start = selectionState.getStartOffset();\n var end = selectionState.getEndOffset();\n var startEntityKey = startBlock.getEntityAt(start);\n var endEntityKey = endBlock.getEntityAt(end - 1);\n\n if (!startEntityKey && !endEntityKey) {\n return selectionState;\n }\n\n var newSelectionState = selectionState;\n\n if (startEntityKey && startEntityKey === endEntityKey) {\n newSelectionState = getEntityRemovalRange(entityMap, startBlock, newSelectionState, direction, startEntityKey, true, true);\n } else if (startEntityKey && endEntityKey) {\n var startSelectionState = getEntityRemovalRange(entityMap, startBlock, newSelectionState, direction, startEntityKey, false, true);\n var endSelectionState = getEntityRemovalRange(entityMap, endBlock, newSelectionState, direction, endEntityKey, false, false);\n newSelectionState = newSelectionState.merge({\n anchorOffset: startSelectionState.getAnchorOffset(),\n focusOffset: endSelectionState.getFocusOffset(),\n isBackward: false\n });\n } else if (startEntityKey) {\n var _startSelectionState = getEntityRemovalRange(entityMap, startBlock, newSelectionState, direction, startEntityKey, false, true);\n\n newSelectionState = newSelectionState.merge({\n anchorOffset: _startSelectionState.getStartOffset(),\n isBackward: false\n });\n } else if (endEntityKey) {\n var _endSelectionState = getEntityRemovalRange(entityMap, endBlock, newSelectionState, direction, endEntityKey, false, false);\n\n newSelectionState = newSelectionState.merge({\n focusOffset: _endSelectionState.getEndOffset(),\n isBackward: false\n });\n }\n\n return newSelectionState;\n}\n\nfunction getEntityRemovalRange(entityMap, block, selectionState, direction, entityKey, isEntireSelectionWithinEntity, isEntityAtStart) {\n var start = selectionState.getStartOffset();\n var end = selectionState.getEndOffset();\n\n var entity = entityMap.__get(entityKey);\n\n var mutability = entity.getMutability();\n var sideToConsider = isEntityAtStart ? start : end; // `MUTABLE` entities can just have the specified range of text removed\n // directly. No adjustments are needed.\n\n if (mutability === 'MUTABLE') {\n return selectionState;\n } // Find the entity range that overlaps with our removal range.\n\n\n var entityRanges = getRangesForDraftEntity(block, entityKey).filter(function (range) {\n return sideToConsider <= range.end && sideToConsider >= range.start;\n });\n !(entityRanges.length == 1) ? true ? invariant(false, 'There should only be one entity range within this removal range.') : undefined : void 0;\n var entityRange = entityRanges[0]; // For `IMMUTABLE` entity types, we will remove the entire entity range.\n\n if (mutability === 'IMMUTABLE') {\n return selectionState.merge({\n anchorOffset: entityRange.start,\n focusOffset: entityRange.end,\n isBackward: false\n });\n } // For `SEGMENTED` entity types, determine the appropriate segment to\n // remove.\n\n\n if (!isEntireSelectionWithinEntity) {\n if (isEntityAtStart) {\n end = entityRange.end;\n } else {\n start = entityRange.start;\n }\n }\n\n var removalRange = DraftEntitySegments.getRemovalRange(start, end, block.getText().slice(entityRange.start, entityRange.end), entityRange.start, direction);\n return selectionState.merge({\n anchorOffset: removalRange.start,\n focusOffset: removalRange.end,\n isBackward: false\n });\n}\n\nmodule.exports = getCharacterRemovalRange;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/getCharacterRemovalRange.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/getContentEditableContainer.js": +/*!******************************************************************!*\ + !*** ./node_modules/draft-js/lib/getContentEditableContainer.js ***! + \******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ \"./node_modules/draft-js/node_modules/fbjs/lib/invariant.js\");\n\nvar isHTMLElement = __webpack_require__(/*! ./isHTMLElement */ \"./node_modules/draft-js/lib/isHTMLElement.js\");\n\nfunction getContentEditableContainer(editor) {\n var editorNode = editor.editorContainer;\n !editorNode ? true ? invariant(false, 'Missing editorNode') : undefined : void 0;\n !isHTMLElement(editorNode.firstChild) ? true ? invariant(false, 'editorNode.firstChild is not an HTMLElement') : undefined : void 0;\n var htmlElement = editorNode.firstChild;\n return htmlElement;\n}\n\nmodule.exports = getContentEditableContainer;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/getContentEditableContainer.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/getContentStateFragment.js": +/*!**************************************************************!*\ + !*** ./node_modules/draft-js/lib/getContentStateFragment.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar randomizeBlockMapKeys = __webpack_require__(/*! ./randomizeBlockMapKeys */ \"./node_modules/draft-js/lib/randomizeBlockMapKeys.js\");\n\nvar removeEntitiesAtEdges = __webpack_require__(/*! ./removeEntitiesAtEdges */ \"./node_modules/draft-js/lib/removeEntitiesAtEdges.js\");\n\nvar getContentStateFragment = function getContentStateFragment(contentState, selectionState) {\n var startKey = selectionState.getStartKey();\n var startOffset = selectionState.getStartOffset();\n var endKey = selectionState.getEndKey();\n var endOffset = selectionState.getEndOffset(); // Edge entities should be stripped to ensure that we don't preserve\n // invalid partial entities when the fragment is reused. We do, however,\n // preserve entities that are entirely within the selection range.\n\n var contentWithoutEdgeEntities = removeEntitiesAtEdges(contentState, selectionState);\n var blockMap = contentWithoutEdgeEntities.getBlockMap();\n var blockKeys = blockMap.keySeq();\n var startIndex = blockKeys.indexOf(startKey);\n var endIndex = blockKeys.indexOf(endKey) + 1;\n return randomizeBlockMapKeys(blockMap.slice(startIndex, endIndex).map(function (block, blockKey) {\n var text = block.getText();\n var chars = block.getCharacterList();\n\n if (startKey === endKey) {\n return block.merge({\n text: text.slice(startOffset, endOffset),\n characterList: chars.slice(startOffset, endOffset)\n });\n }\n\n if (blockKey === startKey) {\n return block.merge({\n text: text.slice(startOffset),\n characterList: chars.slice(startOffset)\n });\n }\n\n if (blockKey === endKey) {\n return block.merge({\n text: text.slice(0, endOffset),\n characterList: chars.slice(0, endOffset)\n });\n }\n\n return block;\n }));\n};\n\nmodule.exports = getContentStateFragment;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/getContentStateFragment.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/getCorrectDocumentFromNode.js": +/*!*****************************************************************!*\ + !*** ./node_modules/draft-js/lib/getCorrectDocumentFromNode.js ***! + \*****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\nfunction getCorrectDocumentFromNode(node) {\n if (!node || !node.ownerDocument) {\n return document;\n }\n\n return node.ownerDocument;\n}\n\nmodule.exports = getCorrectDocumentFromNode;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/getCorrectDocumentFromNode.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/getDefaultKeyBinding.js": +/*!***********************************************************!*\ + !*** ./node_modules/draft-js/lib/getDefaultKeyBinding.js ***! + \***********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar KeyBindingUtil = __webpack_require__(/*! ./KeyBindingUtil */ \"./node_modules/draft-js/lib/KeyBindingUtil.js\");\n\nvar Keys = __webpack_require__(/*! fbjs/lib/Keys */ \"./node_modules/draft-js/node_modules/fbjs/lib/Keys.js\");\n\nvar UserAgent = __webpack_require__(/*! fbjs/lib/UserAgent */ \"./node_modules/draft-js/node_modules/fbjs/lib/UserAgent.js\");\n\nvar isOSX = UserAgent.isPlatform('Mac OS X'); // Firefox on OSX had a bug resulting in navigation instead of cursor movement.\n// This bug was fixed in Firefox 29. Feature detection is virtually impossible\n// so we just check the version number. See #342765.\n\nvar shouldFixFirefoxMovement = isOSX && UserAgent.isBrowser('Firefox < 29');\nvar hasCommandModifier = KeyBindingUtil.hasCommandModifier,\n isCtrlKeyCommand = KeyBindingUtil.isCtrlKeyCommand;\n\nfunction shouldRemoveWord(e) {\n return isOSX && e.altKey || isCtrlKeyCommand(e);\n}\n/**\n * Get the appropriate undo/redo command for a Z key command.\n */\n\n\nfunction getZCommand(e) {\n if (!hasCommandModifier(e)) {\n return null;\n }\n\n return e.shiftKey ? 'redo' : 'undo';\n}\n\nfunction getDeleteCommand(e) {\n // Allow default \"cut\" behavior for PCs on Shift + Delete.\n if (!isOSX && e.shiftKey) {\n return null;\n }\n\n return shouldRemoveWord(e) ? 'delete-word' : 'delete';\n}\n\nfunction getBackspaceCommand(e) {\n if (hasCommandModifier(e) && isOSX) {\n return 'backspace-to-start-of-line';\n }\n\n return shouldRemoveWord(e) ? 'backspace-word' : 'backspace';\n}\n/**\n * Retrieve a bound key command for the given event.\n */\n\n\nfunction getDefaultKeyBinding(e) {\n switch (e.keyCode) {\n case 66:\n // B\n return hasCommandModifier(e) ? 'bold' : null;\n\n case 68:\n // D\n return isCtrlKeyCommand(e) ? 'delete' : null;\n\n case 72:\n // H\n return isCtrlKeyCommand(e) ? 'backspace' : null;\n\n case 73:\n // I\n return hasCommandModifier(e) ? 'italic' : null;\n\n case 74:\n // J\n return hasCommandModifier(e) ? 'code' : null;\n\n case 75:\n // K\n return isOSX && isCtrlKeyCommand(e) ? 'secondary-cut' : null;\n\n case 77:\n // M\n return isCtrlKeyCommand(e) ? 'split-block' : null;\n\n case 79:\n // O\n return isCtrlKeyCommand(e) ? 'split-block' : null;\n\n case 84:\n // T\n return isOSX && isCtrlKeyCommand(e) ? 'transpose-characters' : null;\n\n case 85:\n // U\n return hasCommandModifier(e) ? 'underline' : null;\n\n case 87:\n // W\n return isOSX && isCtrlKeyCommand(e) ? 'backspace-word' : null;\n\n case 89:\n // Y\n if (isCtrlKeyCommand(e)) {\n return isOSX ? 'secondary-paste' : 'redo';\n }\n\n return null;\n\n case 90:\n // Z\n return getZCommand(e) || null;\n\n case Keys.RETURN:\n return 'split-block';\n\n case Keys.DELETE:\n return getDeleteCommand(e);\n\n case Keys.BACKSPACE:\n return getBackspaceCommand(e);\n // LEFT/RIGHT handlers serve as a workaround for a Firefox bug.\n\n case Keys.LEFT:\n return shouldFixFirefoxMovement && hasCommandModifier(e) ? 'move-selection-to-start-of-block' : null;\n\n case Keys.RIGHT:\n return shouldFixFirefoxMovement && hasCommandModifier(e) ? 'move-selection-to-end-of-block' : null;\n\n default:\n return null;\n }\n}\n\nmodule.exports = getDefaultKeyBinding;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/getDefaultKeyBinding.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/getDraftEditorSelection.js": +/*!**************************************************************!*\ + !*** ./node_modules/draft-js/lib/getDraftEditorSelection.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar getDraftEditorSelectionWithNodes = __webpack_require__(/*! ./getDraftEditorSelectionWithNodes */ \"./node_modules/draft-js/lib/getDraftEditorSelectionWithNodes.js\");\n/**\n * Convert the current selection range to an anchor/focus pair of offset keys\n * and values that can be interpreted by components.\n */\n\n\nfunction getDraftEditorSelection(editorState, root) {\n var selection = root.ownerDocument.defaultView.getSelection();\n var anchorNode = selection.anchorNode,\n anchorOffset = selection.anchorOffset,\n focusNode = selection.focusNode,\n focusOffset = selection.focusOffset,\n rangeCount = selection.rangeCount;\n\n if ( // No active selection.\n rangeCount === 0 || // No selection, ever. As in, the user hasn't selected anything since\n // opening the document.\n anchorNode == null || focusNode == null) {\n return {\n selectionState: editorState.getSelection().set('hasFocus', false),\n needsRecovery: false\n };\n }\n\n return getDraftEditorSelectionWithNodes(editorState, root, anchorNode, anchorOffset, focusNode, focusOffset);\n}\n\nmodule.exports = getDraftEditorSelection;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/getDraftEditorSelection.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/getDraftEditorSelectionWithNodes.js": +/*!***********************************************************************!*\ + !*** ./node_modules/draft-js/lib/getDraftEditorSelectionWithNodes.js ***! + \***********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar findAncestorOffsetKey = __webpack_require__(/*! ./findAncestorOffsetKey */ \"./node_modules/draft-js/lib/findAncestorOffsetKey.js\");\n\nvar getSelectionOffsetKeyForNode = __webpack_require__(/*! ./getSelectionOffsetKeyForNode */ \"./node_modules/draft-js/lib/getSelectionOffsetKeyForNode.js\");\n\nvar getUpdatedSelectionState = __webpack_require__(/*! ./getUpdatedSelectionState */ \"./node_modules/draft-js/lib/getUpdatedSelectionState.js\");\n\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ \"./node_modules/draft-js/node_modules/fbjs/lib/invariant.js\");\n\nvar isElement = __webpack_require__(/*! ./isElement */ \"./node_modules/draft-js/lib/isElement.js\");\n\nvar nullthrows = __webpack_require__(/*! fbjs/lib/nullthrows */ \"./node_modules/draft-js/node_modules/fbjs/lib/nullthrows.js\");\n\n/**\n * Convert the current selection range to an anchor/focus pair of offset keys\n * and values that can be interpreted by components.\n */\nfunction getDraftEditorSelectionWithNodes(editorState, root, anchorNode, anchorOffset, focusNode, focusOffset) {\n var anchorIsTextNode = anchorNode.nodeType === Node.TEXT_NODE;\n var focusIsTextNode = focusNode.nodeType === Node.TEXT_NODE; // If the selection range lies only on text nodes, the task is simple.\n // Find the nearest offset-aware elements and use the\n // offset values supplied by the selection range.\n\n if (anchorIsTextNode && focusIsTextNode) {\n return {\n selectionState: getUpdatedSelectionState(editorState, nullthrows(findAncestorOffsetKey(anchorNode)), anchorOffset, nullthrows(findAncestorOffsetKey(focusNode)), focusOffset),\n needsRecovery: false\n };\n }\n\n var anchorPoint = null;\n var focusPoint = null;\n var needsRecovery = true; // An element is selected. Convert this selection range into leaf offset\n // keys and offset values for consumption at the component level. This\n // is common in Firefox, where select-all and triple click behavior leads\n // to entire elements being selected.\n //\n // Note that we use the `needsRecovery` parameter in the callback here. This\n // is because when certain elements are selected, the behavior for subsequent\n // cursor movement (e.g. via arrow keys) is uncertain and may not match\n // expectations at the component level. For example, if an entire
is\n // selected and the user presses the right arrow, Firefox keeps the selection\n // on the
. If we allow subsequent keypresses to insert characters\n // natively, they will be inserted into a browser-created text node to the\n // right of that
. This is obviously undesirable.\n //\n // With the `needsRecovery` flag, we inform the caller that it is responsible\n // for manually setting the selection state on the rendered document to\n // ensure proper selection state maintenance.\n\n if (anchorIsTextNode) {\n anchorPoint = {\n key: nullthrows(findAncestorOffsetKey(anchorNode)),\n offset: anchorOffset\n };\n focusPoint = getPointForNonTextNode(root, focusNode, focusOffset);\n } else if (focusIsTextNode) {\n focusPoint = {\n key: nullthrows(findAncestorOffsetKey(focusNode)),\n offset: focusOffset\n };\n anchorPoint = getPointForNonTextNode(root, anchorNode, anchorOffset);\n } else {\n anchorPoint = getPointForNonTextNode(root, anchorNode, anchorOffset);\n focusPoint = getPointForNonTextNode(root, focusNode, focusOffset); // If the selection is collapsed on an empty block, don't force recovery.\n // This way, on arrow key selection changes, the browser can move the\n // cursor from a non-zero offset on one block, through empty blocks,\n // to a matching non-zero offset on other text blocks.\n\n if (anchorNode === focusNode && anchorOffset === focusOffset) {\n needsRecovery = !!anchorNode.firstChild && anchorNode.firstChild.nodeName !== 'BR';\n }\n }\n\n return {\n selectionState: getUpdatedSelectionState(editorState, anchorPoint.key, anchorPoint.offset, focusPoint.key, focusPoint.offset),\n needsRecovery: needsRecovery\n };\n}\n/**\n * Identify the first leaf descendant for the given node.\n */\n\n\nfunction getFirstLeaf(node) {\n while (node.firstChild && ( // data-blocks has no offset\n isElement(node.firstChild) && node.firstChild.getAttribute('data-blocks') === 'true' || getSelectionOffsetKeyForNode(node.firstChild))) {\n node = node.firstChild;\n }\n\n return node;\n}\n/**\n * Identify the last leaf descendant for the given node.\n */\n\n\nfunction getLastLeaf(node) {\n while (node.lastChild && ( // data-blocks has no offset\n isElement(node.lastChild) && node.lastChild.getAttribute('data-blocks') === 'true' || getSelectionOffsetKeyForNode(node.lastChild))) {\n node = node.lastChild;\n }\n\n return node;\n}\n\nfunction getPointForNonTextNode(editorRoot, startNode, childOffset) {\n var node = startNode;\n var offsetKey = findAncestorOffsetKey(node);\n !(offsetKey != null || editorRoot && (editorRoot === node || editorRoot.firstChild === node)) ? true ? invariant(false, 'Unknown node in selection range.') : undefined : void 0; // If the editorRoot is the selection, step downward into the content\n // wrapper.\n\n if (editorRoot === node) {\n node = node.firstChild;\n !isElement(node) ? true ? invariant(false, 'Invalid DraftEditorContents node.') : undefined : void 0;\n var castedNode = node; // assignment only added for flow :/\n // otherwise it throws in line 200 saying that node can be null or undefined\n\n node = castedNode;\n !(node.getAttribute('data-contents') === 'true') ? true ? invariant(false, 'Invalid DraftEditorContents structure.') : undefined : void 0;\n\n if (childOffset > 0) {\n childOffset = node.childNodes.length;\n }\n } // If the child offset is zero and we have an offset key, we're done.\n // If there's no offset key because the entire editor is selected,\n // find the leftmost (\"first\") leaf in the tree and use that as the offset\n // key.\n\n\n if (childOffset === 0) {\n var key = null;\n\n if (offsetKey != null) {\n key = offsetKey;\n } else {\n var firstLeaf = getFirstLeaf(node);\n key = nullthrows(getSelectionOffsetKeyForNode(firstLeaf));\n }\n\n return {\n key: key,\n offset: 0\n };\n }\n\n var nodeBeforeCursor = node.childNodes[childOffset - 1];\n var leafKey = null;\n var textLength = null;\n\n if (!getSelectionOffsetKeyForNode(nodeBeforeCursor)) {\n // Our target node may be a leaf or a text node, in which case we're\n // already where we want to be and can just use the child's length as\n // our offset.\n leafKey = nullthrows(offsetKey);\n textLength = getTextContentLength(nodeBeforeCursor);\n } else {\n // Otherwise, we'll look at the child to the left of the cursor and find\n // the last leaf node in its subtree.\n var lastLeaf = getLastLeaf(nodeBeforeCursor);\n leafKey = nullthrows(getSelectionOffsetKeyForNode(lastLeaf));\n textLength = getTextContentLength(lastLeaf);\n }\n\n return {\n key: leafKey,\n offset: textLength\n };\n}\n/**\n * Return the length of a node's textContent, regarding single newline\n * characters as zero-length. This allows us to avoid problems with identifying\n * the correct selection offset for empty blocks in IE, in which we\n * render newlines instead of break tags.\n */\n\n\nfunction getTextContentLength(node) {\n var textContent = node.textContent;\n return textContent === '\\n' ? 0 : textContent.length;\n}\n\nmodule.exports = getDraftEditorSelectionWithNodes;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/getDraftEditorSelectionWithNodes.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/getEntityKeyForSelection.js": +/*!***************************************************************!*\ + !*** ./node_modules/draft-js/lib/getEntityKeyForSelection.js ***! + \***************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar _require = __webpack_require__(/*! ./draftKeyUtils */ \"./node_modules/draft-js/lib/draftKeyUtils.js\"),\n notEmptyKey = _require.notEmptyKey;\n/**\n * Return the entity key that should be used when inserting text for the\n * specified target selection, only if the entity is `MUTABLE`. `IMMUTABLE`\n * and `SEGMENTED` entities should not be used for insertion behavior.\n */\n\n\nfunction getEntityKeyForSelection(contentState, targetSelection) {\n var entityKey;\n\n if (targetSelection.isCollapsed()) {\n var key = targetSelection.getAnchorKey();\n var offset = targetSelection.getAnchorOffset();\n\n if (offset > 0) {\n entityKey = contentState.getBlockForKey(key).getEntityAt(offset - 1);\n\n if (entityKey !== contentState.getBlockForKey(key).getEntityAt(offset)) {\n return null;\n }\n\n return filterKey(contentState.getEntityMap(), entityKey);\n }\n\n return null;\n }\n\n var startKey = targetSelection.getStartKey();\n var startOffset = targetSelection.getStartOffset();\n var startBlock = contentState.getBlockForKey(startKey);\n entityKey = startOffset === startBlock.getLength() ? null : startBlock.getEntityAt(startOffset);\n return filterKey(contentState.getEntityMap(), entityKey);\n}\n/**\n * Determine whether an entity key corresponds to a `MUTABLE` entity. If so,\n * return it. If not, return null.\n */\n\n\nfunction filterKey(entityMap, entityKey) {\n if (notEmptyKey(entityKey)) {\n var entity = entityMap.__get(entityKey);\n\n return entity.getMutability() === 'MUTABLE' ? entityKey : null;\n }\n\n return null;\n}\n\nmodule.exports = getEntityKeyForSelection;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/getEntityKeyForSelection.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/getFragmentFromSelection.js": +/*!***************************************************************!*\ + !*** ./node_modules/draft-js/lib/getFragmentFromSelection.js ***! + \***************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar getContentStateFragment = __webpack_require__(/*! ./getContentStateFragment */ \"./node_modules/draft-js/lib/getContentStateFragment.js\");\n\nfunction getFragmentFromSelection(editorState) {\n var selectionState = editorState.getSelection();\n\n if (selectionState.isCollapsed()) {\n return null;\n }\n\n return getContentStateFragment(editorState.getCurrentContent(), selectionState);\n}\n\nmodule.exports = getFragmentFromSelection;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/getFragmentFromSelection.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/getNextDelimiterBlockKey.js": +/*!***************************************************************!*\ + !*** ./node_modules/draft-js/lib/getNextDelimiterBlockKey.js ***! + \***************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n *\n * This is unstable and not part of the public API and should not be used by\n * production systems. This file may be update/removed without notice.\n */\nvar ContentBlockNode = __webpack_require__(/*! ./ContentBlockNode */ \"./node_modules/draft-js/lib/ContentBlockNode.js\");\n\nvar getNextDelimiterBlockKey = function getNextDelimiterBlockKey(block, blockMap) {\n var isExperimentalTreeBlock = block instanceof ContentBlockNode;\n\n if (!isExperimentalTreeBlock) {\n return null;\n }\n\n var nextSiblingKey = block.getNextSiblingKey();\n\n if (nextSiblingKey) {\n return nextSiblingKey;\n }\n\n var parent = block.getParentKey();\n\n if (!parent) {\n return null;\n }\n\n var nextNonDescendantBlock = blockMap.get(parent);\n\n while (nextNonDescendantBlock && !nextNonDescendantBlock.getNextSiblingKey()) {\n var parentKey = nextNonDescendantBlock.getParentKey();\n nextNonDescendantBlock = parentKey ? blockMap.get(parentKey) : null;\n }\n\n if (!nextNonDescendantBlock) {\n return null;\n }\n\n return nextNonDescendantBlock.getNextSiblingKey();\n};\n\nmodule.exports = getNextDelimiterBlockKey;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/getNextDelimiterBlockKey.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/getOwnObjectValues.js": +/*!*********************************************************!*\ + !*** ./node_modules/draft-js/lib/getOwnObjectValues.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n/**\n * Copyright 2004-present Facebook. All Rights Reserved.\n *\n * \n * @typechecks\n * @format\n */\n\n/**\n * Retrieve an object's own values as an array. If you want the values in the\n * protoype chain, too, use getObjectValuesIncludingPrototype.\n *\n * If you are looking for a function that creates an Array instance based\n * on an \"Array-like\" object, use createArrayFrom instead.\n *\n * @param {object} obj An object.\n * @return {array} The object's values.\n */\nfunction getOwnObjectValues(obj) {\n return Object.keys(obj).map(function (key) {\n return obj[key];\n });\n}\n\nmodule.exports = getOwnObjectValues;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/getOwnObjectValues.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/getRangeBoundingClientRect.js": +/*!*****************************************************************!*\ + !*** ./node_modules/draft-js/lib/getRangeBoundingClientRect.js ***! + \*****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar getRangeClientRects = __webpack_require__(/*! ./getRangeClientRects */ \"./node_modules/draft-js/lib/getRangeClientRects.js\");\n\n/**\n * Like range.getBoundingClientRect() but normalizes for browser bugs.\n */\nfunction getRangeBoundingClientRect(range) {\n // \"Return a DOMRect object describing the smallest rectangle that includes\n // the first rectangle in list and all of the remaining rectangles of which\n // the height or width is not zero.\"\n // http://www.w3.org/TR/cssom-view/#dom-range-getboundingclientrect\n var rects = getRangeClientRects(range);\n var top = 0;\n var right = 0;\n var bottom = 0;\n var left = 0;\n\n if (rects.length) {\n // If the first rectangle has 0 width, we use the second, this is needed\n // because Chrome renders a 0 width rectangle when the selection contains\n // a line break.\n if (rects.length > 1 && rects[0].width === 0) {\n var _rects$ = rects[1];\n top = _rects$.top;\n right = _rects$.right;\n bottom = _rects$.bottom;\n left = _rects$.left;\n } else {\n var _rects$2 = rects[0];\n top = _rects$2.top;\n right = _rects$2.right;\n bottom = _rects$2.bottom;\n left = _rects$2.left;\n }\n\n for (var ii = 1; ii < rects.length; ii++) {\n var rect = rects[ii];\n\n if (rect.height !== 0 && rect.width !== 0) {\n top = Math.min(top, rect.top);\n right = Math.max(right, rect.right);\n bottom = Math.max(bottom, rect.bottom);\n left = Math.min(left, rect.left);\n }\n }\n }\n\n return {\n top: top,\n right: right,\n bottom: bottom,\n left: left,\n width: right - left,\n height: bottom - top\n };\n}\n\nmodule.exports = getRangeBoundingClientRect;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/getRangeBoundingClientRect.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/getRangeClientRects.js": +/*!**********************************************************!*\ + !*** ./node_modules/draft-js/lib/getRangeClientRects.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar UserAgent = __webpack_require__(/*! fbjs/lib/UserAgent */ \"./node_modules/draft-js/node_modules/fbjs/lib/UserAgent.js\");\n\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ \"./node_modules/draft-js/node_modules/fbjs/lib/invariant.js\");\n\nvar isChrome = UserAgent.isBrowser('Chrome'); // In Chrome, the client rects will include the entire bounds of all nodes that\n// begin (have a start tag) within the selection, even if the selection does\n// not overlap the entire node. To resolve this, we split the range at each\n// start tag and join the client rects together.\n// https://code.google.com/p/chromium/issues/detail?id=324437\n\n/* eslint-disable consistent-return */\n\nfunction getRangeClientRectsChrome(range) {\n var tempRange = range.cloneRange();\n var clientRects = [];\n\n for (var ancestor = range.endContainer; ancestor != null; ancestor = ancestor.parentNode) {\n // If we've climbed up to the common ancestor, we can now use the\n // original start point and stop climbing the tree.\n var atCommonAncestor = ancestor === range.commonAncestorContainer;\n\n if (atCommonAncestor) {\n tempRange.setStart(range.startContainer, range.startOffset);\n } else {\n tempRange.setStart(tempRange.endContainer, 0);\n }\n\n var rects = Array.from(tempRange.getClientRects());\n clientRects.push(rects);\n\n if (atCommonAncestor) {\n var _ref;\n\n clientRects.reverse();\n return (_ref = []).concat.apply(_ref, clientRects);\n }\n\n tempRange.setEndBefore(ancestor);\n }\n\n true ? true ? invariant(false, 'Found an unexpected detached subtree when getting range client rects.') : undefined : undefined;\n}\n/* eslint-enable consistent-return */\n\n/**\n * Like range.getClientRects() but normalizes for browser bugs.\n */\n\n\nvar getRangeClientRects = isChrome ? getRangeClientRectsChrome : function (range) {\n return Array.from(range.getClientRects());\n};\nmodule.exports = getRangeClientRects;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/getRangeClientRects.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/getRangesForDraftEntity.js": +/*!**************************************************************!*\ + !*** ./node_modules/draft-js/lib/getRangesForDraftEntity.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ \"./node_modules/draft-js/node_modules/fbjs/lib/invariant.js\");\n/**\n * Obtain the start and end positions of the range that has the\n * specified entity applied to it.\n *\n * Entity keys are applied only to contiguous stretches of text, so this\n * method searches for the first instance of the entity key and returns\n * the subsequent range.\n */\n\n\nfunction getRangesForDraftEntity(block, key) {\n var ranges = [];\n block.findEntityRanges(function (c) {\n return c.getEntity() === key;\n }, function (start, end) {\n ranges.push({\n start: start,\n end: end\n });\n });\n !!!ranges.length ? true ? invariant(false, 'Entity key not found in this range.') : undefined : void 0;\n return ranges;\n}\n\nmodule.exports = getRangesForDraftEntity;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/getRangesForDraftEntity.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/getSafeBodyFromHTML.js": +/*!**********************************************************!*\ + !*** ./node_modules/draft-js/lib/getSafeBodyFromHTML.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar UserAgent = __webpack_require__(/*! fbjs/lib/UserAgent */ \"./node_modules/draft-js/node_modules/fbjs/lib/UserAgent.js\");\n\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ \"./node_modules/draft-js/node_modules/fbjs/lib/invariant.js\");\n\nvar isOldIE = UserAgent.isBrowser('IE <= 9'); // Provides a dom node that will not execute scripts\n// https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation.createHTMLDocument\n// https://developer.mozilla.org/en-US/Add-ons/Code_snippets/HTML_to_DOM\n\nfunction getSafeBodyFromHTML(html) {\n var doc;\n var root = null; // Provides a safe context\n\n if (!isOldIE && document.implementation && document.implementation.createHTMLDocument) {\n doc = document.implementation.createHTMLDocument('foo');\n !doc.documentElement ? true ? invariant(false, 'Missing doc.documentElement') : undefined : void 0;\n doc.documentElement.innerHTML = html;\n root = doc.getElementsByTagName('body')[0];\n }\n\n return root;\n}\n\nmodule.exports = getSafeBodyFromHTML;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/getSafeBodyFromHTML.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/getSelectionOffsetKeyForNode.js": +/*!*******************************************************************!*\ + !*** ./node_modules/draft-js/lib/getSelectionOffsetKeyForNode.js ***! + \*******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n/**\n * Get offset key from a node or it's child nodes. Return the first offset key\n * found on the DOM tree of given node.\n */\n\nvar isElement = __webpack_require__(/*! ./isElement */ \"./node_modules/draft-js/lib/isElement.js\");\n\nfunction getSelectionOffsetKeyForNode(node) {\n if (isElement(node)) {\n var castedNode = node;\n var offsetKey = castedNode.getAttribute('data-offset-key');\n\n if (offsetKey) {\n return offsetKey;\n }\n\n for (var ii = 0; ii < castedNode.childNodes.length; ii++) {\n var childOffsetKey = getSelectionOffsetKeyForNode(castedNode.childNodes[ii]);\n\n if (childOffsetKey) {\n return childOffsetKey;\n }\n }\n }\n\n return null;\n}\n\nmodule.exports = getSelectionOffsetKeyForNode;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/getSelectionOffsetKeyForNode.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/getTextContentFromFiles.js": +/*!**************************************************************!*\ + !*** ./node_modules/draft-js/lib/getTextContentFromFiles.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/* WEBPACK VAR INJECTION */(function(global) {/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ \"./node_modules/draft-js/node_modules/fbjs/lib/invariant.js\");\n\nvar TEXT_CLIPPING_REGEX = /\\.textClipping$/;\nvar TEXT_TYPES = {\n 'text/plain': true,\n 'text/html': true,\n 'text/rtf': true\n}; // Somewhat arbitrary upper bound on text size. Let's not lock up the browser.\n\nvar TEXT_SIZE_UPPER_BOUND = 5000;\n/**\n * Extract the text content from a file list.\n */\n\nfunction getTextContentFromFiles(files, callback) {\n var readCount = 0;\n var results = [];\n files.forEach(function (\n /*blob*/\n file) {\n readFile(file, function (\n /*string*/\n text) {\n readCount++;\n text && results.push(text.slice(0, TEXT_SIZE_UPPER_BOUND));\n\n if (readCount == files.length) {\n callback(results.join('\\r'));\n }\n });\n });\n}\n/**\n * todo isaac: Do work to turn html/rtf into a content fragment.\n */\n\n\nfunction readFile(file, callback) {\n if (!global.FileReader || file.type && !(file.type in TEXT_TYPES)) {\n callback('');\n return;\n }\n\n if (file.type === '') {\n var _contents = ''; // Special-case text clippings, which have an empty type but include\n // `.textClipping` in the file name. `readAsText` results in an empty\n // string for text clippings, so we force the file name to serve\n // as the text value for the file.\n\n if (TEXT_CLIPPING_REGEX.test(file.name)) {\n _contents = file.name.replace(TEXT_CLIPPING_REGEX, '');\n }\n\n callback(_contents);\n return;\n }\n\n var reader = new FileReader();\n\n reader.onload = function () {\n var result = reader.result;\n !(typeof result === 'string') ? true ? invariant(false, 'We should be calling \"FileReader.readAsText\" which returns a string') : undefined : void 0;\n callback(result);\n };\n\n reader.onerror = function () {\n callback('');\n };\n\n reader.readAsText(file);\n}\n\nmodule.exports = getTextContentFromFiles;\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/getTextContentFromFiles.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/getUpdatedSelectionState.js": +/*!***************************************************************!*\ + !*** ./node_modules/draft-js/lib/getUpdatedSelectionState.js ***! + \***************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar DraftOffsetKey = __webpack_require__(/*! ./DraftOffsetKey */ \"./node_modules/draft-js/lib/DraftOffsetKey.js\");\n\nvar nullthrows = __webpack_require__(/*! fbjs/lib/nullthrows */ \"./node_modules/draft-js/node_modules/fbjs/lib/nullthrows.js\");\n\nfunction getUpdatedSelectionState(editorState, anchorKey, anchorOffset, focusKey, focusOffset) {\n var selection = nullthrows(editorState.getSelection());\n\n if (!anchorKey || !focusKey) {\n // If we cannot make sense of the updated selection state, stick to the current one.\n if (true) {\n /* eslint-disable-next-line */\n console.warn('Invalid selection state.', arguments, editorState.toJS());\n }\n\n return selection;\n }\n\n var anchorPath = DraftOffsetKey.decode(anchorKey);\n var anchorBlockKey = anchorPath.blockKey;\n var anchorLeafBlockTree = editorState.getBlockTree(anchorBlockKey);\n var anchorLeaf = anchorLeafBlockTree && anchorLeafBlockTree.getIn([anchorPath.decoratorKey, 'leaves', anchorPath.leafKey]);\n var focusPath = DraftOffsetKey.decode(focusKey);\n var focusBlockKey = focusPath.blockKey;\n var focusLeafBlockTree = editorState.getBlockTree(focusBlockKey);\n var focusLeaf = focusLeafBlockTree && focusLeafBlockTree.getIn([focusPath.decoratorKey, 'leaves', focusPath.leafKey]);\n\n if (!anchorLeaf || !focusLeaf) {\n // If we cannot make sense of the updated selection state, stick to the current one.\n if (true) {\n /* eslint-disable-next-line */\n console.warn('Invalid selection state.', arguments, editorState.toJS());\n }\n\n return selection;\n }\n\n var anchorLeafStart = anchorLeaf.get('start');\n var focusLeafStart = focusLeaf.get('start');\n var anchorBlockOffset = anchorLeaf ? anchorLeafStart + anchorOffset : null;\n var focusBlockOffset = focusLeaf ? focusLeafStart + focusOffset : null;\n var areEqual = selection.getAnchorKey() === anchorBlockKey && selection.getAnchorOffset() === anchorBlockOffset && selection.getFocusKey() === focusBlockKey && selection.getFocusOffset() === focusBlockOffset;\n\n if (areEqual) {\n return selection;\n }\n\n var isBackward = false;\n\n if (anchorBlockKey === focusBlockKey) {\n var anchorLeafEnd = anchorLeaf.get('end');\n var focusLeafEnd = focusLeaf.get('end');\n\n if (focusLeafStart === anchorLeafStart && focusLeafEnd === anchorLeafEnd) {\n isBackward = focusOffset < anchorOffset;\n } else {\n isBackward = focusLeafStart < anchorLeafStart;\n }\n } else {\n var startKey = editorState.getCurrentContent().getBlockMap().keySeq().skipUntil(function (v) {\n return v === anchorBlockKey || v === focusBlockKey;\n }).first();\n isBackward = startKey === focusBlockKey;\n }\n\n return selection.merge({\n anchorKey: anchorBlockKey,\n anchorOffset: anchorBlockOffset,\n focusKey: focusBlockKey,\n focusOffset: focusBlockOffset,\n isBackward: isBackward\n });\n}\n\nmodule.exports = getUpdatedSelectionState;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/getUpdatedSelectionState.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/getVisibleSelectionRect.js": +/*!**************************************************************!*\ + !*** ./node_modules/draft-js/lib/getVisibleSelectionRect.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar getRangeBoundingClientRect = __webpack_require__(/*! ./getRangeBoundingClientRect */ \"./node_modules/draft-js/lib/getRangeBoundingClientRect.js\");\n/**\n * Return the bounding ClientRect for the visible DOM selection, if any.\n * In cases where there are no selected ranges or the bounding rect is\n * temporarily invalid, return null.\n *\n * When using from an iframe, you should pass the iframe window object\n */\n\n\nfunction getVisibleSelectionRect(global) {\n var selection = global.getSelection();\n\n if (!selection.rangeCount) {\n return null;\n }\n\n var range = selection.getRangeAt(0);\n var boundingRect = getRangeBoundingClientRect(range);\n var top = boundingRect.top,\n right = boundingRect.right,\n bottom = boundingRect.bottom,\n left = boundingRect.left; // When a re-render leads to a node being removed, the DOM selection will\n // temporarily be placed on an ancestor node, which leads to an invalid\n // bounding rect. Discard this state.\n\n if (top === 0 && right === 0 && bottom === 0 && left === 0) {\n return null;\n }\n\n return boundingRect;\n}\n\nmodule.exports = getVisibleSelectionRect;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/getVisibleSelectionRect.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/getWindowForNode.js": +/*!*******************************************************!*\ + !*** ./node_modules/draft-js/lib/getWindowForNode.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\nfunction getWindowForNode(node) {\n if (!node || !node.ownerDocument || !node.ownerDocument.defaultView) {\n return window;\n }\n\n return node.ownerDocument.defaultView;\n}\n\nmodule.exports = getWindowForNode;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/getWindowForNode.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/gkx.js": +/*!******************************************!*\ + !*** ./node_modules/draft-js/lib/gkx.js ***! + \******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n */\n\n\nmodule.exports = function (name) {\n if (typeof window !== 'undefined' && window.__DRAFT_GKX) {\n return !!window.__DRAFT_GKX[name];\n }\n\n return false;\n};\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/gkx.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/insertFragmentIntoContentState.js": +/*!*********************************************************************!*\ + !*** ./node_modules/draft-js/lib/insertFragmentIntoContentState.js ***! + \*********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar BlockMapBuilder = __webpack_require__(/*! ./BlockMapBuilder */ \"./node_modules/draft-js/lib/BlockMapBuilder.js\");\n\nvar ContentBlockNode = __webpack_require__(/*! ./ContentBlockNode */ \"./node_modules/draft-js/lib/ContentBlockNode.js\");\n\nvar Immutable = __webpack_require__(/*! immutable */ \"./node_modules/immutable/dist/immutable.js\");\n\nvar insertIntoList = __webpack_require__(/*! ./insertIntoList */ \"./node_modules/draft-js/lib/insertIntoList.js\");\n\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ \"./node_modules/draft-js/node_modules/fbjs/lib/invariant.js\");\n\nvar randomizeBlockMapKeys = __webpack_require__(/*! ./randomizeBlockMapKeys */ \"./node_modules/draft-js/lib/randomizeBlockMapKeys.js\");\n\nvar List = Immutable.List;\n\nvar updateExistingBlock = function updateExistingBlock(contentState, selectionState, blockMap, fragmentBlock, targetKey, targetOffset) {\n var mergeBlockData = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : 'REPLACE_WITH_NEW_DATA';\n var targetBlock = blockMap.get(targetKey);\n var text = targetBlock.getText();\n var chars = targetBlock.getCharacterList();\n var finalKey = targetKey;\n var finalOffset = targetOffset + fragmentBlock.getText().length;\n var data = null;\n\n switch (mergeBlockData) {\n case 'MERGE_OLD_DATA_TO_NEW_DATA':\n data = fragmentBlock.getData().merge(targetBlock.getData());\n break;\n\n case 'REPLACE_WITH_NEW_DATA':\n data = fragmentBlock.getData();\n break;\n }\n\n var type = targetBlock.getType();\n\n if (text && type === 'unstyled') {\n type = fragmentBlock.getType();\n }\n\n var newBlock = targetBlock.merge({\n text: text.slice(0, targetOffset) + fragmentBlock.getText() + text.slice(targetOffset),\n characterList: insertIntoList(chars, fragmentBlock.getCharacterList(), targetOffset),\n type: type,\n data: data\n });\n return contentState.merge({\n blockMap: blockMap.set(targetKey, newBlock),\n selectionBefore: selectionState,\n selectionAfter: selectionState.merge({\n anchorKey: finalKey,\n anchorOffset: finalOffset,\n focusKey: finalKey,\n focusOffset: finalOffset,\n isBackward: false\n })\n });\n};\n/**\n * Appends text/characterList from the fragment first block to\n * target block.\n */\n\n\nvar updateHead = function updateHead(block, targetOffset, fragment) {\n var text = block.getText();\n var chars = block.getCharacterList(); // Modify head portion of block.\n\n var headText = text.slice(0, targetOffset);\n var headCharacters = chars.slice(0, targetOffset);\n var appendToHead = fragment.first();\n return block.merge({\n text: headText + appendToHead.getText(),\n characterList: headCharacters.concat(appendToHead.getCharacterList()),\n type: headText ? block.getType() : appendToHead.getType(),\n data: appendToHead.getData()\n });\n};\n/**\n * Appends offset text/characterList from the target block to the last\n * fragment block.\n */\n\n\nvar updateTail = function updateTail(block, targetOffset, fragment) {\n // Modify tail portion of block.\n var text = block.getText();\n var chars = block.getCharacterList(); // Modify head portion of block.\n\n var blockSize = text.length;\n var tailText = text.slice(targetOffset, blockSize);\n var tailCharacters = chars.slice(targetOffset, blockSize);\n var prependToTail = fragment.last();\n return prependToTail.merge({\n text: prependToTail.getText() + tailText,\n characterList: prependToTail.getCharacterList().concat(tailCharacters),\n data: prependToTail.getData()\n });\n};\n\nvar getRootBlocks = function getRootBlocks(block, blockMap) {\n var headKey = block.getKey();\n var rootBlock = block;\n var rootBlocks = []; // sometimes the fragment head block will not be part of the blockMap itself this can happen when\n // the fragment head is used to update the target block, however when this does not happen we need\n // to make sure that we include it on the rootBlocks since the first block of a fragment is always a\n // fragment root block\n\n if (blockMap.get(headKey)) {\n rootBlocks.push(headKey);\n }\n\n while (rootBlock && rootBlock.getNextSiblingKey()) {\n var lastSiblingKey = rootBlock.getNextSiblingKey();\n\n if (!lastSiblingKey) {\n break;\n }\n\n rootBlocks.push(lastSiblingKey);\n rootBlock = blockMap.get(lastSiblingKey);\n }\n\n return rootBlocks;\n};\n\nvar updateBlockMapLinks = function updateBlockMapLinks(blockMap, originalBlockMap, targetBlock, fragmentHeadBlock) {\n return blockMap.withMutations(function (blockMapState) {\n var targetKey = targetBlock.getKey();\n var headKey = fragmentHeadBlock.getKey();\n var targetNextKey = targetBlock.getNextSiblingKey();\n var targetParentKey = targetBlock.getParentKey();\n var fragmentRootBlocks = getRootBlocks(fragmentHeadBlock, blockMap);\n var lastRootFragmentBlockKey = fragmentRootBlocks[fragmentRootBlocks.length - 1];\n\n if (blockMapState.get(headKey)) {\n // update the fragment head when it is part of the blockMap otherwise\n blockMapState.setIn([targetKey, 'nextSibling'], headKey);\n blockMapState.setIn([headKey, 'prevSibling'], targetKey);\n } else {\n // update the target block that had the fragment head contents merged into it\n blockMapState.setIn([targetKey, 'nextSibling'], fragmentHeadBlock.getNextSiblingKey());\n blockMapState.setIn([fragmentHeadBlock.getNextSiblingKey(), 'prevSibling'], targetKey);\n } // update the last root block fragment\n\n\n blockMapState.setIn([lastRootFragmentBlockKey, 'nextSibling'], targetNextKey); // update the original target next block\n\n if (targetNextKey) {\n blockMapState.setIn([targetNextKey, 'prevSibling'], lastRootFragmentBlockKey);\n } // update fragment parent links\n\n\n fragmentRootBlocks.forEach(function (blockKey) {\n return blockMapState.setIn([blockKey, 'parent'], targetParentKey);\n }); // update targetBlock parent child links\n\n if (targetParentKey) {\n var targetParent = blockMap.get(targetParentKey);\n var originalTargetParentChildKeys = targetParent.getChildKeys();\n var targetBlockIndex = originalTargetParentChildKeys.indexOf(targetKey);\n var insertionIndex = targetBlockIndex + 1;\n var newChildrenKeysArray = originalTargetParentChildKeys.toArray(); // insert fragment children\n\n newChildrenKeysArray.splice.apply(newChildrenKeysArray, [insertionIndex, 0].concat(fragmentRootBlocks));\n blockMapState.setIn([targetParentKey, 'children'], List(newChildrenKeysArray));\n }\n });\n};\n\nvar insertFragment = function insertFragment(contentState, selectionState, blockMap, fragment, targetKey, targetOffset) {\n var isTreeBasedBlockMap = blockMap.first() instanceof ContentBlockNode;\n var newBlockArr = [];\n var fragmentSize = fragment.size;\n var target = blockMap.get(targetKey);\n var head = fragment.first();\n var tail = fragment.last();\n var finalOffset = tail.getLength();\n var finalKey = tail.getKey();\n var shouldNotUpdateFromFragmentBlock = isTreeBasedBlockMap && (!target.getChildKeys().isEmpty() || !head.getChildKeys().isEmpty());\n blockMap.forEach(function (block, blockKey) {\n if (blockKey !== targetKey) {\n newBlockArr.push(block);\n return;\n }\n\n if (shouldNotUpdateFromFragmentBlock) {\n newBlockArr.push(block);\n } else {\n newBlockArr.push(updateHead(block, targetOffset, fragment));\n } // Insert fragment blocks after the head and before the tail.\n\n\n fragment // when we are updating the target block with the head fragment block we skip the first fragment\n // head since its contents have already been merged with the target block otherwise we include\n // the whole fragment\n .slice(shouldNotUpdateFromFragmentBlock ? 0 : 1, fragmentSize - 1).forEach(function (fragmentBlock) {\n return newBlockArr.push(fragmentBlock);\n }); // update tail\n\n newBlockArr.push(updateTail(block, targetOffset, fragment));\n });\n var updatedBlockMap = BlockMapBuilder.createFromArray(newBlockArr);\n\n if (isTreeBasedBlockMap) {\n updatedBlockMap = updateBlockMapLinks(updatedBlockMap, blockMap, target, head);\n }\n\n return contentState.merge({\n blockMap: updatedBlockMap,\n selectionBefore: selectionState,\n selectionAfter: selectionState.merge({\n anchorKey: finalKey,\n anchorOffset: finalOffset,\n focusKey: finalKey,\n focusOffset: finalOffset,\n isBackward: false\n })\n });\n};\n\nvar insertFragmentIntoContentState = function insertFragmentIntoContentState(contentState, selectionState, fragmentBlockMap) {\n var mergeBlockData = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'REPLACE_WITH_NEW_DATA';\n !selectionState.isCollapsed() ? true ? invariant(false, '`insertFragment` should only be called with a collapsed selection state.') : undefined : void 0;\n var blockMap = contentState.getBlockMap();\n var fragment = randomizeBlockMapKeys(fragmentBlockMap);\n var targetKey = selectionState.getStartKey();\n var targetOffset = selectionState.getStartOffset();\n var targetBlock = blockMap.get(targetKey);\n\n if (targetBlock instanceof ContentBlockNode) {\n !targetBlock.getChildKeys().isEmpty() ? true ? invariant(false, '`insertFragment` should not be called when a container node is selected.') : undefined : void 0;\n } // When we insert a fragment with a single block we simply update the target block\n // with the contents of the inserted fragment block\n\n\n if (fragment.size === 1) {\n return updateExistingBlock(contentState, selectionState, blockMap, fragment.first(), targetKey, targetOffset, mergeBlockData);\n }\n\n return insertFragment(contentState, selectionState, blockMap, fragment, targetKey, targetOffset);\n};\n\nmodule.exports = insertFragmentIntoContentState;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/insertFragmentIntoContentState.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/insertIntoList.js": +/*!*****************************************************!*\ + !*** ./node_modules/draft-js/lib/insertIntoList.js ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\n/**\n * Maintain persistence for target list when appending and prepending.\n */\nfunction insertIntoList(targetListArg, toInsert, offset) {\n var targetList = targetListArg;\n\n if (offset === targetList.count()) {\n toInsert.forEach(function (c) {\n targetList = targetList.push(c);\n });\n } else if (offset === 0) {\n toInsert.reverse().forEach(function (c) {\n targetList = targetList.unshift(c);\n });\n } else {\n var head = targetList.slice(0, offset);\n var tail = targetList.slice(offset);\n targetList = head.concat(toInsert, tail).toList();\n }\n\n return targetList;\n}\n\nmodule.exports = insertIntoList;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/insertIntoList.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/insertTextIntoContentState.js": +/*!*****************************************************************!*\ + !*** ./node_modules/draft-js/lib/insertTextIntoContentState.js ***! + \*****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar Immutable = __webpack_require__(/*! immutable */ \"./node_modules/immutable/dist/immutable.js\");\n\nvar insertIntoList = __webpack_require__(/*! ./insertIntoList */ \"./node_modules/draft-js/lib/insertIntoList.js\");\n\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ \"./node_modules/draft-js/node_modules/fbjs/lib/invariant.js\");\n\nvar Repeat = Immutable.Repeat;\n\nfunction insertTextIntoContentState(contentState, selectionState, text, characterMetadata) {\n !selectionState.isCollapsed() ? true ? invariant(false, '`insertText` should only be called with a collapsed range.') : undefined : void 0;\n var len = null;\n\n if (text != null) {\n len = text.length;\n }\n\n if (len == null || len === 0) {\n return contentState;\n }\n\n var blockMap = contentState.getBlockMap();\n var key = selectionState.getStartKey();\n var offset = selectionState.getStartOffset();\n var block = blockMap.get(key);\n var blockText = block.getText();\n var newBlock = block.merge({\n text: blockText.slice(0, offset) + text + blockText.slice(offset, block.getLength()),\n characterList: insertIntoList(block.getCharacterList(), Repeat(characterMetadata, len).toList(), offset)\n });\n var newOffset = offset + len;\n return contentState.merge({\n blockMap: blockMap.set(key, newBlock),\n selectionAfter: selectionState.merge({\n anchorOffset: newOffset,\n focusOffset: newOffset\n })\n });\n}\n\nmodule.exports = insertTextIntoContentState;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/insertTextIntoContentState.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/isElement.js": +/*!************************************************!*\ + !*** ./node_modules/draft-js/lib/isElement.js ***! + \************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\nfunction isElement(node) {\n if (!node || !node.ownerDocument) {\n return false;\n }\n\n return node.nodeType === Node.ELEMENT_NODE;\n}\n\nmodule.exports = isElement;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/isElement.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/isEventHandled.js": +/*!*****************************************************!*\ + !*** ./node_modules/draft-js/lib/isEventHandled.js ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\n/**\n * Utility method for determining whether or not the value returned\n * from a handler indicates that it was handled.\n */\nfunction isEventHandled(value) {\n return value === 'handled' || value === true;\n}\n\nmodule.exports = isEventHandled;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/isEventHandled.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/isHTMLAnchorElement.js": +/*!**********************************************************!*\ + !*** ./node_modules/draft-js/lib/isHTMLAnchorElement.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\nvar isElement = __webpack_require__(/*! ./isElement */ \"./node_modules/draft-js/lib/isElement.js\");\n\nfunction isHTMLAnchorElement(node) {\n if (!node || !node.ownerDocument) {\n return false;\n }\n\n return isElement(node) && node.nodeName === 'A';\n}\n\nmodule.exports = isHTMLAnchorElement;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/isHTMLAnchorElement.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/isHTMLBRElement.js": +/*!******************************************************!*\ + !*** ./node_modules/draft-js/lib/isHTMLBRElement.js ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\nvar isElement = __webpack_require__(/*! ./isElement */ \"./node_modules/draft-js/lib/isElement.js\");\n\nfunction isHTMLBRElement(node) {\n if (!node || !node.ownerDocument) {\n return false;\n }\n\n return isElement(node) && node.nodeName === 'BR';\n}\n\nmodule.exports = isHTMLBRElement;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/isHTMLBRElement.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/isHTMLElement.js": +/*!****************************************************!*\ + !*** ./node_modules/draft-js/lib/isHTMLElement.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\nfunction isHTMLElement(node) {\n if (!node || !node.ownerDocument) {\n return false;\n }\n\n if (!node.ownerDocument.defaultView) {\n return node instanceof HTMLElement;\n }\n\n if (node instanceof node.ownerDocument.defaultView.HTMLElement) {\n return true;\n }\n\n return false;\n}\n\nmodule.exports = isHTMLElement;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/isHTMLElement.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/isHTMLImageElement.js": +/*!*********************************************************!*\ + !*** ./node_modules/draft-js/lib/isHTMLImageElement.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\nvar isElement = __webpack_require__(/*! ./isElement */ \"./node_modules/draft-js/lib/isElement.js\");\n\nfunction isHTMLImageElement(node) {\n if (!node || !node.ownerDocument) {\n return false;\n }\n\n return isElement(node) && node.nodeName === 'IMG';\n}\n\nmodule.exports = isHTMLImageElement;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/isHTMLImageElement.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/isInstanceOfNode.js": +/*!*******************************************************!*\ + !*** ./node_modules/draft-js/lib/isInstanceOfNode.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\nfunction isInstanceOfNode(target) {\n // we changed the name because of having duplicate module provider (fbjs)\n if (!target || !('ownerDocument' in target)) {\n return false;\n }\n\n if ('ownerDocument' in target) {\n var node = target;\n\n if (!node.ownerDocument.defaultView) {\n return node instanceof Node;\n }\n\n if (node instanceof node.ownerDocument.defaultView.Node) {\n return true;\n }\n }\n\n return false;\n}\n\nmodule.exports = isInstanceOfNode;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/isInstanceOfNode.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/isSelectionAtLeafStart.js": +/*!*************************************************************!*\ + !*** ./node_modules/draft-js/lib/isSelectionAtLeafStart.js ***! + \*************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nfunction isSelectionAtLeafStart(editorState) {\n var selection = editorState.getSelection();\n var anchorKey = selection.getAnchorKey();\n var blockTree = editorState.getBlockTree(anchorKey);\n var offset = selection.getStartOffset();\n var isAtStart = false;\n blockTree.some(function (leafSet) {\n if (offset === leafSet.get('start')) {\n isAtStart = true;\n return true;\n }\n\n if (offset < leafSet.get('end')) {\n return leafSet.get('leaves').some(function (leaf) {\n var leafStart = leaf.get('start');\n\n if (offset === leafStart) {\n isAtStart = true;\n return true;\n }\n\n return false;\n });\n }\n\n return false;\n });\n return isAtStart;\n}\n\nmodule.exports = isSelectionAtLeafStart;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/isSelectionAtLeafStart.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/isSoftNewlineEvent.js": +/*!*********************************************************!*\ + !*** ./node_modules/draft-js/lib/isSoftNewlineEvent.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar Keys = __webpack_require__(/*! fbjs/lib/Keys */ \"./node_modules/draft-js/node_modules/fbjs/lib/Keys.js\");\n\nfunction isSoftNewlineEvent(e) {\n return e.which === Keys.RETURN && (e.getModifierState('Shift') || e.getModifierState('Alt') || e.getModifierState('Control'));\n}\n\nmodule.exports = isSoftNewlineEvent;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/isSoftNewlineEvent.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/keyCommandBackspaceToStartOfLine.js": +/*!***********************************************************************!*\ + !*** ./node_modules/draft-js/lib/keyCommandBackspaceToStartOfLine.js ***! + \***********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar EditorState = __webpack_require__(/*! ./EditorState */ \"./node_modules/draft-js/lib/EditorState.js\");\n\nvar expandRangeToStartOfLine = __webpack_require__(/*! ./expandRangeToStartOfLine */ \"./node_modules/draft-js/lib/expandRangeToStartOfLine.js\");\n\nvar getDraftEditorSelectionWithNodes = __webpack_require__(/*! ./getDraftEditorSelectionWithNodes */ \"./node_modules/draft-js/lib/getDraftEditorSelectionWithNodes.js\");\n\nvar moveSelectionBackward = __webpack_require__(/*! ./moveSelectionBackward */ \"./node_modules/draft-js/lib/moveSelectionBackward.js\");\n\nvar removeTextWithStrategy = __webpack_require__(/*! ./removeTextWithStrategy */ \"./node_modules/draft-js/lib/removeTextWithStrategy.js\");\n\nfunction keyCommandBackspaceToStartOfLine(editorState, e) {\n var afterRemoval = removeTextWithStrategy(editorState, function (strategyState) {\n var selection = strategyState.getSelection();\n\n if (selection.isCollapsed() && selection.getAnchorOffset() === 0) {\n return moveSelectionBackward(strategyState, 1);\n }\n\n var ownerDocument = e.currentTarget.ownerDocument;\n var domSelection = ownerDocument.defaultView.getSelection(); // getRangeAt can technically throw if there's no selection, but we know\n // there is one here because text editor has focus (the cursor is a\n // selection of length 0). Therefore, we don't need to wrap this in a\n // try-catch block.\n\n var range = domSelection.getRangeAt(0);\n range = expandRangeToStartOfLine(range);\n return getDraftEditorSelectionWithNodes(strategyState, null, range.endContainer, range.endOffset, range.startContainer, range.startOffset).selectionState;\n }, 'backward');\n\n if (afterRemoval === editorState.getCurrentContent()) {\n return editorState;\n }\n\n return EditorState.push(editorState, afterRemoval, 'remove-range');\n}\n\nmodule.exports = keyCommandBackspaceToStartOfLine;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/keyCommandBackspaceToStartOfLine.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/keyCommandBackspaceWord.js": +/*!**************************************************************!*\ + !*** ./node_modules/draft-js/lib/keyCommandBackspaceWord.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar DraftRemovableWord = __webpack_require__(/*! ./DraftRemovableWord */ \"./node_modules/draft-js/lib/DraftRemovableWord.js\");\n\nvar EditorState = __webpack_require__(/*! ./EditorState */ \"./node_modules/draft-js/lib/EditorState.js\");\n\nvar moveSelectionBackward = __webpack_require__(/*! ./moveSelectionBackward */ \"./node_modules/draft-js/lib/moveSelectionBackward.js\");\n\nvar removeTextWithStrategy = __webpack_require__(/*! ./removeTextWithStrategy */ \"./node_modules/draft-js/lib/removeTextWithStrategy.js\");\n/**\n * Delete the word that is left of the cursor, as well as any spaces or\n * punctuation after the word.\n */\n\n\nfunction keyCommandBackspaceWord(editorState) {\n var afterRemoval = removeTextWithStrategy(editorState, function (strategyState) {\n var selection = strategyState.getSelection();\n var offset = selection.getStartOffset(); // If there are no words before the cursor, remove the preceding newline.\n\n if (offset === 0) {\n return moveSelectionBackward(strategyState, 1);\n }\n\n var key = selection.getStartKey();\n var content = strategyState.getCurrentContent();\n var text = content.getBlockForKey(key).getText().slice(0, offset);\n var toRemove = DraftRemovableWord.getBackward(text);\n return moveSelectionBackward(strategyState, toRemove.length || 1);\n }, 'backward');\n\n if (afterRemoval === editorState.getCurrentContent()) {\n return editorState;\n }\n\n return EditorState.push(editorState, afterRemoval, 'remove-range');\n}\n\nmodule.exports = keyCommandBackspaceWord;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/keyCommandBackspaceWord.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/keyCommandDeleteWord.js": +/*!***********************************************************!*\ + !*** ./node_modules/draft-js/lib/keyCommandDeleteWord.js ***! + \***********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar DraftRemovableWord = __webpack_require__(/*! ./DraftRemovableWord */ \"./node_modules/draft-js/lib/DraftRemovableWord.js\");\n\nvar EditorState = __webpack_require__(/*! ./EditorState */ \"./node_modules/draft-js/lib/EditorState.js\");\n\nvar moveSelectionForward = __webpack_require__(/*! ./moveSelectionForward */ \"./node_modules/draft-js/lib/moveSelectionForward.js\");\n\nvar removeTextWithStrategy = __webpack_require__(/*! ./removeTextWithStrategy */ \"./node_modules/draft-js/lib/removeTextWithStrategy.js\");\n/**\n * Delete the word that is right of the cursor, as well as any spaces or\n * punctuation before the word.\n */\n\n\nfunction keyCommandDeleteWord(editorState) {\n var afterRemoval = removeTextWithStrategy(editorState, function (strategyState) {\n var selection = strategyState.getSelection();\n var offset = selection.getStartOffset();\n var key = selection.getStartKey();\n var content = strategyState.getCurrentContent();\n var text = content.getBlockForKey(key).getText().slice(offset);\n var toRemove = DraftRemovableWord.getForward(text); // If there are no words in front of the cursor, remove the newline.\n\n return moveSelectionForward(strategyState, toRemove.length || 1);\n }, 'forward');\n\n if (afterRemoval === editorState.getCurrentContent()) {\n return editorState;\n }\n\n return EditorState.push(editorState, afterRemoval, 'remove-range');\n}\n\nmodule.exports = keyCommandDeleteWord;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/keyCommandDeleteWord.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/keyCommandInsertNewline.js": +/*!**************************************************************!*\ + !*** ./node_modules/draft-js/lib/keyCommandInsertNewline.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar DraftModifier = __webpack_require__(/*! ./DraftModifier */ \"./node_modules/draft-js/lib/DraftModifier.js\");\n\nvar EditorState = __webpack_require__(/*! ./EditorState */ \"./node_modules/draft-js/lib/EditorState.js\");\n\nfunction keyCommandInsertNewline(editorState) {\n var contentState = DraftModifier.splitBlock(editorState.getCurrentContent(), editorState.getSelection());\n return EditorState.push(editorState, contentState, 'split-block');\n}\n\nmodule.exports = keyCommandInsertNewline;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/keyCommandInsertNewline.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/keyCommandMoveSelectionToEndOfBlock.js": +/*!**************************************************************************!*\ + !*** ./node_modules/draft-js/lib/keyCommandMoveSelectionToEndOfBlock.js ***! + \**************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar EditorState = __webpack_require__(/*! ./EditorState */ \"./node_modules/draft-js/lib/EditorState.js\");\n/**\n * See comment for `moveSelectionToStartOfBlock`.\n */\n\n\nfunction keyCommandMoveSelectionToEndOfBlock(editorState) {\n var selection = editorState.getSelection();\n var endKey = selection.getEndKey();\n var content = editorState.getCurrentContent();\n var textLength = content.getBlockForKey(endKey).getLength();\n return EditorState.set(editorState, {\n selection: selection.merge({\n anchorKey: endKey,\n anchorOffset: textLength,\n focusKey: endKey,\n focusOffset: textLength,\n isBackward: false\n }),\n forceSelection: true\n });\n}\n\nmodule.exports = keyCommandMoveSelectionToEndOfBlock;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/keyCommandMoveSelectionToEndOfBlock.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/keyCommandMoveSelectionToStartOfBlock.js": +/*!****************************************************************************!*\ + !*** ./node_modules/draft-js/lib/keyCommandMoveSelectionToStartOfBlock.js ***! + \****************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar EditorState = __webpack_require__(/*! ./EditorState */ \"./node_modules/draft-js/lib/EditorState.js\");\n/**\n * Collapse selection at the start of the first selected block. This is used\n * for Firefox versions that attempt to navigate forward/backward instead of\n * moving the cursor. Other browsers are able to move the cursor natively.\n */\n\n\nfunction keyCommandMoveSelectionToStartOfBlock(editorState) {\n var selection = editorState.getSelection();\n var startKey = selection.getStartKey();\n return EditorState.set(editorState, {\n selection: selection.merge({\n anchorKey: startKey,\n anchorOffset: 0,\n focusKey: startKey,\n focusOffset: 0,\n isBackward: false\n }),\n forceSelection: true\n });\n}\n\nmodule.exports = keyCommandMoveSelectionToStartOfBlock;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/keyCommandMoveSelectionToStartOfBlock.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/keyCommandPlainBackspace.js": +/*!***************************************************************!*\ + !*** ./node_modules/draft-js/lib/keyCommandPlainBackspace.js ***! + \***************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar EditorState = __webpack_require__(/*! ./EditorState */ \"./node_modules/draft-js/lib/EditorState.js\");\n\nvar UnicodeUtils = __webpack_require__(/*! fbjs/lib/UnicodeUtils */ \"./node_modules/draft-js/node_modules/fbjs/lib/UnicodeUtils.js\");\n\nvar moveSelectionBackward = __webpack_require__(/*! ./moveSelectionBackward */ \"./node_modules/draft-js/lib/moveSelectionBackward.js\");\n\nvar removeTextWithStrategy = __webpack_require__(/*! ./removeTextWithStrategy */ \"./node_modules/draft-js/lib/removeTextWithStrategy.js\");\n/**\n * Remove the selected range. If the cursor is collapsed, remove the preceding\n * character. This operation is Unicode-aware, so removing a single character\n * will remove a surrogate pair properly as well.\n */\n\n\nfunction keyCommandPlainBackspace(editorState) {\n var afterRemoval = removeTextWithStrategy(editorState, function (strategyState) {\n var selection = strategyState.getSelection();\n var content = strategyState.getCurrentContent();\n var key = selection.getAnchorKey();\n var offset = selection.getAnchorOffset();\n var charBehind = content.getBlockForKey(key).getText()[offset - 1];\n return moveSelectionBackward(strategyState, charBehind ? UnicodeUtils.getUTF16Length(charBehind, 0) : 1);\n }, 'backward');\n\n if (afterRemoval === editorState.getCurrentContent()) {\n return editorState;\n }\n\n var selection = editorState.getSelection();\n return EditorState.push(editorState, afterRemoval.set('selectionBefore', selection), selection.isCollapsed() ? 'backspace-character' : 'remove-range');\n}\n\nmodule.exports = keyCommandPlainBackspace;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/keyCommandPlainBackspace.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/keyCommandPlainDelete.js": +/*!************************************************************!*\ + !*** ./node_modules/draft-js/lib/keyCommandPlainDelete.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar EditorState = __webpack_require__(/*! ./EditorState */ \"./node_modules/draft-js/lib/EditorState.js\");\n\nvar UnicodeUtils = __webpack_require__(/*! fbjs/lib/UnicodeUtils */ \"./node_modules/draft-js/node_modules/fbjs/lib/UnicodeUtils.js\");\n\nvar moveSelectionForward = __webpack_require__(/*! ./moveSelectionForward */ \"./node_modules/draft-js/lib/moveSelectionForward.js\");\n\nvar removeTextWithStrategy = __webpack_require__(/*! ./removeTextWithStrategy */ \"./node_modules/draft-js/lib/removeTextWithStrategy.js\");\n/**\n * Remove the selected range. If the cursor is collapsed, remove the following\n * character. This operation is Unicode-aware, so removing a single character\n * will remove a surrogate pair properly as well.\n */\n\n\nfunction keyCommandPlainDelete(editorState) {\n var afterRemoval = removeTextWithStrategy(editorState, function (strategyState) {\n var selection = strategyState.getSelection();\n var content = strategyState.getCurrentContent();\n var key = selection.getAnchorKey();\n var offset = selection.getAnchorOffset();\n var charAhead = content.getBlockForKey(key).getText()[offset];\n return moveSelectionForward(strategyState, charAhead ? UnicodeUtils.getUTF16Length(charAhead, 0) : 1);\n }, 'forward');\n\n if (afterRemoval === editorState.getCurrentContent()) {\n return editorState;\n }\n\n var selection = editorState.getSelection();\n return EditorState.push(editorState, afterRemoval.set('selectionBefore', selection), selection.isCollapsed() ? 'delete-character' : 'remove-range');\n}\n\nmodule.exports = keyCommandPlainDelete;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/keyCommandPlainDelete.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/keyCommandTransposeCharacters.js": +/*!********************************************************************!*\ + !*** ./node_modules/draft-js/lib/keyCommandTransposeCharacters.js ***! + \********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar DraftModifier = __webpack_require__(/*! ./DraftModifier */ \"./node_modules/draft-js/lib/DraftModifier.js\");\n\nvar EditorState = __webpack_require__(/*! ./EditorState */ \"./node_modules/draft-js/lib/EditorState.js\");\n\nvar getContentStateFragment = __webpack_require__(/*! ./getContentStateFragment */ \"./node_modules/draft-js/lib/getContentStateFragment.js\");\n/**\n * Transpose the characters on either side of a collapsed cursor, or\n * if the cursor is at the end of the block, transpose the last two\n * characters.\n */\n\n\nfunction keyCommandTransposeCharacters(editorState) {\n var selection = editorState.getSelection();\n\n if (!selection.isCollapsed()) {\n return editorState;\n }\n\n var offset = selection.getAnchorOffset();\n\n if (offset === 0) {\n return editorState;\n }\n\n var blockKey = selection.getAnchorKey();\n var content = editorState.getCurrentContent();\n var block = content.getBlockForKey(blockKey);\n var length = block.getLength(); // Nothing to transpose if there aren't two characters.\n\n if (length <= 1) {\n return editorState;\n }\n\n var removalRange;\n var finalSelection;\n\n if (offset === length) {\n // The cursor is at the end of the block. Swap the last two characters.\n removalRange = selection.set('anchorOffset', offset - 1);\n finalSelection = selection;\n } else {\n removalRange = selection.set('focusOffset', offset + 1);\n finalSelection = removalRange.set('anchorOffset', offset + 1);\n } // Extract the character to move as a fragment. This preserves its\n // styling and entity, if any.\n\n\n var movedFragment = getContentStateFragment(content, removalRange);\n var afterRemoval = DraftModifier.removeRange(content, removalRange, 'backward'); // After the removal, the insertion target is one character back.\n\n var selectionAfter = afterRemoval.getSelectionAfter();\n var targetOffset = selectionAfter.getAnchorOffset() - 1;\n var targetRange = selectionAfter.merge({\n anchorOffset: targetOffset,\n focusOffset: targetOffset\n });\n var afterInsert = DraftModifier.replaceWithFragment(afterRemoval, targetRange, movedFragment);\n var newEditorState = EditorState.push(editorState, afterInsert, 'insert-fragment');\n return EditorState.acceptSelection(newEditorState, finalSelection);\n}\n\nmodule.exports = keyCommandTransposeCharacters;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/keyCommandTransposeCharacters.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/keyCommandUndo.js": +/*!*****************************************************!*\ + !*** ./node_modules/draft-js/lib/keyCommandUndo.js ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar EditorState = __webpack_require__(/*! ./EditorState */ \"./node_modules/draft-js/lib/EditorState.js\");\n\nfunction keyCommandUndo(e, editorState, updateFn) {\n var undoneState = EditorState.undo(editorState); // If the last change to occur was a spellcheck change, allow the undo\n // event to fall through to the browser. This allows the browser to record\n // the unwanted change, which should soon lead it to learn not to suggest\n // the correction again.\n\n if (editorState.getLastChangeType() === 'spellcheck-change') {\n var nativelyRenderedContent = undoneState.getCurrentContent();\n updateFn(EditorState.set(undoneState, {\n nativelyRenderedContent: nativelyRenderedContent\n }));\n return;\n } // Otheriwse, manage the undo behavior manually.\n\n\n e.preventDefault();\n\n if (!editorState.getNativelyRenderedContent()) {\n updateFn(undoneState);\n return;\n } // Trigger a re-render with the current content state to ensure that the\n // component tree has up-to-date props for comparison.\n\n\n updateFn(EditorState.set(editorState, {\n nativelyRenderedContent: null\n })); // Wait to ensure that the re-render has occurred before performing\n // the undo action.\n\n setTimeout(function () {\n updateFn(undoneState);\n }, 0);\n}\n\nmodule.exports = keyCommandUndo;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/keyCommandUndo.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/modifyBlockForContentState.js": +/*!*****************************************************************!*\ + !*** ./node_modules/draft-js/lib/modifyBlockForContentState.js ***! + \*****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar Immutable = __webpack_require__(/*! immutable */ \"./node_modules/immutable/dist/immutable.js\");\n\nvar Map = Immutable.Map;\n\nfunction modifyBlockForContentState(contentState, selectionState, operation) {\n var startKey = selectionState.getStartKey();\n var endKey = selectionState.getEndKey();\n var blockMap = contentState.getBlockMap();\n var newBlocks = blockMap.toSeq().skipUntil(function (_, k) {\n return k === startKey;\n }).takeUntil(function (_, k) {\n return k === endKey;\n }).concat(Map([[endKey, blockMap.get(endKey)]])).map(operation);\n return contentState.merge({\n blockMap: blockMap.merge(newBlocks),\n selectionBefore: selectionState,\n selectionAfter: selectionState\n });\n}\n\nmodule.exports = modifyBlockForContentState;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/modifyBlockForContentState.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/moveBlockInContentState.js": +/*!**************************************************************!*\ + !*** ./node_modules/draft-js/lib/moveBlockInContentState.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar ContentBlockNode = __webpack_require__(/*! ./ContentBlockNode */ \"./node_modules/draft-js/lib/ContentBlockNode.js\");\n\nvar getNextDelimiterBlockKey = __webpack_require__(/*! ./getNextDelimiterBlockKey */ \"./node_modules/draft-js/lib/getNextDelimiterBlockKey.js\");\n\nvar Immutable = __webpack_require__(/*! immutable */ \"./node_modules/immutable/dist/immutable.js\");\n\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ \"./node_modules/draft-js/node_modules/fbjs/lib/invariant.js\");\n\nvar OrderedMap = Immutable.OrderedMap,\n List = Immutable.List;\n\nvar transformBlock = function transformBlock(key, blockMap, func) {\n if (!key) {\n return;\n }\n\n var block = blockMap.get(key);\n\n if (!block) {\n return;\n }\n\n blockMap.set(key, func(block));\n};\n\nvar updateBlockMapLinks = function updateBlockMapLinks(blockMap, originalBlockToBeMoved, originalTargetBlock, insertionMode, isExperimentalTreeBlock) {\n if (!isExperimentalTreeBlock) {\n return blockMap;\n } // possible values of 'insertionMode' are: 'after', 'before'\n\n\n var isInsertedAfterTarget = insertionMode === 'after';\n var originalBlockKey = originalBlockToBeMoved.getKey();\n var originalTargetKey = originalTargetBlock.getKey();\n var originalParentKey = originalBlockToBeMoved.getParentKey();\n var originalNextSiblingKey = originalBlockToBeMoved.getNextSiblingKey();\n var originalPrevSiblingKey = originalBlockToBeMoved.getPrevSiblingKey();\n var newParentKey = originalTargetBlock.getParentKey();\n var newNextSiblingKey = isInsertedAfterTarget ? originalTargetBlock.getNextSiblingKey() : originalTargetKey;\n var newPrevSiblingKey = isInsertedAfterTarget ? originalTargetKey : originalTargetBlock.getPrevSiblingKey();\n return blockMap.withMutations(function (blocks) {\n // update old parent\n transformBlock(originalParentKey, blocks, function (block) {\n var parentChildrenList = block.getChildKeys();\n return block.merge({\n children: parentChildrenList[\"delete\"](parentChildrenList.indexOf(originalBlockKey))\n });\n }); // update old prev\n\n transformBlock(originalPrevSiblingKey, blocks, function (block) {\n return block.merge({\n nextSibling: originalNextSiblingKey\n });\n }); // update old next\n\n transformBlock(originalNextSiblingKey, blocks, function (block) {\n return block.merge({\n prevSibling: originalPrevSiblingKey\n });\n }); // update new next\n\n transformBlock(newNextSiblingKey, blocks, function (block) {\n return block.merge({\n prevSibling: originalBlockKey\n });\n }); // update new prev\n\n transformBlock(newPrevSiblingKey, blocks, function (block) {\n return block.merge({\n nextSibling: originalBlockKey\n });\n }); // update new parent\n\n transformBlock(newParentKey, blocks, function (block) {\n var newParentChildrenList = block.getChildKeys();\n var targetBlockIndex = newParentChildrenList.indexOf(originalTargetKey);\n var insertionIndex = isInsertedAfterTarget ? targetBlockIndex + 1 : targetBlockIndex !== 0 ? targetBlockIndex - 1 : 0;\n var newChildrenArray = newParentChildrenList.toArray();\n newChildrenArray.splice(insertionIndex, 0, originalBlockKey);\n return block.merge({\n children: List(newChildrenArray)\n });\n }); // update block\n\n transformBlock(originalBlockKey, blocks, function (block) {\n return block.merge({\n nextSibling: newNextSiblingKey,\n prevSibling: newPrevSiblingKey,\n parent: newParentKey\n });\n });\n });\n};\n\nvar moveBlockInContentState = function moveBlockInContentState(contentState, blockToBeMoved, targetBlock, insertionMode) {\n !(insertionMode !== 'replace') ? true ? invariant(false, 'Replacing blocks is not supported.') : undefined : void 0;\n var targetKey = targetBlock.getKey();\n var blockKey = blockToBeMoved.getKey();\n !(blockKey !== targetKey) ? true ? invariant(false, 'Block cannot be moved next to itself.') : undefined : void 0;\n var blockMap = contentState.getBlockMap();\n var isExperimentalTreeBlock = blockToBeMoved instanceof ContentBlockNode;\n var blocksToBeMoved = [blockToBeMoved];\n var blockMapWithoutBlocksToBeMoved = blockMap[\"delete\"](blockKey);\n\n if (isExperimentalTreeBlock) {\n blocksToBeMoved = [];\n blockMapWithoutBlocksToBeMoved = blockMap.withMutations(function (blocks) {\n var nextSiblingKey = blockToBeMoved.getNextSiblingKey();\n var nextDelimiterBlockKey = getNextDelimiterBlockKey(blockToBeMoved, blocks);\n blocks.toSeq().skipUntil(function (block) {\n return block.getKey() === blockKey;\n }).takeWhile(function (block) {\n var key = block.getKey();\n var isBlockToBeMoved = key === blockKey;\n var hasNextSiblingAndIsNotNextSibling = nextSiblingKey && key !== nextSiblingKey;\n var doesNotHaveNextSiblingAndIsNotDelimiter = !nextSiblingKey && block.getParentKey() && (!nextDelimiterBlockKey || key !== nextDelimiterBlockKey);\n return !!(isBlockToBeMoved || hasNextSiblingAndIsNotNextSibling || doesNotHaveNextSiblingAndIsNotDelimiter);\n }).forEach(function (block) {\n blocksToBeMoved.push(block);\n blocks[\"delete\"](block.getKey());\n });\n });\n }\n\n var blocksBefore = blockMapWithoutBlocksToBeMoved.toSeq().takeUntil(function (v) {\n return v === targetBlock;\n });\n var blocksAfter = blockMapWithoutBlocksToBeMoved.toSeq().skipUntil(function (v) {\n return v === targetBlock;\n }).skip(1);\n var slicedBlocks = blocksToBeMoved.map(function (block) {\n return [block.getKey(), block];\n });\n var newBlocks = OrderedMap();\n\n if (insertionMode === 'before') {\n var blockBefore = contentState.getBlockBefore(targetKey);\n !(!blockBefore || blockBefore.getKey() !== blockToBeMoved.getKey()) ? true ? invariant(false, 'Block cannot be moved next to itself.') : undefined : void 0;\n newBlocks = blocksBefore.concat([].concat(slicedBlocks, [[targetKey, targetBlock]]), blocksAfter).toOrderedMap();\n } else if (insertionMode === 'after') {\n var blockAfter = contentState.getBlockAfter(targetKey);\n !(!blockAfter || blockAfter.getKey() !== blockKey) ? true ? invariant(false, 'Block cannot be moved next to itself.') : undefined : void 0;\n newBlocks = blocksBefore.concat([[targetKey, targetBlock]].concat(slicedBlocks), blocksAfter).toOrderedMap();\n }\n\n return contentState.merge({\n blockMap: updateBlockMapLinks(newBlocks, blockToBeMoved, targetBlock, insertionMode, isExperimentalTreeBlock),\n selectionBefore: contentState.getSelectionAfter(),\n selectionAfter: contentState.getSelectionAfter().merge({\n anchorKey: blockKey,\n focusKey: blockKey\n })\n });\n};\n\nmodule.exports = moveBlockInContentState;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/moveBlockInContentState.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/moveSelectionBackward.js": +/*!************************************************************!*\ + !*** ./node_modules/draft-js/lib/moveSelectionBackward.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar warning = __webpack_require__(/*! fbjs/lib/warning */ \"./node_modules/draft-js/node_modules/fbjs/lib/warning.js\");\n/**\n * Given a collapsed selection, move the focus `maxDistance` backward within\n * the selected block. If the selection will go beyond the start of the block,\n * move focus to the end of the previous block, but no further.\n *\n * This function is not Unicode-aware, so surrogate pairs will be treated\n * as having length 2.\n */\n\n\nfunction moveSelectionBackward(editorState, maxDistance) {\n var selection = editorState.getSelection(); // Should eventually make this an invariant\n\n true ? warning(selection.isCollapsed(), 'moveSelectionBackward should only be called with a collapsed SelectionState') : undefined;\n var content = editorState.getCurrentContent();\n var key = selection.getStartKey();\n var offset = selection.getStartOffset();\n var focusKey = key;\n var focusOffset = 0;\n\n if (maxDistance > offset) {\n var keyBefore = content.getKeyBefore(key);\n\n if (keyBefore == null) {\n focusKey = key;\n } else {\n focusKey = keyBefore;\n var blockBefore = content.getBlockForKey(keyBefore);\n focusOffset = blockBefore.getText().length;\n }\n } else {\n focusOffset = offset - maxDistance;\n }\n\n return selection.merge({\n focusKey: focusKey,\n focusOffset: focusOffset,\n isBackward: true\n });\n}\n\nmodule.exports = moveSelectionBackward;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/moveSelectionBackward.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/moveSelectionForward.js": +/*!***********************************************************!*\ + !*** ./node_modules/draft-js/lib/moveSelectionForward.js ***! + \***********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar warning = __webpack_require__(/*! fbjs/lib/warning */ \"./node_modules/draft-js/node_modules/fbjs/lib/warning.js\");\n/**\n * Given a collapsed selection, move the focus `maxDistance` forward within\n * the selected block. If the selection will go beyond the end of the block,\n * move focus to the start of the next block, but no further.\n *\n * This function is not Unicode-aware, so surrogate pairs will be treated\n * as having length 2.\n */\n\n\nfunction moveSelectionForward(editorState, maxDistance) {\n var selection = editorState.getSelection(); // Should eventually make this an invariant\n\n true ? warning(selection.isCollapsed(), 'moveSelectionForward should only be called with a collapsed SelectionState') : undefined;\n var key = selection.getStartKey();\n var offset = selection.getStartOffset();\n var content = editorState.getCurrentContent();\n var focusKey = key;\n var focusOffset;\n var block = content.getBlockForKey(key);\n\n if (maxDistance > block.getText().length - offset) {\n focusKey = content.getKeyAfter(key);\n focusOffset = 0;\n } else {\n focusOffset = offset + maxDistance;\n }\n\n return selection.merge({\n focusKey: focusKey,\n focusOffset: focusOffset\n });\n}\n\nmodule.exports = moveSelectionForward;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/moveSelectionForward.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/randomizeBlockMapKeys.js": +/*!************************************************************!*\ + !*** ./node_modules/draft-js/lib/randomizeBlockMapKeys.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar ContentBlockNode = __webpack_require__(/*! ./ContentBlockNode */ \"./node_modules/draft-js/lib/ContentBlockNode.js\");\n\nvar generateRandomKey = __webpack_require__(/*! ./generateRandomKey */ \"./node_modules/draft-js/lib/generateRandomKey.js\");\n\nvar Immutable = __webpack_require__(/*! immutable */ \"./node_modules/immutable/dist/immutable.js\");\n\nvar OrderedMap = Immutable.OrderedMap;\n\nvar randomizeContentBlockNodeKeys = function randomizeContentBlockNodeKeys(blockMap) {\n var newKeysRef = {}; // we keep track of root blocks in order to update subsequent sibling links\n\n var lastRootBlock;\n return OrderedMap(blockMap.withMutations(function (blockMapState) {\n blockMapState.forEach(function (block, index) {\n var oldKey = block.getKey();\n var nextKey = block.getNextSiblingKey();\n var prevKey = block.getPrevSiblingKey();\n var childrenKeys = block.getChildKeys();\n var parentKey = block.getParentKey(); // new key that we will use to build linking\n\n var key = generateRandomKey(); // we will add it here to re-use it later\n\n newKeysRef[oldKey] = key;\n\n if (nextKey) {\n var nextBlock = blockMapState.get(nextKey);\n\n if (nextBlock) {\n blockMapState.setIn([nextKey, 'prevSibling'], key);\n } else {\n // this can happen when generating random keys for fragments\n blockMapState.setIn([oldKey, 'nextSibling'], null);\n }\n }\n\n if (prevKey) {\n var prevBlock = blockMapState.get(prevKey);\n\n if (prevBlock) {\n blockMapState.setIn([prevKey, 'nextSibling'], key);\n } else {\n // this can happen when generating random keys for fragments\n blockMapState.setIn([oldKey, 'prevSibling'], null);\n }\n }\n\n if (parentKey && blockMapState.get(parentKey)) {\n var parentBlock = blockMapState.get(parentKey);\n var parentChildrenList = parentBlock.getChildKeys();\n blockMapState.setIn([parentKey, 'children'], parentChildrenList.set(parentChildrenList.indexOf(block.getKey()), key));\n } else {\n // blocks will then be treated as root block nodes\n blockMapState.setIn([oldKey, 'parent'], null);\n\n if (lastRootBlock) {\n blockMapState.setIn([lastRootBlock.getKey(), 'nextSibling'], key);\n blockMapState.setIn([oldKey, 'prevSibling'], newKeysRef[lastRootBlock.getKey()]);\n }\n\n lastRootBlock = blockMapState.get(oldKey);\n }\n\n childrenKeys.forEach(function (childKey) {\n var childBlock = blockMapState.get(childKey);\n\n if (childBlock) {\n blockMapState.setIn([childKey, 'parent'], key);\n } else {\n blockMapState.setIn([oldKey, 'children'], block.getChildKeys().filter(function (child) {\n return child !== childKey;\n }));\n }\n });\n });\n }).toArray().map(function (block) {\n return [newKeysRef[block.getKey()], block.set('key', newKeysRef[block.getKey()])];\n }));\n};\n\nvar randomizeContentBlockKeys = function randomizeContentBlockKeys(blockMap) {\n return OrderedMap(blockMap.toArray().map(function (block) {\n var key = generateRandomKey();\n return [key, block.set('key', key)];\n }));\n};\n\nvar randomizeBlockMapKeys = function randomizeBlockMapKeys(blockMap) {\n var isTreeBasedBlockMap = blockMap.first() instanceof ContentBlockNode;\n\n if (!isTreeBasedBlockMap) {\n return randomizeContentBlockKeys(blockMap);\n }\n\n return randomizeContentBlockNodeKeys(blockMap);\n};\n\nmodule.exports = randomizeBlockMapKeys;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/randomizeBlockMapKeys.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/removeEntitiesAtEdges.js": +/*!************************************************************!*\ + !*** ./node_modules/draft-js/lib/removeEntitiesAtEdges.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar CharacterMetadata = __webpack_require__(/*! ./CharacterMetadata */ \"./node_modules/draft-js/lib/CharacterMetadata.js\");\n\nvar findRangesImmutable = __webpack_require__(/*! ./findRangesImmutable */ \"./node_modules/draft-js/lib/findRangesImmutable.js\");\n\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ \"./node_modules/draft-js/node_modules/fbjs/lib/invariant.js\");\n\nfunction removeEntitiesAtEdges(contentState, selectionState) {\n var blockMap = contentState.getBlockMap();\n var entityMap = contentState.getEntityMap();\n var updatedBlocks = {};\n var startKey = selectionState.getStartKey();\n var startOffset = selectionState.getStartOffset();\n var startBlock = blockMap.get(startKey);\n var updatedStart = removeForBlock(entityMap, startBlock, startOffset);\n\n if (updatedStart !== startBlock) {\n updatedBlocks[startKey] = updatedStart;\n }\n\n var endKey = selectionState.getEndKey();\n var endOffset = selectionState.getEndOffset();\n var endBlock = blockMap.get(endKey);\n\n if (startKey === endKey) {\n endBlock = updatedStart;\n }\n\n var updatedEnd = removeForBlock(entityMap, endBlock, endOffset);\n\n if (updatedEnd !== endBlock) {\n updatedBlocks[endKey] = updatedEnd;\n }\n\n if (!Object.keys(updatedBlocks).length) {\n return contentState.set('selectionAfter', selectionState);\n }\n\n return contentState.merge({\n blockMap: blockMap.merge(updatedBlocks),\n selectionAfter: selectionState\n });\n}\n/**\n * Given a list of characters and an offset that is in the middle of an entity,\n * returns the start and end of the entity that is overlapping the offset.\n * Note: This method requires that the offset be in an entity range.\n */\n\n\nfunction getRemovalRange(characters, entityKey, offset) {\n var removalRange; // Iterates through a list looking for ranges of matching items\n // based on the 'isEqual' callback.\n // Then instead of returning the result, call the 'found' callback\n // with each range.\n // Then filters those ranges based on the 'filter' callback\n //\n // Here we use it to find ranges of characters with the same entity key.\n\n findRangesImmutable(characters, // the list to iterate through\n function (a, b) {\n return a.getEntity() === b.getEntity();\n }, // 'isEqual' callback\n function (element) {\n return element.getEntity() === entityKey;\n }, // 'filter' callback\n function (start, end) {\n // 'found' callback\n if (start <= offset && end >= offset) {\n // this entity overlaps the offset index\n removalRange = {\n start: start,\n end: end\n };\n }\n });\n !(typeof removalRange === 'object') ? true ? invariant(false, 'Removal range must exist within character list.') : undefined : void 0;\n return removalRange;\n}\n\nfunction removeForBlock(entityMap, block, offset) {\n var chars = block.getCharacterList();\n var charBefore = offset > 0 ? chars.get(offset - 1) : undefined;\n var charAfter = offset < chars.count() ? chars.get(offset) : undefined;\n var entityBeforeCursor = charBefore ? charBefore.getEntity() : undefined;\n var entityAfterCursor = charAfter ? charAfter.getEntity() : undefined;\n\n if (entityAfterCursor && entityAfterCursor === entityBeforeCursor) {\n var entity = entityMap.__get(entityAfterCursor);\n\n if (entity.getMutability() !== 'MUTABLE') {\n var _getRemovalRange = getRemovalRange(chars, entityAfterCursor, offset),\n start = _getRemovalRange.start,\n end = _getRemovalRange.end;\n\n var current;\n\n while (start < end) {\n current = chars.get(start);\n chars = chars.set(start, CharacterMetadata.applyEntity(current, null));\n start++;\n }\n\n return block.set('characterList', chars);\n }\n }\n\n return block;\n}\n\nmodule.exports = removeEntitiesAtEdges;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/removeEntitiesAtEdges.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/removeRangeFromContentState.js": +/*!******************************************************************!*\ + !*** ./node_modules/draft-js/lib/removeRangeFromContentState.js ***! + \******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar ContentBlockNode = __webpack_require__(/*! ./ContentBlockNode */ \"./node_modules/draft-js/lib/ContentBlockNode.js\");\n\nvar getNextDelimiterBlockKey = __webpack_require__(/*! ./getNextDelimiterBlockKey */ \"./node_modules/draft-js/lib/getNextDelimiterBlockKey.js\");\n\nvar Immutable = __webpack_require__(/*! immutable */ \"./node_modules/immutable/dist/immutable.js\");\n\nvar List = Immutable.List,\n Map = Immutable.Map;\n\nvar transformBlock = function transformBlock(key, blockMap, func) {\n if (!key) {\n return;\n }\n\n var block = blockMap.get(key);\n\n if (!block) {\n return;\n }\n\n blockMap.set(key, func(block));\n};\n/**\n * Ancestors needs to be preserved when there are non selected\n * children to make sure we do not leave any orphans behind\n */\n\n\nvar getAncestorsKeys = function getAncestorsKeys(blockKey, blockMap) {\n var parents = [];\n\n if (!blockKey) {\n return parents;\n }\n\n var blockNode = blockMap.get(blockKey);\n\n while (blockNode && blockNode.getParentKey()) {\n var parentKey = blockNode.getParentKey();\n\n if (parentKey) {\n parents.push(parentKey);\n }\n\n blockNode = parentKey ? blockMap.get(parentKey) : null;\n }\n\n return parents;\n};\n/**\n * Get all next delimiter keys until we hit a root delimiter and return\n * an array of key references\n */\n\n\nvar getNextDelimitersBlockKeys = function getNextDelimitersBlockKeys(block, blockMap) {\n var nextDelimiters = [];\n\n if (!block) {\n return nextDelimiters;\n }\n\n var nextDelimiter = getNextDelimiterBlockKey(block, blockMap);\n\n while (nextDelimiter && blockMap.get(nextDelimiter)) {\n var _block = blockMap.get(nextDelimiter);\n\n nextDelimiters.push(nextDelimiter); // we do not need to keep checking all root node siblings, just the first occurance\n\n nextDelimiter = _block.getParentKey() ? getNextDelimiterBlockKey(_block, blockMap) : null;\n }\n\n return nextDelimiters;\n};\n\nvar getNextValidSibling = function getNextValidSibling(block, blockMap, originalBlockMap) {\n if (!block) {\n return null;\n } // note that we need to make sure we refer to the original block since this\n // function is called within a withMutations\n\n\n var nextValidSiblingKey = originalBlockMap.get(block.getKey()).getNextSiblingKey();\n\n while (nextValidSiblingKey && !blockMap.get(nextValidSiblingKey)) {\n nextValidSiblingKey = originalBlockMap.get(nextValidSiblingKey).getNextSiblingKey() || null;\n }\n\n return nextValidSiblingKey;\n};\n\nvar getPrevValidSibling = function getPrevValidSibling(block, blockMap, originalBlockMap) {\n if (!block) {\n return null;\n } // note that we need to make sure we refer to the original block since this\n // function is called within a withMutations\n\n\n var prevValidSiblingKey = originalBlockMap.get(block.getKey()).getPrevSiblingKey();\n\n while (prevValidSiblingKey && !blockMap.get(prevValidSiblingKey)) {\n prevValidSiblingKey = originalBlockMap.get(prevValidSiblingKey).getPrevSiblingKey() || null;\n }\n\n return prevValidSiblingKey;\n};\n\nvar updateBlockMapLinks = function updateBlockMapLinks(blockMap, startBlock, endBlock, originalBlockMap) {\n return blockMap.withMutations(function (blocks) {\n // update start block if its retained\n transformBlock(startBlock.getKey(), blocks, function (block) {\n return block.merge({\n nextSibling: getNextValidSibling(block, blocks, originalBlockMap),\n prevSibling: getPrevValidSibling(block, blocks, originalBlockMap)\n });\n }); // update endblock if its retained\n\n transformBlock(endBlock.getKey(), blocks, function (block) {\n return block.merge({\n nextSibling: getNextValidSibling(block, blocks, originalBlockMap),\n prevSibling: getPrevValidSibling(block, blocks, originalBlockMap)\n });\n }); // update start block parent ancestors\n\n getAncestorsKeys(startBlock.getKey(), originalBlockMap).forEach(function (parentKey) {\n return transformBlock(parentKey, blocks, function (block) {\n return block.merge({\n children: block.getChildKeys().filter(function (key) {\n return blocks.get(key);\n }),\n nextSibling: getNextValidSibling(block, blocks, originalBlockMap),\n prevSibling: getPrevValidSibling(block, blocks, originalBlockMap)\n });\n });\n }); // update start block next - can only happen if startBlock == endBlock\n\n transformBlock(startBlock.getNextSiblingKey(), blocks, function (block) {\n return block.merge({\n prevSibling: startBlock.getPrevSiblingKey()\n });\n }); // update start block prev\n\n transformBlock(startBlock.getPrevSiblingKey(), blocks, function (block) {\n return block.merge({\n nextSibling: getNextValidSibling(block, blocks, originalBlockMap)\n });\n }); // update end block next\n\n transformBlock(endBlock.getNextSiblingKey(), blocks, function (block) {\n return block.merge({\n prevSibling: getPrevValidSibling(block, blocks, originalBlockMap)\n });\n }); // update end block prev\n\n transformBlock(endBlock.getPrevSiblingKey(), blocks, function (block) {\n return block.merge({\n nextSibling: endBlock.getNextSiblingKey()\n });\n }); // update end block parent ancestors\n\n getAncestorsKeys(endBlock.getKey(), originalBlockMap).forEach(function (parentKey) {\n transformBlock(parentKey, blocks, function (block) {\n return block.merge({\n children: block.getChildKeys().filter(function (key) {\n return blocks.get(key);\n }),\n nextSibling: getNextValidSibling(block, blocks, originalBlockMap),\n prevSibling: getPrevValidSibling(block, blocks, originalBlockMap)\n });\n });\n }); // update next delimiters all the way to a root delimiter\n\n getNextDelimitersBlockKeys(endBlock, originalBlockMap).forEach(function (delimiterKey) {\n return transformBlock(delimiterKey, blocks, function (block) {\n return block.merge({\n nextSibling: getNextValidSibling(block, blocks, originalBlockMap),\n prevSibling: getPrevValidSibling(block, blocks, originalBlockMap)\n });\n });\n }); // if parent (startBlock) was deleted\n\n if (blockMap.get(startBlock.getKey()) == null && blockMap.get(endBlock.getKey()) != null && endBlock.getParentKey() === startBlock.getKey() && endBlock.getPrevSiblingKey() == null) {\n var prevSiblingKey = startBlock.getPrevSiblingKey(); // endBlock becomes next sibling of parent's prevSibling\n\n transformBlock(endBlock.getKey(), blocks, function (block) {\n return block.merge({\n prevSibling: prevSiblingKey\n });\n });\n transformBlock(prevSiblingKey, blocks, function (block) {\n return block.merge({\n nextSibling: endBlock.getKey()\n });\n }); // Update parent for previous parent's children, and children for that parent\n\n var prevSibling = prevSiblingKey ? blockMap.get(prevSiblingKey) : null;\n var newParentKey = prevSibling ? prevSibling.getParentKey() : null;\n startBlock.getChildKeys().forEach(function (childKey) {\n transformBlock(childKey, blocks, function (block) {\n return block.merge({\n parent: newParentKey // set to null if there is no parent\n\n });\n });\n });\n\n if (newParentKey != null) {\n var newParent = blockMap.get(newParentKey);\n transformBlock(newParentKey, blocks, function (block) {\n return block.merge({\n children: newParent.getChildKeys().concat(startBlock.getChildKeys())\n });\n });\n } // last child of deleted parent should point to next sibling\n\n\n transformBlock(startBlock.getChildKeys().find(function (key) {\n var block = blockMap.get(key);\n return block.getNextSiblingKey() === null;\n }), blocks, function (block) {\n return block.merge({\n nextSibling: startBlock.getNextSiblingKey()\n });\n });\n }\n });\n};\n\nvar removeRangeFromContentState = function removeRangeFromContentState(contentState, selectionState) {\n if (selectionState.isCollapsed()) {\n return contentState;\n }\n\n var blockMap = contentState.getBlockMap();\n var startKey = selectionState.getStartKey();\n var startOffset = selectionState.getStartOffset();\n var endKey = selectionState.getEndKey();\n var endOffset = selectionState.getEndOffset();\n var startBlock = blockMap.get(startKey);\n var endBlock = blockMap.get(endKey); // we assume that ContentBlockNode and ContentBlocks are not mixed together\n\n var isExperimentalTreeBlock = startBlock instanceof ContentBlockNode; // used to retain blocks that should not be deleted to avoid orphan children\n\n var parentAncestors = [];\n\n if (isExperimentalTreeBlock) {\n var endBlockchildrenKeys = endBlock.getChildKeys();\n var endBlockAncestors = getAncestorsKeys(endKey, blockMap); // endBlock has unselected siblings so we can not remove its ancestors parents\n\n if (endBlock.getNextSiblingKey()) {\n parentAncestors = parentAncestors.concat(endBlockAncestors);\n } // endBlock has children so can not remove this block or any of its ancestors\n\n\n if (!endBlockchildrenKeys.isEmpty()) {\n parentAncestors = parentAncestors.concat(endBlockAncestors.concat([endKey]));\n } // we need to retain all ancestors of the next delimiter block\n\n\n parentAncestors = parentAncestors.concat(getAncestorsKeys(getNextDelimiterBlockKey(endBlock, blockMap), blockMap));\n }\n\n var characterList;\n\n if (startBlock === endBlock) {\n characterList = removeFromList(startBlock.getCharacterList(), startOffset, endOffset);\n } else {\n characterList = startBlock.getCharacterList().slice(0, startOffset).concat(endBlock.getCharacterList().slice(endOffset));\n }\n\n var modifiedStart = startBlock.merge({\n text: startBlock.getText().slice(0, startOffset) + endBlock.getText().slice(endOffset),\n characterList: characterList\n }); // If cursor (collapsed) is at the start of the first child, delete parent\n // instead of child\n\n var shouldDeleteParent = isExperimentalTreeBlock && startOffset === 0 && endOffset === 0 && endBlock.getParentKey() === startKey && endBlock.getPrevSiblingKey() == null;\n var newBlocks = shouldDeleteParent ? Map([[startKey, null]]) : blockMap.toSeq().skipUntil(function (_, k) {\n return k === startKey;\n }).takeUntil(function (_, k) {\n return k === endKey;\n }).filter(function (_, k) {\n return parentAncestors.indexOf(k) === -1;\n }).concat(Map([[endKey, null]])).map(function (_, k) {\n return k === startKey ? modifiedStart : null;\n });\n var updatedBlockMap = blockMap.merge(newBlocks).filter(function (block) {\n return !!block;\n }); // Only update tree block pointers if the range is across blocks\n\n if (isExperimentalTreeBlock && startBlock !== endBlock) {\n updatedBlockMap = updateBlockMapLinks(updatedBlockMap, startBlock, endBlock, blockMap);\n }\n\n return contentState.merge({\n blockMap: updatedBlockMap,\n selectionBefore: selectionState,\n selectionAfter: selectionState.merge({\n anchorKey: startKey,\n anchorOffset: startOffset,\n focusKey: startKey,\n focusOffset: startOffset,\n isBackward: false\n })\n });\n};\n/**\n * Maintain persistence for target list when removing characters on the\n * head and tail of the character list.\n */\n\n\nvar removeFromList = function removeFromList(targetList, startOffset, endOffset) {\n if (startOffset === 0) {\n while (startOffset < endOffset) {\n targetList = targetList.shift();\n startOffset++;\n }\n } else if (endOffset === targetList.count()) {\n while (endOffset > startOffset) {\n targetList = targetList.pop();\n endOffset--;\n }\n } else {\n var head = targetList.slice(0, startOffset);\n var tail = targetList.slice(endOffset);\n targetList = head.concat(tail).toList();\n }\n\n return targetList;\n};\n\nmodule.exports = removeRangeFromContentState;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/removeRangeFromContentState.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/removeTextWithStrategy.js": +/*!*************************************************************!*\ + !*** ./node_modules/draft-js/lib/removeTextWithStrategy.js ***! + \*************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar DraftModifier = __webpack_require__(/*! ./DraftModifier */ \"./node_modules/draft-js/lib/DraftModifier.js\");\n\nvar gkx = __webpack_require__(/*! ./gkx */ \"./node_modules/draft-js/lib/gkx.js\");\n\nvar experimentalTreeDataSupport = gkx('draft_tree_data_support');\n/**\n * For a collapsed selection state, remove text based on the specified strategy.\n * If the selection state is not collapsed, remove the entire selected range.\n */\n\nfunction removeTextWithStrategy(editorState, strategy, direction) {\n var selection = editorState.getSelection();\n var content = editorState.getCurrentContent();\n var target = selection;\n var anchorKey = selection.getAnchorKey();\n var focusKey = selection.getFocusKey();\n var anchorBlock = content.getBlockForKey(anchorKey);\n\n if (experimentalTreeDataSupport) {\n if (direction === 'forward') {\n if (anchorKey !== focusKey) {\n // For now we ignore forward delete across blocks,\n // if there is demand for this we will implement it.\n return content;\n }\n }\n }\n\n if (selection.isCollapsed()) {\n if (direction === 'forward') {\n if (editorState.isSelectionAtEndOfContent()) {\n return content;\n }\n\n if (experimentalTreeDataSupport) {\n var isAtEndOfBlock = selection.getAnchorOffset() === content.getBlockForKey(anchorKey).getLength();\n\n if (isAtEndOfBlock) {\n var anchorBlockSibling = content.getBlockForKey(anchorBlock.nextSibling);\n\n if (!anchorBlockSibling || anchorBlockSibling.getLength() === 0) {\n // For now we ignore forward delete at the end of a block,\n // if there is demand for this we will implement it.\n return content;\n }\n }\n }\n } else if (editorState.isSelectionAtStartOfContent()) {\n return content;\n }\n\n target = strategy(editorState);\n\n if (target === selection) {\n return content;\n }\n }\n\n return DraftModifier.removeRange(content, target, direction);\n}\n\nmodule.exports = removeTextWithStrategy;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/removeTextWithStrategy.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/sanitizeDraftText.js": +/*!********************************************************!*\ + !*** ./node_modules/draft-js/lib/sanitizeDraftText.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar REGEX_BLOCK_DELIMITER = new RegExp('\\r', 'g');\n\nfunction sanitizeDraftText(input) {\n return input.replace(REGEX_BLOCK_DELIMITER, '');\n}\n\nmodule.exports = sanitizeDraftText;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/sanitizeDraftText.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/setDraftEditorSelection.js": +/*!**************************************************************!*\ + !*** ./node_modules/draft-js/lib/setDraftEditorSelection.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar DraftEffects = __webpack_require__(/*! ./DraftEffects */ \"./node_modules/draft-js/lib/DraftEffects.js\");\n\nvar DraftJsDebugLogging = __webpack_require__(/*! ./DraftJsDebugLogging */ \"./node_modules/draft-js/lib/DraftJsDebugLogging.js\");\n\nvar UserAgent = __webpack_require__(/*! fbjs/lib/UserAgent */ \"./node_modules/draft-js/node_modules/fbjs/lib/UserAgent.js\");\n\nvar containsNode = __webpack_require__(/*! fbjs/lib/containsNode */ \"./node_modules/draft-js/node_modules/fbjs/lib/containsNode.js\");\n\nvar getActiveElement = __webpack_require__(/*! fbjs/lib/getActiveElement */ \"./node_modules/draft-js/node_modules/fbjs/lib/getActiveElement.js\");\n\nvar getCorrectDocumentFromNode = __webpack_require__(/*! ./getCorrectDocumentFromNode */ \"./node_modules/draft-js/lib/getCorrectDocumentFromNode.js\");\n\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ \"./node_modules/draft-js/node_modules/fbjs/lib/invariant.js\");\n\nvar isElement = __webpack_require__(/*! ./isElement */ \"./node_modules/draft-js/lib/isElement.js\");\n\nvar isIE = UserAgent.isBrowser('IE');\n\nfunction getAnonymizedDOM(node, getNodeLabels) {\n if (!node) {\n return '[empty]';\n }\n\n var anonymized = anonymizeTextWithin(node, getNodeLabels);\n\n if (anonymized.nodeType === Node.TEXT_NODE) {\n return anonymized.textContent;\n }\n\n !isElement(anonymized) ? true ? invariant(false, 'Node must be an Element if it is not a text node.') : undefined : void 0;\n var castedElement = anonymized;\n return castedElement.outerHTML;\n}\n\nfunction anonymizeTextWithin(node, getNodeLabels) {\n var labels = getNodeLabels !== undefined ? getNodeLabels(node) : [];\n\n if (node.nodeType === Node.TEXT_NODE) {\n var length = node.textContent.length;\n return getCorrectDocumentFromNode(node).createTextNode('[text ' + length + (labels.length ? ' | ' + labels.join(', ') : '') + ']');\n }\n\n var clone = node.cloneNode();\n\n if (clone.nodeType === 1 && labels.length) {\n clone.setAttribute('data-labels', labels.join(', '));\n }\n\n var childNodes = node.childNodes;\n\n for (var ii = 0; ii < childNodes.length; ii++) {\n clone.appendChild(anonymizeTextWithin(childNodes[ii], getNodeLabels));\n }\n\n return clone;\n}\n\nfunction getAnonymizedEditorDOM(node, getNodeLabels) {\n // grabbing the DOM content of the Draft editor\n var currentNode = node; // this should only be used after checking with isElement\n\n var castedNode = currentNode;\n\n while (currentNode) {\n if (isElement(currentNode) && castedNode.hasAttribute('contenteditable')) {\n // found the Draft editor container\n return getAnonymizedDOM(currentNode, getNodeLabels);\n } else {\n currentNode = currentNode.parentNode;\n castedNode = currentNode;\n }\n }\n\n return 'Could not find contentEditable parent of node';\n}\n\nfunction getNodeLength(node) {\n return node.nodeValue === null ? node.childNodes.length : node.nodeValue.length;\n}\n/**\n * In modern non-IE browsers, we can support both forward and backward\n * selections.\n *\n * Note: IE10+ supports the Selection object, but it does not support\n * the `extend` method, which means that even in modern IE, it's not possible\n * to programatically create a backward selection. Thus, for all IE\n * versions, we use the old IE API to create our selections.\n */\n\n\nfunction setDraftEditorSelection(selectionState, node, blockKey, nodeStart, nodeEnd) {\n // It's possible that the editor has been removed from the DOM but\n // our selection code doesn't know it yet. Forcing selection in\n // this case may lead to errors, so just bail now.\n var documentObject = getCorrectDocumentFromNode(node);\n\n if (!containsNode(documentObject.documentElement, node)) {\n return;\n }\n\n var selection = documentObject.defaultView.getSelection();\n var anchorKey = selectionState.getAnchorKey();\n var anchorOffset = selectionState.getAnchorOffset();\n var focusKey = selectionState.getFocusKey();\n var focusOffset = selectionState.getFocusOffset();\n var isBackward = selectionState.getIsBackward(); // IE doesn't support backward selection. Swap key/offset pairs.\n\n if (!selection.extend && isBackward) {\n var tempKey = anchorKey;\n var tempOffset = anchorOffset;\n anchorKey = focusKey;\n anchorOffset = focusOffset;\n focusKey = tempKey;\n focusOffset = tempOffset;\n isBackward = false;\n }\n\n var hasAnchor = anchorKey === blockKey && nodeStart <= anchorOffset && nodeEnd >= anchorOffset;\n var hasFocus = focusKey === blockKey && nodeStart <= focusOffset && nodeEnd >= focusOffset; // If the selection is entirely bound within this node, set the selection\n // and be done.\n\n if (hasAnchor && hasFocus) {\n selection.removeAllRanges();\n addPointToSelection(selection, node, anchorOffset - nodeStart, selectionState);\n addFocusToSelection(selection, node, focusOffset - nodeStart, selectionState);\n return;\n }\n\n if (!isBackward) {\n // If the anchor is within this node, set the range start.\n if (hasAnchor) {\n selection.removeAllRanges();\n addPointToSelection(selection, node, anchorOffset - nodeStart, selectionState);\n } // If the focus is within this node, we can assume that we have\n // already set the appropriate start range on the selection, and\n // can simply extend the selection.\n\n\n if (hasFocus) {\n addFocusToSelection(selection, node, focusOffset - nodeStart, selectionState);\n }\n } else {\n // If this node has the focus, set the selection range to be a\n // collapsed range beginning here. Later, when we encounter the anchor,\n // we'll use this information to extend the selection.\n if (hasFocus) {\n selection.removeAllRanges();\n addPointToSelection(selection, node, focusOffset - nodeStart, selectionState);\n } // If this node has the anchor, we may assume that the correct\n // focus information is already stored on the selection object.\n // We keep track of it, reset the selection range, and extend it\n // back to the focus point.\n\n\n if (hasAnchor) {\n var storedFocusNode = selection.focusNode;\n var storedFocusOffset = selection.focusOffset;\n selection.removeAllRanges();\n addPointToSelection(selection, node, anchorOffset - nodeStart, selectionState);\n addFocusToSelection(selection, storedFocusNode, storedFocusOffset, selectionState);\n }\n }\n}\n/**\n * Extend selection towards focus point.\n */\n\n\nfunction addFocusToSelection(selection, node, offset, selectionState) {\n var activeElement = getActiveElement();\n var extend = selection.extend; // containsNode returns false if node is null.\n // Let's refine the type of this value out here so flow knows.\n\n if (extend && node != null && containsNode(activeElement, node)) {\n // If `extend` is called while another element has focus, an error is\n // thrown. We therefore disable `extend` if the active element is somewhere\n // other than the node we are selecting. This should only occur in Firefox,\n // since it is the only browser to support multiple selections.\n // See https://bugzilla.mozilla.org/show_bug.cgi?id=921444.\n // logging to catch bug that is being reported in t16250795\n if (offset > getNodeLength(node)) {\n // the call to 'selection.extend' is about to throw\n DraftJsDebugLogging.logSelectionStateFailure({\n anonymizedDom: getAnonymizedEditorDOM(node),\n extraParams: JSON.stringify({\n offset: offset\n }),\n selectionState: JSON.stringify(selectionState.toJS())\n });\n } // logging to catch bug that is being reported in t18110632\n\n\n var nodeWasFocus = node === selection.focusNode;\n\n try {\n // Fixes some reports of \"InvalidStateError: Failed to execute 'extend' on\n // 'Selection': This Selection object doesn't have any Ranges.\"\n // Note: selection.extend does not exist in IE.\n if (selection.rangeCount > 0 && selection.extend) {\n selection.extend(node, offset);\n }\n } catch (e) {\n DraftJsDebugLogging.logSelectionStateFailure({\n anonymizedDom: getAnonymizedEditorDOM(node, function (n) {\n var labels = [];\n\n if (n === activeElement) {\n labels.push('active element');\n }\n\n if (n === selection.anchorNode) {\n labels.push('selection anchor node');\n }\n\n if (n === selection.focusNode) {\n labels.push('selection focus node');\n }\n\n return labels;\n }),\n extraParams: JSON.stringify({\n activeElementName: activeElement ? activeElement.nodeName : null,\n nodeIsFocus: node === selection.focusNode,\n nodeWasFocus: nodeWasFocus,\n selectionRangeCount: selection.rangeCount,\n selectionAnchorNodeName: selection.anchorNode ? selection.anchorNode.nodeName : null,\n selectionAnchorOffset: selection.anchorOffset,\n selectionFocusNodeName: selection.focusNode ? selection.focusNode.nodeName : null,\n selectionFocusOffset: selection.focusOffset,\n message: e ? '' + e : null,\n offset: offset\n }, null, 2),\n selectionState: JSON.stringify(selectionState.toJS(), null, 2)\n }); // allow the error to be thrown -\n // better than continuing in a broken state\n\n throw e;\n }\n } else {\n // IE doesn't support extend. This will mean no backward selection.\n // Extract the existing selection range and add focus to it.\n // Additionally, clone the selection range. IE11 throws an\n // InvalidStateError when attempting to access selection properties\n // after the range is detached.\n if (node && selection.rangeCount > 0) {\n var range = selection.getRangeAt(0);\n range.setEnd(node, offset);\n selection.addRange(range.cloneRange());\n }\n }\n}\n\nfunction addPointToSelection(selection, node, offset, selectionState) {\n var range = getCorrectDocumentFromNode(node).createRange(); // logging to catch bug that is being reported in t16250795\n\n if (offset > getNodeLength(node)) {\n // in this case we know that the call to 'range.setStart' is about to throw\n DraftJsDebugLogging.logSelectionStateFailure({\n anonymizedDom: getAnonymizedEditorDOM(node),\n extraParams: JSON.stringify({\n offset: offset\n }),\n selectionState: JSON.stringify(selectionState.toJS())\n });\n DraftEffects.handleExtensionCausedError();\n }\n\n range.setStart(node, offset); // IE sometimes throws Unspecified Error when trying to addRange\n\n if (isIE) {\n try {\n selection.addRange(range);\n } catch (e) {\n if (true) {\n /* eslint-disable-next-line no-console */\n console.warn('Call to selection.addRange() threw exception: ', e);\n }\n }\n } else {\n selection.addRange(range);\n }\n}\n\nmodule.exports = {\n setDraftEditorSelection: setDraftEditorSelection,\n addFocusToSelection: addFocusToSelection\n};\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/setDraftEditorSelection.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/splitBlockInContentState.js": +/*!***************************************************************!*\ + !*** ./node_modules/draft-js/lib/splitBlockInContentState.js ***! + \***************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar ContentBlockNode = __webpack_require__(/*! ./ContentBlockNode */ \"./node_modules/draft-js/lib/ContentBlockNode.js\");\n\nvar generateRandomKey = __webpack_require__(/*! ./generateRandomKey */ \"./node_modules/draft-js/lib/generateRandomKey.js\");\n\nvar Immutable = __webpack_require__(/*! immutable */ \"./node_modules/immutable/dist/immutable.js\");\n\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ \"./node_modules/draft-js/node_modules/fbjs/lib/invariant.js\");\n\nvar modifyBlockForContentState = __webpack_require__(/*! ./modifyBlockForContentState */ \"./node_modules/draft-js/lib/modifyBlockForContentState.js\");\n\nvar List = Immutable.List,\n Map = Immutable.Map;\n\nvar transformBlock = function transformBlock(key, blockMap, func) {\n if (!key) {\n return;\n }\n\n var block = blockMap.get(key);\n\n if (!block) {\n return;\n }\n\n blockMap.set(key, func(block));\n};\n\nvar updateBlockMapLinks = function updateBlockMapLinks(blockMap, originalBlock, belowBlock) {\n return blockMap.withMutations(function (blocks) {\n var originalBlockKey = originalBlock.getKey();\n var belowBlockKey = belowBlock.getKey(); // update block parent\n\n transformBlock(originalBlock.getParentKey(), blocks, function (block) {\n var parentChildrenList = block.getChildKeys();\n var insertionIndex = parentChildrenList.indexOf(originalBlockKey) + 1;\n var newChildrenArray = parentChildrenList.toArray();\n newChildrenArray.splice(insertionIndex, 0, belowBlockKey);\n return block.merge({\n children: List(newChildrenArray)\n });\n }); // update original next block\n\n transformBlock(originalBlock.getNextSiblingKey(), blocks, function (block) {\n return block.merge({\n prevSibling: belowBlockKey\n });\n }); // update original block\n\n transformBlock(originalBlockKey, blocks, function (block) {\n return block.merge({\n nextSibling: belowBlockKey\n });\n }); // update below block\n\n transformBlock(belowBlockKey, blocks, function (block) {\n return block.merge({\n prevSibling: originalBlockKey\n });\n });\n });\n};\n\nvar splitBlockInContentState = function splitBlockInContentState(contentState, selectionState) {\n !selectionState.isCollapsed() ? true ? invariant(false, 'Selection range must be collapsed.') : undefined : void 0;\n var key = selectionState.getAnchorKey();\n var blockMap = contentState.getBlockMap();\n var blockToSplit = blockMap.get(key);\n var text = blockToSplit.getText();\n\n if (!text) {\n var blockType = blockToSplit.getType();\n\n if (blockType === 'unordered-list-item' || blockType === 'ordered-list-item') {\n return modifyBlockForContentState(contentState, selectionState, function (block) {\n return block.merge({\n type: 'unstyled',\n depth: 0\n });\n });\n }\n }\n\n var offset = selectionState.getAnchorOffset();\n var chars = blockToSplit.getCharacterList();\n var keyBelow = generateRandomKey();\n var isExperimentalTreeBlock = blockToSplit instanceof ContentBlockNode;\n var blockAbove = blockToSplit.merge({\n text: text.slice(0, offset),\n characterList: chars.slice(0, offset)\n });\n var blockBelow = blockAbove.merge({\n key: keyBelow,\n text: text.slice(offset),\n characterList: chars.slice(offset),\n data: Map()\n });\n var blocksBefore = blockMap.toSeq().takeUntil(function (v) {\n return v === blockToSplit;\n });\n var blocksAfter = blockMap.toSeq().skipUntil(function (v) {\n return v === blockToSplit;\n }).rest();\n var newBlocks = blocksBefore.concat([[key, blockAbove], [keyBelow, blockBelow]], blocksAfter).toOrderedMap();\n\n if (isExperimentalTreeBlock) {\n !blockToSplit.getChildKeys().isEmpty() ? true ? invariant(false, 'ContentBlockNode must not have children') : undefined : void 0;\n newBlocks = updateBlockMapLinks(newBlocks, blockAbove, blockBelow);\n }\n\n return contentState.merge({\n blockMap: newBlocks,\n selectionBefore: selectionState,\n selectionAfter: selectionState.merge({\n anchorKey: keyBelow,\n anchorOffset: 0,\n focusKey: keyBelow,\n focusOffset: 0,\n isBackward: false\n })\n });\n};\n\nmodule.exports = splitBlockInContentState;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/splitBlockInContentState.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/splitTextIntoTextBlocks.js": +/*!**************************************************************!*\ + !*** ./node_modules/draft-js/lib/splitTextIntoTextBlocks.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n\n\nvar NEWLINE_REGEX = /\\r\\n?|\\n/g;\n\nfunction splitTextIntoTextBlocks(text) {\n return text.split(NEWLINE_REGEX);\n}\n\nmodule.exports = splitTextIntoTextBlocks;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/splitTextIntoTextBlocks.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/lib/uuid.js": +/*!*******************************************!*\ + !*** ./node_modules/draft-js/lib/uuid.js ***! + \*******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n/**\n * Copyright 2004-present Facebook. All Rights Reserved.\n *\n * @typechecks\n * \n * @format\n */\n\n/*eslint-disable no-bitwise */\n\n/**\n * Based on the rfc4122-compliant solution posted at\n * http://stackoverflow.com/questions/105034\n */\nfunction uuid() {\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\n var r = Math.random() * 16 | 0;\n var v = c == 'x' ? r : r & 0x3 | 0x8;\n return v.toString(16);\n });\n}\n\nmodule.exports = uuid;\n\n//# sourceURL=webpack:///./node_modules/draft-js/lib/uuid.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/node_modules/fbjs/lib/DataTransfer.js": +/*!*********************************************************************!*\ + !*** ./node_modules/draft-js/node_modules/fbjs/lib/DataTransfer.js ***! + \*********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @typechecks\n */\nvar PhotosMimeType = __webpack_require__(/*! ./PhotosMimeType */ \"./node_modules/draft-js/node_modules/fbjs/lib/PhotosMimeType.js\");\n\nvar createArrayFromMixed = __webpack_require__(/*! ./createArrayFromMixed */ \"./node_modules/draft-js/node_modules/fbjs/lib/createArrayFromMixed.js\");\n\nvar emptyFunction = __webpack_require__(/*! ./emptyFunction */ \"./node_modules/draft-js/node_modules/fbjs/lib/emptyFunction.js\");\n\nvar CR_LF_REGEX = new RegExp(\"\\r\\n\", 'g');\nvar LF_ONLY = \"\\n\";\nvar RICH_TEXT_TYPES = {\n 'text/rtf': 1,\n 'text/html': 1\n};\n/**\n * If DataTransferItem is a file then return the Blob of data.\n *\n * @param {object} item\n * @return {?blob}\n */\n\nfunction getFileFromDataTransfer(item) {\n if (item.kind == 'file') {\n return item.getAsFile();\n }\n}\n\nvar DataTransfer =\n/*#__PURE__*/\nfunction () {\n /**\n * @param {object} data\n */\n function DataTransfer(data) {\n this.data = data; // Types could be DOMStringList or array\n\n this.types = data.types ? createArrayFromMixed(data.types) : [];\n }\n /**\n * Is this likely to be a rich text data transfer?\n *\n * @return {boolean}\n */\n\n\n var _proto = DataTransfer.prototype;\n\n _proto.isRichText = function isRichText() {\n // If HTML is available, treat this data as rich text. This way, we avoid\n // using a pasted image if it is packaged with HTML -- this may occur with\n // pastes from MS Word, for example. However this is only rich text if\n // there's accompanying text.\n if (this.getHTML() && this.getText()) {\n return true;\n } // When an image is copied from a preview window, you end up with two\n // DataTransferItems one of which is a file's metadata as text. Skip those.\n\n\n if (this.isImage()) {\n return false;\n }\n\n return this.types.some(function (type) {\n return RICH_TEXT_TYPES[type];\n });\n };\n /**\n * Get raw text.\n *\n * @return {?string}\n */\n\n\n _proto.getText = function getText() {\n var text;\n\n if (this.data.getData) {\n if (!this.types.length) {\n text = this.data.getData('Text');\n } else if (this.types.indexOf('text/plain') != -1) {\n text = this.data.getData('text/plain');\n }\n }\n\n return text ? text.replace(CR_LF_REGEX, LF_ONLY) : null;\n };\n /**\n * Get HTML paste data\n *\n * @return {?string}\n */\n\n\n _proto.getHTML = function getHTML() {\n if (this.data.getData) {\n if (!this.types.length) {\n return this.data.getData('Text');\n } else if (this.types.indexOf('text/html') != -1) {\n return this.data.getData('text/html');\n }\n }\n };\n /**\n * Is this a link data transfer?\n *\n * @return {boolean}\n */\n\n\n _proto.isLink = function isLink() {\n return this.types.some(function (type) {\n return type.indexOf('Url') != -1 || type.indexOf('text/uri-list') != -1 || type.indexOf('text/x-moz-url');\n });\n };\n /**\n * Get a link url.\n *\n * @return {?string}\n */\n\n\n _proto.getLink = function getLink() {\n if (this.data.getData) {\n if (this.types.indexOf('text/x-moz-url') != -1) {\n var url = this.data.getData('text/x-moz-url').split('\\n');\n return url[0];\n }\n\n return this.types.indexOf('text/uri-list') != -1 ? this.data.getData('text/uri-list') : this.data.getData('url');\n }\n\n return null;\n };\n /**\n * Is this an image data transfer?\n *\n * @return {boolean}\n */\n\n\n _proto.isImage = function isImage() {\n var isImage = this.types.some(function (type) {\n // Firefox will have a type of application/x-moz-file for images during\n // dragging\n return type.indexOf('application/x-moz-file') != -1;\n });\n\n if (isImage) {\n return true;\n }\n\n var items = this.getFiles();\n\n for (var i = 0; i < items.length; i++) {\n var type = items[i].type;\n\n if (!PhotosMimeType.isImage(type)) {\n return false;\n }\n }\n\n return true;\n };\n\n _proto.getCount = function getCount() {\n if (this.data.hasOwnProperty('items')) {\n return this.data.items.length;\n } else if (this.data.hasOwnProperty('mozItemCount')) {\n return this.data.mozItemCount;\n } else if (this.data.files) {\n return this.data.files.length;\n }\n\n return null;\n };\n /**\n * Get files.\n *\n * @return {array}\n */\n\n\n _proto.getFiles = function getFiles() {\n if (this.data.items) {\n // createArrayFromMixed doesn't properly handle DataTransferItemLists.\n return Array.prototype.slice.call(this.data.items).map(getFileFromDataTransfer).filter(emptyFunction.thatReturnsArgument);\n } else if (this.data.files) {\n return Array.prototype.slice.call(this.data.files);\n } else {\n return [];\n }\n };\n /**\n * Are there any files to fetch?\n *\n * @return {boolean}\n */\n\n\n _proto.hasFiles = function hasFiles() {\n return this.getFiles().length > 0;\n };\n\n return DataTransfer;\n}();\n\nmodule.exports = DataTransfer;\n\n//# sourceURL=webpack:///./node_modules/draft-js/node_modules/fbjs/lib/DataTransfer.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/node_modules/fbjs/lib/Keys.js": +/*!*************************************************************!*\ + !*** ./node_modules/draft-js/node_modules/fbjs/lib/Keys.js ***! + \*************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nmodule.exports = {\n BACKSPACE: 8,\n TAB: 9,\n RETURN: 13,\n ALT: 18,\n ESC: 27,\n SPACE: 32,\n PAGE_UP: 33,\n PAGE_DOWN: 34,\n END: 35,\n HOME: 36,\n LEFT: 37,\n UP: 38,\n RIGHT: 39,\n DOWN: 40,\n DELETE: 46,\n COMMA: 188,\n PERIOD: 190,\n A: 65,\n Z: 90,\n ZERO: 48,\n NUMPAD_0: 96,\n NUMPAD_9: 105\n};\n\n//# sourceURL=webpack:///./node_modules/draft-js/node_modules/fbjs/lib/Keys.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/node_modules/fbjs/lib/PhotosMimeType.js": +/*!***********************************************************************!*\ + !*** ./node_modules/draft-js/node_modules/fbjs/lib/PhotosMimeType.js ***! + \***********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nvar PhotosMimeType = {\n isImage: function isImage(mimeString) {\n return getParts(mimeString)[0] === 'image';\n },\n isJpeg: function isJpeg(mimeString) {\n var parts = getParts(mimeString);\n return PhotosMimeType.isImage(mimeString) && ( // see http://fburl.com/10972194\n parts[1] === 'jpeg' || parts[1] === 'pjpeg');\n }\n};\n\nfunction getParts(mimeString) {\n return mimeString.split('/');\n}\n\nmodule.exports = PhotosMimeType;\n\n//# sourceURL=webpack:///./node_modules/draft-js/node_modules/fbjs/lib/PhotosMimeType.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/node_modules/fbjs/lib/Scroll.js": +/*!***************************************************************!*\ + !*** ./node_modules/draft-js/node_modules/fbjs/lib/Scroll.js ***! + \***************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n/**\n * @param {DOMElement} element\n * @param {DOMDocument} doc\n * @return {boolean}\n */\nfunction _isViewportScrollElement(element, doc) {\n return !!doc && (element === doc.documentElement || element === doc.body);\n}\n/**\n * Scroll Module. This class contains 4 simple static functions\n * to be used to access Element.scrollTop/scrollLeft properties.\n * To solve the inconsistencies between browsers when either\n * document.body or document.documentElement is supplied,\n * below logic will be used to alleviate the issue:\n *\n * 1. If 'element' is either 'document.body' or 'document.documentElement,\n * get whichever element's 'scroll{Top,Left}' is larger.\n * 2. If 'element' is either 'document.body' or 'document.documentElement',\n * set the 'scroll{Top,Left}' on both elements.\n */\n\n\nvar Scroll = {\n /**\n * @param {DOMElement} element\n * @return {number}\n */\n getTop: function getTop(element) {\n var doc = element.ownerDocument;\n return _isViewportScrollElement(element, doc) ? // In practice, they will either both have the same value,\n // or one will be zero and the other will be the scroll position\n // of the viewport. So we can use `X || Y` instead of `Math.max(X, Y)`\n doc.body.scrollTop || doc.documentElement.scrollTop : element.scrollTop;\n },\n\n /**\n * @param {DOMElement} element\n * @param {number} newTop\n */\n setTop: function setTop(element, newTop) {\n var doc = element.ownerDocument;\n\n if (_isViewportScrollElement(element, doc)) {\n doc.body.scrollTop = doc.documentElement.scrollTop = newTop;\n } else {\n element.scrollTop = newTop;\n }\n },\n\n /**\n * @param {DOMElement} element\n * @return {number}\n */\n getLeft: function getLeft(element) {\n var doc = element.ownerDocument;\n return _isViewportScrollElement(element, doc) ? doc.body.scrollLeft || doc.documentElement.scrollLeft : element.scrollLeft;\n },\n\n /**\n * @param {DOMElement} element\n * @param {number} newLeft\n */\n setLeft: function setLeft(element, newLeft) {\n var doc = element.ownerDocument;\n\n if (_isViewportScrollElement(element, doc)) {\n doc.body.scrollLeft = doc.documentElement.scrollLeft = newLeft;\n } else {\n element.scrollLeft = newLeft;\n }\n }\n};\nmodule.exports = Scroll;\n\n//# sourceURL=webpack:///./node_modules/draft-js/node_modules/fbjs/lib/Scroll.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/node_modules/fbjs/lib/Style.js": +/*!**************************************************************!*\ + !*** ./node_modules/draft-js/node_modules/fbjs/lib/Style.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @typechecks\n */\nvar getStyleProperty = __webpack_require__(/*! ./getStyleProperty */ \"./node_modules/draft-js/node_modules/fbjs/lib/getStyleProperty.js\");\n/**\n * @param {DOMNode} element [description]\n * @param {string} name Overflow style property name.\n * @return {boolean} True if the supplied ndoe is scrollable.\n */\n\n\nfunction _isNodeScrollable(element, name) {\n var overflow = Style.get(element, name);\n return overflow === 'auto' || overflow === 'scroll';\n}\n/**\n * Utilities for querying and mutating style properties.\n */\n\n\nvar Style = {\n /**\n * Gets the style property for the supplied node. This will return either the\n * computed style, if available, or the declared style.\n *\n * @param {DOMNode} node\n * @param {string} name Style property name.\n * @return {?string} Style property value.\n */\n get: getStyleProperty,\n\n /**\n * Determines the nearest ancestor of a node that is scrollable.\n *\n * NOTE: This can be expensive if used repeatedly or on a node nested deeply.\n *\n * @param {?DOMNode} node Node from which to start searching.\n * @return {?DOMWindow|DOMElement} Scroll parent of the supplied node.\n */\n getScrollParent: function getScrollParent(node) {\n if (!node) {\n return null;\n }\n\n var ownerDocument = node.ownerDocument;\n\n while (node && node !== ownerDocument.body) {\n if (_isNodeScrollable(node, 'overflow') || _isNodeScrollable(node, 'overflowY') || _isNodeScrollable(node, 'overflowX')) {\n return node;\n }\n\n node = node.parentNode;\n }\n\n return ownerDocument.defaultView || ownerDocument.parentWindow;\n }\n};\nmodule.exports = Style;\n\n//# sourceURL=webpack:///./node_modules/draft-js/node_modules/fbjs/lib/Style.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/node_modules/fbjs/lib/TokenizeUtil.js": +/*!*********************************************************************!*\ + !*** ./node_modules/draft-js/node_modules/fbjs/lib/TokenizeUtil.js ***! + \*********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @typechecks\n * @stub\n * \n */\n // \\u00a1-\\u00b1\\u00b4-\\u00b8\\u00ba\\u00bb\\u00bf\n// is latin supplement punctuation except fractions and superscript\n// numbers\n// \\u2010-\\u2027\\u2030-\\u205e\n// is punctuation from the general punctuation block:\n// weird quotes, commas, bullets, dashes, etc.\n// \\u30fb\\u3001\\u3002\\u3008-\\u3011\\u3014-\\u301f\n// is CJK punctuation\n// \\uff1a-\\uff1f\\uff01-\\uff0f\\uff3b-\\uff40\\uff5b-\\uff65\n// is some full-width/half-width punctuation\n// \\u2E2E\\u061f\\u066a-\\u066c\\u061b\\u060c\\u060d\\uFD3e\\uFD3F\n// is some Arabic punctuation marks\n// \\u1801\\u0964\\u104a\\u104b\n// is misc. other language punctuation marks\n\nvar PUNCTUATION = '[.,+*?$|#{}()\\'\\\\^\\\\-\\\\[\\\\]\\\\\\\\\\\\/!@%\"~=<>_:;' + \"\\u30FB\\u3001\\u3002\\u3008-\\u3011\\u3014-\\u301F\\uFF1A-\\uFF1F\\uFF01-\\uFF0F\" + \"\\uFF3B-\\uFF40\\uFF5B-\\uFF65\\u2E2E\\u061F\\u066A-\\u066C\\u061B\\u060C\\u060D\" + \"\\uFD3E\\uFD3F\\u1801\\u0964\\u104A\\u104B\\u2010-\\u2027\\u2030-\\u205E\" + \"\\xA1-\\xB1\\xB4-\\xB8\\xBA\\xBB\\xBF]\";\nmodule.exports = {\n getPunctuation: function getPunctuation() {\n return PUNCTUATION;\n }\n};\n\n//# sourceURL=webpack:///./node_modules/draft-js/node_modules/fbjs/lib/TokenizeUtil.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/node_modules/fbjs/lib/URI.js": +/*!************************************************************!*\ + !*** ./node_modules/draft-js/node_modules/fbjs/lib/URI.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\n\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar URI =\n/*#__PURE__*/\nfunction () {\n function URI(uri) {\n _defineProperty(this, \"_uri\", void 0);\n\n this._uri = uri;\n }\n\n var _proto = URI.prototype;\n\n _proto.toString = function toString() {\n return this._uri;\n };\n\n return URI;\n}();\n\nmodule.exports = URI;\n\n//# sourceURL=webpack:///./node_modules/draft-js/node_modules/fbjs/lib/URI.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/node_modules/fbjs/lib/UnicodeBidi.js": +/*!********************************************************************!*\ + !*** ./node_modules/draft-js/node_modules/fbjs/lib/UnicodeBidi.js ***! + \********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @typechecks\n * \n */\n\n/**\n * Basic (stateless) API for text direction detection\n *\n * Part of our implementation of Unicode Bidirectional Algorithm (UBA)\n * Unicode Standard Annex #9 (UAX9)\n * http://www.unicode.org/reports/tr9/\n */\n\n\nvar UnicodeBidiDirection = __webpack_require__(/*! ./UnicodeBidiDirection */ \"./node_modules/draft-js/node_modules/fbjs/lib/UnicodeBidiDirection.js\");\n\nvar invariant = __webpack_require__(/*! ./invariant */ \"./node_modules/draft-js/node_modules/fbjs/lib/invariant.js\");\n\n/**\n * RegExp ranges of characters with a *Strong* Bidi_Class value.\n *\n * Data is based on DerivedBidiClass.txt in UCD version 7.0.0.\n *\n * NOTE: For performance reasons, we only support Unicode's\n * Basic Multilingual Plane (BMP) for now.\n */\nvar RANGE_BY_BIDI_TYPE = {\n L: \"A-Za-z\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u01BA\\u01BB\" + \"\\u01BC-\\u01BF\\u01C0-\\u01C3\\u01C4-\\u0293\\u0294\\u0295-\\u02AF\\u02B0-\\u02B8\" + \"\\u02BB-\\u02C1\\u02D0-\\u02D1\\u02E0-\\u02E4\\u02EE\\u0370-\\u0373\\u0376-\\u0377\" + \"\\u037A\\u037B-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\" + \"\\u03A3-\\u03F5\\u03F7-\\u0481\\u0482\\u048A-\\u052F\\u0531-\\u0556\\u0559\" + \"\\u055A-\\u055F\\u0561-\\u0587\\u0589\\u0903\\u0904-\\u0939\\u093B\\u093D\" + \"\\u093E-\\u0940\\u0949-\\u094C\\u094E-\\u094F\\u0950\\u0958-\\u0961\\u0964-\\u0965\" + \"\\u0966-\\u096F\\u0970\\u0971\\u0972-\\u0980\\u0982-\\u0983\\u0985-\\u098C\" + \"\\u098F-\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\" + \"\\u09BE-\\u09C0\\u09C7-\\u09C8\\u09CB-\\u09CC\\u09CE\\u09D7\\u09DC-\\u09DD\" + \"\\u09DF-\\u09E1\\u09E6-\\u09EF\\u09F0-\\u09F1\\u09F4-\\u09F9\\u09FA\\u0A03\" + \"\\u0A05-\\u0A0A\\u0A0F-\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32-\\u0A33\" + \"\\u0A35-\\u0A36\\u0A38-\\u0A39\\u0A3E-\\u0A40\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A6F\" + \"\\u0A72-\\u0A74\\u0A83\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\" + \"\\u0AB2-\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0ABE-\\u0AC0\\u0AC9\\u0ACB-\\u0ACC\\u0AD0\" + \"\\u0AE0-\\u0AE1\\u0AE6-\\u0AEF\\u0AF0\\u0B02-\\u0B03\\u0B05-\\u0B0C\\u0B0F-\\u0B10\" + \"\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32-\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B3E\\u0B40\" + \"\\u0B47-\\u0B48\\u0B4B-\\u0B4C\\u0B57\\u0B5C-\\u0B5D\\u0B5F-\\u0B61\\u0B66-\\u0B6F\" + \"\\u0B70\\u0B71\\u0B72-\\u0B77\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\" + \"\\u0B99-\\u0B9A\\u0B9C\\u0B9E-\\u0B9F\\u0BA3-\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\" + \"\\u0BBE-\\u0BBF\\u0BC1-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCC\\u0BD0\\u0BD7\" + \"\\u0BE6-\\u0BEF\\u0BF0-\\u0BF2\\u0C01-\\u0C03\\u0C05-\\u0C0C\\u0C0E-\\u0C10\" + \"\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C41-\\u0C44\\u0C58-\\u0C59\\u0C60-\\u0C61\" + \"\\u0C66-\\u0C6F\\u0C7F\\u0C82-\\u0C83\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\" + \"\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CBE\\u0CBF\\u0CC0-\\u0CC4\\u0CC6\" + \"\\u0CC7-\\u0CC8\\u0CCA-\\u0CCB\\u0CD5-\\u0CD6\\u0CDE\\u0CE0-\\u0CE1\\u0CE6-\\u0CEF\" + \"\\u0CF1-\\u0CF2\\u0D02-\\u0D03\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\" + \"\\u0D3E-\\u0D40\\u0D46-\\u0D48\\u0D4A-\\u0D4C\\u0D4E\\u0D57\\u0D60-\\u0D61\" + \"\\u0D66-\\u0D6F\\u0D70-\\u0D75\\u0D79\\u0D7A-\\u0D7F\\u0D82-\\u0D83\\u0D85-\\u0D96\" + \"\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0DCF-\\u0DD1\\u0DD8-\\u0DDF\" + \"\\u0DE6-\\u0DEF\\u0DF2-\\u0DF3\\u0DF4\\u0E01-\\u0E30\\u0E32-\\u0E33\\u0E40-\\u0E45\" + \"\\u0E46\\u0E4F\\u0E50-\\u0E59\\u0E5A-\\u0E5B\\u0E81-\\u0E82\\u0E84\\u0E87-\\u0E88\" + \"\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\" + \"\\u0EAA-\\u0EAB\\u0EAD-\\u0EB0\\u0EB2-\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\" + \"\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F01-\\u0F03\\u0F04-\\u0F12\\u0F13\\u0F14\" + \"\\u0F15-\\u0F17\\u0F1A-\\u0F1F\\u0F20-\\u0F29\\u0F2A-\\u0F33\\u0F34\\u0F36\\u0F38\" + \"\\u0F3E-\\u0F3F\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F7F\\u0F85\\u0F88-\\u0F8C\" + \"\\u0FBE-\\u0FC5\\u0FC7-\\u0FCC\\u0FCE-\\u0FCF\\u0FD0-\\u0FD4\\u0FD5-\\u0FD8\" + \"\\u0FD9-\\u0FDA\\u1000-\\u102A\\u102B-\\u102C\\u1031\\u1038\\u103B-\\u103C\\u103F\" + \"\\u1040-\\u1049\\u104A-\\u104F\\u1050-\\u1055\\u1056-\\u1057\\u105A-\\u105D\\u1061\" + \"\\u1062-\\u1064\\u1065-\\u1066\\u1067-\\u106D\\u106E-\\u1070\\u1075-\\u1081\" + \"\\u1083-\\u1084\\u1087-\\u108C\\u108E\\u108F\\u1090-\\u1099\\u109A-\\u109C\" + \"\\u109E-\\u109F\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FB\\u10FC\" + \"\\u10FD-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\" + \"\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\" + \"\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1360-\\u1368\" + \"\\u1369-\\u137C\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166D-\\u166E\" + \"\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EB-\\u16ED\\u16EE-\\u16F0\" + \"\\u16F1-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1735-\\u1736\" + \"\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17B6\\u17BE-\\u17C5\" + \"\\u17C7-\\u17C8\\u17D4-\\u17D6\\u17D7\\u17D8-\\u17DA\\u17DC\\u17E0-\\u17E9\" + \"\\u1810-\\u1819\\u1820-\\u1842\\u1843\\u1844-\\u1877\\u1880-\\u18A8\\u18AA\" + \"\\u18B0-\\u18F5\\u1900-\\u191E\\u1923-\\u1926\\u1929-\\u192B\\u1930-\\u1931\" + \"\\u1933-\\u1938\\u1946-\\u194F\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\" + \"\\u19B0-\\u19C0\\u19C1-\\u19C7\\u19C8-\\u19C9\\u19D0-\\u19D9\\u19DA\\u1A00-\\u1A16\" + \"\\u1A19-\\u1A1A\\u1A1E-\\u1A1F\\u1A20-\\u1A54\\u1A55\\u1A57\\u1A61\\u1A63-\\u1A64\" + \"\\u1A6D-\\u1A72\\u1A80-\\u1A89\\u1A90-\\u1A99\\u1AA0-\\u1AA6\\u1AA7\\u1AA8-\\u1AAD\" + \"\\u1B04\\u1B05-\\u1B33\\u1B35\\u1B3B\\u1B3D-\\u1B41\\u1B43-\\u1B44\\u1B45-\\u1B4B\" + \"\\u1B50-\\u1B59\\u1B5A-\\u1B60\\u1B61-\\u1B6A\\u1B74-\\u1B7C\\u1B82\\u1B83-\\u1BA0\" + \"\\u1BA1\\u1BA6-\\u1BA7\\u1BAA\\u1BAE-\\u1BAF\\u1BB0-\\u1BB9\\u1BBA-\\u1BE5\\u1BE7\" + \"\\u1BEA-\\u1BEC\\u1BEE\\u1BF2-\\u1BF3\\u1BFC-\\u1BFF\\u1C00-\\u1C23\\u1C24-\\u1C2B\" + \"\\u1C34-\\u1C35\\u1C3B-\\u1C3F\\u1C40-\\u1C49\\u1C4D-\\u1C4F\\u1C50-\\u1C59\" + \"\\u1C5A-\\u1C77\\u1C78-\\u1C7D\\u1C7E-\\u1C7F\\u1CC0-\\u1CC7\\u1CD3\\u1CE1\" + \"\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF2-\\u1CF3\\u1CF5-\\u1CF6\\u1D00-\\u1D2B\" + \"\\u1D2C-\\u1D6A\\u1D6B-\\u1D77\\u1D78\\u1D79-\\u1D9A\\u1D9B-\\u1DBF\\u1E00-\\u1F15\" + \"\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\" + \"\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\" + \"\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200E\" + \"\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\" + \"\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2134\\u2135-\\u2138\\u2139\" + \"\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u214F\\u2160-\\u2182\\u2183-\\u2184\" + \"\\u2185-\\u2188\\u2336-\\u237A\\u2395\\u249C-\\u24E9\\u26AC\\u2800-\\u28FF\" + \"\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2C7B\\u2C7C-\\u2C7D\\u2C7E-\\u2CE4\" + \"\\u2CEB-\\u2CEE\\u2CF2-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\" + \"\\u2D70\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\" + \"\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u3005\\u3006\\u3007\" + \"\\u3021-\\u3029\\u302E-\\u302F\\u3031-\\u3035\\u3038-\\u303A\\u303B\\u303C\" + \"\\u3041-\\u3096\\u309D-\\u309E\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FE\\u30FF\" + \"\\u3105-\\u312D\\u3131-\\u318E\\u3190-\\u3191\\u3192-\\u3195\\u3196-\\u319F\" + \"\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3200-\\u321C\\u3220-\\u3229\\u322A-\\u3247\" + \"\\u3248-\\u324F\\u3260-\\u327B\\u327F\\u3280-\\u3289\\u328A-\\u32B0\\u32C0-\\u32CB\" + \"\\u32D0-\\u32FE\\u3300-\\u3376\\u337B-\\u33DD\\u33E0-\\u33FE\\u3400-\\u4DB5\" + \"\\u4E00-\\u9FCC\\uA000-\\uA014\\uA015\\uA016-\\uA48C\\uA4D0-\\uA4F7\\uA4F8-\\uA4FD\" + \"\\uA4FE-\\uA4FF\\uA500-\\uA60B\\uA60C\\uA610-\\uA61F\\uA620-\\uA629\\uA62A-\\uA62B\" + \"\\uA640-\\uA66D\\uA66E\\uA680-\\uA69B\\uA69C-\\uA69D\\uA6A0-\\uA6E5\\uA6E6-\\uA6EF\" + \"\\uA6F2-\\uA6F7\\uA722-\\uA76F\\uA770\\uA771-\\uA787\\uA789-\\uA78A\\uA78B-\\uA78E\" + \"\\uA790-\\uA7AD\\uA7B0-\\uA7B1\\uA7F7\\uA7F8-\\uA7F9\\uA7FA\\uA7FB-\\uA801\" + \"\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA823-\\uA824\\uA827\\uA830-\\uA835\" + \"\\uA836-\\uA837\\uA840-\\uA873\\uA880-\\uA881\\uA882-\\uA8B3\\uA8B4-\\uA8C3\" + \"\\uA8CE-\\uA8CF\\uA8D0-\\uA8D9\\uA8F2-\\uA8F7\\uA8F8-\\uA8FA\\uA8FB\\uA900-\\uA909\" + \"\\uA90A-\\uA925\\uA92E-\\uA92F\\uA930-\\uA946\\uA952-\\uA953\\uA95F\\uA960-\\uA97C\" + \"\\uA983\\uA984-\\uA9B2\\uA9B4-\\uA9B5\\uA9BA-\\uA9BB\\uA9BD-\\uA9C0\\uA9C1-\\uA9CD\" + \"\\uA9CF\\uA9D0-\\uA9D9\\uA9DE-\\uA9DF\\uA9E0-\\uA9E4\\uA9E6\\uA9E7-\\uA9EF\" + \"\\uA9F0-\\uA9F9\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA2F-\\uAA30\\uAA33-\\uAA34\" + \"\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA4D\\uAA50-\\uAA59\\uAA5C-\\uAA5F\\uAA60-\\uAA6F\" + \"\\uAA70\\uAA71-\\uAA76\\uAA77-\\uAA79\\uAA7A\\uAA7B\\uAA7D\\uAA7E-\\uAAAF\\uAAB1\" + \"\\uAAB5-\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADC\\uAADD\\uAADE-\\uAADF\" + \"\\uAAE0-\\uAAEA\\uAAEB\\uAAEE-\\uAAEF\\uAAF0-\\uAAF1\\uAAF2\\uAAF3-\\uAAF4\\uAAF5\" + \"\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\" + \"\\uAB30-\\uAB5A\\uAB5B\\uAB5C-\\uAB5F\\uAB64-\\uAB65\\uABC0-\\uABE2\\uABE3-\\uABE4\" + \"\\uABE6-\\uABE7\\uABE9-\\uABEA\\uABEB\\uABEC\\uABF0-\\uABF9\\uAC00-\\uD7A3\" + \"\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uE000-\\uF8FF\\uF900-\\uFA6D\\uFA70-\\uFAD9\" + \"\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFF6F\\uFF70\" + \"\\uFF71-\\uFF9D\\uFF9E-\\uFF9F\\uFFA0-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\" + \"\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC\",\n R: \"\\u0590\\u05BE\\u05C0\\u05C3\\u05C6\\u05C8-\\u05CF\\u05D0-\\u05EA\\u05EB-\\u05EF\" + \"\\u05F0-\\u05F2\\u05F3-\\u05F4\\u05F5-\\u05FF\\u07C0-\\u07C9\\u07CA-\\u07EA\" + \"\\u07F4-\\u07F5\\u07FA\\u07FB-\\u07FF\\u0800-\\u0815\\u081A\\u0824\\u0828\" + \"\\u082E-\\u082F\\u0830-\\u083E\\u083F\\u0840-\\u0858\\u085C-\\u085D\\u085E\" + \"\\u085F-\\u089F\\u200F\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB37\\uFB38-\\uFB3C\" + \"\\uFB3D\\uFB3E\\uFB3F\\uFB40-\\uFB41\\uFB42\\uFB43-\\uFB44\\uFB45\\uFB46-\\uFB4F\",\n AL: \"\\u0608\\u060B\\u060D\\u061B\\u061C\\u061D\\u061E-\\u061F\\u0620-\\u063F\\u0640\" + \"\\u0641-\\u064A\\u066D\\u066E-\\u066F\\u0671-\\u06D3\\u06D4\\u06D5\\u06E5-\\u06E6\" + \"\\u06EE-\\u06EF\\u06FA-\\u06FC\\u06FD-\\u06FE\\u06FF\\u0700-\\u070D\\u070E\\u070F\" + \"\\u0710\\u0712-\\u072F\\u074B-\\u074C\\u074D-\\u07A5\\u07B1\\u07B2-\\u07BF\" + \"\\u08A0-\\u08B2\\u08B3-\\u08E3\\uFB50-\\uFBB1\\uFBB2-\\uFBC1\\uFBC2-\\uFBD2\" + \"\\uFBD3-\\uFD3D\\uFD40-\\uFD4F\\uFD50-\\uFD8F\\uFD90-\\uFD91\\uFD92-\\uFDC7\" + \"\\uFDC8-\\uFDCF\\uFDF0-\\uFDFB\\uFDFC\\uFDFE-\\uFDFF\\uFE70-\\uFE74\\uFE75\" + \"\\uFE76-\\uFEFC\\uFEFD-\\uFEFE\"\n};\nvar REGEX_STRONG = new RegExp('[' + RANGE_BY_BIDI_TYPE.L + RANGE_BY_BIDI_TYPE.R + RANGE_BY_BIDI_TYPE.AL + ']');\nvar REGEX_RTL = new RegExp('[' + RANGE_BY_BIDI_TYPE.R + RANGE_BY_BIDI_TYPE.AL + ']');\n/**\n * Returns the first strong character (has Bidi_Class value of L, R, or AL).\n *\n * @param str A text block; e.g. paragraph, table cell, tag\n * @return A character with strong bidi direction, or null if not found\n */\n\nfunction firstStrongChar(str) {\n var match = REGEX_STRONG.exec(str);\n return match == null ? null : match[0];\n}\n/**\n * Returns the direction of a block of text, based on the direction of its\n * first strong character (has Bidi_Class value of L, R, or AL).\n *\n * @param str A text block; e.g. paragraph, table cell, tag\n * @return The resolved direction\n */\n\n\nfunction firstStrongCharDir(str) {\n var strongChar = firstStrongChar(str);\n\n if (strongChar == null) {\n return UnicodeBidiDirection.NEUTRAL;\n }\n\n return REGEX_RTL.exec(strongChar) ? UnicodeBidiDirection.RTL : UnicodeBidiDirection.LTR;\n}\n/**\n * Returns the direction of a block of text, based on the direction of its\n * first strong character (has Bidi_Class value of L, R, or AL), or a fallback\n * direction, if no strong character is found.\n *\n * This function is supposed to be used in respect to Higher-Level Protocol\n * rule HL1. (http://www.unicode.org/reports/tr9/#HL1)\n *\n * @param str A text block; e.g. paragraph, table cell, tag\n * @param fallback Fallback direction, used if no strong direction detected\n * for the block (default = NEUTRAL)\n * @return The resolved direction\n */\n\n\nfunction resolveBlockDir(str, fallback) {\n fallback = fallback || UnicodeBidiDirection.NEUTRAL;\n\n if (!str.length) {\n return fallback;\n }\n\n var blockDir = firstStrongCharDir(str);\n return blockDir === UnicodeBidiDirection.NEUTRAL ? fallback : blockDir;\n}\n/**\n * Returns the direction of a block of text, based on the direction of its\n * first strong character (has Bidi_Class value of L, R, or AL), or a fallback\n * direction, if no strong character is found.\n *\n * NOTE: This function is similar to resolveBlockDir(), but uses the global\n * direction as the fallback, so it *always* returns a Strong direction,\n * making it useful for integration in places that you need to make the final\n * decision, like setting some CSS class.\n *\n * This function is supposed to be used in respect to Higher-Level Protocol\n * rule HL1. (http://www.unicode.org/reports/tr9/#HL1)\n *\n * @param str A text block; e.g. paragraph, table cell\n * @param strongFallback Fallback direction, used if no strong direction\n * detected for the block (default = global direction)\n * @return The resolved Strong direction\n */\n\n\nfunction getDirection(str, strongFallback) {\n if (!strongFallback) {\n strongFallback = UnicodeBidiDirection.getGlobalDir();\n }\n\n !UnicodeBidiDirection.isStrong(strongFallback) ? true ? invariant(false, 'Fallback direction must be a strong direction') : undefined : void 0;\n return resolveBlockDir(str, strongFallback);\n}\n/**\n * Returns true if getDirection(arguments...) returns LTR.\n *\n * @param str A text block; e.g. paragraph, table cell\n * @param strongFallback Fallback direction, used if no strong direction\n * detected for the block (default = global direction)\n * @return True if the resolved direction is LTR\n */\n\n\nfunction isDirectionLTR(str, strongFallback) {\n return getDirection(str, strongFallback) === UnicodeBidiDirection.LTR;\n}\n/**\n * Returns true if getDirection(arguments...) returns RTL.\n *\n * @param str A text block; e.g. paragraph, table cell\n * @param strongFallback Fallback direction, used if no strong direction\n * detected for the block (default = global direction)\n * @return True if the resolved direction is RTL\n */\n\n\nfunction isDirectionRTL(str, strongFallback) {\n return getDirection(str, strongFallback) === UnicodeBidiDirection.RTL;\n}\n\nvar UnicodeBidi = {\n firstStrongChar: firstStrongChar,\n firstStrongCharDir: firstStrongCharDir,\n resolveBlockDir: resolveBlockDir,\n getDirection: getDirection,\n isDirectionLTR: isDirectionLTR,\n isDirectionRTL: isDirectionRTL\n};\nmodule.exports = UnicodeBidi;\n\n//# sourceURL=webpack:///./node_modules/draft-js/node_modules/fbjs/lib/UnicodeBidi.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/node_modules/fbjs/lib/UnicodeBidiDirection.js": +/*!*****************************************************************************!*\ + !*** ./node_modules/draft-js/node_modules/fbjs/lib/UnicodeBidiDirection.js ***! + \*****************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @typechecks\n * \n */\n\n/**\n * Constants to represent text directionality\n *\n * Also defines a *global* direciton, to be used in bidi algorithms as a\n * default fallback direciton, when no better direction is found or provided.\n *\n * NOTE: Use `setGlobalDir()`, or update `initGlobalDir()`, to set the initial\n * global direction value based on the application.\n *\n * Part of the implementation of Unicode Bidirectional Algorithm (UBA)\n * Unicode Standard Annex #9 (UAX9)\n * http://www.unicode.org/reports/tr9/\n */\n\n\nvar invariant = __webpack_require__(/*! ./invariant */ \"./node_modules/draft-js/node_modules/fbjs/lib/invariant.js\");\n\nvar NEUTRAL = 'NEUTRAL'; // No strong direction\n\nvar LTR = 'LTR'; // Left-to-Right direction\n\nvar RTL = 'RTL'; // Right-to-Left direction\n\nvar globalDir = null; // == Helpers ==\n\n/**\n * Check if a directionality value is a Strong one\n */\n\nfunction isStrong(dir) {\n return dir === LTR || dir === RTL;\n}\n/**\n * Get string value to be used for `dir` HTML attribute or `direction` CSS\n * property.\n */\n\n\nfunction getHTMLDir(dir) {\n !isStrong(dir) ? true ? invariant(false, '`dir` must be a strong direction to be converted to HTML Direction') : undefined : void 0;\n return dir === LTR ? 'ltr' : 'rtl';\n}\n/**\n * Get string value to be used for `dir` HTML attribute or `direction` CSS\n * property, but returns null if `dir` has same value as `otherDir`.\n * `null`.\n */\n\n\nfunction getHTMLDirIfDifferent(dir, otherDir) {\n !isStrong(dir) ? true ? invariant(false, '`dir` must be a strong direction to be converted to HTML Direction') : undefined : void 0;\n !isStrong(otherDir) ? true ? invariant(false, '`otherDir` must be a strong direction to be converted to HTML Direction') : undefined : void 0;\n return dir === otherDir ? null : getHTMLDir(dir);\n} // == Global Direction ==\n\n/**\n * Set the global direction.\n */\n\n\nfunction setGlobalDir(dir) {\n globalDir = dir;\n}\n/**\n * Initialize the global direction\n */\n\n\nfunction initGlobalDir() {\n setGlobalDir(LTR);\n}\n/**\n * Get the global direction\n */\n\n\nfunction getGlobalDir() {\n if (!globalDir) {\n this.initGlobalDir();\n }\n\n !globalDir ? true ? invariant(false, 'Global direction not set.') : undefined : void 0;\n return globalDir;\n}\n\nvar UnicodeBidiDirection = {\n // Values\n NEUTRAL: NEUTRAL,\n LTR: LTR,\n RTL: RTL,\n // Helpers\n isStrong: isStrong,\n getHTMLDir: getHTMLDir,\n getHTMLDirIfDifferent: getHTMLDirIfDifferent,\n // Global Direction\n setGlobalDir: setGlobalDir,\n initGlobalDir: initGlobalDir,\n getGlobalDir: getGlobalDir\n};\nmodule.exports = UnicodeBidiDirection;\n\n//# sourceURL=webpack:///./node_modules/draft-js/node_modules/fbjs/lib/UnicodeBidiDirection.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/node_modules/fbjs/lib/UnicodeBidiService.js": +/*!***************************************************************************!*\ + !*** ./node_modules/draft-js/node_modules/fbjs/lib/UnicodeBidiService.js ***! + \***************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @typechecks\n * \n */\n\n/**\n * Stateful API for text direction detection\n *\n * This class can be used in applications where you need to detect the\n * direction of a sequence of text blocks, where each direction shall be used\n * as the fallback direction for the next one.\n *\n * NOTE: A default direction, if not provided, is set based on the global\n * direction, as defined by `UnicodeBidiDirection`.\n *\n * == Example ==\n * ```\n * var UnicodeBidiService = require('UnicodeBidiService');\n *\n * var bidiService = new UnicodeBidiService();\n *\n * ...\n *\n * bidiService.reset();\n * for (var para in paragraphs) {\n * var dir = bidiService.getDirection(para);\n * ...\n * }\n * ```\n *\n * Part of our implementation of Unicode Bidirectional Algorithm (UBA)\n * Unicode Standard Annex #9 (UAX9)\n * http://www.unicode.org/reports/tr9/\n */\n\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar UnicodeBidi = __webpack_require__(/*! ./UnicodeBidi */ \"./node_modules/draft-js/node_modules/fbjs/lib/UnicodeBidi.js\");\n\nvar UnicodeBidiDirection = __webpack_require__(/*! ./UnicodeBidiDirection */ \"./node_modules/draft-js/node_modules/fbjs/lib/UnicodeBidiDirection.js\");\n\nvar invariant = __webpack_require__(/*! ./invariant */ \"./node_modules/draft-js/node_modules/fbjs/lib/invariant.js\");\n\nvar UnicodeBidiService =\n/*#__PURE__*/\nfunction () {\n /**\n * Stateful class for paragraph direction detection\n *\n * @param defaultDir Default direction of the service\n */\n function UnicodeBidiService(defaultDir) {\n _defineProperty(this, \"_defaultDir\", void 0);\n\n _defineProperty(this, \"_lastDir\", void 0);\n\n if (!defaultDir) {\n defaultDir = UnicodeBidiDirection.getGlobalDir();\n } else {\n !UnicodeBidiDirection.isStrong(defaultDir) ? true ? invariant(false, 'Default direction must be a strong direction (LTR or RTL)') : undefined : void 0;\n }\n\n this._defaultDir = defaultDir;\n this.reset();\n }\n /**\n * Reset the internal state\n *\n * Instead of creating a new instance, you can just reset() your instance\n * everytime you start a new loop.\n */\n\n\n var _proto = UnicodeBidiService.prototype;\n\n _proto.reset = function reset() {\n this._lastDir = this._defaultDir;\n };\n /**\n * Returns the direction of a block of text, and remembers it as the\n * fall-back direction for the next paragraph.\n *\n * @param str A text block, e.g. paragraph, table cell, tag\n * @return The resolved direction\n */\n\n\n _proto.getDirection = function getDirection(str) {\n this._lastDir = UnicodeBidi.getDirection(str, this._lastDir);\n return this._lastDir;\n };\n\n return UnicodeBidiService;\n}();\n\nmodule.exports = UnicodeBidiService;\n\n//# sourceURL=webpack:///./node_modules/draft-js/node_modules/fbjs/lib/UnicodeBidiService.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/node_modules/fbjs/lib/UnicodeUtils.js": +/*!*********************************************************************!*\ + !*** ./node_modules/draft-js/node_modules/fbjs/lib/UnicodeUtils.js ***! + \*********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @typechecks\n */\n\n/**\n * Unicode-enabled replacesments for basic String functions.\n *\n * All the functions in this module assume that the input string is a valid\n * UTF-16 encoding of a Unicode sequence. If it's not the case, the behavior\n * will be undefined.\n *\n * WARNING: Since this module is typechecks-enforced, you may find new bugs\n * when replacing normal String functions with ones provided here.\n */\n\n\nvar invariant = __webpack_require__(/*! ./invariant */ \"./node_modules/draft-js/node_modules/fbjs/lib/invariant.js\"); // These two ranges are consecutive so anything in [HIGH_START, LOW_END] is a\n// surrogate code unit.\n\n\nvar SURROGATE_HIGH_START = 0xD800;\nvar SURROGATE_HIGH_END = 0xDBFF;\nvar SURROGATE_LOW_START = 0xDC00;\nvar SURROGATE_LOW_END = 0xDFFF;\nvar SURROGATE_UNITS_REGEX = /[\\uD800-\\uDFFF]/;\n/**\n * @param {number} codeUnit A Unicode code-unit, in range [0, 0x10FFFF]\n * @return {boolean} Whether code-unit is in a surrogate (hi/low) range\n */\n\nfunction isCodeUnitInSurrogateRange(codeUnit) {\n return SURROGATE_HIGH_START <= codeUnit && codeUnit <= SURROGATE_LOW_END;\n}\n/**\n * Returns whether the two characters starting at `index` form a surrogate pair.\n * For example, given the string s = \"\\uD83D\\uDE0A\", (s, 0) returns true and\n * (s, 1) returns false.\n *\n * @param {string} str\n * @param {number} index\n * @return {boolean}\n */\n\n\nfunction isSurrogatePair(str, index) {\n !(0 <= index && index < str.length) ? true ? invariant(false, 'isSurrogatePair: Invalid index %s for string length %s.', index, str.length) : undefined : void 0;\n\n if (index + 1 === str.length) {\n return false;\n }\n\n var first = str.charCodeAt(index);\n var second = str.charCodeAt(index + 1);\n return SURROGATE_HIGH_START <= first && first <= SURROGATE_HIGH_END && SURROGATE_LOW_START <= second && second <= SURROGATE_LOW_END;\n}\n/**\n * @param {string} str Non-empty string\n * @return {boolean} True if the input includes any surrogate code units\n */\n\n\nfunction hasSurrogateUnit(str) {\n return SURROGATE_UNITS_REGEX.test(str);\n}\n/**\n * Return the length of the original Unicode character at given position in the\n * String by looking into the UTF-16 code unit; that is equal to 1 for any\n * non-surrogate characters in BMP ([U+0000..U+D7FF] and [U+E000, U+FFFF]); and\n * returns 2 for the hi/low surrogates ([U+D800..U+DFFF]), which are in fact\n * representing non-BMP characters ([U+10000..U+10FFFF]).\n *\n * Examples:\n * - '\\u0020' => 1\n * - '\\u3020' => 1\n * - '\\uD835' => 2\n * - '\\uD835\\uDDEF' => 2\n * - '\\uDDEF' => 2\n *\n * @param {string} str Non-empty string\n * @param {number} pos Position in the string to look for one code unit\n * @return {number} Number 1 or 2\n */\n\n\nfunction getUTF16Length(str, pos) {\n return 1 + isCodeUnitInSurrogateRange(str.charCodeAt(pos));\n}\n/**\n * Fully Unicode-enabled replacement for String#length\n *\n * @param {string} str Valid Unicode string\n * @return {number} The number of Unicode characters in the string\n */\n\n\nfunction strlen(str) {\n // Call the native functions if there's no surrogate char\n if (!hasSurrogateUnit(str)) {\n return str.length;\n }\n\n var len = 0;\n\n for (var pos = 0; pos < str.length; pos += getUTF16Length(str, pos)) {\n len++;\n }\n\n return len;\n}\n/**\n * Fully Unicode-enabled replacement for String#substr()\n *\n * @param {string} str Valid Unicode string\n * @param {number} start Location in Unicode sequence to begin extracting\n * @param {?number} length The number of Unicode characters to extract\n * (default: to the end of the string)\n * @return {string} Extracted sub-string\n */\n\n\nfunction substr(str, start, length) {\n start = start || 0;\n length = length === undefined ? Infinity : length || 0; // Call the native functions if there's no surrogate char\n\n if (!hasSurrogateUnit(str)) {\n return str.substr(start, length);\n } // Obvious cases\n\n\n var size = str.length;\n\n if (size <= 0 || start > size || length <= 0) {\n return '';\n } // Find the actual starting position\n\n\n var posA = 0;\n\n if (start > 0) {\n for (; start > 0 && posA < size; start--) {\n posA += getUTF16Length(str, posA);\n }\n\n if (posA >= size) {\n return '';\n }\n } else if (start < 0) {\n for (posA = size; start < 0 && 0 < posA; start++) {\n posA -= getUTF16Length(str, posA - 1);\n }\n\n if (posA < 0) {\n posA = 0;\n }\n } // Find the actual ending position\n\n\n var posB = size;\n\n if (length < size) {\n for (posB = posA; length > 0 && posB < size; length--) {\n posB += getUTF16Length(str, posB);\n }\n }\n\n return str.substring(posA, posB);\n}\n/**\n * Fully Unicode-enabled replacement for String#substring()\n *\n * @param {string} str Valid Unicode string\n * @param {number} start Location in Unicode sequence to begin extracting\n * @param {?number} end Location in Unicode sequence to end extracting\n * (default: end of the string)\n * @return {string} Extracted sub-string\n */\n\n\nfunction substring(str, start, end) {\n start = start || 0;\n end = end === undefined ? Infinity : end || 0;\n\n if (start < 0) {\n start = 0;\n }\n\n if (end < 0) {\n end = 0;\n }\n\n var length = Math.abs(end - start);\n start = start < end ? start : end;\n return substr(str, start, length);\n}\n/**\n * Get a list of Unicode code-points from a String\n *\n * @param {string} str Valid Unicode string\n * @return {array} A list of code-points in [0..0x10FFFF]\n */\n\n\nfunction getCodePoints(str) {\n var codePoints = [];\n\n for (var pos = 0; pos < str.length; pos += getUTF16Length(str, pos)) {\n codePoints.push(str.codePointAt(pos));\n }\n\n return codePoints;\n}\n\nvar UnicodeUtils = {\n getCodePoints: getCodePoints,\n getUTF16Length: getUTF16Length,\n hasSurrogateUnit: hasSurrogateUnit,\n isCodeUnitInSurrogateRange: isCodeUnitInSurrogateRange,\n isSurrogatePair: isSurrogatePair,\n strlen: strlen,\n substring: substring,\n substr: substr\n};\nmodule.exports = UnicodeUtils;\n\n//# sourceURL=webpack:///./node_modules/draft-js/node_modules/fbjs/lib/UnicodeUtils.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/node_modules/fbjs/lib/UserAgent.js": +/*!******************************************************************!*\ + !*** ./node_modules/draft-js/node_modules/fbjs/lib/UserAgent.js ***! + \******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n\nvar UserAgentData = __webpack_require__(/*! ./UserAgentData */ \"./node_modules/draft-js/node_modules/fbjs/lib/UserAgentData.js\");\n\nvar VersionRange = __webpack_require__(/*! ./VersionRange */ \"./node_modules/draft-js/node_modules/fbjs/lib/VersionRange.js\");\n\nvar mapObject = __webpack_require__(/*! ./mapObject */ \"./node_modules/draft-js/node_modules/fbjs/lib/mapObject.js\");\n\nvar memoizeStringOnly = __webpack_require__(/*! ./memoizeStringOnly */ \"./node_modules/draft-js/node_modules/fbjs/lib/memoizeStringOnly.js\");\n/**\n * Checks to see whether `name` and `version` satisfy `query`.\n *\n * @param {string} name Name of the browser, device, engine or platform\n * @param {?string} version Version of the browser, engine or platform\n * @param {string} query Query of form \"Name [range expression]\"\n * @param {?function} normalizer Optional pre-processor for range expression\n * @return {boolean}\n */\n\n\nfunction compare(name, version, query, normalizer) {\n // check for exact match with no version\n if (name === query) {\n return true;\n } // check for non-matching names\n\n\n if (!query.startsWith(name)) {\n return false;\n } // full comparison with version\n\n\n var range = query.slice(name.length);\n\n if (version) {\n range = normalizer ? normalizer(range) : range;\n return VersionRange.contains(range, version);\n }\n\n return false;\n}\n/**\n * Normalizes `version` by stripping any \"NT\" prefix, but only on the Windows\n * platform.\n *\n * Mimics the stripping performed by the `UserAgentWindowsPlatform` PHP class.\n *\n * @param {string} version\n * @return {string}\n */\n\n\nfunction normalizePlatformVersion(version) {\n if (UserAgentData.platformName === 'Windows') {\n return version.replace(/^\\s*NT/, '');\n }\n\n return version;\n}\n/**\n * Provides client-side access to the authoritative PHP-generated User Agent\n * information supplied by the server.\n */\n\n\nvar UserAgent = {\n /**\n * Check if the User Agent browser matches `query`.\n *\n * `query` should be a string like \"Chrome\" or \"Chrome > 33\".\n *\n * Valid browser names include:\n *\n * - ACCESS NetFront\n * - AOL\n * - Amazon Silk\n * - Android\n * - BlackBerry\n * - BlackBerry PlayBook\n * - Chrome\n * - Chrome for iOS\n * - Chrome frame\n * - Facebook PHP SDK\n * - Facebook for iOS\n * - Firefox\n * - IE\n * - IE Mobile\n * - Mobile Safari\n * - Motorola Internet Browser\n * - Nokia\n * - Openwave Mobile Browser\n * - Opera\n * - Opera Mini\n * - Opera Mobile\n * - Safari\n * - UIWebView\n * - Unknown\n * - webOS\n * - etc...\n *\n * An authoritative list can be found in the PHP `BrowserDetector` class and\n * related classes in the same file (see calls to `new UserAgentBrowser` here:\n * https://fburl.com/50728104).\n *\n * @note Function results are memoized\n *\n * @param {string} query Query of the form \"Name [range expression]\"\n * @return {boolean}\n */\n isBrowser: function isBrowser(query) {\n return compare(UserAgentData.browserName, UserAgentData.browserFullVersion, query);\n },\n\n /**\n * Check if the User Agent browser uses a 32 or 64 bit architecture.\n *\n * @note Function results are memoized\n *\n * @param {string} query Query of the form \"32\" or \"64\".\n * @return {boolean}\n */\n isBrowserArchitecture: function isBrowserArchitecture(query) {\n return compare(UserAgentData.browserArchitecture, null, query);\n },\n\n /**\n * Check if the User Agent device matches `query`.\n *\n * `query` should be a string like \"iPhone\" or \"iPad\".\n *\n * Valid device names include:\n *\n * - Kindle\n * - Kindle Fire\n * - Unknown\n * - iPad\n * - iPhone\n * - iPod\n * - etc...\n *\n * An authoritative list can be found in the PHP `DeviceDetector` class and\n * related classes in the same file (see calls to `new UserAgentDevice` here:\n * https://fburl.com/50728332).\n *\n * @note Function results are memoized\n *\n * @param {string} query Query of the form \"Name\"\n * @return {boolean}\n */\n isDevice: function isDevice(query) {\n return compare(UserAgentData.deviceName, null, query);\n },\n\n /**\n * Check if the User Agent rendering engine matches `query`.\n *\n * `query` should be a string like \"WebKit\" or \"WebKit >= 537\".\n *\n * Valid engine names include:\n *\n * - Gecko\n * - Presto\n * - Trident\n * - WebKit\n * - etc...\n *\n * An authoritative list can be found in the PHP `RenderingEngineDetector`\n * class related classes in the same file (see calls to `new\n * UserAgentRenderingEngine` here: https://fburl.com/50728617).\n *\n * @note Function results are memoized\n *\n * @param {string} query Query of the form \"Name [range expression]\"\n * @return {boolean}\n */\n isEngine: function isEngine(query) {\n return compare(UserAgentData.engineName, UserAgentData.engineVersion, query);\n },\n\n /**\n * Check if the User Agent platform matches `query`.\n *\n * `query` should be a string like \"Windows\" or \"iOS 5 - 6\".\n *\n * Valid platform names include:\n *\n * - Android\n * - BlackBerry OS\n * - Java ME\n * - Linux\n * - Mac OS X\n * - Mac OS X Calendar\n * - Mac OS X Internet Account\n * - Symbian\n * - SymbianOS\n * - Windows\n * - Windows Mobile\n * - Windows Phone\n * - iOS\n * - iOS Facebook Integration Account\n * - iOS Facebook Social Sharing UI\n * - webOS\n * - Chrome OS\n * - etc...\n *\n * An authoritative list can be found in the PHP `PlatformDetector` class and\n * related classes in the same file (see calls to `new UserAgentPlatform`\n * here: https://fburl.com/50729226).\n *\n * @note Function results are memoized\n *\n * @param {string} query Query of the form \"Name [range expression]\"\n * @return {boolean}\n */\n isPlatform: function isPlatform(query) {\n return compare(UserAgentData.platformName, UserAgentData.platformFullVersion, query, normalizePlatformVersion);\n },\n\n /**\n * Check if the User Agent platform is a 32 or 64 bit architecture.\n *\n * @note Function results are memoized\n *\n * @param {string} query Query of the form \"32\" or \"64\".\n * @return {boolean}\n */\n isPlatformArchitecture: function isPlatformArchitecture(query) {\n return compare(UserAgentData.platformArchitecture, null, query);\n }\n};\nmodule.exports = mapObject(UserAgent, memoizeStringOnly);\n\n//# sourceURL=webpack:///./node_modules/draft-js/node_modules/fbjs/lib/UserAgent.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/node_modules/fbjs/lib/UserAgentData.js": +/*!**********************************************************************!*\ + !*** ./node_modules/draft-js/node_modules/fbjs/lib/UserAgentData.js ***! + \**********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n/**\n * Usage note:\n * This module makes a best effort to export the same data we would internally.\n * At Facebook we use a server-generated module that does the parsing and\n * exports the data for the client to use. We can't rely on a server-side\n * implementation in open source so instead we make use of an open source\n * library to do the heavy lifting and then make some adjustments as necessary.\n * It's likely there will be some differences. Some we can smooth over.\n * Others are going to be harder.\n */\n\n\nvar UAParser = __webpack_require__(/*! ua-parser-js */ \"./node_modules/ua-parser-js/src/ua-parser.js\");\n\nvar UNKNOWN = 'Unknown';\nvar PLATFORM_MAP = {\n 'Mac OS': 'Mac OS X'\n};\n/**\n * Convert from UAParser platform name to what we expect.\n */\n\nfunction convertPlatformName(name) {\n return PLATFORM_MAP[name] || name;\n}\n/**\n * Get the version number in parts. This is very naive. We actually get major\n * version as a part of UAParser already, which is generally good enough, but\n * let's get the minor just in case.\n */\n\n\nfunction getBrowserVersion(version) {\n if (!version) {\n return {\n major: '',\n minor: ''\n };\n }\n\n var parts = version.split('.');\n return {\n major: parts[0],\n minor: parts[1]\n };\n}\n/**\n * Get the UA data fom UAParser and then convert it to the format we're\n * expecting for our APIS.\n */\n\n\nvar parser = new UAParser();\nvar results = parser.getResult(); // Do some conversion first.\n\nvar browserVersionData = getBrowserVersion(results.browser.version);\nvar uaData = {\n browserArchitecture: results.cpu.architecture || UNKNOWN,\n browserFullVersion: results.browser.version || UNKNOWN,\n browserMinorVersion: browserVersionData.minor || UNKNOWN,\n browserName: results.browser.name || UNKNOWN,\n browserVersion: results.browser.major || UNKNOWN,\n deviceName: results.device.model || UNKNOWN,\n engineName: results.engine.name || UNKNOWN,\n engineVersion: results.engine.version || UNKNOWN,\n platformArchitecture: results.cpu.architecture || UNKNOWN,\n platformName: convertPlatformName(results.os.name) || UNKNOWN,\n platformVersion: results.os.version || UNKNOWN,\n platformFullVersion: results.os.version || UNKNOWN\n};\nmodule.exports = uaData;\n\n//# sourceURL=webpack:///./node_modules/draft-js/node_modules/fbjs/lib/UserAgentData.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/node_modules/fbjs/lib/VersionRange.js": +/*!*********************************************************************!*\ + !*** ./node_modules/draft-js/node_modules/fbjs/lib/VersionRange.js ***! + \*********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n\nvar invariant = __webpack_require__(/*! ./invariant */ \"./node_modules/draft-js/node_modules/fbjs/lib/invariant.js\");\n\nvar componentRegex = /\\./;\nvar orRegex = /\\|\\|/;\nvar rangeRegex = /\\s+\\-\\s+/;\nvar modifierRegex = /^(<=|<|=|>=|~>|~|>|)?\\s*(.+)/;\nvar numericRegex = /^(\\d*)(.*)/;\n/**\n * Splits input `range` on \"||\" and returns true if any subrange matches\n * `version`.\n *\n * @param {string} range\n * @param {string} version\n * @returns {boolean}\n */\n\nfunction checkOrExpression(range, version) {\n var expressions = range.split(orRegex);\n\n if (expressions.length > 1) {\n return expressions.some(function (range) {\n return VersionRange.contains(range, version);\n });\n } else {\n range = expressions[0].trim();\n return checkRangeExpression(range, version);\n }\n}\n/**\n * Splits input `range` on \" - \" (the surrounding whitespace is required) and\n * returns true if version falls between the two operands.\n *\n * @param {string} range\n * @param {string} version\n * @returns {boolean}\n */\n\n\nfunction checkRangeExpression(range, version) {\n var expressions = range.split(rangeRegex);\n !(expressions.length > 0 && expressions.length <= 2) ? true ? invariant(false, 'the \"-\" operator expects exactly 2 operands') : undefined : void 0;\n\n if (expressions.length === 1) {\n return checkSimpleExpression(expressions[0], version);\n } else {\n var startVersion = expressions[0],\n endVersion = expressions[1];\n !(isSimpleVersion(startVersion) && isSimpleVersion(endVersion)) ? true ? invariant(false, 'operands to the \"-\" operator must be simple (no modifiers)') : undefined : void 0;\n return checkSimpleExpression('>=' + startVersion, version) && checkSimpleExpression('<=' + endVersion, version);\n }\n}\n/**\n * Checks if `range` matches `version`. `range` should be a \"simple\" range (ie.\n * not a compound range using the \" - \" or \"||\" operators).\n *\n * @param {string} range\n * @param {string} version\n * @returns {boolean}\n */\n\n\nfunction checkSimpleExpression(range, version) {\n range = range.trim();\n\n if (range === '') {\n return true;\n }\n\n var versionComponents = version.split(componentRegex);\n\n var _getModifierAndCompon = getModifierAndComponents(range),\n modifier = _getModifierAndCompon.modifier,\n rangeComponents = _getModifierAndCompon.rangeComponents;\n\n switch (modifier) {\n case '<':\n return checkLessThan(versionComponents, rangeComponents);\n\n case '<=':\n return checkLessThanOrEqual(versionComponents, rangeComponents);\n\n case '>=':\n return checkGreaterThanOrEqual(versionComponents, rangeComponents);\n\n case '>':\n return checkGreaterThan(versionComponents, rangeComponents);\n\n case '~':\n case '~>':\n return checkApproximateVersion(versionComponents, rangeComponents);\n\n default:\n return checkEqual(versionComponents, rangeComponents);\n }\n}\n/**\n * Checks whether `a` is less than `b`.\n *\n * @param {array} a\n * @param {array} b\n * @returns {boolean}\n */\n\n\nfunction checkLessThan(a, b) {\n return compareComponents(a, b) === -1;\n}\n/**\n * Checks whether `a` is less than or equal to `b`.\n *\n * @param {array} a\n * @param {array} b\n * @returns {boolean}\n */\n\n\nfunction checkLessThanOrEqual(a, b) {\n var result = compareComponents(a, b);\n return result === -1 || result === 0;\n}\n/**\n * Checks whether `a` is equal to `b`.\n *\n * @param {array} a\n * @param {array} b\n * @returns {boolean}\n */\n\n\nfunction checkEqual(a, b) {\n return compareComponents(a, b) === 0;\n}\n/**\n * Checks whether `a` is greater than or equal to `b`.\n *\n * @param {array} a\n * @param {array} b\n * @returns {boolean}\n */\n\n\nfunction checkGreaterThanOrEqual(a, b) {\n var result = compareComponents(a, b);\n return result === 1 || result === 0;\n}\n/**\n * Checks whether `a` is greater than `b`.\n *\n * @param {array} a\n * @param {array} b\n * @returns {boolean}\n */\n\n\nfunction checkGreaterThan(a, b) {\n return compareComponents(a, b) === 1;\n}\n/**\n * Checks whether `a` is \"reasonably close\" to `b` (as described in\n * https://www.npmjs.org/doc/misc/semver.html). For example, if `b` is \"1.3.1\"\n * then \"reasonably close\" is defined as \">= 1.3.1 and < 1.4\".\n *\n * @param {array} a\n * @param {array} b\n * @returns {boolean}\n */\n\n\nfunction checkApproximateVersion(a, b) {\n var lowerBound = b.slice();\n var upperBound = b.slice();\n\n if (upperBound.length > 1) {\n upperBound.pop();\n }\n\n var lastIndex = upperBound.length - 1;\n var numeric = parseInt(upperBound[lastIndex], 10);\n\n if (isNumber(numeric)) {\n upperBound[lastIndex] = numeric + 1 + '';\n }\n\n return checkGreaterThanOrEqual(a, lowerBound) && checkLessThan(a, upperBound);\n}\n/**\n * Extracts the optional modifier (<, <=, =, >=, >, ~, ~>) and version\n * components from `range`.\n *\n * For example, given `range` \">= 1.2.3\" returns an object with a `modifier` of\n * `\">=\"` and `components` of `[1, 2, 3]`.\n *\n * @param {string} range\n * @returns {object}\n */\n\n\nfunction getModifierAndComponents(range) {\n var rangeComponents = range.split(componentRegex);\n var matches = rangeComponents[0].match(modifierRegex);\n !matches ? true ? invariant(false, 'expected regex to match but it did not') : undefined : void 0;\n return {\n modifier: matches[1],\n rangeComponents: [matches[2]].concat(rangeComponents.slice(1))\n };\n}\n/**\n * Determines if `number` is a number.\n *\n * @param {mixed} number\n * @returns {boolean}\n */\n\n\nfunction isNumber(number) {\n return !isNaN(number) && isFinite(number);\n}\n/**\n * Tests whether `range` is a \"simple\" version number without any modifiers\n * (\">\", \"~\" etc).\n *\n * @param {string} range\n * @returns {boolean}\n */\n\n\nfunction isSimpleVersion(range) {\n return !getModifierAndComponents(range).modifier;\n}\n/**\n * Zero-pads array `array` until it is at least `length` long.\n *\n * @param {array} array\n * @param {number} length\n */\n\n\nfunction zeroPad(array, length) {\n for (var i = array.length; i < length; i++) {\n array[i] = '0';\n }\n}\n/**\n * Normalizes `a` and `b` in preparation for comparison by doing the following:\n *\n * - zero-pads `a` and `b`\n * - marks any \"x\", \"X\" or \"*\" component in `b` as equivalent by zero-ing it out\n * in both `a` and `b`\n * - marks any final \"*\" component in `b` as a greedy wildcard by zero-ing it\n * and all of its successors in `a`\n *\n * @param {array} a\n * @param {array} b\n * @returns {array>}\n */\n\n\nfunction normalizeVersions(a, b) {\n a = a.slice();\n b = b.slice();\n zeroPad(a, b.length); // mark \"x\" and \"*\" components as equal\n\n for (var i = 0; i < b.length; i++) {\n var matches = b[i].match(/^[x*]$/i);\n\n if (matches) {\n b[i] = a[i] = '0'; // final \"*\" greedily zeros all remaining components\n\n if (matches[0] === '*' && i === b.length - 1) {\n for (var j = i; j < a.length; j++) {\n a[j] = '0';\n }\n }\n }\n }\n\n zeroPad(b, a.length);\n return [a, b];\n}\n/**\n * Returns the numerical -- not the lexicographical -- ordering of `a` and `b`.\n *\n * For example, `10-alpha` is greater than `2-beta`.\n *\n * @param {string} a\n * @param {string} b\n * @returns {number} -1, 0 or 1 to indicate whether `a` is less than, equal to,\n * or greater than `b`, respectively\n */\n\n\nfunction compareNumeric(a, b) {\n var aPrefix = a.match(numericRegex)[1];\n var bPrefix = b.match(numericRegex)[1];\n var aNumeric = parseInt(aPrefix, 10);\n var bNumeric = parseInt(bPrefix, 10);\n\n if (isNumber(aNumeric) && isNumber(bNumeric) && aNumeric !== bNumeric) {\n return compare(aNumeric, bNumeric);\n } else {\n return compare(a, b);\n }\n}\n/**\n * Returns the ordering of `a` and `b`.\n *\n * @param {string|number} a\n * @param {string|number} b\n * @returns {number} -1, 0 or 1 to indicate whether `a` is less than, equal to,\n * or greater than `b`, respectively\n */\n\n\nfunction compare(a, b) {\n !(typeof a === typeof b) ? true ? invariant(false, '\"a\" and \"b\" must be of the same type') : undefined : void 0;\n\n if (a > b) {\n return 1;\n } else if (a < b) {\n return -1;\n } else {\n return 0;\n }\n}\n/**\n * Compares arrays of version components.\n *\n * @param {array} a\n * @param {array} b\n * @returns {number} -1, 0 or 1 to indicate whether `a` is less than, equal to,\n * or greater than `b`, respectively\n */\n\n\nfunction compareComponents(a, b) {\n var _normalizeVersions = normalizeVersions(a, b),\n aNormalized = _normalizeVersions[0],\n bNormalized = _normalizeVersions[1];\n\n for (var i = 0; i < bNormalized.length; i++) {\n var result = compareNumeric(aNormalized[i], bNormalized[i]);\n\n if (result) {\n return result;\n }\n }\n\n return 0;\n}\n\nvar VersionRange = {\n /**\n * Checks whether `version` satisfies the `range` specification.\n *\n * We support a subset of the expressions defined in\n * https://www.npmjs.org/doc/misc/semver.html:\n *\n * version Must match version exactly\n * =version Same as just version\n * >version Must be greater than version\n * >=version Must be greater than or equal to version\n * = 1.2.3 and < 1.3\"\n * ~>version Equivalent to ~version\n * 1.2.x Must match \"1.2.x\", where \"x\" is a wildcard that matches\n * anything\n * 1.2.* Similar to \"1.2.x\", but \"*\" in the trailing position is a\n * \"greedy\" wildcard, so will match any number of additional\n * components:\n * \"1.2.*\" will match \"1.2.1\", \"1.2.1.1\", \"1.2.1.1.1\" etc\n * * Any version\n * \"\" (Empty string) Same as *\n * v1 - v2 Equivalent to \">= v1 and <= v2\"\n * r1 || r2 Passes if either r1 or r2 are satisfied\n *\n * @param {string} range\n * @param {string} version\n * @returns {boolean}\n */\n contains: function contains(range, version) {\n return checkOrExpression(range.trim(), version.trim());\n }\n};\nmodule.exports = VersionRange;\n\n//# sourceURL=webpack:///./node_modules/draft-js/node_modules/fbjs/lib/VersionRange.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/node_modules/fbjs/lib/camelize.js": +/*!*****************************************************************!*\ + !*** ./node_modules/draft-js/node_modules/fbjs/lib/camelize.js ***! + \*****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @typechecks\n */\nvar _hyphenPattern = /-(.)/g;\n/**\n * Camelcases a hyphenated string, for example:\n *\n * > camelize('background-color')\n * < \"backgroundColor\"\n *\n * @param {string} string\n * @return {string}\n */\n\nfunction camelize(string) {\n return string.replace(_hyphenPattern, function (_, character) {\n return character.toUpperCase();\n });\n}\n\nmodule.exports = camelize;\n\n//# sourceURL=webpack:///./node_modules/draft-js/node_modules/fbjs/lib/camelize.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/node_modules/fbjs/lib/containsNode.js": +/*!*********************************************************************!*\ + !*** ./node_modules/draft-js/node_modules/fbjs/lib/containsNode.js ***! + \*********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nvar isTextNode = __webpack_require__(/*! ./isTextNode */ \"./node_modules/draft-js/node_modules/fbjs/lib/isTextNode.js\");\n/*eslint-disable no-bitwise */\n\n/**\n * Checks if a given DOM node contains or is another DOM node.\n */\n\n\nfunction containsNode(outerNode, innerNode) {\n if (!outerNode || !innerNode) {\n return false;\n } else if (outerNode === innerNode) {\n return true;\n } else if (isTextNode(outerNode)) {\n return false;\n } else if (isTextNode(innerNode)) {\n return containsNode(outerNode, innerNode.parentNode);\n } else if ('contains' in outerNode) {\n return outerNode.contains(innerNode);\n } else if (outerNode.compareDocumentPosition) {\n return !!(outerNode.compareDocumentPosition(innerNode) & 16);\n } else {\n return false;\n }\n}\n\nmodule.exports = containsNode;\n\n//# sourceURL=webpack:///./node_modules/draft-js/node_modules/fbjs/lib/containsNode.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/node_modules/fbjs/lib/createArrayFromMixed.js": +/*!*****************************************************************************!*\ + !*** ./node_modules/draft-js/node_modules/fbjs/lib/createArrayFromMixed.js ***! + \*****************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @typechecks\n */\nvar invariant = __webpack_require__(/*! ./invariant */ \"./node_modules/draft-js/node_modules/fbjs/lib/invariant.js\");\n/**\n * Convert array-like objects to arrays.\n *\n * This API assumes the caller knows the contents of the data type. For less\n * well defined inputs use createArrayFromMixed.\n *\n * @param {object|function|filelist} obj\n * @return {array}\n */\n\n\nfunction toArray(obj) {\n var length = obj.length; // Some browsers builtin objects can report typeof 'function' (e.g. NodeList\n // in old versions of Safari).\n\n !(!Array.isArray(obj) && (typeof obj === 'object' || typeof obj === 'function')) ? true ? invariant(false, 'toArray: Array-like object expected') : undefined : void 0;\n !(typeof length === 'number') ? true ? invariant(false, 'toArray: Object needs a length property') : undefined : void 0;\n !(length === 0 || length - 1 in obj) ? true ? invariant(false, 'toArray: Object should have keys for indices') : undefined : void 0;\n !(typeof obj.callee !== 'function') ? true ? invariant(false, 'toArray: Object can\\'t be `arguments`. Use rest params ' + '(function(...args) {}) or Array.from() instead.') : undefined : void 0; // Old IE doesn't give collections access to hasOwnProperty. Assume inputs\n // without method will throw during the slice call and skip straight to the\n // fallback.\n\n if (obj.hasOwnProperty) {\n try {\n return Array.prototype.slice.call(obj);\n } catch (e) {// IE < 9 does not support Array#slice on collections objects\n }\n } // Fall back to copying key by key. This assumes all keys have a value,\n // so will not preserve sparsely populated inputs.\n\n\n var ret = Array(length);\n\n for (var ii = 0; ii < length; ii++) {\n ret[ii] = obj[ii];\n }\n\n return ret;\n}\n/**\n * Perform a heuristic test to determine if an object is \"array-like\".\n *\n * A monk asked Joshu, a Zen master, \"Has a dog Buddha nature?\"\n * Joshu replied: \"Mu.\"\n *\n * This function determines if its argument has \"array nature\": it returns\n * true if the argument is an actual array, an `arguments' object, or an\n * HTMLCollection (e.g. node.childNodes or node.getElementsByTagName()).\n *\n * It will return false for other array-like objects like Filelist.\n *\n * @param {*} obj\n * @return {boolean}\n */\n\n\nfunction hasArrayNature(obj) {\n return (// not null/false\n !!obj && ( // arrays are objects, NodeLists are functions in Safari\n typeof obj == 'object' || typeof obj == 'function') && // quacks like an array\n 'length' in obj && // not window\n !('setInterval' in obj) && // no DOM node should be considered an array-like\n // a 'select' element has 'length' and 'item' properties on IE8\n typeof obj.nodeType != 'number' && ( // a real array\n Array.isArray(obj) || // arguments\n 'callee' in obj || // HTMLCollection/NodeList\n 'item' in obj)\n );\n}\n/**\n * Ensure that the argument is an array by wrapping it in an array if it is not.\n * Creates a copy of the argument if it is already an array.\n *\n * This is mostly useful idiomatically:\n *\n * var createArrayFromMixed = require('createArrayFromMixed');\n *\n * function takesOneOrMoreThings(things) {\n * things = createArrayFromMixed(things);\n * ...\n * }\n *\n * This allows you to treat `things' as an array, but accept scalars in the API.\n *\n * If you need to convert an array-like object, like `arguments`, into an array\n * use toArray instead.\n *\n * @param {*} obj\n * @return {array}\n */\n\n\nfunction createArrayFromMixed(obj) {\n if (!hasArrayNature(obj)) {\n return [obj];\n } else if (Array.isArray(obj)) {\n return obj.slice();\n } else {\n return toArray(obj);\n }\n}\n\nmodule.exports = createArrayFromMixed;\n\n//# sourceURL=webpack:///./node_modules/draft-js/node_modules/fbjs/lib/createArrayFromMixed.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/node_modules/fbjs/lib/cx.js": +/*!***********************************************************!*\ + !*** ./node_modules/draft-js/node_modules/fbjs/lib/cx.js ***! + \***********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n/**\n * This function is used to mark string literals representing CSS class names\n * so that they can be transformed statically. This allows for modularization\n * and minification of CSS class names.\n *\n * In static_upstream, this function is actually implemented, but it should\n * eventually be replaced with something more descriptive, and the transform\n * that is used in the main stack should be ported for use elsewhere.\n *\n * @param string|object className to modularize, or an object of key/values.\n * In the object case, the values are conditions that\n * determine if the className keys should be included.\n * @param [string ...] Variable list of classNames in the string case.\n * @return string Renderable space-separated CSS className.\n */\nfunction cx(classNames) {\n if (typeof classNames == 'object') {\n return Object.keys(classNames).filter(function (className) {\n return classNames[className];\n }).map(replace).join(' ');\n }\n\n return Array.prototype.map.call(arguments, replace).join(' ');\n}\n\nfunction replace(str) {\n return str.replace(/\\//g, '-');\n}\n\nmodule.exports = cx;\n\n//# sourceURL=webpack:///./node_modules/draft-js/node_modules/fbjs/lib/cx.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/node_modules/fbjs/lib/emptyFunction.js": +/*!**********************************************************************!*\ + !*** ./node_modules/draft-js/node_modules/fbjs/lib/emptyFunction.js ***! + \**********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nfunction makeEmptyFunction(arg) {\n return function () {\n return arg;\n };\n}\n/**\n * This function accepts and discards inputs; it has no side effects. This is\n * primarily useful idiomatically for overridable function endpoints which\n * always need to be callable, since JS lacks a null-call idiom ala Cocoa.\n */\n\n\nvar emptyFunction = function emptyFunction() {};\n\nemptyFunction.thatReturns = makeEmptyFunction;\nemptyFunction.thatReturnsFalse = makeEmptyFunction(false);\nemptyFunction.thatReturnsTrue = makeEmptyFunction(true);\nemptyFunction.thatReturnsNull = makeEmptyFunction(null);\n\nemptyFunction.thatReturnsThis = function () {\n return this;\n};\n\nemptyFunction.thatReturnsArgument = function (arg) {\n return arg;\n};\n\nmodule.exports = emptyFunction;\n\n//# sourceURL=webpack:///./node_modules/draft-js/node_modules/fbjs/lib/emptyFunction.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/node_modules/fbjs/lib/getActiveElement.js": +/*!*************************************************************************!*\ + !*** ./node_modules/draft-js/node_modules/fbjs/lib/getActiveElement.js ***! + \*************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @typechecks\n */\n\n/* eslint-disable fb-www/typeof-undefined */\n\n/**\n * Same as document.activeElement but wraps in a try-catch block. In IE it is\n * not safe to call document.activeElement if there is nothing focused.\n *\n * The activeElement will be null only if the document or document body is not\n * yet defined.\n *\n * @param {?DOMDocument} doc Defaults to current document.\n * @return {?DOMElement}\n */\nfunction getActiveElement(doc)\n/*?DOMElement*/\n{\n doc = doc || (typeof document !== 'undefined' ? document : undefined);\n\n if (typeof doc === 'undefined') {\n return null;\n }\n\n try {\n return doc.activeElement || doc.body;\n } catch (e) {\n return doc.body;\n }\n}\n\nmodule.exports = getActiveElement;\n\n//# sourceURL=webpack:///./node_modules/draft-js/node_modules/fbjs/lib/getActiveElement.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/node_modules/fbjs/lib/getDocumentScrollElement.js": +/*!*********************************************************************************!*\ + !*** ./node_modules/draft-js/node_modules/fbjs/lib/getDocumentScrollElement.js ***! + \*********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @typechecks\n */\n\n\nvar isWebkit = typeof navigator !== 'undefined' && navigator.userAgent.indexOf('AppleWebKit') > -1;\n/**\n * Gets the element with the document scroll properties such as `scrollLeft` and\n * `scrollHeight`. This may differ across different browsers.\n *\n * NOTE: The return value can be null if the DOM is not yet ready.\n *\n * @param {?DOMDocument} doc Defaults to current document.\n * @return {?DOMElement}\n */\n\nfunction getDocumentScrollElement(doc) {\n doc = doc || document;\n\n if (doc.scrollingElement) {\n return doc.scrollingElement;\n }\n\n return !isWebkit && doc.compatMode === 'CSS1Compat' ? doc.documentElement : doc.body;\n}\n\nmodule.exports = getDocumentScrollElement;\n\n//# sourceURL=webpack:///./node_modules/draft-js/node_modules/fbjs/lib/getDocumentScrollElement.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/node_modules/fbjs/lib/getElementPosition.js": +/*!***************************************************************************!*\ + !*** ./node_modules/draft-js/node_modules/fbjs/lib/getElementPosition.js ***! + \***************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @typechecks\n */\nvar getElementRect = __webpack_require__(/*! ./getElementRect */ \"./node_modules/draft-js/node_modules/fbjs/lib/getElementRect.js\");\n/**\n * Gets an element's position in pixels relative to the viewport. The returned\n * object represents the position of the element's top left corner.\n *\n * @param {DOMElement} element\n * @return {object}\n */\n\n\nfunction getElementPosition(element) {\n var rect = getElementRect(element);\n return {\n x: rect.left,\n y: rect.top,\n width: rect.right - rect.left,\n height: rect.bottom - rect.top\n };\n}\n\nmodule.exports = getElementPosition;\n\n//# sourceURL=webpack:///./node_modules/draft-js/node_modules/fbjs/lib/getElementPosition.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/node_modules/fbjs/lib/getElementRect.js": +/*!***********************************************************************!*\ + !*** ./node_modules/draft-js/node_modules/fbjs/lib/getElementRect.js ***! + \***********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @typechecks\n */\nvar containsNode = __webpack_require__(/*! ./containsNode */ \"./node_modules/draft-js/node_modules/fbjs/lib/containsNode.js\");\n/**\n * Gets an element's bounding rect in pixels relative to the viewport.\n *\n * @param {DOMElement} elem\n * @return {object}\n */\n\n\nfunction getElementRect(elem) {\n var docElem = elem.ownerDocument.documentElement; // FF 2, Safari 3 and Opera 9.5- do not support getBoundingClientRect().\n // IE9- will throw if the element is not in the document.\n\n if (!('getBoundingClientRect' in elem) || !containsNode(docElem, elem)) {\n return {\n left: 0,\n right: 0,\n top: 0,\n bottom: 0\n };\n } // Subtracts clientTop/Left because IE8- added a 2px border to the\n // element (see http://fburl.com/1493213). IE 7 in\n // Quicksmode does not report clientLeft/clientTop so there\n // will be an unaccounted offset of 2px when in quirksmode\n\n\n var rect = elem.getBoundingClientRect();\n return {\n left: Math.round(rect.left) - docElem.clientLeft,\n right: Math.round(rect.right) - docElem.clientLeft,\n top: Math.round(rect.top) - docElem.clientTop,\n bottom: Math.round(rect.bottom) - docElem.clientTop\n };\n}\n\nmodule.exports = getElementRect;\n\n//# sourceURL=webpack:///./node_modules/draft-js/node_modules/fbjs/lib/getElementRect.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/node_modules/fbjs/lib/getScrollPosition.js": +/*!**************************************************************************!*\ + !*** ./node_modules/draft-js/node_modules/fbjs/lib/getScrollPosition.js ***! + \**************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @typechecks\n */\n\n\nvar getDocumentScrollElement = __webpack_require__(/*! ./getDocumentScrollElement */ \"./node_modules/draft-js/node_modules/fbjs/lib/getDocumentScrollElement.js\");\n\nvar getUnboundedScrollPosition = __webpack_require__(/*! ./getUnboundedScrollPosition */ \"./node_modules/draft-js/node_modules/fbjs/lib/getUnboundedScrollPosition.js\");\n/**\n * Gets the scroll position of the supplied element or window.\n *\n * The return values are bounded. This means that if the scroll position is\n * negative or exceeds the element boundaries (which is possible using inertial\n * scrolling), you will get zero or the maximum scroll position, respectively.\n *\n * If you need the unbound scroll position, use `getUnboundedScrollPosition`.\n *\n * @param {DOMWindow|DOMElement} scrollable\n * @return {object} Map with `x` and `y` keys.\n */\n\n\nfunction getScrollPosition(scrollable) {\n var documentScrollElement = getDocumentScrollElement(scrollable.ownerDocument || scrollable.document);\n\n if (scrollable.Window && scrollable instanceof scrollable.Window) {\n scrollable = documentScrollElement;\n }\n\n var scrollPosition = getUnboundedScrollPosition(scrollable);\n var viewport = scrollable === documentScrollElement ? scrollable.ownerDocument.documentElement : scrollable;\n var xMax = scrollable.scrollWidth - viewport.clientWidth;\n var yMax = scrollable.scrollHeight - viewport.clientHeight;\n scrollPosition.x = Math.max(0, Math.min(scrollPosition.x, xMax));\n scrollPosition.y = Math.max(0, Math.min(scrollPosition.y, yMax));\n return scrollPosition;\n}\n\nmodule.exports = getScrollPosition;\n\n//# sourceURL=webpack:///./node_modules/draft-js/node_modules/fbjs/lib/getScrollPosition.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/node_modules/fbjs/lib/getStyleProperty.js": +/*!*************************************************************************!*\ + !*** ./node_modules/draft-js/node_modules/fbjs/lib/getStyleProperty.js ***! + \*************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @typechecks\n */\nvar camelize = __webpack_require__(/*! ./camelize */ \"./node_modules/draft-js/node_modules/fbjs/lib/camelize.js\");\n\nvar hyphenate = __webpack_require__(/*! ./hyphenate */ \"./node_modules/draft-js/node_modules/fbjs/lib/hyphenate.js\");\n\nfunction asString(value)\n/*?string*/\n{\n return value == null ? value : String(value);\n}\n\nfunction getStyleProperty(\n/*DOMNode*/\nnode,\n/*string*/\nname)\n/*?string*/\n{\n var computedStyle; // W3C Standard\n\n if (window.getComputedStyle) {\n // In certain cases such as within an iframe in FF3, this returns null.\n computedStyle = window.getComputedStyle(node, null);\n\n if (computedStyle) {\n return asString(computedStyle.getPropertyValue(hyphenate(name)));\n }\n } // Safari\n\n\n if (document.defaultView && document.defaultView.getComputedStyle) {\n computedStyle = document.defaultView.getComputedStyle(node, null); // A Safari bug causes this to return null for `display: none` elements.\n\n if (computedStyle) {\n return asString(computedStyle.getPropertyValue(hyphenate(name)));\n }\n\n if (name === 'display') {\n return 'none';\n }\n } // Internet Explorer\n\n\n if (node.currentStyle) {\n if (name === 'float') {\n return asString(node.currentStyle.cssFloat || node.currentStyle.styleFloat);\n }\n\n return asString(node.currentStyle[camelize(name)]);\n }\n\n return asString(node.style && node.style[camelize(name)]);\n}\n\nmodule.exports = getStyleProperty;\n\n//# sourceURL=webpack:///./node_modules/draft-js/node_modules/fbjs/lib/getStyleProperty.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/node_modules/fbjs/lib/getUnboundedScrollPosition.js": +/*!***********************************************************************************!*\ + !*** ./node_modules/draft-js/node_modules/fbjs/lib/getUnboundedScrollPosition.js ***! + \***********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @typechecks\n */\n\n/**\n * Gets the scroll position of the supplied element or window.\n *\n * The return values are unbounded, unlike `getScrollPosition`. This means they\n * may be negative or exceed the element boundaries (which is possible using\n * inertial scrolling).\n *\n * @param {DOMWindow|DOMElement} scrollable\n * @return {object} Map with `x` and `y` keys.\n */\n\nfunction getUnboundedScrollPosition(scrollable) {\n if (scrollable.Window && scrollable instanceof scrollable.Window) {\n return {\n x: scrollable.pageXOffset || scrollable.document.documentElement.scrollLeft,\n y: scrollable.pageYOffset || scrollable.document.documentElement.scrollTop\n };\n }\n\n return {\n x: scrollable.scrollLeft,\n y: scrollable.scrollTop\n };\n}\n\nmodule.exports = getUnboundedScrollPosition;\n\n//# sourceURL=webpack:///./node_modules/draft-js/node_modules/fbjs/lib/getUnboundedScrollPosition.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/node_modules/fbjs/lib/getViewportDimensions.js": +/*!******************************************************************************!*\ + !*** ./node_modules/draft-js/node_modules/fbjs/lib/getViewportDimensions.js ***! + \******************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @typechecks\n */\nfunction getViewportWidth() {\n var width;\n\n if (document.documentElement) {\n width = document.documentElement.clientWidth;\n }\n\n if (!width && document.body) {\n width = document.body.clientWidth;\n }\n\n return width || 0;\n}\n\nfunction getViewportHeight() {\n var height;\n\n if (document.documentElement) {\n height = document.documentElement.clientHeight;\n }\n\n if (!height && document.body) {\n height = document.body.clientHeight;\n }\n\n return height || 0;\n}\n/**\n * Gets the viewport dimensions including any scrollbars.\n */\n\n\nfunction getViewportDimensions() {\n return {\n width: window.innerWidth || getViewportWidth(),\n height: window.innerHeight || getViewportHeight()\n };\n}\n/**\n * Gets the viewport dimensions excluding any scrollbars.\n */\n\n\ngetViewportDimensions.withoutScrollbars = function () {\n return {\n width: getViewportWidth(),\n height: getViewportHeight()\n };\n};\n\nmodule.exports = getViewportDimensions;\n\n//# sourceURL=webpack:///./node_modules/draft-js/node_modules/fbjs/lib/getViewportDimensions.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/node_modules/fbjs/lib/hyphenate.js": +/*!******************************************************************!*\ + !*** ./node_modules/draft-js/node_modules/fbjs/lib/hyphenate.js ***! + \******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @typechecks\n */\nvar _uppercasePattern = /([A-Z])/g;\n/**\n * Hyphenates a camelcased string, for example:\n *\n * > hyphenate('backgroundColor')\n * < \"background-color\"\n *\n * For CSS style names, use `hyphenateStyleName` instead which works properly\n * with all vendor prefixes, including `ms`.\n *\n * @param {string} string\n * @return {string}\n */\n\nfunction hyphenate(string) {\n return string.replace(_uppercasePattern, '-$1').toLowerCase();\n}\n\nmodule.exports = hyphenate;\n\n//# sourceURL=webpack:///./node_modules/draft-js/node_modules/fbjs/lib/hyphenate.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/node_modules/fbjs/lib/invariant.js": +/*!******************************************************************!*\ + !*** ./node_modules/draft-js/node_modules/fbjs/lib/invariant.js ***! + \******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\n\n\nvar validateFormat = true ? function (format) {} : undefined;\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments to provide\n * information about what broke and what you were expecting.\n *\n * The invariant message will be stripped in production, but the invariant will\n * remain to ensure logic does not differ in production.\n */\n\nfunction invariant(condition, format) {\n for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n args[_key - 2] = arguments[_key];\n }\n\n validateFormat(format);\n\n if (!condition) {\n var error;\n\n if (format === undefined) {\n error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');\n } else {\n var argIndex = 0;\n error = new Error(format.replace(/%s/g, function () {\n return String(args[argIndex++]);\n }));\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // Skip invariant's own stack frame.\n\n throw error;\n }\n}\n\nmodule.exports = invariant;\n\n//# sourceURL=webpack:///./node_modules/draft-js/node_modules/fbjs/lib/invariant.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/node_modules/fbjs/lib/isNode.js": +/*!***************************************************************!*\ + !*** ./node_modules/draft-js/node_modules/fbjs/lib/isNode.js ***! + \***************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @typechecks\n */\n\n/**\n * @param {*} object The object to check.\n * @return {boolean} Whether or not the object is a DOM node.\n */\nfunction isNode(object) {\n var doc = object ? object.ownerDocument || object : document;\n var defaultView = doc.defaultView || window;\n return !!(object && (typeof defaultView.Node === 'function' ? object instanceof defaultView.Node : typeof object === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string'));\n}\n\nmodule.exports = isNode;\n\n//# sourceURL=webpack:///./node_modules/draft-js/node_modules/fbjs/lib/isNode.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/node_modules/fbjs/lib/isTextNode.js": +/*!*******************************************************************!*\ + !*** ./node_modules/draft-js/node_modules/fbjs/lib/isTextNode.js ***! + \*******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @typechecks\n */\nvar isNode = __webpack_require__(/*! ./isNode */ \"./node_modules/draft-js/node_modules/fbjs/lib/isNode.js\");\n/**\n * @param {*} object The object to check.\n * @return {boolean} Whether or not the object is a DOM text node.\n */\n\n\nfunction isTextNode(object) {\n return isNode(object) && object.nodeType == 3;\n}\n\nmodule.exports = isTextNode;\n\n//# sourceURL=webpack:///./node_modules/draft-js/node_modules/fbjs/lib/isTextNode.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/node_modules/fbjs/lib/joinClasses.js": +/*!********************************************************************!*\ + !*** ./node_modules/draft-js/node_modules/fbjs/lib/joinClasses.js ***! + \********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @typechecks static-only\n */\n\n/**\n * Combines multiple className strings into one.\n */\n\nfunction joinClasses(className) {\n var newClassName = className || '';\n var argLength = arguments.length;\n\n if (argLength > 1) {\n for (var index = 1; index < argLength; index++) {\n var nextClass = arguments[index];\n\n if (nextClass) {\n newClassName = (newClassName ? newClassName + ' ' : '') + nextClass;\n }\n }\n }\n\n return newClassName;\n}\n\nmodule.exports = joinClasses;\n\n//# sourceURL=webpack:///./node_modules/draft-js/node_modules/fbjs/lib/joinClasses.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/node_modules/fbjs/lib/mapObject.js": +/*!******************************************************************!*\ + !*** ./node_modules/draft-js/node_modules/fbjs/lib/mapObject.js ***! + \******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n/**\n * Executes the provided `callback` once for each enumerable own property in the\n * object and constructs a new object from the results. The `callback` is\n * invoked with three arguments:\n *\n * - the property value\n * - the property name\n * - the object being traversed\n *\n * Properties that are added after the call to `mapObject` will not be visited\n * by `callback`. If the values of existing properties are changed, the value\n * passed to `callback` will be the value at the time `mapObject` visits them.\n * Properties that are deleted before being visited are not visited.\n *\n * @grep function objectMap()\n * @grep function objMap()\n *\n * @param {?object} object\n * @param {function} callback\n * @param {*} context\n * @return {?object}\n */\n\nfunction mapObject(object, callback, context) {\n if (!object) {\n return null;\n }\n\n var result = {};\n\n for (var name in object) {\n if (hasOwnProperty.call(object, name)) {\n result[name] = callback.call(context, object[name], name, object);\n }\n }\n\n return result;\n}\n\nmodule.exports = mapObject;\n\n//# sourceURL=webpack:///./node_modules/draft-js/node_modules/fbjs/lib/mapObject.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/node_modules/fbjs/lib/memoizeStringOnly.js": +/*!**************************************************************************!*\ + !*** ./node_modules/draft-js/node_modules/fbjs/lib/memoizeStringOnly.js ***! + \**************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @typechecks static-only\n */\n\n/**\n * Memoizes the return value of a function that accepts one string argument.\n */\n\nfunction memoizeStringOnly(callback) {\n var cache = {};\n return function (string) {\n if (!cache.hasOwnProperty(string)) {\n cache[string] = callback.call(this, string);\n }\n\n return cache[string];\n };\n}\n\nmodule.exports = memoizeStringOnly;\n\n//# sourceURL=webpack:///./node_modules/draft-js/node_modules/fbjs/lib/memoizeStringOnly.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/node_modules/fbjs/lib/nullthrows.js": +/*!*******************************************************************!*\ + !*** ./node_modules/draft-js/node_modules/fbjs/lib/nullthrows.js ***! + \*******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nvar nullthrows = function nullthrows(x) {\n if (x != null) {\n return x;\n }\n\n throw new Error(\"Got unexpected null or undefined\");\n};\n\nmodule.exports = nullthrows;\n\n//# sourceURL=webpack:///./node_modules/draft-js/node_modules/fbjs/lib/nullthrows.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/node_modules/fbjs/lib/setImmediate.js": +/*!*********************************************************************!*\ + !*** ./node_modules/draft-js/node_modules/fbjs/lib/setImmediate.js ***! + \*********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/* WEBPACK VAR INJECTION */(function(global) {/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n // setimmediate adds setImmediate to the global. We want to make sure we export\n// the actual function.\n\n__webpack_require__(/*! setimmediate */ \"./node_modules/setimmediate/setImmediate.js\");\n\nmodule.exports = global.setImmediate;\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack:///./node_modules/draft-js/node_modules/fbjs/lib/setImmediate.js?"); + +/***/ }), + +/***/ "./node_modules/draft-js/node_modules/fbjs/lib/warning.js": +/*!****************************************************************!*\ + !*** ./node_modules/draft-js/node_modules/fbjs/lib/warning.js ***! + \****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n\nvar emptyFunction = __webpack_require__(/*! ./emptyFunction */ \"./node_modules/draft-js/node_modules/fbjs/lib/emptyFunction.js\");\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\n\nfunction printWarning(format) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var argIndex = 0;\n var message = 'Warning: ' + format.replace(/%s/g, function () {\n return args[argIndex++];\n });\n\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n}\n\nvar warning = true ? function (condition, format) {\n if (format === undefined) {\n throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');\n }\n\n if (!condition) {\n for (var _len2 = arguments.length, args = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {\n args[_key2 - 2] = arguments[_key2];\n }\n\n printWarning.apply(void 0, [format].concat(args));\n }\n} : undefined;\nmodule.exports = warning;\n\n//# sourceURL=webpack:///./node_modules/draft-js/node_modules/fbjs/lib/warning.js?"); + +/***/ }), + +/***/ "./node_modules/draftjs-to-html/lib/draftjs-to-html.js": +/*!*************************************************************!*\ + !*** ./node_modules/draftjs-to-html/lib/draftjs-to-html.js ***! + \*************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("(function (global, factory) {\n true ? module.exports = factory() :\n undefined;\n}(this, (function () { 'use strict';\n\n /**\n * Utility function to execute callback for eack key->value pair.\n */\n function forEach(obj, callback) {\n if (obj) {\n for (var key in obj) {\n // eslint-disable-line no-restricted-syntax\n if ({}.hasOwnProperty.call(obj, key)) {\n callback(key, obj[key]);\n }\n }\n }\n }\n /**\n * The function returns true if the string passed to it has no content.\n */\n\n function isEmptyString(str) {\n if (str === undefined || str === null || str.length === 0 || str.trim().length === 0) {\n return true;\n }\n\n return false;\n }\n\n /**\n * Mapping block-type to corresponding html tag.\n */\n\n var blockTypesMapping = {\n unstyled: 'p',\n 'header-one': 'h1',\n 'header-two': 'h2',\n 'header-three': 'h3',\n 'header-four': 'h4',\n 'header-five': 'h5',\n 'header-six': 'h6',\n 'unordered-list-item': 'ul',\n 'ordered-list-item': 'ol',\n blockquote: 'blockquote',\n code: 'pre'\n };\n /**\n * Function will return HTML tag for a block.\n */\n\n function getBlockTag(type) {\n return type && blockTypesMapping[type];\n }\n /**\n * Function will return style string for a block.\n */\n\n function getBlockStyle(data) {\n var styles = '';\n forEach(data, function (key, value) {\n if (value) {\n styles += \"\".concat(key, \":\").concat(value, \";\");\n }\n });\n return styles;\n }\n /**\n * The function returns an array of hashtag-sections in blocks.\n * These will be areas in block which have hashtags applicable to them.\n */\n\n function getHashtagRanges(blockText, hashtagConfig) {\n var sections = [];\n\n if (hashtagConfig) {\n var counter = 0;\n var startIndex = 0;\n var text = blockText;\n var trigger = hashtagConfig.trigger || '#';\n var separator = hashtagConfig.separator || ' ';\n\n for (; text.length > 0 && startIndex >= 0;) {\n if (text[0] === trigger) {\n startIndex = 0;\n counter = 0;\n text = text.substr(trigger.length);\n } else {\n startIndex = text.indexOf(separator + trigger);\n\n if (startIndex >= 0) {\n text = text.substr(startIndex + (separator + trigger).length);\n counter += startIndex + separator.length;\n }\n }\n\n if (startIndex >= 0) {\n var endIndex = text.indexOf(separator) >= 0 ? text.indexOf(separator) : text.length;\n var hashtag = text.substr(0, endIndex);\n\n if (hashtag && hashtag.length > 0) {\n sections.push({\n offset: counter,\n length: hashtag.length + trigger.length,\n type: 'HASHTAG'\n });\n }\n\n counter += trigger.length;\n }\n }\n }\n\n return sections;\n }\n /**\n * The function returns an array of entity-sections in blocks.\n * These will be areas in block which have same entity or no entity applicable to them.\n */\n\n\n function getSections(block, hashtagConfig) {\n var sections = [];\n var lastOffset = 0;\n var sectionRanges = block.entityRanges.map(function (range) {\n var offset = range.offset,\n length = range.length,\n key = range.key;\n return {\n offset: offset,\n length: length,\n key: key,\n type: 'ENTITY'\n };\n });\n sectionRanges = sectionRanges.concat(getHashtagRanges(block.text, hashtagConfig));\n sectionRanges = sectionRanges.sort(function (s1, s2) {\n return s1.offset - s2.offset;\n });\n sectionRanges.forEach(function (r) {\n if (r.offset > lastOffset) {\n sections.push({\n start: lastOffset,\n end: r.offset\n });\n }\n\n sections.push({\n start: r.offset,\n end: r.offset + r.length,\n entityKey: r.key,\n type: r.type\n });\n lastOffset = r.offset + r.length;\n });\n\n if (lastOffset < block.text.length) {\n sections.push({\n start: lastOffset,\n end: block.text.length\n });\n }\n\n return sections;\n }\n /**\n * Function to check if the block is an atomic entity block.\n */\n\n\n function isAtomicEntityBlock(block) {\n if (block.entityRanges.length > 0 && (isEmptyString(block.text) || block.type === 'atomic')) {\n return true;\n }\n\n return false;\n }\n /**\n * The function will return array of inline styles applicable to the block.\n */\n\n\n function getStyleArrayForBlock(block) {\n var text = block.text,\n inlineStyleRanges = block.inlineStyleRanges;\n var inlineStyles = {\n BOLD: new Array(text.length),\n ITALIC: new Array(text.length),\n UNDERLINE: new Array(text.length),\n STRIKETHROUGH: new Array(text.length),\n CODE: new Array(text.length),\n SUPERSCRIPT: new Array(text.length),\n SUBSCRIPT: new Array(text.length),\n COLOR: new Array(text.length),\n BGCOLOR: new Array(text.length),\n FONTSIZE: new Array(text.length),\n FONTFAMILY: new Array(text.length),\n length: text.length\n };\n\n if (inlineStyleRanges && inlineStyleRanges.length > 0) {\n inlineStyleRanges.forEach(function (range) {\n var offset = range.offset;\n var length = offset + range.length;\n\n for (var i = offset; i < length; i += 1) {\n if (range.style.indexOf('color-') === 0) {\n inlineStyles.COLOR[i] = range.style.substring(6);\n } else if (range.style.indexOf('bgcolor-') === 0) {\n inlineStyles.BGCOLOR[i] = range.style.substring(8);\n } else if (range.style.indexOf('fontsize-') === 0) {\n inlineStyles.FONTSIZE[i] = range.style.substring(9);\n } else if (range.style.indexOf('fontfamily-') === 0) {\n inlineStyles.FONTFAMILY[i] = range.style.substring(11);\n } else if (inlineStyles[range.style]) {\n inlineStyles[range.style][i] = true;\n }\n }\n });\n }\n\n return inlineStyles;\n }\n /**\n * The function will return inline style applicable at some offset within a block.\n */\n\n\n function getStylesAtOffset(inlineStyles, offset) {\n var styles = {};\n\n if (inlineStyles.COLOR[offset]) {\n styles.COLOR = inlineStyles.COLOR[offset];\n }\n\n if (inlineStyles.BGCOLOR[offset]) {\n styles.BGCOLOR = inlineStyles.BGCOLOR[offset];\n }\n\n if (inlineStyles.FONTSIZE[offset]) {\n styles.FONTSIZE = inlineStyles.FONTSIZE[offset];\n }\n\n if (inlineStyles.FONTFAMILY[offset]) {\n styles.FONTFAMILY = inlineStyles.FONTFAMILY[offset];\n }\n\n if (inlineStyles.UNDERLINE[offset]) {\n styles.UNDERLINE = true;\n }\n\n if (inlineStyles.ITALIC[offset]) {\n styles.ITALIC = true;\n }\n\n if (inlineStyles.BOLD[offset]) {\n styles.BOLD = true;\n }\n\n if (inlineStyles.STRIKETHROUGH[offset]) {\n styles.STRIKETHROUGH = true;\n }\n\n if (inlineStyles.CODE[offset]) {\n styles.CODE = true;\n }\n\n if (inlineStyles.SUBSCRIPT[offset]) {\n styles.SUBSCRIPT = true;\n }\n\n if (inlineStyles.SUPERSCRIPT[offset]) {\n styles.SUPERSCRIPT = true;\n }\n\n return styles;\n }\n /**\n * Function returns true for a set of styles if the value of these styles at an offset\n * are same as that on the previous offset.\n */\n\n function sameStyleAsPrevious(inlineStyles, styles, index) {\n var sameStyled = true;\n\n if (index > 0 && index < inlineStyles.length) {\n styles.forEach(function (style) {\n sameStyled = sameStyled && inlineStyles[style][index] === inlineStyles[style][index - 1];\n });\n } else {\n sameStyled = false;\n }\n\n return sameStyled;\n }\n /**\n * Function returns html for text depending on inline style tags applicable to it.\n */\n\n function addInlineStyleMarkup(style, content) {\n if (style === 'BOLD') {\n return \"\".concat(content, \"\");\n }\n\n if (style === 'ITALIC') {\n return \"\".concat(content, \"\");\n }\n\n if (style === 'UNDERLINE') {\n return \"\".concat(content, \"\");\n }\n\n if (style === 'STRIKETHROUGH') {\n return \"\".concat(content, \"\");\n }\n\n if (style === 'CODE') {\n return \"\".concat(content, \"\");\n }\n\n if (style === 'SUPERSCRIPT') {\n return \"\".concat(content, \"\");\n }\n\n if (style === 'SUBSCRIPT') {\n return \"\".concat(content, \"\");\n }\n\n return content;\n }\n /**\n * The function returns text for given section of block after doing required character replacements.\n */\n\n function getSectionText(text) {\n if (text && text.length > 0) {\n var chars = text.map(function (ch) {\n switch (ch) {\n case '\\n':\n return '
';\n\n case '&':\n return '&';\n\n case '<':\n return '<';\n\n case '>':\n return '>';\n\n default:\n return ch;\n }\n });\n return chars.join('');\n }\n\n return '';\n }\n /**\n * Function returns html for text depending on inline style tags applicable to it.\n */\n\n\n function addStylePropertyMarkup(styles, text) {\n if (styles && (styles.COLOR || styles.BGCOLOR || styles.FONTSIZE || styles.FONTFAMILY)) {\n var styleString = 'style=\"';\n\n if (styles.COLOR) {\n styleString += \"color: \".concat(styles.COLOR, \";\");\n }\n\n if (styles.BGCOLOR) {\n styleString += \"background-color: \".concat(styles.BGCOLOR, \";\");\n }\n\n if (styles.FONTSIZE) {\n styleString += \"font-size: \".concat(styles.FONTSIZE).concat(/^\\d+$/.test(styles.FONTSIZE) ? 'px' : '', \";\");\n }\n\n if (styles.FONTFAMILY) {\n styleString += \"font-family: \".concat(styles.FONTFAMILY, \";\");\n }\n\n styleString += '\"';\n return \"\").concat(text, \"\");\n }\n\n return text;\n }\n /**\n * Function will return markup for Entity.\n */\n\n function getEntityMarkup(entityMap, entityKey, text, customEntityTransform) {\n var entity = entityMap[entityKey];\n\n if (typeof customEntityTransform === 'function') {\n var html = customEntityTransform(entity, text);\n\n if (html) {\n return html;\n }\n }\n\n if (entity.type === 'MENTION') {\n return \"\").concat(text, \"\");\n }\n\n if (entity.type === 'LINK') {\n var targetOption = entity.data.targetOption || '_self';\n return \"\").concat(text, \"\");\n }\n\n if (entity.type === 'IMAGE') {\n var alignment = entity.data.alignment;\n\n if (alignment && alignment.length) {\n return \"
\\\"\").concat(entity.data.alt,
\");\n }\n\n return \"\\\"\").concat(entity.data.alt,\");\n }\n\n if (entity.type === 'EMBEDDED_LINK') {\n return \"\");\n }\n\n return text;\n }\n /**\n * For a given section in a block the function will return a further list of sections,\n * with similar inline styles applicable to them.\n */\n\n\n function getInlineStyleSections(block, styles, start, end) {\n var styleSections = [];\n var text = Array.from(block.text);\n\n if (text.length > 0) {\n var inlineStyles = getStyleArrayForBlock(block);\n var section;\n\n for (var i = start; i < end; i += 1) {\n if (i !== start && sameStyleAsPrevious(inlineStyles, styles, i)) {\n section.text.push(text[i]);\n section.end = i + 1;\n } else {\n section = {\n styles: getStylesAtOffset(inlineStyles, i),\n text: [text[i]],\n start: i,\n end: i + 1\n };\n styleSections.push(section);\n }\n }\n }\n\n return styleSections;\n }\n /**\n * Replace leading blank spaces by  \n */\n\n\n function trimLeadingZeros(sectionText) {\n if (sectionText) {\n var replacedText = sectionText;\n\n for (var i = 0; i < replacedText.length; i += 1) {\n if (sectionText[i] === ' ') {\n replacedText = replacedText.replace(' ', ' ');\n } else {\n break;\n }\n }\n\n return replacedText;\n }\n\n return sectionText;\n }\n /**\n * Replace trailing blank spaces by  \n */\n\n function trimTrailingZeros(sectionText) {\n if (sectionText) {\n var replacedText = sectionText;\n\n for (var i = replacedText.length - 1; i >= 0; i -= 1) {\n if (replacedText[i] === ' ') {\n replacedText = \"\".concat(replacedText.substring(0, i), \" \").concat(replacedText.substring(i + 1));\n } else {\n break;\n }\n }\n\n return replacedText;\n }\n\n return sectionText;\n }\n /**\n * The method returns markup for section to which inline styles\n * like BOLD, ITALIC, UNDERLINE, STRIKETHROUGH, CODE, SUPERSCRIPT, SUBSCRIPT are applicable.\n */\n\n function getStyleTagSectionMarkup(styleSection) {\n var styles = styleSection.styles,\n text = styleSection.text;\n var content = getSectionText(text);\n forEach(styles, function (style, value) {\n content = addInlineStyleMarkup(style, content);\n });\n return content;\n }\n /**\n * The method returns markup for section to which inline styles\n like color, background-color, font-size are applicable.\n */\n\n\n function getInlineStyleSectionMarkup(block, styleSection) {\n var styleTagSections = getInlineStyleSections(block, ['BOLD', 'ITALIC', 'UNDERLINE', 'STRIKETHROUGH', 'CODE', 'SUPERSCRIPT', 'SUBSCRIPT'], styleSection.start, styleSection.end);\n var styleSectionText = '';\n styleTagSections.forEach(function (stylePropertySection) {\n styleSectionText += getStyleTagSectionMarkup(stylePropertySection);\n });\n styleSectionText = addStylePropertyMarkup(styleSection.styles, styleSectionText);\n return styleSectionText;\n }\n /*\n * The method returns markup for an entity section.\n * An entity section is a continuous section in a block\n * to which same entity or no entity is applicable.\n */\n\n\n function getSectionMarkup(block, entityMap, section, customEntityTransform) {\n var entityInlineMarkup = [];\n var inlineStyleSections = getInlineStyleSections(block, ['COLOR', 'BGCOLOR', 'FONTSIZE', 'FONTFAMILY'], section.start, section.end);\n inlineStyleSections.forEach(function (styleSection) {\n entityInlineMarkup.push(getInlineStyleSectionMarkup(block, styleSection));\n });\n var sectionText = entityInlineMarkup.join('');\n\n if (section.type === 'ENTITY') {\n if (section.entityKey !== undefined && section.entityKey !== null) {\n sectionText = getEntityMarkup(entityMap, section.entityKey, sectionText, customEntityTransform); // eslint-disable-line max-len\n }\n } else if (section.type === 'HASHTAG') {\n sectionText = \"\").concat(sectionText, \"\");\n }\n\n return sectionText;\n }\n /**\n * Function will return the markup for block preserving the inline styles and\n * special characters like newlines or blank spaces.\n */\n\n\n function getBlockInnerMarkup(block, entityMap, hashtagConfig, customEntityTransform) {\n var blockMarkup = [];\n var sections = getSections(block, hashtagConfig);\n sections.forEach(function (section, index) {\n var sectionText = getSectionMarkup(block, entityMap, section, customEntityTransform);\n\n if (index === 0) {\n sectionText = trimLeadingZeros(sectionText);\n }\n\n if (index === sections.length - 1) {\n sectionText = trimTrailingZeros(sectionText);\n }\n\n blockMarkup.push(sectionText);\n });\n return blockMarkup.join('');\n }\n /**\n * Function will return html for the block.\n */\n\n function getBlockMarkup(block, entityMap, hashtagConfig, directional, customEntityTransform) {\n var blockHtml = [];\n\n if (isAtomicEntityBlock(block)) {\n blockHtml.push(getEntityMarkup(entityMap, block.entityRanges[0].key, undefined, customEntityTransform));\n } else {\n var blockTag = getBlockTag(block.type);\n\n if (blockTag) {\n blockHtml.push(\"<\".concat(blockTag));\n var blockStyle = getBlockStyle(block.data);\n\n if (blockStyle) {\n blockHtml.push(\" style=\\\"\".concat(blockStyle, \"\\\"\"));\n }\n\n if (directional) {\n blockHtml.push(' dir = \"auto\"');\n }\n\n blockHtml.push('>');\n blockHtml.push(getBlockInnerMarkup(block, entityMap, hashtagConfig, customEntityTransform));\n blockHtml.push(\"\"));\n }\n }\n\n blockHtml.push('\\n');\n return blockHtml.join('');\n }\n\n /**\n * Function to check if a block is of type list.\n */\n\n function isList(blockType) {\n return blockType === 'unordered-list-item' || blockType === 'ordered-list-item';\n }\n /**\n * Function will return html markup for a list block.\n */\n\n function getListMarkup(listBlocks, entityMap, hashtagConfig, directional, customEntityTransform) {\n var listHtml = [];\n var nestedListBlock = [];\n var previousBlock;\n listBlocks.forEach(function (block) {\n var nestedBlock = false;\n\n if (!previousBlock) {\n listHtml.push(\"<\".concat(getBlockTag(block.type), \">\\n\"));\n } else if (previousBlock.type !== block.type) {\n listHtml.push(\"\\n\"));\n listHtml.push(\"<\".concat(getBlockTag(block.type), \">\\n\"));\n } else if (previousBlock.depth === block.depth) {\n if (nestedListBlock && nestedListBlock.length > 0) {\n listHtml.push(getListMarkup(nestedListBlock, entityMap, hashtagConfig, directional, customEntityTransform));\n nestedListBlock = [];\n }\n } else {\n nestedBlock = true;\n nestedListBlock.push(block);\n }\n\n if (!nestedBlock) {\n listHtml.push('');\n listHtml.push(getBlockInnerMarkup(block, entityMap, hashtagConfig, customEntityTransform));\n listHtml.push('\\n');\n previousBlock = block;\n }\n });\n\n if (nestedListBlock && nestedListBlock.length > 0) {\n listHtml.push(getListMarkup(nestedListBlock, entityMap, hashtagConfig, directional, customEntityTransform));\n }\n\n listHtml.push(\"\\n\"));\n return listHtml.join('');\n }\n\n /**\n * The function will generate html markup for given draftjs editorContent.\n */\n\n function draftToHtml(editorContent, hashtagConfig, directional, customEntityTransform) {\n var html = [];\n\n if (editorContent) {\n var blocks = editorContent.blocks,\n entityMap = editorContent.entityMap;\n\n if (blocks && blocks.length > 0) {\n var listBlocks = [];\n blocks.forEach(function (block) {\n if (isList(block.type)) {\n listBlocks.push(block);\n } else {\n if (listBlocks.length > 0) {\n var listHtml = getListMarkup(listBlocks, entityMap, hashtagConfig, customEntityTransform); // eslint-disable-line max-len\n\n html.push(listHtml);\n listBlocks = [];\n }\n\n var blockHtml = getBlockMarkup(block, entityMap, hashtagConfig, directional, customEntityTransform);\n html.push(blockHtml);\n }\n });\n\n if (listBlocks.length > 0) {\n var listHtml = getListMarkup(listBlocks, entityMap, hashtagConfig, directional, customEntityTransform); // eslint-disable-line max-len\n\n html.push(listHtml);\n listBlocks = [];\n }\n }\n }\n\n return html.join('');\n }\n\n return draftToHtml;\n\n})));\n\n\n//# sourceURL=webpack:///./node_modules/draftjs-to-html/lib/draftjs-to-html.js?"); + +/***/ }), + /***/ "./node_modules/fbjs/lib/emptyFunction.js": /*!************************************************!*\ !*** ./node_modules/fbjs/lib/emptyFunction.js ***! @@ -5256,6 +7294,28 @@ eval("\n\nvar reactIs = __webpack_require__(/*! react-is */ \"./node_modules/rea /***/ }), +/***/ "./node_modules/html-to-draftjs/dist/html-to-draftjs.js": +/*!**************************************************************!*\ + !*** ./node_modules/html-to-draftjs/dist/html-to-draftjs.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("!function(e,t){ true?module.exports=t(__webpack_require__(/*! immutable */ \"./node_modules/immutable/dist/immutable.js\"),__webpack_require__(/*! draft-js */ \"./node_modules/draft-js/lib/Draft.js\")):undefined}(window,function(n,r){return o={},i.m=a=[function(e,t){e.exports=n},function(e,t){e.exports=r},function(e,t,n){e.exports=n(3)},function(e,t,n){\"use strict\";n.r(t);var v=n(1),u=n(0),s=function(e){var t,n=null;return document.implementation&&document.implementation.createHTMLDocument&&((t=document.implementation.createHTMLDocument(\"foo\")).documentElement.innerHTML=e,n=t.getElementsByTagName(\"body\")[0]),n},x=function(e,t,n){var r,i=e.textContent;return\"\"===i.trim()?{chunk:(r=n,{text:\" \",inlines:[new u.OrderedSet],entities:[r],blocks:[]})}:{chunk:{text:i,inlines:Array(i.length).fill(t),entities:Array(i.length).fill(n),blocks:[]}}},M=function(){return{text:\"\\n\",inlines:[new u.OrderedSet],entities:new Array(1),blocks:[]}},k=function(){return{text:\"\",inlines:[],entities:[],blocks:[]}},E=function(e,t){return{text:\"\",inlines:[],entities:[],blocks:[{type:e,depth:0,data:t||new u.Map({})}]}},w=function(e,t,n){return{text:\"\\r\",inlines:[],entities:[],blocks:[{type:e,depth:Math.max(0,Math.min(4,t)),data:n||new u.Map({})}]}},T=function(e){return{text:\"\\r \",inlines:[new u.OrderedSet],entities:[e],blocks:[{type:\"atomic\",depth:0,data:new u.Map({})}]}},L=function(e,t){return{text:e.text+t.text,inlines:e.inlines.concat(t.inlines),entities:e.entities.concat(t.entities),blocks:e.blocks.concat(t.blocks)}},A=new u.Map({\"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:\"ul\"},\"ordered-list-item\":{element:\"li\",wrapper:\"ol\"},blockquote:{element:\"blockquote\"},code:{element:\"pre\"},atomic:{element:\"figure\"},unstyled:{element:\"p\",aliasedElements:[\"div\"]}});var O={code:\"CODE\",del:\"STRIKETHROUGH\",em:\"ITALIC\",strong:\"BOLD\",ins:\"UNDERLINE\",sub:\"SUBSCRIPT\",sup:\"SUPERSCRIPT\"};function S(e){return e.style.textAlign?new u.Map({\"text-align\":e.style.textAlign}):e.style.marginLeft?new u.Map({\"margin-left\":e.style.marginLeft}):void 0}var _=function(e){var t=void 0;if(e instanceof HTMLAnchorElement){var n={};t=e.dataset&&void 0!==e.dataset.mention?(n.url=e.href,n.text=e.innerHTML,n.value=e.dataset.value,v.Entity.__create(\"MENTION\",\"IMMUTABLE\",n)):(n.url=e.getAttribute&&e.getAttribute(\"href\")||e.href,n.title=e.innerHTML,n.targetOption=e.target,v.Entity.__create(\"LINK\",\"MUTABLE\",n))}return t};n.d(t,\"default\",function(){return r});var d=\" \",f=new RegExp(\" \",\"g\"),j=!0;function I(e,t,n,r,i,a){var o=e.nodeName.toLowerCase();if(a){var l=a(o,e);if(l){var c=v.Entity.__create(l.type,l.mutability,l.data||{});return{chunk:T(c)}}}if(\"#text\"===o&&\"\\n\"!==e.textContent)return x(e,t,i);if(\"br\"===o)return{chunk:M()};if(\"img\"===o&&e instanceof HTMLImageElement){var u={};u.src=e.getAttribute&&e.getAttribute(\"src\")||e.src,u.alt=e.alt,u.height=e.style.height,u.width=e.style.width,e.style.float&&(u.alignment=e.style.float);var s=v.Entity.__create(\"IMAGE\",\"MUTABLE\",u);return{chunk:T(s)}}if(\"video\"===o&&e instanceof HTMLVideoElement){var d={};d.src=e.getAttribute&&e.getAttribute(\"src\")||e.src,d.alt=e.alt,d.height=e.style.height,d.width=e.style.width,e.style.float&&(d.alignment=e.style.float);var f=v.Entity.__create(\"VIDEO\",\"MUTABLE\",d);return{chunk:T(f)}}if(\"iframe\"===o&&e instanceof HTMLIFrameElement){var m={};m.src=e.getAttribute&&e.getAttribute(\"src\")||e.src,m.height=e.height,m.width=e.width;var p=v.Entity.__create(\"EMBEDDED_LINK\",\"MUTABLE\",m);return{chunk:T(p)}}var h,y=function(t,n){var e=A.filter(function(e){return e.element===t&&(!e.wrapper||e.wrapper===n)||e.wrapper===t||e.aliasedElements&&-1>> 0; // N >>> 0 is shorthand for ToUint32\n if ('' + uint32Index !== index || uint32Index === 4294967295) {\n return NaN;\n }\n index = uint32Index;\n }\n return index < 0 ? ensureSize(iter) + index : index;\n }\n\n function returnTrue() {\n return true;\n }\n\n function wholeSlice(begin, end, size) {\n return (begin === 0 || (size !== undefined && begin <= -size)) &&\n (end === undefined || (size !== undefined && end >= size));\n }\n\n function resolveBegin(begin, size) {\n return resolveIndex(begin, size, 0);\n }\n\n function resolveEnd(end, size) {\n return resolveIndex(end, size, size);\n }\n\n function resolveIndex(index, size, defaultIndex) {\n return index === undefined ?\n defaultIndex :\n index < 0 ?\n Math.max(0, size + index) :\n size === undefined ?\n index :\n Math.min(size, index);\n }\n\n /* global Symbol */\n\n var ITERATE_KEYS = 0;\n var ITERATE_VALUES = 1;\n var ITERATE_ENTRIES = 2;\n\n var REAL_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator';\n\n var ITERATOR_SYMBOL = REAL_ITERATOR_SYMBOL || FAUX_ITERATOR_SYMBOL;\n\n\n function Iterator(next) {\n this.next = next;\n }\n\n Iterator.prototype.toString = function() {\n return '[Iterator]';\n };\n\n\n Iterator.KEYS = ITERATE_KEYS;\n Iterator.VALUES = ITERATE_VALUES;\n Iterator.ENTRIES = ITERATE_ENTRIES;\n\n Iterator.prototype.inspect =\n Iterator.prototype.toSource = function () { return this.toString(); }\n Iterator.prototype[ITERATOR_SYMBOL] = function () {\n return this;\n };\n\n\n function iteratorValue(type, k, v, iteratorResult) {\n var value = type === 0 ? k : type === 1 ? v : [k, v];\n iteratorResult ? (iteratorResult.value = value) : (iteratorResult = {\n value: value, done: false\n });\n return iteratorResult;\n }\n\n function iteratorDone() {\n return { value: undefined, done: true };\n }\n\n function hasIterator(maybeIterable) {\n return !!getIteratorFn(maybeIterable);\n }\n\n function isIterator(maybeIterator) {\n return maybeIterator && typeof maybeIterator.next === 'function';\n }\n\n function getIterator(iterable) {\n var iteratorFn = getIteratorFn(iterable);\n return iteratorFn && iteratorFn.call(iterable);\n }\n\n function getIteratorFn(iterable) {\n var iteratorFn = iterable && (\n (REAL_ITERATOR_SYMBOL && iterable[REAL_ITERATOR_SYMBOL]) ||\n iterable[FAUX_ITERATOR_SYMBOL]\n );\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n\n function isArrayLike(value) {\n return value && typeof value.length === 'number';\n }\n\n createClass(Seq, Iterable);\n function Seq(value) {\n return value === null || value === undefined ? emptySequence() :\n isIterable(value) ? value.toSeq() : seqFromValue(value);\n }\n\n Seq.of = function(/*...values*/) {\n return Seq(arguments);\n };\n\n Seq.prototype.toSeq = function() {\n return this;\n };\n\n Seq.prototype.toString = function() {\n return this.__toString('Seq {', '}');\n };\n\n Seq.prototype.cacheResult = function() {\n if (!this._cache && this.__iterateUncached) {\n this._cache = this.entrySeq().toArray();\n this.size = this._cache.length;\n }\n return this;\n };\n\n // abstract __iterateUncached(fn, reverse)\n\n Seq.prototype.__iterate = function(fn, reverse) {\n return seqIterate(this, fn, reverse, true);\n };\n\n // abstract __iteratorUncached(type, reverse)\n\n Seq.prototype.__iterator = function(type, reverse) {\n return seqIterator(this, type, reverse, true);\n };\n\n\n\n createClass(KeyedSeq, Seq);\n function KeyedSeq(value) {\n return value === null || value === undefined ?\n emptySequence().toKeyedSeq() :\n isIterable(value) ?\n (isKeyed(value) ? value.toSeq() : value.fromEntrySeq()) :\n keyedSeqFromValue(value);\n }\n\n KeyedSeq.prototype.toKeyedSeq = function() {\n return this;\n };\n\n\n\n createClass(IndexedSeq, Seq);\n function IndexedSeq(value) {\n return value === null || value === undefined ? emptySequence() :\n !isIterable(value) ? indexedSeqFromValue(value) :\n isKeyed(value) ? value.entrySeq() : value.toIndexedSeq();\n }\n\n IndexedSeq.of = function(/*...values*/) {\n return IndexedSeq(arguments);\n };\n\n IndexedSeq.prototype.toIndexedSeq = function() {\n return this;\n };\n\n IndexedSeq.prototype.toString = function() {\n return this.__toString('Seq [', ']');\n };\n\n IndexedSeq.prototype.__iterate = function(fn, reverse) {\n return seqIterate(this, fn, reverse, false);\n };\n\n IndexedSeq.prototype.__iterator = function(type, reverse) {\n return seqIterator(this, type, reverse, false);\n };\n\n\n\n createClass(SetSeq, Seq);\n function SetSeq(value) {\n return (\n value === null || value === undefined ? emptySequence() :\n !isIterable(value) ? indexedSeqFromValue(value) :\n isKeyed(value) ? value.entrySeq() : value\n ).toSetSeq();\n }\n\n SetSeq.of = function(/*...values*/) {\n return SetSeq(arguments);\n };\n\n SetSeq.prototype.toSetSeq = function() {\n return this;\n };\n\n\n\n Seq.isSeq = isSeq;\n Seq.Keyed = KeyedSeq;\n Seq.Set = SetSeq;\n Seq.Indexed = IndexedSeq;\n\n var IS_SEQ_SENTINEL = '@@__IMMUTABLE_SEQ__@@';\n\n Seq.prototype[IS_SEQ_SENTINEL] = true;\n\n\n\n createClass(ArraySeq, IndexedSeq);\n function ArraySeq(array) {\n this._array = array;\n this.size = array.length;\n }\n\n ArraySeq.prototype.get = function(index, notSetValue) {\n return this.has(index) ? this._array[wrapIndex(this, index)] : notSetValue;\n };\n\n ArraySeq.prototype.__iterate = function(fn, reverse) {\n var array = this._array;\n var maxIndex = array.length - 1;\n for (var ii = 0; ii <= maxIndex; ii++) {\n if (fn(array[reverse ? maxIndex - ii : ii], ii, this) === false) {\n return ii + 1;\n }\n }\n return ii;\n };\n\n ArraySeq.prototype.__iterator = function(type, reverse) {\n var array = this._array;\n var maxIndex = array.length - 1;\n var ii = 0;\n return new Iterator(function() \n {return ii > maxIndex ?\n iteratorDone() :\n iteratorValue(type, ii, array[reverse ? maxIndex - ii++ : ii++])}\n );\n };\n\n\n\n createClass(ObjectSeq, KeyedSeq);\n function ObjectSeq(object) {\n var keys = Object.keys(object);\n this._object = object;\n this._keys = keys;\n this.size = keys.length;\n }\n\n ObjectSeq.prototype.get = function(key, notSetValue) {\n if (notSetValue !== undefined && !this.has(key)) {\n return notSetValue;\n }\n return this._object[key];\n };\n\n ObjectSeq.prototype.has = function(key) {\n return this._object.hasOwnProperty(key);\n };\n\n ObjectSeq.prototype.__iterate = function(fn, reverse) {\n var object = this._object;\n var keys = this._keys;\n var maxIndex = keys.length - 1;\n for (var ii = 0; ii <= maxIndex; ii++) {\n var key = keys[reverse ? maxIndex - ii : ii];\n if (fn(object[key], key, this) === false) {\n return ii + 1;\n }\n }\n return ii;\n };\n\n ObjectSeq.prototype.__iterator = function(type, reverse) {\n var object = this._object;\n var keys = this._keys;\n var maxIndex = keys.length - 1;\n var ii = 0;\n return new Iterator(function() {\n var key = keys[reverse ? maxIndex - ii : ii];\n return ii++ > maxIndex ?\n iteratorDone() :\n iteratorValue(type, key, object[key]);\n });\n };\n\n ObjectSeq.prototype[IS_ORDERED_SENTINEL] = true;\n\n\n createClass(IterableSeq, IndexedSeq);\n function IterableSeq(iterable) {\n this._iterable = iterable;\n this.size = iterable.length || iterable.size;\n }\n\n IterableSeq.prototype.__iterateUncached = function(fn, reverse) {\n if (reverse) {\n return this.cacheResult().__iterate(fn, reverse);\n }\n var iterable = this._iterable;\n var iterator = getIterator(iterable);\n var iterations = 0;\n if (isIterator(iterator)) {\n var step;\n while (!(step = iterator.next()).done) {\n if (fn(step.value, iterations++, this) === false) {\n break;\n }\n }\n }\n return iterations;\n };\n\n IterableSeq.prototype.__iteratorUncached = function(type, reverse) {\n if (reverse) {\n return this.cacheResult().__iterator(type, reverse);\n }\n var iterable = this._iterable;\n var iterator = getIterator(iterable);\n if (!isIterator(iterator)) {\n return new Iterator(iteratorDone);\n }\n var iterations = 0;\n return new Iterator(function() {\n var step = iterator.next();\n return step.done ? step : iteratorValue(type, iterations++, step.value);\n });\n };\n\n\n\n createClass(IteratorSeq, IndexedSeq);\n function IteratorSeq(iterator) {\n this._iterator = iterator;\n this._iteratorCache = [];\n }\n\n IteratorSeq.prototype.__iterateUncached = function(fn, reverse) {\n if (reverse) {\n return this.cacheResult().__iterate(fn, reverse);\n }\n var iterator = this._iterator;\n var cache = this._iteratorCache;\n var iterations = 0;\n while (iterations < cache.length) {\n if (fn(cache[iterations], iterations++, this) === false) {\n return iterations;\n }\n }\n var step;\n while (!(step = iterator.next()).done) {\n var val = step.value;\n cache[iterations] = val;\n if (fn(val, iterations++, this) === false) {\n break;\n }\n }\n return iterations;\n };\n\n IteratorSeq.prototype.__iteratorUncached = function(type, reverse) {\n if (reverse) {\n return this.cacheResult().__iterator(type, reverse);\n }\n var iterator = this._iterator;\n var cache = this._iteratorCache;\n var iterations = 0;\n return new Iterator(function() {\n if (iterations >= cache.length) {\n var step = iterator.next();\n if (step.done) {\n return step;\n }\n cache[iterations] = step.value;\n }\n return iteratorValue(type, iterations, cache[iterations++]);\n });\n };\n\n\n\n\n // # pragma Helper functions\n\n function isSeq(maybeSeq) {\n return !!(maybeSeq && maybeSeq[IS_SEQ_SENTINEL]);\n }\n\n var EMPTY_SEQ;\n\n function emptySequence() {\n return EMPTY_SEQ || (EMPTY_SEQ = new ArraySeq([]));\n }\n\n function keyedSeqFromValue(value) {\n var seq =\n Array.isArray(value) ? new ArraySeq(value).fromEntrySeq() :\n isIterator(value) ? new IteratorSeq(value).fromEntrySeq() :\n hasIterator(value) ? new IterableSeq(value).fromEntrySeq() :\n typeof value === 'object' ? new ObjectSeq(value) :\n undefined;\n if (!seq) {\n throw new TypeError(\n 'Expected Array or iterable object of [k, v] entries, '+\n 'or keyed object: ' + value\n );\n }\n return seq;\n }\n\n function indexedSeqFromValue(value) {\n var seq = maybeIndexedSeqFromValue(value);\n if (!seq) {\n throw new TypeError(\n 'Expected Array or iterable object of values: ' + value\n );\n }\n return seq;\n }\n\n function seqFromValue(value) {\n var seq = maybeIndexedSeqFromValue(value) ||\n (typeof value === 'object' && new ObjectSeq(value));\n if (!seq) {\n throw new TypeError(\n 'Expected Array or iterable object of values, or keyed object: ' + value\n );\n }\n return seq;\n }\n\n function maybeIndexedSeqFromValue(value) {\n return (\n isArrayLike(value) ? new ArraySeq(value) :\n isIterator(value) ? new IteratorSeq(value) :\n hasIterator(value) ? new IterableSeq(value) :\n undefined\n );\n }\n\n function seqIterate(seq, fn, reverse, useKeys) {\n var cache = seq._cache;\n if (cache) {\n var maxIndex = cache.length - 1;\n for (var ii = 0; ii <= maxIndex; ii++) {\n var entry = cache[reverse ? maxIndex - ii : ii];\n if (fn(entry[1], useKeys ? entry[0] : ii, seq) === false) {\n return ii + 1;\n }\n }\n return ii;\n }\n return seq.__iterateUncached(fn, reverse);\n }\n\n function seqIterator(seq, type, reverse, useKeys) {\n var cache = seq._cache;\n if (cache) {\n var maxIndex = cache.length - 1;\n var ii = 0;\n return new Iterator(function() {\n var entry = cache[reverse ? maxIndex - ii : ii];\n return ii++ > maxIndex ?\n iteratorDone() :\n iteratorValue(type, useKeys ? entry[0] : ii - 1, entry[1]);\n });\n }\n return seq.__iteratorUncached(type, reverse);\n }\n\n function fromJS(json, converter) {\n return converter ?\n fromJSWith(converter, json, '', {'': json}) :\n fromJSDefault(json);\n }\n\n function fromJSWith(converter, json, key, parentJSON) {\n if (Array.isArray(json)) {\n return converter.call(parentJSON, key, IndexedSeq(json).map(function(v, k) {return fromJSWith(converter, v, k, json)}));\n }\n if (isPlainObj(json)) {\n return converter.call(parentJSON, key, KeyedSeq(json).map(function(v, k) {return fromJSWith(converter, v, k, json)}));\n }\n return json;\n }\n\n function fromJSDefault(json) {\n if (Array.isArray(json)) {\n return IndexedSeq(json).map(fromJSDefault).toList();\n }\n if (isPlainObj(json)) {\n return KeyedSeq(json).map(fromJSDefault).toMap();\n }\n return json;\n }\n\n function isPlainObj(value) {\n return value && (value.constructor === Object || value.constructor === undefined);\n }\n\n /**\n * An extension of the \"same-value\" algorithm as [described for use by ES6 Map\n * and Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#Key_equality)\n *\n * NaN is considered the same as NaN, however -0 and 0 are considered the same\n * value, which is different from the algorithm described by\n * [`Object.is`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is).\n *\n * This is extended further to allow Objects to describe the values they\n * represent, by way of `valueOf` or `equals` (and `hashCode`).\n *\n * Note: because of this extension, the key equality of Immutable.Map and the\n * value equality of Immutable.Set will differ from ES6 Map and Set.\n *\n * ### Defining custom values\n *\n * The easiest way to describe the value an object represents is by implementing\n * `valueOf`. For example, `Date` represents a value by returning a unix\n * timestamp for `valueOf`:\n *\n * var date1 = new Date(1234567890000); // Fri Feb 13 2009 ...\n * var date2 = new Date(1234567890000);\n * date1.valueOf(); // 1234567890000\n * assert( date1 !== date2 );\n * assert( Immutable.is( date1, date2 ) );\n *\n * Note: overriding `valueOf` may have other implications if you use this object\n * where JavaScript expects a primitive, such as implicit string coercion.\n *\n * For more complex types, especially collections, implementing `valueOf` may\n * not be performant. An alternative is to implement `equals` and `hashCode`.\n *\n * `equals` takes another object, presumably of similar type, and returns true\n * if the it is equal. Equality is symmetrical, so the same result should be\n * returned if this and the argument are flipped.\n *\n * assert( a.equals(b) === b.equals(a) );\n *\n * `hashCode` returns a 32bit integer number representing the object which will\n * be used to determine how to store the value object in a Map or Set. You must\n * provide both or neither methods, one must not exist without the other.\n *\n * Also, an important relationship between these methods must be upheld: if two\n * values are equal, they *must* return the same hashCode. If the values are not\n * equal, they might have the same hashCode; this is called a hash collision,\n * and while undesirable for performance reasons, it is acceptable.\n *\n * if (a.equals(b)) {\n * assert( a.hashCode() === b.hashCode() );\n * }\n *\n * All Immutable collections implement `equals` and `hashCode`.\n *\n */\n function is(valueA, valueB) {\n if (valueA === valueB || (valueA !== valueA && valueB !== valueB)) {\n return true;\n }\n if (!valueA || !valueB) {\n return false;\n }\n if (typeof valueA.valueOf === 'function' &&\n typeof valueB.valueOf === 'function') {\n valueA = valueA.valueOf();\n valueB = valueB.valueOf();\n if (valueA === valueB || (valueA !== valueA && valueB !== valueB)) {\n return true;\n }\n if (!valueA || !valueB) {\n return false;\n }\n }\n if (typeof valueA.equals === 'function' &&\n typeof valueB.equals === 'function' &&\n valueA.equals(valueB)) {\n return true;\n }\n return false;\n }\n\n function deepEqual(a, b) {\n if (a === b) {\n return true;\n }\n\n if (\n !isIterable(b) ||\n a.size !== undefined && b.size !== undefined && a.size !== b.size ||\n a.__hash !== undefined && b.__hash !== undefined && a.__hash !== b.__hash ||\n isKeyed(a) !== isKeyed(b) ||\n isIndexed(a) !== isIndexed(b) ||\n isOrdered(a) !== isOrdered(b)\n ) {\n return false;\n }\n\n if (a.size === 0 && b.size === 0) {\n return true;\n }\n\n var notAssociative = !isAssociative(a);\n\n if (isOrdered(a)) {\n var entries = a.entries();\n return b.every(function(v, k) {\n var entry = entries.next().value;\n return entry && is(entry[1], v) && (notAssociative || is(entry[0], k));\n }) && entries.next().done;\n }\n\n var flipped = false;\n\n if (a.size === undefined) {\n if (b.size === undefined) {\n if (typeof a.cacheResult === 'function') {\n a.cacheResult();\n }\n } else {\n flipped = true;\n var _ = a;\n a = b;\n b = _;\n }\n }\n\n var allEqual = true;\n var bSize = b.__iterate(function(v, k) {\n if (notAssociative ? !a.has(v) :\n flipped ? !is(v, a.get(k, NOT_SET)) : !is(a.get(k, NOT_SET), v)) {\n allEqual = false;\n return false;\n }\n });\n\n return allEqual && a.size === bSize;\n }\n\n createClass(Repeat, IndexedSeq);\n\n function Repeat(value, times) {\n if (!(this instanceof Repeat)) {\n return new Repeat(value, times);\n }\n this._value = value;\n this.size = times === undefined ? Infinity : Math.max(0, times);\n if (this.size === 0) {\n if (EMPTY_REPEAT) {\n return EMPTY_REPEAT;\n }\n EMPTY_REPEAT = this;\n }\n }\n\n Repeat.prototype.toString = function() {\n if (this.size === 0) {\n return 'Repeat []';\n }\n return 'Repeat [ ' + this._value + ' ' + this.size + ' times ]';\n };\n\n Repeat.prototype.get = function(index, notSetValue) {\n return this.has(index) ? this._value : notSetValue;\n };\n\n Repeat.prototype.includes = function(searchValue) {\n return is(this._value, searchValue);\n };\n\n Repeat.prototype.slice = function(begin, end) {\n var size = this.size;\n return wholeSlice(begin, end, size) ? this :\n new Repeat(this._value, resolveEnd(end, size) - resolveBegin(begin, size));\n };\n\n Repeat.prototype.reverse = function() {\n return this;\n };\n\n Repeat.prototype.indexOf = function(searchValue) {\n if (is(this._value, searchValue)) {\n return 0;\n }\n return -1;\n };\n\n Repeat.prototype.lastIndexOf = function(searchValue) {\n if (is(this._value, searchValue)) {\n return this.size;\n }\n return -1;\n };\n\n Repeat.prototype.__iterate = function(fn, reverse) {\n for (var ii = 0; ii < this.size; ii++) {\n if (fn(this._value, ii, this) === false) {\n return ii + 1;\n }\n }\n return ii;\n };\n\n Repeat.prototype.__iterator = function(type, reverse) {var this$0 = this;\n var ii = 0;\n return new Iterator(function() \n {return ii < this$0.size ? iteratorValue(type, ii++, this$0._value) : iteratorDone()}\n );\n };\n\n Repeat.prototype.equals = function(other) {\n return other instanceof Repeat ?\n is(this._value, other._value) :\n deepEqual(other);\n };\n\n\n var EMPTY_REPEAT;\n\n function invariant(condition, error) {\n if (!condition) throw new Error(error);\n }\n\n createClass(Range, IndexedSeq);\n\n function Range(start, end, step) {\n if (!(this instanceof Range)) {\n return new Range(start, end, step);\n }\n invariant(step !== 0, 'Cannot step a Range by 0');\n start = start || 0;\n if (end === undefined) {\n end = Infinity;\n }\n step = step === undefined ? 1 : Math.abs(step);\n if (end < start) {\n step = -step;\n }\n this._start = start;\n this._end = end;\n this._step = step;\n this.size = Math.max(0, Math.ceil((end - start) / step - 1) + 1);\n if (this.size === 0) {\n if (EMPTY_RANGE) {\n return EMPTY_RANGE;\n }\n EMPTY_RANGE = this;\n }\n }\n\n Range.prototype.toString = function() {\n if (this.size === 0) {\n return 'Range []';\n }\n return 'Range [ ' +\n this._start + '...' + this._end +\n (this._step > 1 ? ' by ' + this._step : '') +\n ' ]';\n };\n\n Range.prototype.get = function(index, notSetValue) {\n return this.has(index) ?\n this._start + wrapIndex(this, index) * this._step :\n notSetValue;\n };\n\n Range.prototype.includes = function(searchValue) {\n var possibleIndex = (searchValue - this._start) / this._step;\n return possibleIndex >= 0 &&\n possibleIndex < this.size &&\n possibleIndex === Math.floor(possibleIndex);\n };\n\n Range.prototype.slice = function(begin, end) {\n if (wholeSlice(begin, end, this.size)) {\n return this;\n }\n begin = resolveBegin(begin, this.size);\n end = resolveEnd(end, this.size);\n if (end <= begin) {\n return new Range(0, 0);\n }\n return new Range(this.get(begin, this._end), this.get(end, this._end), this._step);\n };\n\n Range.prototype.indexOf = function(searchValue) {\n var offsetValue = searchValue - this._start;\n if (offsetValue % this._step === 0) {\n var index = offsetValue / this._step;\n if (index >= 0 && index < this.size) {\n return index\n }\n }\n return -1;\n };\n\n Range.prototype.lastIndexOf = function(searchValue) {\n return this.indexOf(searchValue);\n };\n\n Range.prototype.__iterate = function(fn, reverse) {\n var maxIndex = this.size - 1;\n var step = this._step;\n var value = reverse ? this._start + maxIndex * step : this._start;\n for (var ii = 0; ii <= maxIndex; ii++) {\n if (fn(value, ii, this) === false) {\n return ii + 1;\n }\n value += reverse ? -step : step;\n }\n return ii;\n };\n\n Range.prototype.__iterator = function(type, reverse) {\n var maxIndex = this.size - 1;\n var step = this._step;\n var value = reverse ? this._start + maxIndex * step : this._start;\n var ii = 0;\n return new Iterator(function() {\n var v = value;\n value += reverse ? -step : step;\n return ii > maxIndex ? iteratorDone() : iteratorValue(type, ii++, v);\n });\n };\n\n Range.prototype.equals = function(other) {\n return other instanceof Range ?\n this._start === other._start &&\n this._end === other._end &&\n this._step === other._step :\n deepEqual(this, other);\n };\n\n\n var EMPTY_RANGE;\n\n createClass(Collection, Iterable);\n function Collection() {\n throw TypeError('Abstract');\n }\n\n\n createClass(KeyedCollection, Collection);function KeyedCollection() {}\n\n createClass(IndexedCollection, Collection);function IndexedCollection() {}\n\n createClass(SetCollection, Collection);function SetCollection() {}\n\n\n Collection.Keyed = KeyedCollection;\n Collection.Indexed = IndexedCollection;\n Collection.Set = SetCollection;\n\n var imul =\n typeof Math.imul === 'function' && Math.imul(0xffffffff, 2) === -2 ?\n Math.imul :\n function imul(a, b) {\n a = a | 0; // int\n b = b | 0; // int\n var c = a & 0xffff;\n var d = b & 0xffff;\n // Shift by 0 fixes the sign on the high part.\n return (c * d) + ((((a >>> 16) * d + c * (b >>> 16)) << 16) >>> 0) | 0; // int\n };\n\n // v8 has an optimization for storing 31-bit signed numbers.\n // Values which have either 00 or 11 as the high order bits qualify.\n // This function drops the highest order bit in a signed number, maintaining\n // the sign bit.\n function smi(i32) {\n return ((i32 >>> 1) & 0x40000000) | (i32 & 0xBFFFFFFF);\n }\n\n function hash(o) {\n if (o === false || o === null || o === undefined) {\n return 0;\n }\n if (typeof o.valueOf === 'function') {\n o = o.valueOf();\n if (o === false || o === null || o === undefined) {\n return 0;\n }\n }\n if (o === true) {\n return 1;\n }\n var type = typeof o;\n if (type === 'number') {\n var h = o | 0;\n if (h !== o) {\n h ^= o * 0xFFFFFFFF;\n }\n while (o > 0xFFFFFFFF) {\n o /= 0xFFFFFFFF;\n h ^= o;\n }\n return smi(h);\n }\n if (type === 'string') {\n return o.length > STRING_HASH_CACHE_MIN_STRLEN ? cachedHashString(o) : hashString(o);\n }\n if (typeof o.hashCode === 'function') {\n return o.hashCode();\n }\n if (type === 'object') {\n return hashJSObj(o);\n }\n if (typeof o.toString === 'function') {\n return hashString(o.toString());\n }\n throw new Error('Value type ' + type + ' cannot be hashed.');\n }\n\n function cachedHashString(string) {\n var hash = stringHashCache[string];\n if (hash === undefined) {\n hash = hashString(string);\n if (STRING_HASH_CACHE_SIZE === STRING_HASH_CACHE_MAX_SIZE) {\n STRING_HASH_CACHE_SIZE = 0;\n stringHashCache = {};\n }\n STRING_HASH_CACHE_SIZE++;\n stringHashCache[string] = hash;\n }\n return hash;\n }\n\n // http://jsperf.com/hashing-strings\n function hashString(string) {\n // This is the hash from JVM\n // The hash code for a string is computed as\n // s[0] * 31 ^ (n - 1) + s[1] * 31 ^ (n - 2) + ... + s[n - 1],\n // where s[i] is the ith character of the string and n is the length of\n // the string. We \"mod\" the result to make it between 0 (inclusive) and 2^31\n // (exclusive) by dropping high bits.\n var hash = 0;\n for (var ii = 0; ii < string.length; ii++) {\n hash = 31 * hash + string.charCodeAt(ii) | 0;\n }\n return smi(hash);\n }\n\n function hashJSObj(obj) {\n var hash;\n if (usingWeakMap) {\n hash = weakMap.get(obj);\n if (hash !== undefined) {\n return hash;\n }\n }\n\n hash = obj[UID_HASH_KEY];\n if (hash !== undefined) {\n return hash;\n }\n\n if (!canDefineProperty) {\n hash = obj.propertyIsEnumerable && obj.propertyIsEnumerable[UID_HASH_KEY];\n if (hash !== undefined) {\n return hash;\n }\n\n hash = getIENodeHash(obj);\n if (hash !== undefined) {\n return hash;\n }\n }\n\n hash = ++objHashUID;\n if (objHashUID & 0x40000000) {\n objHashUID = 0;\n }\n\n if (usingWeakMap) {\n weakMap.set(obj, hash);\n } else if (isExtensible !== undefined && isExtensible(obj) === false) {\n throw new Error('Non-extensible objects are not allowed as keys.');\n } else if (canDefineProperty) {\n Object.defineProperty(obj, UID_HASH_KEY, {\n 'enumerable': false,\n 'configurable': false,\n 'writable': false,\n 'value': hash\n });\n } else if (obj.propertyIsEnumerable !== undefined &&\n obj.propertyIsEnumerable === obj.constructor.prototype.propertyIsEnumerable) {\n // Since we can't define a non-enumerable property on the object\n // we'll hijack one of the less-used non-enumerable properties to\n // save our hash on it. Since this is a function it will not show up in\n // `JSON.stringify` which is what we want.\n obj.propertyIsEnumerable = function() {\n return this.constructor.prototype.propertyIsEnumerable.apply(this, arguments);\n };\n obj.propertyIsEnumerable[UID_HASH_KEY] = hash;\n } else if (obj.nodeType !== undefined) {\n // At this point we couldn't get the IE `uniqueID` to use as a hash\n // and we couldn't use a non-enumerable property to exploit the\n // dontEnum bug so we simply add the `UID_HASH_KEY` on the node\n // itself.\n obj[UID_HASH_KEY] = hash;\n } else {\n throw new Error('Unable to set a non-enumerable property on object.');\n }\n\n return hash;\n }\n\n // Get references to ES5 object methods.\n var isExtensible = Object.isExtensible;\n\n // True if Object.defineProperty works as expected. IE8 fails this test.\n var canDefineProperty = (function() {\n try {\n Object.defineProperty({}, '@', {});\n return true;\n } catch (e) {\n return false;\n }\n }());\n\n // IE has a `uniqueID` property on DOM nodes. We can construct the hash from it\n // and avoid memory leaks from the IE cloneNode bug.\n function getIENodeHash(node) {\n if (node && node.nodeType > 0) {\n switch (node.nodeType) {\n case 1: // Element\n return node.uniqueID;\n case 9: // Document\n return node.documentElement && node.documentElement.uniqueID;\n }\n }\n }\n\n // If possible, use a WeakMap.\n var usingWeakMap = typeof WeakMap === 'function';\n var weakMap;\n if (usingWeakMap) {\n weakMap = new WeakMap();\n }\n\n var objHashUID = 0;\n\n var UID_HASH_KEY = '__immutablehash__';\n if (typeof Symbol === 'function') {\n UID_HASH_KEY = Symbol(UID_HASH_KEY);\n }\n\n var STRING_HASH_CACHE_MIN_STRLEN = 16;\n var STRING_HASH_CACHE_MAX_SIZE = 255;\n var STRING_HASH_CACHE_SIZE = 0;\n var stringHashCache = {};\n\n function assertNotInfinite(size) {\n invariant(\n size !== Infinity,\n 'Cannot perform this action with an infinite size.'\n );\n }\n\n createClass(Map, KeyedCollection);\n\n // @pragma Construction\n\n function Map(value) {\n return value === null || value === undefined ? emptyMap() :\n isMap(value) && !isOrdered(value) ? value :\n emptyMap().withMutations(function(map ) {\n var iter = KeyedIterable(value);\n assertNotInfinite(iter.size);\n iter.forEach(function(v, k) {return map.set(k, v)});\n });\n }\n\n Map.prototype.toString = function() {\n return this.__toString('Map {', '}');\n };\n\n // @pragma Access\n\n Map.prototype.get = function(k, notSetValue) {\n return this._root ?\n this._root.get(0, undefined, k, notSetValue) :\n notSetValue;\n };\n\n // @pragma Modification\n\n Map.prototype.set = function(k, v) {\n return updateMap(this, k, v);\n };\n\n Map.prototype.setIn = function(keyPath, v) {\n return this.updateIn(keyPath, NOT_SET, function() {return v});\n };\n\n Map.prototype.remove = function(k) {\n return updateMap(this, k, NOT_SET);\n };\n\n Map.prototype.deleteIn = function(keyPath) {\n return this.updateIn(keyPath, function() {return NOT_SET});\n };\n\n Map.prototype.update = function(k, notSetValue, updater) {\n return arguments.length === 1 ?\n k(this) :\n this.updateIn([k], notSetValue, updater);\n };\n\n Map.prototype.updateIn = function(keyPath, notSetValue, updater) {\n if (!updater) {\n updater = notSetValue;\n notSetValue = undefined;\n }\n var updatedValue = updateInDeepMap(\n this,\n forceIterator(keyPath),\n notSetValue,\n updater\n );\n return updatedValue === NOT_SET ? undefined : updatedValue;\n };\n\n Map.prototype.clear = function() {\n if (this.size === 0) {\n return this;\n }\n if (this.__ownerID) {\n this.size = 0;\n this._root = null;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return emptyMap();\n };\n\n // @pragma Composition\n\n Map.prototype.merge = function(/*...iters*/) {\n return mergeIntoMapWith(this, undefined, arguments);\n };\n\n Map.prototype.mergeWith = function(merger) {var iters = SLICE$0.call(arguments, 1);\n return mergeIntoMapWith(this, merger, iters);\n };\n\n Map.prototype.mergeIn = function(keyPath) {var iters = SLICE$0.call(arguments, 1);\n return this.updateIn(\n keyPath,\n emptyMap(),\n function(m ) {return typeof m.merge === 'function' ?\n m.merge.apply(m, iters) :\n iters[iters.length - 1]}\n );\n };\n\n Map.prototype.mergeDeep = function(/*...iters*/) {\n return mergeIntoMapWith(this, deepMerger, arguments);\n };\n\n Map.prototype.mergeDeepWith = function(merger) {var iters = SLICE$0.call(arguments, 1);\n return mergeIntoMapWith(this, deepMergerWith(merger), iters);\n };\n\n Map.prototype.mergeDeepIn = function(keyPath) {var iters = SLICE$0.call(arguments, 1);\n return this.updateIn(\n keyPath,\n emptyMap(),\n function(m ) {return typeof m.mergeDeep === 'function' ?\n m.mergeDeep.apply(m, iters) :\n iters[iters.length - 1]}\n );\n };\n\n Map.prototype.sort = function(comparator) {\n // Late binding\n return OrderedMap(sortFactory(this, comparator));\n };\n\n Map.prototype.sortBy = function(mapper, comparator) {\n // Late binding\n return OrderedMap(sortFactory(this, comparator, mapper));\n };\n\n // @pragma Mutability\n\n Map.prototype.withMutations = function(fn) {\n var mutable = this.asMutable();\n fn(mutable);\n return mutable.wasAltered() ? mutable.__ensureOwner(this.__ownerID) : this;\n };\n\n Map.prototype.asMutable = function() {\n return this.__ownerID ? this : this.__ensureOwner(new OwnerID());\n };\n\n Map.prototype.asImmutable = function() {\n return this.__ensureOwner();\n };\n\n Map.prototype.wasAltered = function() {\n return this.__altered;\n };\n\n Map.prototype.__iterator = function(type, reverse) {\n return new MapIterator(this, type, reverse);\n };\n\n Map.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n var iterations = 0;\n this._root && this._root.iterate(function(entry ) {\n iterations++;\n return fn(entry[1], entry[0], this$0);\n }, reverse);\n return iterations;\n };\n\n Map.prototype.__ensureOwner = function(ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n if (!ownerID) {\n this.__ownerID = ownerID;\n this.__altered = false;\n return this;\n }\n return makeMap(this.size, this._root, ownerID, this.__hash);\n };\n\n\n function isMap(maybeMap) {\n return !!(maybeMap && maybeMap[IS_MAP_SENTINEL]);\n }\n\n Map.isMap = isMap;\n\n var IS_MAP_SENTINEL = '@@__IMMUTABLE_MAP__@@';\n\n var MapPrototype = Map.prototype;\n MapPrototype[IS_MAP_SENTINEL] = true;\n MapPrototype[DELETE] = MapPrototype.remove;\n MapPrototype.removeIn = MapPrototype.deleteIn;\n\n\n // #pragma Trie Nodes\n\n\n\n function ArrayMapNode(ownerID, entries) {\n this.ownerID = ownerID;\n this.entries = entries;\n }\n\n ArrayMapNode.prototype.get = function(shift, keyHash, key, notSetValue) {\n var entries = this.entries;\n for (var ii = 0, len = entries.length; ii < len; ii++) {\n if (is(key, entries[ii][0])) {\n return entries[ii][1];\n }\n }\n return notSetValue;\n };\n\n ArrayMapNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n var removed = value === NOT_SET;\n\n var entries = this.entries;\n var idx = 0;\n for (var len = entries.length; idx < len; idx++) {\n if (is(key, entries[idx][0])) {\n break;\n }\n }\n var exists = idx < len;\n\n if (exists ? entries[idx][1] === value : removed) {\n return this;\n }\n\n SetRef(didAlter);\n (removed || !exists) && SetRef(didChangeSize);\n\n if (removed && entries.length === 1) {\n return; // undefined\n }\n\n if (!exists && !removed && entries.length >= MAX_ARRAY_MAP_SIZE) {\n return createNodes(ownerID, entries, key, value);\n }\n\n var isEditable = ownerID && ownerID === this.ownerID;\n var newEntries = isEditable ? entries : arrCopy(entries);\n\n if (exists) {\n if (removed) {\n idx === len - 1 ? newEntries.pop() : (newEntries[idx] = newEntries.pop());\n } else {\n newEntries[idx] = [key, value];\n }\n } else {\n newEntries.push([key, value]);\n }\n\n if (isEditable) {\n this.entries = newEntries;\n return this;\n }\n\n return new ArrayMapNode(ownerID, newEntries);\n };\n\n\n\n\n function BitmapIndexedNode(ownerID, bitmap, nodes) {\n this.ownerID = ownerID;\n this.bitmap = bitmap;\n this.nodes = nodes;\n }\n\n BitmapIndexedNode.prototype.get = function(shift, keyHash, key, notSetValue) {\n if (keyHash === undefined) {\n keyHash = hash(key);\n }\n var bit = (1 << ((shift === 0 ? keyHash : keyHash >>> shift) & MASK));\n var bitmap = this.bitmap;\n return (bitmap & bit) === 0 ? notSetValue :\n this.nodes[popCount(bitmap & (bit - 1))].get(shift + SHIFT, keyHash, key, notSetValue);\n };\n\n BitmapIndexedNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n if (keyHash === undefined) {\n keyHash = hash(key);\n }\n var keyHashFrag = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n var bit = 1 << keyHashFrag;\n var bitmap = this.bitmap;\n var exists = (bitmap & bit) !== 0;\n\n if (!exists && value === NOT_SET) {\n return this;\n }\n\n var idx = popCount(bitmap & (bit - 1));\n var nodes = this.nodes;\n var node = exists ? nodes[idx] : undefined;\n var newNode = updateNode(node, ownerID, shift + SHIFT, keyHash, key, value, didChangeSize, didAlter);\n\n if (newNode === node) {\n return this;\n }\n\n if (!exists && newNode && nodes.length >= MAX_BITMAP_INDEXED_SIZE) {\n return expandNodes(ownerID, nodes, bitmap, keyHashFrag, newNode);\n }\n\n if (exists && !newNode && nodes.length === 2 && isLeafNode(nodes[idx ^ 1])) {\n return nodes[idx ^ 1];\n }\n\n if (exists && newNode && nodes.length === 1 && isLeafNode(newNode)) {\n return newNode;\n }\n\n var isEditable = ownerID && ownerID === this.ownerID;\n var newBitmap = exists ? newNode ? bitmap : bitmap ^ bit : bitmap | bit;\n var newNodes = exists ? newNode ?\n setIn(nodes, idx, newNode, isEditable) :\n spliceOut(nodes, idx, isEditable) :\n spliceIn(nodes, idx, newNode, isEditable);\n\n if (isEditable) {\n this.bitmap = newBitmap;\n this.nodes = newNodes;\n return this;\n }\n\n return new BitmapIndexedNode(ownerID, newBitmap, newNodes);\n };\n\n\n\n\n function HashArrayMapNode(ownerID, count, nodes) {\n this.ownerID = ownerID;\n this.count = count;\n this.nodes = nodes;\n }\n\n HashArrayMapNode.prototype.get = function(shift, keyHash, key, notSetValue) {\n if (keyHash === undefined) {\n keyHash = hash(key);\n }\n var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n var node = this.nodes[idx];\n return node ? node.get(shift + SHIFT, keyHash, key, notSetValue) : notSetValue;\n };\n\n HashArrayMapNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n if (keyHash === undefined) {\n keyHash = hash(key);\n }\n var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n var removed = value === NOT_SET;\n var nodes = this.nodes;\n var node = nodes[idx];\n\n if (removed && !node) {\n return this;\n }\n\n var newNode = updateNode(node, ownerID, shift + SHIFT, keyHash, key, value, didChangeSize, didAlter);\n if (newNode === node) {\n return this;\n }\n\n var newCount = this.count;\n if (!node) {\n newCount++;\n } else if (!newNode) {\n newCount--;\n if (newCount < MIN_HASH_ARRAY_MAP_SIZE) {\n return packNodes(ownerID, nodes, newCount, idx);\n }\n }\n\n var isEditable = ownerID && ownerID === this.ownerID;\n var newNodes = setIn(nodes, idx, newNode, isEditable);\n\n if (isEditable) {\n this.count = newCount;\n this.nodes = newNodes;\n return this;\n }\n\n return new HashArrayMapNode(ownerID, newCount, newNodes);\n };\n\n\n\n\n function HashCollisionNode(ownerID, keyHash, entries) {\n this.ownerID = ownerID;\n this.keyHash = keyHash;\n this.entries = entries;\n }\n\n HashCollisionNode.prototype.get = function(shift, keyHash, key, notSetValue) {\n var entries = this.entries;\n for (var ii = 0, len = entries.length; ii < len; ii++) {\n if (is(key, entries[ii][0])) {\n return entries[ii][1];\n }\n }\n return notSetValue;\n };\n\n HashCollisionNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n if (keyHash === undefined) {\n keyHash = hash(key);\n }\n\n var removed = value === NOT_SET;\n\n if (keyHash !== this.keyHash) {\n if (removed) {\n return this;\n }\n SetRef(didAlter);\n SetRef(didChangeSize);\n return mergeIntoNode(this, ownerID, shift, keyHash, [key, value]);\n }\n\n var entries = this.entries;\n var idx = 0;\n for (var len = entries.length; idx < len; idx++) {\n if (is(key, entries[idx][0])) {\n break;\n }\n }\n var exists = idx < len;\n\n if (exists ? entries[idx][1] === value : removed) {\n return this;\n }\n\n SetRef(didAlter);\n (removed || !exists) && SetRef(didChangeSize);\n\n if (removed && len === 2) {\n return new ValueNode(ownerID, this.keyHash, entries[idx ^ 1]);\n }\n\n var isEditable = ownerID && ownerID === this.ownerID;\n var newEntries = isEditable ? entries : arrCopy(entries);\n\n if (exists) {\n if (removed) {\n idx === len - 1 ? newEntries.pop() : (newEntries[idx] = newEntries.pop());\n } else {\n newEntries[idx] = [key, value];\n }\n } else {\n newEntries.push([key, value]);\n }\n\n if (isEditable) {\n this.entries = newEntries;\n return this;\n }\n\n return new HashCollisionNode(ownerID, this.keyHash, newEntries);\n };\n\n\n\n\n function ValueNode(ownerID, keyHash, entry) {\n this.ownerID = ownerID;\n this.keyHash = keyHash;\n this.entry = entry;\n }\n\n ValueNode.prototype.get = function(shift, keyHash, key, notSetValue) {\n return is(key, this.entry[0]) ? this.entry[1] : notSetValue;\n };\n\n ValueNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n var removed = value === NOT_SET;\n var keyMatch = is(key, this.entry[0]);\n if (keyMatch ? value === this.entry[1] : removed) {\n return this;\n }\n\n SetRef(didAlter);\n\n if (removed) {\n SetRef(didChangeSize);\n return; // undefined\n }\n\n if (keyMatch) {\n if (ownerID && ownerID === this.ownerID) {\n this.entry[1] = value;\n return this;\n }\n return new ValueNode(ownerID, this.keyHash, [key, value]);\n }\n\n SetRef(didChangeSize);\n return mergeIntoNode(this, ownerID, shift, hash(key), [key, value]);\n };\n\n\n\n // #pragma Iterators\n\n ArrayMapNode.prototype.iterate =\n HashCollisionNode.prototype.iterate = function (fn, reverse) {\n var entries = this.entries;\n for (var ii = 0, maxIndex = entries.length - 1; ii <= maxIndex; ii++) {\n if (fn(entries[reverse ? maxIndex - ii : ii]) === false) {\n return false;\n }\n }\n }\n\n BitmapIndexedNode.prototype.iterate =\n HashArrayMapNode.prototype.iterate = function (fn, reverse) {\n var nodes = this.nodes;\n for (var ii = 0, maxIndex = nodes.length - 1; ii <= maxIndex; ii++) {\n var node = nodes[reverse ? maxIndex - ii : ii];\n if (node && node.iterate(fn, reverse) === false) {\n return false;\n }\n }\n }\n\n ValueNode.prototype.iterate = function (fn, reverse) {\n return fn(this.entry);\n }\n\n createClass(MapIterator, Iterator);\n\n function MapIterator(map, type, reverse) {\n this._type = type;\n this._reverse = reverse;\n this._stack = map._root && mapIteratorFrame(map._root);\n }\n\n MapIterator.prototype.next = function() {\n var type = this._type;\n var stack = this._stack;\n while (stack) {\n var node = stack.node;\n var index = stack.index++;\n var maxIndex;\n if (node.entry) {\n if (index === 0) {\n return mapIteratorValue(type, node.entry);\n }\n } else if (node.entries) {\n maxIndex = node.entries.length - 1;\n if (index <= maxIndex) {\n return mapIteratorValue(type, node.entries[this._reverse ? maxIndex - index : index]);\n }\n } else {\n maxIndex = node.nodes.length - 1;\n if (index <= maxIndex) {\n var subNode = node.nodes[this._reverse ? maxIndex - index : index];\n if (subNode) {\n if (subNode.entry) {\n return mapIteratorValue(type, subNode.entry);\n }\n stack = this._stack = mapIteratorFrame(subNode, stack);\n }\n continue;\n }\n }\n stack = this._stack = this._stack.__prev;\n }\n return iteratorDone();\n };\n\n\n function mapIteratorValue(type, entry) {\n return iteratorValue(type, entry[0], entry[1]);\n }\n\n function mapIteratorFrame(node, prev) {\n return {\n node: node,\n index: 0,\n __prev: prev\n };\n }\n\n function makeMap(size, root, ownerID, hash) {\n var map = Object.create(MapPrototype);\n map.size = size;\n map._root = root;\n map.__ownerID = ownerID;\n map.__hash = hash;\n map.__altered = false;\n return map;\n }\n\n var EMPTY_MAP;\n function emptyMap() {\n return EMPTY_MAP || (EMPTY_MAP = makeMap(0));\n }\n\n function updateMap(map, k, v) {\n var newRoot;\n var newSize;\n if (!map._root) {\n if (v === NOT_SET) {\n return map;\n }\n newSize = 1;\n newRoot = new ArrayMapNode(map.__ownerID, [[k, v]]);\n } else {\n var didChangeSize = MakeRef(CHANGE_LENGTH);\n var didAlter = MakeRef(DID_ALTER);\n newRoot = updateNode(map._root, map.__ownerID, 0, undefined, k, v, didChangeSize, didAlter);\n if (!didAlter.value) {\n return map;\n }\n newSize = map.size + (didChangeSize.value ? v === NOT_SET ? -1 : 1 : 0);\n }\n if (map.__ownerID) {\n map.size = newSize;\n map._root = newRoot;\n map.__hash = undefined;\n map.__altered = true;\n return map;\n }\n return newRoot ? makeMap(newSize, newRoot) : emptyMap();\n }\n\n function updateNode(node, ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n if (!node) {\n if (value === NOT_SET) {\n return node;\n }\n SetRef(didAlter);\n SetRef(didChangeSize);\n return new ValueNode(ownerID, keyHash, [key, value]);\n }\n return node.update(ownerID, shift, keyHash, key, value, didChangeSize, didAlter);\n }\n\n function isLeafNode(node) {\n return node.constructor === ValueNode || node.constructor === HashCollisionNode;\n }\n\n function mergeIntoNode(node, ownerID, shift, keyHash, entry) {\n if (node.keyHash === keyHash) {\n return new HashCollisionNode(ownerID, keyHash, [node.entry, entry]);\n }\n\n var idx1 = (shift === 0 ? node.keyHash : node.keyHash >>> shift) & MASK;\n var idx2 = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n\n var newNode;\n var nodes = idx1 === idx2 ?\n [mergeIntoNode(node, ownerID, shift + SHIFT, keyHash, entry)] :\n ((newNode = new ValueNode(ownerID, keyHash, entry)), idx1 < idx2 ? [node, newNode] : [newNode, node]);\n\n return new BitmapIndexedNode(ownerID, (1 << idx1) | (1 << idx2), nodes);\n }\n\n function createNodes(ownerID, entries, key, value) {\n if (!ownerID) {\n ownerID = new OwnerID();\n }\n var node = new ValueNode(ownerID, hash(key), [key, value]);\n for (var ii = 0; ii < entries.length; ii++) {\n var entry = entries[ii];\n node = node.update(ownerID, 0, undefined, entry[0], entry[1]);\n }\n return node;\n }\n\n function packNodes(ownerID, nodes, count, excluding) {\n var bitmap = 0;\n var packedII = 0;\n var packedNodes = new Array(count);\n for (var ii = 0, bit = 1, len = nodes.length; ii < len; ii++, bit <<= 1) {\n var node = nodes[ii];\n if (node !== undefined && ii !== excluding) {\n bitmap |= bit;\n packedNodes[packedII++] = node;\n }\n }\n return new BitmapIndexedNode(ownerID, bitmap, packedNodes);\n }\n\n function expandNodes(ownerID, nodes, bitmap, including, node) {\n var count = 0;\n var expandedNodes = new Array(SIZE);\n for (var ii = 0; bitmap !== 0; ii++, bitmap >>>= 1) {\n expandedNodes[ii] = bitmap & 1 ? nodes[count++] : undefined;\n }\n expandedNodes[including] = node;\n return new HashArrayMapNode(ownerID, count + 1, expandedNodes);\n }\n\n function mergeIntoMapWith(map, merger, iterables) {\n var iters = [];\n for (var ii = 0; ii < iterables.length; ii++) {\n var value = iterables[ii];\n var iter = KeyedIterable(value);\n if (!isIterable(value)) {\n iter = iter.map(function(v ) {return fromJS(v)});\n }\n iters.push(iter);\n }\n return mergeIntoCollectionWith(map, merger, iters);\n }\n\n function deepMerger(existing, value, key) {\n return existing && existing.mergeDeep && isIterable(value) ?\n existing.mergeDeep(value) :\n is(existing, value) ? existing : value;\n }\n\n function deepMergerWith(merger) {\n return function(existing, value, key) {\n if (existing && existing.mergeDeepWith && isIterable(value)) {\n return existing.mergeDeepWith(merger, value);\n }\n var nextValue = merger(existing, value, key);\n return is(existing, nextValue) ? existing : nextValue;\n };\n }\n\n function mergeIntoCollectionWith(collection, merger, iters) {\n iters = iters.filter(function(x ) {return x.size !== 0});\n if (iters.length === 0) {\n return collection;\n }\n if (collection.size === 0 && !collection.__ownerID && iters.length === 1) {\n return collection.constructor(iters[0]);\n }\n return collection.withMutations(function(collection ) {\n var mergeIntoMap = merger ?\n function(value, key) {\n collection.update(key, NOT_SET, function(existing )\n {return existing === NOT_SET ? value : merger(existing, value, key)}\n );\n } :\n function(value, key) {\n collection.set(key, value);\n }\n for (var ii = 0; ii < iters.length; ii++) {\n iters[ii].forEach(mergeIntoMap);\n }\n });\n }\n\n function updateInDeepMap(existing, keyPathIter, notSetValue, updater) {\n var isNotSet = existing === NOT_SET;\n var step = keyPathIter.next();\n if (step.done) {\n var existingValue = isNotSet ? notSetValue : existing;\n var newValue = updater(existingValue);\n return newValue === existingValue ? existing : newValue;\n }\n invariant(\n isNotSet || (existing && existing.set),\n 'invalid keyPath'\n );\n var key = step.value;\n var nextExisting = isNotSet ? NOT_SET : existing.get(key, NOT_SET);\n var nextUpdated = updateInDeepMap(\n nextExisting,\n keyPathIter,\n notSetValue,\n updater\n );\n return nextUpdated === nextExisting ? existing :\n nextUpdated === NOT_SET ? existing.remove(key) :\n (isNotSet ? emptyMap() : existing).set(key, nextUpdated);\n }\n\n function popCount(x) {\n x = x - ((x >> 1) & 0x55555555);\n x = (x & 0x33333333) + ((x >> 2) & 0x33333333);\n x = (x + (x >> 4)) & 0x0f0f0f0f;\n x = x + (x >> 8);\n x = x + (x >> 16);\n return x & 0x7f;\n }\n\n function setIn(array, idx, val, canEdit) {\n var newArray = canEdit ? array : arrCopy(array);\n newArray[idx] = val;\n return newArray;\n }\n\n function spliceIn(array, idx, val, canEdit) {\n var newLen = array.length + 1;\n if (canEdit && idx + 1 === newLen) {\n array[idx] = val;\n return array;\n }\n var newArray = new Array(newLen);\n var after = 0;\n for (var ii = 0; ii < newLen; ii++) {\n if (ii === idx) {\n newArray[ii] = val;\n after = -1;\n } else {\n newArray[ii] = array[ii + after];\n }\n }\n return newArray;\n }\n\n function spliceOut(array, idx, canEdit) {\n var newLen = array.length - 1;\n if (canEdit && idx === newLen) {\n array.pop();\n return array;\n }\n var newArray = new Array(newLen);\n var after = 0;\n for (var ii = 0; ii < newLen; ii++) {\n if (ii === idx) {\n after = 1;\n }\n newArray[ii] = array[ii + after];\n }\n return newArray;\n }\n\n var MAX_ARRAY_MAP_SIZE = SIZE / 4;\n var MAX_BITMAP_INDEXED_SIZE = SIZE / 2;\n var MIN_HASH_ARRAY_MAP_SIZE = SIZE / 4;\n\n createClass(List, IndexedCollection);\n\n // @pragma Construction\n\n function List(value) {\n var empty = emptyList();\n if (value === null || value === undefined) {\n return empty;\n }\n if (isList(value)) {\n return value;\n }\n var iter = IndexedIterable(value);\n var size = iter.size;\n if (size === 0) {\n return empty;\n }\n assertNotInfinite(size);\n if (size > 0 && size < SIZE) {\n return makeList(0, size, SHIFT, null, new VNode(iter.toArray()));\n }\n return empty.withMutations(function(list ) {\n list.setSize(size);\n iter.forEach(function(v, i) {return list.set(i, v)});\n });\n }\n\n List.of = function(/*...values*/) {\n return this(arguments);\n };\n\n List.prototype.toString = function() {\n return this.__toString('List [', ']');\n };\n\n // @pragma Access\n\n List.prototype.get = function(index, notSetValue) {\n index = wrapIndex(this, index);\n if (index >= 0 && index < this.size) {\n index += this._origin;\n var node = listNodeFor(this, index);\n return node && node.array[index & MASK];\n }\n return notSetValue;\n };\n\n // @pragma Modification\n\n List.prototype.set = function(index, value) {\n return updateList(this, index, value);\n };\n\n List.prototype.remove = function(index) {\n return !this.has(index) ? this :\n index === 0 ? this.shift() :\n index === this.size - 1 ? this.pop() :\n this.splice(index, 1);\n };\n\n List.prototype.insert = function(index, value) {\n return this.splice(index, 0, value);\n };\n\n List.prototype.clear = function() {\n if (this.size === 0) {\n return this;\n }\n if (this.__ownerID) {\n this.size = this._origin = this._capacity = 0;\n this._level = SHIFT;\n this._root = this._tail = null;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return emptyList();\n };\n\n List.prototype.push = function(/*...values*/) {\n var values = arguments;\n var oldSize = this.size;\n return this.withMutations(function(list ) {\n setListBounds(list, 0, oldSize + values.length);\n for (var ii = 0; ii < values.length; ii++) {\n list.set(oldSize + ii, values[ii]);\n }\n });\n };\n\n List.prototype.pop = function() {\n return setListBounds(this, 0, -1);\n };\n\n List.prototype.unshift = function(/*...values*/) {\n var values = arguments;\n return this.withMutations(function(list ) {\n setListBounds(list, -values.length);\n for (var ii = 0; ii < values.length; ii++) {\n list.set(ii, values[ii]);\n }\n });\n };\n\n List.prototype.shift = function() {\n return setListBounds(this, 1);\n };\n\n // @pragma Composition\n\n List.prototype.merge = function(/*...iters*/) {\n return mergeIntoListWith(this, undefined, arguments);\n };\n\n List.prototype.mergeWith = function(merger) {var iters = SLICE$0.call(arguments, 1);\n return mergeIntoListWith(this, merger, iters);\n };\n\n List.prototype.mergeDeep = function(/*...iters*/) {\n return mergeIntoListWith(this, deepMerger, arguments);\n };\n\n List.prototype.mergeDeepWith = function(merger) {var iters = SLICE$0.call(arguments, 1);\n return mergeIntoListWith(this, deepMergerWith(merger), iters);\n };\n\n List.prototype.setSize = function(size) {\n return setListBounds(this, 0, size);\n };\n\n // @pragma Iteration\n\n List.prototype.slice = function(begin, end) {\n var size = this.size;\n if (wholeSlice(begin, end, size)) {\n return this;\n }\n return setListBounds(\n this,\n resolveBegin(begin, size),\n resolveEnd(end, size)\n );\n };\n\n List.prototype.__iterator = function(type, reverse) {\n var index = 0;\n var values = iterateList(this, reverse);\n return new Iterator(function() {\n var value = values();\n return value === DONE ?\n iteratorDone() :\n iteratorValue(type, index++, value);\n });\n };\n\n List.prototype.__iterate = function(fn, reverse) {\n var index = 0;\n var values = iterateList(this, reverse);\n var value;\n while ((value = values()) !== DONE) {\n if (fn(value, index++, this) === false) {\n break;\n }\n }\n return index;\n };\n\n List.prototype.__ensureOwner = function(ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n if (!ownerID) {\n this.__ownerID = ownerID;\n return this;\n }\n return makeList(this._origin, this._capacity, this._level, this._root, this._tail, ownerID, this.__hash);\n };\n\n\n function isList(maybeList) {\n return !!(maybeList && maybeList[IS_LIST_SENTINEL]);\n }\n\n List.isList = isList;\n\n var IS_LIST_SENTINEL = '@@__IMMUTABLE_LIST__@@';\n\n var ListPrototype = List.prototype;\n ListPrototype[IS_LIST_SENTINEL] = true;\n ListPrototype[DELETE] = ListPrototype.remove;\n ListPrototype.setIn = MapPrototype.setIn;\n ListPrototype.deleteIn =\n ListPrototype.removeIn = MapPrototype.removeIn;\n ListPrototype.update = MapPrototype.update;\n ListPrototype.updateIn = MapPrototype.updateIn;\n ListPrototype.mergeIn = MapPrototype.mergeIn;\n ListPrototype.mergeDeepIn = MapPrototype.mergeDeepIn;\n ListPrototype.withMutations = MapPrototype.withMutations;\n ListPrototype.asMutable = MapPrototype.asMutable;\n ListPrototype.asImmutable = MapPrototype.asImmutable;\n ListPrototype.wasAltered = MapPrototype.wasAltered;\n\n\n\n function VNode(array, ownerID) {\n this.array = array;\n this.ownerID = ownerID;\n }\n\n // TODO: seems like these methods are very similar\n\n VNode.prototype.removeBefore = function(ownerID, level, index) {\n if (index === level ? 1 << level : false || this.array.length === 0) {\n return this;\n }\n var originIndex = (index >>> level) & MASK;\n if (originIndex >= this.array.length) {\n return new VNode([], ownerID);\n }\n var removingFirst = originIndex === 0;\n var newChild;\n if (level > 0) {\n var oldChild = this.array[originIndex];\n newChild = oldChild && oldChild.removeBefore(ownerID, level - SHIFT, index);\n if (newChild === oldChild && removingFirst) {\n return this;\n }\n }\n if (removingFirst && !newChild) {\n return this;\n }\n var editable = editableVNode(this, ownerID);\n if (!removingFirst) {\n for (var ii = 0; ii < originIndex; ii++) {\n editable.array[ii] = undefined;\n }\n }\n if (newChild) {\n editable.array[originIndex] = newChild;\n }\n return editable;\n };\n\n VNode.prototype.removeAfter = function(ownerID, level, index) {\n if (index === (level ? 1 << level : 0) || this.array.length === 0) {\n return this;\n }\n var sizeIndex = ((index - 1) >>> level) & MASK;\n if (sizeIndex >= this.array.length) {\n return this;\n }\n\n var newChild;\n if (level > 0) {\n var oldChild = this.array[sizeIndex];\n newChild = oldChild && oldChild.removeAfter(ownerID, level - SHIFT, index);\n if (newChild === oldChild && sizeIndex === this.array.length - 1) {\n return this;\n }\n }\n\n var editable = editableVNode(this, ownerID);\n editable.array.splice(sizeIndex + 1);\n if (newChild) {\n editable.array[sizeIndex] = newChild;\n }\n return editable;\n };\n\n\n\n var DONE = {};\n\n function iterateList(list, reverse) {\n var left = list._origin;\n var right = list._capacity;\n var tailPos = getTailOffset(right);\n var tail = list._tail;\n\n return iterateNodeOrLeaf(list._root, list._level, 0);\n\n function iterateNodeOrLeaf(node, level, offset) {\n return level === 0 ?\n iterateLeaf(node, offset) :\n iterateNode(node, level, offset);\n }\n\n function iterateLeaf(node, offset) {\n var array = offset === tailPos ? tail && tail.array : node && node.array;\n var from = offset > left ? 0 : left - offset;\n var to = right - offset;\n if (to > SIZE) {\n to = SIZE;\n }\n return function() {\n if (from === to) {\n return DONE;\n }\n var idx = reverse ? --to : from++;\n return array && array[idx];\n };\n }\n\n function iterateNode(node, level, offset) {\n var values;\n var array = node && node.array;\n var from = offset > left ? 0 : (left - offset) >> level;\n var to = ((right - offset) >> level) + 1;\n if (to > SIZE) {\n to = SIZE;\n }\n return function() {\n do {\n if (values) {\n var value = values();\n if (value !== DONE) {\n return value;\n }\n values = null;\n }\n if (from === to) {\n return DONE;\n }\n var idx = reverse ? --to : from++;\n values = iterateNodeOrLeaf(\n array && array[idx], level - SHIFT, offset + (idx << level)\n );\n } while (true);\n };\n }\n }\n\n function makeList(origin, capacity, level, root, tail, ownerID, hash) {\n var list = Object.create(ListPrototype);\n list.size = capacity - origin;\n list._origin = origin;\n list._capacity = capacity;\n list._level = level;\n list._root = root;\n list._tail = tail;\n list.__ownerID = ownerID;\n list.__hash = hash;\n list.__altered = false;\n return list;\n }\n\n var EMPTY_LIST;\n function emptyList() {\n return EMPTY_LIST || (EMPTY_LIST = makeList(0, 0, SHIFT));\n }\n\n function updateList(list, index, value) {\n index = wrapIndex(list, index);\n\n if (index !== index) {\n return list;\n }\n\n if (index >= list.size || index < 0) {\n return list.withMutations(function(list ) {\n index < 0 ?\n setListBounds(list, index).set(0, value) :\n setListBounds(list, 0, index + 1).set(index, value)\n });\n }\n\n index += list._origin;\n\n var newTail = list._tail;\n var newRoot = list._root;\n var didAlter = MakeRef(DID_ALTER);\n if (index >= getTailOffset(list._capacity)) {\n newTail = updateVNode(newTail, list.__ownerID, 0, index, value, didAlter);\n } else {\n newRoot = updateVNode(newRoot, list.__ownerID, list._level, index, value, didAlter);\n }\n\n if (!didAlter.value) {\n return list;\n }\n\n if (list.__ownerID) {\n list._root = newRoot;\n list._tail = newTail;\n list.__hash = undefined;\n list.__altered = true;\n return list;\n }\n return makeList(list._origin, list._capacity, list._level, newRoot, newTail);\n }\n\n function updateVNode(node, ownerID, level, index, value, didAlter) {\n var idx = (index >>> level) & MASK;\n var nodeHas = node && idx < node.array.length;\n if (!nodeHas && value === undefined) {\n return node;\n }\n\n var newNode;\n\n if (level > 0) {\n var lowerNode = node && node.array[idx];\n var newLowerNode = updateVNode(lowerNode, ownerID, level - SHIFT, index, value, didAlter);\n if (newLowerNode === lowerNode) {\n return node;\n }\n newNode = editableVNode(node, ownerID);\n newNode.array[idx] = newLowerNode;\n return newNode;\n }\n\n if (nodeHas && node.array[idx] === value) {\n return node;\n }\n\n SetRef(didAlter);\n\n newNode = editableVNode(node, ownerID);\n if (value === undefined && idx === newNode.array.length - 1) {\n newNode.array.pop();\n } else {\n newNode.array[idx] = value;\n }\n return newNode;\n }\n\n function editableVNode(node, ownerID) {\n if (ownerID && node && ownerID === node.ownerID) {\n return node;\n }\n return new VNode(node ? node.array.slice() : [], ownerID);\n }\n\n function listNodeFor(list, rawIndex) {\n if (rawIndex >= getTailOffset(list._capacity)) {\n return list._tail;\n }\n if (rawIndex < 1 << (list._level + SHIFT)) {\n var node = list._root;\n var level = list._level;\n while (node && level > 0) {\n node = node.array[(rawIndex >>> level) & MASK];\n level -= SHIFT;\n }\n return node;\n }\n }\n\n function setListBounds(list, begin, end) {\n // Sanitize begin & end using this shorthand for ToInt32(argument)\n // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32\n if (begin !== undefined) {\n begin = begin | 0;\n }\n if (end !== undefined) {\n end = end | 0;\n }\n var owner = list.__ownerID || new OwnerID();\n var oldOrigin = list._origin;\n var oldCapacity = list._capacity;\n var newOrigin = oldOrigin + begin;\n var newCapacity = end === undefined ? oldCapacity : end < 0 ? oldCapacity + end : oldOrigin + end;\n if (newOrigin === oldOrigin && newCapacity === oldCapacity) {\n return list;\n }\n\n // If it's going to end after it starts, it's empty.\n if (newOrigin >= newCapacity) {\n return list.clear();\n }\n\n var newLevel = list._level;\n var newRoot = list._root;\n\n // New origin might need creating a higher root.\n var offsetShift = 0;\n while (newOrigin + offsetShift < 0) {\n newRoot = new VNode(newRoot && newRoot.array.length ? [undefined, newRoot] : [], owner);\n newLevel += SHIFT;\n offsetShift += 1 << newLevel;\n }\n if (offsetShift) {\n newOrigin += offsetShift;\n oldOrigin += offsetShift;\n newCapacity += offsetShift;\n oldCapacity += offsetShift;\n }\n\n var oldTailOffset = getTailOffset(oldCapacity);\n var newTailOffset = getTailOffset(newCapacity);\n\n // New size might need creating a higher root.\n while (newTailOffset >= 1 << (newLevel + SHIFT)) {\n newRoot = new VNode(newRoot && newRoot.array.length ? [newRoot] : [], owner);\n newLevel += SHIFT;\n }\n\n // Locate or create the new tail.\n var oldTail = list._tail;\n var newTail = newTailOffset < oldTailOffset ?\n listNodeFor(list, newCapacity - 1) :\n newTailOffset > oldTailOffset ? new VNode([], owner) : oldTail;\n\n // Merge Tail into tree.\n if (oldTail && newTailOffset > oldTailOffset && newOrigin < oldCapacity && oldTail.array.length) {\n newRoot = editableVNode(newRoot, owner);\n var node = newRoot;\n for (var level = newLevel; level > SHIFT; level -= SHIFT) {\n var idx = (oldTailOffset >>> level) & MASK;\n node = node.array[idx] = editableVNode(node.array[idx], owner);\n }\n node.array[(oldTailOffset >>> SHIFT) & MASK] = oldTail;\n }\n\n // If the size has been reduced, there's a chance the tail needs to be trimmed.\n if (newCapacity < oldCapacity) {\n newTail = newTail && newTail.removeAfter(owner, 0, newCapacity);\n }\n\n // If the new origin is within the tail, then we do not need a root.\n if (newOrigin >= newTailOffset) {\n newOrigin -= newTailOffset;\n newCapacity -= newTailOffset;\n newLevel = SHIFT;\n newRoot = null;\n newTail = newTail && newTail.removeBefore(owner, 0, newOrigin);\n\n // Otherwise, if the root has been trimmed, garbage collect.\n } else if (newOrigin > oldOrigin || newTailOffset < oldTailOffset) {\n offsetShift = 0;\n\n // Identify the new top root node of the subtree of the old root.\n while (newRoot) {\n var beginIndex = (newOrigin >>> newLevel) & MASK;\n if (beginIndex !== (newTailOffset >>> newLevel) & MASK) {\n break;\n }\n if (beginIndex) {\n offsetShift += (1 << newLevel) * beginIndex;\n }\n newLevel -= SHIFT;\n newRoot = newRoot.array[beginIndex];\n }\n\n // Trim the new sides of the new root.\n if (newRoot && newOrigin > oldOrigin) {\n newRoot = newRoot.removeBefore(owner, newLevel, newOrigin - offsetShift);\n }\n if (newRoot && newTailOffset < oldTailOffset) {\n newRoot = newRoot.removeAfter(owner, newLevel, newTailOffset - offsetShift);\n }\n if (offsetShift) {\n newOrigin -= offsetShift;\n newCapacity -= offsetShift;\n }\n }\n\n if (list.__ownerID) {\n list.size = newCapacity - newOrigin;\n list._origin = newOrigin;\n list._capacity = newCapacity;\n list._level = newLevel;\n list._root = newRoot;\n list._tail = newTail;\n list.__hash = undefined;\n list.__altered = true;\n return list;\n }\n return makeList(newOrigin, newCapacity, newLevel, newRoot, newTail);\n }\n\n function mergeIntoListWith(list, merger, iterables) {\n var iters = [];\n var maxSize = 0;\n for (var ii = 0; ii < iterables.length; ii++) {\n var value = iterables[ii];\n var iter = IndexedIterable(value);\n if (iter.size > maxSize) {\n maxSize = iter.size;\n }\n if (!isIterable(value)) {\n iter = iter.map(function(v ) {return fromJS(v)});\n }\n iters.push(iter);\n }\n if (maxSize > list.size) {\n list = list.setSize(maxSize);\n }\n return mergeIntoCollectionWith(list, merger, iters);\n }\n\n function getTailOffset(size) {\n return size < SIZE ? 0 : (((size - 1) >>> SHIFT) << SHIFT);\n }\n\n createClass(OrderedMap, Map);\n\n // @pragma Construction\n\n function OrderedMap(value) {\n return value === null || value === undefined ? emptyOrderedMap() :\n isOrderedMap(value) ? value :\n emptyOrderedMap().withMutations(function(map ) {\n var iter = KeyedIterable(value);\n assertNotInfinite(iter.size);\n iter.forEach(function(v, k) {return map.set(k, v)});\n });\n }\n\n OrderedMap.of = function(/*...values*/) {\n return this(arguments);\n };\n\n OrderedMap.prototype.toString = function() {\n return this.__toString('OrderedMap {', '}');\n };\n\n // @pragma Access\n\n OrderedMap.prototype.get = function(k, notSetValue) {\n var index = this._map.get(k);\n return index !== undefined ? this._list.get(index)[1] : notSetValue;\n };\n\n // @pragma Modification\n\n OrderedMap.prototype.clear = function() {\n if (this.size === 0) {\n return this;\n }\n if (this.__ownerID) {\n this.size = 0;\n this._map.clear();\n this._list.clear();\n return this;\n }\n return emptyOrderedMap();\n };\n\n OrderedMap.prototype.set = function(k, v) {\n return updateOrderedMap(this, k, v);\n };\n\n OrderedMap.prototype.remove = function(k) {\n return updateOrderedMap(this, k, NOT_SET);\n };\n\n OrderedMap.prototype.wasAltered = function() {\n return this._map.wasAltered() || this._list.wasAltered();\n };\n\n OrderedMap.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n return this._list.__iterate(\n function(entry ) {return entry && fn(entry[1], entry[0], this$0)},\n reverse\n );\n };\n\n OrderedMap.prototype.__iterator = function(type, reverse) {\n return this._list.fromEntrySeq().__iterator(type, reverse);\n };\n\n OrderedMap.prototype.__ensureOwner = function(ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n var newMap = this._map.__ensureOwner(ownerID);\n var newList = this._list.__ensureOwner(ownerID);\n if (!ownerID) {\n this.__ownerID = ownerID;\n this._map = newMap;\n this._list = newList;\n return this;\n }\n return makeOrderedMap(newMap, newList, ownerID, this.__hash);\n };\n\n\n function isOrderedMap(maybeOrderedMap) {\n return isMap(maybeOrderedMap) && isOrdered(maybeOrderedMap);\n }\n\n OrderedMap.isOrderedMap = isOrderedMap;\n\n OrderedMap.prototype[IS_ORDERED_SENTINEL] = true;\n OrderedMap.prototype[DELETE] = OrderedMap.prototype.remove;\n\n\n\n function makeOrderedMap(map, list, ownerID, hash) {\n var omap = Object.create(OrderedMap.prototype);\n omap.size = map ? map.size : 0;\n omap._map = map;\n omap._list = list;\n omap.__ownerID = ownerID;\n omap.__hash = hash;\n return omap;\n }\n\n var EMPTY_ORDERED_MAP;\n function emptyOrderedMap() {\n return EMPTY_ORDERED_MAP || (EMPTY_ORDERED_MAP = makeOrderedMap(emptyMap(), emptyList()));\n }\n\n function updateOrderedMap(omap, k, v) {\n var map = omap._map;\n var list = omap._list;\n var i = map.get(k);\n var has = i !== undefined;\n var newMap;\n var newList;\n if (v === NOT_SET) { // removed\n if (!has) {\n return omap;\n }\n if (list.size >= SIZE && list.size >= map.size * 2) {\n newList = list.filter(function(entry, idx) {return entry !== undefined && i !== idx});\n newMap = newList.toKeyedSeq().map(function(entry ) {return entry[0]}).flip().toMap();\n if (omap.__ownerID) {\n newMap.__ownerID = newList.__ownerID = omap.__ownerID;\n }\n } else {\n newMap = map.remove(k);\n newList = i === list.size - 1 ? list.pop() : list.set(i, undefined);\n }\n } else {\n if (has) {\n if (v === list.get(i)[1]) {\n return omap;\n }\n newMap = map;\n newList = list.set(i, [k, v]);\n } else {\n newMap = map.set(k, list.size);\n newList = list.set(list.size, [k, v]);\n }\n }\n if (omap.__ownerID) {\n omap.size = newMap.size;\n omap._map = newMap;\n omap._list = newList;\n omap.__hash = undefined;\n return omap;\n }\n return makeOrderedMap(newMap, newList);\n }\n\n createClass(ToKeyedSequence, KeyedSeq);\n function ToKeyedSequence(indexed, useKeys) {\n this._iter = indexed;\n this._useKeys = useKeys;\n this.size = indexed.size;\n }\n\n ToKeyedSequence.prototype.get = function(key, notSetValue) {\n return this._iter.get(key, notSetValue);\n };\n\n ToKeyedSequence.prototype.has = function(key) {\n return this._iter.has(key);\n };\n\n ToKeyedSequence.prototype.valueSeq = function() {\n return this._iter.valueSeq();\n };\n\n ToKeyedSequence.prototype.reverse = function() {var this$0 = this;\n var reversedSequence = reverseFactory(this, true);\n if (!this._useKeys) {\n reversedSequence.valueSeq = function() {return this$0._iter.toSeq().reverse()};\n }\n return reversedSequence;\n };\n\n ToKeyedSequence.prototype.map = function(mapper, context) {var this$0 = this;\n var mappedSequence = mapFactory(this, mapper, context);\n if (!this._useKeys) {\n mappedSequence.valueSeq = function() {return this$0._iter.toSeq().map(mapper, context)};\n }\n return mappedSequence;\n };\n\n ToKeyedSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n var ii;\n return this._iter.__iterate(\n this._useKeys ?\n function(v, k) {return fn(v, k, this$0)} :\n ((ii = reverse ? resolveSize(this) : 0),\n function(v ) {return fn(v, reverse ? --ii : ii++, this$0)}),\n reverse\n );\n };\n\n ToKeyedSequence.prototype.__iterator = function(type, reverse) {\n if (this._useKeys) {\n return this._iter.__iterator(type, reverse);\n }\n var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n var ii = reverse ? resolveSize(this) : 0;\n return new Iterator(function() {\n var step = iterator.next();\n return step.done ? step :\n iteratorValue(type, reverse ? --ii : ii++, step.value, step);\n });\n };\n\n ToKeyedSequence.prototype[IS_ORDERED_SENTINEL] = true;\n\n\n createClass(ToIndexedSequence, IndexedSeq);\n function ToIndexedSequence(iter) {\n this._iter = iter;\n this.size = iter.size;\n }\n\n ToIndexedSequence.prototype.includes = function(value) {\n return this._iter.includes(value);\n };\n\n ToIndexedSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n var iterations = 0;\n return this._iter.__iterate(function(v ) {return fn(v, iterations++, this$0)}, reverse);\n };\n\n ToIndexedSequence.prototype.__iterator = function(type, reverse) {\n var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n var iterations = 0;\n return new Iterator(function() {\n var step = iterator.next();\n return step.done ? step :\n iteratorValue(type, iterations++, step.value, step)\n });\n };\n\n\n\n createClass(ToSetSequence, SetSeq);\n function ToSetSequence(iter) {\n this._iter = iter;\n this.size = iter.size;\n }\n\n ToSetSequence.prototype.has = function(key) {\n return this._iter.includes(key);\n };\n\n ToSetSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n return this._iter.__iterate(function(v ) {return fn(v, v, this$0)}, reverse);\n };\n\n ToSetSequence.prototype.__iterator = function(type, reverse) {\n var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n return new Iterator(function() {\n var step = iterator.next();\n return step.done ? step :\n iteratorValue(type, step.value, step.value, step);\n });\n };\n\n\n\n createClass(FromEntriesSequence, KeyedSeq);\n function FromEntriesSequence(entries) {\n this._iter = entries;\n this.size = entries.size;\n }\n\n FromEntriesSequence.prototype.entrySeq = function() {\n return this._iter.toSeq();\n };\n\n FromEntriesSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n return this._iter.__iterate(function(entry ) {\n // Check if entry exists first so array access doesn't throw for holes\n // in the parent iteration.\n if (entry) {\n validateEntry(entry);\n var indexedIterable = isIterable(entry);\n return fn(\n indexedIterable ? entry.get(1) : entry[1],\n indexedIterable ? entry.get(0) : entry[0],\n this$0\n );\n }\n }, reverse);\n };\n\n FromEntriesSequence.prototype.__iterator = function(type, reverse) {\n var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n return new Iterator(function() {\n while (true) {\n var step = iterator.next();\n if (step.done) {\n return step;\n }\n var entry = step.value;\n // Check if entry exists first so array access doesn't throw for holes\n // in the parent iteration.\n if (entry) {\n validateEntry(entry);\n var indexedIterable = isIterable(entry);\n return iteratorValue(\n type,\n indexedIterable ? entry.get(0) : entry[0],\n indexedIterable ? entry.get(1) : entry[1],\n step\n );\n }\n }\n });\n };\n\n\n ToIndexedSequence.prototype.cacheResult =\n ToKeyedSequence.prototype.cacheResult =\n ToSetSequence.prototype.cacheResult =\n FromEntriesSequence.prototype.cacheResult =\n cacheResultThrough;\n\n\n function flipFactory(iterable) {\n var flipSequence = makeSequence(iterable);\n flipSequence._iter = iterable;\n flipSequence.size = iterable.size;\n flipSequence.flip = function() {return iterable};\n flipSequence.reverse = function () {\n var reversedSequence = iterable.reverse.apply(this); // super.reverse()\n reversedSequence.flip = function() {return iterable.reverse()};\n return reversedSequence;\n };\n flipSequence.has = function(key ) {return iterable.includes(key)};\n flipSequence.includes = function(key ) {return iterable.has(key)};\n flipSequence.cacheResult = cacheResultThrough;\n flipSequence.__iterateUncached = function (fn, reverse) {var this$0 = this;\n return iterable.__iterate(function(v, k) {return fn(k, v, this$0) !== false}, reverse);\n }\n flipSequence.__iteratorUncached = function(type, reverse) {\n if (type === ITERATE_ENTRIES) {\n var iterator = iterable.__iterator(type, reverse);\n return new Iterator(function() {\n var step = iterator.next();\n if (!step.done) {\n var k = step.value[0];\n step.value[0] = step.value[1];\n step.value[1] = k;\n }\n return step;\n });\n }\n return iterable.__iterator(\n type === ITERATE_VALUES ? ITERATE_KEYS : ITERATE_VALUES,\n reverse\n );\n }\n return flipSequence;\n }\n\n\n function mapFactory(iterable, mapper, context) {\n var mappedSequence = makeSequence(iterable);\n mappedSequence.size = iterable.size;\n mappedSequence.has = function(key ) {return iterable.has(key)};\n mappedSequence.get = function(key, notSetValue) {\n var v = iterable.get(key, NOT_SET);\n return v === NOT_SET ?\n notSetValue :\n mapper.call(context, v, key, iterable);\n };\n mappedSequence.__iterateUncached = function (fn, reverse) {var this$0 = this;\n return iterable.__iterate(\n function(v, k, c) {return fn(mapper.call(context, v, k, c), k, this$0) !== false},\n reverse\n );\n }\n mappedSequence.__iteratorUncached = function (type, reverse) {\n var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);\n return new Iterator(function() {\n var step = iterator.next();\n if (step.done) {\n return step;\n }\n var entry = step.value;\n var key = entry[0];\n return iteratorValue(\n type,\n key,\n mapper.call(context, entry[1], key, iterable),\n step\n );\n });\n }\n return mappedSequence;\n }\n\n\n function reverseFactory(iterable, useKeys) {\n var reversedSequence = makeSequence(iterable);\n reversedSequence._iter = iterable;\n reversedSequence.size = iterable.size;\n reversedSequence.reverse = function() {return iterable};\n if (iterable.flip) {\n reversedSequence.flip = function () {\n var flipSequence = flipFactory(iterable);\n flipSequence.reverse = function() {return iterable.flip()};\n return flipSequence;\n };\n }\n reversedSequence.get = function(key, notSetValue) \n {return iterable.get(useKeys ? key : -1 - key, notSetValue)};\n reversedSequence.has = function(key )\n {return iterable.has(useKeys ? key : -1 - key)};\n reversedSequence.includes = function(value ) {return iterable.includes(value)};\n reversedSequence.cacheResult = cacheResultThrough;\n reversedSequence.__iterate = function (fn, reverse) {var this$0 = this;\n return iterable.__iterate(function(v, k) {return fn(v, k, this$0)}, !reverse);\n };\n reversedSequence.__iterator =\n function(type, reverse) {return iterable.__iterator(type, !reverse)};\n return reversedSequence;\n }\n\n\n function filterFactory(iterable, predicate, context, useKeys) {\n var filterSequence = makeSequence(iterable);\n if (useKeys) {\n filterSequence.has = function(key ) {\n var v = iterable.get(key, NOT_SET);\n return v !== NOT_SET && !!predicate.call(context, v, key, iterable);\n };\n filterSequence.get = function(key, notSetValue) {\n var v = iterable.get(key, NOT_SET);\n return v !== NOT_SET && predicate.call(context, v, key, iterable) ?\n v : notSetValue;\n };\n }\n filterSequence.__iterateUncached = function (fn, reverse) {var this$0 = this;\n var iterations = 0;\n iterable.__iterate(function(v, k, c) {\n if (predicate.call(context, v, k, c)) {\n iterations++;\n return fn(v, useKeys ? k : iterations - 1, this$0);\n }\n }, reverse);\n return iterations;\n };\n filterSequence.__iteratorUncached = function (type, reverse) {\n var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);\n var iterations = 0;\n return new Iterator(function() {\n while (true) {\n var step = iterator.next();\n if (step.done) {\n return step;\n }\n var entry = step.value;\n var key = entry[0];\n var value = entry[1];\n if (predicate.call(context, value, key, iterable)) {\n return iteratorValue(type, useKeys ? key : iterations++, value, step);\n }\n }\n });\n }\n return filterSequence;\n }\n\n\n function countByFactory(iterable, grouper, context) {\n var groups = Map().asMutable();\n iterable.__iterate(function(v, k) {\n groups.update(\n grouper.call(context, v, k, iterable),\n 0,\n function(a ) {return a + 1}\n );\n });\n return groups.asImmutable();\n }\n\n\n function groupByFactory(iterable, grouper, context) {\n var isKeyedIter = isKeyed(iterable);\n var groups = (isOrdered(iterable) ? OrderedMap() : Map()).asMutable();\n iterable.__iterate(function(v, k) {\n groups.update(\n grouper.call(context, v, k, iterable),\n function(a ) {return (a = a || [], a.push(isKeyedIter ? [k, v] : v), a)}\n );\n });\n var coerce = iterableClass(iterable);\n return groups.map(function(arr ) {return reify(iterable, coerce(arr))});\n }\n\n\n function sliceFactory(iterable, begin, end, useKeys) {\n var originalSize = iterable.size;\n\n // Sanitize begin & end using this shorthand for ToInt32(argument)\n // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32\n if (begin !== undefined) {\n begin = begin | 0;\n }\n if (end !== undefined) {\n end = end | 0;\n }\n\n if (wholeSlice(begin, end, originalSize)) {\n return iterable;\n }\n\n var resolvedBegin = resolveBegin(begin, originalSize);\n var resolvedEnd = resolveEnd(end, originalSize);\n\n // begin or end will be NaN if they were provided as negative numbers and\n // this iterable's size is unknown. In that case, cache first so there is\n // a known size and these do not resolve to NaN.\n if (resolvedBegin !== resolvedBegin || resolvedEnd !== resolvedEnd) {\n return sliceFactory(iterable.toSeq().cacheResult(), begin, end, useKeys);\n }\n\n // Note: resolvedEnd is undefined when the original sequence's length is\n // unknown and this slice did not supply an end and should contain all\n // elements after resolvedBegin.\n // In that case, resolvedSize will be NaN and sliceSize will remain undefined.\n var resolvedSize = resolvedEnd - resolvedBegin;\n var sliceSize;\n if (resolvedSize === resolvedSize) {\n sliceSize = resolvedSize < 0 ? 0 : resolvedSize;\n }\n\n var sliceSeq = makeSequence(iterable);\n\n // If iterable.size is undefined, the size of the realized sliceSeq is\n // unknown at this point unless the number of items to slice is 0\n sliceSeq.size = sliceSize === 0 ? sliceSize : iterable.size && sliceSize || undefined;\n\n if (!useKeys && isSeq(iterable) && sliceSize >= 0) {\n sliceSeq.get = function (index, notSetValue) {\n index = wrapIndex(this, index);\n return index >= 0 && index < sliceSize ?\n iterable.get(index + resolvedBegin, notSetValue) :\n notSetValue;\n }\n }\n\n sliceSeq.__iterateUncached = function(fn, reverse) {var this$0 = this;\n if (sliceSize === 0) {\n return 0;\n }\n if (reverse) {\n return this.cacheResult().__iterate(fn, reverse);\n }\n var skipped = 0;\n var isSkipping = true;\n var iterations = 0;\n iterable.__iterate(function(v, k) {\n if (!(isSkipping && (isSkipping = skipped++ < resolvedBegin))) {\n iterations++;\n return fn(v, useKeys ? k : iterations - 1, this$0) !== false &&\n iterations !== sliceSize;\n }\n });\n return iterations;\n };\n\n sliceSeq.__iteratorUncached = function(type, reverse) {\n if (sliceSize !== 0 && reverse) {\n return this.cacheResult().__iterator(type, reverse);\n }\n // Don't bother instantiating parent iterator if taking 0.\n var iterator = sliceSize !== 0 && iterable.__iterator(type, reverse);\n var skipped = 0;\n var iterations = 0;\n return new Iterator(function() {\n while (skipped++ < resolvedBegin) {\n iterator.next();\n }\n if (++iterations > sliceSize) {\n return iteratorDone();\n }\n var step = iterator.next();\n if (useKeys || type === ITERATE_VALUES) {\n return step;\n } else if (type === ITERATE_KEYS) {\n return iteratorValue(type, iterations - 1, undefined, step);\n } else {\n return iteratorValue(type, iterations - 1, step.value[1], step);\n }\n });\n }\n\n return sliceSeq;\n }\n\n\n function takeWhileFactory(iterable, predicate, context) {\n var takeSequence = makeSequence(iterable);\n takeSequence.__iterateUncached = function(fn, reverse) {var this$0 = this;\n if (reverse) {\n return this.cacheResult().__iterate(fn, reverse);\n }\n var iterations = 0;\n iterable.__iterate(function(v, k, c) \n {return predicate.call(context, v, k, c) && ++iterations && fn(v, k, this$0)}\n );\n return iterations;\n };\n takeSequence.__iteratorUncached = function(type, reverse) {var this$0 = this;\n if (reverse) {\n return this.cacheResult().__iterator(type, reverse);\n }\n var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);\n var iterating = true;\n return new Iterator(function() {\n if (!iterating) {\n return iteratorDone();\n }\n var step = iterator.next();\n if (step.done) {\n return step;\n }\n var entry = step.value;\n var k = entry[0];\n var v = entry[1];\n if (!predicate.call(context, v, k, this$0)) {\n iterating = false;\n return iteratorDone();\n }\n return type === ITERATE_ENTRIES ? step :\n iteratorValue(type, k, v, step);\n });\n };\n return takeSequence;\n }\n\n\n function skipWhileFactory(iterable, predicate, context, useKeys) {\n var skipSequence = makeSequence(iterable);\n skipSequence.__iterateUncached = function (fn, reverse) {var this$0 = this;\n if (reverse) {\n return this.cacheResult().__iterate(fn, reverse);\n }\n var isSkipping = true;\n var iterations = 0;\n iterable.__iterate(function(v, k, c) {\n if (!(isSkipping && (isSkipping = predicate.call(context, v, k, c)))) {\n iterations++;\n return fn(v, useKeys ? k : iterations - 1, this$0);\n }\n });\n return iterations;\n };\n skipSequence.__iteratorUncached = function(type, reverse) {var this$0 = this;\n if (reverse) {\n return this.cacheResult().__iterator(type, reverse);\n }\n var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);\n var skipping = true;\n var iterations = 0;\n return new Iterator(function() {\n var step, k, v;\n do {\n step = iterator.next();\n if (step.done) {\n if (useKeys || type === ITERATE_VALUES) {\n return step;\n } else if (type === ITERATE_KEYS) {\n return iteratorValue(type, iterations++, undefined, step);\n } else {\n return iteratorValue(type, iterations++, step.value[1], step);\n }\n }\n var entry = step.value;\n k = entry[0];\n v = entry[1];\n skipping && (skipping = predicate.call(context, v, k, this$0));\n } while (skipping);\n return type === ITERATE_ENTRIES ? step :\n iteratorValue(type, k, v, step);\n });\n };\n return skipSequence;\n }\n\n\n function concatFactory(iterable, values) {\n var isKeyedIterable = isKeyed(iterable);\n var iters = [iterable].concat(values).map(function(v ) {\n if (!isIterable(v)) {\n v = isKeyedIterable ?\n keyedSeqFromValue(v) :\n indexedSeqFromValue(Array.isArray(v) ? v : [v]);\n } else if (isKeyedIterable) {\n v = KeyedIterable(v);\n }\n return v;\n }).filter(function(v ) {return v.size !== 0});\n\n if (iters.length === 0) {\n return iterable;\n }\n\n if (iters.length === 1) {\n var singleton = iters[0];\n if (singleton === iterable ||\n isKeyedIterable && isKeyed(singleton) ||\n isIndexed(iterable) && isIndexed(singleton)) {\n return singleton;\n }\n }\n\n var concatSeq = new ArraySeq(iters);\n if (isKeyedIterable) {\n concatSeq = concatSeq.toKeyedSeq();\n } else if (!isIndexed(iterable)) {\n concatSeq = concatSeq.toSetSeq();\n }\n concatSeq = concatSeq.flatten(true);\n concatSeq.size = iters.reduce(\n function(sum, seq) {\n if (sum !== undefined) {\n var size = seq.size;\n if (size !== undefined) {\n return sum + size;\n }\n }\n },\n 0\n );\n return concatSeq;\n }\n\n\n function flattenFactory(iterable, depth, useKeys) {\n var flatSequence = makeSequence(iterable);\n flatSequence.__iterateUncached = function(fn, reverse) {\n var iterations = 0;\n var stopped = false;\n function flatDeep(iter, currentDepth) {var this$0 = this;\n iter.__iterate(function(v, k) {\n if ((!depth || currentDepth < depth) && isIterable(v)) {\n flatDeep(v, currentDepth + 1);\n } else if (fn(v, useKeys ? k : iterations++, this$0) === false) {\n stopped = true;\n }\n return !stopped;\n }, reverse);\n }\n flatDeep(iterable, 0);\n return iterations;\n }\n flatSequence.__iteratorUncached = function(type, reverse) {\n var iterator = iterable.__iterator(type, reverse);\n var stack = [];\n var iterations = 0;\n return new Iterator(function() {\n while (iterator) {\n var step = iterator.next();\n if (step.done !== false) {\n iterator = stack.pop();\n continue;\n }\n var v = step.value;\n if (type === ITERATE_ENTRIES) {\n v = v[1];\n }\n if ((!depth || stack.length < depth) && isIterable(v)) {\n stack.push(iterator);\n iterator = v.__iterator(type, reverse);\n } else {\n return useKeys ? step : iteratorValue(type, iterations++, v, step);\n }\n }\n return iteratorDone();\n });\n }\n return flatSequence;\n }\n\n\n function flatMapFactory(iterable, mapper, context) {\n var coerce = iterableClass(iterable);\n return iterable.toSeq().map(\n function(v, k) {return coerce(mapper.call(context, v, k, iterable))}\n ).flatten(true);\n }\n\n\n function interposeFactory(iterable, separator) {\n var interposedSequence = makeSequence(iterable);\n interposedSequence.size = iterable.size && iterable.size * 2 -1;\n interposedSequence.__iterateUncached = function(fn, reverse) {var this$0 = this;\n var iterations = 0;\n iterable.__iterate(function(v, k) \n {return (!iterations || fn(separator, iterations++, this$0) !== false) &&\n fn(v, iterations++, this$0) !== false},\n reverse\n );\n return iterations;\n };\n interposedSequence.__iteratorUncached = function(type, reverse) {\n var iterator = iterable.__iterator(ITERATE_VALUES, reverse);\n var iterations = 0;\n var step;\n return new Iterator(function() {\n if (!step || iterations % 2) {\n step = iterator.next();\n if (step.done) {\n return step;\n }\n }\n return iterations % 2 ?\n iteratorValue(type, iterations++, separator) :\n iteratorValue(type, iterations++, step.value, step);\n });\n };\n return interposedSequence;\n }\n\n\n function sortFactory(iterable, comparator, mapper) {\n if (!comparator) {\n comparator = defaultComparator;\n }\n var isKeyedIterable = isKeyed(iterable);\n var index = 0;\n var entries = iterable.toSeq().map(\n function(v, k) {return [k, v, index++, mapper ? mapper(v, k, iterable) : v]}\n ).toArray();\n entries.sort(function(a, b) {return comparator(a[3], b[3]) || a[2] - b[2]}).forEach(\n isKeyedIterable ?\n function(v, i) { entries[i].length = 2; } :\n function(v, i) { entries[i] = v[1]; }\n );\n return isKeyedIterable ? KeyedSeq(entries) :\n isIndexed(iterable) ? IndexedSeq(entries) :\n SetSeq(entries);\n }\n\n\n function maxFactory(iterable, comparator, mapper) {\n if (!comparator) {\n comparator = defaultComparator;\n }\n if (mapper) {\n var entry = iterable.toSeq()\n .map(function(v, k) {return [v, mapper(v, k, iterable)]})\n .reduce(function(a, b) {return maxCompare(comparator, a[1], b[1]) ? b : a});\n return entry && entry[0];\n } else {\n return iterable.reduce(function(a, b) {return maxCompare(comparator, a, b) ? b : a});\n }\n }\n\n function maxCompare(comparator, a, b) {\n var comp = comparator(b, a);\n // b is considered the new max if the comparator declares them equal, but\n // they are not equal and b is in fact a nullish value.\n return (comp === 0 && b !== a && (b === undefined || b === null || b !== b)) || comp > 0;\n }\n\n\n function zipWithFactory(keyIter, zipper, iters) {\n var zipSequence = makeSequence(keyIter);\n zipSequence.size = new ArraySeq(iters).map(function(i ) {return i.size}).min();\n // Note: this a generic base implementation of __iterate in terms of\n // __iterator which may be more generically useful in the future.\n zipSequence.__iterate = function(fn, reverse) {\n /* generic:\n var iterator = this.__iterator(ITERATE_ENTRIES, reverse);\n var step;\n var iterations = 0;\n while (!(step = iterator.next()).done) {\n iterations++;\n if (fn(step.value[1], step.value[0], this) === false) {\n break;\n }\n }\n return iterations;\n */\n // indexed:\n var iterator = this.__iterator(ITERATE_VALUES, reverse);\n var step;\n var iterations = 0;\n while (!(step = iterator.next()).done) {\n if (fn(step.value, iterations++, this) === false) {\n break;\n }\n }\n return iterations;\n };\n zipSequence.__iteratorUncached = function(type, reverse) {\n var iterators = iters.map(function(i )\n {return (i = Iterable(i), getIterator(reverse ? i.reverse() : i))}\n );\n var iterations = 0;\n var isDone = false;\n return new Iterator(function() {\n var steps;\n if (!isDone) {\n steps = iterators.map(function(i ) {return i.next()});\n isDone = steps.some(function(s ) {return s.done});\n }\n if (isDone) {\n return iteratorDone();\n }\n return iteratorValue(\n type,\n iterations++,\n zipper.apply(null, steps.map(function(s ) {return s.value}))\n );\n });\n };\n return zipSequence\n }\n\n\n // #pragma Helper Functions\n\n function reify(iter, seq) {\n return isSeq(iter) ? seq : iter.constructor(seq);\n }\n\n function validateEntry(entry) {\n if (entry !== Object(entry)) {\n throw new TypeError('Expected [K, V] tuple: ' + entry);\n }\n }\n\n function resolveSize(iter) {\n assertNotInfinite(iter.size);\n return ensureSize(iter);\n }\n\n function iterableClass(iterable) {\n return isKeyed(iterable) ? KeyedIterable :\n isIndexed(iterable) ? IndexedIterable :\n SetIterable;\n }\n\n function makeSequence(iterable) {\n return Object.create(\n (\n isKeyed(iterable) ? KeyedSeq :\n isIndexed(iterable) ? IndexedSeq :\n SetSeq\n ).prototype\n );\n }\n\n function cacheResultThrough() {\n if (this._iter.cacheResult) {\n this._iter.cacheResult();\n this.size = this._iter.size;\n return this;\n } else {\n return Seq.prototype.cacheResult.call(this);\n }\n }\n\n function defaultComparator(a, b) {\n return a > b ? 1 : a < b ? -1 : 0;\n }\n\n function forceIterator(keyPath) {\n var iter = getIterator(keyPath);\n if (!iter) {\n // Array might not be iterable in this environment, so we need a fallback\n // to our wrapped type.\n if (!isArrayLike(keyPath)) {\n throw new TypeError('Expected iterable or array-like: ' + keyPath);\n }\n iter = getIterator(Iterable(keyPath));\n }\n return iter;\n }\n\n createClass(Record, KeyedCollection);\n\n function Record(defaultValues, name) {\n var hasInitialized;\n\n var RecordType = function Record(values) {\n if (values instanceof RecordType) {\n return values;\n }\n if (!(this instanceof RecordType)) {\n return new RecordType(values);\n }\n if (!hasInitialized) {\n hasInitialized = true;\n var keys = Object.keys(defaultValues);\n setProps(RecordTypePrototype, keys);\n RecordTypePrototype.size = keys.length;\n RecordTypePrototype._name = name;\n RecordTypePrototype._keys = keys;\n RecordTypePrototype._defaultValues = defaultValues;\n }\n this._map = Map(values);\n };\n\n var RecordTypePrototype = RecordType.prototype = Object.create(RecordPrototype);\n RecordTypePrototype.constructor = RecordType;\n\n return RecordType;\n }\n\n Record.prototype.toString = function() {\n return this.__toString(recordName(this) + ' {', '}');\n };\n\n // @pragma Access\n\n Record.prototype.has = function(k) {\n return this._defaultValues.hasOwnProperty(k);\n };\n\n Record.prototype.get = function(k, notSetValue) {\n if (!this.has(k)) {\n return notSetValue;\n }\n var defaultVal = this._defaultValues[k];\n return this._map ? this._map.get(k, defaultVal) : defaultVal;\n };\n\n // @pragma Modification\n\n Record.prototype.clear = function() {\n if (this.__ownerID) {\n this._map && this._map.clear();\n return this;\n }\n var RecordType = this.constructor;\n return RecordType._empty || (RecordType._empty = makeRecord(this, emptyMap()));\n };\n\n Record.prototype.set = function(k, v) {\n if (!this.has(k)) {\n throw new Error('Cannot set unknown key \"' + k + '\" on ' + recordName(this));\n }\n var newMap = this._map && this._map.set(k, v);\n if (this.__ownerID || newMap === this._map) {\n return this;\n }\n return makeRecord(this, newMap);\n };\n\n Record.prototype.remove = function(k) {\n if (!this.has(k)) {\n return this;\n }\n var newMap = this._map && this._map.remove(k);\n if (this.__ownerID || newMap === this._map) {\n return this;\n }\n return makeRecord(this, newMap);\n };\n\n Record.prototype.wasAltered = function() {\n return this._map.wasAltered();\n };\n\n Record.prototype.__iterator = function(type, reverse) {var this$0 = this;\n return KeyedIterable(this._defaultValues).map(function(_, k) {return this$0.get(k)}).__iterator(type, reverse);\n };\n\n Record.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n return KeyedIterable(this._defaultValues).map(function(_, k) {return this$0.get(k)}).__iterate(fn, reverse);\n };\n\n Record.prototype.__ensureOwner = function(ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n var newMap = this._map && this._map.__ensureOwner(ownerID);\n if (!ownerID) {\n this.__ownerID = ownerID;\n this._map = newMap;\n return this;\n }\n return makeRecord(this, newMap, ownerID);\n };\n\n\n var RecordPrototype = Record.prototype;\n RecordPrototype[DELETE] = RecordPrototype.remove;\n RecordPrototype.deleteIn =\n RecordPrototype.removeIn = MapPrototype.removeIn;\n RecordPrototype.merge = MapPrototype.merge;\n RecordPrototype.mergeWith = MapPrototype.mergeWith;\n RecordPrototype.mergeIn = MapPrototype.mergeIn;\n RecordPrototype.mergeDeep = MapPrototype.mergeDeep;\n RecordPrototype.mergeDeepWith = MapPrototype.mergeDeepWith;\n RecordPrototype.mergeDeepIn = MapPrototype.mergeDeepIn;\n RecordPrototype.setIn = MapPrototype.setIn;\n RecordPrototype.update = MapPrototype.update;\n RecordPrototype.updateIn = MapPrototype.updateIn;\n RecordPrototype.withMutations = MapPrototype.withMutations;\n RecordPrototype.asMutable = MapPrototype.asMutable;\n RecordPrototype.asImmutable = MapPrototype.asImmutable;\n\n\n function makeRecord(likeRecord, map, ownerID) {\n var record = Object.create(Object.getPrototypeOf(likeRecord));\n record._map = map;\n record.__ownerID = ownerID;\n return record;\n }\n\n function recordName(record) {\n return record._name || record.constructor.name || 'Record';\n }\n\n function setProps(prototype, names) {\n try {\n names.forEach(setProp.bind(undefined, prototype));\n } catch (error) {\n // Object.defineProperty failed. Probably IE8.\n }\n }\n\n function setProp(prototype, name) {\n Object.defineProperty(prototype, name, {\n get: function() {\n return this.get(name);\n },\n set: function(value) {\n invariant(this.__ownerID, 'Cannot set on an immutable record.');\n this.set(name, value);\n }\n });\n }\n\n createClass(Set, SetCollection);\n\n // @pragma Construction\n\n function Set(value) {\n return value === null || value === undefined ? emptySet() :\n isSet(value) && !isOrdered(value) ? value :\n emptySet().withMutations(function(set ) {\n var iter = SetIterable(value);\n assertNotInfinite(iter.size);\n iter.forEach(function(v ) {return set.add(v)});\n });\n }\n\n Set.of = function(/*...values*/) {\n return this(arguments);\n };\n\n Set.fromKeys = function(value) {\n return this(KeyedIterable(value).keySeq());\n };\n\n Set.prototype.toString = function() {\n return this.__toString('Set {', '}');\n };\n\n // @pragma Access\n\n Set.prototype.has = function(value) {\n return this._map.has(value);\n };\n\n // @pragma Modification\n\n Set.prototype.add = function(value) {\n return updateSet(this, this._map.set(value, true));\n };\n\n Set.prototype.remove = function(value) {\n return updateSet(this, this._map.remove(value));\n };\n\n Set.prototype.clear = function() {\n return updateSet(this, this._map.clear());\n };\n\n // @pragma Composition\n\n Set.prototype.union = function() {var iters = SLICE$0.call(arguments, 0);\n iters = iters.filter(function(x ) {return x.size !== 0});\n if (iters.length === 0) {\n return this;\n }\n if (this.size === 0 && !this.__ownerID && iters.length === 1) {\n return this.constructor(iters[0]);\n }\n return this.withMutations(function(set ) {\n for (var ii = 0; ii < iters.length; ii++) {\n SetIterable(iters[ii]).forEach(function(value ) {return set.add(value)});\n }\n });\n };\n\n Set.prototype.intersect = function() {var iters = SLICE$0.call(arguments, 0);\n if (iters.length === 0) {\n return this;\n }\n iters = iters.map(function(iter ) {return SetIterable(iter)});\n var originalSet = this;\n return this.withMutations(function(set ) {\n originalSet.forEach(function(value ) {\n if (!iters.every(function(iter ) {return iter.includes(value)})) {\n set.remove(value);\n }\n });\n });\n };\n\n Set.prototype.subtract = function() {var iters = SLICE$0.call(arguments, 0);\n if (iters.length === 0) {\n return this;\n }\n iters = iters.map(function(iter ) {return SetIterable(iter)});\n var originalSet = this;\n return this.withMutations(function(set ) {\n originalSet.forEach(function(value ) {\n if (iters.some(function(iter ) {return iter.includes(value)})) {\n set.remove(value);\n }\n });\n });\n };\n\n Set.prototype.merge = function() {\n return this.union.apply(this, arguments);\n };\n\n Set.prototype.mergeWith = function(merger) {var iters = SLICE$0.call(arguments, 1);\n return this.union.apply(this, iters);\n };\n\n Set.prototype.sort = function(comparator) {\n // Late binding\n return OrderedSet(sortFactory(this, comparator));\n };\n\n Set.prototype.sortBy = function(mapper, comparator) {\n // Late binding\n return OrderedSet(sortFactory(this, comparator, mapper));\n };\n\n Set.prototype.wasAltered = function() {\n return this._map.wasAltered();\n };\n\n Set.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n return this._map.__iterate(function(_, k) {return fn(k, k, this$0)}, reverse);\n };\n\n Set.prototype.__iterator = function(type, reverse) {\n return this._map.map(function(_, k) {return k}).__iterator(type, reverse);\n };\n\n Set.prototype.__ensureOwner = function(ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n var newMap = this._map.__ensureOwner(ownerID);\n if (!ownerID) {\n this.__ownerID = ownerID;\n this._map = newMap;\n return this;\n }\n return this.__make(newMap, ownerID);\n };\n\n\n function isSet(maybeSet) {\n return !!(maybeSet && maybeSet[IS_SET_SENTINEL]);\n }\n\n Set.isSet = isSet;\n\n var IS_SET_SENTINEL = '@@__IMMUTABLE_SET__@@';\n\n var SetPrototype = Set.prototype;\n SetPrototype[IS_SET_SENTINEL] = true;\n SetPrototype[DELETE] = SetPrototype.remove;\n SetPrototype.mergeDeep = SetPrototype.merge;\n SetPrototype.mergeDeepWith = SetPrototype.mergeWith;\n SetPrototype.withMutations = MapPrototype.withMutations;\n SetPrototype.asMutable = MapPrototype.asMutable;\n SetPrototype.asImmutable = MapPrototype.asImmutable;\n\n SetPrototype.__empty = emptySet;\n SetPrototype.__make = makeSet;\n\n function updateSet(set, newMap) {\n if (set.__ownerID) {\n set.size = newMap.size;\n set._map = newMap;\n return set;\n }\n return newMap === set._map ? set :\n newMap.size === 0 ? set.__empty() :\n set.__make(newMap);\n }\n\n function makeSet(map, ownerID) {\n var set = Object.create(SetPrototype);\n set.size = map ? map.size : 0;\n set._map = map;\n set.__ownerID = ownerID;\n return set;\n }\n\n var EMPTY_SET;\n function emptySet() {\n return EMPTY_SET || (EMPTY_SET = makeSet(emptyMap()));\n }\n\n createClass(OrderedSet, Set);\n\n // @pragma Construction\n\n function OrderedSet(value) {\n return value === null || value === undefined ? emptyOrderedSet() :\n isOrderedSet(value) ? value :\n emptyOrderedSet().withMutations(function(set ) {\n var iter = SetIterable(value);\n assertNotInfinite(iter.size);\n iter.forEach(function(v ) {return set.add(v)});\n });\n }\n\n OrderedSet.of = function(/*...values*/) {\n return this(arguments);\n };\n\n OrderedSet.fromKeys = function(value) {\n return this(KeyedIterable(value).keySeq());\n };\n\n OrderedSet.prototype.toString = function() {\n return this.__toString('OrderedSet {', '}');\n };\n\n\n function isOrderedSet(maybeOrderedSet) {\n return isSet(maybeOrderedSet) && isOrdered(maybeOrderedSet);\n }\n\n OrderedSet.isOrderedSet = isOrderedSet;\n\n var OrderedSetPrototype = OrderedSet.prototype;\n OrderedSetPrototype[IS_ORDERED_SENTINEL] = true;\n\n OrderedSetPrototype.__empty = emptyOrderedSet;\n OrderedSetPrototype.__make = makeOrderedSet;\n\n function makeOrderedSet(map, ownerID) {\n var set = Object.create(OrderedSetPrototype);\n set.size = map ? map.size : 0;\n set._map = map;\n set.__ownerID = ownerID;\n return set;\n }\n\n var EMPTY_ORDERED_SET;\n function emptyOrderedSet() {\n return EMPTY_ORDERED_SET || (EMPTY_ORDERED_SET = makeOrderedSet(emptyOrderedMap()));\n }\n\n createClass(Stack, IndexedCollection);\n\n // @pragma Construction\n\n function Stack(value) {\n return value === null || value === undefined ? emptyStack() :\n isStack(value) ? value :\n emptyStack().unshiftAll(value);\n }\n\n Stack.of = function(/*...values*/) {\n return this(arguments);\n };\n\n Stack.prototype.toString = function() {\n return this.__toString('Stack [', ']');\n };\n\n // @pragma Access\n\n Stack.prototype.get = function(index, notSetValue) {\n var head = this._head;\n index = wrapIndex(this, index);\n while (head && index--) {\n head = head.next;\n }\n return head ? head.value : notSetValue;\n };\n\n Stack.prototype.peek = function() {\n return this._head && this._head.value;\n };\n\n // @pragma Modification\n\n Stack.prototype.push = function(/*...values*/) {\n if (arguments.length === 0) {\n return this;\n }\n var newSize = this.size + arguments.length;\n var head = this._head;\n for (var ii = arguments.length - 1; ii >= 0; ii--) {\n head = {\n value: arguments[ii],\n next: head\n };\n }\n if (this.__ownerID) {\n this.size = newSize;\n this._head = head;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return makeStack(newSize, head);\n };\n\n Stack.prototype.pushAll = function(iter) {\n iter = IndexedIterable(iter);\n if (iter.size === 0) {\n return this;\n }\n assertNotInfinite(iter.size);\n var newSize = this.size;\n var head = this._head;\n iter.reverse().forEach(function(value ) {\n newSize++;\n head = {\n value: value,\n next: head\n };\n });\n if (this.__ownerID) {\n this.size = newSize;\n this._head = head;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return makeStack(newSize, head);\n };\n\n Stack.prototype.pop = function() {\n return this.slice(1);\n };\n\n Stack.prototype.unshift = function(/*...values*/) {\n return this.push.apply(this, arguments);\n };\n\n Stack.prototype.unshiftAll = function(iter) {\n return this.pushAll(iter);\n };\n\n Stack.prototype.shift = function() {\n return this.pop.apply(this, arguments);\n };\n\n Stack.prototype.clear = function() {\n if (this.size === 0) {\n return this;\n }\n if (this.__ownerID) {\n this.size = 0;\n this._head = undefined;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return emptyStack();\n };\n\n Stack.prototype.slice = function(begin, end) {\n if (wholeSlice(begin, end, this.size)) {\n return this;\n }\n var resolvedBegin = resolveBegin(begin, this.size);\n var resolvedEnd = resolveEnd(end, this.size);\n if (resolvedEnd !== this.size) {\n // super.slice(begin, end);\n return IndexedCollection.prototype.slice.call(this, begin, end);\n }\n var newSize = this.size - resolvedBegin;\n var head = this._head;\n while (resolvedBegin--) {\n head = head.next;\n }\n if (this.__ownerID) {\n this.size = newSize;\n this._head = head;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return makeStack(newSize, head);\n };\n\n // @pragma Mutability\n\n Stack.prototype.__ensureOwner = function(ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n if (!ownerID) {\n this.__ownerID = ownerID;\n this.__altered = false;\n return this;\n }\n return makeStack(this.size, this._head, ownerID, this.__hash);\n };\n\n // @pragma Iteration\n\n Stack.prototype.__iterate = function(fn, reverse) {\n if (reverse) {\n return this.reverse().__iterate(fn);\n }\n var iterations = 0;\n var node = this._head;\n while (node) {\n if (fn(node.value, iterations++, this) === false) {\n break;\n }\n node = node.next;\n }\n return iterations;\n };\n\n Stack.prototype.__iterator = function(type, reverse) {\n if (reverse) {\n return this.reverse().__iterator(type);\n }\n var iterations = 0;\n var node = this._head;\n return new Iterator(function() {\n if (node) {\n var value = node.value;\n node = node.next;\n return iteratorValue(type, iterations++, value);\n }\n return iteratorDone();\n });\n };\n\n\n function isStack(maybeStack) {\n return !!(maybeStack && maybeStack[IS_STACK_SENTINEL]);\n }\n\n Stack.isStack = isStack;\n\n var IS_STACK_SENTINEL = '@@__IMMUTABLE_STACK__@@';\n\n var StackPrototype = Stack.prototype;\n StackPrototype[IS_STACK_SENTINEL] = true;\n StackPrototype.withMutations = MapPrototype.withMutations;\n StackPrototype.asMutable = MapPrototype.asMutable;\n StackPrototype.asImmutable = MapPrototype.asImmutable;\n StackPrototype.wasAltered = MapPrototype.wasAltered;\n\n\n function makeStack(size, head, ownerID, hash) {\n var map = Object.create(StackPrototype);\n map.size = size;\n map._head = head;\n map.__ownerID = ownerID;\n map.__hash = hash;\n map.__altered = false;\n return map;\n }\n\n var EMPTY_STACK;\n function emptyStack() {\n return EMPTY_STACK || (EMPTY_STACK = makeStack(0));\n }\n\n /**\n * Contributes additional methods to a constructor\n */\n function mixin(ctor, methods) {\n var keyCopier = function(key ) { ctor.prototype[key] = methods[key]; };\n Object.keys(methods).forEach(keyCopier);\n Object.getOwnPropertySymbols &&\n Object.getOwnPropertySymbols(methods).forEach(keyCopier);\n return ctor;\n }\n\n Iterable.Iterator = Iterator;\n\n mixin(Iterable, {\n\n // ### Conversion to other types\n\n toArray: function() {\n assertNotInfinite(this.size);\n var array = new Array(this.size || 0);\n this.valueSeq().__iterate(function(v, i) { array[i] = v; });\n return array;\n },\n\n toIndexedSeq: function() {\n return new ToIndexedSequence(this);\n },\n\n toJS: function() {\n return this.toSeq().map(\n function(value ) {return value && typeof value.toJS === 'function' ? value.toJS() : value}\n ).__toJS();\n },\n\n toJSON: function() {\n return this.toSeq().map(\n function(value ) {return value && typeof value.toJSON === 'function' ? value.toJSON() : value}\n ).__toJS();\n },\n\n toKeyedSeq: function() {\n return new ToKeyedSequence(this, true);\n },\n\n toMap: function() {\n // Use Late Binding here to solve the circular dependency.\n return Map(this.toKeyedSeq());\n },\n\n toObject: function() {\n assertNotInfinite(this.size);\n var object = {};\n this.__iterate(function(v, k) { object[k] = v; });\n return object;\n },\n\n toOrderedMap: function() {\n // Use Late Binding here to solve the circular dependency.\n return OrderedMap(this.toKeyedSeq());\n },\n\n toOrderedSet: function() {\n // Use Late Binding here to solve the circular dependency.\n return OrderedSet(isKeyed(this) ? this.valueSeq() : this);\n },\n\n toSet: function() {\n // Use Late Binding here to solve the circular dependency.\n return Set(isKeyed(this) ? this.valueSeq() : this);\n },\n\n toSetSeq: function() {\n return new ToSetSequence(this);\n },\n\n toSeq: function() {\n return isIndexed(this) ? this.toIndexedSeq() :\n isKeyed(this) ? this.toKeyedSeq() :\n this.toSetSeq();\n },\n\n toStack: function() {\n // Use Late Binding here to solve the circular dependency.\n return Stack(isKeyed(this) ? this.valueSeq() : this);\n },\n\n toList: function() {\n // Use Late Binding here to solve the circular dependency.\n return List(isKeyed(this) ? this.valueSeq() : this);\n },\n\n\n // ### Common JavaScript methods and properties\n\n toString: function() {\n return '[Iterable]';\n },\n\n __toString: function(head, tail) {\n if (this.size === 0) {\n return head + tail;\n }\n return head + ' ' + this.toSeq().map(this.__toStringMapper).join(', ') + ' ' + tail;\n },\n\n\n // ### ES6 Collection methods (ES6 Array and Map)\n\n concat: function() {var values = SLICE$0.call(arguments, 0);\n return reify(this, concatFactory(this, values));\n },\n\n includes: function(searchValue) {\n return this.some(function(value ) {return is(value, searchValue)});\n },\n\n entries: function() {\n return this.__iterator(ITERATE_ENTRIES);\n },\n\n every: function(predicate, context) {\n assertNotInfinite(this.size);\n var returnValue = true;\n this.__iterate(function(v, k, c) {\n if (!predicate.call(context, v, k, c)) {\n returnValue = false;\n return false;\n }\n });\n return returnValue;\n },\n\n filter: function(predicate, context) {\n return reify(this, filterFactory(this, predicate, context, true));\n },\n\n find: function(predicate, context, notSetValue) {\n var entry = this.findEntry(predicate, context);\n return entry ? entry[1] : notSetValue;\n },\n\n findEntry: function(predicate, context) {\n var found;\n this.__iterate(function(v, k, c) {\n if (predicate.call(context, v, k, c)) {\n found = [k, v];\n return false;\n }\n });\n return found;\n },\n\n findLastEntry: function(predicate, context) {\n return this.toSeq().reverse().findEntry(predicate, context);\n },\n\n forEach: function(sideEffect, context) {\n assertNotInfinite(this.size);\n return this.__iterate(context ? sideEffect.bind(context) : sideEffect);\n },\n\n join: function(separator) {\n assertNotInfinite(this.size);\n separator = separator !== undefined ? '' + separator : ',';\n var joined = '';\n var isFirst = true;\n this.__iterate(function(v ) {\n isFirst ? (isFirst = false) : (joined += separator);\n joined += v !== null && v !== undefined ? v.toString() : '';\n });\n return joined;\n },\n\n keys: function() {\n return this.__iterator(ITERATE_KEYS);\n },\n\n map: function(mapper, context) {\n return reify(this, mapFactory(this, mapper, context));\n },\n\n reduce: function(reducer, initialReduction, context) {\n assertNotInfinite(this.size);\n var reduction;\n var useFirst;\n if (arguments.length < 2) {\n useFirst = true;\n } else {\n reduction = initialReduction;\n }\n this.__iterate(function(v, k, c) {\n if (useFirst) {\n useFirst = false;\n reduction = v;\n } else {\n reduction = reducer.call(context, reduction, v, k, c);\n }\n });\n return reduction;\n },\n\n reduceRight: function(reducer, initialReduction, context) {\n var reversed = this.toKeyedSeq().reverse();\n return reversed.reduce.apply(reversed, arguments);\n },\n\n reverse: function() {\n return reify(this, reverseFactory(this, true));\n },\n\n slice: function(begin, end) {\n return reify(this, sliceFactory(this, begin, end, true));\n },\n\n some: function(predicate, context) {\n return !this.every(not(predicate), context);\n },\n\n sort: function(comparator) {\n return reify(this, sortFactory(this, comparator));\n },\n\n values: function() {\n return this.__iterator(ITERATE_VALUES);\n },\n\n\n // ### More sequential methods\n\n butLast: function() {\n return this.slice(0, -1);\n },\n\n isEmpty: function() {\n return this.size !== undefined ? this.size === 0 : !this.some(function() {return true});\n },\n\n count: function(predicate, context) {\n return ensureSize(\n predicate ? this.toSeq().filter(predicate, context) : this\n );\n },\n\n countBy: function(grouper, context) {\n return countByFactory(this, grouper, context);\n },\n\n equals: function(other) {\n return deepEqual(this, other);\n },\n\n entrySeq: function() {\n var iterable = this;\n if (iterable._cache) {\n // We cache as an entries array, so we can just return the cache!\n return new ArraySeq(iterable._cache);\n }\n var entriesSequence = iterable.toSeq().map(entryMapper).toIndexedSeq();\n entriesSequence.fromEntrySeq = function() {return iterable.toSeq()};\n return entriesSequence;\n },\n\n filterNot: function(predicate, context) {\n return this.filter(not(predicate), context);\n },\n\n findLast: function(predicate, context, notSetValue) {\n return this.toKeyedSeq().reverse().find(predicate, context, notSetValue);\n },\n\n first: function() {\n return this.find(returnTrue);\n },\n\n flatMap: function(mapper, context) {\n return reify(this, flatMapFactory(this, mapper, context));\n },\n\n flatten: function(depth) {\n return reify(this, flattenFactory(this, depth, true));\n },\n\n fromEntrySeq: function() {\n return new FromEntriesSequence(this);\n },\n\n get: function(searchKey, notSetValue) {\n return this.find(function(_, key) {return is(key, searchKey)}, undefined, notSetValue);\n },\n\n getIn: function(searchKeyPath, notSetValue) {\n var nested = this;\n // Note: in an ES6 environment, we would prefer:\n // for (var key of searchKeyPath) {\n var iter = forceIterator(searchKeyPath);\n var step;\n while (!(step = iter.next()).done) {\n var key = step.value;\n nested = nested && nested.get ? nested.get(key, NOT_SET) : NOT_SET;\n if (nested === NOT_SET) {\n return notSetValue;\n }\n }\n return nested;\n },\n\n groupBy: function(grouper, context) {\n return groupByFactory(this, grouper, context);\n },\n\n has: function(searchKey) {\n return this.get(searchKey, NOT_SET) !== NOT_SET;\n },\n\n hasIn: function(searchKeyPath) {\n return this.getIn(searchKeyPath, NOT_SET) !== NOT_SET;\n },\n\n isSubset: function(iter) {\n iter = typeof iter.includes === 'function' ? iter : Iterable(iter);\n return this.every(function(value ) {return iter.includes(value)});\n },\n\n isSuperset: function(iter) {\n iter = typeof iter.isSubset === 'function' ? iter : Iterable(iter);\n return iter.isSubset(this);\n },\n\n keySeq: function() {\n return this.toSeq().map(keyMapper).toIndexedSeq();\n },\n\n last: function() {\n return this.toSeq().reverse().first();\n },\n\n max: function(comparator) {\n return maxFactory(this, comparator);\n },\n\n maxBy: function(mapper, comparator) {\n return maxFactory(this, comparator, mapper);\n },\n\n min: function(comparator) {\n return maxFactory(this, comparator ? neg(comparator) : defaultNegComparator);\n },\n\n minBy: function(mapper, comparator) {\n return maxFactory(this, comparator ? neg(comparator) : defaultNegComparator, mapper);\n },\n\n rest: function() {\n return this.slice(1);\n },\n\n skip: function(amount) {\n return this.slice(Math.max(0, amount));\n },\n\n skipLast: function(amount) {\n return reify(this, this.toSeq().reverse().skip(amount).reverse());\n },\n\n skipWhile: function(predicate, context) {\n return reify(this, skipWhileFactory(this, predicate, context, true));\n },\n\n skipUntil: function(predicate, context) {\n return this.skipWhile(not(predicate), context);\n },\n\n sortBy: function(mapper, comparator) {\n return reify(this, sortFactory(this, comparator, mapper));\n },\n\n take: function(amount) {\n return this.slice(0, Math.max(0, amount));\n },\n\n takeLast: function(amount) {\n return reify(this, this.toSeq().reverse().take(amount).reverse());\n },\n\n takeWhile: function(predicate, context) {\n return reify(this, takeWhileFactory(this, predicate, context));\n },\n\n takeUntil: function(predicate, context) {\n return this.takeWhile(not(predicate), context);\n },\n\n valueSeq: function() {\n return this.toIndexedSeq();\n },\n\n\n // ### Hashable Object\n\n hashCode: function() {\n return this.__hash || (this.__hash = hashIterable(this));\n }\n\n\n // ### Internal\n\n // abstract __iterate(fn, reverse)\n\n // abstract __iterator(type, reverse)\n });\n\n // var IS_ITERABLE_SENTINEL = '@@__IMMUTABLE_ITERABLE__@@';\n // var IS_KEYED_SENTINEL = '@@__IMMUTABLE_KEYED__@@';\n // var IS_INDEXED_SENTINEL = '@@__IMMUTABLE_INDEXED__@@';\n // var IS_ORDERED_SENTINEL = '@@__IMMUTABLE_ORDERED__@@';\n\n var IterablePrototype = Iterable.prototype;\n IterablePrototype[IS_ITERABLE_SENTINEL] = true;\n IterablePrototype[ITERATOR_SYMBOL] = IterablePrototype.values;\n IterablePrototype.__toJS = IterablePrototype.toArray;\n IterablePrototype.__toStringMapper = quoteString;\n IterablePrototype.inspect =\n IterablePrototype.toSource = function() { return this.toString(); };\n IterablePrototype.chain = IterablePrototype.flatMap;\n IterablePrototype.contains = IterablePrototype.includes;\n\n // Temporary warning about using length\n (function () {\n try {\n Object.defineProperty(IterablePrototype, 'length', {\n get: function () {\n if (!Iterable.noLengthWarning) {\n var stack;\n try {\n throw new Error();\n } catch (error) {\n stack = error.stack;\n }\n if (stack.indexOf('_wrapObject') === -1) {\n console && console.warn && console.warn(\n 'iterable.length has been deprecated, '+\n 'use iterable.size or iterable.count(). '+\n 'This warning will become a silent error in a future version. ' +\n stack\n );\n return this.size;\n }\n }\n }\n });\n } catch (e) {}\n })();\n\n\n\n mixin(KeyedIterable, {\n\n // ### More sequential methods\n\n flip: function() {\n return reify(this, flipFactory(this));\n },\n\n findKey: function(predicate, context) {\n var entry = this.findEntry(predicate, context);\n return entry && entry[0];\n },\n\n findLastKey: function(predicate, context) {\n return this.toSeq().reverse().findKey(predicate, context);\n },\n\n keyOf: function(searchValue) {\n return this.findKey(function(value ) {return is(value, searchValue)});\n },\n\n lastKeyOf: function(searchValue) {\n return this.findLastKey(function(value ) {return is(value, searchValue)});\n },\n\n mapEntries: function(mapper, context) {var this$0 = this;\n var iterations = 0;\n return reify(this,\n this.toSeq().map(\n function(v, k) {return mapper.call(context, [k, v], iterations++, this$0)}\n ).fromEntrySeq()\n );\n },\n\n mapKeys: function(mapper, context) {var this$0 = this;\n return reify(this,\n this.toSeq().flip().map(\n function(k, v) {return mapper.call(context, k, v, this$0)}\n ).flip()\n );\n }\n\n });\n\n var KeyedIterablePrototype = KeyedIterable.prototype;\n KeyedIterablePrototype[IS_KEYED_SENTINEL] = true;\n KeyedIterablePrototype[ITERATOR_SYMBOL] = IterablePrototype.entries;\n KeyedIterablePrototype.__toJS = IterablePrototype.toObject;\n KeyedIterablePrototype.__toStringMapper = function(v, k) {return JSON.stringify(k) + ': ' + quoteString(v)};\n\n\n\n mixin(IndexedIterable, {\n\n // ### Conversion to other types\n\n toKeyedSeq: function() {\n return new ToKeyedSequence(this, false);\n },\n\n\n // ### ES6 Collection methods (ES6 Array and Map)\n\n filter: function(predicate, context) {\n return reify(this, filterFactory(this, predicate, context, false));\n },\n\n findIndex: function(predicate, context) {\n var entry = this.findEntry(predicate, context);\n return entry ? entry[0] : -1;\n },\n\n indexOf: function(searchValue) {\n var key = this.toKeyedSeq().keyOf(searchValue);\n return key === undefined ? -1 : key;\n },\n\n lastIndexOf: function(searchValue) {\n var key = this.toKeyedSeq().reverse().keyOf(searchValue);\n return key === undefined ? -1 : key;\n\n // var index =\n // return this.toSeq().reverse().indexOf(searchValue);\n },\n\n reverse: function() {\n return reify(this, reverseFactory(this, false));\n },\n\n slice: function(begin, end) {\n return reify(this, sliceFactory(this, begin, end, false));\n },\n\n splice: function(index, removeNum /*, ...values*/) {\n var numArgs = arguments.length;\n removeNum = Math.max(removeNum | 0, 0);\n if (numArgs === 0 || (numArgs === 2 && !removeNum)) {\n return this;\n }\n // If index is negative, it should resolve relative to the size of the\n // collection. However size may be expensive to compute if not cached, so\n // only call count() if the number is in fact negative.\n index = resolveBegin(index, index < 0 ? this.count() : this.size);\n var spliced = this.slice(0, index);\n return reify(\n this,\n numArgs === 1 ?\n spliced :\n spliced.concat(arrCopy(arguments, 2), this.slice(index + removeNum))\n );\n },\n\n\n // ### More collection methods\n\n findLastIndex: function(predicate, context) {\n var key = this.toKeyedSeq().findLastKey(predicate, context);\n return key === undefined ? -1 : key;\n },\n\n first: function() {\n return this.get(0);\n },\n\n flatten: function(depth) {\n return reify(this, flattenFactory(this, depth, false));\n },\n\n get: function(index, notSetValue) {\n index = wrapIndex(this, index);\n return (index < 0 || (this.size === Infinity ||\n (this.size !== undefined && index > this.size))) ?\n notSetValue :\n this.find(function(_, key) {return key === index}, undefined, notSetValue);\n },\n\n has: function(index) {\n index = wrapIndex(this, index);\n return index >= 0 && (this.size !== undefined ?\n this.size === Infinity || index < this.size :\n this.indexOf(index) !== -1\n );\n },\n\n interpose: function(separator) {\n return reify(this, interposeFactory(this, separator));\n },\n\n interleave: function(/*...iterables*/) {\n var iterables = [this].concat(arrCopy(arguments));\n var zipped = zipWithFactory(this.toSeq(), IndexedSeq.of, iterables);\n var interleaved = zipped.flatten(true);\n if (zipped.size) {\n interleaved.size = zipped.size * iterables.length;\n }\n return reify(this, interleaved);\n },\n\n last: function() {\n return this.get(-1);\n },\n\n skipWhile: function(predicate, context) {\n return reify(this, skipWhileFactory(this, predicate, context, false));\n },\n\n zip: function(/*, ...iterables */) {\n var iterables = [this].concat(arrCopy(arguments));\n return reify(this, zipWithFactory(this, defaultZipper, iterables));\n },\n\n zipWith: function(zipper/*, ...iterables */) {\n var iterables = arrCopy(arguments);\n iterables[0] = this;\n return reify(this, zipWithFactory(this, zipper, iterables));\n }\n\n });\n\n IndexedIterable.prototype[IS_INDEXED_SENTINEL] = true;\n IndexedIterable.prototype[IS_ORDERED_SENTINEL] = true;\n\n\n\n mixin(SetIterable, {\n\n // ### ES6 Collection methods (ES6 Array and Map)\n\n get: function(value, notSetValue) {\n return this.has(value) ? value : notSetValue;\n },\n\n includes: function(value) {\n return this.has(value);\n },\n\n\n // ### More sequential methods\n\n keySeq: function() {\n return this.valueSeq();\n }\n\n });\n\n SetIterable.prototype.has = IterablePrototype.includes;\n\n\n // Mixin subclasses\n\n mixin(KeyedSeq, KeyedIterable.prototype);\n mixin(IndexedSeq, IndexedIterable.prototype);\n mixin(SetSeq, SetIterable.prototype);\n\n mixin(KeyedCollection, KeyedIterable.prototype);\n mixin(IndexedCollection, IndexedIterable.prototype);\n mixin(SetCollection, SetIterable.prototype);\n\n\n // #pragma Helper functions\n\n function keyMapper(v, k) {\n return k;\n }\n\n function entryMapper(v, k) {\n return [k, v];\n }\n\n function not(predicate) {\n return function() {\n return !predicate.apply(this, arguments);\n }\n }\n\n function neg(predicate) {\n return function() {\n return -predicate.apply(this, arguments);\n }\n }\n\n function quoteString(value) {\n return typeof value === 'string' ? JSON.stringify(value) : value;\n }\n\n function defaultZipper() {\n return arrCopy(arguments);\n }\n\n function defaultNegComparator(a, b) {\n return a < b ? 1 : a > b ? -1 : 0;\n }\n\n function hashIterable(iterable) {\n if (iterable.size === Infinity) {\n return 0;\n }\n var ordered = isOrdered(iterable);\n var keyed = isKeyed(iterable);\n var h = ordered ? 1 : 0;\n var size = iterable.__iterate(\n keyed ?\n ordered ?\n function(v, k) { h = 31 * h + hashMerge(hash(v), hash(k)) | 0; } :\n function(v, k) { h = h + hashMerge(hash(v), hash(k)) | 0; } :\n ordered ?\n function(v ) { h = 31 * h + hash(v) | 0; } :\n function(v ) { h = h + hash(v) | 0; }\n );\n return murmurHashOfSize(size, h);\n }\n\n function murmurHashOfSize(size, h) {\n h = imul(h, 0xCC9E2D51);\n h = imul(h << 15 | h >>> -15, 0x1B873593);\n h = imul(h << 13 | h >>> -13, 5);\n h = (h + 0xE6546B64 | 0) ^ size;\n h = imul(h ^ h >>> 16, 0x85EBCA6B);\n h = imul(h ^ h >>> 13, 0xC2B2AE35);\n h = smi(h ^ h >>> 16);\n return h;\n }\n\n function hashMerge(a, b) {\n return a ^ b + 0x9E3779B9 + (a << 6) + (a >> 2) | 0; // int\n }\n\n var Immutable = {\n\n Iterable: Iterable,\n\n Seq: Seq,\n Collection: Collection,\n Map: Map,\n OrderedMap: OrderedMap,\n List: List,\n Stack: Stack,\n Set: Set,\n OrderedSet: OrderedSet,\n\n Record: Record,\n Range: Range,\n Repeat: Repeat,\n\n is: is,\n fromJS: fromJS\n\n };\n\n return Immutable;\n\n}));\n\n//# sourceURL=webpack:///./node_modules/immutable/dist/immutable.js?"); + +/***/ }), + /***/ "./node_modules/lodash/_DataView.js": /*!******************************************!*\ !*** ./node_modules/lodash/_DataView.js ***! @@ -8641,6 +10701,28 @@ eval("\n\nfunction checkDCE() {\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\n /***/ }), +/***/ "./node_modules/react-draft-wysiwyg/dist/react-draft-wysiwyg.css": +/*!***********************************************************************!*\ + !*** ./node_modules/react-draft-wysiwyg/dist/react-draft-wysiwyg.css ***! + \***********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("\nvar content = __webpack_require__(/*! !../../css-loader/dist/cjs.js!./react-draft-wysiwyg.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/react-draft-wysiwyg/dist/react-draft-wysiwyg.css\");\n\nif(typeof content === 'string') content = [[module.i, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = __webpack_require__(/*! ../../style-loader/lib/addStyles.js */ \"./node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(false) {}\n\n//# sourceURL=webpack:///./node_modules/react-draft-wysiwyg/dist/react-draft-wysiwyg.css?"); + +/***/ }), + +/***/ "./node_modules/react-draft-wysiwyg/dist/react-draft-wysiwyg.js": +/*!**********************************************************************!*\ + !*** ./node_modules/react-draft-wysiwyg/dist/react-draft-wysiwyg.js ***! + \**********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("!function(e,t){ true?module.exports=t(__webpack_require__(/*! react */ \"./node_modules/react/index.js\"),__webpack_require__(/*! draft-js */ \"./node_modules/draft-js/lib/Draft.js\"),__webpack_require__(/*! immutable */ \"./node_modules/immutable/dist/immutable.js\")):undefined}(window,function(n,o,r){return c={},i.m=a=[function(e,t,n){e.exports=n(9)()},function(e,t){e.exports=n},function(e,t,n){var o;\n/*!\n Copyright (c) 2017 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n!function(){\"use strict\";var a={}.hasOwnProperty;function c(){for(var e=[],t=0;t<|]|\"+t.src_ZPCc+\"))(\"+c+\")\",\"i\"),r.re.schema_search=RegExp(\"(^|(?!_)(?:[><|]|\"+t.src_ZPCc+\"))(\"+c+\")\",\"ig\"),r.re.pretest=RegExp(\"(\"+r.re.schema_test.source+\")|(\"+r.re.host_fuzzy_test.source+\")|@\",\"i\"),(o=r).__index__=-1,o.__text_cache__=\"\"}function f(e,t){var n=e.__index__,o=e.__last_index__,r=e.__text_cache__.slice(n,o);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=o+t,this.raw=r,this.text=r,this.url=r}function g(e,t){var n=new f(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function y(e,t){if(!(this instanceof y))return new y(e,t);var n;t||(n=e,Object.keys(n||{}).reduce(function(e,t){return e||r.hasOwnProperty(t)},!1)&&(t=e,e={})),this.__opts__=o({},r,t),this.__index__=-1,this.__last_index__=-1,this.__schema__=\"\",this.__text_cache__=\"\",this.__schemas__=o({},i,e),this.__compiled__={},this.__tlds__=a,this.__tlds_replaced__=!1,this.re={},c(this)}y.prototype.add=function(e,t){return this.__schemas__[e]=t,c(this),this},y.prototype.set=function(e){return this.__opts__=o(this.__opts__,e),this},y.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var t,n,o,r,i,a,c,l;if(this.re.schema_test.test(e))for((c=this.re.schema_search).lastIndex=0;null!==(t=c.exec(e));)if(r=this.testSchemaAt(e,t[2],c.lastIndex)){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+r;break}return this.__opts__.fuzzyLink&&this.__compiled__[\"http:\"]&&0<=(l=e.search(this.re.host_fuzzy_test))&&(this.__index__<0||lthis.__last_index__)&&(this.__schema__=\"mailto:\",this.__index__=i,this.__last_index__=a)),0<=this.__index__},y.prototype.pretest=function(e){return this.re.pretest.test(e)},y.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},y.prototype.match=function(e){var t=0,n=[];0<=this.__index__&&this.__text_cache__===e&&(n.push(g(this,t)),t=this.__last_index__);for(var o=t?e.slice(t):e;this.test(o);)n.push(g(this,t)),o=o.slice(this.__last_index__),t+=this.__last_index__;return n.length?n:null},y.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?this.__tlds__=this.__tlds__.concat(e).sort().filter(function(e,t,n){return e!==n[t-1]}).reverse():(this.__tlds__=e.slice(),this.__tlds_replaced__=!0),c(this),this},y.prototype.normalize=function(e){e.schema||(e.url=\"http://\"+e.url),\"mailto:\"!==e.schema||/^mailto:/i.test(e.url)||(e.url=\"mailto:\"+e.url)},y.prototype.onCompile=function(){},e.exports=y},function(e,t,n){e.exports=n(40)},function(e,t,n){\"use strict\";var c=n(10);function o(){}function r(){}r.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,r,i){if(i!==c){var a=new Error(\"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types\");throw a.name=\"Invariant Violation\",a}}function t(){return e}var n={array:e.isRequired=e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:r,resetWarningCache:o};return n.PropTypes=n}},function(e,t,n){\"use strict\";e.exports=\"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED\"},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,o){\"use strict\";e.exports=function(e){var t={};t.src_Any=o(22).source,t.src_Cc=o(23).source,t.src_Z=o(24).source,t.src_P=o(25).source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join(\"|\"),t.src_ZCc=[t.src_Z,t.src_Cc].join(\"|\");var n=\"[><|]\";return t.src_pseudo_letter=\"(?:(?![><|]|\"+t.src_ZPCc+\")\"+t.src_Any+\")\",t.src_ip4=\"(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\",t.src_auth=\"(?:(?:(?!\"+t.src_ZCc+\"|[@/\\\\[\\\\]()]).)+@)?\",t.src_port=\"(?::(?:6(?:[0-4]\\\\d{3}|5(?:[0-4]\\\\d{2}|5(?:[0-2]\\\\d|3[0-5])))|[1-5]?\\\\d{1,4}))?\",t.src_host_terminator=\"(?=$|[><|]|\"+t.src_ZPCc+\")(?!-|_|:\\\\d|\\\\.-|\\\\.(?!$|\"+t.src_ZPCc+\"))\",t.src_path=\"(?:[/?#](?:(?!\"+t.src_ZCc+\"|\"+n+\"|[()[\\\\]{}.,\\\"'?!\\\\-]).|\\\\[(?:(?!\"+t.src_ZCc+\"|\\\\]).)*\\\\]|\\\\((?:(?!\"+t.src_ZCc+\"|[)]).)*\\\\)|\\\\{(?:(?!\"+t.src_ZCc+'|[}]).)*\\\\}|\\\\\"(?:(?!'+t.src_ZCc+'|[\"]).)+\\\\\"|\\\\\\'(?:(?!'+t.src_ZCc+\"|[']).)+\\\\'|\\\\'(?=\"+t.src_pseudo_letter+\"|[-]).|\\\\.{2,4}[a-zA-Z0-9%/]|\\\\.(?!\"+t.src_ZCc+\"|[.]).|\"+(e&&e[\"---\"]?\"\\\\-(?!--(?:[^-]|$))(?:-*)|\":\"\\\\-+|\")+\"\\\\,(?!\"+t.src_ZCc+\").|\\\\!(?!\"+t.src_ZCc+\"|[!]).|\\\\?(?!\"+t.src_ZCc+\"|[?]).)+|\\\\/)?\",t.src_email_name='[\\\\-;:&=\\\\+\\\\$,\\\\.a-zA-Z0-9_][\\\\-;:&=\\\\+\\\\$,\\\\\"\\\\.a-zA-Z0-9_]*',t.src_xn=\"xn--[a-z0-9\\\\-]{1,59}\",t.src_domain_root=\"(?:\"+t.src_xn+\"|\"+t.src_pseudo_letter+\"{1,63})\",t.src_domain=\"(?:\"+t.src_xn+\"|(?:\"+t.src_pseudo_letter+\")|(?:\"+t.src_pseudo_letter+\"(?:-|\"+t.src_pseudo_letter+\"){0,61}\"+t.src_pseudo_letter+\"))\",t.src_host=\"(?:(?:(?:(?:\"+t.src_domain+\")\\\\.)*\"+t.src_domain+\"))\",t.tpl_host_fuzzy=\"(?:\"+t.src_ip4+\"|(?:(?:(?:\"+t.src_domain+\")\\\\.)+(?:%TLDS%)))\",t.tpl_host_no_ip_fuzzy=\"(?:(?:(?:\"+t.src_domain+\")\\\\.)+(?:%TLDS%))\",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test=\"localhost|www\\\\.|\\\\.\\\\d{1,3}\\\\.|(?:\\\\.(?:%TLDS%)(?:\"+t.src_ZPCc+\"|>|$))\",t.tpl_email_fuzzy='(^|[><|]|\"|\\\\(|'+t.src_ZCc+\")(\"+t.src_email_name+\"@\"+t.tpl_host_fuzzy_strict+\")\",t.tpl_link_fuzzy=\"(^|(?![.:/\\\\-_@])(?:[$+<=>^`||]|\"+t.src_ZPCc+\"))((?![$+<=>^`||])\"+t.tpl_host_port_fuzzy_strict+t.src_path+\")\",t.tpl_link_no_ip_fuzzy=\"(^|(?![.:/\\\\-_@])(?:[$+<=>^`||]|\"+t.src_ZPCc+\"))((?![$+<=>^`||])\"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+\")\",t}},function(e,t){e.exports=/[\\0-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/},function(e,t){e.exports=/[\\0-\\x1F\\x7F-\\x9F]/},function(e,t){e.exports=/[ \\xA0\\u1680\\u2000-\\u200A\\u202F\\u205F\\u3000]/},function(e,t){e.exports=/[!-#%-\\*,-/:;\\?@\\[-\\]_\\{\\}\\xA1\\xA7\\xAB\\xB6\\xB7\\xBB\\xBF\\u037E\\u0387\\u055A-\\u055F\\u0589\\u058A\\u05BE\\u05C0\\u05C3\\u05C6\\u05F3\\u05F4\\u0609\\u060A\\u060C\\u060D\\u061B\\u061E\\u061F\\u066A-\\u066D\\u06D4\\u0700-\\u070D\\u07F7-\\u07F9\\u0830-\\u083E\\u085E\\u0964\\u0965\\u0970\\u0AF0\\u0DF4\\u0E4F\\u0E5A\\u0E5B\\u0F04-\\u0F12\\u0F14\\u0F3A-\\u0F3D\\u0F85\\u0FD0-\\u0FD4\\u0FD9\\u0FDA\\u104A-\\u104F\\u10FB\\u1360-\\u1368\\u1400\\u166D\\u166E\\u169B\\u169C\\u16EB-\\u16ED\\u1735\\u1736\\u17D4-\\u17D6\\u17D8-\\u17DA\\u1800-\\u180A\\u1944\\u1945\\u1A1E\\u1A1F\\u1AA0-\\u1AA6\\u1AA8-\\u1AAD\\u1B5A-\\u1B60\\u1BFC-\\u1BFF\\u1C3B-\\u1C3F\\u1C7E\\u1C7F\\u1CC0-\\u1CC7\\u1CD3\\u2010-\\u2027\\u2030-\\u2043\\u2045-\\u2051\\u2053-\\u205E\\u207D\\u207E\\u208D\\u208E\\u2308-\\u230B\\u2329\\u232A\\u2768-\\u2775\\u27C5\\u27C6\\u27E6-\\u27EF\\u2983-\\u2998\\u29D8-\\u29DB\\u29FC\\u29FD\\u2CF9-\\u2CFC\\u2CFE\\u2CFF\\u2D70\\u2E00-\\u2E2E\\u2E30-\\u2E44\\u3001-\\u3003\\u3008-\\u3011\\u3014-\\u301F\\u3030\\u303D\\u30A0\\u30FB\\uA4FE\\uA4FF\\uA60D-\\uA60F\\uA673\\uA67E\\uA6F2-\\uA6F7\\uA874-\\uA877\\uA8CE\\uA8CF\\uA8F8-\\uA8FA\\uA8FC\\uA92E\\uA92F\\uA95F\\uA9C1-\\uA9CD\\uA9DE\\uA9DF\\uAA5C-\\uAA5F\\uAADE\\uAADF\\uAAF0\\uAAF1\\uABEB\\uFD3E\\uFD3F\\uFE10-\\uFE19\\uFE30-\\uFE52\\uFE54-\\uFE61\\uFE63\\uFE68\\uFE6A\\uFE6B\\uFF01-\\uFF03\\uFF05-\\uFF0A\\uFF0C-\\uFF0F\\uFF1A\\uFF1B\\uFF1F\\uFF20\\uFF3B-\\uFF3D\\uFF3F\\uFF5B\\uFF5D\\uFF5F-\\uFF65]|\\uD800[\\uDD00-\\uDD02\\uDF9F\\uDFD0]|\\uD801\\uDD6F|\\uD802[\\uDC57\\uDD1F\\uDD3F\\uDE50-\\uDE58\\uDE7F\\uDEF0-\\uDEF6\\uDF39-\\uDF3F\\uDF99-\\uDF9C]|\\uD804[\\uDC47-\\uDC4D\\uDCBB\\uDCBC\\uDCBE-\\uDCC1\\uDD40-\\uDD43\\uDD74\\uDD75\\uDDC5-\\uDDC9\\uDDCD\\uDDDB\\uDDDD-\\uDDDF\\uDE38-\\uDE3D\\uDEA9]|\\uD805[\\uDC4B-\\uDC4F\\uDC5B\\uDC5D\\uDCC6\\uDDC1-\\uDDD7\\uDE41-\\uDE43\\uDE60-\\uDE6C\\uDF3C-\\uDF3E]|\\uD807[\\uDC41-\\uDC45\\uDC70\\uDC71]|\\uD809[\\uDC70-\\uDC74]|\\uD81A[\\uDE6E\\uDE6F\\uDEF5\\uDF37-\\uDF3B\\uDF44]|\\uD82F\\uDC9F|\\uD836[\\uDE87-\\uDE8B]|\\uD83A[\\uDD5E\\uDD5F]/},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){\"use strict\";n.r(t);var m=n(1),S=n.n(m),o=n(0),f=n.n(o),E=n(3),C=n(4),r=n(2),L=n.n(r);function i(){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}(this,i),this.callBacks=[],this.suggestionCallback=void 0,this.editorFlag=!1,this.suggestionFlag=!1,this.closeAllModals=function(t){n.callBacks.forEach(function(e){e(t)})},this.init=function(e){var t=document.getElementById(e);t&&t.addEventListener(\"click\",function(){n.editorFlag=!0}),document&&(document.addEventListener(\"click\",function(){n.editorFlag?n.editorFlag=!1:(n.closeAllModals(),n.suggestionCallback&&n.suggestionCallback())}),document.addEventListener(\"keydown\",function(e){\"Escape\"===e.key&&n.closeAllModals()}))},this.onEditorClick=function(){n.closeModals(),!n.suggestionFlag&&n.suggestionCallback?n.suggestionCallback():n.suggestionFlag=!1},this.closeModals=function(e){n.closeAllModals(e)},this.registerCallBack=function(e){n.callBacks.push(e)},this.deregisterCallBack=function(t){n.callBacks=n.callBacks.filter(function(e){return e!==t})},this.setSuggestionCallback=function(e){n.suggestionCallback=e},this.removeSuggestionCallback=function(){n.suggestionCallback=void 0},this.onSuggestionClick=function(){n.suggestionFlag=!0}}function c(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}(this,c),this.inputFocused=!1,this.editorMouseDown=!1,this.onEditorMouseDown=function(){t.editorFocused=!0},this.onInputMouseDown=function(){t.inputFocused=!0},this.isEditorBlur=function(e){return\"INPUT\"!==e.target.tagName&&\"LABEL\"!==e.target.tagName&&\"TEXTAREA\"!==e.target.tagName||t.editorFocused?!(\"INPUT\"===e.target.tagName&&\"LABEL\"===e.target.tagName&&\"TEXTAREA\"===e.target.tagName||t.inputFocused)&&!(t.editorFocused=!1):!(t.inputFocused=!1)},this.isEditorFocused=function(){return!t.inputFocused||(t.inputFocused=!1)},this.isToolbarFocused=function(){return!t.editorFocused||(t.editorFocused=!1)},this.isInputFocused=function(){return t.inputFocused}}var a,l=[],k={onKeyDown:function(t){l.forEach(function(e){e(t)})},registerCallBack:function(e){l.push(e)},deregisterCallBack:function(t){l=l.filter(function(e){return e!==t})}},g=function(){a=!0},y=function(){a=!1},s=function(){return a};function D(e){var t=e.getData()&&e.getData().get(\"text-align\");return t?\"rdw-\".concat(t,\"-aligned-block\"):\"\"}function u(e,t){if(e)for(var n in e)!{}.hasOwnProperty.call(e,n)||t(n,e[n])}function p(e,t){var n=!1;if(e)for(var o in e)if({}.hasOwnProperty.call(e,o)&&t===o){n=!0;break}return n}function d(e){e.stopPropagation()}function h(e){return e[e.options[0]].icon}function M(e,o){if(e&&void 0===o)return e;var r={};return u(e,function(e,t){var n;n=t,\"[object Object]\"===Object.prototype.toString.call(n)?r[e]=M(t,o[e]):r[e]=void 0!==o[e]?o[e]:t}),r}var b=n(6),j=n.n(b),N=n(5);n(11);function v(e){return(v=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e})(e)}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x(e,t){for(var n=0;n element; its readystatechange event will be fired asynchronously once it is inserted\n // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.\n var script = doc.createElement(\"script\");\n script.onreadystatechange = function () {\n runIfPresent(handle);\n script.onreadystatechange = null;\n html.removeChild(script);\n script = null;\n };\n html.appendChild(script);\n };\n }\n\n function installSetTimeoutImplementation() {\n registerImmediate = function(handle) {\n setTimeout(runIfPresent, 0, handle);\n };\n }\n\n // If supported, we should attach to the prototype of global, since that is where setTimeout et al. live.\n var attachTo = Object.getPrototypeOf && Object.getPrototypeOf(global);\n attachTo = attachTo && attachTo.setTimeout ? attachTo : global;\n\n // Don't get fooled by e.g. browserify environments.\n if ({}.toString.call(global.process) === \"[object process]\") {\n // For Node.js before 0.9\n installNextTickImplementation();\n\n } else if (canUsePostMessage()) {\n // For non-IE10 modern browsers\n installPostMessageImplementation();\n\n } else if (global.MessageChannel) {\n // For web workers, where supported\n installMessageChannelImplementation();\n\n } else if (doc && \"onreadystatechange\" in doc.createElement(\"script\")) {\n // For IE 6–8\n installReadyStateChangeImplementation();\n\n } else {\n // For older browsers\n installSetTimeoutImplementation();\n }\n\n attachTo.setImmediate = setImmediate;\n attachTo.clearImmediate = clearImmediate;\n}(typeof self === \"undefined\" ? typeof global === \"undefined\" ? this : global : self));\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\"), __webpack_require__(/*! ./../process/browser.js */ \"./node_modules/process/browser.js\")))\n\n//# sourceURL=webpack:///./node_modules/setimmediate/setImmediate.js?"); + +/***/ }), + /***/ "./node_modules/style-loader/lib/addStyles.js": /*!****************************************************!*\ !*** ./node_modules/style-loader/lib/addStyles.js ***! @@ -9056,6 +11149,17 @@ eval("var __WEBPACK_AMD_DEFINE_RESULT__;// TinyColor v1.4.1\n// https://github.c /***/ }), +/***/ "./node_modules/ua-parser-js/src/ua-parser.js": +/*!****************************************************!*\ + !*** ./node_modules/ua-parser-js/src/ua-parser.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var __WEBPACK_AMD_DEFINE_RESULT__;/*!\n * UAParser.js v0.7.21\n * Lightweight JavaScript-based User-Agent string parser\n * https://github.com/faisalman/ua-parser-js\n *\n * Copyright © 2012-2019 Faisal Salman \n * Licensed under MIT License\n */\n\n(function (window, undefined) {\n\n 'use strict';\n\n //////////////\n // Constants\n /////////////\n\n\n var LIBVERSION = '0.7.21',\n EMPTY = '',\n UNKNOWN = '?',\n FUNC_TYPE = 'function',\n UNDEF_TYPE = 'undefined',\n OBJ_TYPE = 'object',\n STR_TYPE = 'string',\n MAJOR = 'major', // deprecated\n MODEL = 'model',\n NAME = 'name',\n TYPE = 'type',\n VENDOR = 'vendor',\n VERSION = 'version',\n ARCHITECTURE= 'architecture',\n CONSOLE = 'console',\n MOBILE = 'mobile',\n TABLET = 'tablet',\n SMARTTV = 'smarttv',\n WEARABLE = 'wearable',\n EMBEDDED = 'embedded';\n\n\n ///////////\n // Helper\n //////////\n\n\n var util = {\n extend : function (regexes, extensions) {\n var mergedRegexes = {};\n for (var i in regexes) {\n if (extensions[i] && extensions[i].length % 2 === 0) {\n mergedRegexes[i] = extensions[i].concat(regexes[i]);\n } else {\n mergedRegexes[i] = regexes[i];\n }\n }\n return mergedRegexes;\n },\n has : function (str1, str2) {\n if (typeof str1 === \"string\") {\n return str2.toLowerCase().indexOf(str1.toLowerCase()) !== -1;\n } else {\n return false;\n }\n },\n lowerize : function (str) {\n return str.toLowerCase();\n },\n major : function (version) {\n return typeof(version) === STR_TYPE ? version.replace(/[^\\d\\.]/g,'').split(\".\")[0] : undefined;\n },\n trim : function (str) {\n return str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n }\n };\n\n\n ///////////////\n // Map helper\n //////////////\n\n\n var mapper = {\n\n rgx : function (ua, arrays) {\n\n var i = 0, j, k, p, q, matches, match;\n\n // loop through all regexes maps\n while (i < arrays.length && !matches) {\n\n var regex = arrays[i], // even sequence (0,2,4,..)\n props = arrays[i + 1]; // odd sequence (1,3,5,..)\n j = k = 0;\n\n // try matching uastring with regexes\n while (j < regex.length && !matches) {\n\n matches = regex[j++].exec(ua);\n\n if (!!matches) {\n for (p = 0; p < props.length; p++) {\n match = matches[++k];\n q = props[p];\n // check if given property is actually array\n if (typeof q === OBJ_TYPE && q.length > 0) {\n if (q.length == 2) {\n if (typeof q[1] == FUNC_TYPE) {\n // assign modified match\n this[q[0]] = q[1].call(this, match);\n } else {\n // assign given value, ignore regex match\n this[q[0]] = q[1];\n }\n } else if (q.length == 3) {\n // check whether function or regex\n if (typeof q[1] === FUNC_TYPE && !(q[1].exec && q[1].test)) {\n // call function (usually string mapper)\n this[q[0]] = match ? q[1].call(this, match, q[2]) : undefined;\n } else {\n // sanitize match using given regex\n this[q[0]] = match ? match.replace(q[1], q[2]) : undefined;\n }\n } else if (q.length == 4) {\n this[q[0]] = match ? q[3].call(this, match.replace(q[1], q[2])) : undefined;\n }\n } else {\n this[q] = match ? match : undefined;\n }\n }\n }\n }\n i += 2;\n }\n },\n\n str : function (str, map) {\n\n for (var i in map) {\n // check if array\n if (typeof map[i] === OBJ_TYPE && map[i].length > 0) {\n for (var j = 0; j < map[i].length; j++) {\n if (util.has(map[i][j], str)) {\n return (i === UNKNOWN) ? undefined : i;\n }\n }\n } else if (util.has(map[i], str)) {\n return (i === UNKNOWN) ? undefined : i;\n }\n }\n return str;\n }\n };\n\n\n ///////////////\n // String map\n //////////////\n\n\n var maps = {\n\n browser : {\n oldsafari : {\n version : {\n '1.0' : '/8',\n '1.2' : '/1',\n '1.3' : '/3',\n '2.0' : '/412',\n '2.0.2' : '/416',\n '2.0.3' : '/417',\n '2.0.4' : '/419',\n '?' : '/'\n }\n }\n },\n\n device : {\n amazon : {\n model : {\n 'Fire Phone' : ['SD', 'KF']\n }\n },\n sprint : {\n model : {\n 'Evo Shift 4G' : '7373KT'\n },\n vendor : {\n 'HTC' : 'APA',\n 'Sprint' : 'Sprint'\n }\n }\n },\n\n os : {\n windows : {\n version : {\n 'ME' : '4.90',\n 'NT 3.11' : 'NT3.51',\n 'NT 4.0' : 'NT4.0',\n '2000' : 'NT 5.0',\n 'XP' : ['NT 5.1', 'NT 5.2'],\n 'Vista' : 'NT 6.0',\n '7' : 'NT 6.1',\n '8' : 'NT 6.2',\n '8.1' : 'NT 6.3',\n '10' : ['NT 6.4', 'NT 10.0'],\n 'RT' : 'ARM'\n }\n }\n }\n };\n\n\n //////////////\n // Regex map\n /////////////\n\n\n var regexes = {\n\n browser : [[\n\n // Presto based\n /(opera\\smini)\\/([\\w\\.-]+)/i, // Opera Mini\n /(opera\\s[mobiletab]+).+version\\/([\\w\\.-]+)/i, // Opera Mobi/Tablet\n /(opera).+version\\/([\\w\\.]+)/i, // Opera > 9.80\n /(opera)[\\/\\s]+([\\w\\.]+)/i // Opera < 9.80\n ], [NAME, VERSION], [\n\n /(opios)[\\/\\s]+([\\w\\.]+)/i // Opera mini on iphone >= 8.0\n ], [[NAME, 'Opera Mini'], VERSION], [\n\n /\\s(opr)\\/([\\w\\.]+)/i // Opera Webkit\n ], [[NAME, 'Opera'], VERSION], [\n\n // Mixed\n /(kindle)\\/([\\w\\.]+)/i, // Kindle\n /(lunascape|maxthon|netfront|jasmine|blazer)[\\/\\s]?([\\w\\.]*)/i,\n // Lunascape/Maxthon/Netfront/Jasmine/Blazer\n // Trident based\n /(avant\\s|iemobile|slim)(?:browser)?[\\/\\s]?([\\w\\.]*)/i,\n // Avant/IEMobile/SlimBrowser\n /(bidubrowser|baidubrowser)[\\/\\s]?([\\w\\.]+)/i, // Baidu Browser\n /(?:ms|\\()(ie)\\s([\\w\\.]+)/i, // Internet Explorer\n\n // Webkit/KHTML based\n /(rekonq)\\/([\\w\\.]*)/i, // Rekonq\n /(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon)\\/([\\w\\.-]+)/i\n // Chromium/Flock/RockMelt/Midori/Epiphany/Silk/Skyfire/Bolt/Iron/Iridium/PhantomJS/Bowser/QupZilla/Falkon\n ], [NAME, VERSION], [\n\n /(konqueror)\\/([\\w\\.]+)/i // Konqueror\n ], [[NAME, 'Konqueror'], VERSION], [\n\n /(trident).+rv[:\\s]([\\w\\.]+).+like\\sgecko/i // IE11\n ], [[NAME, 'IE'], VERSION], [\n\n /(edge|edgios|edga|edg)\\/((\\d+)?[\\w\\.]+)/i // Microsoft Edge\n ], [[NAME, 'Edge'], VERSION], [\n\n /(yabrowser)\\/([\\w\\.]+)/i // Yandex\n ], [[NAME, 'Yandex'], VERSION], [\n\n /(Avast)\\/([\\w\\.]+)/i // Avast Secure Browser\n ], [[NAME, 'Avast Secure Browser'], VERSION], [\n\n /(AVG)\\/([\\w\\.]+)/i // AVG Secure Browser\n ], [[NAME, 'AVG Secure Browser'], VERSION], [\n\n /(puffin)\\/([\\w\\.]+)/i // Puffin\n ], [[NAME, 'Puffin'], VERSION], [\n\n /(focus)\\/([\\w\\.]+)/i // Firefox Focus\n ], [[NAME, 'Firefox Focus'], VERSION], [\n\n /(opt)\\/([\\w\\.]+)/i // Opera Touch\n ], [[NAME, 'Opera Touch'], VERSION], [\n\n /((?:[\\s\\/])uc?\\s?browser|(?:juc.+)ucweb)[\\/\\s]?([\\w\\.]+)/i // UCBrowser\n ], [[NAME, 'UCBrowser'], VERSION], [\n\n /(comodo_dragon)\\/([\\w\\.]+)/i // Comodo Dragon\n ], [[NAME, /_/g, ' '], VERSION], [\n\n /(windowswechat qbcore)\\/([\\w\\.]+)/i // WeChat Desktop for Windows Built-in Browser\n ], [[NAME, 'WeChat(Win) Desktop'], VERSION], [\n\n /(micromessenger)\\/([\\w\\.]+)/i // WeChat\n ], [[NAME, 'WeChat'], VERSION], [\n\n /(brave)\\/([\\w\\.]+)/i // Brave browser\n ], [[NAME, 'Brave'], VERSION], [\n\n /(qqbrowserlite)\\/([\\w\\.]+)/i // QQBrowserLite\n ], [NAME, VERSION], [\n\n /(QQ)\\/([\\d\\.]+)/i // QQ, aka ShouQ\n ], [NAME, VERSION], [\n\n /m?(qqbrowser)[\\/\\s]?([\\w\\.]+)/i // QQBrowser\n ], [NAME, VERSION], [\n\n /(baiduboxapp)[\\/\\s]?([\\w\\.]+)/i // Baidu App\n ], [NAME, VERSION], [\n\n /(2345Explorer)[\\/\\s]?([\\w\\.]+)/i // 2345 Browser\n ], [NAME, VERSION], [\n\n /(MetaSr)[\\/\\s]?([\\w\\.]+)/i // SouGouBrowser\n ], [NAME], [\n\n /(LBBROWSER)/i // LieBao Browser\n ], [NAME], [\n\n /xiaomi\\/miuibrowser\\/([\\w\\.]+)/i // MIUI Browser\n ], [VERSION, [NAME, 'MIUI Browser']], [\n\n /;fbav\\/([\\w\\.]+);/i // Facebook App for iOS & Android\n ], [VERSION, [NAME, 'Facebook']], [\n\n /safari\\s(line)\\/([\\w\\.]+)/i, // Line App for iOS\n /android.+(line)\\/([\\w\\.]+)\\/iab/i // Line App for Android\n ], [NAME, VERSION], [\n\n /headlesschrome(?:\\/([\\w\\.]+)|\\s)/i // Chrome Headless\n ], [VERSION, [NAME, 'Chrome Headless']], [\n\n /\\swv\\).+(chrome)\\/([\\w\\.]+)/i // Chrome WebView\n ], [[NAME, /(.+)/, '$1 WebView'], VERSION], [\n\n /((?:oculus|samsung)browser)\\/([\\w\\.]+)/i\n ], [[NAME, /(.+(?:g|us))(.+)/, '$1 $2'], VERSION], [ // Oculus / Samsung Browser\n\n /android.+version\\/([\\w\\.]+)\\s+(?:mobile\\s?safari|safari)*/i // Android Browser\n ], [VERSION, [NAME, 'Android Browser']], [\n\n /(sailfishbrowser)\\/([\\w\\.]+)/i // Sailfish Browser\n ], [[NAME, 'Sailfish Browser'], VERSION], [\n\n /(chrome|omniweb|arora|[tizenoka]{5}\\s?browser)\\/v?([\\w\\.]+)/i\n // Chrome/OmniWeb/Arora/Tizen/Nokia\n ], [NAME, VERSION], [\n\n /(dolfin)\\/([\\w\\.]+)/i // Dolphin\n ], [[NAME, 'Dolphin'], VERSION], [\n\n /(qihu|qhbrowser|qihoobrowser|360browser)/i // 360\n ], [[NAME, '360 Browser']], [\n\n /((?:android.+)crmo|crios)\\/([\\w\\.]+)/i // Chrome for Android/iOS\n ], [[NAME, 'Chrome'], VERSION], [\n\n /(coast)\\/([\\w\\.]+)/i // Opera Coast\n ], [[NAME, 'Opera Coast'], VERSION], [\n\n /fxios\\/([\\w\\.-]+)/i // Firefox for iOS\n ], [VERSION, [NAME, 'Firefox']], [\n\n /version\\/([\\w\\.]+).+?mobile\\/\\w+\\s(safari)/i // Mobile Safari\n ], [VERSION, [NAME, 'Mobile Safari']], [\n\n /version\\/([\\w\\.]+).+?(mobile\\s?safari|safari)/i // Safari & Safari Mobile\n ], [VERSION, NAME], [\n\n /webkit.+?(gsa)\\/([\\w\\.]+).+?(mobile\\s?safari|safari)(\\/[\\w\\.]+)/i // Google Search Appliance on iOS\n ], [[NAME, 'GSA'], VERSION], [\n\n /webkit.+?(mobile\\s?safari|safari)(\\/[\\w\\.]+)/i // Safari < 3.0\n ], [NAME, [VERSION, mapper.str, maps.browser.oldsafari.version]], [\n\n /(webkit|khtml)\\/([\\w\\.]+)/i\n ], [NAME, VERSION], [\n\n // Gecko based\n /(navigator|netscape)\\/([\\w\\.-]+)/i // Netscape\n ], [[NAME, 'Netscape'], VERSION], [\n /(swiftfox)/i, // Swiftfox\n /(icedragon|iceweasel|camino|chimera|fennec|maemo\\sbrowser|minimo|conkeror)[\\/\\s]?([\\w\\.\\+]+)/i,\n // IceDragon/Iceweasel/Camino/Chimera/Fennec/Maemo/Minimo/Conkeror\n /(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\\/([\\w\\.-]+)$/i,\n\n // Firefox/SeaMonkey/K-Meleon/IceCat/IceApe/Firebird/Phoenix\n /(mozilla)\\/([\\w\\.]+).+rv\\:.+gecko\\/\\d+/i, // Mozilla\n\n // Other\n /(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir)[\\/\\s]?([\\w\\.]+)/i,\n // Polaris/Lynx/Dillo/iCab/Doris/Amaya/w3m/NetSurf/Sleipnir\n /(links)\\s\\(([\\w\\.]+)/i, // Links\n /(gobrowser)\\/?([\\w\\.]*)/i, // GoBrowser\n /(ice\\s?browser)\\/v?([\\w\\._]+)/i, // ICE Browser\n /(mosaic)[\\/\\s]([\\w\\.]+)/i // Mosaic\n ], [NAME, VERSION]\n ],\n\n cpu : [[\n\n /(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\\)]/i // AMD64\n ], [[ARCHITECTURE, 'amd64']], [\n\n /(ia32(?=;))/i // IA32 (quicktime)\n ], [[ARCHITECTURE, util.lowerize]], [\n\n /((?:i[346]|x)86)[;\\)]/i // IA32\n ], [[ARCHITECTURE, 'ia32']], [\n\n // PocketPC mistakenly identified as PowerPC\n /windows\\s(ce|mobile);\\sppc;/i\n ], [[ARCHITECTURE, 'arm']], [\n\n /((?:ppc|powerpc)(?:64)?)(?:\\smac|;|\\))/i // PowerPC\n ], [[ARCHITECTURE, /ower/, '', util.lowerize]], [\n\n /(sun4\\w)[;\\)]/i // SPARC\n ], [[ARCHITECTURE, 'sparc']], [\n\n /((?:avr32|ia64(?=;))|68k(?=\\))|arm(?:64|(?=v\\d+[;l]))|(?=atmel\\s)avr|(?:irix|mips|sparc)(?:64)?(?=;)|pa-risc)/i\n // IA64, 68K, ARM/64, AVR/32, IRIX/64, MIPS/64, SPARC/64, PA-RISC\n ], [[ARCHITECTURE, util.lowerize]]\n ],\n\n device : [[\n\n /\\((ipad|playbook);[\\w\\s\\),;-]+(rim|apple)/i // iPad/PlayBook\n ], [MODEL, VENDOR, [TYPE, TABLET]], [\n\n /applecoremedia\\/[\\w\\.]+ \\((ipad)/ // iPad\n ], [MODEL, [VENDOR, 'Apple'], [TYPE, TABLET]], [\n\n /(apple\\s{0,1}tv)/i // Apple TV\n ], [[MODEL, 'Apple TV'], [VENDOR, 'Apple'], [TYPE, SMARTTV]], [\n\n /(archos)\\s(gamepad2?)/i, // Archos\n /(hp).+(touchpad)/i, // HP TouchPad\n /(hp).+(tablet)/i, // HP Tablet\n /(kindle)\\/([\\w\\.]+)/i, // Kindle\n /\\s(nook)[\\w\\s]+build\\/(\\w+)/i, // Nook\n /(dell)\\s(strea[kpr\\s\\d]*[\\dko])/i // Dell Streak\n ], [VENDOR, MODEL, [TYPE, TABLET]], [\n\n /(kf[A-z]+)\\sbuild\\/.+silk\\//i // Kindle Fire HD\n ], [MODEL, [VENDOR, 'Amazon'], [TYPE, TABLET]], [\n /(sd|kf)[0349hijorstuw]+\\sbuild\\/.+silk\\//i // Fire Phone\n ], [[MODEL, mapper.str, maps.device.amazon.model], [VENDOR, 'Amazon'], [TYPE, MOBILE]], [\n /android.+aft([bms])\\sbuild/i // Fire TV\n ], [MODEL, [VENDOR, 'Amazon'], [TYPE, SMARTTV]], [\n\n /\\((ip[honed|\\s\\w*]+);.+(apple)/i // iPod/iPhone\n ], [MODEL, VENDOR, [TYPE, MOBILE]], [\n /\\((ip[honed|\\s\\w*]+);/i // iPod/iPhone\n ], [MODEL, [VENDOR, 'Apple'], [TYPE, MOBILE]], [\n\n /(blackberry)[\\s-]?(\\w+)/i, // BlackBerry\n /(blackberry|benq|palm(?=\\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[\\s_-]?([\\w-]*)/i,\n // BenQ/Palm/Sony-Ericsson/Acer/Asus/Dell/Meizu/Motorola/Polytron\n /(hp)\\s([\\w\\s]+\\w)/i, // HP iPAQ\n /(asus)-?(\\w+)/i // Asus\n ], [VENDOR, MODEL, [TYPE, MOBILE]], [\n /\\(bb10;\\s(\\w+)/i // BlackBerry 10\n ], [MODEL, [VENDOR, 'BlackBerry'], [TYPE, MOBILE]], [\n // Asus Tablets\n /android.+(transfo[prime\\s]{4,10}\\s\\w+|eeepc|slider\\s\\w+|nexus 7|padfone|p00c)/i\n ], [MODEL, [VENDOR, 'Asus'], [TYPE, TABLET]], [\n\n /(sony)\\s(tablet\\s[ps])\\sbuild\\//i, // Sony\n /(sony)?(?:sgp.+)\\sbuild\\//i\n ], [[VENDOR, 'Sony'], [MODEL, 'Xperia Tablet'], [TYPE, TABLET]], [\n /android.+\\s([c-g]\\d{4}|so[-l]\\w+)(?=\\sbuild\\/|\\).+chrome\\/(?![1-6]{0,1}\\d\\.))/i\n ], [MODEL, [VENDOR, 'Sony'], [TYPE, MOBILE]], [\n\n /\\s(ouya)\\s/i, // Ouya\n /(nintendo)\\s([wids3u]+)/i // Nintendo\n ], [VENDOR, MODEL, [TYPE, CONSOLE]], [\n\n /android.+;\\s(shield)\\sbuild/i // Nvidia\n ], [MODEL, [VENDOR, 'Nvidia'], [TYPE, CONSOLE]], [\n\n /(playstation\\s[34portablevi]+)/i // Playstation\n ], [MODEL, [VENDOR, 'Sony'], [TYPE, CONSOLE]], [\n\n /(sprint\\s(\\w+))/i // Sprint Phones\n ], [[VENDOR, mapper.str, maps.device.sprint.vendor], [MODEL, mapper.str, maps.device.sprint.model], [TYPE, MOBILE]], [\n\n /(htc)[;_\\s-]+([\\w\\s]+(?=\\)|\\sbuild)|\\w+)/i, // HTC\n /(zte)-(\\w*)/i, // ZTE\n /(alcatel|geeksphone|nexian|panasonic|(?=;\\s)sony)[_\\s-]?([\\w-]*)/i\n // Alcatel/GeeksPhone/Nexian/Panasonic/Sony\n ], [VENDOR, [MODEL, /_/g, ' '], [TYPE, MOBILE]], [\n\n /(nexus\\s9)/i // HTC Nexus 9\n ], [MODEL, [VENDOR, 'HTC'], [TYPE, TABLET]], [\n\n /d\\/huawei([\\w\\s-]+)[;\\)]/i,\n /(nexus\\s6p|vog-l29|ane-lx1|eml-l29)/i // Huawei\n ], [MODEL, [VENDOR, 'Huawei'], [TYPE, MOBILE]], [\n\n /android.+(bah2?-a?[lw]\\d{2})/i // Huawei MediaPad\n ], [MODEL, [VENDOR, 'Huawei'], [TYPE, TABLET]], [\n\n /(microsoft);\\s(lumia[\\s\\w]+)/i // Microsoft Lumia\n ], [VENDOR, MODEL, [TYPE, MOBILE]], [\n\n /[\\s\\(;](xbox(?:\\sone)?)[\\s\\);]/i // Microsoft Xbox\n ], [MODEL, [VENDOR, 'Microsoft'], [TYPE, CONSOLE]], [\n /(kin\\.[onetw]{3})/i // Microsoft Kin\n ], [[MODEL, /\\./g, ' '], [VENDOR, 'Microsoft'], [TYPE, MOBILE]], [\n\n // Motorola\n /\\s(milestone|droid(?:[2-4x]|\\s(?:bionic|x2|pro|razr))?:?(\\s4g)?)[\\w\\s]+build\\//i,\n /mot[\\s-]?(\\w*)/i,\n /(XT\\d{3,4}) build\\//i,\n /(nexus\\s6)/i\n ], [MODEL, [VENDOR, 'Motorola'], [TYPE, MOBILE]], [\n /android.+\\s(mz60\\d|xoom[\\s2]{0,2})\\sbuild\\//i\n ], [MODEL, [VENDOR, 'Motorola'], [TYPE, TABLET]], [\n\n /hbbtv\\/\\d+\\.\\d+\\.\\d+\\s+\\([\\w\\s]*;\\s*(\\w[^;]*);([^;]*)/i // HbbTV devices\n ], [[VENDOR, util.trim], [MODEL, util.trim], [TYPE, SMARTTV]], [\n\n /hbbtv.+maple;(\\d+)/i\n ], [[MODEL, /^/, 'SmartTV'], [VENDOR, 'Samsung'], [TYPE, SMARTTV]], [\n\n /\\(dtv[\\);].+(aquos)/i // Sharp\n ], [MODEL, [VENDOR, 'Sharp'], [TYPE, SMARTTV]], [\n\n /android.+((sch-i[89]0\\d|shw-m380s|gt-p\\d{4}|gt-n\\d+|sgh-t8[56]9|nexus 10))/i,\n /((SM-T\\w+))/i\n ], [[VENDOR, 'Samsung'], MODEL, [TYPE, TABLET]], [ // Samsung\n /smart-tv.+(samsung)/i\n ], [VENDOR, [TYPE, SMARTTV], MODEL], [\n /((s[cgp]h-\\w+|gt-\\w+|galaxy\\snexus|sm-\\w[\\w\\d]+))/i,\n /(sam[sung]*)[\\s-]*(\\w+-?[\\w-]*)/i,\n /sec-((sgh\\w+))/i\n ], [[VENDOR, 'Samsung'], MODEL, [TYPE, MOBILE]], [\n\n /sie-(\\w*)/i // Siemens\n ], [MODEL, [VENDOR, 'Siemens'], [TYPE, MOBILE]], [\n\n /(maemo|nokia).*(n900|lumia\\s\\d+)/i, // Nokia\n /(nokia)[\\s_-]?([\\w-]*)/i\n ], [[VENDOR, 'Nokia'], MODEL, [TYPE, MOBILE]], [\n\n /android[x\\d\\.\\s;]+\\s([ab][1-7]\\-?[0178a]\\d\\d?)/i // Acer\n ], [MODEL, [VENDOR, 'Acer'], [TYPE, TABLET]], [\n\n /android.+([vl]k\\-?\\d{3})\\s+build/i // LG Tablet\n ], [MODEL, [VENDOR, 'LG'], [TYPE, TABLET]], [\n /android\\s3\\.[\\s\\w;-]{10}(lg?)-([06cv9]{3,4})/i // LG Tablet\n ], [[VENDOR, 'LG'], MODEL, [TYPE, TABLET]], [\n /(lg) netcast\\.tv/i // LG SmartTV\n ], [VENDOR, MODEL, [TYPE, SMARTTV]], [\n /(nexus\\s[45])/i, // LG\n /lg[e;\\s\\/-]+(\\w*)/i,\n /android.+lg(\\-?[\\d\\w]+)\\s+build/i\n ], [MODEL, [VENDOR, 'LG'], [TYPE, MOBILE]], [\n\n /(lenovo)\\s?(s(?:5000|6000)(?:[\\w-]+)|tab(?:[\\s\\w]+))/i // Lenovo tablets\n ], [VENDOR, MODEL, [TYPE, TABLET]], [\n /android.+(ideatab[a-z0-9\\-\\s]+)/i // Lenovo\n ], [MODEL, [VENDOR, 'Lenovo'], [TYPE, TABLET]], [\n /(lenovo)[_\\s-]?([\\w-]+)/i\n ], [VENDOR, MODEL, [TYPE, MOBILE]], [\n\n /linux;.+((jolla));/i // Jolla\n ], [VENDOR, MODEL, [TYPE, MOBILE]], [\n\n /((pebble))app\\/[\\d\\.]+\\s/i // Pebble\n ], [VENDOR, MODEL, [TYPE, WEARABLE]], [\n\n /android.+;\\s(oppo)\\s?([\\w\\s]+)\\sbuild/i // OPPO\n ], [VENDOR, MODEL, [TYPE, MOBILE]], [\n\n /crkey/i // Google Chromecast\n ], [[MODEL, 'Chromecast'], [VENDOR, 'Google'], [TYPE, SMARTTV]], [\n\n /android.+;\\s(glass)\\s\\d/i // Google Glass\n ], [MODEL, [VENDOR, 'Google'], [TYPE, WEARABLE]], [\n\n /android.+;\\s(pixel c)[\\s)]/i // Google Pixel C\n ], [MODEL, [VENDOR, 'Google'], [TYPE, TABLET]], [\n\n /android.+;\\s(pixel( [23])?( xl)?)[\\s)]/i // Google Pixel\n ], [MODEL, [VENDOR, 'Google'], [TYPE, MOBILE]], [\n\n /android.+;\\s(\\w+)\\s+build\\/hm\\1/i, // Xiaomi Hongmi 'numeric' models\n /android.+(hm[\\s\\-_]*note?[\\s_]*(?:\\d\\w)?)\\s+build/i, // Xiaomi Hongmi\n /android.+(mi[\\s\\-_]*(?:a\\d|one|one[\\s_]plus|note lte)?[\\s_]*(?:\\d?\\w?)[\\s_]*(?:plus)?)\\s+build/i, \n // Xiaomi Mi\n /android.+(redmi[\\s\\-_]*(?:note)?(?:[\\s_]*[\\w\\s]+))\\s+build/i // Redmi Phones\n ], [[MODEL, /_/g, ' '], [VENDOR, 'Xiaomi'], [TYPE, MOBILE]], [\n /android.+(mi[\\s\\-_]*(?:pad)(?:[\\s_]*[\\w\\s]+))\\s+build/i // Mi Pad tablets\n ],[[MODEL, /_/g, ' '], [VENDOR, 'Xiaomi'], [TYPE, TABLET]], [\n /android.+;\\s(m[1-5]\\snote)\\sbuild/i // Meizu\n ], [MODEL, [VENDOR, 'Meizu'], [TYPE, MOBILE]], [\n /(mz)-([\\w-]{2,})/i\n ], [[VENDOR, 'Meizu'], MODEL, [TYPE, MOBILE]], [\n\n /android.+a000(1)\\s+build/i, // OnePlus\n /android.+oneplus\\s(a\\d{4})[\\s)]/i\n ], [MODEL, [VENDOR, 'OnePlus'], [TYPE, MOBILE]], [\n\n /android.+[;\\/]\\s*(RCT[\\d\\w]+)\\s+build/i // RCA Tablets\n ], [MODEL, [VENDOR, 'RCA'], [TYPE, TABLET]], [\n\n /android.+[;\\/\\s]+(Venue[\\d\\s]{2,7})\\s+build/i // Dell Venue Tablets\n ], [MODEL, [VENDOR, 'Dell'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(Q[T|M][\\d\\w]+)\\s+build/i // Verizon Tablet\n ], [MODEL, [VENDOR, 'Verizon'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s+(Barnes[&\\s]+Noble\\s+|BN[RT])(V?.*)\\s+build/i // Barnes & Noble Tablet\n ], [[VENDOR, 'Barnes & Noble'], MODEL, [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s+(TM\\d{3}.*\\b)\\s+build/i // Barnes & Noble Tablet\n ], [MODEL, [VENDOR, 'NuVision'], [TYPE, TABLET]], [\n\n /android.+;\\s(k88)\\sbuild/i // ZTE K Series Tablet\n ], [MODEL, [VENDOR, 'ZTE'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(gen\\d{3})\\s+build.*49h/i // Swiss GEN Mobile\n ], [MODEL, [VENDOR, 'Swiss'], [TYPE, MOBILE]], [\n\n /android.+[;\\/]\\s*(zur\\d{3})\\s+build/i // Swiss ZUR Tablet\n ], [MODEL, [VENDOR, 'Swiss'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*((Zeki)?TB.*\\b)\\s+build/i // Zeki Tablets\n ], [MODEL, [VENDOR, 'Zeki'], [TYPE, TABLET]], [\n\n /(android).+[;\\/]\\s+([YR]\\d{2})\\s+build/i,\n /android.+[;\\/]\\s+(Dragon[\\-\\s]+Touch\\s+|DT)(\\w{5})\\sbuild/i // Dragon Touch Tablet\n ], [[VENDOR, 'Dragon Touch'], MODEL, [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(NS-?\\w{0,9})\\sbuild/i // Insignia Tablets\n ], [MODEL, [VENDOR, 'Insignia'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*((NX|Next)-?\\w{0,9})\\s+build/i // NextBook Tablets\n ], [MODEL, [VENDOR, 'NextBook'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(Xtreme\\_)?(V(1[045]|2[015]|30|40|60|7[05]|90))\\s+build/i\n ], [[VENDOR, 'Voice'], MODEL, [TYPE, MOBILE]], [ // Voice Xtreme Phones\n\n /android.+[;\\/]\\s*(LVTEL\\-)?(V1[12])\\s+build/i // LvTel Phones\n ], [[VENDOR, 'LvTel'], MODEL, [TYPE, MOBILE]], [\n\n /android.+;\\s(PH-1)\\s/i\n ], [MODEL, [VENDOR, 'Essential'], [TYPE, MOBILE]], [ // Essential PH-1\n\n /android.+[;\\/]\\s*(V(100MD|700NA|7011|917G).*\\b)\\s+build/i // Envizen Tablets\n ], [MODEL, [VENDOR, 'Envizen'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(Le[\\s\\-]+Pan)[\\s\\-]+(\\w{1,9})\\s+build/i // Le Pan Tablets\n ], [VENDOR, MODEL, [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(Trio[\\s\\-]*.*)\\s+build/i // MachSpeed Tablets\n ], [MODEL, [VENDOR, 'MachSpeed'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(Trinity)[\\-\\s]*(T\\d{3})\\s+build/i // Trinity Tablets\n ], [VENDOR, MODEL, [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*TU_(1491)\\s+build/i // Rotor Tablets\n ], [MODEL, [VENDOR, 'Rotor'], [TYPE, TABLET]], [\n\n /android.+(KS(.+))\\s+build/i // Amazon Kindle Tablets\n ], [MODEL, [VENDOR, 'Amazon'], [TYPE, TABLET]], [\n\n /android.+(Gigaset)[\\s\\-]+(Q\\w{1,9})\\s+build/i // Gigaset Tablets\n ], [VENDOR, MODEL, [TYPE, TABLET]], [\n\n /\\s(tablet|tab)[;\\/]/i, // Unidentifiable Tablet\n /\\s(mobile)(?:[;\\/]|\\ssafari)/i // Unidentifiable Mobile\n ], [[TYPE, util.lowerize], VENDOR, MODEL], [\n\n /[\\s\\/\\(](smart-?tv)[;\\)]/i // SmartTV\n ], [[TYPE, SMARTTV]], [\n\n /(android[\\w\\.\\s\\-]{0,9});.+build/i // Generic Android Device\n ], [MODEL, [VENDOR, 'Generic']]\n ],\n\n engine : [[\n\n /windows.+\\sedge\\/([\\w\\.]+)/i // EdgeHTML\n ], [VERSION, [NAME, 'EdgeHTML']], [\n\n /webkit\\/537\\.36.+chrome\\/(?!27)([\\w\\.]+)/i // Blink\n ], [VERSION, [NAME, 'Blink']], [\n\n /(presto)\\/([\\w\\.]+)/i, // Presto\n /(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\\/([\\w\\.]+)/i, \n // WebKit/Trident/NetFront/NetSurf/Amaya/Lynx/w3m/Goanna\n /(khtml|tasman|links)[\\/\\s]\\(?([\\w\\.]+)/i, // KHTML/Tasman/Links\n /(icab)[\\/\\s]([23]\\.[\\d\\.]+)/i // iCab\n ], [NAME, VERSION], [\n\n /rv\\:([\\w\\.]{1,9}).+(gecko)/i // Gecko\n ], [VERSION, NAME]\n ],\n\n os : [[\n\n // Windows based\n /microsoft\\s(windows)\\s(vista|xp)/i // Windows (iTunes)\n ], [NAME, VERSION], [\n /(windows)\\snt\\s6\\.2;\\s(arm)/i, // Windows RT\n /(windows\\sphone(?:\\sos)*)[\\s\\/]?([\\d\\.\\s\\w]*)/i, // Windows Phone\n /(windows\\smobile|windows)[\\s\\/]?([ntce\\d\\.\\s]+\\w)/i\n ], [NAME, [VERSION, mapper.str, maps.os.windows.version]], [\n /(win(?=3|9|n)|win\\s9x\\s)([nt\\d\\.]+)/i\n ], [[NAME, 'Windows'], [VERSION, mapper.str, maps.os.windows.version]], [\n\n // Mobile/Embedded OS\n /\\((bb)(10);/i // BlackBerry 10\n ], [[NAME, 'BlackBerry'], VERSION], [\n /(blackberry)\\w*\\/?([\\w\\.]*)/i, // Blackberry\n /(tizen|kaios)[\\/\\s]([\\w\\.]+)/i, // Tizen/KaiOS\n /(android|webos|palm\\sos|qnx|bada|rim\\stablet\\sos|meego|sailfish|contiki)[\\/\\s-]?([\\w\\.]*)/i\n // Android/WebOS/Palm/QNX/Bada/RIM/MeeGo/Contiki/Sailfish OS\n ], [NAME, VERSION], [\n /(symbian\\s?os|symbos|s60(?=;))[\\/\\s-]?([\\w\\.]*)/i // Symbian\n ], [[NAME, 'Symbian'], VERSION], [\n /\\((series40);/i // Series 40\n ], [NAME], [\n /mozilla.+\\(mobile;.+gecko.+firefox/i // Firefox OS\n ], [[NAME, 'Firefox OS'], VERSION], [\n\n // Console\n /(nintendo|playstation)\\s([wids34portablevu]+)/i, // Nintendo/Playstation\n\n // GNU/Linux based\n /(mint)[\\/\\s\\(]?(\\w*)/i, // Mint\n /(mageia|vectorlinux)[;\\s]/i, // Mageia/VectorLinux\n /(joli|[kxln]?ubuntu|debian|suse|opensuse|gentoo|(?=\\s)arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus)[\\/\\s-]?(?!chrom)([\\w\\.-]*)/i,\n // Joli/Ubuntu/Debian/SUSE/Gentoo/Arch/Slackware\n // Fedora/Mandriva/CentOS/PCLinuxOS/RedHat/Zenwalk/Linpus\n /(hurd|linux)\\s?([\\w\\.]*)/i, // Hurd/Linux\n /(gnu)\\s?([\\w\\.]*)/i // GNU\n ], [NAME, VERSION], [\n\n /(cros)\\s[\\w]+\\s([\\w\\.]+\\w)/i // Chromium OS\n ], [[NAME, 'Chromium OS'], VERSION],[\n\n // Solaris\n /(sunos)\\s?([\\w\\.\\d]*)/i // Solaris\n ], [[NAME, 'Solaris'], VERSION], [\n\n // BSD based\n /\\s([frentopc-]{0,4}bsd|dragonfly)\\s?([\\w\\.]*)/i // FreeBSD/NetBSD/OpenBSD/PC-BSD/DragonFly\n ], [NAME, VERSION],[\n\n /(haiku)\\s(\\w+)/i // Haiku\n ], [NAME, VERSION],[\n\n /cfnetwork\\/.+darwin/i,\n /ip[honead]{2,4}(?:.*os\\s([\\w]+)\\slike\\smac|;\\sopera)/i // iOS\n ], [[VERSION, /_/g, '.'], [NAME, 'iOS']], [\n\n /(mac\\sos\\sx)\\s?([\\w\\s\\.]*)/i,\n /(macintosh|mac(?=_powerpc)\\s)/i // Mac OS\n ], [[NAME, 'Mac OS'], [VERSION, /_/g, '.']], [\n\n // Other\n /((?:open)?solaris)[\\/\\s-]?([\\w\\.]*)/i, // Solaris\n /(aix)\\s((\\d)(?=\\.|\\)|\\s)[\\w\\.])*/i, // AIX\n /(plan\\s9|minix|beos|os\\/2|amigaos|morphos|risc\\sos|openvms|fuchsia)/i,\n // Plan9/Minix/BeOS/OS2/AmigaOS/MorphOS/RISCOS/OpenVMS/Fuchsia\n /(unix)\\s?([\\w\\.]*)/i // UNIX\n ], [NAME, VERSION]\n ]\n };\n\n\n /////////////////\n // Constructor\n ////////////////\n var UAParser = function (uastring, extensions) {\n\n if (typeof uastring === 'object') {\n extensions = uastring;\n uastring = undefined;\n }\n\n if (!(this instanceof UAParser)) {\n return new UAParser(uastring, extensions).getResult();\n }\n\n var ua = uastring || ((window && window.navigator && window.navigator.userAgent) ? window.navigator.userAgent : EMPTY);\n var rgxmap = extensions ? util.extend(regexes, extensions) : regexes;\n\n this.getBrowser = function () {\n var browser = { name: undefined, version: undefined };\n mapper.rgx.call(browser, ua, rgxmap.browser);\n browser.major = util.major(browser.version); // deprecated\n return browser;\n };\n this.getCPU = function () {\n var cpu = { architecture: undefined };\n mapper.rgx.call(cpu, ua, rgxmap.cpu);\n return cpu;\n };\n this.getDevice = function () {\n var device = { vendor: undefined, model: undefined, type: undefined };\n mapper.rgx.call(device, ua, rgxmap.device);\n return device;\n };\n this.getEngine = function () {\n var engine = { name: undefined, version: undefined };\n mapper.rgx.call(engine, ua, rgxmap.engine);\n return engine;\n };\n this.getOS = function () {\n var os = { name: undefined, version: undefined };\n mapper.rgx.call(os, ua, rgxmap.os);\n return os;\n };\n this.getResult = function () {\n return {\n ua : this.getUA(),\n browser : this.getBrowser(),\n engine : this.getEngine(),\n os : this.getOS(),\n device : this.getDevice(),\n cpu : this.getCPU()\n };\n };\n this.getUA = function () {\n return ua;\n };\n this.setUA = function (uastring) {\n ua = uastring;\n return this;\n };\n return this;\n };\n\n UAParser.VERSION = LIBVERSION;\n UAParser.BROWSER = {\n NAME : NAME,\n MAJOR : MAJOR, // deprecated\n VERSION : VERSION\n };\n UAParser.CPU = {\n ARCHITECTURE : ARCHITECTURE\n };\n UAParser.DEVICE = {\n MODEL : MODEL,\n VENDOR : VENDOR,\n TYPE : TYPE,\n CONSOLE : CONSOLE,\n MOBILE : MOBILE,\n SMARTTV : SMARTTV,\n TABLET : TABLET,\n WEARABLE: WEARABLE,\n EMBEDDED: EMBEDDED\n };\n UAParser.ENGINE = {\n NAME : NAME,\n VERSION : VERSION\n };\n UAParser.OS = {\n NAME : NAME,\n VERSION : VERSION\n };\n\n ///////////\n // Export\n //////////\n\n\n // check js environment\n if (typeof(exports) !== UNDEF_TYPE) {\n // nodejs env\n if (typeof module !== UNDEF_TYPE && module.exports) {\n exports = module.exports = UAParser;\n }\n exports.UAParser = UAParser;\n } else {\n // requirejs env (optional)\n if (true) {\n !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {\n return UAParser;\n }).call(exports, __webpack_require__, exports, module),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n } else {}\n }\n\n // jQuery/Zepto specific (optional)\n // Note:\n // In AMD env the global scope should be kept clean, but jQuery is an exception.\n // jQuery always exports to global scope, unless jQuery.noConflict(true) is used,\n // and we should catch that.\n var $ = window && (window.jQuery || window.Zepto);\n if ($ && !$.ua) {\n var parser = new UAParser();\n $.ua = parser.getResult();\n $.ua.get = function () {\n return parser.getUA();\n };\n $.ua.set = function (uastring) {\n parser.setUA(uastring);\n var result = parser.getResult();\n for (var prop in result) {\n $.ua[prop] = result[prop];\n }\n };\n }\n\n})(typeof window === 'object' ? window : this);\n\n\n//# sourceURL=webpack:///./node_modules/ua-parser-js/src/ua-parser.js?"); + +/***/ }), + /***/ "./node_modules/value-equal/esm/value-equal.js": /*!*****************************************************!*\ !*** ./node_modules/value-equal/esm/value-equal.js ***! @@ -9335,7 +11439,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) * /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return Settings; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react_router_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-router-dom */ \"./node_modules/react-router-dom/esm/react-router-dom.js\");\n/* harmony import */ var _elements_alert__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../elements/alert */ \"./src/elements/alert.js\");\n/* harmony import */ var react_collapse_lib_Collapse__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react-collapse/lib/Collapse */ \"./node_modules/react-collapse/lib/Collapse.js\");\n/* harmony import */ var react_collapse_lib_Collapse__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_collapse_lib_Collapse__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _elements_icon__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../elements/icon */ \"./src/elements/icon.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n\n\n\n\n\n\nvar Settings = /*#__PURE__*/function (_React$Component) {\n _inherits(Settings, _React$Component);\n\n var _super = _createSuper(Settings);\n\n function Settings(props) {\n var _this;\n\n _classCallCheck(this, Settings);\n\n _this = _super.call(this, props);\n _this.state = {\n errors: [],\n mailErrors: [],\n generalErrors: [],\n etcErrors: [],\n settings: {},\n generalOpened: true,\n mailOpened: true,\n etcOpened: true,\n isResetting: false,\n isSaving: false,\n isSending: false,\n test_email: \"\",\n unsavedMailSettings: false\n };\n _this.parent = {\n api: props.api\n };\n _this.mailKeys = [\"mail_enabled\", \"mail_host\", \"mail_port\", \"mail_username\", \"mail_password\", \"mail_from\"];\n _this.generalKeys = [\"site_name\", \"base_url\", \"user_registration_enabled\"];\n return _this;\n }\n\n _createClass(Settings, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var _this2 = this;\n\n this.parent.api.getSettings().then(function (res) {\n if (res.success) {\n _this2.setState(_objectSpread(_objectSpread({}, _this2.state), {}, {\n settings: res.settings\n }));\n } else {\n var errors = _this2.state.errors.slice();\n\n errors.push({\n title: \"Error fetching settings\",\n message: res.msg\n });\n\n _this2.setState(_objectSpread(_objectSpread({}, _this2.state), {}, {\n errors: errors\n }));\n }\n });\n }\n }, {\n key: \"removeError\",\n value: function removeError(key, i) {\n if (i >= 0 && i < this.state[key].length) {\n var errors = this.state[key].slice();\n errors.splice(i, 1);\n this.setState(_objectSpread(_objectSpread({}, this.state), {}, _defineProperty({}, key, errors)));\n }\n }\n }, {\n key: \"toggleCollapse\",\n value: function toggleCollapse(key) {\n this.setState(_objectSpread(_objectSpread({}, this.state), {}, _defineProperty({}, key, !this.state[key])));\n }\n }, {\n key: \"getGeneralCard\",\n value: function getGeneralCard() {\n var _this3 = this,\n _this$state$settings$,\n _this$state$settings$2,\n _this$state$settings$3;\n\n var errors = [];\n\n var _loop = function _loop(i) {\n errors.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elements_alert__WEBPACK_IMPORTED_MODULE_2__[\"default\"], _extends({\n key: \"error-\" + i,\n onClose: function onClose() {\n return _this3.removeError(\"generalErrors\", i);\n }\n }, _this3.state.generalErrors[i])));\n };\n\n for (var i = 0; i < this.state.generalErrors.length; i++) {\n _loop(i);\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"card-header\",\n style: {\n cursor: \"pointer\"\n },\n onClick: function onClick() {\n return _this3.toggleCollapse(\"generalOpened\");\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h4\", {\n className: \"card-title\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elements_icon__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n className: \"mr-2\",\n icon: \"cogs\"\n }), \"General Settings\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"card-tools\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"btn btn-tool btn-sm\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elements_icon__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n icon: this.state.generalOpened ? \"angle-up\" : \"angle-down\"\n })))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react_collapse_lib_Collapse__WEBPACK_IMPORTED_MODULE_3__[\"Collapse\"], {\n isOpened: this.state.generalOpened\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"card-body\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"col-12 col-lg-6\"\n }, errors, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"form-group\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"label\", {\n htmlFor: \"site_name\"\n }, \"Site Name\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n type: \"text\",\n className: \"form-control\",\n value: (_this$state$settings$ = this.state.settings[\"site_name\"]) !== null && _this$state$settings$ !== void 0 ? _this$state$settings$ : \"\",\n placeholder: \"Enter a title\",\n name: \"site_name\",\n id: \"site_name\",\n onChange: this.onChangeValue.bind(this)\n })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"form-group\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"label\", {\n htmlFor: \"base_url\"\n }, \"Base URL\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n type: \"text\",\n className: \"form-control\",\n value: (_this$state$settings$2 = this.state.settings[\"base_url\"]) !== null && _this$state$settings$2 !== void 0 ? _this$state$settings$2 : \"\",\n placeholder: \"Enter a url\",\n name: \"base_url\",\n id: \"base_url\",\n onChange: this.onChangeValue.bind(this)\n })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"form-group\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"label\", {\n htmlFor: \"user_registration_enabled\"\n }, \"User Registration\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"form-check\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n type: \"checkbox\",\n className: \"form-check-input\",\n name: \"user_registration_enabled\",\n id: \"user_registration_enabled\",\n defaultChecked: ((_this$state$settings$3 = this.state.settings[\"user_registration_enabled\"]) !== null && _this$state$settings$3 !== void 0 ? _this$state$settings$3 : \"0\") === \"1\",\n onChange: this.onChangeValue.bind(this)\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"label\", {\n className: \"form-check-label\",\n htmlFor: \"user_registration_enabled\"\n }, \"Allow anyone to register an account\"))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"btn btn-secondary ml-2\",\n onClick: function onClick() {\n return _this3.onReset(\"generalErrors\", _this3.generalKeys);\n },\n disabled: this.state.isResetting || this.state.isSaving\n }, this.state.isResetting ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, \"Resetting\\xA0\", /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elements_icon__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n icon: \"circle-notch\"\n })) : \"Reset\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"btn btn-success ml-2\",\n onClick: function onClick() {\n return _this3.onSave(\"generalErrors\", _this3.generalKeys);\n },\n disabled: this.state.isResetting || this.state.isSaving\n }, this.state.isSaving ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, \"Saving\\xA0\", /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elements_icon__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n icon: \"circle-notch\"\n })) : \"Save\")))))));\n }\n }, {\n key: \"getEmailCard\",\n value: function getEmailCard() {\n var _this4 = this,\n _this$state$settings$4,\n _this$state$settings$5,\n _this$state$settings$6,\n _this$state$settings$7,\n _this$state$settings$8,\n _this$state$settings$9,\n _this$state$settings$10,\n _this$state$settings$11,\n _this$state$settings$12,\n _this$state$settings$13,\n _this$state$settings$14,\n _this$state$settings$15,\n _this$state$settings$16;\n\n var errors = [];\n\n var _loop2 = function _loop2(i) {\n errors.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elements_alert__WEBPACK_IMPORTED_MODULE_2__[\"default\"], _extends({\n key: \"error-\" + i,\n onClose: function onClose() {\n return _this4.removeError(\"mailErrors\", i);\n }\n }, _this4.state.mailErrors[i])));\n };\n\n for (var i = 0; i < this.state.mailErrors.length; i++) {\n _loop2(i);\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"card-header\",\n style: {\n cursor: \"pointer\"\n },\n onClick: function onClick() {\n return _this4.toggleCollapse(\"mailOpened\");\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h4\", {\n className: \"card-title\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elements_icon__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n className: \"mr-2\",\n icon: \"envelope\"\n }), \"Mail Settings\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"card-tools\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"btn btn-tool btn-sm\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elements_icon__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n icon: this.state.mailOpened ? \"angle-up\" : \"angle-down\"\n })))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react_collapse_lib_Collapse__WEBPACK_IMPORTED_MODULE_3__[\"Collapse\"], {\n isOpened: this.state.mailOpened\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"card-body\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"col-12 col-lg-6\"\n }, errors, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"form-group mt-2\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"form-check\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n type: \"checkbox\",\n className: \"form-check-input\",\n name: \"mail_enabled\",\n id: \"mail_enabled\",\n checked: ((_this$state$settings$4 = this.state.settings[\"mail_enabled\"]) !== null && _this$state$settings$4 !== void 0 ? _this$state$settings$4 : \"0\") === \"1\",\n onChange: this.onChangeValue.bind(this)\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"label\", {\n className: \"form-check-label\",\n htmlFor: \"mail_enabled\"\n }, \"Enable E-Mail service\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"hr\", {\n className: \"m-3\"\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"label\", {\n htmlFor: \"mail_username\"\n }, \"Username\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"input-group\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"input-group-prepend\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"input-group-text\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elements_icon__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n icon: \"hashtag\"\n }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n type: \"text\",\n className: \"form-control\",\n value: (_this$state$settings$5 = this.state.settings[\"mail_username\"]) !== null && _this$state$settings$5 !== void 0 ? _this$state$settings$5 : \"\",\n placeholder: \"Enter a username\",\n name: \"mail_username\",\n id: \"mail_username\",\n onChange: this.onChangeValue.bind(this),\n disabled: ((_this$state$settings$6 = this.state.settings[\"mail_enabled\"]) !== null && _this$state$settings$6 !== void 0 ? _this$state$settings$6 : \"0\") !== \"1\"\n })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"label\", {\n htmlFor: \"mail_password\",\n className: \"mt-2\"\n }, \"Password\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"input-group\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"input-group-prepend\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"input-group-text\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elements_icon__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n icon: \"key\"\n }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n type: \"password\",\n className: \"form-control\",\n value: (_this$state$settings$7 = this.state.settings[\"mail_password\"]) !== null && _this$state$settings$7 !== void 0 ? _this$state$settings$7 : \"\",\n placeholder: \"(unchanged)\",\n name: \"mail_password\",\n id: \"mail_password\",\n onChange: this.onChangeValue.bind(this),\n disabled: ((_this$state$settings$8 = this.state.settings[\"mail_enabled\"]) !== null && _this$state$settings$8 !== void 0 ? _this$state$settings$8 : \"0\") !== \"1\"\n })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"label\", {\n htmlFor: \"mail_from\",\n className: \"mt-2\"\n }, \"Sender Email Address\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"input-group\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"input-group-prepend\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"input-group-text\"\n }, \"@\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n type: \"email\",\n className: \"form-control\",\n value: (_this$state$settings$9 = this.state.settings[\"mail_from\"]) !== null && _this$state$settings$9 !== void 0 ? _this$state$settings$9 : \"\",\n placeholder: \"Enter a email address\",\n name: \"mail_from\",\n id: \"mail_from\",\n onChange: this.onChangeValue.bind(this),\n disabled: ((_this$state$settings$10 = this.state.settings[\"mail_enabled\"]) !== null && _this$state$settings$10 !== void 0 ? _this$state$settings$10 : \"0\") !== \"1\"\n })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"col-6\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"label\", {\n htmlFor: \"mail_host\",\n className: \"mt-2\"\n }, \"SMTP Host\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"input-group\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"input-group-prepend\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"input-group-text\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elements_icon__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n icon: \"project-diagram\"\n }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n type: \"text\",\n className: \"form-control\",\n value: (_this$state$settings$11 = this.state.settings[\"mail_host\"]) !== null && _this$state$settings$11 !== void 0 ? _this$state$settings$11 : \"\",\n placeholder: \"e.g. smtp.example.com\",\n name: \"mail_host\",\n id: \"mail_host\",\n onChange: this.onChangeValue.bind(this),\n disabled: ((_this$state$settings$12 = this.state.settings[\"mail_enabled\"]) !== null && _this$state$settings$12 !== void 0 ? _this$state$settings$12 : \"0\") !== \"1\"\n }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"col-6\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"label\", {\n htmlFor: \"mail_port\",\n className: \"mt-2\"\n }, \"SMTP Port\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"input-group\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"input-group-prepend\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"input-group-text\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elements_icon__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n icon: \"project-diagram\"\n }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n type: \"number\",\n className: \"form-control\",\n value: parseInt((_this$state$settings$13 = this.state.settings[\"mail_port\"]) !== null && _this$state$settings$13 !== void 0 ? _this$state$settings$13 : \"25\"),\n placeholder: \"smtp port\",\n name: \"mail_port\",\n id: \"mail_port\",\n onChange: this.onChangeValue.bind(this),\n disabled: ((_this$state$settings$14 = this.state.settings[\"mail_enabled\"]) !== null && _this$state$settings$14 !== void 0 ? _this$state$settings$14 : \"0\") !== \"1\"\n }))))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"btn btn-secondary ml-2\",\n onClick: function onClick() {\n return _this4.onReset(\"mailErrors\", _this4.mailKeys);\n },\n disabled: this.state.isResetting || this.state.isSaving\n }, this.state.isResetting ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, \"Resetting\\xA0\", /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elements_icon__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n icon: \"circle-notch\"\n })) : \"Reset\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"btn btn-success ml-2\",\n onClick: function onClick() {\n return _this4.onSave(\"mailErrors\", _this4.mailKeys);\n },\n disabled: this.state.isResetting || this.state.isSaving\n }, this.state.isSaving ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, \"Saving\\xA0\", /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elements_icon__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n icon: \"circle-notch\"\n })) : \"Save\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"mt-3\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"label\", {\n htmlFor: \"mail_from\",\n className: \"mt-2\"\n }, \"Send Test E-Mail\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"input-group\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"input-group-prepend\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"input-group-text\"\n }, \"@\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n type: \"email\",\n className: \"form-control\",\n value: this.state.test_email,\n placeholder: \"Enter a email address\",\n onChange: function onChange(e) {\n return _this4.setState(_objectSpread(_objectSpread({}, _this4.state), {}, {\n test_email: e.target.value\n }));\n },\n disabled: ((_this$state$settings$15 = this.state.settings[\"mail_enabled\"]) !== null && _this$state$settings$15 !== void 0 ? _this$state$settings$15 : \"0\") !== \"1\"\n })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"form-group form-inline mt-3\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"btn btn-info col-2\",\n onClick: function onClick() {\n return _this4.onSendTestMail();\n },\n disabled: ((_this$state$settings$16 = this.state.settings[\"mail_enabled\"]) !== null && _this$state$settings$16 !== void 0 ? _this$state$settings$16 : \"0\") !== \"1\" || this.state.isSending\n }, this.state.isSending ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, \"Sending\\xA0\", /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elements_icon__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n icon: \"circle-notch\"\n })) : \"Send Mail\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"col-10\"\n }, this.state.unsavedMailSettings ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text-red\"\n }, \"You need to save your mail settings first.\") : null))))))));\n }\n }, {\n key: \"getUncategorisedCard\",\n value: function getUncategorisedCard() {\n var _this5 = this;\n\n var keys = [];\n var tr = [];\n\n for (var key in this.state.settings) {\n if (this.state.settings.hasOwnProperty(key)) {\n if (!this.generalKeys.includes(key) && !this.mailKeys.includes(key)) {\n keys.push(key);\n tr.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", {\n key: \"tr-\" + key\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, key), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, this.state.settings[key])));\n }\n }\n }\n\n var errors = [];\n\n var _loop3 = function _loop3(i) {\n errors.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elements_alert__WEBPACK_IMPORTED_MODULE_2__[\"default\"], _extends({\n key: \"error-\" + i,\n onClose: function onClose() {\n return _this5.removeError(\"etcErrors\", i);\n }\n }, _this5.state.etcErrors[i])));\n };\n\n for (var i = 0; i < this.state.etcErrors.length; i++) {\n _loop3(i);\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"card-header\",\n style: {\n cursor: \"pointer\"\n },\n onClick: function onClick() {\n return _this5.toggleCollapse(\"etcOpened\");\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h4\", {\n className: \"card-title\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elements_icon__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n className: \"mr-2\",\n icon: \"cogs\"\n }), \"General Settings\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"card-tools\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"btn btn-tool btn-sm\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elements_icon__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n icon: this.state.etcOpened ? \"angle-up\" : \"angle-down\"\n })))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react_collapse_lib_Collapse__WEBPACK_IMPORTED_MODULE_3__[\"Collapse\"], {\n isOpened: this.state.etcOpened\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"card-body\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"col-12 col-lg-6\"\n }, errors, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"thead\", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"th\", null, \"Key\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"th\", null, \"Value\"))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, tr)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"btn btn-secondary ml-2\",\n onClick: function onClick() {\n return _this5.onReset(\"etcErrors\", keys);\n },\n disabled: this.state.isResetting || this.state.isSaving\n }, this.state.isResetting ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, \"Resetting\\xA0\", /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elements_icon__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n icon: \"circle-notch\"\n })) : \"Reset\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"btn btn-success ml-2\",\n onClick: function onClick() {\n return _this5.onSave(\"etcErrors\", keys);\n },\n disabled: this.state.isResetting || this.state.isSaving\n }, this.state.isSaving ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, \"Saving\\xA0\", /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elements_icon__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n icon: \"circle-notch\"\n })) : \"Save\")))))));\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this6 = this;\n\n var errors = [];\n\n var _loop4 = function _loop4(i) {\n errors.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elements_alert__WEBPACK_IMPORTED_MODULE_2__[\"default\"], _extends({\n key: \"error-\" + i,\n onClose: function onClose() {\n return _this6.removeError(\"errors\", i);\n }\n }, _this6.state.errors[i])));\n };\n\n for (var i = 0; i < this.state.errors.length; i++) {\n _loop4(i);\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"content-header\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"container-fluid\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row mb-2\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"col-sm-6\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", {\n className: \"m-0 text-dark\"\n }, \"Settings\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"col-sm-6\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"ol\", {\n className: \"breadcrumb float-sm-right\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"li\", {\n className: \"breadcrumb-item\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react_router_dom__WEBPACK_IMPORTED_MODULE_1__[\"Link\"], {\n to: \"/admin/dashboard\"\n }, \"Home\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"li\", {\n className: \"breadcrumb-item active\"\n }, \"Settings\")))))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"content\"\n }, errors, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"card card-primary\"\n }, this.getGeneralCard()), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"card card-warning\"\n }, this.getEmailCard()), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"card card-secondary\"\n }, this.getUncategorisedCard()))));\n }\n }, {\n key: \"onChangeValue\",\n value: function onChangeValue(event) {\n var target = event.target;\n var name = target.name;\n var type = target.type;\n var value = target.value;\n\n if (type === \"checkbox\") {\n value = event.target.checked ? \"1\" : \"0\";\n }\n\n var changedMailSettings = false;\n\n if (name.startsWith(\"mail_\")) {\n changedMailSettings = true;\n }\n\n this.setState(_objectSpread(_objectSpread({}, this.state), {}, {\n settings: _objectSpread(_objectSpread({}, this.state.settings), {}, _defineProperty({}, name, value)),\n unsavedMailSettings: changedMailSettings ? true : this.state.unsavedMailSettings\n }));\n }\n }, {\n key: \"onReset\",\n value: function onReset(errorKey, keys) {\n var _this7 = this;\n\n this.setState(_objectSpread(_objectSpread({}, this.state), {}, {\n isResetting: true\n }));\n var values = {};\n\n var _iterator = _createForOfIteratorHelper(keys),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var key = _step.value;\n values[key] = this.state.settings[key];\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n var mailSettingsSaved = errorKey === \"mailErrors\";\n this.parent.api.getSettings().then(function (res) {\n if (!res.success) {\n var _objectSpread5;\n\n var errors = _this7.state[errorKey].slice();\n\n errors.push({\n title: \"Error fetching settings\",\n message: res.msg\n });\n\n _this7.setState(_objectSpread(_objectSpread({}, _this7.state), {}, (_objectSpread5 = {}, _defineProperty(_objectSpread5, errorKey, errors), _defineProperty(_objectSpread5, \"isResetting\", false), _objectSpread5)));\n } else {\n var newSettings = _objectSpread({}, _this7.state.settings);\n\n var _iterator2 = _createForOfIteratorHelper(keys),\n _step2;\n\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var _res$settings$key;\n\n var key = _step2.value;\n newSettings[key] = (_res$settings$key = res.settings[key]) !== null && _res$settings$key !== void 0 ? _res$settings$key : \"\";\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n\n _this7.setState(_objectSpread(_objectSpread({}, _this7.state), {}, {\n settings: newSettings,\n isResetting: false,\n unsavedMailSettings: mailSettingsSaved ? false : _this7.state.unsavedMailSettings\n }));\n }\n });\n }\n }, {\n key: \"onSave\",\n value: function onSave(errorKey, keys) {\n var _this8 = this;\n\n this.setState(_objectSpread(_objectSpread({}, this.state), {}, {\n isSaving: true\n }));\n var values = {};\n\n var _iterator3 = _createForOfIteratorHelper(keys),\n _step3;\n\n try {\n for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {\n var key = _step3.value;\n\n if (key === \"mail_password\" && !this.state.settings[key]) {\n continue;\n }\n\n values[key] = this.state.settings[key];\n }\n } catch (err) {\n _iterator3.e(err);\n } finally {\n _iterator3.f();\n }\n\n var mailSettingsSaved = errorKey === \"mailErrors\";\n this.parent.api.saveSettings(values).then(function (res) {\n if (!res.success) {\n var _objectSpread6;\n\n var errors = _this8.state[errorKey].slice();\n\n errors.push({\n title: \"Error fetching settings\",\n message: res.msg\n });\n\n _this8.setState(_objectSpread(_objectSpread({}, _this8.state), {}, (_objectSpread6 = {}, _defineProperty(_objectSpread6, errorKey, errors), _defineProperty(_objectSpread6, \"isSaving\", false), _objectSpread6)));\n } else {\n _this8.setState(_objectSpread(_objectSpread({}, _this8.state), {}, {\n isSaving: false,\n unsavedMailSettings: mailSettingsSaved ? false : _this8.state.unsavedMailSettings\n }));\n }\n });\n }\n }, {\n key: \"onSendTestMail\",\n value: function onSendTestMail() {\n var _this9 = this;\n\n this.setState(_objectSpread(_objectSpread({}, this.state), {}, {\n isSending: true\n }));\n this.parent.api.sendTestMail(this.state.test_email).then(function (res) {\n var errors = _this9.state.mailErrors.slice();\n\n if (!res.success) {\n errors.push({\n title: \"Error sending email\",\n message: res.msg\n });\n\n _this9.setState(_objectSpread(_objectSpread({}, _this9.state), {}, {\n mailErrors: errors,\n isSending: false\n }));\n } else {\n errors.push({\n title: \"Success!\",\n message: \"E-Mail was successfully sent, check your inbox.\",\n type: \"success\"\n });\n\n _this9.setState(_objectSpread(_objectSpread({}, _this9.state), {}, {\n mailErrors: errors,\n isSending: false,\n test_email: \"\"\n }));\n }\n });\n }\n }]);\n\n return Settings;\n}(react__WEBPACK_IMPORTED_MODULE_0___default.a.Component);\n\n\n\n//# sourceURL=webpack:///./src/views/settings.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return Settings; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react_router_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-router-dom */ \"./node_modules/react-router-dom/esm/react-router-dom.js\");\n/* harmony import */ var _elements_alert__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../elements/alert */ \"./src/elements/alert.js\");\n/* harmony import */ var react_collapse_lib_Collapse__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react-collapse/lib/Collapse */ \"./node_modules/react-collapse/lib/Collapse.js\");\n/* harmony import */ var react_collapse_lib_Collapse__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_collapse_lib_Collapse__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _elements_icon__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../elements/icon */ \"./src/elements/icon.js\");\n/* harmony import */ var draft_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! draft-js */ \"./node_modules/draft-js/lib/Draft.js\");\n/* harmony import */ var draft_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(draft_js__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var react_draft_wysiwyg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react-draft-wysiwyg */ \"./node_modules/react-draft-wysiwyg/dist/react-draft-wysiwyg.js\");\n/* harmony import */ var react_draft_wysiwyg__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(react_draft_wysiwyg__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var draftjs_to_html__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! draftjs-to-html */ \"./node_modules/draftjs-to-html/lib/draftjs-to-html.js\");\n/* harmony import */ var draftjs_to_html__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(draftjs_to_html__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var html_to_draftjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! html-to-draftjs */ \"./node_modules/html-to-draftjs/dist/html-to-draftjs.js\");\n/* harmony import */ var html_to_draftjs__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(html_to_draftjs__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var react_draft_wysiwyg_dist_react_draft_wysiwyg_css__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! react-draft-wysiwyg/dist/react-draft-wysiwyg.css */ \"./node_modules/react-draft-wysiwyg/dist/react-draft-wysiwyg.css\");\n/* harmony import */ var react_draft_wysiwyg_dist_react_draft_wysiwyg_css__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(react_draft_wysiwyg_dist_react_draft_wysiwyg_css__WEBPACK_IMPORTED_MODULE_9__);\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n\n\n\n\n\n\n\n\n\n\n\nvar Settings = /*#__PURE__*/function (_React$Component) {\n _inherits(Settings, _React$Component);\n\n var _super = _createSuper(Settings);\n\n function Settings(props) {\n var _this;\n\n _classCallCheck(this, Settings);\n\n _this = _super.call(this, props);\n _this.state = {\n errors: [],\n settings: {},\n general: {\n alerts: [],\n isOpen: true,\n isSaving: false,\n isResetting: false,\n keys: [\"site_name\", \"base_url\", \"user_registration_enabled\"]\n },\n mail: {\n alerts: [],\n isOpen: true,\n isSaving: false,\n isResetting: false,\n isSending: false,\n test_email: \"\",\n unsavedMailSettings: false,\n keys: [\"mail_enabled\", \"mail_host\", \"mail_port\", \"mail_username\", \"mail_password\", \"mail_from\"]\n },\n messages: {\n alerts: [],\n isOpen: true,\n isSaving: false,\n isResetting: false,\n editor: draft_js__WEBPACK_IMPORTED_MODULE_5__[\"EditorState\"].createEmpty(),\n isEditing: null,\n keys: [\"message_confirm_email\", \"message_accept_invite\", \"message_reset_password\"]\n },\n uncategorised: {\n alerts: [],\n isOpen: true,\n isSaving: false,\n isResetting: false\n }\n };\n _this.parent = {\n api: props.api\n };\n return _this;\n }\n\n _createClass(Settings, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var _this2 = this;\n\n this.parent.api.getSettings().then(function (res) {\n if (res.success) {\n _this2.setState(_objectSpread(_objectSpread({}, _this2.state), {}, {\n settings: res.settings\n }));\n } else {\n var errors = _this2.state.errors.slice();\n\n errors.push({\n title: \"Error fetching settings\",\n message: res.msg\n });\n\n _this2.setState(_objectSpread(_objectSpread({}, _this2.state), {}, {\n errors: errors\n }));\n }\n });\n }\n }, {\n key: \"removeError\",\n value: function removeError(i) {\n var category = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n\n if (category) {\n if (i >= 0 && i < this.state[category].alerts.length) {\n var alerts = this.state[category].alerts.slice();\n alerts.splice(i, 1);\n this.setState(_objectSpread(_objectSpread({}, this.state), {}, _defineProperty({}, category, _objectSpread(_objectSpread({}, this.state[category]), {}, {\n alerts: alerts\n }))));\n }\n } else {\n if (i >= 0 && i < this.state.errors.length) {\n var errors = this.state.errors.slice();\n errors.splice(i, 1);\n this.setState(_objectSpread(_objectSpread({}, this.state), {}, {\n errors: errors\n }));\n }\n }\n }\n }, {\n key: \"toggleCollapse\",\n value: function toggleCollapse(category) {\n this.setState(_objectSpread(_objectSpread({}, this.state), {}, _defineProperty({}, category, _objectSpread(_objectSpread({}, this.state[category]), {}, {\n isOpen: !this.state[category].isOpen\n }))));\n }\n }, {\n key: \"createCard\",\n value: function createCard(category, color, icon, title, content) {\n var _this3 = this;\n\n var alerts = [];\n\n var _loop = function _loop(i) {\n alerts.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elements_alert__WEBPACK_IMPORTED_MODULE_2__[\"default\"], _extends({\n key: \"alert-\" + i,\n onClose: function onClose() {\n return _this3.removeError(i, category);\n }\n }, _this3.state[category].alerts[i])));\n };\n\n for (var i = 0; i < this.state[category].alerts.length; i++) {\n _loop(i);\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"card card-\" + color,\n key: \"card-\" + category\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"card-header\",\n style: {\n cursor: \"pointer\"\n },\n onClick: function onClick() {\n return _this3.toggleCollapse(category);\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h4\", {\n className: \"card-title\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elements_icon__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n className: \"mr-2\",\n icon: icon\n }), title), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"card-tools\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"btn btn-tool btn-sm\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elements_icon__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n icon: this.state[category].isOpen ? \"angle-up\" : \"angle-down\"\n })))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react_collapse_lib_Collapse__WEBPACK_IMPORTED_MODULE_3__[\"Collapse\"], {\n isOpened: this.state[category].isOpen\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"card-body\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"col-12 col-lg-6\"\n }, alerts, content, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"btn btn-secondary\",\n onClick: function onClick() {\n return _this3.onReset(category);\n },\n disabled: this.state[category].isResetting || this.state[category].isSaving\n }, this.state[category].isResetting ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, \"Resetting\\xA0\", /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elements_icon__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n icon: \"circle-notch\"\n })) : \"Reset\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"btn btn-success ml-2\",\n onClick: function onClick() {\n return _this3.onSave(category);\n },\n disabled: this.state[category].isResetting || this.state[category].isSaving\n }, this.state[category].isSaving ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, \"Saving\\xA0\", /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elements_icon__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n icon: \"circle-notch\"\n })) : \"Save\")))))));\n }\n }, {\n key: \"createGeneralForm\",\n value: function createGeneralForm() {\n var _this$state$settings$, _this$state$settings$2, _this$state$settings$3;\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"form-group\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"label\", {\n htmlFor: \"site_name\"\n }, \"Site Name\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n type: \"text\",\n className: \"form-control\",\n value: (_this$state$settings$ = this.state.settings[\"site_name\"]) !== null && _this$state$settings$ !== void 0 ? _this$state$settings$ : \"\",\n placeholder: \"Enter a title\",\n name: \"site_name\",\n id: \"site_name\",\n onChange: this.onChangeValue.bind(this)\n })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"form-group\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"label\", {\n htmlFor: \"base_url\"\n }, \"Base URL\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n type: \"text\",\n className: \"form-control\",\n value: (_this$state$settings$2 = this.state.settings[\"base_url\"]) !== null && _this$state$settings$2 !== void 0 ? _this$state$settings$2 : \"\",\n placeholder: \"Enter a url\",\n name: \"base_url\",\n id: \"base_url\",\n onChange: this.onChangeValue.bind(this)\n })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"form-group\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"label\", {\n htmlFor: \"user_registration_enabled\"\n }, \"User Registration\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"form-check\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n type: \"checkbox\",\n className: \"form-check-input\",\n name: \"user_registration_enabled\",\n id: \"user_registration_enabled\",\n checked: ((_this$state$settings$3 = this.state.settings[\"user_registration_enabled\"]) !== null && _this$state$settings$3 !== void 0 ? _this$state$settings$3 : \"0\") === \"1\",\n onChange: this.onChangeValue.bind(this)\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"label\", {\n className: \"form-check-label\",\n htmlFor: \"user_registration_enabled\"\n }, \"Allow anyone to register an account\"))));\n }\n }, {\n key: \"createMailForm\",\n value: function createMailForm() {\n var _this$state$settings$4,\n _this$state$settings$5,\n _this$state$settings$6,\n _this$state$settings$7,\n _this$state$settings$8,\n _this$state$settings$9,\n _this$state$settings$10,\n _this$state$settings$11,\n _this$state$settings$12,\n _this$state$settings$13,\n _this$state$settings$14,\n _this4 = this,\n _this$state$settings$15,\n _this$state$settings$16;\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"form-group mt-2\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"form-check\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n type: \"checkbox\",\n className: \"form-check-input\",\n name: \"mail_enabled\",\n id: \"mail_enabled\",\n checked: ((_this$state$settings$4 = this.state.settings[\"mail_enabled\"]) !== null && _this$state$settings$4 !== void 0 ? _this$state$settings$4 : \"0\") === \"1\",\n onChange: this.onChangeValue.bind(this)\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"label\", {\n className: \"form-check-label\",\n htmlFor: \"mail_enabled\"\n }, \"Enable E-Mail service\"))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"hr\", {\n className: \"m-3\"\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"label\", {\n htmlFor: \"mail_username\"\n }, \"Username\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"input-group\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"input-group-prepend\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"input-group-text\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elements_icon__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n icon: \"hashtag\"\n }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n type: \"text\",\n className: \"form-control\",\n value: (_this$state$settings$5 = this.state.settings[\"mail_username\"]) !== null && _this$state$settings$5 !== void 0 ? _this$state$settings$5 : \"\",\n placeholder: \"Enter a username\",\n name: \"mail_username\",\n id: \"mail_username\",\n onChange: this.onChangeValue.bind(this),\n disabled: ((_this$state$settings$6 = this.state.settings[\"mail_enabled\"]) !== null && _this$state$settings$6 !== void 0 ? _this$state$settings$6 : \"0\") !== \"1\"\n })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"label\", {\n htmlFor: \"mail_password\",\n className: \"mt-2\"\n }, \"Password\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"input-group\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"input-group-prepend\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"input-group-text\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elements_icon__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n icon: \"key\"\n }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n type: \"password\",\n className: \"form-control\",\n value: (_this$state$settings$7 = this.state.settings[\"mail_password\"]) !== null && _this$state$settings$7 !== void 0 ? _this$state$settings$7 : \"\",\n placeholder: \"(unchanged)\",\n name: \"mail_password\",\n id: \"mail_password\",\n onChange: this.onChangeValue.bind(this),\n disabled: ((_this$state$settings$8 = this.state.settings[\"mail_enabled\"]) !== null && _this$state$settings$8 !== void 0 ? _this$state$settings$8 : \"0\") !== \"1\"\n })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"label\", {\n htmlFor: \"mail_from\",\n className: \"mt-2\"\n }, \"Sender Email Address\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"input-group\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"input-group-prepend\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"input-group-text\"\n }, \"@\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n type: \"email\",\n className: \"form-control\",\n value: (_this$state$settings$9 = this.state.settings[\"mail_from\"]) !== null && _this$state$settings$9 !== void 0 ? _this$state$settings$9 : \"\",\n placeholder: \"Enter a email address\",\n name: \"mail_from\",\n id: \"mail_from\",\n onChange: this.onChangeValue.bind(this),\n disabled: ((_this$state$settings$10 = this.state.settings[\"mail_enabled\"]) !== null && _this$state$settings$10 !== void 0 ? _this$state$settings$10 : \"0\") !== \"1\"\n })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"col-6\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"label\", {\n htmlFor: \"mail_host\",\n className: \"mt-2\"\n }, \"SMTP Host\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"input-group\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"input-group-prepend\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"input-group-text\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elements_icon__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n icon: \"project-diagram\"\n }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n type: \"text\",\n className: \"form-control\",\n value: (_this$state$settings$11 = this.state.settings[\"mail_host\"]) !== null && _this$state$settings$11 !== void 0 ? _this$state$settings$11 : \"\",\n placeholder: \"e.g. smtp.example.com\",\n name: \"mail_host\",\n id: \"mail_host\",\n onChange: this.onChangeValue.bind(this),\n disabled: ((_this$state$settings$12 = this.state.settings[\"mail_enabled\"]) !== null && _this$state$settings$12 !== void 0 ? _this$state$settings$12 : \"0\") !== \"1\"\n }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"col-6\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"label\", {\n htmlFor: \"mail_port\",\n className: \"mt-2\"\n }, \"SMTP Port\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"input-group\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"input-group-prepend\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"input-group-text\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elements_icon__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n icon: \"project-diagram\"\n }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n type: \"number\",\n className: \"form-control\",\n value: parseInt((_this$state$settings$13 = this.state.settings[\"mail_port\"]) !== null && _this$state$settings$13 !== void 0 ? _this$state$settings$13 : \"25\"),\n placeholder: \"smtp port\",\n name: \"mail_port\",\n id: \"mail_port\",\n onChange: this.onChangeValue.bind(this),\n disabled: ((_this$state$settings$14 = this.state.settings[\"mail_enabled\"]) !== null && _this$state$settings$14 !== void 0 ? _this$state$settings$14 : \"0\") !== \"1\"\n })))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"mt-3\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"label\", {\n htmlFor: \"mail_from\",\n className: \"mt-2\"\n }, \"Send Test E-Mail\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"input-group\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"input-group-prepend\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"input-group-text\"\n }, \"@\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n type: \"email\",\n className: \"form-control\",\n value: this.state.mail.test_email,\n placeholder: \"Enter a email address\",\n onChange: function onChange(e) {\n return _this4.setState(_objectSpread(_objectSpread({}, _this4.state), {}, {\n mail: _objectSpread(_objectSpread({}, _this4.state.mail), {}, {\n test_email: e.target.value\n })\n }));\n },\n disabled: ((_this$state$settings$15 = this.state.settings[\"mail_enabled\"]) !== null && _this$state$settings$15 !== void 0 ? _this$state$settings$15 : \"0\") !== \"1\"\n })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"form-group form-inline mt-3\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"btn btn-info col-2\",\n onClick: function onClick() {\n return _this4.onSendTestMail();\n },\n disabled: ((_this$state$settings$16 = this.state.settings[\"mail_enabled\"]) !== null && _this$state$settings$16 !== void 0 ? _this$state$settings$16 : \"0\") !== \"1\" || this.state.mail.isSending\n }, this.state.mail.isSending ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, \"Sending\\xA0\", /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elements_icon__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n icon: \"circle-notch\"\n })) : \"Send Mail\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"col-10\"\n }, this.state.mail.unsavedMailSettings ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text-red\"\n }, \"You need to save your mail settings first.\") : null))));\n }\n }, {\n key: \"getMessagesForm\",\n value: function getMessagesForm() {\n var _this5 = this;\n\n var editor = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react_draft_wysiwyg__WEBPACK_IMPORTED_MODULE_6__[\"Editor\"], {\n editorState: this.state.messages.editor,\n onEditorStateChange: this.onEditorStateChange.bind(this)\n });\n var messageTemplates = {\n \"message_confirm_email\": \"Confirm E-Mail Message\",\n \"message_accept_invite\": \"Accept Invitation Message\",\n \"message_reset_password\": \"Reset Password Message\"\n };\n var formGroups = [];\n\n var _loop2 = function _loop2(key) {\n var title = messageTemplates[key];\n\n if (_this5.state.messages.isEditing === key) {\n formGroups.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"form-group\",\n key: \"group-\" + key\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"label\", {\n htmlFor: key\n }, title, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elements_icon__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n icon: \"times\",\n className: \"ml-2 text-danger\",\n style: {\n cursor: \"pointer\"\n },\n onClick: function onClick() {\n return _this5.closeEditor(false);\n }\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elements_icon__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n icon: \"check\",\n className: \"ml-1 text-success\",\n style: {\n cursor: \"pointer\"\n },\n onClick: function onClick() {\n return _this5.closeEditor(true);\n }\n })), editor));\n } else {\n var _this5$state$settings;\n\n formGroups.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"form-group\",\n key: \"group-\" + key\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"label\", {\n htmlFor: key\n }, title, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elements_icon__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n icon: \"pencil-alt\",\n className: \"ml-2\",\n style: {\n cursor: \"pointer\"\n },\n onClick: function onClick() {\n return _this5.openEditor(key);\n }\n })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"textarea\", {\n rows: 6,\n className: \"form-control\",\n disabled: true,\n value: (_this5$state$settings = _this5.state.settings[key]) !== null && _this5$state$settings !== void 0 ? _this5$state$settings : \"\",\n id: key,\n name: key\n })));\n }\n };\n\n for (var key in messageTemplates) {\n _loop2(key);\n }\n\n return formGroups;\n }\n /*\n getUncategorisedCard() {\n let keys = [];\n let tr = [];\n for (let key in this.state.settings) {\n if (this.state.settings.hasOwnProperty(key)) {\n if (!this.generalKeys.includes(key) && !this.mailKeys.includes(key)) {\n keys.push(key);\n tr.push(\n {key}\n {this.state.settings[key]}\n );\n }\n }\n }\n let errors = [];\n for (let i = 0; i < this.state.etcErrors.length; i++) {\n errors.push( this.removeError(\"etcErrors\", i)} {...this.state.etcErrors[i]}/>)\n }\n return <>\n
this.toggleCollapse(\"etcOpened\")}>\n

\n \n General Settings\n

\n
\n \n \n \n
\n
\n \n
\n
\n
\n {errors}\n \n \n \n \n \n \n \n \n {tr}\n \n
KeyValue
\n
\n \n \n
\n
\n
\n
\n
\n \n }\n */\n\n }, {\n key: \"render\",\n value: function render() {\n var _this6 = this;\n\n var errors = [];\n\n var _loop3 = function _loop3(i) {\n errors.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elements_alert__WEBPACK_IMPORTED_MODULE_2__[\"default\"], _extends({\n key: \"error-\" + i,\n onClose: function onClose() {\n return _this6.removeError(\"errors\", i);\n }\n }, _this6.state.errors[i])));\n };\n\n for (var i = 0; i < this.state.errors.length; i++) {\n _loop3(i);\n }\n\n var categories = {\n \"general\": {\n color: \"primary\",\n icon: \"cogs\",\n title: \"General Settings\",\n content: this.createGeneralForm()\n },\n \"mail\": {\n color: \"warning\",\n icon: \"envelope\",\n title: \"Mail Settings\",\n content: this.createMailForm()\n },\n \"messages\": {\n color: \"info\",\n icon: \"copy\",\n title: \"Message Templates\",\n content: this.getMessagesForm()\n },\n \"uncategorised\": {\n color: \"secondary\",\n icon: \"stream\",\n title: \"Uncategorised\",\n content: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null)\n }\n };\n var cards = [];\n\n for (var name in categories) {\n var category = categories[name];\n cards.push(this.createCard(name, category.color, category.icon, category.title, category.content));\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"content-header\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"container-fluid\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row mb-2\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"col-sm-6\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", {\n className: \"m-0 text-dark\"\n }, \"Settings\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"col-sm-6\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"ol\", {\n className: \"breadcrumb float-sm-right\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"li\", {\n className: \"breadcrumb-item\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react_router_dom__WEBPACK_IMPORTED_MODULE_1__[\"Link\"], {\n to: \"/admin/dashboard\"\n }, \"Home\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"li\", {\n className: \"breadcrumb-item active\"\n }, \"Settings\")))))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"content\"\n }, errors, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, cards)));\n }\n }, {\n key: \"onEditorStateChange\",\n value: function onEditorStateChange(editorState, key) {\n this.setState(_objectSpread(_objectSpread({}, this.state), {}, {\n messages: _objectSpread(_objectSpread({}, this.state.messages), {}, {\n editor: editorState\n })\n }));\n }\n }, {\n key: \"onChangeValue\",\n value: function onChangeValue(event) {\n var target = event.target;\n var name = target.name;\n var type = target.type;\n var value = target.value;\n\n if (type === \"checkbox\") {\n value = event.target.checked ? \"1\" : \"0\";\n }\n\n var changedMailSettings = false;\n\n if (this.state.mail.keys.includes(name)) {\n changedMailSettings = true;\n }\n\n var newState = _objectSpread(_objectSpread({}, this.state), {}, {\n settings: _objectSpread(_objectSpread({}, this.state.settings), {}, _defineProperty({}, name, value))\n });\n\n if (changedMailSettings) {\n newState.mail = _objectSpread(_objectSpread({}, this.state.mail), {}, {\n unsavedMailSettings: true\n });\n }\n\n this.setState(newState);\n }\n }, {\n key: \"onReset\",\n value: function onReset(category) {\n var _this7 = this;\n\n this.setState(_objectSpread(_objectSpread({}, this.state), {}, _defineProperty({}, category, _objectSpread(_objectSpread({}, this.state[category]), {}, {\n isResetting: true\n }))));\n var values = {};\n\n var _iterator = _createForOfIteratorHelper(this.state[category].keys),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var key = _step.value;\n values[key] = this.state.settings[key];\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n this.parent.api.getSettings().then(function (res) {\n if (!res.success) {\n var alerts = _this7.state[category].alerts.slice();\n\n alerts.push({\n title: \"Error fetching settings\",\n message: res.msg\n });\n\n _this7.setState(_objectSpread(_objectSpread({}, _this7.state), {}, _defineProperty({}, category, _objectSpread(_objectSpread({}, _this7.state[category]), {}, {\n alerts: alerts,\n isResetting: false\n }))));\n } else {\n var newSettings = _objectSpread({}, _this7.state.settings);\n\n var categoryUpdated = _objectSpread(_objectSpread({}, _this7.state[category]), {}, {\n isResetting: false\n });\n\n var _iterator2 = _createForOfIteratorHelper(_this7.state[category].keys),\n _step2;\n\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var _res$settings$key;\n\n var key = _step2.value;\n newSettings[key] = (_res$settings$key = res.settings[key]) !== null && _res$settings$key !== void 0 ? _res$settings$key : \"\";\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n\n if (category === \"mail\") {\n categoryUpdated.unsavedMailSettings = false;\n } else if (category === \"messages\") {\n categoryUpdated.isEditing = null;\n }\n\n _this7.setState(_objectSpread(_objectSpread({}, _this7.state), {}, _defineProperty({\n settings: newSettings\n }, category, categoryUpdated)));\n }\n });\n }\n }, {\n key: \"onSave\",\n value: function onSave(category) {\n var _this8 = this;\n\n this.setState(_objectSpread(_objectSpread({}, this.state), {}, _defineProperty({}, category, _objectSpread(_objectSpread({}, this.state[category]), {}, {\n isSaving: true\n }))));\n\n if (category === \"messages\" && this.state.messages.isEditing) {\n this.closeEditor(true, function () {\n return _this8.onSave(category);\n });\n }\n\n var values = {};\n\n var _iterator3 = _createForOfIteratorHelper(this.state[category].keys),\n _step3;\n\n try {\n for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {\n var key = _step3.value;\n\n if (key === \"mail_password\" && !this.state.settings[key]) {\n continue;\n }\n\n values[key] = this.state.settings[key];\n }\n } catch (err) {\n _iterator3.e(err);\n } finally {\n _iterator3.f();\n }\n\n this.parent.api.saveSettings(values).then(function (res) {\n var alerts = _this8.state[category].alerts.slice();\n\n var categoryUpdated = _objectSpread(_objectSpread({}, _this8.state[category]), {}, {\n isSaving: false\n });\n\n if (!res.success) {\n alerts.push({\n title: \"Error fetching settings\",\n message: res.msg\n });\n } else {\n alerts.push({\n title: \"Success\",\n message: \"Settings were successfully saved.\",\n type: \"success\"\n });\n if (category === \"mail\") categoryUpdated.unsavedMailSettings = false;\n\n _this8.setState(_objectSpread(_objectSpread({}, _this8.state), {}, _defineProperty({}, category, categoryUpdated)));\n }\n\n categoryUpdated.alerts = alerts;\n\n _this8.setState(_objectSpread(_objectSpread({}, _this8.state), {}, _defineProperty({}, category, categoryUpdated)));\n });\n }\n }, {\n key: \"onSendTestMail\",\n value: function onSendTestMail() {\n var _this9 = this;\n\n this.setState(_objectSpread(_objectSpread({}, this.state), {}, {\n mail: _objectSpread(_objectSpread({}, this.state.mail), {}, {\n isSending: true\n })\n }));\n console.log(this.state.mail);\n this.parent.api.sendTestMail(this.state.mail.test_email).then(function (res) {\n var alerts = _this9.state.mail.alerts.slice();\n\n var newState = _objectSpread(_objectSpread({}, _this9.state.mail), {}, {\n isSending: false\n });\n\n if (!res.success) {\n alerts.push({\n title: \"Error sending email\",\n message: res.msg\n });\n } else {\n alerts.push({\n title: \"Success!\",\n message: \"E-Mail was successfully sent, check your inbox.\",\n type: \"success\"\n });\n newState.test_email = \"\";\n }\n\n newState.alerts = alerts;\n\n _this9.setState(_objectSpread(_objectSpread({}, _this9.state), {}, {\n mail: newState\n }));\n });\n }\n }, {\n key: \"closeEditor\",\n value: function closeEditor(save) {\n var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n\n if (this.state.messages.isEditing) {\n var key = this.state.messages.isEditing;\n\n var newState = _objectSpread(_objectSpread({}, this.state), {}, {\n messages: _objectSpread(_objectSpread({}, this.state.messages), {}, {\n isEditing: null\n })\n });\n\n if (save) {\n newState.settings = _objectSpread(_objectSpread({}, this.state.settings), {}, _defineProperty({}, key, draftjs_to_html__WEBPACK_IMPORTED_MODULE_7___default()(Object(draft_js__WEBPACK_IMPORTED_MODULE_5__[\"convertToRaw\"])(this.state.messages.editor.getCurrentContent()))));\n }\n\n callback = callback || function () {};\n\n this.setState(newState, callback);\n }\n }\n }, {\n key: \"openEditor\",\n value: function openEditor(message) {\n var _this$state$settings$17;\n\n this.closeEditor(true);\n var contentBlock = html_to_draftjs__WEBPACK_IMPORTED_MODULE_8___default()((_this$state$settings$17 = this.state.settings[message]) !== null && _this$state$settings$17 !== void 0 ? _this$state$settings$17 : \"\");\n\n if (contentBlock) {\n var contentState = draft_js__WEBPACK_IMPORTED_MODULE_5__[\"ContentState\"].createFromBlockArray(contentBlock.contentBlocks);\n var editorState = draft_js__WEBPACK_IMPORTED_MODULE_5__[\"EditorState\"].createWithContent(contentState);\n this.setState(_objectSpread(_objectSpread({}, this.state), {}, {\n messages: _objectSpread(_objectSpread({}, this.state.messages), {}, {\n isEditing: message,\n editor: editorState\n })\n }));\n }\n }\n }]);\n\n return Settings;\n}(react__WEBPACK_IMPORTED_MODULE_0___default.a.Component);\n\n\n\n//# sourceURL=webpack:///./src/views/settings.js?"); /***/ }), diff --git a/src/package-lock.json b/src/package-lock.json index fa84864..abf99e7 100644 --- a/src/package-lock.json +++ b/src/package-lock.json @@ -4678,6 +4678,56 @@ "resolved": "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-5.1.0.tgz", "integrity": "sha512-YXQl1DSa4/PQyRfgrv6aoNjhasp/p4qs9FjJ4q4cQk+8m4r6k4ZSiEyytKG8f8W9gi8WsQtIObNmKd+tMzNTmA==" }, + "draft-js": { + "version": "0.11.6", + "resolved": "https://registry.npmjs.org/draft-js/-/draft-js-0.11.6.tgz", + "integrity": "sha512-H8OaophZecxm0L/C0LvOo6IZrbMb+s0txPXF7DW3E2oUjSo5ufvWvWb3B/0K2wRqBnwJrRxApqljD899i0fZMA==", + "requires": { + "fbjs": "^1.0.0", + "immutable": "~3.7.4", + "object-assign": "^4.1.1" + }, + "dependencies": { + "core-js": { + "version": "2.6.11", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.11.tgz", + "integrity": "sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg==" + }, + "fbjs": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fbjs/-/fbjs-1.0.0.tgz", + "integrity": "sha512-MUgcMEJaFhCaF1QtWGnmq9ZDRAzECTCRAF7O6UZIlAlkTs1SasiX9aP0Iw7wfD2mJ7wDTNfg2w7u5fSCwJk1OA==", + "requires": { + "core-js": "^2.4.1", + "fbjs-css-vars": "^1.0.0", + "isomorphic-fetch": "^2.1.1", + "loose-envify": "^1.0.0", + "object-assign": "^4.1.0", + "promise": "^7.1.1", + "setimmediate": "^1.0.5", + "ua-parser-js": "^0.7.18" + } + }, + "promise": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", + "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", + "requires": { + "asap": "~2.0.3" + } + } + } + }, + "draftjs-to-html": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/draftjs-to-html/-/draftjs-to-html-0.9.1.tgz", + "integrity": "sha512-fFstE6+IayaVFBEvaFt/wN8vdj8FsTRzij7dy7LI9QIwf5LgfHFi9zSpvCg+feJ2tbYVqHxUkjcibwpsTpgFVQ==" + }, + "draftjs-utils": { + "version": "0.10.2", + "resolved": "https://registry.npmjs.org/draftjs-utils/-/draftjs-utils-0.10.2.tgz", + "integrity": "sha512-EstHqr3R3JVcilJrBaO/A+01GvwwKmC7e4TCjC7S94ZeMh4IVmf60OuQXtHHpwItK8C2JCi3iljgN5KHkJboUg==" + }, "duplexer": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", @@ -5723,6 +5773,11 @@ } } }, + "fbjs-css-vars": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/fbjs-css-vars/-/fbjs-css-vars-1.0.2.tgz", + "integrity": "sha512-b2XGFAFdWZWg0phtAWLHCk836A1Xann+I+Dgd3Gk64MHKZO44FfoD1KxyvbSh0qZsIoXQGGlVztIY+oitJPpRQ==" + }, "figgy-pudding": { "version": "3.5.2", "resolved": "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.2.tgz", @@ -6476,6 +6531,11 @@ } } }, + "html-to-draftjs": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/html-to-draftjs/-/html-to-draftjs-1.5.0.tgz", + "integrity": "sha512-kggLXBNciKDwKf+KYsuE+V5gw4dZ7nHyGMX9m0wy7urzWjKGWyNFetmArRLvRV0VrxKN70WylFsJvMTJx02OBQ==" + }, "html-webpack-plugin": { "version": "4.0.0-beta.11", "resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-4.0.0-beta.11.tgz", @@ -6629,6 +6689,11 @@ "resolved": "https://registry.npmjs.org/immer/-/immer-1.10.0.tgz", "integrity": "sha512-O3sR1/opvCDGLEVcvrGTMtLac8GJ5IwZC4puPrLuRj3l7ICKvkmA0vGuU9OW8mV9WIBRnaxp5GJh9IEAaNOoYg==" }, + "immutable": { + "version": "3.7.6", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-3.7.6.tgz", + "integrity": "sha1-E7TTyxK++hVIKib+Gy665kAHHks=" + }, "import-cwd": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/import-cwd/-/import-cwd-2.1.0.tgz", @@ -7895,6 +7960,14 @@ "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=" }, + "linkify-it": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-2.2.0.tgz", + "integrity": "sha512-GnAl/knGn+i1U/wjBz3akz2stz+HrHLsxMwHQGofCDfPvlf+gDKN58UtfmUquTY4/MXeE2x7k19KQmeoZi94Iw==", + "requires": { + "uc.micro": "^1.0.1" + } + }, "load-json-file": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", @@ -10855,6 +10928,18 @@ "scheduler": "^0.19.1" } }, + "react-draft-wysiwyg": { + "version": "1.14.5", + "resolved": "https://registry.npmjs.org/react-draft-wysiwyg/-/react-draft-wysiwyg-1.14.5.tgz", + "integrity": "sha512-utbJEs91757QXYoBwKRb/4kB3JdswLlj0heUiAeXs/OxZAUISJXxLMFLBIixRlIcUnNkwxOsMikRshDMtWIS3g==", + "requires": { + "classnames": "^2.2.6", + "draftjs-utils": "^0.10.2", + "html-to-draftjs": "^1.5.0", + "linkify-it": "^2.2.0", + "prop-types": "^15.7.2" + } + }, "react-error-overlay": { "version": "6.0.7", "resolved": "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-6.0.7.tgz", @@ -13137,6 +13222,11 @@ "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.21.tgz", "integrity": "sha512-+O8/qh/Qj8CgC6eYBVBykMrNtp5Gebn4dlGD/kKXVkJNDwyrAwSIqwz8CDf+tsAIWVycKcku6gIXJ0qwx/ZXaQ==" }, + "uc.micro": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz", + "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==" + }, "unicode-canonical-property-names-ecmascript": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz", diff --git a/src/package.json b/src/package.json index 00c156d..51ca632 100644 --- a/src/package.json +++ b/src/package.json @@ -4,12 +4,16 @@ "private": true, "dependencies": { "chart.js": "^2.9.3", + "draft-js": "^0.11.6", + "draftjs-to-html": "^0.9.1", + "html-to-draftjs": "latest", "moment": "^2.26.0", "rc-color-picker": "^1.2.6", "react": "^16.13.1", "react-chartjs-2": "^2.9.0", "react-collapse": "^5.0.1", "react-dom": "^16.13.1", + "react-draft-wysiwyg": "^1.14.5", "react-router-dom": "^5.2.0", "react-scripts": "^3.4.1", "react-select": "^3.1.0", diff --git a/src/src/views/settings.js b/src/src/views/settings.js index 7cc4444..e69a4a7 100644 --- a/src/src/views/settings.js +++ b/src/src/views/settings.js @@ -3,6 +3,11 @@ import {Link} from "react-router-dom"; import Alert from "../elements/alert"; import {Collapse} from "react-collapse/lib/Collapse"; import Icon from "../elements/icon"; +import { EditorState, ContentState, convertFromHTML, convertToRaw } from 'draft-js' +import { Editor } from 'react-draft-wysiwyg' +import draftToHtml from 'draftjs-to-html'; +import htmlToDraft from 'html-to-draftjs'; +import 'react-draft-wysiwyg/dist/react-draft-wysiwyg.css'; export default class Settings extends React.Component { @@ -11,114 +16,114 @@ export default class Settings extends React.Component { this.state = { errors: [], - mailErrors: [], - generalErrors: [], - etcErrors: [], settings: {}, - generalOpened: true, - mailOpened: true, - etcOpened: true, - isResetting: false, - isSaving: false, - isSending: false, - test_email: "", - unsavedMailSettings: false + general: { + alerts: [], + isOpen: true, + isSaving: false, + isResetting: false, + keys: ["site_name", "base_url", "user_registration_enabled"] + }, + mail: { + alerts: [], + isOpen: true, + isSaving: false, + isResetting: false, + isSending: false, + test_email: "", + unsavedMailSettings: false, + keys: ["mail_enabled", "mail_host", "mail_port", "mail_username", "mail_password", "mail_from"] + }, + messages: { + alerts: [], + isOpen: true, + isSaving: false, + isResetting: false, + editor: EditorState.createEmpty(), + isEditing: null, + keys: ["message_confirm_email", "message_accept_invite", "message_reset_password"] + }, + uncategorised: { + alerts: [], + isOpen: true, + isSaving: false, + isResetting: false, + }, }; this.parent = { api: props.api }; - - this.mailKeys = ["mail_enabled", "mail_host", "mail_port", "mail_username", "mail_password", "mail_from"]; - this.generalKeys = ["site_name", "base_url", "user_registration_enabled"]; } componentDidMount() { this.parent.api.getSettings().then((res) => { if (res.success) { - this.setState({...this.state, settings: res.settings}); + this.setState({ ...this.state, settings: res.settings }); } else { let errors = this.state.errors.slice(); errors.push({title: "Error fetching settings", message: res.msg}); - this.setState({...this.state, errors: errors}); + this.setState({...this.state, errors: errors }); } }); } - removeError(key, i) { - if (i >= 0 && i < this.state[key].length) { - let errors = this.state[key].slice(); - errors.splice(i, 1); - this.setState({...this.state, [key]: errors}); + removeError(i, category = null) { + if (category) { + if (i >= 0 && i < this.state[category].alerts.length) { + let alerts = this.state[category].alerts.slice(); + alerts.splice(i, 1); + this.setState({...this.state, [category]: {...this.state[category], alerts: alerts}}); + } + } else { + if (i >= 0 && i < this.state.errors.length) { + let errors = this.state.errors.slice(); + errors.splice(i, 1); + this.setState({...this.state, errors: errors}); + } } } - toggleCollapse(key) { - this.setState({...this.state, [key]: !this.state[key]}); + toggleCollapse(category) { + this.setState({...this.state, [category]: {...this.state[category], isOpen: !this.state[category].isOpen}}); } - getGeneralCard() { + createCard(category, color, icon, title, content) { - let errors = []; - for (let i = 0; i < this.state.generalErrors.length; i++) { - errors.push( this.removeError("generalErrors", i)} {...this.state.generalErrors[i]}/>) + let alerts = []; + for (let i = 0; i < this.state[category].alerts.length; i++) { + alerts.push( this.removeError(i, category)} {...this.state[category].alerts[i]}/>) } - return <> + return
this.toggleCollapse("generalOpened")}> + onClick={() => this.toggleCollapse(category)}>

- - General Settings + + {title}

- +
- +
- {errors} -
- - -
-
- - -
-
- -
- - -
-
+ {alerts} + {content}
- -
@@ -126,163 +131,209 @@ export default class Settings extends React.Component {
+
+ } + + createGeneralForm() { + return <> +
+ + +
+
+ + +
+
+ +
+ + +
+
} - getEmailCard() { - - let errors = []; - for (let i = 0; i < this.state.mailErrors.length; i++) { - errors.push( this.removeError("mailErrors", i)} {...this.state.mailErrors[i]}/>) - } - + createMailForm() { return <> -
this.toggleCollapse("mailOpened")}> -

- - Mail Settings -

-
- - - +
+
+ +
- -
-
-
- {errors} -
-
- - -
-
- -
-
+
+ +
+
-
- -
- -
-
+
+ +
+ +
+
-
- -
- -
-
- @ -
- -
-
-
- -
-
- - - -
- -
-
-
- -
-
- - - -
- -
-
-
-
-
- - -
-
- -
-
- @ -
- this.setState({ - ...this.state, - test_email: e.target.value - })} - disabled={(this.state.settings["mail_enabled"] ?? "0") !== "1"}/> -
-
- -
- { this.state.unsavedMailSettings ? You need to save your mail settings first. : null } -
-
-
+
+ +
+ +
+
+ @ +
+ +
+
+
+ +
+
+ + +
+
- +
+ +
+
+ + + +
+ +
+
+
+
+ +
+
+ @ +
+ this.setState({ + ...this.state, + mail: {...this.state.mail, test_email: e.target.value}, + })} + disabled={(this.state.settings["mail_enabled"] ?? "0") !== "1"}/> +
+
+ +
+ {this.state.mail.unsavedMailSettings ? + You need to save your mail settings first. : null} +
+
+
} + getMessagesForm() { + + const editor = ; + + let messageTemplates = { + "message_confirm_email": "Confirm E-Mail Message", + "message_accept_invite": "Accept Invitation Message", + "message_reset_password": "Reset Password Message", + }; + + let formGroups = []; + for (let key in messageTemplates) { + let title = messageTemplates[key]; + if (this.state.messages.isEditing === key) { + formGroups.push( +
+ + { editor } +
+ ); + } else { + formGroups.push( +
+ +