From dedcfcae436574aad45b7e160e0943218a93b19f Mon Sep 17 00:00:00 2001 From: Jon Ursenbach Date: Mon, 17 Feb 2020 18:37:54 -0800 Subject: [PATCH] build: updating dist files --- packages/api-explorer/dist/index.js | 4 ++-- packages/api-logs/dist/index.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/api-explorer/dist/index.js b/packages/api-explorer/dist/index.js index d81faaf35..c43619350 100644 --- a/packages/api-explorer/dist/index.js +++ b/packages/api-explorer/dist/index.js @@ -1,2 +1,2 @@ -/*! For license information please see index.js.LICENSE */ -module.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=310)}([function(e,t,r){"use strict";e.exports=r(313)},function(e,t,r){e.exports=r(316)()},function(e,t,r){var n,o,a;function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}a=function(){"use strict";var e=navigator.userAgent,t=navigator.platform,r=/gecko\/\d/i.test(e),n=/MSIE \d/.test(e),o=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),a=/Edge\/(\d+)/.exec(e),s=n||o||a,l=s&&(n?document.documentMode||6:+(a||o)[1]),u=!a&&/WebKit\//.test(e),c=u&&/Qt\/\d+\.\d+/.test(e),f=!a&&/Chrome\//.test(e),p=/Opera\//.test(e),d=/Apple Computer/.test(navigator.vendor),h=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),m=/PhantomJS/.test(e),y=!a&&/AppleWebKit/.test(e)&&/Mobile\/\w+/.test(e),v=/Android/.test(e),g=y||v||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),b=y||/Mac/.test(t),E=/\bCrOS\b/.test(e),_=/win/i.test(t),T=p&&e.match(/Version\/(\d*\.\d*)/);T&&(T=Number(T[1])),T&&T>=15&&(p=!1,u=!0);var S=b&&(c||p&&(null==T||T<12.11)),w=r||s&&l>=9;function x(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var k,O=function(e,t){var r=e.className,n=x(t).exec(r);if(n){var o=r.slice(n.index+n[0].length);e.className=r.slice(0,n.index)+(o?n[1]+o:"")}};function C(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function A(e,t){return C(e).appendChild(t)}function P(e,t,r,n){var o=document.createElement(e);if(r&&(o.className=r),n&&(o.style.cssText=n),"string"==typeof t)o.appendChild(document.createTextNode(t));else if(t)for(var a=0;a=t)return i+(t-a);i+=s-a,i+=r-i%r,a=s+1}}y?M=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:s&&(M=function(e){try{e.select()}catch(e){}});var B=function(){this.id=null,this.f=null,this.time=0,this.handler=I(this.onTimeout,this)};function H(e,t){for(var r=0;r=t)return n+Math.min(i,t-o);if(o+=a-n,n=a+1,(o+=r-o%r)>=t)return n}}var G=[""];function V(e){for(;G.length<=e;)G.push(Y(G)+" ");return G[e]}function Y(e){return e[e.length-1]}function Q(e,t){for(var r=[],n=0;n"€"&&(e.toUpperCase()!=e.toLowerCase()||Z.test(e))}function te(e,t){return t?!!(t.source.indexOf("\\w")>-1&&ee(e))||t.test(e):ee(e)}function re(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ne=/[\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 oe(e){return e.charCodeAt(0)>=768&&ne.test(e)}function ae(e,t,r){for(;(r<0?t>0:tr?-1:1;;){if(t==r)return t;var o=(t+r)/2,a=n<0?Math.ceil(o):Math.floor(o);if(a==t)return e(a)?t:r;e(a)?r=a:t=a+n}}var se=null;function le(e,t,r){var n;se=null;for(var o=0;ot)return o;a.to==t&&(a.from!=a.to&&"before"==r?n=o:se=o),a.from==t&&(a.from!=a.to&&"before"!=r?n=o:se=o)}return null!=n?n:se}var ue=function(){var e=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,t=/[stwN]/,r=/[LRr]/,n=/[Lb1n]/,o=/[1n]/;function a(e,t,r){this.level=e,this.from=t,this.to=r}return function(i,s){var l="ltr"==s?"L":"R";if(0==i.length||"ltr"==s&&!e.test(i))return!1;for(var u,c=i.length,f=[],p=0;p-1&&(n[t]=o.slice(0,a).concat(o.slice(a+1)))}}}function me(e,t){var r=de(e,t);if(r.length)for(var n=Array.prototype.slice.call(arguments,2),o=0;o0}function be(e){e.prototype.on=function(e,t){pe(this,e,t)},e.prototype.off=function(e,t){he(this,e,t)}}function Ee(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function _e(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Te(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Se(e){Ee(e),_e(e)}function we(e){return e.target||e.srcElement}function xe(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),b&&e.ctrlKey&&1==t&&(t=3),t}var ke,Oe,Ce=function(){if(s&&l<9)return!1;var e=P("div");return"draggable"in e||"dragDrop"in e}();function Ae(e){if(null==ke){var t=P("span","​");A(e,P("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(ke=t.offsetWidth<=1&&t.offsetHeight>2&&!(s&&l<8))}var r=ke?P("span","​"):P("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function Pe(e){if(null!=Oe)return Oe;var t=A(e,document.createTextNode("AخA")),r=k(t,0,1).getBoundingClientRect(),n=k(t,1,2).getBoundingClientRect();return C(e),!(!r||r.left==r.right)&&(Oe=n.right-r.right<3)}var Re,Ne=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,r=[],n=e.length;t<=n;){var o=e.indexOf("\n",t);-1==o&&(o=e.length);var a=e.slice(t,"\r"==e.charAt(o-1)?o-1:o),i=a.indexOf("\r");-1!=i?(r.push(a.slice(0,i)),t+=i+1):(r.push(a),t=o+1)}return r}:function(e){return e.split(/\r\n?|\n/)},je=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},De="oncopy"in(Re=P("div"))||(Re.setAttribute("oncopy","return;"),"function"==typeof Re.oncopy),Le=null,Me={},Ie={};function Fe(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Me[e]=t}function Ue(e){if("string"==typeof e&&Ie.hasOwnProperty(e))e=Ie[e];else if(e&&"string"==typeof e.name&&Ie.hasOwnProperty(e.name)){var t=Ie[e.name];"string"==typeof t&&(t={name:t}),(e=X(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ue("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ue("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Be(e,t){t=Ue(t);var r=Me[t.name];if(!r)return Be(e,"text/plain");var n=r(e,t);if(He.hasOwnProperty(t.name)){var o=He[t.name];for(var a in o)o.hasOwnProperty(a)&&(n.hasOwnProperty(a)&&(n["_"+a]=n[a]),n[a]=o[a])}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var i in t.modeProps)n[i]=t.modeProps[i];return n}var He={};function qe(e,t){F(t,He.hasOwnProperty(e)?He[e]:He[e]={})}function ze(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var o=t[n];o instanceof Array&&(o=o.concat([])),r[n]=o}return r}function $e(e,t){for(var r;e.innerMode&&(r=e.innerMode(t))&&r.mode!=e;)t=r.state,e=r.mode;return r||{mode:e,state:t}}function We(e,t,r){return!e.startState||e.startState(t,r)}var Ke=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};function Ge(e,t){if((t-=e.first)<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 o=r.children[n],a=o.chunkSize();if(t=e.first&&tr?tt(r,Ge(e,r).text.length):function(e,t){var r=e.ch;return null==r||r>t?tt(e.line,t):r<0?tt(e.line,0):e}(t,Ge(e,t.line).text.length)}function ut(e,t){for(var r=[],n=0;n=this.string.length},Ke.prototype.sol=function(){return this.pos==this.lineStart},Ke.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ke.prototype.next=function(){if(this.post},Ke.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Ke.prototype.skipToEnd=function(){this.pos=this.string.length},Ke.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Ke.prototype.backUp=function(e){this.pos-=e},Ke.prototype.column=function(){return this.lastColumnPos0?null:(n&&!1!==t&&(this.pos+=n[0].length),n)}var o=function(e){return r?e.toLowerCase():e};if(o(this.string.substr(this.pos,e.length))==o(e))return!1!==t&&(this.pos+=e.length),!0},Ke.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ke.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Ke.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Ke.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var ct=function(e,t){this.state=e,this.lookAhead=t},ft=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};function pt(e,t,r,n){var o=[e.state.modeGen],a={};_t(e,t.text,e.doc.mode,r,(function(e,t){return o.push(e,t)}),a,n);for(var i=r.state,s=function(n){r.baseTokens=o;var s=e.state.overlays[n],l=1,u=0;r.state=!0,_t(e,t.text,s.mode,r,(function(e,t){for(var r=l;ue&&o.splice(l,1,e,o[l+1],n),l+=2,u=Math.min(e,n)}if(t)if(s.opaque)o.splice(r,l-r,e,"overlay "+t),l=r+2;else for(;re.options.maxHighlightLength&&ze(e.doc.mode,n.state),a=pt(e,t,n);o&&(n.state=o),t.stateAfter=n.save(!o),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 ht(e,t,r){var n=e.doc,o=e.display;if(!n.mode.startState)return new ft(n,!0,t);var a=function(e,t,r){for(var n,o,a=e.doc,i=r?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>i;--s){if(s<=a.first)return a.first;var l=Ge(a,s-1),u=l.stateAfter;if(u&&(!r||s+(u instanceof ct?u.lookAhead:0)<=a.modeFrontier))return s;var c=U(l.text,null,e.options.tabSize);(null==o||n>c)&&(o=s-1,n=c)}return o}(e,t,r),i=a>n.first&&Ge(n,a-1).stateAfter,s=i?ft.fromSaved(n,i,a):new ft(n,We(n.mode),a);return n.iter(a,t,(function(r){mt(e,r.text,s);var n=s.line;r.stateAfter=n==t-1||n%5==0||n>=o.viewFrom&&nt.start)return a}throw new Error("Mode "+e.name+" failed to advance stream.")}ft.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},ft.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}},ft.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ft.fromSaved=function(e,t,r){return t instanceof ct?new ft(e,ze(e.mode,t.state),r,t.lookAhead):new ft(e,ze(e.mode,t),r)},ft.prototype.save=function(e){var t=!1!==e?ze(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ct(t,this.maxLookAhead):t};var gt=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function bt(e,t,r,n){var o,a,i=e.doc,s=i.mode,l=Ge(i,(t=lt(i,t)).line),u=ht(e,t.line,r),c=new Ke(l.text,e.options.tabSize,u);for(n&&(a=[]);(n||c.pose.options.maxHighlightLength?(s=!1,i&&mt(e,t,n,f.pos),f.pos=t.length,l=null):l=Et(vt(r,f,n.state,p),a),p){var d=p[0].name;d&&(l="m-"+(l?d+" "+l:d))}if(!s||c!=l){for(;u=t:a.to>t);(n||(n=[])).push(new wt(i,a.from,s?null:a.to))}}return n}(r,o,i),l=function(e,t,r){var n;if(e)for(var o=0;o=t:a.to>t)||a.from==t&&"bookmark"==i.type&&(!r||a.marker.insertLeft)){var s=null==a.from||(i.inclusiveLeft?a.from<=t:a.from0&&s)for(var b=0;bt)&&(!r||jt(r,a.marker)<0)&&(r=a.marker)}return r}function Ft(e,t,r,n,o){var a=Ge(e,t),i=St&&a.markedSpans;if(i)for(var s=0;s=0&&f<=0||c<=0&&f>=0)&&(c<=0&&(l.marker.inclusiveRight&&o.inclusiveLeft?rt(u.to,r)>=0:rt(u.to,r)>0)||c>=0&&(l.marker.inclusiveRight&&o.inclusiveLeft?rt(u.from,n)<=0:rt(u.from,n)<0)))return!0}}}function Ut(e){for(var t;t=Lt(e);)e=t.find(-1,!0).line;return e}function Bt(e,t){var r=Ge(e,t),n=Ut(r);return r==n?t:Je(n)}function Ht(e,t){if(t>e.lastLine())return t;var r,n=Ge(e,t);if(!qt(e,n))return t;for(;r=Mt(n);)n=r.find(1,!0).line;return Je(n)+1}function qt(e,t){var r=St&&t.markedSpans;if(r)for(var n=void 0,o=0;ot.maxLineLength&&(t.maxLineLength=r,t.maxLine=e)}))}var Gt=function(e,t,r){this.text=e,Pt(this,t),this.height=r?r(this):1};function Vt(e){e.parent=null,At(e)}Gt.prototype.lineNo=function(){return Je(this)},be(Gt);var Yt={},Qt={};function Jt(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?Qt:Yt;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function Xt(e,t){var r=R("span",null,null,u?"padding-right: .1px":null),n={pre:R("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var o=0;o<=(t.rest?t.rest.length:0);o++){var a=o?t.rest[o-1]:t.line,i=void 0;n.pos=0,n.addToken=er,Pe(e.display.measure)&&(i=ce(a,e.doc.direction))&&(n.addToken=tr(n.addToken,i)),n.map=[],nr(a,n,dt(e,a,t!=e.display.externalMeasured&&Je(a))),a.styleClasses&&(a.styleClasses.bgClass&&(n.bgClass=L(a.styleClasses.bgClass,n.bgClass||"")),a.styleClasses.textClass&&(n.textClass=L(a.styleClasses.textClass,n.textClass||""))),0==n.map.length&&n.map.push(0,0,n.content.appendChild(Ae(e.display.measure))),0==o?(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(u){var s=n.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return me(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=L(n.pre.className,n.textClass||"")),n}function Zt(e){var t=P("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function er(e,t,r,n,o,a,i){if(t){var u,c=e.splitSpaces?function(e,t){if(e.length>1&&!/ /.test(e))return e;for(var r=t,n="",o=0;ou&&f.from<=u);p++);if(f.to>=c)return e(r,n,o,a,i,s,l);e(r,n.slice(0,f.to-u),o,a,null,s,l),a=null,n=n.slice(f.to-u),u=f.to}}}function rr(e,t,r,n){var o=!n&&r.widgetNode;o&&e.map.push(e.pos,e.pos+t,o),!n&&e.cm.display.input.needsContentAttribute&&(o||(o=e.content.appendChild(document.createElement("span"))),o.setAttribute("cm-marker",r.id)),o&&(e.cm.display.input.setUneditable(o),e.content.appendChild(o)),e.pos+=t,e.trailingSpace=!1}function nr(e,t,r){var n=e.markedSpans,o=e.text,a=0;if(n)for(var i,s,l,u,c,f,p,d=o.length,h=0,m=1,y="",v=0;;){if(v==h){l=u=c=s="",p=null,f=null,v=1/0;for(var g=[],b=void 0,E=0;Eh||T.collapsed&&_.to==h&&_.from==h)){if(null!=_.to&&_.to!=h&&v>_.to&&(v=_.to,u=""),T.className&&(l+=" "+T.className),T.css&&(s=(s?s+";":"")+T.css),T.startStyle&&_.from==h&&(c+=" "+T.startStyle),T.endStyle&&_.to==v&&(b||(b=[])).push(T.endStyle,_.to),T.title&&((p||(p={})).title=T.title),T.attributes)for(var S in T.attributes)(p||(p={}))[S]=T.attributes[S];T.collapsed&&(!f||jt(f.marker,T)<0)&&(f=_)}else _.from>h&&v>_.from&&(v=_.from)}if(b)for(var w=0;w=d)break;for(var k=Math.min(d,v);;){if(y){var O=h+y.length;if(!f){var C=O>k?y.slice(0,k-h):y;t.addToken(t,C,i?i+l:l,c,h+C.length==v?u:"",s,p)}if(O>=k){y=y.slice(k-h),h=k;break}h=O,c=""}y=o.slice(a,a=r[m++]),i=Jt(r[m++],t.cm.options)}}else for(var A=1;Ar)return{map:e.measure.maps[o],cache:e.measure.caches[o],before:!0}}function Pr(e,t,r,n){return jr(e,Nr(e,t),r,n)}function Rr(e,t){if(t>=e.display.viewFrom&&t=r.lineN&&t2&&a.push((l.bottom+u.top)/2-r.top)}}a.push(r.bottom-r.top)}}(e,t.view,t.rect),t.hasHeights=!0),(a=function(e,t,r,n){var o,a=Mr(t.map,r,n),i=a.node,u=a.start,c=a.end,f=a.collapse;if(3==i.nodeType){for(var p=0;p<4;p++){for(;u&&oe(t.line.text.charAt(a.coverStart+u));)--u;for(;a.coverStart+c1}(e))return t;var r=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*r,right:t.right*r,top:t.top*n,bottom:t.bottom*n}}(e.display.measure,o))}else{var d;u>0&&(f=n="right"),o=e.options.lineWrapping&&(d=i.getClientRects()).length>1?d["right"==n?d.length-1:0]:i.getBoundingClientRect()}if(s&&l<9&&!u&&(!o||!o.left&&!o.right)){var h=i.parentNode.getClientRects()[0];o=h?{left:h.left,right:h.left+on(e.display),top:h.top,bottom:h.bottom}:Lr}for(var m=o.top-t.rect.top,y=o.bottom-t.rect.top,v=(m+y)/2,g=t.view.measure.heights,b=0;bt)&&(o=(a=l-s)-1,t>=l&&(i="right")),null!=o){if(n=e[u+2],s==l&&r==(n.insertLeft?"left":"right")&&(i=r),"left"==r&&0==o)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)n=e[2+(u-=3)],i="left";if("right"==r&&o==l-s)for(;u=0&&(r=e[o]).left==r.right;o--);return r}function Fr(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t=n.text.length?(l=n.text.length,u="before"):l<=0&&(l=0,u="after"),!s)return i("before"==u?l-1:l,"before"==u);function c(e,t,r){return i(r?e-1:e,1==s[t].level!=r)}var f=le(s,l,u),p=se,d=c(l,f,"before"==u);return null!=p&&(d.other=c(l,p,"before"!=u)),d}function Vr(e,t){var r=0;t=lt(e.doc,t),e.options.lineWrapping||(r=on(e.display)*t.ch);var n=Ge(e.doc,t.line),o=$t(n)+Sr(e.display);return{left:r,right:r,top:o,bottom:o+n.height}}function Yr(e,t,r,n,o){var a=tt(e,t,r);return a.xRel=o,n&&(a.outside=n),a}function Qr(e,t,r){var n=e.doc;if((r+=e.display.viewOffset)<0)return Yr(n.first,0,null,-1,-1);var o=Xe(n,r),a=n.first+n.size-1;if(o>a)return Yr(n.first+n.size-1,Ge(n,a).text.length,null,1,1);t<0&&(t=0);for(var i=Ge(n,o);;){var s=en(e,i,o,t,r),l=It(i,s.ch+(s.xRel>0||s.outside>0?1:0));if(!l)return s;var u=l.find(1);if(u.line==o)return u;i=Ge(n,o=u.line)}}function Jr(e,t,r,n){n-=zr(t);var o=t.text.length,a=ie((function(t){return jr(e,r,t-1).bottom<=n}),o,0);return{begin:a,end:o=ie((function(t){return jr(e,r,t).top>n}),a,o)}}function Xr(e,t,r,n){return r||(r=Nr(e,t)),Jr(e,t,r,$r(e,t,jr(e,r,n),"line").top)}function Zr(e,t,r,n){return!(e.bottom<=r)&&(e.top>r||(n?e.left:e.right)>t)}function en(e,t,r,n,o){o-=$t(t);var a=Nr(e,t),i=zr(t),s=0,l=t.text.length,u=!0,c=ce(t,e.doc.direction);if(c){var f=(e.options.lineWrapping?rn:tn)(e,t,r,a,c,n,o);s=(u=1!=f.level)?f.from:f.to-1,l=u?f.to:f.from-1}var p,d,h=null,m=null,y=ie((function(t){var r=jr(e,a,t);return r.top+=i,r.bottom+=i,!!Zr(r,n,o,!1)&&(r.top<=o&&r.left<=n&&(h=t,m=r),!0)}),s,l),v=!1;if(m){var g=n-m.left=E.bottom?1:0}return Yr(r,y=ae(t.text,y,1),d,v,n-p)}function tn(e,t,r,n,o,a,i){var s=ie((function(s){var l=o[s],u=1!=l.level;return Zr(Gr(e,tt(r,u?l.to:l.from,u?"before":"after"),"line",t,n),a,i,!0)}),0,o.length-1),l=o[s];if(s>0){var u=1!=l.level,c=Gr(e,tt(r,u?l.from:l.to,u?"after":"before"),"line",t,n);Zr(c,a,i,!0)&&c.top>i&&(l=o[s-1])}return l}function rn(e,t,r,n,o,a,i){var s=Jr(e,t,n,i),l=s.begin,u=s.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var c=null,f=null,p=0;p=u||d.to<=l)){var h=jr(e,n,1!=d.level?Math.min(u,d.to)-1:Math.max(l,d.from)).right,m=hm)&&(c=d,f=m)}}return c||(c=o[o.length-1]),c.fromu&&(c={from:c.from,to:u,level:c.level}),c}function nn(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Dr){Dr=P("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Dr.appendChild(document.createTextNode("x")),Dr.appendChild(P("br"));Dr.appendChild(document.createTextNode("x"))}A(e.measure,Dr);var r=Dr.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),C(e.measure),r||1}function on(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=P("span","xxxxxxxxxx"),r=P("pre",[t],"CodeMirror-line-like");A(e.measure,r);var n=t.getBoundingClientRect(),o=(n.right-n.left)/10;return o>2&&(e.cachedCharWidth=o),o||10}function an(e){for(var t=e.display,r={},n={},o=t.gutters.clientLeft,a=t.gutters.firstChild,i=0;a;a=a.nextSibling,++i){var s=e.display.gutterSpecs[i].className;r[s]=a.offsetLeft+a.clientLeft+o,n[s]=a.clientWidth}return{fixedPos:sn(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function sn(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function ln(e){var t=nn(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/on(e.display)-3);return function(o){if(qt(e.doc,o))return 0;var a=0;if(o.widgets)for(var i=0;i0&&(l=Ge(e.doc,u.line).text).length==u.ch){var c=U(l,l.length,e.options.tabSize)-l.length;u=tt(u.line,Math.max(0,Math.round((a-xr(e.display).left)/on(e.display))-c))}return u}function fn(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var r=e.display.view,n=0;nt)&&(o.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=o.viewTo)St&&Bt(e.doc,t)o.viewFrom?hn(e):(o.viewFrom+=n,o.viewTo+=n);else if(t<=o.viewFrom&&r>=o.viewTo)hn(e);else if(t<=o.viewFrom){var a=mn(e,r,r+n,1);a?(o.view=o.view.slice(a.index),o.viewFrom=a.lineN,o.viewTo+=n):hn(e)}else if(r>=o.viewTo){var i=mn(e,t,t,-1);i?(o.view=o.view.slice(0,i.index),o.viewTo=i.lineN):hn(e)}else{var s=mn(e,t,t,-1),l=mn(e,r,r+n,1);s&&l?(o.view=o.view.slice(0,s.index).concat(ar(e,s.lineN,l.lineN)).concat(o.view.slice(l.index)),o.viewTo+=n):hn(e)}var u=o.externalMeasured;u&&(r=o.lineN&&t=n.viewTo)){var a=n.view[fn(e,t)];if(null!=a.node){var i=a.changes||(a.changes=[]);-1==H(i,r)&&i.push(r)}}}function hn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function mn(e,t,r,n){var o,a=fn(e,t),i=e.display.view;if(!St||r==e.doc.first+e.doc.size)return{index:a,lineN:r};for(var s=e.display.viewFrom,l=0;l0){if(a==i.length-1)return null;o=s+i[a].size-t,a++}else o=s-t;t+=o,r+=o}for(;Bt(e.doc,r)!=r;){if(a==(n<0?0:i.length-1))return null;r+=n*i[a-(n<0?1:0)].size,a+=n}return{index:a,lineN:r}}function yn(e){for(var t=e.display.view,r=0,n=0;n=e.display.viewTo||s.to().linet||t==r&&i.to==t)&&(n(Math.max(i.from,t),Math.min(i.to,r),1==i.level?"rtl":"ltr",a),o=!0)}o||n(t,r,"ltr")}(m,r||0,null==n?p:n,(function(e,t,o,f){var y="ltr"==o,v=d(e,y?"left":"right"),g=d(t-1,y?"right":"left"),b=null==r&&0==e,E=null==n&&t==p,_=0==f,T=!m||f==m.length-1;if(g.top-v.top<=3){var S=(u?E:b)&&T,w=(u?b:E)&&_?s:(y?v:g).left,x=S?l:(y?g:v).right;c(w,v.top,x-w,v.bottom)}else{var k,O,C,A;y?(k=u&&b&&_?s:v.left,O=u?l:h(e,o,"before"),C=u?s:h(t,o,"after"),A=u&&E&&T?l:g.right):(k=u?h(e,o,"before"):s,O=!u&&b&&_?l:v.right,C=!u&&E&&T?s:g.left,A=u?h(t,o,"after"):l),c(k,v.top,O-k,v.bottom),v.bottom0?t.blinker=setInterval((function(){return t.cursorDiv.style.visibility=(r=!r)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Sn(e){e.state.focused||(e.display.input.focus(),xn(e))}function wn(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,kn(e))}),100)}function xn(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(me(e,"focus",e,t),e.state.focused=!0,D(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),u&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),Tn(e))}function kn(e,t){e.state.delayingBlurEvent||(e.state.focused&&(me(e,"blur",e,t),e.state.focused=!1,O(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function On(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=0;n.005||p<-.005)&&(Qe(o.line,i),Cn(o.line),o.rest))for(var d=0;de.display.sizerWidth){var h=Math.ceil(u/on(e.display));h>e.display.maxLineLength&&(e.display.maxLineLength=h,e.display.maxLine=o.line,e.display.maxLineChanged=!0)}}}}function Cn(e){if(e.widgets)for(var t=0;t=i&&(a=Xe(t,$t(Ge(t,l))-e.wrapper.clientHeight),i=l)}return{from:a,to:Math.max(i,a+1)}}function Pn(e,t){var r=e.display,n=nn(e.display);t.top<0&&(t.top=0);var o=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:r.scroller.scrollTop,a=Cr(e),i={};t.bottom-t.top>a&&(t.bottom=t.top+a);var s=e.doc.height+wr(r),l=t.tops-n;if(t.topo+a){var c=Math.min(t.top,(u?s:t.bottom)-a);c!=o&&(i.scrollTop=c)}var f=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:r.scroller.scrollLeft,p=Or(e)-(e.options.fixedGutter?r.gutters.offsetWidth:0),d=t.right-t.left>p;return d&&(t.right=t.left+p),t.left<10?i.scrollLeft=0:t.leftp+f-3&&(i.scrollLeft=t.right+(d?0:10)-p),i}function Rn(e,t){null!=t&&(Dn(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Nn(e){Dn(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function jn(e,t,r){null==t&&null==r||Dn(e),null!=t&&(e.curOp.scrollLeft=t),null!=r&&(e.curOp.scrollTop=r)}function Dn(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,Ln(e,Vr(e,t.from),Vr(e,t.to),t.margin))}function Ln(e,t,r,n){var o=Pn(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});jn(e,o.scrollLeft,o.scrollTop)}function Mn(e,t){Math.abs(e.doc.scrollTop-t)<2||(r||uo(e,{top:t}),In(e,t,!0),r&&uo(e),oo(e,100))}function In(e,t,r){t=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 Fn(e,t,r,n){t=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,po(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Un(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+wr(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+kr(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var Bn=function(e,t,r){this.cm=r;var n=this.vert=P("div",[P("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=P("div",[P("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=o.tabIndex=-1,e(n),e(o),pe(n,"scroll",(function(){n.clientHeight&&t(n.scrollTop,"vertical")})),pe(o,"scroll",(function(){o.clientWidth&&t(o.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,s&&l<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Bn.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 o=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+o)+"px"}else 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&&(0==n&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},Bn.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Bn.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Bn.prototype.zeroWidthHack=function(){var e=b&&!h?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new B,this.disableVert=new B},Bn.prototype.enableZeroWidthBar=function(e,t,r){e.style.pointerEvents="auto",t.set(1e3,(function n(){var o=e.getBoundingClientRect();("vert"==r?document.elementFromPoint(o.right-1,(o.top+o.bottom)/2):document.elementFromPoint((o.right+o.left)/2,o.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,n)}))},Bn.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Hn=function(){};function qn(e,t){t||(t=Un(e));var r=e.display.barWidth,n=e.display.barHeight;zn(e,t);for(var o=0;o<4&&r!=e.display.barWidth||n!=e.display.barHeight;o++)r!=e.display.barWidth&&e.options.lineWrapping&&On(e),zn(e,Un(e)),r=e.display.barWidth,n=e.display.barHeight}function zn(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=""}Hn.prototype.update=function(){return{bottom:0,right:0}},Hn.prototype.setScrollLeft=function(){},Hn.prototype.setScrollTop=function(){},Hn.prototype.clear=function(){};var $n={native:Bn,null:Hn};function Wn(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&O(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new $n[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),pe(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,r){"horizontal"==r?Fn(e,t):Mn(e,t)}),e),e.display.scrollbars.addClass&&D(e.display.wrapper,e.display.scrollbars.addClass)}var Kn=0;function Gn(e){var t;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:++Kn},t=e.curOp,ir?ir.ops.push(t):t.ownsGroup=ir={ops:[t],delayedCallbacks:[]}}function Vn(e){var t=e.curOp;t&&function(e,t){var r=e.ownsGroup;if(r)try{!function(e){var t=e.delayedCallbacks,r=0;do{for(;r=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new io(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Qn(e){e.updatedDisplay=e.mustUpdate&&so(e.cm,e.update)}function Jn(e){var t=e.cm,r=t.display;e.updatedDisplay&&On(t),e.barMeasure=Un(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Pr(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+kr(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-Or(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function Xn(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft(window.innerHeight||document.documentElement.clientHeight)&&(o=!1),null!=o&&!m){var a=P("div","​",null,"position: absolute;\n top: "+(t.top-r.viewOffset-Sr(e.display))+"px;\n height: "+(t.bottom-t.top+kr(e)+r.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(a),a.scrollIntoView(o),e.display.lineSpace.removeChild(a)}}}(t,function(e,t,r,n){var o;null==n&&(n=0),e.options.lineWrapping||t!=r||(r="before"==(t=t.ch?tt(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t).sticky?tt(t.line,t.ch+1,"before"):t);for(var a=0;a<5;a++){var i=!1,s=Gr(e,t),l=r&&r!=t?Gr(e,r):s,u=Pn(e,o={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-n,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+n}),c=e.doc.scrollTop,f=e.doc.scrollLeft;if(null!=u.scrollTop&&(Mn(e,u.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(i=!0)),null!=u.scrollLeft&&(Fn(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-f)>1&&(i=!0)),!i)break}return o}(t,lt(n,e.scrollToPos.from),lt(n,e.scrollToPos.to),e.scrollToPos.margin));var o=e.maybeHiddenMarkers,a=e.maybeUnhiddenMarkers;if(o)for(var i=0;i=e.display.viewTo)){var r=+new Date+e.options.workTime,n=ht(e,t.highlightFrontier),o=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(a){if(n.line>=e.display.viewFrom){var i=a.styles,s=a.text.length>e.options.maxHighlightLength?ze(t.mode,n.state):null,l=pt(e,a,n,!0);s&&(n.state=s),a.styles=l.styles;var u=a.styleClasses,c=l.classes;c?a.styleClasses=c:u&&(a.styleClasses=null);for(var f=!i||i.length!=a.styles.length||u!=c&&(!u||!c||u.bgClass!=c.bgClass||u.textClass!=c.textClass),p=0;!f&&pr)return oo(e,e.options.workDelay),!0})),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),o.length&&eo(e,(function(){for(var t=0;t=r.viewFrom&&t.visible.to<=r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&0==yn(e))return!1;ho(e)&&(hn(e),t.dims=an(e));var o=n.first+n.size,a=Math.max(t.visible.from-e.options.viewportMargin,n.first),i=Math.min(o,t.visible.to+e.options.viewportMargin);r.viewFromi&&r.viewTo-i<20&&(i=Math.min(o,r.viewTo)),St&&(a=Bt(e.doc,a),i=Ht(e.doc,i));var s=a!=r.viewFrom||i!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;!function(e,t,r){var n=e.display;0==n.view.length||t>=n.viewTo||r<=n.viewFrom?(n.view=ar(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=ar(e,t,n.viewFrom).concat(n.view):n.viewFromr&&(n.view=n.view.slice(0,fn(e,r)))),n.viewTo=r}(e,a,i),r.viewOffset=$t(Ge(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var l=yn(e);if(!s&&0==l&&!t.force&&r.renderedView==r.view&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo))return!1;var c=function(e){if(e.hasFocus())return null;var t=j();if(!t||!N(e.display.lineDiv,t))return null;var r={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&N(e.display.lineDiv,n.anchorNode)&&(r.anchorNode=n.anchorNode,r.anchorOffset=n.anchorOffset,r.focusNode=n.focusNode,r.focusOffset=n.focusOffset)}return r}(e);return l>4&&(r.lineDiv.style.display="none"),function(e,t,r){var n=e.display,o=e.options.lineNumbers,a=n.lineDiv,i=a.firstChild;function s(t){var r=t.nextSibling;return u&&b&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),r}for(var l=n.view,c=n.viewFrom,f=0;f-1&&(d=!1),cr(e,p,c,r)),d&&(C(p.lineNumber),p.lineNumber.appendChild(document.createTextNode(et(e.options,c)))),i=p.node.nextSibling}else{var h=vr(e,p,c,r);a.insertBefore(h,i)}c+=p.size}for(;i;)i=s(i)}(e,r.updateLineNumbers,t.dims),l>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,function(e){if(e&&e.activeElt&&e.activeElt!=j()&&(e.activeElt.focus(),e.anchorNode&&N(document.body,e.anchorNode)&&N(document.body,e.focusNode))){var t=window.getSelection(),r=document.createRange();r.setEnd(e.anchorNode,e.anchorOffset),r.collapse(!1),t.removeAllRanges(),t.addRange(r),t.extend(e.focusNode,e.focusOffset)}}(c),C(r.cursorDiv),C(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,s&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,oo(e,400)),r.updateLineNumbers=null,!0}function lo(e,t){for(var r=t.viewport,n=!0;(n&&e.options.lineWrapping&&t.oldDisplayWidth!=Or(e)||(r&&null!=r.top&&(r={top:Math.min(e.doc.height+wr(e.display)-Cr(e),r.top)}),t.visible=An(e.display,e.doc,r),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&so(e,t);n=!1){On(e);var o=Un(e);vn(e),qn(e,o),fo(e,o),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 uo(e,t){var r=new io(e,t);if(so(e,r)){On(e),lo(e,r);var n=Un(e);vn(e),qn(e,n),fo(e,n),r.finish()}}function co(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function fo(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+kr(e)+"px"}function po(e){var t=e.display,r=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var n=sn(t)-t.scroller.scrollLeft+e.doc.scrollLeft,o=t.gutters.offsetWidth,a=n+"px",i=0;is.clientWidth,c=s.scrollHeight>s.clientHeight;if(o&&l||a&&c){if(a&&b&&u)e:for(var f=t.target,d=i.view;f!=s;f=f.parentNode)for(var h=0;h=0&&rt(e,n.to())<=0)return r}return-1};var xo=function(e,t){this.anchor=e,this.head=t};function ko(e,t,r){var n=e&&e.options.selectionsMayTouch,o=t[r];t.sort((function(e,t){return rt(e.from(),t.from())})),r=H(t,o);for(var a=1;a0:l>=0){var u=it(s.from(),i.from()),c=at(s.to(),i.to()),f=s.empty()?i.from()==i.head:s.from()==s.head;a<=r&&--r,t.splice(--a,2,new xo(f?c:u,f?u:c))}}return new wo(t,r)}function Oo(e,t){return new wo([new xo(e,t||e)],0)}function Co(e){return e.text?tt(e.from.line+e.text.length-1,Y(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function Ao(e,t){if(rt(e,t.from)<0)return e;if(rt(e,t.to)<=0)return Co(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+=Co(t).ch-t.to.ch),tt(r,n)}function Po(e,t){for(var r=[],n=0;n1&&e.remove(s.line+1,h-1),e.insert(s.line+1,v)}lr(e,"change",e,t)}function Mo(e,t,r){!function e(n,o,a){if(n.linked)for(var i=0;is-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(a=function(e,t){return t?(Ho(e.done),Y(e.done)):e.done.length&&!Y(e.done).ranges?Y(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),Y(e.done)):void 0}(o,o.lastOp==n)))i=Y(a.changes),0==rt(t.from,t.to)&&0==rt(t.from,i.to)?i.to=Co(t):a.changes.push(Bo(e,t));else{var l=Y(o.done);for(l&&l.ranges||$o(e.sel,o.done),a={changes:[Bo(e,t)],generation:o.generation},o.done.push(a);o.done.length>o.undoDepth;)o.done.shift(),o.done[0].ranges||o.done.shift()}o.done.push(r),o.generation=++o.maxGeneration,o.lastModTime=o.lastSelTime=s,o.lastOp=o.lastSelOp=n,o.lastOrigin=o.lastSelOrigin=t.origin,i||me(e,"historyAdded")}function zo(e,t,r,n){var o=e.history,a=n&&n.origin;r==o.lastSelOp||a&&o.lastSelOrigin==a&&(o.lastModTime==o.lastSelTime&&o.lastOrigin==a||function(e,t,r,n){var o=t.charAt(0);return"*"==o||"+"==o&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,a,Y(o.done),t))?o.done[o.done.length-1]=t:$o(t,o.done),o.lastSelTime=+new Date,o.lastSelOrigin=a,o.lastSelOp=r,n&&!1!==n.clearRedo&&Ho(o.undone)}function $o(e,t){var r=Y(t);r&&r.ranges&&r.equals(e)||t.push(e)}function Wo(e,t,r,n){var o=t["spans_"+e.id],a=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),(function(r){r.markedSpans&&((o||(o=t["spans_"+e.id]={}))[a]=r.markedSpans),++a}))}function Ko(e){if(!e)return null;for(var t,r=0;r-1&&(Y(s)[f]=u[f],delete u[f])}}}return n}function Yo(e,t,r,n){if(n){var o=e.anchor;if(r){var a=rt(t,o)<0;a!=rt(r,o)<0?(o=t,t=r):a!=rt(t,r)<0&&(t=r)}return new xo(o,t)}return new xo(r||t,t)}function Qo(e,t,r,n,o){null==o&&(o=e.cm&&(e.cm.display.shift||e.extend)),ta(e,new wo([Yo(e.sel.primary(),t,r,o)],0),n)}function Jo(e,t,r){for(var n=[],o=e.cm&&(e.cm.display.shift||e.extend),a=0;a=t.ch:s.to>t.ch))){if(o&&(me(l,"beforeCursorEnter"),l.explicitlyCleared)){if(a.markedSpans){--i;continue}break}if(!l.atomic)continue;if(r){var f=l.find(n<0?1:-1),p=void 0;if((n<0?c:u)&&(f=la(e,f,-n,f&&f.line==t.line?a:null)),f&&f.line==t.line&&(p=rt(f,r))&&(n<0?p<0:p>0))return ia(e,f,t,n,o)}var d=l.find(n<0?-1:1);return(n<0?u:c)&&(d=la(e,d,n,d.line==t.line?a:null)),d?ia(e,d,t,n,o):null}}return t}function sa(e,t,r,n,o){var a=n||1,i=ia(e,t,r,a,o)||!o&&ia(e,t,r,a,!0)||ia(e,t,r,-a,o)||!o&&ia(e,t,r,-a,!0);return i||(e.cantEdit=!0,tt(e.first,0))}function la(e,t,r,n){return r<0&&0==t.ch?t.line>e.first?lt(e,tt(t.line-1)):null:r>0&&t.ch==(n||Ge(e,t.line)).text.length?t.line0)){var c=[l,1],f=rt(u.from,s.from),p=rt(u.to,s.to);(f<0||!i.inclusiveLeft&&!f)&&c.push({from:u.from,to:s.from}),(p>0||!i.inclusiveRight&&!p)&&c.push({from:s.to,to:u.to}),o.splice.apply(o,c),l+=c.length-3}}return o}(e,t.from,t.to);if(n)for(var o=n.length-1;o>=0;--o)pa(e,{from:n[o].from,to:n[o].to,text:o?[""]:t.text,origin:t.origin});else pa(e,t)}}function pa(e,t){if(1!=t.text.length||""!=t.text[0]||0!=rt(t.from,t.to)){var r=Po(e,t);qo(e,t,r,e.cm?e.cm.curOp.id:NaN),ma(e,t,r,Ot(e,t));var n=[];Mo(e,(function(e,r){r||-1!=H(n,e.history)||(ba(e.history,t),n.push(e.history)),ma(e,t,null,Ot(e,t))}))}}function da(e,t,r){var n=e.cm&&e.cm.state.suppressEdits;if(!n||r){for(var o,a=e.history,i=e.sel,s="undo"==t?a.done:a.undone,l="undo"==t?a.undone:a.done,u=0;u=0;--d){var h=p(d);if(h)return h.v}}}}function ha(e,t){if(0!=t&&(e.first+=t,e.sel=new wo(Q(e.sel.ranges,(function(e){return new xo(tt(e.anchor.line+t,e.anchor.ch),tt(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){pn(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:tt(a,Ge(e,a).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Ve(e,t.from,t.to),r||(r=Po(e,t)),e.cm?function(e,t,r){var n=e.doc,o=e.display,a=t.from,i=t.to,s=!1,l=a.line;e.options.lineWrapping||(l=Je(Ut(Ge(n,a.line))),n.iter(l,i.line+1,(function(e){if(e==o.maxLine)return s=!0,!0}))),n.sel.contains(t.from,t.to)>-1&&ve(e),Lo(n,t,r,ln(e)),e.options.lineWrapping||(n.iter(l,a.line+t.text.length,(function(e){var t=Wt(e);t>o.maxLineLength&&(o.maxLine=e,o.maxLineLength=t,o.maxLineChanged=!0,s=!1)})),s&&(e.curOp.updateMaxLine=!0)),function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontierr;n--){var o=Ge(e,n).stateAfter;if(o&&(!(o instanceof ct)||n+o.lookAhead1||!(this.children[0]instanceof _a))){var s=[];this.collapse(s),this.children=[new _a(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var i=o.lines.length%25+25,s=i;s10);e.parent.maybeSpill()}},iterN:function(e,t,r){for(var n=0;n0||0==i&&!1!==a.clearWhenEmpty)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=R("span",[a.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(Ft(e,t.line,t,r,a)||t.line!=r.line&&Ft(e,r.line,t,r,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");St=!0}a.addToHistory&&qo(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var s,l=t.line,u=e.cm;if(e.iter(l,r.line+1,(function(e){u&&a.collapsed&&!u.options.lineWrapping&&Ut(e)==u.display.maxLine&&(s=!0),a.collapsed&&l!=t.line&&Qe(e,0),function(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}(e,new wt(a,l==t.line?t.ch:null,l==r.line?r.ch:null)),++l})),a.collapsed&&e.iter(t.line,r.line+1,(function(t){qt(e,t)&&Qe(t,0)})),a.clearOnEnter&&pe(a,"beforeCursorEnter",(function(){return a.clear()})),a.readOnly&&(Tt=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),a.collapsed&&(a.id=++xa,a.atomic=!0),u){if(s&&(u.curOp.updateMaxLine=!0),a.collapsed)pn(u,t.line,r.line+1);else if(a.className||a.startStyle||a.endStyle||a.css||a.attributes||a.title)for(var c=t.line;c<=r.line;c++)dn(u,c,"text");a.atomic&&oa(u.doc),lr(u,"markerAdded",u,a)}return a}ka.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Gn(e),ge(this,"clear")){var r=this.find();r&&lr(this,"clear",r.from,r.to)}for(var n=null,o=null,a=0;ae.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=c,e.display.maxLineChanged=!0)}null!=n&&e&&this.collapsed&&pn(e,n,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&oa(e.doc)),e&&lr(e,"markerCleared",e,this,n,o),t&&Vn(e),this.parent&&this.parent.clear()}},ka.prototype.find=function(e,t){var r,n;null==e&&"bookmark"==this.type&&(e=1);for(var o=0;o=0;l--)fa(this,n[l]);s?ea(this,s):this.cm&&Nn(this.cm)})),undo:no((function(){da(this,"undo")})),redo:no((function(){da(this,"redo")})),undoSelection:no((function(){da(this,"undo",!0)})),redoSelection:no((function(){da(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(o.marker.parent||o.marker)}return t},findMarks:function(e,t,r){e=lt(this,e),t=lt(this,t);var n=[],o=e.line;return this.iter(e.line,t.line+1,(function(a){var i=a.markedSpans;if(i)for(var s=0;s=l.to||null==l.from&&o!=e.line||null!=l.from&&o==t.line&&l.from>=t.ch||r&&!r(l.marker)||n.push(l.marker.parent||l.marker)}++o})),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})),lt(this,tt(r,t))},indexFromPos:function(e){var t=(e=lt(this,e)).ch;if(e.linet&&(t=e.from),null!=e.to&&e.to-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var f=e.dataTransfer.getData("Text");if(f){var p;if(t.state.draggingText&&!t.state.draggingText.copy&&(p=t.listSelections()),ra(t.doc,Oo(r,r)),p)for(var d=0;d=0;t--)ya(e.doc,"",n[t].from,n[t].to,"+delete");Nn(e)}))}function Za(e,t,r){var n=ae(e.text,t+r,r);return n<0||n>e.text.length?null:n}function ei(e,t,r){var n=Za(e,t.ch,r);return null==n?null:new tt(t.line,n,r<0?"after":"before")}function ti(e,t,r,n,o){if(e){"rtl"==t.getOption("direction")&&(o=-o);var a=ce(r,t.doc.direction);if(a){var i,s=o<0?Y(a):a[0],l=o<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==t.doc.direction){var u=Nr(t,r);i=o<0?r.text.length-1:0;var c=jr(t,u,i).top;i=ie((function(e){return jr(t,u,e).top==c}),o<0==(1==s.level)?s.from:s.to-1,i),"before"==l&&(i=Za(r,i,1))}else i=o<0?s.to:s.from;return new tt(n,i,l)}}return new tt(n,o<0?r.text.length:0,o<0?"before":"after")}$a.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},$a.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},$a.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},$a.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},$a.default=b?$a.macDefault:$a.pcDefault;var ri={selectAll:ua,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),z)},killLine:function(e){return Xa(e,(function(t){if(t.empty()){var r=Ge(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line0)o=new tt(o.line,o.ch+1),e.replaceRange(a.charAt(o.ch-1)+a.charAt(o.ch-2),tt(o.line,o.ch-2),o,"+transpose");else if(o.line>e.doc.first){var i=Ge(e.doc,o.line-1).text;i&&(o=new tt(o.line,1),e.replaceRange(a.charAt(0)+e.doc.lineSeparator()+i.charAt(i.length-1),tt(o.line-1,i.length-1),o,"+transpose"))}r.push(new xo(o,o))}e.setSelections(r)}))},newlineAndIndent:function(e){return eo(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;n-1&&(rt((o=i.ranges[o]).from(),t)<0||t.xRel>0)&&(rt(o.to(),t)>0||t.xRel<0)?function(e,t,r,n){var o=e.display,a=!1,i=to(e,(function(t){u&&(o.scroller.draggable=!1),e.state.draggingText=!1,he(o.wrapper.ownerDocument,"mouseup",i),he(o.wrapper.ownerDocument,"mousemove",c),he(o.scroller,"dragstart",f),he(o.scroller,"drop",i),a||(Ee(t),n.addNew||Qo(e.doc,r,null,null,n.extend),u||s&&9==l?setTimeout((function(){o.wrapper.ownerDocument.body.focus(),o.input.focus()}),20):o.input.focus())})),c=function(e){a=a||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},f=function(){return a=!0};u&&(o.scroller.draggable=!0),e.state.draggingText=i,i.copy=!n.moveOnDrag,o.scroller.dragDrop&&o.scroller.dragDrop(),pe(o.wrapper.ownerDocument,"mouseup",i),pe(o.wrapper.ownerDocument,"mousemove",c),pe(o.scroller,"dragstart",f),pe(o.scroller,"drop",i),wn(e),setTimeout((function(){return o.input.focus()}),20)}(e,n,t,a):function(e,t,r,n){var o=e.display,a=e.doc;Ee(t);var i,s,l=a.sel,u=l.ranges;if(n.addNew&&!n.extend?(s=a.sel.contains(r),i=s>-1?u[s]:new xo(r,r)):(i=a.sel.primary(),s=a.sel.primIndex),"rectangle"==n.unit)n.addNew||(i=new xo(r,r)),r=cn(e,t,!0,!0),s=-1;else{var c=gi(e,r,n.unit);i=n.extend?Yo(i,c.anchor,c.head,n.extend):c}n.addNew?-1==s?(s=u.length,ta(a,ko(e,u.concat([i]),s),{scroll:!1,origin:"*mouse"})):u.length>1&&u[s].empty()&&"char"==n.unit&&!n.extend?(ta(a,ko(e,u.slice(0,s).concat(u.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),l=a.sel):Xo(a,s,i,$):(s=0,ta(a,new wo([i],0),$),l=a.sel);var f=r;function p(t){if(0!=rt(f,t))if(f=t,"rectangle"==n.unit){for(var o=[],u=e.options.tabSize,c=U(Ge(a,r.line).text,r.ch,u),p=U(Ge(a,t.line).text,t.ch,u),d=Math.min(c,p),h=Math.max(c,p),m=Math.min(r.line,t.line),y=Math.min(e.lastLine(),Math.max(r.line,t.line));m<=y;m++){var v=Ge(a,m).text,g=K(v,d,u);d==h?o.push(new xo(tt(m,g),tt(m,g))):v.length>g&&o.push(new xo(tt(m,g),tt(m,K(v,h,u))))}o.length||o.push(new xo(r,r)),ta(a,ko(e,l.ranges.slice(0,s).concat(o),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,E=i,_=gi(e,t,n.unit),T=E.anchor;rt(_.anchor,T)>0?(b=_.head,T=it(E.from(),_.anchor)):(b=_.anchor,T=at(E.to(),_.head));var S=l.ranges.slice(0);S[s]=function(e,t){var r=t.anchor,n=t.head,o=Ge(e.doc,r.line);if(0==rt(r,n)&&r.sticky==n.sticky)return t;var a=ce(o);if(!a)return t;var i=le(a,r.ch,r.sticky),s=a[i];if(s.from!=r.ch&&s.to!=r.ch)return t;var l,u=i+(s.from==r.ch==(1!=s.level)?0:1);if(0==u||u==a.length)return t;if(n.line!=r.line)l=(n.line-r.line)*("ltr"==e.doc.direction?1:-1)>0;else{var c=le(a,n.ch,n.sticky),f=c-i||(n.ch-r.ch)*(1==s.level?-1:1);l=c==u-1||c==u?f<0:f>0}var p=a[u+(l?-1:0)],d=l==(1==p.level),h=d?p.from:p.to,m=d?"after":"before";return r.ch==h&&r.sticky==m?t:new xo(new tt(r.line,h,m),n)}(e,new xo(lt(a,T),b)),ta(a,ko(e,S,s),$)}}var d=o.wrapper.getBoundingClientRect(),h=0;function m(t){e.state.selectingText=!1,h=1/0,t&&(Ee(t),o.input.focus()),he(o.wrapper.ownerDocument,"mousemove",y),he(o.wrapper.ownerDocument,"mouseup",v),a.history.lastSelOrigin=null}var y=to(e,(function(t){0!==t.buttons&&xe(t)?function t(r){var i=++h,s=cn(e,r,!0,"rectangle"==n.unit);if(s)if(0!=rt(s,f)){e.curOp.focus=j(),p(s);var l=An(o,a);(s.line>=l.to||s.lined.bottom?20:0;u&&setTimeout(to(e,(function(){h==i&&(o.scroller.scrollTop+=u,t(r))})),50)}}(t):m(t)})),v=to(e,m);e.state.selectingText=v,pe(o.wrapper.ownerDocument,"mousemove",y),pe(o.wrapper.ownerDocument,"mouseup",v)}(e,n,t,a)}(t,n,a,e):we(e)==r.scroller&&Ee(e):2==o?(n&&Qo(t.doc,n),setTimeout((function(){return r.input.focus()}),20)):3==o&&(w?t.display.input.onContextMenu(e):wn(t)))}}function gi(e,t,r){if("char"==r)return new xo(t,t);if("word"==r)return e.findWordAt(t);if("line"==r)return new xo(tt(t.line,0),lt(e.doc,tt(t.line+1,0)));var n=r(e,t);return new xo(n.from,n.to)}function bi(e,t,r,n){var o,a;if(t.touches)o=t.touches[0].clientX,a=t.touches[0].clientY;else try{o=t.clientX,a=t.clientY}catch(t){return!1}if(o>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&Ee(t);var i=e.display,s=i.lineDiv.getBoundingClientRect();if(a>s.bottom||!ge(e,r))return Te(t);a-=s.top-i.viewOffset;for(var l=0;l=o)return me(e,r,e,Xe(e.doc,a),e.display.gutterSpecs[l].className,t),Te(t)}}function Ei(e,t){return bi(e,t,"gutterClick",!0)}function _i(e,t){Tr(e.display,t)||function(e,t){return!!ge(e,"gutterContextMenu")&&bi(e,t,"gutterContextMenu",!1)}(e,t)||ye(e,t,"contextmenu")||w||e.display.input.onContextMenu(t)}function Ti(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Br(e)}yi.prototype.compare=function(e,t,r){return this.time+400>e&&0==rt(t,this.pos)&&r==this.button};var Si={toString:function(){return"CodeMirror.Init"}},wi={},xi={};function ki(e,t,r){if(!t!=!(r&&r!=Si)){var n=e.display.dragFunctions,o=t?pe:he;o(e.display.scroller,"dragstart",n.start),o(e.display.scroller,"dragenter",n.enter),o(e.display.scroller,"dragover",n.over),o(e.display.scroller,"dragleave",n.leave),o(e.display.scroller,"drop",n.drop)}}function Oi(e){e.options.lineWrapping?(D(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(O(e.display.wrapper,"CodeMirror-wrap"),Kt(e)),un(e),pn(e),Br(e),setTimeout((function(){return qn(e)}),100)}function Ci(e,t){var r=this;if(!(this instanceof Ci))return new Ci(e,t);this.options=t=t?F(t):{},F(wi,t,!1);var n=t.value;"string"==typeof n?n=new Na(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var o=new Ci.inputStyles[t.inputStyle](this),a=this.display=new go(e,n,o,t);for(var i in a.wrapper.CodeMirror=this,Ti(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Wn(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 B,keySeq:null,specialChars:null},t.autofocus&&!g&&a.input.focus(),s&&l<11&&setTimeout((function(){return r.display.input.reset(!0)}),20),function(e){var t=e.display;pe(t.scroller,"mousedown",to(e,vi)),pe(t.scroller,"dblclick",s&&l<11?to(e,(function(t){if(!ye(e,t)){var r=cn(e,t);if(r&&!Ei(e,t)&&!Tr(e.display,t)){Ee(t);var n=e.findWordAt(r);Qo(e.doc,n.anchor,n.head)}}})):function(t){return ye(e,t)||Ee(t)}),pe(t.scroller,"contextmenu",(function(t){return _i(e,t)})),pe(t.input.getField(),"contextmenu",(function(r){t.scroller.contains(r.target)||_i(e,r)}));var r,n={end:0};function o(){t.activeTouch&&(r=setTimeout((function(){return t.activeTouch=null}),1e3),(n=t.activeTouch).end=+new Date)}function a(e,t){if(null==t.left)return!0;var r=t.left-e.left,n=t.top-e.top;return r*r+n*n>400}pe(t.scroller,"touchstart",(function(o){if(!ye(e,o)&&!function(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}(o)&&!Ei(e,o)){t.input.ensurePolled(),clearTimeout(r);var a=+new Date;t.activeTouch={start:a,moved:!1,prev:a-n.end<=300?n:null},1==o.touches.length&&(t.activeTouch.left=o.touches[0].pageX,t.activeTouch.top=o.touches[0].pageY)}})),pe(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),pe(t.scroller,"touchend",(function(r){var n=t.activeTouch;if(n&&!Tr(t,r)&&null!=n.left&&!n.moved&&new Date-n.start<300){var i,s=e.coordsChar(t.activeTouch,"page");i=!n.prev||a(n,n.prev)?new xo(s,s):!n.prev.prev||a(n,n.prev.prev)?e.findWordAt(s):new xo(tt(s.line,0),lt(e.doc,tt(s.line+1,0))),e.setSelection(i.anchor,i.head),e.focus(),Ee(r)}o()})),pe(t.scroller,"touchcancel",o),pe(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(Mn(e,t.scroller.scrollTop),Fn(e,t.scroller.scrollLeft,!0),me(e,"scroll",e))})),pe(t.scroller,"mousewheel",(function(t){return So(e,t)})),pe(t.scroller,"DOMMouseScroll",(function(t){return So(e,t)})),pe(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){ye(e,t)||Se(t)},over:function(t){ye(e,t)||(function(e,t){var r=cn(e,t);if(r){var n=document.createDocumentFragment();bn(e,r,n),e.display.dragCursor||(e.display.dragCursor=P("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),A(e.display.dragCursor,n)}}(e,t),Se(t))},start:function(t){return function(e,t){if(s&&(!e.state.draggingText||+new Date-ja<100))Se(t);else if(!ye(e,t)&&!Tr(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!d)){var r=P("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",p&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),p&&r.parentNode.removeChild(r)}}(e,t)},drop:to(e,Da),leave:function(t){ye(e,t)||La(e)}};var i=t.input.getField();pe(i,"keyup",(function(t){return pi.call(e,t)})),pe(i,"keydown",to(e,fi)),pe(i,"keypress",to(e,di)),pe(i,"focus",(function(t){return xn(e,t)})),pe(i,"blur",(function(t){return kn(e,t)}))}(this),Fa(),Gn(this),this.curOp.forceUpdate=!0,Io(this,n),t.autofocus&&!g||this.hasFocus()?setTimeout(I(xn,this),20):kn(this),xi)xi.hasOwnProperty(i)&&xi[i](this,t[i],Si);ho(this),t.finishInit&&t.finishInit(this);for(var c=0;c150)){if(!n)return;r="prev"}}else u=0,r="not";"prev"==r?u=t>a.first?U(Ge(a,t-1).text,null,i):0:"add"==r?u=l+e.options.indentUnit:"subtract"==r?u=l-e.options.indentUnit:"number"==typeof r&&(u=l+r),u=Math.max(0,u);var f="",p=0;if(e.options.indentWithTabs)for(var d=Math.floor(u/i);d;--d)p+=i,f+="\t";if(pi,l=Ne(t),u=null;if(s&&n.ranges.length>1)if(Ri&&Ri.text.join("\n")==t){if(n.ranges.length%Ri.text.length==0){u=[];for(var c=0;c=0;p--){var d=n.ranges[p],h=d.from(),m=d.to();d.empty()&&(r&&r>0?h=tt(h.line,h.ch-r):e.state.overwrite&&!s?m=tt(m.line,Math.min(Ge(a,m.line).text.length,m.ch+Y(l).length)):s&&Ri&&Ri.lineWise&&Ri.text.join("\n")==t&&(h=m=tt(h.line,0)));var y={from:h,to:m,text:u?u[p%u.length]:l,origin:o||(s?"paste":e.state.cutIncoming>i?"cut":"+input")};fa(e.doc,y),lr(e,"inputRead",e,y)}t&&!s&&Li(e,t),Nn(e),e.curOp.updateInput<2&&(e.curOp.updateInput=f),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Di(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||eo(t,(function(){return ji(t,r,0,null,"paste")})),!0}function Li(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var o=r.ranges[n];if(!(o.head.ch>100||n&&r.ranges[n-1].head.line==o.head.line)){var a=e.getModeAt(o.head),i=!1;if(a.electricChars){for(var s=0;s-1){i=Pi(e,o.head.line,"smart");break}}else a.electricInput&&a.electricInput.test(Ge(e.doc,o.head.line).text.slice(0,o.head.ch))&&(i=Pi(e,o.head.line,"smart"));i&&lr(e,"electricInput",e,o.head.line)}}}function Mi(e){for(var t=[],r=[],n=0;n=t.text.length?(r.ch=t.text.length,r.sticky="before"):r.ch<=0&&(r.ch=0,r.sticky="after");var a=le(o,r.ch,r.sticky),i=o[a];if("ltr"==e.doc.direction&&i.level%2==0&&(n>0?i.to>r.ch:i.from=i.from&&p>=c.begin)){var d=f?"before":"after";return new tt(r.line,p,d)}}var h=function(e,t,n){for(var a=function(e,t){return t?new tt(r.line,l(e,1),"before"):new tt(r.line,e,"after")};e>=0&&e0==(1!=i.level),u=s?n.begin:l(n.end,-1);if(i.from<=u&&u0?c.end:l(c.begin,-1);return null==y||n>0&&y==t.text.length||!(m=h(n>0?0:o.length-1,n,u(y)))?null:m}(e.cm,s,t,r):ei(s,t,r))){if(n||(i=t.line+l)=e.first+e.size||(t=new tt(i,t.ch,t.sticky),!(s=Ge(e,i))))return!1;t=ti(o,e.cm,s,t.line,l)}else t=a;return!0}if("char"==n)u();else if("column"==n)u(!0);else if("word"==n||"group"==n)for(var c=null,f="group"==n,p=e.cm&&e.cm.getHelper(t,"wordChars"),d=!0;!(r<0)||u(!d);d=!1){var h=s.text.charAt(t.ch)||"\n",m=te(h,p)?"w":f&&"\n"==h?"n":!f||/\s/.test(h)?null:"p";if(!f||d||m||(m="s"),c&&c!=m){r<0&&(r=1,u(),t.sticky="after");break}if(m&&(c=m),r>0&&!u(!d))break}var y=sa(e,t,a,i,!0);return nt(a,y)&&(y.hitSide=!0),y}function Bi(e,t,r,n){var o,a,i=e.doc,s=t.left;if("page"==n){var l=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),u=Math.max(l-.5*nn(e.display),3);o=(r>0?t.bottom:t.top)+r*u}else"line"==n&&(o=r>0?t.bottom+3:t.top-3);for(;(a=Qr(e,s,o)).outside;){if(r<0?o<=0:o>=i.height){a.hitSide=!0;break}o+=5*r}return a}var Hi=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new B,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function qi(e,t){var r=Rr(e,t.line);if(!r||r.hidden)return null;var n=Ge(e.doc,t.line),o=Ar(r,n,t.line),a=ce(n,e.doc.direction),i="left";a&&(i=le(a,t.ch)%2?"right":"left");var s=Mr(o.map,t.ch,i);return s.offset="right"==s.collapse?s.end:s.start,s}function zi(e,t){return t&&(e.bad=!0),e}function $i(e,t,r){var n;if(t==e.display.lineDiv){if(!(n=e.display.lineDiv.childNodes[r]))return zi(e.clipPos(tt(e.display.viewTo-1)),!0);t=null,r=0}else for(n=t;;n=n.parentNode){if(!n||n==e.display.lineDiv)return null;if(n.parentNode&&n.parentNode==e.display.lineDiv)break}for(var o=0;o=t.display.viewTo||a.line=t.display.viewFrom&&qi(t,o)||{node:l[0].measure.map[2],offset:0},c=a.linen.firstLine()&&(i=tt(i.line-1,Ge(n.doc,i.line-1).length)),s.ch==Ge(n.doc,s.line).text.length&&s.lineo.viewTo-1)return!1;i.line==o.viewFrom||0==(e=fn(n,i.line))?(t=Je(o.view[0].line),r=o.view[0].node):(t=Je(o.view[e].line),r=o.view[e-1].node.nextSibling);var l,u,c=fn(n,s.line);if(c==o.view.length-1?(l=o.viewTo-1,u=o.lineDiv.lastChild):(l=Je(o.view[c+1].line)-1,u=o.view[c+1].node.previousSibling),!r)return!1;for(var f=n.doc.splitLines(function(e,t,r,n,o){var a="",i=!1,s=e.doc.lineSeparator(),l=!1;function u(){i&&(a+=s,l&&(a+=s),i=l=!1)}function c(e){e&&(u(),a+=e)}function f(t){if(1==t.nodeType){var r=t.getAttribute("cm-text");if(r)return void c(r);var a,p=t.getAttribute("cm-marker");if(p){var d=e.findMarks(tt(n,0),tt(o+1,0),(y=+p,function(e){return e.id==y}));return void(d.length&&(a=d[0].find(0))&&c(Ve(e.doc,a.from,a.to).join(s)))}if("false"==t.getAttribute("contenteditable"))return;var h=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;h&&u();for(var m=0;m1&&p.length>1;)if(Y(f)==Y(p))f.pop(),p.pop(),l--;else{if(f[0]!=p[0])break;f.shift(),p.shift(),t++}for(var d=0,h=0,m=f[0],y=p[0],v=Math.min(m.length,y.length);di.ch&&g.charCodeAt(g.length-h-1)==b.charCodeAt(b.length-h-1);)d--,h++;f[f.length-1]=g.slice(0,g.length-h).replace(/^\u200b+/,""),f[0]=f[0].slice(d).replace(/\u200b+$/,"");var _=tt(t,d),T=tt(l,p.length?Y(p).length-h:0);return f.length>1||f[0]||rt(_,T)?(ya(n.doc,f,_,T,"+input"),!0):void 0},Hi.prototype.ensurePolled=function(){this.forceCompositionEnd()},Hi.prototype.reset=function(){this.forceCompositionEnd()},Hi.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Hi.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()}),80))},Hi.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||eo(this.cm,(function(){return pn(e.cm)}))},Hi.prototype.setUneditable=function(e){e.contentEditable="false"},Hi.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||to(this.cm,ji)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Hi.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Hi.prototype.onContextMenu=function(){},Hi.prototype.resetPosition=function(){},Hi.prototype.needsContentAttribute=!0;var Ki=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new B,this.hasSelection=!1,this.composing=null};Ki.prototype.init=function(e){var t=this,r=this,n=this.cm;this.createField(e);var o=this.textarea;function a(e){if(!ye(n,e)){if(n.somethingSelected())Ni({lineWise:!1,text:n.getSelections()});else{if(!n.options.lineWiseCopyCut)return;var t=Mi(n);Ni({lineWise:!0,text:t.text}),"cut"==e.type?n.setSelections(t.ranges,null,z):(r.prevInput="",o.value=t.text.join("\n"),M(o))}"cut"==e.type&&(n.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),y&&(o.style.width="0px"),pe(o,"input",(function(){s&&l>=9&&t.hasSelection&&(t.hasSelection=null),r.poll()})),pe(o,"paste",(function(e){ye(n,e)||Di(e,n)||(n.state.pasteIncoming=+new Date,r.fastPoll())})),pe(o,"cut",a),pe(o,"copy",a),pe(e.scroller,"paste",(function(t){if(!Tr(e,t)&&!ye(n,t)){if(!o.dispatchEvent)return n.state.pasteIncoming=+new Date,void r.focus();var a=new Event("paste");a.clipboardData=t.clipboardData,o.dispatchEvent(a)}})),pe(e.lineSpace,"selectstart",(function(t){Tr(e,t)||Ee(t)})),pe(o,"compositionstart",(function(){var e=n.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:e,range:n.markText(e,n.getCursor("to"),{className:"CodeMirror-composing"})}})),pe(o,"compositionend",(function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)}))},Ki.prototype.createField=function(e){this.wrapper=Fi(),this.textarea=this.wrapper.firstChild},Ki.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=gn(e);if(e.options.moveInputWithCursor){var o=Gr(e,r.sel.primary().head,"div"),a=t.wrapper.getBoundingClientRect(),i=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,o.top+i.top-a.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,o.left+i.left-a.left))}return n},Ki.prototype.showSelection=function(e){var t=this.cm.display;A(t.cursorDiv,e.cursors),A(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Ki.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var r=t.getSelection();this.textarea.value=r,t.state.focused&&M(this.textarea),s&&l>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",s&&l>=9&&(this.hasSelection=null))}},Ki.prototype.getField=function(){return this.textarea},Ki.prototype.supportsTouch=function(){return!1},Ki.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!g||j()!=this.textarea))try{this.textarea.focus()}catch(e){}},Ki.prototype.blur=function(){this.textarea.blur()},Ki.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ki.prototype.receivedFocus=function(){this.slowPoll()},Ki.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},Ki.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0,t.polling.set(20,(function r(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,r))}))},Ki.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||je(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var o=r.value;if(o==n&&!t.somethingSelected())return!1;if(s&&l>=9&&this.hasSelection===o||b&&/[\uf700-\uf7ff]/.test(o))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var a=o.charCodeAt(0);if(8203!=a||n||(n="​"),8666==a)return this.reset(),this.cm.execCommand("undo")}for(var i=0,u=Math.min(n.length,o.length);i1e3||o.indexOf("\n")>-1?r.value=e.prevInput="":e.prevInput=o,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},Ki.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ki.prototype.onKeyPress=function(){s&&l>=9&&(this.hasSelection=null),this.fastPoll()},Ki.prototype.onContextMenu=function(e){var t=this,r=t.cm,n=r.display,o=t.textarea;t.contextMenuPending&&t.contextMenuPending();var a=cn(r,e),i=n.scroller.scrollTop;if(a&&!p){r.options.resetSelectionOnContextMenu&&-1==r.doc.sel.contains(a)&&to(r,ta)(r.doc,Oo(a),z);var c,f=o.style.cssText,d=t.wrapper.style.cssText,h=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",o.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-h.top-5)+"px; left: "+(e.clientX-h.left-5)+"px;\n z-index: 1000; background: "+(s?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",u&&(c=window.scrollY),n.input.focus(),u&&window.scrollTo(null,c),n.input.reset(),r.somethingSelected()||(o.value=t.prevInput=" "),t.contextMenuPending=y,n.selForContextMenu=r.doc.sel,clearTimeout(n.detectingSelectAll),s&&l>=9&&m(),w?(Se(e),pe(window,"mouseup",(function e(){he(window,"mouseup",e),setTimeout(y,20)}))):setTimeout(y,50)}function m(){if(null!=o.selectionStart){var e=r.somethingSelected(),a="​"+(e?o.value:"");o.value="⇚",o.value=a,t.prevInput=e?"":"​",o.selectionStart=1,o.selectionEnd=a.length,n.selForContextMenu=r.doc.sel}}function y(){if(t.contextMenuPending==y&&(t.contextMenuPending=!1,t.wrapper.style.cssText=d,o.style.cssText=f,s&&l<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=i),null!=o.selectionStart)){(!s||s&&l<9)&&m();var e=0;n.detectingSelectAll=setTimeout((function a(){n.selForContextMenu==r.doc.sel&&0==o.selectionStart&&o.selectionEnd>0&&"​"==t.prevInput?to(r,ua)(r):e++<10?n.detectingSelectAll=setTimeout(a,500):(n.selForContextMenu=null,n.input.reset())}),200)}}},Ki.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e},Ki.prototype.setUneditable=function(){},Ki.prototype.needsContentAttribute=!1,function(e){var t=e.optionHandlers;function r(r,n,o,a){e.defaults[r]=n,o&&(t[r]=a?function(e,t,r){r!=Si&&o(e,t,r)}:o)}e.defineOption=r,e.Init=Si,r("value","",(function(e,t){return e.setValue(t)}),!0),r("mode",null,(function(e,t){e.doc.modeOption=t,No(e)}),!0),r("indentUnit",2,No,!0),r("indentWithTabs",!1),r("smartIndent",!0),r("tabSize",4,(function(e){jo(e),Br(e),pn(e)}),!0),r("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var r=[],n=e.doc.first;e.doc.iter((function(e){for(var o=0;;){var a=e.text.indexOf(t,o);if(-1==a)break;o=a+t.length,r.push(tt(n,a))}n++}));for(var o=r.length-1;o>=0;o--)ya(e.doc,t,r[o],tt(r[o].line,r[o].ch+t.length))}})),r("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(e,t,r){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),r!=Si&&e.refresh()})),r("specialCharPlaceholder",Zt,(function(e){return e.refresh()}),!0),r("electricChars",!0),r("inputStyle",g?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),r("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),r("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),r("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),r("rtlMoveVisually",!_),r("wholeLineUpdateBefore",!0),r("theme","default",(function(e){Ti(e),vo(e)}),!0),r("keyMap","default",(function(e,t,r){var n=Ja(t),o=r!=Si&&Ja(r);o&&o.detach&&o.detach(e,n),n.attach&&n.attach(e,o||null)})),r("extraKeys",null),r("configureMouse",null),r("lineWrapping",!1,Oi,!0),r("gutters",[],(function(e,t){e.display.gutterSpecs=mo(t,e.options.lineNumbers),vo(e)}),!0),r("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?sn(e.display)+"px":"0",e.refresh()}),!0),r("coverGutterNextToScrollbar",!1,(function(e){return qn(e)}),!0),r("scrollbarStyle","native",(function(e){Wn(e),qn(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),r("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=mo(e.options.gutters,t),vo(e)}),!0),r("firstLineNumber",1,vo,!0),r("lineNumberFormatter",(function(e){return e}),vo,!0),r("showCursorWhenSelecting",!1,vn,!0),r("resetSelectionOnContextMenu",!0),r("lineWiseCopyCut",!0),r("pasteLinesPerSelection",!0),r("selectionsMayTouch",!1),r("readOnly",!1,(function(e,t){"nocursor"==t&&(kn(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),r("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),r("dragDrop",!0,ki),r("allowDropFileTypes",null),r("cursorBlinkRate",530),r("cursorScrollMargin",0),r("cursorHeight",1,vn,!0),r("singleCursorHeightPerLine",!0,vn,!0),r("workTime",100),r("workDelay",100),r("flattenSpans",!0,jo,!0),r("addModeClass",!1,jo,!0),r("pollInterval",100),r("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),r("historyEventDelay",1250),r("viewportMargin",10,(function(e){return e.refresh()}),!0),r("maxHighlightLength",1e4,jo,!0),r("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),r("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),r("autofocus",null),r("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),r("phrases",null)}(Ci),function(e){var t=e.optionHandlers,r=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,r){var n=this.options,o=n[e];n[e]==r&&"mode"!=e||(n[e]=r,t.hasOwnProperty(e)&&to(this,t[e])(this,r,o),me(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Ja(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,r=0;rr&&(Pi(this,o.head.line,e,!0),r=o.head.line,n==this.doc.sel.primIndex&&Nn(this));else{var a=o.from(),i=o.to(),s=Math.max(r,a.line);r=Math.min(this.lastLine(),i.line-(i.ch?0:1))+1;for(var l=s;l0&&Xo(this.doc,n,new xo(a,u[n].to()),z)}}})),getTokenAt:function(e,t){return bt(this,e,t)},getLineTokens:function(e,t){return bt(this,tt(e),t,!0)},getTokenTypeAt:function(e){e=lt(this.doc,e);var t,r=dt(this,Ge(this.doc,e.line)),n=0,o=(r.length-1)/2,a=e.ch;if(0==a)t=r[2];else for(;;){var i=n+o>>1;if((i?r[2*i-1]:0)>=a)o=i;else{if(!(r[2*i+1]a&&(e=a,o=!0),n=Ge(this.doc,e)}else n=e;return $r(this,n,{top:0,left:0},t||"page",r||o).top+(o?this.doc.height-$t(n):0)},defaultTextHeight:function(){return nn(this.display)},defaultCharWidth:function(){return on(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,r,n,o){var a,i,s,l=this.display,u=(e=Gr(this,lt(this.doc,e))).bottom,c=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),l.sizer.appendChild(t),"over"==n)u=e.top;else if("above"==n||"near"==n){var f=Math.max(l.wrapper.clientHeight,this.doc.height),p=Math.max(l.sizer.clientWidth,l.lineSpace.clientWidth);("above"==n||e.bottom+t.offsetHeight>f)&&e.top>t.offsetHeight?u=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=f&&(u=e.bottom),c+t.offsetWidth>p&&(c=p-t.offsetWidth)}t.style.top=u+"px",t.style.left=t.style.right="","right"==o?(c=l.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==o?c=0:"middle"==o&&(c=(l.sizer.clientWidth-t.offsetWidth)/2),t.style.left=c+"px"),r&&(a=this,i={left:c,top:u,right:c+t.offsetWidth,bottom:u+t.offsetHeight},null!=(s=Pn(a,i)).scrollTop&&Mn(a,s.scrollTop),null!=s.scrollLeft&&Fn(a,s.scrollLeft))},triggerOnKeyDown:ro(fi),triggerOnKeyPress:ro(di),triggerOnKeyUp:pi,triggerOnMouseDown:ro(vi),execCommand:function(e){if(ri.hasOwnProperty(e))return ri[e].call(null,this)},triggerElectric:ro((function(e){Li(this,e)})),findPosH:function(e,t,r,n){var o=1;t<0&&(o=-1,t=-t);for(var a=lt(this.doc,e),i=0;i0&&i(t.charAt(r-1));)--r;for(;n.5)&&un(this),me(this,"refresh",this)})),swapDoc:ro((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),Io(this,e),Br(this),this.display.input.reset(),jn(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,lr(this,"swapDoc",this,t),t})),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},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}},be(e),e.registerHelper=function(t,n,o){r.hasOwnProperty(t)||(r[t]=e[t]={_global:[]}),r[t][n]=o},e.registerGlobalHelper=function(t,n,o,a){e.registerHelper(t,n,a),r[t]._global.push({pred:o,val:a})}}(Ci);var Gi="iter insert remove copy getEditor constructor".split(" ");for(var Vi in Na.prototype)Na.prototype.hasOwnProperty(Vi)&&H(Gi,Vi)<0&&(Ci.prototype[Vi]=function(e){return function(){return e.apply(this.doc,arguments)}}(Na.prototype[Vi]));return be(Na),Ci.inputStyles={textarea:Ki,contenteditable:Hi},Ci.defineMode=function(e){Ci.defaults.mode||"null"==e||(Ci.defaults.mode=e),Fe.apply(this,arguments)},Ci.defineMIME=function(e,t){Ie[e]=t},Ci.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),Ci.defineMIME("text/plain","null"),Ci.defineExtension=function(e,t){Ci.prototype[e]=t},Ci.defineDocExtension=function(e,t){Na.prototype[e]=t},Ci.fromTextArea=function(e,t){if((t=t?F(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var r=j();t.autofocus=r==e||null!=e.getAttribute("autofocus")&&r==document.body}function n(){e.value=s.getValue()}var o;if(e.form&&(pe(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var a=e.form;o=a.submit;try{var i=a.submit=function(){n(),a.submit=o,a.submit(),a.submit=i}}catch(e){}}t.finishInit=function(r){r.save=n,r.getTextArea=function(){return e},r.toTextArea=function(){r.toTextArea=isNaN,n(),e.parentNode.removeChild(r.getWrapperElement()),e.style.display="",e.form&&(he(e.form,"submit",n),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=o))}},e.style.display="none";var s=Ci((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return s},function(e){e.off=he,e.on=pe,e.wheelEventPixels=To,e.Doc=Na,e.splitLines=Ne,e.countColumn=U,e.findColumn=K,e.isWordChar=ee,e.Pass=q,e.signal=me,e.Line=Gt,e.changeEnd=Co,e.scrollbarModel=$n,e.Pos=tt,e.cmpPos=rt,e.modes=Me,e.mimeModes=Ie,e.resolveMode=Ue,e.getMode=Be,e.modeExtensions=He,e.extendMode=qe,e.copyState=ze,e.startState=We,e.innerMode=$e,e.commands=ri,e.keyMap=$a,e.keyName=Qa,e.isModifierKey=Va,e.lookupKey=Ga,e.normalizeKeyMap=Ka,e.StringStream=Ke,e.SharedTextMarker=Ca,e.TextMarker=ka,e.LineWidget=Sa,e.e_preventDefault=Ee,e.e_stopPropagation=_e,e.e_stop=Se,e.addClass=D,e.contains=N,e.rmClass=O,e.keyNames=Ba}(Ci),Ci.version="5.51.0",Ci},"object"===i(t)&&void 0!==e?e.exports=a():void 0===(o="function"==typeof(n=a)?n.call(t,r,t,e):n)||(e.exports=o)},function(e,t,r){"use strict";var n=r(21),o=function(e,t){this.code=[],this.indentation=e,this.lineJoin=t||"\n"};o.prototype.buildLine=function(e,t){var r="",o=2;if("[object String]"===Object.prototype.toString.call(e))o=1,t=e,e=0;else if(null===e)return null;for(;e;)r+=this.indentation,e--;var a=Array.prototype.slice.call(arguments,o,arguments.length);return a.unshift(r+t),n.format.apply(this,a)},o.prototype.unshift=function(){return this.code.unshift(this.buildLine.apply(this,arguments)),this},o.prototype.push=function(){return this.code.push(this.buildLine.apply(this,arguments)),this},o.prototype.blank=function(){return this.code.push(null),this},o.prototype.join=function(){return this.code.join(this.lineJoin)},e.exports=o},function(e,t){var r=e.exports={version:"2.6.11"};"number"==typeof __e&&(__e=r)},function(e,t,r){"use strict";t.__esModule=!0;var n,o=r(86),a=(n=o)&&n.__esModule?n:{default:n};t.default=a.default||function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};try{return T(e,t,r),!0}catch(e){if(e.message&&(e.message.startsWith("No widget")||e.message.startsWith("Unsupported widget")))return!1;throw e}},t.getDefaultFormState=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!w(e))throw new Error("Invalid schema: "+e);var n=M(e,r,t),o=S(n,e.default,r);if(void 0===t)return o;if(w(t))return x(o,t);return t||o},t.getUiOptions=function(e){return(0,f.default)(e).filter((function(e){return 0===e.indexOf("ui:")})).reduce((function(t,r){var n=e[r];return"ui:widget"===r&&w(n)?(console.warn("Setting options via ui:widget object is deprecated, use ui:options instead"),(0,d.default)({},t,n.options||{},{widget:n.component})):"ui:options"===r&&w(n)?(0,d.default)({},t,n):(0,d.default)({},t,(0,c.default)({},r.substring(3),n))}),{})},t.isObject=w,t.mergeObjects=x,t.asNumber=function(e){if(""===e)return;if(null===e)return null;if(/\.$/.test(e))return e;if(/\.0$/.test(e))return e;var t=Number(e),r="number"==typeof t&&!(0,l.default)(t);if(/\.\d*0$/.test(e))return e;return r?t:e},t.orderProperties=function(e,t){if(!Array.isArray(t))return e;var r=function(e){return e.reduce((function(e,t){return e[t]=!0,e}),{})},n=function(e){return e.length>1?"properties '"+e.join("', '")+"'":"property '"+e[0]+"'"},o=r(e),a=t.filter((function(e){return"*"!==e&&!o[e]}));a.length&&console.warn("uiSchema order list contains extraneous "+n(a));var i=t.filter((function(e){return"*"===e||o[e]})),l=r(i),u=e.filter((function(e){return!l[e]})),c=i.indexOf("*");if(-1===c){if(u.length)throw new Error("uiSchema order list does not contain "+n(u));return i}if(c!==i.lastIndexOf("*"))throw new Error("uiSchema order list contains more than one wildcard item");var f=[].concat((0,s.default)(i));return f.splice.apply(f,[c,1].concat((0,s.default)(u))),f},t.isConstant=k,t.toConstant=O,t.isSelect=C,t.isMultiSelect=A,t.isFilesArray=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("files"===t["ui:widget"])return!0;if(e.items){var n=M(e.items,r);return"string"===n.type&&"data-url"===n.format}return!1},t.isFixedItems=P,t.allowAdditionalItems=function(e){!0===e.additionalItems&&console.warn("additionalItems=true is currently not supported");return w(e.additionalItems)},t.optionsList=function(e){return e.enum?e.enum.map((function(t,r){return{label:e.enumNames&&e.enumNames[r]||String(t),value:t}})):(e.oneOf||e.anyOf).map((function(e,t){var r=O(e);return{label:e.title||String(r),value:r}}))},t.stubExistingAdditionalProperties=j,t.resolveSchema=D,t.retrieveSchema=M,t.deepEquals=q,t.shouldRender=function(e,t,r){var n=e.props,o=e.state;return!q(n,t)||!q(o,r)},t.toIdSchema=function e(t,r,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"root",i={$id:r||a};if("$ref"in t||"dependencies"in t){var s=M(t,n,o);return e(s,r,n,o,a)}if("items"in t&&!t.items.$ref)return e(t.items,r,n,o,a);if("object"!==t.type)return i;for(var l in t.properties||{}){var u=t.properties[l],c=i.$id+"_"+l;i[l]=e(u,c,n,(o||{})[l],a)}return i},t.parseDateString=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!e)return{year:-1,month:-1,day:-1,hour:t?-1:0,minute:t?-1:0,second:t?-1:0};var r=new Date(e);if((0,l.default)(r.getTime()))throw new Error("Unable to parse date "+e);return{year:r.getUTCFullYear(),month:r.getUTCMonth()+1,day:r.getUTCDate(),hour:t?r.getUTCHours():0,minute:t?r.getUTCMinutes():0,second:t?r.getUTCSeconds():0}},t.toDateString=function(e){var t=e.year,r=e.month,n=e.day,o=e.hour,a=void 0===o?0:o,i=e.minute,s=void 0===i?0:i,l=e.second,u=void 0===l?0:l,c=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],f=Date.UTC(t,r-1,n,a,s,u),p=new Date(f).toJSON();return c?p:p.slice(0,10)},t.pad=function(e,t){var r=String(e);for(;r.length2&&void 0!==arguments[2]?arguments[2]:{},n=_(e);function o(e){if(!e.MergedWidget){var t=e.defaultProps&&e.defaultProps.options||{};e.MergedWidget=function(r){var n=r.options,o=void 0===n?{}:n,a=(0,h.default)(r,["options"]);return m.default.createElement(e,(0,d.default)({options:(0,d.default)({},t,o)},a))}}return e.MergedWidget}if("function"==typeof t)return o(t);if("string"!=typeof t)throw new Error("Unsupported widget definition: "+(void 0===t?"undefined":(0,p.default)(t)));if(r.hasOwnProperty(t)){var a=r[t];return T(e,a,r)}if(!E.hasOwnProperty(n))throw new Error('No widget for type "'+n+'"');if(E[n].hasOwnProperty(t)){var i=r[E[n][t]];return T(e,i,r)}throw new Error('No widget "'+t+'" for type "'+n+'"')}function S(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=t;if(w(n)&&w(e.default))n=x(n,e.default);else if("default"in e)n=e.default;else{if("$ref"in e){var o=R(e.$ref,r);return S(o,n,r)}P(e)&&(n=e.items.map((function(e){return S(e,void 0,r)})))}switch(void 0===n&&(n=e.default),e.type){case"object":return(0,f.default)(e.properties||{}).reduce((function(t,o){return t[o]=S(e.properties[o],(n||{})[o],r),t}),{});case"array":if(e.minItems){if(A(e,r))return[];var a=n?n.length:0;if(e.minItems>a){var i=n||[],s=Array.isArray(e.items)?e.additionalItems:e.items,l=(0,v.default)(new Array(e.minItems-a),S(s,s.defaults,r));return i.concat(l)}}}return n}function w(e){return!("undefined"!=typeof File&&e instanceof File)&&("object"===(void 0===e?"undefined":(0,p.default)(e))&&null!==e&&!Array.isArray(e))}function x(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=(0,u.default)({},e);return(0,f.default)(t).reduce((function(n,o){var a=e?e[o]:{},i=t[o];return e&&e.hasOwnProperty(o)&&w(i)?n[o]=x(a,i,r):r&&Array.isArray(a)&&Array.isArray(i)?n[o]=a.concat(i):n[o]=i,n}),n)}function k(e){return Array.isArray(e.enum)&&1===e.enum.length||e.hasOwnProperty("const")}function O(e){if(Array.isArray(e.enum)&&1===e.enum.length)return e.enum[0];if(e.hasOwnProperty("const"))return e.const;throw new Error("schema cannot be inferred as a constant")}function C(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=M(e,t),n=r.oneOf||r.anyOf;return!!Array.isArray(r.enum)||!!Array.isArray(n)&&n.every((function(e){return k(e)}))}function A(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return!(!e.uniqueItems||!e.items)&&C(e.items,t)}function P(e){return Array.isArray(e.items)&&e.items.length>0&&e.items.every((function(e){return w(e)}))}function R(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=/^#(?:\/definitions)?\/(.*)$/.exec(e);if(r&&r[1]){var n=r[1].split("/"),o=t,a=!0,s=!1,l=void 0;try{for(var u,c=(0,i.default)(n);!(a=(u=c.next()).done);a=!0){var f=u.value;for(f=f.replace(/~1/g,"/").replace(/~0/g,"~");o.hasOwnProperty("$ref");)o=R(o.$ref,t);if(!o.hasOwnProperty(f))throw new Error("Could not find a definition for "+e+".");o=o[f]}}catch(e){s=!0,l=e}finally{try{!a&&c.return&&c.return()}finally{if(s)throw l}}return o}throw new Error("Could not find a definition for "+e+".")}var N=t.guessType=function(e){return Array.isArray(e)?"array":"string"==typeof e?"string":null==e?"null":"boolean"==typeof e?"boolean":isNaN(e)?"object"===(void 0===e?"undefined":(0,p.default)(e))?"object":"string":"number"};function j(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e=(0,d.default)({},e,{properties:(0,d.default)({},e.properties)}),(0,f.default)(r).forEach((function(n){if(!e.properties.hasOwnProperty(n)){var o=void 0;o=e.additionalProperties.hasOwnProperty("type")?(0,d.default)({},e.additionalProperties):e.additionalProperties.hasOwnProperty("$ref")?M(e.additionalProperties,t,r):{type:N(r[n])},e.properties[n]=o,e.properties[n][b]=!0}})),e}function D(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e.hasOwnProperty("$ref"))return L(e,t,r);if(e.hasOwnProperty("dependencies")){var n=I(e,t,r);return M(n,t,r)}return e}function L(e,t,r){var n=R(e.$ref,t),o=(e.$ref,(0,h.default)(e,["$ref"]));return M((0,d.default)({},n,o),t,r)}function M(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=D(e,t,r),o=n.hasOwnProperty("additionalProperties")&&!1!==n.additionalProperties;return o?j(n,t,r):n}function I(e,t,r){var n=e.dependencies,o=void 0===n?{}:n,a=(0,h.default)(e,["dependencies"]);for(var i in o)if(void 0!==r[i]){var s=o[i];Array.isArray(s)?a=F(a,s):w(s)&&(a=U(a,t,r,i,s))}return a}function F(e,t){if(!t)return e;var r=Array.isArray(e.required)?(0,a.default)(new o.default([].concat((0,s.default)(e.required),(0,s.default)(t)))):t;return(0,d.default)({},e,{required:r})}function U(e,t,r,n,o){var a=M(o,t,r),i=a.oneOf;if(e=B(e,(0,h.default)(a,["oneOf"])),void 0===i)return e;if(!Array.isArray(i))throw new Error("invalid: it is some "+(void 0===i?"undefined":(0,p.default)(i))+" instead of an array");var s=i.map((function(e){return e.hasOwnProperty("$ref")?L(e,t,r):e}));return function(e,t,r,n,o){var a=o.filter((function(e){if(!e.properties)return!1;var t=e.properties[n];if(t){var o={type:"object",properties:(0,c.default)({},n,t)};return 0===(0,y.default)(r,o).errors.length}}));if(1!==a.length)return console.warn("ignoring oneOf in dependencies because there isn't exactly one subschema that is valid"),e;var i=a[0],s=i.properties,l=(s[n],(0,h.default)(s,[n])),u=(0,d.default)({},i,{properties:l});return B(e,M(u,t,r))}(e,t,r,n,s)}function B(e,t){return x(e,t,!0)}function H(e){return"[object Arguments]"===Object.prototype.toString.call(e)}function q(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(e===t)return!0;if("function"==typeof e||"function"==typeof t)return!0;if("object"!==(void 0===e?"undefined":(0,p.default)(e))||"object"!==(void 0===t?"undefined":(0,p.default)(t)))return!1;if(null===e||null===t)return!1;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(e instanceof RegExp&&t instanceof RegExp)return e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase;if(H(e)||H(t)){if(!H(e)||!H(t))return!1;var o=Array.prototype.slice;return q(o.call(e),o.call(t),r,n)}if(e.constructor!==t.constructor)return!1;var a=(0,f.default)(e),i=(0,f.default)(t);if(0===a.length&&0===i.length)return!0;if(a.length!==i.length)return!1;for(var s=r.length;s--;)if(r[s]===e)return n[s]===t;r.push(e),n.push(t),a.sort(),i.sort();for(var l=a.length-1;l>=0;l--)if(a[l]!==i[l])return!1;for(var u=void 0,c=a.length-1;c>=0;c--)if(!q(e[u=a[c]],t[u],r,n))return!1;return r.pop(),n.pop(),!0}},function(e,t){e.exports=function(){for(var e={},t=0;t1)for(var r=1;r=o)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}})),s=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),m(r)?n.showHidden=r:r&&t._extend(n,r),b(n.showHidden)&&(n.showHidden=!1),b(n.depth)&&(n.depth=2),b(n.colors)&&(n.colors=!1),b(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=u),f(n,e,n.depth)}function u(e,t){var r=l.styles[t];return r?"["+l.colors[r][0]+"m"+e+"["+l.colors[r][1]+"m":e}function c(e,t){return e}function f(e,r,n){if(e.customInspect&&r&&w(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var o=r.inspect(n,e);return g(o)||(o=f(e,o,n)),o}var a=function(e,t){if(b(t))return e.stylize("undefined","undefined");if(g(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(v(t))return e.stylize(""+t,"number");if(m(t))return e.stylize(""+t,"boolean");if(y(t))return e.stylize("null","null")}(e,r);if(a)return a;var i=Object.keys(r),s=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(i);if(e.showHidden&&(i=Object.getOwnPropertyNames(r)),S(r)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return p(r);if(0===i.length){if(w(r)){var l=r.name?": "+r.name:"";return e.stylize("[Function"+l+"]","special")}if(E(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(T(r))return e.stylize(Date.prototype.toString.call(r),"date");if(S(r))return p(r)}var u,c="",_=!1,x=["{","}"];(h(r)&&(_=!0,x=["[","]"]),w(r))&&(c=" [Function"+(r.name?": "+r.name:"")+"]");return E(r)&&(c=" "+RegExp.prototype.toString.call(r)),T(r)&&(c=" "+Date.prototype.toUTCString.call(r)),S(r)&&(c=" "+p(r)),0!==i.length||_&&0!=r.length?n<0?E(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),u=_?function(e,t,r,n,o){for(var a=[],i=0,s=t.length;i=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1];return r[0]+t+" "+e.join(", ")+" "+r[1]}(u,c,x)):x[0]+c+x[1]}function p(e){return"["+Error.prototype.toString.call(e)+"]"}function d(e,t,r,n,o,a){var i,s,l;if((l=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?s=l.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):l.set&&(s=e.stylize("[Setter]","special")),A(n,o)||(i="["+o+"]"),s||(e.seen.indexOf(l.value)<0?(s=y(r)?f(e,l.value,null):f(e,l.value,r-1)).indexOf("\n")>-1&&(s=a?s.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),b(i)){if(a&&o.match(/^\d+$/))return s;(i=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(i=i.substr(1,i.length-2),i=e.stylize(i,"name")):(i=i.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),i=e.stylize(i,"string"))}return i+": "+s}function h(e){return Array.isArray(e)}function m(e){return"boolean"==typeof e}function y(e){return null===e}function v(e){return"number"==typeof e}function g(e){return"string"==typeof e}function b(e){return void 0===e}function E(e){return _(e)&&"[object RegExp]"===x(e)}function _(e){return"object"===n(e)&&null!==e}function T(e){return _(e)&&"[object Date]"===x(e)}function S(e){return _(e)&&("[object Error]"===x(e)||e instanceof Error)}function w(e){return"function"==typeof e}function x(e){return Object.prototype.toString.call(e)}function k(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(r){if(b(i)&&(i=e.env.NODE_DEBUG||""),r=r.toUpperCase(),!s[r])if(new RegExp("\\b"+r+"\\b","i").test(i)){var n=e.pid;s[r]=function(){var e=t.format.apply(t,arguments);console.error("%s %d: %s",r,n,e)}}else s[r]=function(){};return s[r]},t.inspect=l,l.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},l.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=h,t.isBoolean=m,t.isNull=y,t.isNullOrUndefined=function(e){return null==e},t.isNumber=v,t.isString=g,t.isSymbol=function(e){return"symbol"===n(e)},t.isUndefined=b,t.isRegExp=E,t.isObject=_,t.isDate=T,t.isError=S,t.isFunction=w,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"===n(e)||void 0===e},t.isBuffer=r(725);var O=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function C(){var e=new Date,t=[k(e.getHours()),k(e.getMinutes()),k(e.getSeconds())].join(":");return[e.getDate(),O[e.getMonth()],t].join(" ")}function A(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",C(),t.format.apply(t,arguments))},t.inherits=r(43),t._extend=function(e,t){if(!t||!_(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var P="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function R(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(P&&e[P]){var t;if("function"!=typeof(t=e[P]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,P,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,r,n=new Promise((function(e,n){t=e,r=n})),o=[],a=0;a=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}},function(e,t,r){"use strict";e.exports=r(320)},function(e,t,r){var n=r(33),o=r(324),a=r(159),i=r(94),s=r(340),l=r(371),u=r(411),c=r(465),f=r(468),p=r(481),d=r(482),h=r(483),m=r(485),y=r(488),v=r(489),g=r(490);a.tagNames.push("input"),a.ancestors.input=["li"];var b=r(505);e.exports=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e?o().use(u).use(d.sanitize(a)).use(t.correctnewlines?function(){}:p).use(h.sanitize(a)).use(s,{allowDangerousHTML:!0}).use(l).use(c).use(f,{createElement:n.createElement,components:{"readme-variable":i,"readme-glossary-item":b,table:m(a),h1:y("h1",a),h2:y("h2",a),h3:y("h3",a),h4:y("h4",a),h5:y("h5",a),h6:y("h6",a),a:v(a),code:g(a),div:function(e){return n.createElement(n.Fragment,e)}}}).processSync(e).contents:null}},function(e,t,r){e.exports={default:r(544),__esModule:!0}},function(e,t,r){var n=r(18),o=r(64);e.exports=r(20)?function(e,t,r){return n.f(e,t,o(1,r))}:function(e,t,r){return e[t]=r,e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fieldProps=t.registry=void 0;var n,o=r(1),a=(n=o)&&n.__esModule?n:{default:n};var i=t.registry=a.default.shape({ArrayFieldTemplate:a.default.func,FieldTemplate:a.default.func,ObjectFieldTemplate:a.default.func,definitions:a.default.object.isRequired,fields:a.default.objectOf(a.default.func).isRequired,formContext:a.default.object.isRequired,widgets:a.default.objectOf(a.default.oneOfType([a.default.func,a.default.object])).isRequired});t.fieldProps={autofocus:a.default.bool,disabled:a.default.bool,errorSchema:a.default.object,formData:a.default.any,idSchema:a.default.object,onBlur:a.default.func,onChange:a.default.func.isRequired,onFocus:a.default.func,rawErrors:a.default.arrayOf(a.default.string),readonly:a.default.bool,registry:i.isRequired,required:a.default.bool,schema:a.default.object.isRequired,uiSchema:a.default.shape({"ui:options":a.default.shape({addable:a.default.bool,orderable:a.default.bool,removable:a.default.bool})})}},function(e,t,r){var n=r(224),o=r(493);e.exports=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{dark:!1,tokenizeVariables:!1};return n.createElement("span",{className:r.dark?"cm-s-tomorrow-night":"cm-s-neo"},o("string"==typeof e?e:"",t,r))},e.exports.uppercase=r(228)},function(e,t,r){var n;function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}!function(){"use strict";var a={}.hasOwnProperty;function i(){for(var e=[],t=0;t=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|e}function h(e,t){if(l.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return B(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return H(e).length;default:if(n)return B(e).length;t=(""+t).toLowerCase(),n=!0}}function m(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return A(this,t,r);case"utf8":case"utf-8":return k(this,t,r);case"ascii":return O(this,t,r);case"latin1":case"binary":return C(this,t,r);case"base64":return x(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function y(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function v(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=l.from(t,n)),l.isBuffer(t))return 0===t.length?-1:g(e,t,r,n,o);if("number"==typeof t)return t&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):g(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function g(e,t,r,n,o){var a,i=1,s=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;i=2,s/=2,l/=2,r/=2}function u(e,t){return 1===i?e[t]:e.readUInt16BE(t*i)}if(o){var c=-1;for(a=r;as&&(r=s-l),a=r;a>=0;a--){for(var f=!0,p=0;po&&(n=o):n=o;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var i=0;i>8,o=r%256,a.push(o),a.push(n);return a}(t,e.length-r),e,r,n)}function x(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function k(e,t,r){r=Math.min(e.length,r);for(var n=[],o=t;o239?4:u>223?3:u>191?2:1;if(o+f<=r)switch(f){case 1:u<128&&(c=u);break;case 2:128==(192&(a=e[o+1]))&&(l=(31&u)<<6|63&a)>127&&(c=l);break;case 3:a=e[o+1],i=e[o+2],128==(192&a)&&128==(192&i)&&(l=(15&u)<<12|(63&a)<<6|63&i)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:a=e[o+1],i=e[o+2],s=e[o+3],128==(192&a)&&128==(192&i)&&128==(192&s)&&(l=(15&u)<<18|(63&a)<<12|(63&i)<<6|63&s)>65535&&l<1114112&&(c=l)}null===c?(c=65533,f=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),o+=f}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),""},l.prototype.compare=function(e,t,r,n,o){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(this===e)return 0;for(var a=(o>>>=0)-(n>>>=0),i=(r>>>=0)-(t>>>=0),s=Math.min(a,i),u=this.slice(n,o),c=e.slice(t,r),f=0;fo)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return b(this,e,t,r);case"utf8":case"utf-8":return E(this,e,t,r);case"ascii":return _(this,e,t,r);case"latin1":case"binary":return T(this,e,t,r);case"base64":return S(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(this,e,t,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function O(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;on)&&(r=n);for(var o="",a=t;ar)throw new RangeError("Trying to access beyond buffer length")}function N(e,t,r,n,o,a){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function j(e,t,r,n){t<0&&(t=65535+t+1);for(var o=0,a=Math.min(e.length-r,2);o>>8*(n?o:1-o)}function D(e,t,r,n){t<0&&(t=4294967295+t+1);for(var o=0,a=Math.min(e.length-r,4);o>>8*(n?o:3-o)&255}function L(e,t,r,n,o,a){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function M(e,t,r,n,a){return a||L(e,0,r,4),o.write(e,t,r,n,23,4),r+4}function I(e,t,r,n,a){return a||L(e,0,r,8),o.write(e,t,r,n,52,8),r+8}l.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(o*=256);)n+=this[e+--t]*o;return n},l.prototype.readUInt8=function(e,t){return t||R(e,1,this.length),this[e]},l.prototype.readUInt16LE=function(e,t){return t||R(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUInt16BE=function(e,t){return t||R(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUInt32LE=function(e,t){return t||R(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUInt32BE=function(e,t){return t||R(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||R(e,t,this.length);for(var n=this[e],o=1,a=0;++a=(o*=128)&&(n-=Math.pow(2,8*t)),n},l.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||R(e,t,this.length);for(var n=t,o=1,a=this[e+--n];n>0&&(o*=256);)a+=this[e+--n]*o;return a>=(o*=128)&&(a-=Math.pow(2,8*t)),a},l.prototype.readInt8=function(e,t){return t||R(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){t||R(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt16BE=function(e,t){t||R(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt32LE=function(e,t){return t||R(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return t||R(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return t||R(e,4,this.length),o.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return t||R(e,4,this.length),o.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return t||R(e,8,this.length),o.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return t||R(e,8,this.length),o.read(this,e,!1,52,8)},l.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||N(this,e,t,r,Math.pow(2,8*r)-1,0);var o=1,a=0;for(this[t]=255&e;++a=0&&(a*=256);)this[t+o]=e/a&255;return t+r},l.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,1,255,0),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},l.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):j(this,e,t,!0),t+2},l.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):j(this,e,t,!1),t+2},l.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):D(this,e,t,!0),t+4},l.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):D(this,e,t,!1),t+4},l.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var o=Math.pow(2,8*r-1);N(this,e,t,r,o-1,-o)}var a=0,i=1,s=0;for(this[t]=255&e;++a>0)-s&255;return t+r},l.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var o=Math.pow(2,8*r-1);N(this,e,t,r,o-1,-o)}var a=r-1,i=1,s=0;for(this[t+a]=255&e;--a>=0&&(i*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/i>>0)-s&255;return t+r},l.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,1,127,-128),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):j(this,e,t,!0),t+2},l.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):j(this,e,t,!1),t+2},l.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):D(this,e,t,!0),t+4},l.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):D(this,e,t,!1),t+4},l.prototype.writeFloatLE=function(e,t,r){return M(this,e,t,!0,r)},l.prototype.writeFloatBE=function(e,t,r){return M(this,e,t,!1,r)},l.prototype.writeDoubleLE=function(e,t,r){return I(this,e,t,!0,r)},l.prototype.writeDoubleBE=function(e,t,r){return I(this,e,t,!1,r)},l.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--o)e[o+t]=this[o+r];else if(a<1e3||!l.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(a=t;a55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(i+1===n){(t-=3)>-1&&a.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&a.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function H(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(F,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function q(e,t,r,n){for(var o=0;o=t.length||o>=e.length);++o)t[o+r]=e[o];return o}}).call(this,r(16))},function(e,t,r){var n=r(109),o=r(108);e.exports=function(e){return n(o(e))}},function(e,t,r){"use strict";function n(e,t,r){var n=r?" !== ":" === ",o=r?" || ":" && ",a=r?"!":"",i=r?"":"!";switch(e){case"null":return t+n+"null";case"array":return a+"Array.isArray("+t+")";case"object":return"("+a+t+o+"typeof "+t+n+'"object"'+o+i+"Array.isArray("+t+"))";case"integer":return"(typeof "+t+n+'"number"'+o+i+"("+t+" % 1)"+o+t+n+t+")";default:return"typeof "+t+n+'"'+e+'"'}}e.exports={copy:function(e,t){for(var r in t=t||{},e)t[r]=e[r];return t},checkDataType:n,checkDataTypes:function(e,t){switch(e.length){case 1:return n(e[0],t,!0);default:var r="",o=a(e);for(var i in o.array&&o.object&&(r=o.null?"(":"(!"+t+" || ",r+="typeof "+t+' !== "object")',delete o.null,delete o.array,delete o.object),o.number&&delete o.integer,o)r+=(r?" && ":"")+n(i,t,!0);return r}},coerceToTypes:function(e,t){if(Array.isArray(t)){for(var r=[],n=0;n=t)throw new Error("Cannot access property/index "+n+" levels up, current level is "+t);return r[t-n]}if(n>t)throw new Error("Cannot access data "+n+" levels up, current level is "+t);if(a="data"+(t-n||""),!o)return a}for(var s=a,u=o.split("/"),c=0;c=t)throw new Error("Cannot access property/index "+n+" levels up, current level is "+t);return r[t-n]}if(n>t)throw new Error("Cannot access data "+n+" levels up, current level is "+t);if(a="data"+(t-n||""),!o)return a}for(var s=a,u=o.split("/"),c=0;c1&&void 0!==arguments[1]?arguments[1]:{},r=/^#\/(.*)$/.exec(e);if(r&&r[0]){var n=r[1].split("/"),o=t;return n.forEach((function(t){if(!Object.prototype.hasOwnProperty.call(o,t))throw new Error("Could not find a definition for ".concat(e,"."));o=o[t]})),o}throw new Error("Could not find a definition for ".concat(e,"."))}},function(e,t,r){var n=r(58),o=r(234),a=r(527),i=r(233),s=r(235),l=r(528);e.exports={findSchemaDefinition:n,flattenArray:o,flattenSchema:a,getPath:i,getSchema:s,parametersToJsonSchema:l}},function(e,t,r){var n=r(239),o=r(113);e.exports=Object.keys||function(e){return n(e,o)}},function(e,t){var r={}.toString;e.exports=function(e){return r.call(e).slice(8,-1)}},function(e,t){e.exports=!0},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,r){"use strict";var n=r(557)(!0);r(118)(String,"String",(function(e){this._t=String(e),this._i=0}),(function(){var e,t=this._t,r=this._i;return r>=t.length?{value:void 0,done:!0}:(e=n(t,r),this._i+=e.length,{value:e,done:!1})}))},function(e,t){e.exports={}},function(e,t,r){var n=r(18).f,o=r(41),a=r(12)("toStringTag");e.exports=function(e,t,r){e&&!o(e=r?e:e.prototype,a)&&n(e,a,{configurable:!0,value:t})}},function(e,t,r){var n=r(26),o=r(251),a=r(252),i=r(22),s=r(84),l=r(126),u={},c={};(t=e.exports=function(e,t,r,f,p){var d,h,m,y,v=p?function(){return e}:l(e),g=n(r,f,t?2:1),b=0;if("function"!=typeof v)throw TypeError(e+" is not iterable!");if(a(v)){for(d=s(e.length);d>b;b++)if((y=t?g(i(h=e[b])[0],h[1]):g(e[b]))===u||y===c)return y}else for(m=v.call(e);!(h=m.next()).done;)if((y=o(m,g,h.value,t))===u||y===c)return y}).BREAK=u,t.RETURN=c},function(e,t,r){"use strict";t.__esModule=!0;var n,o=r(243),a=(n=o)&&n.__esModule?n:{default:n};t.default=function(e,t,r){return t in e?(0,a.default)(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},function(e,t,r){e.exports=o;var n=r(140).EventEmitter;function o(){n.call(this)}r(43)(o,n),o.Readable=r(141),o.Writable=r(711),o.Duplex=r(712),o.Transform=r(713),o.PassThrough=r(714),o.Stream=o,o.prototype.pipe=function(e,t){var r=this;function o(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function a(){r.readable&&r.resume&&r.resume()}r.on("data",o),e.on("drain",a),e._isStdio||t&&!1===t.end||(r.on("end",s),r.on("close",l));var i=!1;function s(){i||(i=!0,e.end())}function l(){i||(i=!0,"function"==typeof e.destroy&&e.destroy())}function u(e){if(c(),0===n.listenerCount(this,"error"))throw e}function c(){r.removeListener("data",o),e.removeListener("drain",a),r.removeListener("end",s),r.removeListener("close",l),r.removeListener("error",u),e.removeListener("error",u),r.removeListener("end",c),r.removeListener("close",c),e.removeListener("close",c)}return r.on("error",u),e.on("error",u),r.on("end",c),r.on("close",c),e.on("close",c),e.emit("pipe",r),e}},function(e,t,r){(function(e){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function n(e){return Object.prototype.toString.call(e)}t.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===n(e)},t.isBoolean=function(e){return"boolean"==typeof e},t.isNull=function(e){return null===e},t.isNullOrUndefined=function(e){return null==e},t.isNumber=function(e){return"number"==typeof e},t.isString=function(e){return"string"==typeof e},t.isSymbol=function(e){return"symbol"===r(e)},t.isUndefined=function(e){return void 0===e},t.isRegExp=function(e){return"[object RegExp]"===n(e)},t.isObject=function(e){return"object"===r(e)&&null!==e},t.isDate=function(e){return"[object Date]"===n(e)},t.isError=function(e){return"[object Error]"===n(e)||e instanceof Error},t.isFunction=function(e){return"function"==typeof e},t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"===r(e)||void 0===e},t.isBuffer=e.isBuffer}).call(this,r(52).Buffer)},function(e,t,r){"use strict";e.exports=r(318)},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e.exports=a;var o=r(344);function a(e,t,r,n){var a;function s(e,o,l){var u,c=[];return(t&&!a(e,o,l[l.length-1]||null)||!1!==(c=i(r(e,l)))[0])&&e.children&&"skip"!==c[0]&&!1===(u=i(function(e,t){var r,o=n?-1:1,a=(n?e.length:-1)+o;for(;a>-1&&a=r)return o.substr(0,r);for(;r>o.length&&t>1;)1&t&&(o+=e),t>>=1,e+=e;return o=(o+=e).substr(0,r)}},function(e,t,r){"use strict";var n={};function o(e,t,r){var a,i,s,l,u,c="";for("string"!=typeof t&&(r=t,t=o.defaultChars),void 0===r&&(r=!0),u=function(e){var t,r,o=n[e];if(o)return o;for(o=n[e]=[],t=0;t<128;t++)r=String.fromCharCode(t),/^[0-9a-z]$/i.test(r)?o.push(r):o.push("%"+("0"+t.toString(16).toUpperCase()).slice(-2));for(t=0;t=55296&&s<=57343){if(s>=55296&&s<=56319&&a+1=56320&&l<=57343){c+=encodeURIComponent(e[a]+e[a+1]),a++;continue}c+="%EF%BF%BD"}else c+=encodeURIComponent(e[a]);return c}o.defaultChars=";/?:@&=+$,-_.!~*'()#",o.componentChars="-_.!~*'()",e.exports=o},function(e,t,r){"use strict";function n(e,t){for(var r=0;r=l.DIGIT_0&&e<=l.DIGIT_9}function h(e){return e>=l.LATIN_CAPITAL_A&&e<=l.LATIN_CAPITAL_Z}function m(e){return e>=l.LATIN_SMALL_A&&e<=l.LATIN_SMALL_Z}function y(e){return m(e)||h(e)}function v(e){return y(e)||d(e)}function g(e){return e>=l.LATIN_CAPITAL_A&&e<=l.LATIN_CAPITAL_F}function b(e){return e>=l.LATIN_SMALL_A&&e<=l.LATIN_SMALL_F}function E(e){return e+32}function _(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(e>>>10&1023|55296)+String.fromCharCode(56320|1023&e))}function T(e){return String.fromCharCode(E(e))}function S(e,t){for(var r=i[++e],n=++e,o=n+r-1;n<=o;){var a=n+o>>>1,s=i[a];if(st))return i[a+r];o=a-1}}return-1}var w=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.preprocessor=new o,this.tokenQueue=[],this.allowCDATA=!1,this.state=f,this.returnState="",this.charRefCode=-1,this.tempBuff=[],this.lastStartTagName="",this.consumedAfterSnapshot=-1,this.active=!1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr=null}var t,r,w;return t=e,(r=[{key:"_err",value:function(){}},{key:"_errOnNextCodePoint",value:function(e){this._consume(),this._err(e),this._unconsume()}},{key:"getNextToken",value:function(){for(;!this.tokenQueue.length&&this.active;){this.consumedAfterSnapshot=0;var e=this._consume();this._ensureHibernation()||this[this.state](e)}return this.tokenQueue.shift()}},{key:"write",value:function(e,t){this.active=!0,this.preprocessor.write(e,t)}},{key:"insertHtmlAtCurrentPos",value:function(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e)}},{key:"_ensureHibernation",value:function(){if(this.preprocessor.endOfChunkHit){for(;this.consumedAfterSnapshot>0;this.consumedAfterSnapshot--)this.preprocessor.retreat();return this.active=!1,this.tokenQueue.push({type:e.HIBERNATION_TOKEN}),!0}return!1}},{key:"_consume",value:function(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}},{key:"_unconsume",value:function(){this.consumedAfterSnapshot--,this.preprocessor.retreat()}},{key:"_reconsumeInState",value:function(e){this.state=e,this._unconsume()}},{key:"_consumeSequenceIfMatch",value:function(e,t,r){for(var n=0,o=!0,a=e.length,i=0,s=t,u=void 0;i0&&(s=this._consume(),n++),s===l.EOF){o=!1;break}if(s!==(u=e[i])&&(r||s!==E(u))){o=!1;break}}if(!o)for(;n--;)this._unconsume();return o}},{key:"_isTempBufferEqualToScriptString",value:function(){if(this.tempBuff.length!==u.SCRIPT_STRING.length)return!1;for(var e=0;e0&&this._err(s.endTagWithAttributes),t.selfClosing&&this._err(s.endTagWithTrailingSolidus)),this.tokenQueue.push(t)}},{key:"_emitCurrentCharacterToken",value:function(){this.currentCharacterToken&&(this.tokenQueue.push(this.currentCharacterToken),this.currentCharacterToken=null)}},{key:"_emitEOFToken",value:function(){this._createEOFToken(),this._emitCurrentToken()}},{key:"_appendCharToCurrentCharacterToken",value:function(e,t){this.currentCharacterToken&&this.currentCharacterToken.type!==e&&this._emitCurrentCharacterToken(),this.currentCharacterToken?this.currentCharacterToken.chars+=t:this._createCharacterToken(e,t)}},{key:"_emitCodePoint",value:function(t){var r=e.CHARACTER_TOKEN;p(t)?r=e.WHITESPACE_CHARACTER_TOKEN:t===l.NULL&&(r=e.NULL_CHARACTER_TOKEN),this._appendCharToCurrentCharacterToken(r,_(t))}},{key:"_emitSeveralCodePoints",value:function(e){for(var t=0;t-1;){var o=i[n],a=o<7;a&&1&o&&(t=2&o?[i[++n],i[++n]]:[i[++n]],r=0);var s=this._consume();if(this.tempBuff.push(s),r++,s===l.EOF)break;n=a?4&o?S(n,s):-1:s===o?++n:-1}for(;r--;)this.tempBuff.pop(),this._unconsume();return t}},{key:"_isCharacterReferenceInAttribute",value:function(){return"ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE"===this.returnState||"ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE"===this.returnState||"ATTRIBUTE_VALUE_UNQUOTED_STATE"===this.returnState}},{key:"_isCharacterReferenceAttributeQuirk",value:function(e){if(!e&&this._isCharacterReferenceInAttribute()){var t=this._consume();return this._unconsume(),t===l.EQUALS_SIGN||v(t)}return!1}},{key:"_flushCodePointsConsumedAsCharacterReference",value:function(){if(this._isCharacterReferenceInAttribute())for(var e=0;e")):e===l.NULL?(this._err(s.unexpectedNullCharacter),this.state="SCRIPT_DATA_ESCAPED_STATE",this._emitChars(a.REPLACEMENT_CHARACTER)):e===l.EOF?(this._err(s.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state="SCRIPT_DATA_ESCAPED_STATE",this._emitCodePoint(e))}},{key:"SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE",value:function(e){e===l.SOLIDUS?(this.tempBuff=[],this.state="SCRIPT_DATA_ESCAPED_END_TAG_OPEN_STATE"):y(e)?(this.tempBuff=[],this._emitChars("<"),this._reconsumeInState("SCRIPT_DATA_DOUBLE_ESCAPE_START_STATE")):(this._emitChars("<"),this._reconsumeInState("SCRIPT_DATA_ESCAPED_STATE"))}},{key:"SCRIPT_DATA_ESCAPED_END_TAG_OPEN_STATE",value:function(e){y(e)?(this._createEndTagToken(),this._reconsumeInState("SCRIPT_DATA_ESCAPED_END_TAG_NAME_STATE")):(this._emitChars("")):e===l.NULL?(this._err(s.unexpectedNullCharacter),this.state="SCRIPT_DATA_DOUBLE_ESCAPED_STATE",this._emitChars(a.REPLACEMENT_CHARACTER)):e===l.EOF?(this._err(s.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state="SCRIPT_DATA_DOUBLE_ESCAPED_STATE",this._emitCodePoint(e))}},{key:"SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE",value:function(e){e===l.SOLIDUS?(this.tempBuff=[],this.state="SCRIPT_DATA_DOUBLE_ESCAPE_END_STATE",this._emitChars("/")):this._reconsumeInState("SCRIPT_DATA_DOUBLE_ESCAPED_STATE")}},{key:"SCRIPT_DATA_DOUBLE_ESCAPE_END_STATE",value:function(e){p(e)||e===l.SOLIDUS||e===l.GREATER_THAN_SIGN?(this.state=this._isTempBufferEqualToScriptString()?"SCRIPT_DATA_ESCAPED_STATE":"SCRIPT_DATA_DOUBLE_ESCAPED_STATE",this._emitCodePoint(e)):h(e)?(this.tempBuff.push(E(e)),this._emitCodePoint(e)):m(e)?(this.tempBuff.push(e),this._emitCodePoint(e)):this._reconsumeInState("SCRIPT_DATA_DOUBLE_ESCAPED_STATE")}},{key:"BEFORE_ATTRIBUTE_NAME_STATE",value:function(e){p(e)||(e===l.SOLIDUS||e===l.GREATER_THAN_SIGN||e===l.EOF?this._reconsumeInState("AFTER_ATTRIBUTE_NAME_STATE"):e===l.EQUALS_SIGN?(this._err(s.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state="ATTRIBUTE_NAME_STATE"):(this._createAttr(""),this._reconsumeInState("ATTRIBUTE_NAME_STATE")))}},{key:"ATTRIBUTE_NAME_STATE",value:function(e){p(e)||e===l.SOLIDUS||e===l.GREATER_THAN_SIGN||e===l.EOF?(this._leaveAttrName("AFTER_ATTRIBUTE_NAME_STATE"),this._unconsume()):e===l.EQUALS_SIGN?this._leaveAttrName("BEFORE_ATTRIBUTE_VALUE_STATE"):h(e)?this.currentAttr.name+=T(e):e===l.QUOTATION_MARK||e===l.APOSTROPHE||e===l.LESS_THAN_SIGN?(this._err(s.unexpectedCharacterInAttributeName),this.currentAttr.name+=_(e)):e===l.NULL?(this._err(s.unexpectedNullCharacter),this.currentAttr.name+=a.REPLACEMENT_CHARACTER):this.currentAttr.name+=_(e)}},{key:"AFTER_ATTRIBUTE_NAME_STATE",value:function(e){p(e)||(e===l.SOLIDUS?this.state="SELF_CLOSING_START_TAG_STATE":e===l.EQUALS_SIGN?this.state="BEFORE_ATTRIBUTE_VALUE_STATE":e===l.GREATER_THAN_SIGN?(this.state=f,this._emitCurrentToken()):e===l.EOF?(this._err(s.eofInTag),this._emitEOFToken()):(this._createAttr(""),this._reconsumeInState("ATTRIBUTE_NAME_STATE")))}},{key:"BEFORE_ATTRIBUTE_VALUE_STATE",value:function(e){p(e)||(e===l.QUOTATION_MARK?this.state="ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE":e===l.APOSTROPHE?this.state="ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE":e===l.GREATER_THAN_SIGN?(this._err(s.missingAttributeValue),this.state=f,this._emitCurrentToken()):this._reconsumeInState("ATTRIBUTE_VALUE_UNQUOTED_STATE"))}},{key:"ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE",value:function(e){e===l.QUOTATION_MARK?this.state="AFTER_ATTRIBUTE_VALUE_QUOTED_STATE":e===l.AMPERSAND?(this.returnState="ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE",this.state="CHARACTER_REFERENCE_STATE"):e===l.NULL?(this._err(s.unexpectedNullCharacter),this.currentAttr.value+=a.REPLACEMENT_CHARACTER):e===l.EOF?(this._err(s.eofInTag),this._emitEOFToken()):this.currentAttr.value+=_(e)}},{key:"ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE",value:function(e){e===l.APOSTROPHE?this.state="AFTER_ATTRIBUTE_VALUE_QUOTED_STATE":e===l.AMPERSAND?(this.returnState="ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE",this.state="CHARACTER_REFERENCE_STATE"):e===l.NULL?(this._err(s.unexpectedNullCharacter),this.currentAttr.value+=a.REPLACEMENT_CHARACTER):e===l.EOF?(this._err(s.eofInTag),this._emitEOFToken()):this.currentAttr.value+=_(e)}},{key:"ATTRIBUTE_VALUE_UNQUOTED_STATE",value:function(e){p(e)?this._leaveAttrValue("BEFORE_ATTRIBUTE_NAME_STATE"):e===l.AMPERSAND?(this.returnState="ATTRIBUTE_VALUE_UNQUOTED_STATE",this.state="CHARACTER_REFERENCE_STATE"):e===l.GREATER_THAN_SIGN?(this._leaveAttrValue(f),this._emitCurrentToken()):e===l.NULL?(this._err(s.unexpectedNullCharacter),this.currentAttr.value+=a.REPLACEMENT_CHARACTER):e===l.QUOTATION_MARK||e===l.APOSTROPHE||e===l.LESS_THAN_SIGN||e===l.EQUALS_SIGN||e===l.GRAVE_ACCENT?(this._err(s.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=_(e)):e===l.EOF?(this._err(s.eofInTag),this._emitEOFToken()):this.currentAttr.value+=_(e)}},{key:"AFTER_ATTRIBUTE_VALUE_QUOTED_STATE",value:function(e){p(e)?this._leaveAttrValue("BEFORE_ATTRIBUTE_NAME_STATE"):e===l.SOLIDUS?this._leaveAttrValue("SELF_CLOSING_START_TAG_STATE"):e===l.GREATER_THAN_SIGN?(this._leaveAttrValue(f),this._emitCurrentToken()):e===l.EOF?(this._err(s.eofInTag),this._emitEOFToken()):(this._err(s.missingWhitespaceBetweenAttributes),this._reconsumeInState("BEFORE_ATTRIBUTE_NAME_STATE"))}},{key:"SELF_CLOSING_START_TAG_STATE",value:function(e){e===l.GREATER_THAN_SIGN?(this.currentToken.selfClosing=!0,this.state=f,this._emitCurrentToken()):e===l.EOF?(this._err(s.eofInTag),this._emitEOFToken()):(this._err(s.unexpectedSolidusInTag),this._reconsumeInState("BEFORE_ATTRIBUTE_NAME_STATE"))}},{key:"BOGUS_COMMENT_STATE",value:function(e){e===l.GREATER_THAN_SIGN?(this.state=f,this._emitCurrentToken()):e===l.EOF?(this._emitCurrentToken(),this._emitEOFToken()):e===l.NULL?(this._err(s.unexpectedNullCharacter),this.currentToken.data+=a.REPLACEMENT_CHARACTER):this.currentToken.data+=_(e)}},{key:"MARKUP_DECLARATION_OPEN_STATE",value:function(e){this._consumeSequenceIfMatch(u.DASH_DASH_STRING,e,!0)?(this._createCommentToken(),this.state="COMMENT_START_STATE"):this._consumeSequenceIfMatch(u.DOCTYPE_STRING,e,!1)?this.state="DOCTYPE_STATE":this._consumeSequenceIfMatch(u.CDATA_START_STRING,e,!0)?this.allowCDATA?this.state="CDATA_SECTION_STATE":(this._err(s.cdataInHtmlContent),this._createCommentToken(),this.currentToken.data="[CDATA[",this.state="BOGUS_COMMENT_STATE"):this._ensureHibernation()||(this._err(s.incorrectlyOpenedComment),this._createCommentToken(),this._reconsumeInState("BOGUS_COMMENT_STATE"))}},{key:"COMMENT_START_STATE",value:function(e){e===l.HYPHEN_MINUS?this.state="COMMENT_START_DASH_STATE":e===l.GREATER_THAN_SIGN?(this._err(s.abruptClosingOfEmptyComment),this.state=f,this._emitCurrentToken()):this._reconsumeInState("COMMENT_STATE")}},{key:"COMMENT_START_DASH_STATE",value:function(e){e===l.HYPHEN_MINUS?this.state="COMMENT_END_STATE":e===l.GREATER_THAN_SIGN?(this._err(s.abruptClosingOfEmptyComment),this.state=f,this._emitCurrentToken()):e===l.EOF?(this._err(s.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="-",this._reconsumeInState("COMMENT_STATE"))}},{key:"COMMENT_STATE",value:function(e){e===l.HYPHEN_MINUS?this.state="COMMENT_END_DASH_STATE":e===l.LESS_THAN_SIGN?(this.currentToken.data+="<",this.state="COMMENT_LESS_THAN_SIGN_STATE"):e===l.NULL?(this._err(s.unexpectedNullCharacter),this.currentToken.data+=a.REPLACEMENT_CHARACTER):e===l.EOF?(this._err(s.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.data+=_(e)}},{key:"COMMENT_LESS_THAN_SIGN_STATE",value:function(e){e===l.EXCLAMATION_MARK?(this.currentToken.data+="!",this.state="COMMENT_LESS_THAN_SIGN_BANG_STATE"):e===l.LESS_THAN_SIGN?this.currentToken.data+="!":this._reconsumeInState("COMMENT_STATE")}},{key:"COMMENT_LESS_THAN_SIGN_BANG_STATE",value:function(e){e===l.HYPHEN_MINUS?this.state="COMMENT_LESS_THAN_SIGN_BANG_DASH_STATE":this._reconsumeInState("COMMENT_STATE")}},{key:"COMMENT_LESS_THAN_SIGN_BANG_DASH_STATE",value:function(e){e===l.HYPHEN_MINUS?this.state="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH_STATE":this._reconsumeInState("COMMENT_END_DASH_STATE")}},{key:"COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH_STATE",value:function(e){e!==l.GREATER_THAN_SIGN&&e!==l.EOF&&this._err(s.nestedComment),this._reconsumeInState("COMMENT_END_STATE")}},{key:"COMMENT_END_DASH_STATE",value:function(e){e===l.HYPHEN_MINUS?this.state="COMMENT_END_STATE":e===l.EOF?(this._err(s.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="-",this._reconsumeInState("COMMENT_STATE"))}},{key:"COMMENT_END_STATE",value:function(e){e===l.GREATER_THAN_SIGN?(this.state=f,this._emitCurrentToken()):e===l.EXCLAMATION_MARK?this.state="COMMENT_END_BANG_STATE":e===l.HYPHEN_MINUS?this.currentToken.data+="-":e===l.EOF?(this._err(s.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="--",this._reconsumeInState("COMMENT_STATE"))}},{key:"COMMENT_END_BANG_STATE",value:function(e){e===l.HYPHEN_MINUS?(this.currentToken.data+="--!",this.state="COMMENT_END_DASH_STATE"):e===l.GREATER_THAN_SIGN?(this._err(s.incorrectlyClosedComment),this.state=f,this._emitCurrentToken()):e===l.EOF?(this._err(s.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="--!",this._reconsumeInState("COMMENT_STATE"))}},{key:"DOCTYPE_STATE",value:function(e){p(e)?this.state="BEFORE_DOCTYPE_NAME_STATE":e===l.GREATER_THAN_SIGN?this._reconsumeInState("BEFORE_DOCTYPE_NAME_STATE"):e===l.EOF?(this._err(s.eofInDoctype),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(s.missingWhitespaceBeforeDoctypeName),this._reconsumeInState("BEFORE_DOCTYPE_NAME_STATE"))}},{key:"BEFORE_DOCTYPE_NAME_STATE",value:function(e){p(e)||(h(e)?(this._createDoctypeToken(T(e)),this.state="DOCTYPE_NAME_STATE"):e===l.NULL?(this._err(s.unexpectedNullCharacter),this._createDoctypeToken(a.REPLACEMENT_CHARACTER),this.state="DOCTYPE_NAME_STATE"):e===l.GREATER_THAN_SIGN?(this._err(s.missingDoctypeName),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=f):e===l.EOF?(this._err(s.eofInDoctype),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._createDoctypeToken(_(e)),this.state="DOCTYPE_NAME_STATE"))}},{key:"DOCTYPE_NAME_STATE",value:function(e){p(e)?this.state="AFTER_DOCTYPE_NAME_STATE":e===l.GREATER_THAN_SIGN?(this.state=f,this._emitCurrentToken()):h(e)?this.currentToken.name+=T(e):e===l.NULL?(this._err(s.unexpectedNullCharacter),this.currentToken.name+=a.REPLACEMENT_CHARACTER):e===l.EOF?(this._err(s.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.name+=_(e)}},{key:"AFTER_DOCTYPE_NAME_STATE",value:function(e){p(e)||(e===l.GREATER_THAN_SIGN?(this.state=f,this._emitCurrentToken()):e===l.EOF?(this._err(s.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this._consumeSequenceIfMatch(u.PUBLIC_STRING,e,!1)?this.state="AFTER_DOCTYPE_PUBLIC_KEYWORD_STATE":this._consumeSequenceIfMatch(u.SYSTEM_STRING,e,!1)?this.state="AFTER_DOCTYPE_SYSTEM_KEYWORD_STATE":this._ensureHibernation()||(this._err(s.invalidCharacterSequenceAfterDoctypeName),this.currentToken.forceQuirks=!0,this._reconsumeInState("BOGUS_DOCTYPE_STATE")))}},{key:"AFTER_DOCTYPE_PUBLIC_KEYWORD_STATE",value:function(e){p(e)?this.state="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER_STATE":e===l.QUOTATION_MARK?(this._err(s.missingWhitespaceAfterDoctypePublicKeyword),this.currentToken.publicId="",this.state="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE"):e===l.APOSTROPHE?(this._err(s.missingWhitespaceAfterDoctypePublicKeyword),this.currentToken.publicId="",this.state="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE"):e===l.GREATER_THAN_SIGN?(this._err(s.missingDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this.state=f,this._emitCurrentToken()):e===l.EOF?(this._err(s.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(s.missingQuoteBeforeDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState("BOGUS_DOCTYPE_STATE"))}},{key:"BEFORE_DOCTYPE_PUBLIC_IDENTIFIER_STATE",value:function(e){p(e)||(e===l.QUOTATION_MARK?(this.currentToken.publicId="",this.state="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE"):e===l.APOSTROPHE?(this.currentToken.publicId="",this.state="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE"):e===l.GREATER_THAN_SIGN?(this._err(s.missingDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this.state=f,this._emitCurrentToken()):e===l.EOF?(this._err(s.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(s.missingQuoteBeforeDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState("BOGUS_DOCTYPE_STATE")))}},{key:"DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE",value:function(e){e===l.QUOTATION_MARK?this.state="AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE":e===l.NULL?(this._err(s.unexpectedNullCharacter),this.currentToken.publicId+=a.REPLACEMENT_CHARACTER):e===l.GREATER_THAN_SIGN?(this._err(s.abruptDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=f):e===l.EOF?(this._err(s.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.publicId+=_(e)}},{key:"DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE",value:function(e){e===l.APOSTROPHE?this.state="AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE":e===l.NULL?(this._err(s.unexpectedNullCharacter),this.currentToken.publicId+=a.REPLACEMENT_CHARACTER):e===l.GREATER_THAN_SIGN?(this._err(s.abruptDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=f):e===l.EOF?(this._err(s.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.publicId+=_(e)}},{key:"AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE",value:function(e){p(e)?this.state="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS_STATE":e===l.GREATER_THAN_SIGN?(this.state=f,this._emitCurrentToken()):e===l.QUOTATION_MARK?(this._err(s.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE"):e===l.APOSTROPHE?(this._err(s.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE"):e===l.EOF?(this._err(s.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(s.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState("BOGUS_DOCTYPE_STATE"))}},{key:"BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS_STATE",value:function(e){p(e)||(e===l.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=f):e===l.QUOTATION_MARK?(this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE"):e===l.APOSTROPHE?(this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE"):e===l.EOF?(this._err(s.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(s.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState("BOGUS_DOCTYPE_STATE")))}},{key:"AFTER_DOCTYPE_SYSTEM_KEYWORD_STATE",value:function(e){p(e)?this.state="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER_STATE":e===l.QUOTATION_MARK?(this._err(s.missingWhitespaceAfterDoctypeSystemKeyword),this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE"):e===l.APOSTROPHE?(this._err(s.missingWhitespaceAfterDoctypeSystemKeyword),this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE"):e===l.GREATER_THAN_SIGN?(this._err(s.missingDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this.state=f,this._emitCurrentToken()):e===l.EOF?(this._err(s.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(s.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState("BOGUS_DOCTYPE_STATE"))}},{key:"BEFORE_DOCTYPE_SYSTEM_IDENTIFIER_STATE",value:function(e){p(e)||(e===l.QUOTATION_MARK?(this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE"):e===l.APOSTROPHE?(this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE"):e===l.GREATER_THAN_SIGN?(this._err(s.missingDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this.state=f,this._emitCurrentToken()):e===l.EOF?(this._err(s.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(s.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState("BOGUS_DOCTYPE_STATE")))}},{key:"DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE",value:function(e){e===l.QUOTATION_MARK?this.state="AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE":e===l.NULL?(this._err(s.unexpectedNullCharacter),this.currentToken.systemId+=a.REPLACEMENT_CHARACTER):e===l.GREATER_THAN_SIGN?(this._err(s.abruptDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=f):e===l.EOF?(this._err(s.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.systemId+=_(e)}},{key:"DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE",value:function(e){e===l.APOSTROPHE?this.state="AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE":e===l.NULL?(this._err(s.unexpectedNullCharacter),this.currentToken.systemId+=a.REPLACEMENT_CHARACTER):e===l.GREATER_THAN_SIGN?(this._err(s.abruptDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=f):e===l.EOF?(this._err(s.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.systemId+=_(e)}},{key:"AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE",value:function(e){p(e)||(e===l.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=f):e===l.EOF?(this._err(s.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(s.unexpectedCharacterAfterDoctypeSystemIdentifier),this._reconsumeInState("BOGUS_DOCTYPE_STATE")))}},{key:"BOGUS_DOCTYPE_STATE",value:function(e){e===l.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=f):e===l.NULL?this._err(s.unexpectedNullCharacter):e===l.EOF&&(this._emitCurrentToken(),this._emitEOFToken())}},{key:"CDATA_SECTION_STATE",value:function(e){e===l.RIGHT_SQUARE_BRACKET?this.state="CDATA_SECTION_BRACKET_STATE":e===l.EOF?(this._err(s.eofInCdata),this._emitEOFToken()):this._emitCodePoint(e)}},{key:"CDATA_SECTION_BRACKET_STATE",value:function(e){e===l.RIGHT_SQUARE_BRACKET?this.state="CDATA_SECTION_END_STATE":(this._emitChars("]"),this._reconsumeInState("CDATA_SECTION_STATE"))}},{key:"CDATA_SECTION_END_STATE",value:function(e){e===l.GREATER_THAN_SIGN?this.state=f:e===l.RIGHT_SQUARE_BRACKET?this._emitChars("]"):(this._emitChars("]]"),this._reconsumeInState("CDATA_SECTION_STATE"))}},{key:"CHARACTER_REFERENCE_STATE",value:function(e){this.tempBuff=[l.AMPERSAND],e===l.NUMBER_SIGN?(this.tempBuff.push(e),this.state="NUMERIC_CHARACTER_REFERENCE_STATE"):v(e)?this._reconsumeInState("NAMED_CHARACTER_REFERENCE_STATE"):(this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}},{key:"NAMED_CHARACTER_REFERENCE_STATE",value:function(e){var t=this._matchNamedCharacterReference(e);if(this._ensureHibernation())this.tempBuff=[l.AMPERSAND];else if(t){var r=this.tempBuff[this.tempBuff.length-1]===l.SEMICOLON;this._isCharacterReferenceAttributeQuirk(r)||(r||this._errOnNextCodePoint(s.missingSemicolonAfterCharacterReference),this.tempBuff=t),this._flushCodePointsConsumedAsCharacterReference(),this.state=this.returnState}else this._flushCodePointsConsumedAsCharacterReference(),this.state="AMBIGUOS_AMPERSAND_STATE"}},{key:"AMBIGUOS_AMPERSAND_STATE",value:function(e){v(e)?this._isCharacterReferenceInAttribute()?this.currentAttr.value+=_(e):this._emitCodePoint(e):(e===l.SEMICOLON&&this._err(s.unknownNamedCharacterReference),this._reconsumeInState(this.returnState))}},{key:"NUMERIC_CHARACTER_REFERENCE_STATE",value:function(e){this.charRefCode=0,e===l.LATIN_SMALL_X||e===l.LATIN_CAPITAL_X?(this.tempBuff.push(e),this.state="HEXADEMICAL_CHARACTER_REFERENCE_START_STATE"):this._reconsumeInState("DECIMAL_CHARACTER_REFERENCE_START_STATE")}},{key:"HEXADEMICAL_CHARACTER_REFERENCE_START_STATE",value:function(e){!function(e){return d(e)||g(e)||b(e)}(e)?(this._err(s.absenceOfDigitsInNumericCharacterReference),this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState)):this._reconsumeInState("HEXADEMICAL_CHARACTER_REFERENCE_STATE")}},{key:"DECIMAL_CHARACTER_REFERENCE_START_STATE",value:function(e){d(e)?this._reconsumeInState("DECIMAL_CHARACTER_REFERENCE_STATE"):(this._err(s.absenceOfDigitsInNumericCharacterReference),this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}},{key:"HEXADEMICAL_CHARACTER_REFERENCE_STATE",value:function(e){g(e)?this.charRefCode=16*this.charRefCode+e-55:b(e)?this.charRefCode=16*this.charRefCode+e-87:d(e)?this.charRefCode=16*this.charRefCode+e-48:e===l.SEMICOLON?this.state="NUMERIC_CHARACTER_REFERENCE_END_STATE":(this._err(s.missingSemicolonAfterCharacterReference),this._reconsumeInState("NUMERIC_CHARACTER_REFERENCE_END_STATE"))}},{key:"DECIMAL_CHARACTER_REFERENCE_STATE",value:function(e){d(e)?this.charRefCode=10*this.charRefCode+e-48:e===l.SEMICOLON?this.state="NUMERIC_CHARACTER_REFERENCE_END_STATE":(this._err(s.missingSemicolonAfterCharacterReference),this._reconsumeInState("NUMERIC_CHARACTER_REFERENCE_END_STATE"))}},{key:"NUMERIC_CHARACTER_REFERENCE_END_STATE",value:function(){if(this.charRefCode===l.NULL)this._err(s.nullCharacterReference),this.charRefCode=l.REPLACEMENT_CHARACTER;else if(this.charRefCode>1114111)this._err(s.characterReferenceOutsideUnicodeRange),this.charRefCode=l.REPLACEMENT_CHARACTER;else if(a.isSurrogate(this.charRefCode))this._err(s.surrogateCharacterReference),this.charRefCode=l.REPLACEMENT_CHARACTER;else if(a.isUndefinedCodePoint(this.charRefCode))this._err(s.noncharacterCharacterReference);else if(a.isControlCodePoint(this.charRefCode)||this.charRefCode===l.CARRIAGE_RETURN){this._err(s.controlCharacterReference);var e=c[this.charRefCode];e&&(this.charRefCode=e)}this.tempBuff=[this.charRefCode],this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState)}}])&&n(t.prototype,r),w&&n(t,w),e}();w.CHARACTER_TOKEN="CHARACTER_TOKEN",w.NULL_CHARACTER_TOKEN="NULL_CHARACTER_TOKEN",w.WHITESPACE_CHARACTER_TOKEN="WHITESPACE_CHARACTER_TOKEN",w.START_TAG_TOKEN="START_TAG_TOKEN",w.END_TAG_TOKEN="END_TAG_TOKEN",w.COMMENT_TOKEN="COMMENT_TOKEN",w.DOCTYPE_TOKEN="DOCTYPE_TOKEN",w.EOF_TOKEN="EOF_TOKEN",w.HIBERNATION_TOKEN="HIBERNATION_TOKEN",w.MODE={DATA:f,RCDATA:"RCDATA_STATE",RAWTEXT:"RAWTEXT_STATE",SCRIPT_DATA:"SCRIPT_DATA_STATE",PLAINTEXT:"PLAINTEXT_STATE"},w.getTokenAttr=function(e,t){for(var r=e.attrs.length-1;r>=0;r--)if(e.attrs[r].name===t)return e.attrs[r].value;return null},e.exports=w},function(e,t,r){"use strict";var n=0;function o(){return Math.pow(2,++n)}t.boolean=o(),t.booleanish=o(),t.overloadedBoolean=o(),t.number=o(),t.spaceSeparated=o(),t.commaSeparated=o(),t.commaOrSpaceSeparated=o()},function(e,t,r){"use strict";var n=0;function o(){return Math.pow(2,++n)}t.boolean=o(),t.booleanish=o(),t.overloadedBoolean=o(),t.number=o(),t.spaceSeparated=o(),t.commaSeparated=o(),t.commaOrSpaceSeparated=o()},function(e,t,r){"use strict";var n=0;function o(){return Math.pow(2,++n)}t.boolean=o(),t.booleanish=o(),t.overloadedBoolean=o(),t.number=o(),t.spaceSeparated=o(),t.commaSeparated=o(),t.commaOrSpaceSeparated=o()},function(e,t,r){"use strict";e.exports=function(e){var t="string"==typeof e?e.charCodeAt(0):e;return t>=48&&t<=57}},function(e,t,r){"use strict";var n=0;function o(){return Math.pow(2,++n)}t.boolean=o(),t.booleanish=o(),t.overloadedBoolean=o(),t.number=o(),t.spaceSeparated=o(),t.commaSeparated=o(),t.commaOrSpaceSeparated=o()},function(e,t,r){"use strict";t.decode=t.parse=r(513),t.encode=t.stringify=r(514)},function(e,t){e.exports=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=/^#\/(.*)$/.exec(e);if(r&&r[0]){var n=r[1].split("/"),o=t;return n.forEach((function(t){if(!Object.prototype.hasOwnProperty.call(o,t))throw new Error("Could not find a definition for ".concat(e,"."));o=o[t]})),o}throw new Error("Could not find a definition for ".concat(e,"."))}},function(e,t,r){var n=r(110),o=Math.min;e.exports=function(e){return e>0?o(n(e),9007199254740991):0}},function(e,t){var r=0,n=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++r+n).toString(36))}},function(e,t,r){e.exports={default:r(548),__esModule:!0}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,r){var n=r(22),o=r(559),a=r(113),i=r(111)("IE_PROTO"),s=function(){},l=function(){var e,t=r(114)("iframe"),n=a.length;for(t.style.display="none",r(245).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("