-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path1.1.js
More file actions
23 lines (23 loc) · 453 KB
/
1.1.js
File metadata and controls
23 lines (23 loc) · 453 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
webpackJsonp([1],Array(343).concat([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e,t,n){if(!e)return null;var r={};for(var i in e)hasOwnProperty.call(e,i)&&t.call(n,e[i],i,e)&&(r[i]=e[i]);return r}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=function(e,t,n){for(var r=!0;r;){var i=e,o=t,a=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,o);if(void 0!==s){if("value"in s)return s.value;var l=s.get;if(void 0===l)return;return l.call(a)}var u=Object.getPrototypeOf(i);if(null===u)return;e=u,t=o,n=a,r=!0,s=u=void 0}},u=n(2),c=r(u),f=n(344),p=r(f),d=n(329),h=r(d),m="default",v=function(e){function t(){i(this,t),l(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return o(t,e),s(t,[{key:"componentWillMount",value:function(){var e=!1,t=this.context.router.getCurrentQuery(),r=t,i=r.cacheKey,o=r.noCache;o=void 0!==o&&"false"!==o,o?i=void 0:i||(i=m),this.schemaCacheKey="rp-"+i+"-schema",this.queryCacheKey="rp-"+i+"-query",this.cacheKey=i;var s,l,u=localStorage.getItem(this.schemaCacheKey),c=localStorage.getItem(this.queryCacheKey);o?(s=t.schema||"",l=t.query||"",e=!0,t={}):i===m?(null!=t.schema?(s=t.schema,e=t.schema!==u):s=null!=u?u:n(556),null!=t.query?(l=t.query,e=t.query!==c):l=null!=c?c:n(557),t=a({schema:t.schema,query:t.query},function(e){return void 0!==e})):i&&(null!=u?s=u:(s=t["schema_"+i],null!=s&&(e=!0)),null!=c?l=c:(l=t["query_"+i],null!=l&&(e=!0)),t={}),this.changeParams(t),this.state={initialSchema:s,initialQuery:l,sourceWasInjected:e},this.queryParams=t}},{key:"shouldComponentUpdate",value:function(){return!1}},{key:"changeParams",value:function(e){var t=this.context.router,n=t.getCurrentPathname(),r=t.getCurrentParams();e=h["default"].mapValues(e,encodeURIComponent),t.replaceWith(n,r,e)}},{key:"render",value:function(){var e=this;return c["default"].createElement(p["default"],{initialSchema:this.state.initialSchema,initialQuery:this.state.initialQuery,onEditSchema:function(t){localStorage.setItem(e.schemaCacheKey,t),e.cacheKey===m&&(e.queryParams.schema=t,e.queryParams.query||(e.queryParams.query=e.state.initialQuery),e.changeParams(e.queryParams))},onEditQuery:function(t){localStorage.setItem(e.queryCacheKey,t),e.cacheKey===m&&(e.queryParams.query=t,e.queryParams.schema||(e.queryParams.schema=e.state.initialSchema),e.changeParams(e.queryParams))}})}}]),t}(c["default"].Component);v.contextTypes={router:c["default"].PropTypes.func},e.exports=v},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e){return(0,m.graphql)(b["default"],e.query)}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=function(e,t,n){for(var r=!0;r;){var i=e,o=t,a=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,o);if(void 0!==s){if("value"in s)return s.value;var l=s.get;if(void 0===l)return;return l.call(a)}var u=Object.getPrototypeOf(i);if(null===u)return;e=u,t=o,n=a,r=!0,s=u=void 0}},u=n(2),c=r(u),f=n(155),p=r(f),d=(n(156),n(345)),h=r(d),m=n(346),v=n(507),g=r(v),y=n(545),b=r(y),w=n(546),x=r(w);if(n(552),n(529),n(553),"undefined"==typeof T)var T="";x["default"].rootURL=T+"/playground/lib/",x["default"].cacheKey="graphene",h["default"].registerHelper("lint","python",function(e,t,n){return(t.errors||[]).map(function(e){var t=n.getLineTokens(e.line-1);return t=t.filter(function(e,t){return!!e.type||e.string.trim().length>0}),t?{message:e.name+": "+e.message,severity:"error",type:"syntax",from:h["default"].Pos(e.line-1,t[0].start),to:h["default"].Pos(e.line-1,t[t.length-1].end)}:[]})});var k,L=function(e){function t(){i(this,t),l(Object.getPrototypeOf(t.prototype),"constructor",this).call(this),this.state={pypyjs:!1,stdout:"",response:""}}return o(t,e),s(t,[{key:"stdout",value:function(){console.log("stdout",arguments)}},{key:"componentDidMount",value:function(){var e=this;k?(this.pypy_interpreter=k,this.pypy_interpreter.stdout=this.stdout.bind(this)):(this.pypy_interpreter=new x["default"]({stdin:function(){},stdout:this.stdout.bind(this),stderr:function(){},rootURL:T+"/playground/lib/"}),k=this.pypy_interpreter),this.pypyjs=this.pypy_interpreter.ready().then(function(){return e.pypy_interpreter.exec("\nimport graphene\nimport js\nfrom collections import OrderedDict\nfrom graphql.core.execution.executor import Executor\nfrom graphql.core.execution.middlewares.sync import SynchronousExecutionMiddleware\nfrom graphql.core.error import GraphQLError, format_error\n\ndef get_wrapped(f):\n if hasattr(f, 'func_closure') and f.func_closure:\n return get_wrapped(f.func_closure[0].cell_contents)\n return f\n\nclass TrackResolver(SynchronousExecutionMiddleware):\n @staticmethod\n def run_resolve_fn(resolver, original_resolver):\n if resolver.func.__module__ == '__main__':\n line = get_wrapped(resolver.func).resolver.func_code.co_firstlineno\n js.globals.markLine(line-3)\n return SynchronousExecutionMiddleware.run_resolve_fn(resolver, original_resolver)\n\n__graphene_executor = Executor([TrackResolver()], map_type=OrderedDict)\n")}).then(function(){e.createSchema(e.props.initialSchema)}).then(function(){e.setState({pypyjs:!0,response:'"Execute the query for see the results"'})}),window.markLine=function(t){e.markLine(t)},this.editor=(0,h["default"])(p["default"].findDOMNode(this.refs.schemaCode),{value:this.props.initialSchema,mode:"python",theme:"graphene",lineNumbers:!0,tabSize:4,indentUnit:4,gutters:["CodeMirror-linenumbers","breakpoints"],lint:{errors:[]}}),this.editor.on("change",this.onEditorChange.bind(this))}},{key:"onEditorChange",value:function(){var e=this;if(this.changeTimeout&&clearTimeout(this.changeTimeout),this.props.onEditSchema){var t=this.editor.getValue();t!=this.props.initialSchema&&this.props.onEditSchema(t)}this.changeTimeout=setTimeout(function(){return e.updateSchema()},300)}},{key:"updateSchema",value:function(){this.createSchema(this.editor.getValue())}},{key:"createSchema",value:function(e){var t=this;this.previousCode!=e&&(console.log("createSchema"),this.validSchema=null,this.pypyjs.then(function(){return t.pypy_interpreter.exec("\nschema = None\n"+e+"\nassert schema, 'You have to define a schema'\n")}).then(function(){console.log("NO ERRORS"),t.removeErrors(),t.validSchema=!0},function(e){t.editor.options.lint.errors=[],console.log("ERRORS",e),t.logError(e),t.validSchema=!1}).then(this.updateGraphiQL.bind(this)),this.previousCode=e)}},{key:"updateGraphiQL",value:function(){this.validSchema&&(this.refs.graphiql.state.schema=null,this.refs.graphiql.componentDidMount(),this.refs.graphiql.forceUpdate(),this.refs.graphiql.refs.docExplorer.forceUpdate())}},{key:"logError",value:function(e){var t=e.trace.split("\n"),n=t.map(function(e){return e.match(/File "<string>", line (\d+)/)}).filter(function(e){return!!e});if(n.length){var r=parseInt(n[n.length-1][1]);e.line=r-2,"ImportError"==e.name&&"No module named django"==e.message&&(e.message="Django is not supported yet in Playground editor"),this.editor.options.lint.errors.push(e),h["default"].signal(this.editor,"change",this.editor)}}},{key:"removeErrors",value:function(){this.editor.options.lint.errors=[],h["default"].signal(this.editor,"change",this.editor)}},{key:"fetcher",value:function(e){return this.validSchema?this.execute(e.query):a(arguments)}},{key:"execute",value:function(e){var t=this;return this.pypyjs.then(function(){var n="\nimport json\nresult = __graphene_executor.execute(schema.schema, '''"+e+"''')\nresult_dict = {};\nif result.errors:\n result_dict['errors'] = [format_error(e) for e in result.errors]\nif result.data:\n result_dict['data'] = result.data\nresult_json = json.dumps(result_dict)\n";return t.pypy_interpreter.exec(n)}).then(function(){return t.pypy_interpreter.get("result_json")}).then(function(e){var t=JSON.parse(e);return t})}},{key:"markLine",value:function(e){var t=this;console.log(e);this.editor.addLineClass(e,"text","activeline");setTimeout(function(){t.editor.removeLineClass(e,"text","activeline")},1200)}},{key:"render",value:function(){return c["default"].createElement("div",{className:"playground"},this.state.pypyjs?null:c["default"].createElement("div",{className:"loading"}),c["default"].createElement("div",{className:"playground-schema"},c["default"].createElement("header",{className:"playground-schema-header"},"Schema"),c["default"].createElement("div",{className:"playground-schema-editor",ref:"schemaCode"})),c["default"].createElement("div",{className:"playground-graphiql"},c["default"].createElement(g["default"],{ref:"graphiql",fetcher:this.fetcher.bind(this),response:this.state.response,onEditQuery:this.props.onEditQuery,query:this.props.initialQuery})))}}]),t}(c["default"].Component);e.exports=L},function(e,t,n){!function(t){e.exports=t()}(function(){"use strict";function e(n,r){if(!(this instanceof e))return new e(n,r);this.options=r=r?Pi(r):{},Pi(Xo,r,!1),d(r);var i=r.value;"string"==typeof i&&(i=new Ta(i,r.mode,null,r.lineSeparator)),this.doc=i;var o=new e.inputStyles[r.inputStyle](this),a=this.display=new t(n,i,o);a.wrapper.CodeMirror=this,u(this),s(this),r.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),r.autofocus&&!_o&&a.input.focus(),g(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 Ni,keySeq:null,specialChars:null};var l=this;yo&&11>bo&&setTimeout(function(){l.display.input.reset(!0)},20),Vt(this),Ki(),bt(this),this.curOp.forceUpdate=!0,Yr(this,i),r.autofocus&&!_o||l.hasFocus()?setTimeout(Gi(vn,this),20):gn(this);for(var c in Zo)Zo.hasOwnProperty(c)&&Zo[c](this,r[c],ea);T(this),r.finishInit&&r.finishInit(this);for(var f=0;f<ia.length;++f)ia[f](this);xt(this),wo&&r.lineWrapping&&"optimizelegibility"==getComputedStyle(a.lineDiv).textRendering&&(a.lineDiv.style.textRendering="auto")}function t(e,t,n){var r=this;this.input=n,r.scrollbarFiller=Vi("div",null,"CodeMirror-scrollbar-filler"),r.scrollbarFiller.setAttribute("cm-not-content","true"),r.gutterFiller=Vi("div",null,"CodeMirror-gutter-filler"),r.gutterFiller.setAttribute("cm-not-content","true"),r.lineDiv=Vi("div",null,"CodeMirror-code"),r.selectionDiv=Vi("div",null,null,"position: relative; z-index: 1"),r.cursorDiv=Vi("div",null,"CodeMirror-cursors"),r.measure=Vi("div",null,"CodeMirror-measure"),r.lineMeasure=Vi("div",null,"CodeMirror-measure"),r.lineSpace=Vi("div",[r.measure,r.lineMeasure,r.selectionDiv,r.cursorDiv,r.lineDiv],null,"position: relative; outline: none"),r.mover=Vi("div",[Vi("div",[r.lineSpace],"CodeMirror-lines")],null,"position: relative"),r.sizer=Vi("div",[r.mover],"CodeMirror-sizer"),r.sizerWidth=null,r.heightForcer=Vi("div",null,null,"position: absolute; height: "+Ia+"px; width: 1px;"),r.gutters=Vi("div",null,"CodeMirror-gutters"),r.lineGutter=null,r.scroller=Vi("div",[r.sizer,r.heightForcer,r.gutters],"CodeMirror-scroll"),r.scroller.setAttribute("tabIndex","-1"),r.wrapper=Vi("div",[r.scrollbarFiller,r.gutterFiller,r.scroller],"CodeMirror"),yo&&8>bo&&(r.gutters.style.zIndex=-1,r.scroller.style.paddingRight=0),wo||mo&&_o||(r.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(r.wrapper):e(r.wrapper)),r.viewFrom=r.viewTo=t.first,r.reportedViewFrom=r.reportedViewTo=t.first,r.view=[],r.renderedView=null,r.externalMeasured=null,r.viewOffset=0,r.lastWrapHeight=r.lastWrapWidth=0,r.updateLineNumbers=null,r.nativeBarWidth=r.barHeight=r.barWidth=0,r.scrollbarsClipped=!1,r.lineNumWidth=r.lineNumInnerWidth=r.lineNumChars=null,r.alignWidgets=!1,r.cachedCharWidth=r.cachedTextHeight=r.cachedPaddingH=null,r.maxLine=null,r.maxLineLength=0,r.maxLineChanged=!1,r.wheelDX=r.wheelDY=r.wheelStartX=r.wheelStartY=null,r.shift=!1,r.selForContextMenu=null,r.activeTouch=null,n.init(r)}function n(t){t.doc.mode=e.getMode(t.options,t.doc.modeOption),r(t)}function r(e){e.doc.iter(function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)}),e.doc.frontier=e.doc.first,je(e,100),e.state.modeGen++,e.curOp&&Dt(e)}function i(e){e.options.lineWrapping?(Ja(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(Ya(e.display.wrapper,"CodeMirror-wrap"),p(e)),a(e),Dt(e),at(e),setTimeout(function(){y(e)},100)}function o(e){var t=gt(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/yt(e.display)-3);return function(i){if(xr(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a<i.widgets.length;a++)i.widgets[a].height&&(o+=i.widgets[a].height);return n?o+(Math.ceil(i.text.length/r)||1)*t:o+t}}function a(e){var t=e.doc,n=o(e);t.iter(function(e){var t=n(e);t!=e.height&&Zr(e,t)})}function s(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),at(e)}function l(e){u(e),Dt(e),setTimeout(function(){x(e)},20)}function u(e){var t=e.display.gutters,n=e.options.gutters;Bi(t);for(var r=0;r<n.length;++r){var i=n[r],o=t.appendChild(Vi("div",null,"CodeMirror-gutter "+i));"CodeMirror-linenumbers"==i&&(e.display.lineGutter=o,o.style.width=(e.display.lineNumWidth||1)+"px")}t.style.display=r?"":"none",c(e)}function c(e){var t=e.display.gutters.offsetWidth;e.display.sizer.style.marginLeft=t+"px"}function f(e){if(0==e.height)return 0;for(var t,n=e.text.length,r=e;t=hr(r);){var i=t.find(0,!0);r=i.from.line,n+=i.from.ch-i.to.ch}for(r=e;t=mr(r);){var i=t.find(0,!0);n-=r.text.length-i.from.ch,r=i.to.line,n+=r.text.length-i.to.ch}return n}function p(e){var t=e.display,n=e.doc;t.maxLine=Jr(n,n.first),t.maxLineLength=f(t.maxLine),t.maxLineChanged=!0,n.iter(function(e){var n=f(e);n>t.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)})}function d(e){var t=Mi(e.gutters,"CodeMirror-linenumbers");-1==t&&e.lineNumbers?e.gutters=e.gutters.concat(["CodeMirror-linenumbers"]):t>-1&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}function h(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+Ue(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+He(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}function m(e,t,n){this.cm=n;var r=this.vert=Vi("div",[Vi("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=Vi("div",[Vi("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");e(r),e(i),_a(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),_a(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,yo&&8>bo&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")}function v(){}function g(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&Ya(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new e.scrollbarModel[t.options.scrollbarStyle](function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),_a(e,"mousedown",function(){t.state.focused&&setTimeout(function(){t.display.input.focus()},0)}),e.setAttribute("cm-not-content","true")},function(e,n){"horizontal"==n?rn(t,e):nn(t,e)},t),t.display.scrollbars.addClass&&Ja(t.display.wrapper,t.display.scrollbars.addClass)}function y(e,t){t||(t=h(e));var n=e.display.barWidth,r=e.display.barHeight;b(e,t);for(var i=0;4>i&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&O(e),b(e,h(e)),n=e.display.barWidth,r=e.display.barHeight}function b(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",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=""}function w(e,t,n){var r=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-Be(e));var i=n&&null!=n.bottom?n.bottom:r+e.wrapper.clientHeight,o=ti(t,r),a=ti(t,i);if(n&&n.ensure){var s=n.ensure.from.line,l=n.ensure.to.line;o>s?(o=s,a=ti(t,ni(Jr(t,s))+e.wrapper.clientHeight)):Math.min(l,t.lastLine())>=a&&(o=ti(t,ni(Jr(t,l))-e.wrapper.clientHeight),a=l)}return{from:o,to:Math.max(a,o+1)}}function x(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=L(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",a=0;a<n.length;a++)if(!n[a].hidden){e.options.fixedGutter&&n[a].gutter&&(n[a].gutter.style.left=o);var s=n[a].alignable;if(s)for(var l=0;l<s.length;l++)s[l].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=r+i+"px")}}function T(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=k(e.options,t.first+t.size-1),r=e.display;if(n.length!=r.lineNumChars){var i=r.measure.appendChild(Vi("div",[Vi("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=i.firstChild.offsetWidth,a=i.offsetWidth-o;return r.lineGutter.style.width="",r.lineNumInnerWidth=Math.max(o,r.lineGutter.offsetWidth-a)+1,r.lineNumWidth=r.lineNumInnerWidth+a,r.lineNumChars=r.lineNumInnerWidth?n.length:-1,r.lineGutter.style.width=r.lineNumWidth+"px",c(e),!0}return!1}function k(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function L(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function S(e,t,n){var r=e.display;this.viewport=t,this.visible=w(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=qe(e),this.force=n,this.dims=I(e),this.events=[]}function C(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=He(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=He(e)+"px",t.scrollbarsClipped=!0)}function E(e,t){var n=e.display,r=e.doc;if(t.editorIsHidden)return Pt(e),!1;if(!t.force&&t.visible.from>=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==Rt(e))return!1;T(e)&&(Pt(e),t.dims=I(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.viewFrom<o&&o-n.viewFrom<20&&(o=Math.max(r.first,n.viewFrom)),n.viewTo>a&&n.viewTo-a<20&&(a=Math.min(i,n.viewTo)),Fo&&(o=br(e.doc,o),a=wr(e.doc,a));var s=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;Qt(e,o,a),n.viewOffset=ni(Jr(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var l=Rt(e);if(!s&&0==l&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=Wi();return l>4&&(n.lineDiv.style.display="none"),D(e,n.updateLineNumbers,t.dims),l>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,u&&Wi()!=u&&u.offsetHeight&&u.focus(),Bi(n.cursorDiv),Bi(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,je(e,400)),n.updateLineNumbers=null,!0}function _(e,t){for(var n=t.viewport,r=!0;(r&&e.options.lineWrapping&&t.oldDisplayWidth!=qe(e)||(n&&null!=n.top&&(n={top:Math.min(e.doc.height+Ue(e.display)-ze(e),n.top)}),t.visible=w(e.display,e.doc,n),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&E(e,t);r=!1){O(e);var i=h(e);Ie(e),A(e,i),y(e,i)}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 N(e,t){var n=new S(e,t);if(E(e,n)){O(e),_(e,n);var r=h(e);Ie(e),A(e,r),y(e,r),n.finish()}}function A(e,t){e.display.sizer.style.minHeight=t.docHeight+"px";var n=t.docHeight+e.display.barHeight;e.display.heightForcer.style.top=n+"px",e.display.gutters.style.height=Math.max(n+He(e),t.clientHeight)+"px"}function O(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r<t.view.length;r++){var i,o=t.view[r];if(!o.hidden){if(yo&&8>bo){var a=o.node.offsetTop+o.node.offsetHeight;i=a-n,n=a}else{var s=o.node.getBoundingClientRect();i=s.bottom-s.top}var l=o.line.height-i;if(2>i&&(i=gt(t)),(l>.001||-.001>l)&&(Zr(o.line,i),M(o.line),o.rest))for(var u=0;u<o.rest.length;u++)M(o.rest[u])}}}function M(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t)e.widgets[t].height=e.widgets[t].node.offsetHeight}function I(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a)n[e.options.gutters[a]]=o.offsetLeft+o.clientLeft+i,r[e.options.gutters[a]]=o.clientWidth;return{fixedPos:L(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function D(e,t,n){function r(t){var n=t.nextSibling;return wo&&No&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var i=e.display,o=e.options.lineNumbers,a=i.lineDiv,s=a.firstChild,l=i.view,u=i.viewFrom,c=0;c<l.length;c++){var f=l[c];if(f.hidden);else if(f.node&&f.node.parentNode==a){for(;s!=f.node;)s=r(s);var p=o&&null!=t&&u>=t&&f.lineNumber;f.changes&&(Mi(f.changes,"gutter")>-1&&(p=!1),F(e,f,u,n)),p&&(Bi(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(k(e.options,u)))),s=f.node.nextSibling}else{var d=U(e,f,u,n);a.insertBefore(d,s)}u+=f.size}for(;s;)s=r(s)}function F(e,t,n,r){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];"text"==o?Q(e,t):"gutter"==o?V(e,t,n,r):"class"==o?R(t):"widget"==o&&B(e,t,r)}t.changes=null}function P(e){return e.node==e.text&&(e.node=Vi("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),yo&&8>bo&&(e.node.style.zIndex=2)),e.node}function G(e){var t=e.bgClass?e.bgClass+" "+(e.line.bgClass||""):e.line.bgClass;if(t&&(t+=" CodeMirror-linebackground"),e.background)t?e.background.className=t:(e.background.parentNode.removeChild(e.background),e.background=null);else if(t){var n=P(e);e.background=n.insertBefore(Vi("div",null,t),n.firstChild)}}function j(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):Gr(e,t)}function Q(e,t){var n=t.text.className,r=j(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,R(t)):n&&(t.text.className=n)}function R(e){G(e),e.line.wrapClass?P(e).className=e.line.wrapClass:e.node!=e.text&&(e.node.className="");var t=e.textClass?e.textClass+" "+(e.line.textClass||""):e.line.textClass;e.text.className=t||""}function V(e,t,n,r){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=P(t);t.gutterBackground=Vi("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),i.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers;if(e.options.lineNumbers||o){var i=P(t),a=t.gutter=Vi("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(e.display.input.setUneditable(a),i.insertBefore(a,t.text),t.line.gutterClass&&(a.className+=" "+t.line.gutterClass),!e.options.lineNumbers||o&&o["CodeMirror-linenumbers"]||(t.lineNumber=a.appendChild(Vi("div",k(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),o)for(var s=0;s<e.options.gutters.length;++s){var l=e.options.gutters[s],u=o.hasOwnProperty(l)&&o[l];u&&a.appendChild(Vi("div",[u],"CodeMirror-gutter-elt","left: "+r.gutterLeft[l]+"px; width: "+r.gutterWidth[l]+"px"))}}}function B(e,t,n){t.alignable&&(t.alignable=null);for(var r,i=t.node.firstChild;i;i=r){var r=i.nextSibling;"CodeMirror-linewidget"==i.className&&t.node.removeChild(i)}W(e,t,n)}function U(e,t,n,r){var i=j(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),R(t),V(e,t,n,r),W(e,t,r),t.node}function W(e,t,n){if(H(e,t.line,t,n,!0),t.rest)for(var r=0;r<t.rest.length;r++)H(e,t.rest[r],t,n,!1)}function H(e,t,n,r,i){if(t.widgets)for(var o=P(n),a=0,s=t.widgets;a<s.length;++a){var l=s[a],u=Vi("div",[l.node],"CodeMirror-linewidget");l.handleMouseEvents||u.setAttribute("cm-ignore-events","true"),q(l,u,n,r),e.display.input.setUneditable(u),i&&l.above?o.insertBefore(u,n.gutter||n.text):o.appendChild(u),ki(l,"redraw")}}function q(e,t,n,r){if(e.noHScroll){(n.alignable||(n.alignable=[])).push(t);var i=r.wrapperWidth;t.style.left=r.fixedPos+"px",e.coverGutter||(i-=r.gutterTotalWidth,t.style.paddingLeft=r.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-r.gutterTotalWidth+"px"))}function z(e){return Po(e.line,e.ch)}function K(e,t){return Go(e,t)<0?t:e}function Y(e,t){return Go(e,t)<0?e:t}function J(e){e.state.focused||(e.display.input.focus(),vn(e))}function $(e){return e.options.readOnly||e.doc.cantEdit}function X(e,t,n,r,i){var o=e.doc;e.display.shift=!1,r||(r=o.sel);var a=e.state.pasteIncoming||"paste"==i,s=o.splitLines(t),l=null;if(a&&r.ranges.length>1)if(jo&&jo.join("\n")==t){if(r.ranges.length%jo.length==0){l=[];for(var u=0;u<jo.length;u++)l.push(o.splitLines(jo[u]))}}else s.length==r.ranges.length&&(l=Ii(s,function(e){return[e]}));for(var u=r.ranges.length-1;u>=0;u--){var c=r.ranges[u],f=c.from(),p=c.to();c.empty()&&(n&&n>0?f=Po(f.line,f.ch-n):e.state.overwrite&&!a&&(p=Po(p.line,Math.min(Jr(o,p.line).text.length,p.ch+Oi(s).length))));var d=e.curOp.updateInput,h={from:f,to:p,text:l?l[u%l.length]:s,origin:i||(a?"paste":e.state.cutIncoming?"cut":"+input")};Sn(e.doc,h),ki(e,"inputRead",e,h)}t&&!a&&ee(e,t),Gn(e),e.curOp.updateInput=d,e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function Z(e,t){var n=e.clipboardData&&e.clipboardData.getData("text/plain");return n?(e.preventDefault(),$(t)||t.options.disableInput||_t(t,function(){X(t,n,0,null,"paste")}),!0):void 0}function ee(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 s=0;s<o.electricChars.length;s++)if(t.indexOf(o.electricChars.charAt(s))>-1){a=Qn(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Jr(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Qn(e,i.head.line,"smart"));a&&ki(e,"electricInput",e,i.head.line)}}}function te(e){for(var t=[],n=[],r=0;r<e.doc.sel.ranges.length;r++){var i=e.doc.sel.ranges[r].head.line,o={anchor:Po(i,0),head:Po(i+1,0)};n.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:n}}function ne(e){e.setAttribute("autocorrect","off"),e.setAttribute("autocapitalize","off"),e.setAttribute("spellcheck","false")}function re(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new Ni,this.inaccurateSelection=!1,this.hasSelection=!1,this.composing=null}function ie(){var e=Vi("textarea",null,null,"position: absolute; padding: 0; width: 1px; height: 1em; outline: none"),t=Vi("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return wo?e.style.width="1000px":e.setAttribute("wrap","off"),Eo&&(e.style.border="1px solid black"),ne(e),t}function oe(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Ni,this.gracePeriod=!1}function ae(e,t){var n=Xe(e,t.line);if(!n||n.hidden)return null;var r=Jr(e.doc,t.line),i=Ye(n,r,t.line),o=ri(r),a="left";if(o){var s=lo(o,t.ch);a=s%2?"right":"left"}var l=tt(i.map,t.ch,a);return l.offset="right"==l.collapse?l.end:l.start,l}function se(e,t){return t&&(e.bad=!0),e}function le(e,t,n){var r;if(t==e.display.lineDiv){if(r=e.display.lineDiv.childNodes[n],!r)return se(e.clipPos(Po(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<e.display.view.length;i++){var o=e.display.view[i];if(o.node==r)return ue(o,t,n)}}function ue(e,t,n){function r(t,n,r){for(var i=-1;i<(c?c.length:0);i++)for(var o=0>i?u.map:c[i],a=0;a<o.length;a+=3){var s=o[a+2];if(s==t||s==n){var l=ei(0>i?e.line:e.rest[i]),f=o[a]+r;return(0>r||s!=t)&&(f=o[a+(r?1:0)]),Po(l,f)}}}var i=e.text.firstChild,o=!1;if(!t||!qa(i,t))return se(Po(ei(e.line),0),!0);if(t==i&&(o=!0,t=i.childNodes[n],n=0,!t)){var a=e.rest?Oi(e.rest):e.line;return se(Po(ei(a),a.text.length),o)}var s=3==t.nodeType?t:null,l=t;for(s||1!=t.childNodes.length||3!=t.firstChild.nodeType||(s=t.firstChild,n&&(n=s.nodeValue.length));l.parentNode!=i;)l=l.parentNode;var u=e.measure,c=u.maps,f=r(s,l,n);if(f)return se(f,o);for(var p=l.nextSibling,d=s?s.nodeValue.length-n:0;p;p=p.nextSibling){if(f=r(p,p.firstChild,0))return se(Po(f.line,f.ch-d),o);d+=p.textContent.length}for(var h=l.previousSibling,d=n;h;h=h.previousSibling){if(f=r(h,h.firstChild,-1))return se(Po(f.line,f.ch+d),o);d+=p.textContent.length}}function ce(e,t,n,r,i){function o(e){return function(t){return t.id==e}}function a(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(null!=n)return""==n&&(n=t.textContent.replace(/\u200b/g,"")),void(s+=n);var c,f=t.getAttribute("cm-marker");if(f){var p=e.findMarks(Po(r,0),Po(i+1,0),o(+f));return void(p.length&&(c=p[0].find())&&(s+=$r(e.doc,c.from,c.to).join(u)))}if("false"==t.getAttribute("contenteditable"))return;for(var d=0;d<t.childNodes.length;d++)a(t.childNodes[d]);/^(pre|div|p)$/i.test(t.nodeName)&&(l=!0)}else if(3==t.nodeType){var h=t.nodeValue;if(!h)return;l&&(s+=u,l=!1),s+=h}}for(var s="",l=!1,u=e.doc.lineSeparator();a(t),t!=n;)t=t.nextSibling;return s}function fe(e,t){this.ranges=e,this.primIndex=t}function pe(e,t){this.anchor=e,this.head=t}function de(e,t){var n=e[t];e.sort(function(e,t){return Go(e.from(),t.from())}),t=Mi(e,n);for(var r=1;r<e.length;r++){var i=e[r],o=e[r-1];if(Go(o.to(),i.from())>=0){var a=Y(o.from(),i.from()),s=K(o.to(),i.to()),l=o.empty()?i.from()==i.head:o.from()==o.head;
t>=r&&--t,e.splice(--r,2,new pe(l?s:a,l?a:s))}}return new fe(e,t)}function he(e,t){return new fe([new pe(e,t||e)],0)}function me(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function ve(e,t){if(t.line<e.first)return Po(e.first,0);var n=e.first+e.size-1;return t.line>n?Po(n,Jr(e,n).text.length):ge(t,Jr(e,t.line).text.length)}function ge(e,t){var n=e.ch;return null==n||n>t?Po(e.line,t):0>n?Po(e.line,0):e}function ye(e,t){return t>=e.first&&t<e.first+e.size}function be(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=ve(e,t[r]);return n}function we(e,t,n,r){if(e.cm&&e.cm.display.shift||e.extend){var i=t.anchor;if(r){var o=Go(n,i)<0;o!=Go(r,i)<0?(i=n,n=r):o!=Go(n,r)<0&&(n=r)}return new pe(i,n)}return new pe(r||n,n)}function xe(e,t,n,r){Ee(e,new fe([we(e,e.sel.primary(),t,n)],0),r)}function Te(e,t,n){for(var r=[],i=0;i<e.sel.ranges.length;i++)r[i]=we(e,e.sel.ranges[i],t[i],null);var o=de(r,e.sel.primIndex);Ee(e,o,n)}function ke(e,t,n,r){var i=e.sel.ranges.slice(0);i[t]=n,Ee(e,de(i,e.sel.primIndex),r)}function Le(e,t,n,r){Ee(e,he(t,n),r)}function Se(e,t){var n={ranges:t.ranges,update:function(t){this.ranges=[];for(var n=0;n<t.length;n++)this.ranges[n]=new pe(ve(e,t[n].anchor),ve(e,t[n].head))}};return Oa(e,"beforeSelectionChange",e,n),e.cm&&Oa(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?de(n.ranges,n.ranges.length-1):t}function Ce(e,t,n){var r=e.history.done,i=Oi(r);i&&i.ranges?(r[r.length-1]=t,_e(e,t,n)):Ee(e,t,n)}function Ee(e,t,n){_e(e,t,n),ci(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function _e(e,t,n){(Ei(e,"beforeSelectionChange")||e.cm&&Ei(e.cm,"beforeSelectionChange"))&&(t=Se(e,t));var r=n&&n.bias||(Go(t.primary().head,e.sel.primary().head)<0?-1:1);Ne(e,Oe(e,t,r,!0)),n&&n.scroll===!1||!e.cm||Gn(e.cm)}function Ne(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=e.cm.curOp.selectionChanged=!0,Ci(e.cm)),ki(e,"cursorActivity",e))}function Ae(e){Ne(e,Oe(e,e.sel,null,!1),Fa)}function Oe(e,t,n,r){for(var i,o=0;o<t.ranges.length;o++){var a=t.ranges[o],s=Me(e,a.anchor,n,r),l=Me(e,a.head,n,r);(i||s!=a.anchor||l!=a.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new pe(s,l))}return i?de(i,t.primIndex):t}function Me(e,t,n,r){var i=!1,o=t,a=n||1;e.cantEdit=!1;e:for(;;){var s=Jr(e,o.line);if(s.markedSpans)for(var l=0;l<s.markedSpans.length;++l){var u=s.markedSpans[l],c=u.marker;if((null==u.from||(c.inclusiveLeft?u.from<=o.ch:u.from<o.ch))&&(null==u.to||(c.inclusiveRight?u.to>=o.ch:u.to>o.ch))){if(r&&(Oa(c,"beforeCursorEnter"),c.explicitlyCleared)){if(s.markedSpans){--l;continue}break}if(!c.atomic)continue;var f=c.find(0>a?-1:1);if(0==Go(f,o)&&(f.ch+=a,f.ch<0?f=f.line>e.first?ve(e,Po(f.line-1)):null:f.ch>s.text.length&&(f=f.line<e.first+e.size-1?Po(f.line+1,0):null),!f)){if(i)return r?(e.cantEdit=!0,Po(e.first,0)):Me(e,t,n,!0);i=!0,f=t,a=-a}o=f;continue e}}return o}}function Ie(e){e.display.input.showSelection(e.display.input.prepareSelection())}function De(e,t){for(var n=e.doc,r={},i=r.cursors=document.createDocumentFragment(),o=r.selection=document.createDocumentFragment(),a=0;a<n.sel.ranges.length;a++)if(t!==!1||a!=n.sel.primIndex){var s=n.sel.ranges[a],l=s.empty();(l||e.options.showCursorWhenSelecting)&&Fe(e,s.head,i),l||Pe(e,s,o)}return r}function Fe(e,t,n){var r=pt(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=n.appendChild(Vi("div"," ","CodeMirror-cursor"));if(i.style.left=r.left+"px",i.style.top=r.top+"px",i.style.height=Math.max(0,r.bottom-r.top)*e.options.cursorHeight+"px",r.other){var o=n.appendChild(Vi("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));o.style.display="",o.style.left=r.other.left+"px",o.style.top=r.other.top+"px",o.style.height=.85*(r.other.bottom-r.other.top)+"px"}}function Pe(e,t,n){function r(e,t,n,r){0>t&&(t=0),t=Math.round(t),r=Math.round(r),s.appendChild(Vi("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px; top: "+t+"px; width: "+(null==n?c-e:n)+"px; height: "+(r-t)+"px"))}function i(t,n,i){function o(n,r){return ft(e,Po(t,n),"div",f,r)}var s,l,f=Jr(a,t),p=f.text.length;return Zi(ri(f),n||0,null==i?p:i,function(e,t,a){var f,d,h,m=o(e,"left");if(e==t)f=m,d=h=m.left;else{if(f=o(t-1,"right"),"rtl"==a){var v=m;m=f,f=v}d=m.left,h=f.right}null==n&&0==e&&(d=u),f.top-m.top>3&&(r(d,m.top,null,m.bottom),d=u,m.bottom<f.top&&r(d,m.bottom,null,f.top)),null==i&&t==p&&(h=c),(!s||m.top<s.top||m.top==s.top&&m.left<s.left)&&(s=m),(!l||f.bottom>l.bottom||f.bottom==l.bottom&&f.right>l.right)&&(l=f),u+1>d&&(d=u),r(d,f.top,h-d,f.bottom)}),{start:s,end:l}}var o=e.display,a=e.doc,s=document.createDocumentFragment(),l=We(e.display),u=l.left,c=Math.max(o.sizerWidth,qe(e)-o.sizer.offsetLeft)-l.right,f=t.from(),p=t.to();if(f.line==p.line)i(f.line,f.ch,p.ch);else{var d=Jr(a,f.line),h=Jr(a,p.line),m=gr(d)==gr(h),v=i(f.line,f.ch,m?d.text.length+1:null).end,g=i(p.line,m?0:null,p.ch).start;m&&(v.top<g.top-2?(r(v.right,v.top,null,v.bottom),r(u,g.top,g.left,g.bottom)):r(v.right,v.top,g.left-v.right,v.bottom)),v.bottom<g.top&&r(u,v.bottom,null,g.top)}n.appendChild(s)}function Ge(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function je(e,t){e.doc.mode.startState&&e.doc.frontier<e.display.viewTo&&e.state.highlight.set(t,Gi(Qe,e))}function Qe(e){var t=e.doc;if(t.frontier<t.first&&(t.frontier=t.first),!(t.frontier>=e.display.viewTo)){var n=+new Date+e.options.workTime,r=aa(t.mode,Ve(e,t.frontier)),i=[];t.iter(t.frontier,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(t.frontier>=e.display.viewFrom){var a=o.styles,s=o.text.length>e.options.maxHighlightLength,l=Ir(e,o,s?aa(t.mode,r):r,!0);o.styles=l.styles;var u=o.styleClasses,c=l.classes;c?o.styleClasses=c:u&&(o.styleClasses=null);for(var f=!a||a.length!=o.styles.length||u!=c&&(!u||!c||u.bgClass!=c.bgClass||u.textClass!=c.textClass),p=0;!f&&p<a.length;++p)f=a[p]!=o.styles[p];f&&i.push(t.frontier),o.stateAfter=s?r:aa(t.mode,r)}else o.text.length<=e.options.maxHighlightLength&&Fr(e,o.text,r),o.stateAfter=t.frontier%5==0?aa(t.mode,r):null;return++t.frontier,+new Date>n?(je(e,e.options.workDelay),!0):void 0}),i.length&&_t(e,function(){for(var t=0;t<i.length;t++)Ft(e,i[t],"text")})}}function Re(e,t,n){for(var r,i,o=e.doc,a=n?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>a;--s){if(s<=o.first)return o.first;var l=Jr(o,s-1);if(l.stateAfter&&(!n||s<=o.frontier))return s;var u=ja(l.text,null,e.options.tabSize);(null==i||r>u)&&(i=s-1,r=u)}return i}function Ve(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return!0;var o=Re(e,t,n),a=o>r.first&&Jr(r,o-1).stateAfter;return a=a?aa(r.mode,a):sa(r.mode),r.iter(o,t,function(n){Fr(e,n.text,a);var s=o==t-1||o%5==0||o>=i.viewFrom&&o<i.viewTo;n.stateAfter=s?aa(r.mode,a):null,++o}),n&&(r.frontier=o),a}function Be(e){return e.lineSpace.offsetTop}function Ue(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function We(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=Ui(e.measure,Vi("pre","x")),n=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,r={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};return isNaN(r.left)||isNaN(r.right)||(e.cachedPaddingH=r),r}function He(e){return Ia-e.display.nativeBarWidth}function qe(e){return e.display.scroller.clientWidth-He(e)-e.display.barWidth}function ze(e){return e.display.scroller.clientHeight-He(e)-e.display.barHeight}function Ke(e,t,n){var r=e.options.lineWrapping,i=r&&qe(e);if(!t.measure.heights||r&&t.measure.width!=i){var o=t.measure.heights=[];if(r){t.measure.width=i;for(var a=t.text.firstChild.getClientRects(),s=0;s<a.length-1;s++){var l=a[s],u=a[s+1];Math.abs(l.bottom-u.bottom)>2&&o.push((l.bottom+u.top)/2-n.top)}}o.push(n.bottom-n.top)}}function Ye(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;r<e.rest.length;r++)if(e.rest[r]==t)return{map:e.measure.maps[r],cache:e.measure.caches[r]};for(var r=0;r<e.rest.length;r++)if(ei(e.rest[r])>n)return{map:e.measure.maps[r],cache:e.measure.caches[r],before:!0}}function Je(e,t){t=gr(t);var n=ei(t),r=e.display.externalMeasured=new Mt(e.doc,t,n);r.lineN=n;var i=r.built=Gr(e,r);return r.text=i.pre,Ui(e.display.lineMeasure,i.pre),r}function $e(e,t,n,r){return et(e,Ze(e,t),n,r)}function Xe(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[Gt(e,t)];var n=e.display.externalMeasured;return n&&t>=n.lineN&&t<n.lineN+n.size?n:void 0}function Ze(e,t){var n=ei(t),r=Xe(e,n);r&&!r.text?r=null:r&&r.changes&&(F(e,r,n,I(e)),e.curOp.forceUpdate=!0),r||(r=Je(e,t));var i=Ye(r,t,n);return{line:t,view:r,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function et(e,t,n,r,i){t.before&&(n=-1);var o,a=n+(r||"");return t.cache.hasOwnProperty(a)?o=t.cache[a]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(Ke(e,t.view,t.rect),t.hasHeights=!0),o=nt(e,t,n,r),o.bogus||(t.cache[a]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}function tt(e,t,n){for(var r,i,o,a,s=0;s<e.length;s+=3){var l=e[s],u=e[s+1];if(l>t?(i=0,o=1,a="left"):u>t?(i=t-l,o=i+1):(s==e.length-3||t==u&&e[s+3]>t)&&(o=u-l,i=o-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[(s-=3)+2],a="left";if("right"==n&&i==u-l)for(;s<e.length-3&&e[s+3]==e[s+4]&&!e[s+5].insertLeft;)r=e[(s+=3)+2],a="right";break}}return{node:r,start:i,end:o,collapse:a,coverStart:l,coverEnd:u}}function nt(e,t,n,r){var i,o=tt(t.map,n,r),a=o.node,s=o.start,l=o.end,u=o.collapse;if(3==a.nodeType){for(var c=0;4>c;c++){for(;s&&Ri(t.line.text.charAt(o.coverStart+s));)--s;for(;o.coverStart+l<o.coverEnd&&Ri(t.line.text.charAt(o.coverStart+l));)++l;if(yo&&9>bo&&0==s&&l==o.coverEnd-o.coverStart)i=a.parentNode.getBoundingClientRect();else if(yo&&e.options.lineWrapping){var f=Ba(a,s,l).getClientRects();i=f.length?f["right"==r?f.length-1:0]:Bo}else i=Ba(a,s,l).getBoundingClientRect()||Bo;if(i.left||i.right||0==s)break;l=s,s-=1,u="right"}yo&&11>bo&&(i=rt(e.display.measure,i))}else{s>0&&(u=r="right");var f;i=e.options.lineWrapping&&(f=a.getClientRects()).length>1?f["right"==r?f.length-1:0]:a.getBoundingClientRect()}if(yo&&9>bo&&!s&&(!i||!i.left&&!i.right)){var p=a.parentNode.getClientRects()[0];i=p?{left:p.left,right:p.left+yt(e.display),top:p.top,bottom:p.bottom}:Bo}for(var d=i.top-t.rect.top,h=i.bottom-t.rect.top,m=(d+h)/2,v=t.view.measure.heights,c=0;c<v.length-1&&!(m<v[c]);c++);var g=c?v[c-1]:0,y=v[c],b={left:("right"==u?i.right:i.left)-t.rect.left,right:("left"==u?i.left:i.right)-t.rect.left,top:g,bottom:y};return i.left||i.right||(b.bogus=!0),e.options.singleCursorHeightPerLine||(b.rtop=d,b.rbottom=h),b}function rt(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!Xi(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}}function it(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function ot(e){e.display.externalMeasure=null,Bi(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)it(e.display.view[t])}function at(e){ot(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function st(){return window.pageXOffset||(document.documentElement||document.body).scrollLeft}function lt(){return window.pageYOffset||(document.documentElement||document.body).scrollTop}function ut(e,t,n,r){if(t.widgets)for(var i=0;i<t.widgets.length;++i)if(t.widgets[i].above){var o=Lr(t.widgets[i]);n.top+=o,n.bottom+=o}if("line"==r)return n;r||(r="local");var a=ni(t);if("local"==r?a+=Be(e.display):a-=e.display.viewOffset,"page"==r||"window"==r){var s=e.display.lineSpace.getBoundingClientRect();a+=s.top+("window"==r?0:lt());var l=s.left+("window"==r?0:st());n.left+=l,n.right+=l}return n.top+=a,n.bottom+=a,n}function ct(e,t,n){if("div"==n)return t;var r=t.left,i=t.top;if("page"==n)r-=st(),i-=lt();else if("local"==n||!n){var o=e.display.sizer.getBoundingClientRect();r+=o.left,i+=o.top}var a=e.display.lineSpace.getBoundingClientRect();return{left:r-a.left,top:i-a.top}}function ft(e,t,n,r,i){return r||(r=Jr(e.doc,t.line)),ut(e,r,$e(e,r,t.ch,i),n)}function pt(e,t,n,r,i,o){function a(t,a){var s=et(e,i,t,a?"right":"left",o);return a?s.left=s.right:s.right=s.left,ut(e,r,s,n)}function s(e,t){var n=l[t],r=n.level%2;return e==eo(n)&&t&&n.level<l[t-1].level?(n=l[--t],e=to(n)-(n.level%2?0:1),r=!0):e==to(n)&&t<l.length-1&&n.level<l[t+1].level&&(n=l[++t],e=eo(n)-n.level%2,r=!1),r&&e==n.to&&e>n.from?a(e-1):a(e,r)}r=r||Jr(e.doc,t.line),i||(i=Ze(e,r));var l=ri(r),u=t.ch;if(!l)return a(u);var c=lo(l,u),f=s(u,c);return null!=is&&(f.other=s(u,is)),f}function dt(e,t){var n=0,t=ve(e.doc,t);e.options.lineWrapping||(n=yt(e.display)*t.ch);var r=Jr(e.doc,t.line),i=ni(r)+Be(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function ht(e,t,n,r){var i=Po(e,t);return i.xRel=r,n&&(i.outside=!0),i}function mt(e,t,n){var r=e.doc;if(n+=e.display.viewOffset,0>n)return ht(r.first,0,!0,-1);var i=ti(r,n),o=r.first+r.size-1;if(i>o)return ht(r.first+r.size-1,Jr(r,o).text.length,!0,1);0>t&&(t=0);for(var a=Jr(r,i);;){var s=vt(e,a,i,t,n),l=mr(a),u=l&&l.find(0,!0);if(!l||!(s.ch>u.from.ch||s.ch==u.from.ch&&s.xRel>0))return s;i=ei(a=u.to.line)}}function vt(e,t,n,r,i){function o(r){var i=pt(e,Po(n,r),"line",t,u);return s=!0,a>i.bottom?i.left-l:a<i.top?i.left+l:(s=!1,i.left)}var a=i-ni(t),s=!1,l=2*e.display.wrapper.clientWidth,u=Ze(e,t),c=ri(t),f=t.text.length,p=no(t),d=ro(t),h=o(p),m=s,v=o(d),g=s;if(r>v)return ht(n,d,g,1);for(;;){if(c?d==p||d==co(t,p,1):1>=d-p){for(var y=h>r||v-r>=r-h?p:d,b=r-(y==p?h:v);Ri(t.text.charAt(y));)++y;var w=ht(n,y,y==p?m:g,-1>b?-1:b>1?1:0);return w}var x=Math.ceil(f/2),T=p+x;if(c){T=p;for(var k=0;x>k;++k)T=co(t,T,1)}var L=o(T);L>r?(d=T,v=L,(g=s)&&(v+=1e3),f=x):(p=T,h=L,m=s,f-=x)}}function gt(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Qo){Qo=Vi("pre");for(var t=0;49>t;++t)Qo.appendChild(document.createTextNode("x")),Qo.appendChild(Vi("br"));Qo.appendChild(document.createTextNode("x"))}Ui(e.measure,Qo);var n=Qo.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),Bi(e.measure),n||1}function yt(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=Vi("span","xxxxxxxxxx"),n=Vi("pre",[t]);Ui(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function bt(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Wo},Uo?Uo.ops.push(e.curOp):e.curOp.ownsGroup=Uo={ops:[e.curOp],delayedCallbacks:[]}}function wt(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n].call(null);for(var r=0;r<e.ops.length;r++){var i=e.ops[r];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(n<t.length)}function xt(e){var t=e.curOp,n=t.ownsGroup;if(n)try{wt(n)}finally{Uo=null;for(var r=0;r<n.ops.length;r++)n.ops[r].cm.curOp=null;Tt(n)}}function Tt(e){for(var t=e.ops,n=0;n<t.length;n++)kt(t[n]);for(var n=0;n<t.length;n++)Lt(t[n]);for(var n=0;n<t.length;n++)St(t[n]);for(var n=0;n<t.length;n++)Ct(t[n]);for(var n=0;n<t.length;n++)Et(t[n])}function kt(e){var t=e.cm,n=t.display;C(t),e.updateMaxLine&&p(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<n.viewFrom||e.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new S(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Lt(e){e.updatedDisplay=e.mustUpdate&&E(e.cm,e.update)}function St(e){var t=e.cm,n=t.display;e.updatedDisplay&&O(t),e.barMeasure=h(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=$e(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+He(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-qe(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Ct(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&rn(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1),e.preparedSelection&&t.display.input.showSelection(e.preparedSelection),e.updatedDisplay&&A(t,e.barMeasure),(e.updatedDisplay||e.startHeight!=t.doc.height)&&y(t,e.barMeasure),e.selectionChanged&&Ge(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),!e.focus||e.focus!=Wi()||document.hasFocus&&!document.hasFocus()||J(e.cm)}function Et(e){var t=e.cm,n=t.display,r=t.doc;if(e.updatedDisplay&&_(t,e.update),null==n.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(n.wheelStartX=n.wheelStartY=null),null==e.scrollTop||n.scroller.scrollTop==e.scrollTop&&!e.forceScroll||(r.scrollTop=Math.max(0,Math.min(n.scroller.scrollHeight-n.scroller.clientHeight,e.scrollTop)),n.scrollbars.setScrollTop(r.scrollTop),n.scroller.scrollTop=r.scrollTop),null==e.scrollLeft||n.scroller.scrollLeft==e.scrollLeft&&!e.forceScroll||(r.scrollLeft=Math.max(0,Math.min(n.scroller.scrollWidth-qe(t),e.scrollLeft)),n.scrollbars.setScrollLeft(r.scrollLeft),n.scroller.scrollLeft=r.scrollLeft,x(t)),e.scrollToPos){var i=In(t,ve(r,e.scrollToPos.from),ve(r,e.scrollToPos.to),e.scrollToPos.margin);e.scrollToPos.isCursor&&t.state.focused&&Mn(t,i)}var o=e.maybeHiddenMarkers,a=e.maybeUnhiddenMarkers;if(o)for(var s=0;s<o.length;++s)o[s].lines.length||Oa(o[s],"hide");if(a)for(var s=0;s<a.length;++s)a[s].lines.length&&Oa(a[s],"unhide");n.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&Oa(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function _t(e,t){if(e.curOp)return t();bt(e);try{return t()}finally{xt(e)}}function Nt(e,t){return function(){if(e.curOp)return t.apply(e,arguments);bt(e);try{return t.apply(e,arguments)}finally{xt(e)}}}function At(e){return function(){if(this.curOp)return e.apply(this,arguments);bt(this);try{return e.apply(this,arguments)}finally{xt(this)}}}function Ot(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);bt(t);try{return e.apply(this,arguments)}finally{xt(t)}}}function Mt(e,t,n){this.line=t,this.rest=yr(t),this.size=this.rest?ei(Oi(this.rest))-n+1:1,this.node=this.text=null,this.hidden=xr(e,t)}function It(e,t,n){for(var r,i=[],o=t;n>o;o=r){var a=new Mt(e.doc,Jr(e.doc,o),o);r=o+a.size,i.push(a)}return i}function Dt(e,t,n,r){null==t&&(t=e.doc.first),null==n&&(n=e.doc.first+e.doc.size),r||(r=0);var i=e.display;if(r&&n<i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Fo&&br(e.doc,t)<i.viewTo&&Pt(e);else if(n<=i.viewFrom)Fo&&wr(e.doc,n+r)>i.viewFrom?Pt(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)Pt(e);else if(t<=i.viewFrom){var o=jt(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):Pt(e)}else if(n>=i.viewTo){var o=jt(e,t,t,-1);o?(i.view=i.view.slice(0,o.index),i.viewTo=o.lineN):Pt(e)}else{var a=jt(e,t,t,-1),s=jt(e,n,n+r,1);a&&s?(i.view=i.view.slice(0,a.index).concat(It(e,a.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=r):Pt(e)}var l=i.externalMeasured;l&&(n<l.lineN?l.lineN+=r:t<l.lineN+l.size&&(i.externalMeasured=null))}function Ft(e,t,n){e.curOp.viewChanged=!0;var r=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(r.externalMeasured=null),!(t<r.viewFrom||t>=r.viewTo)){var o=r.view[Gt(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==Mi(a,n)&&a.push(n)}}}function Pt(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Gt(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,0>t)return null;for(var n=e.display.view,r=0;r<n.length;r++)if(t-=n[r].size,0>t)return r}function jt(e,t,n,r){var i,o=Gt(e,t),a=e.display.view;if(!Fo||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var s=0,l=e.display.viewFrom;o>s;s++)l+=a[s].size;if(l!=t){if(r>0){if(o==a.length-1)return null;i=l+a[o].size-t,o++}else i=l-t;t+=i,n+=i}for(;br(e.doc,n)!=n;){if(o==(0>r?0:a.length-1))return null;n+=r*a[o-(0>r?1:0)].size,o+=r}return{index:o,lineN:n}}function Qt(e,t,n){var r=e.display,i=r.view;0==i.length||t>=r.viewTo||n<=r.viewFrom?(r.view=It(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=It(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(Gt(e,t))),r.viewFrom=t,r.viewTo<n?r.view=r.view.concat(It(e,r.viewTo,n)):r.viewTo>n&&(r.view=r.view.slice(0,Gt(e,n)))),r.viewTo=n}function Rt(e){for(var t=e.display.view,n=0,r=0;r<t.length;r++){var i=t[r];i.hidden||i.node&&!i.changes||++n}return n}function Vt(e){function t(){i.activeTouch&&(o=setTimeout(function(){i.activeTouch=null},1e3),a=i.activeTouch,a.end=+new Date)}function n(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}function r(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}var i=e.display;_a(i.scroller,"mousedown",Nt(e,qt)),yo&&11>bo?_a(i.scroller,"dblclick",Nt(e,function(t){if(!Si(e,t)){var n=Ht(e,t);if(n&&!$t(e,t)&&!Wt(e.display,t)){Sa(t);var r=e.findWordAt(n);xe(e.doc,r.anchor,r.head)}}})):_a(i.scroller,"dblclick",function(t){Si(e,t)||Sa(t)}),Io||_a(i.scroller,"contextmenu",function(t){yn(e,t)});var o,a={end:0};_a(i.scroller,"touchstart",function(e){if(!n(e)){clearTimeout(o);var t=+new Date;i.activeTouch={start:t,moved:!1,prev:t-a.end<=300?a:null},1==e.touches.length&&(i.activeTouch.left=e.touches[0].pageX,i.activeTouch.top=e.touches[0].pageY)}}),_a(i.scroller,"touchmove",function(){i.activeTouch&&(i.activeTouch.moved=!0)}),_a(i.scroller,"touchend",function(n){var o=i.activeTouch;if(o&&!Wt(i,n)&&null!=o.left&&!o.moved&&new Date-o.start<300){var a,s=e.coordsChar(i.activeTouch,"page");a=!o.prev||r(o,o.prev)?new pe(s,s):!o.prev.prev||r(o,o.prev.prev)?e.findWordAt(s):new pe(Po(s.line,0),ve(e.doc,Po(s.line+1,0))),e.setSelection(a.anchor,a.head),e.focus(),Sa(n)}t()}),_a(i.scroller,"touchcancel",t),_a(i.scroller,"scroll",function(){i.scroller.clientHeight&&(nn(e,i.scroller.scrollTop),rn(e,i.scroller.scrollLeft,!0),Oa(e,"scroll",e))}),_a(i.scroller,"mousewheel",function(t){on(e,t)}),_a(i.scroller,"DOMMouseScroll",function(t){on(e,t)}),_a(i.wrapper,"scroll",function(){i.wrapper.scrollTop=i.wrapper.scrollLeft=0}),i.dragFunctions={enter:function(t){Si(e,t)||Ea(t)},over:function(t){Si(e,t)||(en(e,t),Ea(t))},start:function(t){Zt(e,t)},drop:Nt(e,Xt),leave:function(){tn(e)}};var s=i.input.getField();_a(s,"keyup",function(t){dn.call(e,t)}),_a(s,"keydown",Nt(e,fn)),_a(s,"keypress",Nt(e,hn)),_a(s,"focus",Gi(vn,e)),_a(s,"blur",Gi(gn,e))}function Bt(t,n,r){var i=r&&r!=e.Init;if(!n!=!i){var o=t.display.dragFunctions,a=n?_a:Aa;a(t.display.scroller,"dragstart",o.start),a(t.display.scroller,"dragenter",o.enter),a(t.display.scroller,"dragover",o.over),a(t.display.scroller,"dragleave",o.leave),a(t.display.scroller,"drop",o.drop)}}function Ut(e){var t=e.display;(t.lastWrapHeight!=t.wrapper.clientHeight||t.lastWrapWidth!=t.wrapper.clientWidth)&&(t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize())}function Wt(e,t){for(var n=wi(t);n!=e.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==e.sizer&&n!=e.mover)return!0}function Ht(e,t,n,r){var i=e.display;if(!n&&"true"==wi(t).getAttribute("cm-not-content"))return null;var o,a,s=i.lineSpace.getBoundingClientRect();try{o=t.clientX-s.left,a=t.clientY-s.top}catch(t){return null}var l,u=mt(e,o,a);if(r&&1==u.xRel&&(l=Jr(e.doc,u.line).text).length==u.ch){var c=ja(l,l.length,e.options.tabSize)-l.length;u=Po(u.line,Math.max(0,Math.round((o-We(e.display).left)/yt(e.display))-c))}return u}function qt(e){var t=this,n=t.display;if(!(n.activeTouch&&n.input.supportsTouch()||Si(t,e))){if(n.shift=e.shiftKey,Wt(n,e))return void(wo||(n.scroller.draggable=!1,setTimeout(function(){n.scroller.draggable=!0},100)));if(!$t(t,e)){var r=Ht(t,e);switch(window.focus(),xi(e)){case 1:t.state.selectingText?t.state.selectingText(e):r?zt(t,e,r):wi(e)==n.scroller&&Sa(e);break;case 2:wo&&(t.state.lastMiddleDown=+new Date),r&&xe(t.doc,r),setTimeout(function(){n.input.focus()},20),Sa(e);break;case 3:Io?yn(t,e):mn(t)}}}}function zt(e,t,n){yo?setTimeout(Gi(J,e),0):e.curOp.focus=Wi();var r,i=+new Date;Vo&&Vo.time>i-400&&0==Go(Vo.pos,n)?r="triple":Ro&&Ro.time>i-400&&0==Go(Ro.pos,n)?(r="double",Vo={time:i,pos:n}):(r="single",Ro={time:i,pos:n});var o,a=e.doc.sel,s=No?t.metaKey:t.ctrlKey;e.options.dragDrop&&Xa&&!$(e)&&"single"==r&&(o=a.contains(n))>-1&&(Go((o=a.ranges[o]).from(),n)<0||n.xRel>0)&&(Go(o.to(),n)>0||n.xRel<0)?Kt(e,t,n,s):Yt(e,t,n,r,s)}function Kt(e,t,n,r){var i=e.display,o=+new Date,a=Nt(e,function(s){wo&&(i.scroller.draggable=!1),e.state.draggingText=!1,Aa(document,"mouseup",a),Aa(i.scroller,"drop",a),Math.abs(t.clientX-s.clientX)+Math.abs(t.clientY-s.clientY)<10&&(Sa(s),!r&&+new Date-200<o&&xe(e.doc,n),wo||yo&&9==bo?setTimeout(function(){document.body.focus(),i.input.focus()},20):i.input.focus())});wo&&(i.scroller.draggable=!0),e.state.draggingText=a,i.scroller.dragDrop&&i.scroller.dragDrop(),_a(document,"mouseup",a),_a(i.scroller,"drop",a)}function Yt(e,t,n,r,i){function o(t){if(0!=Go(v,t))if(v=t,"rect"==r){for(var i=[],o=e.options.tabSize,a=ja(Jr(u,n.line).text,n.ch,o),s=ja(Jr(u,t.line).text,t.ch,o),l=Math.min(a,s),d=Math.max(a,s),h=Math.min(n.line,t.line),m=Math.min(e.lastLine(),Math.max(n.line,t.line));m>=h;h++){var g=Jr(u,h).text,y=Qa(g,l,o);l==d?i.push(new pe(Po(h,y),Po(h,y))):g.length>y&&i.push(new pe(Po(h,y),Po(h,Qa(g,d,o))))}i.length||i.push(new pe(n,n)),Ee(u,de(p.ranges.slice(0,f).concat(i),f),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b=c,w=b.anchor,x=t;if("single"!=r){if("double"==r)var T=e.findWordAt(t);else var T=new pe(Po(t.line,0),ve(u,Po(t.line+1,0)));Go(T.anchor,w)>0?(x=T.head,w=Y(b.from(),T.anchor)):(x=T.anchor,w=K(b.to(),T.head))}var i=p.ranges.slice(0);i[f]=new pe(ve(u,w),x),Ee(u,de(i,f),Pa)}}function a(t){var n=++y,i=Ht(e,t,!0,"rect"==r);if(i)if(0!=Go(i,v)){e.curOp.focus=Wi(),o(i);var s=w(l,u);(i.line>=s.to||i.line<s.from)&&setTimeout(Nt(e,function(){y==n&&a(t)}),150)}else{var c=t.clientY<g.top?-20:t.clientY>g.bottom?20:0;c&&setTimeout(Nt(e,function(){y==n&&(l.scroller.scrollTop+=c,a(t))}),50)}}function s(t){e.state.selectingText=!1,y=1/0,Sa(t),l.input.focus(),Aa(document,"mousemove",b),Aa(document,"mouseup",x),u.history.lastSelOrigin=null}var l=e.display,u=e.doc;Sa(t);var c,f,p=u.sel,d=p.ranges;if(i&&!t.shiftKey?(f=u.sel.contains(n),c=f>-1?d[f]:new pe(n,n)):(c=u.sel.primary(),f=u.sel.primIndex),t.altKey)r="rect",i||(c=new pe(n,n)),n=Ht(e,t,!0,!0),f=-1;else if("double"==r){var h=e.findWordAt(n);c=e.display.shift||u.extend?we(u,c,h.anchor,h.head):h}else if("triple"==r){var m=new pe(Po(n.line,0),ve(u,Po(n.line+1,0)));c=e.display.shift||u.extend?we(u,c,m.anchor,m.head):m}else c=we(u,c,n);i?-1==f?(f=d.length,Ee(u,de(d.concat([c]),f),{scroll:!1,origin:"*mouse"})):d.length>1&&d[f].empty()&&"single"==r&&!t.shiftKey?(Ee(u,de(d.slice(0,f).concat(d.slice(f+1)),0),{scroll:!1,origin:"*mouse"}),p=u.sel):ke(u,f,c,Pa):(f=0,Ee(u,new fe([c],0),Pa),p=u.sel);var v=n,g=l.wrapper.getBoundingClientRect(),y=0,b=Nt(e,function(e){xi(e)?a(e):s(e)}),x=Nt(e,s);e.state.selectingText=x,_a(document,"mousemove",b),_a(document,"mouseup",x)}function Jt(e,t,n,r){try{var i=t.clientX,o=t.clientY}catch(t){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&Sa(t);var a=e.display,s=a.lineDiv.getBoundingClientRect();if(o>s.bottom||!Ei(e,n))return bi(t);o-=s.top-a.viewOffset;for(var l=0;l<e.options.gutters.length;++l){var u=a.gutters.childNodes[l];if(u&&u.getBoundingClientRect().right>=i){var c=ti(e.doc,o),f=e.options.gutters[l];return Oa(e,n,e,c,f,t),bi(t)}}}function $t(e,t){return Jt(e,t,"gutterClick",!0)}function Xt(e){var t=this;if(tn(t),!Si(t,e)&&!Wt(t.display,e)){Sa(e),yo&&(Ho=+new Date);var n=Ht(t,e,!0),r=e.dataTransfer.files;if(n&&!$(t))if(r&&r.length&&window.FileReader&&window.File)for(var i=r.length,o=Array(i),a=0,s=function(e,r){if(!t.options.allowDropFileTypes||-1!=Mi(t.options.allowDropFileTypes,e.type)){var s=new FileReader;s.onload=Nt(t,function(){var e=s.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(e)&&(e=""),o[r]=e,++a==i){n=ve(t.doc,n);var l={from:n,to:n,text:t.doc.splitLines(o.join(t.doc.lineSeparator())),origin:"paste"};Sn(t.doc,l),Ce(t.doc,he(n,$o(l)))}}),s.readAsText(e)}},l=0;i>l;++l)s(r[l],l);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1)return t.state.draggingText(e),void setTimeout(function(){t.display.input.focus()},20);try{var o=e.dataTransfer.getData("Text");if(o){if(t.state.draggingText&&!(No?e.altKey:e.ctrlKey))var u=t.listSelections();if(_e(t.doc,he(n,n)),u)for(var l=0;l<u.length;++l)On(t.doc,"",u[l].anchor,u[l].head,"drag");t.replaceSelection(o,"around","paste"),t.display.input.focus()}}catch(e){}}}}function Zt(e,t){if(yo&&(!e.state.draggingText||+new Date-Ho<100))return void Ea(t);if(!Si(e,t)&&!Wt(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.setDragImage&&!Lo)){var n=Vi("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",ko&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),ko&&n.parentNode.removeChild(n)}}function en(e,t){var n=Ht(e,t);if(n){var r=document.createDocumentFragment();Fe(e,n,r),e.display.dragCursor||(e.display.dragCursor=Vi("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),Ui(e.display.dragCursor,r)}}function tn(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function nn(e,t){Math.abs(e.doc.scrollTop-t)<2||(e.doc.scrollTop=t,mo||N(e,{top:t}),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t),e.display.scrollbars.setScrollTop(t),mo&&N(e),je(e,100))}function rn(e,t,n){(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)||(t=Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),e.doc.scrollLeft=t,x(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function on(e,t){var n=Ko(t),r=n.x,i=n.y,o=e.display,a=o.scroller,s=a.scrollWidth>a.clientWidth,l=a.scrollHeight>a.clientHeight;if(r&&s||i&&l){if(i&&No&&wo)e:for(var u=t.target,c=o.view;u!=a;u=u.parentNode)for(var f=0;f<c.length;f++)if(c[f].node==u){e.display.currentWheelTarget=u;break e}if(r&&!mo&&!ko&&null!=zo)return i&&l&&nn(e,Math.max(0,Math.min(a.scrollTop+i*zo,a.scrollHeight-a.clientHeight))),rn(e,Math.max(0,Math.min(a.scrollLeft+r*zo,a.scrollWidth-a.clientWidth))),(!i||i&&l)&&Sa(t),void(o.wheelStartX=null);if(i&&null!=zo){var p=i*zo,d=e.doc.scrollTop,h=d+o.wrapper.clientHeight;0>p?d=Math.max(0,d+p-50):h=Math.min(e.doc.height,h+p+50),N(e,{top:d,bottom:h})}20>qo&&(null==o.wheelStartX?(o.wheelStartX=a.scrollLeft,o.wheelStartY=a.scrollTop,o.wheelDX=r,o.wheelDY=i,setTimeout(function(){if(null!=o.wheelStartX){var e=a.scrollLeft-o.wheelStartX,t=a.scrollTop-o.wheelStartY,n=t&&o.wheelDY&&t/o.wheelDY||e&&o.wheelDX&&e/o.wheelDX;o.wheelStartX=o.wheelStartY=null,n&&(zo=(zo*qo+n)/(qo+1),++qo)}},200)):(o.wheelDX+=r,o.wheelDY+=i))}}function an(e,t,n){
if("string"==typeof t&&(t=la[t],!t))return!1;e.display.input.ensurePolled();var r=e.display.shift,i=!1;try{$(e)&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),i=t(e)!=Da}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}function sn(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var i=ca(t,e.state.keyMaps[r],n,e);if(i)return i}return e.options.extraKeys&&ca(t,e.options.extraKeys,n,e)||ca(t,e.options.keyMap,n,e)}function ln(e,t,n,r){var i=e.state.keySeq;if(i){if(fa(t))return"handled";Yo.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),t=i+" "+t}var o=sn(e,t,r);return"multi"==o&&(e.state.keySeq=t),"handled"==o&&ki(e,"keyHandled",e,t,n),("handled"==o||"multi"==o)&&(Sa(n),Ge(e)),i&&!o&&/\'$/.test(t)?(Sa(n),!0):!!o}function un(e,t){var n=pa(t,!0);return n?t.shiftKey&&!e.state.keySeq?ln(e,"Shift-"+n,t,function(t){return an(e,t,!0)})||ln(e,n,t,function(t){return("string"==typeof t?/^go[A-Z]/.test(t):t.motion)?an(e,t):void 0}):ln(e,n,t,function(t){return an(e,t)}):!1}function cn(e,t,n){return ln(e,"'"+n+"'",t,function(t){return an(e,t,!0)})}function fn(e){var t=this;if(t.curOp.focus=Wi(),!Si(t,e)){yo&&11>bo&&27==e.keyCode&&(e.returnValue=!1);var n=e.keyCode;t.display.shift=16==n||e.shiftKey;var r=un(t,e);ko&&(Jo=r?n:null,!r&&88==n&&!ts&&(No?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),18!=n||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||pn(t)}}function pn(e){function t(e){18!=e.keyCode&&e.altKey||(Ya(n,"CodeMirror-crosshair"),Aa(document,"keyup",t),Aa(document,"mouseover",t))}var n=e.display.lineDiv;Ja(n,"CodeMirror-crosshair"),_a(document,"keyup",t),_a(document,"mouseover",t)}function dn(e){16==e.keyCode&&(this.doc.sel.shift=!1),Si(this,e)}function hn(e){var t=this;if(!(Wt(t.display,e)||Si(t,e)||e.ctrlKey&&!e.altKey||No&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(ko&&n==Jo)return Jo=null,void Sa(e);if(!ko||e.which&&!(e.which<10)||!un(t,e)){var i=String.fromCharCode(null==r?n:r);cn(t,e,i)||t.display.input.onKeyPress(e)}}}function mn(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,gn(e))},100)}function vn(e){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(Oa(e,"focus",e),e.state.focused=!0,Ja(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),wo&&setTimeout(function(){e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Ge(e))}function gn(e){e.state.delayingBlurEvent||(e.state.focused&&(Oa(e,"blur",e),e.state.focused=!1,Ya(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function yn(e,t){Wt(e.display,t)||bn(e,t)||Si(e,t,"contextmenu")||e.display.input.onContextMenu(t)}function bn(e,t){return Ei(e,"gutterContextMenu")?Jt(e,t,"gutterContextMenu",!1):!1}function wn(e,t){if(Go(e,t.from)<0)return e;if(Go(e,t.to)<=0)return $o(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+=$o(t).ch-t.to.ch),Po(n,r)}function xn(e,t){for(var n=[],r=0;r<e.sel.ranges.length;r++){var i=e.sel.ranges[r];n.push(new pe(wn(i.anchor,t),wn(i.head,t)))}return de(n,e.sel.primIndex)}function Tn(e,t,n){return e.line==t.line?Po(n.line,e.ch-t.ch+n.ch):Po(n.line+(e.line-t.line),e.ch)}function kn(e,t,n){for(var r=[],i=Po(e.first,0),o=i,a=0;a<t.length;a++){var s=t[a],l=Tn(s.from,i,o),u=Tn($o(s),i,o);if(i=s.to,o=u,"around"==n){var c=e.sel.ranges[a],f=Go(c.head,c.anchor)<0;r[a]=new pe(f?u:l,f?l:u)}else r[a]=new pe(l,l)}return new fe(r,e.sel.primIndex)}function Ln(e,t,n){var r={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){this.canceled=!0}};return n&&(r.update=function(t,n,r,i){t&&(this.from=ve(e,t)),n&&(this.to=ve(e,n)),r&&(this.text=r),void 0!==i&&(this.origin=i)}),Oa(e,"beforeChange",e,r),e.cm&&Oa(e.cm,"beforeChange",e.cm,r),r.canceled?null:{from:r.from,to:r.to,text:r.text,origin:r.origin}}function Sn(e,t,n){if(e.cm){if(!e.cm.curOp)return Nt(e.cm,Sn)(e,t,n);if(e.cm.state.suppressEdits)return}if(!(Ei(e,"beforeChange")||e.cm&&Ei(e.cm,"beforeChange"))||(t=Ln(e,t,!0))){var r=Do&&!n&&sr(e,t.from,t.to);if(r)for(var i=r.length-1;i>=0;--i)Cn(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text});else Cn(e,t)}}function Cn(e,t){if(1!=t.text.length||""!=t.text[0]||0!=Go(t.from,t.to)){var n=xn(e,t);li(e,t,n,e.cm?e.cm.curOp.id:NaN),Nn(e,t,n,ir(e,t));var r=[];Kr(e,function(e,n){n||-1!=Mi(r,e.history)||(yi(e.history,t),r.push(e.history)),Nn(e,t,null,ir(e,t))})}}function En(e,t,n){if(!e.cm||!e.cm.state.suppressEdits){for(var r,i=e.history,o=e.sel,a="undo"==t?i.done:i.undone,s="undo"==t?i.undone:i.done,l=0;l<a.length&&(r=a[l],n?!r.ranges||r.equals(e.sel):r.ranges);l++);if(l!=a.length){for(i.lastOrigin=i.lastSelOrigin=null;r=a.pop(),r.ranges;){if(fi(r,s),n&&!r.equals(e.sel))return void Ee(e,r,{clearRedo:!1});o=r}var u=[];fi(o,s),s.push({changes:u,generation:i.generation}),i.generation=r.generation||++i.maxGeneration;for(var c=Ei(e,"beforeChange")||e.cm&&Ei(e.cm,"beforeChange"),l=r.changes.length-1;l>=0;--l){var f=r.changes[l];if(f.origin=t,c&&!Ln(e,f,!1))return void(a.length=0);u.push(oi(e,f));var p=l?xn(e,f):Oi(a);Nn(e,f,p,ar(e,f)),!l&&e.cm&&e.cm.scrollIntoView({from:f.from,to:$o(f)});var d=[];Kr(e,function(e,t){t||-1!=Mi(d,e.history)||(yi(e.history,f),d.push(e.history)),Nn(e,f,null,ar(e,f))})}}}}function _n(e,t){if(0!=t&&(e.first+=t,e.sel=new fe(Ii(e.sel.ranges,function(e){return new pe(Po(e.anchor.line+t,e.anchor.ch),Po(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){Dt(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;r<n.viewTo;r++)Ft(e.cm,r,"gutter")}}function Nn(e,t,n,r){if(e.cm&&!e.cm.curOp)return Nt(e.cm,Nn)(e,t,n,r);if(t.to.line<e.first)return void _n(e,t.text.length-1-(t.to.line-t.from.line));if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);_n(e,i),t={from:Po(e.first,0),to:Po(t.to.line+i,t.to.ch),text:[Oi(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:Po(o,Jr(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=$r(e,t.from,t.to),n||(n=xn(e,t)),e.cm?An(e.cm,t,r):Hr(e,t,r),_e(e,n,Fa)}}function An(e,t,n){var r=e.doc,i=e.display,a=t.from,s=t.to,l=!1,u=a.line;e.options.lineWrapping||(u=ei(gr(Jr(r,a.line))),r.iter(u,s.line+1,function(e){return e==i.maxLine?(l=!0,!0):void 0})),r.sel.contains(t.from,t.to)>-1&&Ci(e),Hr(r,t,n,o(e)),e.options.lineWrapping||(r.iter(u,a.line+t.text.length,function(e){var t=f(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,l=!1)}),l&&(e.curOp.updateMaxLine=!0)),r.frontier=Math.min(r.frontier,a.line),je(e,400);var c=t.text.length-(s.line-a.line)-1;t.full?Dt(e):a.line!=s.line||1!=t.text.length||Wr(e.doc,t)?Dt(e,a.line,s.line+1,c):Ft(e,a.line,"text");var p=Ei(e,"changes"),d=Ei(e,"change");if(d||p){var h={from:a,to:s,text:t.text,removed:t.removed,origin:t.origin};d&&ki(e,"change",e,h),p&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(h)}e.display.selForContextMenu=null}function On(e,t,n,r,i){if(r||(r=n),Go(r,n)<0){var o=r;r=n,n=o}"string"==typeof t&&(t=e.splitLines(t)),Sn(e,{from:n,to:r,text:t,origin:i})}function Mn(e,t){if(!Si(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&&!Co){var o=Vi("div","",null,"position: absolute; top: "+(t.top-n.viewOffset-Be(e.display))+"px; height: "+(t.bottom-t.top+He(e)+n.barHeight)+"px; left: "+t.left+"px; width: 2px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}function In(e,t,n,r){null==r&&(r=0);for(var i=0;5>i;i++){var o=!1,a=pt(e,t),s=n&&n!=t?pt(e,n):a,l=Fn(e,Math.min(a.left,s.left),Math.min(a.top,s.top)-r,Math.max(a.left,s.left),Math.max(a.bottom,s.bottom)+r),u=e.doc.scrollTop,c=e.doc.scrollLeft;if(null!=l.scrollTop&&(nn(e,l.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(o=!0)),null!=l.scrollLeft&&(rn(e,l.scrollLeft),Math.abs(e.doc.scrollLeft-c)>1&&(o=!0)),!o)break}return a}function Dn(e,t,n,r,i){var o=Fn(e,t,n,r,i);null!=o.scrollTop&&nn(e,o.scrollTop),null!=o.scrollLeft&&rn(e,o.scrollLeft)}function Fn(e,t,n,r,i){var o=e.display,a=gt(e.display);0>n&&(n=0);var s=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:o.scroller.scrollTop,l=ze(e),u={};i-n>l&&(i=n+l);var c=e.doc.height+Ue(o),f=a>n,p=i>c-a;if(s>n)u.scrollTop=f?0:n;else if(i>s+l){var d=Math.min(n,(p?c:i)-l);d!=s&&(u.scrollTop=d)}var h=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:o.scroller.scrollLeft,m=qe(e)-(e.options.fixedGutter?o.gutters.offsetWidth:0),v=r-t>m;return v&&(r=t+m),10>t?u.scrollLeft=0:h>t?u.scrollLeft=Math.max(0,t-(v?0:10)):r>m+h-3&&(u.scrollLeft=r+(v?0:10)-m),u}function Pn(e,t,n){(null!=t||null!=n)&&jn(e),null!=t&&(e.curOp.scrollLeft=(null==e.curOp.scrollLeft?e.doc.scrollLeft:e.curOp.scrollLeft)+t),null!=n&&(e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+n)}function Gn(e){jn(e);var t=e.getCursor(),n=t,r=t;e.options.lineWrapping||(n=t.ch?Po(t.line,t.ch-1):t,r=Po(t.line,t.ch+1)),e.curOp.scrollToPos={from:n,to:r,margin:e.options.cursorScrollMargin,isCursor:!0}}function jn(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=dt(e,t.from),r=dt(e,t.to),i=Fn(e,Math.min(n.left,r.left),Math.min(n.top,r.top)-t.margin,Math.max(n.right,r.right),Math.max(n.bottom,r.bottom)+t.margin);e.scrollTo(i.scrollLeft,i.scrollTop)}}function Qn(e,t,n,r){var i,o=e.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?i=Ve(e,t):n="prev");var a=e.options.tabSize,s=Jr(o,t),l=ja(s.text,null,a);s.stateAfter&&(s.stateAfter=null);var u,c=s.text.match(/^\s*/)[0];if(r||/\S/.test(s.text)){if("smart"==n&&(u=o.mode.indent(i,s.text.slice(c.length),s.text),u==Da||u>150)){if(!r)return;n="prev"}}else u=0,n="not";"prev"==n?u=t>o.first?ja(Jr(o,t-1).text,null,a):0:"add"==n?u=l+e.options.indentUnit:"subtract"==n?u=l-e.options.indentUnit:"number"==typeof n&&(u=l+n),u=Math.max(0,u);var f="",p=0;if(e.options.indentWithTabs)for(var d=Math.floor(u/a);d;--d)p+=a,f+=" ";if(u>p&&(f+=Ai(u-p)),f!=c)return On(o,f,Po(t,0),Po(t,c.length),"+input"),s.stateAfter=null,!0;for(var d=0;d<o.sel.ranges.length;d++){var h=o.sel.ranges[d];if(h.head.line==t&&h.head.ch<c.length){var p=Po(t,c.length);ke(o,d,new pe(p,p));break}}}function Rn(e,t,n,r){var i=t,o=t;return"number"==typeof t?o=Jr(e,me(e,t)):i=ei(t),null==i?null:(r(o,i)&&e.cm&&Ft(e.cm,i,n),o)}function Vn(e,t){for(var n=e.doc.sel.ranges,r=[],i=0;i<n.length;i++){for(var o=t(n[i]);r.length&&Go(o.from,Oi(r).to)<=0;){var a=r.pop();if(Go(a.from,o.from)<0){o.from=a.from;break}}r.push(o)}_t(e,function(){for(var t=r.length-1;t>=0;t--)On(e.doc,"",r[t].from,r[t].to,"+delete");Gn(e)})}function Bn(e,t,n,r,i){function o(){var t=s+n;return t<e.first||t>=e.first+e.size?f=!1:(s=t,c=Jr(e,t))}function a(e){var t=(i?co:fo)(c,l,n,!0);if(null==t){if(e||!o())return f=!1;l=i?(0>n?ro:no)(c):0>n?c.text.length:0}else l=t;return!0}var s=t.line,l=t.ch,u=n,c=Jr(e,s),f=!0;if("char"==r)a();else if("column"==r)a(!0);else if("word"==r||"group"==r)for(var p=null,d="group"==r,h=e.cm&&e.cm.getHelper(t,"wordChars"),m=!0;!(0>n)||a(!m);m=!1){var v=c.text.charAt(l)||"\n",g=ji(v,h)?"w":d&&"\n"==v?"n":!d||/\s/.test(v)?null:"p";if(!d||m||g||(g="s"),p&&p!=g){0>n&&(n=1,a());break}if(g&&(p=g),n>0&&!a(!m))break}var y=Me(e,Po(s,l),u,!0);return f||(y.hitSide=!0),y}function Un(e,t,n,r){var i,o=e.doc,a=t.left;if("page"==r){var s=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);i=t.top+n*(s-(0>n?1.5:.5)*gt(e.display))}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(;;){var l=mt(e,a,i);if(!l.outside)break;if(0>n?0>=i:i>=o.height){l.hitSide=!0;break}i+=5*n}return l}function Wn(t,n,r,i){e.defaults[t]=n,r&&(Zo[t]=i?function(e,t,n){n!=ea&&r(e,t,n)}:r)}function Hn(e){for(var t,n,r,i,o=e.split(/-(?!$)/),e=o[o.length-1],a=0;a<o.length-1;a++){var s=o[a];if(/^(cmd|meta|m)$/i.test(s))i=!0;else if(/^a(lt)?$/i.test(s))t=!0;else if(/^(c|ctrl|control)$/i.test(s))n=!0;else{if(!/^s(hift)$/i.test(s))throw new Error("Unrecognized modifier name: "+s);r=!0}}return t&&(e="Alt-"+e),n&&(e="Ctrl-"+e),i&&(e="Cmd-"+e),r&&(e="Shift-"+e),e}function qn(e){return"string"==typeof e?ua[e]:e}function zn(e,t,n,r,i){if(r&&r.shared)return Kn(e,t,n,r,i);if(e.cm&&!e.cm.curOp)return Nt(e.cm,zn)(e,t,n,r,i);var o=new ma(e,i),a=Go(t,n);if(r&&Pi(r,o,!1),a>0||0==a&&o.clearWhenEmpty!==!1)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=Vi("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(vr(e,t.line,t,n,o)||t.line!=n.line&&vr(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Fo=!0}o.addToHistory&&li(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var s,l=t.line,u=e.cm;if(e.iter(l,n.line+1,function(e){u&&o.collapsed&&!u.options.lineWrapping&&gr(e)==u.display.maxLine&&(s=!0),o.collapsed&&l!=t.line&&Zr(e,0),tr(e,new Xn(o,l==t.line?t.ch:null,l==n.line?n.ch:null)),++l}),o.collapsed&&e.iter(t.line,n.line+1,function(t){xr(e,t)&&Zr(t,0)}),o.clearOnEnter&&_a(o,"beforeCursorEnter",function(){o.clear()}),o.readOnly&&(Do=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++ha,o.atomic=!0),u){if(s&&(u.curOp.updateMaxLine=!0),o.collapsed)Dt(u,t.line,n.line+1);else if(o.className||o.title||o.startStyle||o.endStyle||o.css)for(var c=t.line;c<=n.line;c++)Ft(u,c,"text");o.atomic&&Ae(u.doc),ki(u,"markerAdded",u,o)}return o}function Kn(e,t,n,r,i){r=Pi(r),r.shared=!1;var o=[zn(e,t,n,r,i)],a=o[0],s=r.widgetNode;return Kr(e,function(e){s&&(r.widgetNode=s.cloneNode(!0)),o.push(zn(e,ve(e,t),ve(e,n),r,i));for(var l=0;l<e.linked.length;++l)if(e.linked[l].isParent)return;a=Oi(o)}),new va(o,a)}function Yn(e){return e.findMarks(Po(e.first,0),e.clipPos(Po(e.lastLine())),function(e){return e.parent})}function Jn(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.find(),o=e.clipPos(i.from),a=e.clipPos(i.to);if(Go(o,a)){var s=zn(e,o,a,r.primary,r.primary.type);r.markers.push(s),s.parent=r}}}function $n(e){for(var t=0;t<e.length;t++){var n=e[t],r=[n.primary.doc];Kr(n.primary.doc,function(e){r.push(e)});for(var i=0;i<n.markers.length;i++){var o=n.markers[i];-1==Mi(r,o.doc)&&(o.parent=null,n.markers.splice(i--,1))}}}function Xn(e,t,n){this.marker=e,this.from=t,this.to=n}function Zn(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function er(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||(n=[])).push(e[r]);return n}function tr(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function nr(e,t,n){if(e)for(var r,i=0;i<e.length;++i){var o=e[i],a=o.marker,s=null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t);if(s||o.from==t&&"bookmark"==a.type&&(!n||!o.marker.insertLeft)){var l=null==o.to||(a.inclusiveRight?o.to>=t:o.to>t);(r||(r=[])).push(new Xn(a,o.from,l?null:o.to))}}return r}function rr(e,t,n){if(e)for(var r,i=0;i<e.length;++i){var o=e[i],a=o.marker,s=null==o.to||(a.inclusiveRight?o.to>=t:o.to>t);if(s||o.from==t&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var l=null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t);(r||(r=[])).push(new Xn(a,l?null:o.from-t,null==o.to?null:o.to-t))}}return r}function ir(e,t){if(t.full)return null;var n=ye(e,t.from.line)&&Jr(e,t.from.line).markedSpans,r=ye(e,t.to.line)&&Jr(e,t.to.line).markedSpans;if(!n&&!r)return null;var i=t.from.ch,o=t.to.ch,a=0==Go(t.from,t.to),s=nr(n,i,a),l=rr(r,o,a),u=1==t.text.length,c=Oi(t.text).length+(u?i:0);if(s)for(var f=0;f<s.length;++f){var p=s[f];if(null==p.to){var d=Zn(l,p.marker);d?u&&(p.to=null==d.to?null:d.to+c):p.to=i}}if(l)for(var f=0;f<l.length;++f){var p=l[f];if(null!=p.to&&(p.to+=c),null==p.from){var d=Zn(s,p.marker);d||(p.from=c,u&&(s||(s=[])).push(p))}else p.from+=c,u&&(s||(s=[])).push(p)}s&&(s=or(s)),l&&l!=s&&(l=or(l));var h=[s];if(!u){var m,v=t.text.length-2;if(v>0&&s)for(var f=0;f<s.length;++f)null==s[f].to&&(m||(m=[])).push(new Xn(s[f].marker,null,null));for(var f=0;v>f;++f)h.push(m);h.push(l)}return h}function or(e){for(var t=0;t<e.length;++t){var n=e[t];null!=n.from&&n.from==n.to&&n.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function ar(e,t){var n=hi(e,t),r=ir(e,t);if(!n)return r;if(!r)return n;for(var i=0;i<n.length;++i){var o=n[i],a=r[i];if(o&&a)e:for(var s=0;s<a.length;++s){for(var l=a[s],u=0;u<o.length;++u)if(o[u].marker==l.marker)continue e;o.push(l)}else a&&(n[i]=a)}return n}function sr(e,t,n){var r=null;if(e.iter(t.line,n.line+1,function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var n=e.markedSpans[t].marker;!n.readOnly||r&&-1!=Mi(r,n)||(r||(r=[])).push(n)}}),!r)return null;for(var i=[{from:t,to:n}],o=0;o<r.length;++o)for(var a=r[o],s=a.find(0),l=0;l<i.length;++l){var u=i[l];if(!(Go(u.to,s.from)<0||Go(u.from,s.to)>0)){var c=[l,1],f=Go(u.from,s.from),p=Go(u.to,s.to);(0>f||!a.inclusiveLeft&&!f)&&c.push({from:u.from,to:s.from}),(p>0||!a.inclusiveRight&&!p)&&c.push({from:s.to,to:u.to}),i.splice.apply(i,c),l+=c.length-1}}return i}function lr(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function ur(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function cr(e){return e.inclusiveLeft?-1:0}function fr(e){return e.inclusiveRight?1:0}function pr(e,t){var n=e.lines.length-t.lines.length;if(0!=n)return n;var r=e.find(),i=t.find(),o=Go(r.from,i.from)||cr(e)-cr(t);if(o)return-o;var a=Go(r.to,i.to)||fr(e)-fr(t);return a?a:t.id-e.id}function dr(e,t){var n,r=Fo&&e.markedSpans;if(r)for(var i,o=0;o<r.length;++o)i=r[o],i.marker.collapsed&&null==(t?i.from:i.to)&&(!n||pr(n,i.marker)<0)&&(n=i.marker);return n}function hr(e){return dr(e,!0)}function mr(e){return dr(e,!1)}function vr(e,t,n,r,i){var o=Jr(e,t),a=Fo&&o.markedSpans;if(a)for(var s=0;s<a.length;++s){var l=a[s];if(l.marker.collapsed){var u=l.marker.find(0),c=Go(u.from,n)||cr(l.marker)-cr(i),f=Go(u.to,r)||fr(l.marker)-fr(i);if(!(c>=0&&0>=f||0>=c&&f>=0)&&(0>=c&&(Go(u.to,n)>0||l.marker.inclusiveRight&&i.inclusiveLeft)||c>=0&&(Go(u.from,r)<0||l.marker.inclusiveLeft&&i.inclusiveRight)))return!0}}}function gr(e){for(var t;t=hr(e);)e=t.find(-1,!0).line;return e}function yr(e){for(var t,n;t=mr(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function br(e,t){var n=Jr(e,t),r=gr(n);return n==r?t:ei(r)}function wr(e,t){if(t>e.lastLine())return t;var n,r=Jr(e,t);if(!xr(e,r))return t;for(;n=mr(r);)r=n.find(1,!0).line;return ei(r)+1}function xr(e,t){var n=Fo&&t.markedSpans;if(n)for(var r,i=0;i<n.length;++i)if(r=n[i],r.marker.collapsed){if(null==r.from)return!0;if(!r.marker.widgetNode&&0==r.from&&r.marker.inclusiveLeft&&Tr(e,t,r))return!0}}function Tr(e,t,n){if(null==n.to){var r=n.marker.find(1,!0);return Tr(e,r.line,Zn(r.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var i,o=0;o<t.markedSpans.length;++o)if(i=t.markedSpans[o],i.marker.collapsed&&!i.marker.widgetNode&&i.from==n.to&&(null==i.to||i.to!=n.from)&&(i.marker.inclusiveLeft||n.marker.inclusiveRight)&&Tr(e,t,i))return!0}function kr(e,t,n){ni(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Pn(e,null,n)}function Lr(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!qa(document.body,e.node)){var n="position: relative;";e.coverGutter&&(n+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(n+="width: "+t.display.wrapper.clientWidth+"px;"),Ui(t.display.measure,Vi("div",[e.node],null,n))}return e.height=e.node.offsetHeight}function Sr(e,t,n,r){var i=new ga(e,n,r),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),Rn(e,t,"widget",function(t){var n=t.widgets||(t.widgets=[]);if(null==i.insertAt?n.push(i):n.splice(Math.min(n.length-1,Math.max(0,i.insertAt)),0,i),i.line=t,o&&!xr(e,t)){var r=ni(t)<e.scrollTop;Zr(t,t.height+Lr(i)),r&&Pn(o,null,i.height),o.curOp.forceUpdate=!0}return!0}),i}function Cr(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),lr(e),ur(e,n);var i=r?r(e):1;i!=e.height&&Zr(e,i)}function Er(e){e.parent=null,lr(e)}function _r(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var r=n[1]?"bgClass":"textClass";null==t[r]?t[r]=n[2]:new RegExp("(?:^|s)"+n[2]+"(?:$|s)").test(t[r])||(t[r]+=" "+n[2])}return e}function Nr(t,n){if(t.blankLine)return t.blankLine(n);if(t.innerMode){var r=e.innerMode(t,n);return r.mode.blankLine?r.mode.blankLine(r.state):void 0}}function Ar(t,n,r,i){for(var o=0;10>o;o++){i&&(i[0]=e.innerMode(t,r).mode);var a=t.token(n,r);if(n.pos>n.start)return a}throw new Error("Mode "+t.name+" failed to advance stream.")}function Or(e,t,n,r){function i(e){return{start:f.start,end:f.pos,string:f.current(),type:o||null,state:e?aa(a.mode,c):c}}var o,a=e.doc,s=a.mode;t=ve(a,t);var l,u=Jr(a,t.line),c=Ve(e,t.line,n),f=new da(u.text,e.options.tabSize);for(r&&(l=[]);(r||f.pos<t.ch)&&!f.eol();)f.start=f.pos,o=Ar(s,f,c),r&&l.push(i(!0));return r?l:i()}function Mr(e,t,n,r,i,o,a){var s=n.flattenSpans;null==s&&(s=e.options.flattenSpans);var l,u=0,c=null,f=new da(t,e.options.tabSize),p=e.options.addModeClass&&[null];for(""==t&&_r(Nr(n,r),o);!f.eol();){if(f.pos>e.options.maxHighlightLength?(s=!1,a&&Fr(e,t,r,f.pos),f.pos=t.length,l=null):l=_r(Ar(n,f,r,p),o),p){var d=p[0].name;d&&(l="m-"+(l?d+" "+l:d))}if(!s||c!=l){for(;u<f.start;)u=Math.min(f.start,u+5e4),i(u,c);c=l}f.start=f.pos}for(;u<f.pos;){var h=Math.min(f.pos,u+5e4);i(h,c),u=h}}function Ir(e,t,n,r){var i=[e.state.modeGen],o={};Mr(e,t.text,e.doc.mode,n,function(e,t){i.push(e,t)},o,r);for(var a=0;a<e.state.overlays.length;++a){var s=e.state.overlays[a],l=1,u=0;Mr(e,t.text,s.mode,!0,function(e,t){for(var n=l;e>u;){var r=i[l];r>e&&i.splice(l,1,e,i[l+1],r),l+=2,u=Math.min(e,r)}if(t)if(s.opaque)i.splice(n,l-n,e,"cm-overlay "+t),l=n+2;else for(;l>n;n+=2){var o=i[n+1];i[n+1]=(o?o+" ":"")+"cm-overlay "+t}},o)}return{styles:i,classes:o.bgClass||o.textClass?o:null}}function Dr(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=Ve(e,ei(t)),i=Ir(e,t,t.text.length>e.options.maxHighlightLength?aa(e.doc.mode,r):r);t.stateAfter=r,t.styles=i.styles,i.classes?t.styleClasses=i.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.frontier&&e.doc.frontier++}return t.styles}function Fr(e,t,n,r){var i=e.doc.mode,o=new da(t,e.options.tabSize);for(o.start=o.pos=r||0,""==t&&Nr(i,n);!o.eol();)Ar(i,o,n),o.start=o.pos}function Pr(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?wa:ba;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function Gr(e,t){var n=Vi("span",null,null,wo?"padding-right: .1px":null),r={pre:Vi("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,splitSpaces:(yo||wo)&&e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o,a=i?t.rest[i-1]:t.line;r.pos=0,r.addToken=Qr,$i(e.display.measure)&&(o=ri(a))&&(r.addToken=Vr(r.addToken,o)),r.map=[];var s=t!=e.display.externalMeasured&&ei(a);Ur(a,r,Dr(e,a,s)),a.styleClasses&&(a.styleClasses.bgClass&&(r.bgClass=qi(a.styleClasses.bgClass,r.bgClass||"")),a.styleClasses.textClass&&(r.textClass=qi(a.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Ji(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({}))}return wo&&/\bcm-tab\b/.test(r.content.lastChild.className)&&(r.content.className="cm-tab-wrap-hack"),Oa(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=qi(r.pre.className,r.textClass||"")),r}function jr(e){var t=Vi("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Qr(e,t,n,r,i,o,a){if(t){var s=e.splitSpaces?t.replace(/ {3,}/g,Rr):t,l=e.cm.state.specialChars,u=!1;if(l.test(t))for(var c=document.createDocumentFragment(),f=0;;){l.lastIndex=f;var p=l.exec(t),d=p?p.index-f:t.length-f;if(d){var h=document.createTextNode(s.slice(f,f+d));yo&&9>bo?c.appendChild(Vi("span",[h])):c.appendChild(h),e.map.push(e.pos,e.pos+d,h),e.col+=d,e.pos+=d}if(!p)break;if(f+=d+1," "==p[0]){var m=e.cm.options.tabSize,v=m-e.col%m,h=c.appendChild(Vi("span",Ai(v),"cm-tab"));h.setAttribute("role","presentation"),h.setAttribute("cm-text"," "),e.col+=v}else if("\r"==p[0]||"\n"==p[0]){var h=c.appendChild(Vi("span","\r"==p[0]?"␍":"","cm-invalidchar"));h.setAttribute("cm-text",p[0]),e.col+=1}else{var h=e.cm.options.specialCharPlaceholder(p[0]);h.setAttribute("cm-text",p[0]),yo&&9>bo?c.appendChild(Vi("span",[h])):c.appendChild(h),e.col+=1}e.map.push(e.pos,e.pos+1,h),e.pos++}else{e.col+=t.length;var c=document.createTextNode(s);e.map.push(e.pos,e.pos+t.length,c),yo&&9>bo&&(u=!0),e.pos+=t.length}if(n||r||i||u||a){var g=n||"";r&&(g+=r),i&&(g+=i);var y=Vi("span",[c],g,a);return o&&(y.title=o),e.content.appendChild(y)}e.content.appendChild(c)}}function Rr(e){for(var t=" ",n=0;n<e.length-2;++n)t+=n%2?" ":" ";return t+=" "}function Vr(e,t){return function(n,r,i,o,a,s,l){i=i?i+" cm-force-border":"cm-force-border";for(var u=n.pos,c=u+r.length;;){for(var f=0;f<t.length;f++){var p=t[f];if(p.to>u&&p.from<=u)break}if(p.to>=c)return e(n,r,i,o,a,s,l);e(n,r.slice(0,p.to-u),i,o,null,s,l),o=null,r=r.slice(p.to-u),u=p.to}}}function Br(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}function Ur(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var a,s,l,u,c,f,p,d=i.length,h=0,m=1,v="",g=0;;){if(g==h){l=u=c=f=s="",p=null,g=1/0;for(var y=[],b=0;b<r.length;++b){var w=r[b],x=w.marker;"bookmark"==x.type&&w.from==h&&x.widgetNode?y.push(x):w.from<=h&&(null==w.to||w.to>h||x.collapsed&&w.to==h&&w.from==h)?(null!=w.to&&w.to!=h&&g>w.to&&(g=w.to,u=""),x.className&&(l+=" "+x.className),x.css&&(s=(s?s+";":"")+x.css),x.startStyle&&w.from==h&&(c+=" "+x.startStyle),x.endStyle&&w.to==g&&(u+=" "+x.endStyle),x.title&&!f&&(f=x.title),x.collapsed&&(!p||pr(p.marker,x)<0)&&(p=w)):w.from>h&&g>w.from&&(g=w.from)}if(p&&(p.from||0)==h){if(Br(t,(null==p.to?d+1:p.to)-h,p.marker,null==p.from),null==p.to)return;p.to==h&&(p=!1)}if(!p&&y.length)for(var b=0;b<y.length;++b)Br(t,0,y[b])}if(h>=d)break;for(var T=Math.min(d,g);;){if(v){var k=h+v.length;if(!p){var L=k>T?v.slice(0,T-h):v;t.addToken(t,L,a?a+l:l,c,h+L.length==g?u:"",f,s)}if(k>=T){v=v.slice(T-h),h=T;break}h=k,c=""}v=i.slice(o,o=n[m++]),a=Pr(n[m++],t.cm.options)}}else for(var m=1;m<n.length;m+=2)t.addToken(t,i.slice(o,o=n[m]),Pr(n[m+1],t.cm.options))}function Wr(e,t){return 0==t.from.ch&&0==t.to.ch&&""==Oi(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Hr(e,t,n,r){function i(e){return n?n[e]:null}function o(e,n,i){Cr(e,n,i,r),ki(e,"change",e,t)}function a(e,t){for(var n=e,o=[];t>n;++n)o.push(new ya(u[n],i(n),r));return o}var s=t.from,l=t.to,u=t.text,c=Jr(e,s.line),f=Jr(e,l.line),p=Oi(u),d=i(u.length-1),h=l.line-s.line;if(t.full)e.insert(0,a(0,u.length)),e.remove(u.length,e.size-u.length);else if(Wr(e,t)){var m=a(0,u.length-1);o(f,f.text,d),h&&e.remove(s.line,h),m.length&&e.insert(s.line,m)}else if(c==f)if(1==u.length)o(c,c.text.slice(0,s.ch)+p+c.text.slice(l.ch),d);else{var m=a(1,u.length-1);m.push(new ya(p+c.text.slice(l.ch),d,r)),o(c,c.text.slice(0,s.ch)+u[0],i(0)),e.insert(s.line+1,m)}else if(1==u.length)o(c,c.text.slice(0,s.ch)+u[0]+f.text.slice(l.ch),i(0)),e.remove(s.line+1,h);else{o(c,c.text.slice(0,s.ch)+u[0],i(0)),o(f,p+f.text.slice(l.ch),d);var m=a(1,u.length-1);h>1&&e.remove(s.line+1,h-1),e.insert(s.line+1,m)}ki(e,"change",e,t)}function qr(e){this.lines=e,this.parent=null;for(var t=0,n=0;t<e.length;++t)e[t].parent=this,n+=e[t].height;this.height=n}function zr(e){this.children=e;for(var t=0,n=0,r=0;r<e.length;++r){var i=e[r];t+=i.chunkSize(),n+=i.height,i.parent=this}this.size=t,this.height=n,this.parent=null}function Kr(e,t,n){function r(e,i,o){if(e.linked)for(var a=0;a<e.linked.length;++a){var s=e.linked[a];if(s.doc!=i){var l=o&&s.sharedHist;(!n||l)&&(t(s.doc,l),r(s.doc,e,l))}}}r(e,null,!0)}function Yr(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,a(e),n(e),e.options.lineWrapping||p(e),e.options.mode=t.modeOption,Dt(e)}function Jr(e,t){if(t-=e.first,0>t||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(o>t){n=i;break}t-=o}return n.lines[t]}function $r(e,t,n){var r=[],i=t.line;return e.iter(t.line,n.line+1,function(e){var o=e.text;i==n.line&&(o=o.slice(0,n.ch)),i==t.line&&(o=o.slice(t.ch)),r.push(o),++i}),r}function Xr(e,t,n){var r=[];return e.iter(t,n,function(e){r.push(e.text)}),r}function Zr(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function ei(e){if(null==e.parent)return null;for(var t=e.parent,n=Mi(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var i=0;r.children[i]!=t;++i)n+=r.children[i].chunkSize();return n+t.first}function ti(e,t){var n=e.first;e:do{for(var r=0;r<e.children.length;++r){var i=e.children[r],o=i.height;if(o>t){e=i;continue e}t-=o,n+=i.chunkSize()}return n}while(!e.lines);for(var r=0;r<e.lines.length;++r){var a=e.lines[r],s=a.height;if(s>t)break;t-=s}return n+r}function ni(e){e=gr(e);for(var t=0,n=e.parent,r=0;r<n.lines.length;++r){var i=n.lines[r];if(i==e)break;t+=i.height}for(var o=n.parent;o;n=o,o=n.parent)for(var r=0;r<o.children.length;++r){var a=o.children[r];if(a==n)break;t+=a.height}return t}function ri(e){var t=e.order;return null==t&&(t=e.order=os(e.text)),t}function ii(e){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function oi(e,t){var n={from:z(t.from),to:$o(t),text:$r(e,t.from,t.to)};return pi(e,n,t.from.line,t.to.line+1),Kr(e,function(e){pi(e,n,t.from.line,t.to.line+1)},!0),n}function ai(e){for(;e.length;){var t=Oi(e);if(!t.ranges)break;e.pop()}}function si(e,t){return t?(ai(e.done),Oi(e.done)):e.done.length&&!Oi(e.done).ranges?Oi(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),Oi(e.done)):void 0}function li(e,t,n,r){var i=e.history;i.undone.length=0;var o,a=+new Date;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&e.cm&&i.lastModTime>a-e.cm.options.historyEventDelay||"*"==t.origin.charAt(0)))&&(o=si(i,i.lastOp==r))){var s=Oi(o.changes);0==Go(t.from,t.to)&&0==Go(t.from,s.to)?s.to=$o(t):o.changes.push(oi(e,t))}else{var l=Oi(i.done);for(l&&l.ranges||fi(e.sel,i.done),o={changes:[oi(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=a,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,s||Oa(e,"historyAdded")}function ui(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)}function ci(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||ui(e,o,Oi(i.done),t))?i.done[i.done.length-1]=t:fi(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&r.clearRedo!==!1&&ai(i.undone)}function fi(e,t){var n=Oi(t);n&&n.ranges&&n.equals(e)||t.push(e)}function pi(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 di(e){if(!e)return null;
for(var t,n=0;n<e.length;++n)e[n].marker.explicitlyCleared?t||(t=e.slice(0,n)):t&&t.push(e[n]);return t?t.length?t:null:e}function hi(e,t){var n=t["spans_"+e.id];if(!n)return null;for(var r=0,i=[];r<t.text.length;++r)i.push(di(n[r]));return i}function mi(e,t,n){for(var r=0,i=[];r<e.length;++r){var o=e[r];if(o.ranges)i.push(n?fe.prototype.deepCopy.call(o):o);else{var a=o.changes,s=[];i.push({changes:s});for(var l=0;l<a.length;++l){var u,c=a[l];if(s.push({from:c.from,to:c.to,text:c.text}),t)for(var f in c)(u=f.match(/^spans_(\d+)$/))&&Mi(t,Number(u[1]))>-1&&(Oi(s)[f]=c[f],delete c[f])}}}return i}function vi(e,t,n,r){n<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function gi(e,t,n,r){for(var i=0;i<e.length;++i){var o=e[i],a=!0;if(o.ranges){o.copied||(o=e[i]=o.deepCopy(),o.copied=!0);for(var s=0;s<o.ranges.length;s++)vi(o.ranges[s].anchor,t,n,r),vi(o.ranges[s].head,t,n,r)}else{for(var s=0;s<o.changes.length;++s){var l=o.changes[s];if(n<l.from.line)l.from=Po(l.from.line+r,l.from.ch),l.to=Po(l.to.line+r,l.to.ch);else if(t<=l.to.line){a=!1;break}}a||(e.splice(0,i+1),i=0)}}}function yi(e,t){var n=t.from.line,r=t.to.line,i=t.text.length-(r-n)-1;gi(e.done,n,r,i),gi(e.undone,n,r,i)}function bi(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function wi(e){return e.target||e.srcElement}function xi(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),No&&e.ctrlKey&&1==t&&(t=3),t}function Ti(e,t,n){var r=e._handlers&&e._handlers[t];return n?r&&r.length>0?r.slice():Na:r||Na}function ki(e,t){function n(e){return function(){e.apply(null,o)}}var r=Ti(e,t,!1);if(r.length){var i,o=Array.prototype.slice.call(arguments,2);Uo?i=Uo.delayedCallbacks:Ma?i=Ma:(i=Ma=[],setTimeout(Li,0));for(var a=0;a<r.length;++a)i.push(n(r[a]))}}function Li(){var e=Ma;Ma=null;for(var t=0;t<e.length;++t)e[t]()}function Si(e,t,n){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Oa(e,n||t.type,e,t),bi(t)||t.codemirrorIgnore}function Ci(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)-1==Mi(n,t[r])&&n.push(t[r])}function Ei(e,t){return Ti(e,t).length>0}function _i(e){e.prototype.on=function(e,t){_a(this,e,t)},e.prototype.off=function(e,t){Aa(this,e,t)}}function Ni(){this.id=null}function Ai(e){for(;Ra.length<=e;)Ra.push(Oi(Ra)+" ");return Ra[e]}function Oi(e){return e[e.length-1]}function Mi(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}function Ii(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function Di(){}function Fi(e,t){var n;return Object.create?n=Object.create(e):(Di.prototype=e,n=new Di),t&&Pi(t,n),n}function Pi(e,t,n){t||(t={});for(var r in e)!e.hasOwnProperty(r)||n===!1&&t.hasOwnProperty(r)||(t[r]=e[r]);return t}function Gi(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function ji(e,t){return t?t.source.indexOf("\\w")>-1&&Wa(e)?!0:t.test(e):Wa(e)}function Qi(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}function Ri(e){return e.charCodeAt(0)>=768&&Ha.test(e)}function Vi(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.length;++o)i.appendChild(t[o]);return i}function Bi(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function Ui(e,t){return Bi(e).appendChild(t)}function Wi(){for(var e=document.activeElement;e&&e.root&&e.root.activeElement;)e=e.root.activeElement;return e}function Hi(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function qi(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!Hi(n[r]).test(t)&&(t+=" "+n[r]);return t}function zi(e){if(document.body.getElementsByClassName)for(var t=document.body.getElementsByClassName("CodeMirror"),n=0;n<t.length;n++){var r=t[n].CodeMirror;r&&e(r)}}function Ki(){$a||(Yi(),$a=!0)}function Yi(){var e;_a(window,"resize",function(){null==e&&(e=setTimeout(function(){e=null,zi(Ut)},100))}),_a(window,"blur",function(){zi(gn)})}function Ji(e){if(null==za){var t=Vi("span","");Ui(e,Vi("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(za=t.offsetWidth<=1&&t.offsetHeight>2&&!(yo&&8>bo))}var n=za?Vi("span",""):Vi("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function $i(e){if(null!=Ka)return Ka;var t=Ui(e,document.createTextNode("AخA")),n=Ba(t,0,1).getBoundingClientRect();if(!n||n.left==n.right)return!1;var r=Ba(t,1,2).getBoundingClientRect();return Ka=r.right-n.right<3}function Xi(e){if(null!=ns)return ns;var t=Ui(e,Vi("span","x")),n=t.getBoundingClientRect(),r=Ba(t,0,1).getBoundingClientRect();return ns=Math.abs(n.left-r.left)>1}function Zi(e,t,n,r){if(!e)return r(t,n,"ltr");for(var i=!1,o=0;o<e.length;++o){var a=e[o];(a.from<n&&a.to>t||t==n&&a.to==t)&&(r(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr"),i=!0)}i||r(t,n,"ltr")}function eo(e){return e.level%2?e.to:e.from}function to(e){return e.level%2?e.from:e.to}function no(e){var t=ri(e);return t?eo(t[0]):0}function ro(e){var t=ri(e);return t?to(Oi(t)):e.text.length}function io(e,t){var n=Jr(e.doc,t),r=gr(n);r!=n&&(t=ei(r));var i=ri(r),o=i?i[0].level%2?ro(r):no(r):0;return Po(t,o)}function oo(e,t){for(var n,r=Jr(e.doc,t);n=mr(r);)r=n.find(1,!0).line,t=null;var i=ri(r),o=i?i[0].level%2?no(r):ro(r):r.text.length;return Po(null==t?ei(r):t,o)}function ao(e,t){var n=io(e,t.line),r=Jr(e.doc,n.line),i=ri(r);if(!i||0==i[0].level){var o=Math.max(0,r.text.search(/\S/)),a=t.line==n.line&&t.ch<=o&&t.ch;return Po(n.line,a?0:o)}return n}function so(e,t,n){var r=e[0].level;return t==r?!0:n==r?!1:n>t}function lo(e,t){is=null;for(var n,r=0;r<e.length;++r){var i=e[r];if(i.from<t&&i.to>t)return r;if(i.from==t||i.to==t){if(null!=n)return so(e,i.level,e[n].level)?(i.from!=i.to&&(is=n),r):(i.from!=i.to&&(is=r),n);n=r}}return n}function uo(e,t,n,r){if(!r)return t+n;do t+=n;while(t>0&&Ri(e.text.charAt(t)));return t}function co(e,t,n,r){var i=ri(e);if(!i)return fo(e,t,n,r);for(var o=lo(i,t),a=i[o],s=uo(e,t,a.level%2?-n:n,r);;){if(s>a.from&&s<a.to)return s;if(s==a.from||s==a.to)return lo(i,s)==o?s:(a=i[o+=n],n>0==a.level%2?a.to:a.from);if(a=i[o+=n],!a)return null;s=n>0==a.level%2?uo(e,a.to,-1,r):uo(e,a.from,1,r)}}function fo(e,t,n,r){var i=t+n;if(r)for(;i>0&&Ri(e.text.charAt(i));)i+=n;return 0>i||i>e.text.length?null:i}var po=navigator.userAgent,ho=navigator.platform,mo=/gecko\/\d/i.test(po),vo=/MSIE \d/.test(po),go=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(po),yo=vo||go,bo=yo&&(vo?document.documentMode||6:go[1]),wo=/WebKit\//.test(po),xo=wo&&/Qt\/\d+\.\d+/.test(po),To=/Chrome\//.test(po),ko=/Opera\//.test(po),Lo=/Apple Computer/.test(navigator.vendor),So=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(po),Co=/PhantomJS/.test(po),Eo=/AppleWebKit/.test(po)&&/Mobile\/\w+/.test(po),_o=Eo||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(po),No=Eo||/Mac/.test(ho),Ao=/win/i.test(ho),Oo=ko&&po.match(/Version\/(\d*\.\d*)/);Oo&&(Oo=Number(Oo[1])),Oo&&Oo>=15&&(ko=!1,wo=!0);var Mo=No&&(xo||ko&&(null==Oo||12.11>Oo)),Io=mo||yo&&bo>=9,Do=!1,Fo=!1;m.prototype=Pi({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=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}},setScrollLeft:function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz)},setScrollTop:function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert)},zeroWidthHack:function(){var e=No&&!So?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Ni,this.disableVert=new Ni},enableZeroWidthBar:function(e,t){function n(){var r=e.getBoundingClientRect(),i=document.elementFromPoint(r.left+1,r.bottom-1);i!=e?e.style.pointerEvents="none":t.set(1e3,n)}e.style.pointerEvents="auto",t.set(1e3,n)},clear:function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)}},m.prototype),v.prototype=Pi({update:function(){return{bottom:0,right:0}},setScrollLeft:function(){},setScrollTop:function(){},clear:function(){}},v.prototype),e.scrollbarModel={"native":m,"null":v},S.prototype.signal=function(e,t){Ei(e,t)&&this.events.push(arguments)},S.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Oa.apply(null,this.events[e])};var Po=e.Pos=function(e,t){return this instanceof Po?(this.line=e,void(this.ch=t)):new Po(e,t)},Go=e.cmpPos=function(e,t){return e.line-t.line||e.ch-t.ch},jo=null;re.prototype=Pi({init:function(e){function t(e){if(r.somethingSelected())jo=r.getSelections(),n.inaccurateSelection&&(n.prevInput="",n.inaccurateSelection=!1,o.value=jo.join("\n"),Va(o));else{if(!r.options.lineWiseCopyCut)return;var t=te(r);jo=t.text,"cut"==e.type?r.setSelections(t.ranges,null,Fa):(n.prevInput="",o.value=t.text.join("\n"),Va(o))}"cut"==e.type&&(r.state.cutIncoming=!0)}var n=this,r=this.cm,i=this.wrapper=ie(),o=this.textarea=i.firstChild;e.wrapper.insertBefore(i,e.wrapper.firstChild),Eo&&(o.style.width="0px"),_a(o,"input",function(){yo&&bo>=9&&n.hasSelection&&(n.hasSelection=null),n.poll()}),_a(o,"paste",function(e){return Z(e,r)?!0:(r.state.pasteIncoming=!0,void n.fastPoll())}),_a(o,"cut",t),_a(o,"copy",t),_a(e.scroller,"paste",function(t){Wt(e,t)||(r.state.pasteIncoming=!0,n.focus())}),_a(e.lineSpace,"selectstart",function(t){Wt(e,t)||Sa(t)}),_a(o,"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"})}}),_a(o,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},prepareSelection:function(){var e=this.cm,t=e.display,n=e.doc,r=De(e);if(e.options.moveInputWithCursor){var i=pt(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},showSelection:function(e){var t=this.cm,n=t.display;Ui(n.cursorDiv,e.cursors),Ui(n.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},reset:function(e){if(!this.contextMenuPending){var t,n,r=this.cm,i=r.doc;if(r.somethingSelected()){this.prevInput="";var o=i.sel.primary();t=ts&&(o.to().line-o.from().line>100||(n=r.getSelection()).length>1e3);var a=t?"-":n||r.getSelection();this.textarea.value=a,r.state.focused&&Va(this.textarea),yo&&bo>=9&&(this.hasSelection=a)}else e||(this.prevInput=this.textarea.value="",yo&&bo>=9&&(this.hasSelection=null));this.inaccurateSelection=t}},getField:function(){return this.textarea},supportsTouch:function(){return!1},focus:function(){if("nocursor"!=this.cm.options.readOnly&&(!_o||Wi()!=this.textarea))try{this.textarea.focus()}catch(e){}},blur:function(){this.textarea.blur()},resetPosition:function(){this.wrapper.style.top=this.wrapper.style.left=0},receivedFocus:function(){this.slowPoll()},slowPoll:function(){var e=this;e.pollingFast||e.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},fastPoll:function(){function e(){var r=n.poll();r||t?(n.pollingFast=!1,n.slowPoll()):(t=!0,n.polling.set(60,e))}var t=!1,n=this;n.pollingFast=!0,n.polling.set(20,e)},poll:function(){var e=this.cm,t=this.textarea,n=this.prevInput;if(this.contextMenuPending||!e.state.focused||es(t)&&!n&&!this.composing||$(e)||e.options.disableInput||e.state.keySeq)return!1;var r=t.value;if(r==n&&!e.somethingSelected())return!1;if(yo&&bo>=9&&this.hasSelection===r||No&&/[\uf700-\uf7ff]/.test(r))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var i=r.charCodeAt(0);if(8203!=i||n||(n=""),8666==i)return this.reset(),this.cm.execCommand("undo")}for(var o=0,a=Math.min(n.length,r.length);a>o&&n.charCodeAt(o)==r.charCodeAt(o);)++o;var s=this;return _t(e,function(){X(e,r.slice(o),n.length-o,null,s.composing?"*compose":null),r.length>1e3||r.indexOf("\n")>-1?t.value=s.prevInput="":s.prevInput=r,s.composing&&(s.composing.range.clear(),s.composing.range=e.markText(s.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ensurePolled:function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},onKeyPress:function(){yo&&bo>=9&&(this.hasSelection=null),this.fastPoll()},onContextMenu:function(e){function t(){if(null!=a.selectionStart){var e=i.somethingSelected(),t=""+(e?a.value:"");a.value="⇚",a.value=t,r.prevInput=e?"":"",a.selectionStart=1,a.selectionEnd=t.length,o.selForContextMenu=i.doc.sel}}function n(){if(r.contextMenuPending=!1,r.wrapper.style.position="relative",a.style.cssText=c,yo&&9>bo&&o.scrollbars.setScrollTop(o.scroller.scrollTop=l),null!=a.selectionStart){(!yo||yo&&9>bo)&&t();var e=0,n=function(){o.selForContextMenu==i.doc.sel&&0==a.selectionStart&&a.selectionEnd>0&&""==r.prevInput?Nt(i,la.selectAll)(i):e++<10?o.detectingSelectAll=setTimeout(n,500):o.input.reset()};o.detectingSelectAll=setTimeout(n,200)}}var r=this,i=r.cm,o=i.display,a=r.textarea,s=Ht(i,e),l=o.scroller.scrollTop;if(s&&!ko){var u=i.options.resetSelectionOnContextMenu;u&&-1==i.doc.sel.contains(s)&&Nt(i,Ee)(i.doc,he(s),Fa);var c=a.style.cssText;if(r.wrapper.style.position="absolute",a.style.cssText="position: fixed; width: 30px; height: 30px; top: "+(e.clientY-5)+"px; left: "+(e.clientX-5)+"px; z-index: 1000; background: "+(yo?"rgba(255, 255, 255, .05)":"transparent")+"; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",wo)var f=window.scrollY;if(o.input.focus(),wo&&window.scrollTo(null,f),o.input.reset(),i.somethingSelected()||(a.value=r.prevInput=" "),r.contextMenuPending=!0,o.selForContextMenu=i.doc.sel,clearTimeout(o.detectingSelectAll),yo&&bo>=9&&t(),Io){Ea(e);var p=function(){Aa(window,"mouseup",p),setTimeout(n,20)};_a(window,"mouseup",p)}else setTimeout(n,50)}},readOnlyChanged:function(e){e||this.reset()},setUneditable:Di,needsContentAttribute:!1},re.prototype),oe.prototype=Pi({init:function(e){function t(e){if(r.somethingSelected())jo=r.getSelections(),"cut"==e.type&&r.replaceSelection("",null,"cut");else{if(!r.options.lineWiseCopyCut)return;var t=te(r);jo=t.text,"cut"==e.type&&r.operation(function(){r.setSelections(t.ranges,0,Fa),r.replaceSelection("",null,"cut")})}if(e.clipboardData&&!Eo)e.preventDefault(),e.clipboardData.clearData(),e.clipboardData.setData("text/plain",jo.join("\n"));else{var n=ie(),i=n.firstChild;r.display.lineSpace.insertBefore(n,r.display.lineSpace.firstChild),i.value=jo.join("\n");var o=document.activeElement;Va(i),setTimeout(function(){r.display.lineSpace.removeChild(n),o.focus()},50)}}var n=this,r=n.cm,i=n.div=e.lineDiv;ne(i),_a(i,"paste",function(e){Z(e,r)}),_a(i,"compositionstart",function(e){var t=e.data;if(n.composing={sel:r.doc.sel,data:t,startData:t},t){var i=r.doc.sel.primary(),o=r.getLine(i.head.line),a=o.indexOf(t,Math.max(0,i.head.ch-t.length));a>-1&&a<=i.head.ch&&(n.composing.sel=he(Po(i.head.line,a),Po(i.head.line,a+t.length)))}}),_a(i,"compositionupdate",function(e){n.composing.data=e.data}),_a(i,"compositionend",function(e){var t=n.composing;t&&(e.data==t.startData||/\u200b/.test(e.data)||(t.data=e.data),setTimeout(function(){t.handled||n.applyComposition(t),n.composing==t&&(n.composing=null)},50))}),_a(i,"touchstart",function(){n.forceCompositionEnd()}),_a(i,"input",function(){n.composing||($(r)||!n.pollContent())&&_t(n.cm,function(){Dt(r)})}),_a(i,"copy",t),_a(i,"cut",t)},prepareSelection:function(){var e=De(this.cm,!1);return e.focus=this.cm.state.focused,e},showSelection:function(e){e&&this.cm.display.view.length&&(e.focus&&this.showPrimarySelection(),this.showMultipleSelections(e))},showPrimarySelection:function(){var e=window.getSelection(),t=this.cm.doc.sel.primary(),n=le(this.cm,e.anchorNode,e.anchorOffset),r=le(this.cm,e.focusNode,e.focusOffset);if(!n||n.bad||!r||r.bad||0!=Go(Y(n,r),t.from())||0!=Go(K(n,r),t.to())){var i=ae(this.cm,t.from()),o=ae(this.cm,t.to());if(i||o){var a=this.cm.display.view,s=e.rangeCount&&e.getRangeAt(0);if(i){if(!o){var l=a[a.length-1].measure,u=l.maps?l.maps[l.maps.length-1]:l.map;o={node:u[u.length-1],offset:u[u.length-2]-u[u.length-3]}}}else i={node:a[0].measure.map[2],offset:0};try{var c=Ba(i.node,i.offset,o.offset,o.node)}catch(f){}c&&(e.removeAllRanges(),e.addRange(c),s&&null==e.anchorNode?e.addRange(s):mo&&this.startGracePeriod()),this.rememberSelection()}}},startGracePeriod:function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){e.cm.curOp.selectionChanged=!0})},20)},showMultipleSelections:function(e){Ui(this.cm.display.cursorDiv,e.cursors),Ui(this.cm.display.selectionDiv,e.selection)},rememberSelection:function(){var e=window.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},selectionInEditor:function(){var e=window.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return qa(this.div,t)},focus:function(){"nocursor"!=this.cm.options.readOnly&&this.div.focus()},blur:function(){this.div.blur()},getField:function(){return this.div},supportsTouch:function(){return!0},receivedFocus:function(){function e(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,e))}var t=this;this.selectionInEditor()?this.pollSelection():_t(this.cm,function(){t.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,e)},selectionChanged:function(){var e=window.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},pollSelection:function(){if(!this.composing&&!this.gracePeriod&&this.selectionChanged()){var e=window.getSelection(),t=this.cm;this.rememberSelection();var n=le(t,e.anchorNode,e.anchorOffset),r=le(t,e.focusNode,e.focusOffset);n&&r&&_t(t,function(){Ee(t.doc,he(n,r),Fa),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)})}},pollContent:function(){var e=this.cm,t=e.display,n=e.doc.sel.primary(),r=n.from(),i=n.to();if(r.line<t.viewFrom||i.line>t.viewTo-1)return!1;var o;if(r.line==t.viewFrom||0==(o=Gt(e,r.line)))var a=ei(t.view[0].line),s=t.view[0].node;else var a=ei(t.view[o].line),s=t.view[o-1].node.nextSibling;var l=Gt(e,i.line);if(l==t.view.length-1)var u=t.viewTo-1,c=t.lineDiv.lastChild;else var u=ei(t.view[l+1].line)-1,c=t.view[l+1].node.previousSibling;for(var f=e.doc.splitLines(ce(e,s,c,a,u)),p=$r(e.doc,Po(a,0),Po(u,Jr(e.doc,u).text.length));f.length>1&&p.length>1;)if(Oi(f)==Oi(p))f.pop(),p.pop(),u--;else{if(f[0]!=p[0])break;f.shift(),p.shift(),a++}for(var d=0,h=0,m=f[0],v=p[0],g=Math.min(m.length,v.length);g>d&&m.charCodeAt(d)==v.charCodeAt(d);)++d;for(var y=Oi(f),b=Oi(p),w=Math.min(y.length-(1==f.length?d:0),b.length-(1==p.length?d:0));w>h&&y.charCodeAt(y.length-h-1)==b.charCodeAt(b.length-h-1);)++h;f[f.length-1]=y.slice(0,y.length-h),f[0]=f[0].slice(d);var x=Po(a,d),T=Po(u,p.length?Oi(p).length-h:0);return f.length>1||f[0]||Go(x,T)?(On(e.doc,f,x,T,"+input"),!0):void 0},ensurePolled:function(){this.forceCompositionEnd()},reset:function(){this.forceCompositionEnd()},forceCompositionEnd:function(){this.composing&&!this.composing.handled&&(this.applyComposition(this.composing),this.composing.handled=!0,this.div.blur(),this.div.focus())},applyComposition:function(e){$(this.cm)?Nt(this.cm,Dt)(this.cm):e.data&&e.data!=e.startData&&Nt(this.cm,X)(this.cm,e.data,0,e.sel)},setUneditable:function(e){e.contentEditable="false"},onKeyPress:function(e){e.preventDefault(),$(this.cm)||Nt(this.cm,X)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0)},readOnlyChanged:function(e){this.div.contentEditable=String("nocursor"!=e)},onContextMenu:Di,resetPosition:Di,needsContentAttribute:!0},oe.prototype),e.inputStyles={textarea:re,contenteditable:oe},fe.prototype={primary:function(){return this.ranges[this.primIndex]},equals:function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var n=this.ranges[t],r=e.ranges[t];if(0!=Go(n.anchor,r.anchor)||0!=Go(n.head,r.head))return!1}return!0},deepCopy:function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new pe(z(this.ranges[t].anchor),z(this.ranges[t].head));return new fe(e,this.primIndex)},somethingSelected:function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},contains:function(e,t){t||(t=e);for(var n=0;n<this.ranges.length;n++){var r=this.ranges[n];if(Go(t,r.from())>=0&&Go(e,r.to())<=0)return n}return-1}},pe.prototype={from:function(){return Y(this.anchor,this.head)},to:function(){return K(this.anchor,this.head)},empty:function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}};var Qo,Ro,Vo,Bo={left:0,right:0,top:0,bottom:0},Uo=null,Wo=0,Ho=0,qo=0,zo=null;yo?zo=-.53:mo?zo=15:To?zo=-.7:Lo&&(zo=-1/3);var Ko=function(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}};e.wheelEventPixels=function(e){var t=Ko(e);return t.x*=zo,t.y*=zo,t};var Yo=new Ni,Jo=null,$o=e.changeEnd=function(e){return e.text?Po(e.from.line+e.text.length-1,Oi(e.text).length+(1==e.text.length?e.from.ch:0)):e.to};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,t){var n=this.options,r=n[e];(n[e]!=t||"mode"==e)&&(n[e]=t,Zo.hasOwnProperty(e)&&Nt(this,Zo[e])(this,t,r))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](qn(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;n<t.length;++n)if(t[n]==e||t[n].name==e)return t.splice(n,1),!0},addOverlay:At(function(t,n){var r=t.token?t:e.getMode(this.options,t);if(r.startState)throw new Error("Overlays may not be stateful.");this.state.overlays.push({mode:r,modeSpec:t,opaque:n&&n.opaque}),this.state.modeGen++,Dt(this)}),removeOverlay:At(function(e){for(var t=this.state.overlays,n=0;n<t.length;++n){var r=t[n].modeSpec;if(r==e||"string"==typeof e&&r.name==e)return t.splice(n,1),this.state.modeGen++,void Dt(this)}}),indentLine:At(function(e,t,n){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),ye(this.doc,e)&&Qn(this,e,t,n)}),indentSelection:At(function(e){for(var t=this.doc.sel.ranges,n=-1,r=0;r<t.length;r++){var i=t[r];if(i.empty())i.head.line>n&&(Qn(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&Gn(this));else{var o=i.from(),a=i.to(),s=Math.max(n,o.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var l=s;n>l;++l)Qn(this,l,e);var u=this.doc.sel.ranges;0==o.ch&&t.length==u.length&&u[r].from().ch>0&&ke(this.doc,r,new pe(o,u[r].to()),Fa)}}}),getTokenAt:function(e,t){return Or(this,e,t)},getLineTokens:function(e,t){return Or(this,Po(e),t,!0)},getTokenTypeAt:function(e){e=ve(this.doc,e);var t,n=Dr(this,Jr(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)){t=n[2*a+2];break}r=a+1}}var s=t?t.indexOf("cm-overlay "):-1;return 0>s?t:0==s?null:t.slice(0,s-1)},getModeAt:function(t){var n=this.doc.mode;return n.innerMode?e.innerMode(n,this.getTokenAt(t).state).mode:n},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var n=[];if(!oa.hasOwnProperty(t))return n;var r=oa[t],i=this.getModeAt(e);if("string"==typeof i[t])r[i[t]]&&n.push(r[i[t]]);else if(i[t])for(var o=0;o<i[t].length;o++){var a=r[i[t][o]];a&&n.push(a)}else i.helperType&&r[i.helperType]?n.push(r[i.helperType]):r[i.name]&&n.push(r[i.name]);for(var o=0;o<r._global.length;o++){var s=r._global[o];s.pred(i,this)&&-1==Mi(n,s.val)&&n.push(s.val)}return n},getStateAfter:function(e,t){var n=this.doc;return e=me(n,null==e?n.first+n.size-1:e),Ve(this,e+1,t)},cursorCoords:function(e,t){var n,r=this.doc.sel.primary();return n=null==e?r.head:"object"==typeof e?ve(this.doc,e):e?r.from():r.to(),pt(this,n,t||"page")},charCoords:function(e,t){return ft(this,ve(this.doc,e),t||"page")},coordsChar:function(e,t){return e=ct(this,e,t||"page"),mt(this,e.left,e.top)},lineAtHeight:function(e,t){return e=ct(this,{top:e,left:0},t||"page").top,ti(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t){var n,r=!1;if("number"==typeof e){var i=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>i&&(e=i,r=!0),n=Jr(this.doc,e)}else n=e;return ut(this,n,{top:0,left:0},t||"page").top+(r?this.doc.height-ni(n):0)},defaultTextHeight:function(){return gt(this.display)},defaultCharWidth:function(){return yt(this.display)},setGutterMarker:At(function(e,t,n){return Rn(this.doc,e,"gutter",function(e){var r=e.gutterMarkers||(e.gutterMarkers={});return r[t]=n,!n&&Qi(r)&&(e.gutterMarkers=null),!0})}),clearGutter:At(function(e){var t=this,n=t.doc,r=n.first;n.iter(function(n){n.gutterMarkers&&n.gutterMarkers[e]&&(n.gutterMarkers[e]=null,Ft(t,r,"gutter"),Qi(n.gutterMarkers)&&(n.gutterMarkers=null)),++r})}),lineInfo:function(e){if("number"==typeof e){if(!ye(this.doc,e))return null;var t=e;if(e=Jr(this.doc,e),!e)return null}else{var t=ei(e);if(null==t)return null}return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var o=this.display;e=pt(this,ve(this.doc,e));var a=e.bottom,s=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==r)a=e.top;else if("above"==r||"near"==r){var l=Math.max(o.wrapper.clientHeight,this.doc.height),u=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>l)&&e.top>t.offsetHeight?a=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=l&&(a=e.bottom),s+t.offsetWidth>u&&(s=u-t.offsetWidth)}t.style.top=a+"px",t.style.left=t.style.right="","right"==i?(s=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?s=0:"middle"==i&&(s=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=s+"px"),n&&Dn(this,s,a,s+t.offsetWidth,a+t.offsetHeight)},triggerOnKeyDown:At(fn),triggerOnKeyPress:At(hn),triggerOnKeyUp:dn,execCommand:function(e){return la.hasOwnProperty(e)?la[e].call(null,this):void 0},triggerElectric:At(function(e){ee(this,e)}),findPosH:function(e,t,n,r){var i=1;0>t&&(i=-1,t=-t);for(var o=0,a=ve(this.doc,e);t>o&&(a=Bn(this.doc,a,i,n,r),!a.hitSide);++o);return a},moveH:At(function(e,t){var n=this;n.extendSelectionsBy(function(r){return n.display.shift||n.doc.extend||r.empty()?Bn(n.doc,r.head,e,t,n.options.rtlMoveVisually):0>e?r.from():r.to()},Ga)}),deleteH:At(function(e,t){var n=this.doc.sel,r=this.doc;n.somethingSelected()?r.replaceSelection("",null,"+delete"):Vn(this,function(n){var i=Bn(r,n.head,e,t,!1);return 0>e?{from:i,to:n.head}:{from:n.head,to:i}})}),findPosV:function(e,t,n,r){var i=1,o=r;0>t&&(i=-1,t=-t);for(var a=0,s=ve(this.doc,e);t>a;++a){var l=pt(this,s,"div");if(null==o?o=l.left:l.left=o,s=Un(this,l,i,n),s.hitSide)break}return s},moveV:At(function(e,t){var n=this,r=this.doc,i=[],o=!n.display.shift&&!r.extend&&r.sel.somethingSelected();if(r.extendSelectionsBy(function(a){if(o)return 0>e?a.from():a.to();var s=pt(n,a.head,"div");null!=a.goalColumn&&(s.left=a.goalColumn),i.push(s.left);var l=Un(n,s,e,t);return"page"==t&&a==r.sel.primary()&&Pn(n,null,ft(n,l,"div").top-s.top),l},Ga),i.length)for(var a=0;a<r.sel.ranges.length;a++)r.sel.ranges[a].goalColumn=i[a]}),findWordAt:function(e){var t=this.doc,n=Jr(t,e.line).text,r=e.ch,i=e.ch;if(n){var o=this.getHelper(e,"wordChars");(e.xRel<0||i==n.length)&&r?--r:++i;for(var a=n.charAt(r),s=ji(a,o)?function(e){return ji(e,o)}:/\s/.test(a)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!ji(e)};r>0&&s(n.charAt(r-1));)--r;for(;i<n.length&&s(n.charAt(i));)++i}return new pe(Po(e.line,r),Po(e.line,i))},toggleOverwrite:function(e){(null==e||e!=this.state.overwrite)&&((this.state.overwrite=!this.state.overwrite)?Ja(this.display.cursorDiv,"CodeMirror-overwrite"):Ya(this.display.cursorDiv,"CodeMirror-overwrite"),Oa(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Wi()},scrollTo:At(function(e,t){(null!=e||null!=t)&&jn(this),null!=e&&(this.curOp.scrollLeft=e),null!=t&&(this.curOp.scrollTop=t)}),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-He(this)-this.display.barHeight,width:e.scrollWidth-He(this)-this.display.barWidth,clientHeight:ze(this),clientWidth:qe(this)}},scrollIntoView:At(function(e,t){if(null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:Po(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line)jn(this),this.curOp.scrollToPos=e;else{var n=Fn(this,Math.min(e.from.left,e.to.left),Math.min(e.from.top,e.to.top)-e.margin,Math.max(e.from.right,e.to.right),Math.max(e.from.bottom,e.to.bottom)+e.margin);this.scrollTo(n.scrollLeft,n.scrollTop)}}),setSize:At(function(e,t){function n(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e}var r=this;null!=e&&(r.display.wrapper.style.width=n(e)),null!=t&&(r.display.wrapper.style.height=n(t)),r.options.lineWrapping&&ot(this);var i=r.display.viewFrom;r.doc.iter(i,r.display.viewTo,function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){Ft(r,i,"widget");break}++i}),r.curOp.forceUpdate=!0,Oa(r,"refresh",this)}),operation:function(e){return _t(this,e)},refresh:At(function(){var e=this.display.cachedTextHeight;Dt(this),this.curOp.forceUpdate=!0,at(this),this.scrollTo(this.doc.scrollLeft,this.doc.scrollTop),c(this),(null==e||Math.abs(e-gt(this.display))>.5)&&a(this),Oa(this,"refresh",this)}),swapDoc:At(function(e){var t=this.doc;return t.cm=null,Yr(this,e),at(this),this.display.input.reset(),this.scrollTo(e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,ki(this,"swapDoc",this,t),t}),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}},_i(e);var Xo=e.defaults={},Zo=e.optionHandlers={},ea=e.Init={toString:function(){return"CodeMirror.Init"}};Wn("value","",function(e,t){e.setValue(t)},!0),Wn("mode",null,function(e,t){e.doc.modeOption=t,n(e)},!0),Wn("indentUnit",2,n,!0),Wn("indentWithTabs",!1),Wn("smartIndent",!0),Wn("tabSize",4,function(e){r(e),at(e),Dt(e)},!0),Wn("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(Po(r,o))}r++});for(var i=n.length-1;i>=0;i--)On(e.doc,t,n[i],Po(n[i].line,n[i].ch+t.length))}}),Wn("specialChars",/[\t\u0000-\u0019\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g,function(t,n,r){t.state.specialChars=new RegExp(n.source+(n.test(" ")?"":"| "),"g"),r!=e.Init&&t.refresh()}),Wn("specialCharPlaceholder",jr,function(e){e.refresh()},!0),Wn("electricChars",!0),Wn("inputStyle",_o?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),Wn("rtlMoveVisually",!Ao),Wn("wholeLineUpdateBefore",!0),Wn("theme","default",function(e){s(e),l(e)},!0),Wn("keyMap","default",function(t,n,r){var i=qn(n),o=r!=e.Init&&qn(r);o&&o.detach&&o.detach(t,i),i.attach&&i.attach(t,o||null)}),Wn("extraKeys",null),Wn("lineWrapping",!1,i,!0),Wn("gutters",[],function(e){d(e.options),l(e)},!0),Wn("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?L(e.display)+"px":"0",e.refresh()},!0),Wn("coverGutterNextToScrollbar",!1,function(e){y(e)},!0),Wn("scrollbarStyle","native",function(e){g(e),y(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),Wn("lineNumbers",!1,function(e){d(e.options),l(e)},!0),Wn("firstLineNumber",1,l,!0),Wn("lineNumberFormatter",function(e){return e},l,!0),Wn("showCursorWhenSelecting",!1,Ie,!0),Wn("resetSelectionOnContextMenu",!0),Wn("lineWiseCopyCut",!0),Wn("readOnly",!1,function(e,t){"nocursor"==t?(gn(e),e.display.input.blur(),e.display.disabled=!0):e.display.disabled=!1,e.display.input.readOnlyChanged(t)}),Wn("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),Wn("dragDrop",!0,Bt),Wn("allowDropFileTypes",null),Wn("cursorBlinkRate",530),Wn("cursorScrollMargin",0),Wn("cursorHeight",1,Ie,!0),Wn("singleCursorHeightPerLine",!0,Ie,!0),Wn("workTime",100),Wn("workDelay",100),Wn("flattenSpans",!0,r,!0),Wn("addModeClass",!1,r,!0),Wn("pollInterval",100),Wn("undoDepth",200,function(e,t){e.doc.history.undoDepth=t}),Wn("historyEventDelay",1250),Wn("viewportMargin",10,function(e){e.refresh()},!0),Wn("maxHighlightLength",1e4,r,!0),Wn("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),Wn("tabindex",null,function(e,t){e.display.input.getField().tabIndex=t||""}),Wn("autofocus",null);var ta=e.modes={},na=e.mimeModes={};e.defineMode=function(t,n){e.defaults.mode||"null"==t||(e.defaults.mode=t),arguments.length>2&&(n.dependencies=Array.prototype.slice.call(arguments,2)),ta[t]=n},e.defineMIME=function(e,t){na[e]=t},e.resolveMode=function(t){if("string"==typeof t&&na.hasOwnProperty(t))t=na[t];else if(t&&"string"==typeof t.name&&na.hasOwnProperty(t.name)){var n=na[t.name];"string"==typeof n&&(n={name:n}),t=Fi(n,t),t.name=n.name}else if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return e.resolveMode("application/xml");return"string"==typeof t?{name:t}:t||{name:"null"}},e.getMode=function(t,n){var n=e.resolveMode(n),r=ta[n.name];if(!r)return e.getMode(t,"text/plain");var i=r(t,n);if(ra.hasOwnProperty(n.name)){var o=ra[n.name];for(var a in o)o.hasOwnProperty(a)&&(i.hasOwnProperty(a)&&(i["_"+a]=i[a]),i[a]=o[a])}if(i.name=n.name,n.helperType&&(i.helperType=n.helperType),n.modeProps)for(var a in n.modeProps)i[a]=n.modeProps[a];return i},e.defineMode("null",function(){return{token:function(e){e.skipToEnd()}}}),e.defineMIME("text/plain","null");var ra=e.modeExtensions={};e.extendMode=function(e,t){var n=ra.hasOwnProperty(e)?ra[e]:ra[e]={};Pi(t,n)},e.defineExtension=function(t,n){e.prototype[t]=n},e.defineDocExtension=function(e,t){Ta.prototype[e]=t},e.defineOption=Wn;var ia=[];e.defineInitHook=function(e){ia.push(e)};var oa=e.helpers={};e.registerHelper=function(t,n,r){oa.hasOwnProperty(t)||(oa[t]=e[t]={_global:[]}),oa[t][n]=r},e.registerGlobalHelper=function(t,n,r,i){e.registerHelper(t,n,i),oa[t]._global.push({pred:r,val:i})};var aa=e.copyState=function(e,t){if(t===!0)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},sa=e.startState=function(e,t,n){return e.startState?e.startState(t,n):!0};e.innerMode=function(e,t){for(;e.innerMode;){var n=e.innerMode(t);if(!n||n.mode==e)break;t=n.state,e=n.mode}return n||{mode:e,state:t}};var la=e.commands={selectAll:function(e){e.setSelection(Po(e.firstLine(),0),Po(e.lastLine()),Fa)},singleSelection:function(e){e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Fa)},killLine:function(e){Vn(e,function(t){if(t.empty()){var n=Jr(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line<e.lastLine()?{from:t.head,to:Po(t.head.line+1,0)}:{from:t.head,to:Po(t.head.line,n)}}return{from:t.from(),to:t.to()}})},deleteLine:function(e){Vn(e,function(t){return{from:Po(t.from().line,0),to:ve(e.doc,Po(t.to().line+1,0))}})},delLineLeft:function(e){Vn(e,function(e){return{from:Po(e.from().line,0),to:e.from()}})},delWrappedLineLeft:function(e){Vn(e,function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:n},"div");return{from:r,to:t.from()}})},delWrappedLineRight:function(e){Vn(e,function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div");return{from:t.from(),to:r}})},undo:function(e){e.undo()},redo:function(e){e.redo()},undoSelection:function(e){e.undoSelection()},redoSelection:function(e){e.redoSelection()},goDocStart:function(e){e.extendSelection(Po(e.firstLine(),0))},goDocEnd:function(e){e.extendSelection(Po(e.lastLine()))},goLineStart:function(e){e.extendSelectionsBy(function(t){return io(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){e.extendSelectionsBy(function(t){return ao(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){e.extendSelectionsBy(function(t){return oo(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){e.extendSelectionsBy(function(t){var n=e.charCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div")},Ga)},goLineLeft:function(e){e.extendSelectionsBy(function(t){var n=e.charCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:n},"div")},Ga)},goLineLeftSmart:function(e){e.extendSelectionsBy(function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:n},"div");return r.ch<e.getLine(r.line).search(/\S/)?ao(e,t.head):r},Ga)},goLineUp:function(e){e.moveV(-1,"line")},goLineDown:function(e){e.moveV(1,"line")},goPageUp:function(e){e.moveV(-1,"page")},goPageDown:function(e){e.moveV(1,"page")},goCharLeft:function(e){e.moveH(-1,"char")},goCharRight:function(e){e.moveH(1,"char")},goColumnLeft:function(e){e.moveH(-1,"column")},goColumnRight:function(e){e.moveH(1,"column")},goWordLeft:function(e){e.moveH(-1,"word")},goGroupRight:function(e){e.moveH(1,"group")},goGroupLeft:function(e){e.moveH(-1,"group")},goWordRight:function(e){e.moveH(1,"word")},delCharBefore:function(e){e.deleteH(-1,"char")},delCharAfter:function(e){e.deleteH(1,"char")},delWordBefore:function(e){e.deleteH(-1,"word")},delWordAfter:function(e){e.deleteH(1,"word")},delGroupBefore:function(e){e.deleteH(-1,"group")},delGroupAfter:function(e){e.deleteH(1,"group")},indentAuto:function(e){e.indentSelection("smart")},indentMore:function(e){e.indentSelection("add")},indentLess:function(e){e.indentSelection("subtract")},insertTab:function(e){e.replaceSelection(" ")},insertSoftTab:function(e){for(var t=[],n=e.listSelections(),r=e.options.tabSize,i=0;i<n.length;i++){var o=n[i].from(),a=ja(e.getLine(o.line),o.ch,r);t.push(new Array(r-a%r+1).join(" "))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){_t(e,function(){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++){var i=t[r].head,o=Jr(e.doc,i.line).text;if(o)if(i.ch==o.length&&(i=new Po(i.line,i.ch-1)),i.ch>0)i=new Po(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),Po(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=Jr(e.doc,i.line-1).text;a&&e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),Po(i.line-1,a.length-1),Po(i.line,1),"+transpose")}n.push(new pe(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){_t(e,function(){for(var t=e.listSelections().length,n=0;t>n;n++){var r=e.listSelections()[n];e.replaceRange(e.doc.lineSeparator(),r.anchor,r.head,"+input"),e.indentLine(r.from().line+1,null,!0)}Gn(e)})},toggleOverwrite:function(e){e.toggleOverwrite()}},ua=e.keyMap={};ua.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"},ua.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"},ua.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"},ua.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"]},ua["default"]=No?ua.macDefault:ua.pcDefault,e.normalizeKeyMap=function(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==r){delete e[n];continue}for(var i=Ii(n.split(" "),Hn),o=0;o<i.length;o++){var a,s;o==i.length-1?(s=i.join(" "),a=r):(s=i.slice(0,o+1).join(" "),a="...");var l=t[s];if(l){if(l!=a)throw new Error("Inconsistent bindings for "+s)}else t[s]=a}delete e[n]}for(var u in t)e[u]=t[u];return e};var ca=e.lookupKey=function(e,t,n,r){t=qn(t);var i=t.call?t.call(e,r):t[e];if(i===!1)return"nothing";if("..."===i)return"multi";if(null!=i&&n(i))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return ca(e,t.fallthrough,n,r);for(var o=0;o<t.fallthrough.length;o++){var a=ca(e,t.fallthrough[o],n,r);if(a)return a}}},fa=e.isModifierKey=function(e){var t="string"==typeof e?e:rs[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t},pa=e.keyName=function(e,t){if(ko&&34==e.keyCode&&e["char"])return!1;var n=rs[e.keyCode],r=n;return null==r||e.altGraphKey?!1:(e.altKey&&"Alt"!=n&&(r="Alt-"+r),(Mo?e.metaKey:e.ctrlKey)&&"Ctrl"!=n&&(r="Ctrl-"+r),(Mo?e.ctrlKey:e.metaKey)&&"Cmd"!=n&&(r="Cmd-"+r),!t&&e.shiftKey&&"Shift"!=n&&(r="Shift-"+r),r)};e.fromTextArea=function(t,n){function r(){t.value=u.getValue()}if(n=n?Pi(n):{},n.value=t.value,!n.tabindex&&t.tabIndex&&(n.tabindex=t.tabIndex),!n.placeholder&&t.placeholder&&(n.placeholder=t.placeholder),null==n.autofocus){var i=Wi();n.autofocus=i==t||null!=t.getAttribute("autofocus")&&i==document.body}if(t.form&&(_a(t.form,"submit",r),!n.leaveSubmitMethodAlone)){var o=t.form,a=o.submit;try{var s=o.submit=function(){r(),o.submit=a,o.submit(),o.submit=s}}catch(l){}}n.finishInit=function(e){e.save=r,e.getTextArea=function(){return t},e.toTextArea=function(){e.toTextArea=isNaN,r(),t.parentNode.removeChild(e.getWrapperElement()),t.style.display="",t.form&&(Aa(t.form,"submit",r),"function"==typeof t.form.submit&&(t.form.submit=a))}},t.style.display="none";var u=e(function(e){t.parentNode.insertBefore(e,t.nextSibling)},n);return u};var da=e.StringStream=function(e,t){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};da.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){return this.pos<this.string.length?this.string.charAt(this.pos++):void 0},eat:function(e){var t=this.string.charAt(this.pos);if("string"==typeof e)var n=t==e;else var n=t&&(e.test?e.test(t):e(t));return n?(++this.pos,t):void 0},eatWhile:function(e){for(var t=this.pos;this.eat(e););return this.pos>t},eatSpace:function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},skipToEnd:function(){this.pos=this.string.length},skipTo:function(e){var t=this.string.indexOf(e,this.pos);return t>-1?(this.pos=t,!0):void 0},backUp:function(e){this.pos-=e},column:function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=ja(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?ja(this.string,this.lineStart,this.tabSize):0)},indentation:function(){return ja(this.string,null,this.tabSize)-(this.lineStart?ja(this.string,this.lineStart,this.tabSize):0)},match:function(e,t,n){if("string"!=typeof e){var r=this.string.slice(this.pos).match(e);return r&&r.index>0?null:(r&&t!==!1&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e},o=this.string.substr(this.pos,e.length);return i(o)==i(e)?(t!==!1&&(this.pos+=e.length),!0):void 0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}}};var ha=0,ma=e.TextMarker=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++ha};_i(ma),ma.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&bt(e),Ei(this,"clear")){var n=this.find();n&&ki(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;o<this.lines.length;++o){var a=this.lines[o],s=Zn(a.markedSpans,this);e&&!this.collapsed?Ft(e,ei(a),"text"):e&&(null!=s.to&&(i=ei(a)),null!=s.from&&(r=ei(a))),a.markedSpans=er(a.markedSpans,s),null==s.from&&this.collapsed&&!xr(this.doc,a)&&e&&Zr(a,gt(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var o=0;o<this.lines.length;++o){var l=gr(this.lines[o]),u=f(l);u>e.display.maxLineLength&&(e.display.maxLine=l,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&Dt(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Ae(e.doc)),e&&ki(e,"markerCleared",e,this),t&&xt(e),this.parent&&this.parent.clear()}},ma.prototype.find=function(e,t){null==e&&"bookmark"==this.type&&(e=1);for(var n,r,i=0;i<this.lines.length;++i){var o=this.lines[i],a=Zn(o.markedSpans,this);if(null!=a.from&&(n=Po(t?o:ei(o),a.from),-1==e))return n;if(null!=a.to&&(r=Po(t?o:ei(o),a.to),1==e))return r}return n&&{from:n,to:r}},ma.prototype.changed=function(){var e=this.find(-1,!0),t=this,n=this.doc.cm;e&&n&&_t(n,function(){var r=e.line,i=ei(e.line),o=Xe(n,i);if(o&&(it(o),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!xr(t.doc,r)&&null!=t.height){var a=t.height;t.height=null;var s=Lr(t)-a;s&&Zr(r,r.height+s)}})},ma.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=Mi(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},ma.prototype.detachLine=function(e){if(this.lines.splice(Mi(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}};var ha=0,va=e.SharedTextMarker=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};_i(va),va.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();ki(this,"clear")}},va.prototype.find=function(e,t){return this.primary.find(e,t)};var ga=e.LineWidget=function(e,t,n){if(n)for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.doc=e,this.node=t};_i(ga),ga.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,n=this.line,r=ei(n);if(null!=r&&t){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(n.widgets=null);var o=Lr(this);Zr(n,Math.max(0,n.height-o)),e&&_t(e,function(){kr(e,n,-o),Ft(e,r,"widget")})}},ga.prototype.changed=function(){var e=this.height,t=this.doc.cm,n=this.line;this.height=null;var r=Lr(this)-e;r&&(Zr(n,n.height+r),t&&_t(t,function(){t.curOp.forceUpdate=!0,kr(t,n,r)}))};var ya=e.Line=function(e,t,n){this.text=e,ur(this,t),this.height=n?n(this):1};_i(ya),ya.prototype.lineNo=function(){return ei(this)};var ba={},wa={};qr.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=e,r=e+t;r>n;++n){var i=this.lines[n];this.height-=i.height,Er(i),ki(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;r<t.length;++r)t[r].parent=this},iterN:function(e,t,n){for(var r=e+t;r>e;++e)if(n(this.lines[e]))return!0}},zr.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;n<this.children.length;++n){var r=this.children[n],i=r.chunkSize();if(i>e){var o=Math.min(t,i-e),a=r.height;if(r.removeInner(e,o),this.height-=a-r.height,i==o&&(this.children.splice(n--,1),r.parent=null),0==(t-=o))break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof qr))){var s=[];this.collapse(s),this.children=[new qr(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,n){this.size+=t.length,this.height+=n;for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(o>=e){if(i.insertInner(e,t,n),i.lines&&i.lines.length>50){for(;i.lines.length>50;){var a=i.lines.splice(i.lines.length-25,25),s=new qr(a);i.height-=s.height,this.children.splice(r+1,0,s),s.parent=this}this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=e.children.splice(e.children.length-5,5),n=new zr(t);if(e.parent){e.size-=n.size,e.height-=n.height;var r=Mi(e.parent.children,e);e.parent.children.splice(r+1,0,n)}else{var i=new zr(e.children);i.parent=e,e.children=[i,n],e=i}n.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(o>e){var a=Math.min(t,o-e);if(i.iterN(e,a,n))return!0;if(0==(t-=a))break;e=0}else e-=o}}};var xa=0,Ta=e.Doc=function(e,t,n,r){if(!(this instanceof Ta))return new Ta(e,t,n,r);null==n&&(n=0),zr.call(this,[new qr([new ya("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.frontier=n;var i=Po(n,0);this.sel=he(i),this.history=new ii(null),this.id=++xa,this.modeOption=t,this.lineSep=r,this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),Hr(this,{from:i,to:i,text:e}),Ee(this,he(i),Fa)};Ta.prototype=Fi(zr.prototype,{constructor:Ta,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,r=0;r<t.length;++r)n+=t[r].height;this.insertInner(e-this.first,t,n)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=Xr(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:Ot(function(e){var t=Po(this.first,0),n=this.first+this.size-1;Sn(this,{from:t,to:Po(n,Jr(this,n).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),Ee(this,he(t))}),replaceRange:function(e,t,n,r){t=ve(this,t),n=n?ve(this,n):t,On(this,e,t,n,r)},getRange:function(e,t,n){var r=$r(this,ve(this,e),ve(this,t));return n===!1?r:r.join(n||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){return ye(this,e)?Jr(this,e):void 0},getLineNumber:function(e){return ei(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=Jr(this,e)),gr(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return ve(this,e)},getCursor:function(e){var t,n=this.sel.primary();return t=null==e||"head"==e?n.head:"anchor"==e?n.anchor:"end"==e||"to"==e||e===!1?n.to():n.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Ot(function(e,t,n){Le(this,ve(this,"number"==typeof e?Po(e,t||0):e),null,n)}),setSelection:Ot(function(e,t,n){Le(this,ve(this,e),ve(this,t||e),n)}),extendSelection:Ot(function(e,t,n){xe(this,ve(this,e),t&&ve(this,t),n)}),extendSelections:Ot(function(e,t){Te(this,be(this,e,t))}),extendSelectionsBy:Ot(function(e,t){Te(this,Ii(this.sel.ranges,e),t)}),setSelections:Ot(function(e,t,n){if(e.length){for(var r=0,i=[];r<e.length;r++)i[r]=new pe(ve(this,e[r].anchor),ve(this,e[r].head));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),Ee(this,de(i,t),n)}}),addSelection:Ot(function(e,t,n){var r=this.sel.ranges.slice(0);r.push(new pe(ve(this,e),ve(this,t||e))),Ee(this,de(r,r.length-1),n)}),getSelection:function(e){for(var t,n=this.sel.ranges,r=0;r<n.length;r++){var i=$r(this,n[r].from(),n[r].to());t=t?t.concat(i):i}return e===!1?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],n=this.sel.ranges,r=0;r<n.length;r++){var i=$r(this,n[r].from(),n[r].to());e!==!1&&(i=i.join(e||this.lineSeparator())),t[r]=i}return t},replaceSelection:function(e,t,n){for(var r=[],i=0;i<this.sel.ranges.length;i++)r[i]=e;this.replaceSelections(r,t,n||"+input")},replaceSelections:Ot(function(e,t,n){for(var r=[],i=this.sel,o=0;o<i.ranges.length;o++){var a=i.ranges[o];r[o]={from:a.from(),to:a.to(),text:this.splitLines(e[o]),origin:n}}for(var s=t&&"end"!=t&&kn(this,r,t),o=r.length-1;o>=0;o--)Sn(this,r[o]);s?Ce(this,s):this.cm&&Gn(this.cm)}),undo:Ot(function(){En(this,"undo")}),redo:Ot(function(){En(this,"redo")}),undoSelection:Ot(function(){En(this,"undo",!0)}),redoSelection:Ot(function(){En(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.done.length;r++)e.done[r].ranges||++t;for(var r=0;r<e.undone.length;r++)e.undone[r].ranges||++n;return{undo:t,redo:n}},clearHistory:function(){this.history=new ii(this.history.maxGeneration)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:mi(this.history.done),undone:mi(this.history.undone)}},setHistory:function(e){var t=this.history=new ii(this.history.maxGeneration);t.done=mi(e.done.slice(0),null,!0),t.undone=mi(e.undone.slice(0),null,!0)},addLineClass:Ot(function(e,t,n){return Rn(this,e,"gutter"==t?"gutter":"class",function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass";if(e[r]){if(Hi(n).test(e[r]))return!1;e[r]+=" "+n}else e[r]=n;return!0})}),removeLineClass:Ot(function(e,t,n){return Rn(this,e,"gutter"==t?"gutter":"class",function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass",i=e[r];if(!i)return!1;if(null==n)e[r]=null;else{var o=i.match(Hi(n));if(!o)return!1;var a=o.index+o[0].length;e[r]=i.slice(0,o.index)+(o.index&&a!=i.length?" ":"")+i.slice(a)||null}return!0})}),addLineWidget:Ot(function(e,t,n){return Sr(this,e,t,n)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return zn(this,ve(this,e),ve(this,t),n,n&&n.type||"range")},setBookmark:function(e,t){var n={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=ve(this,e),zn(this,e,e,n,"bookmark")},findMarksAt:function(e){e=ve(this,e);var t=[],n=Jr(this,e.line).markedSpans;if(n)for(var r=0;r<n.length;++r){var i=n[r];(null==i.from||i.from<=e.ch)&&(null==i.to||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=ve(this,e),t=ve(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 s=0;s<a.length;s++){var l=a[s];i==e.line&&e.ch>l.to||null==l.from&&i!=e.line||i==t.line&&l.from>t.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++i}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;r<n.length;++r)null!=n[r].from&&e.push(n[r].marker)}),e},posFromIndex:function(e){var t,n=this.first;return this.iter(function(r){var i=r.text.length+1;return i>e?(t=e,!0):(e-=i,void++n)}),ve(this,Po(n,t))},indexFromPos:function(e){e=ve(this,e);var t=e.ch;return e.line<this.first||e.ch<0?0:(this.iter(this.first,e.line,function(e){t+=e.text.length+1}),t)},copy:function(e){var t=new Ta(Xr(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,n=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<n&&(n=e.to);var r=new Ta(Xr(this,t,n),e.mode||this.modeOption,t,this.lineSep);return e.sharedHist&&(r.history=this.history),(this.linked||(this.linked=[])).push({doc:r,sharedHist:e.sharedHist}),r.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],Jn(r,Yn(this)),r},unlinkDoc:function(t){if(t instanceof e&&(t=t.doc),this.linked)for(var n=0;n<this.linked.length;++n){var r=this.linked[n];if(r.doc==t){this.linked.splice(n,1),t.unlinkDoc(this),$n(Yn(this));break}}if(t.history==this.history){var i=[t.id];Kr(t,function(e){i.push(e.id)},!0),t.history=new ii(null),t.history.done=mi(this.history.done,i),t.history.undone=mi(this.history.undone,i)}},iterLinkedDocs:function(e){Kr(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):Za(e)},lineSeparator:function(){return this.lineSep||"\n"}}),Ta.prototype.eachLine=Ta.prototype.iter;var ka="iter insert remove copy getEditor constructor".split(" ");for(var La in Ta.prototype)Ta.prototype.hasOwnProperty(La)&&Mi(ka,La)<0&&(e.prototype[La]=function(e){return function(){return e.apply(this.doc,arguments)}}(Ta.prototype[La]));_i(Ta);var Sa=e.e_preventDefault=function(e){e.preventDefault?e.preventDefault():e.returnValue=!1},Ca=e.e_stopPropagation=function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},Ea=e.e_stop=function(e){Sa(e),Ca(e)},_a=e.on=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent("on"+t,n);else{var r=e._handlers||(e._handlers={}),i=r[t]||(r[t]=[]);i.push(n)}},Na=[],Aa=e.off=function(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else for(var r=Ti(e,t,!1),i=0;i<r.length;++i)if(r[i]==n){r.splice(i,1);break}},Oa=e.signal=function(e,t){var n=Ti(e,t,!0);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i<n.length;++i)n[i].apply(null,r)},Ma=null,Ia=30,Da=e.Pass={toString:function(){return"CodeMirror.Pass"}},Fa={scroll:!1},Pa={origin:"*mouse"},Ga={origin:"+move"};Ni.prototype.set=function(e,t){clearTimeout(this.id),this.id=setTimeout(t,e)};var ja=e.countColumn=function(e,t,n,r,i){null==t&&(t=e.search(/[^\s\u00a0]/),-1==t&&(t=e.length));for(var o=r||0,a=i||0;;){var s=e.indexOf(" ",o);if(0>s||s>=t)return a+(t-o);a+=s-o,a+=n-a%n,o=s+1}},Qa=e.findColumn=function(e,t,n){for(var r=0,i=0;;){var o=e.indexOf(" ",r);-1==o&&(o=e.length);var a=o-r;if(o==e.length||i+a>=t)return r+Math.min(a,t-i);if(i+=o-r,i+=n-i%n,r=o+1,i>=t)return r}},Ra=[""],Va=function(e){e.select()};Eo?Va=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:yo&&(Va=function(e){try{e.select()}catch(t){}});var Ba,Ua=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Wa=e.isWordChar=function(e){return/\w/.test(e)||e>""&&(e.toUpperCase()!=e.toLowerCase()||Ua.test(e))},Ha=/[\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]/;Ba=document.createRange?function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(i){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};var qa=e.contains=function(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do if(11==t.nodeType&&(t=t.host),t==e)return!0;while(t=t.parentNode)};yo&&11>bo&&(Wi=function(){try{return document.activeElement}catch(e){return document.body;
}});var za,Ka,Ya=e.rmClass=function(e,t){var n=e.className,r=Hi(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:"")}},Ja=e.addClass=function(e,t){var n=e.className;Hi(t).test(n)||(e.className+=(n?" ":"")+t)},$a=!1,Xa=function(){if(yo&&9>bo)return!1;var e=Vi("div");return"draggable"in e||"dragDrop"in e}(),Za=e.splitLines=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;r>=t;){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/)},es=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){try{var t=e.ownerDocument.selection.createRange()}catch(n){}return t&&t.parentElement()==e?0!=t.compareEndPoints("StartToEnd",t):!1},ts=function(){var e=Vi("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),ns=null,rs=e.keyNames={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"};!function(){for(var e=0;10>e;e++)rs[e+48]=rs[e+96]=String(e);for(var e=65;90>=e;e++)rs[e]=String.fromCharCode(e);for(var e=1;12>=e;e++)rs[e+111]=rs[e+63235]="F"+e}();var is,os=function(){function e(e){return 247>=e?n.charAt(e):e>=1424&&1524>=e?"R":e>=1536&&1773>=e?r.charAt(e-1536):e>=1774&&2220>=e?"r":e>=8192&&8203>=e?"w":8204==e?"b":"L"}function t(e,t,n){this.level=e,this.from=t,this.to=n}var n="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",r="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm",i=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,a=/[LRr]/,s=/[Lb1n]/,l=/[1n]/,u="L";return function(n){if(!i.test(n))return!1;for(var r,c=n.length,f=[],p=0;c>p;++p)f.push(r=e(n.charCodeAt(p)));for(var p=0,d=u;c>p;++p){var r=f[p];"m"==r?f[p]=d:d=r}for(var p=0,h=u;c>p;++p){var r=f[p];"1"==r&&"r"==h?f[p]="n":a.test(r)&&(h=r,"r"==r&&(f[p]="R"))}for(var p=1,d=f[0];c-1>p;++p){var r=f[p];"+"==r&&"1"==d&&"1"==f[p+1]?f[p]="1":","!=r||d!=f[p+1]||"1"!=d&&"n"!=d||(f[p]=d),d=r}for(var p=0;c>p;++p){var r=f[p];if(","==r)f[p]="N";else if("%"==r){for(var m=p+1;c>m&&"%"==f[m];++m);for(var v=p&&"!"==f[p-1]||c>m&&"1"==f[m]?"1":"N",g=p;m>g;++g)f[g]=v;p=m-1}}for(var p=0,h=u;c>p;++p){var r=f[p];"L"==h&&"1"==r?f[p]="L":a.test(r)&&(h=r)}for(var p=0;c>p;++p)if(o.test(f[p])){for(var m=p+1;c>m&&o.test(f[m]);++m);for(var y="L"==(p?f[p-1]:u),b="L"==(c>m?f[m]:u),v=y||b?"L":"R",g=p;m>g;++g)f[g]=v;p=m-1}for(var w,x=[],p=0;c>p;)if(s.test(f[p])){var T=p;for(++p;c>p&&s.test(f[p]);++p);x.push(new t(0,T,p))}else{var k=p,L=x.length;for(++p;c>p&&"L"!=f[p];++p);for(var g=k;p>g;)if(l.test(f[g])){g>k&&x.splice(L,0,new t(1,k,g));var S=g;for(++g;p>g&&l.test(f[g]);++g);x.splice(L,0,new t(2,S,g)),k=g}else++g;p>k&&x.splice(L,0,new t(1,k,p))}return 1==x[0].level&&(w=n.match(/^\s+/))&&(x[0].from=w[0].length,x.unshift(new t(0,0,w[0].length))),1==Oi(x).level&&(w=n.match(/\s+$/))&&(Oi(x).to-=w[0].length,x.push(new t(0,c-w[0].length,c))),2==x[0].level&&x.unshift(new t(1,x[0].to,x[0].to)),x[0].level!=Oi(x).level&&x.push(new t(x[0].level,c,c)),x}}();return e.version="5.9.0",e})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(347);Object.defineProperty(t,"graphql",{enumerable:!0,get:function(){return r.graphql}});var i=n(449);Object.defineProperty(t,"GraphQLSchema",{enumerable:!0,get:function(){return i.GraphQLSchema}});var o=n(454);Object.defineProperty(t,"GraphQLScalarType",{enumerable:!0,get:function(){return o.GraphQLScalarType}}),Object.defineProperty(t,"GraphQLObjectType",{enumerable:!0,get:function(){return o.GraphQLObjectType}}),Object.defineProperty(t,"GraphQLInterfaceType",{enumerable:!0,get:function(){return o.GraphQLInterfaceType}}),Object.defineProperty(t,"GraphQLUnionType",{enumerable:!0,get:function(){return o.GraphQLUnionType}}),Object.defineProperty(t,"GraphQLEnumType",{enumerable:!0,get:function(){return o.GraphQLEnumType}}),Object.defineProperty(t,"GraphQLInputObjectType",{enumerable:!0,get:function(){return o.GraphQLInputObjectType}}),Object.defineProperty(t,"GraphQLList",{enumerable:!0,get:function(){return o.GraphQLList}}),Object.defineProperty(t,"GraphQLNonNull",{enumerable:!0,get:function(){return o.GraphQLNonNull}});var a=n(463);Object.defineProperty(t,"GraphQLInt",{enumerable:!0,get:function(){return a.GraphQLInt}}),Object.defineProperty(t,"GraphQLFloat",{enumerable:!0,get:function(){return a.GraphQLFloat}}),Object.defineProperty(t,"GraphQLString",{enumerable:!0,get:function(){return a.GraphQLString}}),Object.defineProperty(t,"GraphQLBoolean",{enumerable:!0,get:function(){return a.GraphQLBoolean}}),Object.defineProperty(t,"GraphQLID",{enumerable:!0,get:function(){return a.GraphQLID}});var s=n(435);Object.defineProperty(t,"formatError",{enumerable:!0,get:function(){return s.formatError}})},function(e,t,n){"use strict";function r(e,t,n,r,u){return new i(function(i){var c=new o.Source(t||"","GraphQL request"),f=(0,a.parse)(c),p=(0,s.validate)(e,f);i(p.length>0?{errors:p}:(0,l.execute)(e,f,n,r,u))})["catch"](function(e){return{errors:[e]}})}var i=n(348)["default"];Object.defineProperty(t,"__esModule",{value:!0}),t.graphql=r;var o=n(403),a=n(405),s=n(438),l=n(503)},function(e,t,n){e.exports={"default":n(349),__esModule:!0}},function(e,t,n){n(350),n(351),n(375),n(382),e.exports=n(359).Promise},function(e,t){},function(e,t,n){"use strict";var r=n(352)(!0);n(355)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})})},function(e,t,n){var r=n(353),i=n(354);e.exports=function(e){return function(t,n){var o,a,s=String(i(t)),l=r(n),u=s.length;return 0>l||l>=u?e?"":void 0:(o=s.charCodeAt(l),55296>o||o>56319||l+1===u||(a=s.charCodeAt(l+1))<56320||a>57343?e?s.charAt(l):o:e?s.slice(l,l+2):(o-55296<<10)+(a-56320)+65536)}}},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){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){"use strict";var r=n(356),i=n(357),o=n(362),a=n(363),s=n(368),l=n(369),u=n(370),c=n(371),f=n(364).getProto,p=n(372)("iterator"),d=!([].keys&&"next"in[].keys()),h="@@iterator",m="keys",v="values",g=function(){return this};e.exports=function(e,t,n,y,b,w,x){u(n,t,y);var T,k,L=function(e){if(!d&&e in _)return _[e];switch(e){case m:return function(){return new n(this,e)};case v:return function(){return new n(this,e)}}return function(){return new n(this,e)}},S=t+" Iterator",C=b==v,E=!1,_=e.prototype,N=_[p]||_[h]||b&&_[b],A=N||L(b);if(N){var O=f(A.call(new e));c(O,S,!0),!r&&s(_,h)&&a(O,p,g),C&&N.name!==v&&(E=!0,A=function(){return N.call(this)})}if(r&&!x||!d&&!E&&_[p]||a(_,p,A),l[t]=A,l[S]=g,b)if(T={values:C?A:L(v),keys:w?A:L(m),entries:C?L("entries"):A},x)for(k in T)k in _||o(_,k,T[k]);else i(i.P+i.F*(d||E),t,T);return T}},function(e,t){e.exports=!0},function(e,t,n){var r=n(358),i=n(359),o=n(360),a="prototype",s=function(e,t,n){var l,u,c,f=e&s.F,p=e&s.G,d=e&s.S,h=e&s.P,m=e&s.B,v=e&s.W,g=p?i:i[t]||(i[t]={}),y=p?r:d?r[t]:(r[t]||{})[a];p&&(n=t);for(l in n)u=!f&&y&&l in y,u&&l in g||(c=u?y[l]:n[l],g[l]=p&&"function"!=typeof y[l]?n[l]:m&&u?o(c,r):v&&y[l]==c?function(e){var t=function(t){return this instanceof e?new e(t):e(t)};return t[a]=e[a],t}(c):h&&"function"==typeof c?o(Function.call,c):c,h&&((g[a]||(g[a]={}))[l]=c))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,e.exports=s},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){var n=e.exports={version:"1.2.6"};"number"==typeof __e&&(__e=n)},function(e,t,n){var r=n(361);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){e.exports=n(363)},function(e,t,n){var r=n(364),i=n(365);e.exports=n(366)?function(e,t,n){return r.setDesc(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t){var n=Object;e.exports={create:n.create,getProto:n.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:n.getOwnPropertyDescriptor,setDesc:n.defineProperty,setDescs:n.defineProperties,getKeys:n.keys,getNames:n.getOwnPropertyNames,getSymbols:n.getOwnPropertySymbols,each:[].forEach}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){e.exports=!n(367)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t){e.exports={}},function(e,t,n){"use strict";var r=n(364),i=n(365),o=n(371),a={};n(363)(a,n(372)("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=r.create(a,{next:i(1,n)}),o(e,t+" Iterator")}},function(e,t,n){var r=n(364).setDesc,i=n(368),o=n(372)("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){var r=n(373)("wks"),i=n(374),o=n(358).Symbol;e.exports=function(e){return r[e]||(r[e]=o&&o[e]||(o||i)("Symbol."+e))}},function(e,t,n){var r=n(358),i="__core-js_shared__",o=r[i]||(r[i]={});e.exports=function(e){return o[e]||(o[e]={})}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t,n){n(376);var r=n(369);r.NodeList=r.HTMLCollection=r.Array},function(e,t,n){"use strict";var r=n(377),i=n(378),o=n(369),a=n(379);e.exports=n(355)(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)):"keys"==t?i(0,n):"values"==t?i(0,e[n]):i(0,[n,e[n]])},"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(e,t){e.exports=function(){}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){var r=n(380),i=n(354);e.exports=function(e){return r(i(e))}},function(e,t,n){var r=n(381);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){"use strict";var r,i=n(364),o=n(356),a=n(358),s=n(360),l=n(383),u=n(357),c=n(384),f=n(385),p=n(361),d=n(386),h=n(387),m=n(392).set,v=n(393),g=n(372)("species"),y=n(394),b=n(395),w="Promise",x=a.process,T="process"==l(x),k=a[w],L=function(e){var t=new k(function(){});return e&&(t.constructor=Object),k.resolve(t)===t},S=function(){function e(t){var n=new k(t);return m(n,e.prototype),n}var t=!1;try{if(t=k&&k.resolve&&L(),m(e,k),e.prototype=i.create(k.prototype,{constructor:{value:e}}),e.resolve(5).then(function(){})instanceof e||(t=!1),t&&n(366)){var r=!1;k.resolve(i.setDesc({},"then",{get:function(){r=!0}})),t=r}}catch(o){t=!1}return t}(),C=function(e,t){return o&&e===k&&t===r?!0:v(e,t)},E=function(e){var t=f(e)[g];return void 0!=t?t:e},_=function(e){var t;return c(e)&&"function"==typeof(t=e.then)?t:!1},N=function(e){var t,n;this.promise=new e(function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r}),this.resolve=p(t),this.reject=p(n)},A=function(e){try{e()}catch(t){return{error:t}}},O=function(e,t){if(!e.n){e.n=!0;var n=e.c;b(function(){for(var r=e.v,i=1==e.s,o=0,s=function(t){var n,o,a=i?t.ok:t.fail,s=t.resolve,l=t.reject;try{a?(i||(e.h=!0),n=a===!0?r:a(r),n===t.promise?l(TypeError("Promise-chain cycle")):(o=_(n))?o.call(n,s,l):s(n)):l(r)}catch(u){l(u)}};n.length>o;)s(n[o++]);n.length=0,e.n=!1,t&&setTimeout(function(){var t,n,i=e.p;M(i)&&(T?x.emit("unhandledRejection",r,i):(t=a.onunhandledrejection)?t({promise:i,reason:r}):(n=a.console)&&n.error&&n.error("Unhandled promise rejection",r)),e.a=void 0},1)})}},M=function(e){var t,n=e._d,r=n.a||n.c,i=0;if(n.h)return!1;for(;r.length>i;)if(t=r[i++],t.fail||!M(t.promise))return!1;return!0},I=function(e){var t=this;t.d||(t.d=!0,t=t.r||t,t.v=e,t.s=2,t.a=t.c.slice(),O(t,!0))},D=function(e){var t,n=this;if(!n.d){n.d=!0,n=n.r||n;try{if(n.p===e)throw TypeError("Promise can't be resolved itself");(t=_(e))?b(function(){var r={r:n,d:!1};try{t.call(e,s(D,r,1),s(I,r,1))}catch(i){I.call(r,i)}}):(n.v=e,n.s=1,O(n,!1))}catch(r){I.call({r:n,d:!1},r)}}};S||(k=function(e){p(e);var t=this._d={p:d(this,k,w),c:[],a:void 0,s:0,d:!1,v:void 0,h:!1,n:!1};try{e(s(D,t,1),s(I,t,1))}catch(n){I.call(t,n)}},n(400)(k.prototype,{then:function(e,t){var n=new N(y(this,k)),r=n.promise,i=this._d;return n.ok="function"==typeof e?e:!0,n.fail="function"==typeof t&&t,i.c.push(n),i.a&&i.a.push(n),i.s&&O(i,!1),r},"catch":function(e){return this.then(void 0,e)}})),u(u.G+u.W+u.F*!S,{Promise:k}),n(371)(k,w),n(401)(w),r=n(359)[w],u(u.S+u.F*!S,w,{reject:function(e){var t=new N(this),n=t.reject;return n(e),t.promise}}),u(u.S+u.F*(!S||L(!0)),w,{resolve:function(e){if(e instanceof k&&C(e.constructor,this))return e;var t=new N(this),n=t.resolve;return n(e),t.promise}}),u(u.S+u.F*!(S&&n(402)(function(e){k.all(e)["catch"](function(){})})),w,{all:function(e){var t=E(this),n=new N(t),r=n.resolve,o=n.reject,a=[],s=A(function(){h(e,!1,a.push,a);var n=a.length,s=Array(n);n?i.each.call(a,function(e,i){var a=!1;t.resolve(e).then(function(e){a||(a=!0,s[i]=e,--n||r(s))},o)}):r(s)});return s&&o(s.error),n.promise},race:function(e){var t=E(this),n=new N(t),r=n.reject,i=A(function(){h(e,!1,function(e){t.resolve(e).then(n.resolve,r)})});return i&&r(i.error),n.promise}})},function(e,t,n){var r=n(381),i=n(372)("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=(t=Object(e))[i])?n:o?r(t):"Object"==(a=r(t))&&"function"==typeof t.callee?"Arguments":a}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var r=n(384);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t){e.exports=function(e,t,n){if(!(e instanceof t))throw TypeError(n+": use the 'new' operator!");return e}},function(e,t,n){var r=n(360),i=n(388),o=n(389),a=n(385),s=n(390),l=n(391);e.exports=function(e,t,n,u){var c,f,p,d=l(e),h=r(n,u,t?2:1),m=0;if("function"!=typeof d)throw TypeError(e+" is not iterable!");if(o(d))for(c=s(e.length);c>m;m++)t?h(a(f=e[m])[0],f[1]):h(e[m]);else for(p=d.call(e);!(f=p.next()).done;)i(p,h,f.value,t)}},function(e,t,n){var r=n(385);e.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(o){var a=e["return"];throw void 0!==a&&r(a.call(e)),o}}},function(e,t,n){var r=n(369),i=n(372)("iterator"),o=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||o[i]===e)}},function(e,t,n){var r=n(353),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},function(e,t,n){var r=n(383),i=n(372)("iterator"),o=n(369);e.exports=n(359).getIteratorMethod=function(e){return void 0!=e?e[i]||e["@@iterator"]||o[r(e)]:void 0}},function(e,t,n){var r=n(364).getDesc,i=n(384),o=n(385),a=function(e,t){if(o(e),!i(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,i){try{i=n(360)(Function.call,r(Object.prototype,"__proto__").set,2),i(e,[]),t=!(e instanceof Array)}catch(o){t=!0}return function(e,n){return a(e,n),t?e.__proto__=n:i(e,n),e}}({},!1):void 0),check:a}},function(e,t){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e===1/t:e!=e&&t!=t}},function(e,t,n){var r=n(385),i=n(361),o=n(372)("species");e.exports=function(e,t){var n,a=r(e).constructor;return void 0===a||void 0==(n=r(a)[o])?t:i(n)}},function(e,t,n){var r,i,o,a=n(358),s=n(396).set,l=a.MutationObserver||a.WebKitMutationObserver,u=a.process,c=a.Promise,f="process"==n(381)(u),p=function(){var e,t,n;for(f&&(e=u.domain)&&(u.domain=null,e.exit());r;)t=r.domain,n=r.fn,t&&t.enter(),n(),t&&t.exit(),r=r.next;i=void 0,e&&e.enter()};if(f)o=function(){u.nextTick(p)};else if(l){var d=1,h=document.createTextNode("");new l(p).observe(h,{characterData:!0}),o=function(){h.data=d=-d}}else o=c&&c.resolve?function(){c.resolve().then(p)}:function(){s.call(a,p)};e.exports=function(e){var t={fn:e,next:void 0,domain:f&&u.domain};i&&(i.next=t),r||(r=t,o()),i=t}},function(e,t,n){var r,i,o,a=n(360),s=n(397),l=n(398),u=n(399),c=n(358),f=c.process,p=c.setImmediate,d=c.clearImmediate,h=c.MessageChannel,m=0,v={},g="onreadystatechange",y=function(){var e=+this;if(v.hasOwnProperty(e)){var t=v[e];delete v[e],t()}},b=function(e){y.call(e.data)};p&&d||(p=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return v[++m]=function(){s("function"==typeof e?e:Function(e),t)},r(m),m},d=function(e){delete v[e]},"process"==n(381)(f)?r=function(e){f.nextTick(a(y,e,1))}:h?(i=new h,o=i.port2,i.port1.onmessage=b,r=a(o.postMessage,o,1)):c.addEventListener&&"function"==typeof postMessage&&!c.importScripts?(r=function(e){c.postMessage(e+"","*")},c.addEventListener("message",b,!1)):r=g in u("script")?function(e){l.appendChild(u("script"))[g]=function(){l.removeChild(this),y.call(e)}}:function(e){setTimeout(a(y,e,1),0)}),e.exports={set:p,clear:d}},function(e,t){e.exports=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},function(e,t,n){e.exports=n(358).document&&document.documentElement},function(e,t,n){var r=n(384),i=n(358).document,o=r(i)&&r(i.createElement);e.exports=function(e){return o?i.createElement(e):{}}},function(e,t,n){var r=n(362);e.exports=function(e,t){for(var n in t)r(e,n,t[n]);return e}},function(e,t,n){"use strict";var r=n(359),i=n(364),o=n(366),a=n(372)("species");e.exports=function(e){var t=r[e];o&&t&&!t[a]&&i.setDesc(t,a,{configurable:!0,get:function(){return this}})}},function(e,t,n){var r=n(372)("iterator"),i=!1;try{var o=[7][r]();o["return"]=function(){i=!0},Array.from(o,function(){throw 2})}catch(a){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var o=[7],a=o[r]();a.next=function(){n=!0},o[r]=function(){return a},e(o)}catch(s){}return n}},function(e,t,n){"use strict";var r=n(404)["default"];Object.defineProperty(t,"__esModule",{value:!0});var i=function o(e,t){r(this,o),this.body=e,this.name=t||"GraphQL"};t.Source=i},function(e,t){"use strict";t["default"]=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},t.__esModule=!0},function(e,t,n){"use strict";function r(e,t){var n=e instanceof ee.Source?e:new ee.Source(e),r=W(n,t||{});return a(r)}function i(e,t){var n=e instanceof ee.Source?e:new ee.Source(e),r=W(n,t||{});return w(r)}function o(e){var t=Y(e,ne.TokenKind.NAME);return{kind:re.NAME,value:t.value,loc:H(e,t.start)}}function a(e){var t=e.token.start,n=[];do n.push(s(e));while(!K(e,ne.TokenKind.EOF));return{kind:re.DOCUMENT,definitions:n,loc:H(e,t)}}function s(e){if(z(e,ne.TokenKind.BRACE_L))return l(e);if(z(e,ne.TokenKind.NAME))switch(e.token.value){case"query":case"mutation":case"subscription":return l(e);case"fragment":return y(e);case"type":case"interface":case"union":case"scalar":case"enum":case"input":case"extend":return A(e)}throw $(e)}function l(e){var t=e.token.start;if(z(e,ne.TokenKind.BRACE_L))return{kind:re.OPERATION_DEFINITION,operation:"query",name:null,variableDefinitions:null,directives:[],selectionSet:p(e),loc:H(e,t)};var n,r=Y(e,ne.TokenKind.NAME),i=r.value;return z(e,ne.TokenKind.NAME)&&(n=o(e)),{kind:re.OPERATION_DEFINITION,operation:i,name:n,variableDefinitions:u(e),directives:C(e),selectionSet:p(e),loc:H(e,t)}}function u(e){return z(e,ne.TokenKind.PAREN_L)?Z(e,ne.TokenKind.PAREN_L,c,ne.TokenKind.PAREN_R):[]}function c(e){var t=e.token.start;return{kind:re.VARIABLE_DEFINITION,variable:f(e),type:(Y(e,ne.TokenKind.COLON),_(e)),defaultValue:K(e,ne.TokenKind.EQUALS)?w(e,!0):null,loc:H(e,t)}}function f(e){var t=e.token.start;return Y(e,ne.TokenKind.DOLLAR),{kind:re.VARIABLE,name:o(e),loc:H(e,t)}}function p(e){var t=e.token.start;return{kind:re.SELECTION_SET,selections:Z(e,ne.TokenKind.BRACE_L,d,ne.TokenKind.BRACE_R),loc:H(e,t)}}function d(e){return z(e,ne.TokenKind.SPREAD)?g(e):h(e)}function h(e){var t,n,r=e.token.start,i=o(e);return K(e,ne.TokenKind.COLON)?(t=i,n=o(e)):(t=null,n=i),{kind:re.FIELD,alias:t,name:n,arguments:m(e),directives:C(e),selectionSet:z(e,ne.TokenKind.BRACE_L)?p(e):null,loc:H(e,r)}}function m(e){return z(e,ne.TokenKind.PAREN_L)?Z(e,ne.TokenKind.PAREN_L,v,ne.TokenKind.PAREN_R):[]}function v(e){var t=e.token.start;return{kind:re.ARGUMENT,name:o(e),value:(Y(e,ne.TokenKind.COLON),w(e,!1)),loc:H(e,t)}}function g(e){var t=e.token.start;if(Y(e,ne.TokenKind.SPREAD),z(e,ne.TokenKind.NAME)&&"on"!==e.token.value)return{kind:re.FRAGMENT_SPREAD,name:b(e),directives:C(e),loc:H(e,t)};var n=null;return"on"===e.token.value&&(q(e),n=N(e)),{kind:re.INLINE_FRAGMENT,typeCondition:n,directives:C(e),selectionSet:p(e),loc:H(e,t)}}function y(e){var t=e.token.start;return J(e,"fragment"),{kind:re.FRAGMENT_DEFINITION,name:b(e),typeCondition:(J(e,"on"),N(e)),directives:C(e),selectionSet:p(e),loc:H(e,t)}}function b(e){if("on"===e.token.value)throw $(e);return o(e)}function w(e,t){var n=e.token;switch(n.kind){case ne.TokenKind.BRACKET_L:return k(e,t);case ne.TokenKind.BRACE_L:return L(e,t);case ne.TokenKind.INT:return q(e),{kind:re.INT,value:n.value,loc:H(e,n.start)};case ne.TokenKind.FLOAT:return q(e),{kind:re.FLOAT,value:n.value,loc:H(e,n.start)};case ne.TokenKind.STRING:return q(e),{kind:re.STRING,value:n.value,loc:H(e,n.start)};case ne.TokenKind.NAME:if("true"===n.value||"false"===n.value)return q(e),{kind:re.BOOLEAN,value:"true"===n.value,loc:H(e,n.start)};if("null"!==n.value)return q(e),{kind:re.ENUM,value:n.value,loc:H(e,n.start)};break;case ne.TokenKind.DOLLAR:if(!t)return f(e)}throw $(e)}function x(e){return w(e,!0)}function T(e){return w(e,!1)}function k(e,t){var n=e.token.start,r=t?x:T;return{kind:re.LIST,values:X(e,ne.TokenKind.BRACKET_L,r,ne.TokenKind.BRACKET_R),loc:H(e,n)}}function L(e,t){var n=e.token.start;Y(e,ne.TokenKind.BRACE_L);for(var r=[];!K(e,ne.TokenKind.BRACE_R);)r.push(S(e,t));return{kind:re.OBJECT,fields:r,loc:H(e,n)}}function S(e,t){var n=e.token.start;return{kind:re.OBJECT_FIELD,name:o(e),value:(Y(e,ne.TokenKind.COLON),w(e,t)),loc:H(e,n)}}function C(e){for(var t=[];z(e,ne.TokenKind.AT);)t.push(E(e));return t}function E(e){var t=e.token.start;return Y(e,ne.TokenKind.AT),{kind:re.DIRECTIVE,name:o(e),arguments:m(e),loc:H(e,t)}}function _(e){var t,n=e.token.start;return K(e,ne.TokenKind.BRACKET_L)?(t=_(e),Y(e,ne.TokenKind.BRACKET_R),t={kind:re.LIST_TYPE,type:t,loc:H(e,n)}):t=N(e),K(e,ne.TokenKind.BANG)?{kind:re.NON_NULL_TYPE,type:t,loc:H(e,n)}:t}function N(e){var t=e.token.start;return{kind:re.NAMED_TYPE,name:o(e),loc:H(e,t)}}function A(e){if(!z(e,ne.TokenKind.NAME))throw $(e);switch(e.token.value){case"type":return O(e);case"interface":return P(e);case"union":return G(e);case"scalar":return Q(e);case"enum":return R(e);case"input":return B(e);case"extend":return U(e);default:throw $(e)}}function O(e){var t=e.token.start;J(e,"type");var n=o(e),r=M(e),i=X(e,ne.TokenKind.BRACE_L,I,ne.TokenKind.BRACE_R);return{kind:re.OBJECT_TYPE_DEFINITION,name:n,interfaces:r,fields:i,loc:H(e,t)}}function M(e){var t=[];if("implements"===e.token.value){q(e);do t.push(N(e));while(!z(e,ne.TokenKind.BRACE_L))}return t}function I(e){var t=e.token.start,n=o(e),r=D(e);Y(e,ne.TokenKind.COLON);var i=_(e);return{kind:re.FIELD_DEFINITION,name:n,arguments:r,type:i,loc:H(e,t)}}function D(e){return z(e,ne.TokenKind.PAREN_L)?Z(e,ne.TokenKind.PAREN_L,F,ne.TokenKind.PAREN_R):[]}function F(e){var t=e.token.start,n=o(e);Y(e,ne.TokenKind.COLON);var r=_(e),i=null;return K(e,ne.TokenKind.EQUALS)&&(i=x(e)),{kind:re.INPUT_VALUE_DEFINITION,name:n,type:r,defaultValue:i,loc:H(e,t)}}function P(e){var t=e.token.start;J(e,"interface");var n=o(e),r=X(e,ne.TokenKind.BRACE_L,I,ne.TokenKind.BRACE_R);return{kind:re.INTERFACE_TYPE_DEFINITION,name:n,fields:r,loc:H(e,t)}}function G(e){var t=e.token.start;J(e,"union");var n=o(e);Y(e,ne.TokenKind.EQUALS);var r=j(e);return{kind:re.UNION_TYPE_DEFINITION,name:n,types:r,loc:H(e,t)}}function j(e){var t=[];do t.push(N(e));while(K(e,ne.TokenKind.PIPE));return t}function Q(e){var t=e.token.start;J(e,"scalar");var n=o(e);return{kind:re.SCALAR_TYPE_DEFINITION,name:n,loc:H(e,t)}}function R(e){var t=e.token.start;J(e,"enum");var n=o(e),r=Z(e,ne.TokenKind.BRACE_L,V,ne.TokenKind.BRACE_R);return{kind:re.ENUM_TYPE_DEFINITION,name:n,values:r,loc:H(e,t)}}function V(e){var t=e.token.start,n=o(e);return{kind:re.ENUM_VALUE_DEFINITION,name:n,loc:H(e,t)}}function B(e){var t=e.token.start;J(e,"input");var n=o(e),r=X(e,ne.TokenKind.BRACE_L,F,ne.TokenKind.BRACE_R);return{kind:re.INPUT_OBJECT_TYPE_DEFINITION,name:n,fields:r,loc:H(e,t)}}function U(e){var t=e.token.start;J(e,"extend");var n=O(e);return{kind:re.TYPE_EXTENSION_DEFINITION,definition:n,loc:H(e,t)}}function W(e,t){var n=(0,ne.lex)(e);return{_lexToken:n,source:e,options:t,prevEnd:0,token:n()}}function H(e,t){return e.options.noLocation?null:e.options.noSource?{start:t,end:e.prevEnd}:{start:t,end:e.prevEnd,source:e.source}}function q(e){var t=e.token.end;e.prevEnd=t,e.token=e._lexToken(t)}function z(e,t){return e.token.kind===t}function K(e,t){var n=e.token.kind===t;return n&&q(e),n}function Y(e,t){var n=e.token;if(n.kind===t)return q(e),n;throw(0,te.syntaxError)(e.source,n.start,"Expected "+(0,ne.getTokenKindDesc)(t)+", found "+(0,ne.getTokenDesc)(n))}function J(e,t){var n=e.token;if(n.kind===ne.TokenKind.NAME&&n.value===t)return q(e),n;throw(0,te.syntaxError)(e.source,n.start,'Expected "'+t+'", found '+(0,ne.getTokenDesc)(n))}function $(e,t){var n=t||e.token;return(0,te.syntaxError)(e.source,n.start,"Unexpected "+(0,ne.getTokenDesc)(n))}function X(e,t,n,r){Y(e,t);for(var i=[];!K(e,r);)i.push(n(e));return i}function Z(e,t,n,r){Y(e,t);for(var i=[n(e)];!K(e,r);)i.push(n(e));return i}Object.defineProperty(t,"__esModule",{value:!0}),t.parse=r,t.parseValue=i,t.parseConstValue=x,t.parseType=_,t.parseNamedType=N;var ee=n(403),te=n(406),ne=n(423),re=n(421)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(407);Object.defineProperty(t,"GraphQLError",{enumerable:!0,get:function(){return r.GraphQLError}});var i=n(433);Object.defineProperty(t,"syntaxError",{enumerable:!0,get:function(){return i.syntaxError}});var o=n(434);Object.defineProperty(t,"locatedError",{enumerable:!0,get:function(){return o.locatedError}});var a=n(435);Object.defineProperty(t,"formatError",{enumerable:!0,get:function(){return a.formatError}})},function(e,t,n){"use strict";var r=n(408)["default"],i=n(413)["default"],o=n(404)["default"];Object.defineProperty(t,"__esModule",{value:!0});var a=n(419),s=function(e){function t(e,n,i,s,l){o(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e),this.message=e,Object.defineProperty(this,"stack",{value:i||e}),Object.defineProperty(this,"nodes",{value:n}),Object.defineProperty(this,"source",{get:function(){if(s)return s;if(n&&n.length>0){var e=n[0];return e&&e.loc&&e.loc.source}}}),Object.defineProperty(this,"positions",{get:function(){if(l)return l;if(n){var e=n.map(function(e){return e.loc&&e.loc.start});if(e.some(function(e){return e}))return e}}}),Object.defineProperty(this,"locations",{get:function(){var e=this;return this.positions&&this.source?this.positions.map(function(t){return(0,a.getLocation)(e.source,t)}):void 0}})}return i(t,e),t}(Error);t.GraphQLError=s},function(e,t,n){"use strict";var r=n(409)["default"];t["default"]=function(e,t,n){for(var i=!0;i;){var o=e,a=t,s=n;i=!1,null===o&&(o=Function.prototype);var l=r(o,a);if(void 0!==l){if("value"in l)return l.value;var u=l.get;if(void 0===u)return;return u.call(s)}var c=Object.getPrototypeOf(o);if(null===c)return;e=c,t=a,n=s,i=!0,l=c=void 0}},t.__esModule=!0},function(e,t,n){e.exports={"default":n(410),__esModule:!0}},function(e,t,n){var r=n(364);n(411),e.exports=function(e,t){return r.getDesc(e,t)}},function(e,t,n){var r=n(379);n(412)("getOwnPropertyDescriptor",function(e){return function(t,n){return e(r(t),n)}})},function(e,t,n){var r=n(357),i=n(359),o=n(367);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){"use strict";var r=n(414)["default"],i=n(416)["default"];t["default"]=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=r(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(i?i(e,t):e.__proto__=t)},t.__esModule=!0},function(e,t,n){e.exports={"default":n(415),__esModule:!0}},function(e,t,n){var r=n(364);e.exports=function(e,t){return r.create(e,t)}},function(e,t,n){e.exports={"default":n(417),__esModule:!0}},function(e,t,n){n(418),e.exports=n(359).Object.setPrototypeOf},function(e,t,n){var r=n(357);r(r.S,"Object",{setPrototypeOf:n(392).set})},function(e,t,n){"use strict";var r=n(420)["default"];Object.defineProperty(t,"__esModule",{value:!0});var i=n(421),o=r(i),a=n(422);Object.defineProperty(t,"getLocation",{enumerable:!0,get:function(){return a.getLocation}}),t.Kind=o;var s=n(423);Object.defineProperty(t,"lex",{enumerable:!0,get:function(){return s.lex}});var l=n(405);Object.defineProperty(t,"parse",{enumerable:!0,get:function(){return l.parse}}),Object.defineProperty(t,"parseValue",{enumerable:!0,get:function(){return l.parseValue}});var u=n(424);Object.defineProperty(t,"print",{enumerable:!0,get:function(){return u.print}});var c=n(403);Object.defineProperty(t,"Source",{enumerable:!0,get:function(){return c.Source}});var f=n(425);Object.defineProperty(t,"visit",{enumerable:!0,get:function(){return f.visit}}),Object.defineProperty(t,"BREAK",{enumerable:!0,get:function(){return f.BREAK}})},function(e,t){"use strict";t["default"]=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t},t.__esModule=!0},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="Name";t.NAME=n;var r="Document";t.DOCUMENT=r;var i="OperationDefinition";t.OPERATION_DEFINITION=i;var o="VariableDefinition";t.VARIABLE_DEFINITION=o;var a="Variable";t.VARIABLE=a;var s="SelectionSet";t.SELECTION_SET=s;var l="Field";t.FIELD=l;var u="Argument";t.ARGUMENT=u;var c="FragmentSpread";t.FRAGMENT_SPREAD=c;var f="InlineFragment";t.INLINE_FRAGMENT=f;var p="FragmentDefinition";t.FRAGMENT_DEFINITION=p;
var d="IntValue";t.INT=d;var h="FloatValue";t.FLOAT=h;var m="StringValue";t.STRING=m;var v="BooleanValue";t.BOOLEAN=v;var g="EnumValue";t.ENUM=g;var y="ListValue";t.LIST=y;var b="ObjectValue";t.OBJECT=b;var w="ObjectField";t.OBJECT_FIELD=w;var x="Directive";t.DIRECTIVE=x;var T="NamedType";t.NAMED_TYPE=T;var k="ListType";t.LIST_TYPE=k;var L="NonNullType";t.NON_NULL_TYPE=L;var S="ObjectTypeDefinition";t.OBJECT_TYPE_DEFINITION=S;var C="FieldDefinition";t.FIELD_DEFINITION=C;var E="InputValueDefinition";t.INPUT_VALUE_DEFINITION=E;var _="InterfaceTypeDefinition";t.INTERFACE_TYPE_DEFINITION=_;var N="UnionTypeDefinition";t.UNION_TYPE_DEFINITION=N;var A="ScalarTypeDefinition";t.SCALAR_TYPE_DEFINITION=A;var O="EnumTypeDefinition";t.ENUM_TYPE_DEFINITION=O;var M="EnumValueDefinition";t.ENUM_VALUE_DEFINITION=M;var I="InputObjectTypeDefinition";t.INPUT_OBJECT_TYPE_DEFINITION=I;var D="TypeExtensionDefinition";t.TYPE_EXTENSION_DEFINITION=D},function(e,t){"use strict";function n(e,t){for(var n,r=1,i=t+1,o=/\r\n|[\n\r\u2028\u2029]/g;(n=o.exec(e.body))&&n.index<t;)r+=1,i=t+1-(n.index+n[0].length);return{line:r,column:i}}Object.defineProperty(t,"__esModule",{value:!0}),t.getLocation=n},function(e,t,n){"use strict";function r(e){var t=0;return function(n){var r=l(e,void 0===n?t:n);return t=r.end,r}}function i(e){return e.value?o(e.kind)+' "'+e.value+'"':o(e.kind)}function o(e){return y[e]}function a(e,t,n,r){return{kind:e,start:t,end:n,value:r}}function s(e){return isNaN(e)?"<EOF>":127>e?JSON.stringify(String.fromCharCode(e)):'"\\u'+("00"+e.toString(16).toUpperCase()).slice(-4)+'"'}function l(e,t){var n=e.body,r=n.length,i=u(n,t);if(i>=r)return a(g.EOF,i,i);var o=b.call(n,i);if(32>o&&9!==o&&10!==o&&13!==o)throw(0,v.syntaxError)(e,i,"Invalid character "+s(o)+".");switch(o){case 33:return a(g.BANG,i,i+1);case 36:return a(g.DOLLAR,i,i+1);case 40:return a(g.PAREN_L,i,i+1);case 41:return a(g.PAREN_R,i,i+1);case 46:if(46===b.call(n,i+1)&&46===b.call(n,i+2))return a(g.SPREAD,i,i+3);break;case 58:return a(g.COLON,i,i+1);case 61:return a(g.EQUALS,i,i+1);case 64:return a(g.AT,i,i+1);case 91:return a(g.BRACKET_L,i,i+1);case 93:return a(g.BRACKET_R,i,i+1);case 123:return a(g.BRACE_L,i,i+1);case 124:return a(g.PIPE,i,i+1);case 125:return a(g.BRACE_R,i,i+1);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 m(e,i);case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return c(e,i,o);case 34:return p(e,i)}throw(0,v.syntaxError)(e,i,"Unexpected character "+s(o)+".")}function u(e,t){for(var n=e.length,r=t;n>r;){var i=b.call(e,r);if(65279===i||9===i||32===i||10===i||13===i||44===i)++r;else{if(35!==i)break;for(++r;n>r&&null!==(i=b.call(e,r))&&(i>31||9===i)&&10!==i&&13!==i;)++r}}return r}function c(e,t,n){var r=n,i=e.body,o=t,l=!1;if(45===r&&(r=b.call(i,++o)),48===r){if(r=b.call(i,++o),r>=48&&57>=r)throw(0,v.syntaxError)(e,o,"Invalid number, unexpected digit after 0: "+s(r)+".")}else o=f(e,o,r),r=b.call(i,o);return 46===r&&(l=!0,r=b.call(i,++o),o=f(e,o,r),r=b.call(i,o)),(69===r||101===r)&&(l=!0,r=b.call(i,++o),(43===r||45===r)&&(r=b.call(i,++o)),o=f(e,o,r)),a(l?g.FLOAT:g.INT,t,o,w.call(i,t,o))}function f(e,t,n){var r=e.body,i=t,o=n;if(o>=48&&57>=o){do o=b.call(r,++i);while(o>=48&&57>=o);return i}throw(0,v.syntaxError)(e,i,"Invalid number, expected digit but got: "+s(o)+".")}function p(e,t){for(var n=e.body,r=t+1,i=r,o=0,l="";r<n.length&&null!==(o=b.call(n,r))&&10!==o&&13!==o&&34!==o;){if(32>o&&9!==o)throw(0,v.syntaxError)(e,r,"Invalid character within String: "+s(o)+".");if(++r,92===o){switch(l+=w.call(n,i,r-1),o=b.call(n,r)){case 34:l+='"';break;case 47:l+="/";break;case 92:l+="\\";break;case 98:l+="\b";break;case 102:l+="\f";break;case 110:l+="\n";break;case 114:l+="\r";break;case 116:l+=" ";break;case 117:var u=d(b.call(n,r+1),b.call(n,r+2),b.call(n,r+3),b.call(n,r+4));if(0>u)throw(0,v.syntaxError)(e,r,"Invalid character escape sequence: "+("\\u"+n.slice(r+1,r+5)+"."));l+=String.fromCharCode(u),r+=4;break;default:throw(0,v.syntaxError)(e,r,"Invalid character escape sequence: \\"+String.fromCharCode(o)+".")}++r,i=r}}if(34!==o)throw(0,v.syntaxError)(e,r,"Unterminated string.");return l+=w.call(n,i,r),a(g.STRING,t,r+1,l)}function d(e,t,n,r){return h(e)<<12|h(t)<<8|h(n)<<4|h(r)}function h(e){return e>=48&&57>=e?e-48:e>=65&&70>=e?e-55:e>=97&&102>=e?e-87:-1}function m(e,t){for(var n=e.body,r=n.length,i=t+1,o=0;i!==r&&null!==(o=b.call(n,i))&&(95===o||o>=48&&57>=o||o>=65&&90>=o||o>=97&&122>=o);)++i;return a(g.NAME,t,i,w.call(n,t,i))}Object.defineProperty(t,"__esModule",{value:!0}),t.lex=r,t.getTokenDesc=i,t.getTokenKindDesc=o;var v=n(406),g={EOF:1,BANG:2,DOLLAR:3,PAREN_L:4,PAREN_R:5,SPREAD:6,COLON:7,EQUALS:8,AT:9,BRACKET_L:10,BRACKET_R:11,BRACE_L:12,PIPE:13,BRACE_R:14,NAME:15,VARIABLE:16,INT:17,FLOAT:18,STRING:19};t.TokenKind=g;var y={};y[g.EOF]="EOF",y[g.BANG]="!",y[g.DOLLAR]="$",y[g.PAREN_L]="(",y[g.PAREN_R]=")",y[g.SPREAD]="...",y[g.COLON]=":",y[g.EQUALS]="=",y[g.AT]="@",y[g.BRACKET_L]="[",y[g.BRACKET_R]="]",y[g.BRACE_L]="{",y[g.PIPE]="|",y[g.BRACE_R]="}",y[g.NAME]="Name",y[g.VARIABLE]="Variable",y[g.INT]="Int",y[g.FLOAT]="Float",y[g.STRING]="String";var b=String.prototype.charCodeAt,w=String.prototype.slice},function(e,t,n){"use strict";function r(e){return(0,u.visit)(e,{leave:c})}function i(e,t){return e?e.filter(function(e){return e}).join(t||""):""}function o(e){return l(e)?s("{\n"+i(e,"\n"))+"\n}":""}function a(e,t,n){return t?e+t+(n||""):""}function s(e){return e&&e.replace(/\n/g,"\n ")}function l(e){return e?e.length:0}Object.defineProperty(t,"__esModule",{value:!0}),t.print=r;var u=n(425),c={Name:function(e){return e.value},Variable:function(e){return"$"+e.name},Document:function(e){return i(e.definitions,"\n\n")+"\n"},OperationDefinition:function(e){var t=e.operation,n=e.name,r=a("(",i(e.variableDefinitions,", "),")"),o=i(e.directives," "),s=e.selectionSet;return n?i([t,i([n,r]),o,s]," "):s},VariableDefinition:function(e){var t=e.variable,n=e.type,r=e.defaultValue;return t+": "+n+a(" = ",r)},SelectionSet:function(e){var t=e.selections;return o(t)},Field:function(e){var t=e.alias,n=e.name,r=e.arguments,o=e.directives,s=e.selectionSet;return i([a("",t,": ")+n+a("(",i(r,", "),")"),i(o," "),s]," ")},Argument:function(e){var t=e.name,n=e.value;return t+": "+n},FragmentSpread:function(e){var t=e.name,n=e.directives;return"..."+t+a(" ",i(n," "))},InlineFragment:function(e){var t=e.typeCondition,n=e.directives,r=e.selectionSet;return i(["...",a("on ",t),i(n," "),r]," ")},FragmentDefinition:function(e){var t=e.name,n=e.typeCondition,r=e.directives,o=e.selectionSet;return"fragment "+t+" on "+n+" "+a("",i(r," ")," ")+o},IntValue:function(e){var t=e.value;return t},FloatValue:function(e){var t=e.value;return t},StringValue:function(e){var t=e.value;return JSON.stringify(t)},BooleanValue:function(e){var t=e.value;return JSON.stringify(t)},EnumValue:function(e){var t=e.value;return t},ListValue:function(e){var t=e.values;return"["+i(t,", ")+"]"},ObjectValue:function(e){var t=e.fields;return"{"+i(t,", ")+"}"},ObjectField:function(e){var t=e.name,n=e.value;return t+": "+n},Directive:function(e){var t=e.name,n=e.arguments;return"@"+t+a("(",i(n,", "),")")},NamedType:function(e){var t=e.name;return t},ListType:function(e){var t=e.type;return"["+t+"]"},NonNullType:function(e){var t=e.type;return t+"!"},ObjectTypeDefinition:function(e){var t=e.name,n=e.interfaces,r=e.fields;return"type "+t+" "+a("implements ",i(n,", ")," ")+o(r)},FieldDefinition:function(e){var t=e.name,n=e.arguments,r=e.type;return t+a("(",i(n,", "),")")+": "+r},InputValueDefinition:function(e){var t=e.name,n=e.type,r=e.defaultValue;return t+": "+n+a(" = ",r)},InterfaceTypeDefinition:function(e){var t=e.name,n=e.fields;return"interface "+t+" "+o(n)},UnionTypeDefinition:function(e){var t=e.name,n=e.types;return"union "+t+" = "+i(n," | ")},ScalarTypeDefinition:function(e){var t=e.name;return"scalar "+t},EnumTypeDefinition:function(e){var t=e.name,n=e.values;return"enum "+t+" "+o(n)},EnumValueDefinition:function(e){var t=e.name;return t},InputObjectTypeDefinition:function(e){var t=e.name,n=e.fields;return"input "+t+" "+o(n)},TypeExtensionDefinition:function(e){var t=e.definition;return"extend "+t}}},function(e,t,n){"use strict";function r(e,t,n){var r,o,a=n||u,f=Array.isArray(e),p=[e],d=-1,h=[],m=[],v=[],g=e;do{d++;var y,b,w=d===p.length,x=w&&0!==h.length;if(w){if(y=0===v.length?void 0:m.pop(),b=o,o=v.pop(),x){if(f)b=b.slice();else{var T={};for(var k in b)b.hasOwnProperty(k)&&(T[k]=b[k]);b=T}for(var L=0,S=0;S<h.length;S++){var C=l(h[S],2),E=C[0],_=C[1];f&&(E-=L),f&&null===_?(b.splice(E,1),L++):b[E]=_}}d=r.index,p=r.keys,h=r.edits,f=r.inArray,r=r.prev}else{if(y=o?f?d:p[d]:void 0,b=o?o[y]:g,null===b||void 0===b)continue;o&&m.push(y)}var N=void 0;if(!Array.isArray(b)){if(!i(b))throw new Error("Invalid AST Node: "+JSON.stringify(b));var A=s(t,b.kind,w);if(A){if(N=A.call(t,b,y,o,m,v),N===c)break;if(N===!1){if(!w){m.pop();continue}}else if(void 0!==N&&(h.push([y,N]),!w)){if(!i(N)){m.pop();continue}b=N}}}void 0===N&&x&&h.push([y,b]),w||(r={inArray:f,index:d,keys:p,edits:h,prev:r},f=Array.isArray(b),p=f?b:a[b.kind]||[],d=-1,h=[],o&&v.push(o),o=b)}while(void 0!==r);return 0!==h.length&&(g=h[0][1]),g}function i(e){return e&&"string"==typeof e.kind}function o(e){var t=new Array(e.length);return{enter:function(n){for(var r=0;r<e.length;r++)if(!t[r]){var i=s(e[r],n.kind,!1);if(i){var o=i.apply(e[r],arguments);if(o===!1)t[r]=n;else if(o===c)t[r]=c;else if(void 0!==o)return o}}},leave:function(n){for(var r=0;r<e.length;r++)if(t[r])t[r]===n&&(t[r]=null);else{var i=s(e[r],n.kind,!0);if(i){var o=i.apply(e[r],arguments);if(o===c)t[r]=c;else if(void 0!==o&&o!==!1)return o}}}}}function a(e,t){return{enter:function(n){e.enter(n);var r=s(t,n.kind,!1);if(r){var o=r.apply(t,arguments);return void 0!==o&&(e.leave(n),i(o)&&e.enter(o)),o}},leave:function(n){var r=s(t,n.kind,!0),i=void 0;return r&&(i=r.apply(t,arguments)),e.leave(n),i}}}function s(e,t,n){var r=e[t];if(r){if(!n&&"function"==typeof r)return r;var i=n?r.leave:r.enter;if("function"==typeof i)return i}else{var o=n?e.leave:e.enter;if(o){if("function"==typeof o)return o;var a=o[t];if("function"==typeof a)return a}}}var l=n(426)["default"];Object.defineProperty(t,"__esModule",{value:!0}),t.visit=r,t.visitInParallel=o,t.visitWithTypeInfo=a;var u={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],ObjectTypeDefinition:["name","interfaces","fields"],FieldDefinition:["name","arguments","type"],InputValueDefinition:["name","type","defaultValue"],InterfaceTypeDefinition:["name","fields"],UnionTypeDefinition:["name","types"],ScalarTypeDefinition:["name"],EnumTypeDefinition:["name","values"],EnumValueDefinition:["name"],InputObjectTypeDefinition:["name","fields"],TypeExtensionDefinition:["definition"]};t.QueryDocumentKeys=u;var c={};t.BREAK=c},function(e,t,n){"use strict";var r=n(427)["default"],i=n(430)["default"];t["default"]=function(){function e(e,t){var n=[],i=!0,o=!1,a=void 0;try{for(var s,l=r(e);!(i=(s=l.next()).done)&&(n.push(s.value),!t||n.length!==t);i=!0);}catch(u){o=!0,a=u}finally{try{!i&&l["return"]&&l["return"]()}finally{if(o)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(i(Object(t)))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),t.__esModule=!0},function(e,t,n){e.exports={"default":n(428),__esModule:!0}},function(e,t,n){n(375),n(351),e.exports=n(429)},function(e,t,n){var r=n(385),i=n(391);e.exports=n(359).getIterator=function(e){var t=i(e);if("function"!=typeof t)throw TypeError(e+" is not iterable!");return r(t.call(e))}},function(e,t,n){e.exports={"default":n(431),__esModule:!0}},function(e,t,n){n(375),n(351),e.exports=n(432)},function(e,t,n){var r=n(383),i=n(372)("iterator"),o=n(369);e.exports=n(359).isIterable=function(e){var t=Object(e);return void 0!==t[i]||"@@iterator"in t||o.hasOwnProperty(r(t))}},function(e,t,n){"use strict";function r(e,t,n){var r=(0,a.getLocation)(e,t),o=new s.GraphQLError("Syntax Error "+e.name+" ("+r.line+":"+r.column+") "+n+"\n\n"+i(e,r),void 0,void 0,e,[t]);return o}function i(e,t){var n=t.line,r=(n-1).toString(),i=n.toString(),a=(n+1).toString(),s=a.length,l=e.body.split(/\r\n|[\n\r\u2028\u2029]/g);return(n>=2?o(s,r)+": "+l[n-2]+"\n":"")+o(s,i)+": "+l[n-1]+"\n"+Array(2+s+t.column).join(" ")+"^\n"+(n<l.length?o(s,a)+": "+l[n]+"\n":"")}function o(e,t){return Array(e-t.length+1).join(" ")+t}Object.defineProperty(t,"__esModule",{value:!0}),t.syntaxError=r;var a=n(422),s=n(407)},function(e,t,n){"use strict";function r(e,t){var n=e?e.message||String(e):"An unknown error occurred.",r=e?e.stack:null,o=new i.GraphQLError(n,t,r);return o.originalError=e,o}Object.defineProperty(t,"__esModule",{value:!0}),t.locatedError=r;var i=n(407)},function(e,t,n){"use strict";function r(e){return(0,a["default"])(e,"Received null or undefined error."),{message:e.message,locations:e.locations}}var i=n(436)["default"];Object.defineProperty(t,"__esModule",{value:!0}),t.formatError=r;var o=n(437),a=i(o)},function(e,t){"use strict";t["default"]=function(e){return e&&e.__esModule?e:{"default":e}},t.__esModule=!0},function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t)}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=n,e.exports=t["default"]},function(e,t,n){"use strict";function r(e,t,n){(0,p["default"])(e,"Must provide schema"),(0,p["default"])(t,"Must provide document"),(0,p["default"])(e instanceof v.GraphQLSchema,"Schema must be an instance of GraphQLSchema. Also ensure that there are not multiple versions of GraphQL installed in your node_modules directory.");var r=new g.TypeInfo(e);return i(e,r,t,n||y.specifiedRules)}function i(e,t,n,r){var i=new b(e,n,t),o=r.map(function(e){return e(i)});return(0,d.visit)(n,(0,d.visitWithTypeInfo)(t,(0,d.visitInParallel)(o))),i.getErrors()}var o=n(439)["default"],a=n(404)["default"],s=n(442)["default"],l=n(414)["default"],u=n(436)["default"],c=n(420)["default"];Object.defineProperty(t,"__esModule",{value:!0}),t.validate=r,t.visitUsingRules=i;var f=n(437),p=u(f),d=(n(406),n(425)),h=n(421),m=c(h),v=n(449),g=n(468),y=n(470),b=function(){function e(t,n,r){a(this,e),this._schema=t,this._ast=n,this._typeInfo=r,this._errors=[],this._fragmentSpreads=new s,this._recursivelyReferencedFragments=new s,this._variableUsages=new s,this._recursiveVariableUsages=new s}return o(e,[{key:"reportError",value:function(e){this._errors.push(e)}},{key:"getErrors",value:function(){return this._errors}},{key:"getSchema",value:function(){return this._schema}},{key:"getDocument",value:function(){return this._ast}},{key:"getFragment",value:function(e){var t=this._fragments;return t||(this._fragments=t=this.getDocument().definitions.reduce(function(e,t){return t.kind===m.FRAGMENT_DEFINITION&&(e[t.name.value]=t),e},{})),t[e]}},{key:"getFragmentSpreads",value:function(e){var t=this._fragmentSpreads.get(e);if(!t){t=[];for(var n=[e.selectionSet];0!==n.length;)for(var r=n.pop(),i=0;i<r.selections.length;i++){var o=r.selections[i];o.kind===m.FRAGMENT_SPREAD?t.push(o):o.selectionSet&&n.push(o.selectionSet)}this._fragmentSpreads.set(e,t)}return t}},{key:"getRecursivelyReferencedFragments",value:function(e){var t=this._recursivelyReferencedFragments.get(e);if(!t){t=[];for(var n=l(null),r=[e];0!==r.length;)for(var i=r.pop(),o=this.getFragmentSpreads(i),a=0;a<o.length;a++){var s=o[a].name.value;if(n[s]!==!0){n[s]=!0;var u=this.getFragment(s);u&&(t.push(u),r.push(u))}}this._recursivelyReferencedFragments.set(e,t)}return t}},{key:"getVariableUsages",value:function(e){var t=this,n=this._variableUsages.get(e);return n||!function(){n=[];var r=new g.TypeInfo(t._schema);(0,d.visit)(e,(0,d.visitWithTypeInfo)(r,{VariableDefinition:function(){return!1},Variable:function(e){n.push({node:e,type:r.getInputType()})}})),t._variableUsages.set(e,n)}(),n}},{key:"getRecursiveVariableUsages",value:function(e){var t=this._recursiveVariableUsages.get(e);if(!t){t=this.getVariableUsages(e);for(var n=this.getRecursivelyReferencedFragments(e),r=0;r<n.length;r++)Array.prototype.push.apply(t,this.getVariableUsages(n[r]));this._recursiveVariableUsages.set(e,t)}return t}},{key:"getType",value:function(){return this._typeInfo.getType()}},{key:"getParentType",value:function(){return this._typeInfo.getParentType()}},{key:"getInputType",value:function(){return this._typeInfo.getInputType()}},{key:"getFieldDef",value:function(){return this._typeInfo.getFieldDef()}},{key:"getDirective",value:function(){return this._typeInfo.getDirective()}},{key:"getArgument",value:function(){return this._typeInfo.getArgument()}}]),e}();t.ValidationContext=b},function(e,t,n){"use strict";var r=n(440)["default"];t["default"]=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),r(e,i.key,i)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),t.__esModule=!0},function(e,t,n){e.exports={"default":n(441),__esModule:!0}},function(e,t,n){var r=n(364);e.exports=function(e,t,n){return r.setDesc(e,t,n)}},function(e,t,n){e.exports={"default":n(443),__esModule:!0}},function(e,t,n){n(350),n(351),n(375),n(444),n(447),e.exports=n(359).Map},function(e,t,n){"use strict";var r=n(445);n(446)("Map",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{get:function(e){var t=r.getEntry(this,e);return t&&t.v},set:function(e,t){return r.def(this,0===e?0:e,t)}},r,!0)},function(e,t,n){"use strict";var r=n(364),i=n(363),o=n(400),a=n(360),s=n(386),l=n(354),u=n(387),c=n(355),f=n(378),p=n(374)("id"),d=n(368),h=n(384),m=n(401),v=n(366),g=Object.isExtensible||h,y=v?"_s":"size",b=0,w=function(e,t){if(!h(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!d(e,p)){if(!g(e))return"F";if(!t)return"E";i(e,p,++b)}return"O"+e[p]},x=function(e,t){var n,r=w(t);if("F"!==r)return e._i[r];for(n=e._f;n;n=n.n)if(n.k==t)return n};e.exports={getConstructor:function(e,t,n,i){var c=e(function(e,o){s(e,c,t),e._i=r.create(null),e._f=void 0,e._l=void 0,e[y]=0,void 0!=o&&u(o,n,e[i],e)});return o(c.prototype,{clear:function(){for(var e=this,t=e._i,n=e._f;n;n=n.n)n.r=!0,n.p&&(n.p=n.p.n=void 0),delete t[n.i];e._f=e._l=void 0,e[y]=0},"delete":function(e){var t=this,n=x(t,e);if(n){var r=n.n,i=n.p;delete t._i[n.i],n.r=!0,i&&(i.n=r),r&&(r.p=i),t._f==n&&(t._f=r),t._l==n&&(t._l=i),t[y]--}return!!n},forEach:function(e){for(var t,n=a(e,arguments.length>1?arguments[1]:void 0,3);t=t?t.n:this._f;)for(n(t.v,t.k,this);t&&t.r;)t=t.p},has:function(e){return!!x(this,e)}}),v&&r.setDesc(c.prototype,"size",{get:function(){return l(this[y])}}),c},def:function(e,t,n){var r,i,o=x(e,t);return o?o.v=n:(e._l=o={i:i=w(t,!0),k:t,v:n,p:r=e._l,n:void 0,r:!1},e._f||(e._f=o),r&&(r.n=o),e[y]++,"F"!==i&&(e._i[i]=o)),e},getEntry:x,setStrong:function(e,t,n){c(e,t,function(e,t){this._t=e,this._k=t,this._l=void 0},function(){for(var e=this,t=e._k,n=e._l;n&&n.r;)n=n.p;return e._t&&(e._l=n=n?n.n:e._t._f)?"keys"==t?f(0,n.k):"values"==t?f(0,n.v):f(0,[n.k,n.v]):(e._t=void 0,f(1))},n?"entries":"values",!n,!0),m(t)}}},function(e,t,n){"use strict";var r=n(364),i=n(358),o=n(357),a=n(367),s=n(363),l=n(400),u=n(387),c=n(386),f=n(384),p=n(371),d=n(366);e.exports=function(e,t,n,h,m,v){var g=i[e],y=g,b=m?"set":"add",w=y&&y.prototype,x={};return d&&"function"==typeof y&&(v||w.forEach&&!a(function(){(new y).entries().next()}))?(y=t(function(t,n){c(t,y,e),t._c=new g,void 0!=n&&u(n,m,t[b],t)}),r.each.call("add,clear,delete,forEach,get,has,set,keys,values,entries".split(","),function(e){var t="add"==e||"set"==e;e in w&&(!v||"clear"!=e)&&s(y.prototype,e,function(n,r){if(!t&&v&&!f(n))return"get"==e?void 0:!1;var i=this._c[e](0===n?0:n,r);return t?this:i})}),"size"in w&&r.setDesc(y.prototype,"size",{get:function(){return this._c.size}})):(y=h.getConstructor(t,e,m,b),l(y.prototype,n)),p(y,e),x[e]=y,o(o.G+o.W+o.F,x),v||h.setStrong(y,e,m),y}},function(e,t,n){var r=n(357);r(r.P,"Map",{toJSON:n(448)("Map")})},function(e,t,n){var r=n(387),i=n(383);e.exports=function(e){return function(){if(i(this)!=e)throw TypeError(e+"#toJSON isn't generic");var t=[];return r(this,!1,t.push,t),t}}},function(e,t,n){"use strict";function r(e,t){for(var n=!0;n;){var i=e,o=t;if(a=l=void 0,n=!1,!o)return i;if(!(o instanceof u.GraphQLList||o instanceof u.GraphQLNonNull)){if(i[o.name])return(0,m["default"])(i[o.name]===o,"Schema must contain unique named types but contains multiple "+('types named "'+o+'".')),i;i[o.name]=o;var a=i;if((o instanceof u.GraphQLUnionType||o instanceof u.GraphQLInterfaceType)&&(a=o.getPossibleTypes().reduce(r,a)),o instanceof u.GraphQLObjectType&&(a=o.getInterfaces().reduce(r,a)),o instanceof u.GraphQLObjectType||o instanceof u.GraphQLInterfaceType||o instanceof u.GraphQLInputObjectType){var l=o.getFields();s(l).forEach(function(e){var t=l[e];if(t.args){var n=t.args.map(function(e){return e.type});a=n.reduce(r,a)}a=r(a,t.type)})}return a}e=i,t=o.ofType,n=!0}}function i(e,t){var n=e.getFields(),r=t.getFields();s(r).forEach(function(i){var o=n[i],a=r[i];(0,m["default"])(o,'"'+t+'" expects field "'+i+'" but "'+e+'" does not provide it.'),(0,m["default"])((0,v.isTypeSubTypeOf)(o.type,a.type),t+"."+i+' expects type "'+a.type+'" but '+(e+"."+i+' provides type "'+o.type+'".')),a.args.forEach(function(n){var r=n.name,a=(0,d["default"])(o.args,function(e){return e.name===r});(0,m["default"])(a,t+"."+i+' expects argument "'+r+'" but '+(e+"."+i+" does not provide it.")),(0,m["default"])((0,v.isEqualType)(n.type,a.type),t+"."+i+"("+r+':) expects type "'+n.type+'" '+("but "+e+"."+i+"("+r+":) provides ")+('type "'+a.type+'".'))}),o.args.forEach(function(n){var r=n.name,o=(0,d["default"])(a.args,function(e){return e.name===r});o||(0,m["default"])(!(n.type instanceof u.GraphQLNonNull),e+"."+i+"("+r+":) is of required type "+('"'+n.type+'" but is not also provided by the ')+("interface "+t+"."+i+"."))})})}var o=n(439)["default"],a=n(404)["default"],s=n(450)["default"],l=n(436)["default"];Object.defineProperty(t,"__esModule",{value:!0});var u=n(454),c=n(462),f=n(464),p=n(466),d=l(p),h=n(437),m=l(h),v=n(467),g=function(){function e(t){var n=this;a(this,e),(0,m["default"])("object"==typeof t,"Must provide configuration object."),(0,m["default"])(t.query instanceof u.GraphQLObjectType,"Schema query must be Object Type but got: "+t.query+"."),this._queryType=t.query,(0,m["default"])(!t.mutation||t.mutation instanceof u.GraphQLObjectType,"Schema mutation must be Object Type if provided but "+("got: "+t.mutation+".")),this._mutationType=t.mutation,(0,m["default"])(!t.subscription||t.subscription instanceof u.GraphQLObjectType,"Schema subscription must be Object Type if provided but "+("got: "+t.subscription+".")),this._subscriptionType=t.subscription,(0,m["default"])(!t.directives||Array.isArray(t.directives)&&t.directives.every(function(e){return e instanceof c.GraphQLDirective}),"Schema directives must be Array<GraphQLDirective> if provided but "+("got: "+t.directives+".")),this._directives=t.directives||[c.GraphQLIncludeDirective,c.GraphQLSkipDirective],this._typeMap=[this.getQueryType(),this.getMutationType(),this.getSubscriptionType(),f.__Schema].reduce(r,{}),s(this._typeMap).forEach(function(e){var t=n._typeMap[e];t instanceof u.GraphQLObjectType&&t.getInterfaces().forEach(function(e){return i(t,e)})})}return o(e,[{key:"getQueryType",value:function(){return this._queryType}},{key:"getMutationType",value:function(){return this._mutationType}},{key:"getSubscriptionType",value:function(){return this._subscriptionType}},{key:"getTypeMap",value:function(){return this._typeMap}},{key:"getType",value:function(e){return this.getTypeMap()[e]}},{key:"getDirectives",value:function(){return this._directives}},{key:"getDirective",value:function(e){return(0,d["default"])(this.getDirectives(),function(t){return t.name===e})}}]),e}();t.GraphQLSchema=g},function(e,t,n){e.exports={"default":n(451),__esModule:!0}},function(e,t,n){n(452),e.exports=n(359).Object.keys},function(e,t,n){var r=n(453);n(412)("keys",function(e){return function(t){return e(r(t))}})},function(e,t,n){var r=n(354);e.exports=function(e){return Object(r(e))}},function(e,t,n){"use strict";function r(e){return e instanceof I||e instanceof D||e instanceof F||e instanceof P||e instanceof G||e instanceof j||e instanceof Q||e instanceof R}function i(e){var t=c(e);return t instanceof I||t instanceof G||t instanceof j}function o(e){var t=c(e);return t instanceof I||t instanceof D||t instanceof F||t instanceof P||t instanceof G}function a(e){var t=c(e);return t instanceof I||t instanceof G}function s(e){return e instanceof D||e instanceof F||e instanceof P}function l(e){return e instanceof F||e instanceof P}function u(e){return e instanceof R?e.ofType:e}function c(e){for(var t=e;t instanceof Q||t instanceof R;)t=t.ofType;return t}function f(e){return"function"==typeof e?e():e}function p(e,t){var n=f(t);return n?((0,E["default"])(Array.isArray(n),e+" interfaces must be an Array or a function which returns an Array."),n.forEach(function(t){(0,E["default"])(t instanceof F,e+" may only implement Interface types, it cannot "+("implement: "+t+".")),"function"!=typeof t.resolveType&&(0,E["default"])("function"==typeof e.isTypeOf,"Interface Type "+t+' does not provide a "resolveType" function '+("and implementing Type "+e+' does not provide a "isTypeOf" ')+"function. There is no way to resolve this implementing type during execution.")}),n):[]}function d(e,t){var n=f(t);(0,E["default"])(h(n),e+" fields must be an object with field names as keys or a function which returns such an object.");var r=T(n);(0,E["default"])(r.length>0,e+" fields must be an object with field names as keys or a function which returns such an object.");var a={};return r.forEach(function(t){y(t);var r=x({},n[t],{name:t});(0,E["default"])(!r.hasOwnProperty("isDeprecated"),e+"."+t+' should provide "deprecationReason" instead of "isDeprecated".'),(0,E["default"])(o(r.type),e+"."+t+" field type must be Output Type but "+("got: "+r.type+".")),r.args?((0,E["default"])(h(r.args),e+"."+t+" args must be an object with argument names as keys."),r.args=T(r.args).map(function(n){y(n);var o=r.args[n];return(0,E["default"])(i(o.type),e+"."+t+"("+n+":) argument type must be "+("Input Type but got: "+o.type+".")),{name:n,description:void 0===o.description?null:o.description,type:o.type,defaultValue:void 0===o.defaultValue?null:o.defaultValue}})):r.args=[],a[t]=r}),a}function h(e){return e&&"object"==typeof e&&!Array.isArray(e)}function m(e){e.getInterfaces().forEach(function(t){t._implementations.push(e)})}function v(e,t,n){for(var r=n.getPossibleTypes(),i=0;i<r.length;i++){var o=r[i];if("function"==typeof o.isTypeOf&&o.isTypeOf(e,t))return o}}function g(e,t){(0,E["default"])(h(t),e+" values must be an object with value names as keys.");var n=T(t);return(0,E["default"])(n.length>0,e+" values must be an object with value names as keys."),n.map(function(n){y(n);var r=t[n];return(0,E["default"])(h(r),e+"."+n+' must refer to an object with a "value" key '+("representing an internal value but got: "+r+".")),(0,E["default"])(!r.hasOwnProperty("isDeprecated"),e+"."+n+' should provide "deprecationReason" instead of "isDeprecated".'),{name:n,description:r.description,deprecationReason:r.deprecationReason,value:(0,N["default"])(r.value)?n:r.value}})}function y(e){(0,E["default"])(V.test(e),'Names must match /^[_a-zA-Z][_a-zA-Z0-9]*$/ but "'+e+'" does not.')}var b=n(439)["default"],w=n(404)["default"],x=n(455)["default"],T=n(450)["default"],k=n(442)["default"],L=n(414)["default"],S=n(436)["default"];Object.defineProperty(t,"__esModule",{value:!0}),t.isType=r,t.isInputType=i,t.isOutputType=o,t.isLeafType=a,t.isCompositeType=s,t.isAbstractType=l,t.getNullableType=u,t.getNamedType=c;var C=n(437),E=S(C),_=n(460),N=S(_),A=n(461),O=S(A),M=n(421),I=function(){function e(t){w(this,e),(0,E["default"])(t.name,"Type must be named."),y(t.name),this.name=t.name,this.description=t.description,(0,E["default"])("function"==typeof t.serialize,this+' must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.'),(t.parseValue||t.parseLiteral)&&(0,E["default"])("function"==typeof t.parseValue&&"function"==typeof t.parseLiteral,this+' must provide both "parseValue" and "parseLiteral" functions.'),this._scalarConfig=t}return b(e,[{key:"serialize",value:function(e){var t=this._scalarConfig.serialize;return t(e)}},{key:"parseValue",value:function(e){var t=this._scalarConfig.parseValue;return t?t(e):null}},{key:"parseLiteral",value:function(e){var t=this._scalarConfig.parseLiteral;return t?t(e):null}},{key:"toString",value:function(){return this.name}}]),e}();t.GraphQLScalarType=I;var D=function(){function e(t){w(this,e),(0,E["default"])(t.name,"Type must be named."),y(t.name),this.name=t.name,this.description=t.description,t.isTypeOf&&(0,E["default"])("function"==typeof t.isTypeOf,this+' must provide "isTypeOf" as a function.'),this.isTypeOf=t.isTypeOf,this._typeConfig=t,m(this)}return b(e,[{key:"getFields",value:function(){return this._fields||(this._fields=d(this,this._typeConfig.fields))}},{key:"getInterfaces",value:function(){return this._interfaces||(this._interfaces=p(this,this._typeConfig.interfaces))}},{key:"toString",value:function(){return this.name}}]),e}();t.GraphQLObjectType=D;var F=function(){function e(t){w(this,e),(0,E["default"])(t.name,"Type must be named."),y(t.name),this.name=t.name,this.description=t.description,t.resolveType&&(0,E["default"])("function"==typeof t.resolveType,this+' must provide "resolveType" as a function.'),this.resolveType=t.resolveType,this._typeConfig=t,this._implementations=[]}return b(e,[{key:"getFields",value:function(){return this._fields||(this._fields=d(this,this._typeConfig.fields))}},{key:"getPossibleTypes",value:function(){return this._implementations}},{key:"isPossibleType",value:function(e){var t=this._possibleTypes||(this._possibleTypes=(0,O["default"])(this.getPossibleTypes(),function(e){return e.name}));return Boolean(t[e.name])}},{key:"getObjectType",value:function(e,t){var n=this.resolveType;return n?n(e,t):v(e,t,this)}},{key:"toString",value:function(){return this.name}}]),e}();t.GraphQLInterfaceType=F;var P=function(){function e(t){var n=this;w(this,e),(0,E["default"])(t.name,"Type must be named."),y(t.name),this.name=t.name,this.description=t.description,t.resolveType&&(0,E["default"])("function"==typeof t.resolveType,this+' must provide "resolveType" as a function.'),this.resolveType=t.resolveType,(0,E["default"])(Array.isArray(t.types)&&t.types.length>0,"Must provide Array of types for Union "+t.name+"."),t.types.forEach(function(e){(0,E["default"])(e instanceof D,n+" may only contain Object types, it cannot contain: "+e+"."),"function"!=typeof n.resolveType&&(0,E["default"])("function"==typeof e.isTypeOf,"Union Type "+n+' does not provide a "resolveType" function '+("and possible Type "+e+' does not provide a "isTypeOf" ')+"function. There is no way to resolve this possible type during execution.");
}),this._types=t.types,this._typeConfig=t}return b(e,[{key:"getPossibleTypes",value:function(){return this._types}},{key:"isPossibleType",value:function(e){var t=this._possibleTypeNames;return t||(this._possibleTypeNames=t=this.getPossibleTypes().reduce(function(e,t){return e[t.name]=!0,e},{})),t[e.name]===!0}},{key:"getObjectType",value:function(e,t){var n=this._typeConfig.resolveType;return n?n(e,t):v(e,t,this)}},{key:"toString",value:function(){return this.name}}]),e}();t.GraphQLUnionType=P;var G=function(){function e(t){w(this,e),this.name=t.name,y(t.name),this.description=t.description,this._values=g(this,t.values),this._enumConfig=t}return b(e,[{key:"getValues",value:function(){return this._values}},{key:"serialize",value:function(e){var t=this._getValueLookup().get(e);return t?t.name:null}},{key:"parseValue",value:function(e){var t=this._getNameLookup()[e];return t?t.value:void 0}},{key:"parseLiteral",value:function(e){if(e.kind===M.ENUM){var t=this._getNameLookup()[e.value];if(t)return t.value}}},{key:"_getValueLookup",value:function(){if(!this._valueLookup){var e=new k;this.getValues().forEach(function(t){e.set(t.value,t)}),this._valueLookup=e}return this._valueLookup}},{key:"_getNameLookup",value:function(){if(!this._nameLookup){var e=L(null);this.getValues().forEach(function(t){e[t.name]=t}),this._nameLookup=e}return this._nameLookup}},{key:"toString",value:function(){return this.name}}]),e}();t.GraphQLEnumType=G;var j=function(){function e(t){w(this,e),(0,E["default"])(t.name,"Type must be named."),y(t.name),this.name=t.name,this.description=t.description,this._typeConfig=t}return b(e,[{key:"getFields",value:function(){return this._fields||(this._fields=this._defineFieldMap())}},{key:"_defineFieldMap",value:function(){var e=this,t=f(this._typeConfig.fields);(0,E["default"])(h(t),this+" fields must be an object with field names as keys or a function which returns such an object.");var n=T(t);(0,E["default"])(n.length>0,this+" fields must be an object with field names as keys or a function which returns such an object.");var r={};return n.forEach(function(n){y(n);var o=x({},t[n],{name:n});(0,E["default"])(i(o.type),e+"."+n+" field type must be Input Type but "+("got: "+o.type+".")),r[n]=o}),r}},{key:"toString",value:function(){return this.name}}]),e}();t.GraphQLInputObjectType=j;var Q=function(){function e(t){w(this,e),(0,E["default"])(r(t),"Can only create List of a GraphQLType but got: "+t+"."),this.ofType=t}return b(e,[{key:"toString",value:function(){return"["+String(this.ofType)+"]"}}]),e}();t.GraphQLList=Q;var R=function(){function e(t){w(this,e),(0,E["default"])(r(t)&&!(t instanceof e),"Can only create NonNull of a Nullable GraphQLType but got: "+t+"."),this.ofType=t}return b(e,[{key:"toString",value:function(){return this.ofType.toString()+"!"}}]),e}();t.GraphQLNonNull=R;var V=/^[_a-zA-Z][_a-zA-Z0-9]*$/},function(e,t,n){"use strict";var r=n(456)["default"];t["default"]=r||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t.__esModule=!0},function(e,t,n){e.exports={"default":n(457),__esModule:!0}},function(e,t,n){n(458),e.exports=n(359).Object.assign},function(e,t,n){var r=n(357);r(r.S+r.F,"Object",{assign:n(459)})},function(e,t,n){var r=n(364),i=n(453),o=n(380);e.exports=n(367)(function(){var e=Object.assign,t={},n={},r=Symbol(),i="abcdefghijklmnopqrst";return t[r]=7,i.split("").forEach(function(e){n[e]=e}),7!=e({},t)[r]||Object.keys(e({},n)).join("")!=i})?function(e,t){for(var n=i(e),a=arguments,s=a.length,l=1,u=r.getKeys,c=r.getSymbols,f=r.isEnum;s>l;)for(var p,d=o(a[l++]),h=c?u(d).concat(c(d)):u(d),m=h.length,v=0;m>v;)f.call(d,p=h[v++])&&(n[p]=d[p]);return n}:Object.assign},function(e,t){"use strict";function n(e){return null===e||void 0===e||e!==e}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=n,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){return e.reduce(function(e,n){return e[t(n)]=n,e},{})}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=n,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(404)["default"];Object.defineProperty(t,"__esModule",{value:!0});var i=n(454),o=n(463),a=function u(e){r(this,u),this.name=e.name,this.description=e.description,this.args=e.args||[],this.onOperation=Boolean(e.onOperation),this.onFragment=Boolean(e.onFragment),this.onField=Boolean(e.onField)};t.GraphQLDirective=a;var s=new a({name:"include",description:"Directs the executor to include this field or fragment only when the `if` argument is true.",args:[{name:"if",type:new i.GraphQLNonNull(o.GraphQLBoolean),description:"Included when true."}],onOperation:!1,onFragment:!0,onField:!0});t.GraphQLIncludeDirective=s;var l=new a({name:"skip",description:"Directs the executor to skip this field or fragment when the `if` argument is true.",args:[{name:"if",type:new i.GraphQLNonNull(o.GraphQLBoolean),description:"Skipped when true."}],onOperation:!1,onFragment:!0,onField:!0});t.GraphQLSkipDirective=l},function(e,t,n){"use strict";function r(e){var t=Number(e);return t===t&&s>=t&&t>=l?(0>t?Math.ceil:Math.floor)(t):null}function i(e){var t=Number(e);return t===t?t:null}Object.defineProperty(t,"__esModule",{value:!0});var o=n(454),a=n(419),s=2147483647,l=-2147483648,u=new o.GraphQLScalarType({name:"Int",description:"The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^53 - 1) and 2^53 - 1 since represented in JSON as double-precision floating point numbers specifiedby [IEEE 754](http://en.wikipedia.org/wiki/IEEE_floating_point).",serialize:r,parseValue:r,parseLiteral:function(e){if(e.kind===a.Kind.INT){var t=parseInt(e.value,10);if(s>=t&&t>=l)return t}return null}});t.GraphQLInt=u;var c=new o.GraphQLScalarType({name:"Float",description:"The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](http://en.wikipedia.org/wiki/IEEE_floating_point). ",serialize:i,parseValue:i,parseLiteral:function(e){return e.kind===a.Kind.FLOAT||e.kind===a.Kind.INT?parseFloat(e.value):null}});t.GraphQLFloat=c;var f=new o.GraphQLScalarType({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:String,parseValue:String,parseLiteral:function(e){return e.kind===a.Kind.STRING?e.value:null}});t.GraphQLString=f;var p=new o.GraphQLScalarType({name:"Boolean",description:"The `Boolean` scalar type represents `true` or `false`.",serialize:Boolean,parseValue:Boolean,parseLiteral:function(e){return e.kind===a.Kind.BOOLEAN?e.value:null}});t.GraphQLBoolean=p;var d=new o.GraphQLScalarType({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:String,parseValue:String,parseLiteral:function(e){return e.kind===a.Kind.STRING||e.kind===a.Kind.INT?e.value:null}});t.GraphQLID=d},function(e,t,n){"use strict";var r=n(450)["default"],i=n(436)["default"];Object.defineProperty(t,"__esModule",{value:!0});var o=n(460),a=i(o),s=n(465),l=n(424),u=n(454),c=n(463),f=new u.GraphQLObjectType({name:"__Schema",description:"A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.",fields:function(){return{types:{description:"A list of all types supported by this server.",type:new u.GraphQLNonNull(new u.GraphQLList(new u.GraphQLNonNull(d))),resolve:function(e){var t=e.getTypeMap();return r(t).map(function(e){return t[e]})}},queryType:{description:"The type that query operations will be rooted at.",type:new u.GraphQLNonNull(d),resolve:function(e){return e.getQueryType()}},mutationType:{description:"If this server supports mutation, the type that mutation operations will be rooted at.",type:d,resolve:function(e){return e.getMutationType()}},subscriptionType:{description:"If this server support subscription, the type that subscription operations will be rooted at.",type:d,resolve:function(e){return e.getSubscriptionType()}},directives:{description:"A list of all directives supported by this server.",type:new u.GraphQLNonNull(new u.GraphQLList(new u.GraphQLNonNull(p))),resolve:function(e){return e.getDirectives()}}}}});t.__Schema=f;var p=new u.GraphQLObjectType({name:"__Directive",description:"A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL’s execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.",fields:function(){return{name:{type:new u.GraphQLNonNull(c.GraphQLString)},description:{type:c.GraphQLString},args:{type:new u.GraphQLNonNull(new u.GraphQLList(new u.GraphQLNonNull(m))),resolve:function(e){return e.args||[]}},onOperation:{type:new u.GraphQLNonNull(c.GraphQLBoolean)},onFragment:{type:new u.GraphQLNonNull(c.GraphQLBoolean)},onField:{type:new u.GraphQLNonNull(c.GraphQLBoolean)}}}}),d=new u.GraphQLObjectType({name:"__Type",description:"The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name and description, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.",fields:function(){return{kind:{type:new u.GraphQLNonNull(y),resolve:function(e){if(e instanceof u.GraphQLScalarType)return g.SCALAR;if(e instanceof u.GraphQLObjectType)return g.OBJECT;if(e instanceof u.GraphQLInterfaceType)return g.INTERFACE;if(e instanceof u.GraphQLUnionType)return g.UNION;if(e instanceof u.GraphQLEnumType)return g.ENUM;if(e instanceof u.GraphQLInputObjectType)return g.INPUT_OBJECT;if(e instanceof u.GraphQLList)return g.LIST;if(e instanceof u.GraphQLNonNull)return g.NON_NULL;throw new Error("Unknown kind of type: "+e)}},name:{type:c.GraphQLString},description:{type:c.GraphQLString},fields:{type:new u.GraphQLList(new u.GraphQLNonNull(h)),args:{includeDeprecated:{type:c.GraphQLBoolean,defaultValue:!1}},resolve:function(e,t){var n=t.includeDeprecated;if(e instanceof u.GraphQLObjectType||e instanceof u.GraphQLInterfaceType){var i=e.getFields(),o=r(i).map(function(e){return i[e]});return n||(o=o.filter(function(e){return!e.deprecationReason})),o}return null}},interfaces:{type:new u.GraphQLList(new u.GraphQLNonNull(d)),resolve:function(e){return e instanceof u.GraphQLObjectType?e.getInterfaces():void 0}},possibleTypes:{type:new u.GraphQLList(new u.GraphQLNonNull(d)),resolve:function(e){return e instanceof u.GraphQLInterfaceType||e instanceof u.GraphQLUnionType?e.getPossibleTypes():void 0}},enumValues:{type:new u.GraphQLList(new u.GraphQLNonNull(v)),args:{includeDeprecated:{type:c.GraphQLBoolean,defaultValue:!1}},resolve:function(e,t){var n=t.includeDeprecated;if(e instanceof u.GraphQLEnumType){var r=e.getValues();return n||(r=r.filter(function(e){return!e.deprecationReason})),r}}},inputFields:{type:new u.GraphQLList(new u.GraphQLNonNull(m)),resolve:function(e){if(e instanceof u.GraphQLInputObjectType){var t=e.getFields();return r(t).map(function(e){return t[e]})}}},ofType:{type:d}}}}),h=new u.GraphQLObjectType({name:"__Field",description:"Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.",fields:function(){return{name:{type:new u.GraphQLNonNull(c.GraphQLString)},description:{type:c.GraphQLString},args:{type:new u.GraphQLNonNull(new u.GraphQLList(new u.GraphQLNonNull(m))),resolve:function(e){return e.args||[]}},type:{type:new u.GraphQLNonNull(d)},isDeprecated:{type:new u.GraphQLNonNull(c.GraphQLBoolean),resolve:function(e){return!(0,a["default"])(e.deprecationReason)}},deprecationReason:{type:c.GraphQLString}}}}),m=new u.GraphQLObjectType({name:"__InputValue",description:"Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.",fields:function(){return{name:{type:new u.GraphQLNonNull(c.GraphQLString)},description:{type:c.GraphQLString},type:{type:new u.GraphQLNonNull(d)},defaultValue:{type:c.GraphQLString,description:"A GraphQL-formatted string representing the default value for this input value.",resolve:function(e){return(0,a["default"])(e.defaultValue)?null:(0,l.print)((0,s.astFromValue)(e.defaultValue,e))}}}}}),v=new u.GraphQLObjectType({name:"__EnumValue",description:"One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.",fields:{name:{type:new u.GraphQLNonNull(c.GraphQLString)},description:{type:c.GraphQLString},isDeprecated:{type:new u.GraphQLNonNull(c.GraphQLBoolean),resolve:function(e){return!(0,a["default"])(e.deprecationReason)}},deprecationReason:{type:c.GraphQLString}}}),g={SCALAR:"SCALAR",OBJECT:"OBJECT",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",INPUT_OBJECT:"INPUT_OBJECT",LIST:"LIST",NON_NULL:"NON_NULL"};t.TypeKind=g;var y=new u.GraphQLEnumType({name:"__TypeKind",description:"An enum describing what kind of type a given `__Type` is.",values:{SCALAR:{value:g.SCALAR,description:"Indicates this type is a scalar."},OBJECT:{value:g.OBJECT,description:"Indicates this type is an object. `fields` and `interfaces` are valid fields."},INTERFACE:{value:g.INTERFACE,description:"Indicates this type is an interface. `fields` and `possibleTypes` are valid fields."},UNION:{value:g.UNION,description:"Indicates this type is a union. `possibleTypes` is a valid field."},ENUM:{value:g.ENUM,description:"Indicates this type is an enum. `enumValues` is a valid field."},INPUT_OBJECT:{value:g.INPUT_OBJECT,description:"Indicates this type is an input object. `inputFields` is a valid field."},LIST:{value:g.LIST,description:"Indicates this type is a list. `ofType` is a valid field."},NON_NULL:{value:g.NON_NULL,description:"Indicates this type is a non-null. `ofType` is a valid field."}}}),b={name:"__schema",type:new u.GraphQLNonNull(f),description:"Access the current type schema of this server.",args:[],resolve:function(e,t,n){var r=n.schema;return r}};t.SchemaMetaFieldDef=b;var w={name:"__type",type:d,description:"Request the type information of a single type.",args:[{name:"name",type:new u.GraphQLNonNull(c.GraphQLString)}],resolve:function(e,t,n){var r=t.name,i=n.schema;return i.getType(r)}};t.TypeMetaFieldDef=w;var x={name:"__typename",type:new u.GraphQLNonNull(c.GraphQLString),description:"The name of the current Object type at runtime.",args:[],resolve:function(e,t,n){var r=n.parentType;return r.name}};t.TypeNameMetaFieldDef=x},function(e,t,n){"use strict";function r(e,t){for(var n=!0;n;){var o=e,a=t;if(l=d=h=m=void 0,n=!1,a instanceof f.GraphQLNonNull)e=o,t=a.ofType,n=!0;else{if((0,u["default"])(o))return null;if(Array.isArray(o)){var l=a instanceof f.GraphQLList?a.ofType:null;return{kind:c.LIST,values:o.map(function(e){return r(e,l)})}}if(!(a instanceof f.GraphQLList)){if("boolean"==typeof o)return{kind:c.BOOLEAN,value:o};if("number"==typeof o){var d=String(o),h=/^[0-9]+$/.test(d);return h?a===p.GraphQLFloat?{kind:c.FLOAT,value:d+".0"}:{kind:c.INT,value:d}:{kind:c.FLOAT,value:d}}if("string"==typeof o)return a instanceof f.GraphQLEnumType&&/^[_a-zA-Z][_a-zA-Z0-9]*$/.test(o)?{kind:c.ENUM,value:o}:{kind:c.STRING,value:JSON.stringify(o).slice(1,-1)};(0,s["default"])("object"==typeof o);var m=[];return i(o).forEach(function(e){var t;if(a instanceof f.GraphQLInputObjectType){var n=a.getFields()[e];t=n&&n.type}var i=r(o[e],t);i&&m.push({kind:c.OBJECT_FIELD,name:{kind:c.NAME,value:e},value:i})}),{kind:c.OBJECT,fields:m}}e=o,t=a.ofType,n=!0}}}var i=n(450)["default"],o=n(436)["default"];Object.defineProperty(t,"__esModule",{value:!0}),t.astFromValue=r;var a=n(437),s=o(a),l=n(460),u=o(l),c=n(421),f=n(454),p=n(463)},function(e,t){"use strict";function n(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return e[n]}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=n,e.exports=t["default"]},function(e,t,n){"use strict";function r(e,t){for(var n=!0;n;){var r=e,i=t;if(n=!1,r===i)return!0;if(r instanceof o.GraphQLNonNull&&i instanceof o.GraphQLNonNull)e=r.ofType,t=i.ofType,n=!0;else{if(!(r instanceof o.GraphQLList&&i instanceof o.GraphQLList))return!1;e=r.ofType,t=i.ofType,n=!0}}}function i(e,t){var n=!0;e:for(;n;){var r=e,i=t;if(n=!1,r===i)return!0;if(i instanceof o.GraphQLNonNull){if(r instanceof o.GraphQLNonNull){e=r.ofType,t=i.ofType,n=!0;continue e}return!1}if(!(r instanceof o.GraphQLNonNull)){if(i instanceof o.GraphQLList){if(r instanceof o.GraphQLList){e=r.ofType,t=i.ofType,n=!0;continue e}return!1}return r instanceof o.GraphQLList?!1:(0,o.isAbstractType)(i)&&r instanceof o.GraphQLObjectType&&i.isPossibleType(r)?!0:!1}e=r.ofType,t=i,n=!0}}Object.defineProperty(t,"__esModule",{value:!0}),t.isEqualType=r,t.isTypeSubTypeOf=i;var o=n(454)},function(e,t,n){"use strict";function r(e,t,n){var r=n.name.value;return r===f.SchemaMetaFieldDef.name&&e.getQueryType()===t?f.SchemaMetaFieldDef:r===f.TypeMetaFieldDef.name&&e.getQueryType()===t?f.TypeMetaFieldDef:r===f.TypeNameMetaFieldDef.name&&(t instanceof c.GraphQLObjectType||t instanceof c.GraphQLInterfaceType||t instanceof c.GraphQLUnionType)?f.TypeNameMetaFieldDef:t instanceof c.GraphQLObjectType||t instanceof c.GraphQLInterfaceType?t.getFields()[r]:void 0}var i=n(439)["default"],o=n(404)["default"],a=n(420)["default"],s=n(436)["default"];Object.defineProperty(t,"__esModule",{value:!0});var l=n(421),u=a(l),c=n(454),f=n(464),p=n(469),d=n(466),h=s(d),m=function(){function e(t,n){o(this,e),this._schema=t,this._typeStack=[],this._parentTypeStack=[],this._inputTypeStack=[],this._fieldDefStack=[],this._directive=null,this._argument=null,this._getFieldDef=n||r}return i(e,[{key:"getType",value:function(){return this._typeStack.length>0?this._typeStack[this._typeStack.length-1]:void 0}},{key:"getParentType",value:function(){return this._parentTypeStack.length>0?this._parentTypeStack[this._parentTypeStack.length-1]:void 0}},{key:"getInputType",value:function(){return this._inputTypeStack.length>0?this._inputTypeStack[this._inputTypeStack.length-1]:void 0}},{key:"getFieldDef",value:function(){return this._fieldDefStack.length>0?this._fieldDefStack[this._fieldDefStack.length-1]:void 0}},{key:"getDirective",value:function(){return this._directive}},{key:"getArgument",value:function(){return this._argument}},{key:"enter",value:function(e){var t=this._schema;switch(e.kind){case u.SELECTION_SET:var n,r=(0,c.getNamedType)(this.getType());(0,c.isCompositeType)(r)&&(n=r),this._parentTypeStack.push(n);break;case u.FIELD:var i,o=this.getParentType();o&&(i=this._getFieldDef(t,o,e)),this._fieldDefStack.push(i),this._typeStack.push(i&&i.type);break;case u.DIRECTIVE:this._directive=t.getDirective(e.name.value);break;case u.OPERATION_DEFINITION:var a=void 0;"query"===e.operation?a=t.getQueryType():"mutation"===e.operation?a=t.getMutationType():"subscription"===e.operation&&(a=t.getSubscriptionType()),this._typeStack.push(a);break;case u.INLINE_FRAGMENT:case u.FRAGMENT_DEFINITION:var s=e.typeCondition,l=s?(0,p.typeFromAST)(t,s):this.getType();this._typeStack.push(l);break;case u.VARIABLE_DEFINITION:var f=(0,p.typeFromAST)(t,e.type);this._inputTypeStack.push(f);break;case u.ARGUMENT:var d,m,v=this.getDirective()||this.getFieldDef();v&&(d=(0,h["default"])(v.args,function(t){return t.name===e.name.value}),d&&(m=d.type)),this._argument=d,this._inputTypeStack.push(m);break;case u.LIST:var g=(0,c.getNullableType)(this.getInputType());this._inputTypeStack.push(g instanceof c.GraphQLList?g.ofType:void 0);break;case u.OBJECT_FIELD:var y,b=(0,c.getNamedType)(this.getInputType());if(b instanceof c.GraphQLInputObjectType){var w=b.getFields()[e.name.value];y=w?w.type:void 0}this._inputTypeStack.push(y)}}},{key:"leave",value:function(e){switch(e.kind){case u.SELECTION_SET:this._parentTypeStack.pop();break;case u.FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case u.DIRECTIVE:this._directive=null;break;case u.OPERATION_DEFINITION:case u.INLINE_FRAGMENT:case u.FRAGMENT_DEFINITION:this._typeStack.pop();break;case u.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case u.ARGUMENT:this._argument=null,this._inputTypeStack.pop();break;case u.LIST:case u.OBJECT_FIELD:this._inputTypeStack.pop()}}}]),e}();t.TypeInfo=m},function(e,t,n){"use strict";function r(e,t){var n;return t.kind===s.LIST_TYPE?(n=r(e,t.type),n&&new l.GraphQLList(n)):t.kind===s.NON_NULL_TYPE?(n=r(e,t.type),n&&new l.GraphQLNonNull(n)):((0,a["default"])(t.kind===s.NAMED_TYPE,"Must be a named type."),e.getType(t.name.value))}var i=n(436)["default"];Object.defineProperty(t,"__esModule",{value:!0}),t.typeFromAST=r;var o=n(437),a=i(o),s=n(421),l=n(454)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(471),i=n(472),o=n(473),a=n(474),s=n(475),l=n(476),u=n(477),c=n(478),f=n(479),p=n(480),d=n(481),h=n(482),m=n(483),v=n(484),g=n(485),y=n(486),b=n(487),w=n(488),x=n(494),T=n(495),k=n(496),L=n(497),S=n(502),C=[r.UniqueOperationNames,i.LoneAnonymousOperation,o.KnownTypeNames,a.FragmentsOnCompositeTypes,s.VariablesAreInputTypes,l.ScalarLeafs,u.FieldsOnCorrectType,c.UniqueFragmentNames,f.KnownFragmentNames,p.NoUnusedFragments,d.PossibleFragmentSpreads,h.NoFragmentCycles,m.NoUndefinedVariables,v.NoUnusedVariables,g.KnownDirectives,y.KnownArgumentNames,b.UniqueArgumentNames,w.ArgumentsOfCorrectType,x.ProvidedNonNullArguments,T.DefaultValuesOfCorrectType,k.VariablesInAllowedPosition,L.OverlappingFieldsCanBeMerged,S.UniqueInputFieldNames];t.specifiedRules=C},function(e,t,n){"use strict";function r(e){return'There can only be one operation named "'+e+'".'}function i(e){var t=o(null);return{OperationDefinition:function(n){var i=n.name;return i&&(t[i.value]?e.reportError(new a.GraphQLError(r(i.value),[t[i.value],i])):t[i.value]=i),!1},FragmentDefinition:function(){return!1}}}var o=n(414)["default"];Object.defineProperty(t,"__esModule",{value:!0}),t.duplicateOperationNameMessage=r,t.UniqueOperationNames=i;var a=n(406)},function(e,t,n){"use strict";function r(){return"This anonymous operation must be the only defined operation."}function i(e){var t=0;return{Document:function(e){t=e.definitions.filter(function(e){return e.kind===a.OPERATION_DEFINITION}).length},OperationDefinition:function(n){!n.name&&t>1&&e.reportError(new o.GraphQLError(r(),[n]))}}}Object.defineProperty(t,"__esModule",{value:!0}),t.anonOperationNotAloneMessage=r,t.LoneAnonymousOperation=i;var o=n(406),a=n(421)},function(e,t,n){"use strict";function r(e){return'Unknown type "'+e+'".'}function i(e){return{ObjectTypeDefinition:function(){return!1},InterfaceTypeDefinition:function(){return!1},UnionTypeDefinition:function(){return!1},InputObjectTypeDefinition:function(){return!1},NamedType:function(t){var n=t.name.value,i=e.getSchema().getType(n);i||e.reportError(new o.GraphQLError(r(n),[t]))}}}Object.defineProperty(t,"__esModule",{value:!0}),t.unknownTypeMessage=r,t.KnownTypeNames=i;var o=n(406)},function(e,t,n){"use strict";function r(e){return'Fragment cannot condition on non composite type "'+e+'".'}function i(e,t){return'Fragment "'+e+'" cannot condition on non composite '+('type "'+t+'".')}function o(e){return{InlineFragment:function(t){var n=e.getType();t.typeCondition&&n&&!(0,l.isCompositeType)(n)&&e.reportError(new a.GraphQLError(r((0,s.print)(t.typeCondition)),[t.typeCondition]))},FragmentDefinition:function(t){var n=e.getType();n&&!(0,l.isCompositeType)(n)&&e.reportError(new a.GraphQLError(i(t.name.value,(0,s.print)(t.typeCondition)),[t.typeCondition]))}}}Object.defineProperty(t,"__esModule",{value:!0}),t.inlineFragmentOnNonCompositeErrorMessage=r,t.fragmentOnNonCompositeErrorMessage=i,t.FragmentsOnCompositeTypes=o;var a=n(406),s=n(424),l=n(454)},function(e,t,n){"use strict";function r(e,t){return'Variable "$'+e+'" cannot be non-input type "'+t+'".'}function i(e){return{VariableDefinition:function(t){var n=(0,l.typeFromAST)(e.getSchema(),t.type);if(n&&!(0,s.isInputType)(n)){var i=t.variable.name.value;e.reportError(new o.GraphQLError(r(i,(0,a.print)(t.type)),[t.type]))}}}}Object.defineProperty(t,"__esModule",{value:!0}),t.nonInputTypeOnVarMessage=r,t.VariablesAreInputTypes=i;var o=n(406),a=n(424),s=n(454),l=n(469)},function(e,t,n){"use strict";function r(e,t){return'Field "'+e+'" of type "'+t+'" must not have a sub selection.'}function i(e,t){return'Field "'+e+'" of type "'+t+'" must have a sub selection.'}function o(e){return{Field:function(t){var n=e.getType();n&&((0,s.isLeafType)(n)?t.selectionSet&&e.reportError(new a.GraphQLError(r(t.name.value,n),[t.selectionSet])):t.selectionSet||e.reportError(new a.GraphQLError(i(t.name.value,n),[t])))}}}Object.defineProperty(t,"__esModule",{value:!0}),t.noSubselectionAllowedMessage=r,t.requiredSubselectionMessage=i,t.ScalarLeafs=o;var a=n(406),s=n(454)},function(e,t,n){"use strict";function r(e,t){return'Cannot query field "'+e+'" on "'+t+'".'}function i(e){return{Field:function(t){var n=e.getParentType();if(n){var i=e.getFieldDef();i||e.reportError(new o.GraphQLError(r(t.name.value,n.name),[t]))}}}}Object.defineProperty(t,"__esModule",{value:!0}),t.undefinedFieldMessage=r,t.FieldsOnCorrectType=i;var o=n(406)},function(e,t,n){"use strict";function r(e){return'There can only be one fragment named "'+e+'".'}function i(e){var t=o(null);return{OperationDefinition:function(){return!1},FragmentDefinition:function(n){var i=n.name.value;return t[i]?e.reportError(new a.GraphQLError(r(i),[t[i],n.name])):t[i]=n.name,!1}}}var o=n(414)["default"];Object.defineProperty(t,"__esModule",{value:!0}),t.duplicateFragmentNameMessage=r,t.UniqueFragmentNames=i;var a=n(406)},function(e,t,n){"use strict";function r(e){return'Unknown fragment "'+e+'".'}function i(e){return{FragmentSpread:function(t){var n=t.name.value,i=e.getFragment(n);i||e.reportError(new o.GraphQLError(r(n),[t.name]))}}}Object.defineProperty(t,"__esModule",{value:!0}),t.unknownFragmentMessage=r,t.KnownFragmentNames=i;var o=n(406)},function(e,t,n){"use strict";function r(e){return'Fragment "'+e+'" is never used.'}function i(e){var t=[],n=[];return{OperationDefinition:function(e){return t.push(e),!1},FragmentDefinition:function(e){return n.push(e),!1},Document:{leave:function(){var i=o(null);t.forEach(function(t){e.getRecursivelyReferencedFragments(t).forEach(function(e){i[e.name.value]=!0})}),n.forEach(function(t){var n=t.name.value;i[n]!==!0&&e.reportError(new a.GraphQLError(r(n),[t]))})}}}}var o=n(414)["default"];Object.defineProperty(t,"__esModule",{value:!0}),t.unusedFragMessage=r,t.NoUnusedFragments=i;var a=n(406)},function(e,t,n){"use strict";function r(e,t,n){return'Fragment "'+e+'" cannot be spread here as objects of '+('type "'+t+'" can never be of type "'+n+'".')}function i(e,t){return"Fragment cannot be spread here as objects of "+('type "'+e+'" can never be of type "'+t+'".')}function o(e){return{InlineFragment:function(t){var n=e.getType(),r=e.getParentType();n&&r&&!s(n,r)&&e.reportError(new u.GraphQLError(i(r,n),[t]))},FragmentSpread:function(t){var n=t.name.value,i=a(e,n),o=e.getParentType();i&&o&&!s(i,o)&&e.reportError(new u.GraphQLError(r(n,o,i),[t]))}}}function a(e,t){var n=e.getFragment(t);return n&&(0,d.typeFromAST)(e.getSchema(),n.typeCondition)}function s(e,t){if(e===t)return!0;if(e instanceof p.GraphQLObjectType)return t instanceof p.GraphQLObjectType?!1:-1!==t.getPossibleTypes().indexOf(e);if(e instanceof p.GraphQLInterfaceType||e instanceof p.GraphQLUnionType){if(t instanceof p.GraphQLObjectType)return-1!==e.getPossibleTypes().indexOf(t);var n=(0,f["default"])(e.getPossibleTypes(),function(e){return e.name});return t.getPossibleTypes().some(function(e){return n[e.name]})}}var l=n(436)["default"];Object.defineProperty(t,"__esModule",{value:!0}),t.typeIncompatibleSpreadMessage=r,t.typeIncompatibleAnonSpreadMessage=i,t.PossibleFragmentSpreads=o;var u=n(406),c=n(461),f=l(c),p=n(454),d=n(469)},function(e,t,n){"use strict";function r(e,t){var n=t.length?" via "+t.join(", "):"";return'Cannot spread fragment "'+e+'" within itself'+n+"."}function i(e){function t(o){var l=o.name.value;n[l]=!0;var u=e.getFragmentSpreads(o);if(0!==u.length){s[l]=i.length;for(var c=0;c<u.length;c++){var f=u[c],p=f.name.value,d=s[p];if(void 0===d){if(i.push(f),!n[p]){var h=e.getFragment(p);h&&t(h)}i.pop()}else{var m=i.slice(d);e.reportError(new a.GraphQLError(r(p,m.map(function(e){return e.name.value})),m.concat(f)))}}s[l]=void 0}}var n=o(null),i=[],s=o(null);return{OperationDefinition:function(){return!1},FragmentDefinition:function(e){return n[e.name.value]||t(e),!1}}}var o=n(414)["default"];Object.defineProperty(t,"__esModule",{value:!0}),t.cycleErrorMessage=r,t.NoFragmentCycles=i;var a=n(406)},function(e,t,n){"use strict";function r(e,t){return t?'Variable "$'+e+'" is not defined by operation "'+t+'".':'Variable "$'+e+'" is not defined.'}function i(e){var t=o(null);return{OperationDefinition:{enter:function(){t=o(null)},leave:function(n){var i=e.getRecursiveVariableUsages(n);i.forEach(function(i){var o=i.node,s=o.name.value;t[s]!==!0&&e.reportError(new a.GraphQLError(r(s,n.name&&n.name.value),[o,n]))})}},VariableDefinition:function(e){t[e.variable.name.value]=!0}}}var o=n(414)["default"];Object.defineProperty(t,"__esModule",{value:!0}),t.undefinedVarMessage=r,t.NoUndefinedVariables=i;var a=n(406)},function(e,t,n){"use strict";function r(e){return'Variable "$'+e+'" is never used.'}function i(e){var t=[];return{OperationDefinition:{enter:function(){t=[]},leave:function(n){var i=o(null),s=e.getRecursiveVariableUsages(n);s.forEach(function(e){var t=e.node;i[t.name.value]=!0}),t.forEach(function(t){var n=t.variable.name.value;i[n]!==!0&&e.reportError(new a.GraphQLError(r(n),[t]))})}},VariableDefinition:function(e){t.push(e)}}}var o=n(414)["default"];Object.defineProperty(t,"__esModule",{value:!0}),t.unusedVariableMessage=r,t.NoUnusedVariables=i;var a=n(406)},function(e,t,n){"use strict";function r(e){return'Unknown directive "'+e+'".'}function i(e,t){return'Directive "'+e+'" may not be used on "'+t+'".'}function o(e){return{Directive:function(t,n,o,a,l){var f=(0,u["default"])(e.getSchema().getDirectives(),function(e){return e.name===t.name.value});if(!f)return void e.reportError(new s.GraphQLError(r(t.name.value),[t]));var p=l[l.length-1];switch(p.kind){case c.OPERATION_DEFINITION:f.onOperation||e.reportError(new s.GraphQLError(i(t.name.value,"operation"),[t]));break;case c.FIELD:f.onField||e.reportError(new s.GraphQLError(i(t.name.value,"field"),[t]));break;case c.FRAGMENT_SPREAD:case c.INLINE_FRAGMENT:case c.FRAGMENT_DEFINITION:f.onFragment||e.reportError(new s.GraphQLError(i(t.name.value,"fragment"),[t]))}}}}var a=n(436)["default"];Object.defineProperty(t,"__esModule",{value:!0}),t.unknownDirectiveMessage=r,t.misplacedDirectiveMessage=i,t.KnownDirectives=o;var s=n(406),l=n(466),u=a(l),c=n(421)},function(e,t,n){"use strict";function r(e,t,n){return'Unknown argument "'+e+'" on field "'+t+'" of '+('type "'+n+'".')}function i(e,t){return'Unknown argument "'+e+'" on directive "@'+t+'".'}function o(e){return{Argument:function(t,n,o,a,l){var c=l[l.length-1];if(c.kind===p.FIELD){var d=e.getFieldDef();
if(d){var h=(0,u["default"])(d.args,function(e){return e.name===t.name.value});if(!h){var m=e.getParentType();(0,f["default"])(m),e.reportError(new s.GraphQLError(r(t.name.value,d.name,m.name),[t]))}}}else if(c.kind===p.DIRECTIVE){var v=e.getDirective();if(v){var g=(0,u["default"])(v.args,function(e){return e.name===t.name.value});g||e.reportError(new s.GraphQLError(i(t.name.value,v.name),[t]))}}}}}var a=n(436)["default"];Object.defineProperty(t,"__esModule",{value:!0}),t.unknownArgMessage=r,t.unknownDirectiveArgMessage=i,t.KnownArgumentNames=o;var s=n(406),l=n(466),u=a(l),c=n(437),f=a(c),p=n(421)},function(e,t,n){"use strict";function r(e){return'There can be only one argument named "'+e+'".'}function i(e){var t=o(null);return{Field:function(){t=o(null)},Directive:function(){t=o(null)},Argument:function(n){var i=n.name.value;return t[i]?e.reportError(new a.GraphQLError(r(i),[t[i],n.name])):t[i]=n.name,!1}}}var o=n(414)["default"];Object.defineProperty(t,"__esModule",{value:!0}),t.duplicateArgMessage=r,t.UniqueArgumentNames=i;var a=n(406)},function(e,t,n){"use strict";function r(e,t,n,r){var i=r?"\n"+r.join("\n"):"";return'Argument "'+e+'" has invalid value '+n+"."+i}function i(e){return{Argument:function(t){var n=e.getArgument();if(n){var i=(0,s.isValidLiteralValue)(n.type,t.value);i&&i.length>0&&e.reportError(new o.GraphQLError(r(t.name.value,n.type,(0,a.print)(t.value),i),[t.value]))}return!1}}}Object.defineProperty(t,"__esModule",{value:!0}),t.badValueMessage=r,t.ArgumentsOfCorrectType=i;var o=n(406),a=n(424),s=n(489)},function(e,t,n){"use strict";function r(e,t){for(var n=!0;n;){var s=e,f=t;if(d=F=m=g=y=b=w=x=C=E=_=N=D=void 0,n=!1,s instanceof c.GraphQLNonNull){var d=s.ofType;if(!f)return d.name?['Expected "'+d.name+'!", found null.']:["Expected non-null value, found null."];e=d,t=f,n=!0}else{if(!f)return[];if(f.kind===u.VARIABLE)return[];if(!(s instanceof c.GraphQLList)){if(s instanceof c.GraphQLInputObjectType){if(f.kind!==u.OBJECT)return['Expected "'+s.name+'", found not an object.'];var m=s.getFields(),g=[],y=f.fields,b=!0,w=!1,x=void 0;try{for(var T,k=o(y);!(b=(T=k.next()).done);b=!0){var L=T.value;m[L.name.value]||g.push('In field "'+L.name.value+'": Unknown field.')}}catch(S){w=!0,x=S}finally{try{!b&&k["return"]&&k["return"]()}finally{if(w)throw x}}var C=(0,h["default"])(y,function(e){return e.name.value}),E=!0,_=!1,N=void 0;try{for(var A,O=o(a(m));!(E=(A=O.next()).done);E=!0){var M=A.value,I=r(m[M].type,C[M]&&C[M].value);g.push.apply(g,i(I.map(function(e){return'In field "'+M+'": '+e})))}}catch(S){_=!0,N=S}finally{try{!E&&O["return"]&&O["return"]()}finally{if(_)throw N}}return g}(0,p["default"])(s instanceof c.GraphQLScalarType||s instanceof c.GraphQLEnumType,"Must be input type");var D=s.parseLiteral(f);return(0,v["default"])(D)?['Expected type "'+s.name+'", found '+(0,l.print)(f)+"."]:[]}var F=s.ofType;if(f.kind===u.LIST)return f.values.reduce(function(e,t,n){var i=r(F,t);return e.concat(i.map(function(e){return"In element #"+n+": "+e}))},[]);e=F,t=f,n=!0}}}var i=n(490)["default"],o=n(427)["default"],a=n(450)["default"],s=n(436)["default"];Object.defineProperty(t,"__esModule",{value:!0}),t.isValidLiteralValue=r;var l=n(424),u=n(421),c=n(454),f=n(437),p=s(f),d=n(461),h=s(d),m=n(460),v=s(m)},function(e,t,n){"use strict";var r=n(491)["default"];t["default"]=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return r(e)},t.__esModule=!0},function(e,t,n){e.exports={"default":n(492),__esModule:!0}},function(e,t,n){n(351),n(493),e.exports=n(359).Array.from},function(e,t,n){"use strict";var r=n(360),i=n(357),o=n(453),a=n(388),s=n(389),l=n(390),u=n(391);i(i.S+i.F*!n(402)(function(e){Array.from(e)}),"Array",{from:function(e){var t,n,i,c,f=o(e),p="function"==typeof this?this:Array,d=arguments,h=d.length,m=h>1?d[1]:void 0,v=void 0!==m,g=0,y=u(f);if(v&&(m=r(m,h>2?d[2]:void 0,2)),void 0==y||p==Array&&s(y))for(t=l(f.length),n=new p(t);t>g;g++)n[g]=v?m(f[g],g):f[g];else for(c=y.call(f),n=new p;!(i=c.next()).done;g++)n[g]=v?a(c,m,[i.value,g],!0):i.value;return n.length=g,n}})},function(e,t,n){"use strict";function r(e,t,n){return'Field "'+e+'" argument "'+t+'" of type "'+n+'" is required but not provided.'}function i(e,t,n){return'Directive "@'+e+'" argument "'+t+'" of type '+('"'+n+'" is required but not provided.')}function o(e){return{Field:{leave:function(t){var n=e.getFieldDef();if(!n)return!1;var i=t.arguments||[],o=(0,u["default"])(i,function(e){return e.name.value});n.args.forEach(function(n){var i=o[n.name];!i&&n.type instanceof c.GraphQLNonNull&&e.reportError(new s.GraphQLError(r(t.name.value,n.name,n.type),[t]))})}},Directive:{leave:function(t){var n=e.getDirective();if(!n)return!1;var r=t.arguments||[],o=(0,u["default"])(r,function(e){return e.name.value});n.args.forEach(function(n){var r=o[n.name];!r&&n.type instanceof c.GraphQLNonNull&&e.reportError(new s.GraphQLError(i(t.name.value,n.name,n.type),[t]))})}}}}var a=n(436)["default"];Object.defineProperty(t,"__esModule",{value:!0}),t.missingFieldArgMessage=r,t.missingDirectiveArgMessage=i,t.ProvidedNonNullArguments=o;var s=n(406),l=n(461),u=a(l),c=n(454)},function(e,t,n){"use strict";function r(e,t,n){return'Variable "$'+e+'" of type "'+t+'" is required and will not '+('use the default value. Perhaps you meant to use type "'+n+'".')}function i(e,t,n,r){var i=r?"\n"+r.join("\n"):"";return'Variable "$'+e+" has invalid default value "+n+"."+i}function o(e){return{VariableDefinition:function(t){var n=t.variable.name.value,o=t.defaultValue,c=e.getInputType();if(c instanceof l.GraphQLNonNull&&o&&e.reportError(new a.GraphQLError(r(n,c,c.ofType),[o])),c&&o){var f=(0,u.isValidLiteralValue)(c,o);f&&f.length>0&&e.reportError(new a.GraphQLError(i(n,c,(0,s.print)(o),f),[o]))}return!1},SelectionSet:function(){return!1},FragmentDefinition:function(){return!1}}}Object.defineProperty(t,"__esModule",{value:!0}),t.defaultForNonNullArgMessage=r,t.badValueForDefaultArgMessage=i,t.DefaultValuesOfCorrectType=o;var a=n(406),s=n(424),l=n(454),u=n(489)},function(e,t,n){"use strict";function r(e,t,n){return'Variable "$'+e+'" of type "'+t+'" used in position '+('expecting type "'+n+'".')}function i(e){var t=a(null);return{OperationDefinition:{enter:function(){t=a(null)},leave:function(n){var i=e.getRecursiveVariableUsages(n);i.forEach(function(n){var i=n.node,a=n.type,l=i.name.value,f=t[l];if(f&&a){var p=(0,c.typeFromAST)(e.getSchema(),f.type);p&&!(0,u.isTypeSubTypeOf)(o(p,f),a)&&e.reportError(new s.GraphQLError(r(l,p,a),[f,i]))}})}},VariableDefinition:function(e){t[e.variable.name.value]=e}}}function o(e,t){return!t.defaultValue||e instanceof l.GraphQLNonNull?e:new l.GraphQLNonNull(e)}var a=n(414)["default"];Object.defineProperty(t,"__esModule",{value:!0}),t.badVarPosMessage=r,t.VariablesInAllowedPosition=i;var s=n(406),l=n(454),u=n(467),c=n(469)},function(e,t,n){"use strict";function r(e,t){return'Fields "'+e+'" conflict because '+i(t)+"."}function i(e){return Array.isArray(e)?e.map(function(e){var t=p(e,2),n=t[0],r=t[1];return'subfields "'+n+'" conflict because '+i(r)}).join(" and "):e}function o(e){function t(e){var t=[];return d(e).forEach(function(r){var i=e[r];if(i.length>1)for(var o=0;o<i.length;o++)for(var a=o;a<i.length;a++){var s=n(r,i[o],i[a]);s&&t.push(s)}}),t}function n(n,r,o){var s=p(r,3),u=s[0],c=s[1],f=s[2],d=p(o,3),h=d[0],m=d[1],v=d[2];if(c!==m&&!(u!==h&&u instanceof T.GraphQLObjectType&&h instanceof T.GraphQLObjectType||i.has(c,m))){i.add(c,m);var g=c.name.value,y=m.name.value;if(g!==y)return[[n,g+" and "+y+" are different fields"],[c],[m]];var b=f&&f.type,w=v&&v.type;if(b&&w&&!(0,k.isEqualType)(b,w))return[[n,"they return differing types "+b+" and "+w],[c],[m]];if(!a(c.arguments||[],m.arguments||[]))return[[n,"they have differing arguments"],[c],[m]];var x=c.selectionSet,L=m.selectionSet;if(x&&L){var S={},C=l(e,(0,T.getNamedType)(b),x,S);C=l(e,(0,T.getNamedType)(w),L,S,C);var E=t(C);if(E.length>0)return[[n,E.map(function(e){var t=p(e,1),n=t[0];return n})],E.reduce(function(e,t){var n=p(t,2),r=n[1];return e.concat(r)},[c]),E.reduce(function(e,t){var n=p(t,3),r=n[2];return e.concat(r)},[m])]}}}var i=new S;return{SelectionSet:{leave:function(n){var i=l(e,e.getParentType(),n),o=t(i);o.forEach(function(t){var n=p(t,3),i=p(n[0],2),o=i[0],a=i[1],s=n[1],l=n[2];return e.reportError(new g.GraphQLError(r(o,a),s.concat(l)))})}}}}function a(e,t){return e.length!==t.length?!1:e.every(function(e){var n=(0,b["default"])(t,function(t){return t.name.value===e.name.value});return n?s(e.value,n.value):!1})}function s(e,t){return!e&&!t||(0,x.print)(e)===(0,x.print)(t)}function l(e,t,n,r,i){for(var o=r||{},a=i||{},s=0;s<n.selections.length;s++){var u=n.selections[s];switch(u.kind){case w.FIELD:var c,f=u.name.value;(t instanceof T.GraphQLObjectType||t instanceof T.GraphQLInterfaceType)&&(c=t.getFields()[f]);var p=u.alias?u.alias.value:f;a[p]||(a[p]=[]),a[p].push([t,u,c]);break;case w.INLINE_FRAGMENT:var d=u.typeCondition,h=d?(0,L.typeFromAST)(e.getSchema(),u.typeCondition):t;a=l(e,h,u.selectionSet,o,a);break;case w.FRAGMENT_SPREAD:var m=u.name.value;if(o[m])continue;o[m]=!0;var v=e.getFragment(m);if(!v)continue;var g=(0,L.typeFromAST)(e.getSchema(),v.typeCondition);a=l(e,g,v.selectionSet,o,a)}}return a}function u(e,t,n){var r=e.get(t);r||(r=new m,e.set(t,r)),r.add(n)}var c=n(439)["default"],f=n(404)["default"],p=n(426)["default"],d=n(450)["default"],h=n(442)["default"],m=n(498)["default"],v=n(436)["default"];Object.defineProperty(t,"__esModule",{value:!0}),t.fieldsConflictMessage=r,t.OverlappingFieldsCanBeMerged=o;var g=n(406),y=n(466),b=v(y),w=n(421),x=n(424),T=n(454),k=n(467),L=n(469),S=function(){function e(){f(this,e),this._data=new h}return c(e,[{key:"has",value:function(e,t){var n=this._data.get(e);return n&&n.has(t)}},{key:"add",value:function(e,t){u(this._data,e,t),u(this._data,t,e)}}]),e}()},function(e,t,n){e.exports={"default":n(499),__esModule:!0}},function(e,t,n){n(350),n(351),n(375),n(500),n(501),e.exports=n(359).Set},function(e,t,n){"use strict";var r=n(445);n(446)("Set",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{add:function(e){return r.def(this,e=0===e?0:e,e)}},r)},function(e,t,n){var r=n(357);r(r.P,"Set",{toJSON:n(448)("Set")})},function(e,t,n){"use strict";function r(e){return'There can be only one input field named "'+e+'".'}function i(e){var t=[],n=o(null);return{ObjectValue:{enter:function(){t.push(n),n=o(null)},leave:function(){n=t.pop()}},ObjectField:function(t){var i=t.name.value;return n[i]?e.reportError(new a.GraphQLError(r(i),[n[i],t.name])):n[i]=t.name,!1}}}var o=n(414)["default"];Object.defineProperty(t,"__esModule",{value:!0}),t.duplicateInputFieldMessage=r,t.UniqueInputFieldNames=i;var a=n(406)},function(e,t,n){"use strict";function r(e,t,n,r,a){(0,_["default"])(e,"Must provide schema"),(0,_["default"])(e instanceof F.GraphQLSchema,"Schema must be an instance of GraphQLSchema. Also ensure that there are not multiple versions of GraphQL installed in your node_modules directory.");var s=i(e,t,n,r,a);return new x(function(e){e(o(s,s.operation,n))})["catch"](function(e){return s.errors.push(e),null}).then(function(e){return s.errors.length?{data:e,errors:s.errors}:{data:e}})}function i(e,t,n,r,i){var o,a=[],s={};if(t.definitions.forEach(function(e){switch(e.kind){case M.Kind.OPERATION_DEFINITION:if(!i&&o)throw new L.GraphQLError("Must provide operation name if query contains multiple operations.");(!i||e.name&&e.name.value===i)&&(o=e);break;case M.Kind.FRAGMENT_DEFINITION:s[e.name.value]=e;break;default:throw new L.GraphQLError("GraphQL cannot execute a request containing a "+e.kind+".",e)}}),!o)throw i?new L.GraphQLError("Must provide an operation."):new L.GraphQLError('Unknown operation named "'+i+'".');var l=(0,I.getVariableValues)(e,o.variableDefinitions||[],r||{}),u={schema:e,fragments:s,rootValue:n,operation:o,variableValues:l,errors:a};return u}function o(e,t,n){var r=a(e.schema,t),i=u(e,r,t.selectionSet,{},{});return"mutation"===t.operation?s(e,r,n,i):l(e,r,n,i)}function a(e,t){switch(t.operation){case"query":return e.getQueryType();case"mutation":var n=e.getMutationType();if(!n)throw new L.GraphQLError("Schema is not configured for mutations",[t]);return n;case"subscription":var r=e.getSubscriptionType();if(!r)throw new L.GraphQLError("Schema is not configured for subscriptions",[t]);return r;default:throw new L.GraphQLError("Can only execute queries, mutations and subscriptions",[t])}}function s(e,t,n,r){return T(r).reduce(function(i,o){return i.then(function(i){var a=r[o],s=h(e,t,n,a);return void 0===s?i:b(s)?s.then(function(e){return i[o]=e,i}):(i[o]=s,i)})},x.resolve({}))}function l(e,t,n,r){var i=!1,o=T(r).reduce(function(o,a){var s=r[a],l=h(e,t,n,s);return void 0===l?o:(o[a]=l,b(l)&&(i=!0),o)},{});return i?p(o):o}function u(e,t,n,r,i){for(var o=0;o<n.selections.length;o++){var a=n.selections[o];switch(a.kind){case M.Kind.FIELD:if(!c(e,a.directives))continue;var s=d(a);r[s]||(r[s]=[]),r[s].push(a);break;case M.Kind.INLINE_FRAGMENT:if(!c(e,a.directives)||!f(e,a,t))continue;u(e,t,a.selectionSet,r,i);break;case M.Kind.FRAGMENT_SPREAD:var l=a.name.value;if(i[l]||!c(e,a.directives))continue;i[l]=!0;var p=e.fragments[l];if(!p||!c(e,p.directives)||!f(e,p,t))continue;u(e,t,p.selectionSet,r,i)}}return r}function c(e,t){var n=t&&(0,C["default"])(t,function(e){return e.name.value===G.GraphQLSkipDirective.name});if(n){var r=(0,I.getArgumentValues)(G.GraphQLSkipDirective.args,n.arguments,e.variableValues),i=r["if"];return!i}var o=t&&(0,C["default"])(t,function(e){return e.name.value===G.GraphQLIncludeDirective.name});if(o){var a=(0,I.getArgumentValues)(G.GraphQLIncludeDirective.args,o.arguments,e.variableValues),s=a["if"];return Boolean(s)}return!0}function f(e,t,n){var r=t.typeCondition;if(!r)return!0;var i=(0,O.typeFromAST)(e.schema,r);return i===n?!0:(0,D.isAbstractType)(i)?i.isPossibleType(n):!1}function p(e){var t=T(e),n=t.map(function(t){return e[t]});return x.all(n).then(function(e){return e.reduce(function(e,n,r){return e[t[r]]=n,e},{})})}function d(e){return e.alias?e.alias.value:e.name.value}function h(e,t,n,r){var i=r[0],o=i.name.value,a=w(e.schema,t,o);if(a){var s=a.type,l=a.resolve||y,u=(0,I.getArgumentValues)(a.args,i.arguments,e.variableValues),c={fieldName:o,fieldASTs:r,returnType:s,parentType:t,schema:e.schema,fragments:e.fragments,rootValue:e.rootValue,operation:e.operation,variableValues:e.variableValues},f=m(l,n,u,c);return v(e,s,r,c,f)}}function m(e,t,n,r){try{return e(t,n,r)}catch(i){return i instanceof Error?i:new Error(i)}}function v(e,t,n,r,i){if(t instanceof D.GraphQLNonNull)return g(e,t,n,r,i);try{var o=g(e,t,n,r,i);return b(o)?o.then(void 0,function(t){return e.errors.push(t),x.resolve(null)}):o}catch(a){return e.errors.push(a),null}}function g(e,t,n,r,i){if(b(i))return i.then(function(i){return g(e,t,n,r,i)},function(e){return x.reject((0,L.locatedError)(e,n))});if(i instanceof Error)throw(0,L.locatedError)(i,n);if(t instanceof D.GraphQLNonNull){var o=g(e,t.ofType,n,r,i);if(null===o)throw new L.GraphQLError("Cannot return null for non-nullable "+("field "+r.parentType+"."+r.fieldName+"."),n);return o}if((0,A["default"])(i))return null;if(t instanceof D.GraphQLList){(0,_["default"])(Array.isArray(i),"User Error: expected iterable, but did not find one.");var a=t.ofType,s=!1,c=i.map(function(t){var i=v(e,a,n,r,t);return!s&&b(i)&&(s=!0),i});return s?x.all(c):c}if(t instanceof D.GraphQLScalarType||t instanceof D.GraphQLEnumType){(0,_["default"])(t.serialize,"Missing serialize method on type");var f=t.serialize(i);return(0,A["default"])(f)?null:f}var p;if(t instanceof D.GraphQLObjectType)p=t;else if((0,D.isAbstractType)(t)){var d=t;if(p=d.getObjectType(i,r),p&&!d.isPossibleType(p))throw new L.GraphQLError('Runtime Object type "'+p+'" is not a possible type '+('for "'+d+'".'),n)}if(!p)return null;if(p.isTypeOf&&!p.isTypeOf(i,r))throw new L.GraphQLError('Expected value of type "'+p+'" but got: '+i+".",n);for(var h={},m={},y=0;y<n.length;y++){var w=n[y].selectionSet;w&&(h=u(e,p,w,h,m))}return l(e,p,i,h)}function y(e,t,n){var r=n.fieldName,i=e[r];return"function"==typeof i?i.call(e):i}function b(e){return e&&"object"==typeof e&&"function"==typeof e.then}function w(e,t,n){return n===P.SchemaMetaFieldDef.name&&e.getQueryType()===t?P.SchemaMetaFieldDef:n===P.TypeMetaFieldDef.name&&e.getQueryType()===t?P.TypeMetaFieldDef:n===P.TypeNameMetaFieldDef.name?P.TypeNameMetaFieldDef:t.getFields()[n]}var x=n(348)["default"],T=n(450)["default"],k=n(436)["default"];Object.defineProperty(t,"__esModule",{value:!0}),t.execute=r;var L=n(406),S=n(466),C=k(S),E=n(437),_=k(E),N=n(460),A=k(N),O=n(469),M=n(419),I=n(504),D=n(454),F=n(449),P=n(464),G=n(462)},function(e,t,n){"use strict";function r(e,t,n){return t.reduce(function(t,r){var i=r.variable.name.value;return t[i]=o(e,r,n[i]),t},{})}function i(e,t,n){if(!e||!t)return{};var r=(0,m["default"])(t,function(e){return e.name.value});return e.reduce(function(e,t){var i=t.name,o=r[i]?r[i].value:null,a=(0,g.valueFromAST)(o,t.type,n);return(0,d["default"])(a)&&(a=t.defaultValue),(0,d["default"])(a)||(e[i]=a),e},{})}function o(e,t,n){var r=(0,v.typeFromAST)(e,t.type),i=t.variable;if(!r||!(0,w.isInputType)(r))throw new u.GraphQLError('Variable "$'+i.name.value+'" expected value of type '+('"'+(0,b.print)(t.type)+'" which cannot be used as an input type.'),[t]);var o=r,s=(0,y.isValidJSValue)(n,o);if(!s.length){if((0,d["default"])(n)){var l=t.defaultValue;if(l)return(0,g.valueFromAST)(l,o)}return a(o,n)}if((0,d["default"])(n))throw new u.GraphQLError('Variable "$'+i.name.value+'" of required type '+('"'+(0,b.print)(t.type)+'" was not provided.'),[t]);var c=s?"\n"+s.join("\n"):"";throw new u.GraphQLError('Variable "$'+i.name.value+'" got invalid value '+(JSON.stringify(n)+"."+c),[t])}function a(e,t){for(var n=!0;n;){var r=e,i=t;if(o=l=u=c=void 0,n=!1,r instanceof w.GraphQLNonNull){var o=r.ofType;e=o,t=i,n=!0}else{if((0,d["default"])(i))return null;if(r instanceof w.GraphQLList){var l=r.ofType;return Array.isArray(i)?i.map(function(e){return a(l,e)}):[a(l,i)]}if(r instanceof w.GraphQLInputObjectType){var u=r.getFields();return s(u).reduce(function(e,t){var n=u[t],r=a(n.type,i[t]);return(0,d["default"])(r)&&(r=n.defaultValue),(0,d["default"])(r)||(e[t]=r),e},{})}(0,f["default"])(r instanceof w.GraphQLScalarType||r instanceof w.GraphQLEnumType,"Must be input type");var c=r.parseValue(i);if(!(0,d["default"])(c))return c}}}var s=n(450)["default"],l=n(436)["default"];Object.defineProperty(t,"__esModule",{value:!0}),t.getVariableValues=r,t.getArgumentValues=i;var u=n(406),c=n(437),f=l(c),p=n(460),d=l(p),h=n(461),m=l(h),v=n(469),g=n(505),y=n(506),b=n(424),w=n(454)},function(e,t,n){"use strict";function r(e,t,n){for(var o=!0;o;){var a=e,s=t,u=n;if(f=d=v=g=y=b=void 0,o=!1,s instanceof m.GraphQLNonNull){var f=s.ofType;e=a,t=f,n=u,o=!0}else{if(!a)return null;if(a.kind===h.VARIABLE){var d=a.name.value;return u&&u.hasOwnProperty(d)?u[d]:null}if(s instanceof m.GraphQLList){var v=s.ofType;return a.kind===h.LIST?a.values.map(function(e){return r(e,v,u)}):[r(a,v,u)]}if(s instanceof m.GraphQLInputObjectType){var g=s.getFields();if(a.kind!==h.OBJECT)return null;var y=(0,l["default"])(a.fields,function(e){return e.name.value});return i(g).reduce(function(e,t){var n=g[t],i=y[t],o=r(i&&i.value,n.type,u);return(0,p["default"])(o)&&(o=n.defaultValue),(0,p["default"])(o)||(e[t]=o),e},{})}(0,c["default"])(s instanceof m.GraphQLScalarType||s instanceof m.GraphQLEnumType,"Must be input type");var b=s.parseLiteral(a);if(!(0,p["default"])(b))return b}}}var i=n(450)["default"],o=n(436)["default"],a=n(420)["default"];Object.defineProperty(t,"__esModule",{value:!0}),t.valueFromAST=r;var s=n(461),l=o(s),u=n(437),c=o(u),f=n(460),p=o(f),d=n(421),h=a(d),m=n(454)},function(e,t,n){"use strict";function r(e,t){for(var n=!0;n;){var s=e,l=t;if(c=A=d=h=m=v=g=T=k=L=N=void 0,n=!1,l instanceof p.GraphQLNonNull){var c=l.ofType;if((0,f["default"])(s))return c.name?['Expected "'+c.name+'!", found null.']:["Expected non-null value, found null."];e=s,t=c,n=!0}else{if((0,f["default"])(s))return[];if(!(l instanceof p.GraphQLList)){if(l instanceof p.GraphQLInputObjectType){if("object"!=typeof s)return['Expected "'+l.name+'", found not an object.'];var d=l.getFields(),h=[],m=!0,v=!1,g=void 0;try{for(var y,b=o(a(s));!(m=(y=b.next()).done);m=!0){var w=y.value;d[w]||h.push('In field "${providedField}": Unknown field.')}}catch(x){v=!0,g=x}finally{try{!m&&b["return"]&&b["return"]()}finally{if(v)throw g}}var T=!0,k=!1,L=void 0;try{for(var S,C=o(a(d));!(T=(S=C.next()).done);T=!0){var E=S.value,_=r(s[E],d[E].type);h.push.apply(h,i(_.map(function(e){return'In field "'+E+'": '+e})))}}catch(x){k=!0,L=x}finally{try{!T&&C["return"]&&C["return"]()}finally{if(k)throw L}}return h}(0,u["default"])(l instanceof p.GraphQLScalarType||l instanceof p.GraphQLEnumType,"Must be input type");var N=l.parseValue(s);return(0,f["default"])(N)?['Expected type "'+l.name+'", found '+JSON.stringify(s)+"."]:[]}var A=l.ofType;if(Array.isArray(s))return s.reduce(function(e,t,n){var i=r(t,A);return e.concat(i.map(function(e){return"In element #"+n+": "+e}))},[]);e=s,t=A,n=!0}}}var i=n(490)["default"],o=n(427)["default"],a=n(450)["default"],s=n(436)["default"];Object.defineProperty(t,"__esModule",{value:!0}),t.isValidJSValue=r;var l=n(437),u=s(l),c=n(460),f=s(c),p=n(454)},function(e,t,n){"use strict";e.exports=n(508).GraphiQL},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(2),l=r(s),u=n(155),c=r(u),f=n(509),p=n(510),d=n(466),h=r(d),m=n(519),v=n(520),g=n(536),y=n(540),b=n(541),w=n(542),x=n(543),T=n(544),k=function(e){function t(n){var r=this;if(i(this,t),e.call(this,n),this._runEditorQuery=function(){r.setState({isWaitingForResponse:!0,response:null}),r._editorQueryID++;var e=r._editorQueryID,t=r.autoCompleteLeafs()||r.state.query;r._fetchQuery(t,r.state.variables,function(t){e===r._editorQueryID&&r.setState({isWaitingForResponse:!1,response:JSON.stringify(t,null,2)})})},this._onEditQuery=function(e){return r._storageSet("query",e),r.setState({query:e}),r.props.onEditQuery?r.props.onEditQuery(e):void 0},this._onEditVariables=function(e){r._storageSet("variables",e),r.setState({variables:e}),r.props.onEditVariables&&r.props.onEditVariables(e)},this._onHintInformationRender=function(e){e.addEventListener("click",r._onClickHintInformation);var t;e.addEventListener("DOMNodeRemoved",t=function(){e.removeEventListener("DOMNodeRemoved",t),e.removeEventListener("click",r._onClickHintInformation)})},this._onClickHintInformation=function(e){if("typeName"===e.target.className){var t=e.target.innerHTML,n=r.state.schema;if(n){var i=n.getType(t);i&&r.setState({docsOpen:!0},function(){r.refs.docExplorer.showDoc(i)})}}},this._onToggleDocs=function(){r.setState({docsOpen:!r.state.docsOpen})},this._onResizeStart=function(e){if(r._didClickDragBar(e)){e.preventDefault();var t=e.clientX-x.getLeft(e.target),n=function(e){if(0===e.buttons)return i();var n=c["default"].findDOMNode(r.refs.editorBar),o=e.clientX-x.getLeft(n)-t,a=n.clientWidth-o;r.setState({editorFlex:o/a})},i=function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(){r._storageSet("editorFlex",r.state.editorFlex),document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",i),n=null,i=null});document.addEventListener("mousemove",n),document.addEventListener("mouseup",i)}},this._onDocsResizeStart=function(e){e.preventDefault();var t=r.state.docsWidth,n=e.clientX-x.getLeft(e.target),i=function(e){if(0===e.buttons)return o();var t=c["default"].findDOMNode(r),i=e.clientX-x.getLeft(t)-n,a=t.clientWidth-i;100>a?r.setState({docsOpen:!1}):r.setState({docsOpen:!0,docsWidth:Math.min(a,650)})},o=function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(){r.state.docsOpen?r._storageSet("docExplorerWidth",r.state.docsWidth):r.setState({docsWidth:t}),document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",o),i=null,o=null});document.addEventListener("mousemove",i),document.addEventListener("mouseup",o)},this._onVariableResizeStart=function(e){e.preventDefault();var t=!1,n=r.state.variableEditorOpen,i=r.state.variableEditorHeight,o=e.clientY-x.getTop(e.target),a=function(e){if(0===e.buttons)return s();t=!0;var n=c["default"].findDOMNode(r.refs.editorBar),a=e.clientY-x.getTop(n)-o,l=n.clientHeight-a;60>l?r.setState({variableEditorOpen:!1,variableEditorHeight:i}):r.setState({variableEditorOpen:!0,variableEditorHeight:l})},s=function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(){t?r._storageSet("variableEditorHeight",r.state.variableEditorHeight):r.setState({variableEditorOpen:!n}),document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",s),a=null,s=null});document.addEventListener("mousemove",a),document.addEventListener("mouseup",s)},"function"!=typeof n.fetcher)throw new TypeError("GraphiQL requires a fetcher function.");this._storage=n.storage||window.localStorage;var o=void 0!==n.query?n.query:void 0!==this._storageGet("query")?this._storageGet("query"):void 0!==n.defaultQuery?n.defaultQuery:L,a=void 0!==n.variables?n.variables:this._storageGet("variables");this.state={schema:n.schema,query:o,variables:a,response:n.response,editorFlex:this._storageGet("editorFlex")||1,variableEditorOpen:Boolean(a),variableEditorHeight:this._storageGet("variableEditorHeight")||200,docsOpen:!1,docsWidth:this._storageGet("docExplorerWidth")||350,isWaitingForResponse:!1},this._editorQueryID=0}return o(t,e),t.prototype.autoCompleteLeafs=function(){var e=w.fillLeafs(this.state.schema,this.state.query,this.props.getDefaultFieldNames),t=e.insertions,n=e.result;if(t&&t.length>0){var r=this.refs.queryEditor.getCodeMirror();r.operation(function(){var e=r.getCursor(),i=r.indexFromPos(e);r.setValue(n);var o=0,a=t.map(function(e){var t=e.index,n=e.string;return r.markText(r.posFromIndex(t+o),r.posFromIndex(t+(o+=n.length)),{className:"autoInsertedLeaf",clearOnEnter:!0,title:"Automatically added leaf fields"})});setTimeout(function(){return a.forEach(function(e){return e.clear()})},7e3);var s=i;t.forEach(function(e){var t=e.index,n=e.string;i>t&&(s+=n.length)});var l=r.posFromIndex(s);r.setCursor(l)})}return n},a(t,null,[{key:"propTypes",value:{fetcher:s.PropTypes.func.isRequired,schema:s.PropTypes.instanceOf(f.GraphQLSchema),query:s.PropTypes.string,response:s.PropTypes.string,storage:s.PropTypes.shape({getItem:s.PropTypes.func,setItem:s.PropTypes.func}),defaultQuery:s.PropTypes.string,variables:s.PropTypes.string,onEditQuery:s.PropTypes.func,onEditVariables:s.PropTypes.func,getDefaultFieldNames:s.PropTypes.func},enumerable:!0}]),t.prototype.componentWillReceiveProps=function(e){var t=this.state.schema,n=this.state.query,r=this.state.variables,i=this.state.response;void 0!==e.schema&&(t=e.schema),void 0!==e.query&&(n=e.query),void 0!==e.variables&&(r=e.variables),void 0!==e.response&&(i=e.response),this.setState({schema:t,query:n,variables:r,response:i})},t.prototype.componentDidMount=function(){var e=this;if(void 0===this.state.schema){var t=this.props.fetcher;t({query:T.introspectionQuery})["catch"](function(){return t({query:T.introspectionQuerySansSubscriptions})}).then(function(t){void 0===e.state.schema&&(t.data?e.setState({schema:p.buildClientSchema(t.data)}):e.setState({response:JSON.stringify(t,null,2)}))})["catch"](function(t){e.setState({response:t&&(t.stack||String(t))})})}},t.prototype.componentDidUpdate=function(e,t){(this.state.variableEditorOpen!==t.variableEditorOpen||this.state.variableEditorHeight!==t.variableEditorHeight)&&window.dispatchEvent(new Event("resize"))},t.prototype.render=function(){var e=[];l["default"].Children.forEach(this.props.children,function(t){e.push(t)});var n=h["default"](e,function(e){return e.type===t.Logo})||l["default"].createElement(t.Logo,null),r=h["default"](e,function(e){return e.type===t.Toolbar}),i=h["default"](e,function(e){return e.type===t.Footer}),o={WebkitFlex:this.state.editorFlex,flex:this.state.editorFlex},a={display:this.state.docsOpen?"block":"none",width:this.state.docsWidth},s=this.state.variableEditorOpen,u={height:s?this.state.variableEditorHeight:null};return l["default"].createElement("div",{id:"graphiql-container"},l["default"].createElement("div",{className:"editorWrap"},l["default"].createElement("div",{className:"topBarWrap"},l["default"].createElement("div",{className:"topBar"},n,l["default"].createElement(m.ExecuteButton,{onClick:this._runEditorQuery}),r),!this.state.docsOpen&&l["default"].createElement("button",{className:"docExplorerShow",onClick:this._onToggleDocs},"Docs")),l["default"].createElement("div",{ref:"editorBar",className:"editorBar",onMouseDown:this._onResizeStart},l["default"].createElement("div",{className:"queryWrap",style:o},l["default"].createElement(v.QueryEditor,{ref:"queryEditor",schema:this.state.schema,value:this.state.query,onEdit:this._onEditQuery,onHintInformationRender:this._onHintInformationRender}),l["default"].createElement("div",{className:"variable-editor",style:u},l["default"].createElement("div",{className:"variable-editor-title",style:{cursor:s?"row-resize":"n-resize"},onMouseDown:this._onVariableResizeStart},"Query Variables"),l["default"].createElement(g.VariableEditor,{value:this.state.variables,onEdit:this._onEditVariables}))),l["default"].createElement("div",{className:"resultWrap"},this.state.isWaitingForResponse&&l["default"].createElement("div",{className:"spinner-container"},l["default"].createElement("div",{className:"spinner"})),l["default"].createElement(y.ResultViewer,{ref:"result",value:this.state.response}),i))),l["default"].createElement("div",{className:"docExplorerWrap",style:a},l["default"].createElement("div",{className:"docExplorerResizer",onMouseDown:this._onDocsResizeStart}),l["default"].createElement(b.DocExplorer,{ref:"docExplorer",schema:this.state.schema},l["default"].createElement("div",{className:"docExplorerHide",onClick:this._onToggleDocs},"✕"))))},t.prototype._storageGet=function(e){return this._storage.getItem("graphiql:"+e)},t.prototype._storageSet=function(e,t){this._storage.setItem("graphiql:"+e,t)},t.prototype._fetchQuery=function(e,t,n){var r=this;this.props.fetcher({query:e,variables:t}).then(n)["catch"](function(e){r.setState({isWaitingForResponse:!1,response:e&&(e.stack||String(e))})})},t.prototype._didClickDragBar=function(e){if(0!==e.button||e.ctrlKey)return!1;var t=e.target;if(0!==t.className.indexOf("CodeMirror-gutter"))return!1;for(var n=c["default"].findDOMNode(this.refs.result);t;){if(t===n)return!0;t=t.parentNode}return!1},t}(l["default"].Component);t.GraphiQL=k,k.Logo=function(e){function t(){i(this,t),e.apply(this,arguments)}return o(t,e),t.prototype.render=function(){return l["default"].createElement("div",{className:"title"},this.props.children||l["default"].createElement("span",null,"Graph",l["default"].createElement("em",null,"i"),"QL"))},t}(l["default"].Component),k.Toolbar=function(e){function t(){i(this,t),e.apply(this,arguments)}return o(t,e),t.prototype.render=function(){return l["default"].createElement("div",{className:"toolbar"},this.props.children)},t}(l["default"].Component),
k.Footer=function(e){function t(){i(this,t),e.apply(this,arguments)}return o(t,e),t.prototype.render=function(){return l["default"].createElement("div",{className:"footer"},this.props.children)},t}(l["default"].Component);var L="# Welcome to GraphiQL\n#\n# GraphiQL is an in-browser IDE for writing, validating, and\n# testing GraphQL queries.\n#\n# Type queries into this side of the screen, and you will\n# see intelligent typeaheads aware of the current GraphQL type schema and\n# live syntax and validation errors highlighted within the text.\n#\n# To bring up the auto-complete at any point, just press Ctrl-Space.\n#\n# Press the run button above, or Cmd-Enter to execute the query, and the result\n# will appear in the pane to the right.\n\n"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(449);Object.defineProperty(t,"GraphQLSchema",{enumerable:!0,get:function(){return r.GraphQLSchema}});var i=n(454);Object.defineProperty(t,"isType",{enumerable:!0,get:function(){return i.isType}}),Object.defineProperty(t,"isInputType",{enumerable:!0,get:function(){return i.isInputType}}),Object.defineProperty(t,"isOutputType",{enumerable:!0,get:function(){return i.isOutputType}}),Object.defineProperty(t,"isLeafType",{enumerable:!0,get:function(){return i.isLeafType}}),Object.defineProperty(t,"isCompositeType",{enumerable:!0,get:function(){return i.isCompositeType}}),Object.defineProperty(t,"isAbstractType",{enumerable:!0,get:function(){return i.isAbstractType}}),Object.defineProperty(t,"getNullableType",{enumerable:!0,get:function(){return i.getNullableType}}),Object.defineProperty(t,"getNamedType",{enumerable:!0,get:function(){return i.getNamedType}}),Object.defineProperty(t,"GraphQLScalarType",{enumerable:!0,get:function(){return i.GraphQLScalarType}}),Object.defineProperty(t,"GraphQLObjectType",{enumerable:!0,get:function(){return i.GraphQLObjectType}}),Object.defineProperty(t,"GraphQLInterfaceType",{enumerable:!0,get:function(){return i.GraphQLInterfaceType}}),Object.defineProperty(t,"GraphQLUnionType",{enumerable:!0,get:function(){return i.GraphQLUnionType}}),Object.defineProperty(t,"GraphQLEnumType",{enumerable:!0,get:function(){return i.GraphQLEnumType}}),Object.defineProperty(t,"GraphQLInputObjectType",{enumerable:!0,get:function(){return i.GraphQLInputObjectType}}),Object.defineProperty(t,"GraphQLList",{enumerable:!0,get:function(){return i.GraphQLList}}),Object.defineProperty(t,"GraphQLNonNull",{enumerable:!0,get:function(){return i.GraphQLNonNull}});var o=n(463);Object.defineProperty(t,"GraphQLInt",{enumerable:!0,get:function(){return o.GraphQLInt}}),Object.defineProperty(t,"GraphQLFloat",{enumerable:!0,get:function(){return o.GraphQLFloat}}),Object.defineProperty(t,"GraphQLString",{enumerable:!0,get:function(){return o.GraphQLString}}),Object.defineProperty(t,"GraphQLBoolean",{enumerable:!0,get:function(){return o.GraphQLBoolean}}),Object.defineProperty(t,"GraphQLID",{enumerable:!0,get:function(){return o.GraphQLID}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(511);Object.defineProperty(t,"introspectionQuery",{enumerable:!0,get:function(){return r.introspectionQuery}});var i=n(512);Object.defineProperty(t,"getOperationAST",{enumerable:!0,get:function(){return i.getOperationAST}});var o=n(513);Object.defineProperty(t,"buildClientSchema",{enumerable:!0,get:function(){return o.buildClientSchema}});var a=n(515);Object.defineProperty(t,"buildASTSchema",{enumerable:!0,get:function(){return a.buildASTSchema}});var s=n(516);Object.defineProperty(t,"extendSchema",{enumerable:!0,get:function(){return s.extendSchema}});var l=n(517);Object.defineProperty(t,"printSchema",{enumerable:!0,get:function(){return l.printSchema}}),Object.defineProperty(t,"printIntrospectionSchema",{enumerable:!0,get:function(){return l.printIntrospectionSchema}});var u=n(469);Object.defineProperty(t,"typeFromAST",{enumerable:!0,get:function(){return u.typeFromAST}});var c=n(505);Object.defineProperty(t,"valueFromAST",{enumerable:!0,get:function(){return c.valueFromAST}});var f=n(465);Object.defineProperty(t,"astFromValue",{enumerable:!0,get:function(){return f.astFromValue}});var p=n(468);Object.defineProperty(t,"TypeInfo",{enumerable:!0,get:function(){return p.TypeInfo}});var d=n(506);Object.defineProperty(t,"isValidJSValue",{enumerable:!0,get:function(){return d.isValidJSValue}});var h=n(489);Object.defineProperty(t,"isValidLiteralValue",{enumerable:!0,get:function(){return h.isValidLiteralValue}});var m=n(518);Object.defineProperty(t,"concatAST",{enumerable:!0,get:function(){return m.concatAST}})},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="\n query IntrospectionQuery {\n __schema {\n queryType { name }\n mutationType { name }\n subscriptionType { name }\n types {\n ...FullType\n }\n directives {\n name\n description\n args {\n ...InputValue\n }\n onOperation\n onFragment\n onField\n }\n }\n }\n\n fragment FullType on __Type {\n kind\n name\n description\n fields(includeDeprecated: true) {\n name\n 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 description\n isDeprecated\n deprecationReason\n }\n possibleTypes {\n ...TypeRef\n }\n }\n\n fragment InputValue on __InputValue {\n name\n 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 }\n }\n }\n }\n";t.introspectionQuery=n},function(e,t,n){"use strict";function r(e,t){for(var n=null,r=0;r<e.definitions.length;r++){var o=e.definitions[r];if(o.kind===i.OPERATION_DEFINITION)if(t){if(o.name&&o.name.value===t)return o}else{if(n)return null;n=o}}return n}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperationAST=r;var i=n(421)},function(e,t,n){"use strict";function r(e){function t(e){if(e.kind===g.TypeKind.LIST){var r=e.ofType;if(!r)throw new Error("Decorated type deeper than introspection query.");return new h.GraphQLList(t(r))}if(e.kind===g.TypeKind.NON_NULL){var i=e.ofType;if(!i)throw new Error("Decorated type deeper than introspection query.");var o=t(i);return new h.GraphQLNonNull(o)}return n(e.name)}function n(e){if(A[e])return A[e];var t=N[e];if(!t)throw new Error("Invalid or incomplete schema, unknown type: "+e+". Ensure that a full introspection query is used in order to build a client schema.");var n=u(t);return A[e]=n,n}function r(e){var n=t(e);return(0,a["default"])((0,h.isInputType)(n),"Introspection must provide input type for arguments."),n}function i(e){var n=t(e);return(0,a["default"])((0,h.isOutputType)(n),"Introspection must provide output type for fields."),n}function o(e){var n=t(e);return(0,a["default"])(n instanceof h.GraphQLObjectType,"Introspection must provide object type for possibleTypes."),n}function s(e){var n=t(e);return(0,a["default"])(n instanceof h.GraphQLInterfaceType,"Introspection must provide interface type for interfaces."),n}function u(e){switch(e.kind){case g.TypeKind.SCALAR:return y(e);case g.TypeKind.OBJECT:return b(e);case g.TypeKind.INTERFACE:return w(e);case g.TypeKind.UNION:return x(e);case g.TypeKind.ENUM:return T(e);case g.TypeKind.INPUT_OBJECT:return k(e);default:throw new Error("Invalid or incomplete schema, unknown kind: "+e.kind+". Ensure that a full introspection query is used in order to build a client schema.")}}function y(e){return new h.GraphQLScalarType({name:e.name,description:e.description,serialize:function(){return null},parseValue:function(){return!1},parseLiteral:function(){return!1}})}function b(e){return new h.GraphQLObjectType({name:e.name,description:e.description,interfaces:e.interfaces.map(s),fields:function(){return L(e)}})}function w(e){return new h.GraphQLInterfaceType({name:e.name,description:e.description,fields:function(){return L(e)},resolveType:function(){throw new Error("Client Schema cannot be used for execution.")}})}function x(e){return new h.GraphQLUnionType({name:e.name,description:e.description,types:e.possibleTypes.map(o),resolveType:function(){throw new Error("Client Schema cannot be used for execution.")}})}function T(e){return new h.GraphQLEnumType({name:e.name,description:e.description,values:(0,c["default"])(e.enumValues,function(e){return e.name},function(e){return{description:e.description,deprecationReason:e.deprecationReason}})})}function k(e){return new h.GraphQLInputObjectType({name:e.name,description:e.description,fields:function(){return S(e.inputFields)}})}function L(e){return(0,c["default"])(e.fields,function(e){return e.name},function(e){return{description:e.description,deprecationReason:e.deprecationReason,type:i(e.type),args:S(e.args),resolve:function(){throw new Error("Client Schema cannot be used for execution.")}}})}function S(e){return(0,c["default"])(e,function(e){return e.name},C)}function C(e){var t=r(e.type),n=e.defaultValue?(0,f.valueFromAST)((0,p.parseValue)(e.defaultValue),t):null;return{name:e.name,description:e.description,type:t,defaultValue:n}}function E(e){return new v.GraphQLDirective({name:e.name,description:e.description,args:e.args.map(C),onOperation:e.onOperation,onFragment:e.onFragment,onField:e.onField})}var _=e.__schema,N=(0,l["default"])(_.types,function(e){return e.name}),A={String:m.GraphQLString,Int:m.GraphQLInt,Float:m.GraphQLFloat,Boolean:m.GraphQLBoolean,ID:m.GraphQLID};_.types.forEach(function(e){return n(e.name)});var O=o(_.queryType),M=_.mutationType?o(_.mutationType):null,I=_.subscriptionType?o(_.subscriptionType):null,D=_.directives?_.directives.map(E):[];return new d.GraphQLSchema({query:O,mutation:M,subscription:I,directives:D})}var i=n(436)["default"];Object.defineProperty(t,"__esModule",{value:!0}),t.buildClientSchema=r;var o=n(437),a=i(o),s=n(461),l=i(s),u=n(514),c=i(u),f=n(505),p=n(405),d=n(449),h=n(454),m=n(463),v=n(462),g=n(464)},function(e,t){"use strict";function n(e,t,n){return e.reduce(function(e,r){return e[t(r)]=n(r),e},{})}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=n,e.exports=t["default"]},function(e,t,n){"use strict";function r(e,t){return t.kind===h.LIST_TYPE?new m.GraphQLList(r(e,t.type)):t.kind===h.NON_NULL_TYPE?new m.GraphQLNonNull(r(e,t.type)):e}function i(e){for(var t=!0;t;){var n=e;t=!1;{if(n.kind!==h.LIST_TYPE&&n.kind!==h.NON_NULL_TYPE)return n.name.value;e=n.type,t=!0}}}function o(e,t,n,o){function a(){var e={String:m.GraphQLString,Int:m.GraphQLInt,Float:m.GraphQLFloat,Boolean:m.GraphQLBoolean,ID:m.GraphQLID};return function(t){var n=i(t);if(!(0,l["default"])(e[n]))return r(e[n],t);if((0,l["default"])(L[n]))throw new Error("Type "+n+" not found in document");var o=s(L[n]);if((0,l["default"])(o))throw new Error("Nothing constructed for "+n);return e[n]=o,r(o,t)}}function s(e){if((0,l["default"])(e))throw new Error("def must be defined");switch(e.kind){case h.OBJECT_TYPE_DEFINITION:return u(e);case h.INTERFACE_TYPE_DEFINITION:return y(e);case h.ENUM_TYPE_DEFINITION:return b(e);case h.UNION_TYPE_DEFINITION:return w(e);case h.SCALAR_TYPE_DEFINITION:return x(e);case h.INPUT_OBJECT_TYPE_DEFINITION:return T(e);default:throw new Error(e.kind+" not supported")}}function u(e){var t=e.name.value,n={name:t,fields:function(){return f(e)},interfaces:function(){return v(e)}};return new m.GraphQLObjectType(n)}function f(e){return(0,p["default"])(e.fields,function(e){return e.name.value},function(e){return{type:S(e.type),args:g(e.arguments)}})}function v(e){return e.interfaces.map(function(e){return S(e)})}function g(e){return(0,p["default"])(e,function(e){return e.name.value},function(e){var t=S(e.type);return{type:t,defaultValue:(0,d.valueFromAST)(e.defaultValue,t)}})}function y(e){var t=e.name.value,n={name:t,resolveType:function(){return null},fields:function(){return f(e)}};return new m.GraphQLInterfaceType(n)}function b(e){var t=new m.GraphQLEnumType({name:e.name.value,values:(0,p["default"])(e.values,function(e){return e.name.value},function(){return{}})});return t}function w(e){return new m.GraphQLUnionType({name:e.name.value,resolveType:function(){return null},types:e.types.map(function(e){return S(e)})})}function x(e){return new m.GraphQLScalarType({name:e.name.value,serialize:function(){return null},parseValue:function(){return!1},parseLiteral:function(){return!1}})}function T(e){return new m.GraphQLInputObjectType({name:e.name.value,fields:function(){return g(e.fields)}})}if((0,l["default"])(e))throw new Error("must pass in ast");if((0,l["default"])(t))throw new Error("must pass in query type");var k=e.definitions.filter(function(e){switch(e.kind){case h.OBJECT_TYPE_DEFINITION:case h.INTERFACE_TYPE_DEFINITION:case h.ENUM_TYPE_DEFINITION:case h.UNION_TYPE_DEFINITION:case h.SCALAR_TYPE_DEFINITION:case h.INPUT_OBJECT_TYPE_DEFINITION:return!0}}),L=(0,c["default"])(k,function(e){return e.name.value});if((0,l["default"])(L[t]))throw new Error("Specified query type "+t+" not found in document.");if(!(0,l["default"])(n)&&(0,l["default"])(L[n]))throw new Error("Specified mutation type "+n+" not found in document.");if(!(0,l["default"])(o)&&(0,l["default"])(L[o]))throw new Error("Specified subscription type "+o+" not found in document.");var S=a(e);e.definitions.forEach(S);var C=S(L[t]),E={query:C};return(0,l["default"])(n)||(E.mutation=S(L[n])),(0,l["default"])(o)||(E.subscription=S(L[o])),new m.GraphQLSchema(E)}var a=n(436)["default"];Object.defineProperty(t,"__esModule",{value:!0}),t.buildASTSchema=o;var s=n(460),l=a(s),u=n(461),c=a(u),f=n(514),p=a(f),d=n(505),h=n(421),m=n(509)},function(e,t,n){"use strict";function r(e,t){function n(e){var t=a(e.name);return(0,l["default"])(t,"Invalid schema"),t}function r(e){var t=a(e.name.value);if(!t)throw new h.GraphQLError('Unknown type: "'+e.name.value+'". Ensure that this type exists either in the original schema, or is added in a type definition.',[e]);return t}function a(t){var n=B[t];if(n)return n;var r=e.getType(t);if(r){var i=s(r);return B[t]=i,i}var o=D[t];if(o){var i=k(o);return B[t]=i,i}}function s(e){return e instanceof v.GraphQLObjectType?u(e):e instanceof v.GraphQLInterfaceType?f(e):e instanceof v.GraphQLUnionType?b(e):e}function u(e){return new v.GraphQLObjectType({name:e.name,description:e.description,interfaces:function(){return w(e)},fields:function(){return x(e)}})}function f(e){return new v.GraphQLInterfaceType({name:e.name,description:e.description,fields:function(){return x(e)},resolveType:i})}function b(e){return new v.GraphQLUnionType({name:e.name,description:e.description,types:e.getPossibleTypes().map(n),resolveType:i})}function w(e){var t=e.getInterfaces().map(n),i=F[e.name];return i&&i.forEach(function(n){n.definition.interfaces.forEach(function(n){var i=n.name.value;if(t.some(function(e){return e.name===i}))throw new h.GraphQLError("'Type \""+e.name+'" already implements "'+i+'". It cannot also be implemented in this type extension.',[n]);t.push(r(n))})}),t}function x(e){var t={},n=e.getFields();o(n).forEach(function(e){var r=n[e];t[e]={description:r.description,deprecationReason:r.deprecationReason,type:T(r.type),args:(0,c["default"])(r.args,function(e){return e.name}),resolve:i}});var r=F[e.name];return r&&r.forEach(function(r){r.definition.fields.forEach(function(r){var o=r.name.value;if(n[o])throw new h.GraphQLError('Field "'+e.name+"."+o+'" already exists in the schema. It cannot also be defined in this type extension.',[r]);t[o]={type:I(r.type),args:M(r.arguments),resolve:i}})}),t}function T(e){return e instanceof v.GraphQLList?new v.GraphQLList(T(e.ofType)):e instanceof v.GraphQLNonNull?new v.GraphQLNonNull(T(e.ofType)):n(e)}function k(e){switch(e.kind){case y.OBJECT_TYPE_DEFINITION:return L(e);case y.INTERFACE_TYPE_DEFINITION:return S(e);case y.UNION_TYPE_DEFINITION:return C(e);case y.SCALAR_TYPE_DEFINITION:return E(e);case y.ENUM_TYPE_DEFINITION:return _(e);case y.INPUT_OBJECT_TYPE_DEFINITION:return N(e)}}function L(e){return new v.GraphQLObjectType({name:e.name.value,interfaces:function(){return A(e)},fields:function(){return O(e)}})}function S(e){return new v.GraphQLInterfaceType({name:e.name.value,fields:function(){return O(e)},resolveType:i})}function C(e){return new v.GraphQLUnionType({name:e.name.value,types:e.types.map(r),resolveType:i})}function E(e){return new v.GraphQLScalarType({name:e.name.value,serialize:function(){return null},parseValue:function(){return!1},parseLiteral:function(){return!1}})}function _(e){return new v.GraphQLEnumType({name:e.name.value,values:(0,p["default"])(e.values,function(e){return e.name.value},function(){return{}})})}function N(e){return new v.GraphQLInputObjectType({name:e.name.value,fields:function(){return M(e.fields)}})}function A(e){return e.interfaces.map(r)}function O(e){return(0,p["default"])(e.fields,function(e){return e.name.value},function(e){return{type:I(e.type),args:M(e.arguments),resolve:i}})}function M(e){return(0,p["default"])(e,function(e){return e.name.value},function(e){var t=I(e.type);return{type:t,defaultValue:(0,d.valueFromAST)(e.defaultValue,t)}})}function I(e){return e.kind===y.LIST_TYPE?new v.GraphQLList(I(e.type)):e.kind===y.NON_NULL_TYPE?new v.GraphQLNonNull(I(e.type)):r(e)}(0,l["default"])(e instanceof m.GraphQLSchema,"Must provide valid GraphQLSchema"),(0,l["default"])(t&&t.kind===y.DOCUMENT,"Must provide valid Document AST");for(var D={},F={},P=0;P<t.definitions.length;P++){var G=t.definitions[P];switch(G.kind){case y.OBJECT_TYPE_DEFINITION:case y.INTERFACE_TYPE_DEFINITION:case y.ENUM_TYPE_DEFINITION:case y.UNION_TYPE_DEFINITION:case y.SCALAR_TYPE_DEFINITION:case y.INPUT_OBJECT_TYPE_DEFINITION:var j=G.name.value;if(e.getType(j))throw new h.GraphQLError('Type "'+j+'" already exists in the schema. It cannot also be defined in this type definition.',[G]);D[j]=G;break;case y.TYPE_EXTENSION_DEFINITION:var Q=G.definition.name.value,R=e.getType(Q);if(!R)throw new h.GraphQLError('Cannot extend type "'+Q+'" because it does not exist in the existing schema.',[G.definition]);if(!(R instanceof v.GraphQLObjectType))throw new h.GraphQLError('Cannot extend non-object type "'+Q+'".',[G.definition]);var V=F[Q];V?V.push(G):V=[G],F[Q]=V}}if(0===o(F).length&&0===o(D).length)return e;var B={String:g.GraphQLString,Int:g.GraphQLInt,Float:g.GraphQLFloat,Boolean:g.GraphQLBoolean,ID:g.GraphQLID},U=n(e.getQueryType()),W=e.getMutationType(),H=W?n(W):null,q=e.getSubscriptionType(),z=q?n(q):null;return o(e.getTypeMap()).forEach(function(t){return n(e.getType(t))}),o(D).forEach(function(e){return r(D[e])}),new m.GraphQLSchema({query:U,mutation:H,subscription:z,directives:e.getDirectives()})}function i(){throw new Error("Client Schema cannot be used for execution.")}var o=n(450)["default"],a=n(436)["default"];Object.defineProperty(t,"__esModule",{value:!0}),t.extendSchema=r;var s=n(437),l=a(s),u=n(461),c=a(u),f=n(514),p=a(f),d=n(505),h=n(407),m=n(449),v=n(454),g=n(463),y=n(421)},function(e,t,n){"use strict";function r(e){return l(e,o)}function i(e){return l(e,a)}function o(e){return!a(e)&&!s(e)}function a(e){return 0===e.indexOf("__")}function s(e){return"String"===e||"Boolean"===e||"Int"===e||"Float"===e||"ID"===e}function l(e,t){var n=e.getTypeMap(),r=b(n).filter(t).sort(function(e,t){return e.localeCompare(t)}).map(function(e){return n[e]});return r.map(u).join("\n\n")+"\n"}function u(e){return e instanceof E.GraphQLScalarType?c(e):e instanceof E.GraphQLObjectType?f(e):e instanceof E.GraphQLInterfaceType?p(e):e instanceof E.GraphQLUnionType?d(e):e instanceof E.GraphQLEnumType?h(e):((0,T["default"])(e instanceof E.GraphQLInputObjectType),m(e))}function c(e){return"scalar "+e.name}function f(e){var t=e.getInterfaces(),n=t.length?" implements "+t.map(function(e){return e.name}).join(", "):"";return"type "+e.name+n+" {\n"+v(e)+"\n}"}function p(e){return"interface "+e.name+" {\n"+v(e)+"\n}"}function d(e){return"union "+e.name+" = "+e.getPossibleTypes().join(" | ")}function h(e){var t=e.getValues();return"enum "+e.name+" {\n"+t.map(function(e){return" "+e.name}).join("\n")+"\n}"}function m(e){var t=e.getFields(),n=b(t).map(function(e){return t[e]});return"input "+e.name+" {\n"+n.map(function(e){return" "+y(e)}).join("\n")+"\n}"}function v(e){var t=e.getFields(),n=b(t).map(function(e){return t[e]});return n.map(function(e){return" "+e.name+g(e)+": "+e.type}).join("\n")}function g(e){return 0===e.args.length?"":"("+e.args.map(y).join(", ")+")"}function y(e){var t=e.name+": "+e.type;return(0,L["default"])(e.defaultValue)||(t+=" = "+(0,C.print)((0,S.astFromValue)(e.defaultValue,e.type))),t}var b=n(450)["default"],w=n(436)["default"];Object.defineProperty(t,"__esModule",{value:!0}),t.printSchema=r,t.printIntrospectionSchema=i;var x=n(437),T=w(x),k=n(460),L=w(k),S=n(465),C=n(424),E=n(454)},function(e,t){"use strict";function n(e){for(var t=[],n=0;n<e.length;n++)for(var r=e[n].definitions,i=0;i<r.length;i++)t.push(r[i]);return{kind:"Document",definitions:t}}Object.defineProperty(t,"__esModule",{value:!0}),t.concatAST=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(2),l=r(s),u=function(e){function t(){i(this,t),e.apply(this,arguments)}return o(t,e),t.prototype.render=function(){return l["default"].createElement("button",{className:"execute-button",onClick:this.props.onClick,title:"Execute Query (Ctrl-Enter)"},l["default"].createElement("svg",{width:"34",height:"34"},l["default"].createElement("path",{d:"M 11 9 L 24 16 L 11 23 z"})))},t.prototype.componentDidMount=function(){var e=this;this.keyHandler=function(t){(t.metaKey||t.ctrlKey)&&13===t.keyCode&&(t.preventDefault(),e.props.onClick&&e.props.onClick())},document.addEventListener("keydown",this.keyHandler,!0)},t.prototype.componentWillUnmount=function(){document.removeEventListener("keydown",this.keyHandler,!0)},a(t,null,[{key:"propTypes",value:{onClick:s.PropTypes.func},enumerable:!0}]),t}(l["default"].Component);t.ExecuteButton=u},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e){return e instanceof v.GraphQLNonNull?a(e.ofType)+"!":e instanceof v.GraphQLList?"["+a(e.ofType)+"]":'<a class="typeName">'+e.name+"</a>"}t.__esModule=!0;var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(2),u=r(l),c=n(155),f=r(c),p=n(521),d=r(p),h=n(345),m=r(h),v=n(509);n(522),n(523),n(524),n(525),n(526),n(528),n(529),n(530),n(532),n(533),n(535);var g=function(e){function t(n){var r=this;i(this,t),e.call(this),this._onKeyUp=function(e,t){var n=t.keyCode;(n>=65&&90>=n||!t.shiftKey&&n>=48&&57>=n||t.shiftKey&&189===n||t.shiftKey&&50===n||t.shiftKey&&57===n)&&r.editor.execCommand("autocomplete")},this._onEdit=function(){r.ignoreChangeEvent||(r.cachedValue=r.editor.getValue(),r.props.onEdit&&r.props.onEdit(r.cachedValue))},this._onHasCompletion=function(e,t){var n,i;m["default"].on(t,"select",function(t,o){if(!n){var s=o.parentNode,l=s.parentNode;n=document.createElement("div"),l.appendChild(n);var u=s.style.top,c="",f=e.cursorCoords().top;parseInt(u,10)<f&&(u="",c=window.innerHeight-f+3+"px"),n.className="CodeMirror-hints-wrapper",n.style.left=s.style.left,n.style.top=u,n.style.bottom=c,s.style.left="",s.style.top="",i=document.createElement("div"),i.className="CodeMirror-hint-information",c?(n.appendChild(i),n.appendChild(s)):(n.appendChild(s),n.appendChild(i));var p;n.addEventListener("DOMNodeRemoved",p=function(e){e.target===s&&(n.removeEventListener("DOMNodeRemoved",p),n.parentNode.removeChild(n),n=null,i=null,p=null)})}var h=t.description?d["default"](t.description,{smartypants:!0}):"Self descriptive.",m=t.type?'<span class="infoType">'+a(t.type)+"</span>":"";i.innerHTML='<div class="content">'+("<p>"===h.slice(0,3)?"<p>"+m+h.slice(3):m+h)+"</div>";var v=r.props.onHintInformationRender;v&&v(i)})},this.cachedValue=n.value||""}return o(t,e),s(t,null,[{key:"propTypes",value:{schema:l.PropTypes.instanceOf(v.GraphQLSchema),value:l.PropTypes.string,onEdit:l.PropTypes.func},enumerable:!0}]),t.prototype.getCodeMirror=function(){return this.editor},t.prototype.componentDidMount=function(){var e=this;this.editor=m["default"](f["default"].findDOMNode(this),{value:this.props.value||"",lineNumbers:!0,tabSize:2,mode:"graphql",theme:"graphiql",keyMap:"sublime",autoCloseBrackets:!0,matchBrackets:!0,showCursorWhenSelecting:!0,foldGutter:{minFoldSize:4},lint:{schema:this.props.schema},hintOptions:{schema:this.props.schema,closeOnUnfocus:!1,completeSingle:!1},gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],extraKeys:{"Cmd-Space":function(){return e.editor.showHint({completeSingle:!0})},"Ctrl-Space":function(){return e.editor.showHint({completeSingle:!0})},"Ctrl-Left":"goSubwordLeft","Ctrl-Right":"goSubwordRight","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight"}}),this.editor.on("change",this._onEdit),this.editor.on("keyup",this._onKeyUp),this.editor.on("hasCompletion",this._onHasCompletion)},t.prototype.componentWillUnmount=function(){this.editor.off("change",this._onEdit),this.editor.off("keyup",this._onKeyUp),this.editor.off("hasCompletion",this._onHasCompletion),this.editor=null},t.prototype.componentDidUpdate=function(e){this.ignoreChangeEvent=!0,this.props.schema!==e.schema&&(this.editor.options.lint.schema=this.props.schema,this.editor.options.hintOptions.schema=this.props.schema,m["default"].signal(this.editor,"change",this.editor)),this.props.value!==e.value&&this.props.value!==this.cachedValue&&(this.cachedValue=this.props.value,this.editor.setValue(this.props.value)),this.ignoreChangeEvent=!1},t.prototype.render=function(){return u["default"].createElement("div",{className:"query-editor"})},t}(u["default"].Component);t.QueryEditor=g},function(e,t,n){(function(t){(function(){function t(e){this.tokens=[],this.tokens.links={},this.options=e||c.defaults,this.rules=f.normal,this.options.gfm&&(this.options.tables?this.rules=f.tables:this.rules=f.gfm)}function n(e,t){if(this.options=t||c.defaults,this.links=e,this.rules=p.normal,this.renderer=this.options.renderer||new r,this.renderer.options=this.options,!this.links)throw new Error("Tokens array requires a `links` property.");this.options.gfm?this.options.breaks?this.rules=p.breaks:this.rules=p.gfm:this.options.pedantic&&(this.rules=p.pedantic)}function r(e){this.options=e||{}}function i(e){this.tokens=[],this.token=null,this.options=e||c.defaults,this.options.renderer=this.options.renderer||new r,this.renderer=this.options.renderer,this.renderer.options=this.options}function o(e,t){return e.replace(t?/&/g:/&(?!#?\w+;)/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function a(e){return e.replace(/&([#\w]+);/g,function(e,t){return t=t.toLowerCase(),"colon"===t?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""})}function s(e,t){return e=e.source,t=t||"",function n(r,i){return r?(i=i.source||i,i=i.replace(/(^|[^\[])\^/g,"$1"),e=e.replace(r,i),n):new RegExp(e,t)}}function l(){}function u(e){for(var t,n,r=1;r<arguments.length;r++){t=arguments[r];for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e}function c(e,n,r){if(r||"function"==typeof n){r||(r=n,n=null),n=u({},c.defaults,n||{});var a,s,l=n.highlight,f=0;try{a=t.lex(e,n)}catch(p){return r(p)}s=a.length;var d=function(e){if(e)return n.highlight=l,r(e);var t;try{t=i.parse(a,n)}catch(o){e=o}return n.highlight=l,e?r(e):r(null,t)};if(!l||l.length<3)return d();if(delete n.highlight,!s)return d();for(;f<a.length;f++)!function(e){return"code"!==e.type?--s||d():l(e.text,e.lang,function(t,n){return t?d(t):null==n||n===e.text?--s||d():(e.text=n,e.escaped=!0,void(--s||d()))})}(a[f])}else try{return n&&(n=u({},c.defaults,n)),i.parse(t.lex(e,n),n)}catch(p){if(p.message+="\nPlease report this to https://github.com/chjj/marked.",(n||c.defaults).silent)return"<p>An error occured:</p><pre>"+o(p.message+"",!0)+"</pre>";throw p}}var f={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:l,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:l,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:l,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};f.bullet=/(?:[*+-]|\d+\.)/,f.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,f.item=s(f.item,"gm")(/bull/g,f.bullet)(),f.list=s(f.list)(/bull/g,f.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+f.def.source+")")(),f.blockquote=s(f.blockquote)("def",f.def)(),f._tag="(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b",f.html=s(f.html)("comment",/<!--[\s\S]*?-->/)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/<tag(?:"[^"]*"|'[^']*'|[^'">])*?>/)(/tag/g,f._tag)(),f.paragraph=s(f.paragraph)("hr",f.hr)("heading",f.heading)("lheading",f.lheading)("blockquote",f.blockquote)("tag","<"+f._tag)("def",f.def)(),f.normal=u({},f),f.gfm=u({},f.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),f.gfm.paragraph=s(f.paragraph)("(?!","(?!"+f.gfm.fences.source.replace("\\1","\\2")+"|"+f.list.source.replace("\\1","\\3")+"|")(),f.tables=u({},f.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/}),t.rules=f,t.lex=function(e,n){var r=new t(n);return r.lex(e)},t.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},t.prototype.token=function(e,t,n){for(var r,i,o,a,s,l,u,c,p,e=e.replace(/^ +$/gm,"");e;)if((o=this.rules.newline.exec(e))&&(e=e.substring(o[0].length),o[0].length>1&&this.tokens.push({type:"space"})),o=this.rules.code.exec(e))e=e.substring(o[0].length),o=o[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?o:o.replace(/\n+$/,"")});else if(o=this.rules.fences.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"code",lang:o[2],text:o[3]||""});else if(o=this.rules.heading.exec(e))e=e.substring(o[0].length),
this.tokens.push({type:"heading",depth:o[1].length,text:o[2]});else if(t&&(o=this.rules.nptable.exec(e))){for(e=e.substring(o[0].length),l={type:"table",header:o[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:o[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:o[3].replace(/\n$/,"").split("\n")},c=0;c<l.align.length;c++)/^ *-+: *$/.test(l.align[c])?l.align[c]="right":/^ *:-+: *$/.test(l.align[c])?l.align[c]="center":/^ *:-+ *$/.test(l.align[c])?l.align[c]="left":l.align[c]=null;for(c=0;c<l.cells.length;c++)l.cells[c]=l.cells[c].split(/ *\| */);this.tokens.push(l)}else if(o=this.rules.lheading.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"heading",depth:"="===o[2]?1:2,text:o[1]});else if(o=this.rules.hr.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"hr"});else if(o=this.rules.blockquote.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"blockquote_start"}),o=o[0].replace(/^ *> ?/gm,""),this.token(o,t,!0),this.tokens.push({type:"blockquote_end"});else if(o=this.rules.list.exec(e)){for(e=e.substring(o[0].length),a=o[2],this.tokens.push({type:"list_start",ordered:a.length>1}),o=o[0].match(this.rules.item),r=!1,p=o.length,c=0;p>c;c++)l=o[c],u=l.length,l=l.replace(/^ *([*+-]|\d+\.) +/,""),~l.indexOf("\n ")&&(u-=l.length,l=this.options.pedantic?l.replace(/^ {1,4}/gm,""):l.replace(new RegExp("^ {1,"+u+"}","gm"),"")),this.options.smartLists&&c!==p-1&&(s=f.bullet.exec(o[c+1])[0],a===s||a.length>1&&s.length>1||(e=o.slice(c+1).join("\n")+e,c=p-1)),i=r||/\n\n(?!\s*$)/.test(l),c!==p-1&&(r="\n"===l.charAt(l.length-1),i||(i=r)),this.tokens.push({type:i?"loose_item_start":"list_item_start"}),this.token(l,!1,n),this.tokens.push({type:"list_item_end"});this.tokens.push({type:"list_end"})}else if(o=this.rules.html.exec(e))e=e.substring(o[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&("pre"===o[1]||"script"===o[1]||"style"===o[1]),text:o[0]});else if(!n&&t&&(o=this.rules.def.exec(e)))e=e.substring(o[0].length),this.tokens.links[o[1].toLowerCase()]={href:o[2],title:o[3]};else if(t&&(o=this.rules.table.exec(e))){for(e=e.substring(o[0].length),l={type:"table",header:o[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:o[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:o[3].replace(/(?: *\| *)?\n$/,"").split("\n")},c=0;c<l.align.length;c++)/^ *-+: *$/.test(l.align[c])?l.align[c]="right":/^ *:-+: *$/.test(l.align[c])?l.align[c]="center":/^ *:-+ *$/.test(l.align[c])?l.align[c]="left":l.align[c]=null;for(c=0;c<l.cells.length;c++)l.cells[c]=l.cells[c].replace(/^ *\| *| *\| *$/g,"").split(/ *\| */);this.tokens.push(l)}else if(t&&(o=this.rules.paragraph.exec(e)))e=e.substring(o[0].length),this.tokens.push({type:"paragraph",text:"\n"===o[1].charAt(o[1].length-1)?o[1].slice(0,-1):o[1]});else if(o=this.rules.text.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"text",text:o[0]});else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0));return this.tokens};var p={escape:/^\\([\\`*{}\[\]()#+\-.!_>])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:l,tag:/^<!--[\s\S]*?-->|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:l,text:/^[\s\S]+?(?=[\\<!\[_*`]| {2,}\n|$)/};p._inside=/(?:\[[^\]]*\]|[^\[\]]|\](?=[^\[]*\]))*/,p._href=/\s*<?([\s\S]*?)>?(?:\s+['"]([\s\S]*?)['"])?\s*/,p.link=s(p.link)("inside",p._inside)("href",p._href)(),p.reflink=s(p.reflink)("inside",p._inside)(),p.normal=u({},p),p.pedantic=u({},p.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/}),p.gfm=u({},p.normal,{escape:s(p.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:s(p.text)("]|","~]|")("|","|https?://|")()}),p.breaks=u({},p.gfm,{br:s(p.br)("{2,}","*")(),text:s(p.gfm.text)("{2,}","*")()}),n.rules=p,n.output=function(e,t,r){var i=new n(t,r);return i.output(e)},n.prototype.output=function(e){for(var t,n,r,i,a="";e;)if(i=this.rules.escape.exec(e))e=e.substring(i[0].length),a+=i[1];else if(i=this.rules.autolink.exec(e))e=e.substring(i[0].length),"@"===i[2]?(n=":"===i[1].charAt(6)?this.mangle(i[1].substring(7)):this.mangle(i[1]),r=this.mangle("mailto:")+n):(n=o(i[1]),r=n),a+=this.renderer.link(r,null,n);else if(this.inLink||!(i=this.rules.url.exec(e))){if(i=this.rules.tag.exec(e))!this.inLink&&/^<a /i.test(i[0])?this.inLink=!0:this.inLink&&/^<\/a>/i.test(i[0])&&(this.inLink=!1),e=e.substring(i[0].length),a+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):o(i[0]):i[0];else if(i=this.rules.link.exec(e))e=e.substring(i[0].length),this.inLink=!0,a+=this.outputLink(i,{href:i[2],title:i[3]}),this.inLink=!1;else if((i=this.rules.reflink.exec(e))||(i=this.rules.nolink.exec(e))){if(e=e.substring(i[0].length),t=(i[2]||i[1]).replace(/\s+/g," "),t=this.links[t.toLowerCase()],!t||!t.href){a+=i[0].charAt(0),e=i[0].substring(1)+e;continue}this.inLink=!0,a+=this.outputLink(i,t),this.inLink=!1}else if(i=this.rules.strong.exec(e))e=e.substring(i[0].length),a+=this.renderer.strong(this.output(i[2]||i[1]));else if(i=this.rules.em.exec(e))e=e.substring(i[0].length),a+=this.renderer.em(this.output(i[2]||i[1]));else if(i=this.rules.code.exec(e))e=e.substring(i[0].length),a+=this.renderer.codespan(o(i[2],!0));else if(i=this.rules.br.exec(e))e=e.substring(i[0].length),a+=this.renderer.br();else if(i=this.rules.del.exec(e))e=e.substring(i[0].length),a+=this.renderer.del(this.output(i[1]));else if(i=this.rules.text.exec(e))e=e.substring(i[0].length),a+=this.renderer.text(o(this.smartypants(i[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else e=e.substring(i[0].length),n=o(i[1]),r=n,a+=this.renderer.link(r,null,n);return a},n.prototype.outputLink=function(e,t){var n=o(t.href),r=t.title?o(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,r,this.output(e[1])):this.renderer.image(n,r,o(e[1]))},n.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014\/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014\/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e},n.prototype.mangle=function(e){if(!this.options.mangle)return e;for(var t,n="",r=e.length,i=0;r>i;i++)t=e.charCodeAt(i),Math.random()>.5&&(t="x"+t.toString(16)),n+="&#"+t+";";return n},r.prototype.code=function(e,t,n){if(this.options.highlight){var r=this.options.highlight(e,t);null!=r&&r!==e&&(n=!0,e=r)}return t?'<pre><code class="'+this.options.langPrefix+o(t,!0)+'">'+(n?e:o(e,!0))+"\n</code></pre>\n":"<pre><code>"+(n?e:o(e,!0))+"\n</code></pre>"},r.prototype.blockquote=function(e){return"<blockquote>\n"+e+"</blockquote>\n"},r.prototype.html=function(e){return e},r.prototype.heading=function(e,t,n){return"<h"+t+' id="'+this.options.headerPrefix+n.toLowerCase().replace(/[^\w]+/g,"-")+'">'+e+"</h"+t+">\n"},r.prototype.hr=function(){return this.options.xhtml?"<hr/>\n":"<hr>\n"},r.prototype.list=function(e,t){var n=t?"ol":"ul";return"<"+n+">\n"+e+"</"+n+">\n"},r.prototype.listitem=function(e){return"<li>"+e+"</li>\n"},r.prototype.paragraph=function(e){return"<p>"+e+"</p>\n"},r.prototype.table=function(e,t){return"<table>\n<thead>\n"+e+"</thead>\n<tbody>\n"+t+"</tbody>\n</table>\n"},r.prototype.tablerow=function(e){return"<tr>\n"+e+"</tr>\n"},r.prototype.tablecell=function(e,t){var n=t.header?"th":"td",r=t.align?"<"+n+' style="text-align:'+t.align+'">':"<"+n+">";return r+e+"</"+n+">\n"},r.prototype.strong=function(e){return"<strong>"+e+"</strong>"},r.prototype.em=function(e){return"<em>"+e+"</em>"},r.prototype.codespan=function(e){return"<code>"+e+"</code>"},r.prototype.br=function(){return this.options.xhtml?"<br/>":"<br>"},r.prototype.del=function(e){return"<del>"+e+"</del>"},r.prototype.link=function(e,t,n){if(this.options.sanitize){try{var r=decodeURIComponent(a(e)).replace(/[^\w:]/g,"").toLowerCase()}catch(i){return""}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:"))return""}var o='<a href="'+e+'"';return t&&(o+=' title="'+t+'"'),o+=">"+n+"</a>"},r.prototype.image=function(e,t,n){var r='<img src="'+e+'" alt="'+n+'"';return t&&(r+=' title="'+t+'"'),r+=this.options.xhtml?"/>":">"},r.prototype.text=function(e){return e},i.parse=function(e,t,n){var r=new i(t,n);return r.parse(e)},i.prototype.parse=function(e){this.inline=new n(e.links,this.options,this.renderer),this.tokens=e.reverse();for(var t="";this.next();)t+=this.tok();return t},i.prototype.next=function(){return this.token=this.tokens.pop()},i.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},i.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},i.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var e,t,n,r,i,o="",a="";for(n="",e=0;e<this.token.header.length;e++)r={header:!0,align:this.token.align[e]},n+=this.renderer.tablecell(this.inline.output(this.token.header[e]),{header:!0,align:this.token.align[e]});for(o+=this.renderer.tablerow(n),e=0;e<this.token.cells.length;e++){for(t=this.token.cells[e],n="",i=0;i<t.length;i++)n+=this.renderer.tablecell(this.inline.output(t[i]),{header:!1,align:this.token.align[i]});a+=this.renderer.tablerow(n)}return this.renderer.table(o,a);case"blockquote_start":for(var a="";"blockquote_end"!==this.next().type;)a+=this.tok();return this.renderer.blockquote(a);case"list_start":for(var a="",s=this.token.ordered;"list_end"!==this.next().type;)a+=this.tok();return this.renderer.list(a,s);case"list_item_start":for(var a="";"list_item_end"!==this.next().type;)a+="text"===this.token.type?this.parseText():this.tok();return this.renderer.listitem(a);case"loose_item_start":for(var a="";"list_item_end"!==this.next().type;)a+=this.tok();return this.renderer.listitem(a);case"html":var l=this.token.pre||this.options.pedantic?this.token.text:this.inline.output(this.token.text);return this.renderer.html(l);case"paragraph":return this.renderer.paragraph(this.inline.output(this.token.text));case"text":return this.renderer.paragraph(this.parseText())}},l.exec=l,c.options=c.setOptions=function(e){return u(c.defaults,e),c},c.defaults={gfm:!0,tables:!0,breaks:!1,pedantic:!1,sanitize:!1,sanitizer:null,mangle:!0,smartLists:!1,silent:!1,highlight:null,langPrefix:"lang-",smartypants:!1,headerPrefix:"",renderer:new r,xhtml:!1},c.Parser=i,c.parser=i.parse,c.Renderer=r,c.Lexer=t,c.lexer=t.lex,c.InlineLexer=n,c.inlineLexer=n.output,c.parse=c,e.exports=c}).call(function(){return this||("undefined"!=typeof window?window:t)}())}).call(t,function(){return this}())},function(e,t,n){!function(e){e(n(345))}(function(e){"use strict";function t(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()})}function n(e,t,n){var r=e.options.hintOptions,i={};for(var o in d)i[o]=d[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}function r(e){return"string"==typeof e?e:e.text}function i(e,t){function n(e,n){var i;i="string"!=typeof n?function(e){return n(e,t)}:r.hasOwnProperty(n)?r[n]:n,o[e]=i}var r={Up:function(){t.moveFocus(-1)},Down:function(){t.moveFocus(1)},PageUp:function(){t.moveFocus(-t.menuSize()+1,!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},i=e.options.customKeys,o=i?{}:r;if(i)for(var a in i)i.hasOwnProperty(a)&&n(a,i[a]);var s=e.options.extraKeys;if(s)for(var a in s)s.hasOwnProperty(a)&&n(a,s[a]);return o}function o(e,t){for(;t&&t!=e;){if("LI"===t.nodeName.toUpperCase()&&t.parentNode==e)return t;t=t.parentNode}}function a(t,n){this.completion=t,this.data=n,this.picked=!1;var a=this,s=t.cm,l=this.hints=document.createElement("ul");l.className="CodeMirror-hints",this.selectedHint=n.selectedHint||0;for(var f=n.list,p=0;p<f.length;++p){var d=l.appendChild(document.createElement("li")),h=f[p],m=u+(p!=this.selectedHint?"":" "+c);null!=h.className&&(m=h.className+" "+m),d.className=m,h.render?h.render(d,n,h):d.appendChild(document.createTextNode(h.displayText||r(h))),d.hintId=p}var v=s.cursorCoords(t.options.alignWithWord?n.from:null),g=v.left,y=v.bottom,b=!0;l.style.left=g+"px",l.style.top=y+"px";var w=window.innerWidth||Math.max(document.body.offsetWidth,document.documentElement.offsetWidth),x=window.innerHeight||Math.max(document.body.offsetHeight,document.documentElement.offsetHeight);(t.options.container||document.body).appendChild(l);var T=l.getBoundingClientRect(),k=T.bottom-x;if(k>0){var L=T.bottom-T.top,S=v.top-(v.bottom-T.top);if(S-L>0)l.style.top=(y=v.top-L)+"px",b=!1;else if(L>x){l.style.height=x-5+"px",l.style.top=(y=v.bottom-T.top)+"px";var C=s.getCursor();n.from.ch!=C.ch&&(v=s.cursorCoords(C),l.style.left=(g=v.left)+"px",T=l.getBoundingClientRect())}}var E=T.right-w;if(E>0&&(T.right-T.left>w&&(l.style.width=w-5+"px",E-=T.right-T.left-w),l.style.left=(g=v.left-E)+"px"),s.addKeyMap(this.keyMap=i(t,{moveFocus:function(e,t){a.changeActive(a.selectedHint+e,t)},setFocus:function(e){a.changeActive(e)},menuSize:function(){return a.screenAmount()},length:f.length,close:function(){t.close()},pick:function(){a.pick()},data:n})),t.options.closeOnUnfocus){var _;s.on("blur",this.onBlur=function(){_=setTimeout(function(){t.close()},100)}),s.on("focus",this.onFocus=function(){clearTimeout(_)})}var N=s.getScrollInfo();return s.on("scroll",this.onScroll=function(){var e=s.getScrollInfo(),n=s.getWrapperElement().getBoundingClientRect(),r=y+N.top-e.top,i=r-(window.pageYOffset||(document.documentElement||document.body).scrollTop);return b||(i+=l.offsetHeight),i<=n.top||i>=n.bottom?t.close():(l.style.top=r+"px",void(l.style.left=g+N.left-e.left+"px"))}),e.on(l,"dblclick",function(e){var t=o(l,e.target||e.srcElement);t&&null!=t.hintId&&(a.changeActive(t.hintId),a.pick())}),e.on(l,"click",function(e){var n=o(l,e.target||e.srcElement);n&&null!=n.hintId&&(a.changeActive(n.hintId),t.options.completeOnSingleClick&&a.pick())}),e.on(l,"mousedown",function(){setTimeout(function(){s.focus()},20)}),t.options.completeOnSingleClick&&e.on(l,"mousemove",function(e){var t=o(l,e.target||e.srcElement);t&&null!=t.hintId&&a.changeActive(t.hintId)}),e.signal(n,"select",f[0],l.firstChild),!0}function s(e,t){if(!e.somethingSelected())return t;for(var n=[],r=0;r<t.length;r++)t[r].supportsSelection&&n.push(t[r]);return n}function l(t,n){var r,i=t.getHelpers(n,"hint");if(i.length){for(var o,a=!1,l=0;l<i.length;l++)i[l].async&&(a=!0);return a?(o=function(e,t,n){function r(i,a){if(i==o.length)return t(null);var s=o[i];if(s.async)s(e,function(e){e?t(e):r(i+1)},n);else{var a=s(e,n);a?t(a):r(i+1)}}var o=s(e,i);r(0)},o.async=!0):o=function(e,t){for(var n=s(e,i),r=0;r<n.length;r++){var o=n[r](e,t);if(o&&o.list.length)return o}},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(){}}var u="CodeMirror-hint",c="CodeMirror-hint-active";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(r){r=n(this,this.getCursor("start"),r);var i=this.listSelections();if(!(i.length>1)){if(this.somethingSelected()){if(!r.hint.supportsSelection)return;for(var o=0;o<i.length;o++)if(i[o].head.line!=i[o].anchor.line)return}this.state.completionActive&&this.state.completionActive.close();var a=this.state.completionActive=new t(this,r);a.options.hint&&(e.signal(this,"startCompletion",this),a.update(!0))}});var f=window.requestAnimationFrame||function(e){return setTimeout(e,1e3/60)},p=window.cancelAnimationFrame||clearTimeout;t.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 i=t.list[n];i.hint?i.hint(this.cm,t,i):this.cm.replaceRange(r(i),i.from||t.from,i.to||t.to,"complete"),e.signal(t,"pick",i),this.close()},cursorActivity:function(){this.debounce&&(p(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.startPos.ch||this.cm.somethingSelected()||e.ch&&this.options.closeCharacters.test(t.charAt(e.ch-1)))this.close();else{var n=this;this.debounce=f(function(){n.update()}),this.widget&&this.widget.disable()}},update:function(e){if(null!=this.tick)if(this.options.hint.async){var t=++this.tick,n=this;this.options.hint(this.cm,function(r){n.tick==t&&n.finishUpdate(r,e)},this.options)}else this.finishUpdate(this.options.hint(this.cm,this.options),e)},finishUpdate:function(t,n){this.data&&e.signal(this.data,"update"),t&&this.data&&e.cmpPos(t.from,this.data.from)&&(t=null),this.data=t;var r=this.widget&&this.widget.picked||n&&this.options.completeSingle;this.widget&&this.widget.close(),t&&t.list.length&&(r&&1==t.list.length?this.pick(t,0):(this.widget=new a(this,t),e.signal(t,"shown")))}},a.prototype={close:function(){if(this.completion.widget==this){this.completion.widget=null,this.hints.parentNode.removeChild(this.hints),this.completion.cm.removeKeyMap(this.keyMap);var e=this.completion.cm;this.completion.options.closeOnUnfocus&&(e.off("blur",this.onBlur),e.off("focus",this.onFocus)),e.off("scroll",this.onScroll)}},disable:function(){this.completion.cm.removeKeyMap(this.keyMap);var e=this;this.keyMap={Enter:function(){e.picked=!0}},this.completion.cm.addKeyMap(this.keyMap)},pick:function(){this.completion.pick(this.data,this.selectedHint)},changeActive:function(t,n){if(t>=this.data.list.length?t=n?this.data.list.length-1:0:0>t&&(t=n?0:this.data.list.length-1),this.selectedHint!=t){var r=this.hints.childNodes[this.selectedHint];r.className=r.className.replace(" "+c,""),r=this.hints.childNodes[this.selectedHint=t],r.className+=" "+c,r.offsetTop<this.hints.scrollTop?this.hints.scrollTop=r.offsetTop-3:r.offsetTop+r.offsetHeight>this.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=r.offsetTop+r.offsetHeight-this.hints.clientHeight+3),e.signal(this.data,"select",this.data.list[this.selectedHint],r)}},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1}},e.registerHelper("hint","auto",{resolve:l}),e.registerHelper("hint","fromList",function(t,n){var r=t.getCursor(),i=t.getTokenAt(r),o=e.Pos(r.line,i.end);if(i.string&&/\w/.test(i.string[i.string.length-1]))var a=i.string,s=e.Pos(r.line,i.start);else var a="",s=o;for(var l=[],u=0;u<n.words.length;u++){var c=n.words[u];c.slice(0,a.length)==a&&l.push(c)}return l.length?{list:l,from:s,to:o}:void 0}),e.commands.autocomplete=e.showHint;var d={hint:e.hint.auto,completeSingle:!0,alignWithWord:!0,closeCharacters:/[\s()\[\]{};:>,]/,closeOnUnfocus:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null};e.defineOption("hintOptions",null)})},function(e,t,n){!function(e){e(n(345))}(function(e){"use strict";function t(e){var t=e.search(r);return-1==t?0:t}var n={},r=/[^\s\u00a0]/,i=e.Pos;e.commands.toggleComment=function(e){e.toggleComment()},e.defineExtension("toggleComment",function(e){e||(e=n);for(var t=this,r=1/0,o=this.listSelections(),a=null,s=o.length-1;s>=0;s--){var l=o[s].from(),u=o[s].to();l.line>=r||(u.line>=r&&(u=i(r,0)),r=l.line,null==a?t.uncomment(l,u,e)?a="un":(t.lineComment(l,u,e),a="line"):"un"==a?t.uncomment(l,u,e):t.lineComment(l,u,e))}}),e.defineExtension("lineComment",function(e,o,a){a||(a=n);var s=this,l=s.getModeAt(e),u=a.lineComment||l.lineComment;if(!u)return void((a.blockCommentStart||l.blockCommentStart)&&(a.fullLines=!0,s.blockComment(e,o,a)));var c=s.getLine(e.line);if(null!=c){var f=Math.min(0!=o.ch||o.line==e.line?o.line+1:o.line,s.lastLine()+1),p=null==a.padding?" ":a.padding,d=a.commentBlankLines||e.line==o.line;s.operation(function(){if(a.indent){for(var n=null,o=e.line;f>o;++o){var l=s.getLine(o),c=l.slice(0,t(l));(null==n||n.length>c.length)&&(n=c)}for(var o=e.line;f>o;++o){var l=s.getLine(o),h=n.length;(d||r.test(l))&&(l.slice(0,h)!=n&&(h=t(l)),s.replaceRange(n+u+p,i(o,0),i(o,h)))}}else for(var o=e.line;f>o;++o)(d||r.test(s.getLine(o)))&&s.replaceRange(u+p,i(o,0))})}}),e.defineExtension("blockComment",function(e,t,o){o||(o=n);var a=this,s=a.getModeAt(e),l=o.blockCommentStart||s.blockCommentStart,u=o.blockCommentEnd||s.blockCommentEnd;if(!l||!u)return void((o.lineComment||s.lineComment)&&0!=o.fullLines&&a.lineComment(e,t,o));var c=Math.min(t.line,a.lastLine());c!=e.line&&0==t.ch&&r.test(a.getLine(c))&&--c;var f=null==o.padding?" ":o.padding;e.line>c||a.operation(function(){if(0!=o.fullLines){var n=r.test(a.getLine(c));a.replaceRange(f+u,i(c)),a.replaceRange(l+f,i(e.line,0));var p=o.blockCommentLead||s.blockCommentLead;if(null!=p)for(var d=e.line+1;c>=d;++d)(d!=c||n)&&a.replaceRange(p+f,i(d,0))}else a.replaceRange(u,t),a.replaceRange(l,e)})}),e.defineExtension("uncomment",function(e,t,o){o||(o=n);var a,s=this,l=s.getModeAt(e),u=Math.min(0!=t.ch||t.line==e.line?t.line:t.line-1,s.lastLine()),c=Math.min(e.line,u),f=o.lineComment||l.lineComment,p=[],d=null==o.padding?" ":o.padding;e:if(f){for(var h=c;u>=h;++h){var m=s.getLine(h),v=m.indexOf(f);if(v>-1&&!/comment/.test(s.getTokenTypeAt(i(h,v+1)))&&(v=-1),-1==v&&(h!=u||h==c)&&r.test(m))break e;if(v>-1&&r.test(m.slice(0,v)))break e;p.push(m)}if(s.operation(function(){for(var e=c;u>=e;++e){var t=p[e-c],n=t.indexOf(f),r=n+f.length;0>n||(t.slice(r,r+d.length)==d&&(r+=d.length),a=!0,s.replaceRange("",i(e,n),i(e,r)))}}),a)return!0}var g=o.blockCommentStart||l.blockCommentStart,y=o.blockCommentEnd||l.blockCommentEnd;if(!g||!y)return!1;var b=o.blockCommentLead||l.blockCommentLead,w=s.getLine(c),x=u==c?w:s.getLine(u),T=w.indexOf(g),k=x.lastIndexOf(y);if(-1==k&&c!=u&&(x=s.getLine(--u),k=x.lastIndexOf(y)),-1==T||-1==k||!/comment/.test(s.getTokenTypeAt(i(c,T+1)))||!/comment/.test(s.getTokenTypeAt(i(u,k+1))))return!1;var L=w.lastIndexOf(g,e.ch),S=-1==L?-1:w.slice(0,e.ch).indexOf(y,L+g.length);if(-1!=L&&-1!=S&&S+y.length!=e.ch)return!1;S=x.indexOf(y,t.ch);var C=x.slice(t.ch).lastIndexOf(g,S-t.ch);return L=-1==S||-1==C?-1:t.ch+C,-1!=S&&-1!=L&&L!=t.ch?!1:(s.operation(function(){s.replaceRange("",i(u,k-(d&&x.slice(k-d.length,k)==d?d.length:0)),i(u,k+y.length));var e=T+g.length;if(d&&w.slice(e,e+d.length)==d&&(e+=d.length),s.replaceRange("",i(c,T),i(c,e)),b)for(var t=c+1;u>=t;++t){var n=s.getLine(t),o=n.indexOf(b);if(-1!=o&&!r.test(n.slice(0,o))){var a=o+b.length;d&&n.slice(a,a+d.length)==d&&(a+=d.length),s.replaceRange("",i(t,o),i(t,a))}}}),!0)})})},function(e,t,n){!function(e){e(n(345))}(function(e){function t(e,t,r,i){var o=e.getLineHandle(t.line),l=t.ch-1,u=l>=0&&s[o.text.charAt(l)]||s[o.text.charAt(++l)];if(!u)return null;var c=">"==u.charAt(1)?1:-1;if(r&&c>0!=(l==t.ch))return null;var f=e.getTokenTypeAt(a(t.line,l+1)),p=n(e,a(t.line,l+(c>0?1:0)),c,f||null,i);return null==p?null:{from:a(t.line,l),to:p&&p.pos,match:p&&p.ch==u.charAt(0),forward:c>0}}function n(e,t,n,r,i){for(var o=i&&i.maxScanLineLength||1e4,l=i&&i.maxScanLines||1e3,u=[],c=i&&i.bracketRegex?i.bracketRegex:/[(){}[\]]/,f=n>0?Math.min(t.line+l,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-l),p=t.line;p!=f;p+=n){var d=e.getLine(p);if(d){var h=n>0?0:d.length-1,m=n>0?d.length:-1;if(!(d.length>o))for(p==t.line&&(h=t.ch-(0>n?1:0));h!=m;h+=n){var v=d.charAt(h);if(c.test(v)&&(void 0===r||e.getTokenTypeAt(a(p,h+1))==r)){var g=s[v];if(">"==g.charAt(1)==n>0)u.push(v);else{if(!u.length)return{pos:a(p,h),ch:v};u.pop()}}}}}return p-n==(n>0?e.lastLine():e.firstLine())?!1:null}function r(e,n,r){for(var i=e.state.matchBrackets.maxHighlightLineLength||1e3,s=[],l=e.listSelections(),u=0;u<l.length;u++){var c=l[u].empty()&&t(e,l[u].head,!1,r);if(c&&e.getLine(c.from.line).length<=i){var f=c.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";s.push(e.markText(c.from,a(c.from.line,c.from.ch+1),{className:f})),c.to&&e.getLine(c.to.line).length<=i&&s.push(e.markText(c.to,a(c.to.line,c.to.ch+1),{className:f}))}}if(s.length){o&&e.state.focused&&e.focus();var p=function(){e.operation(function(){for(var e=0;e<s.length;e++)s[e].clear()})};if(!n)return p;setTimeout(p,800)}}function i(e){e.operation(function(){l&&(l(),l=null),l=r(e,!1,e.state.matchBrackets)})}var o=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),a=e.Pos,s={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"},l=null;e.defineOption("matchBrackets",!1,function(t,n,r){r&&r!=e.Init&&t.off("cursorActivity",i),n&&(t.state.matchBrackets="object"==typeof n?n:{},t.on("cursorActivity",i))}),e.defineExtension("matchBrackets",function(){r(this,!0)}),e.defineExtension("findMatchingBracket",function(e,n,r){return t(this,e,n,r)}),e.defineExtension("scanForBracket",function(e,t,r,i){return n(this,e,t,r,i)})})},function(e,t,n){!function(e){e(n(345))}(function(e){function t(e,t){return"pairs"==t&&"string"==typeof e?e:"object"==typeof e&&null!=e[t]?e[t]:f[t]}function n(e){return function(t){return s(t,e)}}function r(e){var t=e.state.closeBrackets;if(!t)return null;var n=e.getModeAt(e.getCursor());return n.closeBrackets||t}function i(n){var i=r(n);if(!i||n.getOption("disableInput"))return e.Pass;for(var o=t(i,"pairs"),a=n.listSelections(),s=0;s<a.length;s++){if(!a[s].empty())return e.Pass;var l=u(n,a[s].head);if(!l||o.indexOf(l)%2!=0)return e.Pass}for(var s=a.length-1;s>=0;s--){var c=a[s].head;n.replaceRange("",p(c.line,c.ch-1),p(c.line,c.ch+1))}}function o(n){var i=r(n),o=i&&t(i,"explode");if(!o||n.getOption("disableInput"))return e.Pass;for(var a=n.listSelections(),s=0;s<a.length;s++){if(!a[s].empty())return e.Pass;var l=u(n,a[s].head);if(!l||o.indexOf(l)%2!=0)return e.Pass}n.operation(function(){n.replaceSelection("\n\n",null),n.execCommand("goCharLeft"),a=n.listSelections();for(var e=0;e<a.length;e++){var t=a[e].head.line;n.indentLine(t,null,!0),n.indentLine(t+1,null,!0)}})}function a(t){var n=e.cmpPos(t.anchor,t.head)>0;return{anchor:new p(t.anchor.line,t.anchor.ch+(n?-1:1)),head:new p(t.head.line,t.head.ch+(n?1:-1))}}function s(n,i){var o=r(n);if(!o||n.getOption("disableInput"))return e.Pass;var s=t(o,"pairs"),u=s.indexOf(i);if(-1==u)return e.Pass;for(var f,d,h=t(o,"triples"),m=s.charAt(u+1)==i,v=n.listSelections(),g=u%2==0,y=0;y<v.length;y++){var b,w=v[y],x=w.head,d=n.getRange(x,p(x.line,x.ch+1));if(g&&!w.empty())b="surround";else if(!m&&g||d!=i)if(m&&x.ch>1&&h.indexOf(i)>=0&&n.getRange(p(x.line,x.ch-2),x)==i+i&&(x.ch<=2||n.getRange(p(x.line,x.ch-3),p(x.line,x.ch-2))!=i))b="addFour";else if(m){if(e.isWordChar(d)||!c(n,x,i))return e.Pass;b="both"}else{if(!g||n.getLine(x.line).length!=x.ch&&!l(d,s)&&!/\s/.test(d))return e.Pass;b="both"}else b=h.indexOf(i)>=0&&n.getRange(x,p(x.line,x.ch+3))==i+i+i?"skipThree":"skip";if(f){if(f!=b)return e.Pass}else f=b}var T=u%2?s.charAt(u-1):i,k=u%2?i:s.charAt(u+1);n.operation(function(){if("skip"==f)n.execCommand("goCharRight");else if("skipThree"==f)for(var e=0;3>e;e++)n.execCommand("goCharRight");else if("surround"==f){for(var t=n.getSelections(),e=0;e<t.length;e++)t[e]=T+t[e]+k;n.replaceSelections(t,"around"),t=n.listSelections().slice();for(var e=0;e<t.length;e++)t[e]=a(t[e]);n.setSelections(t)}else"both"==f?(n.replaceSelection(T+k,null),n.triggerElectric(T+k),n.execCommand("goCharLeft")):"addFour"==f&&(n.replaceSelection(T+T+T+T,"before"),n.execCommand("goCharRight"))})}function l(e,t){var n=t.lastIndexOf(e);return n>-1&&n%2==1}function u(e,t){var n=e.getRange(p(t.line,t.ch-1),p(t.line,t.ch+1));return 2==n.length?n:null}function c(t,n,r){var i=t.getLine(n.line),o=t.getTokenAt(n);if(/\bstring2?\b/.test(o.type))return!1;var a=new e.StringStream(i.slice(0,n.ch)+r+i.slice(n.ch),4);for(a.pos=a.start=o.start;;){var s=t.getMode().token(a,o.state);if(a.pos>=n.ch+1)return/\bstring2?\b/.test(s);a.start=a.pos}}var f={pairs:"()[]{}''\"\"",triples:"",explode:"[]{}"},p=e.Pos;e.defineOption("autoCloseBrackets",!1,function(t,n,r){r&&r!=e.Init&&(t.removeKeyMap(h),t.state.closeBrackets=null),n&&(t.state.closeBrackets=n,t.addKeyMap(h))});for(var d=f.pairs+"`",h={Backspace:i,Enter:o},m=0;m<d.length;m++)h["'"+d.charAt(m)+"'"]=n(d.charAt(m))})},function(e,t,n){!function(e){e(n(345),n(527))}(function(e){"use strict";function t(e){this.options=e,this.from=this.to=0}function n(e){return e===!0&&(e={}),null==e.gutter&&(e.gutter="CodeMirror-foldgutter"),null==e.indicatorOpen&&(e.indicatorOpen="CodeMirror-foldgutter-open"),null==e.indicatorFolded&&(e.indicatorFolded="CodeMirror-foldgutter-folded"),e}function r(e,t){for(var n=e.findMarksAt(f(t)),r=0;r<n.length;++r)if(n[r].__isFold&&n[r].find().from.line==t)return n[r]}function i(e){if("string"==typeof e){var t=document.createElement("div");return t.className=e+" CodeMirror-guttermarker-subtle",t}return e.cloneNode(!0)}function o(e,t,n){var o=e.state.foldGutter.options,a=t,s=e.foldOption(o,"minFoldSize"),l=e.foldOption(o,"rangeFinder");e.eachLine(t,n,function(t){var n=null;if(r(e,a))n=i(o.indicatorFolded);else{var u=f(a,0),c=l&&l(e,u);c&&c.to.line-c.from.line>=s&&(n=i(o.indicatorOpen))}e.setGutterMarker(t,o.gutter,n),++a})}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 s(e,t,n){var i=e.state.foldGutter;if(i){var o=i.options;if(n==o.gutter){var a=r(e,t);a?a.clear():e.foldCode(f(t,0),o.rangeFinder)}}}function l(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 u(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.from<t.from&&(o(e,n.from,t.from),t.from=n.from),n.to>t.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&&r<n.to&&o(e,r,r+1)}}e.defineOption("foldGutter",!1,function(r,i,o){o&&o!=e.Init&&(r.clearGutter(r.state.foldGutter.options.gutter),r.state.foldGutter=null,r.off("gutterClick",s),r.off("change",l),r.off("viewportChange",u),r.off("fold",c),r.off("unfold",c),r.off("swapDoc",a)),i&&(r.state.foldGutter=new t(n(i)),a(r),r.on("gutterClick",s),r.on("change",l),r.on("viewportChange",u),r.on("fold",c),r.on("unfold",c),r.on("swapDoc",a))});var f=e.Pos})},function(e,t,n){!function(e){e(n(345))}(function(e){"use strict";function t(t,i,o,a){function s(e){var n=l(t,i);if(!n||n.to.line-n.from.line<u)return null;for(var r=t.findMarksAt(n.from),o=0;o<r.length;++o)if(r[o].__isFold&&"fold"!==a){if(!e)return null;n.cleared=!0,r[o].clear()}return n}if(o&&o.call){var l=o;o=null}else var l=r(t,o,"rangeFinder");"number"==typeof i&&(i=e.Pos(i,0));var u=r(t,o,"minFoldSize"),c=s(!0);if(r(t,o,"scanUp"))for(;!c&&i.line>t.firstLine();)i=e.Pos(i.line-1,0),c=s(!1);if(c&&!c.cleared&&"unfold"!==a){var f=n(t,o);e.on(f,"mousedown",function(t){p.clear(),e.e_preventDefault(t);
});var p=t.markText(c.from,c.to,{replacedWith:f,clearOnEnter:!0,__isFold:!0});p.on("clear",function(n,r){e.signal(t,"unfold",t,n,r)}),e.signal(t,"fold",t,c.from,c.to)}}function n(e,t){var n=r(e,t,"widget");if("string"==typeof n){var i=document.createTextNode(n);n=document.createElement("span"),n.appendChild(i),n.className="CodeMirror-foldmarker"}return n}function r(e,t,n){if(t&&void 0!==t[n])return t[n];var r=e.options.foldOptions;return r&&void 0!==r[n]?r[n]:i[n]}e.newFoldFunction=function(e,n){return function(r,i){t(r,i,{rangeFinder:e,widget:n})}},e.defineExtension("foldCode",function(e,n,r){t(this,e,n,r)}),e.defineExtension("isFolded",function(e){for(var t=this.findMarksAt(e),n=0;n<t.length;++n)if(t[n].__isFold)return!0}),e.commands.toggleFold=function(e){e.foldCode(e.getCursor())},e.commands.fold=function(e){e.foldCode(e.getCursor(),null,"fold")},e.commands.unfold=function(e){e.foldCode(e.getCursor(),null,"unfold")},e.commands.foldAll=function(t){t.operation(function(){for(var n=t.firstLine(),r=t.lastLine();r>=n;n++)t.foldCode(e.Pos(n,0),null,"fold")})},e.commands.unfoldAll=function(t){t.operation(function(){for(var n=t.firstLine(),r=t.lastLine();r>=n;n++)t.foldCode(e.Pos(n,0),null,"unfold")})},e.registerHelper("fold","combine",function(){var e=Array.prototype.slice.call(arguments,0);return function(t,n){for(var r=0;r<e.length;++r){var i=e[r](t,n);if(i)return i}}}),e.registerHelper("fold","auto",function(e,t){for(var n=e.getHelpers(t,"fold"),r=0;r<n.length;r++){var i=n[r](e,t);if(i)return i}});var i={rangeFinder:e.fold.auto,widget:"↔",minFoldSize:0,scanUp:!1};e.defineOption("foldOptions",null),e.defineExtension("foldOption",function(e,t){return r(this,e,t)})})},function(e,t,n){!function(e){e(n(345))}(function(e){"use strict";e.registerHelper("fold","brace",function(t,n){function r(r){for(var i=n.ch,l=0;;){var u=0>=i?-1:s.lastIndexOf(r,i-1);if(-1!=u){if(1==l&&u<n.ch)break;if(o=t.getTokenTypeAt(e.Pos(a,u+1)),!/^(comment|string)/.test(o))return u+1;i=u-1}else{if(1==l)break;l=1,i=s.length}}}var i,o,a=n.line,s=t.getLine(a),l="{",u="}",i=r("{");if(null==i&&(l="[",u="]",i=r("[")),null!=i){var c,f,p=1,d=t.lastLine();e:for(var h=a;d>=h;++h)for(var m=t.getLine(h),v=h==a?i:0;;){var g=m.indexOf(l,v),y=m.indexOf(u,v);if(0>g&&(g=m.length),0>y&&(y=m.length),v=Math.min(g,y),v==m.length)break;if(t.getTokenTypeAt(e.Pos(h,v+1))==o)if(v==g)++p;else if(!--p){c=h,f=v;break e}++v}if(null!=c&&(a!=c||f!=i))return{from:e.Pos(a,i),to:e.Pos(c,f)}}}),e.registerHelper("fold","import",function(t,n){function r(n){if(n<t.firstLine()||n>t.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);o>=i;++i){var a=t.getLine(i),s=a.indexOf(";");if(-1!=s)return{startCh:r.end,end:e.Pos(i,s)}}}var i,n=n.line,o=r(n);if(!o||r(n-1)||(i=r(n-2))&&i.end.line==n-1)return null;for(var a=o.end;;){var s=r(a.line+1);if(null==s)break;a=s.end}return{from:t.clipPos(e.Pos(n,o.startCh+1)),to:a}}),e.registerHelper("fold","include",function(t,n){function r(n){if(n<t.firstLine()||n>t.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 n=n.line,i=r(n);if(null==i||null!=r(n-1))return null;for(var o=n;;){var a=r(o+1);if(null==a)break;++o}return{from:e.Pos(n,i+1),to:t.clipPos(e.Pos(o))}})})},function(e,t,n){!function(e){e(n(345))}(function(e){"use strict";function t(t,n){function r(t){return i.parentNode?(i.style.top=Math.max(0,t.clientY-i.offsetHeight-5)+"px",void(i.style.left=t.clientX+5+"px")):e.off(document,"mousemove",r)}var i=document.createElement("div");return i.className="CodeMirror-lint-tooltip",i.appendChild(n.cloneNode(!0)),document.body.appendChild(i),e.on(document,"mousemove",r),r(t),null!=i.style.opacity&&(i.style.opacity=1),i}function n(e){e.parentNode&&e.parentNode.removeChild(e)}function r(e){e.parentNode&&(null==e.style.opacity&&n(e),e.style.opacity=0,setTimeout(function(){n(e)},600))}function i(n,i,o){function a(){e.off(o,"mouseout",a),s&&(r(s),s=null)}var s=t(n,i),l=setInterval(function(){if(s)for(var e=o;;e=e.parentNode){if(e&&11==e.nodeType&&(e=e.host),e==document.body)return;if(!e){a();break}}return s?void 0:clearInterval(l)},400);e.on(o,"mouseout",a)}function o(e,t,n){this.marked=[],this.options=t,this.timeout=null,this.hasGutter=n,this.onMouseOver=function(t){g(e,t)},this.waitingFor=0}function a(e,t){return t instanceof Function?{getAnnotations:t}:(t&&t!==!0||(t={}),t)}function s(e){var t=e.state.lint;t.hasGutter&&e.clearGutter(y);for(var n=0;n<t.marked.length;++n)t.marked[n].clear();t.marked.length=0}function l(t,n,r,o){var a=document.createElement("div"),s=a;return a.className="CodeMirror-lint-marker-"+n,r&&(s=a.appendChild(document.createElement("div")),s.className="CodeMirror-lint-marker-multiple"),0!=o&&e.on(s,"mouseover",function(e){i(e,t,s)}),a}function u(e,t){return"error"==e?e:t}function c(e){for(var t=[],n=0;n<e.length;++n){var r=e[n],i=r.from.line;(t[i]||(t[i]=[])).push(r)}return t}function f(e){var t=e.severity;t||(t="error");var n=document.createElement("div");return n.className="CodeMirror-lint-message-"+t,n.appendChild(document.createTextNode(e.message)),n}function p(t,n,r){function i(){a=-1,t.off("change",i)}var o=t.state.lint,a=++o.waitingFor;t.on("change",i),n(t.getValue(),function(n,r){t.off("change",i),o.waitingFor==a&&(r&&n instanceof e&&(n=r),h(t,n))},r,t)}function d(t){var n=t.state.lint,r=n.options,i=r.options||r,o=r.getAnnotations||t.getHelper(e.Pos(0,0),"lint");o&&(r.async||o.async?p(t,o,i):h(t,o(t.getValue(),i,t)))}function h(e,t){s(e);for(var n=e.state.lint,r=n.options,i=c(t),o=0;o<i.length;++o){var a=i[o];if(a){for(var p=null,d=n.hasGutter&&document.createDocumentFragment(),h=0;h<a.length;++h){var m=a[h],v=m.severity;v||(v="error"),p=u(p,v),r.formatAnnotation&&(m=r.formatAnnotation(m)),n.hasGutter&&d.appendChild(f(m)),m.to&&n.marked.push(e.markText(m.from,m.to,{className:"CodeMirror-lint-mark-"+v,__annotation:m}))}n.hasGutter&&e.setGutterMarker(o,y,l(d,p,a.length>1,n.options.tooltips))}}r.onUpdateLinting&&r.onUpdateLinting(t,i,e)}function m(e){var t=e.state.lint;t&&(clearTimeout(t.timeout),t.timeout=setTimeout(function(){d(e)},t.options.delay||500))}function v(e,t){var n=t.target||t.srcElement;i(t,f(e),n)}function g(e,t){var n=t.target||t.srcElement;if(/\bCodeMirror-lint-mark-/.test(n.className))for(var r=n.getBoundingClientRect(),i=(r.left+r.right)/2,o=(r.top+r.bottom)/2,a=e.findMarksAt(e.coordsChar({left:i,top:o},"client")),s=0;s<a.length;++s){var l=a[s].__annotation;if(l)return v(l,t)}}var y="CodeMirror-lint-markers";e.defineOption("lint",!1,function(t,n,r){if(r&&r!=e.Init&&(s(t),t.state.lint.options.lintOnChange!==!1&&t.off("change",m),e.off(t.getWrapperElement(),"mouseover",t.state.lint.onMouseOver),clearTimeout(t.state.lint.timeout),delete t.state.lint),n){for(var i=t.getOption("gutters"),l=!1,u=0;u<i.length;++u)i[u]==y&&(l=!0);var c=t.state.lint=new o(t,a(t,n),l);c.options.lintOnChange!==!1&&t.on("change",m),0!=c.options.tooltips&&e.on(t.getWrapperElement(),"mouseover",c.onMouseOver),d(t)}}),e.defineExtension("performLint",function(){this.state.lint&&d(this)})})},function(e,t,n){!function(e){e(n(345),n(531),n(524))}(function(e){"use strict";function t(t,n,r){if(0>r&&0==n.ch)return t.clipPos(p(n.line-1));var i=t.getLine(n.line);if(r>0&&n.ch>=i.length)return t.clipPos(p(n.line+1,0));for(var o,a="start",s=n.ch,l=0>r?0:i.length,u=0;s!=l;s+=r,u++){var c=i.charAt(0>r?s-1:s),f="_"!=c&&e.isWordChar(c)?"w":"o";if("w"==f&&c.toUpperCase()==c&&(f="W"),"start"==a)"o"!=f&&(a="in",o=f);else if("in"==a&&o!=f){if("w"==o&&"W"==f&&0>r&&s--,"W"==o&&"w"==f&&r>0){o="w";continue}break}}return p(n.line,s)}function n(e,n){e.extendSelectionsBy(function(r){return e.display.shift||e.doc.extend||r.empty()?t(e.doc,r.head,n):0>n?r.from():r.to()})}function r(e,t){e.operation(function(){for(var n=e.listSelections().length,r=[],i=-1,o=0;n>o;o++){var a=e.listSelections()[o].head;if(!(a.line<=i)){var s=p(a.line+(t?0:1),0);e.replaceRange("\n",s,null,"+insertLine"),e.indentLine(s.line,null,!0),r.push({head:s,anchor:s}),i=a.line+1}}e.setSelections(r)})}function i(t,n){for(var r=n.ch,i=r,o=t.getLine(n.line);r&&e.isWordChar(o.charAt(r-1));)--r;for(;i<o.length&&e.isWordChar(o.charAt(i));)++i;return{from:p(n.line,r),to:p(n.line,i),word:o.slice(r,i)}}function o(e){var t=e.getCursor(),n=e.scanForBracket(t,-1);if(n)for(;;){var r=e.scanForBracket(t,1);if(!r)return;if(r.ch==v.charAt(v.indexOf(n.ch)+1))return e.setSelection(p(n.pos.line,n.pos.ch+1),r.pos,!1),!0;t=p(r.pos.line,r.pos.ch+1)}}function a(e,t){for(var n,r=e.listSelections(),i=[],o=0;o<r.length;o++){var a=r[o];if(!a.empty()){for(var s=a.from().line,l=a.to().line;o<r.length-1&&r[o+1].from().line==l;)l=a[++o].to().line;i.push(s,l)}}i.length?n=!0:i.push(e.firstLine(),e.lastLine()),e.operation(function(){for(var r=[],o=0;o<i.length;o+=2){var a=i[o],s=i[o+1],l=p(a,0),u=p(s),c=e.getRange(l,u,!1);t?c.sort():c.sort(function(e,t){var n=e.toUpperCase(),r=t.toUpperCase();return n!=r&&(e=n,t=r),t>e?-1:e==t?0:1}),e.replaceRange(c,l,u),n&&r.push({anchor:l,head:u})}n&&e.setSelections(r,0)})}function s(t,n){t.operation(function(){for(var r=t.listSelections(),o=[],a=[],s=0;s<r.length;s++){var l=r[s];l.empty()?(o.push(s),a.push("")):a.push(n(t.getRange(l.from(),l.to())))}t.replaceSelections(a,"around","case");for(var u,s=o.length-1;s>=0;s--){var l=r[o[s]];if(!(u&&e.cmpPos(l.head,u)>0)){var c=i(t,l.head);u=c.from,t.replaceRange(n(c.word),c.from,c.to)}}})}function l(t){var n=t.getCursor("from"),r=t.getCursor("to");if(0==e.cmpPos(n,r)){var o=i(t,n);if(!o.word)return;n=o.from,r=o.to}return{from:n,to:r,query:t.getRange(n,r),word:o}}function u(e,t){var n=l(e);if(n){var r=n.query,i=e.getSearchCursor(r,t?n.to:n.from);(t?i.findNext():i.findPrevious())?e.setSelection(i.from(),i.to()):(i=e.getSearchCursor(r,t?p(e.firstLine(),0):e.clipPos(p(e.lastLine()))),(t?i.findNext():i.findPrevious())?e.setSelection(i.from(),i.to()):n.word&&e.setSelection(n.from,n.to))}}var c=e.keyMap.sublime={fallthrough:"default"},f=e.commands,p=e.Pos,d=e.keyMap["default"]==e.keyMap.macDefault,h=d?"Cmd-":"Ctrl-";f[c["Alt-Left"]="goSubwordLeft"]=function(e){n(e,-1)},f[c["Alt-Right"]="goSubwordRight"]=function(e){n(e,1)};var m=d?"Ctrl-Alt-":"Ctrl-";f[c[m+"Up"]="scrollLineUp"]=function(e){var t=e.getScrollInfo();if(!e.somethingSelected()){var n=e.lineAtHeight(t.top+t.clientHeight,"local");e.getCursor().line>=n&&e.execCommand("goLineUp")}e.scrollTo(null,t.top-e.defaultTextHeight())},f[c[m+"Down"]="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())},f[c["Shift-"+h+"L"]="splitSelectionByLine"]=function(e){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++)for(var i=t[r].from(),o=t[r].to(),a=i.line;a<=o.line;++a)o.line>i.line&&a==o.line&&0==o.ch||n.push({anchor:a==i.line?i:p(a,0),head:a==o.line?o:p(a)});e.setSelections(n,0)},c["Shift-Tab"]="indentLess",f[c.Esc="singleSelectionTop"]=function(e){var t=e.listSelections()[0];e.setSelection(t.anchor,t.head,{scroll:!1})},f[c[h+"L"]="selectLine"]=function(e){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++){var i=t[r];n.push({anchor:p(i.from().line,0),head:p(i.to().line+1,0)})}e.setSelections(n)},c["Shift-"+h+"K"]="deleteLine",f[c[h+"Enter"]="insertLineAfter"]=function(e){r(e,!1)},f[c["Shift-"+h+"Enter"]="insertLineBefore"]=function(e){r(e,!0)},f[c[h+"D"]="selectNextOccurrence"]=function(t){var n=t.getCursor("from"),r=t.getCursor("to"),o=t.state.sublimeFindFullWord==t.doc.sel;if(0==e.cmpPos(n,r)){var a=i(t,n);if(!a.word)return;t.setSelection(a.from,a.to),o=!0}else{var s=t.getRange(n,r),l=o?new RegExp("\\b"+s+"\\b"):s,u=t.getSearchCursor(l,r);u.findNext()?t.addSelection(u.from(),u.to()):(u=t.getSearchCursor(l,p(t.firstLine(),0)),u.findNext()&&t.addSelection(u.from(),u.to()))}o&&(t.state.sublimeFindFullWord=t.doc.sel)};var v="(){}[]";f[c["Shift-"+h+"Space"]="selectScope"]=function(e){o(e)||e.execCommand("selectAll")},f[c["Shift-"+h+"M"]="selectBetweenBrackets"]=function(t){return o(t)?void 0:e.Pass},f[c[h+"M"]="goToBracket"]=function(t){t.extendSelectionsBy(function(n){var r=t.scanForBracket(n.head,1);if(r&&0!=e.cmpPos(r.pos,n.head))return r.pos;var i=t.scanForBracket(n.head,-1);return i&&p(i.pos.line,i.pos.ch+1)||n.head})};var g=d?"Cmd-Ctrl-":"Shift-Ctrl-";f[c[g+"Up"]="swapLineUp"]=function(e){for(var t=e.listSelections(),n=[],r=e.firstLine()-1,i=[],o=0;o<t.length;o++){var a=t[o],s=a.from().line-1,l=a.to().line;i.push({anchor:p(a.anchor.line-1,a.anchor.ch),head:p(a.head.line-1,a.head.ch)}),0!=a.to().ch||a.empty()||--l,s>r?n.push(s,l):n.length&&(n[n.length-1]=l),r=l}e.operation(function(){for(var t=0;t<n.length;t+=2){var r=n[t],o=n[t+1],a=e.getLine(r);e.replaceRange("",p(r,0),p(r+1,0),"+swapLine"),o>e.lastLine()?e.replaceRange("\n"+a,p(e.lastLine()),null,"+swapLine"):e.replaceRange(a+"\n",p(o,0),null,"+swapLine")}e.setSelections(i),e.scrollIntoView()})},f[c[g+"Down"]="swapLineDown"]=function(e){for(var t=e.listSelections(),n=[],r=e.lastLine()+1,i=t.length-1;i>=0;i--){var o=t[i],a=o.to().line+1,s=o.from().line;0!=o.to().ch||o.empty()||a--,r>a?n.push(a,s):n.length&&(n[n.length-1]=s),r=s}e.operation(function(){for(var t=n.length-2;t>=0;t-=2){var r=n[t],i=n[t+1],o=e.getLine(r);r==e.lastLine()?e.replaceRange("",p(r-1),p(r),"+swapLine"):e.replaceRange("",p(r,0),p(r+1,0),"+swapLine"),e.replaceRange(o+"\n",p(i,0),null,"+swapLine")}e.scrollIntoView()})},c[h+"/"]=function(e){e.toggleComment({indent:!0})},f[c[h+"J"]="joinLines"]=function(e){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++){for(var i=t[r],o=i.from(),a=o.line,s=i.to().line;r<t.length-1&&t[r+1].from().line==s;)s=t[++r].to().line;n.push({start:a,end:s,anchor:!i.empty()&&o})}e.operation(function(){for(var t=0,r=[],i=0;i<n.length;i++){for(var o,a=n[i],s=a.anchor&&p(a.anchor.line-t,a.anchor.ch),l=a.start;l<=a.end;l++){var u=l-t;l==a.end&&(o=p(u,e.getLine(u).length+1)),u<e.lastLine()&&(e.replaceRange(" ",p(u),p(u+1,/^\s*/.exec(e.getLine(u+1))[0].length)),++t)}r.push({anchor:s||o,head:o})}e.setSelections(r,0)})},f[c["Shift-"+h+"D"]="duplicateLine"]=function(e){e.operation(function(){for(var t=e.listSelections().length,n=0;t>n;n++){var r=e.listSelections()[n];r.empty()?e.replaceRange(e.getLine(r.head.line)+"\n",p(r.head.line,0)):e.replaceRange(e.getRange(r.from(),r.to()),r.from())}e.scrollIntoView()})},c[h+"T"]="transposeChars",f[c.F9="sortLines"]=function(e){a(e,!0)},f[c[h+"F9"]="sortLinesInsensitive"]=function(e){a(e,!1)},f[c.F2="nextBookmark"]=function(e){var t=e.state.sublimeBookmarks;if(t)for(;t.length;){var n=t.shift(),r=n.find();if(r)return t.push(n),e.setSelection(r.from,r.to)}},f[c["Shift-F2"]="prevBookmark"]=function(e){var t=e.state.sublimeBookmarks;if(t)for(;t.length;){t.unshift(t.pop());var n=t[t.length-1].find();if(n)return e.setSelection(n.from,n.to);t.pop()}},f[c[h+"F2"]="toggleBookmark"]=function(e){for(var t=e.listSelections(),n=e.state.sublimeBookmarks||(e.state.sublimeBookmarks=[]),r=0;r<t.length;r++){for(var i=t[r].from(),o=t[r].to(),a=e.findMarks(i,o),s=0;s<a.length;s++)if(a[s].sublimeBookmark){a[s].clear();for(var l=0;l<n.length;l++)n[l]==a[s]&&n.splice(l--,1);break}s==a.length&&n.push(e.markText(i,o,{sublimeBookmark:!0,clearWhenEmpty:!1}))}},f[c["Shift-"+h+"F2"]="clearBookmarks"]=function(e){var t=e.state.sublimeBookmarks;if(t)for(var n=0;n<t.length;n++)t[n].clear();t.length=0},f[c["Alt-F2"]="selectBookmarks"]=function(e){var t=e.state.sublimeBookmarks,n=[];if(t)for(var r=0;r<t.length;r++){var i=t[r].find();i?n.push({anchor:i.from,head:i.to}):t.splice(r--,0)}n.length&&e.setSelections(n,0)},c["Alt-Q"]="wrapLines";var y=h+"K ";c[y+h+"Backspace"]="delLineLeft",f[c.Backspace="smartBackspace"]=function(t){if(t.somethingSelected())return e.Pass;var n=t.getCursor(),r=t.getRange({line:n.line,ch:0},n),i=e.countColumn(r,null,t.getOption("tabSize")),o=t.getOption("indentUnit");if(r&&!/\S/.test(r)&&i%o==0){var a=new p(n.line,e.findColumn(r,i-o,o));return a.ch==n.ch?e.Pass:t.replaceRange("",a,n,"+delete")}return e.Pass},f[c[y+h+"K"]="delLineRight"]=function(e){e.operation(function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange("",t[n].anchor,p(t[n].to().line),"+delete");e.scrollIntoView()})},f[c[y+h+"U"]="upcaseAtCursor"]=function(e){s(e,function(e){return e.toUpperCase()})},f[c[y+h+"L"]="downcaseAtCursor"]=function(e){s(e,function(e){return e.toLowerCase()})},f[c[y+h+"Space"]="setSublimeMark"]=function(e){e.state.sublimeMark&&e.state.sublimeMark.clear(),e.state.sublimeMark=e.setBookmark(e.getCursor())},f[c[y+h+"A"]="selectToSublimeMark"]=function(e){var t=e.state.sublimeMark&&e.state.sublimeMark.find();t&&e.setSelection(e.getCursor(),t)},f[c[y+h+"W"]="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)}},f[c[y+h+"X"]="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))},f[c[y+h+"Y"]="sublimeYank"]=function(e){null!=e.state.sublimeKilled&&e.replaceSelection(e.state.sublimeKilled,null,"paste")},c[y+h+"G"]="clearBookmarks",f[c[y+h+"C"]="showInCenter"]=function(e){var t=e.cursorCoords(null,"local");e.scrollTo(null,(t.top+t.bottom)/2-e.getScrollInfo().clientHeight/2)},f[c["Shift-Alt-Up"]="selectLinesUpward"]=function(e){e.operation(function(){for(var t=e.listSelections(),n=0;n<t.length;n++){var r=t[n];r.head.line>e.firstLine()&&e.addSelection(p(r.head.line-1,r.head.ch))}})},f[c["Shift-Alt-Down"]="selectLinesDownward"]=function(e){e.operation(function(){for(var t=e.listSelections(),n=0;n<t.length;n++){var r=t[n];r.head.line<e.lastLine()&&e.addSelection(p(r.head.line+1,r.head.ch))}})},f[c[h+"F3"]="findUnder"]=function(e){u(e,!0)},f[c["Shift-"+h+"F3"]="findUnderPrevious"]=function(e){u(e,!1)},f[c["Alt-F3"]="findAllUnder"]=function(e){var t=l(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)}},c["Shift-"+h+"["]="fold",c["Shift-"+h+"]"]="unfold",c[y+h+"0"]=c[y+h+"j"]="unfoldAll",c[h+"I"]="findIncremental",c["Shift-"+h+"I"]="findIncrementalReverse",c[h+"H"]="replace",c.F3="findNext",c["Shift-F3"]="findPrev",e.normalizeKeyMap(c)})},function(e,t,n){!function(e){e(n(345))}(function(e){"use strict";function t(e,t,i,o){if(this.atOccurrence=!1,this.doc=e,null==o&&"string"==typeof t&&(o=!1),i=i?e.clipPos(i):r(0,0),this.pos={from:i,to:i},"string"!=typeof t)t.global||(t=new RegExp(t.source,t.ignoreCase?"ig":"g")),this.matches=function(n,i){if(n){t.lastIndex=0;for(var o,a,s=e.getLine(i.line).slice(0,i.ch),l=0;;){t.lastIndex=l;var u=t.exec(s);if(!u)break;if(o=u,a=o.index,l=o.index+(o[0].length||1),l==s.length)break}var c=o&&o[0].length||0;c||(0==a&&0==s.length?o=void 0:a!=e.getLine(i.line).length&&c++)}else{t.lastIndex=i.ch;var s=e.getLine(i.line),o=t.exec(s),c=o&&o[0].length||0,a=o&&o.index;a+c==s.length||c||(c=1)}return o&&c?{from:r(i.line,a),to:r(i.line,a+c),match:o}:void 0};else{var a=t;o&&(t=t.toLowerCase());var s=o?function(e){return e.toLowerCase()}:function(e){return e},l=t.split("\n");if(1==l.length)t.length?this.matches=function(i,o){if(i){var l=e.getLine(o.line).slice(0,o.ch),u=s(l),c=u.lastIndexOf(t);if(c>-1)return c=n(l,u,c),{from:r(o.line,c),to:r(o.line,c+a.length)}}else{var l=e.getLine(o.line).slice(o.ch),u=s(l),c=u.indexOf(t);if(c>-1)return c=n(l,u,c)+o.ch,{from:r(o.line,c),to:r(o.line,c+a.length)}}}:this.matches=function(){};else{var u=a.split("\n");this.matches=function(t,n){var i=l.length-1;if(t){if(n.line-(l.length-1)<e.firstLine())return;if(s(e.getLine(n.line).slice(0,u[i].length))!=l[l.length-1])return;for(var o=r(n.line,u[i].length),a=n.line-1,c=i-1;c>=1;--c,--a)if(l[c]!=s(e.getLine(a)))return;var f=e.getLine(a),p=f.length-u[0].length;if(s(f.slice(p))!=l[0])return;return{from:r(a,p),to:o}}if(!(n.line+(l.length-1)>e.lastLine())){var f=e.getLine(n.line),p=f.length-u[0].length;if(s(f.slice(p))==l[0]){for(var d=r(n.line,p),a=n.line+1,c=1;i>c;++c,++a)if(l[c]!=s(e.getLine(a)))return;if(s(e.getLine(a).slice(0,u[i].length))==l[i])return{from:d,to:r(a,u[i].length)}}}}}}}function n(e,t,n){if(e.length==t.length)return n;for(var r=Math.min(n,e.length);;){var i=e.slice(0,r).toLowerCase().length;if(n>i)++r;else{if(!(i>n))return r;--r}}}var r=e.Pos;t.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(e){function t(e){var t=r(e,0);return n.pos={from:t,to:t},n.atOccurrence=!1,!1}for(var n=this,i=this.doc.clipPos(e?this.pos.from:this.pos.to);;){if(this.pos=this.matches(e,i))return this.atOccurrence=!0,this.pos.match||!0;if(e){if(!i.line)return t(0);i=r(i.line-1,this.doc.getLine(i.line-1).length)}else{var o=this.doc.lineCount();if(i.line==o-1)return t(o);i=r(i.line+1,0)}}},from:function(){return this.atOccurrence?this.pos.from:void 0},to:function(){return this.atOccurrence?this.pos.to:void 0},replace:function(t,n){if(this.atOccurrence){var i=e.splitLines(t);this.doc.replaceRange(i,this.pos.from,this.pos.to,n),this.pos.to=r(this.pos.from.line+i.length-1,i[i.length-1].length+(1==i.length?this.pos.from.ch:0))}}},e.defineExtension("getSearchCursor",function(e,n,r){return new t(this.doc,e,n,r)}),e.defineDocExtension("getSearchCursor",function(e,n,r){return new t(this,e,n,r)}),e.defineExtension("selectMatches",function(t,n){for(var r=[],i=this.getSearchCursor(t,this.getCursor("from"),n);i.findNext()&&!(e.cmpPos(i.to(),this.getCursor("to"))>0);)r.push({anchor:i.from(),head:i.to()});r.length&&this.setSelections(r,0)})})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){var n={type:null,parentType:null,inputType:null,directiveDef:null,fieldDef:null,argDef:null,argDefs:null,objectFieldDefs:null};return o(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":n.type=t.type&&e.getType(t.type);break;case"Field":n.fieldDef=n.type&&t.name?a(e,n.parentType,t.name):null,n.type=n.fieldDef&&n.fieldDef.type;break;case"SelectionSet":n.parentType=h.getNamedType(n.type);break;case"Directive":n.directiveDef=t.name&&e.getDirective(t.name);break;case"Arguments":n.argDefs="Field"===t.prevState.kind?n.fieldDef&&n.fieldDef.args:"Directive"===t.prevState.kind?n.directiveDef&&n.directiveDef.args:null;break;case"Argument":if(n.argDef=null,n.argDefs)for(var r=0;r<n.argDefs.length;r++)if(n.argDefs[r].name===t.name){n.argDef=n.argDefs[r];break}n.inputType=n.argDef&&n.argDef.type;break;case"ListValue":var i=h.getNullableType(n.inputType);n.inputType=i instanceof h.GraphQLList?i.ofType:null;break;case"ObjectValue":var o=h.getNamedType(n.inputType);n.objectFieldDefs=o instanceof h.GraphQLInputObjectType?o.getFields():null;break;case"ObjectField":var s=t.name&&n.objectFieldDefs?n.objectFieldDefs[t.name]:null;n.inputType=s&&s.type}}),n}function o(e,t){for(var n=[],r=e;r&&r.kind;)n.push(r),r=r.prevState;for(var i=n.length-1;i>=0;i--)t(n[i])}function a(e,t,n){return n===m.SchemaMetaFieldDef.name&&e.getQueryType()===t?m.SchemaMetaFieldDef:n===m.TypeMetaFieldDef.name&&e.getQueryType()===t?m.TypeMetaFieldDef:n===m.TypeNameMetaFieldDef.name&&h.isCompositeType(t)?m.TypeNameMetaFieldDef:t.getFields?t.getFields()[n]:void 0}function s(e,t,n,r,i){var o=l(i,u(r.string));if(o){var a=null===r.type?r.end:/\w/.test(r.string[0])?r.start:r.start+1,s={list:o,from:d["default"].Pos(n.line,a),to:d["default"].Pos(n.line,r.end)};return d["default"].signal(e,"hasCompletion",e,s,r),s}}function l(e,t){var n=t?e.map(function(e){return{proximity:c(u(e.text),t),entry:e}}).filter(function(e){return e.proximity<=2}).sort(function(e,t){return e.proximity-t.proximity||e.entry.text.length-t.entry.text.length}).map(function(e){return e.entry}):e;return n.length>0?n:e}function u(e){return e.toLowerCase().replace(/\W/g,"")}function c(e,t){var n=f(t,e);return e.length>t.length&&(n-=e.length-t.length-1,n+=0===e.indexOf(t)?0:.5),n}function f(e,t){var n,r,i=[],o=e.length,a=t.length;for(n=0;o>=n;n++)i[n]=[n];for(r=1;a>=r;r++)i[0][r]=r;for(n=1;o>=n;n++)for(r=1;a>=r;r++){var s=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]+s),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]+s))}return i[o][a]}var p=n(345),d=r(p),h=n(509),m=n(464);d["default"].registerHelper("hint","graphql",function(e,t){var n=t.schema;if(n){var r=e.getCursor(),o=e.getTokenAt(r),a=i(n,o.state),l=o.state,u=l.kind,c=l.step;if("comment"!==o.type){if("Document"===u)return s(e,t,r,o,[{text:"query"},{text:"mutation"},{text:"subscription"},{text:"fragment"},{text:"{"}]);if(("SelectionSet"===u||"Field"===u||"AliasedField"===u)&&a.parentType){var f;if(a.parentType.getFields){var p=a.parentType.getFields();f=Object.keys(p).map(function(e){return p[e]})}else f=[];return h.isAbstractType(a.parentType)&&f.push(m.TypeNameMetaFieldDef),a.parentType===n.getQueryType()&&f.push(m.SchemaMetaFieldDef,m.TypeMetaFieldDef),s(e,t,r,o,f.map(function(e){return{text:e.name,type:e.type,description:e.description}}))}if("Arguments"===u||"Argument"===u&&0===c){var d=a.argDefs;if(d)return s(e,t,r,o,d.map(function(e){return{text:e.name,type:e.type,description:e.description}}))}if(("ObjectValue"===u||"ObjectField"===u&&0===c)&&a.objectFieldDefs){var v=Object.keys(a.objectFieldDefs).map(function(e){return a.objectFieldDefs[e]});return s(e,t,r,o,v.map(function(e){return{text:e.name,type:e.type,description:e.description}}))}if("EnumValue"===u||"ListValue"===u&&1===c||"ObjectField"===u&&2===c||"Argument"===u&&2===c){var g=h.getNamedType(a.inputType);if(g instanceof h.GraphQLEnumType){var y=g.getValues(),b=Object.keys(y).map(function(e){return y[e]});return s(e,t,r,o,b.map(function(e){return{text:e.name,type:g,description:e.description}}))}if(g===h.GraphQLBoolean)return s(e,t,r,o,[{text:"true",type:h.GraphQLBoolean,description:"Not false."},{text:"false",type:h.GraphQLBoolean,description:"Not true."}])}if("TypeCondition"===u&&1===c||"NamedType"===u&&"TypeCondition"===l.prevState.kind){var w;if(a.parentType)w=h.isAbstractType(a.parentType)?a.parentType.getPossibleTypes():[a.parentType];else{var x=n.getTypeMap();w=Object.keys(x).map(function(e){return x[e]}).filter(h.isCompositeType)}return s(e,t,r,o,w.map(function(e){return{text:e.name,description:e.description}}))}if("VariableDefinition"===u&&2===c||"ListType"===u&&1===c||"NamedType"===u&&("VariableDefinition"===l.prevState.kind||"ListType"===l.prevState.kind)){var T=n.getTypeMap(),k=Object.keys(T).map(function(e){return T[e]}).filter(h.isInputType);return s(e,t,r,o,k.map(function(e){return{text:e.name,description:e.description}}))}if("Directive"===u){var L=n.getDirectives().filter(function(e){return e.onField&&"Field"===l.prevState.kind||e.onFragment&&("FragmentDefinition"===l.prevState.kind||"InlineFragment"===l.prevState.kind||"FragmentSpread"===l.prevState.kind)||e.onOperation&&("Query"===l.prevState.kind||"Mutation"===l.prevState.kind||"Subscription"===l.prevState.kind)});return s(e,t,r,o,L.map(function(e){return{text:e.name,description:e.description}}))}}}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){return t.nodes.map(function(n){var r="Variable"!==n.kind&&n.name?n.name:n.variable?n.variable:n;return{message:t.message,severity:"error",type:"validation",from:e.posFromIndex(r.loc.start),to:e.posFromIndex(r.loc.end)}})}function o(e,t){return Array.prototype.concat.apply([],e.map(t))}var a=n(345),s=r(a),l=n(419),u=n(534);s["default"].registerHelper("lint","graphql",function(e,t,n){var r=t.schema;try{var a=l.parse(e)}catch(c){var f=c.locations[0],p=s["default"].Pos(f.line-1,f.column),d=n.getTokenAt(p);return[{message:c.message,severity:"error",type:"syntax",from:s["default"].Pos(f.line-1,d.start),to:s["default"].Pos(f.line-1,d.end)}]}var h=r?u.validate(r,a):[];return o(h,function(e){return i(n,e)})})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(438);Object.defineProperty(t,"validate",{enumerable:!0,get:function(){return r.validate}});var i=n(470);Object.defineProperty(t,"specifiedRules",{enumerable:!0,get:function(){return i.specifiedRules}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(t.needsAdvance&&(t.needsAdvance=!1,f(t)),e.sol()&&(t.indentLevel=Math.floor(e.indentation()/this.config.tabSize)),e.eatSpace()||e.eatWhile(","))return null;if(e.match(this.lineComment))return e.skipToEnd(),"comment";var n=d(e);if(!n)return e.match(/\w+|./),"invalidchar";if(s(t),"Punctuation"===n.kind)if(/^[{([]/.test(n.value))t.levels=(t.levels||[]).concat(t.indentLevel+1);else if(/^[})\]]/.test(n.value)){var r=t.levels=(t.levels||[]).slice(0,-1);r.length>0&&r[r.length-1]<t.indentLevel&&(t.indentLevel=r[r.length-1])}for(;t.rule;){var i="function"==typeof t.rule?0===t.step?t.rule(n,e):null:t.rule[t.step];if(i){if(i.ofRule&&(i=i.ofRule),"string"==typeof i){u(t,i);continue}if(i.match&&i.match(n))return i.update&&i.update(t,n),"Punctuation"===n.kind?f(t):t.needsAdvance=!0,i.style}p(t)}return l(t),"invalidchar"}function o(e,t){var n=e.levels,r=n&&0!==n.length?n[n.length-1]-(this.electricInput.test(t)?1:0):e.indentLevel;return r*this.config.indentUnit}function a(e,t){for(var n=Object.keys(t),r=0;r<n.length;r++)e[n[r]]=t[n[r]];return e}function s(e){a(k,e)}function l(e){a(e,k)}function u(e,t){e.prevState=a({},e),e.kind=t,e.name=null,e.type=null,e.rule=S[t],e.step=0}function c(e){e.kind=e.prevState.kind,e.name=e.prevState.name,e.type=e.prevState.type,e.rule=e.prevState.rule,e.step=e.prevState.step,e.prevState=e.prevState.prevState}function f(e){for(e.step++;e.rule&&!(Array.isArray(e.rule)&&e.step<e.rule.length);)c(e),!e.rule||Array.isArray(e.rule)&&e.rule[e.step].isList||e.step++}function p(e){for(;e.rule&&(!Array.isArray(e.rule)||!e.rule[e.step].ofRule);)c(e);e.rule&&f(e)}function d(e){for(var t=Object.keys(L),n=0;n<t.length;n++){var r=e.match(L[t[n]]);if(r)return{kind:t[n],value:r[0]}}}function h(e){return{ofRule:e}}function m(e){return{ofRule:e,isList:!0}}function v(e,t){return{style:t,match:function(t){return t.kind===e}}}function g(e,t){return{style:t||"punctuation",match:function(t){return"Punctuation"===t.kind&&t.value===e}}}function y(e){return{style:"keyword",match:function(t){return"Name"===t.kind&&t.value===e}}}function b(e){return{style:e,match:function(e){return"Name"===e.kind},update:function(e,t){e.name=t.value}}}function w(e){return{style:e,match:function(e){return"Name"===e.kind},update:function(e,t){e.prevState.type=t.value}}}var x=n(345),T=r(x);T["default"].defineMode("graphql",function(e){return{config:e,token:i,indent:o,startState:function(){var e={level:0};return u(e,"Document"),e},electricInput:/^\s*[})\]]/,fold:"brace",lineComment:"#",closeBrackets:{pairs:'()[]{}""',explode:"()[]{}"}}});var k={},L={Name:/^[_A-Za-z][_0-9A-Za-z]*/,Punctuation:/^(?:!|\$|\(|\)|\.\.\.|:|=|@|\[|\]|\{|\})/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^"(?:[^"\\]|\\(?:b|f|n|r|t|u[0-9a-fA-F]{4}))*"?/},S={Document:[m("Definition")],Definition:function(e){switch(e.value){case"query":return"Query";case"mutation":return"Mutation";case"subscription":return"Subscription";case"fragment":return"FragmentDefinition";case"{":return"ShortQuery"}},Query:[y("query"),h(b("def")),h("VariableDefinitions"),m("Directive"),"SelectionSet"],ShortQuery:["SelectionSet"],Mutation:[y("mutation"),h(b("def")),h("VariableDefinitions"),m("Directive"),"SelectionSet"],Subscription:[y("subscription"),h(b("def")),h("VariableDefinitions"),m("Directive"),"SelectionSet"],
VariableDefinitions:[g("("),m("VariableDefinition"),g(")")],VariableDefinition:["Variable",g(":"),"Type",h("DefaultValue")],Variable:[g("$","variable"),b("variable")],DefaultValue:[g("="),"Value"],SelectionSet:[g("{"),m("Selection"),g("}")],Selection:function(e,t){return"..."===e.value?t.match(/[\s\u00a0,]*on\b/,!1)?"InlineFragment":"FragmentSpread":t.match(/[\s\u00a0,]*:/,!1)?"AliasedField":"Field"},AliasedField:[b("qualifier"),g(":"),"Field"],Field:[b("property"),h("Arguments"),m("Directive"),h("SelectionSet")],Arguments:[g("("),m("Argument"),g(")")],Argument:[b("attribute"),g(":"),"Value"],FragmentSpread:[g("..."),b("def"),m("Directive")],InlineFragment:[g("..."),h("TypeCondition"),m("Directive"),"SelectionSet"],FragmentDefinition:[y("fragment"),b("def"),"TypeCondition",m("Directive"),"SelectionSet"],TypeCondition:[y("on"),w("atom")],Value:function(e){switch(e.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(e.value){case"[":return"ListValue";case"{":return"ObjectValue";case"$":return"Variable"}return null;case"Name":switch(e.value){case"true":case"false":return"BooleanValue"}return"EnumValue"}},NumberValue:[v("Number","number")],StringValue:[v("String","string")],BooleanValue:[v("Name","builtin")],EnumValue:[b("string-2")],ListValue:[g("["),m("Value"),g("]")],ObjectValue:[g("{"),m("ObjectField"),g("}")],ObjectField:[b("attribute"),g(":"),"Value"],Type:function(e){return"["===e.value?"ListType":"NamedType"},ListType:[g("["),"NamedType",g("]"),h(g("!"))],NamedType:[b("atom"),h(g("!"))],Directive:[g("@","meta"),b("meta"),h("Arguments")]}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(2),l=r(s),u=n(155),c=r(u),f=n(345),p=r(f);n(528),n(526),n(529),n(530),n(537),n(538);var d=function(e){function t(n){var r=this;i(this,t),e.call(this),this._onEdit=function(){r.ignoreChangeEvent||(r.cachedValue=r.editor.getValue(),r.props.onEdit&&r.props.onEdit(r.cachedValue))},this.cachedValue=n.value||""}return o(t,e),a(t,null,[{key:"propTypes",value:{value:s.PropTypes.string,onEdit:s.PropTypes.func},enumerable:!0}]),t.prototype.componentDidMount=function(){this.editor=p["default"](c["default"].findDOMNode(this),{value:this.props.value||"",lineNumbers:!0,theme:"graphiql",mode:{name:"javascript",json:!0},lint:!0,autoCloseBrackets:!0,matchBrackets:!0,showCursorWhenSelecting:!0,keyMap:"sublime",foldGutter:{minFoldSize:4},gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],extraKeys:{"Ctrl-Left":"goSubwordLeft","Ctrl-Right":"goSubwordRight","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight"}}),this.editor.on("change",this._onEdit)},t.prototype.componentWillUnmount=function(){this.editor.off("change",this._onEdit),this.editor=null},t.prototype.componentDidUpdate=function(e){this.ignoreChangeEvent=!0,this.props.value!==e.value&&this.props.value!==this.cachedValue&&(this.cachedValue=this.props.value,this.editor.setValue(this.props.value)),this.ignoreChangeEvent=!1},t.prototype.render=function(){return l["default"].createElement("div",{className:"codemirrorWrap",ref:"codemirror"})},t}(l["default"].Component);t.VariableEditor=d},function(e,t,n){!function(e){e(n(345))}(function(e){"use strict";e.defineMode("javascript",function(t,n){function r(e){for(var t,n=!1,r=!1;null!=(t=e.next());){if(!n){if("/"==t&&!r)return;"["==t?r=!0:r&&"]"==t&&(r=!1)}n=!n&&"\\"==t}}function i(e,t,n){return be=e,we=n,t}function o(e,t){var n=e.next();if('"'==n||"'"==n)return t.tokenize=a(n),t.tokenize(e,t);if("."==n&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return i("number","number");if("."==n&&e.match(".."))return i("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return i(n);if("="==n&&e.eat(">"))return i("=>","operator");if("0"==n&&e.eat(/x/i))return e.eatWhile(/[\da-f]/i),i("number","number");if("0"==n&&e.eat(/o/i))return e.eatWhile(/[0-7]/i),i("number","number");if("0"==n&&e.eat(/b/i))return e.eatWhile(/[01]/i),i("number","number");if(/\d/.test(n))return e.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),i("number","number");if("/"==n)return e.eat("*")?(t.tokenize=s,s(e,t)):e.eat("/")?(e.skipToEnd(),i("comment","comment")):/^(?:operator|sof|keyword c|case|new|[\[{}\(,;:])$/.test(t.lastType)?(r(e),e.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/),i("regexp","string-2")):(e.eatWhile(_e),i("operator","operator",e.current()));if("`"==n)return t.tokenize=l,l(e,t);if("#"==n)return e.skipToEnd(),i("error","error");if(_e.test(n))return e.eatWhile(_e),i("operator","operator",e.current());if(Ce.test(n)){e.eatWhile(Ce);var o=e.current(),u=Ee.propertyIsEnumerable(o)&&Ee[o];return u&&"."!=t.lastType?i(u.type,u.style,o):i("variable","variable",o)}}function a(e){return function(t,n){var r,a=!1;if(ke&&"@"==t.peek()&&t.match(Ne))return n.tokenize=o,i("jsonld-keyword","meta");for(;null!=(r=t.next())&&(r!=e||a);)a=!a&&"\\"==r;return a||(n.tokenize=o),i("string","string")}}function s(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=o;break}r="*"==n}return i("comment","comment")}function l(e,t){for(var n,r=!1;null!=(n=e.next());){if(!r&&("`"==n||"$"==n&&e.eat("{"))){t.tokenize=o;break}r=!r&&"\\"==n}return i("quasi","string-2",e.current())}function u(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var n=e.string.indexOf("=>",e.start);if(!(0>n)){for(var r=0,i=!1,o=n-1;o>=0;--o){var a=e.string.charAt(o),s=Ae.indexOf(a);if(s>=0&&3>s){if(!r){++o;break}if(0==--r)break}else if(s>=3&&6>s)++r;else if(Ce.test(a))i=!0;else{if(/["'\/]/.test(a))return;if(i&&!r){++o;break}}}i&&!r&&(t.fatArrowAt=o)}}function c(e,t,n,r,i,o){this.indented=e,this.column=t,this.type=n,this.prev=i,this.info=o,null!=r&&(this.align=r)}function f(e,t){for(var n=e.localVars;n;n=n.next)if(n.name==t)return!0;for(var r=e.context;r;r=r.prev)for(var n=r.vars;n;n=n.next)if(n.name==t)return!0}function p(e,t,n,r,i){var o=e.cc;for(Me.state=e,Me.stream=i,Me.marked=null,Me.cc=o,Me.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;){var a=o.length?o.pop():Le?T:x;if(a(n,r)){for(;o.length&&o[o.length-1].lex;)o.pop()();return Me.marked?Me.marked:"variable"==n&&f(e,r)?"variable-2":t}}}function d(){for(var e=arguments.length-1;e>=0;e--)Me.cc.push(arguments[e])}function h(){return d.apply(null,arguments),!0}function m(e){function t(t){for(var n=t;n;n=n.next)if(n.name==e)return!0;return!1}var r=Me.state;if(Me.marked="def",r.context){if(t(r.localVars))return;r.localVars={name:e,next:r.localVars}}else{if(t(r.globalVars))return;n.globalVars&&(r.globalVars={name:e,next:r.globalVars})}}function v(){Me.state.context={prev:Me.state.context,vars:Me.state.localVars},Me.state.localVars=Ie}function g(){Me.state.localVars=Me.state.context.vars,Me.state.context=Me.state.context.prev}function y(e,t){var n=function(){var n=Me.state,r=n.indented;if("stat"==n.lexical.type)r=n.lexical.indented;else for(var i=n.lexical;i&&")"==i.type&&i.align;i=i.prev)r=i.indented;n.lexical=new c(r,Me.stream.column(),e,null,n.lexical,t)};return n.lex=!0,n}function b(){var e=Me.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function w(e){function t(n){return n==e?h():";"==e?d():h(t)}return t}function x(e,t){return"var"==e?h(y("vardef",t.length),z,w(";"),b):"keyword a"==e?h(y("form"),T,x,b):"keyword b"==e?h(y("form"),x,b):"{"==e?h(y("}"),U,b):";"==e?h():"if"==e?("else"==Me.state.lexical.info&&Me.state.cc[Me.state.cc.length-1]==b&&Me.state.cc.pop()(),h(y("form"),T,x,b,X)):"function"==e?h(ie):"for"==e?h(y("form"),Z,x,b):"variable"==e?h(y("stat"),P):"switch"==e?h(y("form"),T,y("}","switch"),w("{"),U,b,b):"case"==e?h(T,w(":")):"default"==e?h(w(":")):"catch"==e?h(y("form"),v,w("("),oe,w(")"),x,b,g):"class"==e?h(y("form"),ae,b):"export"==e?h(y("stat"),ce,b):"import"==e?h(y("stat"),fe,b):d(y("stat"),T,w(";"),b)}function T(e){return L(e,!1)}function k(e){return L(e,!0)}function L(e,t){if(Me.state.fatArrowAt==Me.stream.start){var n=t?M:O;if("("==e)return h(v,y(")"),V(K,")"),b,w("=>"),n,g);if("variable"==e)return d(v,K,w("=>"),n,g)}var r=t?_:E;return Oe.hasOwnProperty(e)?h(r):"function"==e?h(ie,r):"keyword c"==e?h(t?C:S):"("==e?h(y(")"),S,ge,w(")"),b,r):"operator"==e||"spread"==e?h(t?k:T):"["==e?h(y("]"),me,b,r):"{"==e?B(j,"}",null,r):"quasi"==e?d(N,r):"new"==e?h(I(t)):h()}function S(e){return e.match(/[;\}\)\],]/)?d():d(T)}function C(e){return e.match(/[;\}\)\],]/)?d():d(k)}function E(e,t){return","==e?h(T):_(e,t,!1)}function _(e,t,n){var r=0==n?E:_,i=0==n?T:k;return"=>"==e?h(v,n?M:O,g):"operator"==e?/\+\+|--/.test(t)?h(r):"?"==t?h(T,w(":"),i):h(i):"quasi"==e?d(N,r):";"!=e?"("==e?B(k,")","call",r):"."==e?h(G,r):"["==e?h(y("]"),S,w("]"),b,r):void 0:void 0}function N(e,t){return"quasi"!=e?d():"${"!=t.slice(t.length-2)?h(N):h(T,A)}function A(e){return"}"==e?(Me.marked="string-2",Me.state.tokenize=l,h(N)):void 0}function O(e){return u(Me.stream,Me.state),d("{"==e?x:T)}function M(e){return u(Me.stream,Me.state),d("{"==e?x:k)}function I(e){return function(t){return"."==t?h(e?F:D):d(e?k:T)}}function D(e,t){return"target"==t?(Me.marked="keyword",h(E)):void 0}function F(e,t){return"target"==t?(Me.marked="keyword",h(_)):void 0}function P(e){return":"==e?h(b,x):d(E,w(";"),b)}function G(e){return"variable"==e?(Me.marked="property",h()):void 0}function j(e,t){return"variable"==e||"keyword"==Me.style?(Me.marked="property",h("get"==t||"set"==t?Q:R)):"number"==e||"string"==e?(Me.marked=ke?"property":Me.style+" property",h(R)):"jsonld-keyword"==e?h(R):"["==e?h(T,w("]"),R):"spread"==e?h(T):void 0}function Q(e){return"variable"!=e?d(R):(Me.marked="property",h(ie))}function R(e){return":"==e?h(k):"("==e?d(ie):void 0}function V(e,t){function n(r){if(","==r){var i=Me.state.lexical;return"call"==i.info&&(i.pos=(i.pos||0)+1),h(e,n)}return r==t?h():h(w(t))}return function(r){return r==t?h():d(e,n)}}function B(e,t,n){for(var r=3;r<arguments.length;r++)Me.cc.push(arguments[r]);return h(y(t,n),V(e,t),b)}function U(e){return"}"==e?h():d(x,U)}function W(e){return Se&&":"==e?h(q):void 0}function H(e,t){return"="==t?h(k):void 0}function q(e){return"variable"==e?(Me.marked="variable-3",h()):void 0}function z(){return d(K,W,J,$)}function K(e,t){return"variable"==e?(m(t),h()):"spread"==e?h(K):"["==e?B(K,"]"):"{"==e?B(Y,"}"):void 0}function Y(e,t){return"variable"!=e||Me.stream.match(/^\s*:/,!1)?("variable"==e&&(Me.marked="property"),"spread"==e?h(K):h(w(":"),K,J)):(m(t),h(J))}function J(e,t){return"="==t?h(k):void 0}function $(e){return","==e?h(z):void 0}function X(e,t){return"keyword b"==e&&"else"==t?h(y("form","else"),x,b):void 0}function Z(e){return"("==e?h(y(")"),ee,w(")"),b):void 0}function ee(e){return"var"==e?h(z,w(";"),ne):";"==e?h(ne):"variable"==e?h(te):d(T,w(";"),ne)}function te(e,t){return"in"==t||"of"==t?(Me.marked="keyword",h(T)):h(E,ne)}function ne(e,t){return";"==e?h(re):"in"==t||"of"==t?(Me.marked="keyword",h(T)):d(T,w(";"),re)}function re(e){")"!=e&&h(T)}function ie(e,t){return"*"==t?(Me.marked="keyword",h(ie)):"variable"==e?(m(t),h(ie)):"("==e?h(v,y(")"),V(oe,")"),b,x,g):void 0}function oe(e){return"spread"==e?h(oe):d(K,W,H)}function ae(e,t){return"variable"==e?(m(t),h(se)):void 0}function se(e,t){return"extends"==t?h(T,se):"{"==e?h(y("}"),le,b):void 0}function le(e,t){return"variable"==e||"keyword"==Me.style?"static"==t?(Me.marked="keyword",h(le)):(Me.marked="property","get"==t||"set"==t?h(ue,ie,le):h(ie,le)):"*"==t?(Me.marked="keyword",h(le)):";"==e?h(le):"}"==e?h():void 0}function ue(e){return"variable"!=e?d():(Me.marked="property",h())}function ce(e,t){return"*"==t?(Me.marked="keyword",h(he,w(";"))):"default"==t?(Me.marked="keyword",h(T,w(";"))):d(x)}function fe(e){return"string"==e?h():d(pe,he)}function pe(e,t){return"{"==e?B(pe,"}"):("variable"==e&&m(t),"*"==t&&(Me.marked="keyword"),h(de))}function de(e,t){return"as"==t?(Me.marked="keyword",h(pe)):void 0}function he(e,t){return"from"==t?(Me.marked="keyword",h(T)):void 0}function me(e){return"]"==e?h():d(k,ve)}function ve(e){return"for"==e?d(ge,w("]")):","==e?h(V(C,"]")):d(V(k,"]"))}function ge(e){return"for"==e?h(Z,ge):"if"==e?h(T,ge):void 0}function ye(e,t){return"operator"==e.lastType||","==e.lastType||_e.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}var be,we,xe=t.indentUnit,Te=n.statementIndent,ke=n.jsonld,Le=n.json||ke,Se=n.typescript,Ce=n.wordCharacters||/[\w$\xa1-\uffff]/,Ee=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),n=e("keyword b"),r=e("keyword c"),i=e("operator"),o={type:"atom",style:"atom"},a={"if":e("if"),"while":t,"with":t,"else":n,"do":n,"try":n,"finally":n,"return":r,"break":r,"continue":r,"new":e("new"),"delete":r,"throw":r,"debugger":r,"var":e("var"),"const":e("var"),let:e("var"),"function":e("function"),"catch":e("catch"),"for":e("for"),"switch":e("switch"),"case":e("case"),"default":e("default"),"in":i,"typeof":i,"instanceof":i,"true":o,"false":o,"null":o,undefined:o,NaN:o,Infinity:o,"this":e("this"),"class":e("class"),"super":e("atom"),"yield":r,"export":e("export"),"import":e("import"),"extends":r};if(Se){var s={type:"variable",style:"variable-3"},l={"interface":e("interface"),"extends":e("extends"),constructor:e("constructor"),"public":e("public"),"private":e("private"),"protected":e("protected"),"static":e("static"),string:s,number:s,"boolean":s,any:s};for(var u in l)a[u]=l[u]}return a}(),_e=/[+\-*&%=<>!?|~^]/,Ne=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,Ae="([{}])",Oe={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,"this":!0,"jsonld-keyword":!0},Me={state:null,column:null,marked:null,cc:null},Ie={name:"this",next:{name:"arguments"}};return b.lex=!0,{startState:function(e){var t={tokenize:o,lastType:"sof",cc:[],lexical:new c((e||0)-xe,0,"block",!1),localVars:n.localVars,context:n.localVars&&{vars:n.localVars},indented:0};return n.globalVars&&"object"==typeof n.globalVars&&(t.globalVars=n.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),u(e,t)),t.tokenize!=s&&e.eatSpace())return null;var n=t.tokenize(e,t);return"comment"==be?n:(t.lastType="operator"!=be||"++"!=we&&"--"!=we?be:"incdec",p(t,n,be,we,e))},indent:function(t,r){if(t.tokenize==s)return e.Pass;if(t.tokenize!=o)return 0;var i=r&&r.charAt(0),a=t.lexical;if(!/^\s*else\b/.test(r))for(var l=t.cc.length-1;l>=0;--l){var u=t.cc[l];if(u==b)a=a.prev;else if(u!=X)break}"stat"==a.type&&"}"==i&&(a=a.prev),Te&&")"==a.type&&"stat"==a.prev.type&&(a=a.prev);var c=a.type,f=i==c;return"vardef"==c?a.indented+("operator"==t.lastType||","==t.lastType?a.info+1:0):"form"==c&&"{"==i?a.indented:"form"==c?a.indented+xe:"stat"==c?a.indented+(ye(t,r)?Te||xe:0):"switch"!=a.info||f||0==n.doubleIndentSwitch?a.align?a.column+(f?0:1):a.indented+(f?0:xe):a.indented+(/^(?:case|default)\b/.test(r)?xe:2*xe)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:Le?null:"/*",blockCommentEnd:Le?null:"*/",lineComment:Le?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:Le?"json":"javascript",jsonldMode:ke,jsonMode:Le}}),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){for(var n,r=0,i=t,o=/\r\n|[\n\r]/g;(n=o.exec(e))&&n.index<t;)r+=1,i=t-(n.index+n[0].length);return a["default"].Pos(r,i)}var o=n(345),a=r(o),s=n(539);a["default"].registerHelper("lint","json",function(e){var t=s.jsonLint(e);return t?[{message:t.message,severity:"error",from:i(e,t.start),to:i(e,t.end)}]:[]})},function(e,t){"use strict";function n(e,t){m=e,v=e.length,y=-1;try{u(),c(),t?o():r(),s("EOF")}catch(n){return n}}function r(){if(s("{"),!l("}")){do s("String"),s(":"),o();while(l(","));s("}")}}function i(){if(s("["),!l("]")){do o();while(l(","));s("]")}}function o(){switch(w){case"[":return i();case"{":return r();case"String":return c();default:return s("Value")}}function a(e){return{message:e,start:g,end:y}}function s(e){if(w===e)return c();throw a("Expected "+e+" but got "+m.slice(g,y)+".")}function l(e){return w===e?(c(),!0):void 0}function u(){v>y&&(y++,b=y===v?0:m.charCodeAt(y))}function c(){for(;9===b||10===b||13===b||32===b;)u();if(0===b)return void(w="EOF");switch(g=y,b){case 34:return w="String",f();case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return w="Value",d();case 102:if("false"!==m.slice(g,g+5))break;return y+=4,u(),void(w="Value");case 110:if("null"!==m.slice(g,g+4))break;return y+=3,u(),void(w="Value");case 116:if("true"!==m.slice(g,g+4))break;return y+=3,u(),void(w="Value")}w=m[g],u()}function f(){for(u();34!==b;)if(u(),92===b)switch(u(),b){case 34:case 47:case 92:case 98:case 102:case 110:case 114:case 116:u();break;case 117:u(),p(),p(),p(),p();break;default:throw a("Bad character escape sequence.")}else if(y===v)throw a("Unterminated string.");if(34===b)return void u();throw a("Unterminated string.")}function p(){if(b>=48&&57>=b||b>=65&&70>=b||b>=97&&102>=b)return u();throw a("Expected hexadecimal digit.")}function d(){45===b&&u(),48===b?u():h(),46===b&&(u(),h()),(69===b||101===b)&&(u(),(43===b||45===b)&&u(),h())}function h(){if(48>b||b>57)throw a("Expected decimal digit.");do u();while(b>=48&&57>=b)}t.__esModule=!0,t.jsonLint=n;var m,v,g,y,b,w},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(2),l=r(s),u=n(155),c=r(u),f=n(345),p=r(f);n(526),n(528),n(530),n(537);var d=function(e){function t(){i(this,t),e.apply(this,arguments)}return o(t,e),t.prototype.componentDidMount=function(){this.viewer=p["default"](c["default"].findDOMNode(this),{value:this.props.value||"",readOnly:!0,theme:"graphiql",mode:{name:"javascript",json:!0},keyMap:"sublime",foldGutter:{minFoldSize:4},gutters:["CodeMirror-foldgutter"],extraKeys:{"Ctrl-Left":"goSubwordLeft","Ctrl-Right":"goSubwordRight","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight"}})},t.prototype.componentWillUnmount=function(){this.viewer=null},t.prototype.shouldComponentUpdate=function(e){return this.props.value!==e.value},t.prototype.componentDidUpdate=function(){this.viewer.setValue(this.props.value||"")},t.prototype.render=function(){return l["default"].createElement("div",{className:"result-window"})},a(t,null,[{key:"propTypes",value:{value:s.PropTypes.string},enumerable:!0}]),t}(l["default"].Component);t.ResultViewer=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e,t){return e instanceof p.GraphQLNonNull?u["default"].createElement("span",null,a(e.ofType,t),"!"):e instanceof p.GraphQLList?u["default"].createElement("span",null,"[",a(e.ofType,t),"]"):u["default"].createElement("a",{className:"type-name",onClick:function(n){return t(e,n)}},e.name)}t.__esModule=!0;var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(2),u=r(l),c=n(521),f=r(c),p=n(509),d=function(e){function t(){var n=this;i(this,t),e.call(this),this._onToggleBtnClick=function(){n.setState({expanded:!n.state.expanded})},this._onNavBackClick=function(){n.setState({navStack:n.state.navStack.slice(0,-1)})},this._onClickTypeOrField=function(e){n.showDoc(e)},this.state={navStack:[]}}return o(t,e),t.prototype.showDoc=function(e){var t=this.state.navStack,n=t.length>0&&t[t.length-1]===e;n||(t=t.concat([e])),this.setState({navStack:t})},s(t,null,[{key:"propTypes",value:{schema:l.PropTypes.instanceOf(p.GraphQLSchema)},enumerable:!0}]),t.prototype.shouldComponentUpdate=function(e,t){return this.props.schema!==e.schema||this.state.navStack!==t.navStack},t.prototype.render=function(){var e,t=this.props.schema,n=this.state.navStack;n.length>0&&(e=n[n.length-1]);var r,i;e?(r=e.name,i=p.isType(e)?u["default"].createElement(m,{key:e.name,type:e,onClickType:this._onClickTypeOrField,onClickField:this._onClickTypeOrField}):u["default"].createElement(v,{key:e.name,field:e,onClickType:this._onClickTypeOrField})):t&&(r="Documentation Explorer",i=u["default"].createElement(h,{schema:t,onClickType:this._onClickTypeOrField}));var o;1===n.length?o="Schema":n.length>1&&(o=n[n.length-2].name);var a=u["default"].createElement("div",{className:"spinner-container"},u["default"].createElement("div",{className:"spinner"}));return u["default"].createElement("div",{className:"doc-explorer"},u["default"].createElement("div",{className:"doc-explorer-title-bar"},o&&u["default"].createElement("div",{className:"doc-explorer-back",onClick:this._onNavBackClick},o),u["default"].createElement("div",{className:"doc-explorer-title"},r),u["default"].createElement("div",{className:"doc-explorer-rhs"},this.props.children)),u["default"].createElement("div",{className:"doc-explorer-contents"},this.props.schema?i:a))},t}(u["default"].Component);t.DocExplorer=d;var h=function(e){function t(){i(this,t),e.apply(this,arguments)}return o(t,e),t.prototype.shouldComponentUpdate=function(e){return this.props.schema!==e.schema},t.prototype.render=function(){var e=this.props.schema,t=e.getQueryType(),n=e.getMutationType&&e.getMutationType(),r=e.getSubscriptionType&&e.getSubscriptionType();return u["default"].createElement("div",null,u["default"].createElement(y,{className:"doc-type-description",markdown:"A GraphQL schema provides a root type for each kind of operation."}),u["default"].createElement("div",{className:"doc-category"},u["default"].createElement("div",{className:"doc-category-title"},"root types"),u["default"].createElement("div",{className:"doc-category-item"},u["default"].createElement("span",{className:"keyword"},"query"),": ",u["default"].createElement(g,{type:t,onClick:this.props.onClickType})),n&&u["default"].createElement("div",{className:"doc-category-item"},u["default"].createElement("span",{className:"keyword"},"mutation"),": ",u["default"].createElement(g,{type:n,onClick:this.props.onClickType})),r&&u["default"].createElement("div",{className:"doc-category-item"},u["default"].createElement("span",{className:"keyword"},"subscription"),": ",u["default"].createElement(g,{type:r,onClick:this.props.onClickType}))))},t}(u["default"].Component),m=function(e){function t(){i(this,t),e.apply(this,arguments)}return o(t,e),t.prototype.shouldComponentUpdate=function(e){return this.props.type!==e.type},t.prototype.render=function(){var e,t,n=this.props.type,r=this.props.onClickType||function(){},i=this.props.onClickField||function(){};n instanceof p.GraphQLUnionType?(e="possible types",t=n.getPossibleTypes()):n instanceof p.GraphQLInterfaceType?(e="implementations",t=n.getPossibleTypes()):n instanceof p.GraphQLObjectType&&(e="implements",t=n.getInterfaces());var o;t&&t.length>0&&(o=u["default"].createElement("div",{className:"doc-category"},u["default"].createElement("div",{className:"doc-category-title"},e),t.map(function(e){return u["default"].createElement("div",{key:e.name,className:"doc-category-item"},u["default"].createElement(g,{type:e,onClick:r}))})));var a;if(n.getFields){var s=n.getFields(),l=Object.keys(s).map(function(e){return s[e]});a=u["default"].createElement("div",{className:"doc-category"},u["default"].createElement("div",{className:"doc-category-title"},"fields"),l.map(function(e){var t;return e.args&&e.args.length>0&&(t=e.args.map(function(e){return u["default"].createElement("span",{className:"arg",key:e.name},u["default"].createElement("span",{className:"arg-name"},e.name),": ",u["default"].createElement(g,{type:e.type,onClick:r}))})),u["default"].createElement("div",{key:e.name,className:"doc-category-item"},u["default"].createElement("a",{className:"field-name",onClick:function(t){return i(e,n,t)}},e.name),t&&["(",u["default"].createElement("span",null,t),")"],": ",u["default"].createElement(g,{type:e.type,onClick:r}))}))}var c;return n instanceof p.GraphQLEnumType&&(c=u["default"].createElement("div",{className:"doc-category"},u["default"].createElement("div",{className:"doc-category-title"},"values"),n.getValues().map(function(e){return u["default"].createElement("div",{key:e.name,className:"doc-category-item"},u["default"].createElement("div",{className:"enum-value"},e.name),u["default"].createElement(y,{className:"doc-value-description",markdown:n.description}))}))),u["default"].createElement("div",null,u["default"].createElement(y,{className:"doc-type-description",markdown:n.description||"No Description"}),n instanceof p.GraphQLObjectType&&o,a,c,!(n instanceof p.GraphQLObjectType)&&o)},t}(u["default"].Component),v=function(e){function t(){i(this,t),e.apply(this,arguments)}return o(t,e),t.prototype.shouldComponentUpdate=function(e){return this.props.field!==e.field},t.prototype.render=function(){var e,t=this,n=this.props.field;return n.args&&n.args.length>0&&(e=u["default"].createElement("div",{className:"doc-category"},u["default"].createElement("div",{className:"doc-category-title"},"arguments"),n.args.map(function(e){return u["default"].createElement("div",{key:e.name,className:"doc-category-item"},u["default"].createElement("div",null,u["default"].createElement("span",{className:"arg-name"},e.name),": ",u["default"].createElement(g,{type:e.type,onClick:t.props.onClickType})),u["default"].createElement(y,{className:"doc-value-description",markdown:e.description}))}))),u["default"].createElement("div",null,u["default"].createElement(y,{className:"doc-type-description",markdown:n.description||"No Description"}),u["default"].createElement("div",{className:"doc-category"},u["default"].createElement("div",{className:"doc-category-title"},"type"),u["default"].createElement(g,{type:n.type,onClick:this.props.onClickType})),e)},t}(u["default"].Component),g=function(e){function t(){i(this,t),e.apply(this,arguments)}return o(t,e),t.prototype.shouldComponentUpdate=function(e){return this.props.type!==e.type},t.prototype.render=function(){return a(this.props.type,this.props.onClick)},t}(u["default"].Component),y=function(e){function t(){i(this,t),e.apply(this,arguments)}return o(t,e),t.prototype.shouldComponentUpdate=function(e){return this.props.markdown!==e.markdown},t.prototype.render=function(){var e=this.props.markdown;if(!e)return u["default"].createElement("div",null);var t=f["default"](e);return u["default"].createElement("div",{className:this.props.className,dangerouslySetInnerHTML:{__html:t}})},t}(u["default"].Component)},function(e,t,n){"use strict";function r(e,t,n){var r=[];if(!e)return{insertions:r,result:t};var c=void 0;try{c=u.parse(t)}catch(f){return{insertions:r,result:t}}var p=n||i,d=new l.TypeInfo(e);return u.visit(c,{leave:function(e){d.leave(e)},enter:function(e){if(d.enter(e),"Field"===e.kind&&!e.selectionSet){var n=d.getType(),i=o(n,p);if(i){var a=s(t,e.loc.start);r.push({index:e.loc.end,string:" "+u.print(i).replace(/\n/g,"\n"+a)})}}}}),{insertions:r,result:a(t,r)}}function i(e){if(!e.getFields)return[];var t=e.getFields();if(t.id)return["id"];if(t.edges)return["edges"];if(t.node)return["node"];var n=[];return Object.keys(t).forEach(function(e){c.isLeafType(t[e].type)&&n.push(e)}),n}function o(e,t){var n=c.getNamedType(e);if(e&&!c.isLeafType(e)){var r=t(n);if(Array.isArray(r)&&0!==r.length)return{kind:"SelectionSet",selections:r.map(function(e){var r=n.getFields()[e],i=r?r.type:null;return{kind:"Field",name:{kind:"Name",value:e},selectionSet:o(i,t)}})}}}function a(e,t){if(0===t.length)return e;var n="",r=0;return t.forEach(function(t){var i=t.index,o=t.string;n+=e.slice(r,i)+o,r=i}),n+=e.slice(r)}function s(e,t){for(var n=t,r=t;n;){var i=e.charCodeAt(n-1);if(10===i||13===i||8232===i||8233===i)break;n--,9!==i&&11!==i&&12!==i&&32!==i&&160!==i&&(r=n)}return e.substring(n,r)}t.__esModule=!0,t.fillLeafs=r;var l=n(510),u=n(419),c=n(509)},function(e,t){"use strict";function n(e){for(var t=0,n=e;n.offsetParent;)t+=n.offsetLeft,n=n.offsetParent;return t}function r(e){for(var t=0,n=e;n.offsetParent;)t+=n.offsetTop,n=n.offsetParent;return t}t.__esModule=!0,t.getLeft=n,t.getTop=r},function(e,t,n){"use strict";t.__esModule=!0;var r=n(510);t.introspectionQuery=r.introspectionQuery;var i="\n query IntrospectionQuery {\n __schema {\n queryType { name }\n mutationType { name }\n types {\n ...FullType\n }\n directives {\n name\n description\n args {\n ...InputValue\n }\n onOperation\n onFragment\n onField\n }\n }\n }\n\n fragment FullType on __Type {\n kind\n name\n description\n fields(includeDeprecated: true) {\n name\n 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 description\n isDeprecated\n deprecationReason\n }\n possibleTypes {\n ...TypeRef\n }\n }\n\n fragment InputValue on __InputValue {\n name\n 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 }\n }\n }\n }\n";t.introspectionQuerySansSubscriptions=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(346);t["default"]=new r.GraphQLSchema({query:new r.GraphQLObjectType({name:"Query",fields:function(){return{__emptyField:{type:r.GraphQLString}}}})}),e.exports=t["default"]},function(e,t,n){(function(t){"use strict";!function(){function r(e){e=e||{},this.rootURL=e.rootURL,this.totalMemory=e.totalMemory||134217728,this.autoLoadModules=e.autoLoadModules||!0,
this._pendingModules={},this._loadedModules={},this._allModules={},this.stdin=e.stdin||d.stdin,this.stdout=e.stdout||d.stdout,this.stderr=e.stderr||d.stderr,this.rootURL||r.rootURL||(r.rootURL=a),this.rootURL&&"/"!==this.rootURL.charAt(this.rootURL.length-1)&&(this.rootURL+="/"),r._vmBuilderPromise||(r._vmBuilderPromise=this.fetch("pypyjs.vm.js").then(function(e){var t=[e.responseText,"\n",'if (!Module._jitInvoke && typeof _jitInvoke !== "undefined") {'," Module._jitInvoke = _jitInvoke;","}","Module._emjs_make_handle = _emjs_make_handle;","Module._emjs_free = _emjs_free;","dependenciesFulfilled=function() { inDependenciesFulfilled(FS); };","if(!memoryInitializer||(!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER))dependenciesFulfilled();"].join("");return f("Module","inDependenciesFulfilled","require","module","__filename","__dirname",t)}.bind(this))),this._ready=new c(function(e,t){var n={};this._module=n,n.TOTAL_MEMORY=this.totalMemory,n.noFSInit=!0,n.thisProgram="/lib/pypyjs/pypyjs.js",n.filePackagePrefixURL=this.rootURL||r.rootURL,n.memoryInitializerPrefixURL=this.rootURL||r.rootURL,n.locateFile=function(e){return(this.rootURL||r.rootURL)+e},n.noInitialRun=!0,n.noExitRuntime=!0;var i,o,s,l=function(){return this.stdin()}.bind(this),u=[],f=function(e){var t=String.fromCharCode(e);u.push(t),("\n"===t||u.length>=128)&&(this.stdout(u.join("")),u=[])}.bind(this),p=function(e){var t=String.fromCharCode(e);this.stderr(t)}.bind(this),d=new c(function(e,t){i=e,o=t}),h=function(e){s=e;try{s.init(l,f,p),n.FS_createPath("/","lib/pypyjs/lib_pypy",!0,!1),n.FS_createPath("/","lib/pypyjs/lib-python/2.7",!0,!1),i()}catch(t){o(t)}},m=this.fetch("modules/index.json");r._vmBuilderPromise.then(function(e){var t=[n,h,"undefined","undefined","undefined",typeof a];return e.apply(null,t),d}.bind(this)).then(function(){return m.then(function(e){var t=JSON.parse(e.responseText);if(this._allModules=t.modules,t.preload)for(var i in t.preload)this._writeModuleFile(i,t.preload[i]);n.run(),n._rpython_startup_code();var o=n.intArrayFromString("/lib/pypyjs/pypyjs.js");o=n.allocate(o,"i8",n.ALLOC_NORMAL),n._pypy_setup_home(o,0),n._free(o);var a=["import js","import sys; sys.platform = 'js'","import traceback","top_level_scope = {'__name__': '__main__'}"];a.forEach(function(e){var t=n.intArrayFromString(e),t=n.allocate(t,"i8",n.ALLOC_NORMAL);if(!t)throw new r.Error("Failed to allocate memory");var i=n._pypy_execute_source(t);if(0>i)throw new r.Error("Failed to execute python code");n._free(t)})}.bind(this))}.bind(this)).then(e,t)}.bind(this))}function i(e){return e.replace(/\\/g,"\\\\").replace(/'/g,"\\'")}this&&(this.pypyjs=r),"undefined"!=typeof window&&(window.pypyjs=r),"undefined"!=typeof e.exports&&(e.exports=r);var o=function(){};"undefined"!=typeof console?o=console.log.bind(console):"undefined"!=typeof print&&"undefined"==typeof window&&(o=print);for(var a="./",s=(new Error).stack.split("\n"),l=0;l<s.length;l++){var u=/(at Anonymous function \(|at |@)(.+\/)pypyjs.js/.exec(s[l]);if(u){a=u[2];break}}if("/"!==a.charAt(a.length-1)&&(a+="/"),"undefined"==typeof c)var c=n(548).Promise;var f=n(551);if("undefined"==typeof f)throw"FunctionPromise object not found";var p={stdin:function(){return null},stdout:function(){},stderr:function(){}},d={stdin:null,stdout:null,stderr:null};d.stdin=p.stdin,"undefined"!=typeof t&&("undefined"!=typeof t.stdout&&(d.stdout=function(e){t.stdout.write(e)}),"undefined"!=typeof t.stderr&&(d.stderr=function(e){t.stderr.write(e)}));var h,m;if("undefined"==typeof window&&("undefined"!=typeof print&&(h=print),"undefined"!=typeof printErr&&(m=printErr)),"undefined"!=typeof console&&("undefined"==typeof h&&(h=console.log.bind(console)),"undefined"==typeof m&&(m=console.error.bind(console))),null==d.stdout&&"undefined"!=typeof h&&(d.stdout=function(){var e=[];return function(t){for(var n=0;n<t.length;n++){var r=t.charAt(n);"\n"!==r?e.push(r):(h(e.join("")),e.splice(void 0,e.length))}}}()),null==d.stderr&&"undefined"!=typeof m&&(d.stderr=function(){var e=[];return function(t){for(var n=0;n<t.length;n++){var r=t.charAt(n);"\n"!==r?e.push(r):(m(e.join("")),e.splice(void 0,e.length))}}}()),null===d.stdout&&(d.stdout=p.stdout),null===d.stderr&&(d.stderr=p.stderr),r.prototype.fetch=function(e,t){if("undefined"==typeof window)var n=!1;else var n=window.localStorage;var i=r.cacheKey&&n&&"pypyjs.vm.js"!=e;if(i){var o=n.getItem(r.cacheKey+":"+e);if(o)return new c(function(e,t){e({responseText:o})})}return new c("undefined"!=typeof XMLHttpRequest?function(o,a){var s=new XMLHttpRequest;s.onload=function(){s.status>=400?a(s):(i&&s.responseText&&n.setItem(r.cacheKey+":"+e,s.responseText),o(s))};var l=this.rootURL||r.rootURL;s.open("GET",l+e,!0),s.responseType=t||"text",s.send(null)}.bind(this):"undefined"!=typeof fs&&"undefined"!=typeof fs.readFile?function(t,n){var i=this.rootURL||r.rootURL;fs.readFile(path.join(i,e),function(e,r){return e?n(e):void t({responseText:r.toString()})})}.bind(this):"undefined"!=typeof snarf?function(t,n){var i=this.rootURL||r.rootURL,o=snarf(i+e);t({responseText:o})}.bind(this):"undefined"!=typeof read&&"undefined"!=typeof readbuffer?function(t,n){var i=this.rootURL||r.rootURL,o=read(i+e);t({responseText:o})}.bind(this):function(e,t){t("unable to fetch files")})},"undefined"!=typeof v)var v=!1;r.prototype._execute_source=function(e){var t=this._module;e="try:\n "+e+"\nexcept Exception:\n typ, val, tb = sys.exc_info()\n err_name = getattr(typ, '__name__', str(typ))\n err_msg = str(val)\n err_trace = traceback.format_exception(typ, val, tb)\n err_trace = ''.join(err_trace)\n js.globals['pypyjs']._lastErrorName = err_name\n js.globals['pypyjs']._lastErrorMessage = err_msg\n js.globals['pypyjs']._lastErrorTrace = err_trace\n";var n=t.intArrayFromString(e),i=t.allocate(n,"i8",t.ALLOC_NORMAL);if(!i)return c.reject(new r.Error("Failed to allocate memory"));var o=t._pypy_execute_source(i);if(t._free(i),r._lastErrorName){var a=new r.Error(r._lastErrorName,r._lastErrorMessage,r._lastErrorTrace);return r._lastErrorName=null,r._lastErrorMessage=null,r._lastErrorTrace=null,c.reject(a)}return 0>o?c.reject(new r.Error("Error executing python code")):c.resolve(null)},r.prototype.ready=function(){return this._ready},r.prototype.exec=function(e){return this._ready.then(function(){var t=c.resolve();return this.autoLoadModules&&(t=t.then(function(){return this.findImportedNames(e)}.bind(this)).then(function(e){return this.loadModuleData.apply(this,e)}.bind(this))),e="exec '''"+i(e)+"''' in top_level_scope",t=t.then(function(){return this._execute_source(e)}.bind(this))}.bind(this))},r.prototype.eval=function(e){return this._ready.then(function(){return code="r = eval('"+i(e)+"', top_level_scope)",this._execute_source(code)}.bind(this)).then(function(){return this.get("r",!0)}.bind(this),function(t){if(t&&t.name&&"SyntaxError"!==t.name)throw t;return"undefined"!=typeof console&&(console.warn("Calling pypyjs.eval() with statements is deprecated."),console.warn("Use eval() for expressions, exec() for statements.")),this.exec(e)}.bind(this))},r.prototype.execfile=function(e){return this.fetch(e).then(function(e){var t=e.responseText;return this.exec(t)}.bind(this))},r._resultsID=0,r._resultsMap={},r.prototype.get=function(e,t){var n=""+r._resultsID++;if(t)var o="globals()";else var o="top_level_scope";return this._ready.then(function(){var t=o+".get('"+i(e)+"', js.undefined)";return t="js.convert("+t+")",t="js.globals['pypyjs']._resultsMap['"+n+"'] = "+t,this._execute_source(t)}.bind(this)).then(function(){var e=r._resultsMap[n];return delete r._resultsMap[n],e}.bind(this))},r.prototype.set=function(e,t){return this._ready.then(function(){var n=this._module,r=n._emjs_make_handle(t);e=i(e);var o="top_level_scope['"+e+"'] = js.Value("+r+")";return this._execute_source(o)}.bind(this))},r.prototype.repl=function(e){if(!e){var n="";e=this.stdin!==p.stdin||"undefined"==typeof t?function(e){var t;this.stdout(e);for(var r=this.stdin();r;){var i=r.indexOf("\n");if(i>=0){var t=n+r.substr(0,i+1);return n=r.substr(i+1),t}n+=r,r=this.stdin()}return t=n,n="",t}.bind(this):function(e){return new c(function(r,i){this.stdout(e);var o=function a(){t.stdin.once("readable",function(){var e=t.stdin.read();if(null===e)a();else{e=e.toString();var i=e.indexOf("\n");0>i?(n+=e,a()):(r(n+e.substr(0,i+1)),n=e.substr(i+1))}})};o()}.bind(this))}.bind(this)}return this._ready.then(function(){return this.loadModuleData("code")}.bind(this)).then(function(){return this._execute_source("import code")}.bind(this)).then(function(){return this._execute_source("c = code.InteractiveConsole(top_level_scope)")}.bind(this)).then(function(){return this._repl_loop(e,">>> ")}.bind(this))},r.prototype._repl_loop=function(e,t){return c.resolve().then(function(){return e.call(this,t)}.bind(this)).then(function(e){var t=c.resolve();return e.split("\n").forEach(function(e){this.autoLoadModules&&(t=t.then(function(){return this.findImportedNames(e)}.bind(this)).then(function(e){return this.loadModuleData.apply(this,e)}.bind(this)));var n="r = c.push('"+i(e)+"')";t=t.then(function(){return this._execute_source(n)}.bind(this))}.bind(this)),t}.bind(this)).then(function(){return this.get("r",!0)}.bind(this)).then(function(t){return t?this._repl_loop(e,"... "):this._repl_loop(e,">>> ")}.bind(this))};var g=/(from\s+([a-zA-Z0-9_\.]+)\s+)?import\s+\(?\s*([a-zA-Z0-9_\.\*]+(\s+as\s+[a-zA-Z0-9_]+)?[ \t]*,?[ \t]*)+[ \t]*\)?/g;r.prototype.findImportedNames=function(e){var t=null,n=[];for(g.lastIndex=0;null!==(t=g.exec(e));){var r=t[2];r?r+=".":r="";for(var i=t[0].split("import")[1];i&&/[\s(]/.test(i.charAt(0));)i=i.substr(1);for(;i&&/[\s)]/.test(i.charAt(i.length-1));)i=i.substr(0,i.length-1);i=i.split(/\s*,\s*/);for(var o=0;o<i.length;o++){var a=i[o];a=a.split(/\s*as\s*/)[0],n.push(r+a)}}return c.resolve(n)},r.prototype.loadModuleData=function(){var e=Array.prototype.slice.call(arguments);return this._ready.then(function(){var t={};e:for(var n=0;n<e.length;n++){for(var r=e[n];;){if(this._allModules[r])break;if(r=r.substr(0,r.lastIndexOf(".")),!r)continue e}this._findModuleDeps(r,t)}var i=c.resolve();for(var r in t)i=i.then(this._makeLoadModuleData(r));return i}.bind(this))},r.prototype._findModuleDeps=function(e,t){t||(t={});var n=[];if(!this._allModules[e])return t;var r=this._allModules[e].imports;if(r)for(var i=0;i<r.length;i++)n.push(r[i]);this._allModules[e].dir&&n.push(e+".__init__");var o=e.lastIndexOf(".");-1!==o&&n.push(e.substr(0,o)),t[e]=!0;for(var i=0;i<n.length;i++)t[n[i]]||this._findModuleDeps(n[i],t);return t},r.prototype._makeLoadModuleData=function(e){return function(){if(this._loadedModules[e])return c.resolve();if(this._pendingModules[e])return this._pendingModules[e];if(this._allModules[e].dir)return c.resolve();var t=this._allModules[e].file,n=this.fetch("modules/"+t).then(function(t){var n=t.responseText;this._writeModuleFile(e,n),delete this._pendingModules[e]}.bind(this));return this._pendingModules[e]=n,n}.bind(this)},r.prototype._writeModuleFile=function(e,t){var n=this._module,r=this._allModules[e].file,i=r.split("/").slice(0,-1).join("/");try{n.FS_createPath("/lib/pypyjs/lib_pypy",i,!0,!1)}catch(o){}var a="/lib/pypyjs/lib_pypy/"+r;n.FS_createDataFile(a,"",t,!0,!1,!0),this._loadedModules[e]=!0},r.Error=function(e,t,n){e&&"undefined"==typeof t&&(t=e,e=""),this.name=e||"pypyjs.Error",this.message=t||"pypyjs Unknown Error",this.trace=n||""},r.Error.prototype=new Error,r.Error.prototype.constructor=r.Error,r._defaultVM=null,r.stdin=d.stdin,r.stdout=d.stdout,r.stderr=d.stderr;var y=["ready","exec","eval","execfile","get","set","repl","loadModuleData"];return y.forEach(function(e){r[e]=function(){return r._defaultVM||(r._defaultVM=new r({stdin:function(){return r.stdin.apply(this,arguments)},stdout:function(){return r.stdout.apply(this,arguments)},stderr:function(){return r.stderr.apply(this,arguments)}})),r._defaultVM[e].apply(r._defaultVM,arguments)}}),r}()}).call(t,n(547))},function(e,t){function n(){u=!1,a.length?l=a.concat(l):c=-1,l.length&&r()}function r(){if(!u){var e=setTimeout(n);u=!0;for(var t=l.length;t;){for(a=l,l=[];++c<t;)a&&a[c].run();c=-1,t=l.length}a=null,u=!1,clearTimeout(e)}}function i(e,t){this.fun=e,this.array=t}function o(){}var a,s=e.exports={},l=[],u=!1,c=-1;s.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new i(e,t)),1!==l.length||u||setTimeout(r,0)},i.prototype.run=function(){this.fun.apply(null,this.array)},s.title="browser",s.browser=!0,s.env={},s.argv=[],s.version="",s.versions={},s.on=o,s.addListener=o,s.once=o,s.off=o,s.removeListener=o,s.removeAllListeners=o,s.emit=o,s.binding=function(e){throw new Error("process.binding is not supported")},s.cwd=function(){return"/"},s.chdir=function(e){throw new Error("process.chdir is not supported")},s.umask=function(){return 0}},function(e,t,n){var r;(function(e,i,o){/*!
* @overview es6-promise - a tiny implementation of Promises/A+.
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
* @license Licensed under MIT license
* See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE
* @version 3.0.2
*/
(function(){"use strict";function a(e){return"function"==typeof e||"object"==typeof e&&null!==e}function s(e){return"function"==typeof e}function l(e){return"object"==typeof e&&null!==e}function u(e){z=e}function c(e){$=e}function f(){return function(){e.nextTick(v)}}function p(){return function(){q(v)}}function d(){var e=0,t=new ee(v),n=document.createTextNode("");return t.observe(n,{characterData:!0}),function(){n.data=e=++e%2}}function h(){var e=new MessageChannel;return e.port1.onmessage=v,function(){e.port2.postMessage(0)}}function m(){return function(){setTimeout(v,1)}}function v(){for(var e=0;J>e;e+=2){var t=re[e],n=re[e+1];t(n),re[e]=void 0,re[e+1]=void 0}J=0}function g(){try{var e=n(549);return q=e.runOnLoop||e.runOnContext,p()}catch(t){return m()}}function y(){}function b(){return new TypeError("You cannot resolve a promise with itself")}function w(){return new TypeError("A promises callback cannot return that same promise.")}function x(e){try{return e.then}catch(t){return se.error=t,se}}function T(e,t,n,r){try{e.call(t,n,r)}catch(i){return i}}function k(e,t,n){$(function(e){var r=!1,i=T(n,t,function(n){r||(r=!0,t!==n?C(e,n):_(e,n))},function(t){r||(r=!0,N(e,t))},"Settle: "+(e._label||" unknown promise"));!r&&i&&(r=!0,N(e,i))},e)}function L(e,t){t._state===oe?_(e,t._result):t._state===ae?N(e,t._result):A(t,void 0,function(t){C(e,t)},function(t){N(e,t)})}function S(e,t){if(t.constructor===e.constructor)L(e,t);else{var n=x(t);n===se?N(e,se.error):void 0===n?_(e,t):s(n)?k(e,t,n):_(e,t)}}function C(e,t){e===t?N(e,b()):a(t)?S(e,t):_(e,t)}function E(e){e._onerror&&e._onerror(e._result),O(e)}function _(e,t){e._state===ie&&(e._result=t,e._state=oe,0!==e._subscribers.length&&$(O,e))}function N(e,t){e._state===ie&&(e._state=ae,e._result=t,$(E,e))}function A(e,t,n,r){var i=e._subscribers,o=i.length;e._onerror=null,i[o]=t,i[o+oe]=n,i[o+ae]=r,0===o&&e._state&&$(O,e)}function O(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var r,i,o=e._result,a=0;a<t.length;a+=3)r=t[a],i=t[a+n],r?D(n,r,i,o):i(o);e._subscribers.length=0}}function M(){this.error=null}function I(e,t){try{return e(t)}catch(n){return le.error=n,le}}function D(e,t,n,r){var i,o,a,l,u=s(n);if(u){if(i=I(n,r),i===le?(l=!0,o=i.error,i=null):a=!0,t===i)return void N(t,w())}else i=r,a=!0;t._state!==ie||(u&&a?C(t,i):l?N(t,o):e===oe?_(t,i):e===ae&&N(t,i))}function F(e,t){try{t(function(t){C(e,t)},function(t){N(e,t)})}catch(n){N(e,n)}}function P(e,t){var n=this;n._instanceConstructor=e,n.promise=new e(y),n._validateInput(t)?(n._input=t,n.length=t.length,n._remaining=t.length,n._init(),0===n.length?_(n.promise,n._result):(n.length=n.length||0,n._enumerate(),0===n._remaining&&_(n.promise,n._result))):N(n.promise,n._validationError())}function G(e){return new ue(this,e).promise}function j(e){function t(e){C(i,e)}function n(e){N(i,e)}var r=this,i=new r(y);if(!Y(e))return N(i,new TypeError("You must pass an array to race.")),i;for(var o=e.length,a=0;i._state===ie&&o>a;a++)A(r.resolve(e[a]),void 0,t,n);return i}function Q(e){var t=this;if(e&&"object"==typeof e&&e.constructor===t)return e;var n=new t(y);return C(n,e),n}function R(e){var t=this,n=new t(y);return N(n,e),n}function V(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function B(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function U(e){this._id=he++,this._state=void 0,this._result=void 0,this._subscribers=[],y!==e&&(s(e)||V(),this instanceof U||B(),F(this,e))}function W(){var e;if("undefined"!=typeof i)e=i;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=e.Promise;(!n||"[object Promise]"!==Object.prototype.toString.call(n.resolve())||n.cast)&&(e.Promise=me)}var H;H=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)};var q,z,K,Y=H,J=0,$=({}.toString,function(e,t){re[J]=e,re[J+1]=t,J+=2,2===J&&(z?z(v):K())}),X="undefined"!=typeof window?window:void 0,Z=X||{},ee=Z.MutationObserver||Z.WebKitMutationObserver,te="undefined"!=typeof e&&"[object process]"==={}.toString.call(e),ne="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,re=new Array(1e3);K=te?f():ee?d():ne?h():void 0===X?g():m();var ie=void 0,oe=1,ae=2,se=new M,le=new M;P.prototype._validateInput=function(e){return Y(e)},P.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},P.prototype._init=function(){this._result=new Array(this.length)};var ue=P;P.prototype._enumerate=function(){for(var e=this,t=e.length,n=e.promise,r=e._input,i=0;n._state===ie&&t>i;i++)e._eachEntry(r[i],i)},P.prototype._eachEntry=function(e,t){var n=this,r=n._instanceConstructor;l(e)?e.constructor===r&&e._state!==ie?(e._onerror=null,n._settledAt(e._state,t,e._result)):n._willSettleAt(r.resolve(e),t):(n._remaining--,n._result[t]=e)},P.prototype._settledAt=function(e,t,n){var r=this,i=r.promise;i._state===ie&&(r._remaining--,e===ae?N(i,n):r._result[t]=n),0===r._remaining&&_(i,r._result)},P.prototype._willSettleAt=function(e,t){var n=this;A(e,void 0,function(e){n._settledAt(oe,t,e)},function(e){n._settledAt(ae,t,e)})};var ce=G,fe=j,pe=Q,de=R,he=0,me=U;U.all=ce,U.race=fe,U.resolve=pe,U.reject=de,U._setScheduler=u,U._setAsap=c,U._asap=$,U.prototype={constructor:U,then:function(e,t){var n=this,r=n._state;if(r===oe&&!e||r===ae&&!t)return this;var i=new this.constructor(y),o=n._result;if(r){var a=arguments[r-1];$(function(){D(r,i,a,o)})}else A(n,i,e,t);return i},"catch":function(e){return this.then(null,e)}};var ve=W,ge={Promise:me,polyfill:ve};n(550).amd?(r=function(){return ge}.call(t,n,t,o),!(void 0!==r&&(o.exports=r))):"undefined"!=typeof o&&o.exports?o.exports=ge:"undefined"!=typeof this&&(this.ES6Promise=ge),ve()}).call(this)}).call(t,n(547),function(){return this}(),n(330)(e))},function(e,t){},function(e,t){e.exports=function(){throw new Error("define cannot be used indirect")}},function(e,t,n){"use strict";function r(){var e="undefined"==typeof window||window.FunctionPromise!==r||"undefined"==typeof document||"undefined"==typeof document.createElement||"undefined"==typeof document.head||"undefined"==typeof document.head.appendChild||"undefined"==typeof Blob||"undefined"==typeof URL||"undefined"==typeof URL.createObjectURL,t=Array.prototype.slice.call(arguments);if(e)try{var n=Function.apply(null,t);return Promise.resolve(n)}catch(i){return Promise.reject(i)}var o=r._nextid++;return new Promise(function(e,n){try{var r=[];if(r.push("window.FunctionPromise._results["+o+"]="),r.push("function("),t.length>1){r.push(t[0]);for(var i=1;i<t.length-1;i++)r.push(","),r.push(t[i])}r.push("){"),r.push(t[t.length-1]),r.push("}");var a=URL.createObjectURL(new Blob(r)),s=document.createElement("script"),l=function(){URL.revokeObjectURL(a),s.remove(),delete window.FunctionPromise._results[o]};s.onerror=function(){n(new Error("unknown error loading FunctionPromise")),l()},s.onload=function(){if(window.FunctionPromise._results[o])e(window.FunctionPromise._results[o]);else try{Function.apply(null,t),n(new Error("unknown error fulfilling FunctionPromise"))}catch(r){n(r)}l()},s.src=a,document.head.appendChild(s)}catch(u){n(u)}})}r._nextid=0,r._results={},"undefined"!=typeof e&&"undefined"!=typeof e.exports&&("undefined"==typeof Promise&&(Promise=n(548).Promise),e.exports=r)},function(e,t,n){!function(e){e(n(345))}(function(e){"use strict";function t(e){return new RegExp("^(("+e.join(")|(")+"))\\b")}function n(e){return e.scopes[e.scopes.length-1]}var r=t(["and","or","not","is"]),i=["as","assert","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","lambda","pass","raise","return","try","while","with","yield","in"],o=["abs","all","any","bin","bool","bytearray","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip","__import__","NotImplemented","Ellipsis","__debug__"],a={builtins:["apply","basestring","buffer","cmp","coerce","execfile","file","intern","long","raw_input","reduce","reload","unichr","unicode","xrange","False","True","None"],keywords:["exec","print"]},s={builtins:["ascii","bytes","exec","print"],keywords:["nonlocal","False","True","None","async","await"]};e.registerHelper("hintWords","python",i.concat(o)),e.defineMode("python",function(l,u){function c(e,t){if(e.sol()&&"py"==n(t).type){var r=n(t).offset;if(e.eatSpace()){var i=e.indentation();return i>r?d(e,t,"py"):r>i&&h(e,t)&&(t.errorToken=!0),null}var o=f(e,t);return r>0&&h(e,t)&&(o+=" "+v),o}return f(e,t)}function f(e,t){if(e.eatSpace())return null;var n=e.peek();if("#"==n)return e.skipToEnd(),"comment";if(e.match(/^[0-9\.]/,!1)){var i=!1;if(e.match(/^\d*\.\d+(e[\+\-]?\d+)?/i)&&(i=!0),e.match(/^\d+\.\d*/)&&(i=!0),e.match(/^\.\d+/)&&(i=!0),i)return e.eat(/J/i),"number";var o=!1;if(e.match(/^0x[0-9a-f]+/i)&&(o=!0),e.match(/^0b[01]+/i)&&(o=!0),e.match(/^0o[0-7]+/i)&&(o=!0),e.match(/^[1-9]\d*(e[\+\-]?\d+)?/)&&(e.eat(/J/i),o=!0),e.match(/^0(?![\dx])/i)&&(o=!0),o)return e.eat(/L/i),"number"}return e.match(C)?(t.tokenize=p(e.current()),t.tokenize(e,t)):e.match(w)||e.match(b)?"punctuation":e.match(y)||e.match(x)?"operator":e.match(g)?"punctuation":"."==t.lastToken&&e.match(T)?"property":e.match(E)||e.match(r)?"keyword":e.match(_)?"builtin":e.match(/^(self|cls)\b/)?"variable-2":e.match(T)?"def"==t.lastToken||"class"==t.lastToken?"def":"variable":(e.next(),v)}function p(e){function t(t,i){for(;!t.eol();)if(t.eatWhile(/[^'"\\]/),t.eat("\\")){if(t.next(),n&&t.eol())return r}else{if(t.match(e))return i.tokenize=c,r;t.eat(/['"]/)}if(n){if(u.singleLineStringErrors)return v;i.tokenize=c}return r}for(;"rub".indexOf(e.charAt(0).toLowerCase())>=0;)e=e.substr(1);var n=1==e.length,r="string";return t.isString=!0,t}function d(e,t,r){var i=0,o=null;if("py"==r)for(;"py"!=n(t).type;)t.scopes.pop();i=n(t).offset+("py"==r?l.indentUnit:k),"py"==r||e.match(/^(\s|#.*)*$/,!1)||(o=e.column()+1),t.scopes.push({offset:i,type:r,align:o})}function h(e,t){for(var r=e.indentation();n(t).offset>r;){if("py"!=n(t).type)return!0;t.scopes.pop()}return n(t).offset!=r}function m(e,t){var r=t.tokenize(e,t),i=e.current();if("@"==i)return u.version&&3==parseInt(u.version,10)?e.match(T,!1)?"meta":"operator":e.match(T,!1)?"meta":v;"variable"!=r&&"builtin"!=r||"meta"!=t.lastToken||(r="meta"),("pass"==i||"return"==i)&&(t.dedent+=1),"lambda"==i&&(t.lambda=!0),":"!=i||t.lambda||"py"!=n(t).type||d(e,t,"py");var o=1==i.length?"[({".indexOf(i):-1;if(-1!=o&&d(e,t,"])}".slice(o,o+1)),o="])}".indexOf(i),-1!=o){if(n(t).type!=i)return v;t.scopes.pop()}return t.dedent>0&&e.eol()&&"py"==n(t).type&&(t.scopes.length>1&&t.scopes.pop(),t.dedent-=1),r}var v="error",g=u.singleDelimiters||/^[\(\)\[\]\{\}@,:`=;\.]/,y=u.doubleOperators||/^([!<>]==|<>|<<|>>|\/\/|\*\*)/,b=u.doubleDelimiters||/^(\+=|\-=|\*=|%=|\/=|&=|\|=|\^=)/,w=u.tripleDelimiters||/^(\/\/=|>>=|<<=|\*\*=)/;if(u.version&&3==parseInt(u.version,10))var x=u.singleOperators||/^[\+\-\*\/%&|\^~<>!@]/,T=u.identifiers||/^[_A-Za-z\u00A1-\uFFFF][_A-Za-z0-9\u00A1-\uFFFF]*/;else var x=u.singleOperators||/^[\+\-\*\/%&|\^~<>!]/,T=u.identifiers||/^[_A-Za-z][_A-Za-z0-9]*/;var k=u.hangingIndent||l.indentUnit,L=i,S=o;if(void 0!=u.extra_keywords&&(L=L.concat(u.extra_keywords)),void 0!=u.extra_builtins&&(S=S.concat(u.extra_builtins)),u.version&&3==parseInt(u.version,10)){L=L.concat(s.keywords),S=S.concat(s.builtins);var C=new RegExp("^(([rb]|(br))?('{3}|\"{3}|['\"]))","i")}else{L=L.concat(a.keywords),S=S.concat(a.builtins);var C=new RegExp("^(([rub]|(ur)|(br))?('{3}|\"{3}|['\"]))","i")}var E=t(L),_=t(S),N={startState:function(e){return{tokenize:c,scopes:[{offset:e||0,type:"py",align:null}],lastToken:null,lambda:!1,dedent:0}},token:function(e,t){var n=t.errorToken;n&&(t.errorToken=!1);var r=m(e,t);return r&&"comment"!=r&&(t.lastToken="keyword"==r||"punctuation"==r?e.current():r),"punctuation"==r&&(r=null),e.eol()&&t.lambda&&(t.lambda=!1),n?r+" "+v:r},indent:function(t,r){if(t.tokenize!=c)return t.tokenize.isString?e.Pass:0;var i=n(t),o=r&&r.charAt(0)==i.type;return null!=i.align?i.align-(o?1:0):o&&t.scopes.length>1?t.scopes[t.scopes.length-2].offset:i.offset},closeBrackets:{triples:"'\""},lineComment:"#",fold:"indent"};return N}),e.defineMIME("text/x-python","python");var l=function(e){return e.split(" ")};e.defineMIME("text/x-cython",{name:"python",extra_keywords:l("by cdef cimport cpdef ctypedef enum exceptextern gil include nogil property publicreadonly struct union DEF IF ELIF ELSE")})})},function(e,t,n){var r=n(554);"string"==typeof r&&(r=[[e.id,r,""]]);n(326)(r,{});r.locals&&(e.exports=r.locals)},function(e,t,n){t=e.exports=n(319)(),t.i(n(555),""),t.push([e.id,".playground{top:106px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:box;display:flex;-webkit-box-orient:horizontal;-o-box-orient:horizontal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;min-width:960px}.playground,.playground .loading{position:absolute;left:0;right:0;bottom:0}.playground .loading{display:block;top:0;z-index:10000;background:hsla(0,0%,100%,.6)}.playground-schema{min-width:400px;width:36%;border-right:1px solid #e0e0e0;position:relative;z-index:100;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:box;display:flex;-webkit-box-orient:vertical;-o-box-orient:vertical;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}.playground-schema .cm-def:not(.CodeMirror-lint-mark-error),.playground-schema .cm-variable+.cm-keyword:not(.CodeMirror-lint-mark-error){-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out;background:transparent}.playground-schema .activeline .cm-def,.playground-schema .activeline .cm-variable+.cm-keyword{background:#d7d3f1;border-radius:1px;box-shadow:0 0 0 2px #d7d3f1}.playground-schema-editor{-webkit-box-flex:1;-o-box-flex:1;box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;position:relative}.playground-schema-editor .CodeMirror{font-size:13px;position:absolute;height:100%;width:100%;top:0;left:0;right:0;bottom:0;font-family:Consolas,Inconsolata,Droid Sans Mono,Monaco,monospace;color:#141823}.playground-schema-editor .CodeMirror-lines{padding:20px 0}.playground-schema-header{height:48px;box-sizing:border-box;font-family:Raleway,sans-serif;color:#999;font-weight:600;font-size:12px;text-transform:uppercase;line-height:52px;padding:0 12px;border-bottom:1px solid #d0d0d0;background:#f9f9f9}.playground-graphiql{-webkit-box-flex:1;-o-box-flex:1;box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;height:100%}.cm-s-graphene,.cm-s-graphene .cm-comment{color:#999}.cm-s-graphene .cm-punctuation{color:#555}.cm-s-graphene .cm-keyword{color:#a71d5d}.cm-s-graphene .cm-def{color:#1f61a0}.cm-s-graphene .cm-property{color:#333}.cm-s-graphene .cm-qualifier{color:#1c92a9}.cm-s-graphene .cm-attribute{color:#8b2bb9}.cm-s-graphene .cm-number{color:#2882f9}.cm-s-graphene .cm-string{color:#d64292}.cm-s-graphene .cm-builtin{color:#d47509}.cm-s-graphene .cm-string-2{color:#0b7fc7}.cm-s-graphene .cm-variable{color:#333}.cm-s-graphene .cm-meta{color:#b33086}.cm-s-graphene .cm-atom{color:#ca9800}",""])},function(e,t,n){t=e.exports=n(319)(),t.push([e.id,'#graphiql-container{color:#141823;width:100%;display:-webkit-flex;display:flex;-webkit-flex-direction:row;flex-direction:row;height:100%;font-family:system,-apple-system,San Francisco,\\.SFNSDisplay-Regular,Segoe UI,Segoe,Segoe WP,Helvetica Neue,helvetica,Lucida Grande,arial,sans-serif;font-size:14px}#graphiql-container .editorWrap{display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-flex:1;flex:1}#graphiql-container .title{display:none;font-size:18px}#graphiql-container .title em{font-family:georgia;font-size:19px}#graphiql-container .topBarWrap{flex-direction:row;background:#f9f9f9;height:48px}#graphiql-container .topBar,#graphiql-container .topBarWrap{display:-webkit-flex;display:flex;-webkit-flex-direction:row}#graphiql-container .topBar{border-bottom:1px solid #d0d0d0;cursor:default;-webkit-user-select:none;user-select:none;flex-direction:row;-webkit-flex:1;flex:1;-webkit-align-items:center;align-items:center}#graphiql-container .docExplorerShow{background:transparent;border:none;border-bottom:1px solid #d0d0d0;border-left:1px solid rgba(0,0,0,.2);color:#3b5998;cursor:pointer;font-size:14px;outline:0;padding:2px 20px 0 18px}#graphiql-container .docExplorerShow:before{border-left:2px solid #3b5998;border-top:2px solid #3b5998;content:\'\';display:inline-block;height:9px;margin:0 3px -1px 0;position:relative;width:9px;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}#graphiql-container .editorBar{display:-webkit-flex;display:flex;-webkit-flex-direction:row;flex-direction:row;-webkit-flex:1;flex:1}#graphiql-container .queryWrap,#graphiql-container .resultWrap{display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-flex:1;flex:1}#graphiql-container .resultWrap{border-left:1px solid #e0e0e0}#graphiql-container .docExplorerWrap{box-shadow:0 0 8px rgba(0,0,0,.15);z-index:3;position:relative;background:#fff}#graphiql-container .docExplorerResizer{cursor:col-resize;height:100%;left:-5px;position:absolute;top:0;width:10px;z-index:10}#graphiql-container .docExplorerHide{cursor:pointer;font-size:18px;margin:-7px -8px -6px 0;padding:18px 16px 15px 12px}#graphiql-container .query-editor{-webkit-flex:1;flex:1;position:relative}#graphiql-container .variable-editor{height:30px;display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;position:relative}#graphiql-container .variable-editor-title{background:#eee;border-bottom:1px solid #d6d6d6;border-top:1px solid #e0e0e0;color:#777;font-variant:small-caps;font-weight:700;letter-spacing:1px;line-height:14px;padding:6px 0 8px 43px;text-transform:lowercase;-webkit-user-select:none;user-select:none}#graphiql-container .codemirrorWrap,#graphiql-container .result-window{-webkit-flex:1;flex:1;position:relative}#graphiql-container .footer{background:#f6f7f8;border-left:1px solid #e0e0e0;border-top:1px solid #e0e0e0;margin-left:12px;position:relative}#graphiql-container .footer:before{background:#eee;bottom:0;content:" ";left:-13px;position:absolute;top:-1px;width:12px}#graphiql-container .result-window .CodeMirror{background:#f6f7f8}#graphiql-container .result-window .CodeMirror-gutters{background-color:#eee;border-color:#e0e0e0;cursor:col-resize}#graphiql-container .result-window .CodeMirror-foldgutter,#graphiql-container .result-window .CodeMirror-foldgutter-folded:after,#graphiql-container .result-window .CodeMirror-foldgutter-open:after{padding-left:3px}#graphiql-container .execute-button{background:transparent;border:1px solid #777;border-radius:17px;cursor:pointer;fill:#444;height:34px;margin:0 14px;padding:0;width:34px}#graphiql-container .execute-button path{fill:#777}#graphiql-container .execute-button:hover{border-color:#333}#graphiql-container .execute-button:hover path{fill:#333}#graphiql-container .execute-button:active{background:#fff;border-color:#db594c}#graphiql-container .execute-button:active path{fill:#db594c}#graphiql-container .execute-button:focus{outline:0}#graphiql-container .CodeMirror-scroll{-webkit-overflow-scrolling:touch}#graphiql-container .CodeMirror{position:absolute;top:0;left:0;height:100%;width:100%;font-size:13px;font-family:Consolas,Inconsolata,Droid Sans Mono,Monaco,monospace;color:#141823}#graphiql-container .CodeMirror-lines{padding:20px 0}.CodeMirror-hint-information .content{-webkit-box-orient:vertical;color:#141823;display:-webkit-box;font-family:system,-apple-system,San Francisco,\\.SFNSDisplay-Regular,Segoe UI,Segoe,Segoe WP,Helvetica Neue,helvetica,Lucida Grande,arial,sans-serif;font-size:13px;-webkit-line-clamp:3;line-height:16px;max-height:48px;overflow:hidden;text-overflow:-o-ellipsis-lastline}.CodeMirror-hint-information .content p:first-child{margin-top:0}.CodeMirror-hint-information .content p:last-child{margin-bottom:0}.CodeMirror-hint-information .infoType{color:#30a;margin-right:.5em;display:inline;cursor:pointer}.autoInsertedLeaf.cm-property{padding:2px 4px 1px;margin:-2px -4px -1px;border-radius:2px;border-bottom:2px solid hsla(0,0%,100%,0);-webkit-animation-duration:6s;animation-duration:6s;-webkit-animation-name:insertionFade;animation-name:insertionFade}@-webkit-keyframes insertionFade{0%,to{background:hsla(0,0%,100%,0);border-color:hsla(0,0%,100%,0)}15%,85%{background:#fbffc9;border-color:#f0f3c0}}@keyframes insertionFade{0%,to{background:hsla(0,0%,100%,0);border-color:hsla(0,0%,100%,0)}15%,85%{background:#fbffc9;border-color:#f0f3c0}}div.CodeMirror-lint-tooltip{background-color:#fff;color:#141823;border:0;border-radius:2px;box-shadow:0 1px 3px rgba(0,0,0,.45);font-family:system,-apple-system,San Francisco,\\.SFNSDisplay-Regular,Segoe UI,Segoe,Segoe WP,Helvetica Neue,helvetica,Lucida Grande,arial,sans-serif;font-size:13px;line-height:16px;padding:6px 10px;opacity:0;transition:opacity .15s;-moz-transition:opacity .15s;-webkit-transition:opacity .15s;-o-transition:opacity .15s;-ms-transition:opacity .15s}div.CodeMirror-lint-message-error,div.CodeMirror-lint-message-warning{padding-left:23px}#graphiql-container .CodeMirror-foldmarker{border-radius:4px;background:#08f;background:-webkit-linear-gradient(#43a8ff,#0f83e8);background:linear-gradient(#43a8ff,#0f83e8);color:#fff;box-shadow:0 1px 1px rgba(0,0,0,.2),inset 0 0 0 1px rgba(0,0,0,.1);font-family:arial;line-height:0;padding:0 4px 1px;font-size:12px;margin:0 3px;text-shadow:0 -1px rgba(0,0,0,.1)}#graphiql-container div.CodeMirror span.CodeMirror-matchingbracket{color:#555;text-decoration:underline}#graphiql-container div.CodeMirror span.CodeMirror-nonmatchingbracket{color:red}#graphiql-container .cm-comment{color:#999}#graphiql-container .cm-punctuation{color:#555}#graphiql-container .cm-keyword{color:#b11a04}#graphiql-container .cm-def{color:#d2054e}#graphiql-container .cm-property{color:#1f61a0}#graphiql-container .cm-qualifier{color:#1c92a9}#graphiql-container .cm-attribute{color:#8b2bb9}#graphiql-container .cm-number{color:#2882f9}#graphiql-container .cm-string{color:#d64292}#graphiql-container .cm-builtin{color:#d47509}#graphiql-container .cm-string-2{color:#0b7fc7}#graphiql-container .cm-variable{color:#397d13}#graphiql-container .cm-meta{color:#b33086}#graphiql-container .cm-atom{color:#ca9800}.CodeMirror{font-family:monospace;height:300px;color:#000}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror div.CodeMirror-cursor{border-left:1px solid #000}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.CodeMirror.cm-fat-cursor div.CodeMirror-cursor{width:auto;border:0;background:#7e7}.CodeMirror.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite}@-webkit-keyframes blink{0%{background:#7e7}50%{background:none}to{background:#7e7}}@keyframes blink{0%{background:#7e7}50%{background:none}to{background:#7e7}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-ruler{border-left:1px solid #ccc;position:absolute}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta,.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-invalidchar,.cm-s-default .cm-error{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:#fff}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:none;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;margin-bottom:-30px;*zoom:1;*display:inline}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;height:100%}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper{-webkit-user-select:none;-moz-user-select:none;user-select:none}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-code{outline:none}.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber,.CodeMirror-scroll,.CodeMirror-sizer{box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-measure pre{position:static}.CodeMirror div.CodeMirror-cursor{position:absolute;border-right:none;width:0}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror ::selection{background:#d7d4f0}.CodeMirror ::-moz-selection{background:#d7d4f0}.cm-searching{background:#ffa;background:rgba(255,255,0,.4)}.CodeMirror span{*vertical-align:text-bottom}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:\'\'}span.CodeMirror-selectedtext{background:none}#graphiql-container .doc-explorer{background:#fff}#graphiql-container .doc-explorer-title-bar{cursor:default;display:-webkit-flex;display:flex;height:34px;line-height:14px;padding:8px 8px 5px;position:relative;-webkit-user-select:none;user-select:none}#graphiql-container .doc-explorer-title{padding:10px 0 10px 10px;font-weight:700;text-align:center;text-overflow:ellipsis;white-space:nowrap;overflow-x:hidden;-webkit-flex:1;flex:1}#graphiql-container .doc-explorer-back{color:#3b5998;cursor:pointer;margin:-7px 0 -6px -8px;overflow-x:hidden;padding:17px 12px 16px 16px;text-overflow:ellipsis;white-space:nowrap}#graphiql-container .doc-explorer-back:before{border-left:2px solid #3b5998;border-top:2px solid #3b5998;content:\'\';display:inline-block;height:9px;margin:0 3px -1px 0;position:relative;width:9px;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}#graphiql-container .doc-explorer-rhs{position:relative}#graphiql-container .doc-explorer-contents{background-color:#fff;border-top:1px solid #d6d6d6;bottom:0;left:0;min-width:300px;overflow-y:auto;padding:20px 15px;position:absolute;right:0;top:47px}#graphiql-container .doc-type-description blockquote:first-child,#graphiql-container .doc-type-description p:first-child{margin-top:0}#graphiql-container .doc-explorer-contents a{cursor:pointer;text-decoration:none}#graphiql-container .doc-explorer-contents a:hover{text-decoration:underline}#graphiql-container .doc-value-description{padding:4px 0 8px 12px}#graphiql-container .doc-category{margin:20px 0}#graphiql-container .doc-category-title{border-bottom:1px solid #e0e0e0;color:#777;cursor:default;font-size:14px;font-variant:small-caps;font-weight:700;letter-spacing:1px;margin:0 -15px 10px 0;padding:10px 0;-webkit-user-select:none;user-select:none}#graphiql-container .doc-category-item{margin:12px 0;color:#555}#graphiql-container .keyword{color:#b11a04}#graphiql-container .type-name{color:#ca9800}#graphiql-container .field-name{color:#1f61a0}#graphiql-container .value-name{color:#0b7fc7}#graphiql-container .arg-name{color:#8b2bb9}#graphiql-container .arg:after{content:\', \'}#graphiql-container .arg:last-child:after{content:\'\'}.CodeMirror-foldmarker{color:blue;text-shadow:#b9f 1px 1px 2px,#b9f -1px -1px 2px,#b9f 1px -1px 2px,#b9f -1px 1px 2px;font-family:arial;line-height:.3;cursor:pointer}.CodeMirror-foldgutter{width:.7em}.CodeMirror-foldgutter-folded,.CodeMirror-foldgutter-open{cursor:pointer}.CodeMirror-foldgutter-open:after{content:"\\25BE"}.CodeMirror-foldgutter-folded:after{content:"\\25B8"}.CodeMirror-lint-markers{width:16px}.CodeMirror-lint-tooltip{background-color:infobackground;border:1px solid #000;border-radius:4px 4px 4px 4px;color:infotext;font-family:monospace;font-size:10pt;overflow:hidden;padding:2px 5px;position:fixed;white-space:pre;white-space:pre-wrap;z-index:100;max-width:600px;opacity:0;transition:opacity .4s;-moz-transition:opacity .4s;-webkit-transition:opacity .4s;-o-transition:opacity .4s;-ms-transition:opacity .4s}.CodeMirror-lint-mark-error,.CodeMirror-lint-mark-warning{background-position:left bottom;background-repeat:repeat-x}.CodeMirror-lint-mark-error{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDw4cOCW1/KIAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAHElEQVQI12NggIL/DAz/GdA5/xkY/qPKMDAwAADLZwf5rvm+LQAAAABJRU5ErkJggg==")}.CodeMirror-lint-mark-warning{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJFhQXEbhTg7YAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAMklEQVQI12NkgIIvJ3QXMjAwdDN+OaEbysDA4MPAwNDNwMCwiOHLCd1zX07o6kBVGQEAKBANtobskNMAAAAASUVORK5CYII=")}.CodeMirror-lint-marker-error,.CodeMirror-lint-marker-warning{background-position:center center;background-repeat:no-repeat;cursor:pointer;display:inline-block;height:16px;width:16px;vertical-align:middle;position:relative}.CodeMirror-lint-message-error,.CodeMirror-lint-message-warning{padding-left:18px;background-position:top left;background-repeat:no-repeat}.CodeMirror-lint-marker-error,.CodeMirror-lint-message-error{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAHlBMVEW7AAC7AACxAAC7AAC7AAAAAAC4AAC5AAD///+7AAAUdclpAAAABnRSTlMXnORSiwCK0ZKSAAAATUlEQVR42mWPOQ7AQAgDuQLx/z8csYRmPRIFIwRGnosRrpamvkKi0FTIiMASR3hhKW+hAN6/tIWhu9PDWiTGNEkTtIOucA5Oyr9ckPgAWm0GPBog6v4AAAAASUVORK5CYII=")}.CodeMirror-lint-marker-warning,.CodeMirror-lint-message-warning{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAANlBMVEX/uwDvrwD/uwD/uwD/uwD/uwD/uwD/uwD/uwD6twD/uwAAAADurwD2tQD7uAD+ugAAAAD/uwDhmeTRAAAADHRSTlMJ8mN1EYcbmiixgACm7WbuAAAAVklEQVR42n3PUQqAIBBFUU1LLc3u/jdbOJoW1P08DA9Gba8+YWJ6gNJoNYIBzAA2chBth5kLmG9YUoG0NHAUwFXwO9LuBQL1giCQb8gC9Oro2vp5rncCIY8L8uEx5ZkAAAAASUVORK5CYII=")}.CodeMirror-lint-marker-multiple{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAMAAADzjKfhAAAACVBMVEUAAAAAAAC/v7914kyHAAAAAXRSTlMAQObYZgAAACNJREFUeNo1ioEJAAAIwmz/H90iFFSGJgFMe3gaLZ0od+9/AQZ0ADosbYraAAAAAElFTkSuQmCC");background-repeat:no-repeat;background-position:right bottom;width:100%;height:100%}.CodeMirror-hints{font-family:Consolas,Inconsolata,Droid Sans Mono,Monaco,monospace;font-size:13px;list-style:none;margin:0;margin-left:-6px;max-height:14.5em;overflow-y:auto;overflow:hidden;padding:0}.CodeMirror-hints,.CodeMirror-hints-wrapper{background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.45);position:absolute;z-index:10}.CodeMirror-hints-wrapper{margin-left:-6px}.CodeMirror-hints-wrapper .CodeMirror-hints{box-shadow:none;position:relative;margin-left:0;z-index:0}.CodeMirror-hint{border-top:1px solid #f7f7f7;color:#141823;cursor:pointer;margin:0;max-width:300px;overflow:hidden;padding:2px 6px;white-space:pre}li.CodeMirror-hint-active{background-color:#08f;border-top-color:#fff;color:#fff}.CodeMirror-hint-information{border-top:1px solid silver;max-width:300px;padding:4px 6px;position:relative;z-index:1}.CodeMirror-hint-information:first-child{border-bottom:1px solid silver;border-top:none;margin-bottom:-1px}',""]);
},function(e,t){e.exports="import graphene\n\nclass Query(graphene.ObjectType):\n hello = graphene.String()\n ping = graphene.String(to=graphene.String())\n\n def resolve_hello(self, args, info):\n return 'World'\n\n def resolve_ping(self, args, info):\n return 'Pinging {}'.format(args.get('to'))\n\nschema = graphene.Schema(query=Query)\n"},function(e,t){e.exports='query {\n hello\n ping(to:"Peter")\n}\n'}]));
//# sourceMappingURL=1.1.js.map