From 3b5608246376e7ff9f60e21e1cefce0a55bd128a Mon Sep 17 00:00:00 2001 From: Alexander Nikushkin Date: Fri, 22 Nov 2024 18:31:17 +0500 Subject: [PATCH] fix: build files --- public/easymde.css | 6 +++ public/easymde.js | 96 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 102 insertions(+) create mode 100644 public/easymde.css create mode 100644 public/easymde.js diff --git a/public/easymde.css b/public/easymde.css new file mode 100644 index 0000000..13ef756 --- /dev/null +++ b/public/easymde.css @@ -0,0 +1,6 @@ +/** + * easymde v2.18.0 + * Copyright Jeroen Akkerman + * @link https://github.com/ionaru/easy-markdown-editor + * @license MIT + */.CodeMirror{font-family:monospace;height:300px;color:#000;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid #000;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0!important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-fat-cursor .CodeMirror-line::selection,.cm-fat-cursor .CodeMirror-line>span::selection,.cm-fat-cursor .CodeMirror-line>span>span::selection{background:0 0}.cm-fat-cursor .CodeMirror-line::-moz-selection,.cm-fat-cursor .CodeMirror-line>span::-moz-selection,.cm-fat-cursor .CodeMirror-line>span>span::-moz-selection{background:0 0}.cm-fat-cursor{caret-color:transparent}@keyframes blink{50%{background-color:transparent}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:0;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-type,.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta,.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-error,.cm-invalidchar{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22}.CodeMirror-matchingtag{background:#ff96004d}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:#fff}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-50px;margin-right:-50px;padding-bottom:50px;height:100%;outline:0;position:relative;z-index:0}.CodeMirror-sizer{position:relative;border-right:50px solid transparent}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{position:absolute;z-index:6;display:none;outline:0}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-50px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:0 0!important;border:none!important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{border-radius:0;border-width:0;background:0 0;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;font-variant-ligatures:contextual}.CodeMirror-wrap pre.CodeMirror-line,.CodeMirror-wrap pre.CodeMirror-line-like{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;padding:.1px}.CodeMirror-code{outline:0}.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber,.CodeMirror-scroll,.CodeMirror-sizer{box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}div.CodeMirror-dragcursors,.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:#ff06}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:""}span.CodeMirror-selectedtext{background:0 0}.EasyMDEContainer{display:block}.CodeMirror-rtl pre{direction:rtl}.EasyMDEContainer.sided--no-fullscreen{display:flex;flex-direction:row;flex-wrap:wrap}.EasyMDEContainer .CodeMirror{box-sizing:border-box;height:auto;border:1px solid #ced4da;border-bottom-left-radius:4px;border-bottom-right-radius:4px;padding:10px;font:inherit;z-index:0;word-wrap:break-word}.EasyMDEContainer .CodeMirror-scroll{cursor:text}.EasyMDEContainer .CodeMirror-fullscreen{background:#fff;position:fixed!important;top:50px;left:0;right:0;bottom:0;height:auto;z-index:8;border-right:none!important;border-bottom-right-radius:0!important}.EasyMDEContainer .CodeMirror-sided{width:50%!important}.EasyMDEContainer.sided--no-fullscreen .CodeMirror-sided{border-right:none!important;border-bottom-right-radius:0;position:relative;flex:1 1 auto}.EasyMDEContainer .CodeMirror-placeholder{opacity:.5}.EasyMDEContainer .CodeMirror-focused .CodeMirror-selected{background:#d9d9d9}.editor-toolbar{position:relative;-webkit-user-select:none;-moz-user-select:none;-o-user-select:none;user-select:none;padding:9px 10px;border-top:1px solid #ced4da;border-left:1px solid #ced4da;border-right:1px solid #ced4da;border-top-left-radius:4px;border-top-right-radius:4px}.editor-toolbar.fullscreen{width:100%;height:50px;padding-top:10px;padding-bottom:10px;box-sizing:border-box;background:#fff;border:0;position:fixed;top:0;left:0;opacity:1;z-index:9}.editor-toolbar.fullscreen:before{width:20px;height:50px;background:linear-gradient(to right,#fff 0,#fff0);position:fixed;top:0;left:0;margin:0;padding:0}.editor-toolbar.fullscreen:after{width:20px;height:50px;background:linear-gradient(to right,#fff0 0,#fff);position:fixed;top:0;right:0;margin:0;padding:0}.EasyMDEContainer.sided--no-fullscreen .editor-toolbar{width:100%}.editor-toolbar .easymde-dropdown,.editor-toolbar button{background:0 0;display:inline-block;text-align:center;text-decoration:none!important;height:30px;margin:0;padding:0;border:1px solid transparent;border-radius:3px;cursor:pointer}.editor-toolbar button{font-weight:700;min-width:30px;padding:0 6px;white-space:nowrap}.editor-toolbar button.active,.editor-toolbar button:hover{background:#fcfcfc;border-color:#95a5a6}.editor-toolbar i.separator{display:inline-block;width:0;border-left:1px solid #d9d9d9;border-right:1px solid #fff;color:transparent;text-indent:-10px;margin:0 6px}.editor-toolbar button:after{font-family:Arial,Helvetica Neue,Helvetica,sans-serif;font-size:65%;vertical-align:text-bottom;position:relative;top:2px}.editor-toolbar button.heading-1:after{content:"1"}.editor-toolbar button.heading-2:after{content:"2"}.editor-toolbar button.heading-3:after{content:"3"}.editor-toolbar button.heading-bigger:after{content:"▲"}.editor-toolbar button.heading-smaller:after{content:"▼"}.editor-toolbar.disabled-for-preview button:not(.no-disable){opacity:.6;pointer-events:none}@media only screen and (max-width:700px){.editor-toolbar i.no-mobile{display:none}}.editor-statusbar{padding:8px 10px;font-size:12px;color:#959694;text-align:right}.EasyMDEContainer.sided--no-fullscreen .editor-statusbar{width:100%}.editor-statusbar span{display:inline-block;min-width:4em;margin-left:1em}.editor-statusbar .lines:before{content:"lines: "}.editor-statusbar .words:before{content:"words: "}.editor-statusbar .characters:before{content:"characters: "}.editor-preview-full{position:absolute;width:100%;height:100%;top:0;left:0;z-index:7;overflow:auto;display:none;box-sizing:border-box}.editor-preview-side{position:fixed;bottom:0;width:50%;top:50px;right:0;z-index:9;overflow:auto;display:none;box-sizing:border-box;border:1px solid #ddd;word-wrap:break-word}.editor-preview-active-side{display:block}.EasyMDEContainer.sided--no-fullscreen .editor-preview-active-side{flex:1 1 auto;height:auto;position:static}.editor-preview-active{display:block}.editor-preview{padding:10px;background:#fafafa}.editor-preview>p{margin-top:0}.editor-preview pre{background:#eee;margin-bottom:10px}.editor-preview table td,.editor-preview table th{border:1px solid #ddd;padding:5px}.cm-s-easymde .cm-tag{color:#63a35c}.cm-s-easymde .cm-attribute{color:#795da3}.cm-s-easymde .cm-string{color:#183691}.cm-s-easymde .cm-header-1{font-size:calc(1.375rem + 1.5vw)}.cm-s-easymde .cm-header-2{font-size:calc(1.325rem + .9vw)}.cm-s-easymde .cm-header-3{font-size:calc(1.3rem + .6vw)}.cm-s-easymde .cm-header-4{font-size:calc(1.275rem + .3vw)}.cm-s-easymde .cm-header-5{font-size:1.25rem}.cm-s-easymde .cm-header-6{font-size:1rem}.cm-s-easymde .cm-header-1,.cm-s-easymde .cm-header-2,.cm-s-easymde .cm-header-3,.cm-s-easymde .cm-header-4,.cm-s-easymde .cm-header-5,.cm-s-easymde .cm-header-6{margin-bottom:.5rem;line-height:1.2}.cm-s-easymde .cm-comment{background:#0000000d;border-radius:2px}.cm-s-easymde .cm-link{color:#7f8c8d}.cm-s-easymde .cm-url{color:#aab2b3}.cm-s-easymde .cm-quote{color:#7f8c8d;font-style:italic}.editor-toolbar .easymde-dropdown{position:relative;background:linear-gradient(to bottom right,#fff 0,#fff 84%,#333 50%,#333);border-radius:0;border:1px solid #fff}.editor-toolbar .easymde-dropdown:hover{background:linear-gradient(to bottom right,#fff 0,#fff 84%,#333 50%,#333)}.easymde-dropdown-content{display:block;visibility:hidden;position:absolute;background-color:#f9f9f9;box-shadow:0 8px 16px #0003;padding:8px;z-index:2;top:30px}.easymde-dropdown:active .easymde-dropdown-content,.easymde-dropdown:focus .easymde-dropdown-content,.easymde-dropdown:focus-within .easymde-dropdown-content{visibility:visible}.easymde-dropdown-content button{display:block}span[data-img-src]:after{content:"";background-image:var(--bg-image);display:block;max-height:100%;max-width:100%;background-size:contain;height:0;padding-top:var(--height);width:var(--width);background-repeat:no-repeat}.CodeMirror .cm-spell-error:not(.cm-url):not(.cm-comment):not(.cm-tag):not(.cm-word){background:#ff000026}.easyMde{position:relative;overflow:hidden;border-radius:.375rem;border-width:1px;--tw-border-opacity:1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.easyMde:is(.dark *){border-color:rgb(var(--dark-300))}.easyMde:has(.form-invalid){--tw-border-opacity:1;border-color:rgb(220 38 38 / var(--tw-border-opacity))}.easyMde:has(.form-invalid):is(.dark *){--tw-border-opacity:1;border-color:rgb(185 28 28 / var(--tw-border-opacity))}.easyMde:has(.CodeMirror-focused){--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-color:rgb(229 231 235 / var(--tw-ring-opacity));--tw-ring-opacity:.7}.easyMde:has(.form-invalid):has(.CodeMirror-focused){--tw-ring-color:rgb(248 113 113 / var(--tw-ring-opacity));--tw-ring-opacity:.2}.easyMde:has(.form-invalid):has(.CodeMirror-focused):is(.dark *){--tw-ring-color:rgb(220 38 38 / var(--tw-ring-opacity));--tw-ring-opacity:.4}.easyMde>textarea{position:absolute;display:block!important;height:100%;width:100%;opacity:0}.easyMde .editor-toolbar{display:flex;flex-wrap:wrap;align-items:center;-moz-column-gap:1px;column-gap:1px;border-width:0px;border-bottom-width:1px;--tw-border-opacity:1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.easyMde .editor-toolbar:is(.dark *){border-color:rgb(var(--dark-300));background-color:rgb(var(--dark-800))}.easyMde .editor-toolbar button.active{border-color:transparent;background-color:rgb(var(--primary));--tw-text-opacity:1;color:rgb(255 255 255 / var(--tw-text-opacity))}.easyMde .editor-toolbar button.active:hover{border-color:transparent;--tw-bg-opacity:.75}.easyMde .editor-toolbar button.active:hover:is(.dark *){border-color:transparent}.easyMde .editor-toolbar button:hover{--tw-border-opacity:1;border-color:rgb(209 213 219 / var(--tw-border-opacity));background-color:transparent}.easyMde .editor-toolbar button:hover:is(.dark *){border-color:rgb(var(--dark-300))}.easyMde .editor-toolbar i.separator{--tw-border-opacity:1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.easyMde .editor-toolbar i.separator:is(.dark *){border-color:rgb(var(--dark-300))}.easyMde .editor-toolbar.fullscreen{border-radius:0;border-bottom-width:1px;border-style:solid;--tw-border-opacity:1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.easyMde .editor-toolbar.fullscreen:is(.dark *){border-color:rgb(var(--dark-300))}.easyMde .prose{max-width:100%;--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity));padding:1rem}.easyMde .prose:is(.dark *){background-color:rgb(var(--dark-800))}.easyMde .CodeMirror{border-style:none}.easyMde .CodeMirror:is(.dark *){background-color:rgb(var(--dark-800))}.easyMde .CodeMirror-line:is(.dark *){--tw-text-opacity:1;color:rgb(255 255 255 / var(--tw-text-opacity))}.easyMde .CodeMirror-cursor:is(.dark *){--tw-border-opacity:1;border-color:rgb(255 255 255 / var(--tw-border-opacity))}.easyMde .editor-preview-side:is(.dark *){border-color:rgb(var(--dark-300))}.dark .easyMde:has(.CodeMirror-focused){--tw-ring-color: rgba(var(--dark-100), .3)} diff --git a/public/easymde.js b/public/easymde.js new file mode 100644 index 0000000..150dfa5 --- /dev/null +++ b/public/easymde.js @@ -0,0 +1,96 @@ +var Qf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Jf(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function Vf(s){if(s.__esModule)return s;var g=s.default;if(typeof g=="function"){var c=function p(){return this instanceof p?Reflect.construct(g,arguments,this.constructor):g.apply(this,arguments)};c.prototype=g.prototype}else c={};return Object.defineProperty(c,"__esModule",{value:!0}),Object.keys(s).forEach(function(p){var v=Object.getOwnPropertyDescriptor(s,p);Object.defineProperty(c,p,v.get?v:{enumerable:!0,get:function(){return s[p]}})}),c}var Ns={exports:{}};(function(s,g){(function(c,p){s.exports=p()})(Qf,function(){var c=navigator.userAgent,p=navigator.platform,v=/gecko\/\d/i.test(c),C=/MSIE \d/.test(c),m=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(c),D=/Edge\/(\d+)/.exec(c),x=C||m||D,E=x&&(C?document.documentMode||6:+(D||m)[1]),z=!D&&/WebKit\//.test(c),U=z&&/Qt\/\d+\.\d+/.test(c),_=!D&&/Chrome\/(\d+)/.exec(c),X=_&&+_[1],Y=/Opera\//.test(c),oe=/Apple Computer/.test(navigator.vendor),J=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(c),$=/PhantomJS/.test(c),R=oe&&(/Mobile\/\w+/.test(c)||navigator.maxTouchPoints>2),H=/Android/.test(c),P=R||H||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(c),G=R||/Mac/.test(p),te=/\bCrOS\b/.test(c),Z=/win/i.test(p),ce=Y&&c.match(/Version\/(\d*\.\d*)/);ce&&(ce=Number(ce[1])),ce&&ce>=15&&(Y=!1,z=!0);var xe=G&&(U||Y&&(ce==null||ce<12.11)),Ke=v||x&&E>=9;function ne(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var Be=function(e,t){var r=e.className,n=ne(t).exec(r);if(n){var i=r.slice(n.index+n[0].length);e.className=r.slice(0,n.index)+(i?n[1]+i:"")}};function Oe(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function Ce(e,t){return Oe(e).appendChild(t)}function M(e,t,r,n){var i=document.createElement(e);if(r&&(i.className=r),n&&(i.style.cssText=n),typeof t=="string")i.appendChild(document.createTextNode(t));else if(t)for(var a=0;a=t)return o+(t-a);o+=l-a,o+=r-o%r,a=l+1}}var ut=function(){this.id=null,this.f=null,this.time=0,this.handler=et(this.onTimeout,this)};ut.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},ut.prototype.set=function(e,t){this.f=t;var r=+new Date+e;(!this.id||r=t)return n+Math.min(o,t-i);if(i+=a-n,i+=r-i%r,n=a+1,i>=t)return n}}var kt=[""];function Nt(e){for(;kt.length<=e;)kt.push(Re(kt)+" ");return kt[e]}function Re(e){return e[e.length-1]}function Mt(e,t){for(var r=[],n=0;n"€"&&(e.toUpperCase()!=e.toLowerCase()||I.test(e))}function d(e,t){return t?t.source.indexOf("\\w")>-1&&F(e)?!0:t.test(e):F(e)}function y(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var A=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function k(e){return e.charCodeAt(0)>=768&&A.test(e)}function T(e,t,r){for(;(r<0?t>0:tr?-1:1;;){if(t==r)return t;var i=(t+r)/2,a=n<0?Math.ceil(i):Math.floor(i);if(a==t)return e(a)?t:r;e(a)?r=a:t=a+n}}function de(e,t,r,n){if(!e)return n(t,r,"ltr",0);for(var i=!1,a=0;at||t==r&&o.to==t)&&(n(Math.max(o.from,t),Math.min(o.to,r),o.level==1?"rtl":"ltr",a),i=!0)}i||n(t,r,"ltr")}var ue=null;function ve(e,t,r){var n;ue=null;for(var i=0;it)return i;a.to==t&&(a.from!=a.to&&r=="before"?n=i:ue=i),a.from==t&&(a.from!=a.to&&r!="before"?n=i:ue=i)}return n??ue}var Ee=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function r(f){return f<=247?e.charAt(f):1424<=f&&f<=1524?"R":1536<=f&&f<=1785?t.charAt(f-1536):1774<=f&&f<=2220?"r":8192<=f&&f<=8203?"w":f==8204?"b":"L"}var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,a=/[LRr]/,o=/[Lb1n]/,l=/[1n]/;function u(f,b,w){this.level=f,this.from=b,this.to=w}return function(f,b){var w=b=="ltr"?"L":"R";if(f.length==0||b=="ltr"&&!n.test(f))return!1;for(var O=f.length,L=[],q=0;q-1&&(n[t]=i.slice(0,a).concat(i.slice(a+1)))}}}function Le(e,t){var r=qe(e,t);if(r.length)for(var n=Array.prototype.slice.call(arguments,2),i=0;i0}function Bt(e){e.prototype.on=function(t,r){W(this,t,r)},e.prototype.off=function(t,r){Ue(this,t,r)}}function Je(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Qt(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function en(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function qt(e){Je(e),Qt(e)}function wn(e){return e.target||e.srcElement}function un(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),G&&e.ctrlKey&&t==1&&(t=3),t}var Jt=function(){if(x&&E<9)return!1;var e=M("div");return"draggable"in e||"dragDrop"in e}(),kn;function ai(e){if(kn==null){var t=M("span","​");Ce(e,M("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(kn=t.offsetWidth<=1&&t.offsetHeight>2&&!(x&&E<8))}var r=kn?M("span","​"):M("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}var Jn;function oi(e){if(Jn!=null)return Jn;var t=Ce(e,document.createTextNode("AخA")),r=Q(t,0,1).getBoundingClientRect(),n=Q(t,1,2).getBoundingClientRect();return Oe(e),!r||r.left==r.right?!1:Jn=n.right-r.right<3}var Vn=` + +b`.split(/\n/).length!=3?function(e){for(var t=0,r=[],n=e.length;t<=n;){var i=e.indexOf(` +`,t);i==-1&&(i=e.length);var a=e.slice(t,e.charAt(i-1)=="\r"?i-1:i),o=a.indexOf("\r");o!=-1?(r.push(a.slice(0,o)),t+=o+1):(r.push(a),t=i+1)}return r}:function(e){return e.split(/\r\n?|\n/)},tn=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch{return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch{}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},li=function(){var e=M("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),er=null;function si(e){if(er!=null)return er;var t=Ce(e,M("span","x")),r=t.getBoundingClientRect(),n=Q(t,0,1).getBoundingClientRect();return er=Math.abs(r.left-n.left)>1}var tr={},Sn={};function ke(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),tr[e]=t}function B(e,t){Sn[e]=t}function ae(e){if(typeof e=="string"&&Sn.hasOwnProperty(e))e=Sn[e];else if(e&&typeof e.name=="string"&&Sn.hasOwnProperty(e.name)){var t=Sn[e.name];typeof t=="string"&&(t={name:t}),e=N(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return ae("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return ae("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function De(e,t){t=ae(t);var r=tr[t.name];if(!r)return De(e,"text/plain");var n=r(e,t);if(Ge.hasOwnProperty(t.name)){var i=Ge[t.name];for(var a in i)i.hasOwnProperty(a)&&(n.hasOwnProperty(a)&&(n["_"+a]=n[a]),n[a]=i[a])}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var o in t.modeProps)n[o]=t.modeProps[o];return n}var Ge={};function St(e,t){var r=Ge.hasOwnProperty(e)?Ge[e]:Ge[e]={};dt(t,r)}function it(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var i=t[n];i instanceof Array&&(i=i.concat([])),r[n]=i}return r}function At(e,t){for(var r;e.innerMode&&(r=e.innerMode(t),!(!r||r.mode==e));)t=r.state,e=r.mode;return r||{mode:e,state:t}}function Xt(e,t,r){return e.startState?e.startState(t,r):!0}var Ve=function(e,t,r){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r};Ve.prototype.eol=function(){return this.pos>=this.string.length},Ve.prototype.sol=function(){return this.pos==this.lineStart},Ve.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ve.prototype.next=function(){if(this.post},Ve.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Ve.prototype.skipToEnd=function(){this.pos=this.string.length},Ve.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Ve.prototype.backUp=function(e){this.pos-=e},Ve.prototype.column=function(){return this.lastColumnPos0?null:(a&&t!==!1&&(this.pos+=a[0].length),a)}},Ve.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ve.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Ve.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Ve.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function pe(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var r=e;!r.lines;)for(var n=0;;++n){var i=r.children[n],a=i.chunkSize();if(t=e.first&&tr?V(r,pe(e,r).text.length):Qs(t,pe(e,t.line).text.length)}function Qs(e,t){var r=e.ch;return r==null||r>t?V(e.line,t):r<0?V(e.line,0):e}function ko(e,t){for(var r=[],n=0;nthis.maxLookAhead&&(this.maxLookAhead=e),t},hn.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},hn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},hn.fromSaved=function(e,t,r){return t instanceof ci?new hn(e,it(e.mode,t.state),r,t.lookAhead):new hn(e,it(e.mode,t),r)},hn.prototype.save=function(e){var t=e!==!1?it(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ci(t,this.maxLookAhead):t};function So(e,t,r,n){var i=[e.state.modeGen],a={};Mo(e,t.text,e.doc.mode,r,function(f,b){return i.push(f,b)},a,n);for(var o=r.state,l=function(f){r.baseTokens=i;var b=e.state.overlays[f],w=1,O=0;r.state=!0,Mo(e,t.text,b.mode,r,function(L,q){for(var K=w;OL&&i.splice(w,1,L,i[w+1],re),w+=2,O=Math.min(L,re)}if(q)if(b.opaque)i.splice(K,w-K,L,"overlay "+q),w=K+2;else for(;Ke.options.maxHighlightLength&&it(e.doc.mode,n.state),a=So(e,t,n);i&&(n.state=i),t.stateAfter=n.save(!i),t.styles=a.styles,a.classes?t.styleClasses=a.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function Sr(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return new hn(n,!0,t);var a=Js(e,t,r),o=a>n.first&&pe(n,a-1).stateAfter,l=o?hn.fromSaved(n,o,a):new hn(n,Xt(n.mode),a);return n.iter(a,t,function(u){pa(e,u.text,l);var f=l.line;u.stateAfter=f==t-1||f%5==0||f>=i.viewFrom&&ft.start)return a}throw new Error("Mode "+e.name+" failed to advance stream.")}var To=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function Fo(e,t,r,n){var i=e.doc,a=i.mode,o;t=Ne(i,t);var l=pe(i,t.line),u=Sr(e,t.line,r),f=new Ve(l.text,e.options.tabSize,u),b;for(n&&(b=[]);(n||f.pose.options.maxHighlightLength?(l=!1,o&&pa(e,t,n,b.pos),b.pos=t.length,w=null):w=Lo(ga(r,b,n.state,O),a),O){var L=O[0].name;L&&(w="m-"+(w?L+" "+w:L))}if(!l||f!=w){for(;uo;--l){if(l<=a.first)return a.first;var u=pe(a,l-1),f=u.stateAfter;if(f&&(!r||l+(f instanceof ci?f.lookAhead:0)<=a.modeFrontier))return l;var b=$e(u.text,null,e.options.tabSize);(i==null||n>b)&&(i=l-1,n=b)}return i}function Vs(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontierr;n--){var i=pe(e,n).stateAfter;if(i&&(!(i instanceof ci)||n+i.lookAhead=t:a.to>t);(n||(n=[])).push(new hi(o,a.from,u?null:a.to))}}return n}function au(e,t,r){var n;if(e)for(var i=0;i=t:a.to>t);if(l||a.from==t&&o.type=="bookmark"&&(!r||a.marker.insertLeft)){var u=a.from==null||(o.inclusiveLeft?a.from<=t:a.from0&&l)for(var me=0;me0)){var b=[u,1],w=_e(f.from,l.from),O=_e(f.to,l.to);(w<0||!o.inclusiveLeft&&!w)&&b.push({from:f.from,to:l.from}),(O>0||!o.inclusiveRight&&!O)&&b.push({from:l.to,to:f.to}),i.splice.apply(i,b),u+=b.length-3}}return i}function _o(e){var t=e.markedSpans;if(t){for(var r=0;rt)&&(!n||ma(n,a.marker)<0)&&(n=a.marker)}return n}function Po(e,t,r,n,i){var a=pe(e,t),o=vn&&a.markedSpans;if(o)for(var l=0;l=0&&w<=0||b<=0&&w>=0)&&(b<=0&&(u.marker.inclusiveRight&&i.inclusiveLeft?_e(f.to,r)>=0:_e(f.to,r)>0)||b>=0&&(u.marker.inclusiveRight&&i.inclusiveLeft?_e(f.from,n)<=0:_e(f.from,n)<0)))return!0}}}function nn(e){for(var t;t=Ro(e);)e=t.find(-1,!0).line;return e}function su(e){for(var t;t=gi(e);)e=t.find(1,!0).line;return e}function uu(e){for(var t,r;t=gi(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function ya(e,t){var r=pe(e,t),n=nn(r);return r==n?t:Xe(n)}function Ho(e,t){if(t>e.lastLine())return t;var r=pe(e,t),n;if(!An(e,r))return t;for(;n=gi(r);)r=n.find(1,!0).line;return Xe(r)+1}function An(e,t){var r=vn&&t.markedSpans;if(r){for(var n=void 0,i=0;it.maxLineLength&&(t.maxLineLength=i,t.maxLine=n)})}var rr=function(e,t,r){this.text=e,No(this,t),this.height=r?r(this):1};rr.prototype.lineNo=function(){return Xe(this)},Bt(rr);function fu(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),_o(e),No(e,r);var i=n?n(e):1;i!=e.height&&cn(e,i)}function cu(e){e.parent=null,_o(e)}var hu={},du={};function zo(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?du:hu;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function Wo(e,t){var r=ee("span",null,null,z?"padding-right: .1px":null),n={pre:ee("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var a=i?t.rest[i-1]:t.line,o=void 0;n.pos=0,n.addToken=gu,oi(e.display.measure)&&(o=fe(a,e.doc.direction))&&(n.addToken=mu(n.addToken,o)),n.map=[];var l=t!=e.display.externalMeasured&&Xe(a);yu(a,n,Ao(e,a,l)),a.styleClasses&&(a.styleClasses.bgClass&&(n.bgClass=Ze(a.styleClasses.bgClass,n.bgClass||"")),a.styleClasses.textClass&&(n.textClass=Ze(a.styleClasses.textClass,n.textClass||""))),n.map.length==0&&n.map.push(0,0,n.content.appendChild(ai(e.display.measure))),i==0?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(z){var u=n.content.lastChild;(/\bcm-tab\b/.test(u.className)||u.querySelector&&u.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return Le(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=Ze(n.pre.className,n.textClass||"")),n}function pu(e){var t=M("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function gu(e,t,r,n,i,a,o){if(t){var l=e.splitSpaces?vu(t,e.trailingSpace):t,u=e.cm.state.specialChars,f=!1,b;if(!u.test(t))e.col+=t.length,b=document.createTextNode(l),e.map.push(e.pos,e.pos+t.length,b),x&&E<9&&(f=!0),e.pos+=t.length;else{b=document.createDocumentFragment();for(var w=0;;){u.lastIndex=w;var O=u.exec(t),L=O?O.index-w:t.length-w;if(L){var q=document.createTextNode(l.slice(w,w+L));x&&E<9?b.appendChild(M("span",[q])):b.appendChild(q),e.map.push(e.pos,e.pos+L,q),e.col+=L,e.pos+=L}if(!O)break;w+=L+1;var K=void 0;if(O[0]==" "){var re=e.cm.options.tabSize,le=re-e.col%re;K=b.appendChild(M("span",Nt(le),"cm-tab")),K.setAttribute("role","presentation"),K.setAttribute("cm-text"," "),e.col+=le}else O[0]=="\r"||O[0]==` +`?(K=b.appendChild(M("span",O[0]=="\r"?"␍":"␤","cm-invalidchar")),K.setAttribute("cm-text",O[0]),e.col+=1):(K=e.cm.options.specialCharPlaceholder(O[0]),K.setAttribute("cm-text",O[0]),x&&E<9?b.appendChild(M("span",[K])):b.appendChild(K),e.col+=1);e.map.push(e.pos,e.pos+1,K),e.pos++}}if(e.trailingSpace=l.charCodeAt(t.length-1)==32,r||n||i||f||a||o){var he=r||"";n&&(he+=n),i&&(he+=i);var se=M("span",[b],he,a);if(o)for(var me in o)o.hasOwnProperty(me)&&me!="style"&&me!="class"&&se.setAttribute(me,o[me]);return e.content.appendChild(se)}e.content.appendChild(b)}}function vu(e,t){if(e.length>1&&!/ /.test(e))return e;for(var r=t,n="",i=0;if&&w.from<=f));O++);if(w.to>=b)return e(r,n,i,a,o,l,u);e(r,n.slice(0,w.to-f),i,a,null,l,u),a=null,n=n.slice(w.to-f),f=w.to}}}function Uo(e,t,r,n){var i=!n&&r.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!n&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",r.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function yu(e,t,r){var n=e.markedSpans,i=e.text,a=0;if(!n){for(var o=1;ou||Ie.collapsed&&we.to==u&&we.from==u)){if(we.to!=null&&we.to!=u&&L>we.to&&(L=we.to,K=""),Ie.className&&(q+=" "+Ie.className),Ie.css&&(O=(O?O+";":"")+Ie.css),Ie.startStyle&&we.from==u&&(re+=" "+Ie.startStyle),Ie.endStyle&&we.to==L&&(me||(me=[])).push(Ie.endStyle,we.to),Ie.title&&((he||(he={})).title=Ie.title),Ie.attributes)for(var Qe in Ie.attributes)(he||(he={}))[Qe]=Ie.attributes[Qe];Ie.collapsed&&(!le||ma(le.marker,Ie)<0)&&(le=we)}else we.from>u&&L>we.from&&(L=we.from)}if(me)for(var Ct=0;Ct=l)break;for(var jt=Math.min(l,L);;){if(b){var Pt=u+b.length;if(!le){var gt=Pt>jt?b.slice(0,jt-u):b;t.addToken(t,gt,w?w+q:q,re,u+gt.length==L?K:"",O,he)}if(Pt>=jt){b=b.slice(jt-u),u=jt;break}u=Pt,re=""}b=i.slice(a,a=r[f++]),w=zo(r[f++],t.cm.options)}}}function qo(e,t,r){this.line=t,this.rest=uu(t),this.size=this.rest?Xe(Re(this.rest))-r+1:1,this.node=this.text=null,this.hidden=An(e,t)}function mi(e,t,r){for(var n=[],i,a=t;a2&&a.push((u.bottom+f.top)/2-r.top)}}a.push(r.bottom-r.top)}}function $o(e,t,r){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};if(e.rest){for(var n=0;nr)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}}function Fu(e,t){t=nn(t);var r=Xe(t),n=e.display.externalMeasured=new qo(e.doc,t,r);n.lineN=r;var i=n.built=Wo(e,n);return n.text=i.pre,Ce(e.display.lineMeasure,i.pre),n}function Qo(e,t,r,n){return pn(e,ar(e,t),r,n)}function ka(e,t){if(t>=e.display.viewFrom&&t=r.lineN&&tt)&&(a=u-l,i=a-1,t>=u&&(o="right")),i!=null){if(n=e[f+2],l==u&&r==(n.insertLeft?"left":"right")&&(o=r),r=="left"&&i==0)for(;f&&e[f-2]==e[f-3]&&e[f-1].insertLeft;)n=e[(f-=3)+2],o="left";if(r=="right"&&i==u-l)for(;f=0&&(r=e[i]).left==r.right;i--);return r}function Mu(e,t,r,n){var i=Vo(t.map,r,n),a=i.node,o=i.start,l=i.end,u=i.collapse,f;if(a.nodeType==3){for(var b=0;b<4;b++){for(;o&&k(t.line.text.charAt(i.coverStart+o));)--o;for(;i.coverStart+l0&&(u=n="right");var w;e.options.lineWrapping&&(w=a.getClientRects()).length>1?f=w[n=="right"?w.length-1:0]:f=a.getBoundingClientRect()}if(x&&E<9&&!o&&(!f||!f.left&&!f.right)){var O=a.parentNode.getClientRects()[0];O?f={left:O.left,right:O.left+lr(e.display),top:O.top,bottom:O.bottom}:f=Jo}for(var L=f.top-t.rect.top,q=f.bottom-t.rect.top,K=(L+q)/2,re=t.view.measure.heights,le=0;le=n.text.length?(u=n.text.length,f="before"):u<=0&&(u=0,f="after"),!l)return o(f=="before"?u-1:u,f=="before");function b(q,K,re){var le=l[K],he=le.level==1;return o(re?q-1:q,he!=re)}var w=ve(l,u,f),O=ue,L=b(u,w,f=="before");return O!=null&&(L.other=b(u,O,f!="before")),L}function al(e,t){var r=0;t=Ne(e.doc,t),e.options.lineWrapping||(r=lr(e.display)*t.ch);var n=pe(e.doc,t.line),i=mn(n)+yi(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function Aa(e,t,r,n,i){var a=V(e,t,r);return a.xRel=i,n&&(a.outside=n),a}function Ea(e,t,r){var n=e.doc;if(r+=e.display.viewOffset,r<0)return Aa(n.first,0,null,-1,-1);var i=Rn(n,r),a=n.first+n.size-1;if(i>a)return Aa(n.first+n.size-1,pe(n,a).text.length,null,1,1);t<0&&(t=0);for(var o=pe(n,i);;){var l=Ou(e,o,i,t,r),u=lu(o,l.ch+(l.xRel>0||l.outside>0?1:0));if(!u)return l;var f=u.find(1);if(f.line==i)return f;o=pe(n,i=f.line)}}function ol(e,t,r,n){n-=Sa(t);var i=t.text.length,a=ie(function(o){return pn(e,r,o-1).bottom<=n},i,0);return i=ie(function(o){return pn(e,r,o).top>n},a,i),{begin:a,end:i}}function ll(e,t,r,n){r||(r=ar(e,t));var i=xi(e,t,pn(e,r,n),"line").top;return ol(e,t,r,i)}function Ta(e,t,r,n){return e.bottom<=r?!1:e.top>r?!0:(n?e.left:e.right)>t}function Ou(e,t,r,n,i){i-=mn(t);var a=ar(e,t),o=Sa(t),l=0,u=t.text.length,f=!0,b=fe(t,e.doc.direction);if(b){var w=(e.options.lineWrapping?Nu:_u)(e,t,r,a,b,n,i);f=w.level!=1,l=f?w.from:w.to-1,u=f?w.to:w.from-1}var O=null,L=null,q=ie(function(Se){var we=pn(e,a,Se);return we.top+=o,we.bottom+=o,Ta(we,n,i,!1)?(we.top<=i&&we.left<=n&&(O=Se,L=we),!0):!1},l,u),K,re,le=!1;if(L){var he=n-L.left=me.bottom?1:0}return q=T(t.text,q,1),Aa(r,q,re,le,n-K)}function _u(e,t,r,n,i,a,o){var l=ie(function(w){var O=i[w],L=O.level!=1;return Ta(rn(e,V(r,L?O.to:O.from,L?"before":"after"),"line",t,n),a,o,!0)},0,i.length-1),u=i[l];if(l>0){var f=u.level!=1,b=rn(e,V(r,f?u.from:u.to,f?"after":"before"),"line",t,n);Ta(b,a,o,!0)&&b.top>o&&(u=i[l-1])}return u}function Nu(e,t,r,n,i,a,o){var l=ol(e,t,n,o),u=l.begin,f=l.end;/\s/.test(t.text.charAt(f-1))&&f--;for(var b=null,w=null,O=0;O=f||L.to<=u)){var q=L.level!=1,K=pn(e,n,q?Math.min(f,L.to)-1:Math.max(u,L.from)).right,re=Kre)&&(b=L,w=re)}}return b||(b=i[i.length-1]),b.fromf&&(b={from:b.from,to:f,level:b.level}),b}var Hn;function or(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(Hn==null){Hn=M("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Hn.appendChild(document.createTextNode("x")),Hn.appendChild(M("br"));Hn.appendChild(document.createTextNode("x"))}Ce(e.measure,Hn);var r=Hn.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),Oe(e.measure),r||1}function lr(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=M("span","xxxxxxxxxx"),r=M("pre",[t],"CodeMirror-line-like");Ce(e.measure,r);var n=t.getBoundingClientRect(),i=(n.right-n.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function Fa(e){for(var t=e.display,r={},n={},i=t.gutters.clientLeft,a=t.gutters.firstChild,o=0;a;a=a.nextSibling,++o){var l=e.display.gutterSpecs[o].className;r[l]=a.offsetLeft+a.clientLeft+i,n[l]=a.clientWidth}return{fixedPos:La(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function La(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function sl(e){var t=or(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/lr(e.display)-3);return function(i){if(An(e.doc,i))return 0;var a=0;if(i.widgets)for(var o=0;o0&&(f=pe(e.doc,u.line).text).length==u.ch){var b=$e(f,f.length,e.options.tabSize)-f.length;u=V(u.line,Math.max(0,Math.round((a-Zo(e.display).left)/lr(e.display))-b))}return u}function Wn(e,t){if(t>=e.display.viewTo||(t-=e.display.viewFrom,t<0))return null;for(var r=e.display.view,n=0;nt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)vn&&ya(e.doc,t)i.viewFrom?Tn(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)Tn(e);else if(t<=i.viewFrom){var a=bi(e,r,r+n,1);a?(i.view=i.view.slice(a.index),i.viewFrom=a.lineN,i.viewTo+=n):Tn(e)}else if(r>=i.viewTo){var o=bi(e,t,t,-1);o?(i.view=i.view.slice(0,o.index),i.viewTo=o.lineN):Tn(e)}else{var l=bi(e,t,t,-1),u=bi(e,r,r+n,1);l&&u?(i.view=i.view.slice(0,l.index).concat(mi(e,l.lineN,u.lineN)).concat(i.view.slice(u.index)),i.viewTo+=n):Tn(e)}var f=i.externalMeasured;f&&(r=i.lineN&&t=n.viewTo)){var a=n.view[Wn(e,t)];if(a.node!=null){var o=a.changes||(a.changes=[]);We(o,r)==-1&&o.push(r)}}}function Tn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function bi(e,t,r,n){var i=Wn(e,t),a,o=e.display.view;if(!vn||r==e.doc.first+e.doc.size)return{index:i,lineN:r};for(var l=e.display.viewFrom,u=0;u0){if(i==o.length-1)return null;a=l+o[i].size-t,i++}else a=l-t;t+=a,r+=a}for(;ya(e.doc,r)!=r;){if(i==(n<0?0:o.length-1))return null;r+=n*o[i-(n<0?1:0)].size,i+=n}return{index:i,lineN:r}}function Iu(e,t,r){var n=e.display,i=n.view;i.length==0||t>=n.viewTo||r<=n.viewFrom?(n.view=mi(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=mi(e,t,n.viewFrom).concat(n.view):n.viewFromr&&(n.view=n.view.slice(0,Wn(e,r)))),n.viewTo=r}function ul(e){for(var t=e.display.view,r=0,n=0;n=e.display.viewTo||u.to().line0?o:e.defaultCharWidth())+"px"}if(n.other){var l=r.appendChild(M("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));l.style.display="",l.style.left=n.other.left+"px",l.style.top=n.other.top+"px",l.style.height=(n.other.bottom-n.other.top)*.85+"px"}}function Ci(e,t){return e.top-t.top||e.left-t.left}function Ru(e,t,r){var n=e.display,i=e.doc,a=document.createDocumentFragment(),o=Zo(e.display),l=o.left,u=Math.max(n.sizerWidth,Pn(e)-n.sizer.offsetLeft)-o.right,f=i.direction=="ltr";function b(se,me,Se,we){me<0&&(me=0),me=Math.round(me),we=Math.round(we),a.appendChild(M("div",null,"CodeMirror-selected","position: absolute; left: "+se+`px; + top: `+me+"px; width: "+(Se??u-se)+`px; + height: `+(we-me)+"px"))}function w(se,me,Se){var we=pe(i,se),Ie=we.text.length,Qe,Ct;function st(gt,Ht){return Di(e,V(se,gt),"div",we,Ht)}function jt(gt,Ht,Et){var mt=ll(e,we,null,gt),vt=Ht=="ltr"==(Et=="after")?"left":"right",ft=Et=="after"?mt.begin:mt.end-(/\s/.test(we.text.charAt(mt.end-1))?2:1);return st(ft,vt)[vt]}var Pt=fe(we,i.direction);return de(Pt,me||0,Se??Ie,function(gt,Ht,Et,mt){var vt=Et=="ltr",ft=st(gt,vt?"left":"right"),zt=st(Ht-1,vt?"right":"left"),Dr=me==null&>==0,_n=Se==null&&Ht==Ie,Ft=mt==0,gn=!Pt||mt==Pt.length-1;if(zt.top-ft.top<=3){var wt=(f?Dr:_n)&&Ft,ao=(f?_n:Dr)&&gn,bn=wt?l:(vt?ft:zt).left,Xn=ao?u:(vt?zt:ft).right;b(bn,ft.top,Xn-bn,ft.bottom)}else{var Yn,_t,br,oo;vt?(Yn=f&&Dr&&Ft?l:ft.left,_t=f?u:jt(gt,Et,"before"),br=f?l:jt(Ht,Et,"after"),oo=f&&_n&&gn?u:zt.right):(Yn=f?jt(gt,Et,"before"):l,_t=!f&&Dr&&Ft?u:ft.right,br=!f&&_n&&gn?l:zt.left,oo=f?jt(Ht,Et,"after"):u),b(Yn,ft.top,_t-Yn,ft.bottom),ft.bottom0?t.blinker=setInterval(function(){e.hasFocus()||sr(e),t.cursorDiv.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function cl(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||Na(e))}function _a(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&sr(e))},100)}function Na(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),e.options.readOnly!="nocursor"&&(e.state.focused||(Le(e,"focus",e,t),e.state.focused=!0,lt(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),z&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Oa(e))}function sr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(Le(e,"blur",e,t),e.state.focused=!1,Be(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function wi(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=Math.max(0,t.scroller.getBoundingClientRect().top),i=t.lineDiv.getBoundingClientRect().top,a=0,o=0;o.005||L<-.005)&&(ie.display.sizerWidth){var K=Math.ceil(b/lr(e.display));K>e.display.maxLineLength&&(e.display.maxLineLength=K,e.display.maxLine=l.line,e.display.maxLineChanged=!0)}}}Math.abs(a)>2&&(t.scroller.scrollTop+=a)}function hl(e){if(e.widgets)for(var t=0;t=o&&(a=Rn(t,mn(pe(t,u))-e.wrapper.clientHeight),o=u)}return{from:a,to:Math.max(o,a+1)}}function Pu(e,t){if(!Me(e,"scrollCursorIntoView")){var r=e.display,n=r.sizer.getBoundingClientRect(),i=null,a=r.wrapper.ownerDocument;if(t.top+n.top<0?i=!0:t.bottom+n.top>(a.defaultView.innerHeight||a.documentElement.clientHeight)&&(i=!1),i!=null&&!$){var o=M("div","​",null,`position: absolute; + top: `+(t.top-r.viewOffset-yi(e.display))+`px; + height: `+(t.bottom-t.top+dn(e)+r.barHeight)+`px; + left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}function Hu(e,t,r,n){n==null&&(n=0);var i;!e.options.lineWrapping&&t==r&&(r=t.sticky=="before"?V(t.line,t.ch+1,"before"):t,t=t.ch?V(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t);for(var a=0;a<5;a++){var o=!1,l=rn(e,t),u=!r||r==t?l:rn(e,r);i={left:Math.min(l.left,u.left),top:Math.min(l.top,u.top)-n,right:Math.max(l.left,u.left),bottom:Math.max(l.bottom,u.bottom)+n};var f=Ia(e,i),b=e.doc.scrollTop,w=e.doc.scrollLeft;if(f.scrollTop!=null&&(Or(e,f.scrollTop),Math.abs(e.doc.scrollTop-b)>1&&(o=!0)),f.scrollLeft!=null&&(Un(e,f.scrollLeft),Math.abs(e.doc.scrollLeft-w)>1&&(o=!0)),!o)break}return i}function zu(e,t){var r=Ia(e,t);r.scrollTop!=null&&Or(e,r.scrollTop),r.scrollLeft!=null&&Un(e,r.scrollLeft)}function Ia(e,t){var r=e.display,n=or(e.display);t.top<0&&(t.top=0);var i=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:r.scroller.scrollTop,a=wa(e),o={};t.bottom-t.top>a&&(t.bottom=t.top+a);var l=e.doc.height+Ca(r),u=t.topl-n;if(t.topi+a){var b=Math.min(t.top,(f?l:t.bottom)-a);b!=i&&(o.scrollTop=b)}var w=e.options.fixedGutter?0:r.gutters.offsetWidth,O=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:r.scroller.scrollLeft-w,L=Pn(e)-r.gutters.offsetWidth,q=t.right-t.left>L;return q&&(t.right=t.left+L),t.left<10?o.scrollLeft=0:t.leftL+O-3&&(o.scrollLeft=t.right+(q?0:10)-L),o}function Ra(e,t){t!=null&&(Si(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t)}function ur(e){Si(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Br(e,t,r){(t!=null||r!=null)&&Si(e),t!=null&&(e.curOp.scrollLeft=t),r!=null&&(e.curOp.scrollTop=r)}function Wu(e,t){Si(e),e.curOp.scrollToPos=t}function Si(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var r=al(e,t.from),n=al(e,t.to);dl(e,r,n,t.margin)}}function dl(e,t,r,n){var i=Ia(e,{left:Math.min(t.left,r.left),top:Math.min(t.top,r.top)-n,right:Math.max(t.right,r.right),bottom:Math.max(t.bottom,r.bottom)+n});Br(e,i.scrollLeft,i.scrollTop)}function Or(e,t){Math.abs(e.doc.scrollTop-t)<2||(v||Ha(e,{top:t}),pl(e,t,!0),v&&Ha(e),Ir(e,100))}function pl(e,t,r){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),!(e.display.scroller.scrollTop==t&&!r)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Un(e,t,r,n){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),!((r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n)&&(e.doc.scrollLeft=t,xl(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function _r(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+Ca(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?r:0,docHeight:n,scrollHeight:n+dn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var qn=function(e,t,r){this.cm=r;var n=this.vert=M("div",[M("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=M("div",[M("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=i.tabIndex=-1,e(n),e(i),W(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),W(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,x&&E<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};qn.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var i=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var a=e.viewWidth-e.barLeft-(r?n:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+a)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(n==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},qn.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},qn.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},qn.prototype.zeroWidthHack=function(){var e=G&&!J?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new ut,this.disableVert=new ut},qn.prototype.enableZeroWidthBar=function(e,t,r){e.style.visibility="";function n(){var i=e.getBoundingClientRect(),a=r=="vert"?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1);a!=e?e.style.visibility="hidden":t.set(1e3,n)}t.set(1e3,n)},qn.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Nr=function(){};Nr.prototype.update=function(){return{bottom:0,right:0}},Nr.prototype.setScrollLeft=function(){},Nr.prototype.setScrollTop=function(){},Nr.prototype.clear=function(){};function fr(e,t){t||(t=_r(e));var r=e.display.barWidth,n=e.display.barHeight;gl(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&wi(e),gl(e,_r(e)),r=e.display.barWidth,n=e.display.barHeight}function gl(e,t){var r=e.display,n=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}var vl={native:qn,null:Nr};function ml(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&Be(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new vl[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),W(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,r){r=="horizontal"?Un(e,t):Or(e,t)},e),e.display.scrollbars.addClass&<(e.display.wrapper,e.display.scrollbars.addClass)}var Uu=0;function Gn(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Uu,markArrays:null},xu(e.curOp)}function jn(e){var t=e.curOp;t&&bu(t,function(r){for(var n=0;n=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Ai(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function ju(e){e.updatedDisplay=e.mustUpdate&&Pa(e.cm,e.update)}function Xu(e){var t=e.cm,r=t.display;e.updatedDisplay&&wi(t),e.barMeasure=_r(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Qo(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+dn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-Pn(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function Yu(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft=e.display.viewTo)){var r=+new Date+e.options.workTime,n=Sr(e,t.highlightFrontier),i=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),function(a){if(n.line>=e.display.viewFrom){var o=a.styles,l=a.text.length>e.options.maxHighlightLength?it(t.mode,n.state):null,u=So(e,a,n,!0);l&&(n.state=l),a.styles=u.styles;var f=a.styleClasses,b=u.classes;b?a.styleClasses=b:f&&(a.styleClasses=null);for(var w=!o||o.length!=a.styles.length||f!=b&&(!f||!b||f.bgClass!=b.bgClass||f.textClass!=b.textClass),O=0;!w&&Or)return Ir(e,e.options.workDelay),!0}),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),i.length&&Gt(e,function(){for(var a=0;a=r.viewFrom&&t.visible.to<=r.viewTo&&(r.updateLineNumbers==null||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&ul(e)==0)return!1;Dl(e)&&(Tn(e),t.dims=Fa(e));var i=n.first+n.size,a=Math.max(t.visible.from-e.options.viewportMargin,n.first),o=Math.min(i,t.visible.to+e.options.viewportMargin);r.viewFromo&&r.viewTo-o<20&&(o=Math.min(i,r.viewTo)),vn&&(a=ya(e.doc,a),o=Ho(e.doc,o));var l=a!=r.viewFrom||o!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;Iu(e,a,o),r.viewOffset=mn(pe(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var u=ul(e);if(!l&&u==0&&!t.force&&r.renderedView==r.view&&(r.updateLineNumbers==null||r.updateLineNumbers>=r.viewTo))return!1;var f=Qu(e);return u>4&&(r.lineDiv.style.display="none"),Vu(e,r.updateLineNumbers,t.dims),u>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,Ju(f),Oe(r.cursorDiv),Oe(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,l&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,Ir(e,400)),r.updateLineNumbers=null,!0}function yl(e,t){for(var r=t.viewport,n=!0;;n=!1){if(!n||!e.options.lineWrapping||t.oldDisplayWidth==Pn(e)){if(r&&r.top!=null&&(r={top:Math.min(e.doc.height+Ca(e.display)-wa(e),r.top)}),t.visible=ki(e.display,e.doc,r),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else n&&(t.visible=ki(e.display,e.doc,r));if(!Pa(e,t))break;wi(e);var i=_r(e);Mr(e),fr(e,i),Wa(e,i),t.force=!1}t.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Ha(e,t){var r=new Ai(e,t);if(Pa(e,r)){wi(e),yl(e,r);var n=_r(e);Mr(e),fr(e,n),Wa(e,n),r.finish()}}function Vu(e,t,r){var n=e.display,i=e.options.lineNumbers,a=n.lineDiv,o=a.firstChild;function l(q){var K=q.nextSibling;return z&&G&&e.display.currentWheelTarget==q?q.style.display="none":q.parentNode.removeChild(q),K}for(var u=n.view,f=n.viewFrom,b=0;b-1&&(L=!1),Go(e,w,f,r)),L&&(Oe(w.lineNumber),w.lineNumber.appendChild(document.createTextNode(ca(e.options,f)))),o=w.node.nextSibling}f+=w.size}for(;o;)o=l(o)}function za(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",xt(e,"gutterChanged",e)}function Wa(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+dn(e)+"px"}function xl(e){var t=e.display,r=t.view;if(!(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))){for(var n=La(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,a=n+"px",o=0;o=105&&(i.wrapper.style.clipPath="inset(0px)"),i.wrapper.setAttribute("translate","no"),x&&E<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),!z&&!(v&&P)&&(i.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(i.wrapper):e(i.wrapper)),i.viewFrom=i.viewTo=t.first,i.reportedViewFrom=i.reportedViewTo=t.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,i.gutterSpecs=Ua(n.gutters,n.lineNumbers),bl(i),r.init(i)}var Ei=0,xn=null;x?xn=-.53:v?xn=15:_?xn=-.7:oe&&(xn=-1/3);function Cl(e){var t=e.wheelDeltaX,r=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),r==null&&e.detail&&e.axis==e.VERTICAL_AXIS?r=e.detail:r==null&&(r=e.wheelDelta),{x:t,y:r}}function tf(e){var t=Cl(e);return t.x*=xn,t.y*=xn,t}function wl(e,t){_&&X==102&&(e.display.chromeScrollHack==null?e.display.sizer.style.pointerEvents="none":clearTimeout(e.display.chromeScrollHack),e.display.chromeScrollHack=setTimeout(function(){e.display.chromeScrollHack=null,e.display.sizer.style.pointerEvents=""},100));var r=Cl(t),n=r.x,i=r.y,a=xn;t.deltaMode===0&&(n=t.deltaX,i=t.deltaY,a=1);var o=e.display,l=o.scroller,u=l.scrollWidth>l.clientWidth,f=l.scrollHeight>l.clientHeight;if(n&&u||i&&f){if(i&&G&&z){e:for(var b=t.target,w=o.view;b!=l;b=b.parentNode)for(var O=0;O=0&&_e(e,n.to())<=0)return r}return-1};var je=function(e,t){this.anchor=e,this.head=t};je.prototype.from=function(){return fi(this.anchor,this.head)},je.prototype.to=function(){return ui(this.anchor,this.head)},je.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function an(e,t,r){var n=e&&e.options.selectionsMayTouch,i=t[r];t.sort(function(O,L){return _e(O.from(),L.from())}),r=We(t,i);for(var a=1;a0:u>=0){var f=fi(l.from(),o.from()),b=ui(l.to(),o.to()),w=l.empty()?o.from()==o.head:l.from()==l.head;a<=r&&--r,t.splice(--a,2,new je(w?b:f,w?f:b))}}return new Yt(t,r)}function Fn(e,t){return new Yt([new je(e,t||e)],0)}function Ln(e){return e.text?V(e.from.line+e.text.length-1,Re(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function kl(e,t){if(_e(e,t.from)<0)return e;if(_e(e,t.to)<=0)return Ln(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=Ln(t).ch-t.to.ch),V(r,n)}function qa(e,t){for(var r=[],n=0;n1&&e.remove(l.line+1,q-1),e.insert(l.line+1,le)}xt(e,"change",e,t)}function Mn(e,t,r){function n(i,a,o){if(i.linked)for(var l=0;l1&&!e.done[e.done.length-2].ranges)return e.done.pop(),Re(e.done)}function Ll(e,t,r,n){var i=e.history;i.undone.length=0;var a=+new Date,o,l;if((i.lastOp==n||i.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&i.lastModTime>a-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(o=af(i,i.lastOp==n)))l=Re(o.changes),_e(t.from,t.to)==0&&_e(t.from,l.to)==0?l.to=Ln(t):o.changes.push(Xa(e,t));else{var u=Re(i.done);for((!u||!u.ranges)&&Fi(e.sel,i.done),o={changes:[Xa(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(r),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=a,i.lastOp=i.lastSelOp=n,i.lastOrigin=i.lastSelOrigin=t.origin,l||Le(e,"historyAdded")}function of(e,t,r,n){var i=t.charAt(0);return i=="*"||i=="+"&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function lf(e,t,r,n){var i=e.history,a=n&&n.origin;r==i.lastSelOp||a&&i.lastSelOrigin==a&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==a||of(e,a,Re(i.done),t))?i.done[i.done.length-1]=t:Fi(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=a,i.lastSelOp=r,n&&n.clearRedo!==!1&&Fl(i.undone)}function Fi(e,t){var r=Re(t);r&&r.ranges&&r.equals(e)||t.push(e)}function Ml(e,t,r,n){var i=t["spans_"+e.id],a=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),function(o){o.markedSpans&&((i||(i=t["spans_"+e.id]={}))[a]=o.markedSpans),++a})}function sf(e){if(!e)return null;for(var t,r=0;r-1&&(Re(l)[w]=f[w],delete f[w])}}return n}function Ya(e,t,r,n){if(n){var i=e.anchor;if(r){var a=_e(t,i)<0;a!=_e(r,i)<0?(i=t,t=r):a!=_e(t,r)<0&&(t=r)}return new je(i,t)}else return new je(r||t,t)}function Li(e,t,r,n,i){i==null&&(i=e.cm&&(e.cm.display.shift||e.extend)),Tt(e,new Yt([Ya(e.sel.primary(),t,r,i)],0),n)}function Ol(e,t,r){for(var n=[],i=e.cm&&(e.cm.display.shift||e.extend),a=0;a=t.ch:l.to>t.ch))){if(i&&(Le(u,"beforeCursorEnter"),u.explicitlyCleared))if(a.markedSpans){--o;continue}else break;if(!u.atomic)continue;if(r){var w=u.find(n<0?1:-1),O=void 0;if((n<0?b:f)&&(w=Hl(e,w,-n,w&&w.line==t.line?a:null)),w&&w.line==t.line&&(O=_e(w,r))&&(n<0?O<0:O>0))return hr(e,w,t,n,i)}var L=u.find(n<0?-1:1);return(n<0?f:b)&&(L=Hl(e,L,n,L.line==t.line?a:null)),L?hr(e,L,t,n,i):null}}return t}function Bi(e,t,r,n,i){var a=n||1,o=hr(e,t,r,a,i)||!i&&hr(e,t,r,a,!0)||hr(e,t,r,-a,i)||!i&&hr(e,t,r,-a,!0);return o||(e.cantEdit=!0,V(e.first,0))}function Hl(e,t,r,n){return r<0&&t.ch==0?t.line>e.first?Ne(e,V(t.line-1)):null:r>0&&t.ch==(n||pe(e,t.line)).text.length?t.line=0;--i)Ul(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text,origin:t.origin});else Ul(e,t)}}function Ul(e,t){if(!(t.text.length==1&&t.text[0]==""&&_e(t.from,t.to)==0)){var r=qa(e,t);Ll(e,t,r,e.cm?e.cm.curOp.id:NaN),Hr(e,t,r,va(e,t));var n=[];Mn(e,function(i,a){!a&&We(n,i.history)==-1&&(Xl(i.history,t),n.push(i.history)),Hr(i,t,null,va(i,t))})}}function Oi(e,t,r){var n=e.cm&&e.cm.state.suppressEdits;if(!(n&&!r)){for(var i=e.history,a,o=e.sel,l=t=="undo"?i.done:i.undone,u=t=="undo"?i.undone:i.done,f=0;f=0;--L){var q=O(L);if(q)return q.v}}}}function ql(e,t){if(t!=0&&(e.first+=t,e.sel=new Yt(Mt(e.sel.ranges,function(i){return new je(V(i.anchor.line+t,i.anchor.ch),V(i.head.line+t,i.head.ch))}),e.sel.primIndex),e.cm)){It(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;ne.lastLine())){if(t.from.linea&&(t={from:t.from,to:V(a,pe(e,a).text.length),text:[t.text[0]],origin:t.origin}),t.removed=fn(e,t.from,t.to),r||(r=qa(e,t)),e.cm?cf(e.cm,t,n):ja(e,t,n),Mi(e,r,nt),e.cantEdit&&Bi(e,V(e.firstLine(),0))&&(e.cantEdit=!1)}}function cf(e,t,r){var n=e.doc,i=e.display,a=t.from,o=t.to,l=!1,u=a.line;e.options.lineWrapping||(u=Xe(nn(pe(n,a.line))),n.iter(u,o.line+1,function(L){if(L==i.maxLine)return l=!0,!0})),n.sel.contains(t.from,t.to)>-1&&ct(e),ja(n,t,r,sl(e)),e.options.lineWrapping||(n.iter(u,a.line+t.text.length,function(L){var q=vi(L);q>i.maxLineLength&&(i.maxLine=L,i.maxLineLength=q,i.maxLineChanged=!0,l=!1)}),l&&(e.curOp.updateMaxLine=!0)),Vs(n,a.line),Ir(e,400);var f=t.text.length-(o.line-a.line)-1;t.full?It(e):a.line==o.line&&t.text.length==1&&!Al(e.doc,t)?En(e,a.line,"text"):It(e,a.line,o.line+1,f);var b=pt(e,"changes"),w=pt(e,"change");if(w||b){var O={from:a,to:o,text:t.text,removed:t.removed,origin:t.origin};w&&xt(e,"change",e,O),b&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(O)}e.display.selForContextMenu=null}function pr(e,t,r,n,i){var a;n||(n=r),_e(n,r)<0&&(a=[n,r],r=a[0],n=a[1]),typeof t=="string"&&(t=e.splitLines(t)),dr(e,{from:r,to:n,text:t,origin:i})}function Gl(e,t,r,n){r1||!(this.children[0]instanceof Wr))){var l=[];this.collapse(l),this.children=[new Wr(l)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var o=i.lines.length%25+25,l=o;l10);e.parent.maybeSpill()}},iterN:function(e,t,r){for(var n=0;ne.display.maxLineLength&&(e.display.maxLine=f,e.display.maxLineLength=b,e.display.maxLineChanged=!0)}n!=null&&e&&this.collapsed&&It(e,n,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Rl(e.doc)),e&&xt(e,"markerCleared",e,this,n,i),t&&jn(e),this.parent&&this.parent.clear()}},Bn.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var r,n,i=0;i0||o==0&&a.clearWhenEmpty!==!1)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=ee("span",[a.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(Po(e,t.line,t,r,a)||t.line!=r.line&&Po(e,r.line,t,r,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");tu()}a.addToHistory&&Ll(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var l=t.line,u=e.cm,f;if(e.iter(l,r.line+1,function(w){u&&a.collapsed&&!u.options.lineWrapping&&nn(w)==u.display.maxLine&&(f=!0),a.collapsed&&l!=t.line&&cn(w,0),ru(w,new hi(a,l==t.line?t.ch:null,l==r.line?r.ch:null),e.cm&&e.cm.curOp),++l}),a.collapsed&&e.iter(t.line,r.line+1,function(w){An(e,w)&&cn(w,0)}),a.clearOnEnter&&W(a,"beforeCursorEnter",function(){return a.clear()}),a.readOnly&&(eu(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),a.collapsed&&(a.id=++Kl,a.atomic=!0),u){if(f&&(u.curOp.updateMaxLine=!0),a.collapsed)It(u,t.line,r.line+1);else if(a.className||a.startStyle||a.endStyle||a.css||a.attributes||a.title)for(var b=t.line;b<=r.line;b++)En(u,b,"text");a.atomic&&Rl(u.doc),xt(u,"markerAdded",u,a)}return a}var Gr=function(e,t){this.markers=e,this.primary=t;for(var r=0;r=0;u--)dr(this,n[u]);l?Nl(this,l):this.cm&&ur(this.cm)}),undo:bt(function(){Oi(this,"undo")}),redo:bt(function(){Oi(this,"redo")}),undoSelection:bt(function(){Oi(this,"undo",!0)}),redoSelection:bt(function(){Oi(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,r){e=Ne(this,e),t=Ne(this,t);var n=[],i=e.line;return this.iter(e.line,t.line+1,function(a){var o=a.markedSpans;if(o)for(var l=0;l=u.to||u.from==null&&i!=e.line||u.from!=null&&i==t.line&&u.from>=t.ch)&&(!r||r(u.marker))&&n.push(u.marker.parent||u.marker)}++i}),n},getAllMarks:function(){var e=[];return this.iter(function(t){var r=t.markedSpans;if(r)for(var n=0;ne)return t=e,!0;e-=a,++r}),Ne(this,V(r,t))},indexFromPos:function(e){e=Ne(this,e);var t=e.ch;if(e.linet&&(t=e.from),e.to!=null&&e.to-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var b=e.dataTransfer.getData("Text");if(b){var w;if(t.state.draggingText&&!t.state.draggingText.copy&&(w=t.listSelections()),Mi(t.doc,Fn(r,r)),w)for(var O=0;O=0;l--)pr(e.doc,"",n[l].from,n[l].to,"+delete");ur(e)})}function Za(e,t,r){var n=T(e.text,t+r,r);return n<0||n>e.text.length?null:n}function $a(e,t,r){var n=Za(e,t.ch,r);return n==null?null:new V(t.line,n,r<0?"after":"before")}function Qa(e,t,r,n,i){if(e){t.doc.direction=="rtl"&&(i=-i);var a=fe(r,t.doc.direction);if(a){var o=i<0?Re(a):a[0],l=i<0==(o.level==1),u=l?"after":"before",f;if(o.level>0||t.doc.direction=="rtl"){var b=ar(t,r);f=i<0?r.text.length-1:0;var w=pn(t,b,f).top;f=ie(function(O){return pn(t,b,O).top==w},i<0==(o.level==1)?o.from:o.to-1,f),u=="before"&&(f=Za(r,f,1))}else f=i<0?o.to:o.from;return new V(n,f,u)}}return new V(n,i<0?r.text.length:0,i<0?"before":"after")}function Sf(e,t,r,n){var i=fe(t,e.doc.direction);if(!i)return $a(t,r,n);r.ch>=t.text.length?(r.ch=t.text.length,r.sticky="before"):r.ch<=0&&(r.ch=0,r.sticky="after");var a=ve(i,r.ch,r.sticky),o=i[a];if(e.doc.direction=="ltr"&&o.level%2==0&&(n>0?o.to>r.ch:o.from=o.from&&O>=b.begin)){var L=w?"before":"after";return new V(r.line,O,L)}}var q=function(le,he,se){for(var me=function(Qe,Ct){return Ct?new V(r.line,l(Qe,1),"before"):new V(r.line,Qe,"after")};le>=0&&le0==(Se.level!=1),Ie=we?se.begin:l(se.end,-1);if(Se.from<=Ie&&Ie0?b.end:l(b.begin,-1);return re!=null&&!(n>0&&re==t.text.length)&&(K=q(n>0?0:i.length-1,n,f(re)),K)?K:null}var Yr={selectAll:zl,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),nt)},killLine:function(e){return mr(e,function(t){if(t.empty()){var r=pe(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line0)i=new V(i.line,i.ch+1),e.replaceRange(a.charAt(i.ch-1)+a.charAt(i.ch-2),V(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var o=pe(e.doc,i.line-1).text;o&&(i=new V(i.line,1),e.replaceRange(a.charAt(0)+e.doc.lineSeparator()+o.charAt(o.length-1),V(i.line-1,o.length-1),i,"+transpose"))}}r.push(new je(i,i))}e.setSelections(r)})},newlineAndIndent:function(e){return Gt(e,function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange(e.doc.lineSeparator(),t[r].anchor,t[r].head,"+input");t=e.listSelections();for(var n=0;ne&&_e(t,this.pos)==0&&r==this.button};var Zr,$r;function Bf(e,t){var r=+new Date;return $r&&$r.compare(r,e,t)?(Zr=$r=null,"triple"):Zr&&Zr.compare(r,e,t)?($r=new Va(r,e,t),Zr=null,"double"):(Zr=new Va(r,e,t),$r=null,"single")}function fs(e){var t=this,r=t.display;if(!(Me(t,e)||r.activeTouch&&r.input.supportsTouch())){if(r.input.ensurePolled(),r.shift=e.shiftKey,yn(r,e)){z||(r.scroller.draggable=!1,setTimeout(function(){return r.scroller.draggable=!0},100));return}if(!eo(t,e)){var n=zn(t,e),i=un(e),a=n?Bf(n,i):"single";Fe(t).focus(),i==1&&t.state.selectingText&&t.state.selectingText(e),!(n&&Of(t,i,n,a,e))&&(i==1?n?Nf(t,n,a,e):wn(e)==r.scroller&&Je(e):i==2?(n&&Li(t.doc,n),setTimeout(function(){return r.input.focus()},20)):i==3&&(Ke?t.display.input.onContextMenu(e):_a(t)))}}}function Of(e,t,r,n,i){var a="Click";return n=="double"?a="Double"+a:n=="triple"&&(a="Triple"+a),a=(t==1?"Left":t==2?"Middle":"Right")+a,Kr(e,ts(a,i),i,function(o){if(typeof o=="string"&&(o=Yr[o]),!o)return!1;var l=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),l=o(e,r)!=tt}finally{e.state.suppressEdits=!1}return l})}function _f(e,t,r){var n=e.getOption("configureMouse"),i=n?n(e,t,r):{};if(i.unit==null){var a=te?r.shiftKey&&r.metaKey:r.altKey;i.unit=a?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(i.extend==null||e.doc.extend)&&(i.extend=e.doc.extend||r.shiftKey),i.addNew==null&&(i.addNew=G?r.metaKey:r.ctrlKey),i.moveOnDrag==null&&(i.moveOnDrag=!(G?r.altKey:r.ctrlKey)),i}function Nf(e,t,r,n){x?setTimeout(et(cl,e),0):e.curOp.focus=Pe(j(e));var i=_f(e,r,n),a=e.doc.sel,o;e.options.dragDrop&&Jt&&!e.isReadOnly()&&r=="single"&&(o=a.contains(t))>-1&&(_e((o=a.ranges[o]).from(),t)<0||t.xRel>0)&&(_e(o.to(),t)>0||t.xRel<0)?If(e,n,t,i):Rf(e,n,t,i)}function If(e,t,r,n){var i=e.display,a=!1,o=Dt(e,function(f){z&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:_a(e)),Ue(i.wrapper.ownerDocument,"mouseup",o),Ue(i.wrapper.ownerDocument,"mousemove",l),Ue(i.scroller,"dragstart",u),Ue(i.scroller,"drop",o),a||(Je(f),n.addNew||Li(e.doc,r,null,null,n.extend),z&&!oe||x&&E==9?setTimeout(function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()},20):i.input.focus())}),l=function(f){a=a||Math.abs(t.clientX-f.clientX)+Math.abs(t.clientY-f.clientY)>=10},u=function(){return a=!0};z&&(i.scroller.draggable=!0),e.state.draggingText=o,o.copy=!n.moveOnDrag,W(i.wrapper.ownerDocument,"mouseup",o),W(i.wrapper.ownerDocument,"mousemove",l),W(i.scroller,"dragstart",u),W(i.scroller,"drop",o),e.state.delayingBlurEvent=!0,setTimeout(function(){return i.input.focus()},20),i.scroller.dragDrop&&i.scroller.dragDrop()}function cs(e,t,r){if(r=="char")return new je(t,t);if(r=="word")return e.findWordAt(t);if(r=="line")return new je(V(t.line,0),Ne(e.doc,V(t.line+1,0)));var n=r(e,t);return new je(n.from,n.to)}function Rf(e,t,r,n){x&&_a(e);var i=e.display,a=e.doc;Je(t);var o,l,u=a.sel,f=u.ranges;if(n.addNew&&!n.extend?(l=a.sel.contains(r),l>-1?o=f[l]:o=new je(r,r)):(o=a.sel.primary(),l=a.sel.primIndex),n.unit=="rectangle")n.addNew||(o=new je(r,r)),r=zn(e,t,!0,!0),l=-1;else{var b=cs(e,r,n.unit);n.extend?o=Ya(o,b.anchor,b.head,n.extend):o=b}n.addNew?l==-1?(l=f.length,Tt(a,an(e,f.concat([o]),l),{scroll:!1,origin:"*mouse"})):f.length>1&&f[l].empty()&&n.unit=="char"&&!n.extend?(Tt(a,an(e,f.slice(0,l).concat(f.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),u=a.sel):Ka(a,l,o,be):(l=0,Tt(a,new Yt([o],0),be),u=a.sel);var w=r;function O(se){if(_e(w,se)!=0)if(w=se,n.unit=="rectangle"){for(var me=[],Se=e.options.tabSize,we=$e(pe(a,r.line).text,r.ch,Se),Ie=$e(pe(a,se.line).text,se.ch,Se),Qe=Math.min(we,Ie),Ct=Math.max(we,Ie),st=Math.min(r.line,se.line),jt=Math.min(e.lastLine(),Math.max(r.line,se.line));st<=jt;st++){var Pt=pe(a,st).text,gt=yt(Pt,Qe,Se);Qe==Ct?me.push(new je(V(st,gt),V(st,gt))):Pt.length>gt&&me.push(new je(V(st,gt),V(st,yt(Pt,Ct,Se))))}me.length||me.push(new je(r,r)),Tt(a,an(e,u.ranges.slice(0,l).concat(me),l),{origin:"*mouse",scroll:!1}),e.scrollIntoView(se)}else{var Ht=o,Et=cs(e,se,n.unit),mt=Ht.anchor,vt;_e(Et.anchor,mt)>0?(vt=Et.head,mt=fi(Ht.from(),Et.anchor)):(vt=Et.anchor,mt=ui(Ht.to(),Et.head));var ft=u.ranges.slice(0);ft[l]=Pf(e,new je(Ne(a,mt),vt)),Tt(a,an(e,ft,l),be)}}var L=i.wrapper.getBoundingClientRect(),q=0;function K(se){var me=++q,Se=zn(e,se,!0,n.unit=="rectangle");if(Se)if(_e(Se,w)!=0){e.curOp.focus=Pe(j(e)),O(Se);var we=ki(i,a);(Se.line>=we.to||Se.lineL.bottom?20:0;Ie&&setTimeout(Dt(e,function(){q==me&&(i.scroller.scrollTop+=Ie,K(se))}),50)}}function re(se){e.state.selectingText=!1,q=1/0,se&&(Je(se),i.input.focus()),Ue(i.wrapper.ownerDocument,"mousemove",le),Ue(i.wrapper.ownerDocument,"mouseup",he),a.history.lastSelOrigin=null}var le=Dt(e,function(se){se.buttons===0||!un(se)?re(se):K(se)}),he=Dt(e,re);e.state.selectingText=he,W(i.wrapper.ownerDocument,"mousemove",le),W(i.wrapper.ownerDocument,"mouseup",he)}function Pf(e,t){var r=t.anchor,n=t.head,i=pe(e.doc,r.line);if(_e(r,n)==0&&r.sticky==n.sticky)return t;var a=fe(i);if(!a)return t;var o=ve(a,r.ch,r.sticky),l=a[o];if(l.from!=r.ch&&l.to!=r.ch)return t;var u=o+(l.from==r.ch==(l.level!=1)?0:1);if(u==0||u==a.length)return t;var f;if(n.line!=r.line)f=(n.line-r.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var b=ve(a,n.ch,n.sticky),w=b-o||(n.ch-r.ch)*(l.level==1?-1:1);b==u-1||b==u?f=w<0:f=w>0}var O=a[u+(f?-1:0)],L=f==(O.level==1),q=L?O.from:O.to,K=L?"after":"before";return r.ch==q&&r.sticky==K?t:new je(new V(r.line,q,K),n)}function hs(e,t,r,n){var i,a;if(t.touches)i=t.touches[0].clientX,a=t.touches[0].clientY;else try{i=t.clientX,a=t.clientY}catch{return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&Je(t);var o=e.display,l=o.lineDiv.getBoundingClientRect();if(a>l.bottom||!pt(e,r))return en(t);a-=l.top-o.viewOffset;for(var u=0;u=i){var b=Rn(e.doc,a),w=e.display.gutterSpecs[u];return Le(e,r,e,b,w.className,t),en(t)}}}function eo(e,t){return hs(e,t,"gutterClick",!0)}function ds(e,t){yn(e.display,t)||Hf(e,t)||Me(e,t,"contextmenu")||Ke||e.display.input.onContextMenu(t)}function Hf(e,t){return pt(e,"gutterContextMenu")?hs(e,t,"gutterContextMenu",!1):!1}function ps(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Lr(e)}var yr={toString:function(){return"CodeMirror.Init"}},gs={},Ri={};function zf(e){var t=e.optionHandlers;function r(n,i,a,o){e.defaults[n]=i,a&&(t[n]=o?function(l,u,f){f!=yr&&a(l,u,f)}:a)}e.defineOption=r,e.Init=yr,r("value","",function(n,i){return n.setValue(i)},!0),r("mode",null,function(n,i){n.doc.modeOption=i,Ga(n)},!0),r("indentUnit",2,Ga,!0),r("indentWithTabs",!1),r("smartIndent",!0),r("tabSize",4,function(n){Pr(n),Lr(n),It(n)},!0),r("lineSeparator",null,function(n,i){if(n.doc.lineSep=i,!!i){var a=[],o=n.doc.first;n.doc.iter(function(u){for(var f=0;;){var b=u.text.indexOf(i,f);if(b==-1)break;f=b+i.length,a.push(V(o,b))}o++});for(var l=a.length-1;l>=0;l--)pr(n.doc,i,a[l],V(a[l].line,a[l].ch+i.length))}}),r("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,function(n,i,a){n.state.specialChars=new RegExp(i.source+(i.test(" ")?"":"| "),"g"),a!=yr&&n.refresh()}),r("specialCharPlaceholder",pu,function(n){return n.refresh()},!0),r("electricChars",!0),r("inputStyle",P?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),r("spellcheck",!1,function(n,i){return n.getInputField().spellcheck=i},!0),r("autocorrect",!1,function(n,i){return n.getInputField().autocorrect=i},!0),r("autocapitalize",!1,function(n,i){return n.getInputField().autocapitalize=i},!0),r("rtlMoveVisually",!Z),r("wholeLineUpdateBefore",!0),r("theme","default",function(n){ps(n),Rr(n)},!0),r("keyMap","default",function(n,i,a){var o=Ni(i),l=a!=yr&&Ni(a);l&&l.detach&&l.detach(n,o),o.attach&&o.attach(n,l||null)}),r("extraKeys",null),r("configureMouse",null),r("lineWrapping",!1,Uf,!0),r("gutters",[],function(n,i){n.display.gutterSpecs=Ua(i,n.options.lineNumbers),Rr(n)},!0),r("fixedGutter",!0,function(n,i){n.display.gutters.style.left=i?La(n.display)+"px":"0",n.refresh()},!0),r("coverGutterNextToScrollbar",!1,function(n){return fr(n)},!0),r("scrollbarStyle","native",function(n){ml(n),fr(n),n.display.scrollbars.setScrollTop(n.doc.scrollTop),n.display.scrollbars.setScrollLeft(n.doc.scrollLeft)},!0),r("lineNumbers",!1,function(n,i){n.display.gutterSpecs=Ua(n.options.gutters,i),Rr(n)},!0),r("firstLineNumber",1,Rr,!0),r("lineNumberFormatter",function(n){return n},Rr,!0),r("showCursorWhenSelecting",!1,Mr,!0),r("resetSelectionOnContextMenu",!0),r("lineWiseCopyCut",!0),r("pasteLinesPerSelection",!0),r("selectionsMayTouch",!1),r("readOnly",!1,function(n,i){i=="nocursor"&&(sr(n),n.display.input.blur()),n.display.input.readOnlyChanged(i)}),r("screenReaderLabel",null,function(n,i){i=i===""?null:i,n.display.input.screenReaderLabelChanged(i)}),r("disableInput",!1,function(n,i){i||n.display.input.reset()},!0),r("dragDrop",!0,Wf),r("allowDropFileTypes",null),r("cursorBlinkRate",530),r("cursorScrollMargin",0),r("cursorHeight",1,Mr,!0),r("singleCursorHeightPerLine",!0,Mr,!0),r("workTime",100),r("workDelay",100),r("flattenSpans",!0,Pr,!0),r("addModeClass",!1,Pr,!0),r("pollInterval",100),r("undoDepth",200,function(n,i){return n.doc.history.undoDepth=i}),r("historyEventDelay",1250),r("viewportMargin",10,function(n){return n.refresh()},!0),r("maxHighlightLength",1e4,Pr,!0),r("moveInputWithCursor",!0,function(n,i){i||n.display.input.resetPosition()}),r("tabindex",null,function(n,i){return n.display.input.getField().tabIndex=i||""}),r("autofocus",null),r("direction","ltr",function(n,i){return n.doc.setDirection(i)},!0),r("phrases",null)}function Wf(e,t,r){var n=r&&r!=yr;if(!t!=!n){var i=e.display.dragFunctions,a=t?W:Ue;a(e.display.scroller,"dragstart",i.start),a(e.display.scroller,"dragenter",i.enter),a(e.display.scroller,"dragover",i.over),a(e.display.scroller,"dragleave",i.leave),a(e.display.scroller,"drop",i.drop)}}function Uf(e){e.options.lineWrapping?(lt(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(Be(e.display.wrapper,"CodeMirror-wrap"),Da(e)),Ma(e),It(e),Lr(e),setTimeout(function(){return fr(e)},100)}function at(e,t){var r=this;if(!(this instanceof at))return new at(e,t);this.options=t=t?dt(t):{},dt(gs,t,!1);var n=t.value;typeof n=="string"?n=new Rt(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var i=new at.inputStyles[t.inputStyle](this),a=this.display=new ef(e,n,i,t);a.wrapper.CodeMirror=this,ps(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),ml(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new ut,keySeq:null,specialChars:null},t.autofocus&&!P&&a.input.focus(),x&&E<11&&setTimeout(function(){return r.display.input.reset(!0)},20),qf(this),Df(),Gn(this),this.curOp.forceUpdate=!0,El(this,n),t.autofocus&&!P||this.hasFocus()?setTimeout(function(){r.hasFocus()&&!r.state.focused&&Na(r)},20):sr(this);for(var o in Ri)Ri.hasOwnProperty(o)&&Ri[o](this,t[o],yr);Dl(this),t.finishInit&&t.finishInit(this);for(var l=0;l20*20}W(t.scroller,"touchstart",function(u){if(!Me(e,u)&&!a(u)&&!eo(e,u)){t.input.ensurePolled(),clearTimeout(r);var f=+new Date;t.activeTouch={start:f,moved:!1,prev:f-n.end<=300?n:null},u.touches.length==1&&(t.activeTouch.left=u.touches[0].pageX,t.activeTouch.top=u.touches[0].pageY)}}),W(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),W(t.scroller,"touchend",function(u){var f=t.activeTouch;if(f&&!yn(t,u)&&f.left!=null&&!f.moved&&new Date-f.start<300){var b=e.coordsChar(t.activeTouch,"page"),w;!f.prev||o(f,f.prev)?w=new je(b,b):!f.prev.prev||o(f,f.prev.prev)?w=e.findWordAt(b):w=new je(V(b.line,0),Ne(e.doc,V(b.line+1,0))),e.setSelection(w.anchor,w.head),e.focus(),Je(u)}i()}),W(t.scroller,"touchcancel",i),W(t.scroller,"scroll",function(){t.scroller.clientHeight&&(Or(e,t.scroller.scrollTop),Un(e,t.scroller.scrollLeft,!0),Le(e,"scroll",e))}),W(t.scroller,"mousewheel",function(u){return wl(e,u)}),W(t.scroller,"DOMMouseScroll",function(u){return wl(e,u)}),W(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(u){Me(e,u)||qt(u)},over:function(u){Me(e,u)||(xf(e,u),qt(u))},start:function(u){return yf(e,u)},drop:Dt(e,mf),leave:function(u){Me(e,u)||Ql(e)}};var l=t.input.getField();W(l,"keyup",function(u){return ss.call(e,u)}),W(l,"keydown",Dt(e,ls)),W(l,"keypress",Dt(e,us)),W(l,"focus",function(u){return Na(e,u)}),W(l,"blur",function(u){return sr(e,u)})}var to=[];at.defineInitHook=function(e){return to.push(e)};function Qr(e,t,r,n){var i=e.doc,a;r==null&&(r="add"),r=="smart"&&(i.mode.indent?a=Sr(e,t).state:r="prev");var o=e.options.tabSize,l=pe(i,t),u=$e(l.text,null,o);l.stateAfter&&(l.stateAfter=null);var f=l.text.match(/^\s*/)[0],b;if(!n&&!/\S/.test(l.text))b=0,r="not";else if(r=="smart"&&(b=i.mode.indent(a,l.text.slice(f.length),l.text),b==tt||b>150)){if(!n)return;r="prev"}r=="prev"?t>i.first?b=$e(pe(i,t-1).text,null,o):b=0:r=="add"?b=u+e.options.indentUnit:r=="subtract"?b=u-e.options.indentUnit:typeof r=="number"&&(b=u+r),b=Math.max(0,b);var w="",O=0;if(e.options.indentWithTabs)for(var L=Math.floor(b/o);L;--L)O+=o,w+=" ";if(Oo,u=Vn(t),f=null;if(l&&n.ranges.length>1)if(on&&on.text.join(` +`)==t){if(n.ranges.length%on.text.length==0){f=[];for(var b=0;b=0;O--){var L=n.ranges[O],q=L.from(),K=L.to();L.empty()&&(r&&r>0?q=V(q.line,q.ch-r):e.state.overwrite&&!l?K=V(K.line,Math.min(pe(a,K.line).text.length,K.ch+Re(u).length)):l&&on&&on.lineWise&&on.text.join(` +`)==u.join(` +`)&&(q=K=V(q.line,0)));var re={from:q,to:K,text:f?f[O%f.length]:u,origin:i||(l?"paste":e.state.cutIncoming>o?"cut":"+input")};dr(e.doc,re),xt(e,"inputRead",e,re)}t&&!l&&ms(e,t),ur(e),e.curOp.updateInput<2&&(e.curOp.updateInput=w),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function vs(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&t.hasFocus()&&Gt(t,function(){return no(t,r,0,null,"paste")}),!0}function ms(e,t){if(!(!e.options.electricChars||!e.options.smartIndent))for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var i=r.ranges[n];if(!(i.head.ch>100||n&&r.ranges[n-1].head.line==i.head.line)){var a=e.getModeAt(i.head),o=!1;if(a.electricChars){for(var l=0;l-1){o=Qr(e,i.head.line,"smart");break}}else a.electricInput&&a.electricInput.test(pe(e.doc,i.head.line).text.slice(0,i.head.ch))&&(o=Qr(e,i.head.line,"smart"));o&&xt(e,"electricInput",e,i.head.line)}}}function ys(e){for(var t=[],r=[],n=0;na&&(Qr(this,l.head.line,n,!0),a=l.head.line,o==this.doc.sel.primIndex&&ur(this));else{var u=l.from(),f=l.to(),b=Math.max(a,u.line);a=Math.min(this.lastLine(),f.line-(f.ch?0:1))+1;for(var w=b;w0&&Ka(this.doc,o,new je(u,O[o].to()),nt)}}}),getTokenAt:function(n,i){return Fo(this,n,i)},getLineTokens:function(n,i){return Fo(this,V(n),i,!0)},getTokenTypeAt:function(n){n=Ne(this.doc,n);var i=Ao(this,pe(this.doc,n.line)),a=0,o=(i.length-1)/2,l=n.ch,u;if(l==0)u=i[2];else for(;;){var f=a+o>>1;if((f?i[f*2-1]:0)>=l)o=f;else if(i[f*2+1]u&&(n=u,o=!0),l=pe(this.doc,n)}else l=n;return xi(this,l,{top:0,left:0},i||"page",a||o).top+(o?this.doc.height-mn(l):0)},defaultTextHeight:function(){return or(this.display)},defaultCharWidth:function(){return lr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(n,i,a,o,l){var u=this.display;n=rn(this,Ne(this.doc,n));var f=n.bottom,b=n.left;if(i.style.position="absolute",i.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(i),u.sizer.appendChild(i),o=="over")f=n.top;else if(o=="above"||o=="near"){var w=Math.max(u.wrapper.clientHeight,this.doc.height),O=Math.max(u.sizer.clientWidth,u.lineSpace.clientWidth);(o=="above"||n.bottom+i.offsetHeight>w)&&n.top>i.offsetHeight?f=n.top-i.offsetHeight:n.bottom+i.offsetHeight<=w&&(f=n.bottom),b+i.offsetWidth>O&&(b=O-i.offsetWidth)}i.style.top=f+"px",i.style.left=i.style.right="",l=="right"?(b=u.sizer.clientWidth-i.offsetWidth,i.style.right="0px"):(l=="left"?b=0:l=="middle"&&(b=(u.sizer.clientWidth-i.offsetWidth)/2),i.style.left=b+"px"),a&&zu(this,{left:b,top:f,right:b+i.offsetWidth,bottom:f+i.offsetHeight})},triggerOnKeyDown:Ot(ls),triggerOnKeyPress:Ot(us),triggerOnKeyUp:ss,triggerOnMouseDown:Ot(fs),execCommand:function(n){if(Yr.hasOwnProperty(n))return Yr[n].call(null,this)},triggerElectric:Ot(function(n){ms(this,n)}),findPosH:function(n,i,a,o){var l=1;i<0&&(l=-1,i=-i);for(var u=Ne(this.doc,n),f=0;f0&&b(a.charAt(o-1));)--o;for(;l.5||this.options.lineWrapping)&&Ma(this),Le(this,"refresh",this)}),swapDoc:Ot(function(n){var i=this.doc;return i.cm=null,this.state.selectingText&&this.state.selectingText(),El(this,n),Lr(this),this.display.input.reset(),Br(this,n.scrollLeft,n.scrollTop),this.curOp.forceScroll=!0,xt(this,"swapDoc",this,i),i}),phrase:function(n){var i=this.options.phrases;return i&&Object.prototype.hasOwnProperty.call(i,n)?i[n]:n},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Bt(e),e.registerHelper=function(n,i,a){r.hasOwnProperty(n)||(r[n]=e[n]={_global:[]}),r[n][i]=a},e.registerGlobalHelper=function(n,i,a,o){e.registerHelper(n,i,o),r[n]._global.push({pred:a,val:o})}}function io(e,t,r,n,i){var a=t,o=r,l=pe(e,t.line),u=i&&e.direction=="rtl"?-r:r;function f(){var he=t.line+u;return he=e.first+e.size?!1:(t=new V(he,t.ch,t.sticky),l=pe(e,he))}function b(he){var se;if(n=="codepoint"){var me=l.text.charCodeAt(t.ch+(r>0?0:-1));if(isNaN(me))se=null;else{var Se=r>0?me>=55296&&me<56320:me>=56320&&me<57343;se=new V(t.line,Math.max(0,Math.min(l.text.length,t.ch+r*(Se?2:1))),-r)}}else i?se=Sf(e.cm,l,t,r):se=$a(l,t,r);if(se==null)if(!he&&f())t=Qa(i,e.cm,l,t.line,u);else return!1;else t=se;return!0}if(n=="char"||n=="codepoint")b();else if(n=="column")b(!0);else if(n=="word"||n=="group")for(var w=null,O=n=="group",L=e.cm&&e.cm.getHelper(t,"wordChars"),q=!0;!(r<0&&!b(!q));q=!1){var K=l.text.charAt(t.ch)||` +`,re=d(K,L)?"w":O&&K==` +`?"n":!O||/\s/.test(K)?null:"p";if(O&&!q&&!re&&(re="s"),w&&w!=re){r<0&&(r=1,b(),t.sticky="after");break}if(re&&(w=re),r>0&&!b(!q))break}var le=Bi(e,t,a,o,!0);return ha(a,le)&&(le.hitSide=!0),le}function Ds(e,t,r,n){var i=e.doc,a=t.left,o;if(n=="page"){var l=Math.min(e.display.wrapper.clientHeight,Fe(e).innerHeight||i(e).documentElement.clientHeight),u=Math.max(l-.5*or(e.display),3);o=(r>0?t.bottom:t.top)+r*u}else n=="line"&&(o=r>0?t.bottom+3:t.top-3);for(var f;f=Ea(e,a,o),!!f.outside;){if(r<0?o<=0:o>=i.height){f.hitSide=!0;break}o+=r*5}return f}var Ye=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new ut,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Ye.prototype.init=function(e){var t=this,r=this,n=r.cm,i=r.div=e.lineDiv;i.contentEditable=!0,ro(i,n.options.spellcheck,n.options.autocorrect,n.options.autocapitalize);function a(l){for(var u=l.target;u;u=u.parentNode){if(u==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(u.className))break}return!1}W(i,"paste",function(l){!a(l)||Me(n,l)||vs(l,n)||E<=11&&setTimeout(Dt(n,function(){return t.updateFromDOM()}),20)}),W(i,"compositionstart",function(l){t.composing={data:l.data,done:!1}}),W(i,"compositionupdate",function(l){t.composing||(t.composing={data:l.data,done:!1})}),W(i,"compositionend",function(l){t.composing&&(l.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),W(i,"touchstart",function(){return r.forceCompositionEnd()}),W(i,"input",function(){t.composing||t.readFromDOMSoon()});function o(l){if(!(!a(l)||Me(n,l))){if(n.somethingSelected())Pi({lineWise:!1,text:n.getSelections()}),l.type=="cut"&&n.replaceSelection("",null,"cut");else if(n.options.lineWiseCopyCut){var u=ys(n);Pi({lineWise:!0,text:u.text}),l.type=="cut"&&n.operation(function(){n.setSelections(u.ranges,0,nt),n.replaceSelection("",null,"cut")})}else return;if(l.clipboardData){l.clipboardData.clearData();var f=on.text.join(` +`);if(l.clipboardData.setData("Text",f),l.clipboardData.getData("Text")==f){l.preventDefault();return}}var b=xs(),w=b.firstChild;ro(w),n.display.lineSpace.insertBefore(b,n.display.lineSpace.firstChild),w.value=on.text.join(` +`);var O=Pe(Ae(i));S(w),setTimeout(function(){n.display.lineSpace.removeChild(b),O.focus(),O==i&&r.showPrimarySelection()},50)}}W(i,"copy",o),W(i,"cut",o)},Ye.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Ye.prototype.prepareSelection=function(){var e=fl(this.cm,!1);return e.focus=Pe(Ae(this.div))==this.div,e},Ye.prototype.showSelection=function(e,t){!e||!this.cm.display.view.length||((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Ye.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Ye.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,r=t.doc.sel.primary(),n=r.from(),i=r.to();if(t.display.viewTo==t.display.viewFrom||n.line>=t.display.viewTo||i.line=t.display.viewFrom&&bs(t,n)||{node:l[0].measure.map[2],offset:0},f=i.linee.firstLine()&&(n=V(n.line-1,pe(e.doc,n.line-1).length)),i.ch==pe(e.doc,i.line).text.length&&i.linet.viewTo-1)return!1;var a,o,l;n.line==t.viewFrom||(a=Wn(e,n.line))==0?(o=Xe(t.view[0].line),l=t.view[0].node):(o=Xe(t.view[a].line),l=t.view[a-1].node.nextSibling);var u=Wn(e,i.line),f,b;if(u==t.view.length-1?(f=t.viewTo-1,b=t.lineDiv.lastChild):(f=Xe(t.view[u+1].line)-1,b=t.view[u+1].node.previousSibling),!l)return!1;for(var w=e.doc.splitLines(Xf(e,l,b,o,f)),O=fn(e.doc,V(o,0),V(f,pe(e.doc,f).text.length));w.length>1&&O.length>1;)if(Re(w)==Re(O))w.pop(),O.pop(),f--;else if(w[0]==O[0])w.shift(),O.shift(),o++;else break;for(var L=0,q=0,K=w[0],re=O[0],le=Math.min(K.length,re.length);Ln.ch&&he.charCodeAt(he.length-q-1)==se.charCodeAt(se.length-q-1);)L--,q++;w[w.length-1]=he.slice(0,he.length-q).replace(/^\u200b+/,""),w[0]=w[0].slice(L).replace(/\u200b+$/,"");var Se=V(o,L),we=V(f,O.length?Re(O).length-q:0);if(w.length>1||w[0]||_e(Se,we))return pr(e.doc,w,Se,we,"+input"),!0},Ye.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ye.prototype.reset=function(){this.forceCompositionEnd()},Ye.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ye.prototype.readFromDOMSoon=function(){var e=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing)if(e.composing.done)e.composing=null;else return;e.updateFromDOM()},80))},Ye.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Gt(this.cm,function(){return It(e.cm)})},Ye.prototype.setUneditable=function(e){e.contentEditable="false"},Ye.prototype.onKeyPress=function(e){e.charCode==0||this.composing||(e.preventDefault(),this.cm.isReadOnly()||Dt(this.cm,no)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0))},Ye.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},Ye.prototype.onContextMenu=function(){},Ye.prototype.resetPosition=function(){},Ye.prototype.needsContentAttribute=!0;function bs(e,t){var r=ka(e,t.line);if(!r||r.hidden)return null;var n=pe(e.doc,t.line),i=$o(r,n,t.line),a=fe(n,e.doc.direction),o="left";if(a){var l=ve(a,t.ch);o=l%2?"right":"left"}var u=Vo(i.map,t.ch,o);return u.offset=u.collapse=="right"?u.end:u.start,u}function jf(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function xr(e,t){return t&&(e.bad=!0),e}function Xf(e,t,r,n,i){var a="",o=!1,l=e.doc.lineSeparator(),u=!1;function f(L){return function(q){return q.id==L}}function b(){o&&(a+=l,u&&(a+=l),o=u=!1)}function w(L){L&&(b(),a+=L)}function O(L){if(L.nodeType==1){var q=L.getAttribute("cm-text");if(q){w(q);return}var K=L.getAttribute("cm-marker"),re;if(K){var le=e.findMarks(V(n,0),V(i+1,0),f(+K));le.length&&(re=le[0].find(0))&&w(fn(e.doc,re.from,re.to).join(l));return}if(L.getAttribute("contenteditable")=="false")return;var he=/^(pre|div|p|li|table|br)$/i.test(L.nodeName);if(!/^br$/i.test(L.nodeName)&&L.textContent.length==0)return;he&&b();for(var se=0;se=9&&t.hasSelection&&(t.hasSelection=null),r.poll()}),W(i,"paste",function(o){Me(n,o)||vs(o,n)||(n.state.pasteIncoming=+new Date,r.fastPoll())});function a(o){if(!Me(n,o)){if(n.somethingSelected())Pi({lineWise:!1,text:n.getSelections()});else if(n.options.lineWiseCopyCut){var l=ys(n);Pi({lineWise:!0,text:l.text}),o.type=="cut"?n.setSelections(l.ranges,null,nt):(r.prevInput="",i.value=l.text.join(` +`),S(i))}else return;o.type=="cut"&&(n.state.cutIncoming=+new Date)}}W(i,"cut",a),W(i,"copy",a),W(e.scroller,"paste",function(o){if(!(yn(e,o)||Me(n,o))){if(!i.dispatchEvent){n.state.pasteIncoming=+new Date,r.focus();return}var l=new Event("paste");l.clipboardData=o.clipboardData,i.dispatchEvent(l)}}),W(e.lineSpace,"selectstart",function(o){yn(e,o)||Je(o)}),W(i,"compositionstart",function(){var o=n.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:o,range:n.markText(o,n.getCursor("to"),{className:"CodeMirror-composing"})}}),W(i,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},ht.prototype.createField=function(e){this.wrapper=xs(),this.textarea=this.wrapper.firstChild;var t=this.cm.options;ro(this.textarea,t.spellcheck,t.autocorrect,t.autocapitalize)},ht.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},ht.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=fl(e);if(e.options.moveInputWithCursor){var i=rn(e,r.sel.primary().head,"div"),a=t.wrapper.getBoundingClientRect(),o=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+o.top-a.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+o.left-a.left))}return n},ht.prototype.showSelection=function(e){var t=this.cm,r=t.display;Ce(r.cursorDiv,e.cursors),Ce(r.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},ht.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing&&e)){var t=this.cm;if(this.resetting=!0,t.somethingSelected()){this.prevInput="";var r=t.getSelection();this.textarea.value=r,t.state.focused&&S(this.textarea),x&&E>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",x&&E>=9&&(this.hasSelection=null));this.resetting=!1}},ht.prototype.getField=function(){return this.textarea},ht.prototype.supportsTouch=function(){return!1},ht.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!P||Pe(Ae(this.textarea))!=this.textarea))try{this.textarea.focus()}catch{}},ht.prototype.blur=function(){this.textarea.blur()},ht.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},ht.prototype.receivedFocus=function(){this.slowPoll()},ht.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},ht.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function r(){var n=t.poll();!n&&!e?(e=!0,t.polling.set(60,r)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,r)},ht.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||this.resetting||!t.state.focused||tn(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=r.value;if(i==n&&!t.somethingSelected())return!1;if(x&&E>=9&&this.hasSelection===i||G&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var a=i.charCodeAt(0);if(a==8203&&!n&&(n="​"),a==8666)return this.reset(),this.cm.execCommand("undo")}for(var o=0,l=Math.min(n.length,i.length);o1e3||i.indexOf(` +`)>-1?r.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ht.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},ht.prototype.onKeyPress=function(){x&&E>=9&&(this.hasSelection=null),this.fastPoll()},ht.prototype.onContextMenu=function(e){var t=this,r=t.cm,n=r.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var a=zn(r,e),o=n.scroller.scrollTop;if(!a||Y)return;var l=r.options.resetSelectionOnContextMenu;l&&r.doc.sel.contains(a)==-1&&Dt(r,Tt)(r.doc,Fn(a),nt);var u=i.style.cssText,f=t.wrapper.style.cssText,b=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",i.style.cssText=`position: absolute; width: 30px; height: 30px; + top: `+(e.clientY-b.top-5)+"px; left: "+(e.clientX-b.left-5)+`px; + z-index: 1000; background: `+(x?"rgba(255, 255, 255, .05)":"transparent")+`; + outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var w;z&&(w=i.ownerDocument.defaultView.scrollY),n.input.focus(),z&&i.ownerDocument.defaultView.scrollTo(null,w),n.input.reset(),r.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=L,n.selForContextMenu=r.doc.sel,clearTimeout(n.detectingSelectAll);function O(){if(i.selectionStart!=null){var K=r.somethingSelected(),re="​"+(K?i.value:"");i.value="⇚",i.value=re,t.prevInput=K?"":"​",i.selectionStart=1,i.selectionEnd=re.length,n.selForContextMenu=r.doc.sel}}function L(){if(t.contextMenuPending==L&&(t.contextMenuPending=!1,t.wrapper.style.cssText=f,i.style.cssText=u,x&&E<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=o),i.selectionStart!=null)){(!x||x&&E<9)&&O();var K=0,re=function(){n.selForContextMenu==r.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput=="​"?Dt(r,zl)(r):K++<10?n.detectingSelectAll=setTimeout(re,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(re,200)}}if(x&&E>=9&&O(),Ke){qt(e);var q=function(){Ue(window,"mouseup",q),setTimeout(L,20)};W(window,"mouseup",q)}else setTimeout(L,50)},ht.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},ht.prototype.setUneditable=function(){},ht.prototype.needsContentAttribute=!1;function Kf(e,t){if(t=t?dt(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var r=Pe(Ae(e));t.autofocus=r==e||e.getAttribute("autofocus")!=null&&r==document.body}function n(){e.value=l.getValue()}var i;if(e.form&&(W(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var a=e.form;i=a.submit;try{var o=a.submit=function(){n(),a.submit=i,a.submit(),a.submit=o}}catch{}}t.finishInit=function(u){u.save=n,u.getTextArea=function(){return e},u.toTextArea=function(){u.toTextArea=isNaN,n(),e.parentNode.removeChild(u.getWrapperElement()),e.style.display="",e.form&&(Ue(e.form,"submit",n),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=i))}},e.style.display="none";var l=at(function(u){return e.parentNode.insertBefore(u,e.nextSibling)},t);return l}function Zf(e){e.off=Ue,e.on=W,e.wheelEventPixels=tf,e.Doc=Rt,e.splitLines=Vn,e.countColumn=$e,e.findColumn=yt,e.isWordChar=F,e.Pass=tt,e.signal=Le,e.Line=rr,e.changeEnd=Ln,e.scrollbarModel=vl,e.Pos=V,e.cmpPos=_e,e.modes=tr,e.mimeModes=Sn,e.resolveMode=ae,e.getMode=De,e.modeExtensions=Ge,e.extendMode=St,e.copyState=it,e.startState=Xt,e.innerMode=At,e.commands=Yr,e.keyMap=Dn,e.keyName=ns,e.isModifierKey=es,e.lookupKey=vr,e.normalizeKeyMap=kf,e.StringStream=Ve,e.SharedTextMarker=Gr,e.TextMarker=Bn,e.LineWidget=qr,e.e_preventDefault=Je,e.e_stopPropagation=Qt,e.e_stop=qt,e.addClass=lt,e.contains=ye,e.rmClass=Be,e.keyNames=On}zf(at),Gf(at);var $f="iter insert remove copy getEditor constructor".split(" ");for(var zi in Rt.prototype)Rt.prototype.hasOwnProperty(zi)&&We($f,zi)<0&&(at.prototype[zi]=function(e){return function(){return e.apply(this.doc,arguments)}}(Rt.prototype[zi]));return Bt(Rt),at.inputStyles={textarea:ht,contenteditable:Ye},at.defineMode=function(e){!at.defaults.mode&&e!="null"&&(at.defaults.mode=e),ke.apply(this,arguments)},at.defineMIME=B,at.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),at.defineMIME("text/plain","null"),at.defineExtension=function(e,t){at.prototype[e]=t},at.defineDocExtension=function(e,t){Rt.prototype[e]=t},at.fromTextArea=Kf,Zf(at),at.version="5.65.18",at})})(Ns);var Zt=Ns.exports;(function(s,g){(function(c){c(Zt)})(function(c){var p=/^(\s*)(>[> ]*|[*+-] \[[x ]\]\s|[*+-]\s|(\d+)([.)]))(\s*)/,v=/^(\s*)(>[> ]*|[*+-] \[[x ]\]|[*+-]|(\d+)[.)])(\s*)$/,C=/[*+-]\s/;c.commands.newlineAndIndentContinueMarkdownList=function(D){if(D.getOption("disableInput"))return c.Pass;for(var x=D.listSelections(),E=[],z=0;z\s*$/.test(J),P=!/>\s*$/.test(J);(H||P)&&D.replaceRange("",{line:U.line,ch:0},{line:U.line,ch:U.ch+1}),E[z]=` +`}else{var G=$[1],te=$[5],Z=!(C.test($[2])||$[2].indexOf(">")>=0),ce=Z?parseInt($[3],10)+1+$[4]:$[2].replace("x"," ");E[z]=` +`+G+ce+te,Z&&m(D,U)}}D.replaceSelections(E)};function m(D,x){var E=x.line,z=0,U=0,_=p.exec(D.getLine(E)),X=_[1];do{z+=1;var Y=E+z,oe=D.getLine(Y),J=p.exec(oe);if(J){var $=J[1],R=parseInt(_[3],10)+z-U,H=parseInt(J[3],10),P=H;if(X===$&&!isNaN(H))R===H&&(P=H+1),R>H&&(P=R+1),D.replaceRange(oe.replace(p,$+P+J[4]+J[5]),{line:Y,ch:0},{line:Y,ch:oe.length});else{if(X.length>$.length||X.length<$.length&&z===1)return;U+=1}}}while(J)}})})();var Is=Zt;Is.commands.tabAndIndentMarkdownList=function(s){var g=s.listSelections(),c=g[0].head,p=s.getStateAfter(c.line),v=p.list!==!1;if(v){s.execCommand("indentMore");return}if(s.options.indentWithTabs)s.execCommand("insertTab");else{var C=Array(s.options.tabSize+1).join(" ");s.replaceSelection(C)}};Is.commands.shiftTabAndUnindentMarkdownList=function(s){var g=s.listSelections(),c=g[0].head,p=s.getStateAfter(c.line),v=p.list!==!1;if(v){s.execCommand("indentLess");return}if(s.options.indentWithTabs)s.execCommand("insertTab");else{var C=Array(s.options.tabSize+1).join(" ");s.replaceSelection(C)}};(function(s,g){(function(c){c(Zt)})(function(c){c.defineOption("fullScreen",!1,function(C,m,D){D==c.Init&&(D=!1),!D!=!m&&(m?p(C):v(C))});function p(C){var m=C.getWrapperElement();C.state.fullScreenRestore={scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,width:m.style.width,height:m.style.height},m.style.width="",m.style.height="auto",m.className+=" CodeMirror-fullscreen",document.documentElement.style.overflow="hidden",C.refresh()}function v(C){var m=C.getWrapperElement();m.className=m.className.replace(/\s*CodeMirror-fullscreen\b/,""),document.documentElement.style.overflow="";var D=C.state.fullScreenRestore;m.style.width=D.width,m.style.height=D.height,window.scrollTo(D.scrollLeft,D.scrollTop),C.refresh()}})})();var ec={exports:{}},tc={exports:{}};(function(s,g){(function(c){c(Zt)})(function(c){var p={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},v={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};c.defineMode("xml",function(C,m){var D=C.indentUnit,x={},E=m.htmlMode?p:v;for(var z in E)x[z]=E[z];for(var z in m)x[z]=m[z];var U,_;function X(M,ee){function Q(lt){return ee.tokenize=lt,lt(M,ee)}var ye=M.next();if(ye=="<")return M.eat("!")?M.eat("[")?M.match("CDATA[")?Q(J("atom","]]>")):null:M.match("--")?Q(J("comment","-->")):M.match("DOCTYPE",!0,!0)?(M.eatWhile(/[\w\._\-]/),Q($(1))):null:M.eat("?")?(M.eatWhile(/[\w\._\-]/),ee.tokenize=J("meta","?>"),"meta"):(U=M.eat("/")?"closeTag":"openTag",ee.tokenize=Y,"tag bracket");if(ye=="&"){var Pe;return M.eat("#")?M.eat("x")?Pe=M.eatWhile(/[a-fA-F\d]/)&&M.eat(";"):Pe=M.eatWhile(/[\d]/)&&M.eat(";"):Pe=M.eatWhile(/[\w\.\-:]/)&&M.eat(";"),Pe?"atom":"error"}else return M.eatWhile(/[^&<]/),null}X.isInText=!0;function Y(M,ee){var Q=M.next();if(Q==">"||Q=="/"&&M.eat(">"))return ee.tokenize=X,U=Q==">"?"endTag":"selfcloseTag","tag bracket";if(Q=="=")return U="equals",null;if(Q=="<"){ee.tokenize=X,ee.state=te,ee.tagName=ee.tagStart=null;var ye=ee.tokenize(M,ee);return ye?ye+" tag error":"tag error"}else return/[\'\"]/.test(Q)?(ee.tokenize=oe(Q),ee.stringStartCol=M.column(),ee.tokenize(M,ee)):(M.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function oe(M){var ee=function(Q,ye){for(;!Q.eol();)if(Q.next()==M){ye.tokenize=Y;break}return"string"};return ee.isInAttribute=!0,ee}function J(M,ee){return function(Q,ye){for(;!Q.eol();){if(Q.match(ee)){ye.tokenize=X;break}Q.next()}return M}}function $(M){return function(ee,Q){for(var ye;(ye=ee.next())!=null;){if(ye=="<")return Q.tokenize=$(M+1),Q.tokenize(ee,Q);if(ye==">")if(M==1){Q.tokenize=X;break}else return Q.tokenize=$(M-1),Q.tokenize(ee,Q)}return"meta"}}function R(M){return M&&M.toLowerCase()}function H(M,ee,Q){this.prev=M.context,this.tagName=ee||"",this.indent=M.indented,this.startOfLine=Q,(x.doNotIndent.hasOwnProperty(ee)||M.context&&M.context.noIndent)&&(this.noIndent=!0)}function P(M){M.context&&(M.context=M.context.prev)}function G(M,ee){for(var Q;;){if(!M.context||(Q=M.context.tagName,!x.contextGrabbers.hasOwnProperty(R(Q))||!x.contextGrabbers[R(Q)].hasOwnProperty(R(ee))))return;P(M)}}function te(M,ee,Q){return M=="openTag"?(Q.tagStart=ee.column(),Z):M=="closeTag"?ce:te}function Z(M,ee,Q){return M=="word"?(Q.tagName=ee.current(),_="tag",ne):x.allowMissingTagName&&M=="endTag"?(_="tag bracket",ne(M,ee,Q)):(_="error",Z)}function ce(M,ee,Q){if(M=="word"){var ye=ee.current();return Q.context&&Q.context.tagName!=ye&&x.implicitlyClosed.hasOwnProperty(R(Q.context.tagName))&&P(Q),Q.context&&Q.context.tagName==ye||x.matchClosing===!1?(_="tag",xe):(_="tag error",Ke)}else return x.allowMissingTagName&&M=="endTag"?(_="tag bracket",xe(M,ee,Q)):(_="error",Ke)}function xe(M,ee,Q){return M!="endTag"?(_="error",xe):(P(Q),te)}function Ke(M,ee,Q){return _="error",xe(M,ee,Q)}function ne(M,ee,Q){if(M=="word")return _="attribute",Be;if(M=="endTag"||M=="selfcloseTag"){var ye=Q.tagName,Pe=Q.tagStart;return Q.tagName=Q.tagStart=null,M=="selfcloseTag"||x.autoSelfClosers.hasOwnProperty(R(ye))?G(Q,ye):(G(Q,ye),Q.context=new H(Q,ye,Pe==Q.indented)),te}return _="error",ne}function Be(M,ee,Q){return M=="equals"?Oe:(x.allowMissing||(_="error"),ne(M,ee,Q))}function Oe(M,ee,Q){return M=="string"?Ce:M=="word"&&x.allowUnquoted?(_="string",ne):(_="error",ne(M,ee,Q))}function Ce(M,ee,Q){return M=="string"?Ce:ne(M,ee,Q)}return{startState:function(M){var ee={tokenize:X,state:te,indented:M||0,tagName:null,tagStart:null,context:null};return M!=null&&(ee.baseIndent=M),ee},token:function(M,ee){if(!ee.tagName&&M.sol()&&(ee.indented=M.indentation()),M.eatSpace())return null;U=null;var Q=ee.tokenize(M,ee);return(Q||U)&&Q!="comment"&&(_=null,ee.state=ee.state(U||Q,M,ee),_&&(Q=_=="error"?Q+" error":_)),Q},indent:function(M,ee,Q){var ye=M.context;if(M.tokenize.isInAttribute)return M.tagStart==M.indented?M.stringStartCol+1:M.indented+D;if(ye&&ye.noIndent)return c.Pass;if(M.tokenize!=Y&&M.tokenize!=X)return Q?Q.match(/^(\s*)/)[0].length:0;if(M.tagName)return x.multilineTagIndentPastTag!==!1?M.tagStart+M.tagName.length+2:M.tagStart+D*(x.multilineTagIndentFactor||1);if(x.alignCDATA&&/$/,blockCommentStart:"",configuration:x.htmlMode?"html":"xml",helperType:x.htmlMode?"html":"xml",skipAttribute:function(M){M.state==Oe&&(M.state=ne)},xmlCurrentTag:function(M){return M.tagName?{name:M.tagName,close:M.type=="closeTag"}:null},xmlCurrentContext:function(M){for(var ee=[],Q=M.context;Q;Q=Q.prev)ee.push(Q.tagName);return ee.reverse()}}}),c.defineMIME("text/xml","xml"),c.defineMIME("application/xml","xml"),c.mimeModes.hasOwnProperty("text/html")||c.defineMIME("text/html",{name:"xml",htmlMode:!0})})})();var nc=tc.exports,Cs={exports:{}},ws;function rc(){return ws||(ws=1,function(s,g){(function(c){c(Zt)})(function(c){c.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy","cbl"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded JavaScript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"],alias:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var p=0;p-1&&C.substring(x+1,C.length);if(E)return c.findModeByExtension(E)},c.findModeByName=function(C){C=C.toLowerCase();for(var m=0;m` "'(~:]+/,J=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,$=/^\s*\[[^\]]+?\]:.*$/,R=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,H=" ";function P(S,h,j){return h.f=h.inline=j,j(S,h)}function G(S,h,j){return h.f=h.block=j,j(S,h)}function te(S){return!S||!/\S/.test(S.string)}function Z(S){if(S.linkTitle=!1,S.linkHref=!1,S.linkText=!1,S.em=!1,S.strong=!1,S.strikethrough=!1,S.quote=0,S.indentedCode=!1,S.f==xe){var h=m;if(!h){var j=c.innerMode(C,S.htmlState);h=j.mode.name=="xml"&&j.state.tagStart===null&&!j.state.context&&j.state.tokenize.isInText}h&&(S.f=Oe,S.block=ce,S.htmlState=null)}return S.trailingSpace=0,S.trailingSpaceNewLine=!1,S.prevLine=S.thisLine,S.thisLine={stream:null},null}function ce(S,h){var j=S.column()===h.indentation,Ae=te(h.prevLine.stream),Fe=h.indentedCode,et=h.prevLine.hr,dt=h.list!==!1,$e=(h.listStack[h.listStack.length-1]||0)+3;h.indentedCode=!1;var ut=h.indentation;if(h.indentationDiff===null&&(h.indentationDiff=h.indentation,dt)){for(h.list=null;ut=4&&(Fe||h.prevLine.fencedCodeEnd||h.prevLine.header||Ae))return S.skipToEnd(),h.indentedCode=!0,x.code;if(S.eatSpace())return null;if(j&&h.indentation<=$e&&(tt=S.match(X))&&tt[1].length<=6)return h.quote=0,h.header=tt[1].length,h.thisLine.header=!0,v.highlightFormatting&&(h.formatting="header"),h.f=h.inline,ne(h);if(h.indentation<=$e&&S.eat(">"))return h.quote=j?1:h.quote+1,v.highlightFormatting&&(h.formatting="quote"),S.eatSpace(),ne(h);if(!ze&&!h.setext&&j&&h.indentation<=$e&&(tt=S.match(U))){var nt=tt[1]?"ol":"ul";return h.indentation=ut+S.current().length,h.list=!0,h.quote=0,h.listStack.push(h.indentation),h.em=!1,h.strong=!1,h.code=!1,h.strikethrough=!1,v.taskLists&&S.match(_,!1)&&(h.taskList=!0),h.f=h.inline,v.highlightFormatting&&(h.formatting=["list","list-"+nt]),ne(h)}else{if(j&&h.indentation<=$e&&(tt=S.match(J,!0)))return h.quote=0,h.fencedEndRE=new RegExp(tt[1]+"+ *$"),h.localMode=v.fencedCodeBlockHighlighting&&D(tt[2]||v.fencedCodeBlockDefaultMode),h.localMode&&(h.localState=c.startState(h.localMode)),h.f=h.block=Ke,v.highlightFormatting&&(h.formatting="code-block"),h.code=-1,ne(h);if(h.setext||(!We||!dt)&&!h.quote&&h.list===!1&&!h.code&&!ze&&!$.test(S.string)&&(tt=S.lookAhead(1))&&(tt=tt.match(Y)))return h.setext?(h.header=h.setext,h.setext=0,S.skipToEnd(),v.highlightFormatting&&(h.formatting="header")):(h.header=tt[0].charAt(0)=="="?1:2,h.setext=h.header),h.thisLine.header=!0,h.f=h.inline,ne(h);if(ze)return S.skipToEnd(),h.hr=!0,h.thisLine.hr=!0,x.hr;if(S.peek()==="[")return P(S,h,ye)}return P(S,h,h.inline)}function xe(S,h){var j=C.token(S,h.htmlState);if(!m){var Ae=c.innerMode(C,h.htmlState);(Ae.mode.name=="xml"&&Ae.state.tagStart===null&&!Ae.state.context&&Ae.state.tokenize.isInText||h.md_inside&&S.current().indexOf(">")>-1)&&(h.f=Oe,h.block=ce,h.htmlState=null)}return j}function Ke(S,h){var j=h.listStack[h.listStack.length-1]||0,Ae=h.indentation=S.quote?h.push(x.formatting+"-"+S.formatting[j]+"-"+S.quote):h.push("error"))}if(S.taskOpen)return h.push("meta"),h.length?h.join(" "):null;if(S.taskClosed)return h.push("property"),h.length?h.join(" "):null;if(S.linkHref?h.push(x.linkHref,"url"):(S.strong&&h.push(x.strong),S.em&&h.push(x.em),S.strikethrough&&h.push(x.strikethrough),S.emoji&&h.push(x.emoji),S.linkText&&h.push(x.linkText),S.code&&h.push(x.code),S.image&&h.push(x.image),S.imageAltText&&h.push(x.imageAltText,"link"),S.imageMarker&&h.push(x.imageMarker)),S.header&&h.push(x.header,x.header+"-"+S.header),S.quote&&(h.push(x.quote),!v.maxBlockquoteDepth||v.maxBlockquoteDepth>=S.quote?h.push(x.quote+"-"+S.quote):h.push(x.quote+"-"+v.maxBlockquoteDepth)),S.list!==!1){var Ae=(S.listStack.length-1)%3;Ae?Ae===1?h.push(x.list2):h.push(x.list3):h.push(x.list1)}return S.trailingSpaceNewLine?h.push("trailing-space-new-line"):S.trailingSpace&&h.push("trailing-space-"+(S.trailingSpace%2?"a":"b")),h.length?h.join(" "):null}function Be(S,h){if(S.match(oe,!0))return ne(h)}function Oe(S,h){var j=h.text(S,h);if(typeof j<"u")return j;if(h.list)return h.list=null,ne(h);if(h.taskList){var Ae=S.match(_,!0)[1]===" ";return Ae?h.taskOpen=!0:h.taskClosed=!0,v.highlightFormatting&&(h.formatting="task"),h.taskList=!1,ne(h)}if(h.taskOpen=!1,h.taskClosed=!1,h.header&&S.match(/^#+$/,!0))return v.highlightFormatting&&(h.formatting="header"),ne(h);var Fe=S.next();if(h.linkTitle){h.linkTitle=!1;var et=Fe;Fe==="("&&(et=")"),et=(et+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var dt="^\\s*(?:[^"+et+"\\\\]+|\\\\\\\\|\\\\.)"+et;if(S.match(new RegExp(dt),!0))return x.linkHref}if(Fe==="`"){var $e=h.formatting;v.highlightFormatting&&(h.formatting="code"),S.eatWhile("`");var ut=S.current().length;if(h.code==0&&(!h.quote||ut==1))return h.code=ut,ne(h);if(ut==h.code){var We=ne(h);return h.code=0,We}else return h.formatting=$e,ne(h)}else if(h.code)return ne(h);if(Fe==="\\"&&(S.next(),v.highlightFormatting)){var ze=ne(h),tt=x.formatting+"-escape";return ze?ze+" "+tt:tt}if(Fe==="!"&&S.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return h.imageMarker=!0,h.image=!0,v.highlightFormatting&&(h.formatting="image"),ne(h);if(Fe==="["&&h.imageMarker&&S.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return h.imageMarker=!1,h.imageAltText=!0,v.highlightFormatting&&(h.formatting="image"),ne(h);if(Fe==="]"&&h.imageAltText){v.highlightFormatting&&(h.formatting="image");var ze=ne(h);return h.imageAltText=!1,h.image=!1,h.inline=h.f=M,ze}if(Fe==="["&&!h.image)return h.linkText&&S.match(/^.*?\]/)||(h.linkText=!0,v.highlightFormatting&&(h.formatting="link")),ne(h);if(Fe==="]"&&h.linkText){v.highlightFormatting&&(h.formatting="link");var ze=ne(h);return h.linkText=!1,h.inline=h.f=S.match(/\(.*?\)| ?\[.*?\]/,!1)?M:Oe,ze}if(Fe==="<"&&S.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){h.f=h.inline=Ce,v.highlightFormatting&&(h.formatting="link");var ze=ne(h);return ze?ze+=" ":ze="",ze+x.linkInline}if(Fe==="<"&&S.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){h.f=h.inline=Ce,v.highlightFormatting&&(h.formatting="link");var ze=ne(h);return ze?ze+=" ":ze="",ze+x.linkEmail}if(v.xml&&Fe==="<"&&S.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var nt=S.string.indexOf(">",S.pos);if(nt!=-1){var be=S.string.substring(S.start,nt);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(be)&&(h.md_inside=!0)}return S.backUp(1),h.htmlState=c.startState(C),G(S,h,xe)}if(v.xml&&Fe==="<"&&S.match(/^\/\w*?>/))return h.md_inside=!1,"tag";if(Fe==="*"||Fe==="_"){for(var Lt=1,yt=S.pos==1?" ":S.string.charAt(S.pos-2);Lt<3&&S.eat(Fe);)Lt++;var kt=S.peek()||" ",Nt=!/\s/.test(kt)&&(!R.test(kt)||/\s/.test(yt)||R.test(yt)),Re=!/\s/.test(yt)&&(!R.test(yt)||/\s/.test(kt)||R.test(kt)),Mt=null,$t=null;if(Lt%2&&(!h.em&&Nt&&(Fe==="*"||!Re||R.test(yt))?Mt=!0:h.em==Fe&&Re&&(Fe==="*"||!Nt||R.test(kt))&&(Mt=!1)),Lt>1&&(!h.strong&&Nt&&(Fe==="*"||!Re||R.test(yt))?$t=!0:h.strong==Fe&&Re&&(Fe==="*"||!Nt||R.test(kt))&&($t=!1)),$t!=null||Mt!=null){v.highlightFormatting&&(h.formatting=Mt==null?"strong":$t==null?"em":"strong em"),Mt===!0&&(h.em=Fe),$t===!0&&(h.strong=Fe);var We=ne(h);return Mt===!1&&(h.em=!1),$t===!1&&(h.strong=!1),We}}else if(Fe===" "&&(S.eat("*")||S.eat("_"))){if(S.peek()===" ")return ne(h);S.backUp(1)}if(v.strikethrough){if(Fe==="~"&&S.eatWhile(Fe)){if(h.strikethrough){v.highlightFormatting&&(h.formatting="strikethrough");var We=ne(h);return h.strikethrough=!1,We}else if(S.match(/^[^\s]/,!1))return h.strikethrough=!0,v.highlightFormatting&&(h.formatting="strikethrough"),ne(h)}else if(Fe===" "&&S.match("~~",!0)){if(S.peek()===" ")return ne(h);S.backUp(2)}}if(v.emoji&&Fe===":"&&S.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){h.emoji=!0,v.highlightFormatting&&(h.formatting="emoji");var sn=ne(h);return h.emoji=!1,sn}return Fe===" "&&(S.match(/^ +$/,!1)?h.trailingSpace++:h.trailingSpace&&(h.trailingSpaceNewLine=!0)),ne(h)}function Ce(S,h){var j=S.next();if(j===">"){h.f=h.inline=Oe,v.highlightFormatting&&(h.formatting="link");var Ae=ne(h);return Ae?Ae+=" ":Ae="",Ae+x.linkInline}return S.match(/^[^>]+/,!0),x.linkInline}function M(S,h){if(S.eatSpace())return null;var j=S.next();return j==="("||j==="["?(h.f=h.inline=Q(j==="("?")":"]"),v.highlightFormatting&&(h.formatting="link-string"),h.linkHref=!0,ne(h)):"error"}var ee={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Q(S){return function(h,j){var Ae=h.next();if(Ae===S){j.f=j.inline=Oe,v.highlightFormatting&&(j.formatting="link-string");var Fe=ne(j);return j.linkHref=!1,Fe}return h.match(ee[S]),j.linkHref=!0,ne(j)}}function ye(S,h){return S.match(/^([^\]\\]|\\.)*\]:/,!1)?(h.f=Pe,S.next(),v.highlightFormatting&&(h.formatting="link"),h.linkText=!0,ne(h)):P(S,h,Oe)}function Pe(S,h){if(S.match("]:",!0)){h.f=h.inline=lt,v.highlightFormatting&&(h.formatting="link");var j=ne(h);return h.linkText=!1,j}return S.match(/^([^\]\\]|\\.)+/,!0),x.linkText}function lt(S,h){return S.eatSpace()?null:(S.match(/^[^\s]+/,!0),S.peek()===void 0?h.linkTitle=!0:S.match(/^(?:\s+(?:"(?:[^"\\]|\\.)+"|'(?:[^'\\]|\\.)+'|\((?:[^)\\]|\\.)+\)))?/,!0),h.f=h.inline=Oe,x.linkHref+" url")}var Ze={startState:function(){return{f:ce,prevLine:{stream:null},thisLine:{stream:null},block:ce,htmlState:null,indentation:0,inline:Oe,text:Be,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(S){return{f:S.f,prevLine:S.prevLine,thisLine:S.thisLine,block:S.block,htmlState:S.htmlState&&c.copyState(C,S.htmlState),indentation:S.indentation,localMode:S.localMode,localState:S.localMode?c.copyState(S.localMode,S.localState):null,inline:S.inline,text:S.text,formatting:!1,linkText:S.linkText,linkTitle:S.linkTitle,linkHref:S.linkHref,code:S.code,em:S.em,strong:S.strong,strikethrough:S.strikethrough,emoji:S.emoji,header:S.header,setext:S.setext,hr:S.hr,taskList:S.taskList,list:S.list,listStack:S.listStack.slice(0),quote:S.quote,indentedCode:S.indentedCode,trailingSpace:S.trailingSpace,trailingSpaceNewLine:S.trailingSpaceNewLine,md_inside:S.md_inside,fencedEndRE:S.fencedEndRE}},token:function(S,h){if(h.formatting=!1,S!=h.thisLine.stream){if(h.header=0,h.hr=!1,S.match(/^\s*$/,!0))return Z(h),null;if(h.prevLine=h.thisLine,h.thisLine={stream:S},h.taskList=!1,h.trailingSpace=0,h.trailingSpaceNewLine=!1,!h.localState&&(h.f=h.block,h.f!=xe)){var j=S.match(/^\s*/,!0)[0].replace(/\t/g,H).length;if(h.indentation=j,h.indentationDiff=null,j>0)return null}}return h.f(S,h)},innerMode:function(S){return S.block==xe?{state:S.htmlState,mode:C}:S.localState?{state:S.localState,mode:S.localMode}:{state:S,mode:Ze}},indent:function(S,h,j){return S.block==xe&&C.indent?C.indent(S.htmlState,h,j):S.localState&&S.localMode.indent?S.localMode.indent(S.localState,h,j):c.Pass},blankLine:Z,getType:ne,blockCommentStart:"",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Ze},"xml"),c.defineMIME("text/markdown","markdown"),c.defineMIME("text/x-markdown","markdown")})})();var ic=ec.exports,ac={exports:{}};(function(s,g){(function(c){c(Zt)})(function(c){c.overlayMode=function(p,v,C){return{startState:function(){return{base:c.startState(p),overlay:c.startState(v),basePos:0,baseCur:null,overlayPos:0,overlayCur:null,streamSeen:null}},copyState:function(m){return{base:c.copyState(p,m.base),overlay:c.copyState(v,m.overlay),basePos:m.basePos,baseCur:null,overlayPos:m.overlayPos,overlayCur:null}},token:function(m,D){return(m!=D.streamSeen||Math.min(D.basePos,D.overlayPos)=Y.line,te=G?Y:m(P,0),Z=_.markText(H,te,{className:$});if(oe==null?J.push(Z):J.splice(oe++,0,Z),G)break;R=P}}function E(_){for(var X=_.state.markedSelection,Y=0;Y1)return z(_);var X=_.getCursor("start"),Y=_.getCursor("end"),oe=_.state.markedSelection;if(!oe.length)return x(_,X,Y);var J=oe[0].find(),$=oe[oe.length-1].find();if(!J||!$||Y.line-X.line<=C||D(X,$.to)>=0||D(Y,J.from)<=0)return z(_);for(;D(X,J.from)>0;)oe.shift().clear(),J=oe[0].find();for(D(X,J.from)<0&&(J.to.line-X.line0&&(Y.line-$.from.linece);xe++){var Ke=R.getLine(Z++);G=G==null?Ke:G+` +`+Ke}te=te*2,H.lastIndex=P.ch;var ne=H.exec(G);if(ne){var Be=G.slice(0,ne.index).split(` +`),Oe=ne[0].split(` +`),Ce=P.line+Be.length-1,M=Be[Be.length-1].length;return{from:p(Ce,M),to:p(Ce+Oe.length-1,Oe.length==1?M+Oe[0].length:Oe[Oe.length-1].length),match:ne}}}}function E(R,H,P){for(var G,te=0;te<=R.length;){H.lastIndex=te;var Z=H.exec(R);if(!Z)break;var ce=Z.index+Z[0].length;if(ce>R.length-P)break;(!G||ce>G.index+G[0].length)&&(G=Z),te=Z.index+1}return G}function z(R,H,P){H=C(H,"g");for(var G=P.line,te=P.ch,Z=R.firstLine();G>=Z;G--,te=-1){var ce=R.getLine(G),xe=E(ce,H,te<0?0:ce.length-te);if(xe)return{from:p(G,xe.index),to:p(G,xe.index+xe[0].length),match:xe}}}function U(R,H,P){if(!m(H))return z(R,H,P);H=C(H,"gm");for(var G,te=1,Z=R.getLine(P.line).length-P.ch,ce=P.line,xe=R.firstLine();ce>=xe;){for(var Ke=0;Ke=xe;Ke++){var ne=R.getLine(ce--);G=G==null?ne:ne+` +`+G}te*=2;var Be=E(G,H,Z);if(Be){var Oe=G.slice(0,Be.index).split(` +`),Ce=Be[0].split(` +`),M=ce+Oe.length,ee=Oe[Oe.length-1].length;return{from:p(M,ee),to:p(M+Ce.length-1,Ce.length==1?ee+Ce[0].length:Ce[Ce.length-1].length),match:Be}}}}var _,X;String.prototype.normalize?(_=function(R){return R.normalize("NFD").toLowerCase()},X=function(R){return R.normalize("NFD")}):(_=function(R){return R.toLowerCase()},X=function(R){return R});function Y(R,H,P,G){if(R.length==H.length)return P;for(var te=0,Z=P+Math.max(0,R.length-H.length);;){if(te==Z)return te;var ce=te+Z>>1,xe=G(R.slice(0,ce)).length;if(xe==P)return ce;xe>P?Z=ce:te=ce+1}}function oe(R,H,P,G){if(!H.length)return null;var te=G?_:X,Z=te(H).split(/\r|\n\r?/);e:for(var ce=P.line,xe=P.ch,Ke=R.lastLine()+1-Z.length;ce<=Ke;ce++,xe=0){var ne=R.getLine(ce).slice(xe),Be=te(ne);if(Z.length==1){var Oe=Be.indexOf(Z[0]);if(Oe==-1)continue e;var P=Y(ne,Be,Oe,te)+xe;return{from:p(ce,Y(ne,Be,Oe,te)+xe),to:p(ce,Y(ne,Be,Oe+Z[0].length,te)+xe)}}else{var Ce=Be.length-Z[0].length;if(Be.slice(Ce)!=Z[0])continue e;for(var M=1;M=Ke;ce--,xe=-1){var ne=R.getLine(ce);xe>-1&&(ne=ne.slice(0,xe));var Be=te(ne);if(Z.length==1){var Oe=Be.lastIndexOf(Z[0]);if(Oe==-1)continue e;return{from:p(ce,Y(ne,Be,Oe,te)),to:p(ce,Y(ne,Be,Oe+Z[0].length,te))}}else{var Ce=Z[Z.length-1];if(Be.slice(0,Ce.length)!=Ce)continue e;for(var M=1,P=ce-Z.length+1;M(this.doc.getLine(H.line)||"").length&&(H.ch=0,H.line++)),c.cmpPos(H,this.doc.clipPos(H))!=0))return this.atOccurrence=!1;var P=this.matches(R,H);if(this.afterEmptyMatch=P&&c.cmpPos(P.from,P.to)==0,P)return this.pos=P,this.atOccurrence=!0,this.pos.match||!0;var G=p(R?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:G,to:G},this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(R,H){if(this.atOccurrence){var P=c.splitLines(R);this.doc.replaceRange(P,this.pos.from,this.pos.to,H),this.pos.to=p(this.pos.from.line+P.length-1,P[P.length-1].length+(P.length==1?this.pos.from.ch:0))}}},c.defineExtension("getSearchCursor",function(R,H,P){return new $(this.doc,R,H,P)}),c.defineDocExtension("getSearchCursor",function(R,H,P){return new $(this,R,H,P)}),c.defineExtension("selectMatches",function(R,H){for(var P=[],G=this.getSearchCursor(R,this.getCursor("from"),H);G.findNext()&&!(c.cmpPos(G.to(),this.getCursor("to"))>0);)P.push({anchor:G.from(),head:G.to()});P.length&&this.setSelections(P,0)})})})();(function(s,g){(function(c){c(Zt,ic,oc)})(function(c){var p=/^((?:(?:aaas?|about|acap|adiumxtra|af[ps]|aim|apt|attachment|aw|beshare|bitcoin|bolo|callto|cap|chrome(?:-extension)?|cid|coap|com-eventbrite-attendee|content|crid|cvs|data|dav|dict|dlna-(?:playcontainer|playsingle)|dns|doi|dtn|dvb|ed2k|facetime|feed|file|finger|fish|ftp|geo|gg|git|gizmoproject|go|gopher|gtalk|h323|hcp|https?|iax|icap|icon|im|imap|info|ipn|ipp|irc[6s]?|iris(?:\.beep|\.lwz|\.xpc|\.xpcs)?|itms|jar|javascript|jms|keyparc|lastfm|ldaps?|magnet|mailto|maps|market|message|mid|mms|ms-help|msnim|msrps?|mtqp|mumble|mupdate|mvn|news|nfs|nih?|nntp|notes|oid|opaquelocktoken|palm|paparazzi|platform|pop|pres|proxy|psyc|query|res(?:ource)?|rmi|rsync|rtmp|rtsp|secondlife|service|session|sftp|sgn|shttp|sieve|sips?|skype|sm[bs]|snmp|soap\.beeps?|soldat|spotify|ssh|steam|svn|tag|teamspeak|tel(?:net)?|tftp|things|thismessage|tip|tn3270|tv|udp|unreal|urn|ut2004|vemmi|ventrilo|view-source|webcal|wss?|wtai|wyciwyg|xcon(?:-userid)?|xfire|xmlrpc\.beeps?|xmpp|xri|ymsgr|z39\.50[rs]?):(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]|\([^\s()<>]*\))+(?:\([^\s()<>]*\)|[^\s`*!()\[\]{};:'".,<>?«»“”‘’]))/i;c.defineMode("gfm",function(v,C){var m=0;function D(U){return U.code=!1,null}var x={startState:function(){return{code:!1,codeBlock:!1,ateSpace:!1}},copyState:function(U){return{code:U.code,codeBlock:U.codeBlock,ateSpace:U.ateSpace}},token:function(U,_){if(_.combineTokens=null,_.codeBlock)return U.match(/^```+/)?(_.codeBlock=!1,null):(U.skipToEnd(),null);if(U.sol()&&(_.code=!1),U.sol()&&U.match(/^```+/))return U.skipToEnd(),_.codeBlock=!0,null;if(U.peek()==="`"){U.next();var X=U.pos;U.eatWhile("`");var Y=1+U.pos-X;return _.code?Y===m&&(_.code=!1):(m=Y,_.code=!0),null}else if(_.code)return U.next(),null;if(U.eatSpace())return _.ateSpace=!0,null;if((U.sol()||_.ateSpace)&&(_.ateSpace=!1,C.gitHubSpice!==!1)){if(U.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+@)?(?=.{0,6}\d)(?:[a-f0-9]{7,40}\b)/))return _.combineTokens=!0,"link";if(U.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+)?#[0-9]+\b/))return _.combineTokens=!0,"link"}return U.match(p)&&U.string.slice(U.start-2,U.start)!="]("&&(U.start==0||/\W/.test(U.string.charAt(U.start-1)))?(_.combineTokens=!0,"link"):(U.next(),null)},blankLine:D},E={taskLists:!0,strikethrough:!0,emoji:!0};for(var z in C)E[z]=C[z];return E.name="markdown",c.overlayMode(c.getMode(v,E),x)},"markdown"),c.defineMIME("text/x-gfm","gfm")})})();function lc(s){throw new Error('Could not dynamically require "'+s+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Rs={exports:{}};const sc={},uc=Object.freeze(Object.defineProperty({__proto__:null,default:sc},Symbol.toStringTag,{value:"Module"})),fc=Vf(uc);(function(s){var g;(function(){g=function(c,p,v,C){C=C||{},this.dictionary=null,this.rules={},this.dictionaryTable={},this.compoundRules=[],this.compoundRuleCodes={},this.replacementTable=[],this.flags=C.flags||{},this.memoized={},this.loaded=!1;var m=this,D,x,E,z,U;c&&(m.dictionary=c,p&&v?oe():typeof window<"u"&&"chrome"in window&&"extension"in window.chrome&&"getURL"in window.chrome.extension?(C.dictionaryPath?D=C.dictionaryPath:D="typo/dictionaries",p||_(chrome.extension.getURL(D+"/"+c+"/"+c+".aff"),X),v||_(chrome.extension.getURL(D+"/"+c+"/"+c+".dic"),Y)):(C.dictionaryPath?D=C.dictionaryPath:typeof __dirname<"u"?D=__dirname+"/dictionaries":D="./dictionaries",p||_(D+"/"+c+"/"+c+".aff",X),v||_(D+"/"+c+"/"+c+".dic",Y)));function _(J,$){var R=m._readFile(J,null,C.asyncLoad);C.asyncLoad?R.then(function(H){$(H)}):$(R)}function X(J){p=J,v&&oe()}function Y(J){v=J,p&&oe()}function oe(){for(m.rules=m._parseAFF(p),m.compoundRuleCodes={},x=0,z=m.compoundRules.length;x0&&(Z.continuationClasses=G),te!=="."&&(Y==="SFX"?Z.match=new RegExp(te+"$"):Z.match=new RegExp("^"+te)),R!="0"&&(Y==="SFX"?Z.remove=new RegExp(R+"$"):Z.remove=R),$.push(Z)}p[oe]={type:Y,combineable:J=="Y",entries:$},x+=m}else if(Y==="COMPOUNDRULE"){for(m=parseInt(X[1],10),E=x+1,U=x+1+m;E0&&(v[ne]===null&&(v[ne]=[]),v[ne].push(Be))}for(var m=1,D=p.length;m1){var U=this.parseRuleCodes(E[1]);(!("NEEDAFFIX"in this.flags)||U.indexOf(this.flags.NEEDAFFIX)==-1)&&C(z,U);for(var _=0,X=U.length;_"u"){if("COMPOUNDMIN"in this.flags&&c.length>=this.flags.COMPOUNDMIN){for(v=0,C=this.compoundRules.length;v"u"&&(v=Array.prototype.concat.apply([],this.dictionaryTable[c])),v&&v.indexOf(this.flags[p])!==-1))},alphabet:"",suggest:function(c,p){if(!this.loaded)throw"Dictionary not loaded.";if(p=p||5,this.memoized.hasOwnProperty(c)){var v=this.memoized[c].limit;if(p<=v||this.memoized[c].suggestions.length1&&Z[1][1]!==Z[1][0]&&(P=Z[0]+Z[1][1]+Z[1][0]+Z[1].substring(2),(!oe||U.check(P))&&(P in J?J[P]+=1:J[P]=1)),Z[1]){var ce=Z[1].substring(0,1).toUpperCase()===Z[1].substring(0,1)?"uppercase":"lowercase";for(R=0;RBe?1:Ke[0].localeCompare(xe[0])}P.sort(G).reverse();var te=[],Z="lowercase";Y.toUpperCase()===Y?Z="uppercase":Y.substr(0,1).toUpperCase()+Y.substr(1).toLowerCase()===Y&&(Z="capitalized");var ce=p;for(H=0;HN.length)&&(I=N.length);for(var F=0,d=new Array(I);F=N.length?{done:!0}:{done:!1,value:N[d++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function D(N,I){if(typeof N!="object"||N===null)return N;var F=N[Symbol.toPrimitive];if(F!==void 0){var d=F.call(N,I);if(typeof d!="object")return d;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(N)}function x(N){var I=D(N,"string");return typeof I=="symbol"?I:String(I)}function E(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,hooks:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}s.defaults=E();function z(N){s.defaults=N}var U=/[&<>"']/,_=new RegExp(U.source,"g"),X=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,Y=new RegExp(X.source,"g"),oe={"&":"&","<":"<",">":">",'"':""","'":"'"},J=function(I){return oe[I]};function $(N,I){if(I){if(U.test(N))return N.replace(_,J)}else if(X.test(N))return N.replace(Y,J);return N}var R=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function H(N){return N.replace(R,function(I,F){return F=F.toLowerCase(),F==="colon"?":":F.charAt(0)==="#"?F.charAt(1)==="x"?String.fromCharCode(parseInt(F.substring(2),16)):String.fromCharCode(+F.substring(1)):""})}var P=/(^|[^\[])\^/g;function G(N,I){N=typeof N=="string"?N:N.source,I=I||"";var F={replace:function(y,A){return A=A.source||A,A=A.replace(P,"$1"),N=N.replace(y,A),F},getRegex:function(){return new RegExp(N,I)}};return F}var te=/[^\w:]/g,Z=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function ce(N,I,F){if(N){var d;try{d=decodeURIComponent(H(F)).replace(te,"").toLowerCase()}catch{return null}if(d.indexOf("javascript:")===0||d.indexOf("vbscript:")===0||d.indexOf("data:")===0)return null}I&&!Z.test(F)&&(F=Oe(I,F));try{F=encodeURI(F).replace(/%25/g,"%")}catch{return null}return F}var xe={},Ke=/^[^:]+:\/*[^/]*$/,ne=/^([^:]+:)[\s\S]*$/,Be=/^([^:]+:\/*[^/]*)[\s\S]*$/;function Oe(N,I){xe[" "+N]||(Ke.test(N)?xe[" "+N]=N+"/":xe[" "+N]=ee(N,"/",!0)),N=xe[" "+N];var F=N.indexOf(":")===-1;return I.substring(0,2)==="//"?F?I:N.replace(ne,"$1")+I:I.charAt(0)==="/"?F?I:N.replace(Be,"$1")+I:N+I}var Ce={exec:function(){}};function M(N,I){var F=N.replace(/\|/g,function(A,k,T){for(var ie=!1,de=k;--de>=0&&T[de]==="\\";)ie=!ie;return ie?"|":" |"}),d=F.split(/ \|/),y=0;if(d[0].trim()||d.shift(),d.length>0&&!d[d.length-1].trim()&&d.pop(),d.length>I)d.splice(I);else for(;d.length1;)I&1&&(F+=N),I>>=1,N+=N;return F+N}function lt(N,I,F,d){var y=I.href,A=I.title?$(I.title):null,k=N[1].replace(/\\([\[\]])/g,"$1");if(N[0].charAt(0)!=="!"){d.state.inLink=!0;var T={type:"link",raw:F,href:y,title:A,text:k,tokens:d.inlineTokens(k)};return d.state.inLink=!1,T}return{type:"image",raw:F,href:y,title:A,text:$(k)}}function Ze(N,I){var F=N.match(/^(\s+)(?:```)/);if(F===null)return I;var d=F[1];return I.split(` +`).map(function(y){var A=y.match(/^\s+/);if(A===null)return y;var k=A[0];return k.length>=d.length?y.slice(d.length):y}).join(` +`)}var S=function(){function N(F){this.options=F||s.defaults}var I=N.prototype;return I.space=function(d){var y=this.rules.block.newline.exec(d);if(y&&y[0].length>0)return{type:"space",raw:y[0]}},I.code=function(d){var y=this.rules.block.code.exec(d);if(y){var A=y[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:y[0],codeBlockStyle:"indented",text:this.options.pedantic?A:ee(A,` +`)}}},I.fences=function(d){var y=this.rules.block.fences.exec(d);if(y){var A=y[0],k=Ze(A,y[3]||"");return{type:"code",raw:A,lang:y[2]?y[2].trim().replace(this.rules.inline._escapes,"$1"):y[2],text:k}}},I.heading=function(d){var y=this.rules.block.heading.exec(d);if(y){var A=y[2].trim();if(/#$/.test(A)){var k=ee(A,"#");(this.options.pedantic||!k||/ $/.test(k))&&(A=k.trim())}return{type:"heading",raw:y[0],depth:y[1].length,text:A,tokens:this.lexer.inline(A)}}},I.hr=function(d){var y=this.rules.block.hr.exec(d);if(y)return{type:"hr",raw:y[0]}},I.blockquote=function(d){var y=this.rules.block.blockquote.exec(d);if(y){var A=y[0].replace(/^ *>[ \t]?/gm,""),k=this.lexer.state.top;this.lexer.state.top=!0;var T=this.lexer.blockTokens(A);return this.lexer.state.top=k,{type:"blockquote",raw:y[0],tokens:T,text:A}}},I.list=function(d){var y=this.rules.block.list.exec(d);if(y){var A,k,T,ie,de,ue,ve,Ee,fe,Te,W,qe,Ue=y[1].trim(),Le=Ue.length>1,Me={type:"list",raw:"",ordered:Le,start:Le?+Ue.slice(0,-1):"",loose:!1,items:[]};Ue=Le?"\\d{1,9}\\"+Ue.slice(-1):"\\"+Ue,this.options.pedantic&&(Ue=Le?Ue:"[*+-]");for(var ct=new RegExp("^( {0,3}"+Ue+")((?:[ ][^\\n]*)?(?:\\n|$))");d&&(qe=!1,!(!(y=ct.exec(d))||this.rules.block.hr.test(d)));){if(A=y[0],d=d.substring(A.length),Ee=y[2].split(` +`,1)[0].replace(/^\t+/,function(un){return" ".repeat(3*un.length)}),fe=d.split(` +`,1)[0],this.options.pedantic?(ie=2,W=Ee.trimLeft()):(ie=y[2].search(/[^ ]/),ie=ie>4?1:ie,W=Ee.slice(ie),ie+=y[1].length),ue=!1,!Ee&&/^ *$/.test(fe)&&(A+=fe+` +`,d=d.substring(fe.length+1),qe=!0),!qe)for(var pt=new RegExp("^ {0,"+Math.min(3,ie-1)+"}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))"),Bt=new RegExp("^ {0,"+Math.min(3,ie-1)+"}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)"),Je=new RegExp("^ {0,"+Math.min(3,ie-1)+"}(?:```|~~~)"),Qt=new RegExp("^ {0,"+Math.min(3,ie-1)+"}#");d&&(Te=d.split(` +`,1)[0],fe=Te,this.options.pedantic&&(fe=fe.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!(Je.test(fe)||Qt.test(fe)||pt.test(fe)||Bt.test(d)));){if(fe.search(/[^ ]/)>=ie||!fe.trim())W+=` +`+fe.slice(ie);else{if(ue||Ee.search(/[^ ]/)>=4||Je.test(Ee)||Qt.test(Ee)||Bt.test(Ee))break;W+=` +`+fe}!ue&&!fe.trim()&&(ue=!0),A+=Te+` +`,d=d.substring(Te.length+1),Ee=fe.slice(ie)}Me.loose||(ve?Me.loose=!0:/\n *\n *$/.test(A)&&(ve=!0)),this.options.gfm&&(k=/^\[[ xX]\] /.exec(W),k&&(T=k[0]!=="[ ] ",W=W.replace(/^\[[ xX]\] +/,""))),Me.items.push({type:"list_item",raw:A,task:!!k,checked:T,loose:!1,text:W}),Me.raw+=A}Me.items[Me.items.length-1].raw=A.trimRight(),Me.items[Me.items.length-1].text=W.trimRight(),Me.raw=Me.raw.trimRight();var en=Me.items.length;for(de=0;de0&&qt.some(function(un){return/\n.*\n/.test(un.raw)});Me.loose=wn}if(Me.loose)for(de=0;de$/,"$1").replace(this.rules.inline._escapes,"$1"):"",T=y[3]?y[3].substring(1,y[3].length-1).replace(this.rules.inline._escapes,"$1"):y[3];return{type:"def",tag:A,raw:y[0],href:k,title:T}}},I.table=function(d){var y=this.rules.block.table.exec(d);if(y){var A={type:"table",header:M(y[1]).map(function(ve){return{text:ve}}),align:y[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:y[3]&&y[3].trim()?y[3].replace(/\n[ \t]*$/,"").split(` +`):[]};if(A.header.length===A.align.length){A.raw=y[0];var k=A.align.length,T,ie,de,ue;for(T=0;T/i.test(y[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(y[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(y[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:y[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(y[0]):$(y[0]):y[0]}},I.link=function(d){var y=this.rules.inline.link.exec(d);if(y){var A=y[2].trim();if(!this.options.pedantic&&/^$/.test(A))return;var k=ee(A.slice(0,-1),"\\");if((A.length-k.length)%2===0)return}else{var T=Q(y[2],"()");if(T>-1){var ie=y[0].indexOf("!")===0?5:4,de=ie+y[1].length+T;y[2]=y[2].substring(0,T),y[0]=y[0].substring(0,de).trim(),y[3]=""}}var ue=y[2],ve="";if(this.options.pedantic){var Ee=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(ue);Ee&&(ue=Ee[1],ve=Ee[3])}else ve=y[3]?y[3].slice(1,-1):"";return ue=ue.trim(),/^$/.test(A)?ue=ue.slice(1):ue=ue.slice(1,-1)),lt(y,{href:ue&&ue.replace(this.rules.inline._escapes,"$1"),title:ve&&ve.replace(this.rules.inline._escapes,"$1")},y[0],this.lexer)}},I.reflink=function(d,y){var A;if((A=this.rules.inline.reflink.exec(d))||(A=this.rules.inline.nolink.exec(d))){var k=(A[2]||A[1]).replace(/\s+/g," ");if(k=y[k.toLowerCase()],!k){var T=A[0].charAt(0);return{type:"text",raw:T,text:T}}return lt(A,k,A[0],this.lexer)}},I.emStrong=function(d,y,A){A===void 0&&(A="");var k=this.rules.inline.emStrong.lDelim.exec(d);if(k&&!(k[3]&&A.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDF70-\uDF81\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/))){var T=k[1]||k[2]||"";if(!T||T&&(A===""||this.rules.inline.punctuation.exec(A))){var ie=k[0].length-1,de,ue,ve=ie,Ee=0,fe=k[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(fe.lastIndex=0,y=y.slice(-1*d.length+ie);(k=fe.exec(y))!=null;)if(de=k[1]||k[2]||k[3]||k[4]||k[5]||k[6],!!de){if(ue=de.length,k[3]||k[4]){ve+=ue;continue}else if((k[5]||k[6])&&ie%3&&!((ie+ue)%3)){Ee+=ue;continue}if(ve-=ue,!(ve>0)){ue=Math.min(ue,ue+ve+Ee);var Te=d.slice(0,ie+k.index+(k[0].length-de.length)+ue);if(Math.min(ie,ue)%2){var W=Te.slice(1,-1);return{type:"em",raw:Te,text:W,tokens:this.lexer.inlineTokens(W)}}var qe=Te.slice(2,-2);return{type:"strong",raw:Te,text:qe,tokens:this.lexer.inlineTokens(qe)}}}}}},I.codespan=function(d){var y=this.rules.inline.code.exec(d);if(y){var A=y[2].replace(/\n/g," "),k=/[^ ]/.test(A),T=/^ /.test(A)&&/ $/.test(A);return k&&T&&(A=A.substring(1,A.length-1)),A=$(A,!0),{type:"codespan",raw:y[0],text:A}}},I.br=function(d){var y=this.rules.inline.br.exec(d);if(y)return{type:"br",raw:y[0]}},I.del=function(d){var y=this.rules.inline.del.exec(d);if(y)return{type:"del",raw:y[0],text:y[2],tokens:this.lexer.inlineTokens(y[2])}},I.autolink=function(d,y){var A=this.rules.inline.autolink.exec(d);if(A){var k,T;return A[2]==="@"?(k=$(this.options.mangle?y(A[1]):A[1]),T="mailto:"+k):(k=$(A[1]),T=k),{type:"link",raw:A[0],text:k,href:T,tokens:[{type:"text",raw:k,text:k}]}}},I.url=function(d,y){var A;if(A=this.rules.inline.url.exec(d)){var k,T;if(A[2]==="@")k=$(this.options.mangle?y(A[0]):A[0]),T="mailto:"+k;else{var ie;do ie=A[0],A[0]=this.rules.inline._backpedal.exec(A[0])[0];while(ie!==A[0]);k=$(A[0]),A[1]==="www."?T="http://"+A[0]:T=A[0]}return{type:"link",raw:A[0],text:k,href:T,tokens:[{type:"text",raw:k,text:k}]}}},I.inlineText=function(d,y){var A=this.rules.inline.text.exec(d);if(A){var k;return this.lexer.state.inRawBlock?k=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(A[0]):$(A[0]):A[0]:k=$(this.options.smartypants?y(A[0]):A[0]),{type:"text",raw:A[0],text:k}}},N}(),h={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:Ce,lheading:/^((?:.|\n(?!\n))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};h._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/,h._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,h.def=G(h.def).replace("label",h._label).replace("title",h._title).getRegex(),h.bullet=/(?:[*+-]|\d{1,9}[.)])/,h.listItemStart=G(/^( *)(bull) */).replace("bull",h.bullet).getRegex(),h.list=G(h.list).replace(/bull/g,h.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+h.def.source+")").getRegex(),h._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",h._comment=/|$)/,h.html=G(h.html,"i").replace("comment",h._comment).replace("tag",h._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),h.paragraph=G(h._paragraph).replace("hr",h.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",h._tag).getRegex(),h.blockquote=G(h.blockquote).replace("paragraph",h.paragraph).getRegex(),h.normal=p({},h),h.gfm=p({},h.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),h.gfm.table=G(h.gfm.table).replace("hr",h.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",h._tag).getRegex(),h.gfm.paragraph=G(h._paragraph).replace("hr",h.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",h.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",h._tag).getRegex(),h.pedantic=p({},h.normal,{html:G(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",h._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Ce,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:G(h.normal._paragraph).replace("hr",h.hr).replace("heading",` *#{1,6} *[^ +]`).replace("lheading",h.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var j={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Ce,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^(?:[^_*\\]|\\.)*?\_\_(?:[^_*\\]|\\.)*?\*(?:[^_*\\]|\\.)*?(?=\_\_)|(?:[^*\\]|\\.)+(?=[^*])|[punct_](\*+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|(?:[^punct*_\s\\]|\\.)(\*+)(?=[^punct*_\s])/,rDelimUnd:/^(?:[^_*\\]|\\.)*?\*\*(?:[^_*\\]|\\.)*?\_(?:[^_*\\]|\\.)*?(?=\*\*)|(?:[^_\\]|\\.)+(?=[^_])|[punct*](\_+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:Ce,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~",j.punctuation=G(j.punctuation).replace(/punctuation/g,j._punctuation).getRegex(),j.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,j.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g,j._comment=G(h._comment).replace("(?:-->|$)","-->").getRegex(),j.emStrong.lDelim=G(j.emStrong.lDelim).replace(/punct/g,j._punctuation).getRegex(),j.emStrong.rDelimAst=G(j.emStrong.rDelimAst,"g").replace(/punct/g,j._punctuation).getRegex(),j.emStrong.rDelimUnd=G(j.emStrong.rDelimUnd,"g").replace(/punct/g,j._punctuation).getRegex(),j._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,j._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,j._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,j.autolink=G(j.autolink).replace("scheme",j._scheme).replace("email",j._email).getRegex(),j._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,j.tag=G(j.tag).replace("comment",j._comment).replace("attribute",j._attribute).getRegex(),j._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,j._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,j._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,j.link=G(j.link).replace("label",j._label).replace("href",j._href).replace("title",j._title).getRegex(),j.reflink=G(j.reflink).replace("label",j._label).replace("ref",h._label).getRegex(),j.nolink=G(j.nolink).replace("ref",h._label).getRegex(),j.reflinkSearch=G(j.reflinkSearch,"g").replace("reflink",j.reflink).replace("nolink",j.nolink).getRegex(),j.normal=p({},j),j.pedantic=p({},j.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:G(/^!?\[(label)\]\((.*?)\)/).replace("label",j._label).getRegex(),reflink:G(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",j._label).getRegex()}),j.gfm=p({},j.normal,{escape:G(j.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\.5&&(d="x"+d.toString(16)),I+="&#"+d+";";return I}var et=function(){function N(F){this.tokens=[],this.tokens.links=Object.create(null),this.options=F||s.defaults,this.options.tokenizer=this.options.tokenizer||new S,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};var d={block:h.normal,inline:j.normal};this.options.pedantic?(d.block=h.pedantic,d.inline=j.pedantic):this.options.gfm&&(d.block=h.gfm,this.options.breaks?d.inline=j.breaks:d.inline=j.gfm),this.tokenizer.rules=d}N.lex=function(d,y){var A=new N(y);return A.lex(d)},N.lexInline=function(d,y){var A=new N(y);return A.inlineTokens(d)};var I=N.prototype;return I.lex=function(d){d=d.replace(/\r\n|\r/g,` +`),this.blockTokens(d,this.tokens);for(var y;y=this.inlineQueue.shift();)this.inlineTokens(y.src,y.tokens);return this.tokens},I.blockTokens=function(d,y){var A=this;y===void 0&&(y=[]),this.options.pedantic?d=d.replace(/\t/g," ").replace(/^ +$/gm,""):d=d.replace(/^( *)(\t+)/gm,function(ve,Ee,fe){return Ee+" ".repeat(fe.length)});for(var k,T,ie,de;d;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(function(ve){return(k=ve.call({lexer:A},d,y))?(d=d.substring(k.raw.length),y.push(k),!0):!1}))){if(k=this.tokenizer.space(d)){d=d.substring(k.raw.length),k.raw.length===1&&y.length>0?y[y.length-1].raw+=` +`:y.push(k);continue}if(k=this.tokenizer.code(d)){d=d.substring(k.raw.length),T=y[y.length-1],T&&(T.type==="paragraph"||T.type==="text")?(T.raw+=` +`+k.raw,T.text+=` +`+k.text,this.inlineQueue[this.inlineQueue.length-1].src=T.text):y.push(k);continue}if(k=this.tokenizer.fences(d)){d=d.substring(k.raw.length),y.push(k);continue}if(k=this.tokenizer.heading(d)){d=d.substring(k.raw.length),y.push(k);continue}if(k=this.tokenizer.hr(d)){d=d.substring(k.raw.length),y.push(k);continue}if(k=this.tokenizer.blockquote(d)){d=d.substring(k.raw.length),y.push(k);continue}if(k=this.tokenizer.list(d)){d=d.substring(k.raw.length),y.push(k);continue}if(k=this.tokenizer.html(d)){d=d.substring(k.raw.length),y.push(k);continue}if(k=this.tokenizer.def(d)){d=d.substring(k.raw.length),T=y[y.length-1],T&&(T.type==="paragraph"||T.type==="text")?(T.raw+=` +`+k.raw,T.text+=` +`+k.raw,this.inlineQueue[this.inlineQueue.length-1].src=T.text):this.tokens.links[k.tag]||(this.tokens.links[k.tag]={href:k.href,title:k.title});continue}if(k=this.tokenizer.table(d)){d=d.substring(k.raw.length),y.push(k);continue}if(k=this.tokenizer.lheading(d)){d=d.substring(k.raw.length),y.push(k);continue}if(ie=d,this.options.extensions&&this.options.extensions.startBlock&&function(){var ve=1/0,Ee=d.slice(1),fe=void 0;A.options.extensions.startBlock.forEach(function(Te){fe=Te.call({lexer:this},Ee),typeof fe=="number"&&fe>=0&&(ve=Math.min(ve,fe))}),ve<1/0&&ve>=0&&(ie=d.substring(0,ve+1))}(),this.state.top&&(k=this.tokenizer.paragraph(ie))){T=y[y.length-1],de&&T.type==="paragraph"?(T.raw+=` +`+k.raw,T.text+=` +`+k.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=T.text):y.push(k),de=ie.length!==d.length,d=d.substring(k.raw.length);continue}if(k=this.tokenizer.text(d)){d=d.substring(k.raw.length),T=y[y.length-1],T&&T.type==="text"?(T.raw+=` +`+k.raw,T.text+=` +`+k.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=T.text):y.push(k);continue}if(d){var ue="Infinite loop on byte: "+d.charCodeAt(0);if(this.options.silent){console.error(ue);break}else throw new Error(ue)}}return this.state.top=!0,y},I.inline=function(d,y){return y===void 0&&(y=[]),this.inlineQueue.push({src:d,tokens:y}),y},I.inlineTokens=function(d,y){var A=this;y===void 0&&(y=[]);var k,T,ie,de=d,ue,ve,Ee;if(this.tokens.links){var fe=Object.keys(this.tokens.links);if(fe.length>0)for(;(ue=this.tokenizer.rules.inline.reflinkSearch.exec(de))!=null;)fe.includes(ue[0].slice(ue[0].lastIndexOf("[")+1,-1))&&(de=de.slice(0,ue.index)+"["+Pe("a",ue[0].length-2)+"]"+de.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(ue=this.tokenizer.rules.inline.blockSkip.exec(de))!=null;)de=de.slice(0,ue.index)+"["+Pe("a",ue[0].length-2)+"]"+de.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(ue=this.tokenizer.rules.inline.escapedEmSt.exec(de))!=null;)de=de.slice(0,ue.index+ue[0].length-2)+"++"+de.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex),this.tokenizer.rules.inline.escapedEmSt.lastIndex--;for(;d;)if(ve||(Ee=""),ve=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(function(W){return(k=W.call({lexer:A},d,y))?(d=d.substring(k.raw.length),y.push(k),!0):!1}))){if(k=this.tokenizer.escape(d)){d=d.substring(k.raw.length),y.push(k);continue}if(k=this.tokenizer.tag(d)){d=d.substring(k.raw.length),T=y[y.length-1],T&&k.type==="text"&&T.type==="text"?(T.raw+=k.raw,T.text+=k.text):y.push(k);continue}if(k=this.tokenizer.link(d)){d=d.substring(k.raw.length),y.push(k);continue}if(k=this.tokenizer.reflink(d,this.tokens.links)){d=d.substring(k.raw.length),T=y[y.length-1],T&&k.type==="text"&&T.type==="text"?(T.raw+=k.raw,T.text+=k.text):y.push(k);continue}if(k=this.tokenizer.emStrong(d,de,Ee)){d=d.substring(k.raw.length),y.push(k);continue}if(k=this.tokenizer.codespan(d)){d=d.substring(k.raw.length),y.push(k);continue}if(k=this.tokenizer.br(d)){d=d.substring(k.raw.length),y.push(k);continue}if(k=this.tokenizer.del(d)){d=d.substring(k.raw.length),y.push(k);continue}if(k=this.tokenizer.autolink(d,Fe)){d=d.substring(k.raw.length),y.push(k);continue}if(!this.state.inLink&&(k=this.tokenizer.url(d,Fe))){d=d.substring(k.raw.length),y.push(k);continue}if(ie=d,this.options.extensions&&this.options.extensions.startInline&&function(){var W=1/0,qe=d.slice(1),Ue=void 0;A.options.extensions.startInline.forEach(function(Le){Ue=Le.call({lexer:this},qe),typeof Ue=="number"&&Ue>=0&&(W=Math.min(W,Ue))}),W<1/0&&W>=0&&(ie=d.substring(0,W+1))}(),k=this.tokenizer.inlineText(ie,Ae)){d=d.substring(k.raw.length),k.raw.slice(-1)!=="_"&&(Ee=k.raw.slice(-1)),ve=!0,T=y[y.length-1],T&&T.type==="text"?(T.raw+=k.raw,T.text+=k.text):y.push(k);continue}if(d){var Te="Infinite loop on byte: "+d.charCodeAt(0);if(this.options.silent){console.error(Te);break}else throw new Error(Te)}}return y},c(N,null,[{key:"rules",get:function(){return{block:h,inline:j}}}]),N}(),dt=function(){function N(F){this.options=F||s.defaults}var I=N.prototype;return I.code=function(d,y,A){var k=(y||"").match(/\S*/)[0];if(this.options.highlight){var T=this.options.highlight(d,k);T!=null&&T!==d&&(A=!0,d=T)}return d=d.replace(/\n$/,"")+` +`,k?'
'+(A?d:$(d,!0))+`
+`:"
"+(A?d:$(d,!0))+`
+`},I.blockquote=function(d){return`
+`+d+`
+`},I.html=function(d){return d},I.heading=function(d,y,A,k){if(this.options.headerIds){var T=this.options.headerPrefix+k.slug(A);return"'+d+" +`}return""+d+" +`},I.hr=function(){return this.options.xhtml?`
+`:`
+`},I.list=function(d,y,A){var k=y?"ol":"ul",T=y&&A!==1?' start="'+A+'"':"";return"<"+k+T+`> +`+d+" +`},I.listitem=function(d){return"
  • "+d+`
  • +`},I.checkbox=function(d){return" "},I.paragraph=function(d){return"

    "+d+`

    +`},I.table=function(d,y){return y&&(y=""+y+""),` + +`+d+` +`+y+`
    +`},I.tablerow=function(d){return` +`+d+` +`},I.tablecell=function(d,y){var A=y.header?"th":"td",k=y.align?"<"+A+' align="'+y.align+'">':"<"+A+">";return k+d+(" +`)},I.strong=function(d){return""+d+""},I.em=function(d){return""+d+""},I.codespan=function(d){return""+d+""},I.br=function(){return this.options.xhtml?"
    ":"
    "},I.del=function(d){return""+d+""},I.link=function(d,y,A){if(d=ce(this.options.sanitize,this.options.baseUrl,d),d===null)return A;var k='",k},I.image=function(d,y,A){if(d=ce(this.options.sanitize,this.options.baseUrl,d),d===null)return A;var k=''+A+'":">",k},I.text=function(d){return d},N}(),$e=function(){function N(){}var I=N.prototype;return I.strong=function(d){return d},I.em=function(d){return d},I.codespan=function(d){return d},I.del=function(d){return d},I.html=function(d){return d},I.text=function(d){return d},I.link=function(d,y,A){return""+A},I.image=function(d,y,A){return""+A},I.br=function(){return""},N}(),ut=function(){function N(){this.seen={}}var I=N.prototype;return I.serialize=function(d){return d.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},I.getNextSafeSlug=function(d,y){var A=d,k=0;if(this.seen.hasOwnProperty(A)){k=this.seen[d];do k++,A=d+"-"+k;while(this.seen.hasOwnProperty(A))}return y||(this.seen[d]=k,this.seen[A]=0),A},I.slug=function(d,y){y===void 0&&(y={});var A=this.serialize(d);return this.getNextSafeSlug(A,y.dryrun)},N}(),We=function(){function N(F){this.options=F||s.defaults,this.options.renderer=this.options.renderer||new dt,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new $e,this.slugger=new ut}N.parse=function(d,y){var A=new N(y);return A.parse(d)},N.parseInline=function(d,y){var A=new N(y);return A.parseInline(d)};var I=N.prototype;return I.parse=function(d,y){y===void 0&&(y=!0);var A="",k,T,ie,de,ue,ve,Ee,fe,Te,W,qe,Ue,Le,Me,ct,pt,Bt,Je,Qt,en=d.length;for(k=0;k0&&ct.tokens[0].type==="paragraph"?(ct.tokens[0].text=Je+" "+ct.tokens[0].text,ct.tokens[0].tokens&&ct.tokens[0].tokens.length>0&&ct.tokens[0].tokens[0].type==="text"&&(ct.tokens[0].tokens[0].text=Je+" "+ct.tokens[0].tokens[0].text)):ct.tokens.unshift({type:"text",text:Je}):Me+=Je),Me+=this.parse(ct.tokens,Le),Te+=this.renderer.listitem(Me,Bt,pt);A+=this.renderer.list(Te,qe,Ue);continue}case"html":{A+=this.renderer.html(W.text);continue}case"paragraph":{A+=this.renderer.paragraph(this.parseInline(W.tokens));continue}case"text":{for(Te=W.tokens?this.parseInline(W.tokens):W.text;k+1";if(I)return Promise.resolve(y);if(F){F(null,y);return}return y}if(I)return Promise.reject(d);if(F){F(d);return}throw d}}function nt(N,I){return function(F,d,y){typeof d=="function"&&(y=d,d=null);var A=p({},d);d=p({},be.defaults,A);var k=tt(d.silent,d.async,y);if(typeof F>"u"||F===null)return k(new Error("marked(): input parameter is undefined or null"));if(typeof F!="string")return k(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(F)+", string expected"));if(ye(d),d.hooks&&(d.hooks.options=d),y){var T=d.highlight,ie;try{d.hooks&&(F=d.hooks.preprocess(F)),ie=N(F,d)}catch(fe){return k(fe)}var de=function(Te){var W;if(!Te)try{d.walkTokens&&be.walkTokens(ie,d.walkTokens),W=I(ie,d),d.hooks&&(W=d.hooks.postprocess(W))}catch(qe){Te=qe}return d.highlight=T,Te?k(Te):y(null,W)};if(!T||T.length<3||(delete d.highlight,!ie.length))return de();var ue=0;be.walkTokens(ie,function(fe){fe.type==="code"&&(ue++,setTimeout(function(){T(fe.text,fe.lang,function(Te,W){if(Te)return de(Te);W!=null&&W!==fe.text&&(fe.text=W,fe.escaped=!0),ue--,ue===0&&de()})},0))}),ue===0&&de();return}if(d.async)return Promise.resolve(d.hooks?d.hooks.preprocess(F):F).then(function(fe){return N(fe,d)}).then(function(fe){return d.walkTokens?Promise.all(be.walkTokens(fe,d.walkTokens)).then(function(){return fe}):fe}).then(function(fe){return I(fe,d)}).then(function(fe){return d.hooks?d.hooks.postprocess(fe):fe}).catch(k);try{d.hooks&&(F=d.hooks.preprocess(F));var ve=N(F,d);d.walkTokens&&be.walkTokens(ve,d.walkTokens);var Ee=I(ve,d);return d.hooks&&(Ee=d.hooks.postprocess(Ee)),Ee}catch(fe){return k(fe)}}}function be(N,I,F){return nt(et.lex,We.parse)(N,I,F)}be.options=be.setOptions=function(N){return be.defaults=p({},be.defaults,N),z(be.defaults),be},be.getDefaults=E,be.defaults=s.defaults,be.use=function(){for(var N=be.defaults.extensions||{renderers:{},childTokens:{}},I=arguments.length,F=new Array(I),d=0;d)+?/g),ri={toggleBold:Xi,toggleItalic:Yi,drawLink:ia,toggleHeadingSmaller:ii,toggleHeadingBigger:Qi,drawImage:aa,toggleBlockquote:$i,toggleOrderedList:na,toggleUnorderedList:ta,toggleCodeBlock:Zi,togglePreview:fa,toggleStrikethrough:Ki,toggleHeading1:Ji,toggleHeading2:Vi,toggleHeading3:ea,toggleHeading4:mo,toggleHeading5:yo,toggleHeading6:xo,cleanBlock:ra,drawTable:oa,drawHorizontalRule:la,undo:sa,redo:ua,toggleSideBySide:wr,toggleFullScreen:$n},gc={toggleBold:"Cmd-B",toggleItalic:"Cmd-I",drawLink:"Cmd-K",toggleHeadingSmaller:"Cmd-H",toggleHeadingBigger:"Shift-Cmd-H",toggleHeading1:"Ctrl+Alt+1",toggleHeading2:"Ctrl+Alt+2",toggleHeading3:"Ctrl+Alt+3",toggleHeading4:"Ctrl+Alt+4",toggleHeading5:"Ctrl+Alt+5",toggleHeading6:"Ctrl+Alt+6",cleanBlock:"Cmd-E",drawImage:"Cmd-Alt-I",toggleBlockquote:"Cmd-'",toggleOrderedList:"Cmd-Alt-L",toggleUnorderedList:"Cmd-L",toggleCodeBlock:"Cmd-Alt-C",togglePreview:"Cmd-P",toggleSideBySide:"F9",toggleFullScreen:"F11"},vc=function(s){for(var g in ri)if(ri[g]===s)return g;return null},po=function(){var s=!1;return function(g){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(g)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(g.substr(0,4)))&&(s=!0)}(navigator.userAgent||navigator.vendor||window.opera),s};function mc(s){for(var g;(g=pc.exec(s))!==null;){var c=g[0];if(c.indexOf("target=")===-1){var p=c.replace(/>$/,' target="_blank">');s=s.replace(c,p)}}return s}function yc(s){for(var g=new DOMParser,c=g.parseFromString(s,"text/html"),p=c.getElementsByTagName("li"),v=0;v0){for(var X=document.createElement("i"),Y=0;Y=0&&(z=m.getLineHandle(_),!c(z));_--);var $=m.getTokenAt({line:_,ch:1}),R=p($).fencedChars,H,P,G,te;c(m.getLineHandle(D.line))?(H="",P=D.line):c(m.getLineHandle(D.line-1))?(H="",P=D.line-1):(H=R+` +`,P=D.line),c(m.getLineHandle(x.line))?(G="",te=x.line,x.ch===0&&(te+=1)):x.ch!==0&&c(m.getLineHandle(x.line+1))?(G="",te=x.line+1):(G=R+` +`,te=x.line+1),x.ch===0&&(te-=1),m.operation(function(){m.replaceRange(G,{line:te,ch:0},{line:te+(G?0:1),ch:0}),m.replaceRange(H,{line:P,ch:0},{line:P+(H?0:1),ch:0})}),m.setSelection({line:P+(H?1:0),ch:0},{line:te+(H?1:-1),ch:0}),m.focus()}else{var Z=D.line;if(c(m.getLineHandle(D.line))&&(v(m,D.line+1)==="fenced"?(_=D.line,Z=D.line+1):(X=D.line,Z=D.line-1)),_===void 0)for(_=Z;_>=0&&(z=m.getLineHandle(_),!c(z));_--);if(X===void 0)for(Y=m.lineCount(),X=Z;X=0;_--)if(z=m.getLineHandle(_),!z.text.match(/^\s*$/)&&v(m,_,z)!=="indented"){_+=1;break}for(Y=m.lineCount(),X=D.line;X\s+/,"unordered-list":p,"ordered-list":p},E=function(Y,oe){var J={quote:">","unordered-list":c,"ordered-list":"%%i."};return J[Y].replace("%%i",oe)},z=function(Y,oe){var J={quote:">","unordered-list":"\\"+c,"ordered-list":"\\d+."},$=new RegExp(J[Y]);return oe&&$.test(oe)},U=function(Y,oe,J){var $=p.exec(oe),R=E(Y,_);return $!==null?(z(Y,$[2])&&(R=""),oe=$[1]+R+$[3]+oe.replace(v,"").replace(x[Y],"$1")):J==!1&&(oe=R+" "+oe),oe},_=1,X=m.line;X<=D.line;X++)(function(Y){var oe=s.getLine(Y);C[g]?oe=oe.replace(x[g],"$1"):(g=="unordered-list"&&(oe=U("ordered-list",oe,!0)),oe=U(g,oe,!1),_+=1),s.replaceRange(oe,{line:Y,ch:0},{line:Y,ch:99999999999999})})(X);s.focus()}}function qs(s,g,c,p){if(!(!s.codemirror||s.isPreviewActive())){var v=s.codemirror,C=Nn(v),m=C[g];if(!m){Qn(v,m,c,p);return}var D=v.getCursor("start"),x=v.getCursor("end"),E=v.getLine(D.line),z=E.slice(0,D.ch),U=E.slice(D.ch);g=="link"?z=z.replace(/(.*)[^!]\[/,"$1"):g=="image"&&(z=z.replace(/(.*)!\[$/,"$1")),U=U.replace(/]\(.*?\)/,""),v.replaceRange(z+U,{line:D.line,ch:0},{line:D.line,ch:99999999999999}),D.ch-=c[0].length,D!==x&&(x.ch-=c[0].length),v.setSelection(D,x),v.focus()}}function Co(s,g,c,p){if(!(!s.codemirror||s.isPreviewActive())){p=typeof p>"u"?c:p;var v=s.codemirror,C=Nn(v),m,D=c,x=p,E=v.getCursor("start"),z=v.getCursor("end");C[g]?(m=v.getLine(E.line),D=m.slice(0,E.ch),x=m.slice(E.ch),g=="bold"?(D=D.replace(/(\*\*|__)(?![\s\S]*(\*\*|__))/,""),x=x.replace(/(\*\*|__)/,"")):g=="italic"?(D=D.replace(/(\*|_)(?![\s\S]*(\*|_))/,""),x=x.replace(/(\*|_)/,"")):g=="strikethrough"&&(D=D.replace(/(\*\*|~~)(?![\s\S]*(\*\*|~~))/,""),x=x.replace(/(\*\*|~~)/,"")),v.replaceRange(D+x,{line:E.line,ch:0},{line:E.line,ch:99999999999999}),g=="bold"||g=="strikethrough"?(E.ch-=2,E!==z&&(z.ch-=2)):g=="italic"&&(E.ch-=1,E!==z&&(z.ch-=1))):(m=v.getSelection(),g=="bold"?(m=m.split("**").join(""),m=m.split("__").join("")):g=="italic"?(m=m.split("*").join(""),m=m.split("_").join("")):g=="strikethrough"&&(m=m.split("~~").join("")),v.replaceSelection(D+m+x),E.ch+=c.length,z.ch=E.ch+m.length),v.setSelection(E,z),v.focus()}}function Cc(s){if(!s.getWrapperElement().lastChild.classList.contains("editor-preview-active"))for(var g=s.getCursor("start"),c=s.getCursor("end"),p,v=g.line;v<=c.line;v++)p=s.getLine(v),p=p.replace(/^[ ]*([# ]+|\*|-|[> ]+|[0-9]+(.|\)))[ ]*/,""),s.replaceRange(p,{line:v,ch:0},{line:v,ch:99999999999999})}function ji(s,g){if(Math.abs(s)<1024)return""+s+g[0];var c=0;do s/=1024,++c;while(Math.abs(s)>=1024&&c=19968?p+=c[v].length:p+=1;return p}var rt={bold:"fa fa-bold",italic:"fa fa-italic",strikethrough:"fa fa-strikethrough",heading:"fa fa-header fa-heading","heading-smaller":"fa fa-header fa-heading header-smaller","heading-bigger":"fa fa-header fa-heading header-bigger","heading-1":"fa fa-header fa-heading header-1","heading-2":"fa fa-header fa-heading header-2","heading-3":"fa fa-header fa-heading header-3",code:"fa fa-code",quote:"fa fa-quote-left","ordered-list":"fa fa-list-ol","unordered-list":"fa fa-list-ul","clean-block":"fa fa-eraser",link:"fa fa-link",image:"fa fa-image","upload-image":"fa fa-image",table:"fa fa-table","horizontal-rule":"fa fa-minus",preview:"fa fa-eye","side-by-side":"fa fa-columns",fullscreen:"fa fa-arrows-alt",guide:"fa fa-question-circle",undo:"fa fa-undo",redo:"fa fa-repeat fa-redo"},Zn={bold:{name:"bold",action:Xi,className:rt.bold,title:"Bold",default:!0},italic:{name:"italic",action:Yi,className:rt.italic,title:"Italic",default:!0},strikethrough:{name:"strikethrough",action:Ki,className:rt.strikethrough,title:"Strikethrough"},heading:{name:"heading",action:ii,className:rt.heading,title:"Heading",default:!0},"heading-smaller":{name:"heading-smaller",action:ii,className:rt["heading-smaller"],title:"Smaller Heading"},"heading-bigger":{name:"heading-bigger",action:Qi,className:rt["heading-bigger"],title:"Bigger Heading"},"heading-1":{name:"heading-1",action:Ji,className:rt["heading-1"],title:"Big Heading"},"heading-2":{name:"heading-2",action:Vi,className:rt["heading-2"],title:"Medium Heading"},"heading-3":{name:"heading-3",action:ea,className:rt["heading-3"],title:"Small Heading"},"separator-1":{name:"separator-1"},code:{name:"code",action:Zi,className:rt.code,title:"Code"},quote:{name:"quote",action:$i,className:rt.quote,title:"Quote",default:!0},"unordered-list":{name:"unordered-list",action:ta,className:rt["unordered-list"],title:"Generic List",default:!0},"ordered-list":{name:"ordered-list",action:na,className:rt["ordered-list"],title:"Numbered List",default:!0},"clean-block":{name:"clean-block",action:ra,className:rt["clean-block"],title:"Clean block"},"separator-2":{name:"separator-2"},link:{name:"link",action:ia,className:rt.link,title:"Create Link",default:!0},image:{name:"image",action:aa,className:rt.image,title:"Insert Image",default:!0},"upload-image":{name:"upload-image",action:Do,className:rt["upload-image"],title:"Import an image"},table:{name:"table",action:oa,className:rt.table,title:"Insert Table"},"horizontal-rule":{name:"horizontal-rule",action:la,className:rt["horizontal-rule"],title:"Insert Horizontal Line"},"separator-3":{name:"separator-3"},preview:{name:"preview",action:fa,className:rt.preview,noDisable:!0,title:"Toggle Preview",default:!0},"side-by-side":{name:"side-by-side",action:wr,className:rt["side-by-side"],noDisable:!0,noMobile:!0,title:"Toggle Side by Side",default:!0},fullscreen:{name:"fullscreen",action:$n,className:rt.fullscreen,noDisable:!0,noMobile:!0,title:"Toggle Fullscreen",default:!0},"separator-4":{name:"separator-4"},guide:{name:"guide",action:"https://www.markdownguide.org/basic-syntax/",className:rt.guide,noDisable:!0,title:"Markdown Guide",default:!0},"separator-5":{name:"separator-5"},undo:{name:"undo",action:sa,className:rt.undo,noDisable:!0,title:"Undo"},redo:{name:"redo",action:ua,className:rt.redo,noDisable:!0,title:"Redo"}},wc={link:["[","](#url#)"],image:["![","](#url#)"],uploadedImage:["![](#url#)",""],table:["",` + +| Column 1 | Column 2 | Column 3 | +| -------- | -------- | -------- | +| Text | Text | Text | + +`],horizontalRule:["",` + +----- + +`]},kc={link:"URL for the link:",image:"URL of the image:"},Sc={locale:"en-US",format:{hour:"2-digit",minute:"2-digit"}},Ac={bold:"**",code:"```",italic:"*"},Ec={sbInit:"Attach files by drag and dropping or pasting from clipboard.",sbOnDragEnter:"Drop image to upload it.",sbOnDrop:"Uploading image #images_names#...",sbProgress:"Uploading #file_name#: #progress#%",sbOnUploaded:"Uploaded #image_name#",sizeUnits:" B, KB, MB"},Tc={noFileGiven:"You must select a file.",typeNotAllowed:"This image type is not allowed.",fileTooLarge:`Image #image_name# is too big (#image_size#). +Maximum file size is #image_max_size#.`,importError:"Something went wrong when uploading the image #image_name#."};function ge(s){s=s||{},s.parent=this;var g=!0;if(s.autoDownloadFontAwesome===!1&&(g=!1),s.autoDownloadFontAwesome!==!0)for(var c=document.styleSheets,p=0;p-1&&(g=!1);if(g){var v=document.createElement("link");v.rel="stylesheet",v.href="https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css",document.getElementsByTagName("head")[0].appendChild(v)}if(s.element)this.element=s.element;else if(s.element===null){console.log("EasyMDE: Error. No element was found.");return}if(s.toolbar===void 0){s.toolbar=[];for(var C in Zn)Object.prototype.hasOwnProperty.call(Zn,C)&&(C.indexOf("separator-")!=-1&&s.toolbar.push("|"),(Zn[C].default===!0||s.showIcons&&s.showIcons.constructor===Array&&s.showIcons.indexOf(C)!=-1)&&s.toolbar.push(C))}if(Object.prototype.hasOwnProperty.call(s,"previewClass")||(s.previewClass="editor-preview"),Object.prototype.hasOwnProperty.call(s,"status")||(s.status=["autosave","lines","words","cursor"],s.uploadImage&&s.status.unshift("upload-image")),s.previewRender||(s.previewRender=function(D){return this.parent.markdown(D)}),s.parsingConfig=Cn({highlightFormatting:!0},s.parsingConfig||{}),s.insertTexts=Cn({},wc,s.insertTexts||{}),s.promptTexts=Cn({},kc,s.promptTexts||{}),s.blockStyles=Cn({},Ac,s.blockStyles||{}),s.autosave!=null&&(s.autosave.timeFormat=Cn({},Sc,s.autosave.timeFormat||{})),s.iconClassMap=Cn({},rt,s.iconClassMap||{}),s.shortcuts=Cn({},gc,s.shortcuts||{}),s.maxHeight=s.maxHeight||void 0,s.direction=s.direction||"ltr",typeof s.maxHeight<"u"?s.minHeight=s.maxHeight:s.minHeight=s.minHeight||"300px",s.errorCallback=s.errorCallback||function(D){alert(D)},s.uploadImage=s.uploadImage||!1,s.imageMaxSize=s.imageMaxSize||2097152,s.imageAccept=s.imageAccept||"image/png, image/jpeg, image/gif, image/avif",s.imageTexts=Cn({},Ec,s.imageTexts||{}),s.errorMessages=Cn({},Tc,s.errorMessages||{}),s.imagePathAbsolute=s.imagePathAbsolute||!1,s.imageCSRFName=s.imageCSRFName||"csrfmiddlewaretoken",s.imageCSRFHeader=s.imageCSRFHeader||!1,s.autosave!=null&&s.autosave.unique_id!=null&&s.autosave.unique_id!=""&&(s.autosave.uniqueId=s.autosave.unique_id),s.overlayMode&&s.overlayMode.combine===void 0&&(s.overlayMode.combine=!0),this.options=s,this.render(),s.initialValue&&(!this.options.autosave||this.options.autosave.foundSavedValue!==!0)&&this.value(s.initialValue),s.uploadImage){var m=this;this.codemirror.on("dragenter",function(D,x){m.updateStatusBar("upload-image",m.options.imageTexts.sbOnDragEnter),x.stopPropagation(),x.preventDefault()}),this.codemirror.on("dragend",function(D,x){m.updateStatusBar("upload-image",m.options.imageTexts.sbInit),x.stopPropagation(),x.preventDefault()}),this.codemirror.on("dragleave",function(D,x){m.updateStatusBar("upload-image",m.options.imageTexts.sbInit),x.stopPropagation(),x.preventDefault()}),this.codemirror.on("dragover",function(D,x){m.updateStatusBar("upload-image",m.options.imageTexts.sbOnDragEnter),x.stopPropagation(),x.preventDefault()}),this.codemirror.on("drop",function(D,x){x.stopPropagation(),x.preventDefault(),s.imageUploadFunction?m.uploadImagesUsingCustomFunction(s.imageUploadFunction,x.dataTransfer.files):m.uploadImages(x.dataTransfer.files)}),this.codemirror.on("paste",function(D,x){s.imageUploadFunction?m.uploadImagesUsingCustomFunction(s.imageUploadFunction,x.clipboardData.files):m.uploadImages(x.clipboardData.files)})}}ge.prototype.uploadImages=function(s,g,c){if(s.length!==0){for(var p=[],v=0;v=2){var H=R[1];if(g.imagesPreviewHandler){var P=g.imagesPreviewHandler(R[1]);typeof P=="string"&&(H=P)}if(window.EMDEimagesCache[H])X($,window.EMDEimagesCache[H]);else{var G=document.createElement("img");G.onload=function(){window.EMDEimagesCache[H]={naturalWidth:G.naturalWidth,naturalHeight:G.naturalHeight,url:H},X($,window.EMDEimagesCache[H])},G.src=H}}}})}this.codemirror.on("update",function(){Y()}),this.gui.sideBySide=this.createSideBySide(),this._rendered=this.element,(g.autofocus===!0||s.autofocus)&&this.codemirror.focus();var oe=this.codemirror;setTimeout((function(){oe.refresh()}).bind(oe),0)};ge.prototype.cleanup=function(){document.removeEventListener("keydown",this.documentOnKeyDown)};function js(){if(typeof localStorage=="object")try{localStorage.setItem("smde_localStorage",1),localStorage.removeItem("smde_localStorage")}catch{return!1}else return!1;return!0}ge.prototype.autosave=function(){if(js()){var s=this;if(this.options.autosave.uniqueId==null||this.options.autosave.uniqueId==""){console.log("EasyMDE: You must set a uniqueId to use the autosave feature");return}this.options.autosave.binded!==!0&&(s.element.form!=null&&s.element.form!=null&&s.element.form.addEventListener("submit",function(){clearTimeout(s.autosaveTimeoutId),s.autosaveTimeoutId=void 0,localStorage.removeItem("smde_"+s.options.autosave.uniqueId)}),this.options.autosave.binded=!0),this.options.autosave.loaded!==!0&&(typeof localStorage.getItem("smde_"+this.options.autosave.uniqueId)=="string"&&localStorage.getItem("smde_"+this.options.autosave.uniqueId)!=""&&(this.codemirror.setValue(localStorage.getItem("smde_"+this.options.autosave.uniqueId)),this.options.autosave.foundSavedValue=!0),this.options.autosave.loaded=!0);var g=s.value();g!==""?localStorage.setItem("smde_"+this.options.autosave.uniqueId,g):localStorage.removeItem("smde_"+this.options.autosave.uniqueId);var c=document.getElementById("autosaved");if(c!=null&&c!=null&&c!=""){var p=new Date,v=new Intl.DateTimeFormat([this.options.autosave.timeFormat.locale,"en-US"],this.options.autosave.timeFormat.format).format(p),C=this.options.autosave.text==null?"Autosaved: ":this.options.autosave.text;c.innerHTML=C+v}}else console.log("EasyMDE: localStorage not available, cannot autosave")};ge.prototype.clearAutosavedValue=function(){if(js()){if(this.options.autosave==null||this.options.autosave.uniqueId==null||this.options.autosave.uniqueId==""){console.log("EasyMDE: You must set a uniqueId to clear the autosave value");return}localStorage.removeItem("smde_"+this.options.autosave.uniqueId)}else console.log("EasyMDE: localStorage not available, cannot autosave")};ge.prototype.openBrowseFileWindow=function(s,g){var c=this,p=this.gui.toolbar.getElementsByClassName("imageInput")[0];p.click();function v(C){c.options.imageUploadFunction?c.uploadImagesUsingCustomFunction(c.options.imageUploadFunction,C.target.files):c.uploadImages(C.target.files,s,g),p.removeEventListener("change",v)}p.addEventListener("change",v)};ge.prototype.uploadImage=function(s,g,c){var p=this;g=g||function(E){Us(p,E)};function v(x){p.updateStatusBar("upload-image",x),setTimeout(function(){p.updateStatusBar("upload-image",p.options.imageTexts.sbInit)},1e4),c&&typeof c=="function"&&c(x),p.options.errorCallback(x)}function C(x){var E=p.options.imageTexts.sizeUnits.split(",");return x.replace("#image_name#",s.name).replace("#image_size#",ji(s.size,E)).replace("#image_max_size#",ji(p.options.imageMaxSize,E))}if(s.size>this.options.imageMaxSize){v(C(this.options.errorMessages.fileTooLarge));return}var m=new FormData;m.append("image",s),p.options.imageCSRFToken&&!p.options.imageCSRFHeader&&m.append(p.options.imageCSRFName,p.options.imageCSRFToken);var D=new XMLHttpRequest;D.upload.onprogress=function(x){if(x.lengthComputable){var E=""+Math.round(x.loaded*100/x.total);p.updateStatusBar("upload-image",p.options.imageTexts.sbProgress.replace("#file_name#",s.name).replace("#progress#",E))}},D.open("POST",this.options.imageUploadEndpoint),p.options.imageCSRFToken&&p.options.imageCSRFHeader&&D.setRequestHeader(p.options.imageCSRFName,p.options.imageCSRFToken),D.onload=function(){try{var x=JSON.parse(this.responseText)}catch{console.error("EasyMDE: The server did not return a valid json."),v(C(p.options.errorMessages.importError));return}this.status===200&&x&&!x.error&&x.data&&x.data.filePath?g((p.options.imagePathAbsolute?"":window.location.origin+"/")+x.data.filePath):x.error&&x.error in p.options.errorMessages?v(C(p.options.errorMessages[x.error])):x.error?v(C(x.error)):(console.error("EasyMDE: Received an unexpected response after uploading the image."+this.status+" ("+this.statusText+")"),v(C(p.options.errorMessages.importError)))},D.onerror=function(x){console.error("EasyMDE: An unexpected error occurred when trying to upload the image."+x.target.status+" ("+x.target.statusText+")"),v(p.options.errorMessages.importError)},D.send(m)};ge.prototype.uploadImageUsingCustomFunction=function(s,g){var c=this;function p(m){Us(c,m)}function v(m){var D=C(m);c.updateStatusBar("upload-image",D),setTimeout(function(){c.updateStatusBar("upload-image",c.options.imageTexts.sbInit)},1e4),c.options.errorCallback(D)}function C(m){var D=c.options.imageTexts.sizeUnits.split(",");return m.replace("#image_name#",g.name).replace("#image_size#",ji(g.size,D)).replace("#image_max_size#",ji(c.options.imageMaxSize,D))}s.apply(this,[g,p,v])};ge.prototype.setPreviewMaxHeight=function(){var s=this.codemirror,g=s.getWrapperElement(),c=g.nextSibling,p=parseInt(window.getComputedStyle(g).paddingTop),v=parseInt(window.getComputedStyle(g).borderTopWidth),C=parseInt(this.options.maxHeight),m=C+p*2+v*2,D=m.toString()+"px";c.style.height=D};ge.prototype.createSideBySide=function(){var s=this.codemirror,g=s.getWrapperElement(),c=g.nextSibling;if(!c||!c.classList.contains("editor-preview-side")){if(c=document.createElement("div"),c.className="editor-preview-side",this.options.previewClass)if(Array.isArray(this.options.previewClass))for(var p=0;p1?c-1:0),v=1;v2&&arguments[2]!==void 0?arguments[2]:Gi;Es&&Es(s,null);let p=g.length;for(;p--;){let v=g[p];if(typeof v=="string"){const C=c(v);C!==v&&(Mc(g)||(g[p]=C),v=C)}s[v]=!0}return s}function Rc(s){for(let g=0;g/gm),Uc=Vt(/\${[\w\W]*}/gm),qc=Vt(/^data-[\-\w.\u00B7-\uFFFF]/),Gc=Vt(/^aria-[\-\w]+$/),Ks=Vt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),jc=Vt(/^(?:\w+script|data):/i),Xc=Vt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Zs=Vt(/^html$/i),Yc=Vt(/^[a-z][.\w]*(-[.\w]+)+$/i);var _s=Object.freeze({__proto__:null,MUSTACHE_EXPR:zc,ERB_EXPR:Wc,TMPLIT_EXPR:Uc,DATA_ATTR:qc,ARIA_ATTR:Gc,IS_ALLOWED_URI:Ks,IS_SCRIPT_OR_DATA:jc,ATTR_WHITESPACE:Xc,DOCTYPE_NAME:Zs,CUSTOM_ELEMENT:Yc});const ni={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Kc=function(){return typeof window>"u"?null:window},Zc=function(g,c){if(typeof g!="object"||typeof g.createPolicy!="function")return null;let p=null;const v="data-tt-policy-suffix";c&&c.hasAttribute(v)&&(p=c.getAttribute(v));const C="dompurify"+(p?"#"+p:"");try{return g.createPolicy(C,{createHTML(m){return m},createScriptURL(m){return m}})}catch{return console.warn("TrustedTypes policy "+C+" could not be created."),null}};function $s(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Kc();const g=ke=>$s(ke);if(g.version="3.1.7",g.removed=[],!s||!s.document||s.document.nodeType!==ni.document)return g.isSupported=!1,g;let{document:c}=s;const p=c,v=p.currentScript,{DocumentFragment:C,HTMLTemplateElement:m,Node:D,Element:x,NodeFilter:E,NamedNodeMap:z=s.NamedNodeMap||s.MozNamedAttrMap,HTMLFormElement:U,DOMParser:_,trustedTypes:X}=s,Y=x.prototype,oe=ti(Y,"cloneNode"),J=ti(Y,"remove"),$=ti(Y,"nextSibling"),R=ti(Y,"childNodes"),H=ti(Y,"parentNode");if(typeof m=="function"){const ke=c.createElement("template");ke.content&&ke.content.ownerDocument&&(c=ke.content.ownerDocument)}let P,G="";const{implementation:te,createNodeIterator:Z,createDocumentFragment:ce,getElementsByTagName:xe}=c,{importNode:Ke}=p;let ne={};g.isSupported=typeof Xs=="function"&&typeof H=="function"&&te&&te.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:Be,ERB_EXPR:Oe,TMPLIT_EXPR:Ce,DATA_ATTR:M,ARIA_ATTR:ee,IS_SCRIPT_OR_DATA:Q,ATTR_WHITESPACE:ye,CUSTOM_ELEMENT:Pe}=_s;let{IS_ALLOWED_URI:lt}=_s,Ze=null;const S=He({},[...Ls,...uo,...fo,...co,...Ms]);let h=null;const j=He({},[...Bs,...ho,...Os,...Ui]);let Ae=Object.seal(Ys(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Fe=null,et=null,dt=!0,$e=!0,ut=!1,We=!0,ze=!1,tt=!0,nt=!1,be=!1,Lt=!1,yt=!1,kt=!1,Nt=!1,Re=!0,Mt=!1;const $t="user-content-";let sn=!0,N=!1,I={},F=null;const d=He({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let y=null;const A=He({},["audio","video","img","source","image","track"]);let k=null;const T=He({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ie="http://www.w3.org/1998/Math/MathML",de="http://www.w3.org/2000/svg",ue="http://www.w3.org/1999/xhtml";let ve=ue,Ee=!1,fe=null;const Te=He({},[ie,de,ue],so);let W=null;const qe=["application/xhtml+xml","text/html"],Ue="text/html";let Le=null,Me=null;const ct=c.createElement("form"),pt=function(B){return B instanceof RegExp||B instanceof Function},Bt=function(){let B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Me&&Me===B)){if((!B||typeof B!="object")&&(B={}),B=Kn(B),W=qe.indexOf(B.PARSER_MEDIA_TYPE)===-1?Ue:B.PARSER_MEDIA_TYPE,Le=W==="application/xhtml+xml"?so:Gi,Ze=ln(B,"ALLOWED_TAGS")?He({},B.ALLOWED_TAGS,Le):S,h=ln(B,"ALLOWED_ATTR")?He({},B.ALLOWED_ATTR,Le):j,fe=ln(B,"ALLOWED_NAMESPACES")?He({},B.ALLOWED_NAMESPACES,so):Te,k=ln(B,"ADD_URI_SAFE_ATTR")?He(Kn(T),B.ADD_URI_SAFE_ATTR,Le):T,y=ln(B,"ADD_DATA_URI_TAGS")?He(Kn(A),B.ADD_DATA_URI_TAGS,Le):A,F=ln(B,"FORBID_CONTENTS")?He({},B.FORBID_CONTENTS,Le):d,Fe=ln(B,"FORBID_TAGS")?He({},B.FORBID_TAGS,Le):{},et=ln(B,"FORBID_ATTR")?He({},B.FORBID_ATTR,Le):{},I=ln(B,"USE_PROFILES")?B.USE_PROFILES:!1,dt=B.ALLOW_ARIA_ATTR!==!1,$e=B.ALLOW_DATA_ATTR!==!1,ut=B.ALLOW_UNKNOWN_PROTOCOLS||!1,We=B.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ze=B.SAFE_FOR_TEMPLATES||!1,tt=B.SAFE_FOR_XML!==!1,nt=B.WHOLE_DOCUMENT||!1,yt=B.RETURN_DOM||!1,kt=B.RETURN_DOM_FRAGMENT||!1,Nt=B.RETURN_TRUSTED_TYPE||!1,Lt=B.FORCE_BODY||!1,Re=B.SANITIZE_DOM!==!1,Mt=B.SANITIZE_NAMED_PROPS||!1,sn=B.KEEP_CONTENT!==!1,N=B.IN_PLACE||!1,lt=B.ALLOWED_URI_REGEXP||Ks,ve=B.NAMESPACE||ue,Ae=B.CUSTOM_ELEMENT_HANDLING||{},B.CUSTOM_ELEMENT_HANDLING&&pt(B.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ae.tagNameCheck=B.CUSTOM_ELEMENT_HANDLING.tagNameCheck),B.CUSTOM_ELEMENT_HANDLING&&pt(B.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ae.attributeNameCheck=B.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),B.CUSTOM_ELEMENT_HANDLING&&typeof B.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(Ae.allowCustomizedBuiltInElements=B.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ze&&($e=!1),kt&&(yt=!0),I&&(Ze=He({},Ms),h=[],I.html===!0&&(He(Ze,Ls),He(h,Bs)),I.svg===!0&&(He(Ze,uo),He(h,ho),He(h,Ui)),I.svgFilters===!0&&(He(Ze,fo),He(h,ho),He(h,Ui)),I.mathMl===!0&&(He(Ze,co),He(h,Os),He(h,Ui))),B.ADD_TAGS&&(Ze===S&&(Ze=Kn(Ze)),He(Ze,B.ADD_TAGS,Le)),B.ADD_ATTR&&(h===j&&(h=Kn(h)),He(h,B.ADD_ATTR,Le)),B.ADD_URI_SAFE_ATTR&&He(k,B.ADD_URI_SAFE_ATTR,Le),B.FORBID_CONTENTS&&(F===d&&(F=Kn(F)),He(F,B.FORBID_CONTENTS,Le)),sn&&(Ze["#text"]=!0),nt&&He(Ze,["html","head","body"]),Ze.table&&(He(Ze,["tbody"]),delete Fe.tbody),B.TRUSTED_TYPES_POLICY){if(typeof B.TRUSTED_TYPES_POLICY.createHTML!="function")throw ei('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof B.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw ei('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');P=B.TRUSTED_TYPES_POLICY,G=P.createHTML("")}else P===void 0&&(P=Zc(X,v)),P!==null&&typeof G=="string"&&(G=P.createHTML(""));Ut&&Ut(B),Me=B}},Je=He({},["mi","mo","mn","ms","mtext"]),Qt=He({},["annotation-xml"]),en=He({},["title","style","font","a","script"]),qt=He({},[...uo,...fo,...Pc]),wn=He({},[...co,...Hc]),un=function(B){let ae=H(B);(!ae||!ae.tagName)&&(ae={namespaceURI:ve,tagName:"template"});const De=Gi(B.tagName),Ge=Gi(ae.tagName);return fe[B.namespaceURI]?B.namespaceURI===de?ae.namespaceURI===ue?De==="svg":ae.namespaceURI===ie?De==="svg"&&(Ge==="annotation-xml"||Je[Ge]):!!qt[De]:B.namespaceURI===ie?ae.namespaceURI===ue?De==="math":ae.namespaceURI===de?De==="math"&&Qt[Ge]:!!wn[De]:B.namespaceURI===ue?ae.namespaceURI===de&&!Qt[Ge]||ae.namespaceURI===ie&&!Je[Ge]?!1:!wn[De]&&(en[De]||!qt[De]):!!(W==="application/xhtml+xml"&&fe[B.namespaceURI]):!1},Jt=function(B){Jr(g.removed,{element:B});try{H(B).removeChild(B)}catch{J(B)}},kn=function(B,ae){try{Jr(g.removed,{attribute:ae.getAttributeNode(B),from:ae})}catch{Jr(g.removed,{attribute:null,from:ae})}if(ae.removeAttribute(B),B==="is"&&!h[B])if(yt||kt)try{Jt(ae)}catch{}else try{ae.setAttribute(B,"")}catch{}},ai=function(B){let ae=null,De=null;if(Lt)B=""+B;else{const it=Fs(B,/^[\r\n\t ]+/);De=it&&it[0]}W==="application/xhtml+xml"&&ve===ue&&(B=''+B+"");const Ge=P?P.createHTML(B):B;if(ve===ue)try{ae=new _().parseFromString(Ge,W)}catch{}if(!ae||!ae.documentElement){ae=te.createDocument(ve,"template",null);try{ae.documentElement.innerHTML=Ee?G:Ge}catch{}}const St=ae.body||ae.documentElement;return B&&De&&St.insertBefore(c.createTextNode(De),St.childNodes[0]||null),ve===ue?xe.call(ae,nt?"html":"body")[0]:nt?ae.documentElement:St},Jn=function(B){return Z.call(B.ownerDocument||B,B,E.SHOW_ELEMENT|E.SHOW_COMMENT|E.SHOW_TEXT|E.SHOW_PROCESSING_INSTRUCTION|E.SHOW_CDATA_SECTION,null)},oi=function(B){return B instanceof U&&(typeof B.nodeName!="string"||typeof B.textContent!="string"||typeof B.removeChild!="function"||!(B.attributes instanceof z)||typeof B.removeAttribute!="function"||typeof B.setAttribute!="function"||typeof B.namespaceURI!="string"||typeof B.insertBefore!="function"||typeof B.hasChildNodes!="function")},Vn=function(B){return typeof D=="function"&&B instanceof D},tn=function(B,ae,De){ne[B]&&Wi(ne[B],Ge=>{Ge.call(g,ae,De,Me)})},li=function(B){let ae=null;if(tn("beforeSanitizeElements",B,null),oi(B))return Jt(B),!0;const De=Le(B.nodeName);if(tn("uponSanitizeElement",B,{tagName:De,allowedTags:Ze}),B.hasChildNodes()&&!Vn(B.firstElementChild)&&Wt(/<[/\w]/g,B.innerHTML)&&Wt(/<[/\w]/g,B.textContent)||B.nodeType===ni.progressingInstruction||tt&&B.nodeType===ni.comment&&Wt(/<[/\w]/g,B.data))return Jt(B),!0;if(!Ze[De]||Fe[De]){if(!Fe[De]&&si(De)&&(Ae.tagNameCheck instanceof RegExp&&Wt(Ae.tagNameCheck,De)||Ae.tagNameCheck instanceof Function&&Ae.tagNameCheck(De)))return!1;if(sn&&!F[De]){const Ge=H(B)||B.parentNode,St=R(B)||B.childNodes;if(St&&Ge){const it=St.length;for(let At=it-1;At>=0;--At){const Xt=oe(St[At],!0);Xt.__removalCount=(B.__removalCount||0)+1,Ge.insertBefore(Xt,$(B))}}}return Jt(B),!0}return B instanceof x&&!un(B)||(De==="noscript"||De==="noembed"||De==="noframes")&&Wt(/<\/no(script|embed|frames)/i,B.innerHTML)?(Jt(B),!0):(ze&&B.nodeType===ni.text&&(ae=B.textContent,Wi([Be,Oe,Ce],Ge=>{ae=Vr(ae,Ge," ")}),B.textContent!==ae&&(Jr(g.removed,{element:B.cloneNode()}),B.textContent=ae)),tn("afterSanitizeElements",B,null),!1)},er=function(B,ae,De){if(Re&&(ae==="id"||ae==="name")&&(De in c||De in ct))return!1;if(!($e&&!et[ae]&&Wt(M,ae))){if(!(dt&&Wt(ee,ae))){if(!h[ae]||et[ae]){if(!(si(B)&&(Ae.tagNameCheck instanceof RegExp&&Wt(Ae.tagNameCheck,B)||Ae.tagNameCheck instanceof Function&&Ae.tagNameCheck(B))&&(Ae.attributeNameCheck instanceof RegExp&&Wt(Ae.attributeNameCheck,ae)||Ae.attributeNameCheck instanceof Function&&Ae.attributeNameCheck(ae))||ae==="is"&&Ae.allowCustomizedBuiltInElements&&(Ae.tagNameCheck instanceof RegExp&&Wt(Ae.tagNameCheck,De)||Ae.tagNameCheck instanceof Function&&Ae.tagNameCheck(De))))return!1}else if(!k[ae]){if(!Wt(lt,Vr(De,ye,""))){if(!((ae==="src"||ae==="xlink:href"||ae==="href")&&B!=="script"&&_c(De,"data:")===0&&y[B])){if(!(ut&&!Wt(Q,Vr(De,ye,"")))){if(De)return!1}}}}}}return!0},si=function(B){return B!=="annotation-xml"&&Fs(B,Pe)},tr=function(B){tn("beforeSanitizeAttributes",B,null);const{attributes:ae}=B;if(!ae)return;const De={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:h};let Ge=ae.length;for(;Ge--;){const St=ae[Ge],{name:it,namespaceURI:At,value:Xt}=St,Ve=Le(it);let pe=it==="value"?Xt:Nc(Xt);if(De.attrName=Ve,De.attrValue=pe,De.keepAttr=!0,De.forceKeepAttr=void 0,tn("uponSanitizeAttribute",B,De),pe=De.attrValue,De.forceKeepAttr||(kn(it,B),!De.keepAttr))continue;if(!We&&Wt(/\/>/i,pe)){kn(it,B);continue}ze&&Wi([Be,Oe,Ce],nr=>{pe=Vr(pe,nr," ")});const fn=Le(B.nodeName);if(er(fn,Ve,pe)){if(Mt&&(Ve==="id"||Ve==="name")&&(kn(it,B),pe=$t+pe),tt&&Wt(/((--!?|])>)|<\/(style|title)/i,pe)){kn(it,B);continue}if(P&&typeof X=="object"&&typeof X.getAttributeType=="function"&&!At)switch(X.getAttributeType(fn,Ve)){case"TrustedHTML":{pe=P.createHTML(pe);break}case"TrustedScriptURL":{pe=P.createScriptURL(pe);break}}try{At?B.setAttributeNS(At,it,pe):B.setAttribute(it,pe),oi(B)?Jt(B):Ts(g.removed)}catch{}}}tn("afterSanitizeAttributes",B,null)},Sn=function ke(B){let ae=null;const De=Jn(B);for(tn("beforeSanitizeShadowDOM",B,null);ae=De.nextNode();)tn("uponSanitizeShadowNode",ae,null),!li(ae)&&(ae.content instanceof C&&ke(ae.content),tr(ae));tn("afterSanitizeShadowDOM",B,null)};return g.sanitize=function(ke){let B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ae=null,De=null,Ge=null,St=null;if(Ee=!ke,Ee&&(ke=""),typeof ke!="string"&&!Vn(ke))if(typeof ke.toString=="function"){if(ke=ke.toString(),typeof ke!="string")throw ei("dirty is not a string, aborting")}else throw ei("toString is not a function");if(!g.isSupported)return ke;if(be||Bt(B),g.removed=[],typeof ke=="string"&&(N=!1),N){if(ke.nodeName){const Xt=Le(ke.nodeName);if(!Ze[Xt]||Fe[Xt])throw ei("root node is forbidden and cannot be sanitized in-place")}}else if(ke instanceof D)ae=ai(""),De=ae.ownerDocument.importNode(ke,!0),De.nodeType===ni.element&&De.nodeName==="BODY"||De.nodeName==="HTML"?ae=De:ae.appendChild(De);else{if(!yt&&!ze&&!nt&&ke.indexOf("<")===-1)return P&&Nt?P.createHTML(ke):ke;if(ae=ai(ke),!ae)return yt?null:Nt?G:""}ae&&Lt&&Jt(ae.firstChild);const it=Jn(N?ke:ae);for(;Ge=it.nextNode();)li(Ge)||(Ge.content instanceof C&&Sn(Ge.content),tr(Ge));if(N)return ke;if(yt){if(kt)for(St=ce.call(ae.ownerDocument);ae.firstChild;)St.appendChild(ae.firstChild);else St=ae;return(h.shadowroot||h.shadowrootmode)&&(St=Ke.call(p,St,!0)),St}let At=nt?ae.outerHTML:ae.innerHTML;return nt&&Ze["!doctype"]&&ae.ownerDocument&&ae.ownerDocument.doctype&&ae.ownerDocument.doctype.name&&Wt(Zs,ae.ownerDocument.doctype.name)&&(At=" +`+At),ze&&Wi([Be,Oe,Ce],Xt=>{At=Vr(At,Xt," ")}),P&&Nt?P.createHTML(At):At},g.setConfig=function(){let ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Bt(ke),be=!0},g.clearConfig=function(){Me=null,be=!1},g.isValidAttribute=function(ke,B,ae){Me||Bt({});const De=Le(ke),Ge=Le(B);return er(De,Ge,ae)},g.addHook=function(ke,B){typeof B=="function"&&(ne[ke]=ne[ke]||[],Jr(ne[ke],B))},g.removeHook=function(ke){if(ne[ke])return Ts(ne[ke])},g.removeHooks=function(ke){ne[ke]&&(ne[ke]=[])},g.removeAllHooks=function(){ne={}},g}var $c=$s();document.addEventListener("alpine:init",()=>{Alpine.data("easyMde",(s={})=>({instance:null,options:s,init(){this.instance=new Lc(this.config()),this.$el.addEventListener("reset",()=>{this.instance.value(this.$el.value)})},config(){return Object.assign({element:this.$el,renderingConfig:{sanitizerFunction:g=>$c.sanitize(g,{USE_PROFILES:{html:!0}})}},this.options)}}))});