!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=122)}([function(e,t,n){"use strict";n.d(t,"R",function(){return v}),n.d(t,"w",function(){return g}),n.d(t,"Q",function(){return y}),n.d(t,"v",function(){return b}),n.d(t,"M",function(){return w}),n.d(t,"t",function(){return k}),n.d(t,"G",function(){return x}),n.d(t,"n",function(){return T}),n.d(t,"S",function(){return E}),n.d(t,"x",function(){return _}),n.d(t,"D",function(){return S}),n.d(t,"k",function(){return O}),n.d(t,"E",function(){return C}),n.d(t,"l",function(){return N}),n.d(t,"I",function(){return A}),n.d(t,"p",function(){return D}),n.d(t,"K",function(){return I}),n.d(t,"r",function(){return L}),n.d(t,"F",function(){return j}),n.d(t,"m",function(){return M}),n.d(t,"N",function(){return F}),n.d(t,"u",function(){return R}),n.d(t,"H",function(){return P}),n.d(t,"o",function(){return V}),n.d(t,"C",function(){return U}),n.d(t,"j",function(){return B}),n.d(t,"B",function(){return q}),n.d(t,"i",function(){return z}),n.d(t,"d",function(){return K}),n.d(t,"e",function(){return H}),n.d(t,"T",function(){return G}),n.d(t,"y",function(){return W}),n.d(t,"L",function(){return Q}),n.d(t,"s",function(){return Y}),n.d(t,"A",function(){return J}),n.d(t,"J",function(){return $}),n.d(t,"q",function(){return X}),n.d(t,"z",function(){return Z}),n.d(t,"g",function(){return te}),n.d(t,"f",function(){return ne}),n.d(t,"O",function(){return oe}),n.d(t,"c",function(){return ae}),n.d(t,"h",function(){return le}),n.d(t,"a",function(){return ue}),n.d(t,"b",function(){return se}),n.d(t,"P",function(){return ce});var r=n(24),i=n(20),o=n(22),a=n(23),l=n(3),u=n(4),s=n(17),c=n(37),f=n(1),p=n(60);function d(e){return(d="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 h(e){for(var t=1;tc||tc||e=f)return t}}});var d=new l.g({name:"Float",description:"The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point). ",serialize:function(e){if("boolean"==typeof e)return e?1:0;var t=e;if("string"==typeof e&&""!==e&&(t=Number(e)),!i(t))throw new TypeError("Float cannot represent non numeric value: ".concat(Object(a.a)(e)));return t},parseValue:function(e){if(!i(e))throw new TypeError("Float cannot represent non numeric value: ".concat(Object(a.a)(e)));return e},parseLiteral:function(e){return e.kind===u.Kind.FLOAT||e.kind===u.Kind.INT?parseFloat(e.value):void 0}});function h(e){if("object"===s(e)&&null!==e){if("function"==typeof e.valueOf){var t=e.valueOf();if("object"!==s(t))return t}if("function"==typeof e.toJSON)return e.toJSON()}return e}var m=new l.g({name:"String",description:"The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.",serialize:function(e){var t=h(e);if("string"==typeof t)return t;if("boolean"==typeof t)return t?"true":"false";if(i(t))return t.toString();throw new TypeError("String cannot represent value: ".concat(Object(a.a)(e)))},parseValue:function(e){if("string"!=typeof e)throw new TypeError("String cannot represent a non string value: ".concat(Object(a.a)(e)));return e},parseLiteral:function(e){return e.kind===u.Kind.STRING?e.value:void 0}});var v=new l.g({name:"Boolean",description:"The `Boolean` scalar type represents `true` or `false`.",serialize:function(e){if("boolean"==typeof e)return e;if(i(e))return 0!==e;throw new TypeError("Boolean cannot represent a non boolean value: ".concat(Object(a.a)(e)))},parseValue:function(e){if("boolean"!=typeof e)throw new TypeError("Boolean cannot represent a non boolean value: ".concat(Object(a.a)(e)));return e},parseLiteral:function(e){return e.kind===u.Kind.BOOLEAN?e.value:void 0}});var g=new l.g({name:"ID",description:'The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID.',serialize:function(e){var t=h(e);if("string"==typeof t)return t;if(o(t))return String(t);throw new TypeError("ID cannot represent value: ".concat(Object(a.a)(e)))},parseValue:function(e){if("string"==typeof e)return e;if(o(e))return e.toString();throw new TypeError("ID cannot represent value: ".concat(Object(a.a)(e)))},parseLiteral:function(e){return e.kind===u.Kind.STRING||e.kind===u.Kind.INT?e.value:void 0}}),y=[m,p,d,v,g];function b(e){return Object(l.J)(e)&&(e.name===m.name||e.name===p.name||e.name===d.name||e.name===v.name||e.name===g.name)}},function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty;function i(e,t){return r.call(e,t)}function o(e){return!(e>=55296&&e<=57343)&&(!(e>=64976&&e<=65007)&&(65535!=(65535&e)&&65534!=(65535&e)&&(!(e>=0&&e<=8)&&(11!==e&&(!(e>=14&&e<=31)&&(!(e>=127&&e<=159)&&!(e>1114111)))))))}function a(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}var l=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,u=new RegExp(l.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),s=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,c=n(95);var f=/[&<>"]/,p=/[&<>"]/g,d={"&":"&","<":"<",">":">",'"':"""};function h(e){return d[e]}var m=/[.?*+^$[\]\\(){}|-]/g;var v=n(71);t.lib={},t.lib.mdurl=n(96),t.lib.ucmicro=n(174),t.assign=function(e){return Array.prototype.slice.call(arguments,1).forEach(function(t){if(t){if("object"!=typeof t)throw new TypeError(t+"must be object");Object.keys(t).forEach(function(n){e[n]=t[n]})}}),e},t.isString=function(e){return"[object String]"===function(e){return Object.prototype.toString.call(e)}(e)},t.has=i,t.unescapeMd=function(e){return e.indexOf("\\")<0?e:e.replace(l,"$1")},t.unescapeAll=function(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(u,function(e,t,n){return t||function(e,t){var n=0;return i(c,t)?c[t]:35===t.charCodeAt(0)&&s.test(t)&&o(n="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10))?a(n):e}(e,n)})},t.isValidEntityCode=o,t.fromCodePoint=a,t.escapeHtml=function(e){return f.test(e)?e.replace(p,h):e},t.arrayReplaceAt=function(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))},t.isSpace=function(e){switch(e){case 9:case 32:return!0}return!1},t.isWhiteSpace=function(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1},t.isMdAsciiPunct=function(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}},t.isPunctChar=function(e){return v.test(e)},t.escapeRE=function(e){return e.replace(m,"\\$&")},t.normalizeReference=function(e){return e.trim().replace(/\s+/g," ").toUpperCase()}},function(e,t,n){"use strict";var r=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})};t.a=r},function(e,t,n){e.exports=function(){"use strict";var e=navigator.userAgent,t=navigator.platform,n=/gecko\/\d/i.test(e),r=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),o=/Edge\/(\d+)/.exec(e),a=r||i||o,l=a&&(r?document.documentMode||6:+(o||i)[1]),u=!o&&/WebKit\//.test(e),s=u&&/Qt\/\d+\.\d+/.test(e),c=!o&&/Chrome\//.test(e),f=/Opera\//.test(e),p=/Apple Computer/.test(navigator.vendor),d=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),h=/PhantomJS/.test(e),m=!o&&/AppleWebKit/.test(e)&&/Mobile\/\w+/.test(e),v=/Android/.test(e),g=m||v||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),y=m||/Mac/.test(t),b=/\bCrOS\b/.test(e),w=/win/i.test(t),k=f&&e.match(/Version\/(\d*\.\d*)/);k&&(k=Number(k[1])),k&&k>=15&&(f=!1,u=!0);var x=y&&(s||f&&(null==k||k<12.11)),T=n||a&&l>=9;function E(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var _,S=function(e,t){var n=e.className,r=E(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function O(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function C(e,t){return O(e).appendChild(t)}function N(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o=t)return a+(t-o);a+=l-o,a+=n-a%n,o=l+1}}m?M=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:a&&(M=function(e){try{e.select()}catch(e){}});var V=function(){this.id=null};function U(e,t){for(var n=0;n=t)return r+Math.min(a,t-i);if(i+=o-r,r=o+1,(i+=n-i%n)>=t)return r}}var W=[""];function Q(e){for(;W.length<=e;)W.push(Y(W)+" ");return W[e]}function Y(e){return e[e.length-1]}function J(e,t){for(var n=[],r=0;r"€"&&(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 ne(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var re=/[\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 ie(e){return e.charCodeAt(0)>=768&&re.test(e)}function oe(e,t,n){for(;(n<0?t>0:tn?-1:1;;){if(t==n)return t;var i=(t+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:n;e(o)?n=o:t=o+r}}var le=null;function ue(e,t,n){var r;le=null;for(var i=0;it)return i;o.to==t&&(o.from!=o.to&&"before"==n?r=i:le=i),o.from==t&&(o.from!=o.to&&"before"!=n?r=i:le=i)}return null!=r?r:le}var se=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,r=/[stwN]/,i=/[LRr]/,o=/[Lb1n]/,a=/[1n]/;function l(e,t,n){this.level=e,this.from=t,this.to=n}return function(u,s){var c,f="ltr"==s?"L":"R";if(0==u.length||"ltr"==s&&!n.test(u))return!1;for(var p=u.length,d=[],h=0;h-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function me(e,t){var n=de(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i0}function be(e){e.prototype.on=function(e,t){pe(this,e,t)},e.prototype.off=function(e,t){he(this,e,t)}}function we(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function ke(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function xe(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Te(e){we(e),ke(e)}function Ee(e){return e.target||e.srcElement}function _e(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),y&&e.ctrlKey&&1==t&&(t=3),t}var Se,Oe,Ce=function(){if(a&&l<9)return!1;var e=N("div");return"draggable"in e||"dragDrop"in e}();function Ne(e){if(null==Se){var t=N("span","​");C(e,N("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Se=t.offsetWidth<=1&&t.offsetHeight>2&&!(a&&l<8))}var n=Se?N("span","​"):N("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Ae(e){if(null!=Oe)return Oe;var t=C(e,document.createTextNode("AخA")),n=_(t,0,1).getBoundingClientRect(),r=_(t,1,2).getBoundingClientRect();return O(e),!(!n||n.left==n.right)&&(Oe=r.right-n.right<3)}var De,Ie=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(n.push(o.slice(0,a)),t+=a+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Le=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)},je="oncopy"in(De=N("div"))||(De.setAttribute("oncopy","return;"),"function"==typeof De.oncopy),Me=null,Fe={},Re={};function Pe(e){if("string"==typeof e&&Re.hasOwnProperty(e))e=Re[e];else if(e&&"string"==typeof e.name&&Re.hasOwnProperty(e.name)){var t=Re[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 Pe("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Pe("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Ve(e,t){t=Pe(t);var n=Fe[t.name];if(!n)return Ve(e,"text/plain");var r=n(e,t);if(Ue.hasOwnProperty(t.name)){var i=Ue[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)r[a]=t.modeProps[a];return r}var Ue={};function Be(e,t){var n=Ue.hasOwnProperty(e)?Ue[e]:Ue[e]={};R(t,n)}function qe(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function ze(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Ke(e,t,n){return!e.startState||e.startState(t,n)}var He=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};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 n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t=e.first&&tn?et(n,Ge(e,n).text.length):function(e,t){var n=e.ch;return null==n||n>t?et(e.line,t):n<0?et(e.line,0):e}(t,Ge(e,t.line).text.length)}function ut(e,t){for(var n=[],r=0;r=this.string.length},He.prototype.sol=function(){return this.pos==this.lineStart},He.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},He.prototype.next=function(){if(this.post},He.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},He.prototype.skipToEnd=function(){this.pos=this.string.length},He.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},He.prototype.backUp=function(e){this.pos-=e},He.prototype.column=function(){return this.lastColumnPos0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e},o=this.string.substr(this.pos,e.length);if(i(o)==i(e))return!1!==t&&(this.pos+=e.length),!0},He.prototype.current=function(){return this.string.slice(this.start,this.pos)},He.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},He.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},He.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var st=function(e,t){this.state=e,this.lookAhead=t},ct=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function ft(e,t,n,r){var i=[e.state.modeGen],o={};wt(e,t.text,e.doc.mode,n,function(e,t){return i.push(e,t)},o,r);for(var a=n.state,l=function(r){n.baseTokens=i;var l=e.state.overlays[r],u=1,s=0;n.state=!0,wt(e,t.text,l.mode,n,function(e,t){for(var n=u;se&&i.splice(u,1,e,i[u+1],r),u+=2,s=Math.min(e,r)}if(t)if(l.opaque)i.splice(n,u-n,e,"overlay "+t),u=n+2;else for(;ne.options.maxHighlightLength&&qe(e.doc.mode,r.state),o=ft(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function dt(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new ct(r,!0,t);var o=function(e,t,n){for(var r,i,o=e.doc,a=n?-1:t-(e.doc.mode.innerMode?1e3:100),l=t;l>a;--l){if(l<=o.first)return o.first;var u=Ge(o,l-1),s=u.stateAfter;if(s&&(!n||l+(s instanceof st?s.lookAhead:0)<=o.modeFrontier))return l;var c=P(u.text,null,e.options.tabSize);(null==i||r>c)&&(i=l-1,r=c)}return i}(e,t,n),a=o>r.first&&Ge(r,o-1).stateAfter,l=a?ct.fromSaved(r,a,o):new ct(r,Ke(r.mode),o);return r.iter(o,t,function(n){ht(e,n.text,l);var r=l.line;n.stateAfter=r==t-1||r%5==0||r>=i.viewFrom&&rt.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}ct.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},ct.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}},ct.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ct.fromSaved=function(e,t,n){return t instanceof st?new ct(e,qe(e.mode,t.state),n,t.lookAhead):new ct(e,qe(e.mode,t),n)},ct.prototype.save=function(e){var t=!1!==e?qe(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new st(t,this.maxLookAhead):t};var gt=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function yt(e,t,n,r){var i,o=e.doc,a=o.mode;t=lt(o,t);var l,u=Ge(o,t.line),s=dt(e,t.line,n),c=new He(u.text,e.options.tabSize,s);for(r&&(l=[]);(r||c.pose.options.maxHighlightLength?(l=!1,a&&ht(e,t,r,f.pos),f.pos=t.length,u=null):u=bt(vt(n,f,r.state,p),o),p){var d=p[0].name;d&&(u="m-"+(u?d+" "+u:d))}if(!l||c!=u){for(;s=t:o.to>t);(r||(r=[])).push(new Tt(a,o.from,u?null:o.to))}}return r}(n,i,a),u=function(e,t,n){var r;if(e)for(var i=0;i=t:o.to>t);if(l||o.from==t&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var u=null==o.from||(a.inclusiveLeft?o.from<=t:o.from0&&l)for(var w=0;wt)&&(!n||It(n,o.marker)<0)&&(n=o.marker)}return n}function Rt(e,t,n,r,i){var o=Ge(e,t),a=xt&&o.markedSpans;if(a)for(var l=0;l=0&&f<=0||c<=0&&f>=0)&&(c<=0&&(u.marker.inclusiveRight&&i.inclusiveLeft?tt(s.to,n)>=0:tt(s.to,n)>0)||c>=0&&(u.marker.inclusiveRight&&i.inclusiveLeft?tt(s.from,r)<=0:tt(s.from,r)<0)))return!0}}}function Pt(e){for(var t;t=jt(e);)e=t.find(-1,!0).line;return e}function Vt(e,t){var n=Ge(e,t),r=Pt(n);return n==r?t:Je(r)}function Ut(e,t){if(t>e.lastLine())return t;var n,r=Ge(e,t);if(!Bt(e,r))return t;for(;n=Mt(r);)r=n.find(1,!0).line;return Je(r)+1}function Bt(e,t){var n=xt&&t.markedSpans;if(n)for(var r=void 0,i=0;it.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)})}var Gt=function(e,t,n){this.text=e,Nt(this,t),this.height=n?n(this):1};function Wt(e){e.parent=null,Ct(e)}Gt.prototype.lineNo=function(){return Je(this)},be(Gt);var Qt={},Yt={};function Jt(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?Yt:Qt;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function $t(e,t){var n=A("span",null,null,u?"padding-right: .1px":null),r={pre:A("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,a=void 0;r.pos=0,r.addToken=Zt,Ae(e.display.measure)&&(a=ce(o,e.doc.direction))&&(r.addToken=en(r.addToken,a)),r.map=[];var l=t!=e.display.externalMeasured&&Je(o);nn(o,r,pt(e,o,l)),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=j(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=j(o.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Ne(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(u){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return me(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=j(r.pre.className,r.textClass||"")),r}function Xt(e){var t=N("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Zt(e,t,n,r,i,o,u){if(t){var s,c=e.splitSpaces?function(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;is&&f.from<=s);p++);if(f.to>=c)return e(n,r,i,o,a,l,u);e(n,r.slice(0,f.to-s),i,o,null,l,u),o=null,r=r.slice(f.to-s),s=f.to}}}function tn(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function nn(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var a,l,u,s,c,f,p,d=i.length,h=0,m=1,v="",g=0;;){if(g==h){u=s=c=l="",p=null,f=null,g=1/0;for(var y=[],b=void 0,w=0;wh||x.collapsed&&k.to==h&&k.from==h)){if(null!=k.to&&k.to!=h&&g>k.to&&(g=k.to,s=""),x.className&&(u+=" "+x.className),x.css&&(l=(l?l+";":"")+x.css),x.startStyle&&k.from==h&&(c+=" "+x.startStyle),x.endStyle&&k.to==g&&(b||(b=[])).push(x.endStyle,k.to),x.title&&((p||(p={})).title=x.title),x.attributes)for(var T in x.attributes)(p||(p={}))[T]=x.attributes[T];x.collapsed&&(!f||It(f.marker,x)<0)&&(f=k)}else k.from>h&&g>k.from&&(g=k.from)}if(b)for(var E=0;E=d)break;for(var S=Math.min(d,g);;){if(v){var O=h+v.length;if(!f){var C=O>S?v.slice(0,S-h):v;t.addToken(t,C,a?a+u:u,c,h+C.length==g?s:"",l,p)}if(O>=S){v=v.slice(S-h),h=S;break}h=O,c=""}v=i.slice(o,o=n[m++]),a=Jt(n[m++],t.cm.options)}}else for(var N=1;Nn)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function An(e,t,n,r){return Ln(e,In(e,t),n,r)}function Dn(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&t2&&o.push((u.bottom+s.top)/2-n.top)}}o.push(n.bottom-n.top)}}(e,t.view,t.rect),t.hasHeights=!0),(o=function(e,t,n,r){var i,o=Fn(t.map,n,r),u=o.node,s=o.start,c=o.end,f=o.collapse;if(3==u.nodeType){for(var p=0;p<4;p++){for(;s&&ie(t.line.text.charAt(o.coverStart+s));)--s;for(;o.coverStart+c1}(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}(e.display.measure,i))}else{var d;s>0&&(f=r="right"),i=e.options.lineWrapping&&(d=u.getClientRects()).length>1?d["right"==r?d.length-1:0]:u.getBoundingClientRect()}if(a&&l<9&&!s&&(!i||!i.left&&!i.right)){var h=u.parentNode.getClientRects()[0];i=h?{left:h.left,right:h.left+nr(e.display),top:h.top,bottom:h.bottom}:Mn}for(var m=i.top-t.rect.top,v=i.bottom-t.rect.top,g=(m+v)/2,y=t.view.measure.heights,b=0;bt)&&(i=(o=u-l)-1,t>=u&&(a="right")),null!=i){if(r=e[s+2],l==u&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==i)for(;s&&e[s-2]==e[s-3]&&e[s-1].insertLeft;)r=e[2+(s-=3)],a="left";if("right"==n&&i==u-l)for(;s=0&&(n=e[i]).left==n.right;i--);return n}function Pn(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t=r.text.length?(u=r.text.length,s="before"):u<=0&&(u=0,s="after"),!l)return a("before"==s?u-1:u,"before"==s);function c(e,t,n){var r=l[t],i=1==r.level;return a(n?e-1:e,i!=n)}var f=ue(l,u,s),p=le,d=c(u,f,"before"==s);return null!=p&&(d.other=c(u,p,"before"!=s)),d}function Qn(e,t){var n=0;t=lt(e.doc,t),e.options.lineWrapping||(n=nr(e.display)*t.ch);var r=Ge(e.doc,t.line),i=zt(r)+Tn(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Yn(e,t,n,r,i){var o=et(e,t,n);return o.xRel=i,r&&(o.outside=!0),o}function Jn(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return Yn(r.first,0,null,!0,-1);var i=$e(r,n),o=r.first+r.size-1;if(i>o)return Yn(r.first+r.size-1,Ge(r,o).text.length,null,!0,1);t<0&&(t=0);for(var a=Ge(r,i);;){var l=er(e,a,i,t,n),u=Ft(a,l.ch+(l.xRel>0?1:0));if(!u)return l;var s=u.find(1);if(s.line==i)return s;a=Ge(r,i=s.line)}}function $n(e,t,n,r){r-=zn(t);var i=t.text.length,o=ae(function(t){return Ln(e,n,t-1).bottom<=r},i,0);return i=ae(function(t){return Ln(e,n,t).top>r},o,i),{begin:o,end:i}}function Xn(e,t,n,r){n||(n=In(e,t));var i=Kn(e,t,Ln(e,n,r),"line").top;return $n(e,t,n,i)}function Zn(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function er(e,t,n,r,i){i-=zt(t);var o=In(e,t),a=zn(t),l=0,u=t.text.length,s=!0,c=ce(t,e.doc.direction);if(c){var f=(e.options.lineWrapping?function(e,t,n,r,i,o,a){var l=$n(e,t,r,a),u=l.begin,s=l.end;/\s/.test(t.text.charAt(s-1))&&s--;for(var c=null,f=null,p=0;p=s||d.to<=u)){var h=1!=d.level,m=Ln(e,r,h?Math.min(s,d.to)-1:Math.max(u,d.from)).right,v=mv)&&(c=d,f=v)}}return c||(c=i[i.length-1]),c.froms&&(c={from:c.from,to:s,level:c.level}),c}:function(e,t,n,r,i,o,a){var l=ae(function(l){var u=i[l],s=1!=u.level;return Zn(Wn(e,et(n,s?u.to:u.from,s?"before":"after"),"line",t,r),o,a,!0)},0,i.length-1),u=i[l];if(l>0){var s=1!=u.level,c=Wn(e,et(n,s?u.from:u.to,s?"after":"before"),"line",t,r);Zn(c,o,a,!0)&&c.top>a&&(u=i[l-1])}return u})(e,t,n,o,c,r,i);s=1!=f.level,l=s?f.from:f.to-1,u=s?f.to:f.from-1}var p,d,h=null,m=null,v=ae(function(t){var n=Ln(e,o,t);return n.top+=a,n.bottom+=a,!!Zn(n,r,i,!1)&&(n.top<=i&&n.left<=r&&(h=t,m=n),!0)},l,u),g=!1;if(m){var y=r-m.left=w.bottom}return v=oe(t.text,v,1),Yn(n,v,d,g,r-p)}function tr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==jn){jn=N("pre");for(var t=0;t<49;++t)jn.appendChild(document.createTextNode("x")),jn.appendChild(N("br"));jn.appendChild(document.createTextNode("x"))}C(e.measure,jn);var n=jn.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),O(e.measure),n||1}function nr(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=N("span","xxxxxxxxxx"),n=N("pre",[t]);C(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function rr(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a){var l=e.display.gutterSpecs[a].className;n[l]=o.offsetLeft+o.clientLeft+i,r[l]=o.clientWidth}return{fixedPos:ir(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function ir(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function or(e){var t=tr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/nr(e.display)-3);return function(i){if(Bt(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;rt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)xt&&Vt(e.doc,t)i.viewFrom?fr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)fr(e);else if(t<=i.viewFrom){var o=pr(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):fr(e)}else if(n>=i.viewTo){var a=pr(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):fr(e)}else{var l=pr(e,t,t,-1),u=pr(e,n,n+r,1);l&&u?(i.view=i.view.slice(0,l.index).concat(on(e,l.lineN,u.lineN)).concat(i.view.slice(u.index)),i.viewTo+=r):fr(e)}var s=i.externalMeasured;s&&(n=i.lineN&&t=r.viewTo)){var o=r.view[ur(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==U(a,n)&&a.push(n)}}}function fr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function pr(e,t,n,r){var i,o=ur(e,t),a=e.display.view;if(!xt||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var l=e.display.viewFrom,u=0;u0){if(o==a.length-1)return null;i=l+a[o].size-t,o++}else i=l-t;t+=i,n+=i}for(;Vt(e.doc,n)!=n;){if(o==(r<0?0:a.length-1))return null;n+=r*a[o-(r<0?1:0)].size,o+=r}return{index:o,lineN:n}}function dr(e){for(var t=e.display.view,n=0,r=0;r=e.display.viewTo||l.to().linet||t==n&&a.to==t)&&(r(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr",o),i=!0)}i||r(t,n,"ltr")}(m,n||0,null==r?p:r,function(e,t,i,f){var v="ltr"==i,g=d(e,v?"left":"right"),y=d(t-1,v?"right":"left"),b=null==n&&0==e,w=null==r&&t==p,k=0==f,x=!m||f==m.length-1;if(y.top-g.top<=3){var T=(s?b:w)&&k,E=(s?w:b)&&x,_=T?l:(v?g:y).left,S=E?u:(v?y:g).right;c(_,g.top,S-_,g.bottom)}else{var O,C,N,A;v?(O=s&&b&&k?l:g.left,C=s?u:h(e,i,"before"),N=s?l:h(t,i,"after"),A=s&&w&&x?u:y.right):(O=s?h(e,i,"before"):l,C=!s&&b&&k?u:g.right,N=!s&&w&&x?l:y.left,A=s?h(t,i,"after"):u),c(O,g.top,C-O,g.bottom),g.bottom0?t.blinker=setInterval(function(){return t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function wr(e){e.state.focused||(e.display.input.focus(),xr(e))}function kr(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Tr(e))},100)}function xr(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,L(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()),br(e))}function Tr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(me(e,"blur",e,t),e.state.focused=!1,S(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function Er(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r.005||p<-.005)&&(Ye(i.line,u),_r(i.line),i.rest))for(var d=0;de.display.sizerWidth){var h=Math.ceil(s/nr(e.display));h>e.display.maxLineLength&&(e.display.maxLineLength=h,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}}function _r(e){if(e.widgets)for(var t=0;t=a&&(o=$e(t,zt(Ge(t,u))-e.wrapper.clientHeight),a=u)}return{from:o,to:Math.max(a,o+1)}}function Or(e,t){var n=e.display,r=tr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,o=Cn(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var l=e.doc.height+En(n),u=t.topl-r;if(t.topi+o){var c=Math.min(t.top,(s?l:t.bottom)-o);c!=i&&(a.scrollTop=c)}var f=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft,p=On(e)-(e.options.fixedGutter?n.gutters.offsetWidth:0),d=t.right-t.left>p;return d&&(t.right=t.left+p),t.left<10?a.scrollLeft=0:t.leftp+f-3&&(a.scrollLeft=t.right+(d?0:10)-p),a}function Cr(e,t){null!=t&&(Dr(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Nr(e){Dr(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Ar(e,t,n){null==t&&null==n||Dr(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function Dr(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=Qn(e,t.from),r=Qn(e,t.to);Ir(e,n,r,t.margin)}}function Ir(e,t,n,r){var i=Or(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});Ar(e,i.scrollLeft,i.scrollTop)}function Lr(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||oi(e,{top:t}),jr(e,t,!0),n&&oi(e),ei(e,100))}function jr(e,t,n){t=Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Mr(e,t,n,r){t=Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r||(e.doc.scrollLeft=t,ui(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Fr(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+En(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?n:0,docHeight:r,scrollHeight:r+Sn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var Rr=function(e,t,n){this.cm=n;var r=this.vert=N("div",[N("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=N("div",[N("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),pe(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),pe(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,a&&l<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Rr.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},Rr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Rr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Rr.prototype.zeroWidthHack=function(){var e=y&&!d?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new V,this.disableVert=new V},Rr.prototype.enableZeroWidthBar=function(e,t,n){e.style.pointerEvents="auto",t.set(1e3,function r(){var i=e.getBoundingClientRect(),o="vert"==n?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1);o!=e?e.style.pointerEvents="none":t.set(1e3,r)})},Rr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Pr=function(){};function Vr(e,t){t||(t=Fr(e));var n=e.display.barWidth,r=e.display.barHeight;Ur(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&Er(e),Ur(e,Fr(e)),n=e.display.barWidth,r=e.display.barHeight}function Ur(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}Pr.prototype.update=function(){return{bottom:0,right:0}},Pr.prototype.setScrollLeft=function(){},Pr.prototype.setScrollTop=function(){},Pr.prototype.clear=function(){};var Br={native:Rr,null:Pr};function qr(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&S(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Br[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,n){"horizontal"==n?Mr(e,t):Lr(e,t)},e),e.display.scrollbars.addClass&&L(e.display.wrapper,e.display.scrollbars.addClass)}var zr=0;function Kr(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:++zr},t=e.curOp,an?an.ops.push(t):t.ownsGroup=an={ops:[t],delayedCallbacks:[]}}function Hr(e){var t=e.curOp;t&&function(e,t){var n=e.ownsGroup;if(n)try{!function(e){var t=e.delayedCallbacks,n=0;do{for(;n=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new ni(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Wr(e){var t=e.cm,n=t.display;e.updatedDisplay&&Er(t),e.barMeasure=Fr(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=An(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Sn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-On(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Qr(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft1&&(a=!0)),null!=s.scrollLeft&&(Mr(e,s.scrollLeft),Math.abs(e.doc.scrollLeft-f)>1&&(a=!0)),!a)break}return i}(t,lt(r,e.scrollToPos.from),lt(r,e.scrollToPos.to),e.scrollToPos.margin);!function(e,t){if(!ve(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null;if(t.top+r.top<0?i=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!h){var o=N("div","​",null,"position: absolute;\n top: "+(t.top-n.viewOffset-Tn(e.display))+"px;\n height: "+(t.bottom-t.top+Sn(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}(t,i)}var o=e.maybeHiddenMarkers,a=e.maybeUnhiddenMarkers;if(o)for(var l=0;l=e.display.viewTo)){var n=+new Date+e.options.workTime,r=dt(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(r.line>=e.display.viewFrom){var a=o.styles,l=o.text.length>e.options.maxHighlightLength?qe(t.mode,r.state):null,u=ft(e,o,r,!0);l&&(r.state=l),o.styles=u.styles;var s=o.styleClasses,c=u.classes;c?o.styleClasses=c:s&&(o.styleClasses=null);for(var f=!a||a.length!=o.styles.length||s!=c&&(!s||!c||s.bgClass!=c.bgClass||s.textClass!=c.textClass),p=0;!f&&pn)return ei(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&Jr(e,function(){for(var t=0;t=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==dr(e))return!1;si(e)&&(fr(e),t.dims=rr(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),a=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFroma&&n.viewTo-a<20&&(a=Math.min(i,n.viewTo)),xt&&(o=Vt(e.doc,o),a=Ut(e.doc,a));var l=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;!function(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=on(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=on(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,ur(e,n)))),r.viewTo=n}(e,o,a),n.viewOffset=zt(Ge(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var s=dr(e);if(!l&&0==s&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var c=function(e){if(e.hasFocus())return null;var t=I();if(!t||!D(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&D(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}(e);return s>4&&(n.lineDiv.style.display="none"),function(e,t,n){var r=e.display,i=e.options.lineNumbers,o=r.lineDiv,a=o.firstChild;function l(t){var n=t.nextSibling;return u&&y&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var s=r.view,c=r.viewFrom,f=0;f-1&&(d=!1),cn(e,p,c,n)),d&&(O(p.lineNumber),p.lineNumber.appendChild(document.createTextNode(Ze(e.options,c)))),a=p.node.nextSibling}else{var h=gn(e,p,c,n);o.insertBefore(h,a)}c+=p.size}for(;a;)a=l(a)}(e,n.updateLineNumbers,t.dims),s>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,function(e){if(e&&e.activeElt&&e.activeElt!=I()&&(e.activeElt.focus(),e.anchorNode&&D(document.body,e.anchorNode)&&D(document.body,e.focusNode))){var t=window.getSelection(),n=document.createRange();n.setEnd(e.anchorNode,e.anchorOffset),n.collapse(!1),t.removeAllRanges(),t.addRange(n),t.extend(e.focusNode,e.focusOffset)}}(c),O(n.cursorDiv),O(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,l&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,ei(e,400)),n.updateLineNumbers=null,!0}function ii(e,t){for(var n=t.viewport,r=!0;(r&&e.options.lineWrapping&&t.oldDisplayWidth!=On(e)||(n&&null!=n.top&&(n={top:Math.min(e.doc.height+En(e.display)-Cn(e),n.top)}),t.visible=Sr(e.display,e.doc,n),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&ri(e,t);r=!1){Er(e);var i=Fr(e);hr(e),Vr(e,i),li(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function oi(e,t){var n=new ni(e,t);if(ri(e,n)){Er(e),ii(e,n);var r=Fr(e);hr(e),Vr(e,r),li(e,r),n.finish()}}function ai(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function li(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+Sn(e)+"px"}function ui(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=ir(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",a=0;al.clientWidth,c=l.scrollHeight>l.clientHeight;if(i&&s||o&&c){if(o&&y&&u)e:for(var p=t.target,d=a.view;p!=l;p=p.parentNode)for(var h=0;h=0&&tt(e,r.to())<=0)return n}return-1};var wi=function(e,t){this.anchor=e,this.head=t};function ki(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort(function(e,t){return tt(e.from(),t.from())}),n=U(t,i);for(var o=1;o0:u>=0){var s=ot(l.from(),a.from()),c=it(l.to(),a.to()),f=l.empty()?a.from()==a.head:l.from()==l.head;o<=n&&--n,t.splice(--o,2,new wi(f?c:s,f?s:c))}}return new bi(t,n)}function xi(e,t){return new bi([new wi(e,t||e)],0)}function Ti(e){return e.text?et(e.from.line+e.text.length-1,Y(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function Ei(e,t){if(tt(e,t.from)<0)return e;if(tt(e,t.to)<=0)return Ti(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=Ti(t).ch-t.to.ch),et(n,r)}function _i(e,t){for(var n=[],r=0;r1&&e.remove(l.line+1,h-1),e.insert(l.line+1,g)}un(e,"change",e,t)}function Di(e,t,n){!function e(r,i,o){if(r.linked)for(var a=0;al-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=function(e,t){return t?(Fi(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}(i,i.lastOp==r)))a=Y(o.changes),0==tt(t.from,t.to)&&0==tt(t.from,a.to)?a.to=Ti(t):o.changes.push(Mi(e,t));else{var u=Y(i.done);for(u&&u.ranges||Vi(e.sel,i.done),o={changes:[Mi(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=l,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,a||me(e,"historyAdded")}function Pi(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||function(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,o,Y(i.done),t))?i.done[i.done.length-1]=t:Vi(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&!1!==r.clearRedo&&Fi(i.undone)}function Vi(e,t){var n=Y(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Ui(e,t,n,r){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=n.markedSpans),++o})}function Bi(e){if(!e)return null;for(var t,n=0;n-1&&(Y(l)[f]=s[f],delete s[f])}}}return r}function Ki(e,t,n,r){if(r){var i=e.anchor;if(n){var o=tt(t,i)<0;o!=tt(n,i)<0?(i=t,t=n):o!=tt(t,n)<0&&(t=n)}return new wi(i,t)}return new wi(n||t,t)}function Hi(e,t,n,r,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),Ji(e,new bi([Ki(e.sel.primary(),t,n,i)],0),r)}function Gi(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o=t.ch:l.to>t.ch))){if(i&&(me(u,"beforeCursorEnter"),u.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!u.atomic)continue;if(n){var s=u.find(r<0?1:-1),c=void 0;if((r<0?u.inclusiveRight:u.inclusiveLeft)&&(s=ro(e,s,-r,s&&s.line==t.line?o:null)),s&&s.line==t.line&&(c=tt(s,n))&&(r<0?c<0:c>0))return to(e,s,t,r,i)}var f=u.find(r<0?-1:1);return(r<0?u.inclusiveLeft:u.inclusiveRight)&&(f=ro(e,f,r,f.line==t.line?o:null)),f?to(e,f,t,r,i):null}}return t}function no(e,t,n,r,i){var o=r||1,a=to(e,t,n,o,i)||!i&&to(e,t,n,o,!0)||to(e,t,n,-o,i)||!i&&to(e,t,n,-o,!0);return a||(e.cantEdit=!0,et(e.first,0))}function ro(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?lt(e,et(t.line-1)):null:n>0&&t.ch==(r||Ge(e,t.line)).text.length?t.line0)){var c=[u,1],f=tt(s.from,l.from),p=tt(s.to,l.to);(f<0||!a.inclusiveLeft&&!f)&&c.push({from:s.from,to:l.from}),(p>0||!a.inclusiveRight&&!p)&&c.push({from:l.to,to:s.to}),i.splice.apply(i,c),u+=c.length-3}}return i}(e,t.from,t.to);if(r)for(var i=r.length-1;i>=0;--i)lo(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else lo(e,t)}}function lo(e,t){if(1!=t.text.length||""!=t.text[0]||0!=tt(t.from,t.to)){var n=_i(e,t);Ri(e,t,n,e.cm?e.cm.curOp.id:NaN),co(e,t,n,St(e,t));var r=[];Di(e,function(e,n){n||-1!=U(r,e.history)||(mo(e.history,t),r.push(e.history)),co(e,t,null,St(e,t))})}}function uo(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!r||n){for(var i,o=e.history,a=e.sel,l="undo"==t?o.done:o.undone,u="undo"==t?o.undone:o.done,s=0;s=0;--d){var h=p(d);if(h)return h.v}}}}function so(e,t){if(0!=t&&(e.first+=t,e.sel=new bi(J(e.sel.ranges,function(e){return new wi(et(e.anchor.line+t,e.anchor.ch),et(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){sr(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;re.lastLine())){if(t.from.lineo&&(t={from:t.from,to:et(o,Ge(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=We(e,t.from,t.to),n||(n=_i(e,t)),e.cm?function(e,t,n){var r=e.doc,i=e.display,o=t.from,a=t.to,l=!1,u=o.line;e.options.lineWrapping||(u=Je(Pt(Ge(r,o.line))),r.iter(u,a.line+1,function(e){if(e==i.maxLine)return l=!0,!0})),r.sel.contains(t.from,t.to)>-1&&ge(e),Ai(r,t,n,or(e)),e.options.lineWrapping||(r.iter(u,o.line+t.text.length,function(e){var t=Kt(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,l=!1)}),l&&(e.curOp.updateMaxLine=!0)),function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontiern;r--){var i=Ge(e,r).stateAfter;if(i&&(!(i instanceof st)||r+i.lookAhead1||!(this.children[0]instanceof go))){var l=[];this.collapse(l),this.children=[new go(l)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var a=i.lines.length%25+25,l=a;l10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r0||0==a&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=A("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Rt(e,t.line,t,n,o)||t.line!=n.line&&Rt(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");xt=!0}o.addToHistory&&Ri(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var l,u=t.line,s=e.cm;if(e.iter(u,n.line+1,function(e){s&&o.collapsed&&!s.options.lineWrapping&&Pt(e)==s.display.maxLine&&(l=!0),o.collapsed&&u!=t.line&&Ye(e,0),function(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}(e,new Tt(o,u==t.line?t.ch:null,u==n.line?n.ch:null)),++u}),o.collapsed&&e.iter(t.line,n.line+1,function(t){Bt(e,t)&&Ye(t,0)}),o.clearOnEnter&&pe(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(kt=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++ko,o.atomic=!0),s){if(l&&(s.curOp.updateMaxLine=!0),o.collapsed)sr(s,t.line,n.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var c=t.line;c<=n.line;c++)cr(s,c,"text");o.atomic&&Zi(s.doc),un(s,"markerAdded",s,o)}return o}xo.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Kr(e),ye(this,"clear")){var n=this.find();n&&un(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;oe.display.maxLineLength&&(e.display.maxLine=s,e.display.maxLineLength=c,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&sr(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Zi(e.doc)),e&&un(e,"markerCleared",e,this,r,i),t&&Hr(e),this.parent&&this.parent.clear()}},xo.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i=0;u--)ao(this,r[u]);l?Yi(this,l):this.cm&&Nr(this.cm)}),undo:Zr(function(){uo(this,"undo")}),redo:Zr(function(){uo(this,"redo")}),undoSelection:Zr(function(){uo(this,"undo",!0)}),redoSelection:Zr(function(){uo(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=lt(this,e),t=lt(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var a=o.markedSpans;if(a)for(var l=0;l=u.to||null==u.from&&i!=e.line||null!=u.from&&i==t.line&&u.from>=t.ch||n&&!n(u.marker)||r.push(u.marker.parent||u.marker)}++i}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;re)return t=e,!0;e-=o,++n}),lt(this,et(n,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 c=e.dataTransfer.getData("Text");if(c){var f;if(t.state.draggingText&&!t.state.draggingText.copy&&(f=t.listSelections()),$i(t.doc,xi(n,n)),f)for(var p=0;p=0;t--)fo(e.doc,"",r[t].from,r[t].to,"+delete");Nr(e)})}function Yo(e,t,n){var r=oe(e.text,t+n,n);return r<0||r>e.text.length?null:r}function Jo(e,t,n){var r=Yo(e,t.ch,n);return null==r?null:new et(t.line,r,n<0?"after":"before")}function $o(e,t,n,r,i){if(e){var o=ce(n,t.doc.direction);if(o){var a,l=i<0?Y(o):o[0],u=i<0==(1==l.level),s=u?"after":"before";if(l.level>0||"rtl"==t.doc.direction){var c=In(t,n);a=i<0?n.text.length-1:0;var f=Ln(t,c,a).top;a=ae(function(e){return Ln(t,c,e).top==f},i<0==(1==l.level)?l.from:l.to-1,a),"before"==s&&(a=Yo(n,a,1))}else a=i<0?l.to:l.from;return new et(r,a,s)}}return new et(r,i<0?n.text.length:0,i<0?"before":"after")}Uo.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"},Uo.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"},Uo.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"},Uo.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"]},Uo.default=y?Uo.macDefault:Uo.pcDefault;var Xo={selectAll:io,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),z)},killLine:function(e){return Qo(e,function(t){if(t.empty()){var n=Ge(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line0)i=new et(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),et(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=Ge(e.doc,i.line-1).text;a&&(i=new et(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),et(i.line-1,a.length-1),i,"+transpose"))}n.push(new wi(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){return Jr(e,function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;r-1&&(tt((i=s.ranges[i]).from(),t)<0||t.xRel>0)&&(tt(i.to(),t)>0||t.xRel<0)?function(e,t,n,r){var i=e.display,o=!1,s=$r(e,function(t){u&&(i.scroller.draggable=!1),e.state.draggingText=!1,he(i.wrapper.ownerDocument,"mouseup",s),he(i.wrapper.ownerDocument,"mousemove",c),he(i.scroller,"dragstart",f),he(i.scroller,"drop",s),o||(we(t),r.addNew||Hi(e.doc,n,null,null,r.extend),u||a&&9==l?setTimeout(function(){i.wrapper.ownerDocument.body.focus(),i.input.focus()},20):i.input.focus())}),c=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},f=function(){return o=!0};u&&(i.scroller.draggable=!0),e.state.draggingText=s,s.copy=!r.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),pe(i.wrapper.ownerDocument,"mouseup",s),pe(i.wrapper.ownerDocument,"mousemove",c),pe(i.scroller,"dragstart",f),pe(i.scroller,"drop",s),kr(e),setTimeout(function(){return i.input.focus()},20)}(e,r,t,o):function(e,t,n,r){var i=e.display,o=e.doc;we(t);var a,l,u=o.sel,s=u.ranges;if(r.addNew&&!r.extend?(l=o.sel.contains(n),a=l>-1?s[l]:new wi(n,n)):(a=o.sel.primary(),l=o.sel.primIndex),"rectangle"==r.unit)r.addNew||(a=new wi(n,n)),n=lr(e,t,!0,!0),l=-1;else{var c=ha(e,n,r.unit);a=r.extend?Ki(a,c.anchor,c.head,r.extend):c}r.addNew?-1==l?(l=s.length,Ji(o,ki(e,s.concat([a]),l),{scroll:!1,origin:"*mouse"})):s.length>1&&s[l].empty()&&"char"==r.unit&&!r.extend?(Ji(o,ki(e,s.slice(0,l).concat(s.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),u=o.sel):Wi(o,l,a,K):(l=0,Ji(o,new bi([a],0),K),u=o.sel);var f=n;function p(t){if(0!=tt(f,t))if(f=t,"rectangle"==r.unit){for(var i=[],s=e.options.tabSize,c=P(Ge(o,n.line).text,n.ch,s),p=P(Ge(o,t.line).text,t.ch,s),d=Math.min(c,p),h=Math.max(c,p),m=Math.min(n.line,t.line),v=Math.min(e.lastLine(),Math.max(n.line,t.line));m<=v;m++){var g=Ge(o,m).text,y=G(g,d,s);d==h?i.push(new wi(et(m,y),et(m,y))):g.length>y&&i.push(new wi(et(m,y),et(m,G(g,h,s))))}i.length||i.push(new wi(n,n)),Ji(o,ki(e,u.ranges.slice(0,l).concat(i),l),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,w=a,k=ha(e,t,r.unit),x=w.anchor;tt(k.anchor,x)>0?(b=k.head,x=ot(w.from(),k.anchor)):(b=k.anchor,x=it(w.to(),k.head));var T=u.ranges.slice(0);T[l]=function(e,t){var n=t.anchor,r=t.head,i=Ge(e.doc,n.line);if(0==tt(n,r)&&n.sticky==r.sticky)return t;var o=ce(i);if(!o)return t;var a=ue(o,n.ch,n.sticky),l=o[a];if(l.from!=n.ch&&l.to!=n.ch)return t;var u,s=a+(l.from==n.ch==(1!=l.level)?0:1);if(0==s||s==o.length)return t;if(r.line!=n.line)u=(r.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var c=ue(o,r.ch,r.sticky),f=c-a||(r.ch-n.ch)*(1==l.level?-1:1);u=c==s-1||c==s?f<0:f>0}var p=o[s+(u?-1:0)],d=u==(1==p.level),h=d?p.from:p.to,m=d?"after":"before";return n.ch==h&&n.sticky==m?t:new wi(new et(n.line,h,m),r)}(e,new wi(lt(o,x),b)),Ji(o,ki(e,T,l),K)}}var d=i.wrapper.getBoundingClientRect(),h=0;function m(t){e.state.selectingText=!1,h=1/0,t&&(we(t),i.input.focus()),he(i.wrapper.ownerDocument,"mousemove",v),he(i.wrapper.ownerDocument,"mouseup",g),o.history.lastSelOrigin=null}var v=$r(e,function(t){0!==t.buttons&&_e(t)?function t(n){var a=++h,l=lr(e,n,!0,"rectangle"==r.unit);if(l)if(0!=tt(l,f)){e.curOp.focus=I(),p(l);var u=Sr(i,o);(l.line>=u.to||l.lined.bottom?20:0;s&&setTimeout($r(e,function(){h==a&&(i.scroller.scrollTop+=s,t(n))}),50)}}(t):m(t)}),g=$r(e,m);e.state.selectingText=g,pe(i.wrapper.ownerDocument,"mousemove",v),pe(i.wrapper.ownerDocument,"mouseup",g)}(e,r,t,o)}(t,r,o,e):Ee(e)==n.scroller&&we(e):2==i?(r&&Hi(t.doc,r),setTimeout(function(){return n.input.focus()},20)):3==i&&(T?t.display.input.onContextMenu(e):kr(t)))}}function ha(e,t,n){if("char"==n)return new wi(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new wi(et(t.line,0),lt(e.doc,et(t.line+1,0)));var r=n(e,t);return new wi(r.from,r.to)}function ma(e,t,n,r){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(t){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&we(t);var a=e.display,l=a.lineDiv.getBoundingClientRect();if(o>l.bottom||!ye(e,n))return xe(t);o-=l.top-a.viewOffset;for(var u=0;u=i){var c=$e(e.doc,o),f=e.display.gutterSpecs[u];return me(e,n,e,c,f.className,t),xe(t)}}}function va(e,t){return ma(e,t,"gutterClick",!0)}function ga(e,t){xn(e.display,t)||function(e,t){return!!ye(e,"gutterContextMenu")&&ma(e,t,"gutterContextMenu",!1)}(e,t)||ve(e,t,"contextmenu")||T||e.display.input.onContextMenu(t)}function ya(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Un(e)}pa.prototype.compare=function(e,t,n){return this.time+400>e&&0==tt(t,this.pos)&&n==this.button};var ba={toString:function(){return"CodeMirror.Init"}},wa={},ka={};function xa(e,t,n){var r=n&&n!=ba;if(!t!=!r){var i=e.display.dragFunctions,o=t?pe:he;o(e.display.scroller,"dragstart",i.start),o(e.display.scroller,"dragenter",i.enter),o(e.display.scroller,"dragover",i.over),o(e.display.scroller,"dragleave",i.leave),o(e.display.scroller,"drop",i.drop)}}function Ta(e){e.options.lineWrapping?(L(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(S(e.display.wrapper,"CodeMirror-wrap"),Ht(e)),ar(e),sr(e),Un(e),setTimeout(function(){return Vr(e)},100)}function Ea(e,t){var n=this;if(!(this instanceof Ea))return new Ea(e,t);this.options=t=t?R(t):{},R(wa,t,!1);var r=t.value;"string"==typeof r?r=new Co(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new Ea.inputStyles[t.inputStyle](this),o=this.display=new di(e,r,i,t);for(var s in o.wrapper.CodeMirror=this,ya(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),qr(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 V,keySeq:null,specialChars:null},t.autofocus&&!g&&o.input.focus(),a&&l<11&&setTimeout(function(){return n.display.input.reset(!0)},20),function(e){var t=e.display;pe(t.scroller,"mousedown",$r(e,da)),pe(t.scroller,"dblclick",a&&l<11?$r(e,function(t){if(!ve(e,t)){var n=lr(e,t);if(n&&!va(e,t)&&!xn(e.display,t)){we(t);var r=e.findWordAt(n);Hi(e.doc,r.anchor,r.head)}}}):function(t){return ve(e,t)||we(t)}),pe(t.scroller,"contextmenu",function(t){return ga(e,t)});var n,r={end:0};function i(){t.activeTouch&&(n=setTimeout(function(){return t.activeTouch=null},1e3),(r=t.activeTouch).end=+new Date)}function o(e,t){if(null==t.left)return!0;var n=t.left-e.left,r=t.top-e.top;return n*n+r*r>400}pe(t.scroller,"touchstart",function(i){if(!ve(e,i)&&!function(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}(i)&&!va(e,i)){t.input.ensurePolled(),clearTimeout(n);var o=+new Date;t.activeTouch={start:o,moved:!1,prev:o-r.end<=300?r:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}}),pe(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),pe(t.scroller,"touchend",function(n){var r=t.activeTouch;if(r&&!xn(t,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var a,l=e.coordsChar(t.activeTouch,"page");a=!r.prev||o(r,r.prev)?new wi(l,l):!r.prev.prev||o(r,r.prev.prev)?e.findWordAt(l):new wi(et(l.line,0),lt(e.doc,et(l.line+1,0))),e.setSelection(a.anchor,a.head),e.focus(),we(n)}i()}),pe(t.scroller,"touchcancel",i),pe(t.scroller,"scroll",function(){t.scroller.clientHeight&&(Lr(e,t.scroller.scrollTop),Mr(e,t.scroller.scrollLeft,!0),me(e,"scroll",e))}),pe(t.scroller,"mousewheel",function(t){return yi(e,t)}),pe(t.scroller,"DOMMouseScroll",function(t){return yi(e,t)}),pe(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(t){ve(e,t)||Te(t)},over:function(t){ve(e,t)||(function(e,t){var n=lr(e,t);if(n){var r=document.createDocumentFragment();vr(e,n,r),e.display.dragCursor||(e.display.dragCursor=N("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),C(e.display.dragCursor,r)}}(e,t),Te(t))},start:function(t){return function(e,t){if(a&&(!e.state.draggingText||+new Date-No<100))Te(t);else if(!ve(e,t)&&!xn(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!p)){var n=N("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",f&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),f&&n.parentNode.removeChild(n)}}(e,t)},drop:$r(e,Ao),leave:function(t){ve(e,t)||Do(e)}};var u=t.input.getField();pe(u,"keyup",function(t){return ua.call(e,t)}),pe(u,"keydown",$r(e,la)),pe(u,"keypress",$r(e,sa)),pe(u,"focus",function(t){return xr(e,t)}),pe(u,"blur",function(t){return Tr(e,t)})}(this),jo(),Kr(this),this.curOp.forceUpdate=!0,Ii(this,r),t.autofocus&&!g||this.hasFocus()?setTimeout(F(xr,this),20):Tr(this),ka)ka.hasOwnProperty(s)&&ka[s](n,t[s],ba);si(this),t.finishInit&&t.finishInit(this);for(var c=0;c<_a.length;++c)_a[c](n);Hr(this),u&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(o.lineDiv).textRendering&&(o.lineDiv.style.textRendering="auto")}Ea.defaults=wa,Ea.optionHandlers=ka;var _a=[];function Sa(e,t,n,r){var i,o=e.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?i=dt(e,t).state:n="prev");var a=e.options.tabSize,l=Ge(o,t),u=P(l.text,null,a);l.stateAfter&&(l.stateAfter=null);var s,c=l.text.match(/^\s*/)[0];if(r||/\S/.test(l.text)){if("smart"==n&&((s=o.mode.indent(i,l.text.slice(c.length),l.text))==q||s>150)){if(!r)return;n="prev"}}else s=0,n="not";"prev"==n?s=t>o.first?P(Ge(o,t-1).text,null,a):0:"add"==n?s=u+e.options.indentUnit:"subtract"==n?s=u-e.options.indentUnit:"number"==typeof n&&(s=u+n),s=Math.max(0,s);var f="",p=0;if(e.options.indentWithTabs)for(var d=Math.floor(s/a);d;--d)p+=a,f+="\t";if(pa,u=Ie(t),s=null;if(l&&r.ranges.length>1)if(Oa&&Oa.text.join("\n")==t){if(r.ranges.length%Oa.text.length==0){s=[];for(var c=0;c=0;p--){var d=r.ranges[p],h=d.from(),m=d.to();d.empty()&&(n&&n>0?h=et(h.line,h.ch-n):e.state.overwrite&&!l?m=et(m.line,Math.min(Ge(o,m.line).text.length,m.ch+Y(u).length)):l&&Oa&&Oa.lineWise&&Oa.text.join("\n")==t&&(h=m=et(h.line,0)));var v={from:h,to:m,text:s?s[p%s.length]:u,origin:i||(l?"paste":e.state.cutIncoming>a?"cut":"+input")};ao(e.doc,v),un(e,"inputRead",e,v)}t&&!l&&Da(e,t),Nr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=f),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Aa(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||Jr(t,function(){return Na(t,n,0,null,"paste")}),!0}function Da(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var l=0;l-1){a=Sa(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Ge(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Sa(e,i.head.line,"smart"));a&&un(e,"electricInput",e,i.head.line)}}}function Ia(e){for(var t=[],n=[],r=0;r=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=ue(i,n.ch,n.sticky),a=i[o];if("ltr"==e.doc.direction&&a.level%2==0&&(r>0?a.to>n.ch:a.from=a.from&&p>=c.begin)){var d=f?"before":"after";return new et(n.line,p,d)}}var h=function(e,t,r){for(var o=function(e,t){return t?new et(n.line,u(e,1),"before"):new et(n.line,e,"after")};e>=0&&e0==(1!=a.level),s=l?r.begin:u(r.end,-1);if(a.from<=s&&s0?c.end:u(c.begin,-1);return null==v||r>0&&v==t.text.length||!(m=h(r>0?0:i.length-1,r,s(v)))?null:m}(e.cm,l,t,n):Jo(l,t,n))){if(r||((a=t.line+n)=e.first+e.size||(t=new et(a,t.ch,t.sticky),!(l=Ge(e,a)))))return!1;t=$o(i,e.cm,l,t.line,n)}else t=o;return!0}if("char"==r)u();else if("column"==r)u(!0);else if("word"==r||"group"==r)for(var s=null,c="group"==r,f=e.cm&&e.cm.getHelper(t,"wordChars"),p=!0;!(n<0)||u(!p);p=!1){var d=l.text.charAt(t.ch)||"\n",h=te(d,f)?"w":c&&"\n"==d?"n":!c||/\s/.test(d)?null:"p";if(!c||p||h||(h="s"),s&&s!=h){n<0&&(n=1,u(),t.sticky="after");break}if(h&&(s=h),n>0&&!u(!p))break}var m=no(e,t,o,a,!0);return nt(o,m)&&(m.hitSide=!0),m}function Fa(e,t,n,r){var i,o,a=e.doc,l=t.left;if("page"==r){var u=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),s=Math.max(u-.5*tr(e.display),3);i=(n>0?t.bottom:t.top)+n*s}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(;(o=Jn(e,l,i)).outside;){if(n<0?i<=0:i>=a.height){o.hitSide=!0;break}i+=5*n}return o}var Ra=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new V,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Pa(e,t){var n=Dn(e,t.line);if(!n||n.hidden)return null;var r=Ge(e.doc,t.line),i=Nn(n,r,t.line),o=ce(r,e.doc.direction),a="left";if(o){var l=ue(o,t.ch);a=l%2?"right":"left"}var u=Fn(i.map,t.ch,a);return u.offset="right"==u.collapse?u.end:u.start,u}function Va(e,t){return t&&(e.bad=!0),e}function Ua(e,t,n){var r;if(t==e.display.lineDiv){if(!(r=e.display.lineDiv.childNodes[n]))return Va(e.clipPos(et(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var i=0;i=t.display.viewTo||o.line=t.display.viewFrom&&Pa(t,i)||{node:u[0].measure.map[2],offset:0},c=o.liner.firstLine()&&(a=et(a.line-1,Ge(r.doc,a.line-1).length)),l.ch==Ge(r.doc,l.line).text.length&&l.linei.viewTo-1)return!1;a.line==i.viewFrom||0==(e=ur(r,a.line))?(t=Je(i.view[0].line),n=i.view[0].node):(t=Je(i.view[e].line),n=i.view[e-1].node.nextSibling);var u,s,c=ur(r,l.line);if(c==i.view.length-1?(u=i.viewTo-1,s=i.lineDiv.lastChild):(u=Je(i.view[c+1].line)-1,s=i.view[c+1].node.previousSibling),!n)return!1;for(var f=r.doc.splitLines(function(e,t,n,r,i){var o="",a=!1,l=e.doc.lineSeparator(),u=!1;function s(){a&&(o+=l,u&&(o+=l),a=u=!1)}function c(e){e&&(s(),o+=e)}function f(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void c(n);var o,p=t.getAttribute("cm-marker");if(p){var d=e.findMarks(et(r,0),et(i+1,0),(v=+p,function(e){return e.id==v}));return void(d.length&&(o=d[0].find(0))&&c(We(e.doc,o.from,o.to).join(l)))}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&&s();for(var m=0;m1&&p.length>1;)if(Y(f)==Y(p))f.pop(),p.pop(),u--;else{if(f[0]!=p[0])break;f.shift(),p.shift(),t++}for(var d=0,h=0,m=f[0],v=p[0],g=Math.min(m.length,v.length);da.ch&&y.charCodeAt(y.length-h-1)==b.charCodeAt(b.length-h-1);)d--,h++;f[f.length-1]=y.slice(0,y.length-h).replace(/^\u200b+/,""),f[0]=f[0].slice(d).replace(/\u200b+$/,"");var k=et(t,d),x=et(u,p.length?Y(p).length-h:0);return f.length>1||f[0]||tt(k,x)?(fo(r.doc,f,k,x,"+input"),!0):void 0},Ra.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ra.prototype.reset=function(){this.forceCompositionEnd()},Ra.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ra.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))},Ra.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Jr(this.cm,function(){return sr(e.cm)})},Ra.prototype.setUneditable=function(e){e.contentEditable="false"},Ra.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||$r(this.cm,Na)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Ra.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Ra.prototype.onContextMenu=function(){},Ra.prototype.resetPosition=function(){},Ra.prototype.needsContentAttribute=!0;var qa=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new V,this.hasSelection=!1,this.composing=null};qa.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var i=this.textarea;function o(e){if(!ve(r,e)){if(r.somethingSelected())Ca({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var t=Ia(r);Ca({lineWise:!0,text:t.text}),"cut"==e.type?r.setSelections(t.ranges,null,z):(n.prevInput="",i.value=t.text.join("\n"),M(i))}"cut"==e.type&&(r.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),m&&(i.style.width="0px"),pe(i,"input",function(){a&&l>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()}),pe(i,"paste",function(e){ve(r,e)||Aa(e,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())}),pe(i,"cut",o),pe(i,"copy",o),pe(e.scroller,"paste",function(t){if(!xn(e,t)&&!ve(r,t)){if(!i.dispatchEvent)return r.state.pasteIncoming=+new Date,void n.focus();var o=new Event("paste");o.clipboardData=t.clipboardData,i.dispatchEvent(o)}}),pe(e.lineSpace,"selectstart",function(t){xn(e,t)||we(t)}),pe(i,"compositionstart",function(){var e=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}}),pe(i,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},qa.prototype.createField=function(e){this.wrapper=ja(),this.textarea=this.wrapper.firstChild},qa.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=mr(e);if(e.options.moveInputWithCursor){var i=Wn(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return r},qa.prototype.showSelection=function(e){var t=this.cm,n=t.display;C(n.cursorDiv,e.cursors),C(n.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},qa.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&M(this.textarea),a&&l>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",a&&l>=9&&(this.hasSelection=null))}},qa.prototype.getField=function(){return this.textarea},qa.prototype.supportsTouch=function(){return!1},qa.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!g||I()!=this.textarea))try{this.textarea.focus()}catch(e){}},qa.prototype.blur=function(){this.textarea.blur()},qa.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},qa.prototype.receivedFocus=function(){this.slowPoll()},qa.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},qa.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0,t.polling.set(20,function n(){var r=t.poll();r||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,n))})},qa.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||Le(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(a&&l>=9&&this.hasSelection===i||y&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||r||(r="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var u=0,s=Math.min(r.length,i.length);u1e3||i.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},qa.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},qa.prototype.onKeyPress=function(){a&&l>=9&&(this.hasSelection=null),this.fastPoll()},qa.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=lr(n,e),s=r.scroller.scrollTop;if(o&&!f){var c=n.options.resetSelectionOnContextMenu;c&&-1==n.doc.sel.contains(o)&&$r(n,Ji)(n.doc,xi(o),z);var p,d=i.style.cssText,h=t.wrapper.style.cssText,m=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-m.top-5)+"px; left: "+(e.clientX-m.left-5)+"px;\n z-index: 1000; background: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",u&&(p=window.scrollY),r.input.focus(),u&&window.scrollTo(null,p),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=y,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),a&&l>=9&&g(),T){Te(e);var v=function(){he(window,"mouseup",v),setTimeout(y,20)};pe(window,"mouseup",v)}else setTimeout(y,50)}function g(){if(null!=i.selectionStart){var e=n.somethingSelected(),o="​"+(e?i.value:"");i.value="⇚",i.value=o,t.prevInput=e?"":"​",i.selectionStart=1,i.selectionEnd=o.length,r.selForContextMenu=n.doc.sel}}function y(){if(t.contextMenuPending==y&&(t.contextMenuPending=!1,t.wrapper.style.cssText=h,i.style.cssText=d,a&&l<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=s),null!=i.selectionStart)){(!a||a&&l<9)&&g();var e=0,o=function(){r.selForContextMenu==n.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"​"==t.prevInput?$r(n,io)(n):e++<10?r.detectingSelectAll=setTimeout(o,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(o,200)}}},qa.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e},qa.prototype.setUneditable=function(){},qa.prototype.needsContentAttribute=!1,function(e){var t=e.optionHandlers;function n(n,r,i,o){e.defaults[n]=r,i&&(t[n]=o?function(e,t,n){n!=ba&&i(e,t,n)}:i)}e.defineOption=n,e.Init=ba,n("value","",function(e,t){return e.setValue(t)},!0),n("mode",null,function(e,t){e.doc.modeOption=t,Oi(e)},!0),n("indentUnit",2,Oi,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,function(e){Ci(e),Un(e),sr(e)},!0),n("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter(function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,n.push(et(r,o))}r++});for(var i=n.length-1;i>=0;i--)fo(e.doc,t,n[i],et(n[i].line,n[i].ch+t.length))}}),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff]/g,function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=ba&&e.refresh()}),n("specialCharPlaceholder",Xt,function(e){return e.refresh()},!0),n("electricChars",!0),n("inputStyle",g?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),n("spellcheck",!1,function(e,t){return e.getInputField().spellcheck=t},!0),n("autocorrect",!1,function(e,t){return e.getInputField().autocorrect=t},!0),n("autocapitalize",!1,function(e,t){return e.getInputField().autocapitalize=t},!0),n("rtlMoveVisually",!w),n("wholeLineUpdateBefore",!0),n("theme","default",function(e){ya(e),pi(e)},!0),n("keyMap","default",function(e,t,n){var r=Wo(t),i=n!=ba&&Wo(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)}),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Ta,!0),n("gutters",[],function(e,t){e.display.gutterSpecs=ci(t,e.options.lineNumbers),pi(e)},!0),n("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?ir(e.display)+"px":"0",e.refresh()},!0),n("coverGutterNextToScrollbar",!1,function(e){return Vr(e)},!0),n("scrollbarStyle","native",function(e){qr(e),Vr(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),n("lineNumbers",!1,function(e,t){e.display.gutterSpecs=ci(e.options.gutters,t),pi(e)},!0),n("firstLineNumber",1,pi,!0),n("lineNumberFormatter",function(e){return e},pi,!0),n("showCursorWhenSelecting",!1,hr,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,function(e,t){"nocursor"==t&&(Tr(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)}),n("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),n("dragDrop",!0,xa),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,hr,!0),n("singleCursorHeightPerLine",!0,hr,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Ci,!0),n("addModeClass",!1,Ci,!0),n("pollInterval",100),n("undoDepth",200,function(e,t){return e.doc.history.undoDepth=t}),n("historyEventDelay",1250),n("viewportMargin",10,function(e){return e.refresh()},!0),n("maxHighlightLength",1e4,Ci,!0),n("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),n("tabindex",null,function(e,t){return e.display.input.getField().tabIndex=t||""}),n("autofocus",null),n("direction","ltr",function(e,t){return e.doc.setDirection(t)},!0),n("phrases",null)}(Ea),function(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,n){var r=this.options,i=r[e];r[e]==n&&"mode"!=e||(r[e]=n,t.hasOwnProperty(e)&&$r(this,t[e])(this,n,i),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"](Wo(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;nn&&(Sa(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&Nr(this));else{var o=i.from(),a=i.to(),l=Math.max(n,o.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var u=l;u0&&Wi(this.doc,r,new wi(o,s[r].to()),z)}}}),getTokenAt:function(e,t){return yt(this,e,t)},getLineTokens:function(e,t){return yt(this,et(e),t,!0)},getTokenTypeAt:function(e){e=lt(this.doc,e);var t,n=pt(this,Ge(this.doc,e.line)),r=0,i=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var a=r+i>>1;if((a?n[2*a-1]:0)>=o)i=a;else{if(!(n[2*a+1]o&&(e=o,i=!0),r=Ge(this.doc,e)}else r=e;return Kn(this,r,{top:0,left:0},t||"page",n||i).top+(i?this.doc.height-zt(r):0)},defaultTextHeight:function(){return tr(this.display)},defaultCharWidth:function(){return nr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var o,a,l,u=this.display,s=(e=Wn(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),u.sizer.appendChild(t),"over"==r)s=e.top;else if("above"==r||"near"==r){var f=Math.max(u.wrapper.clientHeight,this.doc.height),p=Math.max(u.sizer.clientWidth,u.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>f)&&e.top>t.offsetHeight?s=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=f&&(s=e.bottom),c+t.offsetWidth>p&&(c=p-t.offsetWidth)}t.style.top=s+"px",t.style.left=t.style.right="","right"==i?(c=u.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?c=0:"middle"==i&&(c=(u.sizer.clientWidth-t.offsetWidth)/2),t.style.left=c+"px"),n&&(o=this,a={left:c,top:s,right:c+t.offsetWidth,bottom:s+t.offsetHeight},null!=(l=Or(o,a)).scrollTop&&Lr(o,l.scrollTop),null!=l.scrollLeft&&Mr(o,l.scrollLeft))},triggerOnKeyDown:Xr(la),triggerOnKeyPress:Xr(sa),triggerOnKeyUp:ua,triggerOnMouseDown:Xr(da),execCommand:function(e){if(Xo.hasOwnProperty(e))return Xo[e].call(null,this)},triggerElectric:Xr(function(e){Da(this,e)}),findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var o=lt(this.doc,e),a=0;a0&&l(n.charAt(r-1));)--r;for(;i.5)&&ar(this),me(this,"refresh",this)}),swapDoc:Xr(function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),Ii(this,e),Un(this),this.display.input.reset(),Ar(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,un(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,r,i){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=i},e.registerGlobalHelper=function(t,r,i,o){e.registerHelper(t,r,o),n[t]._global.push({pred:i,val:o})}}(Ea);var za="iter insert remove copy getEditor constructor".split(" ");for(var Ka in Co.prototype)Co.prototype.hasOwnProperty(Ka)&&U(za,Ka)<0&&(Ea.prototype[Ka]=function(e){return function(){return e.apply(this.doc,arguments)}}(Co.prototype[Ka]));return be(Co),Ea.inputStyles={textarea:qa,contenteditable:Ra},Ea.defineMode=function(e){Ea.defaults.mode||"null"==e||(Ea.defaults.mode=e),function(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Fe[e]=t}.apply(this,arguments)},Ea.defineMIME=function(e,t){Re[e]=t},Ea.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Ea.defineMIME("text/plain","null"),Ea.defineExtension=function(e,t){Ea.prototype[e]=t},Ea.defineDocExtension=function(e,t){Co.prototype[e]=t},Ea.fromTextArea=function(e,t){if((t=t?R(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var n=I();t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}function r(){e.value=l.getValue()}var i;if(e.form&&(pe(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var a=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=a}}catch(e){}}t.finishInit=function(t){t.save=r,t.getTextArea=function(){return e},t.toTextArea=function(){t.toTextArea=isNaN,r(),e.parentNode.removeChild(t.getWrapperElement()),e.style.display="",e.form&&(he(e.form,"submit",r),"function"==typeof e.form.submit&&(e.form.submit=i))}},e.style.display="none";var l=Ea(function(t){return e.parentNode.insertBefore(t,e.nextSibling)},t);return l},function(e){e.off=he,e.on=pe,e.wheelEventPixels=gi,e.Doc=Co,e.splitLines=Ie,e.countColumn=P,e.findColumn=G,e.isWordChar=ee,e.Pass=q,e.signal=me,e.Line=Gt,e.changeEnd=Ti,e.scrollbarModel=Br,e.Pos=et,e.cmpPos=tt,e.modes=Fe,e.mimeModes=Re,e.resolveMode=Pe,e.getMode=Ve,e.modeExtensions=Ue,e.extendMode=Be,e.copyState=qe,e.startState=Ke,e.innerMode=ze,e.commands=Xo,e.keyMap=Uo,e.keyName=Go,e.isModifierKey=Ko,e.lookupKey=zo,e.normalizeKeyMap=qo,e.StringStream=He,e.SharedTextMarker=Eo,e.TextMarker=xo,e.LineWidget=bo,e.e_preventDefault=we,e.e_stopPropagation=ke,e.e_stop=Te,e.addClass=L,e.contains=D,e.rmClass=S,e.keyNames=Fo}(Ea),Ea.version="5.47.0",Ea}()},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var r=n(13);function i(e){return Object(r.c)(e,{leave:o})}var o={Name:function(e){return e.value},Variable:function(e){return"$"+e.name},Document:function(e){return l(e.definitions,"\n\n")+"\n"},OperationDefinition:function(e){var t=e.operation,n=e.name,r=s("(",l(e.variableDefinitions,", "),")"),i=l(e.directives," "),o=e.selectionSet;return n||i||r||"query"!==t?l([t,l([n,r]),i,o]," "):o},VariableDefinition:function(e){var t=e.variable,n=e.type,r=e.defaultValue,i=e.directives;return t+": "+n+s(" = ",r)+s(" ",l(i," "))},SelectionSet:function(e){return u(e.selections)},Field:function(e){var t=e.alias,n=e.name,r=e.arguments,i=e.directives,o=e.selectionSet;return l([s("",t,": ")+n+s("(",l(r,", "),")"),l(i," "),o]," ")},Argument:function(e){return e.name+": "+e.value},FragmentSpread:function(e){return"..."+e.name+s(" ",l(e.directives," "))},InlineFragment:function(e){var t=e.typeCondition,n=e.directives,r=e.selectionSet;return l(["...",s("on ",t),l(n," "),r]," ")},FragmentDefinition:function(e){var t=e.name,n=e.typeCondition,r=e.variableDefinitions,i=e.directives,o=e.selectionSet;return"fragment ".concat(t).concat(s("(",l(r,", "),")")," ")+"on ".concat(n," ").concat(s("",l(i," ")," "))+o},IntValue:function(e){return e.value},FloatValue:function(e){return e.value},StringValue:function(e,t){var n=e.value;return e.block?function(e,t){var n=e.replace(/"""/g,'\\"""');return f(e)||" "!==e[0]&&"\t"!==e[0]?'"""\n'.concat(t?n:c(n),'\n"""'):'"""'.concat(n.replace(/"$/,'"\n'),'"""')}(n,"description"===t):JSON.stringify(n)},BooleanValue:function(e){return e.value?"true":"false"},NullValue:function(){return"null"},EnumValue:function(e){return e.value},ListValue:function(e){return"["+l(e.values,", ")+"]"},ObjectValue:function(e){return"{"+l(e.fields,", ")+"}"},ObjectField:function(e){return e.name+": "+e.value},Directive:function(e){return"@"+e.name+s("(",l(e.arguments,", "),")")},NamedType:function(e){return e.name},ListType:function(e){return"["+e.type+"]"},NonNullType:function(e){return e.type+"!"},SchemaDefinition:function(e){var t=e.directives,n=e.operationTypes;return l(["schema",l(t," "),u(n)]," ")},OperationTypeDefinition:function(e){return e.operation+": "+e.type},ScalarTypeDefinition:a(function(e){return l(["scalar",e.name,l(e.directives," ")]," ")}),ObjectTypeDefinition:a(function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return l(["type",t,s("implements ",l(n," & ")),l(r," "),u(i)]," ")}),FieldDefinition:a(function(e){var t=e.name,n=e.arguments,r=e.type,i=e.directives;return t+(p(n)?s("(\n",c(l(n,"\n")),"\n)"):s("(",l(n,", "),")"))+": "+r+s(" ",l(i," "))}),InputValueDefinition:a(function(e){var t=e.name,n=e.type,r=e.defaultValue,i=e.directives;return l([t+": "+n,s("= ",r),l(i," ")]," ")}),InterfaceTypeDefinition:a(function(e){var t=e.name,n=e.directives,r=e.fields;return l(["interface",t,l(n," "),u(r)]," ")}),UnionTypeDefinition:a(function(e){var t=e.name,n=e.directives,r=e.types;return l(["union",t,l(n," "),r&&0!==r.length?"= "+l(r," | "):""]," ")}),EnumTypeDefinition:a(function(e){var t=e.name,n=e.directives,r=e.values;return l(["enum",t,l(n," "),u(r)]," ")}),EnumValueDefinition:a(function(e){return l([e.name,l(e.directives," ")]," ")}),InputObjectTypeDefinition:a(function(e){var t=e.name,n=e.directives,r=e.fields;return l(["input",t,l(n," "),u(r)]," ")}),DirectiveDefinition:a(function(e){var t=e.name,n=e.arguments,r=e.locations;return"directive @"+t+(p(n)?s("(\n",c(l(n,"\n")),"\n)"):s("(",l(n,", "),")"))+" on "+l(r," | ")}),SchemaExtension:function(e){var t=e.directives,n=e.operationTypes;return l(["extend schema",l(t," "),u(n)]," ")},ScalarTypeExtension:function(e){return l(["extend scalar",e.name,l(e.directives," ")]," ")},ObjectTypeExtension:function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return l(["extend type",t,s("implements ",l(n," & ")),l(r," "),u(i)]," ")},InterfaceTypeExtension:function(e){var t=e.name,n=e.directives,r=e.fields;return l(["extend interface",t,l(n," "),u(r)]," ")},UnionTypeExtension:function(e){var t=e.name,n=e.directives,r=e.types;return l(["extend union",t,l(n," "),r&&0!==r.length?"= "+l(r," | "):""]," ")},EnumTypeExtension:function(e){var t=e.name,n=e.directives,r=e.values;return l(["extend enum",t,l(n," "),u(r)]," ")},InputObjectTypeExtension:function(e){var t=e.name,n=e.directives,r=e.fields;return l(["extend input",t,l(n," "),u(r)]," ")}};function a(e){return function(t){return l([t.description,e(t)],"\n")}}function l(e,t){return e?e.filter(function(e){return e}).join(t||""):""}function u(e){return e&&0!==e.length?"{\n"+c(l(e,"\n"))+"\n}":""}function s(e,t,n){return t?e+t+(n||""):""}function c(e){return e&&" "+e.replace(/\n/g,"\n ")}function f(e){return-1!==e.indexOf("\n")}function p(e){return e&&e.some(f)}},function(e,t,n){"use strict";n.r(t);var r=Array.prototype.find?function(e,t){return Array.prototype.find.call(e,t)}:function(e,t){for(var n=0;n1&&"_"===e[0]&&"_"===e[1]?new D.a('Name "'.concat(e,'" must not begin with "__", which is reserved by ')+"GraphQL introspection.",t):I.test(e)?void 0:new D.a('Names must match /^[_a-zA-Z][_a-zA-Z0-9]*$/ but "'.concat(e,'" does not.'),t)}function M(e,t){return e===t||(Object(a.K)(e)&&Object(a.K)(t)?M(e.ofType,t.ofType):!(!Object(a.I)(e)||!Object(a.I)(t))&&M(e.ofType,t.ofType))}function F(e,t,n){return t===n||(Object(a.K)(n)?!!Object(a.K)(t)&&F(e,t.ofType,n.ofType):Object(a.K)(t)?F(e,t.ofType,n):Object(a.I)(n)?!!Object(a.I)(t)&&F(e,t.ofType,n.ofType):!Object(a.I)(t)&&!!(Object(a.B)(n)&&Object(a.M)(t)&&e.isPossibleType(n,t)))}function R(e,t,n){return t===n||(Object(a.B)(t)?Object(a.B)(n)?e.getPossibleTypes(t).some(function(t){return e.isPossibleType(n,t)}):e.isPossibleType(t,n):!!Object(a.B)(n)&&e.isPossibleType(n,t))}function P(e){if(O(e),e.__validationErrors)return e.__validationErrors;var t=new U(e);!function(e){var t=e.schema,n=t.getQueryType();n?Object(a.M)(n)||e.reportError("Query root type must be Object type, it cannot be ".concat(Object(p.a)(n),"."),B(t,n,"query")):e.reportError("Query root type must be provided.",t.astNode);var r=t.getMutationType();r&&!Object(a.M)(r)&&e.reportError("Mutation root type must be Object type if provided, it cannot be "+"".concat(Object(p.a)(r),"."),B(t,r,"mutation"));var i=t.getSubscriptionType();i&&!Object(a.M)(i)&&e.reportError("Subscription root type must be Object type if provided, it cannot be "+"".concat(Object(p.a)(i),"."),B(t,i,"subscription"))}(t),function(e){var t=!0,n=!1,r=void 0;try{for(var i,o=e.schema.getDirectives()[Symbol.iterator]();!(t=(i=o.next()).done);t=!0){var l=i.value;if(m(l)){q(e,l);var u=Object.create(null),s=!0,c=!1,f=void 0;try{for(var d,h=l.args[Symbol.iterator]();!(s=(d=h.next()).done);s=!0){var v=d.value,g=v.name;q(e,v),u[g]?e.reportError("Argument @".concat(l.name,"(").concat(g,":) can only be defined once."),ie(l,g)):(u[g]=!0,Object(a.F)(v.type)||e.reportError("The type of @".concat(l.name,"(").concat(g,":) must be Input Type ")+"but got: ".concat(Object(p.a)(v.type),"."),oe(l,g)))}}catch(e){c=!0,f=e}finally{try{s||null==h.return||h.return()}finally{if(c)throw f}}}else e.reportError("Expected directive but got: ".concat(Object(p.a)(l),"."),l&&l.astNode)}}catch(e){n=!0,r=e}finally{try{t||null==o.return||o.return()}finally{if(n)throw r}}}(t),function(e){var t=e.schema.getTypeMap(),n=!0,r=!1,o=void 0;try{for(var l,u=Object(i.a)(t)[Symbol.iterator]();!(n=(l=u.next()).done);n=!0){var s=l.value;Object(a.J)(s)?(Object(E.isIntrospectionType)(s)||q(e,s),Object(a.M)(s)?(z(e,s),K(e,s)):Object(a.G)(s)?z(e,s):Object(a.S)(s)?G(e,s):Object(a.D)(s)?W(e,s):Object(a.E)(s)&&Q(e,s)):e.reportError("Expected GraphQL named type but got: ".concat(Object(p.a)(s),"."),s&&s.astNode)}}catch(e){r=!0,o=e}finally{try{n||null==u.return||u.return()}finally{if(r)throw o}}}(t);var n=t.getErrors();return e.__validationErrors=n,n}function V(e){var t=P(e);if(0!==t.length)throw new Error(t.map(function(e){return e.message}).join("\n\n"))}var U=function(){function e(e){this._errors=[],this.schema=e}var t=e.prototype;return t.reportError=function(e,t){var n=(Array.isArray(t)?t:[t]).filter(Boolean);this.addError(new D.a(e,n))},t.addError=function(e){this._errors.push(e)},t.getErrors=function(){return this._errors},e}();function B(e,t,n){var r=J(e,function(e){return e.operationTypes}),i=!0,o=!1,a=void 0;try{for(var l,u=r[Symbol.iterator]();!(i=(l=u.next()).done);i=!0){var s=l.value;if(s.operation===n)return s.type}}catch(e){o=!0,a=e}finally{try{i||null==u.return||u.return()}finally{if(o)throw a}}return t.astNode}function q(e,t){if(-1===e.schema.__allowedLegacyNames.indexOf(t.name)){var n=j(t.name,t.astNode||void 0);n&&e.addError(n)}}function z(e,t){var n=Object(i.a)(t.getFields());0===n.length&&e.reportError("Type ".concat(t.name," must define one or more fields."),Y(t));var r=!0,o=!1,l=void 0;try{for(var u,s=n[Symbol.iterator]();!(r=(u=s.next()).done);r=!0){var c=u.value;q(e,c),Object(a.N)(c.type)||e.reportError("The type of ".concat(t.name,".").concat(c.name," must be Output Type ")+"but got: ".concat(Object(p.a)(c.type),"."),ee(t,c.name));var f=Object.create(null),d=!0,h=!1,m=void 0;try{for(var v,g=c.args[Symbol.iterator]();!(d=(v=g.next()).done);d=!0){var y=v.value,b=y.name;q(e,y),f[b]&&e.reportError("Field argument ".concat(t.name,".").concat(c.name,"(").concat(b,":) can only ")+"be defined once.",ne(t,c.name,b)),f[b]=!0,Object(a.F)(y.type)||e.reportError("The type of ".concat(t.name,".").concat(c.name,"(").concat(b,":) must be Input ")+"Type but got: ".concat(Object(p.a)(y.type),"."),re(t,c.name,b))}}catch(e){h=!0,m=e}finally{try{d||null==g.return||g.return()}finally{if(h)throw m}}}}catch(e){o=!0,l=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw l}}}function K(e,t){var n=Object.create(null),r=!0,i=!1,o=void 0;try{for(var l,u=t.getInterfaces()[Symbol.iterator]();!(r=(l=u.next()).done);r=!0){var s=l.value;Object(a.G)(s)?n[s.name]?e.reportError("Type ".concat(t.name," can only implement ").concat(s.name," once."),X(t,s)):(n[s.name]=!0,H(e,t,s)):e.reportError("Type ".concat(Object(p.a)(t)," must only implement Interface types, ")+"it cannot implement ".concat(Object(p.a)(s),"."),$(t,s))}}catch(e){i=!0,o=e}finally{try{r||null==u.return||u.return()}finally{if(i)throw o}}}function H(e,t,n){var i=t.getFields(),l=n.getFields(),u=!0,s=!1,c=void 0;try{for(var f,d=Object(o.a)(l)[Symbol.iterator]();!(u=(f=d.next()).done);u=!0){var h=f.value,m=h[0],v=h[1],g=i[m];if(g){F(e.schema,g.type,v.type)||e.reportError("Interface field ".concat(n.name,".").concat(m," expects type ")+"".concat(Object(p.a)(v.type)," but ").concat(t.name,".").concat(m," ")+"is type ".concat(Object(p.a)(g.type),"."),[ee(n,m),ee(t,m)]);var y=!0,b=!1,w=void 0;try{for(var k,x=function(){var i=k.value,o=i.name,a=r(g.args,function(e){return e.name===o});if(!a)return e.reportError("Interface field argument ".concat(n.name,".").concat(m,"(").concat(o,":) ")+"expected but ".concat(t.name,".").concat(m," does not provide it."),[te(n,m,o),Z(t,m)]),"continue";M(i.type,a.type)||e.reportError("Interface field argument ".concat(n.name,".").concat(m,"(").concat(o,":) ")+"expects type ".concat(Object(p.a)(i.type)," but ")+"".concat(t.name,".").concat(m,"(").concat(o,":) is type ")+"".concat(Object(p.a)(a.type),"."),[re(n,m,o),re(t,m,o)])},T=v.args[Symbol.iterator]();!(y=(k=T.next()).done);y=!0)x()}catch(e){b=!0,w=e}finally{try{y||null==T.return||T.return()}finally{if(b)throw w}}var E=!0,_=!1,S=void 0;try{for(var O,C=function(){var i=O.value,o=i.name;!r(v.args,function(e){return e.name===o})&&Object(a.O)(i)&&e.reportError("Object field ".concat(t.name,".").concat(m," includes required ")+"argument ".concat(o," that is missing from the Interface field ")+"".concat(n.name,".").concat(m,"."),[te(t,m,o),Z(n,m)])},N=g.args[Symbol.iterator]();!(E=(O=N.next()).done);E=!0)C()}catch(e){_=!0,S=e}finally{try{E||null==N.return||N.return()}finally{if(_)throw S}}}else e.reportError("Interface field ".concat(n.name,".").concat(m," expected but ")+"".concat(t.name," does not provide it."),[Z(n,m)].concat(Y(t)))}}catch(e){s=!0,c=e}finally{try{u||null==d.return||d.return()}finally{if(s)throw c}}}function G(e,t){var n=t.getTypes();0===n.length&&e.reportError("Union type ".concat(t.name," must define one or more member types."),Y(t));var r=Object.create(null),i=!0,o=!1,l=void 0;try{for(var u,s=n[Symbol.iterator]();!(i=(u=s.next()).done);i=!0){var c=u.value;r[c.name]?e.reportError("Union type ".concat(t.name," can only include type ")+"".concat(c.name," once."),ae(t,c.name)):(r[c.name]=!0,Object(a.M)(c)||e.reportError("Union type ".concat(t.name," can only include Object types, ")+"it cannot include ".concat(Object(p.a)(c),"."),ae(t,String(c))))}}catch(e){o=!0,l=e}finally{try{i||null==s.return||s.return()}finally{if(o)throw l}}}function W(e,t){var n=t.getValues();0===n.length&&e.reportError("Enum type ".concat(t.name," must define one or more values."),Y(t));var r=!0,i=!1,o=void 0;try{for(var a,l=n[Symbol.iterator]();!(r=(a=l.next()).done);r=!0){var u=a.value,s=u.name;q(e,u),"true"!==s&&"false"!==s&&"null"!==s||e.reportError("Enum type ".concat(t.name," cannot include value: ").concat(s,"."),u.astNode)}}catch(e){i=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(i)throw o}}}function Q(e,t){var n=Object(i.a)(t.getFields());0===n.length&&e.reportError("Input Object type ".concat(t.name," must define one or more fields."),Y(t));var r=!0,o=!1,l=void 0;try{for(var u,s=n[Symbol.iterator]();!(r=(u=s.next()).done);r=!0){var c=u.value;q(e,c),Object(a.F)(c.type)||e.reportError("The type of ".concat(t.name,".").concat(c.name," must be Input Type ")+"but got: ".concat(Object(p.a)(c.type),"."),c.astNode&&c.astNode.type)}}catch(e){o=!0,l=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw l}}}function Y(e){var t=e.astNode,n=e.extensionASTNodes;return t?n?[t].concat(n):[t]:n||[]}function J(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,l=Y(e)[Symbol.iterator]();!(r=(a=l.next()).done);r=!0){var u=a.value;if(u){var s=t(u);s&&(n=n.concat(s))}}}catch(e){i=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(i)throw o}}return n}function $(e,t){return X(e,t)[0]}function X(e,t){return J(e,function(e){return e.interfaces}).filter(function(e){return e.name.value===t.name})}function Z(e,t){return r(J(e,function(e){return e.fields}),function(e){return e.name.value===t})}function ee(e,t){var n=Z(e,t);return n&&n.type}function te(e,t,n){return ne(e,t,n)[0]}function ne(e,t,n){var r=[],i=Z(e,t);if(i&&i.arguments){var o=!0,a=!1,l=void 0;try{for(var u,s=i.arguments[Symbol.iterator]();!(o=(u=s.next()).done);o=!0){var c=u.value;c.name.value===n&&r.push(c)}}catch(e){a=!0,l=e}finally{try{o||null==s.return||s.return()}finally{if(a)throw l}}}return r}function re(e,t,n){var r=te(e,t,n);return r&&r.type}function ie(e,t){return J(e,function(e){return e.arguments}).filter(function(e){return e.name.value===t})}function oe(e,t){var n=ie(e,t)[0];return n&&n.type}function ae(e,t){return J(e,function(e){return e.types}).filter(function(e){return e.name.value===t})}var le=function(e,t,n){this.body=e,this.name=t||"GraphQL request",this.locationOffset=n||{line:1,column:1},this.locationOffset.line>0||Object(f.a)(0,"line in locationOffset is 1-indexed and must be positive"),this.locationOffset.column>0||Object(f.a)(0,"column in locationOffset is 1-indexed and must be positive")};function ue(e,t,n){return new D.a("Syntax Error: ".concat(n),void 0,e,[t])}function se(e){for(var t=e.split(/\r\n|[\n\r]/g),n=null,r=1;r0&&fe(t[0]);)t.shift();for(;t.length>0&&fe(t[t.length-1]);)t.pop();return t.join("\n")}function ce(e){for(var t=0;t",EOF:"",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"});function ve(e){var t=e.value;return t?"".concat(e.kind,' "').concat(t,'"'):e.kind}var ge=String.prototype.charCodeAt,ye=String.prototype.slice;function be(e,t,n,r,i,o,a){this.kind=e,this.start=t,this.end=n,this.line=r,this.column=i,this.value=a,this.prev=o,this.next=null}function we(e){return isNaN(e)?me.EOF:e<127?JSON.stringify(String.fromCharCode(e)):'"\\u'.concat(("00"+e.toString(16).toUpperCase()).slice(-4),'"')}function ke(e,t){var n=e.source,r=n.body,i=r.length,o=function(e,t,n){var r=e.length,i=t;for(;i=i)return new be(me.EOF,i,i,a,l,t);var u=ge.call(r,o);switch(u){case 33:return new be(me.BANG,o,o+1,a,l,t);case 35:return function(e,t,n,r,i){var o,a=e.body,l=t;do{o=ge.call(a,++l)}while(null!==o&&(o>31||9===o));return new be(me.COMMENT,t,l,n,r,i,ye.call(a,t+1,l))}(n,o,a,l,t);case 36:return new be(me.DOLLAR,o,o+1,a,l,t);case 38:return new be(me.AMP,o,o+1,a,l,t);case 40:return new be(me.PAREN_L,o,o+1,a,l,t);case 41:return new be(me.PAREN_R,o,o+1,a,l,t);case 46:if(46===ge.call(r,o+1)&&46===ge.call(r,o+2))return new be(me.SPREAD,o,o+3,a,l,t);break;case 58:return new be(me.COLON,o,o+1,a,l,t);case 61:return new be(me.EQUALS,o,o+1,a,l,t);case 64:return new be(me.AT,o,o+1,a,l,t);case 91:return new be(me.BRACKET_L,o,o+1,a,l,t);case 93:return new be(me.BRACKET_R,o,o+1,a,l,t);case 123:return new be(me.BRACE_L,o,o+1,a,l,t);case 124:return new be(me.PIPE,o,o+1,a,l,t);case 125:return new be(me.BRACE_R,o,o+1,a,l,t);case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 95:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:return function(e,t,n,r,i){var o=e.body,a=o.length,l=t+1,u=0;for(;l!==a&&null!==(u=ge.call(o,l))&&(95===u||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122);)++l;return new be(me.NAME,t,l,n,r,i,ye.call(o,t,l))}(n,o,a,l,t);case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return function(e,t,n,r,i,o){var a=e.body,l=n,u=t,s=!1;45===l&&(l=ge.call(a,++u));if(48===l){if((l=ge.call(a,++u))>=48&&l<=57)throw ue(e,u,"Invalid number, unexpected digit after 0: ".concat(we(l),"."))}else u=xe(e,u,l),l=ge.call(a,u);46===l&&(s=!0,l=ge.call(a,++u),u=xe(e,u,l),l=ge.call(a,u));69!==l&&101!==l||(s=!0,43!==(l=ge.call(a,++u))&&45!==l||(l=ge.call(a,++u)),u=xe(e,u,l));return new be(s?me.FLOAT:me.INT,t,u,r,i,o,ye.call(a,t,u))}(n,o,u,a,l,t);case 34:return 34===ge.call(r,o+1)&&34===ge.call(r,o+2)?function(e,t,n,r,i,o){var a=e.body,l=t+3,u=l,s=0,c="";for(;l=48&&o<=57){do{o=ge.call(r,++i)}while(o>=48&&o<=57);return i}throw ue(e,i,"Invalid number, expected digit but got: ".concat(we(o),"."))}function Te(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}Object(s.a)(be,function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}});var Ee=n(1);function _e(e,t){var n="string"==typeof e?new le(e):e;if(!(n instanceof le))throw new TypeError("Must provide Source. Received: ".concat(Object(p.a)(n)));return function(e){var t=e.token;return{kind:Ee.Kind.DOCUMENT,definitions:wt(e,me.SOF,Ne,me.EOF),loc:ft(e,t)}}(pe(n,t||{}))}function Se(e,t){var n=pe("string"==typeof e?new le(e):e,t||{});mt(n,me.SOF);var r=qe(n,!1);return mt(n,me.EOF),r}function Oe(e,t){var n=pe("string"==typeof e?new le(e):e,t||{});mt(n,me.SOF);var r=Ye(n);return mt(n,me.EOF),r}function Ce(e){var t=mt(e,me.NAME);return{kind:Ee.Kind.NAME,value:t.value,loc:ft(e,t)}}function Ne(e){if(dt(e,me.NAME))switch(e.token.value){case"query":case"mutation":case"subscription":case"fragment":return Ae(e);case"schema":case"scalar":case"type":case"interface":case"union":case"enum":case"input":case"directive":return $e(e);case"extend":return function(e){var t=e.lookahead();if(t.kind===me.NAME)switch(t.value){case"schema":return function(e){var t=e.token;gt(e,"extend"),gt(e,"schema");var n=We(e,!0),r=dt(e,me.BRACE_L)?wt(e,me.BRACE_L,et,me.BRACE_R):[];if(0===n.length&&0===r.length)throw yt(e);return{kind:Ee.Kind.SCHEMA_EXTENSION,directives:n,operationTypes:r,loc:ft(e,t)}}(e);case"scalar":return function(e){var t=e.token;gt(e,"extend"),gt(e,"scalar");var n=Ce(e),r=We(e,!0);if(0===r.length)throw yt(e);return{kind:Ee.Kind.SCALAR_TYPE_EXTENSION,name:n,directives:r,loc:ft(e,t)}}(e);case"type":return function(e){var t=e.token;gt(e,"extend"),gt(e,"type");var n=Ce(e),r=tt(e),i=We(e,!0),o=nt(e);if(0===r.length&&0===i.length&&0===o.length)throw yt(e);return{kind:Ee.Kind.OBJECT_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:o,loc:ft(e,t)}}(e);case"interface":return function(e){var t=e.token;gt(e,"extend"),gt(e,"interface");var n=Ce(e),r=We(e,!0),i=nt(e);if(0===r.length&&0===i.length)throw yt(e);return{kind:Ee.Kind.INTERFACE_TYPE_EXTENSION,name:n,directives:r,fields:i,loc:ft(e,t)}}(e);case"union":return function(e){var t=e.token;gt(e,"extend"),gt(e,"union");var n=Ce(e),r=We(e,!0),i=at(e);if(0===r.length&&0===i.length)throw yt(e);return{kind:Ee.Kind.UNION_TYPE_EXTENSION,name:n,directives:r,types:i,loc:ft(e,t)}}(e);case"enum":return function(e){var t=e.token;gt(e,"extend"),gt(e,"enum");var n=Ce(e),r=We(e,!0),i=lt(e);if(0===r.length&&0===i.length)throw yt(e);return{kind:Ee.Kind.ENUM_TYPE_EXTENSION,name:n,directives:r,values:i,loc:ft(e,t)}}(e);case"input":return function(e){var t=e.token;gt(e,"extend"),gt(e,"input");var n=Ce(e),r=We(e,!0),i=st(e);if(0===r.length&&0===i.length)throw yt(e);return{kind:Ee.Kind.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:r,fields:i,loc:ft(e,t)}}(e)}throw yt(e,t)}(e)}else{if(dt(e,me.BRACE_L))return Ae(e);if(Xe(e))return $e(e)}throw yt(e)}function Ae(e){if(dt(e,me.NAME))switch(e.token.value){case"query":case"mutation":case"subscription":return De(e);case"fragment":return function(e){var t=e.token;if(gt(e,"fragment"),e.options.experimentalFragmentVariables)return{kind:Ee.Kind.FRAGMENT_DEFINITION,name:Be(e),variableDefinitions:Le(e),typeCondition:(gt(e,"on"),Je(e)),directives:We(e,!1),selectionSet:Fe(e),loc:ft(e,t)};return{kind:Ee.Kind.FRAGMENT_DEFINITION,name:Be(e),typeCondition:(gt(e,"on"),Je(e)),directives:We(e,!1),selectionSet:Fe(e),loc:ft(e,t)}}(e)}else if(dt(e,me.BRACE_L))return De(e);throw yt(e)}function De(e){var t=e.token;if(dt(e,me.BRACE_L))return{kind:Ee.Kind.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:Fe(e),loc:ft(e,t)};var n,r=Ie(e);return dt(e,me.NAME)&&(n=Ce(e)),{kind:Ee.Kind.OPERATION_DEFINITION,operation:r,name:n,variableDefinitions:Le(e),directives:We(e,!1),selectionSet:Fe(e),loc:ft(e,t)}}function Ie(e){var t=mt(e,me.NAME);switch(t.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw yt(e,t)}function Le(e){return dt(e,me.PAREN_L)?wt(e,me.PAREN_L,je,me.PAREN_R):[]}function je(e){var t=e.token;return{kind:Ee.Kind.VARIABLE_DEFINITION,variable:Me(e),type:(mt(e,me.COLON),Ye(e)),defaultValue:ht(e,me.EQUALS)?qe(e,!0):void 0,directives:We(e,!0),loc:ft(e,t)}}function Me(e){var t=e.token;return mt(e,me.DOLLAR),{kind:Ee.Kind.VARIABLE,name:Ce(e),loc:ft(e,t)}}function Fe(e){var t=e.token;return{kind:Ee.Kind.SELECTION_SET,selections:wt(e,me.BRACE_L,Re,me.BRACE_R),loc:ft(e,t)}}function Re(e){return dt(e,me.SPREAD)?function(e){var t=e.token;mt(e,me.SPREAD);var n=vt(e,"on");if(!n&&dt(e,me.NAME))return{kind:Ee.Kind.FRAGMENT_SPREAD,name:Be(e),directives:We(e,!1),loc:ft(e,t)};return{kind:Ee.Kind.INLINE_FRAGMENT,typeCondition:n?Je(e):void 0,directives:We(e,!1),selectionSet:Fe(e),loc:ft(e,t)}}(e):function(e){var t,n,r=e.token,i=Ce(e);ht(e,me.COLON)?(t=i,n=Ce(e)):n=i;return{kind:Ee.Kind.FIELD,alias:t,name:n,arguments:Pe(e,!1),directives:We(e,!1),selectionSet:dt(e,me.BRACE_L)?Fe(e):void 0,loc:ft(e,r)}}(e)}function Pe(e,t){var n=t?Ue:Ve;return dt(e,me.PAREN_L)?wt(e,me.PAREN_L,n,me.PAREN_R):[]}function Ve(e){var t=e.token;return{kind:Ee.Kind.ARGUMENT,name:Ce(e),value:(mt(e,me.COLON),qe(e,!1)),loc:ft(e,t)}}function Ue(e){var t=e.token;return{kind:Ee.Kind.ARGUMENT,name:Ce(e),value:(mt(e,me.COLON),Ke(e)),loc:ft(e,t)}}function Be(e){if("on"===e.token.value)throw yt(e);return Ce(e)}function qe(e,t){var n=e.token;switch(n.kind){case me.BRACKET_L:return function(e,t){var n=e.token,r=t?Ke:He;return{kind:Ee.Kind.LIST,values:bt(e,me.BRACKET_L,r,me.BRACKET_R),loc:ft(e,n)}}(e,t);case me.BRACE_L:return function(e,t){var n=e.token;mt(e,me.BRACE_L);var r=[];for(;!ht(e,me.BRACE_R);)r.push(Ge(e,t));return{kind:Ee.Kind.OBJECT,fields:r,loc:ft(e,n)}}(e,t);case me.INT:return e.advance(),{kind:Ee.Kind.INT,value:n.value,loc:ft(e,n)};case me.FLOAT:return e.advance(),{kind:Ee.Kind.FLOAT,value:n.value,loc:ft(e,n)};case me.STRING:case me.BLOCK_STRING:return ze(e);case me.NAME:return"true"===n.value||"false"===n.value?(e.advance(),{kind:Ee.Kind.BOOLEAN,value:"true"===n.value,loc:ft(e,n)}):"null"===n.value?(e.advance(),{kind:Ee.Kind.NULL,loc:ft(e,n)}):(e.advance(),{kind:Ee.Kind.ENUM,value:n.value,loc:ft(e,n)});case me.DOLLAR:if(!t)return Me(e)}throw yt(e)}function ze(e){var t=e.token;return e.advance(),{kind:Ee.Kind.STRING,value:t.value,block:t.kind===me.BLOCK_STRING,loc:ft(e,t)}}function Ke(e){return qe(e,!0)}function He(e){return qe(e,!1)}function Ge(e,t){var n=e.token;return{kind:Ee.Kind.OBJECT_FIELD,name:Ce(e),value:(mt(e,me.COLON),qe(e,t)),loc:ft(e,n)}}function We(e,t){for(var n=[];dt(e,me.AT);)n.push(Qe(e,t));return n}function Qe(e,t){var n=e.token;return mt(e,me.AT),{kind:Ee.Kind.DIRECTIVE,name:Ce(e),arguments:Pe(e,t),loc:ft(e,n)}}function Ye(e){var t,n=e.token;return ht(e,me.BRACKET_L)?(t=Ye(e),mt(e,me.BRACKET_R),t={kind:Ee.Kind.LIST_TYPE,type:t,loc:ft(e,n)}):t=Je(e),ht(e,me.BANG)?{kind:Ee.Kind.NON_NULL_TYPE,type:t,loc:ft(e,n)}:t}function Je(e){var t=e.token;return{kind:Ee.Kind.NAMED_TYPE,name:Ce(e),loc:ft(e,t)}}function $e(e){var t=Xe(e)?e.lookahead():e.token;if(t.kind===me.NAME)switch(t.value){case"schema":return function(e){var t=e.token;gt(e,"schema");var n=We(e,!0),r=wt(e,me.BRACE_L,et,me.BRACE_R);return{kind:Ee.Kind.SCHEMA_DEFINITION,directives:n,operationTypes:r,loc:ft(e,t)}}(e);case"scalar":return function(e){var t=e.token,n=Ze(e);gt(e,"scalar");var r=Ce(e),i=We(e,!0);return{kind:Ee.Kind.SCALAR_TYPE_DEFINITION,description:n,name:r,directives:i,loc:ft(e,t)}}(e);case"type":return function(e){var t=e.token,n=Ze(e);gt(e,"type");var r=Ce(e),i=tt(e),o=We(e,!0),a=nt(e);return{kind:Ee.Kind.OBJECT_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:o,fields:a,loc:ft(e,t)}}(e);case"interface":return function(e){var t=e.token,n=Ze(e);gt(e,"interface");var r=Ce(e),i=We(e,!0),o=nt(e);return{kind:Ee.Kind.INTERFACE_TYPE_DEFINITION,description:n,name:r,directives:i,fields:o,loc:ft(e,t)}}(e);case"union":return function(e){var t=e.token,n=Ze(e);gt(e,"union");var r=Ce(e),i=We(e,!0),o=at(e);return{kind:Ee.Kind.UNION_TYPE_DEFINITION,description:n,name:r,directives:i,types:o,loc:ft(e,t)}}(e);case"enum":return function(e){var t=e.token,n=Ze(e);gt(e,"enum");var r=Ce(e),i=We(e,!0),o=lt(e);return{kind:Ee.Kind.ENUM_TYPE_DEFINITION,description:n,name:r,directives:i,values:o,loc:ft(e,t)}}(e);case"input":return function(e){var t=e.token,n=Ze(e);gt(e,"input");var r=Ce(e),i=We(e,!0),o=st(e);return{kind:Ee.Kind.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:r,directives:i,fields:o,loc:ft(e,t)}}(e);case"directive":return function(e){var t=e.token,n=Ze(e);gt(e,"directive"),mt(e,me.AT);var r=Ce(e),i=it(e);gt(e,"on");var o=function(e){ht(e,me.PIPE);var t=[];do{t.push(ct(e))}while(ht(e,me.PIPE));return t}(e);return{kind:Ee.Kind.DIRECTIVE_DEFINITION,description:n,name:r,arguments:i,locations:o,loc:ft(e,t)}}(e)}throw yt(e,t)}function Xe(e){return dt(e,me.STRING)||dt(e,me.BLOCK_STRING)}function Ze(e){if(Xe(e))return ze(e)}function et(e){var t=e.token,n=Ie(e);mt(e,me.COLON);var r=Je(e);return{kind:Ee.Kind.OPERATION_TYPE_DEFINITION,operation:n,type:r,loc:ft(e,t)}}function tt(e){var t=[];if(vt(e,"implements")){ht(e,me.AMP);do{t.push(Je(e))}while(ht(e,me.AMP)||e.options.allowLegacySDLImplementsInterfaces&&dt(e,me.NAME))}return t}function nt(e){return e.options.allowLegacySDLEmptyFields&&dt(e,me.BRACE_L)&&e.lookahead().kind===me.BRACE_R?(e.advance(),e.advance(),[]):dt(e,me.BRACE_L)?wt(e,me.BRACE_L,rt,me.BRACE_R):[]}function rt(e){var t=e.token,n=Ze(e),r=Ce(e),i=it(e);mt(e,me.COLON);var o=Ye(e),a=We(e,!0);return{kind:Ee.Kind.FIELD_DEFINITION,description:n,name:r,arguments:i,type:o,directives:a,loc:ft(e,t)}}function it(e){return dt(e,me.PAREN_L)?wt(e,me.PAREN_L,ot,me.PAREN_R):[]}function ot(e){var t=e.token,n=Ze(e),r=Ce(e);mt(e,me.COLON);var i,o=Ye(e);ht(e,me.EQUALS)&&(i=Ke(e));var a=We(e,!0);return{kind:Ee.Kind.INPUT_VALUE_DEFINITION,description:n,name:r,type:o,defaultValue:i,directives:a,loc:ft(e,t)}}function at(e){var t=[];if(ht(e,me.EQUALS)){ht(e,me.PIPE);do{t.push(Je(e))}while(ht(e,me.PIPE))}return t}function lt(e){return dt(e,me.BRACE_L)?wt(e,me.BRACE_L,ut,me.BRACE_R):[]}function ut(e){var t=e.token,n=Ze(e),r=Ce(e),i=We(e,!0);return{kind:Ee.Kind.ENUM_VALUE_DEFINITION,description:n,name:r,directives:i,loc:ft(e,t)}}function st(e){return dt(e,me.BRACE_L)?wt(e,me.BRACE_L,ot,me.BRACE_R):[]}function ct(e){var t=e.token,n=Ce(e);if(d.a.hasOwnProperty(n.value))return n;throw yt(e,t)}function ft(e,t){if(!e.options.noLocation)return new pt(t,e.lastToken,e.source)}function pt(e,t,n){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=n}function dt(e,t){return e.token.kind===t}function ht(e,t){return e.token.kind===t&&(e.advance(),!0)}function mt(e,t){var n=e.token;if(n.kind===t)return e.advance(),n;throw ue(e.source,n.start,"Expected ".concat(t,", found ").concat(ve(n)))}function vt(e,t){var n=e.token;return n.kind===me.NAME&&n.value===t&&(e.advance(),!0)}function gt(e,t){if(!vt(e,t))throw ue(e.source,e.token.start,'Expected "'.concat(t,'", found ').concat(ve(e.token)))}function yt(e,t){var n=t||e.token;return ue(e.source,n.start,"Unexpected ".concat(ve(n)))}function bt(e,t,n,r){mt(e,t);for(var i=[];!ht(e,r);)i.push(n(e));return i}function wt(e,t,n,r){mt(e,t);for(var i=[n(e)];!ht(e,r);)i.push(n(e));return i}Object(s.a)(pt,function(){return{start:this.start,end:this.end}});var kt=n(13);function xt(e,t){var n;if(t.kind===Ee.Kind.LIST_TYPE)return(n=xt(e,t.type))&&Object(a.d)(n);if(t.kind===Ee.Kind.NON_NULL_TYPE)return(n=xt(e,t.type))&&Object(a.e)(n);if(t.kind===Ee.Kind.NAMED_TYPE)return e.getType(t.name.value);throw new Error("Unexpected type kind: ".concat(t.kind,"."))}var Tt=function(){function e(e,t,n){this._schema=e,this._typeStack=[],this._parentTypeStack=[],this._inputTypeStack=[],this._fieldDefStack=[],this._defaultValueStack=[],this._directive=null,this._argument=null,this._enumValue=null,this._getFieldDef=t||Et,n&&(Object(a.F)(n)&&this._inputTypeStack.push(n),Object(a.C)(n)&&this._parentTypeStack.push(n),Object(a.N)(n)&&this._typeStack.push(n))}var t=e.prototype;return t.getType=function(){if(this._typeStack.length>0)return this._typeStack[this._typeStack.length-1]},t.getParentType=function(){if(this._parentTypeStack.length>0)return this._parentTypeStack[this._parentTypeStack.length-1]},t.getInputType=function(){if(this._inputTypeStack.length>0)return this._inputTypeStack[this._inputTypeStack.length-1]},t.getParentInputType=function(){if(this._inputTypeStack.length>1)return this._inputTypeStack[this._inputTypeStack.length-2]},t.getFieldDef=function(){if(this._fieldDefStack.length>0)return this._fieldDefStack[this._fieldDefStack.length-1]},t.getDefaultValue=function(){if(this._defaultValueStack.length>0)return this._defaultValueStack[this._defaultValueStack.length-1]},t.getDirective=function(){return this._directive},t.getArgument=function(){return this._argument},t.getEnumValue=function(){return this._enumValue},t.enter=function(e){var t=this._schema;switch(e.kind){case Ee.Kind.SELECTION_SET:var n=Object(a.z)(this.getType());this._parentTypeStack.push(Object(a.C)(n)?n:void 0);break;case Ee.Kind.FIELD:var i,o,l=this.getParentType();l&&(i=this._getFieldDef(t,l,e))&&(o=i.type),this._fieldDefStack.push(i),this._typeStack.push(Object(a.N)(o)?o:void 0);break;case Ee.Kind.DIRECTIVE:this._directive=t.getDirective(e.name.value);break;case Ee.Kind.OPERATION_DEFINITION:var u;"query"===e.operation?u=t.getQueryType():"mutation"===e.operation?u=t.getMutationType():"subscription"===e.operation&&(u=t.getSubscriptionType()),this._typeStack.push(Object(a.M)(u)?u:void 0);break;case Ee.Kind.INLINE_FRAGMENT:case Ee.Kind.FRAGMENT_DEFINITION:var s=e.typeCondition,c=s?xt(t,s):Object(a.z)(this.getType());this._typeStack.push(Object(a.N)(c)?c:void 0);break;case Ee.Kind.VARIABLE_DEFINITION:var f=xt(t,e.type);this._inputTypeStack.push(Object(a.F)(f)?f:void 0);break;case Ee.Kind.ARGUMENT:var p,d,h=this.getDirective()||this.getFieldDef();h&&(p=r(h.args,function(t){return t.name===e.name.value}))&&(d=p.type),this._argument=p,this._defaultValueStack.push(p?p.defaultValue:void 0),this._inputTypeStack.push(Object(a.F)(d)?d:void 0);break;case Ee.Kind.LIST:var m=Object(a.A)(this.getInputType()),v=Object(a.I)(m)?m.ofType:m;this._defaultValueStack.push(void 0),this._inputTypeStack.push(Object(a.F)(v)?v:void 0);break;case Ee.Kind.OBJECT_FIELD:var g,y,b=Object(a.z)(this.getInputType());Object(a.E)(b)&&(y=b.getFields()[e.name.value])&&(g=y.type),this._defaultValueStack.push(y?y.defaultValue:void 0),this._inputTypeStack.push(Object(a.F)(g)?g:void 0);break;case Ee.Kind.ENUM:var w,k=Object(a.z)(this.getInputType());Object(a.D)(k)&&(w=k.getValue(e.value)),this._enumValue=w}},t.leave=function(e){switch(e.kind){case Ee.Kind.SELECTION_SET:this._parentTypeStack.pop();break;case Ee.Kind.FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case Ee.Kind.DIRECTIVE:this._directive=null;break;case Ee.Kind.OPERATION_DEFINITION:case Ee.Kind.INLINE_FRAGMENT:case Ee.Kind.FRAGMENT_DEFINITION:this._typeStack.pop();break;case Ee.Kind.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case Ee.Kind.ARGUMENT:this._argument=null,this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case Ee.Kind.LIST:case Ee.Kind.OBJECT_FIELD:this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case Ee.Kind.ENUM:this._enumValue=null}},e}();function Et(e,t,n){var r=n.name.value;return r===E.SchemaMetaFieldDef.name&&e.getQueryType()===t?E.SchemaMetaFieldDef:r===E.TypeMetaFieldDef.name&&e.getQueryType()===t?E.TypeMetaFieldDef:r===E.TypeNameMetaFieldDef.name&&Object(a.C)(t)?E.TypeNameMetaFieldDef:Object(a.M)(t)||Object(a.G)(t)?t.getFields()[r]:void 0}var _t=n(81);function St(e){var t=Object.create(null);return{OperationDefinition:function(n){var r=n.name;return r&&(t[r.value]?e.reportError(new D.a(function(e){return'There can be only one operation named "'.concat(e,'".')}(r.value),[t[r.value],r])):t[r.value]=r),!1},FragmentDefinition:function(){return!1}}}function Ot(e){var t=0;return{Document:function(e){t=e.definitions.filter(function(e){return e.kind===Ee.Kind.OPERATION_DEFINITION}).length},OperationDefinition:function(n){!n.name&&t>1&&e.reportError(new D.a("This anonymous operation must be the only defined operation.",[n]))}}}function Ct(e){return{OperationDefinition:function(t){var n;"subscription"===t.operation&&1!==t.selectionSet.selections.length&&e.reportError(new D.a(((n=t.name&&t.name.value)?'Subscription "'.concat(n,'" '):"Anonymous Subscription ")+"must select only one top level field.",t.selectionSet.selections.slice(1)))}}}function Nt(e,t){for(var n=Object.create(null),r=t.length,i=e.length/2,o=0;o1&&r>1&&o[n-1]===a[r-2]&&o[n-2]===a[r-1]&&(i[n][r]=Math.min(i[n][r],i[n-2][r-2]+s))}return i[l][u]}var Dt=5;function It(e){if(0===e.length&&Object(f.a)(0),1===e.length)return e[0];if(2===e.length)return e[0]+" or "+e[1];var t=e.slice(0,Dt),n=t.pop();return t.join(", ")+", or "+n}function Lt(e){return It(e.map(function(e){return'"'.concat(e,'"')}))}var jt=n(15);function Mt(e){var t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null),i=!0,o=!1,a=void 0;try{for(var l,u=e.getDocument().definitions[Symbol.iterator]();!(i=(l=u.next()).done);i=!0){var s=l.value;Object(jt.d)(s)&&(r[s.name.value]=!0)}}catch(e){o=!0,a=e}finally{try{i||null==u.return||u.return()}finally{if(o)throw a}}var c=Object.keys(n).concat(Object.keys(r));return{NamedType:function(t,i,o,a,l){var u,s=t.name.value;if(!n[s]&&!r[s]){var f=l[2]||o,p=(u=f,Boolean(u&&!Array.isArray(u)&&(Object(jt.g)(u)||Object(jt.h)(u))));if(p&&function(e){return-1!==Ft.indexOf(e)}(s))return;var d=Nt(s,p?Ft.concat(c):c);e.reportError(new D.a(function(e,t){var n='Unknown type "'.concat(e,'".');return t.length&&(n+=" Did you mean ".concat(Lt(t),"?")),n}(s,d),t))}}}}var Ft=l.g.map(function(e){return e.name});var Rt=n(11);function Pt(e){return{InlineFragment:function(t){var n=t.typeCondition;if(n){var r=xt(e.getSchema(),n);r&&!Object(a.C)(r)&&e.reportError(new D.a(function(e){return'Fragment cannot condition on non composite type "'.concat(e,'".')}(Object(Rt.a)(n)),[n]))}},FragmentDefinition:function(t){var n=xt(e.getSchema(),t.typeCondition);n&&!Object(a.C)(n)&&e.reportError(new D.a(function(e,t){return'Fragment "'.concat(e,'" cannot condition on non composite ')+'type "'.concat(t,'".')}(t.name.value,Object(Rt.a)(t.typeCondition)),[t.typeCondition]))}}}function Vt(e){return{VariableDefinition:function(t){var n=xt(e.getSchema(),t.type);if(n&&!Object(a.F)(n)){var r=t.variable.name.value;e.reportError(new D.a(function(e,t){return'Variable "$'.concat(e,'" cannot be non-input type "').concat(t,'".')}(r,Object(Rt.a)(t.type)),[t.type]))}}}}function Ut(e){return{Field:function(t){var n=e.getType(),r=t.selectionSet;n&&(Object(a.H)(Object(a.z)(n))?r&&e.reportError(new D.a(function(e,t){return'Field "'.concat(e,'" must not have a selection since ')+'type "'.concat(t,'" has no subfields.')}(t.name.value,Object(p.a)(n)),[r])):r||e.reportError(new D.a(function(e,t){return'Field "'.concat(e,'" of type "').concat(t,'" must have a ')+'selection of subfields. Did you mean "'.concat(e,' { ... }"?')}(t.name.value,Object(p.a)(n)),[t])))}}}function Bt(e){return{Field:function(t){var n=e.getParentType();if(n&&!e.getFieldDef()){var r=e.getSchema(),i=t.name.value,o=function(e,t,n){if(Object(a.B)(t)){var r=[],i=Object.create(null),o=!0,l=!1,u=void 0;try{for(var s,c=e.getPossibleTypes(t)[Symbol.iterator]();!(o=(s=c.next()).done);o=!0){var f=s.value;if(f.getFields()[n]){r.push(f.name);var p=!0,d=!1,h=void 0;try{for(var m,v=f.getInterfaces()[Symbol.iterator]();!(p=(m=v.next()).done);p=!0){var g=m.value;g.getFields()[n]&&(i[g.name]=(i[g.name]||0)+1)}}catch(e){d=!0,h=e}finally{try{p||null==v.return||v.return()}finally{if(d)throw h}}}}}catch(e){l=!0,u=e}finally{try{o||null==c.return||c.return()}finally{if(l)throw u}}var y=Object.keys(i).sort(function(e,t){return i[t]-i[e]});return y.concat(r)}return[]}(r,n,i),l=0!==o.length?[]:function(e,t,n){if(Object(a.M)(t)||Object(a.G)(t)){var r=Object.keys(t.getFields());return Nt(n,r)}return[]}(0,n,i);e.reportError(new D.a(function(e,t,n,r){var i='Cannot query field "'.concat(e,'" on type "').concat(t,'".');if(0!==n.length){var o=Lt(n);i+=" Did you mean to use an inline fragment on ".concat(o,"?")}else 0!==r.length&&(i+=" Did you mean ".concat(Lt(r),"?"));return i}(i,n.name,o,l),[t]))}}}}function qt(e){var t=Object.create(null);return{OperationDefinition:function(){return!1},FragmentDefinition:function(n){var r=n.name.value;return t[r]?e.reportError(new D.a('There can be only one fragment named "'.concat(r,'".'),[t[r],n.name])):t[r]=n.name,!1}}}var zt=n(49),Kt=n(50);function Ht(e){return{InlineFragment:function(t){var n=e.getType(),r=e.getParentType();Object(a.C)(n)&&Object(a.C)(r)&&!R(e.getSchema(),n,r)&&e.reportError(new D.a(function(e,t){return"Fragment cannot be spread here as objects of "+'type "'.concat(e,'" can never be of type "').concat(t,'".')}(Object(p.a)(r),Object(p.a)(n)),[t]))},FragmentSpread:function(t){var n=t.name.value,r=function(e,t){var n=e.getFragment(t);if(n){var r=xt(e.getSchema(),n.typeCondition);if(Object(a.C)(r))return r}}(e,n),i=e.getParentType();r&&i&&!R(e.getSchema(),r,i)&&e.reportError(new D.a(function(e,t,n){return'Fragment "'.concat(e,'" cannot be spread here as objects of ')+'type "'.concat(t,'" can never be of type "').concat(n,'".')}(n,Object(p.a)(i),Object(p.a)(r)),[t]))}}}function Gt(e){var t=Object.create(null),n=[],r=Object.create(null);return{OperationDefinition:function(){return!1},FragmentDefinition:function(i){return function i(o){if(t[o.name.value])return;var a=o.name.value;t[a]=!0;var l=e.getFragmentSpreads(o.selectionSet);if(0===l.length)return;r[a]=n.length;for(var u=0;u1)for(var h=0;h0)return[[t,e.map(function(e){var t=e[0];return t})],e.reduce(function(e,t){var n=t[1];return e.concat(n)},[n]),e.reduce(function(e,t){var n=t[2];return e.concat(n)},[r])]}(function(e,t,n,r,i,o,a,l){var u=[],s=On(e,t,i,o),c=s[0],f=s[1],p=On(e,t,a,l),d=p[0],h=p[1];if(_n(e,u,t,n,r,c,d),0!==h.length)for(var m=Object.create(null),v=0;v0&&e.reportError(new D.a("Must provide only one schema definition.",t)),++r)}}},function(e){var t=e.getSchema(),n=Object.create(null),r=t?{query:t.getQueryType(),mutation:t.getMutationType(),subscription:t.getSubscriptionType()}:{};return{SchemaDefinition:i,SchemaExtension:i};function i(t){if(t.operationTypes){var i=!0,o=!1,a=void 0;try{for(var l,u=(t.operationTypes||[])[Symbol.iterator]();!(i=(l=u.next()).done);i=!0){var s=l.value,c=s.operation,f=n[c];r[c]?e.reportError(new D.a(jn(c),s)):f?e.reportError(new D.a(Ln(c),[f,s])):n[c]=s}}catch(e){o=!0,a=e}finally{try{i||null==u.return||u.return()}finally{if(o)throw a}}}return!1}},function(e){var t=Object.create(null),n=e.getSchema();return{ScalarTypeDefinition:r,ObjectTypeDefinition:r,InterfaceTypeDefinition:r,UnionTypeDefinition:r,EnumTypeDefinition:r,InputObjectTypeDefinition:r};function r(r){var i=r.name.value;if(!n||!n.getType(i))return t[i]?e.reportError(new D.a(function(e){return'There can be only one type named "'.concat(e,'".')}(i),[t[i],r.name])):t[i]=r.name,!1;e.reportError(new D.a(function(e){return'Type "'.concat(e,'" already exists in the schema. ')+"It cannot also be defined in this type definition."}(i),r.name))}},function(e){var t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);return{EnumTypeDefinition:i,EnumTypeExtension:i};function i(t){var i=t.name.value;r[i]||(r[i]=Object.create(null));var o=r[i];if(t.values){var l=!0,u=!1,s=void 0;try{for(var c,f=t.values[Symbol.iterator]();!(l=(c=f.next()).done);l=!0){var p=c.value,d=p.name.value,h=n[i];Object(a.D)(h)&&h.getValue(d)?e.reportError(new D.a(Fn(i,d),p.name)):o[d]?e.reportError(new D.a(Mn(i,d),[o[d],p.name])):o[d]=p.name}}catch(e){u=!0,s=e}finally{try{l||null==f.return||f.return()}finally{if(u)throw s}}}return!1}},function(e){var t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);return{InputObjectTypeDefinition:i,InputObjectTypeExtension:i,InterfaceTypeDefinition:i,InterfaceTypeExtension:i,ObjectTypeDefinition:i,ObjectTypeExtension:i};function i(t){var i=t.name.value;r[i]||(r[i]=Object.create(null));var o=r[i];if(t.fields){var a=!0,l=!1,u=void 0;try{for(var s,c=t.fields[Symbol.iterator]();!(a=(s=c.next()).done);a=!0){var f=s.value,p=f.name.value;Vn(n[i],p)?e.reportError(new D.a(Pn(i,p),f.name)):o[p]?e.reportError(new D.a(Rn(i,p),[o[p],f.name])):o[p]=f.name}}catch(e){l=!0,u=e}finally{try{a||null==c.return||c.return()}finally{if(l)throw u}}}return!1}},function(e){var t=Object.create(null),n=e.getSchema();return{DirectiveDefinition:function(r){var i=r.name.value;if(!n||!n.getDirective(i))return t[i]?e.reportError(new D.a(function(e){return'There can be only one directive named "'.concat(e,'".')}(i),[t[i],r.name])):t[i]=r.name,!1;e.reportError(new D.a(function(e){return'Directive "'.concat(e,'" already exists in the schema. ')+"It cannot be redefined."}(i),r.name))}}},Mt,Xt,en,function(e){var t=e.getSchema(),n=Object.create(null),r=!0,i=!1,o=void 0;try{for(var l,u=e.getDocument().definitions[Symbol.iterator]();!(r=(l=u.next()).done);r=!0){var s=l.value;Object(jt.d)(s)&&(n[s.name.value]=s)}}catch(e){i=!0,o=e}finally{try{r||null==u.return||u.return()}finally{if(i)throw o}}return{ScalarTypeExtension:c,ObjectTypeExtension:c,InterfaceTypeExtension:c,UnionTypeExtension:c,EnumTypeExtension:c,InputObjectTypeExtension:c};function c(r){var i,o=r.name.value,l=n[o],u=t&&t.getType(o);if(l){var s=qn[l.kind];s!==r.kind&&e.reportError(new D.a(Bn(o,zn(s)),[l,r]))}else if(u){var c=(i=u,Object(a.Q)(i)?Ee.Kind.SCALAR_TYPE_EXTENSION:Object(a.M)(i)?Ee.Kind.OBJECT_TYPE_EXTENSION:Object(a.G)(i)?Ee.Kind.INTERFACE_TYPE_EXTENSION:Object(a.S)(i)?Ee.Kind.UNION_TYPE_EXTENSION:Object(a.D)(i)?Ee.Kind.ENUM_TYPE_EXTENSION:Object(a.E)(i)?Ee.Kind.INPUT_OBJECT_TYPE_EXTENSION:void 0);c!==r.kind&&e.reportError(new D.a(Bn(o,zn(c)),r))}else{var f=Object.keys(n);t&&(f=f.concat(Object.keys(t.getTypeMap())));var p=Nt(o,f);e.reportError(new D.a(function(e,t){var n='Cannot extend type "'.concat(e,'" because it does not defined.');return t.length&&(n+=" Did you mean ".concat(Lt(t),"?")),n}(o,p),r.name))}}},on,an,In,vn];function Gn(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var Wn=function(){function e(e){this._ast=e,this._errors=[],this._fragments=void 0,this._fragmentSpreads=new Map,this._recursivelyReferencedFragments=new Map}var t=e.prototype;return t.reportError=function(e){this._errors.push(e)},t.getErrors=function(){return this._errors},t.getDocument=function(){return this._ast},t.getFragment=function(e){var t=this._fragments;return t||(this._fragments=t=this.getDocument().definitions.reduce(function(e,t){return t.kind===Ee.Kind.FRAGMENT_DEFINITION&&(e[t.name.value]=t),e},Object.create(null))),t[e]},t.getFragmentSpreads=function(e){var t=this._fragmentSpreads.get(e);if(!t){t=[];for(var n=[e];0!==n.length;)for(var r=n.pop(),i=0;i2&&void 0!==arguments[2]?arguments[2]:Kn,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new Tt(e);t||Object(f.a)(0,"Must provide document"),V(e);var i=new Yn(e,t,r),o=Object(kt.d)(n.map(function(e){return e(i)}));return Object(kt.c)(t,Object(kt.e)(r,o)),i.getErrors()}function $n(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Hn,r=new Qn(e,t),i=n.map(function(e){return e(r)});return Object(kt.c)(e,Object(kt.d)(i)),r.getErrors()}var Xn=n(19);function Zn(e,t,n){return e&&Array.isArray(e.path)?e:new D.a(e&&e.message,e&&e.nodes||t,e&&e.source,e&&e.positions,n,e)}var er=n(36);function tr(e){return Boolean(e&&"function"==typeof e.then)}function nr(e,t){switch(t.operation){case"query":var n=e.getQueryType();if(!n)throw new D.a("Schema does not define the required query root type.",[t]);return n;case"mutation":var r=e.getMutationType();if(!r)throw new D.a("Schema is not configured for mutations.",[t]);return r;case"subscription":var i=e.getSubscriptionType();if(!i)throw new D.a("Schema is not configured for subscriptions.",[t]);return i;default:throw new D.a("Can only have query, mutation and subscription operations.",[t])}}function rr(e){return(rr="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 ir(e,t,n,r){if(Object(a.K)(t))return null==e?ar([sr("Expected non-nullable type ".concat(Object(p.a)(t)," not to be null"),n,r)]):ir(e,t.ofType,n,r);if(null==e)return or(null);if(Object(a.Q)(t))try{var o=t.parseValue(e);return Object(ln.a)(o)?ar([sr("Expected type ".concat(t.name),n,r)]):or(o)}catch(e){return ar([sr("Expected type ".concat(t.name),n,r,e.message,e)])}if(Object(a.D)(t)){if("string"==typeof e){var l=t.getValue(e);if(l)return or(l.value)}var u=Nt(String(e),t.getValues().map(function(e){return e.name})),s=0!==u.length?"did you mean ".concat(It(u),"?"):void 0;return ar([sr("Expected type ".concat(t.name),n,r,s)])}if(Object(a.I)(t)){var c=t.ofType;if(Object(Xn.e)(e)){var f,d=[];return Object(Xn.b)(e,function(e,t){var i=ir(e,c,n,ur(r,t));i.errors?f=lr(f,i.errors):f||d.push(i.value)}),f?ar(f):or(d)}var h=ir(e,c,n);return h.errors?h:or([h.value])}if(Object(a.E)(t)){if("object"!==rr(e))return ar([sr("Expected type ".concat(t.name," to be an object"),n,r)]);var m,v={},g=t.getFields(),y=!0,b=!1,w=void 0;try{for(var k,x=Object(i.a)(g)[Symbol.iterator]();!(y=(k=x.next()).done);y=!0){var T=k.value,E=e[T.name];if(Object(ln.a)(E))Object(ln.a)(T.defaultValue)?Object(a.K)(T.type)&&(m=lr(m,sr("Field ".concat(cr(ur(r,T.name))," of required ")+"type ".concat(Object(p.a)(T.type)," was not provided"),n))):v[T.name]=T.defaultValue;else{var _=ir(E,T.type,n,ur(r,T.name));_.errors?m=lr(m,_.errors):m||(v[T.name]=_.value)}}}catch(e){b=!0,w=e}finally{try{y||null==x.return||x.return()}finally{if(b)throw w}}for(var S=Object.keys(e),O=0;O0)return{errors:u};try{l=_e(t)}catch(e){return{errors:[e]}}var s=Jn(e,l);return s.length>0?{errors:s}:gr(e,l,n,r,i,o,a)}var Gr=n(33);function Wr(e,t,n){var r,i,o,a,l,u,s=Object(Xn.c)(e);function c(e){return e.done?e:Qr(e.value,t).then(Yr,i)}if("function"==typeof s.return&&(r=s.return,i=function(e){var t=function(){return Promise.reject(e)};return r.call(s).then(t,t)}),n){var f=n;o=function(e){return Qr(e,f).then(Yr,i)}}return a={next:function(){return s.next().then(c,o)},return:function(){return r?r.call(s).then(c,o):Promise.resolve({value:void 0,done:!0})},throw:function(e){return"function"==typeof s.throw?s.throw(e).then(c,o):Promise.reject(e).catch(i)}},l=Xn.a,u=function(){return this},l in a?Object.defineProperty(a,l,{value:u,enumerable:!0,configurable:!0,writable:!0}):a[l]=u,a}function Qr(e,t){return new Promise(function(n){return n(t(e))})}function Yr(e){return{value:e,done:!1}}function Jr(e,t,n,r,i,o,a,l){return 1===arguments.length?Xr(e.schema,e.document,e.rootValue,e.contextValue,e.variableValues,e.operationName,e.fieldResolver,e.subscribeFieldResolver):Xr(e,t,n,r,i,o,a,l)}function $r(e){if(e instanceof D.a)return{errors:[e]};throw e}function Xr(e,t,n,r,i,o,a,l){var u=Zr(e,t,n,r,i,o,l),s=function(n){return gr(e,t,n,r,i,o,a)};return u.then(function(e){return Object(Xn.d)(e)?Wr(e,s,$r):e},$r)}function Zr(e,t,n,r,i,o,a){kr(e,t,i);try{var l=xr(e,t,n,r,i,o,a);if(Array.isArray(l))return Promise.resolve({errors:l});var u=nr(e,l.operation),s=Er(l,u,l.operation.selectionSet,Object.create(null),Object.create(null)),c=Object.keys(s)[0],f=s[c],d=f[0].name.value,h=qr(e,u,d);if(!h)throw new D.a('The subscription field "'.concat(d,'" is not defined.'),f);var m=h.subscribe||l.fieldResolver,v=wr(void 0,c),g=Cr(l,h,f,u,v),y=Nr(l,h,f,m,n,g);return Promise.resolve(y).then(function(e){if(e instanceof Error)throw Zn(e,f,br(v));if(Object(Xn.d)(e))return e;throw new Error("Subscription field must return Async Iterable. Received: "+Object(p.a)(e))})}catch(e){return Promise.reject(e)}}var ei=n(61);function ti(e){e||Object(f.a)(0,"Received null or undefined error.");var t=e.message||"An unknown error occurred.",n=e.locations,r=e.path,i=e.extensions;return i?{message:t,locations:n,path:r,extensions:i}:{message:t,locations:n,path:r}}function ni(e){var t=!(e&&!1===e.descriptions);return"\n query IntrospectionQuery {\n __schema {\n queryType { name }\n mutationType { name }\n subscriptionType { name }\n types {\n ...FullType\n }\n directives {\n name\n ".concat(t?"description":"","\n locations\n args {\n ...InputValue\n }\n }\n }\n }\n\n fragment FullType on __Type {\n kind\n name\n ").concat(t?"description":"","\n fields(includeDeprecated: true) {\n name\n ").concat(t?"description":"","\n args {\n ...InputValue\n }\n type {\n ...TypeRef\n }\n isDeprecated\n deprecationReason\n }\n inputFields {\n ...InputValue\n }\n interfaces {\n ...TypeRef\n }\n enumValues(includeDeprecated: true) {\n name\n ").concat(t?"description":"","\n isDeprecated\n deprecationReason\n }\n possibleTypes {\n ...TypeRef\n }\n }\n\n fragment InputValue on __InputValue {\n name\n ").concat(t?"description":"","\n type { ...TypeRef }\n defaultValue\n }\n\n fragment TypeRef on __Type {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n }\n }\n }\n }\n }\n }\n }\n }\n ")}var ri=ni();function ii(e,t){for(var n=null,r=0;r0?function(){return n.map(function(e){return t.buildType(e)})}:[],o=r&&r.length>0?function(){return ci(r,function(e){return t.buildField(e)})}:Object.create(null);return new a.f({name:e.name.value,description:pi(e,this._options),interfaces:i,fields:o,astNode:e})},t._makeInterfaceDef=function(e){var t=this,n=e.fields,r=n&&n.length>0?function(){return ci(n,function(e){return t.buildField(e)})}:Object.create(null);return new a.c({name:e.name.value,description:pi(e,this._options),fields:r,astNode:e})},t._makeEnumDef=function(e){var t=this,n=e.values||[];return new a.a({name:e.name.value,description:pi(e,this._options),values:ci(n,function(e){return t.buildEnumValue(e)}),astNode:e})},t._makeUnionDef=function(e){var t=this,n=e.types,r=n&&n.length>0?function(){return n.map(function(e){return t.buildType(e)})}:[];return new a.h({name:e.name.value,description:pi(e,this._options),types:r,astNode:e})},t._makeScalarDef=function(e){return new a.g({name:e.name.value,description:pi(e,this._options),astNode:e,serialize:function(e){return e}})},t._makeInputObjectDef=function(e){var t=this,n=e.fields;return new a.b({name:e.name.value,description:pi(e,this._options),fields:n?function(){return ci(n,function(e){return t.buildInputField(e)})}:Object.create(null),astNode:e})},e}();function ci(e,t){return Object(ai.a)(e,function(e){return e.name.value},t)}function fi(e){var t=hr(k,e);return t&&t.reason}function pi(e,t){if(e.description)return e.description.value;if(t&&t.commentDescriptions){var n=function(e){var t=e.loc;if(!t)return;var n=[],r=t.startToken.prev;for(;r&&r.kind===me.COMMENT&&r.next&&r.prev&&r.line+1===r.next.line&&r.line!==r.prev.line;){var i=String(r.value);n.push(i),r=r.prev}return n.reverse().join("\n")}(e);if(void 0!==n)return se("\n"+n)}}function di(e,t){return ui(_e(e,t),t)}var hi=n(37);function mi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vi(e,t,n){O(e),t&&t.kind===Ee.Kind.DOCUMENT||Object(f.a)(0,"Must provide valid Document AST"),n&&(n.assumeValid||n.assumeValidSDL)||function(e,t){var n=$n(e,t);if(0!==n.length)throw new Error(n.map(function(e){return e.message}).join("\n\n"))}(t,e);var r,o=Object.create(null),u=Object.create(null),s=[],c=[],p=!0,d=!1,h=void 0;try{for(var m,v=t.definitions[Symbol.iterator]();!(p=(m=v.next()).done);p=!0){var y=m.value;if(y.kind===Ee.Kind.SCHEMA_DEFINITION)r=y;else if(y.kind===Ee.Kind.SCHEMA_EXTENSION)c.push(y);else if(Object(jt.d)(y)){o[y.name.value]=y}else if(Object(jt.e)(y)){var b=y.name.value,w=u[b];u[b]=w?w.concat([y]):[y]}else y.kind===Ee.Kind.DIRECTIVE_DEFINITION&&s.push(y)}}catch(e){d=!0,h=e}finally{try{p||null==v.return||v.return()}finally{if(d)throw h}}if(0===Object.keys(u).length&&0===Object.keys(o).length&&0===s.length&&0===c.length&&!r)return e;var k=new si(o,n,function(t){var n=e.getType(t);return n||Object(f.a)(0,'Unknown type: "'.concat(t,'".')),J(n)}),x=Object.create(null),T={query:Y(e.getQueryType()),mutation:Y(e.getMutationType()),subscription:Y(e.getSubscriptionType())};if(r){var _=!0,S=!1,N=void 0;try{for(var A,D=r.operationTypes[Symbol.iterator]();!(_=(A=D.next()).done);_=!0){var I=A.value,L=I.operation,j=I.type;T[L]=k.buildType(j)}}catch(e){S=!0,N=e}finally{try{_||null==D.return||D.return()}finally{if(S)throw N}}}for(var M=0;M2&&void 0!==arguments[2]?arguments[2]:"";return 0===t.length?"":t.every(function(e){return!e.description})?"("+t.map(Di).join(", ")+")":"(\n"+t.map(function(t,r){return Li(e,t," "+n,!r)+" "+n+Di(t)}).join("\n")+"\n"+n+")"}function Di(e){var t=e.name+": "+String(e.type);return Object(ln.a)(e.defaultValue)||(t+=" = ".concat(Object(Rt.a)(Object(xi.a)(e.defaultValue,e.type)))),t}function Ii(e){if(!e.isDeprecated)return"";var t=e.deprecationReason;return Object(er.a)(t)||""===t||t===w?" @deprecated":" @deprecated(reason: "+Object(Rt.a)(Object(xi.a)(t,l.e))+")"}function Li(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(!t.description)return"";var i=function(e,t){for(var n=[],r=e.split("\n"),i=0;i2&&void 0!==arguments[2]?arguments[2]:i,a=void 0,u=Array.isArray(e),s=[e],f=-1,p=[],d=void 0,h=void 0,m=void 0,v=[],g=[],y=e;do{var b=++f===s.length,w=b&&0!==p.length;if(b){if(h=0===g.length?void 0:v[v.length-1],d=m,m=g.pop(),w){if(u)d=d.slice();else{for(var k={},x=Object.keys(d),T=0;T=0&&t%1==0}function l(e){return Object(e)===e&&(a(e)||function(e){return!!s(e)}(e))}function u(e){var t=s(e);if(t)return t.call(e)}function s(e){if(null!=e){var t=i&&e[i]||e["@@iterator"];if("function"==typeof t)return t}}function c(e){this._o=e,this._i=0}function f(e,t,n){if(null!=e){if("function"==typeof e.forEach)return e.forEach(t,n);var r=0,i=u(e);if(i){for(var o;!(o=i.next()).done;)if(t.call(n,o.value,r++,e),r>9999999)throw new TypeError("Near-infinite iteration.")}else if(a(e))for(;r=this._o.length?(this._o=void 0,{value:void 0,done:!0}):{value:this._o[this._i++],done:!1}};var p=r&&r.asyncIterator,d=p||"@@asyncIterator";function h(e){return!!v(e)}function m(e){var t=v(e);if(t)return t.call(e)}function v(e){if(null!=e){var t=p&&e[p]||e["@@asyncIterator"];if("function"==typeof t)return t}}function g(e){this._i=e}g.prototype[d]=function(){return this},g.prototype.next=function(){var e=this._i.next();return Promise.resolve(e.value).then(function(t){return{value:t,done:e.done}})}},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var r=n(51);function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.prototype.toString;e.prototype.toJSON=t,e.prototype.inspect=t,r.a&&(e.prototype[r.a]=t)}},function(e,t,n){"use strict";function r(e,t,n){return e.reduce(function(e,r){return e[t(r)]=n(r),e},Object.create(null))}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";function r(e){"function"==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e.prototype,Symbol.toStringTag,{get:function(){return this.constructor.name}})}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";t.a=function(e,t){return e instanceof t}},function(e,t,n){"use strict";var r=Object.entries||function(e){return Object.keys(e).map(function(t){return[t,e[t]]})};t.a=r},function(e,t,n){var r=n(87)("wks"),i=n(63),o=n(28).Symbol,a="function"==typeof o;(e.exports=function(e){return r[e]||(r[e]=a&&o[e]||(a?o:i)("Symbol."+e))}).store=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getDefinitionState=function(e){var t=void 0;return o(e,function(e){switch(e.kind){case"Query":case"ShortQuery":case"Mutation":case"Subscription":case"FragmentDefinition":t=e}}),t},t.getFieldDef=function(e,t,n){if(n===i.SchemaMetaFieldDef.name&&e.getQueryType()===t)return i.SchemaMetaFieldDef;if(n===i.TypeMetaFieldDef.name&&e.getQueryType()===t)return i.TypeMetaFieldDef;if(n===i.TypeNameMetaFieldDef.name&&(0,r.isCompositeType)(t))return i.TypeNameMetaFieldDef;if(t.getFields&&"function"==typeof t.getFields)return t.getFields()[n];return null},t.forEachState=o,t.objectValues=function(e){for(var t=Object.keys(e),n=t.length,r=new Array(n),i=0;i=0;i--)t(n[i])}function a(e,t){var n=e.filter(t);return 0===n.length?e:n}function l(e){return e.toLowerCase().replace(/\W/g,"")}function u(e,t){var n=function(e,t){var n=void 0,r=void 0,i=[],o=e.length,a=t.length;for(n=0;n<=o;n++)i[n]=[n];for(r=1;r<=a;r++)i[0][r]=r;for(n=1;n<=o;n++)for(r=1;r<=a;r++){var l=e[n-1]===t[r-1]?0:1;i[n][r]=Math.min(i[n-1][r]+1,i[n][r-1]+1,i[n-1][r-1]+l),n>1&&r>1&&e[n-1]===t[r-2]&&e[n-2]===t[r-1]&&(i[n][r]=Math.min(i[n][r],i[n-2][r-2]+l))}return i[o][a]}(t,e);return e.length>t.length&&(n-=e.length-t.length-1,n+=0===e.indexOf(t)?0:.5),n}},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.LANGUAGE=void 0,t.getDefinitionQueryResultForNamedType=function(t,n,r){var i,o,a;return regeneratorRuntime.async(function(l){for(;;)switch(l.prev=l.next){case 0:if(i=n.name.value,0!==(o=r.filter(function(e){var t=e.definition;return t.name&&t.name.value===i})).length){l.next=5;break}return e.stderr.write("Definition not found for GraphQL type "+i),l.abrupt("return",{queryRange:[],definitions:[]});case 5:return a=o.map(function(e){var t=e.filePath,n=e.content,r=e.definition;return f(t||"",n,r)}),l.abrupt("return",{definitions:a,queryRange:a.map(function(e){return u(t,n)})});case 7:case"end":return l.stop()}},null,this)},t.getDefinitionQueryResultForFragmentSpread=function(t,n,r){var i,o,a;return regeneratorRuntime.async(function(l){for(;;)switch(l.prev=l.next){case 0:if(i=n.name.value,0!==(o=r.filter(function(e){var t=e.definition;return t.name.value===i})).length){l.next=5;break}return e.stderr.write("Definition not found for GraphQL fragment "+i),l.abrupt("return",{queryRange:[],definitions:[]});case 5:return a=o.map(function(e){var t=e.filePath,n=e.content,r=e.definition;return c(t||"",n,r)}),l.abrupt("return",{definitions:a,queryRange:a.map(function(e){return u(t,n)})});case 7:case"end":return l.stop()}},null,this)},t.getDefinitionQueryResultForDefinitionNode=function(e,t,n){return{definitions:[c(e,t,n)],queryRange:n.name?[u(t,n.name)]:[]}};var r,i=n(59),o=n(112),a=(r=o)&&r.__esModule?r:{default:r};var l=t.LANGUAGE="GraphQL";function u(e,t){var n=t.loc;return(0,a.default)(n,"Expected ASTNode to have a location."),(0,i.locToRange)(e,n)}function s(e,t){var n=t.loc;return(0,a.default)(n,"Expected ASTNode to have a location."),(0,i.offsetToPosition)(e,n.start)}function c(e,t,n){var r=n.name;return(0,a.default)(r,"Expected ASTNode to have a Name."),{path:e,position:s(t,n),range:u(t,n),name:r.value||"",language:l,projectRoot:e}}function f(e,t,n){var r=n.name;return(0,a.default)(r,"Expected ASTNode to have a Name."),{path:e,position:s(t,n),range:u(t,n),name:r.value||"",language:l,projectRoot:e}}}).call(this,n(110))},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){var r=n(54),i=n(83);e.exports=n(39)?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t=t.character)return n=l,i=r({},a),o=e.current(),"BREAK"});return{start:a.start,end:a.end,string:o||a.string,state:i||a.state,style:n||a.style}}function u(e,t){for(var n=e.split("\n"),r=(0,o.onlineParser)(),i=r.startState(),a="",l=new o.CharacterStream(""),u=0;u1&&void 0!==arguments[1]?arguments[1]:null,n=arguments[2],r=arguments[3],i=null;try{i=(0,a.parse)(e)}catch(t){var o=d(t.locations[0],e);return[{severity:s.ERROR,message:t.message,source:"GraphQL: Syntax",range:o}]}return c(i,t,n,r)},t.validateQuery=c,t.getRange=d;var r,i=n(112),o=(r=i)&&r.__esModule?r:{default:r},a=n(12),l=n(45),u=n(59);var s=t.SEVERITY={ERROR:1,WARNING:2,INFORMATION:3,HINT:4};function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments[2],r=arguments[3];if(!t)return[];var i=f((0,u.validateWithCustomRules)(t,e,n,r),function(e){return p(e,s.ERROR,"Validation")}),o=a.findDeprecatedUsages?f((0,a.findDeprecatedUsages)(t,e),function(e){return p(e,s.WARNING,"Deprecation")}):[];return i.concat(o)}function f(e,t){return Array.prototype.concat.apply([],e.map(t))}function p(e,t,n){return e.nodes?e.nodes.map(function(r){var i="Variable"!==r.kind&&r.name?r.name:r.variable?r.variable:r;(0,o.default)(e.locations,"GraphQL validation error requires locations.");var a=e.locations[0],l=function(e){var t=e.loc;return(0,o.default)(t,"Expected ASTNode to have a location."),t}(i),s=a.column+(l.end-l.start);return{source:"GraphQL: "+n,message:e.message,severity:t,range:new u.Range(new u.Position(a.line-1,a.column-1),new u.Position(a.line-1,s))}}):[]}function d(e,t){var n=(0,l.onlineParser)(),r=n.startState(),i=t.split("\n");(0,o.default)(i.length>=e.line,"Query text must have more lines than where the error happened");for(var a=null,s=0;s>1,l=r(e.slice(0,a)).length;if(l==n)return a;l>n?o=a:i=a+1}}function u(e,u,s,c){var f;this.atOccurrence=!1,this.doc=e,s=s?e.clipPos(s):r(0,0),this.pos={from:s,to:s},"object"==typeof c?f=c.caseFold:(f=c,c=null),"string"==typeof u?(null==f&&(f=!1),this.matches=function(i,o){return(i?function(e,i,o,a){if(!i.length)return null;var u=a?t:n,s=u(i).split(/\r|\n\r?/);e:for(var c=o.line,f=o.ch,p=e.firstLine()-1+s.length;c>=p;c--,f=-1){var d=e.getLine(c);f>-1&&(d=d.slice(0,f));var h=u(d);if(1==s.length){var m=h.lastIndexOf(s[0]);if(-1==m)continue e;return{from:r(c,l(d,h,m,u)),to:r(c,l(d,h,m+s[0].length,u))}}var v=s[s.length-1];if(h.slice(0,v.length)==v){for(var g=1,o=c-s.length+1;g=u;o--,l=-1){var s=e.getLine(o);l>-1&&(s=s.slice(0,l));var c=a(s,t);if(c)return{from:r(o,c.index),to:r(o,c.index+c[0].length),match:c}}}:o)(e,u,n)}:this.matches=function(t,n){return(t?function(e,t,n){t=i(t,"gm");for(var o,l=1,u=n.line,s=e.firstLine();u>=s;){for(var c=0;cs);c++){var f=e.getLine(u++);a=null==a?f:a+"\n"+f}l*=2,t.lastIndex=n.ch;var p=t.exec(a);if(p){var d=a.slice(0,p.index).split("\n"),h=p[0].split("\n"),m=n.line+d.length-1,v=d[d.length-1].length;return{from:r(m,v),to:r(m+h.length-1,1==h.length?v+h[0].length:h[h.length-1].length),match:p}}}})(e,u,n)})}String.prototype.normalize?(t=function(e){return e.normalize("NFD").toLowerCase()},n=function(e){return e.normalize("NFD")}):(t=function(e){return e.toLowerCase()},n=function(e){return e}),u.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(t){for(var n=this.matches(t,this.doc.clipPos(t?this.pos.from:this.pos.to));n&&0==e.cmpPos(n.from,n.to);)t?n.from.ch?n.from=r(n.from.line,n.from.ch-1):n=n.from.line==this.doc.firstLine()?null:this.matches(t,this.doc.clipPos(r(n.from.line-1))):n.to.ch0);)r.push({anchor:i.from(),head:i.to()});r.length&&this.setSelections(r,0)})}(n(10))},function(e,t,n){!function(e){function t(t,n,r){var i,o=t.getWrapperElement();return(i=o.appendChild(document.createElement("div"))).className=r?"CodeMirror-dialog CodeMirror-dialog-bottom":"CodeMirror-dialog CodeMirror-dialog-top","string"==typeof n?i.innerHTML=n:i.appendChild(n),e.addClass(o,"dialog-opened"),i}function n(e,t){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=t}e.defineExtension("openDialog",function(r,i,o){o||(o={}),n(this,null);var a=t(this,r,o.bottom),l=!1,u=this;function s(t){if("string"==typeof t)f.value=t;else{if(l)return;l=!0,e.rmClass(a.parentNode,"dialog-opened"),a.parentNode.removeChild(a),u.focus(),o.onClose&&o.onClose(a)}}var c,f=a.getElementsByTagName("input")[0];return f?(f.focus(),o.value&&(f.value=o.value,!1!==o.selectValueOnOpen&&f.select()),o.onInput&&e.on(f,"input",function(e){o.onInput(e,f.value,s)}),o.onKeyUp&&e.on(f,"keyup",function(e){o.onKeyUp(e,f.value,s)}),e.on(f,"keydown",function(t){o&&o.onKeyDown&&o.onKeyDown(t,f.value,s)||((27==t.keyCode||!1!==o.closeOnEnter&&13==t.keyCode)&&(f.blur(),e.e_stop(t),s()),13==t.keyCode&&i(f.value,t))}),!1!==o.closeOnBlur&&e.on(f,"blur",s)):(c=a.getElementsByTagName("button")[0])&&(e.on(c,"click",function(){s(),u.focus()}),!1!==o.closeOnBlur&&e.on(c,"blur",s),c.focus()),s}),e.defineExtension("openConfirm",function(r,i,o){n(this,null);var a=t(this,r,o&&o.bottom),l=a.getElementsByTagName("button"),u=!1,s=this,c=1;function f(){u||(u=!0,e.rmClass(a.parentNode,"dialog-opened"),a.parentNode.removeChild(a),s.focus())}l[0].focus();for(var p=0;p=0&&(n=this.attrs[t][1]),n},r.prototype.attrJoin=function(e,t){var n=this.attrIndex(e);n<0?this.attrPush([e,t]):this.attrs[n][1]=this.attrs[n][1]+" "+t},e.exports=r},function(e,t,n){!function(e){var t=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),n=e.Pos,r={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function i(e){return e&&e.bracketRegex||/[(){}[\]]/}function o(e,t,o){var l=e.getLineHandle(t.line),u=t.ch-1,s=o&&o.afterCursor;null==s&&(s=/(^| )cm-fat-cursor($| )/.test(e.getWrapperElement().className));var c=i(o),f=!s&&u>=0&&c.test(l.text.charAt(u))&&r[l.text.charAt(u)]||c.test(l.text.charAt(u+1))&&r[l.text.charAt(++u)];if(!f)return null;var p=">"==f.charAt(1)?1:-1;if(o&&o.strict&&p>0!=(u==t.ch))return null;var d=e.getTokenTypeAt(n(t.line,u+1)),h=a(e,n(t.line,u+(p>0?1:0)),p,d||null,o);return null==h?null:{from:n(t.line,u),to:h&&h.pos,match:h&&h.ch==f.charAt(0),forward:p>0}}function a(e,t,o,a,l){for(var u=l&&l.maxScanLineLength||1e4,s=l&&l.maxScanLines||1e3,c=[],f=i(l),p=o>0?Math.min(t.line+s,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-s),d=t.line;d!=p;d+=o){var h=e.getLine(d);if(h){var m=o>0?0:h.length-1,v=o>0?h.length:-1;if(!(h.length>u))for(d==t.line&&(m=t.ch-(o<0?1:0));m!=v;m+=o){var g=h.charAt(m);if(f.test(g)&&(void 0===a||e.getTokenTypeAt(n(d,m+1))==a)){var y=r[g];if(y&&">"==y.charAt(1)==o>0)c.push(g);else{if(!c.length)return{pos:n(d,m),ch:g};c.pop()}}}}}return d-o!=(o>0?e.lastLine():e.firstLine())&&null}function l(e,r,i){for(var a=e.state.matchBrackets.maxHighlightLineLength||1e3,l=[],u=e.listSelections(),s=0;s=u&&(o=i(a.indicatorOpen))}e.setGutterMarker(n,a.gutter,o),++l})}function a(e){var t=e.getViewport(),n=e.state.foldGutter;n&&(e.operation(function(){o(e,t.from,t.to)}),n.from=t.from,n.to=t.to)}function l(e,n,i){var o=e.state.foldGutter;if(o){var a=o.options;if(i==a.gutter){var l=r(e,n);l?l.clear():e.foldCode(t(n,0),a.rangeFinder)}}}function u(e){var t=e.state.foldGutter;if(t){var n=t.options;t.from=t.to=0,clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout(function(){a(e)},n.foldOnChangeTimeSpan||600)}}function s(e){var t=e.state.foldGutter;if(t){var n=t.options;clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout(function(){var n=e.getViewport();t.from==t.to||n.from-t.to>20||t.from-n.to>20?a(e):e.operation(function(){n.fromt.to&&(o(e,t.to,n.to),t.to=n.to)})},n.updateViewportTimeSpan||400)}}function c(e,t){var n=e.state.foldGutter;if(n){var r=t.line;r>=n.from&&rt.lastLine())return null;var r=t.getTokenAt(e.Pos(n,1));if(/\S/.test(r.string)||(r=t.getTokenAt(e.Pos(n,r.end+1))),"keyword"!=r.type||"import"!=r.string)return null;for(var i=n,o=Math.min(t.lastLine(),n+10);i<=o;++i){var a=t.getLine(i),l=a.indexOf(";");if(-1!=l)return{startCh:r.end,end:e.Pos(i,l)}}}var i,o=n.line,a=r(o);if(!a||r(o-1)||(i=r(o-2))&&i.end.line==o-1)return null;for(var l=a.end;;){var u=r(l.line+1);if(null==u)break;l=u.end}return{from:t.clipPos(e.Pos(o,a.startCh+1)),to:l}}),e.registerHelper("fold","include",function(t,n){function r(n){if(nt.lastLine())return null;var r=t.getTokenAt(e.Pos(n,1));return/\S/.test(r.string)||(r=t.getTokenAt(e.Pos(n,r.end+1))),"meta"==r.type&&"#include"==r.string.slice(0,8)?r.start+8:void 0}var i=n.line,o=r(i);if(null==o||null!=r(i-1))return null;for(var a=i;;){var l=r(a+1);if(null==l)break;++a}return{from:e.Pos(i,o+1),to:t.clipPos(e.Pos(a))}})}(n(10))},function(e,t,n){!function(e){"use strict";function t(e,t){var n=Number(t);return/^[-+]/.test(t)?e.getCursor().line+n:n-1}e.commands.jumpToLine=function(e){var n=e.getCursor();!function(e,t,n,r,i){e.openDialog?e.openDialog(t,i,{value:r,selectValueOnOpen:!0}):i(prompt(n,r))}(e,function(e){return e.phrase("Jump to line:")+' '+e.phrase("(Use line:column or scroll% syntax)")+""}(e),e.phrase("Jump to line:"),n.line+1+":"+n.ch,function(r){var i;if(r)if(i=/^\s*([\+\-]?\d+)\s*\:\s*(\d+)\s*$/.exec(r))e.setCursor(t(e,i[1]),Number(i[2]));else if(i=/^\s*([\+\-]?\d+(\.\d+)?)\%\s*/.exec(r)){var o=Math.round(e.lineCount()*Number(i[1])/100);/^[-+]/.test(i[1])&&(o=n.line+o+1),e.setCursor(o-1,n.ch)}else(i=/^\s*\:?\s*([\+\-]?\d+)\s*/.exec(r))&&e.setCursor(t(e,i[1]),n.ch)})},e.keyMap.default["Alt-G"]="jumpToLine"}(n(10),n(44))},function(e,t,n){!function(e){"use strict";var t=e.commands,n=e.Pos;function r(t,r){t.extendSelectionsBy(function(i){return t.display.shift||t.doc.extend||i.empty()?function(t,r,i){if(i<0&&0==r.ch)return t.clipPos(n(r.line-1));var o=t.getLine(r.line);if(i>0&&r.ch>=o.length)return t.clipPos(n(r.line+1,0));for(var a,l="start",u=r.ch,s=i<0?0:o.length,c=0;u!=s;u+=i,c++){var f=o.charAt(i<0?u-1:u),p="_"!=f&&e.isWordChar(f)?"w":"o";if("w"==p&&f.toUpperCase()==f&&(p="W"),"start"==l)"o"!=p&&(l="in",a=p);else if("in"==l&&a!=p){if("w"==a&&"W"==p&&i<0&&u--,"W"==a&&"w"==p&&i>0){a="w";continue}break}}return n(r.line,u)}(t.doc,i.head,r):r<0?i.from():i.to()})}function i(t,r){if(t.isReadOnly())return e.Pass;t.operation(function(){for(var e=t.listSelections().length,i=[],o=-1,a=0;a=n&&e.execCommand("goLineUp")}e.scrollTo(null,t.top-e.defaultTextHeight())},t.scrollLineDown=function(e){var t=e.getScrollInfo();if(!e.somethingSelected()){var n=e.lineAtHeight(t.top,"local")+1;e.getCursor().line<=n&&e.execCommand("goLineDown")}e.scrollTo(null,t.top+e.defaultTextHeight())},t.splitSelectionByLine=function(e){for(var t=e.listSelections(),r=[],i=0;io.line&&l==a.line&&0==a.ch||r.push({anchor:l==o.line?o:n(l,0),head:l==a.line?a:n(l)});e.setSelections(r,0)},t.singleSelectionTop=function(e){var t=e.listSelections()[0];e.setSelection(t.anchor,t.head,{scroll:!1})},t.selectLine=function(e){for(var t=e.listSelections(),r=[],i=0;i=0;l--){var u=r[i[l]];if(!(s&&e.cmpPos(u.head,s)>0)){var c=o(t,u.head);s=c.from,t.replaceRange(n(c.word),c.from,c.to)}}})}function f(t){var n=t.getCursor("from"),r=t.getCursor("to");if(0==e.cmpPos(n,r)){var i=o(t,n);if(!i.word)return;n=i.from,r=i.to}return{from:n,to:r,query:t.getRange(n,r),word:i}}function p(e,t){var r=f(e);if(r){var i=r.query,o=e.getSearchCursor(i,t?r.to:r.from);(t?o.findNext():o.findPrevious())?e.setSelection(o.from(),o.to()):(o=e.getSearchCursor(i,t?n(e.firstLine(),0):e.clipPos(n(e.lastLine()))),(t?o.findNext():o.findPrevious())?e.setSelection(o.from(),o.to()):r.word&&e.setSelection(r.from,r.to))}}t.selectScope=function(e){u(e)||e.execCommand("selectAll")},t.selectBetweenBrackets=function(t){if(!u(t))return e.Pass},t.goToBracket=function(t){t.extendSelectionsBy(function(r){var i=t.scanForBracket(r.head,1);if(i&&0!=e.cmpPos(i.pos,r.head))return i.pos;var o=t.scanForBracket(r.head,-1);return o&&n(o.pos.line,o.pos.ch+1)||r.head})},t.swapLineUp=function(t){if(t.isReadOnly())return e.Pass;for(var r=t.listSelections(),i=[],o=t.firstLine()-1,a=[],l=0;lo?i.push(s,c):i.length&&(i[i.length-1]=c),o=c}t.operation(function(){for(var e=0;et.lastLine()?t.replaceRange("\n"+l,n(t.lastLine()),null,"+swapLine"):t.replaceRange(l+"\n",n(o,0),null,"+swapLine")}t.setSelections(a),t.scrollIntoView()})},t.swapLineDown=function(t){if(t.isReadOnly())return e.Pass;for(var r=t.listSelections(),i=[],o=t.lastLine()+1,a=r.length-1;a>=0;a--){var l=r[a],u=l.to().line+1,s=l.from().line;0!=l.to().ch||l.empty()||u--,u=0;e-=2){var r=i[e],o=i[e+1],a=t.getLine(r);r==t.lastLine()?t.replaceRange("",n(r-1),n(r),"+swapLine"):t.replaceRange("",n(r,0),n(r+1,0),"+swapLine"),t.replaceRange(a+"\n",n(o,0),null,"+swapLine")}t.scrollIntoView()})},t.toggleCommentIndented=function(e){e.toggleComment({indent:!0})},t.joinLines=function(e){for(var t=e.listSelections(),r=[],i=0;i=0;o--){var a=r[o].head,l=t.getRange({line:a.line,ch:0},a),u=e.countColumn(l,null,t.getOption("tabSize")),s=t.findPosH(a,-1,"char",!1);if(l&&!/\S/.test(l)&&u%i==0){var c=new n(a.line,e.findColumn(l,u-i,i));c.ch!=a.ch&&(s=c)}t.replaceRange("",s,a,"+delete")}})},t.delLineRight=function(e){e.operation(function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange("",t[r].anchor,n(t[r].to().line),"+delete");e.scrollIntoView()})},t.upcaseAtCursor=function(e){c(e,function(e){return e.toUpperCase()})},t.downcaseAtCursor=function(e){c(e,function(e){return e.toLowerCase()})},t.setSublimeMark=function(e){e.state.sublimeMark&&e.state.sublimeMark.clear(),e.state.sublimeMark=e.setBookmark(e.getCursor())},t.selectToSublimeMark=function(e){var t=e.state.sublimeMark&&e.state.sublimeMark.find();t&&e.setSelection(e.getCursor(),t)},t.deleteToSublimeMark=function(t){var n=t.state.sublimeMark&&t.state.sublimeMark.find();if(n){var r=t.getCursor(),i=n;if(e.cmpPos(r,i)>0){var o=i;i=r,r=o}t.state.sublimeKilled=t.getRange(r,i),t.replaceRange("",r,i)}},t.swapWithSublimeMark=function(e){var t=e.state.sublimeMark&&e.state.sublimeMark.find();t&&(e.state.sublimeMark.clear(),e.state.sublimeMark=e.setBookmark(e.getCursor()),e.setCursor(t))},t.sublimeYank=function(e){null!=e.state.sublimeKilled&&e.replaceSelection(e.state.sublimeKilled,null,"paste")},t.showInCenter=function(e){var t=e.cursorCoords(null,"local");e.scrollTo(null,(t.top+t.bottom)/2-e.getScrollInfo().clientHeight/2)},t.findUnder=function(e){p(e,!0)},t.findUnderPrevious=function(e){p(e,!1)},t.findAllUnder=function(e){var t=f(e);if(t){for(var n=e.getSearchCursor(t.query),r=[],i=-1;n.findNext();)r.push({anchor:n.from(),head:n.to()}),n.from().line<=t.from.line&&n.from().ch<=t.from.ch&&i++;e.setSelections(r,i)}};var d=e.keyMap;d.macSublime={"Cmd-Left":"goLineStartSmart","Shift-Tab":"indentLess","Shift-Ctrl-K":"deleteLine","Alt-Q":"wrapLines","Ctrl-Left":"goSubwordLeft","Ctrl-Right":"goSubwordRight","Ctrl-Alt-Up":"scrollLineUp","Ctrl-Alt-Down":"scrollLineDown","Cmd-L":"selectLine","Shift-Cmd-L":"splitSelectionByLine",Esc:"singleSelectionTop","Cmd-Enter":"insertLineAfter","Shift-Cmd-Enter":"insertLineBefore","Cmd-D":"selectNextOccurrence","Shift-Cmd-Space":"selectScope","Shift-Cmd-M":"selectBetweenBrackets","Cmd-M":"goToBracket","Cmd-Ctrl-Up":"swapLineUp","Cmd-Ctrl-Down":"swapLineDown","Cmd-/":"toggleCommentIndented","Cmd-J":"joinLines","Shift-Cmd-D":"duplicateLine",F5:"sortLines","Cmd-F5":"sortLinesInsensitive",F2:"nextBookmark","Shift-F2":"prevBookmark","Cmd-F2":"toggleBookmark","Shift-Cmd-F2":"clearBookmarks","Alt-F2":"selectBookmarks",Backspace:"smartBackspace","Cmd-K Cmd-K":"delLineRight","Cmd-K Cmd-U":"upcaseAtCursor","Cmd-K Cmd-L":"downcaseAtCursor","Cmd-K Cmd-Space":"setSublimeMark","Cmd-K Cmd-A":"selectToSublimeMark","Cmd-K Cmd-W":"deleteToSublimeMark","Cmd-K Cmd-X":"swapWithSublimeMark","Cmd-K Cmd-Y":"sublimeYank","Cmd-K Cmd-C":"showInCenter","Cmd-K Cmd-G":"clearBookmarks","Cmd-K Cmd-Backspace":"delLineLeft","Cmd-K Cmd-0":"unfoldAll","Cmd-K Cmd-J":"unfoldAll","Ctrl-Shift-Up":"addCursorToPrevLine","Ctrl-Shift-Down":"addCursorToNextLine","Cmd-F3":"findUnder","Shift-Cmd-F3":"findUnderPrevious","Alt-F3":"findAllUnder","Shift-Cmd-[":"fold","Shift-Cmd-]":"unfold","Cmd-I":"findIncremental","Shift-Cmd-I":"findIncrementalReverse","Cmd-H":"replace",F3:"findNext","Shift-F3":"findPrev",fallthrough:"macDefault"},e.normalizeKeyMap(d.macSublime),d.pcSublime={"Shift-Tab":"indentLess","Shift-Ctrl-K":"deleteLine","Alt-Q":"wrapLines","Ctrl-T":"transposeChars","Alt-Left":"goSubwordLeft","Alt-Right":"goSubwordRight","Ctrl-Up":"scrollLineUp","Ctrl-Down":"scrollLineDown","Ctrl-L":"selectLine","Shift-Ctrl-L":"splitSelectionByLine",Esc:"singleSelectionTop","Ctrl-Enter":"insertLineAfter","Shift-Ctrl-Enter":"insertLineBefore","Ctrl-D":"selectNextOccurrence","Shift-Ctrl-Space":"selectScope","Shift-Ctrl-M":"selectBetweenBrackets","Ctrl-M":"goToBracket","Shift-Ctrl-Up":"swapLineUp","Shift-Ctrl-Down":"swapLineDown","Ctrl-/":"toggleCommentIndented","Ctrl-J":"joinLines","Shift-Ctrl-D":"duplicateLine",F9:"sortLines","Ctrl-F9":"sortLinesInsensitive",F2:"nextBookmark","Shift-F2":"prevBookmark","Ctrl-F2":"toggleBookmark","Shift-Ctrl-F2":"clearBookmarks","Alt-F2":"selectBookmarks",Backspace:"smartBackspace","Ctrl-K Ctrl-K":"delLineRight","Ctrl-K Ctrl-U":"upcaseAtCursor","Ctrl-K Ctrl-L":"downcaseAtCursor","Ctrl-K Ctrl-Space":"setSublimeMark","Ctrl-K Ctrl-A":"selectToSublimeMark","Ctrl-K Ctrl-W":"deleteToSublimeMark","Ctrl-K Ctrl-X":"swapWithSublimeMark","Ctrl-K Ctrl-Y":"sublimeYank","Ctrl-K Ctrl-C":"showInCenter","Ctrl-K Ctrl-G":"clearBookmarks","Ctrl-K Ctrl-Backspace":"delLineLeft","Ctrl-K Ctrl-0":"unfoldAll","Ctrl-K Ctrl-J":"unfoldAll","Ctrl-Alt-Up":"addCursorToPrevLine","Ctrl-Alt-Down":"addCursorToNextLine","Ctrl-F3":"findUnder","Shift-Ctrl-F3":"findUnderPrevious","Alt-F3":"findAllUnder","Shift-Ctrl-[":"fold","Shift-Ctrl-]":"unfold","Ctrl-I":"findIncremental","Shift-Ctrl-I":"findIncrementalReverse","Ctrl-H":"replace",F3:"findNext","Shift-F3":"findPrev",fallthrough:"pcDefault"},e.normalizeKeyMap(d.pcSublime);var h=d.default==d.macDefault;d.sublime=h?d.macSublime:d.pcSublime}(n(10),n(43),n(74))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=u;var r=l(n(14)),i=l(n(18)),o=l(n(48)),a=l(n(118));function l(e){return e&&e.__esModule?e:{default:e}}function u(e){var t=e.arg,n=e.onClickType,i=e.showDefaultValue;return r.default.createElement("span",{className:"arg"},r.default.createElement("span",{className:"arg-name"},t.name),": ",r.default.createElement(o.default,{type:t.type,onClick:n}),!1!==i&&r.default.createElement(a.default,{field:t}))}u.propTypes={arg:i.default.object.isRequired,onClickType:i.default.func.isRequired,showDefaultValue:i.default.bool}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n0?i(r(e),9007199254740991):0}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){var r=n(53),i=n(28),o=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n(88)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},function(e,t){e.exports=!1},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,n){var r=n(25)("unscopables"),i=Array.prototype;null==i[r]&&n(29)(i,r,{}),e.exports=function(e){i[r][e]=!0}},function(e,t,n){"use strict";var r=n(90),i=n(140),o=n(68),a=n(64);e.exports=n(141)(Array,"Array",function(e,t){this._t=a(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,i(1)):i(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])},"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(e,t,n){var r=n(54).f,i=n(55),o=n(25)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},function(e,t,n){"use strict";var r=n(29),i=n(41),o=n(40),a=n(66),l=n(25);e.exports=function(e,t,n){var u=l(e),s=n(a,u,""[e]),c=s[0],f=s[1];o(function(){var t={};return t[u]=function(){return 7},7!=""[e](t)})&&(i(String.prototype,e,c),r(RegExp.prototype,u,2==t?function(e,t){return f.call(e,this,t)}:function(e){return f.call(e,this)}))}},function(e,t,n){"use strict"; /* object-assign (c) Sindre Sorhus @license MIT */var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,a,l=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),u=1;u`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",i="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",o=new RegExp("^(?:"+r+"|"+i+"|\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e|<[?].*?[?]>|]*>|)"),a=new RegExp("^(?:"+r+"|"+i+")");e.exports.HTML_TAG_RE=o,e.exports.HTML_OPEN_CLOSE_TAG_RE=a},function(e,t,n){"use strict";e.exports.tokenize=function(e,t){var n,r,i,o,a=e.pos,l=e.src.charCodeAt(a);if(t)return!1;if(126!==l)return!1;if(i=(r=e.scanDelims(e.pos,!0)).length,o=String.fromCharCode(l),i<2)return!1;for(i%2&&(e.push("text","",0).content=o,i--),n=0;n=0;t--)95!==(n=l[t]).marker&&42!==n.marker||-1!==n.end&&(r=l[n.end],a=t>0&&l[t-1].end===n.end+1&&l[t-1].token===n.token-1&&l[n.end+1].token===r.token+1&&l[t-1].marker===n.marker,o=String.fromCharCode(n.marker),(i=e.tokens[n.token]).type=a?"strong_open":"em_open",i.tag=a?"strong":"em",i.nesting=1,i.markup=a?o+o:o,i.content="",(i=e.tokens[r.token]).type=a?"strong_close":"em_close",i.tag=a?"strong":"em",i.nesting=-1,i.markup=a?o+o:o,i.content="",a&&(e.tokens[l[t-1].token].content="",e.tokens[l[n.end+1].token].content="",t--))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){var o=n(10),l=void 0,u=void 0;o.on(t,"select",function(e,t){if(!l){var n=t.parentNode;(l=document.createElement("div")).className="CodeMirror-hint-information",n.appendChild(l),(u=document.createElement("div")).className="CodeMirror-hint-deprecation",n.appendChild(u);var o=void 0;n.addEventListener("DOMNodeRemoved",o=function(e){e.target===n&&(n.removeEventListener("DOMNodeRemoved",o),l=null,u=null,o=null)})}var s=e.description?a.render(e.description):"Self descriptive.",c=e.type?''+function e(t){if(t instanceof i.GraphQLNonNull)return e(t.ofType)+"!";if(t instanceof i.GraphQLList)return"["+e(t.ofType)+"]";return''+t.name+""}(e.type)+"":"";if(l.innerHTML='
'+("

"===s.slice(0,3)?"

"+c+s.slice(3):c+s)+"

",e.isDeprecated){var f=e.deprecationReason?a.render(e.deprecationReason):"";u.innerHTML='Deprecated'+f,u.style.display="block"}else u.style.display="none";r&&r(l)})};var r,i=n(12),o=n(70);var a=new((r=o)&&r.__esModule?r:{default:r}).default},function(e,t,n){!function(e){"use strict";var t="CodeMirror-hint",n="CodeMirror-hint-active";function r(e,t){this.cm=e,this.options=t,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor("start"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length;var n=this;e.on("cursorActivity",this.activityFunc=function(){n.cursorActivity()})}e.showHint=function(e,t,n){if(!t)return e.showHint(n);n&&n.async&&(t.async=!0);var r={hint:t};if(n)for(var i in n)r[i]=n[i];return e.showHint(r)},e.defineExtension("showHint",function(t){t=function(e,t,n){var r=e.options.hintOptions,i={};for(var o in c)i[o]=c[o];if(r)for(var o in r)void 0!==r[o]&&(i[o]=r[o]);if(n)for(var o in n)void 0!==n[o]&&(i[o]=n[o]);return i.hint.resolve&&(i.hint=i.hint.resolve(e,t)),i}(this,this.getCursor("start"),t);var n=this.listSelections();if(!(n.length>1)){if(this.somethingSelected()){if(!t.hint.supportsSelection)return;for(var i=0;if.clientHeight+1,j=u.getScrollInfo();if(I>0){var M=D.bottom-D.top,F=b.top-(b.bottom-D.top);if(F-M>0)f.style.top=(k=b.top-M-E)+"px",x=!1;else if(M>A){f.style.height=A-5+"px",f.style.top=(k=b.bottom-D.top-E)+"px";var R=u.getCursor();i.from.ch!=R.ch&&(b=u.cursorCoords(R),f.style.left=(w=b.left-T)+"px",D=f.getBoundingClientRect())}}var P,V=D.right-N;if(V>0&&(D.right-D.left>N&&(f.style.width=N-5+"px",V-=D.right-D.left-N),f.style.left=(w=b.left-V-T)+"px"),L)for(var U=f.firstChild;U;U=U.nextSibling)U.style.paddingRight=u.display.nativeBarWidth+"px";return u.addKeyMap(this.keyMap=function(e,t){var n={Up:function(){t.moveFocus(-1)},Down:function(){t.moveFocus(1)},PageUp:function(){t.moveFocus(1-t.menuSize(),!0)},PageDown:function(){t.moveFocus(t.menuSize()-1,!0)},Home:function(){t.setFocus(0)},End:function(){t.setFocus(t.length-1)},Enter:t.pick,Tab:t.pick,Esc:t.close};/Mac/.test(navigator.platform)&&(n["Ctrl-P"]=function(){t.moveFocus(-1)},n["Ctrl-N"]=function(){t.moveFocus(1)});var r=e.options.customKeys,i=r?{}:n;function o(e,r){var o;o="string"!=typeof r?function(e){return r(e,t)}:n.hasOwnProperty(r)?n[r]:r,i[e]=o}if(r)for(var a in r)r.hasOwnProperty(a)&&o(a,r[a]);var l=e.options.extraKeys;if(l)for(var a in l)l.hasOwnProperty(a)&&o(a,l[a]);return i}(r,{moveFocus:function(e,t){o.changeActive(o.selectedHint+e,t)},setFocus:function(e){o.changeActive(e)},menuSize:function(){return o.screenAmount()},length:d.length,close:function(){r.close()},pick:function(){o.pick()},data:i})),r.options.closeOnUnfocus&&(u.on("blur",this.onBlur=function(){P=setTimeout(function(){r.close()},100)}),u.on("focus",this.onFocus=function(){clearTimeout(P)})),u.on("scroll",this.onScroll=function(){var e=u.getScrollInfo(),t=u.getWrapperElement().getBoundingClientRect(),n=k+j.top-e.top,i=n-(c.pageYOffset||(s.documentElement||s.body).scrollTop);if(x||(i+=f.offsetHeight),i<=t.top||i>=t.bottom)return r.close();f.style.top=n+"px",f.style.left=w+j.left-e.left+"px"}),e.on(f,"dblclick",function(e){var t=l(f,e.target||e.srcElement);t&&null!=t.hintId&&(o.changeActive(t.hintId),o.pick())}),e.on(f,"click",function(e){var t=l(f,e.target||e.srcElement);t&&null!=t.hintId&&(o.changeActive(t.hintId),r.options.completeOnSingleClick&&o.pick())}),e.on(f,"mousedown",function(){setTimeout(function(){u.focus()},20)}),e.signal(i,"select",d[this.selectedHint],f.childNodes[this.selectedHint]),!0}function s(e,t,n,r){if(e.async)e(t,r,n);else{var i=e(t,n);i&&i.then?i.then(r):r(i)}}r.prototype={close:function(){this.active()&&(this.cm.state.completionActive=null,this.tick=null,this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&e.signal(this.data,"close"),this.widget&&this.widget.close(),e.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(t,n){var r=t.list[n];r.hint?r.hint(this.cm,t,r):this.cm.replaceRange(a(r),r.from||t.from,r.to||t.to,"complete"),e.signal(t,"pick",r),this.close()},cursorActivity:function(){this.debounce&&(o(this.debounce),this.debounce=0);var e=this.cm.getCursor(),t=this.cm.getLine(e.line);if(e.line!=this.startPos.line||t.length-e.ch!=this.startLen-this.startPos.ch||e.ch=this.data.list.length?t=r?this.data.list.length-1:0:t<0&&(t=r?0:this.data.list.length-1),this.selectedHint!=t){var i=this.hints.childNodes[this.selectedHint];i&&(i.className=i.className.replace(" "+n,"")),(i=this.hints.childNodes[this.selectedHint=t]).className+=" "+n,i.offsetTopthis.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=i.offsetTop+i.offsetHeight-this.hints.clientHeight+3),e.signal(this.data,"select",this.data.list[this.selectedHint],i)}},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1}},e.registerHelper("hint","auto",{resolve:function(t,n){var r,i=t.getHelpers(n,"hint");if(i.length){var o=function(e,t,n){var r=function(e,t){if(!e.somethingSelected())return t;for(var n=[],r=0;r0?t(e):i(o+1)})}(0)};return o.async=!0,o.supportsSelection=!0,o}return(r=t.getHelper(t.getCursor(),"hintWords"))?function(t){return e.hint.fromList(t,{words:r})}:e.hint.anyword?function(t,n){return e.hint.anyword(t,n)}:function(){}}}),e.registerHelper("hint","fromList",function(t,n){var r,i=t.getCursor(),o=t.getTokenAt(i),a=e.Pos(i.line,o.start),l=i;o.start,]/,closeOnUnfocus:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null};e.defineOption("hintOptions",null)}(n(10))},function(e,t,n){!function(e){var t={pairs:"()[]{}''\"\"",closeBefore:")]}'\":;>",triples:"",explode:"[]{}"},n=e.Pos;function r(e,n){return"pairs"==n&&"string"==typeof e?e:"object"==typeof e&&null!=e[n]?e[n]:t[n]}e.defineOption("autoCloseBrackets",!1,function(t,n,a){a&&a!=e.Init&&(t.removeKeyMap(i),t.state.closeBrackets=null),n&&(o(r(n,"pairs")),t.state.closeBrackets=n,t.addKeyMap(i))});var i={Backspace:function(t){var i=l(t);if(!i||t.getOption("disableInput"))return e.Pass;for(var o=r(i,"pairs"),a=t.listSelections(),s=0;s=0;s--){var f=a[s].head;t.replaceRange("",n(f.line,f.ch-1),n(f.line,f.ch+1),"+delete")}},Enter:function(t){var n=l(t),i=n&&r(n,"explode");if(!i||t.getOption("disableInput"))return e.Pass;for(var o=t.listSelections(),a=0;a1&&p.indexOf(i)>=0&&t.getRange(n(b.line,b.ch-2),b)==i+i){if(b.ch>2&&/\bstring/.test(t.getTokenTypeAt(n(b.line,b.ch-2))))return e.Pass;g="addFour"}else if(d){var k=0==b.ch?" ":t.getRange(n(b.line,b.ch-1),b);if(e.isWordChar(w)||k==i||e.isWordChar(k))return e.Pass;g="both"}else{if(!m||!(0===w.length||/\s/.test(w)||f.indexOf(w)>-1))return e.Pass;g="both"}else g=d&&s(t,b)?"both":p.indexOf(i)>=0&&t.getRange(b,n(b.line,b.ch+3))==i+i+i?"skipThree":"skip";if(c){if(c!=g)return e.Pass}else c=g}var x=u%2?a.charAt(u-1):i,T=u%2?i:a.charAt(u+1);t.operation(function(){if("skip"==c)t.execCommand("goCharRight");else if("skipThree"==c)for(var r=0;r<3;r++)t.execCommand("goCharRight");else if("surround"==c){for(var i=t.getSelections(),r=0;r0,{anchor:new n(o.anchor.line,o.anchor.ch+(a?-1:1)),head:new n(o.head.line,o.head.ch+(a?1:-1))});t.setSelections(i)}else"both"==c?(t.replaceSelection(x+T,null),t.triggerElectric(x+T),t.execCommand("goCharLeft")):"addFour"==c&&(t.replaceSelection(x+x+x+x,"before"),t.execCommand("goCharRight"));var o,a})}(i,t)}}function l(e){var t=e.state.closeBrackets;if(!t||t.override)return t;var n=e.getModeAt(e.getCursor());return n.closeBrackets||t}function u(e,t){var r=e.getRange(n(t.line,t.ch-1),n(t.line,t.ch+1));return 2==r.length?r:null}function s(e,t){var r=e.getTokenAt(n(t.line,t.ch+1));return/\bstring/.test(r.type)&&r.start==t.ch&&(0==t.ch||!/\bstring/.test(e.getTokenTypeAt(t)))}o(t.pairs+"`")}(n(10))},function(e,t,n){!function(e){"use strict";function t(){this.posFrom=this.posTo=this.lastQuery=this.query=null,this.overlay=null}function n(e){return e.state.search||(e.state.search=new t)}function r(e){return"string"==typeof e&&e==e.toLowerCase()}function i(e,t,n){return e.getSearchCursor(t,n,{caseFold:r(t),multiline:!0})}function o(e,t,n,r,i){e.openDialog?e.openDialog(t,i,{value:r,selectValueOnOpen:!0}):i(prompt(n,r))}function a(e){return e.replace(/\\(.)/g,function(e,t){return"n"==t?"\n":"r"==t?"\r":t})}function l(e){var t=e.match(/^\/(.*)\/([a-z]*)$/);if(t)try{e=new RegExp(t[1],-1==t[2].indexOf("i")?"":"i")}catch(e){}else e=a(e);return("string"==typeof e?""==e:e.test(""))&&(e=/x^/),e}function u(e,t,n){t.queryText=n,t.query=l(n),e.removeOverlay(t.overlay,r(t.query)),t.overlay=function(e,t){return"string"==typeof e?e=new RegExp(e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),t?"gi":"g"):e.global||(e=new RegExp(e.source,e.ignoreCase?"gi":"g")),{token:function(t){e.lastIndex=t.pos;var n=e.exec(t.string);if(n&&n.index==t.pos)return t.pos+=n[0].length||1,"searching";n?t.pos=n.index:t.skipToEnd()}}}(t.query,r(t.query)),e.addOverlay(t.overlay),e.showMatchesOnScrollbar&&(t.annotate&&(t.annotate.clear(),t.annotate=null),t.annotate=e.showMatchesOnScrollbar(t.query,r(t.query)))}function s(t,r,i,a){var l=n(t);if(l.query)return c(t,r);var s=t.getSelection()||l.lastQuery;if(s instanceof RegExp&&"x^"==s.source&&(s=null),i&&t.openDialog){var d=null,h=function(n,r){e.e_stop(r),n&&(n!=l.queryText&&(u(t,l,n),l.posFrom=l.posTo=t.getCursor()),d&&(d.style.opacity=1),c(t,r.shiftKey,function(e,n){var r;n.line<3&&document.querySelector&&(r=t.display.wrapper.querySelector(".CodeMirror-dialog"))&&r.getBoundingClientRect().bottom-4>t.cursorCoords(n,"window").top&&((d=r).style.opacity=.4)}))};!function(e,t,n,r,i){e.openDialog(t,r,{value:n,selectValueOnOpen:!0,closeOnEnter:!1,onClose:function(){f(e)},onKeyDown:i})}(t,p(t),s,h,function(r,i){var o=e.keyName(r),a=t.getOption("extraKeys"),l=a&&a[o]||e.keyMap[t.getOption("keyMap")][o];"findNext"==l||"findPrev"==l||"findPersistentNext"==l||"findPersistentPrev"==l?(e.e_stop(r),u(t,n(t),i),t.execCommand(l)):"find"!=l&&"findPersistent"!=l||(e.e_stop(r),h(i,r))}),a&&s&&(u(t,l,s),c(t,r))}else o(t,p(t),"Search for:",s,function(e){e&&!l.query&&t.operation(function(){u(t,l,e),l.posFrom=l.posTo=t.getCursor(),c(t,r)})})}function c(t,r,o){t.operation(function(){var a=n(t),l=i(t,a.query,r?a.posFrom:a.posTo);(l.find(r)||(l=i(t,a.query,r?e.Pos(t.lastLine()):e.Pos(t.firstLine(),0))).find(r))&&(t.setSelection(l.from(),l.to()),t.scrollIntoView({from:l.from(),to:l.to()},20),a.posFrom=l.from(),a.posTo=l.to(),o&&o(l.from(),l.to()))})}function f(e){e.operation(function(){var t=n(e);t.lastQuery=t.query,t.query&&(t.query=t.queryText=null,e.removeOverlay(t.overlay),t.annotate&&(t.annotate.clear(),t.annotate=null))})}function p(e){return''+e.phrase("Search:")+' '+e.phrase("(Use /re/ syntax for regexp search)")+""}function d(e,t,n){e.operation(function(){for(var r=i(e,t);r.findNext();)if("string"!=typeof t){var o=e.getRange(r.from(),r.to()).match(t);r.replace(n.replace(/\$(\d)/g,function(e,t){return o[t]}))}else r.replace(n)})}function h(e,t){if(!e.getOption("readOnly")){var r=e.getSelection()||n(e).lastQuery,u=''+(t?e.phrase("Replace all:"):e.phrase("Replace:"))+"";o(e,u+function(e){return' '+e.phrase("(Use /re/ syntax for regexp search)")+""}(e),u,r,function(n){n&&(n=l(n),o(e,function(e){return''+e.phrase("With:")+' '}(e),e.phrase("Replace with:"),"",function(r){if(r=a(r),t)d(e,n,r);else{f(e);var o=i(e,n,e.getCursor("from")),l=function(){var t,a=o.from();!(t=o.findNext())&&(o=i(e,n),!(t=o.findNext())||a&&o.from().line==a.line&&o.from().ch==a.ch)||(e.setSelection(o.from(),o.to()),e.scrollIntoView({from:o.from(),to:o.to()}),function(e,t,n,r){e.openConfirm?e.openConfirm(t,r):confirm(n)&&r[0]()}(e,function(e){return''+e.phrase("Replace?")+" "}(e),e.phrase("Replace?"),[function(){u(t)},l,function(){d(e,n,r)}]))},u=function(e){o.replace("string"==typeof n?r:r.replace(/\$(\d)/g,function(t,n){return e[n]})),l()};l()}}))})}}e.commands.find=function(e){f(e),s(e)},e.commands.findPersistent=function(e){f(e),s(e,!1,!0)},e.commands.findPersistentNext=function(e){s(e,!1,!0,!0)},e.commands.findPersistentPrev=function(e){s(e,!0,!0,!0)},e.commands.findNext=s,e.commands.findPrev=function(e){s(e,!0)},e.commands.clearSearch=f,e.commands.replace=h,e.commands.replaceAll=function(e){h(e,!0)}}(n(10),n(43),n(44))},function(e,t,n){!function(e){"use strict";var t="CodeMirror-lint-markers";function n(e){e.parentNode&&e.parentNode.removeChild(e)}function r(t,r,i){var o=function(t,n){var r=document.createElement("div");function i(t){if(!r.parentNode)return e.off(document,"mousemove",i);r.style.top=Math.max(0,t.clientY-r.offsetHeight-5)+"px",r.style.left=t.clientX+5+"px"}return r.className="CodeMirror-lint-tooltip",r.appendChild(n.cloneNode(!0)),document.body.appendChild(r),e.on(document,"mousemove",i),i(t),null!=r.style.opacity&&(r.style.opacity=1),r}(t,r);function a(){var t;e.off(i,"mouseout",a),o&&((t=o).parentNode&&(null==t.style.opacity&&n(t),t.style.opacity=0,setTimeout(function(){n(t)},600)),o=null)}var l=setInterval(function(){if(o)for(var e=i;;e=e.parentNode){if(e&&11==e.nodeType&&(e=e.host),e==document.body)return;if(!e){a();break}}if(!o)return clearInterval(l)},400);e.on(i,"mouseout",a)}function i(e,t,n){this.marked=[],this.options=t,this.timeout=null,this.hasGutter=n,this.onMouseOver=function(t){!function(e,t){var n=t.target||t.srcElement;if(/\bCodeMirror-lint-mark-/.test(n.className)){for(var i=n.getBoundingClientRect(),o=(i.left+i.right)/2,a=(i.top+i.bottom)/2,u=e.findMarksAt(e.coordsChar({left:o,top:a},"client")),s=[],c=0;c1,r.options.tooltips))}}var v,g;i.onUpdateLinting&&i.onUpdateLinting(n,u,e)}function c(e){var t=e.state.lint;t&&(clearTimeout(t.timeout),t.timeout=setTimeout(function(){u(e)},t.options.delay||500))}e.defineOption("lint",!1,function(n,r,a){if(a&&a!=e.Init&&(o(n),!1!==n.state.lint.options.lintOnChange&&n.off("change",c),e.off(n.getWrapperElement(),"mouseover",n.state.lint.onMouseOver),clearTimeout(n.state.lint.timeout),delete n.state.lint),r){for(var l=n.getOption("gutters"),s=!1,f=0;f1)for(var n=1;n=e.character:i.start.line<=e.line&&i.end.line>=e.line},this.start=t,this.end=n}return e.prototype.setStart=function(e,t){this.start=new o(e,t)},e.prototype.setEnd=function(e,t){this.end=new o(e,t)},e}(),o=t.Position=function(){function e(t,n){var i=this;r(this,e),this.lessThanOrEqualTo=function(e){return i.line * @license MIT */ function r(e,t){if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i=0;s--)if(c[s]!==f[s])return!1;for(s=c.length-1;s>=0;s--)if(u=c[s],!y(e[u],t[u],n,r))return!1;return!0}(e,t,n,a))}return n?e===t:e==t}function b(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function w(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function k(e,t,n,r){var i;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),i=function(e){var t;try{e()}catch(e){t=e}return t}(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!i&&v(i,n,"Missing expected exception"+r);var a="string"==typeof r,l=!e&&i&&!n;if((!e&&o.isError(i)&&a&&w(i,n)||l)&&v(i,n,"Got unwanted exception"+r),e&&i&&n&&!w(i,n)||!e&&i)throw i}f.AssertionError=function(e){var t;this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=h(m((t=this).actual),128)+" "+t.operator+" "+h(m(t.expected),128),this.generatedMessage=!0);var n=e.stackStartFunction||v;if(Error.captureStackTrace)Error.captureStackTrace(this,n);else{var r=new Error;if(r.stack){var i=r.stack,o=d(n),a=i.indexOf("\n"+o);if(a>=0){var l=i.indexOf("\n",a+1);i=i.substring(l+1)}this.stack=i}}},o.inherits(f.AssertionError,Error),f.fail=v,f.ok=g,f.equal=function(e,t,n){e!=t&&v(e,t,n,"==",f.equal)},f.notEqual=function(e,t,n){e==t&&v(e,t,n,"!=",f.notEqual)},f.deepEqual=function(e,t,n){y(e,t,!1)||v(e,t,n,"deepEqual",f.deepEqual)},f.deepStrictEqual=function(e,t,n){y(e,t,!0)||v(e,t,n,"deepStrictEqual",f.deepStrictEqual)},f.notDeepEqual=function(e,t,n){y(e,t,!1)&&v(e,t,n,"notDeepEqual",f.notDeepEqual)},f.notDeepStrictEqual=function e(t,n,r){y(t,n,!0)&&v(t,n,r,"notDeepStrictEqual",e)},f.strictEqual=function(e,t,n){e!==t&&v(e,t,n,"===",f.strictEqual)},f.notStrictEqual=function(e,t,n){e===t&&v(e,t,n,"!==",f.notStrictEqual)},f.throws=function(e,t,n){k(!0,e,t,n)},f.doesNotThrow=function(e,t,n){k(!1,e,t,n)},f.ifError=function(e){if(e)throw e};var x=Object.keys||function(e){var t=[];for(var n in e)a.call(e,n)&&t.push(n);return t}}).call(this,n(42))},function(e,t,n){var r={".":34,"./":34,"./GraphQLLanguageService":47,"./GraphQLLanguageService.js":47,"./GraphQLLanguageService.js.flow":234,"./autocompleteUtils":26,"./autocompleteUtils.js":26,"./autocompleteUtils.js.flow":235,"./getAutocompleteSuggestions":30,"./getAutocompleteSuggestions.js":30,"./getAutocompleteSuggestions.js.flow":236,"./getDefinition":27,"./getDefinition.js":27,"./getDefinition.js.flow":237,"./getDiagnostics":31,"./getDiagnostics.js":31,"./getDiagnostics.js.flow":238,"./getHoverInformation":35,"./getHoverInformation.js":35,"./getHoverInformation.js.flow":239,"./getOutline":46,"./getOutline.js":46,"./getOutline.js.flow":240,"./index":34,"./index.js":34,"./index.js.flow":241};function i(e){var t=o(e);return n(t)}function o(e){var t=r[e];if(!(t+1)){var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}return t}i.keys=function(){return Object.keys(r)},i.resolve=o,e.exports=i,i.id=113},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n={schema:e,type:null,parentType:null,inputType:null,directiveDef:null,fieldDef:null,argDef:null,argDefs:null,objectFieldDefs:null};return(0,l.default)(t,function(t){switch(t.kind){case"Query":case"ShortQuery":n.type=e.getQueryType();break;case"Mutation":n.type=e.getMutationType();break;case"Subscription":n.type=e.getSubscriptionType();break;case"InlineFragment":case"FragmentDefinition":t.type&&(n.type=e.getType(t.type));break;case"Field":case"AliasedField":n.fieldDef=n.type&&t.name?u(e,n.parentType,t.name):null,n.type=n.fieldDef&&n.fieldDef.type;break;case"SelectionSet":n.parentType=(0,i.getNamedType)(n.type);break;case"Directive":n.directiveDef=t.name&&e.getDirective(t.name);break;case"Arguments":var r="Field"===t.prevState.kind?n.fieldDef:"Directive"===t.prevState.kind?n.directiveDef:"AliasedField"===t.prevState.kind?t.prevState.name&&u(e,n.parentType,t.prevState.name):null;n.argDefs=r&&r.args;break;case"Argument":if(n.argDef=null,n.argDefs)for(var o=0;o=0;i--)t(n[i])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFieldReference=function(e){return{kind:"Field",schema:e.schema,field:e.fieldDef,type:i(e.fieldDef)?null:e.parentType}},t.getDirectiveReference=function(e){return{kind:"Directive",schema:e.schema,directive:e.directiveDef}},t.getArgumentReference=function(e){return e.directiveDef?{kind:"Argument",schema:e.schema,argument:e.argDef,directive:e.directiveDef}:{kind:"Argument",schema:e.schema,argument:e.argDef,field:e.fieldDef,type:i(e.fieldDef)?null:e.parentType}},t.getEnumValueReference=function(e){return{kind:"EnumValue",value:e.enumValue,type:(0,r.getNamedType)(e.inputType)}},t.getTypeReference=function(e,t){return{kind:"Type",schema:e.schema,type:t||e.type}};var r=n(12);function i(e){return"__"===e.name.slice(0,2)}},function(e,t,n){"use strict";var r,i=n(10),o=(r=i)&&r.__esModule?r:{default:r};o.default.defineOption("info",!1,function(e,t,n){if(n&&n!==o.default.Init){var r=e.state.info.onMouseOver;o.default.off(e.getWrapperElement(),"mouseover",r),clearTimeout(e.state.info.hoverTimeout),delete e.state.info}if(t){var i=e.state.info=function(e){return{options:e instanceof Function?{render:e}:!0===e?{}:e}}(t);i.onMouseOver=function(e,t){var n=e.state.info,r=t.target||t.srcElement;if("SPAN"!==r.nodeName||void 0!==n.hoverTimeout)return;var i=r.getBoundingClientRect(),a=function(e){var t=e.state.info.options;return t&&t.hoverTime||500}(e);n.hoverTimeout=setTimeout(s,a);var l=function(){clearTimeout(n.hoverTimeout),n.hoverTimeout=setTimeout(s,a)},u=function t(){o.default.off(document,"mousemove",l),o.default.off(e.getWrapperElement(),"mouseout",t),clearTimeout(n.hoverTimeout),n.hoverTimeout=void 0},s=function(){o.default.off(document,"mousemove",l),o.default.off(e.getWrapperElement(),"mouseout",u),n.hoverTimeout=void 0,function(e,t){var n=e.coordsChar({left:(t.left+t.right)/2,top:(t.top+t.bottom)/2}),r=e.state.info.options,i=r.render||e.getHelper(n,"info");if(i){var a=e.getTokenAt(n,!0);if(a){var l=i(a,r,e,n);l&&function(e,t,n){var r=document.createElement("div");r.className="CodeMirror-info",r.appendChild(n),document.body.appendChild(r);var i=r.getBoundingClientRect(),a=r.currentStyle||window.getComputedStyle(r),l=i.right-i.left+parseFloat(a.marginLeft)+parseFloat(a.marginRight),u=i.bottom-i.top+parseFloat(a.marginTop)+parseFloat(a.marginBottom),s=t.bottom;u>window.innerHeight-t.bottom-15&&t.top>window.innerHeight-t.bottom&&(s=t.top-u);s<0&&(s=t.bottom);var c=Math.max(0,window.innerWidth-l-15);c>t.left&&(c=t.left);r.style.opacity=1,r.style.top=s+"px",r.style.left=c+"px";var f=void 0,p=function(){clearTimeout(f)},d=function(){clearTimeout(f),f=setTimeout(h,200)},h=function(){o.default.off(r,"mouseover",p),o.default.off(r,"mouseout",d),o.default.off(e.getWrapperElement(),"mouseout",d),r.style.opacity?(r.style.opacity=0,setTimeout(function(){r.parentNode&&r.parentNode.removeChild(r)},600)):r.parentNode&&r.parentNode.removeChild(r)};o.default.on(r,"mouseover",p),o.default.on(r,"mouseout",d),o.default.on(e.getWrapperElement(),"mouseout",d)}(e,t,l)}}}(e,i)};o.default.on(document,"mousemove",l),o.default.on(e.getWrapperElement(),"mouseout",u)}.bind(null,e),o.default.on(e.getWrapperElement(),"mouseover",i.onMouseOver)}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var r=a(n(14)),i=a(n(18)),o=n(12);function a(e){return e&&e.__esModule?e:{default:e}}function l(e){var t=e.field,n=t.type,i=t.defaultValue;return void 0!==i?r.default.createElement("span",null," = ",r.default.createElement("span",{className:"arg-default-value"},(0,o.print)((0,o.astFromValue)(i,n)))):null}l.propTypes={field:i.default.object.isRequired}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=void 0;return function(){var r=this,i=arguments;clearTimeout(n),n=setTimeout(function(){n=null,t.apply(r,i)},e)}}},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n=function(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){var i=(a=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"),o=r.sources.map(function(e){return"/*# sourceURL="+r.sourceRoot+e+" */"});return[n].concat(o).concat([i]).join("\n")}var a;return[n].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n}).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},i=0;i=0&&c.splice(t,1)}function v(e){var t=document.createElement("style");return void 0===e.attrs.type&&(e.attrs.type="text/css"),g(t,e.attrs),h(e,t),t}function g(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}function y(e,t){var n,r,i,o;if(t.transform&&e.css){if(!(o=t.transform(e.css)))return function(){};e.css=o}if(t.singleton){var a=s++;n=u||(u=v(t)),r=k.bind(null,n,a,!1),i=k.bind(null,n,a,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",g(t,e.attrs),h(e,t),t}(t),r=function(e,t,n){var r=n.css,i=n.sourceMap,o=void 0===t.convertToAbsoluteUrls&&i;(t.convertToAbsoluteUrls||o)&&(r=f(r));i&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var a=new Blob([r],{type:"text/css"}),l=e.href;e.href=URL.createObjectURL(a),l&&URL.revokeObjectURL(l)}.bind(null,n,t),i=function(){m(n),n.href&&URL.revokeObjectURL(n.href)}):(n=v(t),r=function(e,t){var n=t.css,r=t.media;r&&e.setAttribute("media",r);if(e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,n),i=function(){m(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=a()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=d(e,t);return p(n,t),function(e){for(var r=[],i=0;i=0&&(s[decodeURIComponent(e.slice(0,t))]=decodeURIComponent(e.slice(t+1)))});var f={query:!0,variables:!0,operationName:!0,explorerIsOpen:!0},p={};for(var d in s)s.hasOwnProperty(d)&&!0!==f[d]&&(p[d]=s[d]);var h=c(p);function m(e){return fetch(h,{method:"post",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(e),credentials:"include"}).then(function(e){return e.json()})}function v(e){s.variables=e,y()}function g(e){s.operationName=e,y()}function y(){history.replaceState(null,null,c(s))}var b=s.query||window.localStorage&&window.localStorage.getItem("graphiql:query")||null;function w(e){return'# Welcome to GraphiQL\n#\n# GraphiQL is an in-browser tool for writing, validating, and\n# testing GraphQL queries.\n#\n# Type queries into this side of the screen, and you will see intelligent\n# typeaheads aware of the current GraphQL type schema and live syntax and\n# validation errors highlighted within the text.\n#\n# GraphQL queries typically start with a "{" character. Lines that starts\n# with a # are ignored.\n#\n# An example GraphQL query might look like:\n#\n'+e+"\n#\n# Keyboard shortcuts:\n#\n# Prettify Query: Shift-Ctrl-P (or press the prettify button above)\n#\n# Merge Query: Shift-Ctrl-M (or press the merge button above)\n#\n# Run Query: Ctrl-Enter (or press the play button above)\n#\n# Auto Complete: Ctrl-Space (or just start typing)\n#\n"}var k=void 0!==s.explorerIsOpen?"false"!==s.explorerIsOpen:!window.localStorage||"false"!==window.localStorage.getItem("graphiql:graphiqlExplorerOpen"),x=function(e){var t,n;function i(){for(var t,n=arguments.length,r=new Array(n),i=0;i=u.end});if(!s)return console.error("Unable to find definition corresponding to mouse position"),null;var c=".graphiql-explorer-root #"+("OperationDefinition"===s.kind?s.operation:"FragmentDefinition"===s.kind?"fragment":"unknown")+"-"+("OperationDefinition"===s.kind&&s.name?s.name.value:"FragmentDefinition"===s.kind&&s.name?s.name.value:"unknown"),f=document.querySelector(c);return!!f&&(f.scrollIntoView(),!0)},t._handleEditQuery=function(e){s.query=e,y(),t.setState({query:e})},t._handleToggleExplorer=function(){var e=!t.state.explorerIsOpen;window.localStorage&&window.localStorage.setItem("graphiql:graphiqlExplorerOpen",e),s.explorerIsOpen=e,y(),t.setState({explorerIsOpen:e})},t}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var u=i.prototype;return u.componentDidMount=function(){var e=this;m({query:(0,l.getIntrospectionQuery)()}).then(function(t){var n={schema:(0,l.buildClientSchema)(t.data)};if(null===e.state.query){try{var r=t.data.__schema.types.find(function(e){return"SiteSiteMetadata"===e.name&&"OBJECT"===e.kind});if(r)r.fields.find(function(e){return"title"===e.name&&e.type&&"SCALAR"===e.type.kind&&"String"===e.type.name})&&(n.query=w("# {\n# site {\n# siteMetadata {\n# title\n# }\n# }\n# }"))}catch(e){}n.query||(n.query=w("# {\n# allSitePage {\n# nodes {\n# path\n# }\n# }\n# }"))}e.setState(n)});var t=this._graphiql.getQueryEditor();t.setOption("extraKeys",Object.assign({},t.options.extraKeys||{},{"Shift-Alt-LeftClick":this._handleInspectOperation}))},u.render=function(){var e=this,t=this.state,n=t.query,i=t.schema;return r.default.createElement(r.default.Fragment,null,r.default.createElement(a.default,{schema:i,query:n,onEdit:this._handleEditQuery,explorerIsOpen:this.state.explorerIsOpen,onToggleExplorer:this._handleToggleExplorer,onRunOperation:function(t){return e._graphiql.handleRunQuery(t)}}),r.default.createElement(o.default,{ref:function(t){return e._graphiql=t},fetcher:m,schema:i,query:n,onEditQuery:this._handleEditQuery,onEditVariables:v,onEditOperationName:g},r.default.createElement(o.default.Toolbar,null,r.default.createElement(o.default.Button,{onClick:function(){return e._graphiql.handlePrettifyQuery()},label:"Prettify",title:"Prettify Query (Shift-Ctrl-P)"}),r.default.createElement(o.default.Button,{onClick:function(){return e._graphiql.handleToggleHistory()},label:"History",title:"Show History"}),r.default.createElement(o.default.Button,{onClick:this._handleToggleExplorer,label:"Explorer",title:"Toggle Explorer"}))))},i}(r.default.Component);i.default.render(r.default.createElement(x,null),document.getElementById("root"))},function(e,t,n){var r=n(52);r(r.S+r.F,"Object",{assign:n(127)})},function(e,t,n){e.exports=!n(39)&&!n(40)(function(){return 7!=Object.defineProperty(n(82)("div"),"a",{get:function(){return 7}}).a})},function(e,t,n){var r=n(38);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){"use strict";var r=n(56),i=n(131),o=n(132),a=n(58),l=n(65),u=Object.assign;e.exports=!u||n(40)(function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=u({},e)[n]||Object.keys(u({},t)).join("")!=r})?function(e,t){for(var n=a(e),u=arguments.length,s=1,c=i.f,f=o.f;u>s;)for(var p,d=l(arguments[s++]),h=c?r(d).concat(c(d)):r(d),m=h.length,v=0;m>v;)f.call(d,p=h[v++])&&(n[p]=d[p]);return n}:u},function(e,t,n){var r=n(55),i=n(64),o=n(129)(!1),a=n(67)("IE_PROTO");e.exports=function(e,t){var n,l=i(e),u=0,s=[];for(n in l)n!=a&&r(l,n)&&s.push(n);for(;t.length>u;)r(l,n=t[u++])&&(~o(s,n)||s.push(n));return s}},function(e,t,n){var r=n(64),i=n(85),o=n(130);e.exports=function(e){return function(t,n,a){var l,u=r(t),s=i(u.length),c=o(a,s);if(e&&n!=n){for(;s>c;)if((l=u[c++])!=l)return!0}else for(;s>c;c++)if((e||c in u)&&u[c]===n)return e||c||0;return!e&&-1}}},function(e,t,n){var r=n(86),i=Math.max,o=Math.min;e.exports=function(e,t){return(e=r(e))<0?i(e+t,0):o(e,t)}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){var r=n(54).f,i=Function.prototype,o=/^\s*function ([^ (]*)/;"name"in i||n(39)&&r(i,"name",{configurable:!0,get:function(){try{return(""+this).match(o)[1]}catch(e){return""}}})},function(e,t,n){"use strict";var r=n(52),i=n(135)(5),o=!0;"find"in[]&&Array(1).find(function(){o=!1}),r(r.P+r.F*o,"Array",{find:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),n(90)("find")},function(e,t,n){var r=n(84),i=n(65),o=n(58),a=n(85),l=n(136);e.exports=function(e,t){var n=1==e,u=2==e,s=3==e,c=4==e,f=6==e,p=5==e||f,d=t||l;return function(t,l,h){for(var m,v,g=o(t),y=i(g),b=r(l,h,3),w=a(y.length),k=0,x=n?d(t,w):u?d(t,0):void 0;w>k;k++)if((p||k in y)&&(v=b(m=y[k],k,g),e))if(n)x[k]=v;else if(v)switch(e){case 3:return!0;case 5:return m;case 6:return k;case 2:x.push(m)}else if(c)return!1;return f?-1:s||c?c:x}}},function(e,t,n){var r=n(137);e.exports=function(e,t){return new(r(e))(t)}},function(e,t,n){var r=n(38),i=n(138),o=n(25)("species");e.exports=function(e){var t;return i(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!i(t.prototype)||(t=void 0),r(t)&&null===(t=t[o])&&(t=void 0)),void 0===t?Array:t}},function(e,t,n){var r=n(57);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){for(var r=n(91),i=n(56),o=n(41),a=n(28),l=n(29),u=n(68),s=n(25),c=s("iterator"),f=s("toStringTag"),p=u.Array,d={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},h=i(d),m=0;mdocument.F=Object<\/script>"),e.close(),u=e.F;r--;)delete u.prototype[o[r]];return u()};e.exports=Object.create||function(e,t){var n;return null!==e?(l.prototype=r(e),n=new l,l.prototype=null,n[a]=e):n=u(),void 0===t?n:i(n,t)}},function(e,t,n){var r=n(54),i=n(62),o=n(56);e.exports=n(39)?Object.defineProperties:function(e,t){i(e);for(var n,a=o(t),l=a.length,u=0;l>u;)r.f(e,n=a[u++],t[n]);return e}},function(e,t,n){var r=n(28).document;e.exports=r&&r.documentElement},function(e,t,n){var r=n(55),i=n(58),o=n(67)("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=i(e),r(e,o)?e[o]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},function(e,t,n){"use strict";var r=n(148),i={};i[n(25)("toStringTag")]="z",i+""!="[object z]"&&n(41)(Object.prototype,"toString",function(){return"[object "+r(this)+"]"},!0)},function(e,t,n){var r=n(57),i=n(25)("toStringTag"),o="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?n:o?r(t):"Object"==(a=r(t))&&"function"==typeof t.callee?"Arguments":a}},function(e,t,n){var r=n(58),i=n(56);n(150)("keys",function(){return function(e){return i(r(e))}})},function(e,t,n){var r=n(52),i=n(53),o=n(40);e.exports=function(e,t){var n=(i.Object||{})[e]||Object[e],a={};a[e]=t(n),r(r.S+r.F*o(function(){n(1)}),"Object",a)}},function(e,t,n){n(93)("search",1,function(e,t,n){return[function(n){"use strict";var r=e(this),i=null==n?void 0:n[t];return void 0!==i?i.call(n,r):new RegExp(n)[t](String(r))},n]})},function(e,t,n){n(93)("split",2,function(e,t,r){"use strict";var i=n(153),o=r,a=[].push;if("c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length){var l=void 0===/()??/.exec("")[1];r=function(e,t){var n=String(this);if(void 0===e&&0===t)return[];if(!i(e))return o.call(n,e,t);var r,u,s,c,f,p=[],d=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),h=0,m=void 0===t?4294967295:t>>>0,v=new RegExp(e.source,d+"g");for(l||(r=new RegExp("^"+v.source+"$(?!\\s)",d));(u=v.exec(n))&&!((s=u.index+u[0].length)>h&&(p.push(n.slice(h,u.index)),!l&&u.length>1&&u[0].replace(r,function(){for(f=1;f1&&u.index=m));)v.lastIndex===u.index&&v.lastIndex++;return h===n.length?!c&&v.test("")||p.push(""):p.push(n.slice(h)),p.length>m?p.slice(0,m):p}}else"0".split(void 0,0).length&&(r=function(e,t){return void 0===e&&0===t?[]:o.call(this,e,t)});return[function(n,i){var o=e(this),a=null==n?void 0:n[t];return void 0!==a?a.call(n,o,i):r.call(String(o),n,i)},r]})},function(e,t,n){var r=n(38),i=n(57),o=n(25)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[o])?!!t:"RegExp"==i(e))}},function(e,t,n){"use strict"; /** @license React v16.8.6 * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var r=n(94),i="function"==typeof Symbol&&Symbol.for,o=i?Symbol.for("react.element"):60103,a=i?Symbol.for("react.portal"):60106,l=i?Symbol.for("react.fragment"):60107,u=i?Symbol.for("react.strict_mode"):60108,s=i?Symbol.for("react.profiler"):60114,c=i?Symbol.for("react.provider"):60109,f=i?Symbol.for("react.context"):60110,p=i?Symbol.for("react.concurrent_mode"):60111,d=i?Symbol.for("react.forward_ref"):60112,h=i?Symbol.for("react.suspense"):60113,m=i?Symbol.for("react.memo"):60115,v=i?Symbol.for("react.lazy"):60116,g="function"==typeof Symbol&&Symbol.iterator;function y(e){for(var t=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=0;rI.length&&I.push(e)}function M(e,t,n){return null==e?0:function e(t,n,r,i){var l=typeof t;"undefined"!==l&&"boolean"!==l||(t=null);var u=!1;if(null===t)u=!0;else switch(l){case"string":case"number":u=!0;break;case"object":switch(t.$$typeof){case o:case a:u=!0}}if(u)return r(i,t,""===n?"."+F(t,0):n),1;if(u=0,n=""===n?".":n+":",Array.isArray(t))for(var s=0;sthis.eventPool.length&&this.eventPool.push(e)}function fe(e){e.eventPool=[],e.getPooled=se,e.release=ce}i(ue.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=ae)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=ae)},persist:function(){this.isPersistent=ae},isPersistent:le,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=le,this._dispatchInstances=this._dispatchListeners=null}}),ue.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},ue.extend=function(e){function t(){}function n(){return r.apply(this,arguments)}var r=this;t.prototype=r.prototype;var o=new t;return i(o,n.prototype),n.prototype=o,n.prototype.constructor=n,n.Interface=i({},r.Interface,e),n.extend=r.extend,fe(n),n},fe(ue);var pe=ue.extend({data:null}),de=ue.extend({data:null}),he=[9,13,27,32],me=H&&"CompositionEvent"in window,ve=null;H&&"documentMode"in document&&(ve=document.documentMode);var ge=H&&"TextEvent"in window&&!ve,ye=H&&(!me||ve&&8=ve),be=String.fromCharCode(32),we={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},ke=!1;function xe(e,t){switch(e){case"keyup":return-1!==he.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function Te(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Ee=!1;var _e={eventTypes:we,extractEvents:function(e,t,n,r){var i=void 0,o=void 0;if(me)e:{switch(e){case"compositionstart":i=we.compositionStart;break e;case"compositionend":i=we.compositionEnd;break e;case"compositionupdate":i=we.compositionUpdate;break e}i=void 0}else Ee?xe(e,n)&&(i=we.compositionEnd):"keydown"===e&&229===n.keyCode&&(i=we.compositionStart);return i?(ye&&"ko"!==n.locale&&(Ee||i!==we.compositionStart?i===we.compositionEnd&&Ee&&(o=oe()):(re="value"in(ne=r)?ne.value:ne.textContent,Ee=!0)),i=pe.getPooled(i,t,n,r),o?i.data=o:null!==(o=Te(n))&&(i.data=o),K(i),o=i):o=null,(e=ge?function(e,t){switch(e){case"compositionend":return Te(t);case"keypress":return 32!==t.which?null:(ke=!0,be);case"textInput":return(e=t.data)===be&&ke?null:e;default:return null}}(e,n):function(e,t){if(Ee)return"compositionend"===e||!me&&xe(e,t)?(e=oe(),ie=re=ne=null,Ee=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1