diff --git a/frappe/chat/doctype/chat_message/chat_message.json b/frappe/chat/doctype/chat_message/chat_message.json index 0002e25b46..d3f668f794 100644 --- a/frappe/chat/doctype/chat_message/chat_message.json +++ b/frappe/chat/doctype/chat_message/chat_message.json @@ -18,7 +18,7 @@ "bold": 0, "collapsible": 0, "columns": 0, - "fieldname": "type", + "fieldname": "room_type", "fieldtype": "Select", "hidden": 0, "ignore_user_permissions": 0, @@ -27,7 +27,7 @@ "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 0, - "label": "Type", + "label": "Room Type", "length": 0, "no_copy": 0, "options": "Direct\nGroup\nVisitor", @@ -206,7 +206,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2018-01-18 05:22:09.458705", + "modified": "2018-01-21 12:35:12.069954", "modified_by": "faris@erpnext.com", "module": "Chat", "name": "Chat Message", diff --git a/frappe/chat/doctype/chat_message/chat_message.py b/frappe/chat/doctype/chat_message/chat_message.py index ba7f8d9ef9..2197303c55 100644 --- a/frappe/chat/doctype/chat_message/chat_message.py +++ b/frappe/chat/doctype/chat_message/chat_message.py @@ -17,7 +17,8 @@ from frappe.chat.util import ( dictify, get_emojis, safe_json_loads, - get_user_doc + get_user_doc, + squashify ) session = frappe.session @@ -91,13 +92,13 @@ def get_new_chat_message_doc(user, room, content, link = True): meta = get_message_meta(content) mess = frappe.new_doc('Chat Message') - mess.type = room.type - mess.room = room.name - mess.content = sanitize_message_content(content) - mess.user = user.name + mess.room = room.name + mess.room_type = room.type + mess.content = sanitize_message_content(content) + mess.user = user.name - mess.mentions = json.dumps(meta.mentions) - mess.urls = ','.join(meta.urls) + mess.mentions = json.dumps(meta.mentions) + mess.urls = ','.join(meta.urls) mess.save(ignore_permissions = True) if link: @@ -112,14 +113,15 @@ def get_new_chat_message(user, room, content): mess = get_new_chat_message_doc(user, room, content) resp = dict( - name = mess.name, - user = mess.user, - room = mess.room, - content = mess.content, - urls = mess.urls, - mentions = json.loads(mess.mentions), - creation = mess.creation, - seen = json.loads(mess._seen) if mess._seen else [ ], + name = mess.name, + user = mess.user, + room = mess.room, + room_type = mess.room_type, + content = mess.content, + urls = mess.urls, + mentions = json.loads(mess.mentions), + creation = mess.creation, + seen = json.loads(mess._seen) if mess._seen else [ ], ) return resp @@ -145,11 +147,11 @@ def history(room, fields = None, limit = 10, start = None, end = None): room = frappe.get_doc('Chat Room', room) mess = frappe.get_all('Chat Message', filters = [ - ('Chat Message', 'room', '=', room.name), - ('Chat Message', 'type', '=', room.type) + ('Chat Message', 'room', '=', room.name), + ('Chat Message', 'room_type', '=', room.type) ], fields = fields if fields else [ - 'name', 'type', 'room', 'content', 'user', 'mentions', 'urls', 'creation', '_seen' + 'name', 'room_type', 'room', 'content', 'user', 'mentions', 'urls', 'creation', '_seen' ], order_by = 'creation' ) @@ -167,14 +169,15 @@ def get(name, rooms = None, fields = None): dmess = frappe.get_doc('Chat Message', name) data = dict( - name = dmess.name, - user = dmess.user, - room = dmess.room, - content = dmess.content, - urls = dmess.urls, - mentions = dmess.mentions, - creation = dmess.creation, - seen = assign_if_empty(dmess._seen, [ ]) + name = dmess.name, + user = dmess.user, + room = dmess.room, + room_type = dmess.room_type, + content = dmess.content, + urls = dmess.urls, + mentions = dmess.mentions, + creation = dmess.creation, + seen = assign_if_empty(dmess._seen, [ ]) ) return data \ No newline at end of file diff --git a/frappe/public/build.json b/frappe/public/build.json index 909667fee4..8f51df7f1c 100755 --- a/frappe/public/build.json +++ b/frappe/public/build.json @@ -3,9 +3,7 @@ "public/css/font-awesome.css", "public/css/octicons/octicons.css", "public/css/website.css", - "public/css/avatar.css", - - "public/css/chat.css" + "public/css/avatar.css" ], "js/frappe-web.min.js": [ "public/js/frappe/class.js", @@ -22,11 +20,7 @@ "public/js/lib/microtemplate.js", "public/js/frappe/query_string.js", "website/js/website.js", - "public/js/frappe/misc/rating_icons.html", - - "public/js/lib/hyper.min.js", - "public/js/lib/fuse.min.js", - "public/js/frappe/chat.js" + "public/js/frappe/misc/rating_icons.html" ], "js/control.min.js": [ "public/js/frappe/ui/capture.js", @@ -146,7 +140,7 @@ "public/js/lib/moment/moment-with-locales.min.js", "public/js/lib/moment/moment-timezone-with-data.min.js", "public/js/lib/socket.io.min.js", - "public/js/lib/markdown.js", + "public/js/lib/showdown.js", "public/js/lib/jSignature.min.js", "public/js/frappe/translate.js", "public/js/lib/datepicker/datepicker.min.js", diff --git a/frappe/public/css/chat.css b/frappe/public/css/chat.css index 18d218b667..4a61522adb 100644 --- a/frappe/public/css/chat.css +++ b/frappe/public/css/chat.css @@ -314,21 +314,8 @@ a.no-decoration:active { vertical-align: middle; max-width: 180px; } -.frappe-chat > .frappe-chat-popper > .frappe-chat-popper-collapse > .panel .frappe-chat-room-list .message-count { - background: #ff5858; - display: inline-block; - padding: 5px; - color: white; - border-radius: 50%; - font-size: 12px; - height: 20px; - line-height: 10px; - text-align: center; - min-width: 20px; - margin-top: 4px; -} .frappe-chat > .frappe-chat-popper > .frappe-chat-popper-collapse > .panel .chat-list.list-group { - height: 390px; + height: 387px; overflow-y: scroll; } .frappe-chat > .frappe-chat-popper > .frappe-chat-popper-collapse > .panel .frappe-chat-room-footer { @@ -354,40 +341,99 @@ a.no-decoration:active { .frappe-chat .panel { margin-bottom: 0px !important; } -.frappe-chat .panel .frappe-chat-form { - margin: 1px; -} -.frappe-chat .panel .frappe-chat-form .form-control { +.frappe-chat .panel .chat-form .form-control { font-size: 12px; } -.frappe-chat .panel .frappe-chat-form .dropdown-menu { +.frappe-chat .panel .chat-form .dropdown-menu { border-radius: 4px; } -.frappe-chat .panel .frappe-chat-form .btn { - border-radius: 0px !important; -} -.frappe-chat .panel .frappe-chat-form .hint-list.list-group { +.frappe-chat .panel .chat-form .hint-list.list-group { margin: 0px; max-height: 150px; overflow-y: auto; } -.frappe-chat .panel .frappe-chat-form .hint-list.list-group .hint-list-item.list-group-item:first-child, -.frappe-chat .panel .frappe-chat-form .hint-list.list-group .hint-list-item.list-group-item:last-child { +.frappe-chat .panel .chat-form .hint-list.list-group .hint-list-item.list-group-item:first-child, +.frappe-chat .panel .chat-form .hint-list.list-group .hint-list-item.list-group-item:last-child { border-radius: 0px !important; } -.frappe-chat .panel .frappe-chat-form .hint-list.list-group .hint-list-item.list-group-item:first-child a, -.frappe-chat .panel .frappe-chat-form .hint-list.list-group .hint-list-item.list-group-item:last-child a { +.frappe-chat .panel .chat-form .hint-list.list-group .hint-list-item.list-group-item:first-child a, +.frappe-chat .panel .chat-form .hint-list.list-group .hint-list-item.list-group-item:last-child a { text-decoration: none; } -.chat-message { - background: #E8DDFF; - padding: 5px 15px; - margin: 5px; - border-radius: 5px; - display: inline-block; +.chat-list { + padding-bottom: 3px; } -.seen-check { - font-size: 12px; +.chat-form { + border-top: 1px solid #D1D8DD; +} +.chat-form .input-group-btn .btn { + background: white; +} +.chat-form .form-control { + line-height: 27px; + border: none; + box-shadow: none; + resize: none; + padding-left: 0px; + padding-right: 0px; +} +.chat-form .fa { + font-size: 14px; +} +.chat-list { + background: #FAFBFC; +} +.chat-list .chat-list-item { + cursor: pointer; + border: none !important; + padding: 5px 10px; + background: transparent; +} +.chat-list .chat-list-item .avatar { + vertical-align: top; +} +.chat-list .chat-list-item .chat-bubble { + min-width: 20%; + max-width: 75%; display: inline-block; + padding: 5px 10px; + border-radius: 5px; + -webkit-box-shadow: 0px 0.1px 0.5px 0px rgba(0, 0, 0, 0.5); + -moz-box-shadow: 0px 0.1px 0.5px 0px rgba(0, 0, 0, 0.5); + box-shadow: 0px 0.1px 0.5px 0px rgba(0, 0, 0, 0.5); +} +.chat-list .chat-list-item .chat-bubble.chat-bubble-l { + background-color: #EBEFF2; +} +.chat-list .chat-list-item .chat-bubble.chat-bubble-l .chat-bubble-meta > .chat-bubble-creation, +.chat-list .chat-list-item .chat-bubble.chat-bubble-l .chat-bubble-meta > .chat-bubble-check i { + color: #577287 !important; +} +.chat-list .chat-list-item .chat-bubble.chat-bubble-r { + text-align: right; + background-color: #EBF7CF; +} +.chat-list .chat-list-item .chat-bubble.chat-bubble-r .chat-bubble-meta > .chat-bubble-creation, +.chat-list .chat-list-item .chat-bubble.chat-bubble-r .chat-bubble-meta > .chat-bubble-check i { + color: #80ab1c !important; +} +.chat-list .chat-list-item .chat-bubble .chat-bubble-author { + font-size: 12px; +} +.chat-list .chat-list-item .chat-bubble .chat-bubble-author a { + font-weight: 700; + text-decoration: none !important; +} +.chat-list .chat-list-item .chat-bubble .chat-bubble-content { + margin-bottom: 5px; + word-wrap: break-word; +} +.chat-list .chat-list-item .chat-bubble .chat-bubble-meta { + font-size: 10px; +} +.chat-list .chat-list-item .chat-bubble .chat-bubble-meta > .chat-bubble-check { margin-left: 5px; } +.chat-list .chat-list-item .chat-bubble .chat-bubble-meta > .chat-bubble-check i { + font-size: 12px; +} diff --git a/frappe/public/js/frappe/chat.js b/frappe/public/js/frappe/chat.js index 6aea96b6f8..46e01bbd16 100644 --- a/frappe/public/js/frappe/chat.js +++ b/frappe/public/js/frappe/chat.js @@ -1,6 +1,12 @@ // Frappe Chat // Author - Achilles Rasquinha +/** + * -------------------------------------------------------------------------------- + * Developer Notes + * -------------------------------------------------------------------------------- + */ + /* eslint semi: "never" */ // Fuck semicolons - https://mislav.net/2010/05/semicolons @@ -1064,6 +1070,8 @@ const { h, Component } = hyper // frappe's component namespace. frappe.provide('frappe.components') +frappe.provide('frappe.chat.component') + /** * @description Button Component * @@ -1171,7 +1179,7 @@ class extends Component { const { props } = this - return props.type ? h("i", { ...props, class: `fa ${props.fixed ? "fa-fw" : ""} fa-${props.type}` }) : null + return props.type ? h("i", { ...props, class: `fa ${props.fixed ? "fa-fw" : ""} fa-${props.type} ${props.class}` }) : null } } frappe.components.FontAwesome.defaultProps @@ -1396,7 +1404,7 @@ class extends Component const state = [ ] for (const room of rooms) - if ( room.type === "Group" || room.last_message ) + if ( room.type === "Group" || room.owner === frappe.session.user || room.last_message ) { frappe.log.info(`Adding ${room.name} to component.`) state.push(room) @@ -2091,7 +2099,8 @@ class extends Component { icon: "camera", label: "Camera", - click: ( ) => { + on_click: ( ) => + { const capture = new frappe.ui.Capture({ animate: false, error: true @@ -2107,7 +2116,8 @@ class extends Component { icon: "file", label: "File", - click: ( ) => { + on_click: ( ) => + { } } @@ -2127,7 +2137,7 @@ class extends Component h("div", { class: `panel panel-default ${frappe._.is_mobile() ? "panel-span" : ""}` }, h(frappe.Chat.Widget.Room.Header, { ...props, back: props.destroy }), !frappe._.is_empty(props.messages) ? - h(frappe.Chat.Widget.ChatList, { + h(frappe.chat.component.ChatList, { messages: props.messages }) : @@ -2140,11 +2150,11 @@ class extends Component ) ), h("div", { class: "frappe-chat-room-footer" }, - h(frappe.Chat.Widget.ChatForm, { actions: actions, - change: () => { + h(frappe.chat.component.ChatForm, { actions: actions, + on_change: () => { frappe.chat.message.typing(props.name) }, - submit: (message) => { + on_submit: (message) => { frappe.chat.message.send(props.name, message) }, hint: hints @@ -2220,23 +2230,141 @@ class extends Component } /** - * @description Chat Form Component + * @description ChatList Component + * + * @prop {array} messages - ChatMessage(s) */ -frappe.Chat.Widget.ChatForm +frappe.chat.component.ChatList = -class extends Component { - constructor (props) { - super (props) - - this.change = this.change.bind(this) - this.submit = this.submit.bind(this) - - this.hint = this.hint.bind(this) - - this.state = frappe.Chat.Widget.ChatForm.defaultState +class extends Component +{ + on_mounted ( ) + { + this.$element = $('.frappe-chat').find('.chat-list') + this.$element.scrollTop(this.$element[0].scrollHeight) } - change (e) + on_updated ( ) + { + this.$element.scrollTop(this.$element[0].scrollHeight) + } + + render ( ) + { + const { props } = this + + return !frappe._.is_empty(props.messages) ? ( + h("div",{class:"chat-list list-group"}, + props.messages.map(m => h(frappe.chat.component.ChatList.Item, {...m})) + ) + ) : null + } +} + +/** + * @description ChatList.Item Component + * + * @prop {string} name - ChatMessage name + * @prop {string} user - ChatMessage user + * @prop {string} room - ChatMessage room + * @prop {string} room_type - ChatMessage Room Type ("Direct", "Group" or "Visitor") + * @prop {string} content - ChatMessage content + * @prop {frappe.datetime.datetime} creation - Chat Message creation + */ +frappe.chat.component.ChatList.Item += +class extends Component +{ + render ( ) + { + const { props } = this + + const me = props.user === frappe.session.user + + return ( + h("div",{class: "chat-list-item list-group-item"}, + h("div",{class:`${me ? "text-right" : ""}`}, + props.room_type === "Group" && !me? + h(frappe.components.Avatar, + { + title: frappe.user.full_name(props.user), + image: frappe.user.image(props.user) + }) : null, + h(frappe.chat.component.ChatBubble, props) + ) + ) + ) + } +} + +/** + * @description ChatBubble Component + * + * @prop {string} name - ChatMessage name + * @prop {string} user - ChatMessage user + * @prop {string} room - ChatMessage room + * @prop {string} room_type - ChatMessage room_type ("Direct", "Group" or "Visitor") + * @prop {string} content - ChatMessage content + * @prop {frappe.datetime.datetime} creation - ChatMessage creation + */ +frappe.chat.component.ChatBubble += +class extends Component +{ + render ( ) + { + const { props } = this + + const creation = props.creation.format('hh:mm A') + + const me = props.user === frappe.session.user + const read = !frappe._.is_empty(props.seen) && !props.seen.includes(frappe.session.user) + + const content = props.content + + return ( + h("div",{class:`chat-bubble chat-bubble-${me ? "r" : "l"}`}, + props.room_type === "Group" && !me? + h("div",{class:"chat-bubble-author"}, + h("a", { onclick: () => { frappe.set_route(`Form/User/${props.user}`) } }, + frappe.user.full_name(props.user) + ) + ) : null, + h("div",{class:"chat-bubble-content"}, + h("small","",content) + ), + h("div",{class:"chat-bubble-meta"}, + h("span",{class:"chat-bubble-creation"},creation), + me && read ? + h("span",{class:"chat-bubble-check"}, + h(frappe.components.Octicon,{type:"check"}) + ) : null + ) + ) + ) + } +} + +/** + * @description ChatForm Component + */ +frappe.chat.component.ChatForm += +class extends Component +{ + constructor (props) + { + super (props) + + this.on_change = this.on_change.bind(this) + this.on_submit = this.on_submit.bind(this) + + this.hint = this.hint.bind(this) + + this.state = frappe.chat.component.ChatForm.defaultState + } + + on_change (e) { const { props, state } = this const value = e.target.value @@ -2245,7 +2373,7 @@ class extends Component { [e.target.name]: value }) - props.change(state) + props.on_change(state) this.hint(value) } @@ -2290,23 +2418,24 @@ class extends Component { } } - submit (e) + on_submit (e) { e.preventDefault() if ( this.state.content ) { - this.props.submit(this.state.content) + this.props.on_submit(this.state.content) this.set_state({ content: null }) } } - render ( ) { + render ( ) + { const { props, state } = this return ( - h("div", { class: "frappe-chat-form" }, + h("div",{class:"chat-form"}, state.hints.length ? h("ul", { class: "hint-list list-group" }, state.hints.map((item) => @@ -2323,25 +2452,27 @@ class extends Component { ) }) ) : null, - h("form", { oninput: this.change, onsubmit: this.submit }, - h("div", { class: "input-group input-group-lg" }, - h("div", { class: "input-group-btn dropup" }, - h(frappe.components.Button, { class: "dropdown-toggle", "data-toggle": "dropdown" }, - h(frappe.components.FontAwesome, { type: "paperclip", fixed: true, style: { "font-size": "14px" } }) - ), - h("div", { class: "dropdown-menu dropdown-menu-left", onclick: e => e.stopPropagation() }, - !frappe._.is_empty(props.actions) && props.actions.map((action) => { - return ( - h("li", null, - h("a", { onclick: action.click }, - h(frappe.components.FontAwesome, { type: action.icon, fixed: true }), ` ${action.label}`, + h("form", { oninput: this.on_change, onsubmit: this.on_submit }, + h("div",{class:"input-group input-group-lg"}, + !frappe._.is_empty(props.actions) ? + h("div",{class:"input-group-btn dropup"}, + h(frappe.components.Button,{ class: "dropdown-toggle", "data-toggle": "dropdown"}, + h(frappe.components.FontAwesome, { class: "text-muted", type: "paperclip", fixed: true }) + ), + h("div",{ class:"dropdown-menu dropdown-menu-left", onclick: e => e.stopPropagation() }, + !frappe._.is_empty(props.actions) && props.actions.map((action) => + { + return ( + h("li", null, + h("a",{onclick:action.on_click}, + h(frappe.components.FontAwesome,{type:action.icon,fixed:true}), ` ${action.label}`, + ) ) ) - ) - }) - ) - ), - h("input", + }) + ) + ) : null, + h("textarea", { class: "form-control", name: "content", @@ -2351,12 +2482,12 @@ class extends Component { onkeypress: (e) => { if ( e.which === frappe.ui.keycode.RETURN && !e.shiftKey ) - this.submit(e) + this.on_submit(e) } }), - h("div", { class: "input-group-btn" }, - h(frappe.components.Button, { type: "primary", class: "dropdown-toggle", "data-toggle": "dropdown", onclick: this.submit }, - h(frappe.components.FontAwesome, { type: "send", fixed: true, style: { "font-size": "14px" } }) + h("div",{class:"input-group-btn"}, + h(frappe.components.Button, { onclick: this.on_submit }, + h(frappe.components.FontAwesome, { class: !frappe._.is_empty(state.content) ? "text-primary" : "text-muted", type: "send", fixed: true }) ), ) ) @@ -2365,14 +2496,20 @@ class extends Component { ) } } -frappe.Chat.Widget.ChatForm.defaultState +frappe.chat.component.ChatForm.defaultState = { content: null, hints: [ ], } -frappe.Chat.Widget.EmojiPicker + +/** + * @description EmojiPicker Component + * + * @todo Under Development + */ +frappe.chat.component.EmojiPicker = class extends Component { @@ -2387,14 +2524,14 @@ class extends Component ), h("div", { class: "dropdown-menu dropdown-menu-right", onclick: e => e.stopPropagation() }, h("div", { class: "panel panel-default" }, - h(frappe.Chat.Widget.EmojiPicker.List) + h(frappe.chat.component.EmojiPicker.List) ) ) ) ) } } -frappe.Chat.Widget.EmojiPicker.List +frappe.chat.component.EmojiPicker.List = class extends Component { @@ -2408,72 +2545,4 @@ class extends Component ) ) } -} - -/** - * @description Chat List HOC - */ -frappe.Chat.Widget.ChatList -= -class extends Component { - on_mounted ( ) - { - const $element = $('.frappe-chat').find('.chat-list') - $element.scrollTop($element[0].scrollHeight) - } - - on_updated ( ) - { - const $element = $('.frappe-chat').find('.chat-list') - $element.scrollTop($element[0].scrollHeight) - } - - render ( ) { - const { props } = this - - return !frappe._.is_empty(props.messages) ? ( - h("ul", { class: "chat-list list-group" }, - props.messages.map(m => h(frappe.Chat.Widget.ChatList.Item, { - ...m - })) - ) - ) : null - } -} - -frappe.Chat.Widget.ChatList.Item -= -class extends Component { - render ( ) { - const { props } = this - - return ( - h("li", { class: "list-group-item", style: "border: none !important" }, - h(frappe.Chat.Widget.ChatList.Bubble, props) - ) - ) - } -} - -frappe.Chat.Widget.ChatList.Bubble -= -class extends Component { - render ( ) { - const { props } = this - - return ( - h(frappe.Chat.Widget.MediaProfile, { - title: frappe.user.full_name(props.user), - subtitle: `${frappe.chat.pretty_datetime(props.creation)}`, - content: props.content, - image: frappe.user.image(props.user), - width_title: "100%", - position: frappe.user.full_name(props.user) === "You" ? "right" : "left" - }) - ) - } -} -frappe.Chat.Widget.ChatList.Bubble.defaultState = -{ - creation: "" } \ No newline at end of file diff --git a/frappe/public/js/frappe/misc/tools.js b/frappe/public/js/frappe/misc/tools.js index b82ee76bfc..4e193ff6c3 100644 --- a/frappe/public/js/frappe/misc/tools.js +++ b/frappe/public/js/frappe/misc/tools.js @@ -34,7 +34,7 @@ frappe.tools.downloadify = function(data, roles, title) { frappe.markdown = function(txt) { if(!frappe.md2html) { - frappe.md2html = new Showdown.converter(); + frappe.md2html = new showdown.Converter(); } while(txt.substr(0,1)==="\n") { diff --git a/frappe/public/js/lib/hyper.min.js b/frappe/public/js/lib/hyper.min.js index 98e53d7cf9..e63af8c1a4 100644 --- a/frappe/public/js/lib/hyper.min.js +++ b/frappe/public/js/lib/hyper.min.js @@ -1 +1 @@ -!function(){"use strict";function e(){}function t(t,n){var o,r,i,l,a=W;for(l=arguments.length;l-- >2;)S.push(arguments[l]);n&&null!=n.children&&(S.length||S.push(n.children),delete n.children);while(S.length)if((r=S.pop())&&void 0!==r.pop)for(l=r.length;l--;)S.push(r[l]);else"boolean"==typeof r&&(r=null),(i="function"!=typeof t)&&(null==r?r="":"number"==typeof r?r+="":"string"!=typeof r&&(i=!1)),i&&o?a[a.length-1]+=r:a===W?a=[r]:a.push(r),o=i;var _=new e;return _.nodeName=t,_.children=a,_.attributes=null==n?void 0:n,_.key=null==n?void 0:n.key,void 0!==M.vnode&&M.vnode(_),_}function n(e,t){for(var n in t)e[n]=t[n];return e}function o(e){!e.__d&&(e.__d=!0)&&1==A.push(e)&&(M.debounceRendering||V)(r)}function r(){var e,t=A;A=[];while(e=t.pop())e.__d&&N(e)}function i(e,t,n){return"string"==typeof t||"number"==typeof t?void 0!==e.splitText:"string"==typeof t.nodeName?!e._componentConstructor&&l(e,t.nodeName):n||e._componentConstructor===t.nodeName}function l(e,t){return e.__n===t||e.nodeName.toLowerCase()===t.toLowerCase()}function a(e){var t=n({},e.attributes);t.children=e.children;var o=e.nodeName.defaultProps;if(void 0!==o)for(var r in o)void 0===t[r]&&(t[r]=o[r]);return t}function _(e,t){var n=t?document.createElementNS("http://www.w3.org/2000/svg",e):document.createElement(e);return n.__n=e,n}function u(e){var t=e.parentNode;t&&t.removeChild(e)}function p(e,t,n,o,r){if("className"===t&&(t="class"),"key"===t);else if("ref"===t)n&&n(null),o&&o(e);else if("class"!==t||r)if("style"===t){if(o&&"string"!=typeof o&&"string"!=typeof n||(e.style.cssText=o||""),o&&"object"==typeof o){if("string"!=typeof n)for(var i in n)i in o||(e.style[i]="");for(var i in o)e.style[i]="number"==typeof o[i]&&!1===P.test(i)?o[i]+"px":o[i]}}else if("dangerouslySetInnerHTML"===t)o&&(e.innerHTML=o.__html||"");else if("o"==t[0]&&"n"==t[1]){var l=t!==(t=t.replace(/Capture$/,""));t=t.toLowerCase().substring(2),o?n||e.addEventListener(t,s,l):e.removeEventListener(t,s,l),(e.__l||(e.__l={}))[t]=o}else if("list"!==t&&"type"!==t&&!r&&t in e)c(e,t,null==o?"":o),null!=o&&!1!==o||e.removeAttribute(t);else{var a=r&&t!==(t=t.replace(/^xlink\:?/,""));null==o||!1===o?a?e.removeAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase()):e.removeAttribute(t):"function"!=typeof o&&(a?e.setAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase(),o):e.setAttribute(t,o))}else e.className=o||""}function c(e,t,n){try{e[t]=n}catch(e){}}function s(e){return this.__l[e.type](M.event&&M.event(e)||e)}function f(){var e;while(e=E.pop())M.afterMount&&M.afterMount(e),e.on_mounted&&e.on_mounted()}function d(e,t,n,o,r,i){D++||(H=null!=r&&void 0!==r.ownerSVGElement,R=null!=e&&!("__hyperattr_"in e));var l=h(e,t,n,o,i);return r&&l.parentNode!==r&&r.appendChild(l),--D||(R=!1,i||f()),l}function h(e,t,n,o,r){var i=e,a=H;if(null!=t&&"boolean"!=typeof t||(t=""),"string"==typeof t||"number"==typeof t)return e&&void 0!==e.splitText&&e.parentNode&&(!e._component||r)?e.nodeValue!=t&&(e.nodeValue=t):(i=document.createTextNode(t),e&&(e.parentNode&&e.parentNode.replaceChild(i,e),m(e,!0))),i.__hyperattr_=!0,i;var u=t.nodeName;if("function"==typeof u)return k(e,t,n,o);if(H="svg"===u||"foreignObject"!==u&&H,u+="",(!e||!l(e,u))&&(i=_(u,H),e)){while(e.firstChild)i.appendChild(e.firstChild);e.parentNode&&e.parentNode.replaceChild(i,e),m(e,!0)}var p=i.firstChild,c=i.__hyperattr_,s=t.children;if(null==c){c=i.__hyperattr_={};for(var f=i.attributes,d=f.length;d--;)c[f[d].name]=f[d].value}return!R&&s&&1===s.length&&"string"==typeof s[0]&&null!=p&&void 0!==p.splitText&&null==p.nextSibling?p.nodeValue!=s[0]&&(p.nodeValue=s[0]):(s&&s.length||null!=p)&&v(i,s,n,o,R||null!=c.dangerouslySetInnerHTML),y(i,t.attributes,c),H=a,i}function v(e,t,n,o,r){var l,a,_,p,c,s=e.childNodes,f=[],d={},v=0,b=0,y=s.length,g=0,w=t?t.length:0;if(0!==y)for(var C=0;C2;)S.push(arguments[l]);n&&null!=n.children&&(S.length||S.push(n.children),delete n.children);while(S.length)if((r=S.pop())&&void 0!==r.pop)for(l=r.length;l--;)S.push(r[l]);else"boolean"==typeof r&&(r=null),(i="function"!=typeof t)&&(null==r?r="":"number"==typeof r?r+="":"string"!=typeof r&&(i=!1)),i&&o?a[a.length-1]+=r:a===W?a=[r]:a.push(r),o=i;var _=new e;return _.nodeName=t,_.children=a,_.attributes=null==n?void 0:n,_.key=null==n?void 0:n.key,void 0!==M.vnode&&M.vnode(_),_}function n(e,t){for(var n in t)e[n]=t[n];return e}function o(e){!e.__d&&(e.__d=!0)&&1==A.push(e)&&(M.debounceRendering||V)(r)}function r(){var e,t=A;A=[];while(e=t.pop())e.__d&&N(e)}function i(e,t,n){return"string"==typeof t||"number"==typeof t?void 0!==e.splitText:"string"==typeof t.nodeName?!e._componentConstructor&&l(e,t.nodeName):n||e._componentConstructor===t.nodeName}function l(e,t){return e.__n===t||e.nodeName.toLowerCase()===t.toLowerCase()}function a(e){var t=n({},e.attributes);t.children=e.children;var o=e.nodeName.defaultProps;if(void 0!==o)for(var r in o)void 0===t[r]&&(t[r]=o[r]);return t}function _(e,t){var n=t?document.createElementNS("http://www.w3.org/2000/svg",e):document.createElement(e);return n.__n=e,n}function u(e){var t=e.parentNode;t&&t.removeChild(e)}function p(e,t,n,o,r){if("className"===t&&(t="class"),"key"===t);else if("ref"===t)n&&n(null),o&&o(e);else if("class"!==t||r)if("style"===t){if(o&&"string"!=typeof o&&"string"!=typeof n||(e.style.cssText=o||""),o&&"object"==typeof o){if("string"!=typeof n)for(var i in n)i in o||(e.style[i]="");for(var i in o)e.style[i]="number"==typeof o[i]&&!1===P.test(i)?o[i]+"px":o[i]}}else if("html"===t)o&&(e.innerHTML=o);else if("o"==t[0]&&"n"==t[1]){var l=t!==(t=t.replace(/Capture$/,""));t=t.toLowerCase().substring(2),o?n||e.addEventListener(t,s,l):e.removeEventListener(t,s,l),(e.__l||(e.__l={}))[t]=o}else if("list"!==t&&"type"!==t&&!r&&t in e)c(e,t,null==o?"":o),null!=o&&!1!==o||e.removeAttribute(t);else{var a=r&&t!==(t=t.replace(/^xlink\:?/,""));null==o||!1===o?a?e.removeAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase()):e.removeAttribute(t):"function"!=typeof o&&(a?e.setAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase(),o):e.setAttribute(t,o))}else e.className=o||""}function c(e,t,n){try{e[t]=n}catch(e){}}function s(e){return this.__l[e.type](M.event&&M.event(e)||e)}function f(){var e;while(e=E.pop())M.afterMount&&M.afterMount(e),e.on_mounted&&e.on_mounted()}function d(e,t,n,o,r,i){D++||(H=null!=r&&void 0!==r.ownerSVGElement,R=null!=e&&!("__hyperattr_"in e));var l=h(e,t,n,o,i);return r&&l.parentNode!==r&&r.appendChild(l),--D||(R=!1,i||f()),l}function h(e,t,n,o,r){var i=e,a=H;if(null!=t&&"boolean"!=typeof t||(t=""),"string"==typeof t||"number"==typeof t)return e&&void 0!==e.splitText&&e.parentNode&&(!e._component||r)?e.nodeValue!=t&&(e.nodeValue=t):(i=document.createTextNode(t),e&&(e.parentNode&&e.parentNode.replaceChild(i,e),m(e,!0))),i.__hyperattr_=!0,i;var u=t.nodeName;if("function"==typeof u)return k(e,t,n,o);if(H="svg"===u||"foreignObject"!==u&&H,u+="",(!e||!l(e,u))&&(i=_(u,H),e)){while(e.firstChild)i.appendChild(e.firstChild);e.parentNode&&e.parentNode.replaceChild(i,e),m(e,!0)}var p=i.firstChild,c=i.__hyperattr_,s=t.children;if(null==c){c=i.__hyperattr_={};for(var f=i.attributes,d=f.length;d--;)c[f[d].name]=f[d].value}return!R&&s&&1===s.length&&"string"==typeof s[0]&&null!=p&&void 0!==p.splitText&&null==p.nextSibling?p.nodeValue!=s[0]&&(p.nodeValue=s[0]):(s&&s.length||null!=p)&&v(i,s,n,o,R||null!=c.html),y(i,t.attributes,c),H=a,i}function v(e,t,n,o,r){var l,a,_,p,c,s=e.childNodes,f=[],d={},v=0,b=0,y=s.length,g=0,w=t?t.length:0;if(0!==y)for(var C=0;C -// -// Redistributable under a BSD-style open source license. -// See license.txt for more information. -// -// The full source distribution is at: -// -// A A L -// T C A -// T K B -// -// -// -// -// Wherever possible, Showdown is a straight, line-by-line port -// of the Perl version of Markdown. -// -// This is not a normal parser design; it's basically just a -// series of string substitutions. It's hard to read and -// maintain this way, but keeping Showdown close to the original -// design makes it easier to port new features. -// -// More importantly, Showdown behaves like markdown.pl in most -// edge cases. So web applications can do client-side preview -// in Javascript, and then build identical HTML on the server. -// -// This port needs the new RegExp functionality of ECMA 262, -// 3rd Edition (i.e. Javascript 1.5). Most modern web browsers -// should do fine. Even with the new regular expression features, -// We do a lot of work to emulate Perl's regex functionality. -// The tricky changes in this file mostly have the "attacklab:" -// label. Major or self-explanatory changes don't. -// -// Smart diff tools like Araxis Merge will be able to match up -// this file with markdown.pl in a useful way. A little tweaking -// helps: in a copy of markdown.pl, replace "#" with "//" and -// replace "$text" with "text". Be sure to ignore whitespace -// and line endings. -// -// -// Showdown usage: -// -// var text = "Markdown *rocks*."; -// -// var converter = new Showdown.converter(); -// var html = converter.makeHtml(text); -// -// alert(html); -// -// Note: move the sample code to the bottom of this -// file before uncommenting it. -// -// -// Showdown namespace -// -var Showdown={extensions:{}},forEach=Showdown.forEach=function(a,b){if(typeof a.forEach=="function")a.forEach(b);else{var c,d=a.length;for(c=0;c?[ \t]*\n?[ \t]*(?:(\n*)["(](.+?)[")][ \t]*)?(?:\n+|(?=~0))/gm,function(a,d,e,f,g){return d=d.toLowerCase(),b[d]=G(e),f?f+g:(g&&(c[d]=g.replace(/"/g,""")),"")}),a=a.replace(/~0/,""),a},m=function(a){a=a.replace(/\n/g,"\n\n");var b="p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del|style|section|header|footer|nav|article|aside",c="p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|style|section|header|footer|nav|article|aside";return a=a.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del)\b[^\r]*?\n<\/\2>[ \t]*(?=\n+))/gm,n),a=a.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|style|section|header|footer|nav|article|aside)\b[^\r]*?<\/\2>[ \t]*(?=\n+)\n)/gm,n),a=a.replace(/(\n[ ]{0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,n),a=a.replace(/(\n\n[ ]{0,3}[ \t]*(?=\n{2,}))/g,n),a=a.replace(/(?:\n\n)([ ]{0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,n),a=a.replace(/\n\n/g,"\n"),a},n=function(a,b){var c=b;return c=c.replace(/\n\n/g,"\n"),c=c.replace(/^\n/,""),c=c.replace(/\n+$/g,""),c="\n\n~K"+(d.push(c)-1)+"K\n\n",c},o=function(a){a=v(a);var b=A("
");return a=a.replace(/^[ ]{0,2}([ ]?\*[ ]?){3,}[ \t]*$/gm,b),a=a.replace(/^[ ]{0,2}([ ]?\-[ ]?){3,}[ \t]*$/gm,b),a=a.replace(/^[ ]{0,2}([ ]?\_[ ]?){3,}[ \t]*$/gm,b),a=x(a),a=y(a),a=E(a),a=m(a),a=F(a),a},p=function(a){return a=B(a),a=q(a),a=H(a),a=t(a),a=r(a),a=I(a),a=G(a),a=D(a),a=a.replace(/ +\n/g,"
\n"),a},q=function(a){var b=/(<[a-z\/!$]("[^"]*"|'[^']*'|[^'">])*>|)/gi;return a=a.replace(b,function(a){var b=a.replace(/(.)<\/?code>(?=.)/g,"$1`");return b=N(b,"\\`*_"),b}),a},r=function(a){return a=a.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g,s),a=a.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\]\([ \t]*()?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g,s),a=a.replace(/(\[([^\[\]]+)\])()()()()()/g,s),a},s=function(a,d,e,f,g,h,i,j){j==undefined&&(j="");var k=d,l=e,m=f.toLowerCase(),n=g,o=j;if(n==""){m==""&&(m=l.toLowerCase().replace(/ ?\n/g," ")),n="#"+m;if(b[m]!=undefined)n=b[m],c[m]!=undefined&&(o=c[m]);else{if(!(k.search(/\(\s*\)$/m)>-1))return k;n=""}}n=N(n,"*_");var p='",p},t=function(a){return a=a.replace(/(!\[(.*?)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g,u),a=a.replace(/(!\[(.*?)\]\s?\([ \t]*()?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g,u),a},u=function(a,d,e,f,g,h,i,j){var k=d,l=e,m=f.toLowerCase(),n=g,o=j;o||(o="");if(n==""){m==""&&(m=l.toLowerCase().replace(/ ?\n/g," ")),n="#"+m;if(b[m]==undefined)return k;n=b[m],c[m]!=undefined&&(o=c[m])}l=l.replace(/"/g,"""),n=N(n,"*_");var p=''+l+''+p(c)+"")}),a=a.replace(/^(.+)[ \t]*\n-+[ \t]*\n+/gm,function(a,c){return A('

'+p(c)+"

")}),a=a.replace(/^(\#{1,6})[ \t]*(.+?)[ \t]*\#*\n+/gm,function(a,c,d){var e=c.length;return A("'+p(d)+"")}),a},w,x=function(a){a+="~0";var b=/^(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm;return e?a=a.replace(b,function(a,b,c){var d=b,e=c.search(/[*+-]/g)>-1?"ul":"ol";d=d.replace(/\n{2,}/g,"\n\n\n");var f=w(d);return f=f.replace(/\s+$/,""),f="<"+e+">"+f+"\n",f}):(b=/(\n\n|^\n?)(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/g,a=a.replace(b,function(a,b,c,d){var e=b,f=c,g=d.search(/[*+-]/g)>-1?"ul":"ol",f=f.replace(/\n{2,}/g,"\n\n\n"),h=w(f);return h=e+"<"+g+">\n"+h+"\n",h})),a=a.replace(/~0/,""),a};w=function(a){return e++,a=a.replace(/\n{2,}$/,"\n"),a+="~0",a=a.replace(/(\n)?(^[ \t]*)([*+-]|\d+[.])[ \t]+([^\r]+?(\n{1,2}))(?=\n*(~0|\2([*+-]|\d+[.])[ \t]+))/gm,function(a,b,c,d,e){var f=e,g=b,h=c;return g||f.search(/\n{2,}/)>-1?f=o(L(f)):(f=x(L(f)),f=f.replace(/\n$/,""),f=p(f)),"
  • "+f+"
  • \n"}),a=a.replace(/~0/g,""),e--,a};var y=function(a){return a+="~0",a=a.replace(/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=~0))/g,function(a,b,c){var d=b,e=c;return d=C(L(d)),d=M(d),d=d.replace(/^\n+/g,""),d=d.replace(/\n+$/g,""),d="
    "+d+"\n
    ",A(d)+e}),a=a.replace(/~0/,""),a},z=function(a){return a+="~0",a=a.replace(/(?:^|\n)```(.*)\n([\s\S]*?)\n```/g,function(a,b,c){var d=b,e=c;return e=C(e),e=M(e),e=e.replace(/^\n+/g,""),e=e.replace(/\n+$/g,""),e="
    "+e+"\n
    ",A(e)}),a=a.replace(/~0/,""),a},A=function(a){return a=a.replace(/(^\n+|\n+$)/g,""),"\n\n~K"+(d.push(a)-1)+"K\n\n"},B=function(a){return a=a.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,function(a,b,c,d,e){var f=d;return f=f.replace(/^([ \t]*)/g,""),f=f.replace(/[ \t]*$/g,""),f=C(f),b+""+f+""}),a},C=function(a){return a=a.replace(/&/g,"&"),a=a.replace(//g,">"),a=N(a,"*_{}[]\\",!1),a},D=function(a){return a=a.replace(/(\*\*|__)(?=\S)([^\r]*?\S[*_]*)\1/g,"$2"),a=a.replace(/(\*|_)(?=\S)([^\r]*?\S)\1/g,"$2"),a},E=function(a){return a=a.replace(/((^[ \t]*>[ \t]?.+\n(.+\n)*\n*)+)/gm,function(a,b){var c=b;return c=c.replace(/^[ \t]*>[ \t]?/gm,"~0"),c=c.replace(/~0/g,""),c=c.replace(/^[ \t]+$/gm,""),c=o(c),c=c.replace(/(^|\n)/g,"$1 "),c=c.replace(/(\s*
    [^\r]+?<\/pre>)/gm,function(a,b){var c=b;return c=c.replace(/^  /mg,"~0"),c=c.replace(/~0/g,""),c}),A("
    \n"+c+"\n
    ")}),a},F=function(a){a=a.replace(/^\n+/g,""),a=a.replace(/\n+$/g,"");var b=a.split(/\n{2,}/g),c=[],e=b.length;for(var f=0;f=0?c.push(g):g.search(/\S/)>=0&&(g=p(g),g=g.replace(/^([ \t]*)/g,"

    "),g+="

    ",c.push(g))}e=c.length;for(var f=0;f=0){var h=d[RegExp.$1];h=h.replace(/\$/g,"$$$$"),c[f]=c[f].replace(/~K\d+K/,h)}return c.join("\n\n")},G=function(a){return a=a.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g,"&"),a=a.replace(/<(?![a-z\/?\$!])/gi,"<"),a},H=function(a){return a=a.replace(/\\(\\)/g,O),a=a.replace(/\\([`*_{}\[\]()>#+-.!])/g,O),a},I=function(a){return a=a.replace(/<((https?|ftp|dict):[^'">\s]+)>/gi,'
    $1'),a=a.replace(/<(?:mailto:)?([-.\w]+\@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi,function(a,b){return J(K(b))}),a},J=function(a){var b=[function(a){return"&#"+a.charCodeAt(0)+";"},function(a){return"&#x"+a.charCodeAt(0).toString(16)+";"},function(a){return a}];return a="mailto:"+a,a=a.replace(/./g,function(a){if(a=="@")a=b[Math.floor(Math.random()*2)](a);else if(a!=":"){var c=Math.random();a=c>.9?b[2](a):c>.45?b[1](a):b[0](a)}return a}),a=''+a+"",a=a.replace(/">.+:/g,'">'),a},K=function(a){return a=a.replace(/~E(\d+)E/g,function(a,b){var c=parseInt(b);return String.fromCharCode(c)}),a},L=function(a){return a=a.replace(/^(\t|[ ]{1,4})/gm,"~0"),a=a.replace(/~0/g,""),a},M=function(a){return a=a.replace(/\t(?=\t)/g," "),a=a.replace(/\t/g,"~A~B"),a=a.replace(/~B(.+?)~A/g,function(a,b,c){var d=b,e=4-d.length%4;for(var f=0;f (GFM Style)",type:"boolean"},requireSpaceBeforeHeadingText:{defaultValue:!1,description:"Makes adding a space between `#` and the header text mandatory (GFM Style)",type:"boolean"},ghMentions:{defaultValue:!1,description:"Enables github @mentions",type:"boolean"},ghMentionsLink:{defaultValue:"https://github.com/{u}",description:"Changes the link generated by @mentions. Only applies if ghMentions option is enabled.",type:"string"},encodeEmails:{defaultValue:!0,description:"Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities",type:"boolean"},openLinksInNewWindow:{defaultValue:!1,description:"Open all links in new windows",type:"boolean"},backslashEscapesHTMLTags:{defaultValue:!1,description:"Support for HTML Tag escaping. ex:
    foo
    ",type:"boolean"},emoji:{defaultValue:!1,description:"Enable emoji support. Ex: `this is a :smile: emoji`",type:"boolean"},underline:{defaultValue:!1,description:"Enable support for underline. Syntax is double or triple underscores: `__underline word__`. With this option enabled, underscores no longer parses into `` and ``",type:"boolean"},completeHTMLDocument:{defaultValue:!1,description:"Outputs a complete html document, including ``, `` and `` tags",type:"boolean"},metadata:{defaultValue:!1,description:"Enable support for document metadata (defined at the top of the document between `«««` and `»»»` or between `---` and `---`).",type:"boolean"},splitAdjacentBlockquotes:{defaultValue:!1,description:"Split adjacent blockquote blocks",type:"boolean"}};if(!1===g)return JSON.parse(JSON.stringify(A));var e={};for(var C in A)A.hasOwnProperty(C)&&(e[C]=A[C].defaultValue);return e}function A(g,A){"use strict";var e=A?"Error in "+A+" extension->":"Error in unnamed extension",I={valid:!0,error:""};C.helper.isArray(g)||(g=[g]);for(var r=0;r-1,i=new RegExp(A+"|"+e,"g"+o.replace(/g/g,"")),l=new RegExp(A,o.replace(/g/g,"")),c=[];do{for(I=0;t=i.exec(g);)if(l.test(t[0]))I++||(a=(r=i.lastIndex)-t[0].length);else if(I&&!--I){n=t.index+t[0].length;var u={left:{start:a,end:r},match:{start:r,end:t.index},right:{start:t.index,end:n},wholeMatch:{start:a,end:n}};if(c.push(u),!s)return c}}while(I&&(i.lastIndex=r));return c};C.helper.matchRecursiveRegExp=function(g,A,e,C){"use strict";for(var I=o(g,A,e,C),r=[],t=0;t0){var i=[];0!==a[0].wholeMatch.start&&i.push(g.slice(0,a[0].wholeMatch.start));for(var l=0;l=0?I+(e||0):I},C.helper.splitAtIndex=function(g,A){"use strict";if(!C.helper.isString(g))throw"InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string";return[g.substring(0,A),g.substring(A)]},C.helper.encodeEmailAddress=function(g){"use strict";var A=[function(g){return"&#"+g.charCodeAt(0)+";"},function(g){return"&#x"+g.charCodeAt(0).toString(16)+";"},function(g){return g}];return g=g.replace(/./g,function(g){if("@"===g)g=A[Math.floor(2*Math.random())](g);else{var e=Math.random();g=e>.9?A[2](g):e>.45?A[1](g):A[0](g)}return g})},C.helper.padEnd=function(g,A,e){"use strict";return A>>=0,e=String(e||" "),g.length>A?String(g):((A-=g.length)>e.length&&(e+=e.repeat(A/e.length)),String(g)+e.slice(0,A))},C.helper.unescapeHTMLEntities=function(g){"use strict";return g.replace(/"/g,'"').replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&")},"undefined"==typeof console&&(console={warn:function(g){"use strict";alert(g)},log:function(g){"use strict";alert(g)},error:function(g){"use strict";throw g}}),C.helper.regexes={asteriskDashAndColon:/([*_:~])/g},C.helper.emojis={"+1":"👍","-1":"👎",100:"💯",1234:"🔢","1st_place_medal":"🥇","2nd_place_medal":"🥈","3rd_place_medal":"🥉","8ball":"🎱",a:"🅰️",ab:"🆎",abc:"🔤",abcd:"🔡",accept:"🉑",aerial_tramway:"🚡",airplane:"✈️",alarm_clock:"⏰",alembic:"⚗️",alien:"👽",ambulance:"🚑",amphora:"🏺",anchor:"⚓️",angel:"👼",anger:"💢",angry:"😠",anguished:"😧",ant:"🐜",apple:"🍎",aquarius:"♒️",aries:"♈️",arrow_backward:"◀️",arrow_double_down:"⏬",arrow_double_up:"⏫",arrow_down:"⬇️",arrow_down_small:"🔽",arrow_forward:"▶️",arrow_heading_down:"⤵️",arrow_heading_up:"⤴️",arrow_left:"⬅️",arrow_lower_left:"↙️",arrow_lower_right:"↘️",arrow_right:"➡️",arrow_right_hook:"↪️",arrow_up:"⬆️",arrow_up_down:"↕️",arrow_up_small:"🔼",arrow_upper_left:"↖️",arrow_upper_right:"↗️",arrows_clockwise:"🔃",arrows_counterclockwise:"🔄",art:"🎨",articulated_lorry:"🚛",artificial_satellite:"🛰",astonished:"😲",athletic_shoe:"👟",atm:"🏧",atom_symbol:"⚛️",avocado:"🥑",b:"🅱️",baby:"👶",baby_bottle:"🍼",baby_chick:"🐤",baby_symbol:"🚼",back:"🔙",bacon:"🥓",badminton:"🏸",baggage_claim:"🛄",baguette_bread:"🥖",balance_scale:"⚖️",balloon:"🎈",ballot_box:"🗳",ballot_box_with_check:"☑️",bamboo:"🎍",banana:"🍌",bangbang:"‼️",bank:"🏦",bar_chart:"📊",barber:"💈",baseball:"⚾️",basketball:"🏀",basketball_man:"⛹️",basketball_woman:"⛹️‍♀️",bat:"🦇",bath:"🛀",bathtub:"🛁",battery:"🔋",beach_umbrella:"🏖",bear:"🐻",bed:"🛏",bee:"🐝",beer:"🍺",beers:"🍻",beetle:"🐞",beginner:"🔰",bell:"🔔",bellhop_bell:"🛎",bento:"🍱",biking_man:"🚴",bike:"🚲",biking_woman:"🚴‍♀️",bikini:"👙",biohazard:"☣️",bird:"🐦",birthday:"🎂",black_circle:"⚫️",black_flag:"🏴",black_heart:"🖤",black_joker:"🃏",black_large_square:"⬛️",black_medium_small_square:"◾️",black_medium_square:"◼️",black_nib:"✒️",black_small_square:"▪️",black_square_button:"🔲",blonde_man:"👱",blonde_woman:"👱‍♀️",blossom:"🌼",blowfish:"🐡",blue_book:"📘",blue_car:"🚙",blue_heart:"💙",blush:"😊",boar:"🐗",boat:"⛵️",bomb:"💣",book:"📖",bookmark:"🔖",bookmark_tabs:"📑",books:"📚",boom:"💥",boot:"👢",bouquet:"💐",bowing_man:"🙇",bow_and_arrow:"🏹",bowing_woman:"🙇‍♀️",bowling:"🎳",boxing_glove:"🥊",boy:"👦",bread:"🍞",bride_with_veil:"👰",bridge_at_night:"🌉",briefcase:"💼",broken_heart:"💔",bug:"🐛",building_construction:"🏗",bulb:"💡",bullettrain_front:"🚅",bullettrain_side:"🚄",burrito:"🌯",bus:"🚌",business_suit_levitating:"🕴",busstop:"🚏",bust_in_silhouette:"👤",busts_in_silhouette:"👥",butterfly:"🦋",cactus:"🌵",cake:"🍰",calendar:"📆",call_me_hand:"🤙",calling:"📲",camel:"🐫",camera:"📷",camera_flash:"📸",camping:"🏕",cancer:"♋️",candle:"🕯",candy:"🍬",canoe:"🛶",capital_abcd:"🔠",capricorn:"♑️",car:"🚗",card_file_box:"🗃",card_index:"📇",card_index_dividers:"🗂",carousel_horse:"🎠",carrot:"🥕",cat:"🐱",cat2:"🐈",cd:"💿",chains:"⛓",champagne:"🍾",chart:"💹",chart_with_downwards_trend:"📉",chart_with_upwards_trend:"📈",checkered_flag:"🏁",cheese:"🧀",cherries:"🍒",cherry_blossom:"🌸",chestnut:"🌰",chicken:"🐔",children_crossing:"🚸",chipmunk:"🐿",chocolate_bar:"🍫",christmas_tree:"🎄",church:"⛪️",cinema:"🎦",circus_tent:"🎪",city_sunrise:"🌇",city_sunset:"🌆",cityscape:"🏙",cl:"🆑",clamp:"🗜",clap:"👏",clapper:"🎬",classical_building:"🏛",clinking_glasses:"🥂",clipboard:"📋",clock1:"🕐",clock10:"🕙",clock1030:"🕥",clock11:"🕚",clock1130:"🕦",clock12:"🕛",clock1230:"🕧",clock130:"🕜",clock2:"🕑",clock230:"🕝",clock3:"🕒",clock330:"🕞",clock4:"🕓",clock430:"🕟",clock5:"🕔",clock530:"🕠",clock6:"🕕",clock630:"🕡",clock7:"🕖",clock730:"🕢",clock8:"🕗",clock830:"🕣",clock9:"🕘",clock930:"🕤",closed_book:"📕",closed_lock_with_key:"🔐",closed_umbrella:"🌂",cloud:"☁️",cloud_with_lightning:"🌩",cloud_with_lightning_and_rain:"⛈",cloud_with_rain:"🌧",cloud_with_snow:"🌨",clown_face:"🤡",clubs:"♣️",cocktail:"🍸",coffee:"☕️",coffin:"⚰️",cold_sweat:"😰",comet:"☄️",computer:"💻",computer_mouse:"🖱",confetti_ball:"🎊",confounded:"😖",confused:"😕",congratulations:"㊗️",construction:"🚧",construction_worker_man:"👷",construction_worker_woman:"👷‍♀️",control_knobs:"🎛",convenience_store:"🏪",cookie:"🍪",cool:"🆒",policeman:"👮",copyright:"©️",corn:"🌽",couch_and_lamp:"🛋",couple:"👫",couple_with_heart_woman_man:"💑",couple_with_heart_man_man:"👨‍❤️‍👨",couple_with_heart_woman_woman:"👩‍❤️‍👩",couplekiss_man_man:"👨‍❤️‍💋‍👨",couplekiss_man_woman:"💏",couplekiss_woman_woman:"👩‍❤️‍💋‍👩",cow:"🐮",cow2:"🐄",cowboy_hat_face:"🤠",crab:"🦀",crayon:"🖍",credit_card:"💳",crescent_moon:"🌙",cricket:"🏏",crocodile:"🐊",croissant:"🥐",crossed_fingers:"🤞",crossed_flags:"🎌",crossed_swords:"⚔️",crown:"👑",cry:"😢",crying_cat_face:"😿",crystal_ball:"🔮",cucumber:"🥒",cupid:"💘",curly_loop:"➰",currency_exchange:"💱",curry:"🍛",custard:"🍮",customs:"🛃",cyclone:"🌀",dagger:"🗡",dancer:"💃",dancing_women:"👯",dancing_men:"👯‍♂️",dango:"🍡",dark_sunglasses:"🕶",dart:"🎯",dash:"💨",date:"📅",deciduous_tree:"🌳",deer:"🦌",department_store:"🏬",derelict_house:"🏚",desert:"🏜",desert_island:"🏝",desktop_computer:"🖥",male_detective:"🕵️",diamond_shape_with_a_dot_inside:"💠",diamonds:"♦️",disappointed:"😞",disappointed_relieved:"😥",dizzy:"💫",dizzy_face:"😵",do_not_litter:"🚯",dog:"🐶",dog2:"🐕",dollar:"💵",dolls:"🎎",dolphin:"🐬",door:"🚪",doughnut:"🍩",dove:"🕊",dragon:"🐉",dragon_face:"🐲",dress:"👗",dromedary_camel:"🐪",drooling_face:"🤤",droplet:"💧",drum:"🥁",duck:"🦆",dvd:"📀","e-mail":"📧",eagle:"🦅",ear:"👂",ear_of_rice:"🌾",earth_africa:"🌍",earth_americas:"🌎",earth_asia:"🌏",egg:"🥚",eggplant:"🍆",eight_pointed_black_star:"✴️",eight_spoked_asterisk:"✳️",electric_plug:"🔌",elephant:"🐘",email:"✉️",end:"🔚",envelope_with_arrow:"📩",euro:"💶",european_castle:"🏰",european_post_office:"🏤",evergreen_tree:"🌲",exclamation:"❗️",expressionless:"😑",eye:"👁",eye_speech_bubble:"👁‍🗨",eyeglasses:"👓",eyes:"👀",face_with_head_bandage:"🤕",face_with_thermometer:"🤒",fist_oncoming:"👊",factory:"🏭",fallen_leaf:"🍂",family_man_woman_boy:"👪",family_man_boy:"👨‍👦",family_man_boy_boy:"👨‍👦‍👦",family_man_girl:"👨‍👧",family_man_girl_boy:"👨‍👧‍👦",family_man_girl_girl:"👨‍👧‍👧",family_man_man_boy:"👨‍👨‍👦",family_man_man_boy_boy:"👨‍👨‍👦‍👦",family_man_man_girl:"👨‍👨‍👧",family_man_man_girl_boy:"👨‍👨‍👧‍👦",family_man_man_girl_girl:"👨‍👨‍👧‍👧",family_man_woman_boy_boy:"👨‍👩‍👦‍👦",family_man_woman_girl:"👨‍👩‍👧",family_man_woman_girl_boy:"👨‍👩‍👧‍👦",family_man_woman_girl_girl:"👨‍👩‍👧‍👧",family_woman_boy:"👩‍👦",family_woman_boy_boy:"👩‍👦‍👦",family_woman_girl:"👩‍👧",family_woman_girl_boy:"👩‍👧‍👦",family_woman_girl_girl:"👩‍👧‍👧",family_woman_woman_boy:"👩‍👩‍👦",family_woman_woman_boy_boy:"👩‍👩‍👦‍👦",family_woman_woman_girl:"👩‍👩‍👧",family_woman_woman_girl_boy:"👩‍👩‍👧‍👦",family_woman_woman_girl_girl:"👩‍👩‍👧‍👧",fast_forward:"⏩",fax:"📠",fearful:"😨",feet:"🐾",female_detective:"🕵️‍♀️",ferris_wheel:"🎡",ferry:"⛴",field_hockey:"🏑",file_cabinet:"🗄",file_folder:"📁",film_projector:"📽",film_strip:"🎞",fire:"🔥",fire_engine:"🚒",fireworks:"🎆",first_quarter_moon:"🌓",first_quarter_moon_with_face:"🌛",fish:"🐟",fish_cake:"🍥",fishing_pole_and_fish:"🎣",fist_raised:"✊",fist_left:"🤛",fist_right:"🤜",flags:"🎏",flashlight:"🔦",fleur_de_lis:"⚜️",flight_arrival:"🛬",flight_departure:"🛫",floppy_disk:"💾",flower_playing_cards:"🎴",flushed:"😳",fog:"🌫",foggy:"🌁",football:"🏈",footprints:"👣",fork_and_knife:"🍴",fountain:"⛲️",fountain_pen:"🖋",four_leaf_clover:"🍀",fox_face:"🦊",framed_picture:"🖼",free:"🆓",fried_egg:"🍳",fried_shrimp:"🍤",fries:"🍟",frog:"🐸",frowning:"😦",frowning_face:"☹️",frowning_man:"🙍‍♂️",frowning_woman:"🙍",middle_finger:"🖕",fuelpump:"⛽️",full_moon:"🌕",full_moon_with_face:"🌝",funeral_urn:"⚱️",game_die:"🎲",gear:"⚙️",gem:"💎",gemini:"♊️",ghost:"👻",gift:"🎁",gift_heart:"💝",girl:"👧",globe_with_meridians:"🌐",goal_net:"🥅",goat:"🐐",golf:"⛳️",golfing_man:"🏌️",golfing_woman:"🏌️‍♀️",gorilla:"🦍",grapes:"🍇",green_apple:"🍏",green_book:"📗",green_heart:"💚",green_salad:"🥗",grey_exclamation:"❕",grey_question:"❔",grimacing:"😬",grin:"😁",grinning:"😀",guardsman:"💂",guardswoman:"💂‍♀️",guitar:"🎸",gun:"🔫",haircut_woman:"💇",haircut_man:"💇‍♂️",hamburger:"🍔",hammer:"🔨",hammer_and_pick:"⚒",hammer_and_wrench:"🛠",hamster:"🐹",hand:"✋",handbag:"👜",handshake:"🤝",hankey:"💩",hatched_chick:"🐥",hatching_chick:"🐣",headphones:"🎧",hear_no_evil:"🙉",heart:"❤️",heart_decoration:"💟",heart_eyes:"😍",heart_eyes_cat:"😻",heartbeat:"💓",heartpulse:"💗",hearts:"♥️",heavy_check_mark:"✔️",heavy_division_sign:"➗",heavy_dollar_sign:"💲",heavy_heart_exclamation:"❣️",heavy_minus_sign:"➖",heavy_multiplication_x:"✖️",heavy_plus_sign:"➕",helicopter:"🚁",herb:"🌿",hibiscus:"🌺",high_brightness:"🔆",high_heel:"👠",hocho:"🔪",hole:"🕳",honey_pot:"🍯",horse:"🐴",horse_racing:"🏇",hospital:"🏥",hot_pepper:"🌶",hotdog:"🌭",hotel:"🏨",hotsprings:"♨️",hourglass:"⌛️",hourglass_flowing_sand:"⏳",house:"🏠",house_with_garden:"🏡",houses:"🏘",hugs:"🤗",hushed:"😯",ice_cream:"🍨",ice_hockey:"🏒",ice_skate:"⛸",icecream:"🍦",id:"🆔",ideograph_advantage:"🉐",imp:"👿",inbox_tray:"📥",incoming_envelope:"📨",tipping_hand_woman:"💁",information_source:"ℹ️",innocent:"😇",interrobang:"⁉️",iphone:"📱",izakaya_lantern:"🏮",jack_o_lantern:"🎃",japan:"🗾",japanese_castle:"🏯",japanese_goblin:"👺",japanese_ogre:"👹",jeans:"👖",joy:"😂",joy_cat:"😹",joystick:"🕹",kaaba:"🕋",key:"🔑",keyboard:"⌨️",keycap_ten:"🔟",kick_scooter:"🛴",kimono:"👘",kiss:"💋",kissing:"😗",kissing_cat:"😽",kissing_closed_eyes:"😚",kissing_heart:"😘",kissing_smiling_eyes:"😙",kiwi_fruit:"🥝",koala:"🐨",koko:"🈁",label:"🏷",large_blue_circle:"🔵",large_blue_diamond:"🔷",large_orange_diamond:"🔶",last_quarter_moon:"🌗",last_quarter_moon_with_face:"🌜",latin_cross:"✝️",laughing:"😆",leaves:"🍃",ledger:"📒",left_luggage:"🛅",left_right_arrow:"↔️",leftwards_arrow_with_hook:"↩️",lemon:"🍋",leo:"♌️",leopard:"🐆",level_slider:"🎚",libra:"♎️",light_rail:"🚈",link:"🔗",lion:"🦁",lips:"👄",lipstick:"💄",lizard:"🦎",lock:"🔒",lock_with_ink_pen:"🔏",lollipop:"🍭",loop:"➿",loud_sound:"🔊",loudspeaker:"📢",love_hotel:"🏩",love_letter:"💌",low_brightness:"🔅",lying_face:"🤥",m:"Ⓜ️",mag:"🔍",mag_right:"🔎",mahjong:"🀄️",mailbox:"📫",mailbox_closed:"📪",mailbox_with_mail:"📬",mailbox_with_no_mail:"📭",man:"👨",man_artist:"👨‍🎨",man_astronaut:"👨‍🚀",man_cartwheeling:"🤸‍♂️",man_cook:"👨‍🍳",man_dancing:"🕺",man_facepalming:"🤦‍♂️",man_factory_worker:"👨‍🏭",man_farmer:"👨‍🌾",man_firefighter:"👨‍🚒",man_health_worker:"👨‍⚕️",man_in_tuxedo:"🤵",man_judge:"👨‍⚖️",man_juggling:"🤹‍♂️",man_mechanic:"👨‍🔧",man_office_worker:"👨‍💼",man_pilot:"👨‍✈️",man_playing_handball:"🤾‍♂️",man_playing_water_polo:"🤽‍♂️",man_scientist:"👨‍🔬",man_shrugging:"🤷‍♂️",man_singer:"👨‍🎤",man_student:"👨‍🎓",man_teacher:"👨‍🏫",man_technologist:"👨‍💻",man_with_gua_pi_mao:"👲",man_with_turban:"👳",tangerine:"🍊",mans_shoe:"👞",mantelpiece_clock:"🕰",maple_leaf:"🍁",martial_arts_uniform:"🥋",mask:"😷",massage_woman:"💆",massage_man:"💆‍♂️",meat_on_bone:"🍖",medal_military:"🎖",medal_sports:"🏅",mega:"📣",melon:"🍈",memo:"📝",men_wrestling:"🤼‍♂️",menorah:"🕎",mens:"🚹",metal:"🤘",metro:"🚇",microphone:"🎤",microscope:"🔬",milk_glass:"🥛",milky_way:"🌌",minibus:"🚐",minidisc:"💽",mobile_phone_off:"📴",money_mouth_face:"🤑",money_with_wings:"💸",moneybag:"💰",monkey:"🐒",monkey_face:"🐵",monorail:"🚝",moon:"🌔",mortar_board:"🎓",mosque:"🕌",motor_boat:"🛥",motor_scooter:"🛵",motorcycle:"🏍",motorway:"🛣",mount_fuji:"🗻",mountain:"⛰",mountain_biking_man:"🚵",mountain_biking_woman:"🚵‍♀️",mountain_cableway:"🚠",mountain_railway:"🚞",mountain_snow:"🏔",mouse:"🐭",mouse2:"🐁",movie_camera:"🎥",moyai:"🗿",mrs_claus:"🤶",muscle:"💪",mushroom:"🍄",musical_keyboard:"🎹",musical_note:"🎵",musical_score:"🎼",mute:"🔇",nail_care:"💅",name_badge:"📛",national_park:"🏞",nauseated_face:"🤢",necktie:"👔",negative_squared_cross_mark:"❎",nerd_face:"🤓",neutral_face:"😐",new:"🆕",new_moon:"🌑",new_moon_with_face:"🌚",newspaper:"📰",newspaper_roll:"🗞",next_track_button:"⏭",ng:"🆖",no_good_man:"🙅‍♂️",no_good_woman:"🙅",night_with_stars:"🌃",no_bell:"🔕",no_bicycles:"🚳",no_entry:"⛔️",no_entry_sign:"🚫",no_mobile_phones:"📵",no_mouth:"😶",no_pedestrians:"🚷",no_smoking:"🚭","non-potable_water":"🚱",nose:"👃",notebook:"📓",notebook_with_decorative_cover:"📔",notes:"🎶",nut_and_bolt:"🔩",o:"⭕️",o2:"🅾️",ocean:"🌊",octopus:"🐙",oden:"🍢",office:"🏢",oil_drum:"🛢",ok:"🆗",ok_hand:"👌",ok_man:"🙆‍♂️",ok_woman:"🙆",old_key:"🗝",older_man:"👴",older_woman:"👵",om:"🕉",on:"🔛",oncoming_automobile:"🚘",oncoming_bus:"🚍",oncoming_police_car:"🚔",oncoming_taxi:"🚖",open_file_folder:"📂",open_hands:"👐",open_mouth:"😮",open_umbrella:"☂️",ophiuchus:"⛎",orange_book:"📙",orthodox_cross:"☦️",outbox_tray:"📤",owl:"🦉",ox:"🐂",package:"📦",page_facing_up:"📄",page_with_curl:"📃",pager:"📟",paintbrush:"🖌",palm_tree:"🌴",pancakes:"🥞",panda_face:"🐼",paperclip:"📎",paperclips:"🖇",parasol_on_ground:"⛱",parking:"🅿️",part_alternation_mark:"〽️",partly_sunny:"⛅️",passenger_ship:"🛳",passport_control:"🛂",pause_button:"⏸",peace_symbol:"☮️",peach:"🍑",peanuts:"🥜",pear:"🍐",pen:"🖊",pencil2:"✏️",penguin:"🐧",pensive:"😔",performing_arts:"🎭",persevere:"😣",person_fencing:"🤺",pouting_woman:"🙎",phone:"☎️",pick:"⛏",pig:"🐷",pig2:"🐖",pig_nose:"🐽",pill:"💊",pineapple:"🍍",ping_pong:"🏓",pisces:"♓️",pizza:"🍕",place_of_worship:"🛐",plate_with_cutlery:"🍽",play_or_pause_button:"⏯",point_down:"👇",point_left:"👈",point_right:"👉",point_up:"☝️",point_up_2:"👆",police_car:"🚓",policewoman:"👮‍♀️",poodle:"🐩",popcorn:"🍿",post_office:"🏣",postal_horn:"📯",postbox:"📮",potable_water:"🚰",potato:"🥔",pouch:"👝",poultry_leg:"🍗",pound:"💷",rage:"😡",pouting_cat:"😾",pouting_man:"🙎‍♂️",pray:"🙏",prayer_beads:"📿",pregnant_woman:"🤰",previous_track_button:"⏮",prince:"🤴",princess:"👸",printer:"🖨",purple_heart:"💜",purse:"👛",pushpin:"📌",put_litter_in_its_place:"🚮",question:"❓",rabbit:"🐰",rabbit2:"🐇",racehorse:"🐎",racing_car:"🏎",radio:"📻",radio_button:"🔘",radioactive:"☢️",railway_car:"🚃",railway_track:"🛤",rainbow:"🌈",rainbow_flag:"🏳️‍🌈",raised_back_of_hand:"🤚",raised_hand_with_fingers_splayed:"🖐",raised_hands:"🙌",raising_hand_woman:"🙋",raising_hand_man:"🙋‍♂️",ram:"🐏",ramen:"🍜",rat:"🐀",record_button:"⏺",recycle:"♻️",red_circle:"🔴",registered:"®️",relaxed:"☺️",relieved:"😌",reminder_ribbon:"🎗",repeat:"🔁",repeat_one:"🔂",rescue_worker_helmet:"⛑",restroom:"🚻",revolving_hearts:"💞",rewind:"⏪",rhinoceros:"🦏",ribbon:"🎀",rice:"🍚",rice_ball:"🍙",rice_cracker:"🍘",rice_scene:"🎑",right_anger_bubble:"🗯",ring:"💍",robot:"🤖",rocket:"🚀",rofl:"🤣",roll_eyes:"🙄",roller_coaster:"🎢",rooster:"🐓",rose:"🌹",rosette:"🏵",rotating_light:"🚨",round_pushpin:"📍",rowing_man:"🚣",rowing_woman:"🚣‍♀️",rugby_football:"🏉",running_man:"🏃",running_shirt_with_sash:"🎽",running_woman:"🏃‍♀️",sa:"🈂️",sagittarius:"♐️",sake:"🍶",sandal:"👡",santa:"🎅",satellite:"📡",saxophone:"🎷",school:"🏫",school_satchel:"🎒",scissors:"✂️",scorpion:"🦂",scorpius:"♏️",scream:"😱",scream_cat:"🙀",scroll:"📜",seat:"💺",secret:"㊙️",see_no_evil:"🙈",seedling:"🌱",selfie:"🤳",shallow_pan_of_food:"🥘",shamrock:"☘️",shark:"🦈",shaved_ice:"🍧",sheep:"🐑",shell:"🐚",shield:"🛡",shinto_shrine:"⛩",ship:"🚢",shirt:"👕",shopping:"🛍",shopping_cart:"🛒",shower:"🚿",shrimp:"🦐",signal_strength:"📶",six_pointed_star:"🔯",ski:"🎿",skier:"⛷",skull:"💀",skull_and_crossbones:"☠️",sleeping:"😴",sleeping_bed:"🛌",sleepy:"😪",slightly_frowning_face:"🙁",slightly_smiling_face:"🙂",slot_machine:"🎰",small_airplane:"🛩",small_blue_diamond:"🔹",small_orange_diamond:"🔸",small_red_triangle:"🔺",small_red_triangle_down:"🔻",smile:"😄",smile_cat:"😸",smiley:"😃",smiley_cat:"😺",smiling_imp:"😈",smirk:"😏",smirk_cat:"😼",smoking:"🚬",snail:"🐌",snake:"🐍",sneezing_face:"🤧",snowboarder:"🏂",snowflake:"❄️",snowman:"⛄️",snowman_with_snow:"☃️",sob:"😭",soccer:"⚽️",soon:"🔜",sos:"🆘",sound:"🔉",space_invader:"👾",spades:"♠️",spaghetti:"🍝",sparkle:"❇️",sparkler:"🎇",sparkles:"✨",sparkling_heart:"💖",speak_no_evil:"🙊",speaker:"🔈",speaking_head:"🗣",speech_balloon:"💬",speedboat:"🚤",spider:"🕷",spider_web:"🕸",spiral_calendar:"🗓",spiral_notepad:"🗒",spoon:"🥄",squid:"🦑",stadium:"🏟",star:"⭐️",star2:"🌟",star_and_crescent:"☪️",star_of_david:"✡️",stars:"🌠",station:"🚉",statue_of_liberty:"🗽",steam_locomotive:"🚂",stew:"🍲",stop_button:"⏹",stop_sign:"🛑",stopwatch:"⏱",straight_ruler:"📏",strawberry:"🍓",stuck_out_tongue:"😛",stuck_out_tongue_closed_eyes:"😝",stuck_out_tongue_winking_eye:"😜",studio_microphone:"🎙",stuffed_flatbread:"🥙",sun_behind_large_cloud:"🌥",sun_behind_rain_cloud:"🌦",sun_behind_small_cloud:"🌤",sun_with_face:"🌞",sunflower:"🌻",sunglasses:"😎",sunny:"☀️",sunrise:"🌅",sunrise_over_mountains:"🌄",surfing_man:"🏄",surfing_woman:"🏄‍♀️",sushi:"🍣",suspension_railway:"🚟",sweat:"😓",sweat_drops:"💦",sweat_smile:"😅",sweet_potato:"🍠",swimming_man:"🏊",swimming_woman:"🏊‍♀️",symbols:"🔣",synagogue:"🕍",syringe:"💉",taco:"🌮",tada:"🎉",tanabata_tree:"🎋",taurus:"♉️",taxi:"🚕",tea:"🍵",telephone_receiver:"📞",telescope:"🔭",tennis:"🎾",tent:"⛺️",thermometer:"🌡",thinking:"🤔",thought_balloon:"💭",ticket:"🎫",tickets:"🎟",tiger:"🐯",tiger2:"🐅",timer_clock:"⏲",tipping_hand_man:"💁‍♂️",tired_face:"😫",tm:"™️",toilet:"🚽",tokyo_tower:"🗼",tomato:"🍅",tongue:"👅",top:"🔝",tophat:"🎩",tornado:"🌪",trackball:"🖲",tractor:"🚜",traffic_light:"🚥",train:"🚋",train2:"🚆",tram:"🚊",triangular_flag_on_post:"🚩",triangular_ruler:"📐",trident:"🔱",triumph:"😤",trolleybus:"🚎",trophy:"🏆",tropical_drink:"🍹",tropical_fish:"🐠",truck:"🚚",trumpet:"🎺",tulip:"🌷",tumbler_glass:"🥃",turkey:"🦃",turtle:"🐢",tv:"📺",twisted_rightwards_arrows:"🔀",two_hearts:"💕",two_men_holding_hands:"👬",two_women_holding_hands:"👭",u5272:"🈹",u5408:"🈴",u55b6:"🈺",u6307:"🈯️",u6708:"🈷️",u6709:"🈶",u6e80:"🈵",u7121:"🈚️",u7533:"🈸",u7981:"🈲",u7a7a:"🈳",umbrella:"☔️",unamused:"😒",underage:"🔞",unicorn:"🦄",unlock:"🔓",up:"🆙",upside_down_face:"🙃",v:"✌️",vertical_traffic_light:"🚦",vhs:"📼",vibration_mode:"📳",video_camera:"📹",video_game:"🎮",violin:"🎻",virgo:"♍️",volcano:"🌋",volleyball:"🏐",vs:"🆚",vulcan_salute:"🖖",walking_man:"🚶",walking_woman:"🚶‍♀️",waning_crescent_moon:"🌘",waning_gibbous_moon:"🌖",warning:"⚠️",wastebasket:"🗑",watch:"⌚️",water_buffalo:"🐃",watermelon:"🍉",wave:"👋",wavy_dash:"〰️",waxing_crescent_moon:"🌒",wc:"🚾",weary:"😩",wedding:"💒",weight_lifting_man:"🏋️",weight_lifting_woman:"🏋️‍♀️",whale:"🐳",whale2:"🐋",wheel_of_dharma:"☸️",wheelchair:"♿️",white_check_mark:"✅",white_circle:"⚪️",white_flag:"🏳️",white_flower:"💮",white_large_square:"⬜️",white_medium_small_square:"◽️",white_medium_square:"◻️",white_small_square:"▫️",white_square_button:"🔳",wilted_flower:"🥀",wind_chime:"🎐",wind_face:"🌬",wine_glass:"🍷",wink:"😉",wolf:"🐺",woman:"👩",woman_artist:"👩‍🎨",woman_astronaut:"👩‍🚀",woman_cartwheeling:"🤸‍♀️",woman_cook:"👩‍🍳",woman_facepalming:"🤦‍♀️",woman_factory_worker:"👩‍🏭",woman_farmer:"👩‍🌾",woman_firefighter:"👩‍🚒",woman_health_worker:"👩‍⚕️",woman_judge:"👩‍⚖️",woman_juggling:"🤹‍♀️",woman_mechanic:"👩‍🔧",woman_office_worker:"👩‍💼",woman_pilot:"👩‍✈️",woman_playing_handball:"🤾‍♀️",woman_playing_water_polo:"🤽‍♀️",woman_scientist:"👩‍🔬",woman_shrugging:"🤷‍♀️",woman_singer:"👩‍🎤",woman_student:"👩‍🎓",woman_teacher:"👩‍🏫",woman_technologist:"👩‍💻",woman_with_turban:"👳‍♀️",womans_clothes:"👚",womans_hat:"👒",women_wrestling:"🤼‍♀️",womens:"🚺",world_map:"🗺",worried:"😟",wrench:"🔧",writing_hand:"✍️",x:"❌",yellow_heart:"💛",yen:"💴",yin_yang:"☯️",yum:"😋",zap:"⚡️",zipper_mouth_face:"🤐",zzz:"💤",octocat:'',showdown:''},C.subParser("makehtml.anchors",function(g,A,e){"use strict";var I=function(g,I,r,t,a,n,o){if(C.helper.isUndefined(o)&&(o=""),r=r.toLowerCase(),g.search(/\(? ?(['"].*['"])?\)$/m)>-1)t="";else if(!t){if(r||(r=I.toLowerCase().replace(/ ?\n/g," ")),t="#"+r,C.helper.isUndefined(e.gUrls[r]))return g;t=e.gUrls[r],C.helper.isUndefined(e.gTitles[r])||(o=e.gTitles[r])}var s='"};return g=(g=e.converter._dispatch("makehtml.anchors.before",g,A,e)).replace(/\[((?:\[[^\]]*]|[^\[\]])*)] ?(?:\n *)?\[(.*?)]()()()()/g,I),g=g.replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?<([^>]*)>(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,I),g=g.replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]??(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,I),g=g.replace(/\[([^\[\]]+)]()()()()()/g,I),A.ghMentions&&(g=g.replace(/(^|\s)(\\)?(@([a-z\d\-]+))(?=[.!?;,[\]()]|\s|$)/gim,function(g,e,I,r,t){if("\\"===I)return e+r;if(!C.helper.isString(A.ghMentionsLink))throw new Error("ghMentionsLink option must be a string");var a=A.ghMentionsLink.replace(/\{u}/g,t),n="";return A.openLinksInNewWindow&&(n=' target="¨E95Eblank"'),e+'"+r+""})),g=e.converter._dispatch("makehtml.anchors.after",g,A,e)});var s=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+?\.[^'">\s]+?)()(\1)?(?=\s|$)(?!["<>])/gi,i=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+\.[^'">\s]+?)([.!?,()\[\]])?(\1)?(?=\s|$)(?!["<>])/gi,l=/()<(((https?|ftp|dict):\/\/|www\.)[^'">\s]+)()>()/gi,c=/(^|\s)(?:mailto:)?([A-Za-z0-9!#$%&'*+-/=?^_`{|}~.]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)(?=$|\s)/gim,u=/<()(?:mailto:)?([-.\w]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi,h=function(g){"use strict";return function(A,e,I,r,t,a,n){var o=I=I.replace(C.helper.regexes.asteriskDashAndColon,C.helper.escapeCharactersCallback),s="",i="",l=e||"",c=n||"";return/^www\./i.test(I)&&(I=I.replace(/^www\./i,"http://www.")),g.excludeTrailingPunctuationFromURLs&&a&&(s=a),g.openLinksInNewWindow&&(i=' target="¨E95Eblank"'),l+'"+o+""+s+c}},m=function(g,A){"use strict";return function(e,I,r){var t="mailto:";return I=I||"",r=C.subParser("makehtml.unescapeSpecialChars")(r,g,A),g.encodeEmails?(t=C.helper.encodeEmailAddress(t+r),r=C.helper.encodeEmailAddress(r)):t+=r,I+''+r+""}};C.subParser("makehtml.autoLinks",function(g,A,e){"use strict";return g=e.converter._dispatch("makehtml.autoLinks.before",g,A,e),g=g.replace(l,h(A)),g=g.replace(u,m(A,e)),g=e.converter._dispatch("makehtml.autoLinks.after",g,A,e)}),C.subParser("makehtml.simplifiedAutoLinks",function(g,A,e){"use strict";return A.simplifiedAutoLink?(g=e.converter._dispatch("makehtml.simplifiedAutoLinks.before",g,A,e),g=A.excludeTrailingPunctuationFromURLs?g.replace(i,h(A)):g.replace(s,h(A)),g=g.replace(c,m(A,e)),g=e.converter._dispatch("makehtml.simplifiedAutoLinks.after",g,A,e)):g}),C.subParser("makehtml.blockGamut",function(g,A,e){"use strict";return g=e.converter._dispatch("makehtml.blockGamut.before",g,A,e),g=C.subParser("makehtml.blockQuotes")(g,A,e),g=C.subParser("makehtml.headers")(g,A,e),g=C.subParser("makehtml.horizontalRule")(g,A,e),g=C.subParser("makehtml.lists")(g,A,e),g=C.subParser("makehtml.codeBlocks")(g,A,e),g=C.subParser("makehtml.tables")(g,A,e),g=C.subParser("makehtml.hashHTMLBlocks")(g,A,e),g=C.subParser("makehtml.paragraphs")(g,A,e),g=e.converter._dispatch("makehtml.blockGamut.after",g,A,e)}),C.subParser("makehtml.blockQuotes",function(g,A,e){"use strict";g=e.converter._dispatch("makehtml.blockQuotes.before",g,A,e),g+="\n\n";var I=/(^ {0,3}>[ \t]?.+\n(.+\n)*\n*)+/gm;return A.splitAdjacentBlockquotes&&(I=/^ {0,3}>[\s\S]*?(?:\n\n)/gm),g=g.replace(I,function(g){return g=g.replace(/^[ \t]*>[ \t]?/gm,""),g=g.replace(/¨0/g,""),g=g.replace(/^[ \t]+$/gm,""),g=C.subParser("makehtml.githubCodeBlocks")(g,A,e),g=C.subParser("makehtml.blockGamut")(g,A,e),g=g.replace(/(^|\n)/g,"$1 "),g=g.replace(/(\s*
    [^\r]+?<\/pre>)/gm,function(g,A){var e=A;return e=e.replace(/^  /gm,"¨0"),e=e.replace(/¨0/g,"")}),C.subParser("makehtml.hashBlock")("
    \n"+g+"\n
    ",A,e)}),g=e.converter._dispatch("makehtml.blockQuotes.after",g,A,e)}),C.subParser("makehtml.codeBlocks",function(g,A,e){"use strict";g=e.converter._dispatch("makehtml.codeBlocks.before",g,A,e);return g=(g+="¨0").replace(/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=¨0))/g,function(g,I,r){var t=I,a=r,n="\n";return t=C.subParser("makehtml.outdent")(t,A,e),t=C.subParser("makehtml.encodeCode")(t,A,e),t=C.subParser("makehtml.detab")(t,A,e),t=t.replace(/^\n+/g,""),t=t.replace(/\n+$/g,""),A.omitExtraWLInCodeBlocks&&(n=""),t="
    "+t+n+"
    ",C.subParser("makehtml.hashBlock")(t,A,e)+a}),g=g.replace(/¨0/,""),g=e.converter._dispatch("makehtml.codeBlocks.after",g,A,e)}),C.subParser("makehtml.codeSpans",function(g,A,e){"use strict";return void 0===(g=e.converter._dispatch("makehtml.codeSpans.before",g,A,e))&&(g=""),g=g.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,function(g,I,r,t){var a=t;return a=a.replace(/^([ \t]*)/g,""),a=a.replace(/[ \t]*$/g,""),a=C.subParser("makehtml.encodeCode")(a,A,e),a=I+""+a+"",a=C.subParser("makehtml.hashHTMLSpans")(a,A,e)}),g=e.converter._dispatch("makehtml.codeSpans.after",g,A,e)}),C.subParser("makehtml.completeHTMLDocument",function(g,A,e){"use strict";if(!A.completeHTMLDocument)return g;g=e.converter._dispatch("makehtml.completeHTMLDocument.before",g,A,e);var C="html",I="\n",r="",t='\n',a="",n="";void 0!==e.metadata.parsed.doctype&&(I="\n","html"!==(C=e.metadata.parsed.doctype.toString().toLowerCase())&&"html5"!==C||(t=''));for(var o in e.metadata.parsed)if(e.metadata.parsed.hasOwnProperty(o))switch(o.toLowerCase()){case"doctype":break;case"title":r=""+e.metadata.parsed.title+"\n";break;case"charset":t="html"===C||"html5"===C?'\n':'\n';break;case"language":case"lang":a=' lang="'+e.metadata.parsed[o]+'"',n+='\n';break;default:n+='\n'}return g=I+"\n\n"+r+t+n+"\n\n"+g.trim()+"\n\n",g=e.converter._dispatch("makehtml.completeHTMLDocument.after",g,A,e)}),C.subParser("makehtml.detab",function(g,A,e){"use strict";return g=e.converter._dispatch("makehtml.detab.before",g,A,e),g=g.replace(/\t(?=\t)/g," "),g=g.replace(/\t/g,"¨A¨B"),g=g.replace(/¨B(.+?)¨A/g,function(g,A){for(var e=A,C=4-e.length%4,I=0;I/g,">"),g=e.converter._dispatch("makehtml.encodeAmpsAndAngles.after",g,A,e)}),C.subParser("makehtml.encodeBackslashEscapes",function(g,A,e){"use strict";return g=e.converter._dispatch("makehtml.encodeBackslashEscapes.before",g,A,e),g=g.replace(/\\(\\)/g,C.helper.escapeCharactersCallback),g=g.replace(/\\([`*_{}\[\]()>#+.!~=|-])/g,C.helper.escapeCharactersCallback),g=e.converter._dispatch("makehtml.encodeBackslashEscapes.after",g,A,e)}),C.subParser("makehtml.encodeCode",function(g,A,e){"use strict";return g=e.converter._dispatch("makehtml.encodeCode.before",g,A,e),g=g.replace(/&/g,"&").replace(//g,">").replace(/([*_{}\[\]\\=~-])/g,C.helper.escapeCharactersCallback),g=e.converter._dispatch("makehtml.encodeCode.after",g,A,e)}),C.subParser("makehtml.escapeSpecialCharsWithinTagAttributes",function(g,A,e){"use strict";return g=(g=e.converter._dispatch("makehtml.escapeSpecialCharsWithinTagAttributes.before",g,A,e)).replace(/<\/?[a-z\d_:-]+(?:[\s]+[\s\S]+?)?>/gi,function(g){return g.replace(/(.)<\/?code>(?=.)/g,"$1`").replace(/([\\`*_~=|])/g,C.helper.escapeCharactersCallback)}),g=g.replace(/-]|-[^>])(?:[^-]|-[^-])*)--)>/gi,function(g){return g.replace(/([\\`*_~=|])/g,C.helper.escapeCharactersCallback)}),g=e.converter._dispatch("makehtml.escapeSpecialCharsWithinTagAttributes.after",g,A,e)}),C.subParser("makehtml.githubCodeBlocks",function(g,A,e){"use strict";return A.ghCodeBlocks?(g=e.converter._dispatch("makehtml.githubCodeBlocks.before",g,A,e),g+="¨0",g=g.replace(/(?:^|\n)(```+|~~~+)([^\s`~]*)\n([\s\S]*?)\n\1/g,function(g,I,r,t){var a=A.omitExtraWLInCodeBlocks?"":"\n";return t=C.subParser("makehtml.encodeCode")(t,A,e),t=C.subParser("makehtml.detab")(t,A,e),t=t.replace(/^\n+/g,""),t=t.replace(/\n+$/g,""),t="
    "+t+a+"
    ",t=C.subParser("makehtml.hashBlock")(t,A,e),"\n\n¨G"+(e.ghCodeBlocks.push({text:g,codeblock:t})-1)+"G\n\n"}),g=g.replace(/¨0/,""),e.converter._dispatch("makehtml.githubCodeBlocks.after",g,A,e)):g}),C.subParser("makehtml.hashBlock",function(g,A,e){"use strict";return g=e.converter._dispatch("makehtml.hashBlock.before",g,A,e),g=g.replace(/(^\n+|\n+$)/g,""),g="\n\n¨K"+(e.gHtmlBlocks.push(g)-1)+"K\n\n",g=e.converter._dispatch("makehtml.hashBlock.after",g,A,e)}),C.subParser("makehtml.hashCodeTags",function(g,A,e){"use strict";g=e.converter._dispatch("makehtml.hashCodeTags.before",g,A,e);return g=C.helper.replaceRecursiveRegExp(g,function(g,I,r,t){var a=r+C.subParser("makehtml.encodeCode")(I,A,e)+t;return"¨C"+(e.gHtmlSpans.push(a)-1)+"C"},"]*>","","gim"),g=e.converter._dispatch("makehtml.hashCodeTags.after",g,A,e)}),C.subParser("makehtml.hashElement",function(g,A,e){"use strict";return function(g,A){var C=A;return C=C.replace(/\n\n/g,"\n"),C=C.replace(/^\n/,""),C=C.replace(/\n+$/g,""),C="\n\n¨K"+(e.gHtmlBlocks.push(C)-1)+"K\n\n"}}),C.subParser("makehtml.hashHTMLBlocks",function(g,A,e){"use strict";g=e.converter._dispatch("makehtml.hashHTMLBlocks.before",g,A,e);var I=["pre","div","h1","h2","h3","h4","h5","h6","blockquote","table","dl","ol","ul","script","noscript","form","fieldset","iframe","math","style","section","header","footer","nav","article","aside","address","audio","canvas","figure","hgroup","output","video","p"],r=function(g,A,C,I){var r=g;return-1!==C.search(/\bmarkdown\b/)&&(r=C+e.converter.makeHtml(A)+I),"\n\n¨K"+(e.gHtmlBlocks.push(r)-1)+"K\n\n"};A.backslashEscapesHTMLTags&&(g=g.replace(/\\<(\/?[^>]+?)>/g,function(g,A){return"<"+A+">"}));for(var t=0;t]*>)","im"),o="<"+I[t]+"\\b[^>]*>",s="";-1!==(a=C.helper.regexIndexOf(g,n));){var i=C.helper.splitAtIndex(g,a),l=C.helper.replaceRecursiveRegExp(i[1],r,o,s,"im");if(l===i[1])break;g=i[0].concat(l)}return g=g.replace(/(\n {0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,C.subParser("makehtml.hashElement")(g,A,e)),g=C.helper.replaceRecursiveRegExp(g,function(g){return"\n\n¨K"+(e.gHtmlBlocks.push(g)-1)+"K\n\n"},"^ {0,3}\x3c!--","--\x3e","gm"),g=g.replace(/(?:\n\n)( {0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,C.subParser("makehtml.hashElement")(g,A,e)),g=e.converter._dispatch("makehtml.hashHTMLBlocks.after",g,A,e)}),C.subParser("makehtml.hashHTMLSpans",function(g,A,e){"use strict";function C(g){return"¨C"+(e.gHtmlSpans.push(g)-1)+"C"}return g=e.converter._dispatch("makehtml.hashHTMLSpans.before",g,A,e),g=g.replace(/<[^>]+?\/>/gi,function(g){return C(g)}),g=g.replace(/<([^>]+?)>[\s\S]*?<\/\1>/g,function(g){return C(g)}),g=g.replace(/<([^>]+?)\s[^>]+?>[\s\S]*?<\/\1>/g,function(g){return C(g)}),g=g.replace(/<[^>]+?>/gi,function(g){return C(g)}),g=e.converter._dispatch("makehtml.hashHTMLSpans.after",g,A,e)}),C.subParser("makehtml.unhashHTMLSpans",function(g,A,e){"use strict";g=e.converter._dispatch("makehtml.unhashHTMLSpans.before",g,A,e);for(var C=0;C]*>\\s*]*>","^ {0,3}\\s*
    ","gim"),g=e.converter._dispatch("makehtml.hashPreCodeTags.after",g,A,e)}),C.subParser("makehtml.headers",function(g,A,e){"use strict";function I(g){var I,r;if(A.customizedHeaderId){var t=g.match(/\{([^{]+?)}\s*$/);t&&t[1]&&(g=t[1])}return I=g,r=C.helper.isString(A.prefixHeaderId)?A.prefixHeaderId:!0===A.prefixHeaderId?"section-":"",A.rawPrefixHeaderId||(I=r+I),I=A.ghCompatibleHeaderId?I.replace(/ /g,"-").replace(/&/g,"").replace(/¨T/g,"").replace(/¨D/g,"").replace(/[&+$,\/:;=?@"#{}|^¨~\[\]`\\*)(%.!'<>]/g,"").toLowerCase():A.rawHeaderId?I.replace(/ /g,"-").replace(/&/g,"&").replace(/¨T/g,"¨").replace(/¨D/g,"$").replace(/["']/g,"-").toLowerCase():I.replace(/[^\w]/g,"").toLowerCase(),A.rawPrefixHeaderId&&(I=r+I),e.hashLinkCounts[I]?I=I+"-"+e.hashLinkCounts[I]++:e.hashLinkCounts[I]=1,I}g=e.converter._dispatch("makehtml.headers.before",g,A,e);var r=isNaN(parseInt(A.headerLevelStart))?1:parseInt(A.headerLevelStart),t=A.smoothLivePreview?/^(.+)[ \t]*\n={2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n=+[ \t]*\n+/gm,a=A.smoothLivePreview?/^(.+)[ \t]*\n-{2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n-+[ \t]*\n+/gm;g=(g=g.replace(t,function(g,t){var a=C.subParser("makehtml.spanGamut")(t,A,e),n=A.noHeaderId?"":' id="'+I(t)+'"',o=""+a+"";return C.subParser("makehtml.hashBlock")(o,A,e)})).replace(a,function(g,t){var a=C.subParser("makehtml.spanGamut")(t,A,e),n=A.noHeaderId?"":' id="'+I(t)+'"',o=r+1,s=""+a+"";return C.subParser("makehtml.hashBlock")(s,A,e)});var n=A.requireSpaceBeforeHeadingText?/^(#{1,6})[ \t]+(.+?)[ \t]*#*\n+/gm:/^(#{1,6})[ \t]*(.+?)[ \t]*#*\n+/gm;return g=g.replace(n,function(g,t,a){var n=a;A.customizedHeaderId&&(n=a.replace(/\s?\{([^{]+?)}\s*$/,""));var o=C.subParser("makehtml.spanGamut")(n,A,e),s=A.noHeaderId?"":' id="'+I(a)+'"',i=r-1+t.length,l=""+o+"";return C.subParser("makehtml.hashBlock")(l,A,e)}),g=e.converter._dispatch("makehtml.headers.after",g,A,e)}),C.subParser("makehtml.horizontalRule",function(g,A,e){"use strict";g=e.converter._dispatch("makehtml.horizontalRule.before",g,A,e);var I=C.subParser("makehtml.hashBlock")("
    ",A,e);return g=g.replace(/^ {0,2}( ?-){3,}[ \t]*$/gm,I),g=g.replace(/^ {0,2}( ?\*){3,}[ \t]*$/gm,I),g=g.replace(/^ {0,2}( ?_){3,}[ \t]*$/gm,I),g=e.converter._dispatch("makehtml.horizontalRule.after",g,A,e)}),C.subParser("makehtml.images",function(g,A,e){"use strict";function I(g,A,I,r,t,a,n,o){var s=e.gUrls,i=e.gTitles,l=e.gDimensions;if(I=I.toLowerCase(),o||(o=""),g.search(/\(? ?(['"].*['"])?\)$/m)>-1)r="";else if(""===r||null===r){if(""!==I&&null!==I||(I=A.toLowerCase().replace(/ ?\n/g," ")),r="#"+I,C.helper.isUndefined(s[I]))return g;r=s[I],C.helper.isUndefined(i[I])||(o=i[I]),C.helper.isUndefined(l[I])||(t=l[I].width,a=l[I].height)}A=A.replace(/"/g,""").replace(C.helper.regexes.asteriskDashAndColon,C.helper.escapeCharactersCallback);var c=''+A+'"}return g=(g=e.converter._dispatch("makehtml.images.before",g,A,e)).replace(/!\[([^\]]*?)] ?(?:\n *)?\[([\s\S]*?)]()()()()()/g,I),g=g.replace(/!\[([^\]]*?)][ \t]*()\([ \t]??(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,function(g,A,e,C,r,t,a,n){return C=C.replace(/\s/g,""),I(g,A,e,C,r,t,0,n)}),g=g.replace(/!\[([^\]]*?)][ \t]*()\([ \t]?<([^>]*)>(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(?:(["'])([^"]*?)\6))?[ \t]?\)/g,I),g=g.replace(/!\[([^\]]*?)][ \t]*()\([ \t]??(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,I),g=g.replace(/!\[([^\[\]]+)]()()()()()/g,I),g=e.converter._dispatch("makehtml.images.after",g,A,e)}),C.subParser("makehtml.italicsAndBold",function(g,A,e){"use strict";function C(g,A,e){return A+g+e}return g=e.converter._dispatch("makehtml.italicsAndBold.before",g,A,e),g=A.literalMidWordUnderscores?(g=(g=g.replace(/\b___(\S[\s\S]*)___\b/g,function(g,A){return C(A,"","")})).replace(/\b__(\S[\s\S]*)__\b/g,function(g,A){return C(A,"","")})).replace(/\b_(\S[\s\S]*?)_\b/g,function(g,A){return C(A,"","")}):(g=(g=g.replace(/___(\S[\s\S]*?)___/g,function(g,A){return/\S$/.test(A)?C(A,"",""):g})).replace(/__(\S[\s\S]*?)__/g,function(g,A){return/\S$/.test(A)?C(A,"",""):g})).replace(/_([^\s_][\s\S]*?)_/g,function(g,A){return/\S$/.test(A)?C(A,"",""):g}),g=A.literalMidWordAsterisks?(g=(g=g.replace(/([^*]|^)\B\*\*\*(\S[\s\S]+?)\*\*\*\B(?!\*)/g,function(g,A,e){return C(e,A+"","")})).replace(/([^*]|^)\B\*\*(\S[\s\S]+?)\*\*\B(?!\*)/g,function(g,A,e){return C(e,A+"","")})).replace(/([^*]|^)\B\*(\S[\s\S]+?)\*\B(?!\*)/g,function(g,A,e){return C(e,A+"","")}):(g=(g=g.replace(/\*\*\*(\S[\s\S]*?)\*\*\*/g,function(g,A){return/\S$/.test(A)?C(A,"",""):g})).replace(/\*\*(\S[\s\S]*?)\*\*/g,function(g,A){return/\S$/.test(A)?C(A,"",""):g})).replace(/\*([^\s*][\s\S]*?)\*/g,function(g,A){return/\S$/.test(A)?C(A,"",""):g}),g=e.converter._dispatch("makehtml.italicsAndBold.after",g,A,e)}),C.subParser("makehtml.lists",function(g,A,e){"use strict";function I(g,I){e.gListLevel++,g=g.replace(/\n{2,}$/,"\n");var r=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0| {0,3}([*+-]|\d+[.])[ \t]+))/gm,t=/\n[ \t]*\n(?!¨0)/.test(g+="¨0");return A.disableForced4SpacesIndentedSublists&&(r=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0|\2([*+-]|\d+[.])[ \t]+))/gm),g=g.replace(r,function(g,I,r,a,n,o,s){s=s&&""!==s.trim();var i=C.subParser("makehtml.outdent")(n,A,e),l="";return o&&A.tasklists&&(l=' class="task-list-item" style="list-style-type: none;"',i=i.replace(/^[ \t]*\[(x|X| )?]/m,function(){var g='-1?(i=C.subParser("makehtml.githubCodeBlocks")(i,A,e),i=C.subParser("makehtml.blockGamut")(i,A,e)):(i=(i=C.subParser("makehtml.lists")(i,A,e)).replace(/\n$/,""),i=(i=C.subParser("makehtml.hashHTMLBlocks")(i,A,e)).replace(/\n\n+/g,"\n\n"),i=t?C.subParser("makehtml.paragraphs")(i,A,e):C.subParser("makehtml.spanGamut")(i,A,e)),i=i.replace("¨A",""),i=""+i+"\n"}),g=g.replace(/¨0/g,""),e.gListLevel--,I&&(g=g.replace(/\s+$/,"")),g}function r(g,A){if("ol"===A){var e=g.match(/^ *(\d+)\./);if(e&&"1"!==e[1])return' start="'+e[1]+'"'}return""}function t(g,e,C){var t=A.disableForced4SpacesIndentedSublists?/^ ?\d+\.[ \t]/gm:/^ {0,3}\d+\.[ \t]/gm,a=A.disableForced4SpacesIndentedSublists?/^ ?[*+-][ \t]/gm:/^ {0,3}[*+-][ \t]/gm,n="ul"===e?t:a,o="";if(-1!==g.search(n))!function A(s){var i=s.search(n),l=r(g,e);-1!==i?(o+="\n\n<"+e+l+">\n"+I(s.slice(0,i),!!C)+"\n",n="ul"===(e="ul"===e?"ol":"ul")?t:a,A(s.slice(i))):o+="\n\n<"+e+l+">\n"+I(s,!!C)+"\n"}(g);else{var s=r(g,e);o="\n\n<"+e+s+">\n"+I(g,!!C)+"\n"}return o}return g=e.converter._dispatch("lists.before",g,A,e),g+="¨0",g=e.gListLevel?g.replace(/^(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,function(g,A,e){return t(A,e.search(/[*+-]/g)>-1?"ul":"ol",!0)}):g.replace(/(\n\n|^\n?)(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,function(g,A,e,C){return t(e,C.search(/[*+-]/g)>-1?"ul":"ol",!1)}),g=g.replace(/¨0/,""),g=e.converter._dispatch("makehtml.lists.after",g,A,e)}),C.subParser("makehtml.metadata",function(g,A,e){"use strict";function C(g){e.metadata.raw=g,(g=(g=g.replace(/&/g,"&").replace(/"/g,""")).replace(/\n {4}/g," ")).replace(/^([\S ]+): +([\s\S]+?)$/gm,function(g,A,C){return e.metadata.parsed[A]=C,""})}return A.metadata?(g=e.converter._dispatch("makehtml.metadata.before",g,A,e),g=g.replace(/^\s*«««+(\S*?)\n([\s\S]+?)\n»»»+\n/,function(g,A,e){return C(e),"¨M"}),g=g.replace(/^\s*---+(\S*?)\n([\s\S]+?)\n---+\n/,function(g,A,I){return A&&(e.metadata.format=A),C(I),"¨M"}),g=g.replace(/¨M/g,""),g=e.converter._dispatch("makehtml.metadata.after",g,A,e)):g}),C.subParser("makehtml.outdent",function(g,A,e){"use strict";return g=e.converter._dispatch("makehtml.outdent.before",g,A,e),g=g.replace(/^(\t|[ ]{1,4})/gm,"¨0"),g=g.replace(/¨0/g,""),g=e.converter._dispatch("makehtml.outdent.after",g,A,e)}),C.subParser("makehtml.paragraphs",function(g,A,e){"use strict";for(var I=(g=(g=(g=e.converter._dispatch("makehtml.paragraphs.before",g,A,e)).replace(/^\n+/g,"")).replace(/\n+$/g,"")).split(/\n{2,}/g),r=[],t=I.length,a=0;a=0?r.push(n):n.search(/\S/)>=0&&(n=(n=C.subParser("makehtml.spanGamut")(n,A,e)).replace(/^([ \t]*)/g,"

    "),n+="

    ",r.push(n))}for(t=r.length,a=0;a]*>\s*]*>/.test(s)&&(i=!0)}r[a]=s}return g=r.join("\n"),g=g.replace(/^\n+/g,""),g=g.replace(/\n+$/g,""),e.converter._dispatch("makehtml.paragraphs.after",g,A,e)}),C.subParser("makehtml.runExtension",function(g,A,e,C){"use strict";if(g.filter)A=g.filter(A,C.converter,e);else if(g.regex){var I=g.regex;I instanceof RegExp||(I=new RegExp(I,"g")),A=A.replace(I,g.replace)}return A}),C.subParser("makehtml.spanGamut",function(g,A,e){"use strict";return g=e.converter._dispatch("smakehtml.panGamut.before",g,A,e),g=C.subParser("makehtml.codeSpans")(g,A,e),g=C.subParser("makehtml.escapeSpecialCharsWithinTagAttributes")(g,A,e),g=C.subParser("makehtml.encodeBackslashEscapes")(g,A,e),g=C.subParser("makehtml.images")(g,A,e),g=C.subParser("makehtml.anchors")(g,A,e),g=C.subParser("makehtml.autoLinks")(g,A,e),g=C.subParser("makehtml.simplifiedAutoLinks")(g,A,e),g=C.subParser("makehtml.emoji")(g,A,e),g=C.subParser("makehtml.underline")(g,A,e),g=C.subParser("makehtml.italicsAndBold")(g,A,e),g=C.subParser("makehtml.strikethrough")(g,A,e),g=C.subParser("makehtml.ellipsis")(g,A,e),g=C.subParser("makehtml.hashHTMLSpans")(g,A,e),g=C.subParser("makehtml.encodeAmpsAndAngles")(g,A,e),A.simpleLineBreaks?/\n\n¨K/.test(g)||(g=g.replace(/\n+/g,"
    \n")):g=g.replace(/ +\n/g,"
    \n"),g=e.converter._dispatch("makehtml.spanGamut.after",g,A,e)}),C.subParser("makehtml.strikethrough",function(g,A,e){"use strict";return A.strikethrough&&(g=(g=e.converter._dispatch("makehtml.strikethrough.before",g,A,e)).replace(/(?:~){2}([\s\S]+?)(?:~){2}/g,function(g,I){return function(g){return A.simplifiedAutoLink&&(g=C.subParser("makehtml.simplifiedAutoLinks")(g,A,e)),""+g+""}(I)}),g=e.converter._dispatch("makehtml.strikethrough.after",g,A,e)),g}),C.subParser("makehtml.stripLinkDefinitions",function(g,A,e){"use strict";var I=function(g,I,r,t,a,n,o){return I=I.toLowerCase(),r.match(/^data:.+?\/.+?;base64,/)?e.gUrls[I]=r.replace(/\s/g,""):e.gUrls[I]=C.subParser("makehtml.encodeAmpsAndAngles")(r,A,e),n?n+o:(o&&(e.gTitles[I]=o.replace(/"|'/g,""")),A.parseImgDimensions&&t&&a&&(e.gDimensions[I]={width:t,height:a}),"")};return g=(g+="¨0").replace(/^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n\n|(?=¨0)|(?=\n\[))/gm,I),g=g.replace(/^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*\s]+)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n+|(?=¨0))/gm,I),g=g.replace(/¨0/,"")}),C.subParser("makehtml.tables",function(g,A,e){"use strict";function I(g){return/^:[ \t]*--*$/.test(g)?' style="text-align:left;"':/^--*[ \t]*:[ \t]*$/.test(g)?' style="text-align:right;"':/^:[ \t]*--*[ \t]*:$/.test(g)?' style="text-align:center;"':""}function r(g,I){var r="";return g=g.trim(),(A.tablesHeaderId||A.tableHeaderId)&&(r=' id="'+g.replace(/ /g,"_").toLowerCase()+'"'),g=C.subParser("makehtml.spanGamut")(g,A,e),""+g+"\n"}function t(g,I){return""+C.subParser("makehtml.spanGamut")(g,A,e)+"\n"}function a(g){var a,n=g.split("\n");for(a=0;a\n\n\n",I=0;I\n";for(var r=0;r\n"}return e+="\n\n"}(l,u)}if(!A.tables)return g;return g=e.converter._dispatch("makehtml.tables.before",g,A,e),g=g.replace(/\\(\|)/g,C.helper.escapeCharactersCallback),g=g.replace(/^ {0,3}\|?.+\|.+\n {0,3}\|?[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:[-=]){2,}[\s\S]+?(?:\n\n|¨0)/gm,a),g=g.replace(/^ {0,3}\|.+\|[ \t]*\n {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n( {0,3}\|.+\|[ \t]*\n)*(?:\n|¨0)/gm,a),g=e.converter._dispatch("makehtml.tables.after",g,A,e)}),C.subParser("makehtml.underline",function(g,A,e){"use strict";return A.underline?(g=e.converter._dispatch("makehtml.underline.before",g,A,e),g=A.literalMidWordUnderscores?g.replace(/\b_?__(\S[\s\S]*)___?\b/g,function(g,A){return""+A+""}):g.replace(/_?__(\S[\s\S]*?)___?/g,function(g,A){return/\S$/.test(A)?""+A+"":g}),g=g.replace(/(_)/g,C.helper.escapeCharactersCallback),g=e.converter._dispatch("makehtml.underline.after",g,A,e)):g}),C.subParser("makehtml.unescapeSpecialChars",function(g,A,e){"use strict";return g=e.converter._dispatch("makehtml.unescapeSpecialChars.before",g,A,e),g=g.replace(/¨E(\d+)E/g,function(g,A){var e=parseInt(A);return String.fromCharCode(e)}),g=e.converter._dispatch("makehtml.unescapeSpecialChars.after",g,A,e)}),C.Converter=function(g){"use strict";function e(g,e){if(e=e||null,C.helper.isString(g)){if(g=C.helper.stdExtName(g),e=g,C.extensions[g])return console.warn("DEPRECATION WARNING: "+g+" is an old extension that uses a deprecated loading method.Please inform the developer that the extension should be updated!"),void function(g,e){"function"==typeof g&&(g=g(new C.Converter));C.helper.isArray(g)||(g=[g]);var I=A(g,e);if(!I.valid)throw Error(I.error);for(var r=0;r/g,"\\$1>"),A=A.replace(/^#/gm,"\\#"),A=A.replace(/^(\s*)([-=]{3,})(\s*)$/,"$1\\$2$3"),A=A.replace(/^( {0,3}\d+)\./gm,"$1\\."),A=A.replace(/^( {0,3})([+-])/gm,"$1\\$2"),A=A.replace(/]([\s]*)\(/g,"\\]$1\\("),A=A.replace(/^ {0,3}\[([\S \t]*?)]:/gm,"\\[$1]:")}(g);if(8===g.nodeType)return"\x3c!--"+g.data+"--\x3e\n\n";if(1!==g.nodeType)return"";switch(g.tagName.toLowerCase()){case"h1":t||(a=I(g,1)+"\n\n");break;case"h2":t||(a=I(g,2)+"\n\n");break;case"h3":t||(a=I(g,3)+"\n\n");break;case"h4":t||(a=I(g,4)+"\n\n");break;case"h5":t||(a=I(g,5)+"\n\n");break;case"h6":t||(a=I(g,6)+"\n\n");break;case"p":t||(a=function(g){var e="";if(g.hasChildNodes())for(var C=g.childNodes,I=C.length,r=0;r "+e.split("\n").join("\n> ")}(g)+"\n\n");break;case"hr":t||(a="---\n\n");break;case"ol":t||(a=e(g,"ol")+"\n\n");break;case"ul":t||(a=e(g,"ul")+"\n\n");break;case"precode":t||(a=function(g){var A=g.getAttribute("language"),e=g.getAttribute("precodenum");return"```"+A+"\n"+n[e]+"\n```"}(g)+"\n\n");break;case"pre":t||(a=function(g){var A=g.getAttribute("prenum");return"
    "+n[A]+"
    "}(g)+"\n\n");break;case"table":t||(a=function(g){var A,e,I="",t=[[],[]],a=g.querySelectorAll("thead>tr>th"),n=g.querySelectorAll("tbody>tr");for(A=0;Ah&&(h=m)}for(A=0;A",g.hasAttribute("title")&&(e+=' "'+g.getAttribute("title")+'"'),e+=")"}return e}(g);break;case"img":a=function(g){var A="";g.hasAttribute("src")&&(A+="!["+g.getAttribute("alt")+"](",A+="<"+g.getAttribute("src")+">",g.hasAttribute("width")&&g.hasAttribute("height")&&(A+=" ="+g.getAttribute("width")+"x"+g.getAttribute("height")),g.hasAttribute("title")&&(A+=' "'+g.getAttribute("title")+'"'),A+=")");return A}(g);break;default:a=g.outerHTML+"\n\n"}return a}function e(g,e){var C="";if(!g.hasChildNodes())return"";for(var I=g.childNodes,r=I.length,t=g.getAttribute("start")||1,a=0;a[ \t]+¨NBSP;<");var a=C.helper.document.createElement("div");a.innerHTML=g;var n=function(g){for(var A=g.querySelectorAll("pre"),e=[],I=0;I'}else e.push(A[I].innerHTML),A[I].innerHTML="",A[I].setAttribute("prenum",I.toString());return e}(a);t(a);for(var o=a.childNodes,s="",i=0;i .frappe-chat-popper - { - position: fixed; - bottom: 0px; - right: 0px; - margin: @frappe-chat-popper-margin; - z-index: @frappe-chat-popper-z-index; - - & > .frappe-chat-popper-collapse - { - & > .panel - { - position: relative; - display: flex; - flex-direction: column; - width: @frappe-chat-popper-panel-width; - height: @frappe-chat-popper-panel-height; - box-shadow: @frappe-chat-popper-panel-box-shadow; + & > .frappe-chat-popper + { + position: fixed; + bottom: 0px; + right: 0px; + margin: @frappe-chat-popper-margin; + z-index: @frappe-chat-popper-z-index; + + & > .frappe-chat-popper-collapse + { + & > .panel + { + position: relative; + display: flex; + flex-direction: column; + width: @frappe-chat-popper-panel-width; + height: @frappe-chat-popper-panel-height; + box-shadow: @frappe-chat-popper-panel-box-shadow; - .vcenter - { - position: absolute; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - } + .vcenter + { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + } - .panel-heading - { - .frappe-chat-action-bar - { - form - { - width: 100%; - } + .panel-heading + { + .frappe-chat-action-bar + { + form + { + width: 100%; + } - .btn-action - { - margin-left: 5px !important; - } - } - } + .btn-action + { + margin-left: 5px !important; + } + } + } - .frappe-chat-room-list - { - height: 100%; - overflow-y: auto; - padding: 0 1px 0 1px; + .frappe-chat-room-list + { + height: 100%; + overflow-y: auto; + padding: 0 1px 0 1px; - & > li > a - { - border-radius: 0px !important; - } + & > li > a + { + border-radius: 0px !important; + } - .media - { - .media-heading, .media-subtitle - { - .ellipsis; - max-width: @frappe-chat-room-list-content-max-width; - } - } + .media + { + .media-heading, .media-subtitle + { + .ellipsis; + max-width: @frappe-chat-room-list-content-max-width; + } + } + } - .message-count - { - background: #ff5858; - display: inline-block; - padding: 5px; - color: white; - border-radius: 50%; - font-size: 12px; - height: 20px; - line-height: 10px; - text-align: center; - min-width: 20px; - margin-top: 4px; - } - } + .chat-list.list-group + { + height: 387px; + overflow-y: scroll; + } - .chat-list.list-group - { - height: 390px; - overflow-y: scroll; - } + .frappe-chat-room-footer + { + position: absolute; + left: 0px; + right: 0px; + bottom: 0px; + } + } - .frappe-chat-room-footer - { - position: absolute; - left: 0px; - right: 0px; - bottom: 0px; - } - } + & > .panel.panel-span + { + position: fixed; + width: 100%; + height: 100%; + top: 0px; + left: 0px; + bottom: 0px; + right: 0px; + overflow: auto; + border-radius: 0px; + + .panel-heading + { + border-radius: 0px; + } + } + } + } - & > .panel.panel-span - { - position: fixed; - width: 100%; - height: 100%; - top: 0px; - left: 0px; - bottom: 0px; - right: 0px; - overflow: auto; - border-radius: 0px; - - .panel-heading - { - border-radius: 0px; - } - } - } - } + .panel + { + margin-bottom: 0px !important; - .panel - { - margin-bottom: 0px !important; + .chat-form + { + .form-control + { + font-size: @frappe-chat-form-font-size; + } + + .dropdown-menu + { + border-radius: @frappe-chat-form-menu-border-radius; + } + + // Hints + .hint-list.list-group + { + margin: 0px; + max-height: @frappe-chat-form-list-group-height; + overflow-y: auto; + + .hint-list-item.list-group-item:first-child, .hint-list-item.list-group-item:last-child + { + border-radius: 0px !important; - .frappe-chat-form - { - // HACK: Wraps the ChatForm within the panel. - margin: 1px; - - .form-control - { - font-size: @frappe-chat-form-font-size; - } - - .dropdown-menu - { - border-radius: @frappe-chat-form-menu-border-radius; - } - - .btn - { - border-radius: 0px !important; - } - - // Hints - .hint-list.list-group - { - margin: 0px; - max-height: @frappe-chat-form-list-group-height; - overflow-y: auto; - - .hint-list-item.list-group-item:first-child, .hint-list-item.list-group-item:last-child - { - border-radius: 0px !important; - - a { text-decoration: none } - } - } - } - } + a { text-decoration: none } + } + } + } + } } -// -.chat-message { - background: #E8DDFF; - padding: 5px 15px; - margin: 5px; - border-radius: 5px; - display: inline-block; +// hacks +.chat-list +{ + padding-bottom: 3px; } -.seen-check { - font-size: 12px; - display: inline-block; - margin-left: 5px; +@frappe-chat-color-grey: #8D99A6; + +@frappe-chat-base-font-size: 12px; +@frappe-chat-base-font-size-lg: 14px; + +@frappe-chat-base-spacing: 5px; + +// ChatForm +@frappe-chat-form-border: 1px solid #D1D8DD; + +// ChatList +@frappe-chat-list-bg-color: #FAFBFC; + +// ChatList.Item +@frappe-chat-list-item-padding: @frappe-chat-base-spacing @frappe-chat-base-spacing * 2; + +// ChatBubble +@frappe-chat-bubble-padding: @frappe-chat-base-spacing @frappe-chat-base-spacing * 2; +@frappe-chat-bubble-min-width: 20%; +@frappe-chat-bubble-max-width: 75%; + +@frappe-chat-bubble-box-shadow: 0px 0.1px 0.5px 0px rgba(0,0,0,0.5); + +@frappe-chat-bubble-border-size: 1px; +@frappe-chat-bubble-border-radius: @frappe-chat-base-spacing; + +@frappe-chat-bubble-l-color: #EBEFF2; +@frappe-chat-bubble-r-color: #EBF7CF; + +@frappe-chat-bubble-author-font-size: @frappe-chat-base-font-size; + +@frappe-chat-bubble-content-margin-bottom: @frappe-chat-base-spacing; + +@frappe-chat-bubble-meta-font-size: @frappe-chat-base-spacing * 2; + +@frappe-chat-bubble-check-font-size: @frappe-chat-base-font-size; + +.chat-form +{ + border-top: @frappe-chat-form-border; + + .input-group-btn + { + .btn + { + background: white; + } + } + + .form-control + { + line-height: 27px; // HACK: Makes input and placeholder centered within textarea. Also takes care of the input-btn + border: none; + box-shadow: none; + resize: none; + padding-left: 0px; + padding-right: 0px; + } + + .fa + { + font-size: @frappe-chat-base-font-size-lg; + } } + +.chat-list +{ + background: @frappe-chat-list-bg-color; + + .chat-list-item + { + .avatar + { + vertical-align: top; + } + + .cursor-pointer; + + border: none !important; + padding: @frappe-chat-list-item-padding; + background: transparent; + + .chat-bubble + { + min-width: @frappe-chat-bubble-min-width; + max-width: @frappe-chat-bubble-max-width; + display: inline-block; + padding: @frappe-chat-bubble-padding; + border-radius: @frappe-chat-bubble-border-radius; + + -webkit-box-shadow: @frappe-chat-bubble-box-shadow; + -moz-box-shadow: @frappe-chat-bubble-box-shadow; + box-shadow: @frappe-chat-bubble-box-shadow; + + &.chat-bubble-l + { + background-color: @frappe-chat-bubble-l-color; + + .chat-bubble-meta + { + & > .chat-bubble-creation, & > .chat-bubble-check i + { + color: darken(@frappe-chat-bubble-l-color, 50%) !important; + } + } + } + + &.chat-bubble-r + { + text-align: right; + background-color: @frappe-chat-bubble-r-color; + + .chat-bubble-meta + { + & > .chat-bubble-creation, & > .chat-bubble-check i + { + color: darken(@frappe-chat-bubble-r-color, 50%) !important; + } + } + } + + .chat-bubble-author + { + font-size: @frappe-chat-bubble-author-font-size; + + a + { + .font-bold; + + text-decoration: none !important; + } + } + + .chat-bubble-content + { + margin-bottom: @frappe-chat-bubble-content-margin-bottom; + word-wrap: break-word; + } + + .chat-bubble-meta + { + font-size: @frappe-chat-bubble-meta-font-size; + + & > .chat-bubble-check + { + margin-left: @frappe-chat-base-spacing; + + i + { + font-size: @frappe-chat-bubble-check-font-size; + } + } + } + } + } +} \ No newline at end of file