Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
static.vendor.graphiql.graphiql.min.js Maven / Gradle / Ivy
!function(f){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=f();else if("function"==typeof define&&define.amd)define([],f);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).GraphiQL=f()}}(function(){return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n||e)},l,l.exports,e,t,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o1&&e.setState({navStack:e.state.navStack.slice(0,-1)})},e.handleClickTypeOrField=function(t){e.showDoc(t)},e.handleSearch=function(t){e.showSearch(t)},e.state={navStack:[initialNav]},e}return _inherits(t,e),_createClass(t,[{key:"shouldComponentUpdate",value:function(e,t){return this.props.schema!==e.schema||this.state.navStack!==t.navStack}},{key:"render",value:function(){var e=this.props.schema,t=this.state.navStack,a=t[t.length-1],r=void 0;r=void 0===e?_react2.default.createElement("div",{className:"spinner-container"},_react2.default.createElement("div",{className:"spinner"})):e?a.search?_react2.default.createElement(_SearchResults2.default,{searchValue:a.search,withinType:a.def,schema:e,onClickType:this.handleClickTypeOrField,onClickField:this.handleClickTypeOrField}):1===t.length?_react2.default.createElement(_SchemaDoc2.default,{schema:e,onClickType:this.handleClickTypeOrField}):(0,_graphql.isType)(a.def)?_react2.default.createElement(_TypeDoc2.default,{schema:e,type:a.def,onClickType:this.handleClickTypeOrField,onClickField:this.handleClickTypeOrField}):_react2.default.createElement(_FieldDoc2.default,{field:a.def,onClickType:this.handleClickTypeOrField}):_react2.default.createElement("div",{className:"error-container"},"No Schema Available");var c=1===t.length||(0,_graphql.isType)(a.def)&&a.def.getFields,l=void 0;return t.length>1&&(l=t[t.length-2].name),_react2.default.createElement("div",{className:"doc-explorer",key:a.name},_react2.default.createElement("div",{className:"doc-explorer-title-bar"},l&&_react2.default.createElement("div",{className:"doc-explorer-back",onClick:this.handleNavBackClick},l),_react2.default.createElement("div",{className:"doc-explorer-title"},a.title||a.name),_react2.default.createElement("div",{className:"doc-explorer-rhs"},this.props.children)),_react2.default.createElement("div",{className:"doc-explorer-contents"},c&&_react2.default.createElement(_SearchBox2.default,{value:a.search,placeholder:"Search "+a.name+"...",onSearch:this.handleSearch}),r))}},{key:"showDoc",value:function(e){var t=this.state.navStack;t[t.length-1].def!==e&&this.setState({navStack:t.concat([{name:e.name,def:e}])})}},{key:"showDocForReference",value:function(e){"Type"===e.kind?this.showDoc(e.type):"Field"===e.kind?this.showDoc(e.field):"Argument"===e.kind&&e.field?this.showDoc(e.field):"EnumValue"===e.kind&&e.type&&this.showDoc(e.type)}},{key:"showSearch",value:function(e){var t=this.state.navStack.slice(),a=t[t.length-1];t[t.length-1]=_extends({},a,{search:e}),this.setState({navStack:t})}},{key:"reset",value:function(){this.setState({navStack:[initialNav]})}}]),t}(_react2.default.Component)).propTypes={schema:_propTypes2.default.instanceOf(_graphql.GraphQLSchema)}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./DocExplorer/FieldDoc":4,"./DocExplorer/SchemaDoc":6,"./DocExplorer/SearchBox":7,"./DocExplorer/SearchResults":8,"./DocExplorer/TypeDoc":9,graphql:98,"prop-types":268}],2:[function(require,module,exports){(function(global){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function Argument(e){var t=e.arg,r=e.onClickType,a=e.showDefaultValue;return _react2.default.createElement("span",{className:"arg"},_react2.default.createElement("span",{className:"arg-name"},t.name),": ",_react2.default.createElement(_TypeLink2.default,{type:t.type,onClick:r}),!1!==a&&_react2.default.createElement(_DefaultValue2.default,{field:t}))}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=Argument;var _react2=_interopRequireDefault("undefined"!=typeof window?window.React:void 0!==global?global.React:null),_propTypes2=_interopRequireDefault(require("prop-types")),_TypeLink2=_interopRequireDefault(require("./TypeLink")),_DefaultValue2=_interopRequireDefault(require("./DefaultValue"));Argument.propTypes={arg:_propTypes2.default.object.isRequired,onClickType:_propTypes2.default.func.isRequired,showDefaultValue:_propTypes2.default.bool}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./DefaultValue":3,"./TypeLink":10,"prop-types":268}],3:[function(require,module,exports){(function(global){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function DefaultValue(e){var r=e.field,t=r.type,a=r.defaultValue;return void 0!==a?_react2.default.createElement("span",null," = ",_react2.default.createElement("span",{className:"arg-default-value"},(0,_graphql.print)((0,_graphql.astFromValue)(a,t)))):null}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=DefaultValue;var _react2=_interopRequireDefault("undefined"!=typeof window?window.React:void 0!==global?global.React:null),_propTypes2=_interopRequireDefault(require("prop-types")),_graphql=require("graphql");DefaultValue.propTypes={field:_propTypes2.default.object.isRequired}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{graphql:98,"prop-types":268}],4:[function(require,module,exports){(function(global){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits(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)}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function e(e,t){for(var r=0;r0&&(r=_react2.default.createElement("div",{className:"doc-category"},_react2.default.createElement("div",{className:"doc-category-title"},"arguments"),t.args.map(function(t){return _react2.default.createElement("div",{key:t.name,className:"doc-category-item"},_react2.default.createElement("div",null,_react2.default.createElement(_Argument2.default,{arg:t,onClickType:e.props.onClickType})),_react2.default.createElement(_MarkdownContent2.default,{className:"doc-value-description",markdown:t.description}))}))),_react2.default.createElement("div",null,_react2.default.createElement(_MarkdownContent2.default,{className:"doc-type-description",markdown:t.description||"No Description"}),t.deprecationReason&&_react2.default.createElement(_MarkdownContent2.default,{className:"doc-deprecation",markdown:t.deprecationReason}),_react2.default.createElement("div",{className:"doc-category"},_react2.default.createElement("div",{className:"doc-category-title"},"type"),_react2.default.createElement(_TypeLink2.default,{type:t.type,onClick:this.props.onClickType})),r)}}]),t}(_react2.default.Component);FieldDoc.propTypes={field:_propTypes2.default.object,onClickType:_propTypes2.default.func},exports.default=FieldDoc}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./Argument":2,"./MarkdownContent":5,"./TypeLink":10,"prop-types":268}],5:[function(require,module,exports){(function(global){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits(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)}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function e(e,t){for(var r=0;r=100)return"break";var i=c[r];if(t!==i&&isMatch(r,e)&&l.push(_react2.default.createElement("div",{className:"doc-category-item",key:r},_react2.default.createElement(_TypeLink2.default,{type:i,onClick:n}))),i.getFields){var s=i.getFields();Object.keys(s).forEach(function(l){var c=s[l],p=void 0;if(!isMatch(l,e)){if(!c.args||!c.args.length)return;if(0===(p=c.args.filter(function(t){return isMatch(t.name,e)})).length)return}var f=_react2.default.createElement("div",{className:"doc-category-item",key:r+"."+l},t!==i&&[_react2.default.createElement(_TypeLink2.default,{key:"type",type:i,onClick:n}),"."],_react2.default.createElement("a",{className:"field-name",onClick:function(e){return a(c,i,e)}},c.name),p&&["(",_react2.default.createElement("span",{key:"args"},p.map(function(e){return _react2.default.createElement(_Argument2.default,{key:e.name,arg:e,onClickType:n,showDefaultValue:!1})})),")"]);t===i?o.push(f):u.push(f)})}}();s=!0);}catch(e){p=!0,f=e}finally{try{!s&&_.return&&_.return()}finally{if(p)throw f}}return o.length+l.length+u.length===0?_react2.default.createElement("span",{className:"doc-alert-text"},"No results found."):t&&l.length+u.length>0?_react2.default.createElement("div",null,o,_react2.default.createElement("div",{className:"doc-category"},_react2.default.createElement("div",{className:"doc-category-title"},"other results"),l,u)):_react2.default.createElement("div",null,o,l,u)}}]),t}(_react2.default.Component);SearchResults.propTypes={schema:_propTypes2.default.object,withinType:_propTypes2.default.object,searchValue:_propTypes2.default.string,onClickType:_propTypes2.default.func,onClickField:_propTypes2.default.func},exports.default=SearchResults}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./Argument":2,"./TypeLink":10,"prop-types":268}],9:[function(require,module,exports){(function(global){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits(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 Field(e){var t=e.type,a=e.field,r=e.onClickType,n=e.onClickField;return _react2.default.createElement("div",{className:"doc-category-item"},_react2.default.createElement("a",{className:"field-name",onClick:function(e){return n(a,t,e)}},a.name),a.args&&a.args.length>0&&["(",_react2.default.createElement("span",{key:"args"},a.args.map(function(e){return _react2.default.createElement(_Argument2.default,{key:e.name,arg:e,onClickType:r})})),")"],": ",_react2.default.createElement(_TypeLink2.default,{type:a.type,onClick:r}),_react2.default.createElement(_DefaultValue2.default,{field:a}),a.description&&_react2.default.createElement(_MarkdownContent2.default,{className:"field-short-description",markdown:a.description}),a.deprecationReason&&_react2.default.createElement(_MarkdownContent2.default,{className:"doc-deprecation",markdown:a.deprecationReason}))}function EnumValue(e){var t=e.value;return _react2.default.createElement("div",{className:"doc-category-item"},_react2.default.createElement("div",{className:"enum-value"},t.name),_react2.default.createElement(_MarkdownContent2.default,{className:"doc-value-description",markdown:t.description}),t.deprecationReason&&_react2.default.createElement(_MarkdownContent2.default,{className:"doc-deprecation",markdown:t.deprecationReason}))}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function e(e,t){for(var a=0;a0&&(l=_react2.default.createElement("div",{className:"doc-category"},_react2.default.createElement("div",{className:"doc-category-title"},n),c.map(function(e){return _react2.default.createElement("div",{key:e.name,className:"doc-category-item"},_react2.default.createElement(_TypeLink2.default,{type:e,onClick:a}))})));var o=void 0,i=void 0;if(t.getFields){var u=t.getFields(),p=Object.keys(u).map(function(e){return u[e]});o=_react2.default.createElement("div",{className:"doc-category"},_react2.default.createElement("div",{className:"doc-category-title"},"fields"),p.filter(function(e){return!e.isDeprecated}).map(function(e){return _react2.default.createElement(Field,{key:e.name,type:t,field:e,onClickType:a,onClickField:r})}));var s=p.filter(function(e){return e.isDeprecated});s.length>0&&(i=_react2.default.createElement("div",{className:"doc-category"},_react2.default.createElement("div",{className:"doc-category-title"},"deprecated fields"),this.state.showDeprecated?s.map(function(e){return _react2.default.createElement(Field,{key:e.name,type:t,field:e,onClickType:a,onClickField:r})}):_react2.default.createElement("button",{className:"show-btn",onClick:this.handleShowDeprecated},"Show deprecated fields...")))}var d=void 0,f=void 0;if(t instanceof _graphql.GraphQLEnumType){var m=t.getValues();d=_react2.default.createElement("div",{className:"doc-category"},_react2.default.createElement("div",{className:"doc-category-title"},"values"),m.filter(function(e){return!e.isDeprecated}).map(function(e){return _react2.default.createElement(EnumValue,{key:e.name,value:e})}));var _=m.filter(function(e){return e.isDeprecated});_.length>0&&(f=_react2.default.createElement("div",{className:"doc-category"},_react2.default.createElement("div",{className:"doc-category-title"},"deprecated values"),this.state.showDeprecated?_.map(function(e){return _react2.default.createElement(EnumValue,{key:e.name,value:e})}):_react2.default.createElement("button",{className:"show-btn",onClick:this.handleShowDeprecated},"Show deprecated values...")))}return _react2.default.createElement("div",null,_react2.default.createElement(_MarkdownContent2.default,{className:"doc-type-description",markdown:t.description||"No Description"}),t instanceof _graphql.GraphQLObjectType&&l,o,i,d,f,!(t instanceof _graphql.GraphQLObjectType)&&l)}}]),t}(_react2.default.Component);TypeDoc.propTypes={schema:_propTypes2.default.instanceOf(_graphql.GraphQLSchema),type:_propTypes2.default.object,onClickType:_propTypes2.default.func,onClickField:_propTypes2.default.func},exports.default=TypeDoc,Field.propTypes={type:_propTypes2.default.object,field:_propTypes2.default.object,onClickType:_propTypes2.default.func,onClickField:_propTypes2.default.func},EnumValue.propTypes={value:_propTypes2.default.object}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./Argument":2,"./DefaultValue":3,"./MarkdownContent":5,"./TypeLink":10,graphql:98,"prop-types":268}],10:[function(require,module,exports){(function(global){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits(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 renderType(e,t){return e instanceof _graphql.GraphQLNonNull?_react2.default.createElement("span",null,renderType(e.ofType,t),"!"):e instanceof _graphql.GraphQLList?_react2.default.createElement("span",null,"[",renderType(e.ofType,t),"]"):_react2.default.createElement("a",{className:"type-name",onClick:function(r){return t(e,r)}},e.name)}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function e(e,t){for(var r=0;r1,r=null;if(o&&n){var u=this.state.highlight;r=_react2.default.createElement("ul",{className:"execute-options"},t.map(function(t){return _react2.default.createElement("li",{key:t.name?t.name.value:"*",className:t===u?"selected":void 0,onMouseOver:function(){return e.setState({highlight:t})},onMouseOut:function(){return e.setState({highlight:null})},onMouseUp:function(){return e._onOptionSelected(t)}},t.name?t.name.value:"")}))}var a=void 0;!this.props.isRunning&&o||(a=this._onClick);var i=void 0;this.props.isRunning||!o||n||(i=this._onOptionsOpen);var s=this.props.isRunning?_react2.default.createElement("path",{d:"M 10 10 L 23 10 L 23 23 L 10 23 z"}):_react2.default.createElement("path",{d:"M 11 9 L 24 16 L 11 23 z"});return _react2.default.createElement("div",{className:"execute-button-wrap"},_react2.default.createElement("button",{type:"button",className:"execute-button",onMouseDown:i,onClick:a,title:"Execute Query (Ctrl-Enter)"},_react2.default.createElement("svg",{width:"34",height:"34"},s)),r)}}]),t}(_react2.default.Component)).propTypes={onRun:_propTypes2.default.func,onStop:_propTypes2.default.func,isRunning:_propTypes2.default.bool,operations:_propTypes2.default.array}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"prop-types":268}],12:[function(require,module,exports){(function(global){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits(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 isPromise(e){return"object"===(void 0===e?"undefined":_typeof(e))&&"function"==typeof e.then}function observableToPromise(e){return isObservable(e)?new Promise(function(t,r){var o=e.subscribe(function(e){t(e),o.unsubscribe()},r,function(){r(new Error("no value resolved"))})}):e}function isObservable(e){return"object"===(void 0===e?"undefined":_typeof(e))&&"function"==typeof e.subscribe}Object.defineProperty(exports,"__esModule",{value:!0}),exports.GraphiQL=void 0;var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_extends=Object.assign||function(e){for(var t=1;t0){var o=this.getQueryEditor();o.operation(function(){var e=o.getCursor(),i=o.indexFromPos(e);o.setValue(r);var n=0,a=t.map(function(e){var t=e.index,r=e.string;return o.markText(o.posFromIndex(t+n),o.posFromIndex(t+(n+=r.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,r=e.string;t=i){e=a.name&&a.name.value;break}}}this.handleRunQuery(e)}}},{key:"_didClickDragBar",value: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 r=_reactDom2.default.findDOMNode(this.resultComponent);t;){if(t===r)return!0;t=t.parentNode}return!1}}]),t}(_react2.default.Component);GraphiQL.propTypes={fetcher:_propTypes2.default.func.isRequired,schema:_propTypes2.default.instanceOf(_graphql.GraphQLSchema),query:_propTypes2.default.string,variables:_propTypes2.default.string,operationName:_propTypes2.default.string,response:_propTypes2.default.string,storage:_propTypes2.default.shape({getItem:_propTypes2.default.func,setItem:_propTypes2.default.func,removeItem:_propTypes2.default.func}),defaultQuery:_propTypes2.default.string,onEditQuery:_propTypes2.default.func,onEditVariables:_propTypes2.default.func,onEditOperationName:_propTypes2.default.func,onToggleDocs:_propTypes2.default.func,getDefaultFieldNames:_propTypes2.default.func,editorTheme:_propTypes2.default.string,onToggleHistory:_propTypes2.default.func,ResultsTooltip:_propTypes2.default.any};var _initialiseProps=function(){var e=this;this.handleClickReference=function(t){e.setState({docExplorerOpen:!0},function(){e.docExplorerComponent.showDocForReference(t)})},this.handleRunQuery=function(t){var r=++e._editorQueryID,o=e.autoCompleteLeafs()||e.state.query,i=e.state.variables,n=e.state.operationName;t&&t!==n&&(n=t,e.handleEditOperationName(n));try{e.setState({isWaitingForResponse:!0,response:null,operationName:n});var a=e._fetchQuery(o,i,n,function(t){r===e._editorQueryID&&e.setState({isWaitingForResponse:!1,response:JSON.stringify(t,null,2)})});e.setState({subscription:a})}catch(t){e.setState({isWaitingForResponse:!1,response:t.message})}},this.handleStopQuery=function(){var t=e.state.subscription;e.setState({isWaitingForResponse:!1,subscription:null}),t&&t.unsubscribe()},this.handlePrettifyQuery=function(){var t=e.getQueryEditor();t.setValue((0,_graphql.print)((0,_graphql.parse)(t.getValue())))},this.handleMergeQuery=function(){var t=e.getQueryEditor(),r=t.getValue();if(r){var o=(0,_graphql.parse)(r);t.setValue((0,_graphql.print)((0,_mergeAst.mergeAst)(o)))}},this.handleEditQuery=(0,_debounce2.default)(100,function(t){var r=e._updateQueryFacts(t,e.state.operationName,e.state.operations,e.state.schema);if(e.setState(_extends({query:t},r)),e.props.onEditQuery)return e.props.onEditQuery(t)}),this._updateQueryFacts=function(t,r,o,i){var n=(0,_getQueryFacts2.default)(i,t);if(n){var a=(0,_getSelectedOperationName2.default)(o,r,n.operations),s=e.props.onEditOperationName;return s&&r!==a&&s(a),_extends({operationName:a},n)}},this.handleEditVariables=function(t){e.setState({variables:t}),e.props.onEditVariables&&e.props.onEditVariables(t)},this.handleEditOperationName=function(t){var r=e.props.onEditOperationName;r&&r(t)},this.handleHintInformationRender=function(t){t.addEventListener("click",e._onClickHintInformation);var r=void 0;t.addEventListener("DOMNodeRemoved",r=function(){t.removeEventListener("DOMNodeRemoved",r),t.removeEventListener("click",e._onClickHintInformation)})},this.handleEditorRunQuery=function(){e._runQueryAtCursor()},this._onClickHintInformation=function(t){if("typeName"===t.target.className){var r=t.target.innerHTML,o=e.state.schema;if(o){var i=o.getType(r);i&&e.setState({docExplorerOpen:!0},function(){e.docExplorerComponent.showDoc(i)})}}},this.handleToggleDocs=function(){"function"==typeof e.props.onToggleDocs&&e.props.onToggleDocs(!e.state.docExplorerOpen),e.setState({docExplorerOpen:!e.state.docExplorerOpen})},this.handleToggleHistory=function(){"function"==typeof e.props.onToggleHistory&&e.props.onToggleHistory(!e.state.historyPaneOpen),e.setState({historyPaneOpen:!e.state.historyPaneOpen})},this.handleSelectHistoryQuery=function(t,r,o){e.handleEditQuery(t),e.handleEditVariables(r),e.handleEditOperationName(o)},this.handleResizeStart=function(t){if(e._didClickDragBar(t)){t.preventDefault();var r=t.clientX-(0,_elementPosition.getLeft)(t.target),o=function(t){if(0===t.buttons)return i();var o=_reactDom2.default.findDOMNode(e.editorBarComponent),n=t.clientX-(0,_elementPosition.getLeft)(o)-r,a=o.clientWidth-n;e.setState({editorFlex:n/a})},i=function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(){document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",i),o=null,i=null});document.addEventListener("mousemove",o),document.addEventListener("mouseup",i)}},this.handleResetResize=function(){e.setState({editorFlex:1})},this.handleDocsResizeStart=function(t){t.preventDefault();var r=e.state.docExplorerWidth,o=t.clientX-(0,_elementPosition.getLeft)(t.target),i=function(t){if(0===t.buttons)return n();var r=_reactDom2.default.findDOMNode(e),i=t.clientX-(0,_elementPosition.getLeft)(r)-o,a=r.clientWidth-i;a<100?e.setState({docExplorerOpen:!1}):e.setState({docExplorerOpen:!0,docExplorerWidth:Math.min(a,650)})},n=function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(){e.state.docExplorerOpen||e.setState({docExplorerWidth:r}),document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",n),i=null,n=null});document.addEventListener("mousemove",i),document.addEventListener("mouseup",n)},this.handleDocsResetResize=function(){e.setState({docExplorerWidth:DEFAULT_DOC_EXPLORER_WIDTH})},this.handleVariableResizeStart=function(t){t.preventDefault();var r=!1,o=e.state.variableEditorOpen,i=e.state.variableEditorHeight,n=t.clientY-(0,_elementPosition.getTop)(t.target),a=function(t){if(0===t.buttons)return s();r=!0;var o=_reactDom2.default.findDOMNode(e.editorBarComponent),a=t.clientY-(0,_elementPosition.getTop)(o)-n,l=o.clientHeight-a;l<60?e.setState({variableEditorOpen:!1,variableEditorHeight:i}):e.setState({variableEditorOpen:!0,variableEditorHeight:l})},s=function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(){r||e.setState({variableEditorOpen:!o}),document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",s),a=null,s=null});document.addEventListener("mousemove",a),document.addEventListener("mouseup",s)}};GraphiQL.Logo=function(e){return _react2.default.createElement("div",{className:"title"},e.children||_react2.default.createElement("span",null,"Graph",_react2.default.createElement("em",null,"i"),"QL"))},GraphiQL.Toolbar=function(e){return _react2.default.createElement("div",{className:"toolbar"},e.children)},GraphiQL.QueryEditor=_QueryEditor.QueryEditor,GraphiQL.VariableEditor=_VariableEditor.VariableEditor,GraphiQL.ResultViewer=_ResultViewer.ResultViewer,GraphiQL.Button=_ToolbarButton.ToolbarButton,GraphiQL.ToolbarButton=_ToolbarButton.ToolbarButton,GraphiQL.Group=_ToolbarGroup.ToolbarGroup,GraphiQL.Menu=_ToolbarMenu.ToolbarMenu,GraphiQL.MenuItem=_ToolbarMenu.ToolbarMenuItem,GraphiQL.Select=_ToolbarSelect.ToolbarSelect,GraphiQL.SelectOption=_ToolbarSelect.ToolbarSelectOption,GraphiQL.Footer=function(e){return _react2.default.createElement("div",{className:"footer"},e.children)};var defaultQuery='# Welcome to GraphiQL\n#\n# GraphiQL is an in-browser tool for writing, validating, and\n# testing GraphQL queries.\n#\n# Type queries into this side of the screen, and you will see intelligent\n# typeaheads aware of the current GraphQL type schema and live syntax and\n# validation errors highlighted within the text.\n#\n# GraphQL queries typically start with a "{" character. Lines that starts\n# with a # are ignored.\n#\n# An example GraphQL query might look like:\n#\n# {\n# field(arg: "value") {\n# subField\n# }\n# }\n#\n# Keyboard shortcuts:\n#\n# Prettify Query: Shift-Ctrl-P (or press the prettify button above)\n#\n# Merge Query: Shift-Ctrl-M (or press the merge button above)\n#\n# Run Query: Ctrl-Enter (or press the play button above)\n#\n# Auto Complete: Ctrl-Space (or just start typing)\n#\n\n'}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utility/CodeMirrorSizer":23,"../utility/StorageAPI":25,"../utility/debounce":26,"../utility/elementPosition":27,"../utility/fillLeafs":28,"../utility/find":29,"../utility/getQueryFacts":30,"../utility/getSelectedOperationName":31,"../utility/introspectionQueries":32,"../utility/mergeAst":33,"./DocExplorer":1,"./ExecuteButton":11,"./QueryEditor":14,"./QueryHistory":15,"./ResultViewer":16,"./ToolbarButton":17,"./ToolbarGroup":18,"./ToolbarMenu":19,"./ToolbarSelect":20,"./VariableEditor":21,graphql:98,"prop-types":268}],13:[function(require,module,exports){(function(global){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits(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)}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function e(e,t){for(var r=0;r20&&this.historyStore.shift();var r=this.historyStore.items,o=this.favoriteStore.items,i=r.concat(o);this.setState({queries:i})}}},{key:"render",value:function(){var e=this,t=this.state.queries.slice().reverse().map(function(t,r){return _react2.default.createElement(_HistoryQuery2.default,_extends({handleEditLabel:e.editLabel,handleToggleFavorite:e.toggleFavorite,key:r,onSelect:e.props.onSelectQuery},t))});return _react2.default.createElement("div",null,_react2.default.createElement("div",{className:"history-title-bar"},_react2.default.createElement("div",{className:"history-title"},"History"),_react2.default.createElement("div",{className:"doc-explorer-rhs"},this.props.children)),_react2.default.createElement("div",{className:"history-contents"},t))}}]),t}(_react2.default.Component)).propTypes={query:_propTypes2.default.string,variables:_propTypes2.default.string,operationName:_propTypes2.default.string,queryID:_propTypes2.default.number,onSelectQuery:_propTypes2.default.func,storage:_propTypes2.default.object}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utility/QueryStore":24,"./HistoryQuery":13,graphql:98,"prop-types":268}],16:[function(require,module,exports){(function(global){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,r){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!r||"object"!=typeof r&&"function"!=typeof r?e:r}function _inherits(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function, not "+typeof r);e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.ResultViewer=void 0;var _createClass=function(){function e(e,r){for(var t=0;t=65&&t<=90||!r.shiftKey&&t>=48&&t<=57||r.shiftKey&&189===t||r.shiftKey&&222===t)&&o.editor.execCommand("autocomplete")},o._onEdit=function(){o.ignoreChangeEvent||(o.cachedValue=o.editor.getValue(),o.props.onEdit&&o.props.onEdit(o.cachedValue))},o._onHasCompletion=function(e,r){(0,_onHasCompletion2.default)(e,r,o.props.onHintInformationRender)},o.cachedValue=e.value||"",o}return _inherits(r,e),_createClass(r,[{key:"componentDidMount",value:function(){var e=this,r=require("codemirror");require("codemirror/addon/hint/show-hint"),require("codemirror/addon/edit/matchbrackets"),require("codemirror/addon/edit/closebrackets"),require("codemirror/addon/fold/brace-fold"),require("codemirror/addon/fold/foldgutter"),require("codemirror/addon/lint/lint"),require("codemirror/addon/search/searchcursor"),require("codemirror/addon/search/jump-to-line"),require("codemirror/addon/dialog/dialog"),require("codemirror/keymap/sublime"),require("codemirror-graphql/variables/hint"),require("codemirror-graphql/variables/lint"),require("codemirror-graphql/variables/mode"),this.editor=r(this._node,{value:this.props.value||"",lineNumbers:!0,tabSize:2,mode:"graphql-variables",theme:this.props.editorTheme||"graphiql",keyMap:"sublime",autoCloseBrackets:!0,matchBrackets:!0,showCursorWhenSelecting:!0,readOnly:!!this.props.readOnly&&"nocursor",foldGutter:{minFoldSize:4},lint:{variableToType:this.props.variableToType},hintOptions:{variableToType:this.props.variableToType,closeOnUnfocus:!1,completeSingle:!1},gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],extraKeys:{"Cmd-Space":function(){return e.editor.showHint({completeSingle:!1})},"Ctrl-Space":function(){return e.editor.showHint({completeSingle:!1})},"Alt-Space":function(){return e.editor.showHint({completeSingle:!1})},"Shift-Space":function(){return e.editor.showHint({completeSingle:!1})},"Cmd-Enter":function(){e.props.onRunQuery&&e.props.onRunQuery()},"Ctrl-Enter":function(){e.props.onRunQuery&&e.props.onRunQuery()},"Shift-Ctrl-P":function(){e.props.onPrettifyQuery&&e.props.onPrettifyQuery()},"Shift-Ctrl-M":function(){e.props.onMergeQuery&&e.props.onMergeQuery()},"Cmd-F":"findPersistent","Ctrl-F":"findPersistent","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)}},{key:"componentDidUpdate",value:function(e){var r=require("codemirror");if(this.ignoreChangeEvent=!0,this.props.variableToType!==e.variableToType&&(this.editor.options.lint.variableToType=this.props.variableToType,this.editor.options.hintOptions.variableToType=this.props.variableToType,r.signal(this.editor,"change",this.editor)),this.props.value!==e.value&&this.props.value!==this.cachedValue){var o=this.props.value||"";this.cachedValue=o,this.editor.setValue(o)}this.ignoreChangeEvent=!1}},{key:"componentWillUnmount",value:function(){this.editor.off("change",this._onEdit),this.editor.off("keyup",this._onKeyUp),this.editor.off("hasCompletion",this._onHasCompletion),this.editor=null}},{key:"render",value:function(){var e=this;return _react2.default.createElement("div",{className:"codemirrorWrap",ref:function(r){e._node=r}})}},{key:"getCodeMirror",value:function(){return this.editor}},{key:"getClientHeight",value:function(){return this._node&&this._node.clientHeight}}]),r}(_react2.default.Component)).propTypes={variableToType:_propTypes2.default.object,value:_propTypes2.default.string,onEdit:_propTypes2.default.func,readOnly:_propTypes2.default.bool,onHintInformationRender:_propTypes2.default.func,onPrettifyQuery:_propTypes2.default.func,onMergeQuery:_propTypes2.default.func,onRunQuery:_propTypes2.default.func,editorTheme:_propTypes2.default.string}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utility/onHasCompletion":35,codemirror:66,"codemirror-graphql/variables/hint":50,"codemirror-graphql/variables/lint":51,"codemirror-graphql/variables/mode":52,"codemirror/addon/dialog/dialog":54,"codemirror/addon/edit/closebrackets":55,"codemirror/addon/edit/matchbrackets":56,"codemirror/addon/fold/brace-fold":57,"codemirror/addon/fold/foldgutter":59,"codemirror/addon/hint/show-hint":60,"codemirror/addon/lint/lint":61,"codemirror/addon/search/jump-to-line":62,"codemirror/addon/search/searchcursor":64,"codemirror/keymap/sublime":65,"prop-types":268}],22:[function(require,module,exports){"use strict";module.exports=require("./components/GraphiQL").GraphiQL},{"./components/GraphiQL":12}],23:[function(require,module,exports){"use strict";function _classCallCheck(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function e(e,r){for(var t=0;t'+e.name+""}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(e,n,r){var t=void 0,a=void 0;require("codemirror").on(n,"select",function(e,n){if(!t){var o=n.parentNode;(t=document.createElement("div")).className="CodeMirror-hint-information",o.appendChild(t),(a=document.createElement("div")).className="CodeMirror-hint-deprecation",o.appendChild(a);var i=void 0;o.addEventListener("DOMNodeRemoved",i=function(e){e.target===o&&(o.removeEventListener("DOMNodeRemoved",i),t=null,a=null,i=null)})}var d=e.description?md.render(e.description):"Self descriptive.",p=e.type?''+renderType(e.type)+" ":"";if(t.innerHTML=''+("
"===d.slice(0,3)?"
"+p+d.slice(3):p+d)+"
",e.isDeprecated){var l=e.deprecationReason?md.render(e.deprecationReason):"";a.innerHTML='Deprecated '+l,a.style.display="block"}else a.style.display="none";r&&r(t)})};var _graphql=require("graphql"),md=new(function(e){return e&&e.__esModule?e:{default:e}}(require("markdown-it")).default)},{codemirror:66,graphql:98,"markdown-it":207}],36:[function(require,module,exports){(function(global){"use strict";function compare(a,b){if(a===b)return 0;for(var x=a.length,y=b.length,i=0,len=Math.min(x,y);i=0;i--)if(ka[i]!==kb[i])return!1;for(i=ka.length-1;i>=0;i--)if(key=ka[i],!_deepEqual(a[key],b[key],strict,actualVisitedObjects))return!1;return!0}function notDeepStrictEqual(actual,expected,message){_deepEqual(actual,expected,!0)&&fail(actual,expected,message,"notDeepStrictEqual",notDeepStrictEqual)}function expectedException(actual,expected){if(!actual||!expected)return!1;if("[object RegExp]"==Object.prototype.toString.call(expected))return expected.test(actual);try{if(actual instanceof expected)return!0}catch(e){}return!Error.isPrototypeOf(expected)&&!0===expected.call({},actual)}function _tryBlock(block){var error;try{block()}catch(e){error=e}return error}function _throws(shouldThrow,block,expected,message){var actual;if("function"!=typeof block)throw new TypeError('"block" argument must be a function');"string"==typeof expected&&(message=expected,expected=null),actual=_tryBlock(block),message=(expected&&expected.name?" ("+expected.name+").":".")+(message?" "+message:"."),shouldThrow&&!actual&&fail(actual,expected,"Missing expected exception"+message);var userProvidedMessage="string"==typeof message,isUnwantedException=!shouldThrow&&util.isError(actual),isUnexpectedException=!shouldThrow&&actual&&!expected;if((isUnwantedException&&userProvidedMessage&&expectedException(actual,expected)||isUnexpectedException)&&fail(actual,expected,"Got unwanted exception"+message),shouldThrow&&actual&&expected&&!expectedException(actual,expected)||!shouldThrow&&actual)throw actual}var util=require("util/"),hasOwn=Object.prototype.hasOwnProperty,pSlice=Array.prototype.slice,functionsHaveNames="foo"===function(){}.name,assert=module.exports=ok,regex=/\s*function\s+([^\(\s]*)\s*/;assert.AssertionError=function(options){this.name="AssertionError",this.actual=options.actual,this.expected=options.expected,this.operator=options.operator,options.message?(this.message=options.message,this.generatedMessage=!1):(this.message=getMessage(this),this.generatedMessage=!0);var stackStartFunction=options.stackStartFunction||fail;if(Error.captureStackTrace)Error.captureStackTrace(this,stackStartFunction);else{var err=new Error;if(err.stack){var out=err.stack,fn_name=getName(stackStartFunction),idx=out.indexOf("\n"+fn_name);if(idx>=0){var next_line=out.indexOf("\n",idx+1);out=out.substring(next_line+1)}this.stack=out}}},util.inherits(assert.AssertionError,Error),assert.fail=fail,assert.ok=ok,assert.equal=function(actual,expected,message){actual!=expected&&fail(actual,expected,message,"==",assert.equal)},assert.notEqual=function(actual,expected,message){actual==expected&&fail(actual,expected,message,"!=",assert.notEqual)},assert.deepEqual=function(actual,expected,message){_deepEqual(actual,expected,!1)||fail(actual,expected,message,"deepEqual",assert.deepEqual)},assert.deepStrictEqual=function(actual,expected,message){_deepEqual(actual,expected,!0)||fail(actual,expected,message,"deepStrictEqual",assert.deepStrictEqual)},assert.notDeepEqual=function(actual,expected,message){_deepEqual(actual,expected,!1)&&fail(actual,expected,message,"notDeepEqual",assert.notDeepEqual)},assert.notDeepStrictEqual=notDeepStrictEqual,assert.strictEqual=function(actual,expected,message){actual!==expected&&fail(actual,expected,message,"===",assert.strictEqual)},assert.notStrictEqual=function(actual,expected,message){actual===expected&&fail(actual,expected,message,"!==",assert.notStrictEqual)},assert.throws=function(block,error,message){_throws(!0,block,error,message)},assert.doesNotThrow=function(block,error,message){_throws(!1,block,error,message)},assert.ifError=function(err){if(err)throw err};var objectKeys=Object.keys||function(obj){var keys=[];for(var key in obj)hasOwn.call(obj,key)&&keys.push(key);return keys}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"util/":279}],37:[function(require,module,exports){"use strict";var _codemirror2=function(obj){return obj&&obj.__esModule?obj:{default:obj}}(require("codemirror")),_graphqlLanguageServiceInterface=require("graphql-language-service-interface");_codemirror2.default.registerHelper("hint","graphql",function(editor,options){var schema=options.schema;if(schema){var cur=editor.getCursor(),token=editor.getTokenAt(cur),rawResults=(0,_graphqlLanguageServiceInterface.getAutocompleteSuggestions)(schema,editor.getValue(),cur,token),tokenStart=null!==token.type&&/"|\w/.test(token.string[0])?token.start:token.end,results={list:rawResults.map(function(item){return{text:item.label,type:schema.getType(item.detail),description:item.documentation,isDeprecated:item.isDeprecated,deprecationReason:item.deprecationReason}}),from:{line:cur.line,column:tokenStart},to:{line:cur.line,column:token.end}};return results&&results.list&&results.list.length>0&&(results.from=_codemirror2.default.Pos(results.from.line,results.from.column),results.to=_codemirror2.default.Pos(results.to.line,results.to.column),_codemirror2.default.signal(editor,"hasCompletion",editor,results,token)),results}})},{codemirror:66,"graphql-language-service-interface":78}],38:[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function renderField(into,typeInfo,options){renderQualifiedField(into,typeInfo,options),renderTypeAnnotation(into,typeInfo,options,typeInfo.type)}function renderQualifiedField(into,typeInfo,options){var fieldName=typeInfo.fieldDef.name;"__"!==fieldName.slice(0,2)&&(renderType(into,typeInfo,options,typeInfo.parentType),text(into,".")),text(into,fieldName,"field-name",options,(0,_SchemaReference.getFieldReference)(typeInfo))}function renderDirective(into,typeInfo,options){text(into,"@"+typeInfo.directiveDef.name,"directive-name",options,(0,_SchemaReference.getDirectiveReference)(typeInfo))}function renderArg(into,typeInfo,options){typeInfo.directiveDef?renderDirective(into,typeInfo,options):typeInfo.fieldDef&&renderQualifiedField(into,typeInfo,options);var name=typeInfo.argDef.name;text(into,"("),text(into,name,"arg-name",options,(0,_SchemaReference.getArgumentReference)(typeInfo)),renderTypeAnnotation(into,typeInfo,options,typeInfo.inputType),text(into,")")}function renderTypeAnnotation(into,typeInfo,options,t){text(into,": "),renderType(into,typeInfo,options,t)}function renderEnumValue(into,typeInfo,options){var name=typeInfo.enumValue.name;renderType(into,typeInfo,options,typeInfo.inputType),text(into,"."),text(into,name,"enum-value",options,(0,_SchemaReference.getEnumValueReference)(typeInfo))}function renderType(into,typeInfo,options,t){t instanceof _graphql.GraphQLNonNull?(renderType(into,typeInfo,options,t.ofType),text(into,"!")):t instanceof _graphql.GraphQLList?(text(into,"["),renderType(into,typeInfo,options,t.ofType),text(into,"]")):text(into,t.name,"type-name",options,(0,_SchemaReference.getTypeReference)(typeInfo,t))}function renderDescription(into,options,def){var description=def.description;if(description){var descriptionDiv=document.createElement("div");descriptionDiv.className="info-description",options.renderDescription?descriptionDiv.innerHTML=options.renderDescription(description):descriptionDiv.appendChild(document.createTextNode(description)),into.appendChild(descriptionDiv)}renderDeprecation(into,options,def)}function renderDeprecation(into,options,def){var reason=def.deprecationReason;if(reason){var deprecationDiv=document.createElement("div");deprecationDiv.className="info-deprecation",options.renderDescription?deprecationDiv.innerHTML=options.renderDescription(reason):deprecationDiv.appendChild(document.createTextNode(reason));var label=document.createElement("span");label.className="info-deprecation-label",label.appendChild(document.createTextNode("Deprecated: ")),deprecationDiv.insertBefore(label,deprecationDiv.firstChild),into.appendChild(deprecationDiv)}}function text(into,content,className,options,ref){if(className){var onClick=options.onClick,node=document.createElement(onClick?"a":"span");onClick&&(node.href="javascript:void 0",node.addEventListener("click",function(e){onClick(ref,e)})),node.className=className,node.appendChild(document.createTextNode(content)),into.appendChild(node)}else into.appendChild(document.createTextNode(content))}var _graphql=require("graphql"),_codemirror2=_interopRequireDefault(require("codemirror")),_getTypeInfo2=_interopRequireDefault(require("./utils/getTypeInfo")),_SchemaReference=require("./utils/SchemaReference");require("./utils/info-addon"),_codemirror2.default.registerHelper("info","graphql",function(token,options){if(options.schema&&token.state){var state=token.state,kind=state.kind,step=state.step,typeInfo=(0,_getTypeInfo2.default)(options.schema,token.state);if("Field"===kind&&0===step&&typeInfo.fieldDef||"AliasedField"===kind&&2===step&&typeInfo.fieldDef){var into=document.createElement("div");return renderField(into,typeInfo,options),renderDescription(into,options,typeInfo.fieldDef),into}if("Directive"===kind&&1===step&&typeInfo.directiveDef){var _into=document.createElement("div");return renderDirective(_into,typeInfo,options),renderDescription(_into,options,typeInfo.directiveDef),_into}if("Argument"===kind&&0===step&&typeInfo.argDef){var _into2=document.createElement("div");return renderArg(_into2,typeInfo,options),renderDescription(_into2,options,typeInfo.argDef),_into2}if("EnumValue"===kind&&typeInfo.enumValue&&typeInfo.enumValue.description){var _into3=document.createElement("div");return renderEnumValue(_into3,typeInfo,options),renderDescription(_into3,options,typeInfo.enumValue),_into3}if("NamedType"===kind&&typeInfo.type&&typeInfo.type.description){var _into4=document.createElement("div");return renderType(_into4,typeInfo,options,typeInfo.type),renderDescription(_into4,options,typeInfo.type),_into4}}})},{"./utils/SchemaReference":43,"./utils/getTypeInfo":45,"./utils/info-addon":47,codemirror:66,graphql:98}],39:[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _codemirror2=_interopRequireDefault(require("codemirror")),_getTypeInfo2=_interopRequireDefault(require("./utils/getTypeInfo")),_SchemaReference=require("./utils/SchemaReference");require("./utils/jump-addon"),_codemirror2.default.registerHelper("jump","graphql",function(token,options){if(options.schema&&options.onClick&&token.state){var state=token.state,kind=state.kind,step=state.step,typeInfo=(0,_getTypeInfo2.default)(options.schema,state);return"Field"===kind&&0===step&&typeInfo.fieldDef||"AliasedField"===kind&&2===step&&typeInfo.fieldDef?(0,_SchemaReference.getFieldReference)(typeInfo):"Directive"===kind&&1===step&&typeInfo.directiveDef?(0,_SchemaReference.getDirectiveReference)(typeInfo):"Argument"===kind&&0===step&&typeInfo.argDef?(0,_SchemaReference.getArgumentReference)(typeInfo):"EnumValue"===kind&&typeInfo.enumValue?(0,_SchemaReference.getEnumValueReference)(typeInfo):"NamedType"===kind&&typeInfo.type?(0,_SchemaReference.getTypeReference)(typeInfo):void 0}})},{"./utils/SchemaReference":43,"./utils/getTypeInfo":45,"./utils/jump-addon":49,codemirror:66}],40:[function(require,module,exports){"use strict";var _codemirror2=function(obj){return obj&&obj.__esModule?obj:{default:obj}}(require("codemirror")),_graphqlLanguageServiceInterface=require("graphql-language-service-interface"),SEVERITY=["error","warning","information","hint"],TYPE={"GraphQL: Validation":"validation","GraphQL: Deprecation":"deprecation","GraphQL: Syntax":"syntax"};_codemirror2.default.registerHelper("lint","graphql",function(text,options){var schema=options.schema;return(0,_graphqlLanguageServiceInterface.getDiagnostics)(text,schema).map(function(error){return{message:error.message,severity:SEVERITY[error.severity-1],type:TYPE[error.source],from:_codemirror2.default.Pos(error.range.start.line,error.range.start.character),to:_codemirror2.default.Pos(error.range.end.line,error.range.end.character)}})})},{codemirror:66,"graphql-language-service-interface":78}],41:[function(require,module,exports){"use strict";function indent(state,textAfter){var levels=state.levels;return(levels&&0!==levels.length?levels[levels.length-1]-(this.electricInput.test(textAfter)?1:0):state.indentLevel)*this.config.indentUnit}var _codemirror2=function(obj){return obj&&obj.__esModule?obj:{default:obj}}(require("codemirror")),_graphqlLanguageServiceParser=require("graphql-language-service-parser");_codemirror2.default.defineMode("graphql",function(config){var parser=(0,_graphqlLanguageServiceParser.onlineParser)({eatWhitespace:function(stream){return stream.eatWhile(_graphqlLanguageServiceParser.isIgnored)},lexRules:_graphqlLanguageServiceParser.LexRules,parseRules:_graphqlLanguageServiceParser.ParseRules,editorConfig:{tabSize:config.tabSize}});return{config:config,startState:parser.startState,token:parser.token,indent:indent,electricInput:/^\s*[})\]]/,fold:"brace",lineComment:"#",closeBrackets:{pairs:'()[]{}""',explode:"()[]{}"}}})},{codemirror:66,"graphql-language-service-parser":82}],42:[function(require,module,exports){"use strict";function indent(state,textAfter){var levels=state.levels;return(levels&&0!==levels.length?levels[levels.length-1]-(this.electricInput.test(textAfter)?1:0):state.indentLevel)*this.config.indentUnit}var _codemirror2=function(obj){return obj&&obj.__esModule?obj:{default:obj}}(require("codemirror")),_graphqlLanguageServiceParser=require("graphql-language-service-parser");_codemirror2.default.defineMode("graphql-results",function(config){var parser=(0,_graphqlLanguageServiceParser.onlineParser)({eatWhitespace:function(stream){return stream.eatSpace()},lexRules:LexRules,parseRules:ParseRules,editorConfig:{tabSize:config.tabSize}});return{config:config,startState:parser.startState,token:parser.token,indent:indent,electricInput:/^\s*[}\]]/,fold:"brace",closeBrackets:{pairs:'[]{}""',explode:"[]{}"}}});var LexRules={Punctuation:/^\[|]|\{|\}|:|,/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?/,Keyword:/^true|false|null/},ParseRules={Document:[(0,_graphqlLanguageServiceParser.p)("{"),(0,_graphqlLanguageServiceParser.list)("Entry",(0,_graphqlLanguageServiceParser.p)(",")),(0,_graphqlLanguageServiceParser.p)("}")],Entry:[(0,_graphqlLanguageServiceParser.t)("String","def"),(0,_graphqlLanguageServiceParser.p)(":"),"Value"],Value:function(token){switch(token.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(token.value){case"[":return"ListValue";case"{":return"ObjectValue"}return null;case"Keyword":switch(token.value){case"true":case"false":return"BooleanValue";case"null":return"NullValue"}return null}},NumberValue:[(0,_graphqlLanguageServiceParser.t)("Number","number")],StringValue:[(0,_graphqlLanguageServiceParser.t)("String","string")],BooleanValue:[(0,_graphqlLanguageServiceParser.t)("Keyword","builtin")],NullValue:[(0,_graphqlLanguageServiceParser.t)("Keyword","keyword")],ListValue:[(0,_graphqlLanguageServiceParser.p)("["),(0,_graphqlLanguageServiceParser.list)("Value",(0,_graphqlLanguageServiceParser.p)(",")),(0,_graphqlLanguageServiceParser.p)("]")],ObjectValue:[(0,_graphqlLanguageServiceParser.p)("{"),(0,_graphqlLanguageServiceParser.list)("ObjectField",(0,_graphqlLanguageServiceParser.p)(",")),(0,_graphqlLanguageServiceParser.p)("}")],ObjectField:[(0,_graphqlLanguageServiceParser.t)("String","property"),(0,_graphqlLanguageServiceParser.p)(":"),"Value"]}},{codemirror:66,"graphql-language-service-parser":82}],43:[function(require,module,exports){"use strict";function isMetaField(fieldDef){return"__"===fieldDef.name.slice(0,2)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.getFieldReference=function(typeInfo){return{kind:"Field",schema:typeInfo.schema,field:typeInfo.fieldDef,type:isMetaField(typeInfo.fieldDef)?null:typeInfo.parentType}},exports.getDirectiveReference=function(typeInfo){return{kind:"Directive",schema:typeInfo.schema,directive:typeInfo.directiveDef}},exports.getArgumentReference=function(typeInfo){return typeInfo.directiveDef?{kind:"Argument",schema:typeInfo.schema,argument:typeInfo.argDef,directive:typeInfo.directiveDef}:{kind:"Argument",schema:typeInfo.schema,argument:typeInfo.argDef,field:typeInfo.fieldDef,type:isMetaField(typeInfo.fieldDef)?null:typeInfo.parentType}},exports.getEnumValueReference=function(typeInfo){return{kind:"EnumValue",value:typeInfo.enumValue,type:(0,_graphql.getNamedType)(typeInfo.inputType)}},exports.getTypeReference=function(typeInfo,type){return{kind:"Type",schema:typeInfo.schema,type:type||typeInfo.type}};var _graphql=require("graphql")},{graphql:98}],44:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(stack,fn){for(var reverseStateStack=[],state=stack;state&&state.kind;)reverseStateStack.push(state),state=state.prevState;for(var i=reverseStateStack.length-1;i>=0;i--)fn(reverseStateStack[i])}},{}],45:[function(require,module,exports){"use strict";function getFieldDef(schema,type,fieldName){return fieldName===_introspection.SchemaMetaFieldDef.name&&schema.getQueryType()===type?_introspection.SchemaMetaFieldDef:fieldName===_introspection.TypeMetaFieldDef.name&&schema.getQueryType()===type?_introspection.TypeMetaFieldDef:fieldName===_introspection.TypeNameMetaFieldDef.name&&(0,_graphql.isCompositeType)(type)?_introspection.TypeNameMetaFieldDef:type.getFields?type.getFields()[fieldName]:void 0}function find(array,predicate){for(var i=0;itext.length&&(proximity-=suggestion.length-text.length-1,proximity+=0===suggestion.indexOf(text)?0:.5),proximity}function lexicalDistance(a,b){var i=void 0,j=void 0,d=[],aLength=a.length,bLength=b.length;for(i=0;i<=aLength;i++)d[i]=[i];for(j=1;j<=bLength;j++)d[0][j]=j;for(i=1;i<=aLength;i++)for(j=1;j<=bLength;j++){var cost=a[i-1]===b[j-1]?0:1;d[i][j]=Math.min(d[i-1][j]+1,d[i][j-1]+1,d[i-1][j-1]+cost),i>1&&j>1&&a[i-1]===b[j-2]&&a[i-2]===b[j-1]&&(d[i][j]=Math.min(d[i][j],d[i-2][j-2]+cost))}return d[aLength][bLength]}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(cursor,token,list){var hints=filterAndSortList(list,normalizeText(token.string));if(hints){var tokenStart=null!==token.type&&/"|\w/.test(token.string[0])?token.start:token.end;return{list:hints,from:{line:cursor.line,column:tokenStart},to:{line:cursor.line,column:token.end}}}}},{}],47:[function(require,module,exports){"use strict";function createState(options){return{options:options instanceof Function?{render:options}:!0===options?{}:options}}function getHoverTime(cm){var options=cm.state.info.options;return options&&options.hoverTime||500}function onMouseOver(cm,e){var state=cm.state.info,target=e.target||e.srcElement;if("SPAN"===target.nodeName&&void 0===state.hoverTimeout){var box=target.getBoundingClientRect(),hoverTime=getHoverTime(cm);state.hoverTimeout=setTimeout(onHover,hoverTime);var onMouseMove=function(){clearTimeout(state.hoverTimeout),state.hoverTimeout=setTimeout(onHover,hoverTime)},onMouseOut=function onMouseOut(){_codemirror2.default.off(document,"mousemove",onMouseMove),_codemirror2.default.off(cm.getWrapperElement(),"mouseout",onMouseOut),clearTimeout(state.hoverTimeout),state.hoverTimeout=void 0},onHover=function(){_codemirror2.default.off(document,"mousemove",onMouseMove),_codemirror2.default.off(cm.getWrapperElement(),"mouseout",onMouseOut),state.hoverTimeout=void 0,onMouseHover(cm,box)};_codemirror2.default.on(document,"mousemove",onMouseMove),_codemirror2.default.on(cm.getWrapperElement(),"mouseout",onMouseOut)}}function onMouseHover(cm,box){var pos=cm.coordsChar({left:(box.left+box.right)/2,top:(box.top+box.bottom)/2}),options=cm.state.info.options,render=options.render||cm.getHelper(pos,"info");if(render){var token=cm.getTokenAt(pos,!0);if(token){var info=render(token,options,cm,pos);info&&showPopup(cm,box,info)}}}function showPopup(cm,box,info){var popup=document.createElement("div");popup.className="CodeMirror-info",popup.appendChild(info),document.body.appendChild(popup);var popupBox=popup.getBoundingClientRect(),popupStyle=popup.currentStyle||window.getComputedStyle(popup),popupWidth=popupBox.right-popupBox.left+parseFloat(popupStyle.marginLeft)+parseFloat(popupStyle.marginRight),popupHeight=popupBox.bottom-popupBox.top+parseFloat(popupStyle.marginTop)+parseFloat(popupStyle.marginBottom),topPos=box.bottom;popupHeight>window.innerHeight-box.bottom-15&&box.top>window.innerHeight-box.bottom&&(topPos=box.top-popupHeight),topPos<0&&(topPos=box.bottom);var leftPos=Math.max(0,window.innerWidth-popupWidth-15);leftPos>box.left&&(leftPos=box.left),popup.style.opacity=1,popup.style.top=topPos+"px",popup.style.left=leftPos+"px";var popupTimeout=void 0,onMouseOverPopup=function(){clearTimeout(popupTimeout)},onMouseOut=function(){clearTimeout(popupTimeout),popupTimeout=setTimeout(hidePopup,200)},hidePopup=function(){_codemirror2.default.off(popup,"mouseover",onMouseOverPopup),_codemirror2.default.off(popup,"mouseout",onMouseOut),_codemirror2.default.off(cm.getWrapperElement(),"mouseout",onMouseOut),popup.style.opacity?(popup.style.opacity=0,setTimeout(function(){popup.parentNode&&popup.parentNode.removeChild(popup)},600)):popup.parentNode&&popup.parentNode.removeChild(popup)};_codemirror2.default.on(popup,"mouseover",onMouseOverPopup),_codemirror2.default.on(popup,"mouseout",onMouseOut),_codemirror2.default.on(cm.getWrapperElement(),"mouseout",onMouseOut)}var _codemirror2=function(obj){return obj&&obj.__esModule?obj:{default:obj}}(require("codemirror"));_codemirror2.default.defineOption("info",!1,function(cm,options,old){if(old&&old!==_codemirror2.default.Init){var oldOnMouseOver=cm.state.info.onMouseOver;_codemirror2.default.off(cm.getWrapperElement(),"mouseover",oldOnMouseOver),clearTimeout(cm.state.info.hoverTimeout),delete cm.state.info}if(options){var state=cm.state.info=createState(options);state.onMouseOver=onMouseOver.bind(null,cm),_codemirror2.default.on(cm.getWrapperElement(),"mouseover",state.onMouseOver)}})},{codemirror:66}],48:[function(require,module,exports){"use strict";function parseObj(){var nodeStart=start,members=[];if(expect("{"),!skip("}")){do{members.push(parseMember())}while(skip(","));expect("}")}return{kind:"Object",start:nodeStart,end:lastEnd,members:members}}function parseMember(){var nodeStart=start,key="String"===kind?curToken():null;expect("String"),expect(":");var value=parseVal();return{kind:"Member",start:nodeStart,end:lastEnd,key:key,value:value}}function parseArr(){var nodeStart=start,values=[];if(expect("["),!skip("]")){do{values.push(parseVal())}while(skip(","));expect("]")}return{kind:"Array",start:nodeStart,end:lastEnd,values:values}}function parseVal(){switch(kind){case"[":return parseArr();case"{":return parseObj();case"String":case"Number":case"Boolean":case"Null":var token=curToken();return lex(),token}return expect("Value")}function curToken(){return{kind:kind,start:start,end:end,value:JSON.parse(string.slice(start,end))}}function expect(str){if(kind!==str){var found=void 0;if("EOF"===kind)found="[end of file]";else if(end-start>1)found="`"+string.slice(start,end)+"`";else{var match=string.slice(start).match(/^.+?\b/);found="`"+(match?match[0]:string[start])+"`"}throw syntaxError("Expected "+str+" but found "+found+".")}lex()}function syntaxError(message){return{message:message,start:start,end:end}}function skip(k){if(kind===k)return lex(),!0}function ch(){end31;)if(92===code)switch(ch(),code){case 34:case 47:case 92:case 98:case 102:case 110:case 114:case 116:ch();break;case 117:ch(),readHex(),readHex(),readHex(),readHex();break;default:throw syntaxError("Bad character escape sequence.")}else{if(end===strLen)throw syntaxError("Unterminated string.");ch()}if(34!==code)throw syntaxError("Unterminated string.");ch()}function readHex(){if(code>=48&&code<=57||code>=65&&code<=70||code>=97&&code<=102)return ch();throw syntaxError("Expected hexadecimal digit.")}function readNumber(){45===code&&ch(),48===code?ch():readDigits(),46===code&&(ch(),readDigits()),69!==code&&101!==code||(ch(),43!==code&&45!==code||ch(),readDigits())}function readDigits(){if(code<48||code>57)throw syntaxError("Expected decimal digit.");do{ch()}while(code>=48&&code<=57)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(str){string=str,strLen=str.length,start=end=lastEnd=-1,ch(),lex();var ast=parseObj();return expect("EOF"),ast};var string=void 0,strLen=void 0,start=void 0,end=void 0,lastEnd=void 0,code=void 0,kind=void 0},{}],49:[function(require,module,exports){"use strict";function onMouseOver(cm,event){var target=event.target||event.srcElement;if("SPAN"===target.nodeName){var box=target.getBoundingClientRect(),cursor={left:(box.left+box.right)/2,top:(box.top+box.bottom)/2};cm.state.jump.cursor=cursor,cm.state.jump.isHoldingModifier&&enableJumpMode(cm)}}function onMouseOut(cm){cm.state.jump.isHoldingModifier||!cm.state.jump.cursor?cm.state.jump.isHoldingModifier&&cm.state.jump.marker&&disableJumpMode(cm):cm.state.jump.cursor=null}function onKeyDown(cm,event){if(!cm.state.jump.isHoldingModifier&&isJumpModifier(event.key)){cm.state.jump.isHoldingModifier=!0,cm.state.jump.cursor&&enableJumpMode(cm);var onClick=function(clickEvent){var destination=cm.state.jump.destination;destination&&cm.state.jump.options.onClick(destination,clickEvent)},onMouseDown=function(_,downEvent){cm.state.jump.destination&&(downEvent.codemirrorIgnore=!0)};_codemirror2.default.on(document,"keyup",function onKeyUp(upEvent){upEvent.code===event.code&&(cm.state.jump.isHoldingModifier=!1,cm.state.jump.marker&&disableJumpMode(cm),_codemirror2.default.off(document,"keyup",onKeyUp),_codemirror2.default.off(document,"click",onClick),cm.off("mousedown",onMouseDown))}),_codemirror2.default.on(document,"click",onClick),cm.on("mousedown",onMouseDown)}}function isJumpModifier(key){return key===(isMac?"Meta":"Control")}function enableJumpMode(cm){if(!cm.state.jump.marker){var cursor=cm.state.jump.cursor,pos=cm.coordsChar(cursor),token=cm.getTokenAt(pos,!0),options=cm.state.jump.options,getDestination=options.getDestination||cm.getHelper(pos,"jump");if(getDestination){var destination=getDestination(token,options,cm);if(destination){var marker=cm.markText({line:pos.line,ch:token.start},{line:pos.line,ch:token.end},{className:"CodeMirror-jump-token"});cm.state.jump.marker=marker,cm.state.jump.destination=destination}}}}function disableJumpMode(cm){var marker=cm.state.jump.marker;cm.state.jump.marker=null,cm.state.jump.destination=null,marker.clear()}var _codemirror2=function(obj){return obj&&obj.__esModule?obj:{default:obj}}(require("codemirror"));_codemirror2.default.defineOption("jump",!1,function(cm,options,old){if(old&&old!==_codemirror2.default.Init){var oldOnMouseOver=cm.state.jump.onMouseOver;_codemirror2.default.off(cm.getWrapperElement(),"mouseover",oldOnMouseOver);var oldOnMouseOut=cm.state.jump.onMouseOut;_codemirror2.default.off(cm.getWrapperElement(),"mouseout",oldOnMouseOut),_codemirror2.default.off(document,"keydown",cm.state.jump.onKeyDown),delete cm.state.jump}if(options){var state=cm.state.jump={options:options,onMouseOver:onMouseOver.bind(null,cm),onMouseOut:onMouseOut.bind(null,cm),onKeyDown:onKeyDown.bind(null,cm)};_codemirror2.default.on(cm.getWrapperElement(),"mouseover",state.onMouseOver),_codemirror2.default.on(cm.getWrapperElement(),"mouseout",state.onMouseOut),_codemirror2.default.on(document,"keydown",state.onKeyDown)}});var isMac=navigator&&-1!==navigator.appVersion.indexOf("Mac")},{codemirror:66}],50:[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function getVariablesHint(cur,token,options){var state="Invalid"===token.state.kind?token.state.prevState:token.state,kind=state.kind,step=state.step;if("Document"===kind&&0===step)return(0,_hintList2.default)(cur,token,[{text:"{"}]);var variableToType=options.variableToType;if(variableToType){var typeInfo=getTypeInfo(variableToType,token.state);if("Document"===kind||"Variable"===kind&&0===step){var variableNames=Object.keys(variableToType);return(0,_hintList2.default)(cur,token,variableNames.map(function(name){return{text:'"'+name+'": ',type:variableToType[name]}}))}if(("ObjectValue"===kind||"ObjectField"===kind&&0===step)&&typeInfo.fields){var inputFields=Object.keys(typeInfo.fields).map(function(fieldName){return typeInfo.fields[fieldName]});return(0,_hintList2.default)(cur,token,inputFields.map(function(field){return{text:'"'+field.name+'": ',type:field.type,description:field.description}}))}if("StringValue"===kind||"NumberValue"===kind||"BooleanValue"===kind||"NullValue"===kind||"ListValue"===kind&&1===step||"ObjectField"===kind&&2===step||"Variable"===kind&&2===step){var namedInputType=(0,_graphql.getNamedType)(typeInfo.type);if(namedInputType instanceof _graphql.GraphQLInputObjectType)return(0,_hintList2.default)(cur,token,[{text:"{"}]);if(namedInputType instanceof _graphql.GraphQLEnumType){var valueMap=namedInputType.getValues(),values=Object.keys(valueMap).map(function(name){return valueMap[name]});return(0,_hintList2.default)(cur,token,values.map(function(value){return{text:'"'+value.name+'"',type:namedInputType,description:value.description}}))}if(namedInputType===_graphql.GraphQLBoolean)return(0,_hintList2.default)(cur,token,[{text:"true",type:_graphql.GraphQLBoolean,description:"Not false."},{text:"false",type:_graphql.GraphQLBoolean,description:"Not true."}])}}}function getTypeInfo(variableToType,tokenState){var info={type:null,fields:null};return(0,_forEachState2.default)(tokenState,function(state){if("Variable"===state.kind)info.type=variableToType[state.name];else if("ListValue"===state.kind){var nullableType=(0,_graphql.getNullableType)(info.type);info.type=nullableType instanceof _graphql.GraphQLList?nullableType.ofType:null}else if("ObjectValue"===state.kind){var objectType=(0,_graphql.getNamedType)(info.type);info.fields=objectType instanceof _graphql.GraphQLInputObjectType?objectType.getFields():null}else if("ObjectField"===state.kind){var objectField=state.name&&info.fields?info.fields[state.name]:null;info.type=objectField&&objectField.type}}),info}var _codemirror2=_interopRequireDefault(require("codemirror")),_graphql=require("graphql"),_forEachState2=_interopRequireDefault(require("../utils/forEachState")),_hintList2=_interopRequireDefault(require("../utils/hintList"));_codemirror2.default.registerHelper("hint","graphql-variables",function(editor,options){var cur=editor.getCursor(),token=editor.getTokenAt(cur),results=getVariablesHint(cur,token,options);return results&&results.list&&results.list.length>0&&(results.from=_codemirror2.default.Pos(results.from.line,results.from.column),results.to=_codemirror2.default.Pos(results.to.line,results.to.column),_codemirror2.default.signal(editor,"hasCompletion",editor,results,token)),results})},{"../utils/forEachState":44,"../utils/hintList":46,codemirror:66,graphql:98}],51:[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function validateVariables(editor,variableToType,variablesAST){var errors=[];return variablesAST.members.forEach(function(member){var variableName=member.key.value,type=variableToType[variableName];type?validateValue(type,member.value).forEach(function(_ref){var node=_ref[0],message=_ref[1];errors.push(lintError(editor,node,message))}):errors.push(lintError(editor,member.key,'Variable "$'+variableName+'" does not appear in any GraphQL query.'))}),errors}function validateValue(type,valueAST){if(type instanceof _graphql.GraphQLNonNull)return"Null"===valueAST.kind?[[valueAST,'Type "'+type+'" is non-nullable and cannot be null.']]:validateValue(type.ofType,valueAST);if("Null"===valueAST.kind)return[];if(type instanceof _graphql.GraphQLList){var itemType=type.ofType;return"Array"===valueAST.kind?mapCat(valueAST.values,function(item){return validateValue(itemType,item)}):validateValue(itemType,valueAST)}if(type instanceof _graphql.GraphQLInputObjectType){if("Object"!==valueAST.kind)return[[valueAST,'Type "'+type+'" must be an Object.']];var providedFields=Object.create(null),fieldErrors=mapCat(valueAST.members,function(member){var fieldName=member.key.value;providedFields[fieldName]=!0;var inputField=type.getFields()[fieldName];return inputField?validateValue(inputField?inputField.type:void 0,member.value):[[member.key,'Type "'+type+'" does not have a field "'+fieldName+'".']]});return Object.keys(type.getFields()).forEach(function(fieldName){providedFields[fieldName]||type.getFields()[fieldName].type instanceof _graphql.GraphQLNonNull&&fieldErrors.push([valueAST,'Object of type "'+type+'" is missing required field "'+fieldName+'".'])}),fieldErrors}return"Boolean"===type.name&&"Boolean"!==valueAST.kind||"String"===type.name&&"String"!==valueAST.kind||"ID"===type.name&&"Number"!==valueAST.kind&&"String"!==valueAST.kind||"Float"===type.name&&"Number"!==valueAST.kind||"Int"===type.name&&("Number"!==valueAST.kind||(0|valueAST.value)!==valueAST.value)?[[valueAST,'Expected value of type "'+type+'".']]:(type instanceof _graphql.GraphQLEnumType||type instanceof _graphql.GraphQLScalarType)&&("String"!==valueAST.kind&&"Number"!==valueAST.kind&&"Boolean"!==valueAST.kind&&"Null"!==valueAST.kind||isNullish(type.parseValue(valueAST.value)))?[[valueAST,'Expected value of type "'+type+'".']]:[]}function lintError(editor,node,message){return{message:message,severity:"error",type:"validation",from:editor.posFromIndex(node.start),to:editor.posFromIndex(node.end)}}function isNullish(value){return null===value||void 0===value||value!==value}function mapCat(array,mapper){return Array.prototype.concat.apply([],array.map(mapper))}var _codemirror2=_interopRequireDefault(require("codemirror")),_graphql=require("graphql"),_jsonParse2=_interopRequireDefault(require("../utils/jsonParse"));_codemirror2.default.registerHelper("lint","graphql-variables",function(text,options,editor){if(!text)return[];var ast=void 0;try{ast=(0,_jsonParse2.default)(text)}catch(syntaxError){if(syntaxError.stack)throw syntaxError;return[lintError(editor,syntaxError,syntaxError.message)]}var variableToType=options.variableToType;return variableToType?validateVariables(editor,variableToType,ast):[]})},{"../utils/jsonParse":48,codemirror:66,graphql:98}],52:[function(require,module,exports){"use strict";function indent(state,textAfter){var levels=state.levels;return(levels&&0!==levels.length?levels[levels.length-1]-(this.electricInput.test(textAfter)?1:0):state.indentLevel)*this.config.indentUnit}function namedKey(style){return{style:style,match:function(token){return"String"===token.kind},update:function(state,token){state.name=token.value.slice(1,-1)}}}var _codemirror2=function(obj){return obj&&obj.__esModule?obj:{default:obj}}(require("codemirror")),_graphqlLanguageServiceParser=require("graphql-language-service-parser");_codemirror2.default.defineMode("graphql-variables",function(config){var parser=(0,_graphqlLanguageServiceParser.onlineParser)({eatWhitespace:function(stream){return stream.eatSpace()},lexRules:LexRules,parseRules:ParseRules,editorConfig:{tabSize:config.tabSize}});return{config:config,startState:parser.startState,token:parser.token,indent:indent,electricInput:/^\s*[}\]]/,fold:"brace",closeBrackets:{pairs:'[]{}""',explode:"[]{}"}}});var LexRules={Punctuation:/^\[|]|\{|\}|:|,/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?/,Keyword:/^true|false|null/},ParseRules={Document:[(0,_graphqlLanguageServiceParser.p)("{"),(0,_graphqlLanguageServiceParser.list)("Variable",(0,_graphqlLanguageServiceParser.opt)((0,_graphqlLanguageServiceParser.p)(","))),(0,_graphqlLanguageServiceParser.p)("}")],Variable:[namedKey("variable"),(0,_graphqlLanguageServiceParser.p)(":"),"Value"],Value:function(token){switch(token.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(token.value){case"[":return"ListValue";case"{":return"ObjectValue"}return null;case"Keyword":switch(token.value){case"true":case"false":return"BooleanValue";case"null":return"NullValue"}return null}},NumberValue:[(0,_graphqlLanguageServiceParser.t)("Number","number")],StringValue:[(0,_graphqlLanguageServiceParser.t)("String","string")],BooleanValue:[(0,_graphqlLanguageServiceParser.t)("Keyword","builtin")],NullValue:[(0,_graphqlLanguageServiceParser.t)("Keyword","keyword")],ListValue:[(0,_graphqlLanguageServiceParser.p)("["),(0,_graphqlLanguageServiceParser.list)("Value",(0,_graphqlLanguageServiceParser.opt)((0,_graphqlLanguageServiceParser.p)(","))),(0,_graphqlLanguageServiceParser.p)("]")],ObjectValue:[(0,_graphqlLanguageServiceParser.p)("{"),(0,_graphqlLanguageServiceParser.list)("ObjectField",(0,_graphqlLanguageServiceParser.opt)((0,_graphqlLanguageServiceParser.p)(","))),(0,_graphqlLanguageServiceParser.p)("}")],ObjectField:[namedKey("attribute"),(0,_graphqlLanguageServiceParser.p)(":"),"Value"]}},{codemirror:66,"graphql-language-service-parser":82}],53:[function(require,module,exports){!function(mod){mod("object"==typeof exports&&"object"==typeof module?require("../../lib/codemirror"):CodeMirror)}(function(CodeMirror){"use strict";function firstNonWS(str){var found=str.search(nonWS);return-1==found?0:found}function probablyInsideString(cm,pos,line){return/\bstring\b/.test(cm.getTokenTypeAt(Pos(pos.line,0)))&&!/^[\'\"\`]/.test(line)}function getMode(cm,pos){var mode=cm.getMode();return!1!==mode.useInnerComments&&mode.innerMode?cm.getModeAt(pos):mode}var noOptions={},nonWS=/[^\s\u00a0]/,Pos=CodeMirror.Pos;CodeMirror.commands.toggleComment=function(cm){cm.toggleComment()},CodeMirror.defineExtension("toggleComment",function(options){options||(options=noOptions);for(var cm=this,minLine=1/0,ranges=this.listSelections(),mode=null,i=ranges.length-1;i>=0;i--){var from=ranges[i].from(),to=ranges[i].to();from.line>=minLine||(to.line>=minLine&&(to=Pos(minLine,0)),minLine=from.line,null==mode?cm.uncomment(from,to,options)?mode="un":(cm.lineComment(from,to,options),mode="line"):"un"==mode?cm.uncomment(from,to,options):cm.lineComment(from,to,options))}}),CodeMirror.defineExtension("lineComment",function(from,to,options){options||(options=noOptions);var self=this,mode=getMode(self,from),firstLine=self.getLine(from.line);if(null!=firstLine&&!probablyInsideString(self,from,firstLine)){var commentString=options.lineComment||mode.lineComment;if(commentString){var end=Math.min(0!=to.ch||to.line==from.line?to.line+1:to.line,self.lastLine()+1),pad=null==options.padding?" ":options.padding,blankLines=options.commentBlankLines||from.line==to.line;self.operation(function(){if(options.indent){for(var baseString=null,i=from.line;iwhitespace.length)&&(baseString=whitespace)}for(i=from.line;iend||self.operation(function(){if(0!=options.fullLines){var lastLineHasText=nonWS.test(self.getLine(end));self.replaceRange(pad+endString,Pos(end)),self.replaceRange(startString+pad,Pos(from.line,0));var lead=options.blockCommentLead||mode.blockCommentLead;if(null!=lead)for(var i=from.line+1;i<=end;++i)(i!=end||lastLineHasText)&&self.replaceRange(lead+pad,Pos(i,0))}else self.replaceRange(endString,to),self.replaceRange(startString,from)})}}else(options.lineComment||mode.lineComment)&&0!=options.fullLines&&self.lineComment(from,to,options)}),CodeMirror.defineExtension("uncomment",function(from,to,options){options||(options=noOptions);var didSomething,self=this,mode=getMode(self,from),end=Math.min(0!=to.ch||to.line==from.line?to.line:to.line-1,self.lastLine()),start=Math.min(from.line,end),lineString=options.lineComment||mode.lineComment,lines=[],pad=null==options.padding?" ":options.padding;lineComment:if(lineString){for(var i=start;i<=end;++i){var line=self.getLine(i),found=line.indexOf(lineString);if(found>-1&&!/comment/.test(self.getTokenTypeAt(Pos(i,found+1)))&&(found=-1),-1==found&&nonWS.test(line))break lineComment;if(found>-1&&nonWS.test(line.slice(0,found)))break lineComment;lines.push(line)}if(self.operation(function(){for(var i=start;i<=end;++i){var line=lines[i-start],pos=line.indexOf(lineString),endPos=pos+lineString.length;pos<0||(line.slice(endPos,endPos+pad.length)==pad&&(endPos+=pad.length),didSomething=!0,self.replaceRange("",Pos(i,pos),Pos(i,endPos)))}}),didSomething)return!0}var startString=options.blockCommentStart||mode.blockCommentStart,endString=options.blockCommentEnd||mode.blockCommentEnd;if(!startString||!endString)return!1;var lead=options.blockCommentLead||mode.blockCommentLead,startLine=self.getLine(start),open=startLine.indexOf(startString);if(-1==open)return!1;var endLine=end==start?startLine:self.getLine(end),close=endLine.indexOf(endString,end==start?open+startString.length:0);-1==close&&start!=end&&(endLine=self.getLine(--end),close=endLine.indexOf(endString));var insideStart=Pos(start,open+1),insideEnd=Pos(end,close+1);if(-1==close||!/comment/.test(self.getTokenTypeAt(insideStart))||!/comment/.test(self.getTokenTypeAt(insideEnd))||self.getRange(insideStart,insideEnd,"\n").indexOf(endString)>-1)return!1;var lastStart=startLine.lastIndexOf(startString,from.ch),firstEnd=-1==lastStart?-1:startLine.slice(0,from.ch).indexOf(endString,lastStart+startString.length);if(-1!=lastStart&&-1!=firstEnd&&firstEnd+endString.length!=from.ch)return!1;firstEnd=endLine.indexOf(endString,to.ch);var almostLastStart=endLine.slice(to.ch).lastIndexOf(startString,firstEnd-to.ch);return lastStart=-1==firstEnd||-1==almostLastStart?-1:to.ch+almostLastStart,(-1==firstEnd||-1==lastStart||lastStart==to.ch)&&(self.operation(function(){self.replaceRange("",Pos(end,close-(pad&&endLine.slice(close-pad.length,close)==pad?pad.length:0)),Pos(end,close+endString.length));var openEnd=open+startString.length;if(pad&&startLine.slice(openEnd,openEnd+pad.length)==pad&&(openEnd+=pad.length),self.replaceRange("",Pos(start,open),Pos(start,openEnd)),lead)for(var i=start+1;i<=end;++i){var line=self.getLine(i),found=line.indexOf(lead);if(-1!=found&&!nonWS.test(line.slice(0,found))){var foundEnd=found+lead.length;pad&&line.slice(foundEnd,foundEnd+pad.length)==pad&&(foundEnd+=pad.length),self.replaceRange("",Pos(i,found),Pos(i,foundEnd))}}}),!0)})})},{"../../lib/codemirror":66}],54:[function(require,module,exports){!function(mod){mod("object"==typeof exports&&"object"==typeof module?require("../../lib/codemirror"):CodeMirror)}(function(CodeMirror){function dialogDiv(cm,template,bottom){var dialog;return dialog=cm.getWrapperElement().appendChild(document.createElement("div")),dialog.className=bottom?"CodeMirror-dialog CodeMirror-dialog-bottom":"CodeMirror-dialog CodeMirror-dialog-top","string"==typeof template?dialog.innerHTML=template:dialog.appendChild(template),dialog}function closeNotification(cm,newVal){cm.state.currentNotificationClose&&cm.state.currentNotificationClose(),cm.state.currentNotificationClose=newVal}CodeMirror.defineExtension("openDialog",function(template,callback,options){function close(newVal){if("string"==typeof newVal)inp.value=newVal;else{if(closed)return;closed=!0,dialog.parentNode.removeChild(dialog),me.focus(),options.onClose&&options.onClose(dialog)}}options||(options={}),closeNotification(this,null);var button,dialog=dialogDiv(this,template,options.bottom),closed=!1,me=this,inp=dialog.getElementsByTagName("input")[0];return inp?(inp.focus(),options.value&&(inp.value=options.value,!1!==options.selectValueOnOpen&&inp.select()),options.onInput&&CodeMirror.on(inp,"input",function(e){options.onInput(e,inp.value,close)}),options.onKeyUp&&CodeMirror.on(inp,"keyup",function(e){options.onKeyUp(e,inp.value,close)}),CodeMirror.on(inp,"keydown",function(e){options&&options.onKeyDown&&options.onKeyDown(e,inp.value,close)||((27==e.keyCode||!1!==options.closeOnEnter&&13==e.keyCode)&&(inp.blur(),CodeMirror.e_stop(e),close()),13==e.keyCode&&callback(inp.value,e))}),!1!==options.closeOnBlur&&CodeMirror.on(inp,"blur",close)):(button=dialog.getElementsByTagName("button")[0])&&(CodeMirror.on(button,"click",function(){close(),me.focus()}),!1!==options.closeOnBlur&&CodeMirror.on(button,"blur",close),button.focus()),close}),CodeMirror.defineExtension("openConfirm",function(template,callbacks,options){function close(){closed||(closed=!0,dialog.parentNode.removeChild(dialog),me.focus())}closeNotification(this,null);var dialog=dialogDiv(this,template,options&&options.bottom),buttons=dialog.getElementsByTagName("button"),closed=!1,me=this,blurring=1;buttons[0].focus();for(var i=0;i0;return{anchor:new Pos(sel.anchor.line,sel.anchor.ch+(inverted?-1:1)),head:new Pos(sel.head.line,sel.head.ch+(inverted?1:-1))}}function handleChar(cm,ch){var conf=getConfig(cm);if(!conf||cm.getOption("disableInput"))return CodeMirror.Pass;var pairs=getOption(conf,"pairs"),pos=pairs.indexOf(ch);if(-1==pos)return CodeMirror.Pass;for(var type,triples=getOption(conf,"triples"),identical=pairs.charAt(pos+1)==ch,ranges=cm.listSelections(),opening=pos%2==0,i=0;i1&&triples.indexOf(ch)>=0&&cm.getRange(Pos(cur.line,cur.ch-2),cur)==ch+ch&&(cur.ch<=2||cm.getRange(Pos(cur.line,cur.ch-3),Pos(cur.line,cur.ch-2))!=ch))curType="addFour";else if(identical){if(CodeMirror.isWordChar(next)||!enteringString(cm,cur,ch))return CodeMirror.Pass;curType="both"}else{if(!opening||cm.getLine(cur.line).length!=cur.ch&&!isClosingBracket(next,pairs)&&!/\s/.test(next))return CodeMirror.Pass;curType="both"}else curType=identical&&stringStartsAfter(cm,cur)?"both":triples.indexOf(ch)>=0&&cm.getRange(cur,Pos(cur.line,cur.ch+3))==ch+ch+ch?"skipThree":"skip";if(type){if(type!=curType)return CodeMirror.Pass}else type=curType}var left=pos%2?pairs.charAt(pos-1):ch,right=pos%2?ch:pairs.charAt(pos+1);cm.operation(function(){if("skip"==type)cm.execCommand("goCharRight");else if("skipThree"==type)for(i=0;i<3;i++)cm.execCommand("goCharRight");else if("surround"==type){for(var sels=cm.getSelections(),i=0;i-1&&pos%2==1}function charsAround(cm,pos){var str=cm.getRange(Pos(pos.line,pos.ch-1),Pos(pos.line,pos.ch+1));return 2==str.length?str:null}function enteringString(cm,pos,ch){var line=cm.getLine(pos.line),token=cm.getTokenAt(pos);if(/\bstring2?\b/.test(token.type)||stringStartsAfter(cm,pos))return!1;var stream=new CodeMirror.StringStream(line.slice(0,pos.ch)+ch+line.slice(pos.ch),4);for(stream.pos=stream.start=token.start;;){var type1=cm.getMode().token(stream,token.state);if(stream.pos>=pos.ch+1)return/\bstring2?\b/.test(type1);stream.start=stream.pos}}function stringStartsAfter(cm,pos){var token=cm.getTokenAt(Pos(pos.line,pos.ch+1));return/\bstring/.test(token.type)&&token.start==pos.ch}var defaults={pairs:"()[]{}''\"\"",triples:"",explode:"[]{}"},Pos=CodeMirror.Pos;CodeMirror.defineOption("autoCloseBrackets",!1,function(cm,val,old){old&&old!=CodeMirror.Init&&(cm.removeKeyMap(keyMap),cm.state.closeBrackets=null),val&&(cm.state.closeBrackets=val,cm.addKeyMap(keyMap))});for(var bind=defaults.pairs+"`",keyMap={Backspace:function(cm){var conf=getConfig(cm);if(!conf||cm.getOption("disableInput"))return CodeMirror.Pass;for(var pairs=getOption(conf,"pairs"),ranges=cm.listSelections(),i=0;i=0;i--){var cur=ranges[i].head;cm.replaceRange("",Pos(cur.line,cur.ch-1),Pos(cur.line,cur.ch+1),"+delete")}},Enter:function(cm){var conf=getConfig(cm),explode=conf&&getOption(conf,"explode");if(!explode||cm.getOption("disableInput"))return CodeMirror.Pass;for(var ranges=cm.listSelections(),i=0;i=0&&matching[line.text.charAt(pos)]||matching[line.text.charAt(++pos)];if(!match)return null;var dir=">"==match.charAt(1)?1:-1;if(config&&config.strict&&dir>0!=(pos==where.ch))return null;var style=cm.getTokenTypeAt(Pos(where.line,pos+1)),found=scanForBracket(cm,Pos(where.line,pos+(dir>0?1:0)),dir,style||null,config);return null==found?null:{from:Pos(where.line,pos),to:found&&found.pos,match:found&&found.ch==match.charAt(0),forward:dir>0}}function scanForBracket(cm,where,dir,style,config){for(var maxScanLen=config&&config.maxScanLineLength||1e4,maxScanLines=config&&config.maxScanLines||1e3,stack=[],re=config&&config.bracketRegex?config.bracketRegex:/[(){}[\]]/,lineEnd=dir>0?Math.min(where.line+maxScanLines,cm.lastLine()+1):Math.max(cm.firstLine()-1,where.line-maxScanLines),lineNo=where.line;lineNo!=lineEnd;lineNo+=dir){var line=cm.getLine(lineNo);if(line){var pos=dir>0?0:line.length-1,end=dir>0?line.length:-1;if(!(line.length>maxScanLen))for(lineNo==where.line&&(pos=where.ch-(dir<0?1:0));pos!=end;pos+=dir){var ch=line.charAt(pos);if(re.test(ch)&&(void 0===style||cm.getTokenTypeAt(Pos(lineNo,pos+1))==style))if(">"==matching[ch].charAt(1)==dir>0)stack.push(ch);else{if(!stack.length)return{pos:Pos(lineNo,pos),ch:ch};stack.pop()}}}}return lineNo-dir!=(dir>0?cm.lastLine():cm.firstLine())&&null}function matchBrackets(cm,autoclear,config){for(var maxHighlightLen=cm.state.matchBrackets.maxHighlightLineLength||1e3,marks=[],ranges=cm.listSelections(),i=0;i",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"},currentlyHighlighted=null;CodeMirror.defineOption("matchBrackets",!1,function(cm,val,old){old&&old!=CodeMirror.Init&&(cm.off("cursorActivity",doMatchBrackets),currentlyHighlighted&&(currentlyHighlighted(),currentlyHighlighted=null)),val&&(cm.state.matchBrackets="object"==typeof val?val:{},cm.on("cursorActivity",doMatchBrackets))}),CodeMirror.defineExtension("matchBrackets",function(){matchBrackets(this,!0)}),CodeMirror.defineExtension("findMatchingBracket",function(pos,config,oldConfig){return(oldConfig||"boolean"==typeof config)&&(oldConfig?(oldConfig.strict=config,config=oldConfig):config=config?{strict:!0}:null),findMatchingBracket(this,pos,config)}),CodeMirror.defineExtension("scanForBracket",function(pos,dir,style,config){return scanForBracket(this,pos,dir,style,config)})})},{"../../lib/codemirror":66}],57:[function(require,module,exports){!function(mod){mod("object"==typeof exports&&"object"==typeof module?require("../../lib/codemirror"):CodeMirror)}(function(CodeMirror){"use strict";CodeMirror.registerHelper("fold","brace",function(cm,start){function findOpening(openCh){for(var at=start.ch,pass=0;;){var found=at<=0?-1:lineText.lastIndexOf(openCh,at-1);if(-1!=found){if(1==pass&&foundcm.lastLine())return null;var start=cm.getTokenAt(CodeMirror.Pos(line,1));if(/\S/.test(start.string)||(start=cm.getTokenAt(CodeMirror.Pos(line,start.end+1))),"keyword"!=start.type||"import"!=start.string)return null;for(var i=line,e=Math.min(cm.lastLine(),line+10);i<=e;++i){var semi=cm.getLine(i).indexOf(";");if(-1!=semi)return{startCh:start.end,end:CodeMirror.Pos(i,semi)}}}var prev,startLine=start.line,has=hasImport(startLine);if(!has||hasImport(startLine-1)||(prev=hasImport(startLine-2))&&prev.end.line==startLine-1)return null;for(var end=has.end;;){var next=hasImport(end.line+1);if(null==next)break;end=next.end}return{from:cm.clipPos(CodeMirror.Pos(startLine,has.startCh+1)),to:end}}),CodeMirror.registerHelper("fold","include",function(cm,start){function hasInclude(line){if(linecm.lastLine())return null;var start=cm.getTokenAt(CodeMirror.Pos(line,1));return/\S/.test(start.string)||(start=cm.getTokenAt(CodeMirror.Pos(line,start.end+1))),"meta"==start.type&&"#include"==start.string.slice(0,8)?start.start+8:void 0}var startLine=start.line,has=hasInclude(startLine);if(null==has||null!=hasInclude(startLine-1))return null;for(var end=startLine;null!=hasInclude(end+1);)++end;return{from:CodeMirror.Pos(startLine,has+1),to:cm.clipPos(CodeMirror.Pos(end))}})})},{"../../lib/codemirror":66}],58:[function(require,module,exports){!function(mod){mod("object"==typeof exports&&"object"==typeof module?require("../../lib/codemirror"):CodeMirror)}(function(CodeMirror){"use strict";function doFold(cm,pos,options,force){function getRange(allowFolded){var range=finder(cm,pos);if(!range||range.to.line-range.from.linecm.firstLine();)pos=CodeMirror.Pos(pos.line-1,0),range=getRange(!1);if(range&&!range.cleared&&"unfold"!==force){var myWidget=makeWidget(cm,options);CodeMirror.on(myWidget,"mousedown",function(e){myRange.clear(),CodeMirror.e_preventDefault(e)});var myRange=cm.markText(range.from,range.to,{replacedWith:myWidget,clearOnEnter:getOption(cm,options,"clearOnEnter"),__isFold:!0});myRange.on("clear",function(from,to){CodeMirror.signal(cm,"unfold",cm,from,to)}),CodeMirror.signal(cm,"fold",cm,range.from,range.to)}}function makeWidget(cm,options){var widget=getOption(cm,options,"widget");if("string"==typeof widget){var text=document.createTextNode(widget);(widget=document.createElement("span")).appendChild(text),widget.className="CodeMirror-foldmarker"}return widget}function getOption(cm,options,name){if(options&&void 0!==options[name])return options[name];var editorOptions=cm.options.foldOptions;return editorOptions&&void 0!==editorOptions[name]?editorOptions[name]:defaultOptions[name]}CodeMirror.newFoldFunction=function(rangeFinder,widget){return function(cm,pos){doFold(cm,pos,{rangeFinder:rangeFinder,widget:widget})}},CodeMirror.defineExtension("foldCode",function(pos,options,force){doFold(this,pos,options,force)}),CodeMirror.defineExtension("isFolded",function(pos){for(var marks=this.findMarksAt(pos),i=0;i=minSize&&(mark=marker(opts.indicatorOpen))}cm.setGutterMarker(line,opts.gutter,mark),++cur})}function updateInViewport(cm){var vp=cm.getViewport(),state=cm.state.foldGutter;state&&(cm.operation(function(){updateFoldInfo(cm,vp.from,vp.to)}),state.from=vp.from,state.to=vp.to)}function onGutterClick(cm,line,gutter){var state=cm.state.foldGutter;if(state){var opts=state.options;if(gutter==opts.gutter){var folded=isFolded(cm,line);folded?folded.clear():cm.foldCode(Pos(line,0),opts.rangeFinder)}}}function onChange(cm){var state=cm.state.foldGutter;if(state){var opts=state.options;state.from=state.to=0,clearTimeout(state.changeUpdate),state.changeUpdate=setTimeout(function(){updateInViewport(cm)},opts.foldOnChangeTimeSpan||600)}}function onViewportChange(cm){var state=cm.state.foldGutter;if(state){var opts=state.options;clearTimeout(state.changeUpdate),state.changeUpdate=setTimeout(function(){var vp=cm.getViewport();state.from==state.to||vp.from-state.to>20||state.from-vp.to>20?updateInViewport(cm):cm.operation(function(){vp.fromstate.to&&(updateFoldInfo(cm,state.to,vp.to),state.to=vp.to)})},opts.updateViewportTimeSpan||400)}}function onFold(cm,from){var state=cm.state.foldGutter;if(state){var line=from.line;line>=state.from&&line0&&old.to.ch-old.from.ch!=nw.to.ch-nw.from.ch}function parseOptions(cm,pos,options){var editor=cm.options.hintOptions,out={};for(var prop in defaultOptions)out[prop]=defaultOptions[prop];if(editor)for(var prop in editor)void 0!==editor[prop]&&(out[prop]=editor[prop]);if(options)for(var prop in options)void 0!==options[prop]&&(out[prop]=options[prop]);return out.hint.resolve&&(out.hint=out.hint.resolve(cm,pos)),out}function getText(completion){return"string"==typeof completion?completion:completion.text}function buildKeyMap(completion,handle){function addBinding(key,val){var bound;bound="string"!=typeof val?function(cm){return val(cm,handle)}:baseMap.hasOwnProperty(val)?baseMap[val]:val,ourMap[key]=bound}var baseMap={Up:function(){handle.moveFocus(-1)},Down:function(){handle.moveFocus(1)},PageUp:function(){handle.moveFocus(1-handle.menuSize(),!0)},PageDown:function(){handle.moveFocus(handle.menuSize()-1,!0)},Home:function(){handle.setFocus(0)},End:function(){handle.setFocus(handle.length-1)},Enter:handle.pick,Tab:handle.pick,Esc:handle.close},custom=completion.options.customKeys,ourMap=custom?{}:baseMap;if(custom)for(var key in custom)custom.hasOwnProperty(key)&&addBinding(key,custom[key]);var extra=completion.options.extraKeys;if(extra)for(var key in extra)extra.hasOwnProperty(key)&&addBinding(key,extra[key]);return ourMap}function getHintElement(hintsElement,el){for(;el&&el!=hintsElement;){if("LI"===el.nodeName.toUpperCase()&&el.parentNode==hintsElement)return el;el=el.parentNode}}function Widget(completion,data){this.completion=completion,this.data=data,this.picked=!1;var widget=this,cm=completion.cm,hints=this.hints=document.createElement("ul");hints.className="CodeMirror-hints",this.selectedHint=data.selectedHint||0;for(var completions=data.list,i=0;ihints.clientHeight+1,startScroll=cm.getScrollInfo();if(overlapY>0){var height=box.bottom-box.top;if(pos.top-(pos.bottom-box.top)-height>0)hints.style.top=(top=pos.top-height)+"px",below=!1;else if(height>winH){hints.style.height=winH-5+"px",hints.style.top=(top=pos.bottom-box.top)+"px";var cursor=cm.getCursor();data.from.ch!=cursor.ch&&(pos=cm.cursorCoords(cursor),hints.style.left=(left=pos.left)+"px",box=hints.getBoundingClientRect())}}var overlapX=box.right-winW;if(overlapX>0&&(box.right-box.left>winW&&(hints.style.width=winW-5+"px",overlapX-=box.right-box.left-winW),hints.style.left=(left=pos.left-overlapX)+"px"),scrolls)for(var node=hints.firstChild;node;node=node.nextSibling)node.style.paddingRight=cm.display.nativeBarWidth+"px";if(cm.addKeyMap(this.keyMap=buildKeyMap(completion,{moveFocus:function(n,avoidWrap){widget.changeActive(widget.selectedHint+n,avoidWrap)},setFocus:function(n){widget.changeActive(n)},menuSize:function(){return widget.screenAmount()},length:completions.length,close:function(){completion.close()},pick:function(){widget.pick()},data:data})),completion.options.closeOnUnfocus){var closingOnBlur;cm.on("blur",this.onBlur=function(){closingOnBlur=setTimeout(function(){completion.close()},100)}),cm.on("focus",this.onFocus=function(){clearTimeout(closingOnBlur)})}return cm.on("scroll",this.onScroll=function(){var curScroll=cm.getScrollInfo(),editor=cm.getWrapperElement().getBoundingClientRect(),newTop=top+startScroll.top-curScroll.top,point=newTop-(window.pageYOffset||(document.documentElement||document.body).scrollTop);if(below||(point+=hints.offsetHeight),point<=editor.top||point>=editor.bottom)return completion.close();hints.style.top=newTop+"px",hints.style.left=left+startScroll.left-curScroll.left+"px"}),CodeMirror.on(hints,"dblclick",function(e){var t=getHintElement(hints,e.target||e.srcElement);t&&null!=t.hintId&&(widget.changeActive(t.hintId),widget.pick())}),CodeMirror.on(hints,"click",function(e){var t=getHintElement(hints,e.target||e.srcElement);t&&null!=t.hintId&&(widget.changeActive(t.hintId),completion.options.completeOnSingleClick&&widget.pick())}),CodeMirror.on(hints,"mousedown",function(){setTimeout(function(){cm.focus()},20)}),CodeMirror.signal(data,"select",completions[0],hints.firstChild),!0}function applicableHelpers(cm,helpers){if(!cm.somethingSelected())return helpers;for(var result=[],i=0;i1)){if(this.somethingSelected()){if(!options.hint.supportsSelection)return;for(var i=0;i=this.data.list.length?i=avoidWrap?this.data.list.length-1:0:i<0&&(i=avoidWrap?0:this.data.list.length-1),this.selectedHint!=i){var node=this.hints.childNodes[this.selectedHint];node.className=node.className.replace(" "+ACTIVE_HINT_ELEMENT_CLASS,""),(node=this.hints.childNodes[this.selectedHint=i]).className+=" "+ACTIVE_HINT_ELEMENT_CLASS,node.offsetTopthis.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=node.offsetTop+node.offsetHeight-this.hints.clientHeight+3),CodeMirror.signal(this.data,"select",this.data.list[this.selectedHint],node)}},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1}},CodeMirror.registerHelper("hint","auto",{resolve:function(cm,pos){var words,helpers=cm.getHelpers(pos,"hint");if(helpers.length){var resolved=function(cm,callback,options){function run(i){if(i==app.length)return callback(null);fetchHints(app[i],cm,options,function(result){result&&result.list.length>0?callback(result):run(i+1)})}var app=applicableHelpers(cm,helpers);run(0)};return resolved.async=!0,resolved.supportsSelection=!0,resolved}return(words=cm.getHelper(cm.getCursor(),"hintWords"))?function(cm){return CodeMirror.hint.fromList(cm,{words:words})}:CodeMirror.hint.anyword?function(cm,options){return CodeMirror.hint.anyword(cm,options)}:function(){}}}),CodeMirror.registerHelper("hint","fromList",function(cm,options){var cur=cm.getCursor(),token=cm.getTokenAt(cur),to=CodeMirror.Pos(cur.line,token.end);if(token.string&&/\w/.test(token.string[token.string.length-1]))var term=token.string,from=CodeMirror.Pos(cur.line,token.start);else var term="",from=to;for(var found=[],i=0;i,]/,closeOnUnfocus:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null};CodeMirror.defineOption("hintOptions",null)})},{"../../lib/codemirror":66}],61:[function(require,module,exports){!function(mod){mod("object"==typeof exports&&"object"==typeof module?require("../../lib/codemirror"):CodeMirror)}(function(CodeMirror){"use strict";function showTooltip(e,content){function position(e){if(!tt.parentNode)return CodeMirror.off(document,"mousemove",position);tt.style.top=Math.max(0,e.clientY-tt.offsetHeight-5)+"px",tt.style.left=e.clientX+5+"px"}var tt=document.createElement("div");return tt.className="CodeMirror-lint-tooltip",tt.appendChild(content.cloneNode(!0)),document.body.appendChild(tt),CodeMirror.on(document,"mousemove",position),position(e),null!=tt.style.opacity&&(tt.style.opacity=1),tt}function rm(elt){elt.parentNode&&elt.parentNode.removeChild(elt)}function hideTooltip(tt){tt.parentNode&&(null==tt.style.opacity&&rm(tt),tt.style.opacity=0,setTimeout(function(){rm(tt)},600))}function showTooltipFor(e,content,node){function hide(){CodeMirror.off(node,"mouseout",hide),tooltip&&(hideTooltip(tooltip),tooltip=null)}var tooltip=showTooltip(e,content),poll=setInterval(function(){if(tooltip)for(var n=node;;n=n.parentNode){if(n&&11==n.nodeType&&(n=n.host),n==document.body)return;if(!n){hide();break}}if(!tooltip)return clearInterval(poll)},400);CodeMirror.on(node,"mouseout",hide)}function LintState(cm,options,hasGutter){this.marked=[],this.options=options,this.timeout=null,this.hasGutter=hasGutter,this.onMouseOver=function(e){onMouseOver(cm,e)},this.waitingFor=0}function parseOptions(_cm,options){return options instanceof Function?{getAnnotations:options}:(options&&!0!==options||(options={}),options)}function clearMarks(cm){var state=cm.state.lint;state.hasGutter&&cm.clearGutter(GUTTER_ID);for(var i=0;i1,state.options.tooltips))}}options.onUpdateLinting&&options.onUpdateLinting(annotationsNotSorted,annotations,cm)}function onChange(cm){var state=cm.state.lint;state&&(clearTimeout(state.timeout),state.timeout=setTimeout(function(){startLinting(cm)},state.options.delay||500))}function popupTooltips(annotations,e){for(var target=e.target||e.srcElement,tooltip=document.createDocumentFragment(),i=0;i (Use line:column or scroll% syntax) ',"Jump to line:",cur.line+1+":"+cur.ch,function(posStr){if(posStr){var match;if(match=/^\s*([\+\-]?\d+)\s*\:\s*(\d+)\s*$/.exec(posStr))cm.setCursor(interpretLine(cm,match[1]),Number(match[2]));else if(match=/^\s*([\+\-]?\d+(\.\d+)?)\%\s*/.exec(posStr)){var line=Math.round(cm.lineCount()*Number(match[1])/100);/^[-+]/.test(match[1])&&(line=cur.line+line+1),cm.setCursor(line-1,cur.ch)}else(match=/^\s*\:?\s*([\+\-]?\d+)\s*/.exec(posStr))&&cm.setCursor(interpretLine(cm,match[1]),cur.ch)}})},CodeMirror.keyMap.default["Alt-G"]="jumpToLine"})},{"../../lib/codemirror":66,"../dialog/dialog":54}],63:[function(require,module,exports){!function(mod){"object"==typeof exports&&"object"==typeof module?mod(require("../../lib/codemirror"),require("./searchcursor"),require("../dialog/dialog")):mod(CodeMirror)}(function(CodeMirror){"use strict";function searchOverlay(query,caseInsensitive){return"string"==typeof query?query=new RegExp(query.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),caseInsensitive?"gi":"g"):query.global||(query=new RegExp(query.source,query.ignoreCase?"gi":"g")),{token:function(stream){query.lastIndex=stream.pos;var match=query.exec(stream.string);if(match&&match.index==stream.pos)return stream.pos+=match[0].length||1,"searching";match?stream.pos=match.index:stream.skipToEnd()}}}function SearchState(){this.posFrom=this.posTo=this.lastQuery=this.query=null,this.overlay=null}function getSearchState(cm){return cm.state.search||(cm.state.search=new SearchState)}function queryCaseInsensitive(query){return"string"==typeof query&&query==query.toLowerCase()}function getSearchCursor(cm,query,pos){return cm.getSearchCursor(query,pos,{caseFold:queryCaseInsensitive(query),multiline:!0})}function persistentDialog(cm,text,deflt,onEnter,onKeyDown){cm.openDialog(text,onEnter,{value:deflt,selectValueOnOpen:!0,closeOnEnter:!1,onClose:function(){clearSearch(cm)},onKeyDown:onKeyDown})}function dialog(cm,text,shortText,deflt,f){cm.openDialog?cm.openDialog(text,f,{value:deflt,selectValueOnOpen:!0}):f(prompt(shortText,deflt))}function confirmDialog(cm,text,shortText,fs){cm.openConfirm?cm.openConfirm(text,fs):confirm(shortText)&&fs[0]()}function parseString(string){return string.replace(/\\(.)/g,function(_,ch){return"n"==ch?"\n":"r"==ch?"\r":ch})}function parseQuery(query){var isRE=query.match(/^\/(.*)\/([a-z]*)$/);if(isRE)try{query=new RegExp(isRE[1],-1==isRE[2].indexOf("i")?"":"i")}catch(e){}else query=parseString(query);return("string"==typeof query?""==query:query.test(""))&&(query=/x^/),query}function startSearch(cm,state,query){state.queryText=query,state.query=parseQuery(query),cm.removeOverlay(state.overlay,queryCaseInsensitive(state.query)),state.overlay=searchOverlay(state.query,queryCaseInsensitive(state.query)),cm.addOverlay(state.overlay),cm.showMatchesOnScrollbar&&(state.annotate&&(state.annotate.clear(),state.annotate=null),state.annotate=cm.showMatchesOnScrollbar(state.query,queryCaseInsensitive(state.query)))}function doSearch(cm,rev,persistent,immediate){var state=getSearchState(cm);if(state.query)return findNext(cm,rev);var q=cm.getSelection()||state.lastQuery;if(persistent&&cm.openDialog){var hiding=null,searchNext=function(query,event){CodeMirror.e_stop(event),query&&(query!=state.queryText&&(startSearch(cm,state,query),state.posFrom=state.posTo=cm.getCursor()),hiding&&(hiding.style.opacity=1),findNext(cm,event.shiftKey,function(_,to){var dialog;to.line<3&&document.querySelector&&(dialog=cm.display.wrapper.querySelector(".CodeMirror-dialog"))&&dialog.getBoundingClientRect().bottom-4>cm.cursorCoords(to,"window").top&&((hiding=dialog).style.opacity=.4)}))};persistentDialog(cm,queryDialog,q,searchNext,function(event,query){var keyName=CodeMirror.keyName(event),cmd=CodeMirror.keyMap[cm.getOption("keyMap")][keyName];cmd||(cmd=cm.getOption("extraKeys")[keyName]),"findNext"==cmd||"findPrev"==cmd||"findPersistentNext"==cmd||"findPersistentPrev"==cmd?(CodeMirror.e_stop(event),startSearch(cm,getSearchState(cm),query),cm.execCommand(cmd)):"find"!=cmd&&"findPersistent"!=cmd||(CodeMirror.e_stop(event),searchNext(query,event))}),immediate&&q&&(startSearch(cm,state,q),findNext(cm,rev))}else dialog(cm,queryDialog,"Search for:",q,function(query){query&&!state.query&&cm.operation(function(){startSearch(cm,state,query),state.posFrom=state.posTo=cm.getCursor(),findNext(cm,rev)})})}function findNext(cm,rev,callback){cm.operation(function(){var state=getSearchState(cm),cursor=getSearchCursor(cm,state.query,rev?state.posFrom:state.posTo);(cursor.find(rev)||(cursor=getSearchCursor(cm,state.query,rev?CodeMirror.Pos(cm.lastLine()):CodeMirror.Pos(cm.firstLine(),0))).find(rev))&&(cm.setSelection(cursor.from(),cursor.to()),cm.scrollIntoView({from:cursor.from(),to:cursor.to()},20),state.posFrom=cursor.from(),state.posTo=cursor.to(),callback&&callback(cursor.from(),cursor.to()))})}function clearSearch(cm){cm.operation(function(){var state=getSearchState(cm);state.lastQuery=state.query,state.query&&(state.query=state.queryText=null,cm.removeOverlay(state.overlay),state.annotate&&(state.annotate.clear(),state.annotate=null))})}function replaceAll(cm,query,text){cm.operation(function(){for(var cursor=getSearchCursor(cm,query);cursor.findNext();)if("string"!=typeof query){var match=cm.getRange(cursor.from(),cursor.to()).match(query);cursor.replace(text.replace(/\$(\d)/g,function(_,i){return match[i]}))}else cursor.replace(text)})}function replace(cm,all){if(!cm.getOption("readOnly")){var query=cm.getSelection()||getSearchState(cm).lastQuery,dialogText=''+(all?"Replace all:":"Replace:")+" ";dialog(cm,dialogText+replaceQueryDialog,dialogText,query,function(query){query&&(query=parseQuery(query),dialog(cm,replacementQueryDialog,"Replace with:","",function(text){if(text=parseString(text),all)replaceAll(cm,query,text);else{clearSearch(cm);var cursor=getSearchCursor(cm,query,cm.getCursor("from")),advance=function(){var match,start=cursor.from();!(match=cursor.findNext())&&(cursor=getSearchCursor(cm,query),!(match=cursor.findNext())||start&&cursor.from().line==start.line&&cursor.from().ch==start.ch)||(cm.setSelection(cursor.from(),cursor.to()),cm.scrollIntoView({from:cursor.from(),to:cursor.to()}),confirmDialog(cm,doReplaceConfirm,"Replace?",[function(){doReplace(match)},advance,function(){replaceAll(cm,query,text)}]))},doReplace=function(match){cursor.replace("string"==typeof query?text:text.replace(/\$(\d)/g,function(_,i){return match[i]})),advance()};advance()}}))})}}var queryDialog='Search: (Use /re/ syntax for regexp search) ',replaceQueryDialog=' (Use /re/ syntax for regexp search) ',replacementQueryDialog='With: ',doReplaceConfirm='Replace? Yes No All Stop ';CodeMirror.commands.find=function(cm){clearSearch(cm),doSearch(cm)},CodeMirror.commands.findPersistent=function(cm){clearSearch(cm),doSearch(cm,!1,!0)},CodeMirror.commands.findPersistentNext=function(cm){doSearch(cm,!1,!0,!0)},CodeMirror.commands.findPersistentPrev=function(cm){doSearch(cm,!0,!0,!0)},CodeMirror.commands.findNext=doSearch,CodeMirror.commands.findPrev=function(cm){doSearch(cm,!0)},CodeMirror.commands.clearSearch=clearSearch,CodeMirror.commands.replace=replace,CodeMirror.commands.replaceAll=function(cm){replace(cm,!0)}})},{"../../lib/codemirror":66,"../dialog/dialog":54,"./searchcursor":64}],64:[function(require,module,exports){!function(mod){mod("object"==typeof exports&&"object"==typeof module?require("../../lib/codemirror"):CodeMirror)}(function(CodeMirror){"use strict";function regexpFlags(regexp){var flags=regexp.flags;return null!=flags?flags:(regexp.ignoreCase?"i":"")+(regexp.global?"g":"")+(regexp.multiline?"m":"")}function ensureGlobal(regexp){return regexp.global?regexp:new RegExp(regexp.source,regexpFlags(regexp)+"g")}function maybeMultiline(regexp){return/\\s|\\n|\n|\\W|\\D|\[\^/.test(regexp.source)}function searchRegexpForward(doc,regexp,start){regexp=ensureGlobal(regexp);for(var line=start.line,ch=start.ch,last=doc.lastLine();line<=last;line++,ch=0){regexp.lastIndex=ch;var string=doc.getLine(line),match=regexp.exec(string);if(match)return{from:Pos(line,match.index),to:Pos(line,match.index+match[0].length),match:match}}}function searchRegexpForwardMultiline(doc,regexp,start){if(!maybeMultiline(regexp))return searchRegexpForward(doc,regexp,start);regexp=ensureGlobal(regexp);for(var string,chunk=1,line=start.line,last=doc.lastLine();line<=last;){for(var i=0;i=first;line--,ch=-1){var string=doc.getLine(line);ch>-1&&(string=string.slice(0,ch));var match=lastMatchIn(string,regexp);if(match)return{from:Pos(line,match.index),to:Pos(line,match.index+match[0].length),match:match}}}function searchRegexpBackwardMultiline(doc,regexp,start){regexp=ensureGlobal(regexp);for(var string,chunk=1,line=start.line,first=doc.firstLine();line>=first;){for(var i=0;ipos))return pos1;--pos1}}}function searchStringForward(doc,query,start,caseFold){if(!query.length)return null;var fold=caseFold?doFold:noFold,lines=fold(query).split(/\r|\n\r?/);search:for(var line=start.line,ch=start.ch,last=doc.lastLine()+1-lines.length;line<=last;line++,ch=0){var orig=doc.getLine(line).slice(ch),string=fold(orig);if(1==lines.length){var found=string.indexOf(lines[0]);if(-1==found)continue search;var start=adjustPos(orig,string,found)+ch;return{from:Pos(line,adjustPos(orig,string,found)+ch),to:Pos(line,adjustPos(orig,string,found+lines[0].length)+ch)}}var cutFrom=string.length-lines[0].length;if(string.slice(cutFrom)==lines[0]){for(var i=1;i=first;line--,ch=-1){var orig=doc.getLine(line);ch>-1&&(orig=orig.slice(0,ch));var string=fold(orig);if(1==lines.length){var found=string.lastIndexOf(lines[0]);if(-1==found)continue search;return{from:Pos(line,adjustPos(orig,string,found)),to:Pos(line,adjustPos(orig,string,found+lines[0].length))}}var lastLine=lines[lines.length-1];if(string.slice(0,lastLine.length)==lastLine){for(var i=1,start=line-lines.length+1;i0);)ranges.push({anchor:cur.from(),head:cur.to()});ranges.length&&this.setSelections(ranges,0)})})},{"../../lib/codemirror":66}],65:[function(require,module,exports){!function(mod){"object"==typeof exports&&"object"==typeof module?mod(require("../lib/codemirror"),require("../addon/search/searchcursor"),require("../addon/edit/matchbrackets")):mod(CodeMirror)}(function(CodeMirror){"use strict";function findPosSubword(doc,start,dir){if(dir<0&&0==start.ch)return doc.clipPos(Pos(start.line-1));var line=doc.getLine(start.line);if(dir>0&&start.ch>=line.length)return doc.clipPos(Pos(start.line+1,0));for(var type,state="start",pos=start.ch,e=dir<0?0:line.length,i=0;pos!=e;pos+=dir,i++){var next=line.charAt(dir<0?pos-1:pos),cat="_"!=next&&CodeMirror.isWordChar(next)?"w":"o";if("w"==cat&&next.toUpperCase()==next&&(cat="W"),"start"==state)"o"!=cat&&(state="in",type=cat);else if("in"==state&&type!=cat){if("w"==type&&"W"==cat&&dir<0&&pos--,"W"==type&&"w"==cat&&dir>0){type="w";continue}break}}return Pos(start.line,pos)}function moveSubword(cm,dir){cm.extendSelectionsBy(function(range){return cm.display.shift||cm.doc.extend||range.empty()?findPosSubword(cm.doc,range.head,dir):dir<0?range.from():range.to()})}function insertLine(cm,above){if(cm.isReadOnly())return CodeMirror.Pass;cm.operation(function(){for(var len=cm.listSelections().length,newSelection=[],last=-1,i=0;i=0;i--){var range=ranges[indices[i]];if(!(at&&CodeMirror.cmpPos(range.head,at)>0)){var word=wordAt(cm,range.head);at=word.from,cm.replaceRange(mod(word.word),word.from,word.to)}}})}function getTarget(cm){var from=cm.getCursor("from"),to=cm.getCursor("to");if(0==CodeMirror.cmpPos(from,to)){var word=wordAt(cm,from);if(!word.word)return;from=word.from,to=word.to}return{from:from,to:to,query:cm.getRange(from,to),word:word}}function findAndGoTo(cm,forward){var target=getTarget(cm);if(target){var query=target.query,cur=cm.getSearchCursor(query,forward?target.to:target.from);(forward?cur.findNext():cur.findPrevious())?cm.setSelection(cur.from(),cur.to()):(cur=cm.getSearchCursor(query,forward?Pos(cm.firstLine(),0):cm.clipPos(Pos(cm.lastLine()))),(forward?cur.findNext():cur.findPrevious())?cm.setSelection(cur.from(),cur.to()):target.word&&cm.setSelection(target.from,target.to))}}var map=CodeMirror.keyMap.sublime={fallthrough:"default"},cmds=CodeMirror.commands,Pos=CodeMirror.Pos,mac=CodeMirror.keyMap.default==CodeMirror.keyMap.macDefault,ctrl=mac?"Cmd-":"Ctrl-",goSubwordCombo=mac?"Ctrl-":"Alt-";cmds[map[goSubwordCombo+"Left"]="goSubwordLeft"]=function(cm){moveSubword(cm,-1)},cmds[map[goSubwordCombo+"Right"]="goSubwordRight"]=function(cm){moveSubword(cm,1)},mac&&(map["Cmd-Left"]="goLineStartSmart");var scrollLineCombo=mac?"Ctrl-Alt-":"Ctrl-";cmds[map[scrollLineCombo+"Up"]="scrollLineUp"]=function(cm){var info=cm.getScrollInfo();if(!cm.somethingSelected()){var visibleBottomLine=cm.lineAtHeight(info.top+info.clientHeight,"local");cm.getCursor().line>=visibleBottomLine&&cm.execCommand("goLineUp")}cm.scrollTo(null,info.top-cm.defaultTextHeight())},cmds[map[scrollLineCombo+"Down"]="scrollLineDown"]=function(cm){var info=cm.getScrollInfo();if(!cm.somethingSelected()){var visibleTopLine=cm.lineAtHeight(info.top,"local")+1;cm.getCursor().line<=visibleTopLine&&cm.execCommand("goLineDown")}cm.scrollTo(null,info.top+cm.defaultTextHeight())},cmds[map["Shift-"+ctrl+"L"]="splitSelectionByLine"]=function(cm){for(var ranges=cm.listSelections(),lineRanges=[],i=0;ifrom.line&&line==to.line&&0==to.ch||lineRanges.push({anchor:line==from.line?from:Pos(line,0),head:line==to.line?to:Pos(line)});cm.setSelections(lineRanges,0)},map["Shift-Tab"]="indentLess",cmds[map.Esc="singleSelectionTop"]=function(cm){var range=cm.listSelections()[0];cm.setSelection(range.anchor,range.head,{scroll:!1})},cmds[map[ctrl+"L"]="selectLine"]=function(cm){for(var ranges=cm.listSelections(),extended=[],i=0;iat?linesToMove.push(from,to):linesToMove.length&&(linesToMove[linesToMove.length-1]=to),at=to}cm.operation(function(){for(var i=0;icm.lastLine()?cm.replaceRange("\n"+line,Pos(cm.lastLine()),null,"+swapLine"):cm.replaceRange(line+"\n",Pos(to,0),null,"+swapLine")}cm.setSelections(newSels),cm.scrollIntoView()})},cmds[map[swapLineCombo+"Down"]="swapLineDown"]=function(cm){if(cm.isReadOnly())return CodeMirror.Pass;for(var ranges=cm.listSelections(),linesToMove=[],at=cm.lastLine()+1,i=ranges.length-1;i>=0;i--){var range=ranges[i],from=range.to().line+1,to=range.from().line;0!=range.to().ch||range.empty()||from--,from=0;i-=2){var from=linesToMove[i],to=linesToMove[i+1],line=cm.getLine(from);from==cm.lastLine()?cm.replaceRange("",Pos(from-1),Pos(from),"+swapLine"):cm.replaceRange("",Pos(from,0),Pos(from+1,0),"+swapLine"),cm.replaceRange(line+"\n",Pos(to,0),null,"+swapLine")}cm.scrollIntoView()})},cmds[map[ctrl+"/"]="toggleCommentIndented"]=function(cm){cm.toggleComment({indent:!0})},cmds[map[ctrl+"J"]="joinLines"]=function(cm){for(var ranges=cm.listSelections(),joined=[],i=0;i=0;i--){var cursor=cursors[i].head,toStartOfLine=cm.getRange({line:cursor.line,ch:0},cursor),column=CodeMirror.countColumn(toStartOfLine,null,cm.getOption("tabSize")),deletePos=cm.findPosH(cursor,-1,"char",!1);if(toStartOfLine&&!/\S/.test(toStartOfLine)&&column%indentUnit==0){var prevIndent=new Pos(cursor.line,CodeMirror.findColumn(toStartOfLine,column-indentUnit,indentUnit));prevIndent.ch!=cursor.ch&&(deletePos=prevIndent)}cm.replaceRange("",deletePos,cursor,"+delete")}})},cmds[map[cK+ctrl+"K"]="delLineRight"]=function(cm){cm.operation(function(){for(var ranges=cm.listSelections(),i=ranges.length-1;i>=0;i--)cm.replaceRange("",ranges[i].anchor,Pos(ranges[i].to().line),"+delete");cm.scrollIntoView()})},cmds[map[cK+ctrl+"U"]="upcaseAtCursor"]=function(cm){modifyWordOrSelection(cm,function(str){return str.toUpperCase()})},cmds[map[cK+ctrl+"L"]="downcaseAtCursor"]=function(cm){modifyWordOrSelection(cm,function(str){return str.toLowerCase()})},cmds[map[cK+ctrl+"Space"]="setSublimeMark"]=function(cm){cm.state.sublimeMark&&cm.state.sublimeMark.clear(),cm.state.sublimeMark=cm.setBookmark(cm.getCursor())},cmds[map[cK+ctrl+"A"]="selectToSublimeMark"]=function(cm){var found=cm.state.sublimeMark&&cm.state.sublimeMark.find();found&&cm.setSelection(cm.getCursor(),found)},cmds[map[cK+ctrl+"W"]="deleteToSublimeMark"]=function(cm){var found=cm.state.sublimeMark&&cm.state.sublimeMark.find();if(found){var from=cm.getCursor(),to=found;if(CodeMirror.cmpPos(from,to)>0){var tmp=to;to=from,from=tmp}cm.state.sublimeKilled=cm.getRange(from,to),cm.replaceRange("",from,to)}},cmds[map[cK+ctrl+"X"]="swapWithSublimeMark"]=function(cm){var found=cm.state.sublimeMark&&cm.state.sublimeMark.find();found&&(cm.state.sublimeMark.clear(),cm.state.sublimeMark=cm.setBookmark(cm.getCursor()),cm.setCursor(found))},cmds[map[cK+ctrl+"Y"]="sublimeYank"]=function(cm){null!=cm.state.sublimeKilled&&cm.replaceSelection(cm.state.sublimeKilled,null,"paste")},map[cK+ctrl+"G"]="clearBookmarks",cmds[map[cK+ctrl+"C"]="showInCenter"]=function(cm){var pos=cm.cursorCoords(null,"local");cm.scrollTo(null,(pos.top+pos.bottom)/2-cm.getScrollInfo().clientHeight/2)};var selectLinesCombo=mac?"Ctrl-Shift-":"Ctrl-Alt-";cmds[map[selectLinesCombo+"Up"]="selectLinesUpward"]=function(cm){cm.operation(function(){for(var ranges=cm.listSelections(),i=0;icm.firstLine()&&cm.addSelection(Pos(range.head.line-1,range.head.ch))}})},cmds[map[selectLinesCombo+"Down"]="selectLinesDownward"]=function(cm){cm.operation(function(){for(var ranges=cm.listSelections(),i=0;i0;--count)e.removeChild(e.firstChild);return e}function removeChildrenAndAdd(parent,e){return removeChildren(parent).appendChild(e)}function elt(tag,content,className,style){var e=document.createElement(tag);if(className&&(e.className=className),style&&(e.style.cssText=style),"string"==typeof content)e.appendChild(document.createTextNode(content));else if(content)for(var i=0;i=end)return n+(end-i);n+=nextTab-i,n+=tabSize-n%tabSize,i=nextTab+1}}function indexOf(array,elt){for(var i=0;i=goal)return pos+Math.min(skipped,goal-col);if(col+=nextTab-pos,col+=tabSize-col%tabSize,pos=nextTab+1,col>=goal)return pos}}function spaceStr(n){for(;spaceStrs.length<=n;)spaceStrs.push(lst(spaceStrs)+" ");return spaceStrs[n]}function lst(arr){return arr[arr.length-1]}function map(array,f){for(var out=[],i=0;i""&&(ch.toUpperCase()!=ch.toLowerCase()||nonASCIISingleCaseWordChar.test(ch))}function isWordChar(ch,helper){return helper?!!(helper.source.indexOf("\\w")>-1&&isWordCharBasic(ch))||helper.test(ch):isWordCharBasic(ch)}function isEmpty(obj){for(var n in obj)if(obj.hasOwnProperty(n)&&obj[n])return!1;return!0}function isExtendingChar(ch){return ch.charCodeAt(0)>=768&&extendingChars.test(ch)}function skipExtendingChars(str,pos,dir){for(;(dir<0?pos>0:pos=doc.size)throw new Error("There is no line "+(n+doc.first)+" in the document.");for(var chunk=doc;!chunk.lines;)for(var i=0;;++i){var child=chunk.children[i],sz=child.chunkSize();if(n=doc.first&&llast?Pos(last,getLine(doc,last).text.length):clipToLen(pos,getLine(doc,pos.line).text.length)}function clipToLen(pos,linelen){var ch=pos.ch;return null==ch||ch>linelen?Pos(pos.line,linelen):ch<0?Pos(pos.line,0):pos}function clipPosArray(doc,array){for(var out=[],i=0;i=startCh:span.to>startCh);(nw||(nw=[])).push(new MarkedSpan(marker,span.from,endsAfter?null:span.to))}}return nw}function markedSpansAfter(old,endCh,isInsert){var nw;if(old)for(var i=0;i=endCh:span.to>endCh)||span.from==endCh&&"bookmark"==marker.type&&(!isInsert||span.marker.insertLeft)){var startsBefore=null==span.from||(marker.inclusiveLeft?span.from<=endCh:span.from0&&first)for(var i$2=0;i$20)){var newParts=[j,1],dfrom=cmp(p.from,m.from),dto=cmp(p.to,m.to);(dfrom<0||!mk.inclusiveLeft&&!dfrom)&&newParts.push({from:p.from,to:m.from}),(dto>0||!mk.inclusiveRight&&!dto)&&newParts.push({from:m.to,to:p.to}),parts.splice.apply(parts,newParts),j+=newParts.length-3}}return parts}function detachMarkedSpans(line){var spans=line.markedSpans;if(spans){for(var i=0;i=0&&toCmp<=0||fromCmp<=0&&toCmp>=0)&&(fromCmp<=0&&(sp.marker.inclusiveRight&&marker.inclusiveLeft?cmp(found.to,from)>=0:cmp(found.to,from)>0)||fromCmp>=0&&(sp.marker.inclusiveRight&&marker.inclusiveLeft?cmp(found.from,to)<=0:cmp(found.from,to)<0)))return!0}}}function visualLine(line){for(var merged;merged=collapsedSpanAtStart(line);)line=merged.find(-1,!0).line;return line}function visualLineEnd(line){for(var merged;merged=collapsedSpanAtEnd(line);)line=merged.find(1,!0).line;return line}function visualLineContinued(line){for(var merged,lines;merged=collapsedSpanAtEnd(line);)line=merged.find(1,!0).line,(lines||(lines=[])).push(line);return lines}function visualLineNo(doc,lineN){var line=getLine(doc,lineN),vis=visualLine(line);return line==vis?lineN:lineNo(vis)}function visualLineEndNo(doc,lineN){if(lineN>doc.lastLine())return lineN;var merged,line=getLine(doc,lineN);if(!lineIsHidden(doc,line))return lineN;for(;merged=collapsedSpanAtEnd(line);)line=merged.find(1,!0).line;return lineNo(line)+1}function lineIsHidden(doc,line){var sps=sawCollapsedSpans&&line.markedSpans;if(sps)for(var sp=void 0,i=0;id.maxLineLength&&(d.maxLineLength=len,d.maxLine=line)})}function iterateBidiSections(order,from,to,f){if(!order)return f(from,to,"ltr");for(var found=!1,i=0;ifrom||from==to&&part.to==from)&&(f(Math.max(part.from,from),Math.min(part.to,to),1==part.level?"rtl":"ltr"),found=!0)}found||f(from,to,"ltr")}function getBidiPartAt(order,ch,sticky){var found;bidiOther=null;for(var i=0;ich)return i;cur.to==ch&&(cur.from!=cur.to&&"before"==sticky?found=i:bidiOther=i),cur.from==ch&&(cur.from!=cur.to&&"before"!=sticky?found=i:bidiOther=i)}return null!=found?found:bidiOther}function getOrder(line,direction){var order=line.order;return null==order&&(order=line.order=bidiOrdering(line.text,direction)),order}function moveCharLogically(line,ch,dir){var target=skipExtendingChars(line.text,ch+dir,dir);return target<0||target>line.text.length?null:target}function moveLogically(line,start,dir){var ch=moveCharLogically(line,start.ch,dir);return null==ch?null:new Pos(start.line,ch,dir<0?"after":"before")}function endOfLine(visually,cm,lineObj,lineNo,dir){if(visually){var order=getOrder(lineObj,cm.doc.direction);if(order){var ch,part=dir<0?lst(order):order[0],sticky=dir<0==(1==part.level)?"after":"before";if(part.level>0){var prep=prepareMeasureForLine(cm,lineObj);ch=dir<0?lineObj.text.length-1:0;var targetTop=measureCharPrepared(cm,prep,ch).top;ch=findFirst(function(ch){return measureCharPrepared(cm,prep,ch).top==targetTop},dir<0==(1==part.level)?part.from:part.to-1,ch),"before"==sticky&&(ch=moveCharLogically(lineObj,ch,1))}else ch=dir<0?part.to:part.from;return new Pos(lineNo,ch,sticky)}}return new Pos(lineNo,dir<0?lineObj.text.length:0,dir<0?"before":"after")}function moveVisually(cm,line,start,dir){var bidi=getOrder(line,cm.doc.direction);if(!bidi)return moveLogically(line,start,dir);start.ch>=line.text.length?(start.ch=line.text.length,start.sticky="before"):start.ch<=0&&(start.ch=0,start.sticky="after");var partPos=getBidiPartAt(bidi,start.ch,start.sticky),part=bidi[partPos];if("ltr"==cm.doc.direction&&part.level%2==0&&(dir>0?part.to>start.ch:part.from=part.from&&ch>=wrappedLineExtent.begin)){var sticky=moveInStorageOrder?"before":"after";return new Pos(start.line,ch,sticky)}}var searchInVisualLine=function(partPos,dir,wrappedLineExtent){for(var getRes=function(ch,moveInStorageOrder){return moveInStorageOrder?new Pos(start.line,mv(ch,1),"before"):new Pos(start.line,ch,"after")};partPos>=0&&partPos0==(1!=part.level),ch=moveInStorageOrder?wrappedLineExtent.begin:mv(wrappedLineExtent.end,-1);if(part.from<=ch&&ch0?wrappedLineExtent.end:mv(wrappedLineExtent.begin,-1);return null==nextCh||dir>0&&nextCh==line.text.length||!(res=searchInVisualLine(dir>0?0:bidi.length-1,dir,getWrappedLineExtent(nextCh)))?null:res}function getHandlers(emitter,type){return emitter._handlers&&emitter._handlers[type]||noHandlers}function off(emitter,type,f){if(emitter.removeEventListener)emitter.removeEventListener(type,f,!1);else if(emitter.detachEvent)emitter.detachEvent("on"+type,f);else{var map$$1=emitter._handlers,arr=map$$1&&map$$1[type];if(arr){var index=indexOf(arr,f);index>-1&&(map$$1[type]=arr.slice(0,index).concat(arr.slice(index+1)))}}}function signal(emitter,type){var handlers=getHandlers(emitter,type);if(handlers.length)for(var args=Array.prototype.slice.call(arguments,2),i=0;i0}function eventMixin(ctor){ctor.prototype.on=function(type,f){on(this,type,f)},ctor.prototype.off=function(type,f){off(this,type,f)}}function e_preventDefault(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function e_stopPropagation(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function e_defaultPrevented(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function e_stop(e){e_preventDefault(e),e_stopPropagation(e)}function e_target(e){return e.target||e.srcElement}function e_button(e){var b=e.which;return null==b&&(1&e.button?b=1:2&e.button?b=3:4&e.button&&(b=2)),mac&&e.ctrlKey&&1==b&&(b=3),b}function zeroWidthElement(measure){if(null==zwspSupported){var test=elt("span","");removeChildrenAndAdd(measure,elt("span",[test,document.createTextNode("x")])),0!=measure.firstChild.offsetHeight&&(zwspSupported=test.offsetWidth<=1&&test.offsetHeight>2&&!(ie&&ie_version<8))}var node=zwspSupported?elt("span",""):elt("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return node.setAttribute("cm-text",""),node}function hasBadBidiRects(measure){if(null!=badBidiRects)return badBidiRects;var txt=removeChildrenAndAdd(measure,document.createTextNode("AخA")),r0=range(txt,0,1).getBoundingClientRect(),r1=range(txt,1,2).getBoundingClientRect();return removeChildren(measure),!(!r0||r0.left==r0.right)&&(badBidiRects=r1.right-r0.right<3)}function hasBadZoomedRects(measure){if(null!=badZoomedRects)return badZoomedRects;var node=removeChildrenAndAdd(measure,elt("span","x")),normal=node.getBoundingClientRect(),fromRange=range(node,0,1).getBoundingClientRect();return badZoomedRects=Math.abs(normal.left-fromRange.left)>1}function defineMode(name,mode){arguments.length>2&&(mode.dependencies=Array.prototype.slice.call(arguments,2)),modes[name]=mode}function resolveMode(spec){if("string"==typeof spec&&mimeModes.hasOwnProperty(spec))spec=mimeModes[spec];else if(spec&&"string"==typeof spec.name&&mimeModes.hasOwnProperty(spec.name)){var found=mimeModes[spec.name];"string"==typeof found&&(found={name:found}),(spec=createObj(found,spec)).name=found.name}else{if("string"==typeof spec&&/^[\w\-]+\/[\w\-]+\+xml$/.test(spec))return resolveMode("application/xml");if("string"==typeof spec&&/^[\w\-]+\/[\w\-]+\+json$/.test(spec))return resolveMode("application/json")}return"string"==typeof spec?{name:spec}:spec||{name:"null"}}function getMode(options,spec){spec=resolveMode(spec);var mfactory=modes[spec.name];if(!mfactory)return getMode(options,"text/plain");var modeObj=mfactory(options,spec);if(modeExtensions.hasOwnProperty(spec.name)){var exts=modeExtensions[spec.name];for(var prop in exts)exts.hasOwnProperty(prop)&&(modeObj.hasOwnProperty(prop)&&(modeObj["_"+prop]=modeObj[prop]),modeObj[prop]=exts[prop])}if(modeObj.name=spec.name,spec.helperType&&(modeObj.helperType=spec.helperType),spec.modeProps)for(var prop$1 in spec.modeProps)modeObj[prop$1]=spec.modeProps[prop$1];return modeObj}function extendMode(mode,properties){copyObj(properties,modeExtensions.hasOwnProperty(mode)?modeExtensions[mode]:modeExtensions[mode]={})}function copyState(mode,state){if(!0===state)return state;if(mode.copyState)return mode.copyState(state);var nstate={};for(var n in state){var val=state[n];val instanceof Array&&(val=val.concat([])),nstate[n]=val}return nstate}function innerMode(mode,state){for(var info;mode.innerMode&&(info=mode.innerMode(state))&&info.mode!=mode;)state=info.state,mode=info.mode;return info||{mode:mode,state:state}}function startState(mode,a1,a2){return!mode.startState||mode.startState(a1,a2)}function highlightLine(cm,line,context,forceToEnd){var st=[cm.state.modeGen],lineClasses={};runMode(cm,line.text,cm.doc.mode,context,function(end,style){return st.push(end,style)},lineClasses,forceToEnd);for(var state=context.state,o=0;oend&&st.splice(i,1,end,st[i+1],i_end),i+=2,at=Math.min(end,i_end)}if(style)if(overlay.opaque)st.splice(start,i-start,end,"overlay "+style),i=start+2;else for(;startcm.options.maxHighlightLength&©State(cm.doc.mode,context.state),result=highlightLine(cm,line,context);resetState&&(context.state=resetState),line.stateAfter=context.save(!resetState),line.styles=result.styles,result.classes?line.styleClasses=result.classes:line.styleClasses&&(line.styleClasses=null),updateFrontier===cm.doc.highlightFrontier&&(cm.doc.modeFrontier=Math.max(cm.doc.modeFrontier,++cm.doc.highlightFrontier))}return line.styles}function getContextBefore(cm,n,precise){var doc=cm.doc,display=cm.display;if(!doc.mode.startState)return new Context(doc,!0,n);var start=findStartLine(cm,n,precise),saved=start>doc.first&&getLine(doc,start-1).stateAfter,context=saved?Context.fromSaved(doc,saved,start):new Context(doc,startState(doc.mode),start);return doc.iter(start,n,function(line){processLine(cm,line.text,context);var pos=context.line;line.stateAfter=pos==n-1||pos%5==0||pos>=display.viewFrom&&posstream.start)return style}throw new Error("Mode "+mode.name+" failed to advance stream.")}function takeToken(cm,pos,precise,asArray){var style,tokens,doc=cm.doc,mode=doc.mode,line=getLine(doc,(pos=clipPos(doc,pos)).line),context=getContextBefore(cm,pos.line,precise),stream=new StringStream(line.text,cm.options.tabSize,context);for(asArray&&(tokens=[]);(asArray||stream.poscm.options.maxHighlightLength?(flattenSpans=!1,forceToEnd&&processLine(cm,text,context,stream.pos),stream.pos=text.length,style=null):style=extractLineClasses(readToken(mode,stream,context.state,inner),lineClasses),inner){var mName=inner[0].name;mName&&(style="m-"+(style?mName+" "+style:mName))}if(!flattenSpans||curStyle!=style){for(;curStartlim;--search){if(search<=doc.first)return doc.first;var line=getLine(doc,search-1),after=line.stateAfter;if(after&&(!precise||search+(after instanceof SavedContext?after.lookAhead:0)<=doc.modeFrontier))return search;var indented=countColumn(line.text,null,cm.options.tabSize);(null==minline||minindent>indented)&&(minline=search-1,minindent=indented)}return minline}function retreatFrontier(doc,n){if(doc.modeFrontier=Math.min(doc.modeFrontier,n),!(doc.highlightFrontierstart;line--){var saved=getLine(doc,line).stateAfter;if(saved&&(!(saved instanceof SavedContext)||line+saved.lookAhead1&&!/ /.test(text))return text;for(var spaceBefore=trailingBefore,result="",i=0;istart&&part.from<=start);i++);if(part.to>=end)return inner(builder,text,style,startStyle,endStyle,title,css);inner(builder,text.slice(0,part.to-start),style,startStyle,null,title,css),startStyle=null,text=text.slice(part.to-start),start=part.to}}}function buildCollapsedSpan(builder,size,marker,ignoreWidget){var widget=!ignoreWidget&&marker.widgetNode;widget&&builder.map.push(builder.pos,builder.pos+size,widget),!ignoreWidget&&builder.cm.display.input.needsContentAttribute&&(widget||(widget=builder.content.appendChild(document.createElement("span"))),widget.setAttribute("cm-marker",marker.id)),widget&&(builder.cm.display.input.setUneditable(widget),builder.content.appendChild(widget)),builder.pos+=size,builder.trailingSpace=!1}function insertLineContent(line,builder,styles){var spans=line.markedSpans,allText=line.text,at=0;if(spans)for(var style,css,spanStyle,spanEndStyle,spanStartStyle,title,collapsed,len=allText.length,pos=0,i=1,text="",nextChange=0;;){if(nextChange==pos){spanStyle=spanEndStyle=spanStartStyle=title=css="",collapsed=null,nextChange=1/0;for(var foundBookmarks=[],endStyles=void 0,j=0;jpos||m.collapsed&&sp.to==pos&&sp.from==pos)?(null!=sp.to&&sp.to!=pos&&nextChange>sp.to&&(nextChange=sp.to,spanEndStyle=""),m.className&&(spanStyle+=" "+m.className),m.css&&(css=(css?css+";":"")+m.css),m.startStyle&&sp.from==pos&&(spanStartStyle+=" "+m.startStyle),m.endStyle&&sp.to==nextChange&&(endStyles||(endStyles=[])).push(m.endStyle,sp.to),m.title&&!title&&(title=m.title),m.collapsed&&(!collapsed||compareCollapsedMarkers(collapsed.marker,m)<0)&&(collapsed=sp)):sp.from>pos&&nextChange>sp.from&&(nextChange=sp.from)}if(endStyles)for(var j$1=0;j$1=len)break;for(var upto=Math.min(len,nextChange);;){if(text){var end=pos+text.length;if(!collapsed){var tokenText=end>upto?text.slice(0,upto-pos):text;builder.addToken(builder,tokenText,style?style+spanStyle:spanStyle,spanStartStyle,pos+tokenText.length==nextChange?spanEndStyle:"",title,css)}if(end>=upto){text=text.slice(upto-pos),pos=upto;break}pos=end,spanStartStyle=""}text=allText.slice(at,at=styles[i++]),style=interpretTokenStyle(styles[i++],builder.cm.options)}}else for(var i$1=1;i$12&&heights.push((cur.bottom+next.top)/2-rect.top)}}heights.push(rect.bottom-rect.top)}}function mapFromLineView(lineView,line,lineN){if(lineView.line==line)return{map:lineView.measure.map,cache:lineView.measure.cache};for(var i=0;ilineN)return{map:lineView.measure.maps[i$1],cache:lineView.measure.caches[i$1],before:!0}}function updateExternalMeasurement(cm,line){var lineN=lineNo(line=visualLine(line)),view=cm.display.externalMeasured=new LineView(cm.doc,line,lineN);view.lineN=lineN;var built=view.built=buildLineContent(cm,view);return view.text=built.pre,removeChildrenAndAdd(cm.display.lineMeasure,built.pre),view}function measureChar(cm,line,ch,bias){return measureCharPrepared(cm,prepareMeasureForLine(cm,line),ch,bias)}function findViewForLine(cm,lineN){if(lineN>=cm.display.viewFrom&&lineN=ext.lineN&&lineNch)&&(start=(end=mEnd-mStart)-1,ch>=mEnd&&(collapse="right")),null!=start){if(node=map$$1[i+2],mStart==mEnd&&bias==(node.insertLeft?"left":"right")&&(collapse=bias),"left"==bias&&0==start)for(;i&&map$$1[i-2]==map$$1[i-3]&&map$$1[i-1].insertLeft;)node=map$$1[2+(i-=3)],collapse="left";if("right"==bias&&start==mEnd-mStart)for(;i=0&&(rect=rects[i$1]).left==rect.right;i$1--);return rect}function measureCharInner(cm,prepared,ch,bias){var rect,place=nodeAndOffsetInLineMap(prepared.map,ch,bias),node=place.node,start=place.start,end=place.end,collapse=place.collapse;if(3==node.nodeType){for(var i$1=0;i$1<4;i$1++){for(;start&&isExtendingChar(prepared.line.text.charAt(place.coverStart+start));)--start;for(;place.coverStart+end0&&(collapse=bias="right");var rects;rect=cm.options.lineWrapping&&(rects=node.getClientRects()).length>1?rects["right"==bias?rects.length-1:0]:node.getBoundingClientRect()}if(ie&&ie_version<9&&!start&&(!rect||!rect.left&&!rect.right)){var rSpan=node.parentNode.getClientRects()[0];rect=rSpan?{left:rSpan.left,right:rSpan.left+charWidth(cm.display),top:rSpan.top,bottom:rSpan.bottom}:nullRect}for(var rtop=rect.top-prepared.rect.top,rbot=rect.bottom-prepared.rect.top,mid=(rtop+rbot)/2,heights=prepared.view.measure.heights,i=0;i=lineObj.text.length?(ch=lineObj.text.length,sticky="before"):ch<=0&&(ch=0,sticky="after"),!order)return get("before"==sticky?ch-1:ch,"before"==sticky);var partPos=getBidiPartAt(order,ch,sticky),other=bidiOther,val=getBidi(ch,partPos,"before"==sticky);return null!=other&&(val.other=getBidi(ch,other,"before"!=sticky)),val}function estimateCoords(cm,pos){var left=0;pos=clipPos(cm.doc,pos),cm.options.lineWrapping||(left=charWidth(cm.display)*pos.ch);var lineObj=getLine(cm.doc,pos.line),top=heightAtLine(lineObj)+paddingTop(cm.display);return{left:left,right:left,top:top,bottom:top+lineObj.height}}function PosWithInfo(line,ch,sticky,outside,xRel){var pos=Pos(line,ch,sticky);return pos.xRel=xRel,outside&&(pos.outside=!0),pos}function coordsChar(cm,x,y){var doc=cm.doc;if((y+=cm.display.viewOffset)<0)return PosWithInfo(doc.first,0,null,!0,-1);var lineN=lineAtHeight(doc,y),last=doc.first+doc.size-1;if(lineN>last)return PosWithInfo(doc.first+doc.size-1,getLine(doc,last).text.length,null,!0,1);x<0&&(x=0);for(var lineObj=getLine(doc,lineN);;){var found=coordsCharInner(cm,lineObj,lineN,x,y),merged=collapsedSpanAtEnd(lineObj),mergedPos=merged&&merged.find(0,!0);if(!merged||!(found.ch>mergedPos.from.ch||found.ch==mergedPos.from.ch&&found.xRel>0))return found;lineN=lineNo(lineObj=mergedPos.to.line)}}function wrappedLineExtent(cm,lineObj,preparedMeasure,y){var measure=function(ch){return intoCoordSystem(cm,lineObj,measureCharPrepared(cm,preparedMeasure,ch),"line")},end=lineObj.text.length,begin=findFirst(function(ch){return measure(ch-1).bottom<=y},end,0);return end=findFirst(function(ch){return measure(ch).top>y},begin,end),{begin:begin,end:end}}function wrappedLineExtentChar(cm,lineObj,preparedMeasure,target){return wrappedLineExtent(cm,lineObj,preparedMeasure,intoCoordSystem(cm,lineObj,measureCharPrepared(cm,preparedMeasure,target),"line").top)}function coordsCharInner(cm,lineObj,lineNo$$1,x,y){y-=heightAtLine(lineObj);var pos,begin=0,end=lineObj.text.length,preparedMeasure=prepareMeasureForLine(cm,lineObj);if(getOrder(lineObj,cm.doc.direction)){if(cm.options.lineWrapping){var assign;begin=(assign=wrappedLineExtent(cm,lineObj,preparedMeasure,y)).begin,end=assign.end}pos=new Pos(lineNo$$1,Math.floor(begin+(end-begin)/2));var prevDiff,prevPos,beginLeft=cursorCoords(cm,pos,"line",lineObj,preparedMeasure).left,dir=beginLeft1){var diff_change_per_step=Math.abs(diff-prevDiff)/steps;steps=Math.min(steps,Math.ceil(Math.abs(diff)/diff_change_per_step)),dir=diff<0?1:-1}}while(0!=diff&&(steps>1||dir<0!=diff<0&&Math.abs(diff)<=Math.abs(prevDiff)));if(Math.abs(diff)>Math.abs(prevDiff)){if(diff<0==prevDiff<0)throw new Error("Broke out of infinite loop in coordsCharInner");pos=prevPos}}else{var ch=findFirst(function(ch){var box=intoCoordSystem(cm,lineObj,measureCharPrepared(cm,preparedMeasure,ch),"line");return box.top>y?(end=Math.min(ch,end),!0):!(box.bottom<=y)&&(box.left>x||!(box.rightcoords.right?1:0,pos}function textHeight(display){if(null!=display.cachedTextHeight)return display.cachedTextHeight;if(null==measureText){measureText=elt("pre");for(var i=0;i<49;++i)measureText.appendChild(document.createTextNode("x")),measureText.appendChild(elt("br"));measureText.appendChild(document.createTextNode("x"))}removeChildrenAndAdd(display.measure,measureText);var height=measureText.offsetHeight/50;return height>3&&(display.cachedTextHeight=height),removeChildren(display.measure),height||1}function charWidth(display){if(null!=display.cachedCharWidth)return display.cachedCharWidth;var anchor=elt("span","xxxxxxxxxx"),pre=elt("pre",[anchor]);removeChildrenAndAdd(display.measure,pre);var rect=anchor.getBoundingClientRect(),width=(rect.right-rect.left)/10;return width>2&&(display.cachedCharWidth=width),width||10}function getDimensions(cm){for(var d=cm.display,left={},width={},gutterLeft=d.gutters.clientLeft,n=d.gutters.firstChild,i=0;n;n=n.nextSibling,++i)left[cm.options.gutters[i]]=n.offsetLeft+n.clientLeft+gutterLeft,width[cm.options.gutters[i]]=n.clientWidth;return{fixedPos:compensateForHScroll(d),gutterTotalWidth:d.gutters.offsetWidth,gutterLeft:left,gutterWidth:width,wrapperWidth:d.wrapper.clientWidth}}function compensateForHScroll(display){return display.scroller.getBoundingClientRect().left-display.sizer.getBoundingClientRect().left}function estimateHeight(cm){var th=textHeight(cm.display),wrapping=cm.options.lineWrapping,perLine=wrapping&&Math.max(5,cm.display.scroller.clientWidth/charWidth(cm.display)-3);return function(line){if(lineIsHidden(cm.doc,line))return 0;var widgetsHeight=0;if(line.widgets)for(var i=0;i=cm.display.viewTo)return null;if((n-=cm.display.viewFrom)<0)return null;for(var view=cm.display.view,i=0;i=cm.display.viewTo||range$$1.to().line3&&(add(left,leftPos.top,null,leftPos.bottom),left=leftSide,leftPos.bottomend.bottom||rightPos.bottom==end.bottom&&rightPos.right>end.right)&&(end=rightPos),left0?display.blinker=setInterval(function(){return display.cursorDiv.style.visibility=(on=!on)?"":"hidden"},cm.options.cursorBlinkRate):cm.options.cursorBlinkRate<0&&(display.cursorDiv.style.visibility="hidden")}}function ensureFocus(cm){cm.state.focused||(cm.display.input.focus(),onFocus(cm))}function delayBlurEvent(cm){cm.state.delayingBlurEvent=!0,setTimeout(function(){cm.state.delayingBlurEvent&&(cm.state.delayingBlurEvent=!1,onBlur(cm))},100)}function onFocus(cm,e){cm.state.delayingBlurEvent&&(cm.state.delayingBlurEvent=!1),"nocursor"!=cm.options.readOnly&&(cm.state.focused||(signal(cm,"focus",cm,e),cm.state.focused=!0,addClass(cm.display.wrapper,"CodeMirror-focused"),cm.curOp||cm.display.selForContextMenu==cm.doc.sel||(cm.display.input.reset(),webkit&&setTimeout(function(){return cm.display.input.reset(!0)},20)),cm.display.input.receivedFocus()),restartBlink(cm))}function onBlur(cm,e){cm.state.delayingBlurEvent||(cm.state.focused&&(signal(cm,"blur",cm,e),cm.state.focused=!1,rmClass(cm.display.wrapper,"CodeMirror-focused")),clearInterval(cm.display.blinker),setTimeout(function(){cm.state.focused||(cm.display.shift=!1)},150))}function updateHeightsInViewport(cm){for(var display=cm.display,prevBottom=display.lineDiv.offsetTop,i=0;i.001||diff<-.001)&&(updateLineHeight(cur.line,height),updateWidgetHeight(cur.line),cur.rest))for(var j=0;j=to&&(from=lineAtHeight(doc,heightAtLine(getLine(doc,ensureTo))-display.wrapper.clientHeight),to=ensureTo)}return{from:from,to:Math.max(to,from+1)}}function alignHorizontally(cm){var display=cm.display,view=display.view;if(display.alignWidgets||display.gutters.firstChild&&cm.options.fixedGutter){for(var comp=compensateForHScroll(display)-display.scroller.scrollLeft+cm.doc.scrollLeft,gutterW=display.gutters.offsetWidth,left=comp+"px",i=0;i(window.innerHeight||document.documentElement.clientHeight)&&(doScroll=!1),null!=doScroll&&!phantom){var scrollNode=elt("div","",null,"position: absolute;\n top: "+(rect.top-display.viewOffset-paddingTop(cm.display))+"px;\n height: "+(rect.bottom-rect.top+scrollGap(cm)+display.barHeight)+"px;\n left: "+rect.left+"px; width: "+Math.max(2,rect.right-rect.left)+"px;");cm.display.lineSpace.appendChild(scrollNode),scrollNode.scrollIntoView(doScroll),cm.display.lineSpace.removeChild(scrollNode)}}}function scrollPosIntoView(cm,pos,end,margin){null==margin&&(margin=0);for(var rect,limit=0;limit<5;limit++){var changed=!1,coords=cursorCoords(cm,pos),endCoords=end&&end!=pos?cursorCoords(cm,end):coords,scrollPos=calculateScrollPos(cm,rect={left:Math.min(coords.left,endCoords.left),top:Math.min(coords.top,endCoords.top)-margin,right:Math.max(coords.left,endCoords.left),bottom:Math.max(coords.bottom,endCoords.bottom)+margin}),startTop=cm.doc.scrollTop,startLeft=cm.doc.scrollLeft;if(null!=scrollPos.scrollTop&&(updateScrollTop(cm,scrollPos.scrollTop),Math.abs(cm.doc.scrollTop-startTop)>1&&(changed=!0)),null!=scrollPos.scrollLeft&&(setScrollLeft(cm,scrollPos.scrollLeft),Math.abs(cm.doc.scrollLeft-startLeft)>1&&(changed=!0)),!changed)break}return rect}function scrollIntoView(cm,rect){var scrollPos=calculateScrollPos(cm,rect);null!=scrollPos.scrollTop&&updateScrollTop(cm,scrollPos.scrollTop),null!=scrollPos.scrollLeft&&setScrollLeft(cm,scrollPos.scrollLeft)}function calculateScrollPos(cm,rect){var display=cm.display,snapMargin=textHeight(cm.display);rect.top<0&&(rect.top=0);var screentop=cm.curOp&&null!=cm.curOp.scrollTop?cm.curOp.scrollTop:display.scroller.scrollTop,screen=displayHeight(cm),result={};rect.bottom-rect.top>screen&&(rect.bottom=rect.top+screen);var docBottom=cm.doc.height+paddingVert(display),atTop=rect.topdocBottom-snapMargin;if(rect.topscreentop+screen){var newTop=Math.min(rect.top,(atBottom?docBottom:rect.bottom)-screen);newTop!=screentop&&(result.scrollTop=newTop)}var screenleft=cm.curOp&&null!=cm.curOp.scrollLeft?cm.curOp.scrollLeft:display.scroller.scrollLeft,screenw=displayWidth(cm)-(cm.options.fixedGutter?display.gutters.offsetWidth:0),tooWide=rect.right-rect.left>screenw;return tooWide&&(rect.right=rect.left+screenw),rect.left<10?result.scrollLeft=0:rect.leftscreenw+screenleft-3&&(result.scrollLeft=rect.right+(tooWide?0:10)-screenw),result}function addToScrollTop(cm,top){null!=top&&(resolveScrollToPos(cm),cm.curOp.scrollTop=(null==cm.curOp.scrollTop?cm.doc.scrollTop:cm.curOp.scrollTop)+top)}function ensureCursorVisible(cm){resolveScrollToPos(cm);var cur=cm.getCursor(),from=cur,to=cur;cm.options.lineWrapping||(from=cur.ch?Pos(cur.line,cur.ch-1):cur,to=Pos(cur.line,cur.ch+1)),cm.curOp.scrollToPos={from:from,to:to,margin:cm.options.cursorScrollMargin}}function scrollToCoords(cm,x,y){null==x&&null==y||resolveScrollToPos(cm),null!=x&&(cm.curOp.scrollLeft=x),null!=y&&(cm.curOp.scrollTop=y)}function scrollToRange(cm,range$$1){resolveScrollToPos(cm),cm.curOp.scrollToPos=range$$1}function resolveScrollToPos(cm){var range$$1=cm.curOp.scrollToPos;range$$1&&(cm.curOp.scrollToPos=null,scrollToCoordsRange(cm,estimateCoords(cm,range$$1.from),estimateCoords(cm,range$$1.to),range$$1.margin))}function scrollToCoordsRange(cm,from,to,margin){var sPos=calculateScrollPos(cm,{left:Math.min(from.left,to.left),top:Math.min(from.top,to.top)-margin,right:Math.max(from.right,to.right),bottom:Math.max(from.bottom,to.bottom)+margin});scrollToCoords(cm,sPos.scrollLeft,sPos.scrollTop)}function updateScrollTop(cm,val){Math.abs(cm.doc.scrollTop-val)<2||(gecko||updateDisplaySimple(cm,{top:val}),setScrollTop(cm,val,!0),gecko&&updateDisplaySimple(cm),startWorker(cm,100))}function setScrollTop(cm,val,forceScroll){val=Math.min(cm.display.scroller.scrollHeight-cm.display.scroller.clientHeight,val),(cm.display.scroller.scrollTop!=val||forceScroll)&&(cm.doc.scrollTop=val,cm.display.scrollbars.setScrollTop(val),cm.display.scroller.scrollTop!=val&&(cm.display.scroller.scrollTop=val))}function setScrollLeft(cm,val,isScroller,forceScroll){val=Math.min(val,cm.display.scroller.scrollWidth-cm.display.scroller.clientWidth),(isScroller?val==cm.doc.scrollLeft:Math.abs(cm.doc.scrollLeft-val)<2)&&!forceScroll||(cm.doc.scrollLeft=val,alignHorizontally(cm),cm.display.scroller.scrollLeft!=val&&(cm.display.scroller.scrollLeft=val),cm.display.scrollbars.setScrollLeft(val))}function measureForScrollbars(cm){var d=cm.display,gutterW=d.gutters.offsetWidth,docH=Math.round(cm.doc.height+paddingVert(cm.display));return{clientHeight:d.scroller.clientHeight,viewHeight:d.wrapper.clientHeight,scrollWidth:d.scroller.scrollWidth,clientWidth:d.scroller.clientWidth,viewWidth:d.wrapper.clientWidth,barLeft:cm.options.fixedGutter?gutterW:0,docHeight:docH,scrollHeight:docH+scrollGap(cm)+d.barHeight,nativeBarWidth:d.nativeBarWidth,gutterWidth:gutterW}}function updateScrollbars(cm,measure){measure||(measure=measureForScrollbars(cm));var startWidth=cm.display.barWidth,startHeight=cm.display.barHeight;updateScrollbarsInner(cm,measure);for(var i=0;i<4&&startWidth!=cm.display.barWidth||startHeight!=cm.display.barHeight;i++)startWidth!=cm.display.barWidth&&cm.options.lineWrapping&&updateHeightsInViewport(cm),updateScrollbarsInner(cm,measureForScrollbars(cm)),startWidth=cm.display.barWidth,startHeight=cm.display.barHeight}function updateScrollbarsInner(cm,measure){var d=cm.display,sizes=d.scrollbars.update(measure);d.sizer.style.paddingRight=(d.barWidth=sizes.right)+"px",d.sizer.style.paddingBottom=(d.barHeight=sizes.bottom)+"px",d.heightForcer.style.borderBottom=sizes.bottom+"px solid transparent",sizes.right&&sizes.bottom?(d.scrollbarFiller.style.display="block",d.scrollbarFiller.style.height=sizes.bottom+"px",d.scrollbarFiller.style.width=sizes.right+"px"):d.scrollbarFiller.style.display="",sizes.bottom&&cm.options.coverGutterNextToScrollbar&&cm.options.fixedGutter?(d.gutterFiller.style.display="block",d.gutterFiller.style.height=sizes.bottom+"px",d.gutterFiller.style.width=measure.gutterWidth+"px"):d.gutterFiller.style.display=""}function initScrollbars(cm){cm.display.scrollbars&&(cm.display.scrollbars.clear(),cm.display.scrollbars.addClass&&rmClass(cm.display.wrapper,cm.display.scrollbars.addClass)),cm.display.scrollbars=new scrollbarModel[cm.options.scrollbarStyle](function(node){cm.display.wrapper.insertBefore(node,cm.display.scrollbarFiller),on(node,"mousedown",function(){cm.state.focused&&setTimeout(function(){return cm.display.input.focus()},0)}),node.setAttribute("cm-not-content","true")},function(pos,axis){"horizontal"==axis?setScrollLeft(cm,pos):updateScrollTop(cm,pos)},cm),cm.display.scrollbars.addClass&&addClass(cm.display.wrapper,cm.display.scrollbars.addClass)}function startOperation(cm){cm.curOp={cm:cm,viewChanged:!1,startHeight:cm.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:++nextOpId},pushOperation(cm.curOp)}function endOperation(cm){finishOperation(cm.curOp,function(group){for(var i=0;i=display.viewTo)||display.maxLineChanged&&cm.options.lineWrapping,op.update=op.mustUpdate&&new DisplayUpdate(cm,op.mustUpdate&&{top:op.scrollTop,ensure:op.scrollToPos},op.forceUpdate)}function endOperation_W1(op){op.updatedDisplay=op.mustUpdate&&updateDisplayIfNeeded(op.cm,op.update)}function endOperation_R2(op){var cm=op.cm,display=cm.display;op.updatedDisplay&&updateHeightsInViewport(cm),op.barMeasure=measureForScrollbars(cm),display.maxLineChanged&&!cm.options.lineWrapping&&(op.adjustWidthTo=measureChar(cm,display.maxLine,display.maxLine.text.length).left+3,cm.display.sizerWidth=op.adjustWidthTo,op.barMeasure.scrollWidth=Math.max(display.scroller.clientWidth,display.sizer.offsetLeft+op.adjustWidthTo+scrollGap(cm)+cm.display.barWidth),op.maxScrollLeft=Math.max(0,display.sizer.offsetLeft+op.adjustWidthTo-displayWidth(cm))),(op.updatedDisplay||op.selectionChanged)&&(op.preparedSelection=display.input.prepareSelection(op.focus))}function endOperation_W2(op){var cm=op.cm;null!=op.adjustWidthTo&&(cm.display.sizer.style.minWidth=op.adjustWidthTo+"px",op.maxScrollLeftfrom)&&(display.updateLineNumbers=from),cm.curOp.viewChanged=!0,from>=display.viewTo)sawCollapsedSpans&&visualLineNo(cm.doc,from)display.viewFrom?resetView(cm):(display.viewFrom+=lendiff,display.viewTo+=lendiff);else if(from<=display.viewFrom&&to>=display.viewTo)resetView(cm);else if(from<=display.viewFrom){var cut=viewCuttingPoint(cm,to,to+lendiff,1);cut?(display.view=display.view.slice(cut.index),display.viewFrom=cut.lineN,display.viewTo+=lendiff):resetView(cm)}else if(to>=display.viewTo){var cut$1=viewCuttingPoint(cm,from,from,-1);cut$1?(display.view=display.view.slice(0,cut$1.index),display.viewTo=cut$1.lineN):resetView(cm)}else{var cutTop=viewCuttingPoint(cm,from,from,-1),cutBot=viewCuttingPoint(cm,to,to+lendiff,1);cutTop&&cutBot?(display.view=display.view.slice(0,cutTop.index).concat(buildViewArray(cm,cutTop.lineN,cutBot.lineN)).concat(display.view.slice(cutBot.index)),display.viewTo+=lendiff):resetView(cm)}var ext=display.externalMeasured;ext&&(to=ext.lineN&&line=display.viewTo)){var lineView=display.view[findViewIndex(cm,line)];if(null!=lineView.node){var arr=lineView.changes||(lineView.changes=[]);-1==indexOf(arr,type)&&arr.push(type)}}}function resetView(cm){cm.display.viewFrom=cm.display.viewTo=cm.doc.first,cm.display.view=[],cm.display.viewOffset=0}function viewCuttingPoint(cm,oldN,newN,dir){var diff,index=findViewIndex(cm,oldN),view=cm.display.view;if(!sawCollapsedSpans||newN==cm.doc.first+cm.doc.size)return{index:index,lineN:newN};for(var n=cm.display.viewFrom,i=0;i0){if(index==view.length-1)return null;diff=n+view[index].size-oldN,index++}else diff=n-oldN;oldN+=diff,newN+=diff}for(;visualLineNo(cm.doc,newN)!=newN;){if(index==(dir<0?0:view.length-1))return null;newN+=dir*view[index-(dir<0?1:0)].size,index+=dir}return{index:index,lineN:newN}}function adjustView(cm,from,to){var display=cm.display;0==display.view.length||from>=display.viewTo||to<=display.viewFrom?(display.view=buildViewArray(cm,from,to),display.viewFrom=from):(display.viewFrom>from?display.view=buildViewArray(cm,from,display.viewFrom).concat(display.view):display.viewFromto&&(display.view=display.view.slice(0,findViewIndex(cm,to)))),display.viewTo=to}function countDirtyView(cm){for(var view=cm.display.view,dirty=0,i=0;i=cm.display.viewTo)){var end=+new Date+cm.options.workTime,context=getContextBefore(cm,doc.highlightFrontier),changedLines=[];doc.iter(context.line,Math.min(doc.first+doc.size,cm.display.viewTo+500),function(line){if(context.line>=cm.display.viewFrom){var oldStyles=line.styles,resetState=line.text.length>cm.options.maxHighlightLength?copyState(doc.mode,context.state):null,highlighted=highlightLine(cm,line,context,!0);resetState&&(context.state=resetState),line.styles=highlighted.styles;var oldCls=line.styleClasses,newCls=highlighted.classes;newCls?line.styleClasses=newCls:oldCls&&(line.styleClasses=null);for(var ischange=!oldStyles||oldStyles.length!=line.styles.length||oldCls!=newCls&&(!oldCls||!newCls||oldCls.bgClass!=newCls.bgClass||oldCls.textClass!=newCls.textClass),i=0;!ischange&&iend)return startWorker(cm,cm.options.workDelay),!0}),doc.highlightFrontier=context.line,doc.modeFrontier=Math.max(doc.modeFrontier,context.line),changedLines.length&&runInOp(cm,function(){for(var i=0;i=display.viewFrom&&update.visible.to<=display.viewTo&&(null==display.updateLineNumbers||display.updateLineNumbers>=display.viewTo)&&display.renderedView==display.view&&0==countDirtyView(cm))return!1;maybeUpdateLineNumberWidth(cm)&&(resetView(cm),update.dims=getDimensions(cm));var end=doc.first+doc.size,from=Math.max(update.visible.from-cm.options.viewportMargin,doc.first),to=Math.min(end,update.visible.to+cm.options.viewportMargin);display.viewFromto&&display.viewTo-to<20&&(to=Math.min(end,display.viewTo)),sawCollapsedSpans&&(from=visualLineNo(cm.doc,from),to=visualLineEndNo(cm.doc,to));var different=from!=display.viewFrom||to!=display.viewTo||display.lastWrapHeight!=update.wrapperHeight||display.lastWrapWidth!=update.wrapperWidth;adjustView(cm,from,to),display.viewOffset=heightAtLine(getLine(cm.doc,display.viewFrom)),cm.display.mover.style.top=display.viewOffset+"px";var toUpdate=countDirtyView(cm);if(!different&&0==toUpdate&&!update.force&&display.renderedView==display.view&&(null==display.updateLineNumbers||display.updateLineNumbers>=display.viewTo))return!1;var selSnapshot=selectionSnapshot(cm);return toUpdate>4&&(display.lineDiv.style.display="none"),patchDisplay(cm,display.updateLineNumbers,update.dims),toUpdate>4&&(display.lineDiv.style.display=""),display.renderedView=display.view,restoreSelection(selSnapshot),removeChildren(display.cursorDiv),removeChildren(display.selectionDiv),display.gutters.style.height=display.sizer.style.minHeight=0,different&&(display.lastWrapHeight=update.wrapperHeight,display.lastWrapWidth=update.wrapperWidth,startWorker(cm,400)),display.updateLineNumbers=null,!0}function postUpdateDisplay(cm,update){for(var viewport=update.viewport,first=!0;(first&&cm.options.lineWrapping&&update.oldDisplayWidth!=displayWidth(cm)||(viewport&&null!=viewport.top&&(viewport={top:Math.min(cm.doc.height+paddingVert(cm.display)-displayHeight(cm),viewport.top)}),update.visible=visibleLines(cm.display,cm.doc,viewport),!(update.visible.from>=cm.display.viewFrom&&update.visible.to<=cm.display.viewTo)))&&updateDisplayIfNeeded(cm,update);first=!1){updateHeightsInViewport(cm);var barMeasure=measureForScrollbars(cm);updateSelection(cm),updateScrollbars(cm,barMeasure),setDocumentHeight(cm,barMeasure),update.force=!1}update.signal(cm,"update",cm),cm.display.viewFrom==cm.display.reportedViewFrom&&cm.display.viewTo==cm.display.reportedViewTo||(update.signal(cm,"viewportChange",cm,cm.display.viewFrom,cm.display.viewTo),cm.display.reportedViewFrom=cm.display.viewFrom,cm.display.reportedViewTo=cm.display.viewTo)}function updateDisplaySimple(cm,viewport){var update=new DisplayUpdate(cm,viewport);if(updateDisplayIfNeeded(cm,update)){updateHeightsInViewport(cm),postUpdateDisplay(cm,update);var barMeasure=measureForScrollbars(cm);updateSelection(cm),updateScrollbars(cm,barMeasure),setDocumentHeight(cm,barMeasure),update.finish()}}function patchDisplay(cm,updateNumbersFrom,dims){function rm(node){var next=node.nextSibling;return webkit&&mac&&cm.display.currentWheelTarget==node?node.style.display="none":node.parentNode.removeChild(node),next}for(var display=cm.display,lineNumbers=cm.options.lineNumbers,container=display.lineDiv,cur=container.firstChild,view=display.view,lineN=display.viewFrom,i=0;i-1&&(updateNumber=!1),updateLineForChanges(cm,lineView,lineN,dims)),updateNumber&&(removeChildren(lineView.lineNumber),lineView.lineNumber.appendChild(document.createTextNode(lineNumberFor(cm.options,lineN)))),cur=lineView.node.nextSibling}else{var node=buildLineElement(cm,lineView,lineN,dims);container.insertBefore(node,cur)}lineN+=lineView.size}for(;cur;)cur=rm(cur)}function updateGutterSpace(cm){var width=cm.display.gutters.offsetWidth;cm.display.sizer.style.marginLeft=width+"px"}function setDocumentHeight(cm,measure){cm.display.sizer.style.minHeight=measure.docHeight+"px",cm.display.heightForcer.style.top=measure.docHeight+"px",cm.display.gutters.style.height=measure.docHeight+cm.display.barHeight+scrollGap(cm)+"px"}function updateGutters(cm){var gutters=cm.display.gutters,specs=cm.options.gutters;removeChildren(gutters);for(var i=0;i-1&&!options.lineNumbers&&(options.gutters=options.gutters.slice(0),options.gutters.splice(found,1))}function wheelEventDelta(e){var dx=e.wheelDeltaX,dy=e.wheelDeltaY;return null==dx&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(dx=e.detail),null==dy&&e.detail&&e.axis==e.VERTICAL_AXIS?dy=e.detail:null==dy&&(dy=e.wheelDelta),{x:dx,y:dy}}function wheelEventPixels(e){var delta=wheelEventDelta(e);return delta.x*=wheelPixelsPerUnit,delta.y*=wheelPixelsPerUnit,delta}function onScrollWheel(cm,e){var delta=wheelEventDelta(e),dx=delta.x,dy=delta.y,display=cm.display,scroll=display.scroller,canScrollX=scroll.scrollWidth>scroll.clientWidth,canScrollY=scroll.scrollHeight>scroll.clientHeight;if(dx&&canScrollX||dy&&canScrollY){if(dy&&mac&&webkit)outer:for(var cur=e.target,view=display.view;cur!=scroll;cur=cur.parentNode)for(var i=0;i=0){var from=minPos(prev.from(),cur.from()),to=maxPos(prev.to(),cur.to()),inv=prev.empty()?cur.from()==cur.head:prev.from()==prev.head;i<=primIndex&&--primIndex,ranges.splice(--i,2,new Range(inv?to:from,inv?from:to))}}return new Selection(ranges,primIndex)}function simpleSelection(anchor,head){return new Selection([new Range(anchor,head||anchor)],0)}function changeEnd(change){return change.text?Pos(change.from.line+change.text.length-1,lst(change.text).length+(1==change.text.length?change.from.ch:0)):change.to}function adjustForChange(pos,change){if(cmp(pos,change.from)<0)return pos;if(cmp(pos,change.to)<=0)return changeEnd(change);var line=pos.line+change.text.length-(change.to.line-change.from.line)-1,ch=pos.ch;return pos.line==change.to.line&&(ch+=changeEnd(change).ch-change.to.ch),Pos(line,ch)}function computeSelAfterChange(doc,change){for(var out=[],i=0;i1&&doc.remove(from.line+1,nlines-1),doc.insert(from.line+1,added$2)}signalLater(doc,"change",doc,change)}function linkedDocs(doc,f,sharedHistOnly){function propagate(doc,skip,sharedHist){if(doc.linked)for(var i=0;i1&&!hist.done[hist.done.length-2].ranges?(hist.done.pop(),lst(hist.done)):void 0}function addChangeToHistory(doc,change,selAfter,opId){var hist=doc.history;hist.undone.length=0;var cur,last,time=+new Date;if((hist.lastOp==opId||hist.lastOrigin==change.origin&&change.origin&&("+"==change.origin.charAt(0)&&doc.cm&&hist.lastModTime>time-doc.cm.options.historyEventDelay||"*"==change.origin.charAt(0)))&&(cur=lastChangeEvent(hist,hist.lastOp==opId)))last=lst(cur.changes),0==cmp(change.from,change.to)&&0==cmp(change.from,last.to)?last.to=changeEnd(change):cur.changes.push(historyChangeFromChange(doc,change));else{var before=lst(hist.done);for(before&&before.ranges||pushSelectionToHistory(doc.sel,hist.done),cur={changes:[historyChangeFromChange(doc,change)],generation:hist.generation},hist.done.push(cur);hist.done.length>hist.undoDepth;)hist.done.shift(),hist.done[0].ranges||hist.done.shift()}hist.done.push(selAfter),hist.generation=++hist.maxGeneration,hist.lastModTime=hist.lastSelTime=time,hist.lastOp=hist.lastSelOp=opId,hist.lastOrigin=hist.lastSelOrigin=change.origin,last||signal(doc,"historyAdded")}function selectionEventCanBeMerged(doc,origin,prev,sel){var ch=origin.charAt(0);return"*"==ch||"+"==ch&&prev.ranges.length==sel.ranges.length&&prev.somethingSelected()==sel.somethingSelected()&&new Date-doc.history.lastSelTime<=(doc.cm?doc.cm.options.historyEventDelay:500)}function addSelectionToHistory(doc,sel,opId,options){var hist=doc.history,origin=options&&options.origin;opId==hist.lastSelOp||origin&&hist.lastSelOrigin==origin&&(hist.lastModTime==hist.lastSelTime&&hist.lastOrigin==origin||selectionEventCanBeMerged(doc,origin,lst(hist.done),sel))?hist.done[hist.done.length-1]=sel:pushSelectionToHistory(sel,hist.done),hist.lastSelTime=+new Date,hist.lastSelOrigin=origin,hist.lastSelOp=opId,options&&!1!==options.clearRedo&&clearSelectionEvents(hist.undone)}function pushSelectionToHistory(sel,dest){var top=lst(dest);top&&top.ranges&&top.equals(sel)||dest.push(sel)}function attachLocalSpans(doc,change,from,to){var existing=change["spans_"+doc.id],n=0;doc.iter(Math.max(doc.first,from),Math.min(doc.first+doc.size,to),function(line){line.markedSpans&&((existing||(existing=change["spans_"+doc.id]={}))[n]=line.markedSpans),++n})}function removeClearedSpans(spans){if(!spans)return null;for(var out,i=0;i-1&&(lst(newChanges)[prop]=change[prop],delete change[prop])}}}return copy}function extendRange(range,head,other,extend){if(extend){var anchor=range.anchor;if(other){var posBefore=cmp(head,anchor)<0;posBefore!=cmp(other,anchor)<0?(anchor=head,head=other):posBefore!=cmp(head,other)<0&&(head=other)}return new Range(anchor,head)}return new Range(other||head,head)}function extendSelection(doc,head,other,options,extend){null==extend&&(extend=doc.cm&&(doc.cm.display.shift||doc.extend)),setSelection(doc,new Selection([extendRange(doc.sel.primary(),head,other,extend)],0),options)}function extendSelections(doc,heads,options){for(var out=[],extend=doc.cm&&(doc.cm.display.shift||doc.extend),i=0;i=pos.ch:sp.to>pos.ch))){if(mayClear&&(signal(m,"beforeCursorEnter"),m.explicitlyCleared)){if(line.markedSpans){--i;continue}break}if(!m.atomic)continue;if(oldPos){var near=m.find(dir<0?1:-1),diff=void 0;if((dir<0?m.inclusiveRight:m.inclusiveLeft)&&(near=movePos(doc,near,-dir,near&&near.line==pos.line?line:null)),near&&near.line==pos.line&&(diff=cmp(near,oldPos))&&(dir<0?diff<0:diff>0))return skipAtomicInner(doc,near,pos,dir,mayClear)}var far=m.find(dir<0?-1:1);return(dir<0?m.inclusiveLeft:m.inclusiveRight)&&(far=movePos(doc,far,dir,far.line==pos.line?line:null)),far?skipAtomicInner(doc,far,pos,dir,mayClear):null}}return pos}function skipAtomic(doc,pos,oldPos,bias,mayClear){var dir=bias||1,found=skipAtomicInner(doc,pos,oldPos,dir,mayClear)||!mayClear&&skipAtomicInner(doc,pos,oldPos,dir,!0)||skipAtomicInner(doc,pos,oldPos,-dir,mayClear)||!mayClear&&skipAtomicInner(doc,pos,oldPos,-dir,!0);return found||(doc.cantEdit=!0,Pos(doc.first,0))}function movePos(doc,pos,dir,line){return dir<0&&0==pos.ch?pos.line>doc.first?clipPos(doc,Pos(pos.line-1)):null:dir>0&&pos.ch==(line||getLine(doc,pos.line)).text.length?pos.line=0;--i)makeChangeInner(doc,{from:split[i].from,to:split[i].to,text:i?[""]:change.text});else makeChangeInner(doc,change)}}function makeChangeInner(doc,change){if(1!=change.text.length||""!=change.text[0]||0!=cmp(change.from,change.to)){var selAfter=computeSelAfterChange(doc,change);addChangeToHistory(doc,change,selAfter,doc.cm?doc.cm.curOp.id:NaN),makeChangeSingleDoc(doc,change,selAfter,stretchSpansOverChange(doc,change));var rebased=[];linkedDocs(doc,function(doc,sharedHist){sharedHist||-1!=indexOf(rebased,doc.history)||(rebaseHist(doc.history,change),rebased.push(doc.history)),makeChangeSingleDoc(doc,change,null,stretchSpansOverChange(doc,change))})}}function makeChangeFromHistory(doc,type,allowSelectionOnly){if(!doc.cm||!doc.cm.state.suppressEdits||allowSelectionOnly){for(var event,hist=doc.history,selAfter=doc.sel,source="undo"==type?hist.done:hist.undone,dest="undo"==type?hist.undone:hist.done,i=0;i=0;--i$1){var returned=function(i){var change=event.changes[i];if(change.origin=type,filter&&!filterChange(doc,change,!1))return source.length=0,{};antiChanges.push(historyChangeFromChange(doc,change));var after=i?computeSelAfterChange(doc,change):lst(source);makeChangeSingleDoc(doc,change,after,mergeOldSpans(doc,change)),!i&&doc.cm&&doc.cm.scrollIntoView({from:change.from,to:changeEnd(change)});var rebased=[];linkedDocs(doc,function(doc,sharedHist){sharedHist||-1!=indexOf(rebased,doc.history)||(rebaseHist(doc.history,change),rebased.push(doc.history)),makeChangeSingleDoc(doc,change,null,mergeOldSpans(doc,change))})}(i$1);if(returned)return returned.v}}}}function shiftDoc(doc,distance){if(0!=distance&&(doc.first+=distance,doc.sel=new Selection(map(doc.sel.ranges,function(range){return new Range(Pos(range.anchor.line+distance,range.anchor.ch),Pos(range.head.line+distance,range.head.ch))}),doc.sel.primIndex),doc.cm)){regChange(doc.cm,doc.first,doc.first-distance,distance);for(var d=doc.cm.display,l=d.viewFrom;ldoc.lastLine())){if(change.from.linelast&&(change={from:change.from,to:Pos(last,getLine(doc,last).text.length),text:[change.text[0]],origin:change.origin}),change.removed=getBetween(doc,change.from,change.to),selAfter||(selAfter=computeSelAfterChange(doc,change)),doc.cm?makeChangeSingleDocInEditor(doc.cm,change,spans):updateDoc(doc,change,spans),setSelectionNoUndo(doc,selAfter,sel_dontScroll)}}function makeChangeSingleDocInEditor(cm,change,spans){var doc=cm.doc,display=cm.display,from=change.from,to=change.to,recomputeMaxLength=!1,checkWidthStart=from.line;cm.options.lineWrapping||(checkWidthStart=lineNo(visualLine(getLine(doc,from.line))),doc.iter(checkWidthStart,to.line+1,function(line){if(line==display.maxLine)return recomputeMaxLength=!0,!0})),doc.sel.contains(change.from,change.to)>-1&&signalCursorActivity(cm),updateDoc(doc,change,spans,estimateHeight(cm)),cm.options.lineWrapping||(doc.iter(checkWidthStart,from.line+change.text.length,function(line){var len=lineLength(line);len>display.maxLineLength&&(display.maxLine=line,display.maxLineLength=len,display.maxLineChanged=!0,recomputeMaxLength=!1)}),recomputeMaxLength&&(cm.curOp.updateMaxLine=!0)),retreatFrontier(doc,from.line),startWorker(cm,400);var lendiff=change.text.length-(to.line-from.line)-1;change.full?regChange(cm):from.line!=to.line||1!=change.text.length||isWholeLineUpdate(cm.doc,change)?regChange(cm,from.line,to.line+1,lendiff):regLineChange(cm,from.line,"text");var changesHandler=hasHandler(cm,"changes"),changeHandler=hasHandler(cm,"change");if(changeHandler||changesHandler){var obj={from:from,to:to,text:change.text,removed:change.removed,origin:change.origin};changeHandler&&signalLater(cm,"change",cm,obj),changesHandler&&(cm.curOp.changeObjs||(cm.curOp.changeObjs=[])).push(obj)}cm.display.selForContextMenu=null}function replaceRange(doc,code,from,to,origin){if(to||(to=from),cmp(to,from)<0){var tmp=to;to=from,from=tmp}"string"==typeof code&&(code=doc.splitLines(code)),makeChange(doc,{from:from,to:to,text:code,origin:origin})}function rebaseHistSelSingle(pos,from,to,diff){to0||0==diff&&!1!==marker.clearWhenEmpty)return marker;if(marker.replacedWith&&(marker.collapsed=!0,marker.widgetNode=eltP("span",[marker.replacedWith],"CodeMirror-widget"),options.handleMouseEvents||marker.widgetNode.setAttribute("cm-ignore-events","true"),options.insertLeft&&(marker.widgetNode.insertLeft=!0)),marker.collapsed){if(conflictingCollapsedRange(doc,from.line,from,to,marker)||from.line!=to.line&&conflictingCollapsedRange(doc,to.line,from,to,marker))throw new Error("Inserting collapsed marker partially overlapping an existing one");seeCollapsedSpans()}marker.addToHistory&&addChangeToHistory(doc,{from:from,to:to,origin:"markText"},doc.sel,NaN);var updateMaxLine,curLine=from.line,cm=doc.cm;if(doc.iter(curLine,to.line+1,function(line){cm&&marker.collapsed&&!cm.options.lineWrapping&&visualLine(line)==cm.display.maxLine&&(updateMaxLine=!0),marker.collapsed&&curLine!=from.line&&updateLineHeight(line,0),addMarkedSpan(line,new MarkedSpan(marker,curLine==from.line?from.ch:null,curLine==to.line?to.ch:null)),++curLine}),marker.collapsed&&doc.iter(from.line,to.line+1,function(line){lineIsHidden(doc,line)&&updateLineHeight(line,0)}),marker.clearOnEnter&&on(marker,"beforeCursorEnter",function(){return marker.clear()}),marker.readOnly&&(seeReadOnlySpans(),(doc.history.done.length||doc.history.undone.length)&&doc.clearHistory()),marker.collapsed&&(marker.id=++nextMarkerId,marker.atomic=!0),cm){if(updateMaxLine&&(cm.curOp.updateMaxLine=!0),marker.collapsed)regChange(cm,from.line,to.line+1);else if(marker.className||marker.title||marker.startStyle||marker.endStyle||marker.css)for(var i=from.line;i<=to.line;i++)regLineChange(cm,i,"text");marker.atomic&&reCheckSelection(cm.doc),signalLater(cm,"markerAdded",cm,marker)}return marker}function markTextShared(doc,from,to,options,type){(options=copyObj(options)).shared=!1;var markers=[markText(doc,from,to,options,type)],primary=markers[0],widget=options.widgetNode;return linkedDocs(doc,function(doc){widget&&(options.widgetNode=widget.cloneNode(!0)),markers.push(markText(doc,clipPos(doc,from),clipPos(doc,to),options,type));for(var i=0;i-1)return cm.state.draggingText(e),void setTimeout(function(){return cm.display.input.focus()},20);try{var text$1=e.dataTransfer.getData("Text");if(text$1){var selected;if(cm.state.draggingText&&!cm.state.draggingText.copy&&(selected=cm.listSelections()),setSelectionNoUndo(cm.doc,simpleSelection(pos,pos)),selected)for(var i$1=0;i$1=0;i--)replaceRange(cm.doc,"",kill[i].from,kill[i].to,"+delete");ensureCursorVisible(cm)})}function lineStart(cm,lineN){var line=getLine(cm.doc,lineN),visual=visualLine(line);return visual!=line&&(lineN=lineNo(visual)),endOfLine(!0,cm,visual,lineN,1)}function lineEnd(cm,lineN){var line=getLine(cm.doc,lineN),visual=visualLineEnd(line);return visual!=line&&(lineN=lineNo(visual)),endOfLine(!0,cm,line,lineN,-1)}function lineStartSmart(cm,pos){var start=lineStart(cm,pos.line),line=getLine(cm.doc,start.line),order=getOrder(line,cm.doc.direction);if(!order||0==order[0].level){var firstNonWS=Math.max(0,line.text.search(/\S/)),inWS=pos.line==start.line&&pos.ch<=firstNonWS&&pos.ch;return Pos(start.line,inWS?0:firstNonWS,start.sticky)}return start}function doHandleBinding(cm,bound,dropShift){if("string"==typeof bound&&!(bound=commands[bound]))return!1;cm.display.input.ensurePolled();var prevShift=cm.display.shift,done=!1;try{cm.isReadOnly()&&(cm.state.suppressEdits=!0),dropShift&&(cm.display.shift=!1),done=bound(cm)!=Pass}finally{cm.display.shift=prevShift,cm.state.suppressEdits=!1}return done}function lookupKeyForEditor(cm,name,handle){for(var i=0;i-1&&(cmp((contained=sel.ranges[contained]).from(),pos)<0||pos.xRel>0)&&(cmp(contained.to(),pos)>0||pos.xRel<0)?leftButtonStartDrag(cm,event,pos,behavior):leftButtonSelect(cm,event,pos,behavior)}function leftButtonStartDrag(cm,event,pos,behavior){var display=cm.display,moved=!1,dragEnd=operation(cm,function(e){webkit&&(display.scroller.draggable=!1),cm.state.draggingText=!1,off(document,"mouseup",dragEnd),off(document,"mousemove",mouseMove),off(display.scroller,"dragstart",dragStart),off(display.scroller,"drop",dragEnd),moved||(e_preventDefault(e),behavior.addNew||extendSelection(cm.doc,pos,null,null,behavior.extend),webkit||ie&&9==ie_version?setTimeout(function(){document.body.focus(),display.input.focus()},20):display.input.focus())}),mouseMove=function(e2){moved=moved||Math.abs(event.clientX-e2.clientX)+Math.abs(event.clientY-e2.clientY)>=10},dragStart=function(){return moved=!0};webkit&&(display.scroller.draggable=!0),cm.state.draggingText=dragEnd,dragEnd.copy=!behavior.moveOnDrag,display.scroller.dragDrop&&display.scroller.dragDrop(),on(document,"mouseup",dragEnd),on(document,"mousemove",mouseMove),on(display.scroller,"dragstart",dragStart),on(display.scroller,"drop",dragEnd),delayBlurEvent(cm),setTimeout(function(){return display.input.focus()},20)}function rangeForUnit(cm,pos,unit){if("char"==unit)return new Range(pos,pos);if("word"==unit)return cm.findWordAt(pos);if("line"==unit)return new Range(Pos(pos.line,0),clipPos(cm.doc,Pos(pos.line+1,0)));var result=unit(cm,pos);return new Range(result.from,result.to)}function leftButtonSelect(cm,event,start,behavior){function extendTo(pos){if(0!=cmp(lastPos,pos))if(lastPos=pos,"rectangle"==behavior.unit){for(var ranges=[],tabSize=cm.options.tabSize,startCol=countColumn(getLine(doc,start.line).text,start.ch,tabSize),posCol=countColumn(getLine(doc,pos.line).text,pos.ch,tabSize),left=Math.min(startCol,posCol),right=Math.max(startCol,posCol),line=Math.min(start.line,pos.line),end=Math.min(cm.lastLine(),Math.max(start.line,pos.line));line<=end;line++){var text=getLine(doc,line).text,leftPos=findColumn(text,left,tabSize);left==right?ranges.push(new Range(Pos(line,leftPos),Pos(line,leftPos))):text.length>leftPos&&ranges.push(new Range(Pos(line,leftPos),Pos(line,findColumn(text,right,tabSize))))}ranges.length||ranges.push(new Range(start,start)),setSelection(doc,normalizeSelection(startSel.ranges.slice(0,ourIndex).concat(ranges),ourIndex),{origin:"*mouse",scroll:!1}),cm.scrollIntoView(pos)}else{var head,oldRange=ourRange,range$$1=rangeForUnit(cm,pos,behavior.unit),anchor=oldRange.anchor;cmp(range$$1.anchor,anchor)>0?(head=range$$1.head,anchor=minPos(oldRange.from(),range$$1.anchor)):(head=range$$1.anchor,anchor=maxPos(oldRange.to(),range$$1.head));var ranges$1=startSel.ranges.slice(0);ranges$1[ourIndex]=new Range(clipPos(doc,anchor),head),setSelection(doc,normalizeSelection(ranges$1,ourIndex),sel_mouse)}}function extend(e){var curCount=++counter,cur=posFromMouse(cm,e,!0,"rectangle"==behavior.unit);if(cur)if(0!=cmp(cur,lastPos)){cm.curOp.focus=activeElt(),extendTo(cur);var visible=visibleLines(display,doc);(cur.line>=visible.to||cur.lineeditorSize.bottom?20:0;outside&&setTimeout(operation(cm,function(){counter==curCount&&(display.scroller.scrollTop+=outside,extend(e))}),50)}}function done(e){cm.state.selectingText=!1,counter=1/0,e_preventDefault(e),display.input.focus(),off(document,"mousemove",move),off(document,"mouseup",up),doc.history.lastSelOrigin=null}var display=cm.display,doc=cm.doc;e_preventDefault(event);var ourRange,ourIndex,startSel=doc.sel,ranges=startSel.ranges;if(behavior.addNew&&!behavior.extend?(ourIndex=doc.sel.contains(start),ourRange=ourIndex>-1?ranges[ourIndex]:new Range(start,start)):(ourRange=doc.sel.primary(),ourIndex=doc.sel.primIndex),"rectangle"==behavior.unit)behavior.addNew||(ourRange=new Range(start,start)),start=posFromMouse(cm,event,!0,!0),ourIndex=-1;else{var range$$1=rangeForUnit(cm,start,behavior.unit);ourRange=behavior.extend?extendRange(ourRange,range$$1.anchor,range$$1.head,behavior.extend):range$$1}behavior.addNew?-1==ourIndex?(ourIndex=ranges.length,setSelection(doc,normalizeSelection(ranges.concat([ourRange]),ourIndex),{scroll:!1,origin:"*mouse"})):ranges.length>1&&ranges[ourIndex].empty()&&"char"==behavior.unit&&!behavior.extend?(setSelection(doc,normalizeSelection(ranges.slice(0,ourIndex).concat(ranges.slice(ourIndex+1)),0),{scroll:!1,origin:"*mouse"}),startSel=doc.sel):replaceOneSelection(doc,ourIndex,ourRange,sel_mouse):(ourIndex=0,setSelection(doc,new Selection([ourRange],0),sel_mouse),startSel=doc.sel);var lastPos=start,editorSize=display.wrapper.getBoundingClientRect(),counter=0,move=operation(cm,function(e){e_button(e)?extend(e):done(e)}),up=operation(cm,done);cm.state.selectingText=up,on(document,"mousemove",move),on(document,"mouseup",up)}function gutterEvent(cm,e,type,prevent){var mX,mY;try{mX=e.clientX,mY=e.clientY}catch(e){return!1}if(mX>=Math.floor(cm.display.gutters.getBoundingClientRect().right))return!1;prevent&&e_preventDefault(e);var display=cm.display,lineBox=display.lineDiv.getBoundingClientRect();if(mY>lineBox.bottom||!hasHandler(cm,type))return e_defaultPrevented(e);mY-=lineBox.top-display.viewOffset;for(var i=0;i=mX)return signal(cm,type,cm,lineAtHeight(cm.doc,mY),cm.options.gutters[i],e),e_defaultPrevented(e)}}function clickInGutter(cm,e){return gutterEvent(cm,e,"gutterClick",!0)}function onContextMenu(cm,e){eventInWidget(cm.display,e)||contextMenuInGutter(cm,e)||signalDOMEvent(cm,e,"contextmenu")||cm.display.input.onContextMenu(e)}function contextMenuInGutter(cm,e){return!!hasHandler(cm,"gutterContextMenu")&&gutterEvent(cm,e,"gutterContextMenu",!1)}function themeChanged(cm){cm.display.wrapper.className=cm.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+cm.options.theme.replace(/(^|\s)\s*/g," cm-s-"),clearCaches(cm)}function guttersChanged(cm){updateGutters(cm),regChange(cm),alignHorizontally(cm)}function dragDropChanged(cm,value,old){if(!value!=!(old&&old!=Init)){var funcs=cm.display.dragFunctions,toggle=value?on:off;toggle(cm.display.scroller,"dragstart",funcs.start),toggle(cm.display.scroller,"dragenter",funcs.enter),toggle(cm.display.scroller,"dragover",funcs.over),toggle(cm.display.scroller,"dragleave",funcs.leave),toggle(cm.display.scroller,"drop",funcs.drop)}}function wrappingChanged(cm){cm.options.lineWrapping?(addClass(cm.display.wrapper,"CodeMirror-wrap"),cm.display.sizer.style.minWidth="",cm.display.sizerWidth=null):(rmClass(cm.display.wrapper,"CodeMirror-wrap"),findMaxLine(cm)),estimateLineHeights(cm),regChange(cm),clearCaches(cm),setTimeout(function(){return updateScrollbars(cm)},100)}function CodeMirror$1(place,options){var this$1=this;if(!(this instanceof CodeMirror$1))return new CodeMirror$1(place,options);this.options=options=options?copyObj(options):{},copyObj(defaults,options,!1),setGuttersForLineNumbers(options);var doc=options.value;"string"==typeof doc&&(doc=new Doc(doc,options.mode,null,options.lineSeparator,options.direction)),this.doc=doc;var input=new CodeMirror$1.inputStyles[options.inputStyle](this),display=this.display=new Display(place,doc,input);display.wrapper.CodeMirror=this,updateGutters(this),themeChanged(this),options.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),initScrollbars(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 Delayed,keySeq:null,specialChars:null},options.autofocus&&!mobile&&display.input.focus(),ie&&ie_version<11&&setTimeout(function(){return this$1.display.input.reset(!0)},20),registerEventHandlers(this),ensureGlobalHandlers(),startOperation(this),this.curOp.forceUpdate=!0,attachDoc(this,doc),options.autofocus&&!mobile||this.hasFocus()?setTimeout(bind(onFocus,this),20):onBlur(this);for(var opt in optionHandlers)optionHandlers.hasOwnProperty(opt)&&optionHandlers[opt](this$1,options[opt],Init);maybeUpdateLineNumberWidth(this),options.finishInit&&options.finishInit(this);for(var i=0;i400}var d=cm.display;on(d.scroller,"mousedown",operation(cm,onMouseDown)),ie&&ie_version<11?on(d.scroller,"dblclick",operation(cm,function(e){if(!signalDOMEvent(cm,e)){var pos=posFromMouse(cm,e);if(pos&&!clickInGutter(cm,e)&&!eventInWidget(cm.display,e)){e_preventDefault(e);var word=cm.findWordAt(pos);extendSelection(cm.doc,word.anchor,word.head)}}})):on(d.scroller,"dblclick",function(e){return signalDOMEvent(cm,e)||e_preventDefault(e)}),captureRightClick||on(d.scroller,"contextmenu",function(e){return onContextMenu(cm,e)});var touchFinished,prevTouch={end:0};on(d.scroller,"touchstart",function(e){if(!signalDOMEvent(cm,e)&&!isMouseLikeTouchEvent(e)){d.input.ensurePolled(),clearTimeout(touchFinished);var now=+new Date;d.activeTouch={start:now,moved:!1,prev:now-prevTouch.end<=300?prevTouch:null},1==e.touches.length&&(d.activeTouch.left=e.touches[0].pageX,d.activeTouch.top=e.touches[0].pageY)}}),on(d.scroller,"touchmove",function(){d.activeTouch&&(d.activeTouch.moved=!0)}),on(d.scroller,"touchend",function(e){var touch=d.activeTouch;if(touch&&!eventInWidget(d,e)&&null!=touch.left&&!touch.moved&&new Date-touch.start<300){var range,pos=cm.coordsChar(d.activeTouch,"page");range=!touch.prev||farAway(touch,touch.prev)?new Range(pos,pos):!touch.prev.prev||farAway(touch,touch.prev.prev)?cm.findWordAt(pos):new Range(Pos(pos.line,0),clipPos(cm.doc,Pos(pos.line+1,0))),cm.setSelection(range.anchor,range.head),cm.focus(),e_preventDefault(e)}finishTouch()}),on(d.scroller,"touchcancel",finishTouch),on(d.scroller,"scroll",function(){d.scroller.clientHeight&&(updateScrollTop(cm,d.scroller.scrollTop),setScrollLeft(cm,d.scroller.scrollLeft,!0),signal(cm,"scroll",cm))}),on(d.scroller,"mousewheel",function(e){return onScrollWheel(cm,e)}),on(d.scroller,"DOMMouseScroll",function(e){return onScrollWheel(cm,e)}),on(d.wrapper,"scroll",function(){return d.wrapper.scrollTop=d.wrapper.scrollLeft=0}),d.dragFunctions={enter:function(e){signalDOMEvent(cm,e)||e_stop(e)},over:function(e){signalDOMEvent(cm,e)||(onDragOver(cm,e),e_stop(e))},start:function(e){return onDragStart(cm,e)},drop:operation(cm,onDrop),leave:function(e){signalDOMEvent(cm,e)||clearDragCursor(cm)}};var inp=d.input.getField();on(inp,"keyup",function(e){return onKeyUp.call(cm,e)}),on(inp,"keydown",operation(cm,onKeyDown)),on(inp,"keypress",operation(cm,onKeyPress)),on(inp,"focus",function(e){return onFocus(cm,e)}),on(inp,"blur",function(e){return onBlur(cm,e)})}function indentLine(cm,n,how,aggressive){var state,doc=cm.doc;null==how&&(how="add"),"smart"==how&&(doc.mode.indent?state=getContextBefore(cm,n).state:how="prev");var tabSize=cm.options.tabSize,line=getLine(doc,n),curSpace=countColumn(line.text,null,tabSize);line.stateAfter&&(line.stateAfter=null);var indentation,curSpaceString=line.text.match(/^\s*/)[0];if(aggressive||/\S/.test(line.text)){if("smart"==how&&((indentation=doc.mode.indent(state,line.text.slice(curSpaceString.length),line.text))==Pass||indentation>150)){if(!aggressive)return;how="prev"}}else indentation=0,how="not";"prev"==how?indentation=n>doc.first?countColumn(getLine(doc,n-1).text,null,tabSize):0:"add"==how?indentation=curSpace+cm.options.indentUnit:"subtract"==how?indentation=curSpace-cm.options.indentUnit:"number"==typeof how&&(indentation=curSpace+how),indentation=Math.max(0,indentation);var indentString="",pos=0;if(cm.options.indentWithTabs)for(var i=Math.floor(indentation/tabSize);i;--i)pos+=tabSize,indentString+="\t";if(pos1)if(lastCopied&&lastCopied.text.join("\n")==inserted){if(sel.ranges.length%lastCopied.text.length==0){multiPaste=[];for(var i=0;i=0;i$1--){var range$$1=sel.ranges[i$1],from=range$$1.from(),to=range$$1.to();range$$1.empty()&&(deleted&&deleted>0?from=Pos(from.line,from.ch-deleted):cm.state.overwrite&&!paste?to=Pos(to.line,Math.min(getLine(doc,to.line).text.length,to.ch+lst(textLines).length)):lastCopied&&lastCopied.lineWise&&lastCopied.text.join("\n")==inserted&&(from=to=Pos(from.line,0))),updateInput=cm.curOp.updateInput;var changeEvent={from:from,to:to,text:multiPaste?multiPaste[i$1%multiPaste.length]:textLines,origin:origin||(paste?"paste":cm.state.cutIncoming?"cut":"+input")};makeChange(cm.doc,changeEvent),signalLater(cm,"inputRead",cm,changeEvent)}inserted&&!paste&&triggerElectric(cm,inserted),ensureCursorVisible(cm),cm.curOp.updateInput=updateInput,cm.curOp.typing=!0,cm.state.pasteIncoming=cm.state.cutIncoming=!1}function handlePaste(e,cm){var pasted=e.clipboardData&&e.clipboardData.getData("Text");if(pasted)return e.preventDefault(),cm.isReadOnly()||cm.options.disableInput||runInOp(cm,function(){return applyTextInput(cm,pasted,0,null,"paste")}),!0}function triggerElectric(cm,inserted){if(cm.options.electricChars&&cm.options.smartIndent)for(var sel=cm.doc.sel,i=sel.ranges.length-1;i>=0;i--){var range$$1=sel.ranges[i];if(!(range$$1.head.ch>100||i&&sel.ranges[i-1].head.line==range$$1.head.line)){var mode=cm.getModeAt(range$$1.head),indented=!1;if(mode.electricChars){for(var j=0;j-1){indented=indentLine(cm,range$$1.head.line,"smart");break}}else mode.electricInput&&mode.electricInput.test(getLine(cm.doc,range$$1.head.line).text.slice(0,range$$1.head.ch))&&(indented=indentLine(cm,range$$1.head.line,"smart"));indented&&signalLater(cm,"electricInput",cm,range$$1.head.line)}}}function copyableRanges(cm){for(var text=[],ranges=[],i=0;i=doc.first+doc.size)&&(pos=new Pos(l,pos.ch,pos.sticky),lineObj=getLine(doc,l))}function moveOnce(boundToLine){var next;if(null==(next=visually?moveVisually(doc.cm,lineObj,pos,dir):moveLogically(lineObj,pos,dir))){if(boundToLine||!findNextLine())return!1;pos=endOfLine(visually,doc.cm,lineObj,pos.line,dir)}else pos=next;return!0}var oldPos=pos,origDir=dir,lineObj=getLine(doc,pos.line);if("char"==unit)moveOnce();else if("column"==unit)moveOnce(!0);else if("word"==unit||"group"==unit)for(var sawType=null,group="group"==unit,helper=doc.cm&&doc.cm.getHelper(pos,"wordChars"),first=!0;!(dir<0)||moveOnce(!first);first=!1){var cur=lineObj.text.charAt(pos.ch)||"\n",type=isWordChar(cur,helper)?"w":group&&"\n"==cur?"n":!group||/\s/.test(cur)?null:"p";if(!group||first||type||(type="s"),sawType&&sawType!=type){dir<0&&(dir=1,moveOnce(),pos.sticky="after");break}if(type&&(sawType=type),dir>0&&!moveOnce(!first))break}var result=skipAtomic(doc,pos,oldPos,origDir,!0);return equalCursorPos(oldPos,result)&&(result.hitSide=!0),result}function findPosV(cm,pos,dir,unit){var y,doc=cm.doc,x=pos.left;if("page"==unit){var pageSize=Math.min(cm.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),moveAmount=Math.max(pageSize-.5*textHeight(cm.display),3);y=(dir>0?pos.bottom:pos.top)+dir*moveAmount}else"line"==unit&&(y=dir>0?pos.bottom+3:pos.top-3);for(var target;(target=coordsChar(cm,x,y)).outside;){if(dir<0?y<=0:y>=doc.height){target.hitSide=!0;break}y+=5*dir}return target}function posToDOM(cm,pos){var view=findViewForLine(cm,pos.line);if(!view||view.hidden)return null;var line=getLine(cm.doc,pos.line),info=mapFromLineView(view,line,pos.line),order=getOrder(line,cm.doc.direction),side="left";order&&(side=getBidiPartAt(order,pos.ch)%2?"right":"left");var result=nodeAndOffsetInLineMap(info.map,pos.ch,side);return result.offset="right"==result.collapse?result.end:result.start,result}function isInGutter(node){for(var scan=node;scan;scan=scan.parentNode)if(/CodeMirror-gutter-wrapper/.test(scan.className))return!0;return!1}function badPos(pos,bad){return bad&&(pos.bad=!0),pos}function domTextBetween(cm,from,to,fromLine,toLine){function recognizeMarker(id){return function(marker){return marker.id==id}}function close(){closing&&(text+=lineSep,closing=!1)}function addText(str){str&&(close(),text+=str)}function walk(node){if(1==node.nodeType){var cmText=node.getAttribute("cm-text");if(null!=cmText)return void addText(cmText||node.textContent.replace(/\u200b/g,""));var range$$1,markerID=node.getAttribute("cm-marker");if(markerID){var found=cm.findMarks(Pos(fromLine,0),Pos(toLine+1,0),recognizeMarker(+markerID));return void(found.length&&(range$$1=found[0].find())&&addText(getBetween(cm.doc,range$$1.from,range$$1.to).join(lineSep)))}if("false"==node.getAttribute("contenteditable"))return;var isBlock=/^(pre|div|p)$/i.test(node.nodeName);isBlock&&close();for(var i=0;i=15&&(presto=!1,webkit=!0);var range,flipCtrlCmd=mac&&(qtwebkit||presto&&(null==presto_version||presto_version<12.11)),captureRightClick=gecko||ie&&ie_version>=9,rmClass=function(node,cls){var current=node.className,match=classTest(cls).exec(current);if(match){var after=current.slice(match.index+match[0].length);node.className=current.slice(0,match.index)+(after?match[1]+after:"")}};range=document.createRange?function(node,start,end,endNode){var r=document.createRange();return r.setEnd(endNode||node,end),r.setStart(node,start),r}:function(node,start,end){var r=document.body.createTextRange();try{r.moveToElementText(node.parentNode)}catch(e){return r}return r.collapse(!0),r.moveEnd("character",end),r.moveStart("character",start),r};var selectInput=function(node){node.select()};ios?selectInput=function(node){node.selectionStart=0,node.selectionEnd=node.value.length}:ie&&(selectInput=function(node){try{node.select()}catch(_e){}});var Delayed=function(){this.id=null};Delayed.prototype.set=function(ms,f){clearTimeout(this.id),this.id=setTimeout(f,ms)};var zwspSupported,badBidiRects,scrollerGap=30,Pass={toString:function(){return"CodeMirror.Pass"}},sel_dontScroll={scroll:!1},sel_mouse={origin:"*mouse"},sel_move={origin:"+move"},spaceStrs=[""],nonASCIISingleCaseWordChar=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,extendingChars=/[\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]/,sawReadOnlySpans=!1,sawCollapsedSpans=!1,bidiOther=null,bidiOrdering=function(){function charType(code){return code<=247?lowTypes.charAt(code):1424<=code&&code<=1524?"R":1536<=code&&code<=1785?arabicTypes.charAt(code-1536):1774<=code&&code<=2220?"r":8192<=code&&code<=8203?"w":8204==code?"b":"L"}function BidiSpan(level,from,to){this.level=level,this.from=from,this.to=to}var lowTypes="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",arabicTypes="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111",bidiRE=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,isNeutral=/[stwN]/,isStrong=/[LRr]/,countsAsLeft=/[Lb1n]/,countsAsNum=/[1n]/;return function(str,direction){var outerType="ltr"==direction?"L":"R";if(0==str.length||"ltr"==direction&&!bidiRE.test(str))return!1;for(var len=str.length,types=[],i=0;i=this.string.length},StringStream.prototype.sol=function(){return this.pos==this.lineStart},StringStream.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},StringStream.prototype.next=function(){if(this.posstart},StringStream.prototype.eatSpace=function(){for(var this$1=this,start=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this$1.pos;return this.pos>start},StringStream.prototype.skipToEnd=function(){this.pos=this.string.length},StringStream.prototype.skipTo=function(ch){var found=this.string.indexOf(ch,this.pos);if(found>-1)return this.pos=found,!0},StringStream.prototype.backUp=function(n){this.pos-=n},StringStream.prototype.column=function(){return this.lastColumnPos0?null:(match&&!1!==consume&&(this.pos+=match[0].length),match)}var cased=function(str){return caseInsensitive?str.toLowerCase():str};if(cased(this.string.substr(this.pos,pattern.length))==cased(pattern))return!1!==consume&&(this.pos+=pattern.length),!0},StringStream.prototype.current=function(){return this.string.slice(this.start,this.pos)},StringStream.prototype.hideFirstChars=function(n,inner){this.lineStart+=n;try{return inner()}finally{this.lineStart-=n}},StringStream.prototype.lookAhead=function(n){var oracle=this.lineOracle;return oracle&&oracle.lookAhead(n)};var SavedContext=function(state,lookAhead){this.state=state,this.lookAhead=lookAhead},Context=function(doc,state,line,lookAhead){this.state=state,this.doc=doc,this.line=line,this.maxLookAhead=lookAhead||0};Context.prototype.lookAhead=function(n){var line=this.doc.getLine(this.line+n);return null!=line&&n>this.maxLookAhead&&(this.maxLookAhead=n),line},Context.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Context.fromSaved=function(doc,saved,line){return saved instanceof SavedContext?new Context(doc,copyState(doc.mode,saved.saved),line,saved.lookAhead):new Context(doc,copyState(doc.mode,saved),line)},Context.prototype.save=function(copy){var state=!1!==copy?copyState(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new SavedContext(state,this.maxLookAhead):state};var Token=function(stream,type,state){this.start=stream.start,this.end=stream.pos,this.string=stream.current(),this.type=type||null,this.state=state},Line=function(text,markedSpans,estimateHeight){this.text=text,attachMarkedSpans(this,markedSpans),this.height=estimateHeight?estimateHeight(this):1};Line.prototype.lineNo=function(){return lineNo(this)},eventMixin(Line);var measureText,styleToClassCache={},styleToClassCacheWithMode={},operationGroup=null,orphanDelayedCallbacks=null,nullRect={left:0,right:0,top:0,bottom:0},NativeScrollbars=function(place,scroll,cm){this.cm=cm;var vert=this.vert=elt("div",[elt("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),horiz=this.horiz=elt("div",[elt("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");place(vert),place(horiz),on(vert,"scroll",function(){vert.clientHeight&&scroll(vert.scrollTop,"vertical")}),on(horiz,"scroll",function(){horiz.clientWidth&&scroll(horiz.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,ie&&ie_version<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};NativeScrollbars.prototype.update=function(measure){var needsH=measure.scrollWidth>measure.clientWidth+1,needsV=measure.scrollHeight>measure.clientHeight+1,sWidth=measure.nativeBarWidth;if(needsV){this.vert.style.display="block",this.vert.style.bottom=needsH?sWidth+"px":"0";var totalHeight=measure.viewHeight-(needsH?sWidth:0);this.vert.firstChild.style.height=Math.max(0,measure.scrollHeight-measure.clientHeight+totalHeight)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(needsH){this.horiz.style.display="block",this.horiz.style.right=needsV?sWidth+"px":"0",this.horiz.style.left=measure.barLeft+"px";var totalWidth=measure.viewWidth-measure.barLeft-(needsV?sWidth:0);this.horiz.firstChild.style.width=Math.max(0,measure.scrollWidth-measure.clientWidth+totalWidth)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&measure.clientHeight>0&&(0==sWidth&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:needsV?sWidth:0,bottom:needsH?sWidth:0}},NativeScrollbars.prototype.setScrollLeft=function(pos){this.horiz.scrollLeft!=pos&&(this.horiz.scrollLeft=pos),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},NativeScrollbars.prototype.setScrollTop=function(pos){this.vert.scrollTop!=pos&&(this.vert.scrollTop=pos),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},NativeScrollbars.prototype.zeroWidthHack=function(){var w=mac&&!mac_geMountainLion?"12px":"18px";this.horiz.style.height=this.vert.style.width=w,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Delayed,this.disableVert=new Delayed},NativeScrollbars.prototype.enableZeroWidthBar=function(bar,delay,type){function maybeDisable(){var box=bar.getBoundingClientRect();("vert"==type?document.elementFromPoint(box.right-1,(box.top+box.bottom)/2):document.elementFromPoint((box.right+box.left)/2,box.bottom-1))!=bar?bar.style.pointerEvents="none":delay.set(1e3,maybeDisable)}bar.style.pointerEvents="auto",delay.set(1e3,maybeDisable)},NativeScrollbars.prototype.clear=function(){var parent=this.horiz.parentNode;parent.removeChild(this.horiz),parent.removeChild(this.vert)};var NullScrollbars=function(){};NullScrollbars.prototype.update=function(){return{bottom:0,right:0}},NullScrollbars.prototype.setScrollLeft=function(){},NullScrollbars.prototype.setScrollTop=function(){},NullScrollbars.prototype.clear=function(){};var scrollbarModel={native:NativeScrollbars,null:NullScrollbars},nextOpId=0,DisplayUpdate=function(cm,viewport,force){var display=cm.display;this.viewport=viewport,this.visible=visibleLines(display,cm.doc,viewport),this.editorIsHidden=!display.wrapper.offsetWidth,this.wrapperHeight=display.wrapper.clientHeight,this.wrapperWidth=display.wrapper.clientWidth,this.oldDisplayWidth=displayWidth(cm),this.force=force,this.dims=getDimensions(cm),this.events=[]};DisplayUpdate.prototype.signal=function(emitter,type){hasHandler(emitter,type)&&this.events.push(arguments)},DisplayUpdate.prototype.finish=function(){for(var this$1=this,i=0;i=0&&cmp(pos,range.to())<=0)return i}return-1};var Range=function(anchor,head){this.anchor=anchor,this.head=head};Range.prototype.from=function(){return minPos(this.anchor,this.head)},Range.prototype.to=function(){return maxPos(this.anchor,this.head)},Range.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},LeafChunk.prototype={chunkSize:function(){return this.lines.length},removeInner:function(at,n){for(var this$1=this,i=at,e=at+n;i1||!(this.children[0]instanceof LeafChunk))){var lines=[];this.collapse(lines),this.children=[new LeafChunk(lines)],this.children[0].parent=this}},collapse:function(lines){for(var this$1=this,i=0;i50){for(var remaining=child.lines.length%25+25,pos=remaining;pos10);me.parent.maybeSpill()}},iterN:function(at,n,op){for(var this$1=this,i=0;icm.display.maxLineLength&&(cm.display.maxLine=visual,cm.display.maxLineLength=len,cm.display.maxLineChanged=!0)}null!=min&&cm&&this.collapsed&®Change(cm,min,max+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,cm&&reCheckSelection(cm.doc)),cm&&signalLater(cm,"markerCleared",cm,this,min,max),withOp&&endOperation(cm),this.parent&&this.parent.clear()}},TextMarker.prototype.find=function(side,lineObj){var this$1=this;null==side&&"bookmark"==this.type&&(side=1);for(var from,to,i=0;i=0;i$1--)makeChange(this$1,changes[i$1]);newSel?setSelectionReplaceHistory(this,newSel):this.cm&&ensureCursorVisible(this.cm)}),undo:docMethodOp(function(){makeChangeFromHistory(this,"undo")}),redo:docMethodOp(function(){makeChangeFromHistory(this,"redo")}),undoSelection:docMethodOp(function(){makeChangeFromHistory(this,"undo",!0)}),redoSelection:docMethodOp(function(){makeChangeFromHistory(this,"redo",!0)}),setExtending:function(val){this.extend=val},getExtending:function(){return this.extend},historySize:function(){for(var hist=this.history,done=0,undone=0,i=0;i=pos.ch)&&markers.push(span.marker.parent||span.marker)}return markers},findMarks:function(from,to,filter){from=clipPos(this,from),to=clipPos(this,to);var found=[],lineNo$$1=from.line;return this.iter(from.line,to.line+1,function(line){var spans=line.markedSpans;if(spans)for(var i=0;i=span.to||null==span.from&&lineNo$$1!=from.line||null!=span.from&&lineNo$$1==to.line&&span.from>=to.ch||filter&&!filter(span.marker)||found.push(span.marker.parent||span.marker)}++lineNo$$1}),found},getAllMarks:function(){var markers=[];return this.iter(function(line){var sps=line.markedSpans;if(sps)for(var i=0;ioff)return ch=off,!0;off-=sz,++lineNo$$1}),clipPos(this,Pos(lineNo$$1,ch))},indexFromPos:function(coords){var index=(coords=clipPos(this,coords)).ch;if(coords.linefrom&&(from=options.from),null!=options.to&&options.to0)cur=new Pos(cur.line,cur.ch+1),cm.replaceRange(line.charAt(cur.ch-1)+line.charAt(cur.ch-2),Pos(cur.line,cur.ch-2),cur,"+transpose");else if(cur.line>cm.doc.first){var prev=getLine(cm.doc,cur.line-1).text;prev&&(cur=new Pos(cur.line,1),cm.replaceRange(line.charAt(0)+cm.doc.lineSeparator()+prev.charAt(prev.length-1),Pos(cur.line-1,prev.length-1),cur,"+transpose"))}newSel.push(new Range(cur,cur))}cm.setSelections(newSel)})},newlineAndIndent:function(cm){return runInOp(cm,function(){for(var sels=cm.listSelections(),i=sels.length-1;i>=0;i--)cm.replaceRange(cm.doc.lineSeparator(),sels[i].anchor,sels[i].head,"+input");sels=cm.listSelections();for(var i$1=0;i$1time&&0==cmp(pos,this.pos)&&button==this.button};var lastClick,lastDoubleClick,Init={toString:function(){return"CodeMirror.Init"}},defaults={},optionHandlers={};CodeMirror$1.defaults=defaults,CodeMirror$1.optionHandlers=optionHandlers;var initHooks=[];CodeMirror$1.defineInitHook=function(f){return initHooks.push(f)};var lastCopied=null,ContentEditableInput=function(cm){this.cm=cm,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Delayed,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};ContentEditableInput.prototype.init=function(display){function onCopyCut(e){if(!signalDOMEvent(cm,e)){if(cm.somethingSelected())setLastCopied({lineWise:!1,text:cm.getSelections()}),"cut"==e.type&&cm.replaceSelection("",null,"cut");else{if(!cm.options.lineWiseCopyCut)return;var ranges=copyableRanges(cm);setLastCopied({lineWise:!0,text:ranges.text}),"cut"==e.type&&cm.operation(function(){cm.setSelections(ranges.ranges,0,sel_dontScroll),cm.replaceSelection("",null,"cut")})}if(e.clipboardData){e.clipboardData.clearData();var content=lastCopied.text.join("\n");if(e.clipboardData.setData("Text",content),e.clipboardData.getData("Text")==content)return void e.preventDefault()}var kludge=hiddenTextarea(),te=kludge.firstChild;cm.display.lineSpace.insertBefore(kludge,cm.display.lineSpace.firstChild),te.value=lastCopied.text.join("\n");var hadFocus=document.activeElement;selectInput(te),setTimeout(function(){cm.display.lineSpace.removeChild(kludge),hadFocus.focus(),hadFocus==div&&input.showPrimarySelection()},50)}}var this$1=this,input=this,cm=input.cm,div=input.div=display.lineDiv;disableBrowserMagic(div,cm.options.spellcheck),on(div,"paste",function(e){signalDOMEvent(cm,e)||handlePaste(e,cm)||ie_version<=11&&setTimeout(operation(cm,function(){return this$1.updateFromDOM()}),20)}),on(div,"compositionstart",function(e){this$1.composing={data:e.data,done:!1}}),on(div,"compositionupdate",function(e){this$1.composing||(this$1.composing={data:e.data,done:!1})}),on(div,"compositionend",function(e){this$1.composing&&(e.data!=this$1.composing.data&&this$1.readFromDOMSoon(),this$1.composing.done=!0)}),on(div,"touchstart",function(){return input.forceCompositionEnd()}),on(div,"input",function(){this$1.composing||this$1.readFromDOMSoon()}),on(div,"copy",onCopyCut),on(div,"cut",onCopyCut)},ContentEditableInput.prototype.prepareSelection=function(){var result=prepareSelection(this.cm,!1);return result.focus=this.cm.state.focused,result},ContentEditableInput.prototype.showSelection=function(info,takeFocus){info&&this.cm.display.view.length&&((info.focus||takeFocus)&&this.showPrimarySelection(),this.showMultipleSelections(info))},ContentEditableInput.prototype.showPrimarySelection=function(){var sel=window.getSelection(),cm=this.cm,prim=cm.doc.sel.primary(),from=prim.from(),to=prim.to();if(cm.display.viewTo==cm.display.viewFrom||from.line>=cm.display.viewTo||to.line=cm.display.viewFrom&&posToDOM(cm,from)||{node:view[0].measure.map[2],offset:0},end=to.linecm.firstLine()&&(from=Pos(from.line-1,getLine(cm.doc,from.line-1).length)),to.ch==getLine(cm.doc,to.line).text.length&&to.linedisplay.viewTo-1)return!1;var fromIndex,fromLine,fromNode;from.line==display.viewFrom||0==(fromIndex=findViewIndex(cm,from.line))?(fromLine=lineNo(display.view[0].line),fromNode=display.view[0].node):(fromLine=lineNo(display.view[fromIndex].line),fromNode=display.view[fromIndex-1].node.nextSibling);var toLine,toNode,toIndex=findViewIndex(cm,to.line);if(toIndex==display.view.length-1?(toLine=display.viewTo-1,toNode=display.lineDiv.lastChild):(toLine=lineNo(display.view[toIndex+1].line)-1,toNode=display.view[toIndex+1].node.previousSibling),!fromNode)return!1;for(var newText=cm.doc.splitLines(domTextBetween(cm,fromNode,toNode,fromLine,toLine)),oldText=getBetween(cm.doc,Pos(fromLine,0),Pos(toLine,getLine(cm.doc,toLine).text.length));newText.length>1&&oldText.length>1;)if(lst(newText)==lst(oldText))newText.pop(),oldText.pop(),toLine--;else{if(newText[0]!=oldText[0])break;newText.shift(),oldText.shift(),fromLine++}for(var cutFront=0,cutEnd=0,newTop=newText[0],oldTop=oldText[0],maxCutFront=Math.min(newTop.length,oldTop.length);cutFrontfrom.ch&&newBot.charCodeAt(newBot.length-cutEnd-1)==oldBot.charCodeAt(oldBot.length-cutEnd-1);)cutFront--,cutEnd++;newText[newText.length-1]=newBot.slice(0,newBot.length-cutEnd).replace(/^\u200b+/,""),newText[0]=newText[0].slice(cutFront).replace(/\u200b+$/,"");var chFrom=Pos(fromLine,cutFront),chTo=Pos(toLine,oldText.length?lst(oldText).length-cutEnd:0);return newText.length>1||newText[0]||cmp(chFrom,chTo)?(replaceRange(cm.doc,newText,chFrom,chTo,"+input"),!0):void 0},ContentEditableInput.prototype.ensurePolled=function(){this.forceCompositionEnd()},ContentEditableInput.prototype.reset=function(){this.forceCompositionEnd()},ContentEditableInput.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},ContentEditableInput.prototype.readFromDOMSoon=function(){var this$1=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){if(this$1.readDOMTimeout=null,this$1.composing){if(!this$1.composing.done)return;this$1.composing=null}this$1.updateFromDOM()},80))},ContentEditableInput.prototype.updateFromDOM=function(){var this$1=this;!this.cm.isReadOnly()&&this.pollContent()||runInOp(this.cm,function(){return regChange(this$1.cm)})},ContentEditableInput.prototype.setUneditable=function(node){node.contentEditable="false"},ContentEditableInput.prototype.onKeyPress=function(e){0!=e.charCode&&(e.preventDefault(),this.cm.isReadOnly()||operation(this.cm,applyTextInput)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},ContentEditableInput.prototype.readOnlyChanged=function(val){this.div.contentEditable=String("nocursor"!=val)},ContentEditableInput.prototype.onContextMenu=function(){},ContentEditableInput.prototype.resetPosition=function(){},ContentEditableInput.prototype.needsContentAttribute=!0;var TextareaInput=function(cm){this.cm=cm,this.prevInput="",this.pollingFast=!1,this.polling=new Delayed,this.inaccurateSelection=!1,this.hasSelection=!1,this.composing=null};TextareaInput.prototype.init=function(display){function prepareCopyCut(e){if(!signalDOMEvent(cm,e)){if(cm.somethingSelected())setLastCopied({lineWise:!1,text:cm.getSelections()}),input.inaccurateSelection&&(input.prevInput="",input.inaccurateSelection=!1,te.value=lastCopied.text.join("\n"),selectInput(te));else{if(!cm.options.lineWiseCopyCut)return;var ranges=copyableRanges(cm);setLastCopied({lineWise:!0,text:ranges.text}),"cut"==e.type?cm.setSelections(ranges.ranges,null,sel_dontScroll):(input.prevInput="",te.value=ranges.text.join("\n"),selectInput(te))}"cut"==e.type&&(cm.state.cutIncoming=!0)}}var this$1=this,input=this,cm=this.cm,div=this.wrapper=hiddenTextarea(),te=this.textarea=div.firstChild;display.wrapper.insertBefore(div,display.wrapper.firstChild),ios&&(te.style.width="0px"),on(te,"input",function(){ie&&ie_version>=9&&this$1.hasSelection&&(this$1.hasSelection=null),input.poll()}),on(te,"paste",function(e){signalDOMEvent(cm,e)||handlePaste(e,cm)||(cm.state.pasteIncoming=!0,input.fastPoll())}),on(te,"cut",prepareCopyCut),on(te,"copy",prepareCopyCut),on(display.scroller,"paste",function(e){eventInWidget(display,e)||signalDOMEvent(cm,e)||(cm.state.pasteIncoming=!0,input.focus())}),on(display.lineSpace,"selectstart",function(e){eventInWidget(display,e)||e_preventDefault(e)}),on(te,"compositionstart",function(){var start=cm.getCursor("from");input.composing&&input.composing.range.clear(),input.composing={start:start,range:cm.markText(start,cm.getCursor("to"),{className:"CodeMirror-composing"})}}),on(te,"compositionend",function(){input.composing&&(input.poll(),input.composing.range.clear(),input.composing=null)})},TextareaInput.prototype.prepareSelection=function(){var cm=this.cm,display=cm.display,doc=cm.doc,result=prepareSelection(cm);if(cm.options.moveInputWithCursor){var headPos=cursorCoords(cm,doc.sel.primary().head,"div"),wrapOff=display.wrapper.getBoundingClientRect(),lineOff=display.lineDiv.getBoundingClientRect();result.teTop=Math.max(0,Math.min(display.wrapper.clientHeight-10,headPos.top+lineOff.top-wrapOff.top)),result.teLeft=Math.max(0,Math.min(display.wrapper.clientWidth-10,headPos.left+lineOff.left-wrapOff.left))}return result},TextareaInput.prototype.showSelection=function(drawn){var display=this.cm.display;removeChildrenAndAdd(display.cursorDiv,drawn.cursors),removeChildrenAndAdd(display.selectionDiv,drawn.selection),null!=drawn.teTop&&(this.wrapper.style.top=drawn.teTop+"px",this.wrapper.style.left=drawn.teLeft+"px")},TextareaInput.prototype.reset=function(typing){if(!this.contextMenuPending&&!this.composing){var minimal,selected,cm=this.cm,doc=cm.doc;if(cm.somethingSelected()){this.prevInput="";var range$$1=doc.sel.primary(),content=(minimal=hasCopyEvent&&(range$$1.to().line-range$$1.from().line>100||(selected=cm.getSelection()).length>1e3))?"-":selected||cm.getSelection();this.textarea.value=content,cm.state.focused&&selectInput(this.textarea),ie&&ie_version>=9&&(this.hasSelection=content)}else typing||(this.prevInput=this.textarea.value="",ie&&ie_version>=9&&(this.hasSelection=null));this.inaccurateSelection=minimal}},TextareaInput.prototype.getField=function(){return this.textarea},TextareaInput.prototype.supportsTouch=function(){return!1},TextareaInput.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!mobile||activeElt()!=this.textarea))try{this.textarea.focus()}catch(e){}},TextareaInput.prototype.blur=function(){this.textarea.blur()},TextareaInput.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},TextareaInput.prototype.receivedFocus=function(){this.slowPoll()},TextareaInput.prototype.slowPoll=function(){var this$1=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){this$1.poll(),this$1.cm.state.focused&&this$1.slowPoll()})},TextareaInput.prototype.fastPoll=function(){function p(){input.poll()||missed?(input.pollingFast=!1,input.slowPoll()):(missed=!0,input.polling.set(60,p))}var missed=!1,input=this;input.pollingFast=!0,input.polling.set(20,p)},TextareaInput.prototype.poll=function(){var this$1=this,cm=this.cm,input=this.textarea,prevInput=this.prevInput;if(this.contextMenuPending||!cm.state.focused||hasSelection(input)&&!prevInput&&!this.composing||cm.isReadOnly()||cm.options.disableInput||cm.state.keySeq)return!1;var text=input.value;if(text==prevInput&&!cm.somethingSelected())return!1;if(ie&&ie_version>=9&&this.hasSelection===text||mac&&/[\uf700-\uf7ff]/.test(text))return cm.display.input.reset(),!1;if(cm.doc.sel==cm.display.selForContextMenu){var first=text.charCodeAt(0);if(8203!=first||prevInput||(prevInput=""),8666==first)return this.reset(),this.cm.execCommand("undo")}for(var same=0,l=Math.min(prevInput.length,text.length);same1e3||text.indexOf("\n")>-1?input.value=this$1.prevInput="":this$1.prevInput=text,this$1.composing&&(this$1.composing.range.clear(),this$1.composing.range=cm.markText(this$1.composing.start,cm.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},TextareaInput.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},TextareaInput.prototype.onKeyPress=function(){ie&&ie_version>=9&&(this.hasSelection=null),this.fastPoll()},TextareaInput.prototype.onContextMenu=function(e){function prepareSelectAllHack(){if(null!=te.selectionStart){var selected=cm.somethingSelected(),extval=""+(selected?te.value:"");te.value="⇚",te.value=extval,input.prevInput=selected?"":"",te.selectionStart=1,te.selectionEnd=extval.length,display.selForContextMenu=cm.doc.sel}}function rehide(){if(input.contextMenuPending=!1,input.wrapper.style.cssText=oldWrapperCSS,te.style.cssText=oldCSS,ie&&ie_version<9&&display.scrollbars.setScrollTop(display.scroller.scrollTop=scrollPos),null!=te.selectionStart){(!ie||ie&&ie_version<9)&&prepareSelectAllHack();var i=0,poll=function(){display.selForContextMenu==cm.doc.sel&&0==te.selectionStart&&te.selectionEnd>0&&""==input.prevInput?operation(cm,selectAll)(cm):i++<10?display.detectingSelectAll=setTimeout(poll,500):(display.selForContextMenu=null,display.input.reset())};display.detectingSelectAll=setTimeout(poll,200)}}var input=this,cm=input.cm,display=cm.display,te=input.textarea,pos=posFromMouse(cm,e),scrollPos=display.scroller.scrollTop;if(pos&&!presto){cm.options.resetSelectionOnContextMenu&&-1==cm.doc.sel.contains(pos)&&operation(cm,setSelection)(cm.doc,simpleSelection(pos),sel_dontScroll);var oldCSS=te.style.cssText,oldWrapperCSS=input.wrapper.style.cssText;input.wrapper.style.cssText="position: absolute";var wrapperBox=input.wrapper.getBoundingClientRect();te.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-wrapperBox.top-5)+"px; left: "+(e.clientX-wrapperBox.left-5)+"px;\n z-index: 1000; background: "+(ie?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";var oldScrollY;if(webkit&&(oldScrollY=window.scrollY),display.input.focus(),webkit&&window.scrollTo(null,oldScrollY),display.input.reset(),cm.somethingSelected()||(te.value=input.prevInput=" "),input.contextMenuPending=!0,display.selForContextMenu=cm.doc.sel,clearTimeout(display.detectingSelectAll),ie&&ie_version>=9&&prepareSelectAllHack(),captureRightClick){e_stop(e);var mouseup=function(){off(window,"mouseup",mouseup),setTimeout(rehide,20)};on(window,"mouseup",mouseup)}else setTimeout(rehide,50)}},TextareaInput.prototype.readOnlyChanged=function(val){val||this.reset(),this.textarea.disabled="nocursor"==val},TextareaInput.prototype.setUneditable=function(){},TextareaInput.prototype.needsContentAttribute=!1,function(CodeMirror){function option(name,deflt,handle,notOnInit){CodeMirror.defaults[name]=deflt,handle&&(optionHandlers[name]=notOnInit?function(cm,val,old){old!=Init&&handle(cm,val,old)}:handle)}var optionHandlers=CodeMirror.optionHandlers;CodeMirror.defineOption=option,CodeMirror.Init=Init,option("value","",function(cm,val){return cm.setValue(val)},!0),option("mode",null,function(cm,val){cm.doc.modeOption=val,loadMode(cm)},!0),option("indentUnit",2,loadMode,!0),option("indentWithTabs",!1),option("smartIndent",!0),option("tabSize",4,function(cm){resetModeState(cm),clearCaches(cm),regChange(cm)},!0),option("lineSeparator",null,function(cm,val){if(cm.doc.lineSep=val,val){var newBreaks=[],lineNo=cm.doc.first;cm.doc.iter(function(line){for(var pos=0;;){var found=line.text.indexOf(val,pos);if(-1==found)break;pos=found+val.length,newBreaks.push(Pos(lineNo,found))}lineNo++});for(var i=newBreaks.length-1;i>=0;i--)replaceRange(cm.doc,val,newBreaks[i],Pos(newBreaks[i].line,newBreaks[i].ch+val.length))}}),option("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff]/g,function(cm,val,old){cm.state.specialChars=new RegExp(val.source+(val.test("\t")?"":"|\t"),"g"),old!=Init&&cm.refresh()}),option("specialCharPlaceholder",defaultSpecialCharPlaceholder,function(cm){return cm.refresh()},!0),option("electricChars",!0),option("inputStyle",mobile?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),option("spellcheck",!1,function(cm,val){return cm.getInputField().spellcheck=val},!0),option("rtlMoveVisually",!windows),option("wholeLineUpdateBefore",!0),option("theme","default",function(cm){themeChanged(cm),guttersChanged(cm)},!0),option("keyMap","default",function(cm,val,old){var next=getKeyMap(val),prev=old!=Init&&getKeyMap(old);prev&&prev.detach&&prev.detach(cm,next),next.attach&&next.attach(cm,prev||null)}),option("extraKeys",null),option("configureMouse",null),option("lineWrapping",!1,wrappingChanged,!0),option("gutters",[],function(cm){setGuttersForLineNumbers(cm.options),guttersChanged(cm)},!0),option("fixedGutter",!0,function(cm,val){cm.display.gutters.style.left=val?compensateForHScroll(cm.display)+"px":"0",cm.refresh()},!0),option("coverGutterNextToScrollbar",!1,function(cm){return updateScrollbars(cm)},!0),option("scrollbarStyle","native",function(cm){initScrollbars(cm),updateScrollbars(cm),cm.display.scrollbars.setScrollTop(cm.doc.scrollTop),cm.display.scrollbars.setScrollLeft(cm.doc.scrollLeft)},!0),option("lineNumbers",!1,function(cm){setGuttersForLineNumbers(cm.options),guttersChanged(cm)},!0),option("firstLineNumber",1,guttersChanged,!0),option("lineNumberFormatter",function(integer){return integer},guttersChanged,!0),option("showCursorWhenSelecting",!1,updateSelection,!0),option("resetSelectionOnContextMenu",!0),option("lineWiseCopyCut",!0),option("pasteLinesPerSelection",!0),option("readOnly",!1,function(cm,val){"nocursor"==val&&(onBlur(cm),cm.display.input.blur()),cm.display.input.readOnlyChanged(val)}),option("disableInput",!1,function(cm,val){val||cm.display.input.reset()},!0),option("dragDrop",!0,dragDropChanged),option("allowDropFileTypes",null),option("cursorBlinkRate",530),option("cursorScrollMargin",0),option("cursorHeight",1,updateSelection,!0),option("singleCursorHeightPerLine",!0,updateSelection,!0),option("workTime",100),option("workDelay",100),option("flattenSpans",!0,resetModeState,!0),option("addModeClass",!1,resetModeState,!0),option("pollInterval",100),option("undoDepth",200,function(cm,val){return cm.doc.history.undoDepth=val}),option("historyEventDelay",1250),option("viewportMargin",10,function(cm){return cm.refresh()},!0),option("maxHighlightLength",1e4,resetModeState,!0),option("moveInputWithCursor",!0,function(cm,val){val||cm.display.input.resetPosition()}),option("tabindex",null,function(cm,val){return cm.display.input.getField().tabIndex=val||""}),option("autofocus",null),option("direction","ltr",function(cm,val){return cm.doc.setDirection(val)},!0)}(CodeMirror$1),function(CodeMirror){var optionHandlers=CodeMirror.optionHandlers,helpers=CodeMirror.helpers={};CodeMirror.prototype={constructor:CodeMirror,focus:function(){window.focus(),this.display.input.focus()},setOption:function(option,value){var options=this.options,old=options[option];options[option]==value&&"mode"!=option||(options[option]=value,optionHandlers.hasOwnProperty(option)&&operation(this,optionHandlers[option])(this,value,old),signal(this,"optionChange",this,option))},getOption:function(option){return this.options[option]},getDoc:function(){return this.doc},addKeyMap:function(map$$1,bottom){this.state.keyMaps[bottom?"push":"unshift"](getKeyMap(map$$1))},removeKeyMap:function(map$$1){for(var maps=this.state.keyMaps,i=0;iend&&(indentLine(this$1,range$$1.head.line,how,!0),end=range$$1.head.line,i==this$1.doc.sel.primIndex&&ensureCursorVisible(this$1));else{var from=range$$1.from(),to=range$$1.to(),start=Math.max(end,from.line);end=Math.min(this$1.lastLine(),to.line-(to.ch?0:1))+1;for(var j=start;j0&&replaceOneSelection(this$1.doc,i,new Range(from,newRanges[i].to()),sel_dontScroll)}}}),getTokenAt:function(pos,precise){return takeToken(this,pos,precise)},getLineTokens:function(line,precise){return takeToken(this,Pos(line),precise,!0)},getTokenTypeAt:function(pos){pos=clipPos(this.doc,pos);var type,styles=getLineStyles(this,getLine(this.doc,pos.line)),before=0,after=(styles.length-1)/2,ch=pos.ch;if(0==ch)type=styles[2];else for(;;){var mid=before+after>>1;if((mid?styles[2*mid-1]:0)>=ch)after=mid;else{if(!(styles[2*mid+1]last&&(line=last,end=!0),lineObj=getLine(this.doc,line)}else lineObj=line;return intoCoordSystem(this,lineObj,{top:0,left:0},mode||"page",includeWidgets||end).top+(end?this.doc.height-heightAtLine(lineObj):0)},defaultTextHeight:function(){return textHeight(this.display)},defaultCharWidth:function(){return charWidth(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(pos,node,scroll,vert,horiz){var display=this.display,top=(pos=cursorCoords(this,clipPos(this.doc,pos))).bottom,left=pos.left;if(node.style.position="absolute",node.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(node),display.sizer.appendChild(node),"over"==vert)top=pos.top;else if("above"==vert||"near"==vert){var vspace=Math.max(display.wrapper.clientHeight,this.doc.height),hspace=Math.max(display.sizer.clientWidth,display.lineSpace.clientWidth);("above"==vert||pos.bottom+node.offsetHeight>vspace)&&pos.top>node.offsetHeight?top=pos.top-node.offsetHeight:pos.bottom+node.offsetHeight<=vspace&&(top=pos.bottom),left+node.offsetWidth>hspace&&(left=hspace-node.offsetWidth)}node.style.top=top+"px",node.style.left=node.style.right="","right"==horiz?(left=display.sizer.clientWidth-node.offsetWidth,node.style.right="0px"):("left"==horiz?left=0:"middle"==horiz&&(left=(display.sizer.clientWidth-node.offsetWidth)/2),node.style.left=left+"px"),scroll&&scrollIntoView(this,{left:left,top:top,right:left+node.offsetWidth,bottom:top+node.offsetHeight})},triggerOnKeyDown:methodOp(onKeyDown),triggerOnKeyPress:methodOp(onKeyPress),triggerOnKeyUp:onKeyUp,triggerOnMouseDown:methodOp(onMouseDown),execCommand:function(cmd){if(commands.hasOwnProperty(cmd))return commands[cmd].call(null,this)},triggerElectric:methodOp(function(text){triggerElectric(this,text)}),findPosH:function(from,amount,unit,visually){var this$1=this,dir=1;amount<0&&(dir=-1,amount=-amount);for(var cur=clipPos(this.doc,from),i=0;i0&&check(line.charAt(start-1));)--start;for(;end.5)&&estimateLineHeights(this),signal(this,"refresh",this)}),swapDoc:methodOp(function(doc){var old=this.doc;return old.cm=null,attachDoc(this,doc),clearCaches(this),this.display.input.reset(),scrollToCoords(this,doc.scrollLeft,doc.scrollTop),this.curOp.forceScroll=!0,signalLater(this,"swapDoc",this,old),old}),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}},eventMixin(CodeMirror),CodeMirror.registerHelper=function(type,name,value){helpers.hasOwnProperty(type)||(helpers[type]=CodeMirror[type]={_global:[]}),helpers[type][name]=value},CodeMirror.registerGlobalHelper=function(type,name,predicate,value){CodeMirror.registerHelper(type,name,value),helpers[type]._global.push({pred:predicate,val:value})}}(CodeMirror$1);var dontDelegate="iter insert remove copy getEditor constructor".split(" ");for(var prop in Doc.prototype)Doc.prototype.hasOwnProperty(prop)&&indexOf(dontDelegate,prop)<0&&(CodeMirror$1.prototype[prop]=function(method){return function(){return method.apply(this.doc,arguments)}}(Doc.prototype[prop]));return eventMixin(Doc),CodeMirror$1.inputStyles={textarea:TextareaInput,contenteditable:ContentEditableInput},CodeMirror$1.defineMode=function(name){CodeMirror$1.defaults.mode||"null"==name||(CodeMirror$1.defaults.mode=name),defineMode.apply(this,arguments)},CodeMirror$1.defineMIME=function(mime,spec){mimeModes[mime]=spec},CodeMirror$1.defineMode("null",function(){return{token:function(stream){return stream.skipToEnd()}}}),CodeMirror$1.defineMIME("text/plain","null"),CodeMirror$1.defineExtension=function(name,func){CodeMirror$1.prototype[name]=func},CodeMirror$1.defineDocExtension=function(name,func){Doc.prototype[name]=func},CodeMirror$1.fromTextArea=function(textarea,options){function save(){textarea.value=cm.getValue()}if(options=options?copyObj(options):{},options.value=textarea.value,!options.tabindex&&textarea.tabIndex&&(options.tabindex=textarea.tabIndex),!options.placeholder&&textarea.placeholder&&(options.placeholder=textarea.placeholder),null==options.autofocus){var hasFocus=activeElt();options.autofocus=hasFocus==textarea||null!=textarea.getAttribute("autofocus")&&hasFocus==document.body}var realSubmit;if(textarea.form&&(on(textarea.form,"submit",save),!options.leaveSubmitMethodAlone)){var form=textarea.form;realSubmit=form.submit;try{var wrappedSubmit=form.submit=function(){save(),form.submit=realSubmit,form.submit(),form.submit=wrappedSubmit}}catch(e){}}options.finishInit=function(cm){cm.save=save,cm.getTextArea=function(){return textarea},cm.toTextArea=function(){cm.toTextArea=isNaN,save(),textarea.parentNode.removeChild(cm.getWrapperElement()),textarea.style.display="",textarea.form&&(off(textarea.form,"submit",save),"function"==typeof textarea.form.submit&&(textarea.form.submit=realSubmit))}},textarea.style.display="none";var cm=CodeMirror$1(function(node){return textarea.parentNode.insertBefore(node,textarea.nextSibling)},options);return cm},function(CodeMirror){CodeMirror.off=off,CodeMirror.on=on,CodeMirror.wheelEventPixels=wheelEventPixels,CodeMirror.Doc=Doc,CodeMirror.splitLines=splitLinesAuto,CodeMirror.countColumn=countColumn,CodeMirror.findColumn=findColumn,CodeMirror.isWordChar=isWordCharBasic,CodeMirror.Pass=Pass,CodeMirror.signal=signal,CodeMirror.Line=Line,CodeMirror.changeEnd=changeEnd,CodeMirror.scrollbarModel=scrollbarModel,CodeMirror.Pos=Pos,CodeMirror.cmpPos=cmp,CodeMirror.modes=modes,CodeMirror.mimeModes=mimeModes,CodeMirror.resolveMode=resolveMode,CodeMirror.getMode=getMode,CodeMirror.modeExtensions=modeExtensions,CodeMirror.extendMode=extendMode,CodeMirror.copyState=copyState,CodeMirror.startState=startState,CodeMirror.innerMode=innerMode,CodeMirror.commands=commands,CodeMirror.keyMap=keyMap,CodeMirror.keyName=keyName,CodeMirror.isModifierKey=isModifierKey,CodeMirror.lookupKey=lookupKey,CodeMirror.normalizeKeyMap=normalizeKeyMap,CodeMirror.StringStream=StringStream,CodeMirror.SharedTextMarker=SharedTextMarker,CodeMirror.TextMarker=TextMarker,CodeMirror.LineWidget=LineWidget,CodeMirror.e_preventDefault=e_preventDefault,CodeMirror.e_stopPropagation=e_stopPropagation,CodeMirror.e_stop=e_stop,CodeMirror.addClass=addClass,CodeMirror.contains=contains,CodeMirror.rmClass=rmClass,CodeMirror.keyNames=keyNames}(CodeMirror$1),CodeMirror$1.version="5.27.2",CodeMirror$1})},{}],67:[function(require,module,exports){module.exports={Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",amp:"&",AMP:"&",andand:"⩕",And:"⩓",and:"∧",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angmsd:"∡",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",apacir:"⩯",ap:"≈",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxHd:"╤",boxhD:"╥",boxHD:"╦",boxhu:"┴",boxHu:"╧",boxhU:"╨",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsolb:"⧅",bsol:"\\",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",capand:"⩄",capbrcup:"⩉",capcap:"⩋",cap:"∩",Cap:"⋒",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cir:"○",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cup:"∪",Cup:"⋓",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",Darr:"↡",dArr:"⇓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",ddagger:"‡",ddarr:"⇊",DD:"ⅅ",dd:"ⅆ",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrowBar:"⤓",downarrow:"↓",DownArrow:"↓",Downarrow:"⇓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVectorBar:"⥖",DownLeftVector:"↽",DownRightTeeVector:"⥟",DownRightVectorBar:"⥗",DownRightVector:"⇁",DownTeeArrow:"↧",DownTee:"⊤",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",Ecirc:"Ê",ecirc:"ê",ecir:"≖",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",edot:"ė",eDot:"≑",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp13:" ",emsp14:" ",emsp:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",ge:"≥",gE:"≧",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",gescc:"⪩",ges:"⩾",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gla:"⪥",gl:"≷",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gt:">",GT:">",Gt:"≫",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",harrcir:"⥈",harr:"↔",hArr:"⇔",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",Im:"ℑ",imof:"⊷",imped:"Ƶ",Implies:"⇒",incare:"℅",in:"∈",infin:"∞",infintie:"⧝",inodot:"ı",intcal:"⊺",int:"∫",Int:"∬",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"",InvisibleTimes:"",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larrb:"⇤",larrbfs:"⤟",larr:"←",Larr:"↞",lArr:"⇐",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",latail:"⤙",lAtail:"⤛",lat:"⪫",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",LeftArrowBar:"⇤",leftarrow:"←",LeftArrow:"←",Leftarrow:"⇐",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVectorBar:"⥙",LeftDownVector:"⇃",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTeeArrow:"↤",LeftTee:"⊣",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangleBar:"⧏",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVectorBar:"⥘",LeftUpVector:"↿",LeftVectorBar:"⥒",LeftVector:"↼",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",lescc:"⪨",les:"⩽",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",llarr:"⇇",ll:"≪",Ll:"⋘",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoustache:"⎰",lmoust:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftrightarrow:"⟷",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longmapsto:"⟼",longrightarrow:"⟶",LongRightArrow:"⟶",Longrightarrow:"⟹",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",lt:"<",LT:"<",Lt:"≪",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",midast:"*",midcir:"⫰",mid:"∣",middot:"·",minusb:"⊟",minus:"−",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natural:"♮",naturals:"ℕ",natur:"♮",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",ne:"≠",nedot:"≐̸",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nlE:"≦̸",nle:"≰",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangleBar:"⧏̸",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangleBar:"⧐̸",NotRightTriangle:"⋫",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",nparallel:"∦",npar:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",nprec:"⊀",npreceq:"⪯̸",npre:"⪯̸",nrarrc:"⤳̸",nrarr:"↛",nrArr:"⇏",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",Ocirc:"Ô",ocirc:"ô",ocir:"⊚",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",orarr:"↻",Or:"⩔",or:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",otimesas:"⨶",Otimes:"⨷",otimes:"⊗",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",para:"¶",parallel:"∥",par:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plus:"+",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",prap:"⪷",Pr:"⪻",pr:"≺",prcue:"≼",precapprox:"⪷",prec:"≺",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",pre:"⪯",prE:"⪳",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportional:"∝",Proportion:"∷",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarr:"→",Rarr:"↠",rArr:"⇒",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",Re:"ℜ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrowBar:"⇥",rightarrow:"→",RightArrow:"→",Rightarrow:"⇒",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVectorBar:"⥕",RightDownVector:"⇂",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTeeArrow:"↦",RightTee:"⊢",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangleBar:"⧐",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVectorBar:"⥔",RightUpVector:"↾",RightVectorBar:"⥓",RightVector:"⇀",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoustache:"⎱",rmoust:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",scap:"⪸",Scaron:"Š",scaron:"š",Sc:"⪼",sc:"≻",sccue:"≽",sce:"⪰",scE:"⪴",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdotb:"⊡",sdot:"⋅",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",solbar:"⌿",solb:"⧄",sol:"/",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squ:"□",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succapprox:"⪸",succ:"≻",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",Sup:"⋑",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",therefore:"∴",Therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:" ",ThinSpace:" ",thinsp:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",timesbar:"⨱",timesb:"⊠",times:"×",timesd:"⨰",tint:"∭",toea:"⤨",topbot:"⌶",topcir:"⫱",top:"⊤",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",uarr:"↑",Uarr:"↟",uArr:"⇑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrowBar:"⤒",uparrow:"↑",UpArrow:"↑",Uparrow:"⇑",UpArrowDownArrow:"⇅",updownarrow:"↕",UpDownArrow:"↕",Updownarrow:"⇕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTeeArrow:"↥",UpTee:"⊥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",Vcy:"В",vcy:"в",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",veebar:"⊻",vee:"∨",Vee:"⋁",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xharr:"⟷",xhArr:"⟺",Xi:"Ξ",xi:"ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",yuml:"ÿ",Yuml:"Ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"",Zeta:"Ζ",zeta:"ζ",zfr:"𝔷",Zfr:"ℨ",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",Zscr:"𝒵",zscr:"𝓏",zwj:"",zwnj:""}},{}],68:[function(require,module,exports){"use strict";function makeEmptyFunction(arg){return function(){return arg}}var emptyFunction=function(){};emptyFunction.thatReturns=makeEmptyFunction,emptyFunction.thatReturnsFalse=makeEmptyFunction(!1),emptyFunction.thatReturnsTrue=makeEmptyFunction(!0),emptyFunction.thatReturnsNull=makeEmptyFunction(null),emptyFunction.thatReturnsThis=function(){return this},emptyFunction.thatReturnsArgument=function(arg){return arg},module.exports=emptyFunction},{}],69:[function(require,module,exports){(function(process){"use strict";var validateFormat=function(format){};"production"!==process.env.NODE_ENV&&(validateFormat=function(format){if(void 0===format)throw new Error("invariant requires an error message argument")}),module.exports=function(condition,format,a,b,c,d,e,f){if(validateFormat(format),!condition){var error;if(void 0===format)error=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var args=[a,b,c,d,e,f],argIndex=0;(error=new Error(format.replace(/%s/g,function(){return args[argIndex++]}))).name="Invariant Violation"}throw error.framesToPop=1,error}}}).call(this,require("_process"))},{_process:264}],70:[function(require,module,exports){(function(process){"use strict";var warning=require("./emptyFunction");"production"!==process.env.NODE_ENV&&function(){var printWarning=function(format){for(var _len=arguments.length,args=Array(_len>1?_len-1:0),_key=1;_key<_len;_key++)args[_key-1]=arguments[_key];var argIndex=0,message="Warning: "+format.replace(/%s/g,function(){return args[argIndex++]});"undefined"!=typeof console&&console.error(message);try{throw new Error(message)}catch(x){}};warning=function(condition,format){if(void 0===format)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(0!==format.indexOf("Failed Composite propType: ")&&!condition){for(var _len2=arguments.length,args=Array(_len2>2?_len2-2:0),_key2=2;_key2<_len2;_key2++)args[_key2-2]=arguments[_key2];printWarning.apply(void 0,[format].concat(args))}}}(),module.exports=warning}).call(this,require("_process"))},{"./emptyFunction":68,_process:264}],71:[function(require,module,exports){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0}),exports.GraphQLLanguageService=void 0;var _graphql=require("graphql"),_getAutocompleteSuggestions2=require("./getAutocompleteSuggestions"),_getHoverInformation2=require("./getHoverInformation"),_getDiagnostics=require("./getDiagnostics"),_getDefinition=require("./getDefinition"),_graphqlLanguageServiceUtils=require("graphql-language-service-utils"),FRAGMENT_DEFINITION=_graphql.Kind.FRAGMENT_DEFINITION,OBJECT_TYPE_DEFINITION=_graphql.Kind.OBJECT_TYPE_DEFINITION,INTERFACE_TYPE_DEFINITION=_graphql.Kind.INTERFACE_TYPE_DEFINITION,ENUM_TYPE_DEFINITION=_graphql.Kind.ENUM_TYPE_DEFINITION,UNION_TYPE_DEFINITION=_graphql.Kind.UNION_TYPE_DEFINITION,SCALAR_TYPE_DEFINITION=_graphql.Kind.SCALAR_TYPE_DEFINITION,INPUT_OBJECT_TYPE_DEFINITION=_graphql.Kind.INPUT_OBJECT_TYPE_DEFINITION,SCALAR_TYPE_EXTENSION=_graphql.Kind.SCALAR_TYPE_EXTENSION,OBJECT_TYPE_EXTENSION=_graphql.Kind.OBJECT_TYPE_EXTENSION,INTERFACE_TYPE_EXTENSION=_graphql.Kind.INTERFACE_TYPE_EXTENSION,UNION_TYPE_EXTENSION=_graphql.Kind.UNION_TYPE_EXTENSION,ENUM_TYPE_EXTENSION=_graphql.Kind.ENUM_TYPE_EXTENSION,INPUT_OBJECT_TYPE_EXTENSION=_graphql.Kind.INPUT_OBJECT_TYPE_EXTENSION,DIRECTIVE_DEFINITION=_graphql.Kind.DIRECTIVE_DEFINITION,FRAGMENT_SPREAD=_graphql.Kind.FRAGMENT_SPREAD,OPERATION_DEFINITION=_graphql.Kind.OPERATION_DEFINITION,NAMED_TYPE=_graphql.Kind.NAMED_TYPE;exports.GraphQLLanguageService=function(){function GraphQLLanguageService(cache){_classCallCheck(this,GraphQLLanguageService),this._graphQLCache=cache,this._graphQLConfig=cache.getGraphQLConfig()}return GraphQLLanguageService.prototype.getDiagnostics=function(query,uri,isRelayCompatMode){var queryHasExtensions,projectConfig,schemaPath,queryAST,range,source,fragmentDefinitions,fragmentDependencies,dependenciesSource,validationAst,customRules,customRulesModulePath,rulesPath,schema;return regeneratorRuntime.async(function(_context){for(;;)switch(_context.prev=_context.next){case 0:queryHasExtensions=!1,projectConfig=this._graphQLConfig.getConfigForFile(uri),schemaPath=projectConfig.schemaPath,_context.prev=3,queryAST=(0,_graphql.parse)(query),schemaPath&&uri===schemaPath||(queryHasExtensions=queryAST.definitions.some(function(definition){switch(definition.kind){case OBJECT_TYPE_DEFINITION:case INTERFACE_TYPE_DEFINITION:case ENUM_TYPE_DEFINITION:case UNION_TYPE_DEFINITION:case SCALAR_TYPE_DEFINITION:case INPUT_OBJECT_TYPE_DEFINITION:case SCALAR_TYPE_EXTENSION:case OBJECT_TYPE_EXTENSION:case INTERFACE_TYPE_EXTENSION:case UNION_TYPE_EXTENSION:case ENUM_TYPE_EXTENSION:case INPUT_OBJECT_TYPE_EXTENSION:case DIRECTIVE_DEFINITION:return!0}return!1})),_context.next=12;break;case 8:return _context.prev=8,_context.t0=_context.catch(3),range=(0,_getDiagnostics.getRange)(_context.t0.locations[0],query),_context.abrupt("return",[{severity:_getDiagnostics.SEVERITY.ERROR,message:_context.t0.message,source:"GraphQL: Syntax",range:range}]);case 12:return source=query,_context.next=15,regeneratorRuntime.awrap(this._graphQLCache.getFragmentDefinitions(projectConfig));case 15:return fragmentDefinitions=_context.sent,_context.next=18,regeneratorRuntime.awrap(this._graphQLCache.getFragmentDependencies(query,fragmentDefinitions));case 18:fragmentDependencies=_context.sent,dependenciesSource=fragmentDependencies.reduce(function(prev,cur){return prev+" "+(0,_graphql.print)(cur.definition)},""),source=source+" "+dependenciesSource,validationAst=null,_context.prev=22,validationAst=(0,_graphql.parse)(source),_context.next=29;break;case 26:return _context.prev=26,_context.t1=_context.catch(22),_context.abrupt("return",[]);case 29:return customRules=void 0,(customRulesModulePath=projectConfig.extensions.customValidationRules)&&(rulesPath=require.resolve(""+customRulesModulePath))&&(customRules=require(""+rulesPath)(this._graphQLConfig)),_context.next=34,regeneratorRuntime.awrap(this._graphQLCache.getSchema(projectConfig.projectName,queryHasExtensions).catch(function(){return null}));case 34:if(schema=_context.sent){_context.next=37;break}return _context.abrupt("return",[]);case 37:return _context.abrupt("return",(0,_getDiagnostics.validateQuery)(validationAst,schema,customRules,isRelayCompatMode));case 38:case"end":return _context.stop()}},null,this,[[3,8],[22,26]])},GraphQLLanguageService.prototype.getAutocompleteSuggestions=function(query,position,filePath){var projectConfig,schema;return regeneratorRuntime.async(function(_context2){for(;;)switch(_context2.prev=_context2.next){case 0:return projectConfig=this._graphQLConfig.getConfigForFile(filePath),_context2.next=3,regeneratorRuntime.awrap(this._graphQLCache.getSchema(projectConfig.projectName).catch(function(){return null}));case 3:if(!(schema=_context2.sent)){_context2.next=6;break}return _context2.abrupt("return",(0,_getAutocompleteSuggestions2.getAutocompleteSuggestions)(schema,query,position));case 6:return _context2.abrupt("return",[]);case 7:case"end":return _context2.stop()}},null,this)},GraphQLLanguageService.prototype.getHoverInformation=function(query,position,filePath){var projectConfig,schema;return regeneratorRuntime.async(function(_context3){for(;;)switch(_context3.prev=_context3.next){case 0:return projectConfig=this._graphQLConfig.getConfigForFile(filePath),_context3.next=3,regeneratorRuntime.awrap(this._graphQLCache.getSchema(projectConfig.projectName).catch(function(){return null}));case 3:if(!(schema=_context3.sent)){_context3.next=6;break}return _context3.abrupt("return",(0,_getHoverInformation2.getHoverInformation)(schema,query,position));case 6:return _context3.abrupt("return","");case 7:case"end":return _context3.stop()}},null,this)},GraphQLLanguageService.prototype.getDefinition=function(query,position,filePath){var projectConfig,ast,node;return regeneratorRuntime.async(function(_context4){for(;;)switch(_context4.prev=_context4.next){case 0:projectConfig=this._graphQLConfig.getConfigForFile(filePath),ast=void 0,_context4.prev=2,ast=(0,_graphql.parse)(query),_context4.next=9;break;case 6:return _context4.prev=6,_context4.t0=_context4.catch(2),_context4.abrupt("return",null);case 9:if(!(node=(0,_graphqlLanguageServiceUtils.getASTNodeAtPosition)(query,ast,position))){_context4.next=17;break}_context4.t1=node.kind,_context4.next=_context4.t1===FRAGMENT_SPREAD?14:_context4.t1===FRAGMENT_DEFINITION?15:_context4.t1===OPERATION_DEFINITION?15:_context4.t1===NAMED_TYPE?16:17;break;case 14:return _context4.abrupt("return",this._getDefinitionForFragmentSpread(query,ast,node,filePath,projectConfig));case 15:return _context4.abrupt("return",(0,_getDefinition.getDefinitionQueryResultForDefinitionNode)(filePath,query,node));case 16:return _context4.abrupt("return",this._getDefinitionForNamedType(query,ast,node,filePath,projectConfig));case 17:return _context4.abrupt("return",null);case 18:case"end":return _context4.stop()}},null,this,[[2,6]])},GraphQLLanguageService.prototype._getDefinitionForNamedType=function(query,ast,node,filePath,projectConfig){var objectTypeDefinitions,dependencies,localObjectTypeDefinitions,typeCastedDefs,localOperationDefinationInfos,result;return regeneratorRuntime.async(function(_context5){for(;;)switch(_context5.prev=_context5.next){case 0:return _context5.next=2,regeneratorRuntime.awrap(this._graphQLCache.getObjectTypeDefinitions(projectConfig));case 2:return objectTypeDefinitions=_context5.sent,_context5.next=5,regeneratorRuntime.awrap(this._graphQLCache.getObjectTypeDependenciesForAST(ast,objectTypeDefinitions));case 5:return dependencies=_context5.sent,localObjectTypeDefinitions=ast.definitions.filter(function(definition){return definition.kind===OBJECT_TYPE_DEFINITION||definition.kind===INPUT_OBJECT_TYPE_DEFINITION||definition.kind===ENUM_TYPE_DEFINITION}),typeCastedDefs=localObjectTypeDefinitions,localOperationDefinationInfos=typeCastedDefs.map(function(definition){return{filePath:filePath,content:query,definition:definition}}),_context5.next=11,regeneratorRuntime.awrap((0,_getDefinition.getDefinitionQueryResultForNamedType)(query,node,dependencies.concat(localOperationDefinationInfos)));case 11:return result=_context5.sent,_context5.abrupt("return",result);case 13:case"end":return _context5.stop()}},null,this)},GraphQLLanguageService.prototype._getDefinitionForFragmentSpread=function(query,ast,node,filePath,projectConfig){var fragmentDefinitions,dependencies,localFragDefinitions,typeCastedDefs,localFragInfos,result;return regeneratorRuntime.async(function(_context6){for(;;)switch(_context6.prev=_context6.next){case 0:return _context6.next=2,regeneratorRuntime.awrap(this._graphQLCache.getFragmentDefinitions(projectConfig));case 2:return fragmentDefinitions=_context6.sent,_context6.next=5,regeneratorRuntime.awrap(this._graphQLCache.getFragmentDependenciesForAST(ast,fragmentDefinitions));case 5:return dependencies=_context6.sent,localFragDefinitions=ast.definitions.filter(function(definition){return definition.kind===FRAGMENT_DEFINITION}),typeCastedDefs=localFragDefinitions,localFragInfos=typeCastedDefs.map(function(definition){return{filePath:filePath,content:query,definition:definition}}),_context6.next=11,regeneratorRuntime.awrap((0,_getDefinition.getDefinitionQueryResultForFragmentSpread)(query,node,dependencies.concat(localFragInfos)));case 11:return result=_context6.sent,_context6.abrupt("return",result);case 13:case"end":return _context6.stop()}},null,this)},GraphQLLanguageService}()},{"./getAutocompleteSuggestions":73,"./getDefinition":74,"./getDiagnostics":75,"./getHoverInformation":76,graphql:98,"graphql-language-service-utils":86}],72:[function(require,module,exports){"use strict";function forEachState(stack,fn){for(var reverseStateStack=[],state=stack;state&&state.kind;)reverseStateStack.push(state),state=state.prevState;for(var i=reverseStateStack.length-1;i>=0;i--)fn(reverseStateStack[i])}function filterAndSortList(list,text){return text?filterNonEmpty(filterNonEmpty(list.map(function(entry){return{proximity:getProximity(normalizeText(entry.label),text),entry:entry}}),function(pair){return pair.proximity<=2}),function(pair){return!pair.entry.isDeprecated}).sort(function(a,b){return(a.entry.isDeprecated?1:0)-(b.entry.isDeprecated?1:0)||a.proximity-b.proximity||a.entry.label.length-b.entry.label.length}).map(function(pair){return pair.entry}):filterNonEmpty(list,function(entry){return!entry.isDeprecated})}function filterNonEmpty(array,predicate){var filtered=array.filter(predicate);return 0===filtered.length?array:filtered}function normalizeText(text){return text.toLowerCase().replace(/\W/g,"")}function getProximity(suggestion,text){var proximity=lexicalDistance(text,suggestion);return suggestion.length>text.length&&(proximity-=suggestion.length-text.length-1,proximity+=0===suggestion.indexOf(text)?0:.5),proximity}function lexicalDistance(a,b){var i=void 0,j=void 0,d=[],aLength=a.length,bLength=b.length;for(i=0;i<=aLength;i++)d[i]=[i];for(j=1;j<=bLength;j++)d[0][j]=j;for(i=1;i<=aLength;i++)for(j=1;j<=bLength;j++){var cost=a[i-1]===b[j-1]?0:1;d[i][j]=Math.min(d[i-1][j]+1,d[i][j-1]+1,d[i-1][j-1]+cost),i>1&&j>1&&a[i-1]===b[j-2]&&a[i-2]===b[j-1]&&(d[i][j]=Math.min(d[i][j],d[i-2][j-2]+cost))}return d[aLength][bLength]}Object.defineProperty(exports,"__esModule",{value:!0}),exports.getDefinitionState=function(tokenState){var definitionState=void 0;return forEachState(tokenState,function(state){switch(state.kind){case"Query":case"ShortQuery":case"Mutation":case"Subscription":case"FragmentDefinition":definitionState=state}}),definitionState},exports.getFieldDef=function(schema,type,fieldName){return fieldName===_introspection.SchemaMetaFieldDef.name&&schema.getQueryType()===type?_introspection.SchemaMetaFieldDef:fieldName===_introspection.TypeMetaFieldDef.name&&schema.getQueryType()===type?_introspection.TypeMetaFieldDef:fieldName===_introspection.TypeNameMetaFieldDef.name&&(0,_graphql.isCompositeType)(type)?_introspection.TypeNameMetaFieldDef:type.getFields&&"function"==typeof type.getFields?type.getFields()[fieldName]:null},exports.forEachState=forEachState,exports.objectValues=function(object){for(var keys=Object.keys(object),len=keys.length,values=new Array(len),i=0;i=cursor.character)return styleAtCursor=style,stateAtCursor=_extends({},state),stringAtCursor=stream.current(),"BREAK"});return{start:token.start,end:token.end,string:stringAtCursor||token.string,state:stateAtCursor||token.state,style:styleAtCursor||token.style}}function runOnlineParser(queryText,callback){for(var lines=queryText.split("\n"),parser=(0,_graphqlLanguageServiceParser.onlineParser)(),state=parser.startState(),style="",stream=new _graphqlLanguageServiceParser.CharacterStream(""),i=0;i1&&void 0!==arguments[1]?arguments[1]:null,customRules=arguments[2],isRelayCompatMode=arguments[3];if(!schema)return[];var validationErrorAnnotations=mapCat((0,_graphqlLanguageServiceUtils.validateWithCustomRules)(schema,ast,customRules,isRelayCompatMode),function(error){return annotations(error,SEVERITY.ERROR,"Validation")}),deprecationWarningAnnotations=_graphql.findDeprecatedUsages?mapCat((0,_graphql.findDeprecatedUsages)(schema,ast),function(error){return annotations(error,SEVERITY.WARNING,"Deprecation")}):[];return validationErrorAnnotations.concat(deprecationWarningAnnotations)}function mapCat(array,mapper){return Array.prototype.concat.apply([],array.map(mapper))}function annotations(error,severity,type){return error.nodes?error.nodes.map(function(node){var highlightNode="Variable"!==node.kind&&node.name?node.name:node.variable?node.variable:node;(0,_assert2.default)(error.locations,"GraphQL validation error requires locations.");var loc=error.locations[0],highlightLoc=getLocation(highlightNode),end=loc.column+(highlightLoc.end-highlightLoc.start);return{source:"GraphQL: "+type,message:error.message,severity:severity,range:new _graphqlLanguageServiceUtils.Range(new _graphqlLanguageServiceUtils.Position(loc.line-1,loc.column-1),new _graphqlLanguageServiceUtils.Position(loc.line-1,end))}}):[]}function getRange(location,queryText){var parser=(0,_graphqlLanguageServiceParser.onlineParser)(),state=parser.startState(),lines=queryText.split("\n");(0,_assert2.default)(lines.length>=location.line,"Query text must have more lines than where the error happened");for(var stream=null,i=0;i1&&void 0!==arguments[1]?arguments[1]:null,customRules=arguments[2],isRelayCompatMode=arguments[3],ast=null;try{ast=(0,_graphql.parse)(query)}catch(error){var range=getRange(error.locations[0],query);return[{severity:SEVERITY.ERROR,message:error.message,source:"GraphQL: Syntax",range:range}]}return validateQuery(ast,schema,customRules,isRelayCompatMode)},exports.validateQuery=validateQuery,exports.getRange=getRange;var _assert2=function(obj){return obj&&obj.__esModule?obj:{default:obj}}(require("assert")),_graphql=require("graphql"),_graphqlLanguageServiceParser=require("graphql-language-service-parser"),_graphqlLanguageServiceUtils=require("graphql-language-service-utils"),SEVERITY=exports.SEVERITY={ERROR:1,WARNING:2,INFORMATION:3,HINT:4}},{assert:36,graphql:98,"graphql-language-service-parser":82,"graphql-language-service-utils":86}],76:[function(require,module,exports){"use strict";function renderField(into,typeInfo,options){renderQualifiedField(into,typeInfo,options),renderTypeAnnotation(into,typeInfo,options,typeInfo.type)}function renderQualifiedField(into,typeInfo,options){if(typeInfo.fieldDef){var fieldName=typeInfo.fieldDef.name;"__"!==fieldName.slice(0,2)&&(renderType(into,typeInfo,options,typeInfo.parentType),text(into,".")),text(into,fieldName)}}function renderDirective(into,typeInfo,options){typeInfo.directiveDef&&text(into,"@"+typeInfo.directiveDef.name)}function renderArg(into,typeInfo,options){if(typeInfo.directiveDef?renderDirective(into,typeInfo,options):typeInfo.fieldDef&&renderQualifiedField(into,typeInfo,options),typeInfo.argDef){var name=typeInfo.argDef.name;text(into,"("),text(into,name),renderTypeAnnotation(into,typeInfo,options,typeInfo.inputType),text(into,")")}}function renderTypeAnnotation(into,typeInfo,options,t){text(into,": "),renderType(into,typeInfo,options,t)}function renderEnumValue(into,typeInfo,options){if(typeInfo.enumValue){var name=typeInfo.enumValue.name;renderType(into,typeInfo,options,typeInfo.inputType),text(into,"."),text(into,name)}}function renderType(into,typeInfo,options,t){t&&(t instanceof _graphql.GraphQLNonNull?(renderType(into,typeInfo,options,t.ofType),text(into,"!")):t instanceof _graphql.GraphQLList?(text(into,"["),renderType(into,typeInfo,options,t.ofType),text(into,"]")):text(into,t.name))}function renderDescription(into,options,def){if(def){var description="string"==typeof def.description?def.description:null;description&&(text(into,"\n\n"),text(into,description)),renderDeprecation(into,options,def)}}function renderDeprecation(into,options,def){if(def){var reason="string"==typeof def.deprecationReason?def.deprecationReason:null;reason&&(text(into,"\n\n"),text(into,"Deprecated: "),text(into,reason))}}function text(into,content){into.push(content)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.getHoverInformation=function(schema,queryText,cursor,contextToken){var token=contextToken||(0,_getAutocompleteSuggestions.getTokenAtPosition)(queryText,cursor);if(!schema||!token||!token.state)return[];var state=token.state,kind=state.kind,step=state.step,typeInfo=(0,_getAutocompleteSuggestions.getTypeInfo)(schema,token.state),options={schema:schema};if("Field"===kind&&0===step&&typeInfo.fieldDef||"AliasedField"===kind&&2===step&&typeInfo.fieldDef){var into=[];return renderField(into,typeInfo,options),renderDescription(into,options,typeInfo.fieldDef),into.join("").trim()}if("Directive"===kind&&1===step&&typeInfo.directiveDef){var _into=[];return renderDirective(_into,typeInfo,options),renderDescription(_into,options,typeInfo.directiveDef),_into.join("").trim()}if("Argument"===kind&&0===step&&typeInfo.argDef){var _into2=[];return renderArg(_into2,typeInfo,options),renderDescription(_into2,options,typeInfo.argDef),_into2.join("").trim()}if("EnumValue"===kind&&typeInfo.enumValue&&typeInfo.enumValue.description){var _into3=[];return renderEnumValue(_into3,typeInfo,options),renderDescription(_into3,options,typeInfo.enumValue),_into3.join("").trim()}if("NamedType"===kind&&typeInfo.type&&typeInfo.type.description){var _into4=[];return renderType(_into4,typeInfo,options,typeInfo.type),renderDescription(_into4,options,typeInfo.type),_into4.join("").trim()}};var _getAutocompleteSuggestions=require("./getAutocompleteSuggestions"),_graphql=require("graphql")},{"./getAutocompleteSuggestions":73,graphql:98}],77:[function(require,module,exports){"use strict";function outlineTreeConverter(docText){var meta=function(node){return{representativeName:node.name,startPosition:(0,_graphqlLanguageServiceUtils.offsetToPosition)(docText,node.loc.start),endPosition:(0,_graphqlLanguageServiceUtils.offsetToPosition)(docText,node.loc.end),children:node.selectionSet||[]}};return{Field:function(node){var tokenizedText=node.alias?[buildToken("plain",node.alias),buildToken("plain",": ")]:[];return tokenizedText.push(buildToken("plain",node.name)),_extends({tokenizedText:tokenizedText},meta(node))},OperationDefinition:function(node){return _extends({tokenizedText:[buildToken("keyword",node.operation),buildToken("whitespace"," "),buildToken("class-name",node.name)]},meta(node))},Document:function(node){return node.definitions},SelectionSet:function(node){return concatMap(node.selections,function(child){return child.kind===INLINE_FRAGMENT?child.selectionSet:child})},Name:function(node){return node.value},FragmentDefinition:function(node){return _extends({tokenizedText:[buildToken("keyword","fragment"),buildToken("whitespace"," "),buildToken("class-name",node.name)]},meta(node))},FragmentSpread:function(node){return _extends({tokenizedText:[buildToken("plain","..."),buildToken("class-name",node.name)]},meta(node))},InlineFragment:function(node){return node.selectionSet}}}function buildToken(kind,value){return{kind:kind,value:value}}function concatMap(arr,fn){for(var res=[],i=0;i1&&void 0!==arguments[1])||arguments[1],caseFold=arguments.length>2&&void 0!==arguments[2]&&arguments[2],token=null,match=null;return"string"==typeof pattern?(match=new RegExp(pattern,caseFold?"i":"g").test(_this._sourceText.substr(_this._pos,pattern.length)),token=pattern):pattern instanceof RegExp&&(token=(match=_this._sourceText.slice(_this._pos).match(pattern))&&match[0]),!(null==match||!("string"==typeof pattern||match instanceof Array&&_this._sourceText.startsWith(match[0],_this._pos)))&&(consume&&(_this._start=_this._pos,token&&token.length&&(_this._pos+=token.length)),match)},this.backUp=function(num){_this._pos-=num},this.column=function(){return _this._pos},this.indentation=function(){var match=_this._sourceText.match(/\s*/),indent=0;if(match&&0===match.length)for(var whitespaces=match[0],pos=0;whitespaces.length>pos;)9===whitespaces.charCodeAt(pos)?indent+=2:indent++,pos++;return indent},this.current=function(){return _this._sourceText.slice(_this._start,_this._pos)},this._start=0,this._pos=0,this._sourceText=sourceText}return CharacterStream.prototype._testNextCharacter=function(pattern){var character=this._sourceText.charAt(this._pos);return"string"==typeof pattern?character===pattern:pattern instanceof RegExp?pattern.test(character):pattern(character)},CharacterStream}();exports.default=CharacterStream},{}],80:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.opt=function(ofRule){return{ofRule:ofRule}},exports.list=function(ofRule,separator){return{ofRule:ofRule,isList:!0,separator:separator}},exports.butNot=function(rule,exclusions){var ruleMatch=rule.match;return rule.match=function(token){var check=!1;return ruleMatch&&(check=ruleMatch(token)),check&&exclusions.every(function(exclusion){return exclusion.match&&!exclusion.match(token)})},rule},exports.t=function(kind,style){return{style:style,match:function(token){return token.kind===kind}}},exports.p=function(value,style){return{style:style||"punctuation",match:function(token){return"Punctuation"===token.kind&&token.value===value}}}},{}],81:[function(require,module,exports){"use strict";function word(value){return{style:"keyword",match:function(token){return"Name"===token.kind&&token.value===value}}}function name(style){return{style:style,match:function(token){return"Name"===token.kind},update:function(state,token){state.name=token.value}}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.ParseRules=exports.LexRules=exports.isIgnored=void 0;var _RuleHelpers=require("./RuleHelpers");exports.isIgnored=function(ch){return" "===ch||"\t"===ch||","===ch||"\n"===ch||"\r"===ch||"\ufeff"===ch},exports.LexRules={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}))*"?)/,Comment:/^#.*/},exports.ParseRules={Document:[(0,_RuleHelpers.list)("Definition")],Definition:function(token){switch(token.value){case"{":return"ShortQuery";case"query":return"Query";case"mutation":return"Mutation";case"subscription":return"Subscription";case"fragment":return"FragmentDefinition";case"schema":return"SchemaDef";case"scalar":return"ScalarDef";case"type":return"ObjectTypeDef";case"interface":return"InterfaceDef";case"union":return"UnionDef";case"enum":return"EnumDef";case"input":return"InputDef";case"extend":return"ExtendDef";case"directive":return"DirectiveDef"}},ShortQuery:["SelectionSet"],Query:[word("query"),(0,_RuleHelpers.opt)(name("def")),(0,_RuleHelpers.opt)("VariableDefinitions"),(0,_RuleHelpers.list)("Directive"),"SelectionSet"],Mutation:[word("mutation"),(0,_RuleHelpers.opt)(name("def")),(0,_RuleHelpers.opt)("VariableDefinitions"),(0,_RuleHelpers.list)("Directive"),"SelectionSet"],Subscription:[word("subscription"),(0,_RuleHelpers.opt)(name("def")),(0,_RuleHelpers.opt)("VariableDefinitions"),(0,_RuleHelpers.list)("Directive"),"SelectionSet"],VariableDefinitions:[(0,_RuleHelpers.p)("("),(0,_RuleHelpers.list)("VariableDefinition"),(0,_RuleHelpers.p)(")")],VariableDefinition:["Variable",(0,_RuleHelpers.p)(":"),"Type",(0,_RuleHelpers.opt)("DefaultValue")],Variable:[(0,_RuleHelpers.p)("$","variable"),name("variable")],DefaultValue:[(0,_RuleHelpers.p)("="),"Value"],SelectionSet:[(0,_RuleHelpers.p)("{"),(0,_RuleHelpers.list)("Selection"),(0,_RuleHelpers.p)("}")],Selection:function(token,stream){return"..."===token.value?stream.match(/[\s\u00a0,]*(on\b|@|{)/,!1)?"InlineFragment":"FragmentSpread":stream.match(/[\s\u00a0,]*:/,!1)?"AliasedField":"Field"},AliasedField:[name("property"),(0,_RuleHelpers.p)(":"),name("qualifier"),(0,_RuleHelpers.opt)("Arguments"),(0,_RuleHelpers.list)("Directive"),(0,_RuleHelpers.opt)("SelectionSet")],Field:[name("property"),(0,_RuleHelpers.opt)("Arguments"),(0,_RuleHelpers.list)("Directive"),(0,_RuleHelpers.opt)("SelectionSet")],Arguments:[(0,_RuleHelpers.p)("("),(0,_RuleHelpers.list)("Argument"),(0,_RuleHelpers.p)(")")],Argument:[name("attribute"),(0,_RuleHelpers.p)(":"),"Value"],FragmentSpread:[(0,_RuleHelpers.p)("..."),name("def"),(0,_RuleHelpers.list)("Directive")],InlineFragment:[(0,_RuleHelpers.p)("..."),(0,_RuleHelpers.opt)("TypeCondition"),(0,_RuleHelpers.list)("Directive"),"SelectionSet"],FragmentDefinition:[word("fragment"),(0,_RuleHelpers.opt)((0,_RuleHelpers.butNot)(name("def"),[word("on")])),"TypeCondition",(0,_RuleHelpers.list)("Directive"),"SelectionSet"],TypeCondition:[word("on"),"NamedType"],Value:function(token){switch(token.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(token.value){case"[":return"ListValue";case"{":return"ObjectValue";case"$":return"Variable"}return null;case"Name":switch(token.value){case"true":case"false":return"BooleanValue"}return"null"===token.value?"NullValue":"EnumValue"}},NumberValue:[(0,_RuleHelpers.t)("Number","number")],StringValue:[(0,_RuleHelpers.t)("String","string")],BooleanValue:[(0,_RuleHelpers.t)("Name","builtin")],NullValue:[(0,_RuleHelpers.t)("Name","keyword")],EnumValue:[name("string-2")],ListValue:[(0,_RuleHelpers.p)("["),(0,_RuleHelpers.list)("Value"),(0,_RuleHelpers.p)("]")],ObjectValue:[(0,_RuleHelpers.p)("{"),(0,_RuleHelpers.list)("ObjectField"),(0,_RuleHelpers.p)("}")],ObjectField:[name("attribute"),(0,_RuleHelpers.p)(":"),"Value"],Type:function(token){return"["===token.value?"ListType":"NonNullType"},ListType:[(0,_RuleHelpers.p)("["),"Type",(0,_RuleHelpers.p)("]"),(0,_RuleHelpers.opt)((0,_RuleHelpers.p)("!"))],NonNullType:["NamedType",(0,_RuleHelpers.opt)((0,_RuleHelpers.p)("!"))],NamedType:[{style:"atom",match:function(token){return"Name"===token.kind},update:function(state,token){state.prevState&&state.prevState.prevState&&(state.name=token.value,state.prevState.prevState.type=token.value)}}],Directive:[(0,_RuleHelpers.p)("@","meta"),name("meta"),(0,_RuleHelpers.opt)("Arguments")],SchemaDef:[word("schema"),(0,_RuleHelpers.list)("Directive"),(0,_RuleHelpers.p)("{"),(0,_RuleHelpers.list)("OperationTypeDef"),(0,_RuleHelpers.p)("}")],OperationTypeDef:[name("keyword"),(0,_RuleHelpers.p)(":"),name("atom")],ScalarDef:[word("scalar"),name("atom"),(0,_RuleHelpers.list)("Directive")],ObjectTypeDef:[word("type"),name("atom"),(0,_RuleHelpers.opt)("Implements"),(0,_RuleHelpers.list)("Directive"),(0,_RuleHelpers.p)("{"),(0,_RuleHelpers.list)("FieldDef"),(0,_RuleHelpers.p)("}")],Implements:[word("implements"),(0,_RuleHelpers.list)("NamedType")],FieldDef:[name("property"),(0,_RuleHelpers.opt)("ArgumentsDef"),(0,_RuleHelpers.p)(":"),"Type",(0,_RuleHelpers.list)("Directive")],ArgumentsDef:[(0,_RuleHelpers.p)("("),(0,_RuleHelpers.list)("InputValueDef"),(0,_RuleHelpers.p)(")")],InputValueDef:[name("attribute"),(0,_RuleHelpers.p)(":"),"Type",(0,_RuleHelpers.opt)("DefaultValue"),(0,_RuleHelpers.list)("Directive")],InterfaceDef:[word("interface"),name("atom"),(0,_RuleHelpers.list)("Directive"),(0,_RuleHelpers.p)("{"),(0,_RuleHelpers.list)("FieldDef"),(0,_RuleHelpers.p)("}")],UnionDef:[word("union"),name("atom"),(0,_RuleHelpers.list)("Directive"),(0,_RuleHelpers.p)("="),(0,_RuleHelpers.list)("UnionMember",(0,_RuleHelpers.p)("|"))],UnionMember:["NamedType"],EnumDef:[word("enum"),name("atom"),(0,_RuleHelpers.list)("Directive"),(0,_RuleHelpers.p)("{"),(0,_RuleHelpers.list)("EnumValueDef"),(0,_RuleHelpers.p)("}")],EnumValueDef:[name("string-2"),(0,_RuleHelpers.list)("Directive")],InputDef:[word("input"),name("atom"),(0,_RuleHelpers.list)("Directive"),(0,_RuleHelpers.p)("{"),(0,_RuleHelpers.list)("InputValueDef"),(0,_RuleHelpers.p)("}")],ExtendDef:[word("extend"),"ObjectTypeDef"],DirectiveDef:[word("directive"),(0,_RuleHelpers.p)("@","meta"),name("meta"),(0,_RuleHelpers.opt)("ArgumentsDef"),word("on"),(0,_RuleHelpers.list)("DirectiveLocation",(0,_RuleHelpers.p)("|"))],DirectiveLocation:[name("string-2")]}},{"./RuleHelpers":80}],82:[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}Object.defineProperty(exports,"__esModule",{value:!0});var _CharacterStream=require("./CharacterStream");Object.defineProperty(exports,"CharacterStream",{enumerable:!0,get:function(){return _interopRequireDefault(_CharacterStream).default}});var _Rules=require("./Rules");Object.defineProperty(exports,"LexRules",{enumerable:!0,get:function(){return _Rules.LexRules}}),Object.defineProperty(exports,"ParseRules",{enumerable:!0,get:function(){return _Rules.ParseRules}}),Object.defineProperty(exports,"isIgnored",{enumerable:!0,get:function(){return _Rules.isIgnored}});var _RuleHelpers=require("./RuleHelpers");Object.defineProperty(exports,"butNot",{enumerable:!0,get:function(){return _RuleHelpers.butNot}}),Object.defineProperty(exports,"list",{enumerable:!0,get:function(){return _RuleHelpers.list}}),Object.defineProperty(exports,"opt",{enumerable:!0,get:function(){return _RuleHelpers.opt}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return _RuleHelpers.p}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return _RuleHelpers.t}});var _onlineParser=require("./onlineParser");Object.defineProperty(exports,"onlineParser",{enumerable:!0,get:function(){return _interopRequireDefault(_onlineParser).default}})},{"./CharacterStream":79,"./RuleHelpers":80,"./Rules":81,"./onlineParser":83}],83:[function(require,module,exports){"use strict";function getToken(stream,state,options){var lexRules=options.lexRules,parseRules=options.parseRules,eatWhitespace=options.eatWhitespace,editorConfig=options.editorConfig;if(state.rule&&0===state.rule.length?popRule(state):state.needsAdvance&&(state.needsAdvance=!1,advanceRule(state,!0)),stream.sol()){var tabSize=editorConfig&&editorConfig.tabSize||2;state.indentLevel=Math.floor(stream.indentation()/tabSize)}if(eatWhitespace(stream))return"ws";var token=lex(lexRules,stream);if(!token)return stream.match(/\S+/),pushRule(SpecialParseRules,state,"Invalid"),"invalidchar";if("Comment"===token.kind)return pushRule(SpecialParseRules,state,"Comment"),"comment";var backupState=assign({},state);if("Punctuation"===token.kind)if(/^[{([]/.test(token.value))state.levels=(state.levels||[]).concat(state.indentLevel+1);else if(/^[})\]]/.test(token.value)){var levels=state.levels=(state.levels||[]).slice(0,-1);state.indentLevel&&levels.length>0&&levels[levels.length-1]0&&void 0!==arguments[0]?arguments[0]:{eatWhitespace:function(stream){return stream.eatWhile(_Rules.isIgnored)},lexRules:_Rules.LexRules,parseRules:_Rules.ParseRules,editorConfig:{}};return{startState:function(){var initialState={level:0,step:0,name:null,kind:null,type:null,rule:null,needsSeperator:!1,prevState:null};return pushRule(options.parseRules,initialState,"Document"),initialState},token:function(stream,state){return getToken(stream,state,options)}}};var _Rules=require("./Rules"),SpecialParseRules={Invalid:[],Comment:[]}},{"./Rules":81}],84:[function(require,module,exports){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function offsetToPosition(text,loc){var buf=text.slice(0,loc),lines=buf.split("\n").length-1,lastLineIndex=buf.lastIndexOf("\n");return new Position(lines,loc-lastLineIndex-1)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.offsetToPosition=offsetToPosition,exports.locToRange=function(text,loc){var start=offsetToPosition(text,loc.start),end=offsetToPosition(text,loc.end);return new Range(start,end)};var Range=exports.Range=function(){function Range(start,end){var _this=this;_classCallCheck(this,Range),this.containsPosition=function(position){return _this.start.line===position.line?_this.start.character<=position.character:_this.end.line===position.line?_this.end.character>=position.character:_this.start.line<=position.line&&_this.end.line>=position.line},this.start=start,this.end=end}return Range.prototype.setStart=function(line,character){this.start=new Position(line,character)},Range.prototype.setEnd=function(line,character){this.end=new Position(line,character)},Range}(),Position=exports.Position=function(){function Position(line,character){var _this2=this;_classCallCheck(this,Position),this.lessThanOrEqualTo=function(position){return _this2.line0?errors.filter(function(error){return-1===error.message.indexOf("Unknown directive")||!(error.nodes&&error.nodes[0]&&error.nodes[0].name&&"arguments"===error.nodes[0].name.value||error.nodes&&error.nodes[0]&&error.nodes[0].name&&error.nodes[0].name.value&&"argumentDefinitions"===error.nodes[0].name.value)}):[]};var _graphql=require("graphql")},{graphql:98,"graphql/validation/rules/ExecutableDefinitions":169,"graphql/validation/rules/KnownFragmentNames":174,"graphql/validation/rules/NoUnusedFragments":180}],88:[function(require,module,exports){"use strict";function GraphQLError(message,nodes,source,positions,path,originalError,extensions){var _nodes=Array.isArray(nodes)?0!==nodes.length?nodes:void 0:nodes?[nodes]:void 0,_source=source;if(!_source&&_nodes){var node=_nodes[0];_source=node&&node.loc&&node.loc.source}var _positions=positions;!_positions&&_nodes&&(_positions=_nodes.reduce(function(list,node){return node.loc&&list.push(node.loc.start),list},[])),_positions&&0===_positions.length&&(_positions=void 0);var _locations;positions&&source?_locations=positions.map(function(pos){return(0,_location.getLocation)(source,pos)}):_nodes&&(_locations=_nodes.reduce(function(list,node){return node.loc&&list.push((0,_location.getLocation)(node.loc.source,node.loc.start)),list},[]));var _extensions=extensions||originalError&&originalError.extensions;Object.defineProperties(this,{message:{value:message,enumerable:!0,writable:!0},locations:{value:_locations||void 0,enumerable:Boolean(_locations)},path:{value:path||void 0,enumerable:Boolean(path)},nodes:{value:_nodes||void 0},source:{value:_source||void 0},positions:{value:_positions||void 0},originalError:{value:originalError},extensions:{value:_extensions||void 0,enumerable:Boolean(_extensions)}}),originalError&&originalError.stack?Object.defineProperty(this,"stack",{value:originalError.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,GraphQLError):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}Object.defineProperty(exports,"__esModule",{value:!0}),exports.GraphQLError=GraphQLError;var _printError=require("./printError"),_location=require("../language/location");GraphQLError.prototype=Object.create(Error.prototype,{constructor:{value:GraphQLError},name:{value:"GraphQLError"},toString:{value:function(){return(0,_printError.printError)(this)}}})},{"../language/location":122,"./printError":92}],89:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.formatError=function(error){error||(0,_invariant.default)(0,"Received null or undefined error.");var message=error.message||"An unknown error occurred.",locations=error.locations,path=error.path,extensions=error.extensions;return extensions?{message:message,locations:locations,path:path,extensions:extensions}:{message:message,locations:locations,path:path}};var _invariant=function(obj){return obj&&obj.__esModule?obj:{default:obj}}(require("../jsutils/invariant"))},{"../jsutils/invariant":103}],90:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"GraphQLError",{enumerable:!0,get:function(){return _GraphQLError.GraphQLError}}),Object.defineProperty(exports,"syntaxError",{enumerable:!0,get:function(){return _syntaxError.syntaxError}}),Object.defineProperty(exports,"locatedError",{enumerable:!0,get:function(){return _locatedError.locatedError}}),Object.defineProperty(exports,"printError",{enumerable:!0,get:function(){return _printError.printError}}),Object.defineProperty(exports,"formatError",{enumerable:!0,get:function(){return _formatError.formatError}});var _GraphQLError=require("./GraphQLError"),_syntaxError=require("./syntaxError"),_locatedError=require("./locatedError"),_printError=require("./printError"),_formatError=require("./formatError")},{"./GraphQLError":88,"./formatError":89,"./locatedError":91,"./printError":92,"./syntaxError":93}],91:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.locatedError=function(originalError,nodes,path){return originalError&&Array.isArray(originalError.path)?originalError:new _GraphQLError.GraphQLError(originalError&&originalError.message,originalError&&originalError.nodes||nodes,originalError&&originalError.source,originalError&&originalError.positions,path,originalError)};var _GraphQLError=require("./GraphQLError")},{"./GraphQLError":88}],92:[function(require,module,exports){"use strict";function highlightSourceAtLocation(source,location){var firstLineColumnOffset=source.locationOffset.column-1,body=whitespace(firstLineColumnOffset)+source.body,lineIndex=location.line-1,lineOffset=source.locationOffset.line-1,lineNum=location.line+lineOffset,columnOffset=1===location.line?firstLineColumnOffset:0,columnNum=location.column+columnOffset,lines=body.split(/\r\n|[\n\r]/g);return"".concat(source.name," (").concat(lineNum,":").concat(columnNum,")\n")+printPrefixedLines([["".concat(lineNum-1,": "),lines[lineIndex-1]],["".concat(lineNum,": "),lines[lineIndex]],["",whitespace(columnNum-1)+"^"],["".concat(lineNum+1,": "),lines[lineIndex+1]]])}function printPrefixedLines(lines){var existingLines=lines.filter(function(_ref){_ref[0];return void 0!==_ref[1]}),padLen=0,_iteratorNormalCompletion3=!0,_didIteratorError3=!1,_iteratorError3=void 0;try{for(var _step3,_iterator3=existingLines[Symbol.iterator]();!(_iteratorNormalCompletion3=(_step3=_iterator3.next()).done);_iteratorNormalCompletion3=!0){var prefix=_step3.value[0];padLen=Math.max(padLen,prefix.length)}}catch(err){_didIteratorError3=!0,_iteratorError3=err}finally{try{_iteratorNormalCompletion3||null==_iterator3.return||_iterator3.return()}finally{if(_didIteratorError3)throw _iteratorError3}}return existingLines.map(function(_ref3){var prefix=_ref3[0],line=_ref3[1];return lpad(padLen,prefix)+line}).join("\n")}function whitespace(len){return Array(len+1).join(" ")}function lpad(len,str){return whitespace(len-str.length)+str}Object.defineProperty(exports,"__esModule",{value:!0}),exports.printError=function(error){var printedLocations=[];if(error.nodes){var _iteratorNormalCompletion=!0,_didIteratorError=!1,_iteratorError=void 0;try{for(var _step,_iterator=error.nodes[Symbol.iterator]();!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=!0){var node=_step.value;node.loc&&printedLocations.push(highlightSourceAtLocation(node.loc.source,(0,_location.getLocation)(node.loc.source,node.loc.start)))}}catch(err){_didIteratorError=!0,_iteratorError=err}finally{try{_iteratorNormalCompletion||null==_iterator.return||_iterator.return()}finally{if(_didIteratorError)throw _iteratorError}}}else if(error.source&&error.locations){var source=error.source,_iteratorNormalCompletion2=!0,_didIteratorError2=!1,_iteratorError2=void 0;try{for(var _step2,_iterator2=error.locations[Symbol.iterator]();!(_iteratorNormalCompletion2=(_step2=_iterator2.next()).done);_iteratorNormalCompletion2=!0){var location=_step2.value;printedLocations.push(highlightSourceAtLocation(source,location))}}catch(err){_didIteratorError2=!0,_iteratorError2=err}finally{try{_iteratorNormalCompletion2||null==_iterator2.return||_iterator2.return()}finally{if(_didIteratorError2)throw _iteratorError2}}}return 0===printedLocations.length?error.message:[error.message].concat(printedLocations).join("\n\n")+"\n"};var _location=require("../language/location")},{"../language/location":122}],93:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.syntaxError=function(source,position,description){return new _GraphQLError.GraphQLError("Syntax Error: ".concat(description),void 0,source,[position])};var _GraphQLError=require("./GraphQLError")},{"./GraphQLError":88}],94:[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}function executeImpl(schema,document,rootValue,contextValue,variableValues,operationName,fieldResolver){assertValidExecutionArguments(schema,document,variableValues);var exeContext=buildExecutionContext(schema,document,rootValue,contextValue,variableValues,operationName,fieldResolver);return Array.isArray(exeContext)?{errors:exeContext}:buildResponse(exeContext,executeOperation(exeContext,exeContext.operation,rootValue))}function buildResponse(exeContext,data){return(0,_isPromise.default)(data)?data.then(function(resolved){return buildResponse(exeContext,resolved)}):0===exeContext.errors.length?{data:data}:{errors:exeContext.errors,data:data}}function responsePathAsArray(path){for(var flattened=[],curr=path;curr;)flattened.push(curr.key),curr=curr.prev;return flattened.reverse()}function addPath(prev,key){return{prev:prev,key:key}}function assertValidExecutionArguments(schema,document,rawVariableValues){document||(0,_invariant.default)(0,"Must provide document"),(0,_validate.assertValidSchema)(schema),rawVariableValues&&"object"!==_typeof(rawVariableValues)&&(0,_invariant.default)(0,"Variables must be provided as an Object where each property is a variable value. Perhaps look to see if an unparsed JSON string was provided.")}function buildExecutionContext(schema,document,rootValue,contextValue,rawVariableValues,operationName,fieldResolver){for(var operation,errors=[],hasMultipleAssumedOperations=!1,fragments=Object.create(null),i=0;i0)return{errors:schemaValidationErrors};var document;try{document=(0,_parser.parse)(source)}catch(syntaxError){return{errors:[syntaxError]}}var validationErrors=(0,_validate2.validate)(schema,document);return validationErrors.length>0?{errors:validationErrors}:(0,_execute.execute)(schema,document,rootValue,contextValue,variableValues,operationName,fieldResolver)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.graphql=function(argsOrSchema,source,rootValue,contextValue,variableValues,operationName,fieldResolver){var _arguments=arguments;return new Promise(function(resolve){return resolve(1===_arguments.length?graphqlImpl(argsOrSchema.schema,argsOrSchema.source,argsOrSchema.rootValue,argsOrSchema.contextValue,argsOrSchema.variableValues,argsOrSchema.operationName,argsOrSchema.fieldResolver):graphqlImpl(argsOrSchema,source,rootValue,contextValue,variableValues,operationName,fieldResolver))})},exports.graphqlSync=function(argsOrSchema,source,rootValue,contextValue,variableValues,operationName,fieldResolver){var result=1===arguments.length?graphqlImpl(argsOrSchema.schema,argsOrSchema.source,argsOrSchema.rootValue,argsOrSchema.contextValue,argsOrSchema.variableValues,argsOrSchema.operationName,argsOrSchema.fieldResolver):graphqlImpl(argsOrSchema,source,rootValue,contextValue,variableValues,operationName,fieldResolver);if(result.then)throw new Error("GraphQL execution failed to complete synchronously.");return result};var _validate=require("./type/validate"),_parser=require("./language/parser"),_validate2=require("./validation/validate"),_execute=require("./execution/execute")},{"./execution/execute":94,"./language/parser":123,"./type/validate":142,"./validation/validate":203}],98:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"graphql",{enumerable:!0,get:function(){return _graphql.graphql}}),Object.defineProperty(exports,"graphqlSync",{enumerable:!0,get:function(){return _graphql.graphqlSync}}),Object.defineProperty(exports,"GraphQLSchema",{enumerable:!0,get:function(){return _type.GraphQLSchema}}),Object.defineProperty(exports,"GraphQLScalarType",{enumerable:!0,get:function(){return _type.GraphQLScalarType}}),Object.defineProperty(exports,"GraphQLObjectType",{enumerable:!0,get:function(){return _type.GraphQLObjectType}}),Object.defineProperty(exports,"GraphQLInterfaceType",{enumerable:!0,get:function(){return _type.GraphQLInterfaceType}}),Object.defineProperty(exports,"GraphQLUnionType",{enumerable:!0,get:function(){return _type.GraphQLUnionType}}),Object.defineProperty(exports,"GraphQLEnumType",{enumerable:!0,get:function(){return _type.GraphQLEnumType}}),Object.defineProperty(exports,"GraphQLInputObjectType",{enumerable:!0,get:function(){return _type.GraphQLInputObjectType}}),Object.defineProperty(exports,"GraphQLList",{enumerable:!0,get:function(){return _type.GraphQLList}}),Object.defineProperty(exports,"GraphQLNonNull",{enumerable:!0,get:function(){return _type.GraphQLNonNull}}),Object.defineProperty(exports,"GraphQLDirective",{enumerable:!0,get:function(){return _type.GraphQLDirective}}),Object.defineProperty(exports,"TypeKind",{enumerable:!0,get:function(){return _type.TypeKind}}),Object.defineProperty(exports,"specifiedScalarTypes",{enumerable:!0,get:function(){return _type.specifiedScalarTypes}}),Object.defineProperty(exports,"GraphQLInt",{enumerable:!0,get:function(){return _type.GraphQLInt}}),Object.defineProperty(exports,"GraphQLFloat",{enumerable:!0,get:function(){return _type.GraphQLFloat}}),Object.defineProperty(exports,"GraphQLString",{enumerable:!0,get:function(){return _type.GraphQLString}}),Object.defineProperty(exports,"GraphQLBoolean",{enumerable:!0,get:function(){return _type.GraphQLBoolean}}),Object.defineProperty(exports,"GraphQLID",{enumerable:!0,get:function(){return _type.GraphQLID}}),Object.defineProperty(exports,"specifiedDirectives",{enumerable:!0,get:function(){return _type.specifiedDirectives}}),Object.defineProperty(exports,"GraphQLIncludeDirective",{enumerable:!0,get:function(){return _type.GraphQLIncludeDirective}}),Object.defineProperty(exports,"GraphQLSkipDirective",{enumerable:!0,get:function(){return _type.GraphQLSkipDirective}}),Object.defineProperty(exports,"GraphQLDeprecatedDirective",{enumerable:!0,get:function(){return _type.GraphQLDeprecatedDirective}}),Object.defineProperty(exports,"DEFAULT_DEPRECATION_REASON",{enumerable:!0,get:function(){return _type.DEFAULT_DEPRECATION_REASON}}),Object.defineProperty(exports,"SchemaMetaFieldDef",{enumerable:!0,get:function(){return _type.SchemaMetaFieldDef}}),Object.defineProperty(exports,"TypeMetaFieldDef",{enumerable:!0,get:function(){return _type.TypeMetaFieldDef}}),Object.defineProperty(exports,"TypeNameMetaFieldDef",{enumerable:!0,get:function(){return _type.TypeNameMetaFieldDef}}),Object.defineProperty(exports,"introspectionTypes",{enumerable:!0,get:function(){return _type.introspectionTypes}}),Object.defineProperty(exports,"__Schema",{enumerable:!0,get:function(){return _type.__Schema}}),Object.defineProperty(exports,"__Directive",{enumerable:!0,get:function(){return _type.__Directive}}),Object.defineProperty(exports,"__DirectiveLocation",{enumerable:!0,get:function(){return _type.__DirectiveLocation}}),Object.defineProperty(exports,"__Type",{enumerable:!0,get:function(){return _type.__Type}}),Object.defineProperty(exports,"__Field",{enumerable:!0,get:function(){return _type.__Field}}),Object.defineProperty(exports,"__InputValue",{enumerable:!0,get:function(){return _type.__InputValue}}),Object.defineProperty(exports,"__EnumValue",{enumerable:!0,get:function(){return _type.__EnumValue}}),Object.defineProperty(exports,"__TypeKind",{enumerable:!0,get:function(){return _type.__TypeKind}}),Object.defineProperty(exports,"isSchema",{enumerable:!0,get:function(){return _type.isSchema}}),Object.defineProperty(exports,"isDirective",{enumerable:!0,get:function(){return _type.isDirective}}),Object.defineProperty(exports,"isType",{enumerable:!0,get:function(){return _type.isType}}),Object.defineProperty(exports,"isScalarType",{enumerable:!0,get:function(){return _type.isScalarType}}),Object.defineProperty(exports,"isObjectType",{enumerable:!0,get:function(){return _type.isObjectType}}),Object.defineProperty(exports,"isInterfaceType",{enumerable:!0,get:function(){return _type.isInterfaceType}}),Object.defineProperty(exports,"isUnionType",{enumerable:!0,get:function(){return _type.isUnionType}}),Object.defineProperty(exports,"isEnumType",{enumerable:!0,get:function(){return _type.isEnumType}}),Object.defineProperty(exports,"isInputObjectType",{enumerable:!0,get:function(){return _type.isInputObjectType}}),Object.defineProperty(exports,"isListType",{enumerable:!0,get:function(){return _type.isListType}}),Object.defineProperty(exports,"isNonNullType",{enumerable:!0,get:function(){return _type.isNonNullType}}),Object.defineProperty(exports,"isInputType",{enumerable:!0,get:function(){return _type.isInputType}}),Object.defineProperty(exports,"isOutputType",{enumerable:!0,get:function(){return _type.isOutputType}}),Object.defineProperty(exports,"isLeafType",{enumerable:!0,get:function(){return _type.isLeafType}}),Object.defineProperty(exports,"isCompositeType",{enumerable:!0,get:function(){return _type.isCompositeType}}),Object.defineProperty(exports,"isAbstractType",{enumerable:!0,get:function(){return _type.isAbstractType}}),Object.defineProperty(exports,"isWrappingType",{enumerable:!0,get:function(){return _type.isWrappingType}}),Object.defineProperty(exports,"isNullableType",{enumerable:!0,get:function(){return _type.isNullableType}}),Object.defineProperty(exports,"isNamedType",{enumerable:!0,get:function(){return _type.isNamedType}}),Object.defineProperty(exports,"isRequiredArgument",{enumerable:!0,get:function(){return _type.isRequiredArgument}}),Object.defineProperty(exports,"isRequiredInputField",{enumerable:!0,get:function(){return _type.isRequiredInputField}}),Object.defineProperty(exports,"isSpecifiedScalarType",{enumerable:!0,get:function(){return _type.isSpecifiedScalarType}}),Object.defineProperty(exports,"isIntrospectionType",{enumerable:!0,get:function(){return _type.isIntrospectionType}}),Object.defineProperty(exports,"isSpecifiedDirective",{enumerable:!0,get:function(){return _type.isSpecifiedDirective}}),Object.defineProperty(exports,"assertSchema",{enumerable:!0,get:function(){return _type.assertSchema}}),Object.defineProperty(exports,"assertDirective",{enumerable:!0,get:function(){return _type.assertDirective}}),Object.defineProperty(exports,"assertType",{enumerable:!0,get:function(){return _type.assertType}}),Object.defineProperty(exports,"assertScalarType",{enumerable:!0,get:function(){return _type.assertScalarType}}),Object.defineProperty(exports,"assertObjectType",{enumerable:!0,get:function(){return _type.assertObjectType}}),Object.defineProperty(exports,"assertInterfaceType",{enumerable:!0,get:function(){return _type.assertInterfaceType}}),Object.defineProperty(exports,"assertUnionType",{enumerable:!0,get:function(){return _type.assertUnionType}}),Object.defineProperty(exports,"assertEnumType",{enumerable:!0,get:function(){return _type.assertEnumType}}),Object.defineProperty(exports,"assertInputObjectType",{enumerable:!0,get:function(){return _type.assertInputObjectType}}),Object.defineProperty(exports,"assertListType",{enumerable:!0,get:function(){return _type.assertListType}}),Object.defineProperty(exports,"assertNonNullType",{enumerable:!0,get:function(){return _type.assertNonNullType}}),Object.defineProperty(exports,"assertInputType",{enumerable:!0,get:function(){return _type.assertInputType}}),Object.defineProperty(exports,"assertOutputType",{enumerable:!0,get:function(){return _type.assertOutputType}}),Object.defineProperty(exports,"assertLeafType",{enumerable:!0,get:function(){return _type.assertLeafType}}),Object.defineProperty(exports,"assertCompositeType",{enumerable:!0,get:function(){return _type.assertCompositeType}}),Object.defineProperty(exports,"assertAbstractType",{enumerable:!0,get:function(){return _type.assertAbstractType}}),Object.defineProperty(exports,"assertWrappingType",{enumerable:!0,get:function(){return _type.assertWrappingType}}),Object.defineProperty(exports,"assertNullableType",{enumerable:!0,get:function(){return _type.assertNullableType}}),Object.defineProperty(exports,"assertNamedType",{enumerable:!0,get:function(){return _type.assertNamedType}}),Object.defineProperty(exports,"getNullableType",{enumerable:!0,get:function(){return _type.getNullableType}}),Object.defineProperty(exports,"getNamedType",{enumerable:!0,get:function(){return _type.getNamedType}}),Object.defineProperty(exports,"validateSchema",{enumerable:!0,get:function(){return _type.validateSchema}}),Object.defineProperty(exports,"assertValidSchema",{enumerable:!0,get:function(){return _type.assertValidSchema}}),Object.defineProperty(exports,"Source",{enumerable:!0,get:function(){return _language.Source}}),Object.defineProperty(exports,"getLocation",{enumerable:!0,get:function(){return _language.getLocation}}),Object.defineProperty(exports,"parse",{enumerable:!0,get:function(){return _language.parse}}),Object.defineProperty(exports,"parseValue",{enumerable:!0,get:function(){return _language.parseValue}}),Object.defineProperty(exports,"parseType",{enumerable:!0,get:function(){return _language.parseType}}),Object.defineProperty(exports,"print",{enumerable:!0,get:function(){return _language.print}}),Object.defineProperty(exports,"visit",{enumerable:!0,get:function(){return _language.visit}}),Object.defineProperty(exports,"visitInParallel",{enumerable:!0,get:function(){return _language.visitInParallel}}),Object.defineProperty(exports,"visitWithTypeInfo",{enumerable:!0,get:function(){return _language.visitWithTypeInfo}}),Object.defineProperty(exports,"getVisitFn",{enumerable:!0,get:function(){return _language.getVisitFn}}),Object.defineProperty(exports,"Kind",{enumerable:!0,get:function(){return _language.Kind}}),Object.defineProperty(exports,"TokenKind",{enumerable:!0,get:function(){return _language.TokenKind}}),Object.defineProperty(exports,"DirectiveLocation",{enumerable:!0,get:function(){return _language.DirectiveLocation}}),Object.defineProperty(exports,"BREAK",{enumerable:!0,get:function(){return _language.BREAK}}),Object.defineProperty(exports,"isDefinitionNode",{enumerable:!0,get:function(){return _language.isDefinitionNode}}),Object.defineProperty(exports,"isExecutableDefinitionNode",{enumerable:!0,get:function(){return _language.isExecutableDefinitionNode}}),Object.defineProperty(exports,"isSelectionNode",{enumerable:!0,get:function(){return _language.isSelectionNode}}),Object.defineProperty(exports,"isValueNode",{enumerable:!0,get:function(){return _language.isValueNode}}),Object.defineProperty(exports,"isTypeNode",{enumerable:!0,get:function(){return _language.isTypeNode}}),Object.defineProperty(exports,"isTypeSystemDefinitionNode",{enumerable:!0,get:function(){return _language.isTypeSystemDefinitionNode}}),Object.defineProperty(exports,"isTypeDefinitionNode",{enumerable:!0,get:function(){return _language.isTypeDefinitionNode}}),Object.defineProperty(exports,"isTypeSystemExtensionNode",{enumerable:!0,get:function(){return _language.isTypeSystemExtensionNode}}),Object.defineProperty(exports,"isTypeExtensionNode",{enumerable:!0,get:function(){return _language.isTypeExtensionNode}}),Object.defineProperty(exports,"execute",{enumerable:!0,get:function(){return _execution.execute}}),Object.defineProperty(exports,"defaultFieldResolver",{enumerable:!0,get:function(){return _execution.defaultFieldResolver}}),Object.defineProperty(exports,"responsePathAsArray",{enumerable:!0,get:function(){return _execution.responsePathAsArray}}),Object.defineProperty(exports,"getDirectiveValues",{enumerable:!0,get:function(){return _execution.getDirectiveValues}}),Object.defineProperty(exports,"subscribe",{enumerable:!0,get:function(){return _subscription.subscribe}}),Object.defineProperty(exports,"createSourceEventStream",{enumerable:!0,get:function(){return _subscription.createSourceEventStream}}),Object.defineProperty(exports,"validate",{enumerable:!0,get:function(){return _validation.validate}}),Object.defineProperty(exports,"ValidationContext",{enumerable:!0,get:function(){return _validation.ValidationContext}}),Object.defineProperty(exports,"specifiedRules",{enumerable:!0,get:function(){return _validation.specifiedRules}}),Object.defineProperty(exports,"FieldsOnCorrectTypeRule",{enumerable:!0,get:function(){return _validation.FieldsOnCorrectTypeRule}}),Object.defineProperty(exports,"FragmentsOnCompositeTypesRule",{enumerable:!0,get:function(){return _validation.FragmentsOnCompositeTypesRule}}),Object.defineProperty(exports,"KnownArgumentNamesRule",{enumerable:!0,get:function(){return _validation.KnownArgumentNamesRule}}),Object.defineProperty(exports,"KnownDirectivesRule",{enumerable:!0,get:function(){return _validation.KnownDirectivesRule}}),Object.defineProperty(exports,"KnownFragmentNamesRule",{enumerable:!0,get:function(){return _validation.KnownFragmentNamesRule}}),Object.defineProperty(exports,"KnownTypeNamesRule",{enumerable:!0,get:function(){return _validation.KnownTypeNamesRule}}),Object.defineProperty(exports,"LoneAnonymousOperationRule",{enumerable:!0,get:function(){return _validation.LoneAnonymousOperationRule}}),Object.defineProperty(exports,"NoFragmentCyclesRule",{enumerable:!0,get:function(){return _validation.NoFragmentCyclesRule}}),Object.defineProperty(exports,"NoUndefinedVariablesRule",{enumerable:!0,get:function(){return _validation.NoUndefinedVariablesRule}}),Object.defineProperty(exports,"NoUnusedFragmentsRule",{enumerable:!0,get:function(){return _validation.NoUnusedFragmentsRule}}),Object.defineProperty(exports,"NoUnusedVariablesRule",{enumerable:!0,get:function(){return _validation.NoUnusedVariablesRule}}),Object.defineProperty(exports,"OverlappingFieldsCanBeMergedRule",{enumerable:!0,get:function(){return _validation.OverlappingFieldsCanBeMergedRule}}),Object.defineProperty(exports,"PossibleFragmentSpreadsRule",{enumerable:!0,get:function(){return _validation.PossibleFragmentSpreadsRule}}),Object.defineProperty(exports,"ProvidedRequiredArgumentsRule",{enumerable:!0,get:function(){return _validation.ProvidedRequiredArgumentsRule}}),Object.defineProperty(exports,"ScalarLeafsRule",{enumerable:!0,get:function(){return _validation.ScalarLeafsRule}}),Object.defineProperty(exports,"SingleFieldSubscriptionsRule",{enumerable:!0,get:function(){return _validation.SingleFieldSubscriptionsRule}}),Object.defineProperty(exports,"UniqueArgumentNamesRule",{enumerable:!0,get:function(){return _validation.UniqueArgumentNamesRule}}),Object.defineProperty(exports,"UniqueDirectivesPerLocationRule",{enumerable:!0,get:function(){return _validation.UniqueDirectivesPerLocationRule}}),Object.defineProperty(exports,"UniqueFragmentNamesRule",{enumerable:!0,get:function(){return _validation.UniqueFragmentNamesRule}}),Object.defineProperty(exports,"UniqueInputFieldNamesRule",{enumerable:!0,get:function(){return _validation.UniqueInputFieldNamesRule}}),Object.defineProperty(exports,"UniqueOperationNamesRule",{enumerable:!0,get:function(){return _validation.UniqueOperationNamesRule}}),Object.defineProperty(exports,"UniqueVariableNamesRule",{enumerable:!0,get:function(){return _validation.UniqueVariableNamesRule}}),Object.defineProperty(exports,"ValuesOfCorrectTypeRule",{enumerable:!0,get:function(){return _validation.ValuesOfCorrectTypeRule}}),Object.defineProperty(exports,"VariablesAreInputTypesRule",{enumerable:!0,get:function(){return _validation.VariablesAreInputTypesRule}}),Object.defineProperty(exports,"VariablesInAllowedPositionRule",{enumerable:!0,get:function(){return _validation.VariablesInAllowedPositionRule}}),Object.defineProperty(exports,"GraphQLError",{enumerable:!0,get:function(){return _error.GraphQLError}}),Object.defineProperty(exports,"formatError",{enumerable:!0,get:function(){return _error.formatError}}),Object.defineProperty(exports,"printError",{enumerable:!0,get:function(){return _error.printError}}),Object.defineProperty(exports,"getIntrospectionQuery",{enumerable:!0,get:function(){return _utilities.getIntrospectionQuery}}),Object.defineProperty(exports,"introspectionQuery",{enumerable:!0,get:function(){return _utilities.introspectionQuery}}),Object.defineProperty(exports,"getOperationAST",{enumerable:!0,get:function(){return _utilities.getOperationAST}}),Object.defineProperty(exports,"getOperationRootType",{enumerable:!0,get:function(){return _utilities.getOperationRootType}}),Object.defineProperty(exports,"introspectionFromSchema",{enumerable:!0,get:function(){return _utilities.introspectionFromSchema}}),Object.defineProperty(exports,"buildClientSchema",{enumerable:!0,get:function(){return _utilities.buildClientSchema}}),Object.defineProperty(exports,"buildASTSchema",{enumerable:!0,get:function(){return _utilities.buildASTSchema}}),Object.defineProperty(exports,"buildSchema",{enumerable:!0,get:function(){return _utilities.buildSchema}}),Object.defineProperty(exports,"getDescription",{enumerable:!0,get:function(){return _utilities.getDescription}}),Object.defineProperty(exports,"extendSchema",{enumerable:!0,get:function(){return _utilities.extendSchema}}),Object.defineProperty(exports,"lexicographicSortSchema",{enumerable:!0,get:function(){return _utilities.lexicographicSortSchema}}),Object.defineProperty(exports,"printSchema",{enumerable:!0,get:function(){return _utilities.printSchema}}),Object.defineProperty(exports,"printIntrospectionSchema",{enumerable:!0,get:function(){return _utilities.printIntrospectionSchema}}),Object.defineProperty(exports,"printType",{enumerable:!0,get:function(){return _utilities.printType}}),Object.defineProperty(exports,"typeFromAST",{enumerable:!0,get:function(){return _utilities.typeFromAST}}),Object.defineProperty(exports,"valueFromAST",{enumerable:!0,get:function(){return _utilities.valueFromAST}}),Object.defineProperty(exports,"valueFromASTUntyped",{enumerable:!0,get:function(){return _utilities.valueFromASTUntyped}}),Object.defineProperty(exports,"astFromValue",{enumerable:!0,get:function(){return _utilities.astFromValue}}),Object.defineProperty(exports,"TypeInfo",{enumerable:!0,get:function(){return _utilities.TypeInfo}}),Object.defineProperty(exports,"coerceValue",{enumerable:!0,get:function(){return _utilities.coerceValue}}),Object.defineProperty(exports,"isValidJSValue",{enumerable:!0,get:function(){return _utilities.isValidJSValue}}),Object.defineProperty(exports,"isValidLiteralValue",{enumerable:!0,get:function(){return _utilities.isValidLiteralValue}}),Object.defineProperty(exports,"concatAST",{enumerable:!0,get:function(){return _utilities.concatAST}}),Object.defineProperty(exports,"separateOperations",{enumerable:!0,get:function(){return _utilities.separateOperations}}),Object.defineProperty(exports,"isEqualType",{enumerable:!0,get:function(){return _utilities.isEqualType}}),Object.defineProperty(exports,"isTypeSubTypeOf",{enumerable:!0,get:function(){return _utilities.isTypeSubTypeOf}}),Object.defineProperty(exports,"doTypesOverlap",{enumerable:!0,get:function(){return _utilities.doTypesOverlap}}),Object.defineProperty(exports,"assertValidName",{enumerable:!0,get:function(){return _utilities.assertValidName}}),Object.defineProperty(exports,"isValidNameError",{enumerable:!0,get:function(){return _utilities.isValidNameError}}),Object.defineProperty(exports,"findBreakingChanges",{enumerable:!0,get:function(){return _utilities.findBreakingChanges}}),Object.defineProperty(exports,"findDangerousChanges",{enumerable:!0,get:function(){return _utilities.findDangerousChanges}}),Object.defineProperty(exports,"BreakingChangeType",{enumerable:!0,get:function(){return _utilities.BreakingChangeType}}),Object.defineProperty(exports,"DangerousChangeType",{enumerable:!0,get:function(){return _utilities.DangerousChangeType}}),Object.defineProperty(exports,"findDeprecatedUsages",{enumerable:!0,get:function(){return _utilities.findDeprecatedUsages}});var _graphql=require("./graphql"),_type=require("./type"),_language=require("./language"),_execution=require("./execution"),_subscription=require("./subscription"),_validation=require("./validation"),_error=require("./error"),_utilities=require("./utilities")},{"./error":90,"./execution":95,"./graphql":97,"./language":119,"./subscription":133,"./type":138,"./utilities":155,"./validation":168}],99:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(classObject){var fn=arguments.length>1&&void 0!==arguments[1]?arguments[1]:classObject.prototype.toString;classObject.prototype.toJSON=fn,classObject.prototype.inspect=fn,_nodejsCustomInspectSymbol.default&&(classObject.prototype[_nodejsCustomInspectSymbol.default]=fn)};var _nodejsCustomInspectSymbol=function(obj){return obj&&obj.__esModule?obj:{default:obj}}(require("./nodejsCustomInspectSymbol"))},{"./nodejsCustomInspectSymbol":111}],100:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(classObject){"function"==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(classObject.prototype,Symbol.toStringTag,{get:function(){return this.constructor.name}})}},{}],101:[function(require,module,exports){"use strict";function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}function inspect(value){switch(_typeof(value)){case"string":return JSON.stringify(value);case"function":return value.name?"[function ".concat(value.name,"]"):"[function]";case"object":if(value){var customInspectFn=getCustomFn(value);if(customInspectFn){var customValue=customInspectFn.call(value);return"string"==typeof customValue?customValue:inspect(customValue)}if(Array.isArray(value))return"["+value.map(inspect).join(", ")+"]";var properties=Object.keys(value).map(function(k){return"".concat(k,": ").concat(inspect(value[k]))}).join(", ");return properties?"{ "+properties+" }":"{}"}return String(value);default:return String(value)}}function getCustomFn(object){var customInspectFn=object[String(_nodejsCustomInspectSymbol.default)];return"function"==typeof customInspectFn?customInspectFn:"function"==typeof object.inspect?object.inspect:void 0}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=inspect;var _nodejsCustomInspectSymbol=function(obj){return obj&&obj.__esModule?obj:{default:obj}}(require("./nodejsCustomInspectSymbol"))},{"./nodejsCustomInspectSymbol":111}],102:[function(require,module,exports){(function(process){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _default="production"===process.env.NODE_ENV?function(value,constructor){return value instanceof constructor}:function(value,constructor){if(value instanceof constructor)return!0;if(value){var valueClass=value.constructor,className=constructor.name;if(className&&valueClass&&valueClass.name===className)throw new Error("Cannot use ".concat(className,' "').concat(value,'" from another module or realm.\n\nEnsure that there is only one instance of "graphql" in the node_modules\ndirectory. If different versions of "graphql" are the dependencies of other\nrelied on modules, use "resolutions" to ensure only one version is installed.\n\nhttps://yarnpkg.com/en/docs/selective-version-resolutions\n\nDuplicate "graphql" modules cannot be used at the same time since different\nversions may have different capabilities and behavior. The data from one\nversion used in the function from another could produce confusing and\nspurious results.'))}return!1};exports.default=_default}).call(this,require("_process"))},{_process:264}],103:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(condition,message){if(!condition)throw new Error(message)}},{}],104:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(value){return void 0===value||value!==value}},{}],105:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(value){return null===value||void 0===value||value!==value}},{}],106:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(value){return Boolean(value&&"function"==typeof value.then)}},{}],107:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(list,keyFn){return list.reduce(function(map,item){return map[keyFn(item)]=item,map},Object.create(null))}},{}],108:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(list,keyFn,valFn){return list.reduce(function(map,item){return map[keyFn(item)]=valFn(item),map},Object.create(null))}},{}],109:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(map,fn){var result=Object.create(null),_iteratorNormalCompletion=!0,_didIteratorError=!1,_iteratorError=void 0;try{for(var _step,_iterator=(0,_objectEntries.default)(map)[Symbol.iterator]();!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=!0){var _ref2=_step.value,_key=_ref2[0],_value=_ref2[1];result[_key]=fn(_value,_key)}}catch(err){_didIteratorError=!0,_iteratorError=err}finally{try{_iteratorNormalCompletion||null==_iterator.return||_iterator.return()}finally{if(_didIteratorError)throw _iteratorError}}return result};var _objectEntries=function(obj){return obj&&obj.__esModule?obj:{default:obj}}(require("../polyfills/objectEntries"))},{"../polyfills/objectEntries":131}],110:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(fn){var cache0;return function(a1,a2,a3){cache0||(cache0=new WeakMap);var cache2,cache1=cache0.get(a1);if(cache1){if(cache2=cache1.get(a2)){var cachedValue=cache2.get(a3);if(void 0!==cachedValue)return cachedValue}}else cache1=new WeakMap,cache0.set(a1,cache1);cache2||(cache2=new WeakMap,cache1.set(a2,cache2));var newValue=fn.apply(this,arguments);return cache2.set(a3,newValue),newValue}}},{}],111:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _default="function"==typeof Symbol?Symbol.for("nodejs.util.inspect.custom"):void 0;exports.default=_default},{}],112:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(items){if(0===items.length&&(0,_invariant.default)(0),1===items.length)return items[0];if(2===items.length)return items[0]+" or "+items[1];var selected=items.slice(0,MAX_LENGTH),lastItem=selected.pop();return selected.join(", ")+", or "+lastItem};var _invariant=function(obj){return obj&&obj.__esModule?obj:{default:obj}}(require("./invariant")),MAX_LENGTH=5},{"./invariant":103}],113:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(object){var keys=Object.keys(object),valuesAndPromises=keys.map(function(name){return object[name]});return Promise.all(valuesAndPromises).then(function(values){return values.reduce(function(resolvedObject,value,i){return resolvedObject[keys[i]]=value,resolvedObject},Object.create(null))})}},{}],114:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(values,callback,initialValue){return values.reduce(function(previous,value){return(0,_isPromise.default)(previous)?previous.then(function(resolved){return callback(resolved,value)}):callback(previous,value)},initialValue)};var _isPromise=function(obj){return obj&&obj.__esModule?obj:{default:obj}}(require("./isPromise"))},{"./isPromise":106}],115:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(items){return(0,_orList.default)(items.map(function(item){return'"'.concat(item,'"')}))};var _orList=function(obj){return obj&&obj.__esModule?obj:{default:obj}}(require("./orList"))},{"./orList":112}],116:[function(require,module,exports){"use strict";function lexicalDistance(aStr,bStr){if(aStr===bStr)return 0;var i,j,d=[],a=aStr.toLowerCase(),b=bStr.toLowerCase(),aLength=a.length,bLength=b.length;if(a===b)return 1;for(i=0;i<=aLength;i++)d[i]=[i];for(j=1;j<=bLength;j++)d[0][j]=j;for(i=1;i<=aLength;i++)for(j=1;j<=bLength;j++){var cost=a[i-1]===b[j-1]?0:1;d[i][j]=Math.min(d[i-1][j]+1,d[i][j-1]+1,d[i-1][j-1]+cost),i>1&&j>1&&a[i-1]===b[j-2]&&a[i-2]===b[j-1]&&(d[i][j]=Math.min(d[i][j],d[i-2][j-2]+cost))}return d[aLength][bLength]}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(input,options){for(var optionsByDistance=Object.create(null),oLength=options.length,inputThreshold=input.length/2,i=0;i0&&isBlank(lines[0]);)lines.shift();for(;lines.length>0&&isBlank(lines[lines.length-1]);)lines.pop();return lines.join("\n")}},{}],118:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.DirectiveLocation=void 0;var DirectiveLocation=Object.freeze({QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",VARIABLE_DEFINITION:"VARIABLE_DEFINITION",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION"});exports.DirectiveLocation=DirectiveLocation},{}],119:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"getLocation",{enumerable:!0,get:function(){return _location.getLocation}}),Object.defineProperty(exports,"Kind",{enumerable:!0,get:function(){return _kinds.Kind}}),Object.defineProperty(exports,"createLexer",{enumerable:!0,get:function(){return _lexer.createLexer}}),Object.defineProperty(exports,"TokenKind",{enumerable:!0,get:function(){return _lexer.TokenKind}}),Object.defineProperty(exports,"parse",{enumerable:!0,get:function(){return _parser.parse}}),Object.defineProperty(exports,"parseValue",{enumerable:!0,get:function(){return _parser.parseValue}}),Object.defineProperty(exports,"parseType",{enumerable:!0,get:function(){return _parser.parseType}}),Object.defineProperty(exports,"print",{enumerable:!0,get:function(){return _printer.print}}),Object.defineProperty(exports,"Source",{enumerable:!0,get:function(){return _source.Source}}),Object.defineProperty(exports,"visit",{enumerable:!0,get:function(){return _visitor.visit}}),Object.defineProperty(exports,"visitInParallel",{enumerable:!0,get:function(){return _visitor.visitInParallel}}),Object.defineProperty(exports,"visitWithTypeInfo",{enumerable:!0,get:function(){return _visitor.visitWithTypeInfo}}),Object.defineProperty(exports,"getVisitFn",{enumerable:!0,get:function(){return _visitor.getVisitFn}}),Object.defineProperty(exports,"BREAK",{enumerable:!0,get:function(){return _visitor.BREAK}}),Object.defineProperty(exports,"isDefinitionNode",{enumerable:!0,get:function(){return _predicates.isDefinitionNode}}),Object.defineProperty(exports,"isExecutableDefinitionNode",{enumerable:!0,get:function(){return _predicates.isExecutableDefinitionNode}}),Object.defineProperty(exports,"isSelectionNode",{enumerable:!0,get:function(){return _predicates.isSelectionNode}}),Object.defineProperty(exports,"isValueNode",{enumerable:!0,get:function(){return _predicates.isValueNode}}),Object.defineProperty(exports,"isTypeNode",{enumerable:!0,get:function(){return _predicates.isTypeNode}}),Object.defineProperty(exports,"isTypeSystemDefinitionNode",{enumerable:!0,get:function(){return _predicates.isTypeSystemDefinitionNode}}),Object.defineProperty(exports,"isTypeDefinitionNode",{enumerable:!0,get:function(){return _predicates.isTypeDefinitionNode}}),Object.defineProperty(exports,"isTypeSystemExtensionNode",{enumerable:!0,get:function(){return _predicates.isTypeSystemExtensionNode}}),Object.defineProperty(exports,"isTypeExtensionNode",{enumerable:!0,get:function(){return _predicates.isTypeExtensionNode}}),Object.defineProperty(exports,"DirectiveLocation",{enumerable:!0,get:function(){return _directiveLocation.DirectiveLocation}});var _location=require("./location"),_kinds=require("./kinds"),_lexer=require("./lexer"),_parser=require("./parser"),_printer=require("./printer"),_source=require("./source"),_visitor=require("./visitor"),_predicates=require("./predicates"),_directiveLocation=require("./directiveLocation")},{"./directiveLocation":118,"./kinds":120,"./lexer":121,"./location":122,"./parser":123,"./predicates":124,"./printer":125,"./source":126,"./visitor":127}],120:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Kind=void 0;var Kind=Object.freeze({NAME:"Name",DOCUMENT:"Document",OPERATION_DEFINITION:"OperationDefinition",VARIABLE_DEFINITION:"VariableDefinition",SELECTION_SET:"SelectionSet",FIELD:"Field",ARGUMENT:"Argument",FRAGMENT_SPREAD:"FragmentSpread",INLINE_FRAGMENT:"InlineFragment",FRAGMENT_DEFINITION:"FragmentDefinition",VARIABLE:"Variable",INT:"IntValue",FLOAT:"FloatValue",STRING:"StringValue",BOOLEAN:"BooleanValue",NULL:"NullValue",ENUM:"EnumValue",LIST:"ListValue",OBJECT:"ObjectValue",OBJECT_FIELD:"ObjectField",DIRECTIVE:"Directive",NAMED_TYPE:"NamedType",LIST_TYPE:"ListType",NON_NULL_TYPE:"NonNullType",SCHEMA_DEFINITION:"SchemaDefinition",OPERATION_TYPE_DEFINITION:"OperationTypeDefinition",SCALAR_TYPE_DEFINITION:"ScalarTypeDefinition",OBJECT_TYPE_DEFINITION:"ObjectTypeDefinition",FIELD_DEFINITION:"FieldDefinition",INPUT_VALUE_DEFINITION:"InputValueDefinition",INTERFACE_TYPE_DEFINITION:"InterfaceTypeDefinition",UNION_TYPE_DEFINITION:"UnionTypeDefinition",ENUM_TYPE_DEFINITION:"EnumTypeDefinition",ENUM_VALUE_DEFINITION:"EnumValueDefinition",INPUT_OBJECT_TYPE_DEFINITION:"InputObjectTypeDefinition",DIRECTIVE_DEFINITION:"DirectiveDefinition",SCHEMA_EXTENSION:"SchemaExtension",SCALAR_TYPE_EXTENSION:"ScalarTypeExtension",OBJECT_TYPE_EXTENSION:"ObjectTypeExtension",INTERFACE_TYPE_EXTENSION:"InterfaceTypeExtension",UNION_TYPE_EXTENSION:"UnionTypeExtension",ENUM_TYPE_EXTENSION:"EnumTypeExtension",INPUT_OBJECT_TYPE_EXTENSION:"InputObjectTypeExtension"});exports.Kind=Kind},{}],121:[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function advanceLexer(){return this.lastToken=this.token,this.token=this.lookahead()}function lookahead(){var token=this.token;if(token.kind!==TokenKind.EOF)do{token=token.next||(token.next=readToken(this,token))}while(token.kind===TokenKind.COMMENT);return token}function Tok(kind,start,end,line,column,prev,value){this.kind=kind,this.start=start,this.end=end,this.line=line,this.column=column,this.value=value,this.prev=prev,this.next=null}function printCharCode(code){return isNaN(code)?TokenKind.EOF:code<127?JSON.stringify(String.fromCharCode(code)):'"\\u'.concat(("00"+code.toString(16).toUpperCase()).slice(-4),'"')}function readToken(lexer,prev){var source=lexer.source,body=source.body,bodyLength=body.length,pos=positionAfterWhitespace(body,prev.end,lexer),line=lexer.line,col=1+pos-lexer.lineStart;if(pos>=bodyLength)return new Tok(TokenKind.EOF,bodyLength,bodyLength,line,col,prev);var code=charCodeAt.call(body,pos);switch(code){case 33:return new Tok(TokenKind.BANG,pos,pos+1,line,col,prev);case 35:return readComment(source,pos,line,col,prev);case 36:return new Tok(TokenKind.DOLLAR,pos,pos+1,line,col,prev);case 38:return new Tok(TokenKind.AMP,pos,pos+1,line,col,prev);case 40:return new Tok(TokenKind.PAREN_L,pos,pos+1,line,col,prev);case 41:return new Tok(TokenKind.PAREN_R,pos,pos+1,line,col,prev);case 46:if(46===charCodeAt.call(body,pos+1)&&46===charCodeAt.call(body,pos+2))return new Tok(TokenKind.SPREAD,pos,pos+3,line,col,prev);break;case 58:return new Tok(TokenKind.COLON,pos,pos+1,line,col,prev);case 61:return new Tok(TokenKind.EQUALS,pos,pos+1,line,col,prev);case 64:return new Tok(TokenKind.AT,pos,pos+1,line,col,prev);case 91:return new Tok(TokenKind.BRACKET_L,pos,pos+1,line,col,prev);case 93:return new Tok(TokenKind.BRACKET_R,pos,pos+1,line,col,prev);case 123:return new Tok(TokenKind.BRACE_L,pos,pos+1,line,col,prev);case 124:return new Tok(TokenKind.PIPE,pos,pos+1,line,col,prev);case 125:return new Tok(TokenKind.BRACE_R,pos,pos+1,line,col,prev);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 readName(source,pos,line,col,prev);case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return readNumber(source,pos,code,line,col,prev);case 34:return 34===charCodeAt.call(body,pos+1)&&34===charCodeAt.call(body,pos+2)?readBlockString(source,pos,line,col,prev,lexer):readString(source,pos,line,col,prev)}throw(0,_error.syntaxError)(source,pos,unexpectedCharacterMessage(code))}function unexpectedCharacterMessage(code){return code<32&&9!==code&&10!==code&&13!==code?"Cannot contain the invalid character ".concat(printCharCode(code),"."):39===code?"Unexpected single quote character ('), did you mean to use a double quote (\")?":"Cannot parse the unexpected character ".concat(printCharCode(code),".")}function positionAfterWhitespace(body,startPosition,lexer){for(var bodyLength=body.length,position=startPosition;position31||9===code));return new Tok(TokenKind.COMMENT,start,position,line,col,prev,slice.call(body,start+1,position))}function readNumber(source,start,firstCode,line,col,prev){var body=source.body,code=firstCode,position=start,isFloat=!1;if(45===code&&(code=charCodeAt.call(body,++position)),48===code){if((code=charCodeAt.call(body,++position))>=48&&code<=57)throw(0,_error.syntaxError)(source,position,"Invalid number, unexpected digit after 0: ".concat(printCharCode(code),"."))}else position=readDigits(source,position,code),code=charCodeAt.call(body,position);return 46===code&&(isFloat=!0,code=charCodeAt.call(body,++position),position=readDigits(source,position,code),code=charCodeAt.call(body,position)),69!==code&&101!==code||(isFloat=!0,43!==(code=charCodeAt.call(body,++position))&&45!==code||(code=charCodeAt.call(body,++position)),position=readDigits(source,position,code)),new Tok(isFloat?TokenKind.FLOAT:TokenKind.INT,start,position,line,col,prev,slice.call(body,start,position))}function readDigits(source,start,firstCode){var body=source.body,position=start,code=firstCode;if(code>=48&&code<=57){do{code=charCodeAt.call(body,++position)}while(code>=48&&code<=57);return position}throw(0,_error.syntaxError)(source,position,"Invalid number, expected digit but got: ".concat(printCharCode(code),"."))}function readString(source,start,line,col,prev){for(var body=source.body,position=start+1,chunkStart=position,code=0,value="";position=48&&a<=57?a-48:a>=65&&a<=70?a-55:a>=97&&a<=102?a-87:-1}function readName(source,start,line,col,prev){for(var body=source.body,bodyLength=body.length,position=start+1,code=0;position!==bodyLength&&null!==(code=charCodeAt.call(body,position))&&(95===code||code>=48&&code<=57||code>=65&&code<=90||code>=97&&code<=122);)++position;return new Tok(TokenKind.NAME,start,position,line,col,prev,slice.call(body,start,position))}Object.defineProperty(exports,"__esModule",{value:!0}),exports.createLexer=function(source,options){var startOfFileToken=new Tok(TokenKind.SOF,0,0,0,0,null);return{source:source,options:options,lastToken:startOfFileToken,token:startOfFileToken,line:1,lineStart:0,advance:advanceLexer,lookahead:lookahead}},exports.getTokenDesc=function(token){var value=token.value;return value?"".concat(token.kind,' "').concat(value,'"'):token.kind},exports.TokenKind=void 0;var _defineToJSON=_interopRequireDefault(require("../jsutils/defineToJSON")),_error=require("../error"),_blockStringValue=_interopRequireDefault(require("./blockStringValue")),TokenKind=Object.freeze({SOF:"",EOF:"",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"});exports.TokenKind=TokenKind;var charCodeAt=String.prototype.charCodeAt,slice=String.prototype.slice;(0,_defineToJSON.default)(Tok,function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}})},{"../error":90,"../jsutils/defineToJSON":99,"./blockStringValue":117}],122:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getLocation=function(source,position){for(var match,lineRegexp=/\r\n|[\n\r]/g,line=1,column=position+1;(match=lineRegexp.exec(source.body))&&match.index0||(0,_invariant.default)(0,"line in locationOffset is 1-indexed and must be positive"),this.locationOffset.column>0||(0,_invariant.default)(0,"column in locationOffset is 1-indexed and must be positive")};exports.Source=Source,(0,_defineToStringTag.default)(Source)},{"../jsutils/defineToStringTag":100,"../jsutils/invariant":103}],127:[function(require,module,exports){"use strict";function isNode(maybeNode){return Boolean(maybeNode&&"string"==typeof maybeNode.kind)}function getVisitFn(visitor,kind,isLeaving){var kindVisitor=visitor[kind];if(kindVisitor){if(!isLeaving&&"function"==typeof kindVisitor)return kindVisitor;var kindSpecificVisitor=isLeaving?kindVisitor.leave:kindVisitor.enter;if("function"==typeof kindSpecificVisitor)return kindSpecificVisitor}else{var specificVisitor=isLeaving?visitor.leave:visitor.enter;if(specificVisitor){if("function"==typeof specificVisitor)return specificVisitor;var specificKindVisitor=specificVisitor[kind];if("function"==typeof specificKindVisitor)return specificKindVisitor}}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.visit=function(root,visitor){var visitorKeys=arguments.length>2&&void 0!==arguments[2]?arguments[2]:QueryDocumentKeys,stack=void 0,inArray=Array.isArray(root),keys=[root],index=-1,edits=[],node=void 0,key=void 0,parent=void 0,path=[],ancestors=[],newRoot=root;do{var isLeaving=++index===keys.length,isEdited=isLeaving&&0!==edits.length;if(isLeaving){if(key=0===ancestors.length?void 0:path[path.length-1],node=parent,parent=ancestors.pop(),isEdited){if(inArray)node=node.slice();else{for(var clone={},_arr=Object.keys(node),_i=0;_i<_arr.length;_i++){var k=_arr[_i];clone[k]=node[k]}node=clone}for(var editOffset=0,ii=0;iiMAX_INT||numMAX_INT||value=MIN_INT)return num}}});exports.GraphQLInt=GraphQLInt;var GraphQLFloat=new _definition.GraphQLScalarType({name:"Float",description:"The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point). ",serialize:function(value){if("boolean"==typeof value)return value?1:0;var num=value;if("string"==typeof value&&""!==value&&(num=Number(value)),!(0,_isFinite.default)(num))throw new TypeError("Float cannot represent non numeric value: ".concat((0,_inspect.default)(value)));return num},parseValue:function(value){if(!(0,_isFinite.default)(value))throw new TypeError("Float cannot represent non numeric value: ".concat((0,_inspect.default)(value)));return value},parseLiteral:function(ast){return ast.kind===_kinds.Kind.FLOAT||ast.kind===_kinds.Kind.INT?parseFloat(ast.value):void 0}});exports.GraphQLFloat=GraphQLFloat;var GraphQLString=new _definition.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:function(rawValue){var value=serializeObject(rawValue);if("string"==typeof value)return value;if("boolean"==typeof value)return value?"true":"false";if((0,_isFinite.default)(value))return value.toString();throw new TypeError("String cannot represent value: ".concat((0,_inspect.default)(rawValue)))},parseValue:function(value){if("string"!=typeof value)throw new TypeError("String cannot represent a non string value: ".concat((0,_inspect.default)(value)));return value},parseLiteral:function(ast){return ast.kind===_kinds.Kind.STRING?ast.value:void 0}});exports.GraphQLString=GraphQLString;var GraphQLBoolean=new _definition.GraphQLScalarType({name:"Boolean",description:"The `Boolean` scalar type represents `true` or `false`.",serialize:function(value){if("boolean"==typeof value)return value;if((0,_isFinite.default)(value))return 0!==value;throw new TypeError("Boolean cannot represent a non boolean value: ".concat((0,_inspect.default)(value)))},parseValue:function(value){if("boolean"!=typeof value)throw new TypeError("Boolean cannot represent a non boolean value: ".concat((0,_inspect.default)(value)));return value},parseLiteral:function(ast){return ast.kind===_kinds.Kind.BOOLEAN?ast.value:void 0}});exports.GraphQLBoolean=GraphQLBoolean;var GraphQLID=new _definition.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:function(rawValue){var value=serializeObject(rawValue);if("string"==typeof value)return value;if((0,_isInteger.default)(value))return String(value);throw new TypeError("ID cannot represent value: ".concat((0,_inspect.default)(rawValue)))},parseValue:function(value){if("string"==typeof value)return value;if((0,_isInteger.default)(value))return value.toString();throw new TypeError("ID cannot represent value: ".concat((0,_inspect.default)(value)))},parseLiteral:function(ast){return ast.kind===_kinds.Kind.STRING||ast.kind===_kinds.Kind.INT?ast.value:void 0}});exports.GraphQLID=GraphQLID;var specifiedScalarTypes=[GraphQLString,GraphQLInt,GraphQLFloat,GraphQLBoolean,GraphQLID];exports.specifiedScalarTypes=specifiedScalarTypes},{"../jsutils/inspect":101,"../language/kinds":120,"../polyfills/isFinite":129,"../polyfills/isInteger":130,"./definition":136}],141:[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}function isSchema(schema){return(0,_instanceOf.default)(schema,GraphQLSchema)}function typeMapReducer(map,type){if(!type)return map;if((0,_definition.isWrappingType)(type))return typeMapReducer(map,type.ofType);if(map[type.name])return map[type.name]!==type&&(0,_invariant.default)(0,"Schema must contain unique named types but contains multiple "+'types named "'.concat(type.name,'".')),map;map[type.name]=type;var reducedMap=map;if((0,_definition.isUnionType)(type)&&(reducedMap=type.getTypes().reduce(typeMapReducer,reducedMap)),(0,_definition.isObjectType)(type)&&(reducedMap=type.getInterfaces().reduce(typeMapReducer,reducedMap)),(0,_definition.isObjectType)(type)||(0,_definition.isInterfaceType)(type)){var _iteratorNormalCompletion3=!0,_didIteratorError3=!1,_iteratorError3=void 0;try{for(var _step3,_iterator3=(0,_objectValues.default)(type.getFields())[Symbol.iterator]();!(_iteratorNormalCompletion3=(_step3=_iterator3.next()).done);_iteratorNormalCompletion3=!0){var field=_step3.value;field.args&&(reducedMap=field.args.map(function(arg){return arg.type}).reduce(typeMapReducer,reducedMap)),reducedMap=typeMapReducer(reducedMap,field.type)}}catch(err){_didIteratorError3=!0,_iteratorError3=err}finally{try{_iteratorNormalCompletion3||null==_iterator3.return||_iterator3.return()}finally{if(_didIteratorError3)throw _iteratorError3}}}if((0,_definition.isInputObjectType)(type)){var _iteratorNormalCompletion4=!0,_didIteratorError4=!1,_iteratorError4=void 0;try{for(var _step4,_iterator4=(0,_objectValues.default)(type.getFields())[Symbol.iterator]();!(_iteratorNormalCompletion4=(_step4=_iterator4.next()).done);_iteratorNormalCompletion4=!0)reducedMap=typeMapReducer(reducedMap,_step4.value.type)}catch(err){_didIteratorError4=!0,_iteratorError4=err}finally{try{_iteratorNormalCompletion4||null==_iterator4.return||_iterator4.return()}finally{if(_didIteratorError4)throw _iteratorError4}}}return reducedMap}function typeMapDirectiveReducer(map,directive){return(0,_directives.isDirective)(directive)?directive.args.reduce(function(_map,arg){return typeMapReducer(_map,arg.type)},map):map}Object.defineProperty(exports,"__esModule",{value:!0}),exports.isSchema=isSchema,exports.assertSchema=function(schema){return isSchema(schema)||(0,_invariant.default)(0,"Expected ".concat((0,_inspect.default)(schema)," to be a GraphQL schema.")),schema},exports.GraphQLSchema=void 0;var _find=_interopRequireDefault(require("../polyfills/find")),_objectValues=_interopRequireDefault(require("../polyfills/objectValues")),_definition=require("./definition"),_directives=require("./directives"),_inspect=_interopRequireDefault(require("../jsutils/inspect")),_introspection=require("./introspection"),_defineToStringTag=_interopRequireDefault(require("../jsutils/defineToStringTag")),_instanceOf=_interopRequireDefault(require("../jsutils/instanceOf")),_invariant=_interopRequireDefault(require("../jsutils/invariant")),GraphQLSchema=function(){function GraphQLSchema(config){config&&config.assumeValid?this.__validationErrors=[]:(this.__validationErrors=void 0,"object"!==_typeof(config)&&(0,_invariant.default)(0,"Must provide configuration object."),config.types&&!Array.isArray(config.types)&&(0,_invariant.default)(0,'"types" must be Array if provided but got: '.concat((0,_inspect.default)(config.types),".")),config.directives&&!Array.isArray(config.directives)&&(0,_invariant.default)(0,'"directives" must be Array if provided but got: '+"".concat((0,_inspect.default)(config.directives),".")),config.allowedLegacyNames&&!Array.isArray(config.allowedLegacyNames)&&(0,_invariant.default)(0,'"allowedLegacyNames" must be Array if provided but got: '+"".concat((0,_inspect.default)(config.allowedLegacyNames),"."))),this.__allowedLegacyNames=config.allowedLegacyNames||[],this._queryType=config.query,this._mutationType=config.mutation,this._subscriptionType=config.subscription,this._directives=config.directives||_directives.specifiedDirectives,this.astNode=config.astNode,this.extensionASTNodes=config.extensionASTNodes;var initialTypes=[this.getQueryType(),this.getMutationType(),this.getSubscriptionType(),_introspection.__Schema],types=config.types;types&&(initialTypes=initialTypes.concat(types));var typeMap=Object.create(null);typeMap=initialTypes.reduce(typeMapReducer,typeMap),typeMap=this._directives.reduce(typeMapDirectiveReducer,typeMap),this._typeMap=typeMap,this._possibleTypeMap=Object.create(null),this._implementations=Object.create(null);var _iteratorNormalCompletion=!0,_didIteratorError=!1,_iteratorError=void 0;try{for(var _step,_iterator=(0,_objectValues.default)(this._typeMap)[Symbol.iterator]();!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=!0){var type=_step.value;if((0,_definition.isObjectType)(type)){var _iteratorNormalCompletion2=!0,_didIteratorError2=!1,_iteratorError2=void 0;try{for(var _step2,_iterator2=type.getInterfaces()[Symbol.iterator]();!(_iteratorNormalCompletion2=(_step2=_iterator2.next()).done);_iteratorNormalCompletion2=!0){var iface=_step2.value;if((0,_definition.isInterfaceType)(iface)){var impls=this._implementations[iface.name];impls?impls.push(type):this._implementations[iface.name]=[type]}}}catch(err){_didIteratorError2=!0,_iteratorError2=err}finally{try{_iteratorNormalCompletion2||null==_iterator2.return||_iterator2.return()}finally{if(_didIteratorError2)throw _iteratorError2}}}else(0,_definition.isAbstractType)(type)&&!this._implementations[type.name]&&(this._implementations[type.name]=[])}}catch(err){_didIteratorError=!0,_iteratorError=err}finally{try{_iteratorNormalCompletion||null==_iterator.return||_iterator.return()}finally{if(_didIteratorError)throw _iteratorError}}}var _proto=GraphQLSchema.prototype;return _proto.getQueryType=function(){return this._queryType},_proto.getMutationType=function(){return this._mutationType},_proto.getSubscriptionType=function(){return this._subscriptionType},_proto.getTypeMap=function(){return this._typeMap},_proto.getType=function(name){return this.getTypeMap()[name]},_proto.getPossibleTypes=function(abstractType){return(0,_definition.isUnionType)(abstractType)?abstractType.getTypes():this._implementations[abstractType.name]},_proto.isPossibleType=function(abstractType,possibleType){var possibleTypeMap=this._possibleTypeMap;if(!possibleTypeMap[abstractType.name]){var possibleTypes=this.getPossibleTypes(abstractType);possibleTypeMap[abstractType.name]=possibleTypes.reduce(function(map,type){return map[type.name]=!0,map},Object.create(null))}return Boolean(possibleTypeMap[abstractType.name][possibleType.name])},_proto.getDirectives=function(){return this._directives},_proto.getDirective=function(name){return(0,_find.default)(this.getDirectives(),function(directive){return directive.name===name})},GraphQLSchema}();exports.GraphQLSchema=GraphQLSchema,(0,_defineToStringTag.default)(GraphQLSchema)},{"../jsutils/defineToStringTag":100,"../jsutils/inspect":101,"../jsutils/instanceOf":102,"../jsutils/invariant":103,"../polyfills/find":128,"../polyfills/objectValues":132,"./definition":136,"./directives":137,"./introspection":139}],142:[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function validateSchema(schema){if((0,_schema.assertSchema)(schema),schema.__validationErrors)return schema.__validationErrors;var context=new SchemaValidationContext(schema);validateRootTypes(context),validateDirectives(context),validateTypes(context);var errors=context.getErrors();return schema.__validationErrors=errors,errors}function validateRootTypes(context){var schema=context.schema,queryType=schema.getQueryType();queryType?(0,_definition.isObjectType)(queryType)||context.reportError("Query root type must be Object type, it cannot be ".concat((0,_inspect.default)(queryType),"."),getOperationTypeNode(schema,queryType,"query")):context.reportError("Query root type must be provided.",schema.astNode);var mutationType=schema.getMutationType();mutationType&&!(0,_definition.isObjectType)(mutationType)&&context.reportError("Mutation root type must be Object type if provided, it cannot be "+"".concat((0,_inspect.default)(mutationType),"."),getOperationTypeNode(schema,mutationType,"mutation"));var subscriptionType=schema.getSubscriptionType();subscriptionType&&!(0,_definition.isObjectType)(subscriptionType)&&context.reportError("Subscription root type must be Object type if provided, it cannot be "+"".concat((0,_inspect.default)(subscriptionType),"."),getOperationTypeNode(schema,subscriptionType,"subscription"))}function getOperationTypeNode(schema,type,operation){var operationNodes=getAllSubNodes(schema,function(node){return node.operationTypes}),_iteratorNormalCompletion=!0,_didIteratorError=!1,_iteratorError=void 0;try{for(var _step,_iterator=operationNodes[Symbol.iterator]();!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=!0){var node=_step.value;if(node.operation===operation)return node.type}}catch(err){_didIteratorError=!0,_iteratorError=err}finally{try{_iteratorNormalCompletion||null==_iterator.return||_iterator.return()}finally{if(_didIteratorError)throw _iteratorError}}return type.astNode}function validateDirectives(context){var _iteratorNormalCompletion2=!0,_didIteratorError2=!1,_iteratorError2=void 0;try{for(var _step2,_iterator2=context.schema.getDirectives()[Symbol.iterator]();!(_iteratorNormalCompletion2=(_step2=_iterator2.next()).done);_iteratorNormalCompletion2=!0){var directive=_step2.value;if((0,_directives.isDirective)(directive)){validateName(context,directive);var argNames=Object.create(null),_iteratorNormalCompletion3=!0,_didIteratorError3=!1,_iteratorError3=void 0;try{for(var _step3,_iterator3=directive.args[Symbol.iterator]();!(_iteratorNormalCompletion3=(_step3=_iterator3.next()).done);_iteratorNormalCompletion3=!0){var arg=_step3.value,argName=arg.name;validateName(context,arg),argNames[argName]?context.reportError("Argument @".concat(directive.name,"(").concat(argName,":) can only be defined once."),getAllDirectiveArgNodes(directive,argName)):(argNames[argName]=!0,(0,_definition.isInputType)(arg.type)||context.reportError("The type of @".concat(directive.name,"(").concat(argName,":) must be Input Type ")+"but got: ".concat((0,_inspect.default)(arg.type),"."),getDirectiveArgTypeNode(directive,argName)))}}catch(err){_didIteratorError3=!0,_iteratorError3=err}finally{try{_iteratorNormalCompletion3||null==_iterator3.return||_iterator3.return()}finally{if(_didIteratorError3)throw _iteratorError3}}}else context.reportError("Expected directive but got: ".concat((0,_inspect.default)(directive),"."),directive&&directive.astNode)}}catch(err){_didIteratorError2=!0,_iteratorError2=err}finally{try{_iteratorNormalCompletion2||null==_iterator2.return||_iterator2.return()}finally{if(_didIteratorError2)throw _iteratorError2}}}function validateName(context,node){if(-1===context.schema.__allowedLegacyNames.indexOf(node.name)){var error=(0,_assertValidName.isValidNameError)(node.name,node.astNode||void 0);error&&context.addError(error)}}function validateTypes(context){var typeMap=context.schema.getTypeMap(),_iteratorNormalCompletion4=!0,_didIteratorError4=!1,_iteratorError4=void 0;try{for(var _step4,_iterator4=(0,_objectValues.default)(typeMap)[Symbol.iterator]();!(_iteratorNormalCompletion4=(_step4=_iterator4.next()).done);_iteratorNormalCompletion4=!0){var type=_step4.value;(0,_definition.isNamedType)(type)?((0,_introspection.isIntrospectionType)(type)||validateName(context,type),(0,_definition.isObjectType)(type)?(validateFields(context,type),validateObjectInterfaces(context,type)):(0,_definition.isInterfaceType)(type)?validateFields(context,type):(0,_definition.isUnionType)(type)?validateUnionMembers(context,type):(0,_definition.isEnumType)(type)?validateEnumValues(context,type):(0,_definition.isInputObjectType)(type)&&validateInputFields(context,type)):context.reportError("Expected GraphQL named type but got: ".concat((0,_inspect.default)(type),"."),type&&type.astNode)}}catch(err){_didIteratorError4=!0,_iteratorError4=err}finally{try{_iteratorNormalCompletion4||null==_iterator4.return||_iterator4.return()}finally{if(_didIteratorError4)throw _iteratorError4}}}function validateFields(context,type){var fields=(0,_objectValues.default)(type.getFields());0===fields.length&&context.reportError("Type ".concat(type.name," must define one or more fields."),getAllNodes(type));var _iteratorNormalCompletion5=!0,_didIteratorError5=!1,_iteratorError5=void 0;try{for(var _step5,_iterator5=fields[Symbol.iterator]();!(_iteratorNormalCompletion5=(_step5=_iterator5.next()).done);_iteratorNormalCompletion5=!0){var field=_step5.value;validateName(context,field),(0,_definition.isOutputType)(field.type)||context.reportError("The type of ".concat(type.name,".").concat(field.name," must be Output Type ")+"but got: ".concat((0,_inspect.default)(field.type),"."),getFieldTypeNode(type,field.name));var argNames=Object.create(null),_iteratorNormalCompletion6=!0,_didIteratorError6=!1,_iteratorError6=void 0;try{for(var _step6,_iterator6=field.args[Symbol.iterator]();!(_iteratorNormalCompletion6=(_step6=_iterator6.next()).done);_iteratorNormalCompletion6=!0){var arg=_step6.value,argName=arg.name;validateName(context,arg),argNames[argName]&&context.reportError("Field argument ".concat(type.name,".").concat(field.name,"(").concat(argName,":) can only ")+"be defined once.",getAllFieldArgNodes(type,field.name,argName)),argNames[argName]=!0,(0,_definition.isInputType)(arg.type)||context.reportError("The type of ".concat(type.name,".").concat(field.name,"(").concat(argName,":) must be Input ")+"Type but got: ".concat((0,_inspect.default)(arg.type),"."),getFieldArgTypeNode(type,field.name,argName))}}catch(err){_didIteratorError6=!0,_iteratorError6=err}finally{try{_iteratorNormalCompletion6||null==_iterator6.return||_iterator6.return()}finally{if(_didIteratorError6)throw _iteratorError6}}}}catch(err){_didIteratorError5=!0,_iteratorError5=err}finally{try{_iteratorNormalCompletion5||null==_iterator5.return||_iterator5.return()}finally{if(_didIteratorError5)throw _iteratorError5}}}function validateObjectInterfaces(context,object){var implementedTypeNames=Object.create(null),_iteratorNormalCompletion7=!0,_didIteratorError7=!1,_iteratorError7=void 0;try{for(var _step7,_iterator7=object.getInterfaces()[Symbol.iterator]();!(_iteratorNormalCompletion7=(_step7=_iterator7.next()).done);_iteratorNormalCompletion7=!0){var iface=_step7.value;(0,_definition.isInterfaceType)(iface)?implementedTypeNames[iface.name]?context.reportError("Type ".concat(object.name," can only implement ").concat(iface.name," once."),getAllImplementsInterfaceNodes(object,iface)):(implementedTypeNames[iface.name]=!0,validateObjectImplementsInterface(context,object,iface)):context.reportError("Type ".concat((0,_inspect.default)(object)," must only implement Interface types, ")+"it cannot implement ".concat((0,_inspect.default)(iface),"."),getImplementsInterfaceNode(object,iface))}}catch(err){_didIteratorError7=!0,_iteratorError7=err}finally{try{_iteratorNormalCompletion7||null==_iterator7.return||_iterator7.return()}finally{if(_didIteratorError7)throw _iteratorError7}}}function validateObjectImplementsInterface(context,object,iface){var objectFieldMap=object.getFields(),ifaceFieldMap=iface.getFields(),_iteratorNormalCompletion8=!0,_didIteratorError8=!1,_iteratorError8=void 0;try{for(var _step8,_iterator8=(0,_objectEntries.default)(ifaceFieldMap)[Symbol.iterator]();!(_iteratorNormalCompletion8=(_step8=_iterator8.next()).done);_iteratorNormalCompletion8=!0){var _ref2=_step8.value,fieldName=_ref2[0],ifaceField=_ref2[1],objectField=objectFieldMap[fieldName];if(objectField){(0,_typeComparators.isTypeSubTypeOf)(context.schema,objectField.type,ifaceField.type)||context.reportError("Interface field ".concat(iface.name,".").concat(fieldName," expects type ")+"".concat((0,_inspect.default)(ifaceField.type)," but ").concat(object.name,".").concat(fieldName," ")+"is type ".concat((0,_inspect.default)(objectField.type),"."),[getFieldTypeNode(iface,fieldName),getFieldTypeNode(object,fieldName)]);var _iteratorNormalCompletion9=!0,_didIteratorError9=!1,_iteratorError9=void 0;try{for(var _step9,_iterator9=ifaceField.args[Symbol.iterator]();!(_iteratorNormalCompletion9=(_step9=_iterator9.next()).done);_iteratorNormalCompletion9=!0){(function(){var ifaceArg=_step9.value,argName=ifaceArg.name,objectArg=(0,_find.default)(objectField.args,function(arg){return arg.name===argName});if(!objectArg)return context.reportError("Interface field argument ".concat(iface.name,".").concat(fieldName,"(").concat(argName,":) ")+"expected but ".concat(object.name,".").concat(fieldName," does not provide it."),[getFieldArgNode(iface,fieldName,argName),getFieldNode(object,fieldName)]),"continue";(0,_typeComparators.isEqualType)(ifaceArg.type,objectArg.type)||context.reportError("Interface field argument ".concat(iface.name,".").concat(fieldName,"(").concat(argName,":) ")+"expects type ".concat((0,_inspect.default)(ifaceArg.type)," but ")+"".concat(object.name,".").concat(fieldName,"(").concat(argName,":) is type ")+"".concat((0,_inspect.default)(objectArg.type),"."),[getFieldArgTypeNode(iface,fieldName,argName),getFieldArgTypeNode(object,fieldName,argName)])})()}}catch(err){_didIteratorError9=!0,_iteratorError9=err}finally{try{_iteratorNormalCompletion9||null==_iterator9.return||_iterator9.return()}finally{if(_didIteratorError9)throw _iteratorError9}}var _iteratorNormalCompletion10=!0,_didIteratorError10=!1,_iteratorError10=void 0;try{for(var _step10,_iterator10=objectField.args[Symbol.iterator]();!(_iteratorNormalCompletion10=(_step10=_iterator10.next()).done);_iteratorNormalCompletion10=!0)!function(){var objectArg=_step10.value,argName=objectArg.name;!(0,_find.default)(ifaceField.args,function(arg){return arg.name===argName})&&(0,_definition.isRequiredArgument)(objectArg)&&context.reportError("Object field ".concat(object.name,".").concat(fieldName," includes required ")+"argument ".concat(argName," that is missing from the Interface field ")+"".concat(iface.name,".").concat(fieldName,"."),[getFieldArgNode(object,fieldName,argName),getFieldNode(iface,fieldName)])}()}catch(err){_didIteratorError10=!0,_iteratorError10=err}finally{try{_iteratorNormalCompletion10||null==_iterator10.return||_iterator10.return()}finally{if(_didIteratorError10)throw _iteratorError10}}}else context.reportError("Interface field ".concat(iface.name,".").concat(fieldName," expected but ")+"".concat(object.name," does not provide it."),[getFieldNode(iface,fieldName)].concat(getAllNodes(object)))}}catch(err){_didIteratorError8=!0,_iteratorError8=err}finally{try{_iteratorNormalCompletion8||null==_iterator8.return||_iterator8.return()}finally{if(_didIteratorError8)throw _iteratorError8}}}function validateUnionMembers(context,union){var memberTypes=union.getTypes();0===memberTypes.length&&context.reportError("Union type ".concat(union.name," must define one or more member types."),getAllNodes(union));var includedTypeNames=Object.create(null),_iteratorNormalCompletion11=!0,_didIteratorError11=!1,_iteratorError11=void 0;try{for(var _step11,_iterator11=memberTypes[Symbol.iterator]();!(_iteratorNormalCompletion11=(_step11=_iterator11.next()).done);_iteratorNormalCompletion11=!0){var memberType=_step11.value;includedTypeNames[memberType.name]?context.reportError("Union type ".concat(union.name," can only include type ")+"".concat(memberType.name," once."),getUnionMemberTypeNodes(union,memberType.name)):(includedTypeNames[memberType.name]=!0,(0,_definition.isObjectType)(memberType)||context.reportError("Union type ".concat(union.name," can only include Object types, ")+"it cannot include ".concat((0,_inspect.default)(memberType),"."),getUnionMemberTypeNodes(union,String(memberType))))}}catch(err){_didIteratorError11=!0,_iteratorError11=err}finally{try{_iteratorNormalCompletion11||null==_iterator11.return||_iterator11.return()}finally{if(_didIteratorError11)throw _iteratorError11}}}function validateEnumValues(context,enumType){var enumValues=enumType.getValues();0===enumValues.length&&context.reportError("Enum type ".concat(enumType.name," must define one or more values."),getAllNodes(enumType));var _iteratorNormalCompletion12=!0,_didIteratorError12=!1,_iteratorError12=void 0;try{for(var _step12,_iterator12=enumValues[Symbol.iterator]();!(_iteratorNormalCompletion12=(_step12=_iterator12.next()).done);_iteratorNormalCompletion12=!0){var enumValue=_step12.value,valueName=enumValue.name;validateName(context,enumValue),"true"!==valueName&&"false"!==valueName&&"null"!==valueName||context.reportError("Enum type ".concat(enumType.name," cannot include value: ").concat(valueName,"."),enumValue.astNode)}}catch(err){_didIteratorError12=!0,_iteratorError12=err}finally{try{_iteratorNormalCompletion12||null==_iterator12.return||_iterator12.return()}finally{if(_didIteratorError12)throw _iteratorError12}}}function validateInputFields(context,inputObj){var fields=(0,_objectValues.default)(inputObj.getFields());0===fields.length&&context.reportError("Input Object type ".concat(inputObj.name," must define one or more fields."),getAllNodes(inputObj));var _iteratorNormalCompletion13=!0,_didIteratorError13=!1,_iteratorError13=void 0;try{for(var _step13,_iterator13=fields[Symbol.iterator]();!(_iteratorNormalCompletion13=(_step13=_iterator13.next()).done);_iteratorNormalCompletion13=!0){var field=_step13.value;validateName(context,field),(0,_definition.isInputType)(field.type)||context.reportError("The type of ".concat(inputObj.name,".").concat(field.name," must be Input Type ")+"but got: ".concat((0,_inspect.default)(field.type),"."),field.astNode&&field.astNode.type)}}catch(err){_didIteratorError13=!0,_iteratorError13=err}finally{try{_iteratorNormalCompletion13||null==_iterator13.return||_iterator13.return()}finally{if(_didIteratorError13)throw _iteratorError13}}}function getAllNodes(object){var astNode=object.astNode,extensionASTNodes=object.extensionASTNodes;return astNode?extensionASTNodes?[astNode].concat(extensionASTNodes):[astNode]:extensionASTNodes||[]}function getAllSubNodes(object,getter){var result=[],_iteratorNormalCompletion14=!0,_didIteratorError14=!1,_iteratorError14=void 0;try{for(var _step14,_iterator14=getAllNodes(object)[Symbol.iterator]();!(_iteratorNormalCompletion14=(_step14=_iterator14.next()).done);_iteratorNormalCompletion14=!0){var astNode=_step14.value;if(astNode){var subNodes=getter(astNode);subNodes&&(result=result.concat(subNodes))}}}catch(err){_didIteratorError14=!0,_iteratorError14=err}finally{try{_iteratorNormalCompletion14||null==_iterator14.return||_iterator14.return()}finally{if(_didIteratorError14)throw _iteratorError14}}return result}function getImplementsInterfaceNode(type,iface){return getAllImplementsInterfaceNodes(type,iface)[0]}function getAllImplementsInterfaceNodes(type,iface){return getAllSubNodes(type,function(typeNode){return typeNode.interfaces}).filter(function(ifaceNode){return ifaceNode.name.value===iface.name})}function getFieldNode(type,fieldName){return(0,_find.default)(getAllSubNodes(type,function(typeNode){return typeNode.fields}),function(fieldNode){return fieldNode.name.value===fieldName})}function getFieldTypeNode(type,fieldName){var fieldNode=getFieldNode(type,fieldName);return fieldNode&&fieldNode.type}function getFieldArgNode(type,fieldName,argName){return getAllFieldArgNodes(type,fieldName,argName)[0]}function getAllFieldArgNodes(type,fieldName,argName){var argNodes=[],fieldNode=getFieldNode(type,fieldName);if(fieldNode&&fieldNode.arguments){var _iteratorNormalCompletion15=!0,_didIteratorError15=!1,_iteratorError15=void 0;try{for(var _step15,_iterator15=fieldNode.arguments[Symbol.iterator]();!(_iteratorNormalCompletion15=(_step15=_iterator15.next()).done);_iteratorNormalCompletion15=!0){var node=_step15.value;node.name.value===argName&&argNodes.push(node)}}catch(err){_didIteratorError15=!0,_iteratorError15=err}finally{try{_iteratorNormalCompletion15||null==_iterator15.return||_iterator15.return()}finally{if(_didIteratorError15)throw _iteratorError15}}}return argNodes}function getFieldArgTypeNode(type,fieldName,argName){var fieldArgNode=getFieldArgNode(type,fieldName,argName);return fieldArgNode&&fieldArgNode.type}function getAllDirectiveArgNodes(directive,argName){return getAllSubNodes(directive,function(directiveNode){return directiveNode.arguments}).filter(function(argNode){return argNode.name.value===argName})}function getDirectiveArgTypeNode(directive,argName){var argNode=getAllDirectiveArgNodes(directive,argName)[0];return argNode&&argNode.type}function getUnionMemberTypeNodes(union,typeName){return getAllSubNodes(union,function(unionNode){return unionNode.types}).filter(function(typeNode){return typeNode.name.value===typeName})}Object.defineProperty(exports,"__esModule",{value:!0}),exports.validateSchema=validateSchema,exports.assertValidSchema=function(schema){var errors=validateSchema(schema);if(0!==errors.length)throw new Error(errors.map(function(error){return error.message}).join("\n\n"))};var _find=_interopRequireDefault(require("../polyfills/find")),_objectValues=_interopRequireDefault(require("../polyfills/objectValues")),_objectEntries=_interopRequireDefault(require("../polyfills/objectEntries")),_definition=require("./definition"),_directives=require("./directives"),_introspection=require("./introspection"),_schema=require("./schema"),_inspect=_interopRequireDefault(require("../jsutils/inspect")),_GraphQLError=require("../error/GraphQLError"),_assertValidName=require("../utilities/assertValidName"),_typeComparators=require("../utilities/typeComparators"),SchemaValidationContext=function(){function SchemaValidationContext(schema){this._errors=[],this.schema=schema}var _proto=SchemaValidationContext.prototype;return _proto.reportError=function(message,nodes){var _nodes=(Array.isArray(nodes)?nodes:[nodes]).filter(Boolean);this.addError(new _GraphQLError.GraphQLError(message,_nodes))},_proto.addError=function(error){this._errors.push(error)},_proto.getErrors=function(){return this._errors},SchemaValidationContext}()},{"../error/GraphQLError":88,"../jsutils/inspect":101,"../polyfills/find":128,"../polyfills/objectEntries":131,"../polyfills/objectValues":132,"../utilities/assertValidName":144,"../utilities/typeComparators":163,"./definition":136,"./directives":137,"./introspection":139,"./schema":141}],143:[function(require,module,exports){"use strict";function getFieldDef(schema,parentType,fieldNode){var name=fieldNode.name.value;return name===_introspection.SchemaMetaFieldDef.name&&schema.getQueryType()===parentType?_introspection.SchemaMetaFieldDef:name===_introspection.TypeMetaFieldDef.name&&schema.getQueryType()===parentType?_introspection.TypeMetaFieldDef:name===_introspection.TypeNameMetaFieldDef.name&&(0,_definition.isCompositeType)(parentType)?_introspection.TypeNameMetaFieldDef:(0,_definition.isObjectType)(parentType)||(0,_definition.isInterfaceType)(parentType)?parentType.getFields()[name]:void 0}Object.defineProperty(exports,"__esModule",{value:!0}),exports.TypeInfo=void 0;var _find=function(obj){return obj&&obj.__esModule?obj:{default:obj}}(require("../polyfills/find")),_kinds=require("../language/kinds"),_definition=require("../type/definition"),_introspection=require("../type/introspection"),_typeFromAST=require("./typeFromAST"),TypeInfo=function(){function TypeInfo(schema,getFieldDefFn,initialType){this._schema=schema,this._typeStack=[],this._parentTypeStack=[],this._inputTypeStack=[],this._fieldDefStack=[],this._defaultValueStack=[],this._directive=null,this._argument=null,this._enumValue=null,this._getFieldDef=getFieldDefFn||getFieldDef,initialType&&((0,_definition.isInputType)(initialType)&&this._inputTypeStack.push(initialType),(0,_definition.isCompositeType)(initialType)&&this._parentTypeStack.push(initialType),(0,_definition.isOutputType)(initialType)&&this._typeStack.push(initialType))}var _proto=TypeInfo.prototype;return _proto.getType=function(){if(this._typeStack.length>0)return this._typeStack[this._typeStack.length-1]},_proto.getParentType=function(){if(this._parentTypeStack.length>0)return this._parentTypeStack[this._parentTypeStack.length-1]},_proto.getInputType=function(){if(this._inputTypeStack.length>0)return this._inputTypeStack[this._inputTypeStack.length-1]},_proto.getParentInputType=function(){if(this._inputTypeStack.length>1)return this._inputTypeStack[this._inputTypeStack.length-2]},_proto.getFieldDef=function(){if(this._fieldDefStack.length>0)return this._fieldDefStack[this._fieldDefStack.length-1]},_proto.getDefaultValue=function(){if(this._defaultValueStack.length>0)return this._defaultValueStack[this._defaultValueStack.length-1]},_proto.getDirective=function(){return this._directive},_proto.getArgument=function(){return this._argument},_proto.getEnumValue=function(){return this._enumValue},_proto.enter=function(node){var schema=this._schema;switch(node.kind){case _kinds.Kind.SELECTION_SET:var namedType=(0,_definition.getNamedType)(this.getType());this._parentTypeStack.push((0,_definition.isCompositeType)(namedType)?namedType:void 0);break;case _kinds.Kind.FIELD:var fieldDef,fieldType,parentType=this.getParentType();parentType&&(fieldDef=this._getFieldDef(schema,parentType,node))&&(fieldType=fieldDef.type),this._fieldDefStack.push(fieldDef),this._typeStack.push((0,_definition.isOutputType)(fieldType)?fieldType:void 0);break;case _kinds.Kind.DIRECTIVE:this._directive=schema.getDirective(node.name.value);break;case _kinds.Kind.OPERATION_DEFINITION:var type;"query"===node.operation?type=schema.getQueryType():"mutation"===node.operation?type=schema.getMutationType():"subscription"===node.operation&&(type=schema.getSubscriptionType()),this._typeStack.push((0,_definition.isObjectType)(type)?type:void 0);break;case _kinds.Kind.INLINE_FRAGMENT:case _kinds.Kind.FRAGMENT_DEFINITION:var typeConditionAST=node.typeCondition,outputType=typeConditionAST?(0,_typeFromAST.typeFromAST)(schema,typeConditionAST):(0,_definition.getNamedType)(this.getType());this._typeStack.push((0,_definition.isOutputType)(outputType)?outputType:void 0);break;case _kinds.Kind.VARIABLE_DEFINITION:var inputType=(0,_typeFromAST.typeFromAST)(schema,node.type);this._inputTypeStack.push((0,_definition.isInputType)(inputType)?inputType:void 0);break;case _kinds.Kind.ARGUMENT:var argDef,argType,fieldOrDirective=this.getDirective()||this.getFieldDef();fieldOrDirective&&(argDef=(0,_find.default)(fieldOrDirective.args,function(arg){return arg.name===node.name.value}))&&(argType=argDef.type),this._argument=argDef,this._defaultValueStack.push(argDef?argDef.defaultValue:void 0),this._inputTypeStack.push((0,_definition.isInputType)(argType)?argType:void 0);break;case _kinds.Kind.LIST:var listType=(0,_definition.getNullableType)(this.getInputType()),itemType=(0,_definition.isListType)(listType)?listType.ofType:listType;this._defaultValueStack.push(void 0),this._inputTypeStack.push((0,_definition.isInputType)(itemType)?itemType:void 0);break;case _kinds.Kind.OBJECT_FIELD:var inputFieldType,inputField,objectType=(0,_definition.getNamedType)(this.getInputType());(0,_definition.isInputObjectType)(objectType)&&(inputField=objectType.getFields()[node.name.value])&&(inputFieldType=inputField.type),this._defaultValueStack.push(inputField?inputField.defaultValue:void 0),this._inputTypeStack.push((0,_definition.isInputType)(inputFieldType)?inputFieldType:void 0);break;case _kinds.Kind.ENUM:var enumValue,enumType=(0,_definition.getNamedType)(this.getInputType());(0,_definition.isEnumType)(enumType)&&(enumValue=enumType.getValue(node.value)),this._enumValue=enumValue}},_proto.leave=function(node){switch(node.kind){case _kinds.Kind.SELECTION_SET:this._parentTypeStack.pop();break;case _kinds.Kind.FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case _kinds.Kind.DIRECTIVE:this._directive=null;break;case _kinds.Kind.OPERATION_DEFINITION:case _kinds.Kind.INLINE_FRAGMENT:case _kinds.Kind.FRAGMENT_DEFINITION:this._typeStack.pop();break;case _kinds.Kind.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case _kinds.Kind.ARGUMENT:this._argument=null,this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case _kinds.Kind.LIST:case _kinds.Kind.OBJECT_FIELD:this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case _kinds.Kind.ENUM:this._enumValue=null}},TypeInfo}();exports.TypeInfo=TypeInfo},{"../language/kinds":120,"../polyfills/find":128,"../type/definition":136,"../type/introspection":139,"./typeFromAST":164}],144:[function(require,module,exports){"use strict";function isValidNameError(name,node){return"string"!=typeof name&&(0,_invariant.default)(0,"Expected string"),name.length>1&&"_"===name[0]&&"_"===name[1]?new _GraphQLError.GraphQLError('Name "'.concat(name,'" must not begin with "__", which is reserved by ')+"GraphQL introspection.",node):NAME_RX.test(name)?void 0:new _GraphQLError.GraphQLError('Names must match /^[_a-zA-Z][_a-zA-Z0-9]*$/ but "'.concat(name,'" does not.'),node)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.assertValidName=function(name){var error=isValidNameError(name);if(error)throw error;return name},exports.isValidNameError=isValidNameError;var _GraphQLError=require("../error/GraphQLError"),_invariant=function(obj){return obj&&obj.__esModule?obj:{default:obj}}(require("../jsutils/invariant")),NAME_RX=/^[_a-zA-Z][_a-zA-Z0-9]*$/},{"../error/GraphQLError":88,"../jsutils/invariant":103}],145:[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}function astFromValue(value,type){if((0,_definition.isNonNullType)(type)){var astValue=astFromValue(value,type.ofType);return astValue&&astValue.kind===_kinds.Kind.NULL?null:astValue}if(null===value)return{kind:_kinds.Kind.NULL};if((0,_isInvalid.default)(value))return null;if((0,_definition.isListType)(type)){var itemType=type.ofType;if((0,_iterall.isCollection)(value)){var valuesNodes=[];return(0,_iterall.forEach)(value,function(item){var itemNode=astFromValue(item,itemType);itemNode&&valuesNodes.push(itemNode)}),{kind:_kinds.Kind.LIST,values:valuesNodes}}return astFromValue(value,itemType)}if((0,_definition.isInputObjectType)(type)){if(null===value||"object"!==_typeof(value))return null;var fields=(0,_objectValues.default)(type.getFields()),fieldNodes=[],_iteratorNormalCompletion=!0,_didIteratorError=!1,_iteratorError=void 0;try{for(var _step,_iterator=fields[Symbol.iterator]();!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=!0){var field=_step.value,fieldValue=astFromValue(value[field.name],field.type);fieldValue&&fieldNodes.push({kind:_kinds.Kind.OBJECT_FIELD,name:{kind:_kinds.Kind.NAME,value:field.name},value:fieldValue})}}catch(err){_didIteratorError=!0,_iteratorError=err}finally{try{_iteratorNormalCompletion||null==_iterator.return||_iterator.return()}finally{if(_didIteratorError)throw _iteratorError}}return{kind:_kinds.Kind.OBJECT,fields:fieldNodes}}if((0,_definition.isScalarType)(type)||(0,_definition.isEnumType)(type)){var serialized=type.serialize(value);if((0,_isNullish.default)(serialized))return null;if("boolean"==typeof serialized)return{kind:_kinds.Kind.BOOLEAN,value:serialized};if("number"==typeof serialized){var stringNum=String(serialized);return integerStringRegExp.test(stringNum)?{kind:_kinds.Kind.INT,value:stringNum}:{kind:_kinds.Kind.FLOAT,value:stringNum}}if("string"==typeof serialized)return(0,_definition.isEnumType)(type)?{kind:_kinds.Kind.ENUM,value:serialized}:type===_scalars.GraphQLID&&integerStringRegExp.test(serialized)?{kind:_kinds.Kind.INT,value:serialized}:{kind:_kinds.Kind.STRING,value:serialized};throw new TypeError("Cannot convert value to AST: ".concat((0,_inspect.default)(serialized)))}throw new Error("Unknown type: ".concat(type,"."))}Object.defineProperty(exports,"__esModule",{value:!0}),exports.astFromValue=astFromValue;var _iterall=require("iterall"),_objectValues=_interopRequireDefault(require("../polyfills/objectValues")),_inspect=_interopRequireDefault(require("../jsutils/inspect")),_isNullish=_interopRequireDefault(require("../jsutils/isNullish")),_isInvalid=_interopRequireDefault(require("../jsutils/isInvalid")),_kinds=require("../language/kinds"),_definition=require("../type/definition"),_scalars=require("../type/scalars"),integerStringRegExp=/^-?(0|[1-9][0-9]*)$/},{"../jsutils/inspect":101,"../jsutils/isInvalid":104,"../jsutils/isNullish":105,"../language/kinds":120,"../polyfills/objectValues":132,"../type/definition":136,"../type/scalars":140,iterall:204}],146:[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function buildASTSchema(documentAST,options){documentAST&&documentAST.kind===_kinds.Kind.DOCUMENT||(0,_invariant.default)(0,"Must provide valid Document AST"),options&&(options.assumeValid||options.assumeValidSDL)||(0,_validate.assertValidSDL)(documentAST);var schemaDef,nodeMap=Object.create(null),directiveDefs=[],_iteratorNormalCompletion=!0,_didIteratorError=!1,_iteratorError=void 0;try{for(var _step,_iterator=documentAST.definitions[Symbol.iterator]();!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=!0){var def=_step.value;def.kind===_kinds.Kind.SCHEMA_DEFINITION?schemaDef=def:(0,_predicates.isTypeDefinitionNode)(def)?nodeMap[def.name.value]=def:def.kind===_kinds.Kind.DIRECTIVE_DEFINITION&&directiveDefs.push(def)}}catch(err){_didIteratorError=!0,_iteratorError=err}finally{try{_iteratorNormalCompletion||null==_iterator.return||_iterator.return()}finally{if(_didIteratorError)throw _iteratorError}}var operationTypes=schemaDef?function(schema){var opTypes={},_iteratorNormalCompletion2=!0,_didIteratorError2=!1,_iteratorError2=void 0;try{for(var _step2,_iterator2=schema.operationTypes[Symbol.iterator]();!(_iteratorNormalCompletion2=(_step2=_iterator2.next()).done);_iteratorNormalCompletion2=!0){var operationType=_step2.value;opTypes[operationType.operation]=operationType.type}}catch(err){_didIteratorError2=!0,_iteratorError2=err}finally{try{_iteratorNormalCompletion2||null==_iterator2.return||_iterator2.return()}finally{if(_didIteratorError2)throw _iteratorError2}}return opTypes}(schemaDef):{query:nodeMap.Query,mutation:nodeMap.Mutation,subscription:nodeMap.Subscription},definitionBuilder=new ASTDefinitionBuilder(nodeMap,options,function(typeName){throw new Error('Type "'.concat(typeName,'" not found in document.'))}),directives=directiveDefs.map(function(def){return definitionBuilder.buildDirective(def)});return directives.some(function(directive){return"skip"===directive.name})||directives.push(_directives.GraphQLSkipDirective),directives.some(function(directive){return"include"===directive.name})||directives.push(_directives.GraphQLIncludeDirective),directives.some(function(directive){return"deprecated"===directive.name})||directives.push(_directives.GraphQLDeprecatedDirective),new _schema.GraphQLSchema({query:operationTypes.query?definitionBuilder.buildType(operationTypes.query):null,mutation:operationTypes.mutation?definitionBuilder.buildType(operationTypes.mutation):null,subscription:operationTypes.subscription?definitionBuilder.buildType(operationTypes.subscription):null,types:(0,_objectValues.default)(nodeMap).map(function(node){return definitionBuilder.buildType(node)}),directives:directives,astNode:schemaDef,assumeValid:options&&options.assumeValid,allowedLegacyNames:options&&options.allowedLegacyNames})}function keyByNameNode(list,valFn){return(0,_keyValMap.default)(list,function(_ref2){return _ref2.name.value},valFn)}function getDeprecationReason(node){var deprecated=(0,_values.getDirectiveValues)(_directives.GraphQLDeprecatedDirective,node);return deprecated&&deprecated.reason}function getDescription(node,options){if(node.description)return node.description.value;if(options&&options.commentDescriptions){var rawValue=getLeadingCommentBlock(node);if(void 0!==rawValue)return(0,_blockStringValue.default)("\n"+rawValue)}}function getLeadingCommentBlock(node){var loc=node.loc;if(loc){for(var comments=[],token=loc.startToken.prev;token&&token.kind===_lexer.TokenKind.COMMENT&&token.next&&token.prev&&token.line+1===token.next.line&&token.line!==token.prev.line;){var value=String(token.value);comments.push(value),token=token.prev}return comments.reverse().join("\n")}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.buildASTSchema=buildASTSchema,exports.getDescription=getDescription,exports.buildSchema=function(source,options){return buildASTSchema((0,_parser.parse)(source,options),options)},exports.ASTDefinitionBuilder=void 0;var _objectValues=_interopRequireDefault(require("../polyfills/objectValues")),_invariant=_interopRequireDefault(require("../jsutils/invariant")),_keyMap=_interopRequireDefault(require("../jsutils/keyMap")),_keyValMap=_interopRequireDefault(require("../jsutils/keyValMap")),_valueFromAST=require("./valueFromAST"),_validate=require("../validation/validate"),_blockStringValue=_interopRequireDefault(require("../language/blockStringValue")),_lexer=require("../language/lexer"),_parser=require("../language/parser"),_values=require("../execution/values"),_kinds=require("../language/kinds"),_predicates=require("../language/predicates"),_definition=require("../type/definition"),_directives=require("../type/directives"),_introspection=require("../type/introspection"),_scalars=require("../type/scalars"),_schema=require("../type/schema"),ASTDefinitionBuilder=function(){function ASTDefinitionBuilder(typeDefinitionsMap,options,resolveType){this._typeDefinitionsMap=typeDefinitionsMap,this._options=options,this._resolveType=resolveType,this._cache=(0,_keyMap.default)(_scalars.specifiedScalarTypes.concat(_introspection.introspectionTypes),function(type){return type.name})}var _proto=ASTDefinitionBuilder.prototype;return _proto.buildType=function(node){var typeName=node.name.value;if(!this._cache[typeName])if(node.kind===_kinds.Kind.NAMED_TYPE){var defNode=this._typeDefinitionsMap[typeName];this._cache[typeName]=defNode?this._makeSchemaDef(defNode):this._resolveType(node.name.value)}else this._cache[typeName]=this._makeSchemaDef(node);return this._cache[typeName]},_proto._buildWrappedType=function(typeNode){return typeNode.kind===_kinds.Kind.LIST_TYPE?(0,_definition.GraphQLList)(this._buildWrappedType(typeNode.type)):typeNode.kind===_kinds.Kind.NON_NULL_TYPE?(0,_definition.GraphQLNonNull)(this._buildWrappedType(typeNode.type)):this.buildType(typeNode)},_proto.buildDirective=function(directive){var _this=this,locations=directive.locations.map(function(_ref){return _ref.value});return new _directives.GraphQLDirective({name:directive.name.value,description:getDescription(directive,this._options),locations:locations,args:keyByNameNode(directive.arguments||[],function(arg){return _this.buildArg(arg)}),astNode:directive})},_proto.buildField=function(field){var _this2=this;return{type:this._buildWrappedType(field.type),description:getDescription(field,this._options),args:keyByNameNode(field.arguments||[],function(arg){return _this2.buildArg(arg)}),deprecationReason:getDeprecationReason(field),astNode:field}},_proto.buildArg=function(value){var type=this._buildWrappedType(value.type);return{type:type,description:getDescription(value,this._options),defaultValue:(0,_valueFromAST.valueFromAST)(value.defaultValue,type),astNode:value}},_proto.buildInputField=function(value){var type=this._buildWrappedType(value.type);return{type:type,description:getDescription(value,this._options),defaultValue:(0,_valueFromAST.valueFromAST)(value.defaultValue,type),astNode:value}},_proto.buildEnumValue=function(value){return{description:getDescription(value,this._options),deprecationReason:getDeprecationReason(value),astNode:value}},_proto._makeSchemaDef=function(astNode){switch(astNode.kind){case _kinds.Kind.OBJECT_TYPE_DEFINITION:return this._makeTypeDef(astNode);case _kinds.Kind.INTERFACE_TYPE_DEFINITION:return this._makeInterfaceDef(astNode);case _kinds.Kind.ENUM_TYPE_DEFINITION:return this._makeEnumDef(astNode);case _kinds.Kind.UNION_TYPE_DEFINITION:return this._makeUnionDef(astNode);case _kinds.Kind.SCALAR_TYPE_DEFINITION:return this._makeScalarDef(astNode);case _kinds.Kind.INPUT_OBJECT_TYPE_DEFINITION:return this._makeInputObjectDef(astNode);default:throw new Error('Type kind "'.concat(astNode.kind,'" not supported.'))}},_proto._makeTypeDef=function(astNode){var _this3=this,interfaceNodes=astNode.interfaces,fieldNodes=astNode.fields,interfaces=interfaceNodes&&interfaceNodes.length>0?function(){return interfaceNodes.map(function(ref){return _this3.buildType(ref)})}:[],fields=fieldNodes&&fieldNodes.length>0?function(){return keyByNameNode(fieldNodes,function(field){return _this3.buildField(field)})}:Object.create(null);return new _definition.GraphQLObjectType({name:astNode.name.value,description:getDescription(astNode,this._options),interfaces:interfaces,fields:fields,astNode:astNode})},_proto._makeInterfaceDef=function(astNode){var _this4=this,fieldNodes=astNode.fields,fields=fieldNodes&&fieldNodes.length>0?function(){return keyByNameNode(fieldNodes,function(field){return _this4.buildField(field)})}:Object.create(null);return new _definition.GraphQLInterfaceType({name:astNode.name.value,description:getDescription(astNode,this._options),fields:fields,astNode:astNode})},_proto._makeEnumDef=function(astNode){var _this5=this,valueNodes=astNode.values||[];return new _definition.GraphQLEnumType({name:astNode.name.value,description:getDescription(astNode,this._options),values:keyByNameNode(valueNodes,function(value){return _this5.buildEnumValue(value)}),astNode:astNode})},_proto._makeUnionDef=function(astNode){var _this6=this,typeNodes=astNode.types,types=typeNodes&&typeNodes.length>0?function(){return typeNodes.map(function(ref){return _this6.buildType(ref)})}:[];return new _definition.GraphQLUnionType({name:astNode.name.value,description:getDescription(astNode,this._options),types:types,astNode:astNode})},_proto._makeScalarDef=function(astNode){return new _definition.GraphQLScalarType({name:astNode.name.value,description:getDescription(astNode,this._options),astNode:astNode,serialize:function(value){return value}})},_proto._makeInputObjectDef=function(def){var _this7=this,fields=def.fields;return new _definition.GraphQLInputObjectType({name:def.name.value,description:getDescription(def,this._options),fields:fields?function(){return keyByNameNode(fields,function(field){return _this7.buildInputField(field)})}:Object.create(null),astNode:def})},ASTDefinitionBuilder}();exports.ASTDefinitionBuilder=ASTDefinitionBuilder},{"../execution/values":96,"../jsutils/invariant":103,"../jsutils/keyMap":107,"../jsutils/keyValMap":108,"../language/blockStringValue":117,"../language/kinds":120,"../language/lexer":121,"../language/parser":123,"../language/predicates":124,"../polyfills/objectValues":132,"../type/definition":136,"../type/directives":137,"../type/introspection":139,"../type/scalars":140,"../type/schema":141,"../validation/validate":203,"./valueFromAST":165}],147:[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.buildClientSchema=function(introspection,options){function getType(typeRef){if(typeRef.kind===_introspection.TypeKind.LIST){var itemRef=typeRef.ofType;if(!itemRef)throw new Error("Decorated type deeper than introspection query.");return(0,_definition.GraphQLList)(getType(itemRef))}if(typeRef.kind===_introspection.TypeKind.NON_NULL){var nullableRef=typeRef.ofType;if(!nullableRef)throw new Error("Decorated type deeper than introspection query.");var nullableType=getType(nullableRef);return(0,_definition.GraphQLNonNull)((0,_definition.assertNullableType)(nullableType))}if(!typeRef.name)throw new Error("Unknown type reference: "+(0,_inspect.default)(typeRef));return getNamedType(typeRef.name)}function getNamedType(typeName){if(typeDefCache[typeName])return typeDefCache[typeName];var typeIntrospection=typeIntrospectionMap[typeName];if(!typeIntrospection)throw new Error("Invalid or incomplete schema, unknown type: ".concat(typeName,". Ensure ")+"that a full introspection query is used in order to build a client schema.");var typeDef=buildType(typeIntrospection);return typeDefCache[typeName]=typeDef,typeDef}function getInputType(typeRef){var type=getType(typeRef);return(0,_definition.isInputType)(type)||(0,_invariant.default)(0,"Introspection must provide input type for arguments, but received: "+(0,_inspect.default)(type)+"."),type}function getOutputType(typeRef){var type=getType(typeRef);return(0,_definition.isOutputType)(type)||(0,_invariant.default)(0,"Introspection must provide output type for fields, but received: "+(0,_inspect.default)(type)+"."),type}function getObjectType(typeRef){var type=getType(typeRef);return(0,_definition.assertObjectType)(type)}function getInterfaceType(typeRef){var type=getType(typeRef);return(0,_definition.assertInterfaceType)(type)}function buildType(type){if(type&&type.name&&type.kind)switch(type.kind){case _introspection.TypeKind.SCALAR:return buildScalarDef(type);case _introspection.TypeKind.OBJECT:return buildObjectDef(type);case _introspection.TypeKind.INTERFACE:return buildInterfaceDef(type);case _introspection.TypeKind.UNION:return buildUnionDef(type);case _introspection.TypeKind.ENUM:return buildEnumDef(type);case _introspection.TypeKind.INPUT_OBJECT:return buildInputObjectDef(type)}throw new Error("Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema:"+(0,_inspect.default)(type))}function buildScalarDef(scalarIntrospection){return new _definition.GraphQLScalarType({name:scalarIntrospection.name,description:scalarIntrospection.description,serialize:function(value){return value}})}function buildObjectDef(objectIntrospection){if(!objectIntrospection.interfaces)throw new Error("Introspection result missing interfaces: "+(0,_inspect.default)(objectIntrospection));return new _definition.GraphQLObjectType({name:objectIntrospection.name,description:objectIntrospection.description,interfaces:function(){return objectIntrospection.interfaces.map(getInterfaceType)},fields:function(){return buildFieldDefMap(objectIntrospection)}})}function buildInterfaceDef(interfaceIntrospection){return new _definition.GraphQLInterfaceType({name:interfaceIntrospection.name,description:interfaceIntrospection.description,fields:function(){return buildFieldDefMap(interfaceIntrospection)}})}function buildUnionDef(unionIntrospection){if(!unionIntrospection.possibleTypes)throw new Error("Introspection result missing possibleTypes: "+(0,_inspect.default)(unionIntrospection));return new _definition.GraphQLUnionType({name:unionIntrospection.name,description:unionIntrospection.description,types:function(){return unionIntrospection.possibleTypes.map(getObjectType)}})}function buildEnumDef(enumIntrospection){if(!enumIntrospection.enumValues)throw new Error("Introspection result missing enumValues: "+(0,_inspect.default)(enumIntrospection));return new _definition.GraphQLEnumType({name:enumIntrospection.name,description:enumIntrospection.description,values:(0,_keyValMap.default)(enumIntrospection.enumValues,function(valueIntrospection){return valueIntrospection.name},function(valueIntrospection){return{description:valueIntrospection.description,deprecationReason:valueIntrospection.deprecationReason}})})}function buildInputObjectDef(inputObjectIntrospection){if(!inputObjectIntrospection.inputFields)throw new Error("Introspection result missing inputFields: "+(0,_inspect.default)(inputObjectIntrospection));return new _definition.GraphQLInputObjectType({name:inputObjectIntrospection.name,description:inputObjectIntrospection.description,fields:function(){return buildInputValueDefMap(inputObjectIntrospection.inputFields)}})}function buildFieldDefMap(typeIntrospection){if(!typeIntrospection.fields)throw new Error("Introspection result missing fields: "+(0,_inspect.default)(typeIntrospection));return(0,_keyValMap.default)(typeIntrospection.fields,function(fieldIntrospection){return fieldIntrospection.name},function(fieldIntrospection){if(!fieldIntrospection.args)throw new Error("Introspection result missing field args: "+(0,_inspect.default)(fieldIntrospection));return{description:fieldIntrospection.description,deprecationReason:fieldIntrospection.deprecationReason,type:getOutputType(fieldIntrospection.type),args:buildInputValueDefMap(fieldIntrospection.args)}})}function buildInputValueDefMap(inputValueIntrospections){return(0,_keyValMap.default)(inputValueIntrospections,function(inputValue){return inputValue.name},buildInputValue)}function buildInputValue(inputValueIntrospection){var type=getInputType(inputValueIntrospection.type),defaultValue=inputValueIntrospection.defaultValue?(0,_valueFromAST.valueFromAST)((0,_parser.parseValue)(inputValueIntrospection.defaultValue),type):void 0;return{description:inputValueIntrospection.description,type:type,defaultValue:defaultValue}}var schemaIntrospection=introspection.__schema,typeIntrospectionMap=(0,_keyMap.default)(schemaIntrospection.types,function(type){return type.name}),typeDefCache=(0,_keyMap.default)(_scalars.specifiedScalarTypes.concat(_introspection.introspectionTypes),function(type){return type.name}),types=schemaIntrospection.types.map(function(typeIntrospection){return getNamedType(typeIntrospection.name)}),queryType=schemaIntrospection.queryType?getObjectType(schemaIntrospection.queryType):null,mutationType=schemaIntrospection.mutationType?getObjectType(schemaIntrospection.mutationType):null,subscriptionType=schemaIntrospection.subscriptionType?getObjectType(schemaIntrospection.subscriptionType):null,directives=schemaIntrospection.directives?schemaIntrospection.directives.map(function(directiveIntrospection){if(!directiveIntrospection.args)throw new Error("Introspection result missing directive args: "+(0,_inspect.default)(directiveIntrospection));if(!directiveIntrospection.locations)throw new Error("Introspection result missing directive locations: "+(0,_inspect.default)(directiveIntrospection));return new _directives.GraphQLDirective({name:directiveIntrospection.name,description:directiveIntrospection.description,locations:directiveIntrospection.locations.slice(),args:buildInputValueDefMap(directiveIntrospection.args)})}):[];return new _schema.GraphQLSchema({query:queryType,mutation:mutationType,subscription:subscriptionType,types:types,directives:directives,assumeValid:options&&options.assumeValid,allowedLegacyNames:options&&options.allowedLegacyNames})};var _inspect=_interopRequireDefault(require("../jsutils/inspect")),_invariant=_interopRequireDefault(require("../jsutils/invariant")),_keyMap=_interopRequireDefault(require("../jsutils/keyMap")),_keyValMap=_interopRequireDefault(require("../jsutils/keyValMap")),_valueFromAST=require("./valueFromAST"),_parser=require("../language/parser"),_schema=require("../type/schema"),_definition=require("../type/definition"),_directives=require("../type/directives"),_introspection=require("../type/introspection"),_scalars=require("../type/scalars")},{"../jsutils/inspect":101,"../jsutils/invariant":103,"../jsutils/keyMap":107,"../jsutils/keyValMap":108,"../language/parser":123,"../type/definition":136,"../type/directives":137,"../type/introspection":139,"../type/scalars":140,"../type/schema":141,"./valueFromAST":165}],148:[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}function coerceValue(value,type,blameNode,path){if((0,_definition.isNonNullType)(type))return null==value?ofErrors([coercionError("Expected non-nullable type ".concat((0,_inspect.default)(type)," not to be null"),blameNode,path)]):coerceValue(value,type.ofType,blameNode,path);if(null==value)return ofValue(null);if((0,_definition.isScalarType)(type))try{var parseResult=type.parseValue(value);return(0,_isInvalid.default)(parseResult)?ofErrors([coercionError("Expected type ".concat(type.name),blameNode,path)]):ofValue(parseResult)}catch(error){return ofErrors([coercionError("Expected type ".concat(type.name),blameNode,path,error.message,error)])}if((0,_definition.isEnumType)(type)){if("string"==typeof value){var enumValue=type.getValue(value);if(enumValue)return ofValue(enumValue.value)}var suggestions=(0,_suggestionList.default)(String(value),type.getValues().map(function(enumValue){return enumValue.name})),didYouMean=0!==suggestions.length?"did you mean ".concat((0,_orList.default)(suggestions),"?"):void 0;return ofErrors([coercionError("Expected type ".concat(type.name),blameNode,path,didYouMean)])}if((0,_definition.isListType)(type)){var itemType=type.ofType;if((0,_iterall.isCollection)(value)){var errors,coercedValue=[];return(0,_iterall.forEach)(value,function(itemValue,index){var coercedItem=coerceValue(itemValue,itemType,blameNode,atPath(path,index));coercedItem.errors?errors=add(errors,coercedItem.errors):errors||coercedValue.push(coercedItem.value)}),errors?ofErrors(errors):ofValue(coercedValue)}var coercedItem=coerceValue(value,itemType,blameNode);return coercedItem.errors?coercedItem:ofValue([coercedItem.value])}if((0,_definition.isInputObjectType)(type)){if("object"!==_typeof(value))return ofErrors([coercionError("Expected type ".concat(type.name," to be an object"),blameNode,path)]);var _errors,_coercedValue={},fields=type.getFields(),_iteratorNormalCompletion=!0,_didIteratorError=!1,_iteratorError=void 0;try{for(var _step,_iterator=(0,_objectValues.default)(fields)[Symbol.iterator]();!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=!0){var field=_step.value,fieldValue=value[field.name];if((0,_isInvalid.default)(fieldValue))(0,_isInvalid.default)(field.defaultValue)?(0,_definition.isNonNullType)(field.type)&&(_errors=add(_errors,coercionError("Field ".concat(printPath(atPath(path,field.name))," of required ")+"type ".concat((0,_inspect.default)(field.type)," was not provided"),blameNode))):_coercedValue[field.name]=field.defaultValue;else{var coercedField=coerceValue(fieldValue,field.type,blameNode,atPath(path,field.name));coercedField.errors?_errors=add(_errors,coercedField.errors):_errors||(_coercedValue[field.name]=coercedField.value)}}}catch(err){_didIteratorError=!0,_iteratorError=err}finally{try{_iteratorNormalCompletion||null==_iterator.return||_iterator.return()}finally{if(_didIteratorError)throw _iteratorError}}for(var _arr=Object.keys(value),_i=0;_i<_arr.length;_i++){var fieldName=_arr[_i];if(!fields[fieldName]){var _suggestions=(0,_suggestionList.default)(fieldName,Object.keys(fields)),_didYouMean=0!==_suggestions.length?"did you mean ".concat((0,_orList.default)(_suggestions),"?"):void 0;_errors=add(_errors,coercionError('Field "'.concat(fieldName,'" is not defined by type ').concat(type.name),blameNode,path,_didYouMean))}}return _errors?ofErrors(_errors):ofValue(_coercedValue)}throw new Error("Unexpected type: ".concat(type,"."))}function ofValue(value){return{errors:void 0,value:value}}function ofErrors(errors){return{errors:errors,value:void 0}}function add(errors,moreErrors){return(errors||[]).concat(moreErrors)}function atPath(prev,key){return{prev:prev,key:key}}function coercionError(message,blameNode,path,subMessage,originalError){var pathStr=printPath(path);return new _GraphQLError.GraphQLError(message+(pathStr?" at "+pathStr:"")+(subMessage?"; "+subMessage:"."),blameNode,void 0,void 0,void 0,originalError)}function printPath(path){for(var pathStr="",currentPath=path;currentPath;)pathStr=("string"==typeof currentPath.key?"."+currentPath.key:"["+String(currentPath.key)+"]")+pathStr,currentPath=currentPath.prev;return pathStr?"value"+pathStr:""}Object.defineProperty(exports,"__esModule",{value:!0}),exports.coerceValue=coerceValue;var _iterall=require("iterall"),_objectValues=_interopRequireDefault(require("../polyfills/objectValues")),_inspect=_interopRequireDefault(require("../jsutils/inspect")),_isInvalid=_interopRequireDefault(require("../jsutils/isInvalid")),_orList=_interopRequireDefault(require("../jsutils/orList")),_suggestionList=_interopRequireDefault(require("../jsutils/suggestionList")),_GraphQLError=require("../error/GraphQLError"),_definition=require("../type/definition")},{"../error/GraphQLError":88,"../jsutils/inspect":101,"../jsutils/isInvalid":104,"../jsutils/orList":112,"../jsutils/suggestionList":116,"../polyfills/objectValues":132,"../type/definition":136,iterall:204}],149:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.concatAST=function(asts){for(var batchDefinitions=[],i=0;i2&&void 0!==arguments[2]?arguments[2]:"";return 0===args.length?"":args.every(function(arg){return!arg.description})?"("+args.map(printInputValue).join(", ")+")":"(\n"+args.map(function(arg,i){return printDescription(options,arg," "+indentation,!i)+" "+indentation+printInputValue(arg)}).join("\n")+"\n"+indentation+")"}function printInputValue(arg){var argDecl=arg.name+": "+String(arg.type);return(0,_isInvalid.default)(arg.defaultValue)||(argDecl+=" = ".concat((0,_printer.print)((0,_astFromValue.astFromValue)(arg.defaultValue,arg.type)))),argDecl}function printDirective(directive,options){return printDescription(options,directive)+"directive @"+directive.name+printArgs(options,directive.args)+" on "+directive.locations.join(" | ")}function printDeprecated(fieldOrEnumVal){if(!fieldOrEnumVal.isDeprecated)return"";var reason=fieldOrEnumVal.deprecationReason;return(0,_isNullish.default)(reason)||""===reason||reason===_directives.DEFAULT_DEPRECATION_REASON?" @deprecated":" @deprecated(reason: "+(0,_printer.print)((0,_astFromValue.astFromValue)(reason,_scalars.GraphQLString))+")"}function printDescription(options,def){var indentation=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",firstInBlock=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(!def.description)return"";var lines=descriptionLines(def.description,120-indentation.length);if(options&&options.commentDescriptions)return printDescriptionWithComments(lines,indentation,firstInBlock);var description=indentation&&!firstInBlock?"\n"+indentation+'"""':indentation+'"""';if(1===lines.length&&lines[0].length<70&&'"'!==lines[0][lines[0].length-1])return description+escapeQuote(lines[0])+'"""\n';var hasLeadingSpace=" "===lines[0][0]||"\t"===lines[0][0];hasLeadingSpace||(description+="\n");for(var i=0;i1&&context.reportError(new _GraphQLError.GraphQLError(anonOperationNotAloneMessage(),[node]))}}};var _GraphQLError=require("../../error/GraphQLError"),_kinds=require("../../language/kinds")},{"../../error/GraphQLError":88,"../../language/kinds":120}],177:[function(require,module,exports){"use strict";function schemaDefinitionNotAloneMessage(){return"Must provide only one schema definition."}function canNotDefineSchemaWithinExtensionMessage(){return"Cannot define a new schema within a schema extension."}Object.defineProperty(exports,"__esModule",{value:!0}),exports.schemaDefinitionNotAloneMessage=schemaDefinitionNotAloneMessage,exports.canNotDefineSchemaWithinExtensionMessage=canNotDefineSchemaWithinExtensionMessage,exports.LoneSchemaDefinition=function(context){var oldSchema=context.getSchema(),alreadyDefined=oldSchema&&(oldSchema.astNode||oldSchema.getQueryType()||oldSchema.getMutationType()||oldSchema.getSubscriptionType()),schemaDefinitionsCount=0;return{SchemaDefinition:function(node){alreadyDefined?context.reportError(new _GraphQLError.GraphQLError(canNotDefineSchemaWithinExtensionMessage(),node)):(schemaDefinitionsCount>0&&context.reportError(new _GraphQLError.GraphQLError(schemaDefinitionNotAloneMessage(),node)),++schemaDefinitionsCount)}}};var _GraphQLError=require("../../error/GraphQLError")},{"../../error/GraphQLError":88}],178:[function(require,module,exports){"use strict";function cycleErrorMessage(fragName,spreadNames){var via=spreadNames.length?" via "+spreadNames.join(", "):"";return'Cannot spread fragment "'.concat(fragName,'" within itself').concat(via,".")}Object.defineProperty(exports,"__esModule",{value:!0}),exports.cycleErrorMessage=cycleErrorMessage,exports.NoFragmentCycles=function(context){function detectCycleRecursive(fragment){if(!visitedFrags[fragment.name.value]){var fragmentName=fragment.name.value;visitedFrags[fragmentName]=!0;var spreadNodes=context.getFragmentSpreads(fragment.selectionSet);if(0!==spreadNodes.length){spreadPathIndexByName[fragmentName]=spreadPath.length;for(var i=0;i1)for(var i=0;i0)return[[responseName,conflicts.map(function(_ref6){return _ref6[0]})],conflicts.reduce(function(allFields,_ref7){var fields1=_ref7[1];return allFields.concat(fields1)},[node1]),conflicts.reduce(function(allFields,_ref8){var fields2=_ref8[2];return allFields.concat(fields2)},[node2])]}function _pairSetAdd(data,a,b,areMutuallyExclusive){var map=data[a];map||(map=Object.create(null),data[a]=map),map[b]=areMutuallyExclusive}Object.defineProperty(exports,"__esModule",{value:!0}),exports.fieldsConflictMessage=fieldsConflictMessage,exports.OverlappingFieldsCanBeMerged=function(context){var comparedFragmentPairs=new PairSet,cachedFieldsAndFragmentNames=new Map;return{SelectionSet:function(selectionSet){for(var conflicts=findConflictsWithinSelectionSet(context,cachedFieldsAndFragmentNames,comparedFragmentPairs,context.getParentType(),selectionSet),_i=0;_i2&&void 0!==arguments[2]?arguments[2]:_specifiedRules.specifiedSDLRules,context=new _ValidationContext.SDLValidationContext(documentAST,schemaToExtend),visitors=rules.map(function(rule){return rule(context)});return(0,_visitor.visit)(documentAST,(0,_visitor.visitInParallel)(visitors)),context.getErrors()}Object.defineProperty(exports,"__esModule",{value:!0}),exports.validate=function(schema,documentAST){var rules=arguments.length>2&&void 0!==arguments[2]?arguments[2]:_specifiedRules.specifiedRules,typeInfo=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new _TypeInfo.TypeInfo(schema);documentAST||(0,_invariant.default)(0,"Must provide document"),(0,_validate.assertValidSchema)(schema);var context=new _ValidationContext.ValidationContext(schema,documentAST,typeInfo),visitor=(0,_visitor.visitInParallel)(rules.map(function(rule){return rule(context)}));return(0,_visitor.visit)(documentAST,(0,_visitor.visitWithTypeInfo)(typeInfo,visitor)),context.getErrors()},exports.validateSDL=validateSDL,exports.assertValidSDL=function(documentAST){var errors=validateSDL(documentAST);if(0!==errors.length)throw new Error(errors.map(function(error){return error.message}).join("\n\n"))},exports.assertValidSDLExtension=function(documentAST,schema){var errors=validateSDL(documentAST,schema);if(0!==errors.length)throw new Error(errors.map(function(error){return error.message}).join("\n\n"))};var _invariant=function(obj){return obj&&obj.__esModule?obj:{default:obj}}(require("../jsutils/invariant")),_visitor=require("../language/visitor"),_validate=require("../type/validate"),_TypeInfo=require("../utilities/TypeInfo"),_specifiedRules=require("./specifiedRules"),_ValidationContext=require("./ValidationContext")},{"../jsutils/invariant":103,"../language/visitor":127,"../type/validate":142,"../utilities/TypeInfo":143,"./ValidationContext":167,"./specifiedRules":202}],204:[function(require,module,exports){"use strict";function isIterable(obj){return!!getIteratorMethod(obj)}function isArrayLike(obj){var length=null!=obj&&obj.length;return"number"==typeof length&&length>=0&&length%1==0}function getIterator(iterable){var method=getIteratorMethod(iterable);if(method)return method.call(iterable)}function getIteratorMethod(iterable){if(null!=iterable){var method=SYMBOL_ITERATOR&&iterable[SYMBOL_ITERATOR]||iterable["@@iterator"];if("function"==typeof method)return method}}function createIterator(collection){if(null!=collection){var iterator=getIterator(collection);if(iterator)return iterator;if(isArrayLike(collection))return new ArrayLikeIterator(collection)}}function ArrayLikeIterator(obj){this._o=obj,this._i=0}function getAsyncIterator(asyncIterable){var method=getAsyncIteratorMethod(asyncIterable);if(method)return method.call(asyncIterable)}function getAsyncIteratorMethod(asyncIterable){if(null!=asyncIterable){var method=SYMBOL_ASYNC_ITERATOR&&asyncIterable[SYMBOL_ASYNC_ITERATOR]||asyncIterable["@@asyncIterator"];if("function"==typeof method)return method}}function createAsyncIterator(source){if(null!=source){var asyncIterator=getAsyncIterator(source);if(asyncIterator)return asyncIterator;var iterator=createIterator(source);if(iterator)return new AsyncFromSyncIterator(iterator)}}function AsyncFromSyncIterator(iterator){this._i=iterator}exports.isIterable=isIterable,exports.isArrayLike=isArrayLike,exports.isCollection=function(obj){return Object(obj)===obj&&(isArrayLike(obj)||isIterable(obj))},exports.getIterator=getIterator,exports.getIteratorMethod=getIteratorMethod,exports.createIterator=createIterator,exports.forEach=function(collection,callback,thisArg){if(null!=collection){if("function"==typeof collection.forEach)return collection.forEach(callback,thisArg);var i=0,iterator=getIterator(collection);if(iterator){for(var step;!(step=iterator.next()).done;)if(callback.call(thisArg,step.value,i++,collection),i>9999999)throw new TypeError("Near-infinite iteration.")}else if(isArrayLike(collection))for(;i=this._o.length?(this._o=void 0,{value:void 0,done:!0}):{value:this._o[this._i++],done:!1}};var SYMBOL_ASYNC_ITERATOR=SYMBOL&&SYMBOL.asyncIterator,$$asyncIterator=exports.$$asyncIterator=SYMBOL_ASYNC_ITERATOR||"@@asyncIterator";AsyncFromSyncIterator.prototype[$$asyncIterator]=function(){return this},AsyncFromSyncIterator.prototype.next=function(){var step=this._i.next();return Promise.resolve(step.value).then(function(value){return{value:value,done:step.done}})}},{}],205:[function(require,module,exports){"use strict";function assign(obj){return Array.prototype.slice.call(arguments,1).forEach(function(source){source&&Object.keys(source).forEach(function(key){obj[key]=source[key]})}),obj}function _class(obj){return Object.prototype.toString.call(obj)}function isString(obj){return"[object String]"===_class(obj)}function isObject(obj){return"[object Object]"===_class(obj)}function isRegExp(obj){return"[object RegExp]"===_class(obj)}function isFunction(obj){return"[object Function]"===_class(obj)}function escapeRE(str){return str.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function isOptionsObj(obj){return Object.keys(obj||{}).reduce(function(acc,k){return acc||defaultOptions.hasOwnProperty(k)},!1)}function resetScanCache(self){self.__index__=-1,self.__text_cache__=""}function createValidator(re){return function(text,pos){var tail=text.slice(pos);return re.test(tail)?tail.match(re)[0].length:0}}function createNormalizer(){return function(match,self){self.normalize(match)}}function compile(self){function untpl(tpl){return tpl.replace("%TLDS%",re.src_tlds)}function schemaError(name,val){throw new Error('(LinkifyIt) Invalid schema "'+name+'": '+val)}var re=self.re=require("./lib/re")(self.__opts__),tlds=self.__tlds__.slice();self.onCompile(),self.__tlds_replaced__||tlds.push(tlds_2ch_src_re),tlds.push(re.src_xn),re.src_tlds=tlds.join("|"),re.email_fuzzy=RegExp(untpl(re.tpl_email_fuzzy),"i"),re.link_fuzzy=RegExp(untpl(re.tpl_link_fuzzy),"i"),re.link_no_ip_fuzzy=RegExp(untpl(re.tpl_link_no_ip_fuzzy),"i"),re.host_fuzzy_test=RegExp(untpl(re.tpl_host_fuzzy_test),"i");var aliases=[];self.__compiled__={},Object.keys(self.__schemas__).forEach(function(name){var val=self.__schemas__[name];if(null!==val){var compiled={validate:null,link:null};if(self.__compiled__[name]=compiled,isObject(val))return isRegExp(val.validate)?compiled.validate=createValidator(val.validate):isFunction(val.validate)?compiled.validate=val.validate:schemaError(name,val),void(isFunction(val.normalize)?compiled.normalize=val.normalize:val.normalize?schemaError(name,val):compiled.normalize=createNormalizer());isString(val)?aliases.push(name):schemaError(name,val)}}),aliases.forEach(function(alias){self.__compiled__[self.__schemas__[alias]]&&(self.__compiled__[alias].validate=self.__compiled__[self.__schemas__[alias]].validate,self.__compiled__[alias].normalize=self.__compiled__[self.__schemas__[alias]].normalize)}),self.__compiled__[""]={validate:null,normalize:createNormalizer()};var slist=Object.keys(self.__compiled__).filter(function(name){return name.length>0&&self.__compiled__[name]}).map(escapeRE).join("|");self.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+re.src_ZPCc+"))("+slist+")","i"),self.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+re.src_ZPCc+"))("+slist+")","ig"),self.re.pretest=RegExp("("+self.re.schema_test.source+")|("+self.re.host_fuzzy_test.source+")|@","i"),resetScanCache(self)}function Match(self,shift){var start=self.__index__,end=self.__last_index__,text=self.__text_cache__.slice(start,end);this.schema=self.__schema__.toLowerCase(),this.index=start+shift,this.lastIndex=end+shift,this.raw=text,this.text=text,this.url=text}function createMatch(self,shift){var match=new Match(self,shift);return self.__compiled__[match.schema].normalize(match,self),match}function LinkifyIt(schemas,options){if(!(this instanceof LinkifyIt))return new LinkifyIt(schemas,options);options||isOptionsObj(schemas)&&(options=schemas,schemas={}),this.__opts__=assign({},defaultOptions,options),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=assign({},defaultSchemas,schemas),this.__compiled__={},this.__tlds__=tlds_default,this.__tlds_replaced__=!1,this.re={},compile(this)}var defaultOptions={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1},defaultSchemas={"http:":{validate:function(text,pos,self){var tail=text.slice(pos);return self.re.http||(self.re.http=new RegExp("^\\/\\/"+self.re.src_auth+self.re.src_host_port_strict+self.re.src_path,"i")),self.re.http.test(tail)?tail.match(self.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(text,pos,self){var tail=text.slice(pos);return self.re.no_http||(self.re.no_http=new RegExp("^"+self.re.src_auth+"(?:localhost|(?:(?:"+self.re.src_domain+")\\.)+"+self.re.src_domain_root+")"+self.re.src_port+self.re.src_host_terminator+self.re.src_path,"i")),self.re.no_http.test(tail)?pos>=3&&":"===text[pos-3]?0:pos>=3&&"/"===text[pos-3]?0:tail.match(self.re.no_http)[0].length:0}},"mailto:":{validate:function(text,pos,self){var tail=text.slice(pos);return self.re.mailto||(self.re.mailto=new RegExp("^"+self.re.src_email_name+"@"+self.re.src_host_strict,"i")),self.re.mailto.test(tail)?tail.match(self.re.mailto)[0].length:0}}},tlds_2ch_src_re="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",tlds_default="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");LinkifyIt.prototype.add=function(schema,definition){return this.__schemas__[schema]=definition,compile(this),this},LinkifyIt.prototype.set=function(options){return this.__opts__=assign(this.__opts__,options),this},LinkifyIt.prototype.test=function(text){if(this.__text_cache__=text,this.__index__=-1,!text.length)return!1;var m,ml,me,len,shift,next,re,tld_pos;if(this.re.schema_test.test(text))for((re=this.re.schema_search).lastIndex=0;null!==(m=re.exec(text));)if(len=this.testSchemaAt(text,m[2],re.lastIndex)){this.__schema__=m[2],this.__index__=m.index+m[1].length,this.__last_index__=m.index+m[0].length+len;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(tld_pos=text.search(this.re.host_fuzzy_test))>=0&&(this.__index__<0||tld_pos=0&&null!==(me=text.match(this.re.email_fuzzy))&&(shift=me.index+me[1].length,next=me.index+me[0].length,(this.__index__<0||shiftthis.__last_index__)&&(this.__schema__="mailto:",this.__index__=shift,this.__last_index__=next)),this.__index__>=0},LinkifyIt.prototype.pretest=function(text){return this.re.pretest.test(text)},LinkifyIt.prototype.testSchemaAt=function(text,schema,pos){return this.__compiled__[schema.toLowerCase()]?this.__compiled__[schema.toLowerCase()].validate(text,pos,this):0},LinkifyIt.prototype.match=function(text){var shift=0,result=[];this.__index__>=0&&this.__text_cache__===text&&(result.push(createMatch(this,shift)),shift=this.__last_index__);for(var tail=shift?text.slice(shift):text;this.test(tail);)result.push(createMatch(this,shift)),tail=tail.slice(this.__last_index__),shift+=this.__last_index__;return result.length?result:null},LinkifyIt.prototype.tlds=function(list,keepOld){return list=Array.isArray(list)?list:[list],keepOld?(this.__tlds__=this.__tlds__.concat(list).sort().filter(function(el,idx,arr){return el!==arr[idx-1]}).reverse(),compile(this),this):(this.__tlds__=list.slice(),this.__tlds_replaced__=!0,compile(this),this)},LinkifyIt.prototype.normalize=function(match){match.schema||(match.url="http://"+match.url),"mailto:"!==match.schema||/^mailto:/i.test(match.url)||(match.url="mailto:"+match.url)},LinkifyIt.prototype.onCompile=function(){},module.exports=LinkifyIt},{"./lib/re":206}],206:[function(require,module,exports){"use strict";module.exports=function(opts){var re={};re.src_Any=require("uc.micro/properties/Any/regex").source,re.src_Cc=require("uc.micro/categories/Cc/regex").source,re.src_Z=require("uc.micro/categories/Z/regex").source,re.src_P=require("uc.micro/categories/P/regex").source,re.src_ZPCc=[re.src_Z,re.src_P,re.src_Cc].join("|"),re.src_ZCc=[re.src_Z,re.src_Cc].join("|");return re.src_pseudo_letter="(?:(?![><|]|"+re.src_ZPCc+")"+re.src_Any+")",re.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",re.src_auth="(?:(?:(?!"+re.src_ZCc+"|[@/\\[\\]()]).)+@)?",re.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",re.src_host_terminator="(?=$|[><|]|"+re.src_ZPCc+")(?!-|_|:\\d|\\.-|\\.(?!$|"+re.src_ZPCc+"))",re.src_path="(?:[/?#](?:(?!"+re.src_ZCc+"|[><|]|[()[\\]{}.,\"'?!\\-]).|\\[(?:(?!"+re.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+re.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+re.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+re.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+re.src_ZCc+"|[']).)+\\'|\\'(?="+re.src_pseudo_letter+"|[-]).|\\.{2,3}[a-zA-Z0-9%/]|\\.(?!"+re.src_ZCc+"|[.]).|"+(opts&&opts["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+"\\,(?!"+re.src_ZCc+").|\\!(?!"+re.src_ZCc+"|[!]).|\\?(?!"+re.src_ZCc+"|[?]).)+|\\/)?",re.src_email_name='[\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]+',re.src_xn="xn--[a-z0-9\\-]{1,59}",re.src_domain_root="(?:"+re.src_xn+"|"+re.src_pseudo_letter+"{1,63})",re.src_domain="(?:"+re.src_xn+"|(?:"+re.src_pseudo_letter+")|(?:"+re.src_pseudo_letter+"(?:-(?!-)|"+re.src_pseudo_letter+"){0,61}"+re.src_pseudo_letter+"))",re.src_host="(?:(?:(?:(?:"+re.src_domain+")\\.)*"+re.src_domain+"))",re.tpl_host_fuzzy="(?:"+re.src_ip4+"|(?:(?:(?:"+re.src_domain+")\\.)+(?:%TLDS%)))",re.tpl_host_no_ip_fuzzy="(?:(?:(?:"+re.src_domain+")\\.)+(?:%TLDS%))",re.src_host_strict=re.src_host+re.src_host_terminator,re.tpl_host_fuzzy_strict=re.tpl_host_fuzzy+re.src_host_terminator,re.src_host_port_strict=re.src_host+re.src_port+re.src_host_terminator,re.tpl_host_port_fuzzy_strict=re.tpl_host_fuzzy+re.src_port+re.src_host_terminator,re.tpl_host_port_no_ip_fuzzy_strict=re.tpl_host_no_ip_fuzzy+re.src_port+re.src_host_terminator,re.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+re.src_ZPCc+"|>|$))",re.tpl_email_fuzzy="(^|[><|]|\\(|"+re.src_ZCc+")("+re.src_email_name+"@"+re.tpl_host_fuzzy_strict+")",re.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+re.src_ZPCc+"))((?![$+<=>^`||])"+re.tpl_host_port_fuzzy_strict+re.src_path+")",re.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+re.src_ZPCc+"))((?![$+<=>^`||])"+re.tpl_host_port_no_ip_fuzzy_strict+re.src_path+")",re}},{"uc.micro/categories/Cc/regex":271,"uc.micro/categories/P/regex":273,"uc.micro/categories/Z/regex":274,"uc.micro/properties/Any/regex":276}],207:[function(require,module,exports){"use strict";module.exports=require("./lib/")},{"./lib/":216}],208:[function(require,module,exports){"use strict";module.exports=require("entities/maps/entities.json")},{"entities/maps/entities.json":67}],209:[function(require,module,exports){"use strict";module.exports=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","meta","nav","noframes","ol","optgroup","option","p","param","section","source","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]},{}],210:[function(require,module,exports){"use strict";var open_tag="<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",close_tag="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",HTML_TAG_RE=new RegExp("^(?:"+open_tag+"|"+close_tag+"|\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e|<[?].*?[?]>|]*>|)"),HTML_OPEN_CLOSE_TAG_RE=new RegExp("^(?:"+open_tag+"|"+close_tag+")");module.exports.HTML_TAG_RE=HTML_TAG_RE,module.exports.HTML_OPEN_CLOSE_TAG_RE=HTML_OPEN_CLOSE_TAG_RE},{}],211:[function(require,module,exports){"use strict";function _class(obj){return Object.prototype.toString.call(obj)}function has(object,key){return _hasOwnProperty.call(object,key)}function isValidEntityCode(c){return!(c>=55296&&c<=57343)&&(!(c>=64976&&c<=65007)&&(65535!=(65535&c)&&65534!=(65535&c)&&(!(c>=0&&c<=8)&&(11!==c&&(!(c>=14&&c<=31)&&(!(c>=127&&c<=159)&&!(c>1114111)))))))}function fromCodePoint(c){if(c>65535){var surrogate1=55296+((c-=65536)>>10),surrogate2=56320+(1023&c);return String.fromCharCode(surrogate1,surrogate2)}return String.fromCharCode(c)}function replaceEntityPattern(match,name){var code=0;return has(entities,name)?entities[name]:35===name.charCodeAt(0)&&DIGITAL_ENTITY_TEST_RE.test(name)&&(code="x"===name[1].toLowerCase()?parseInt(name.slice(2),16):parseInt(name.slice(1),10),isValidEntityCode(code))?fromCodePoint(code):match}function replaceUnsafeChar(ch){return HTML_REPLACEMENTS[ch]}var _hasOwnProperty=Object.prototype.hasOwnProperty,UNESCAPE_MD_RE=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,ENTITY_RE=/&([a-z#][a-z0-9]{1,31});/gi,UNESCAPE_ALL_RE=new RegExp(UNESCAPE_MD_RE.source+"|"+ENTITY_RE.source,"gi"),DIGITAL_ENTITY_TEST_RE=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,entities=require("./entities"),HTML_ESCAPE_TEST_RE=/[&<>"]/,HTML_ESCAPE_REPLACE_RE=/[&<>"]/g,HTML_REPLACEMENTS={"&":"&","<":"<",">":">",'"':"""},REGEXP_ESCAPE_RE=/[.?*+^$[\]\\(){}|-]/g,UNICODE_PUNCT_RE=require("uc.micro/categories/P/regex");exports.lib={},exports.lib.mdurl=require("mdurl"),exports.lib.ucmicro=require("uc.micro"),exports.assign=function(obj){return Array.prototype.slice.call(arguments,1).forEach(function(source){if(source){if("object"!=typeof source)throw new TypeError(source+"must be object");Object.keys(source).forEach(function(key){obj[key]=source[key]})}}),obj},exports.isString=function(obj){return"[object String]"===_class(obj)},exports.has=has,exports.unescapeMd=function(str){return str.indexOf("\\")<0?str:str.replace(UNESCAPE_MD_RE,"$1")},exports.unescapeAll=function(str){return str.indexOf("\\")<0&&str.indexOf("&")<0?str:str.replace(UNESCAPE_ALL_RE,function(match,escaped,entity){return escaped||replaceEntityPattern(match,entity)})},exports.isValidEntityCode=isValidEntityCode,exports.fromCodePoint=fromCodePoint,exports.escapeHtml=function(str){return HTML_ESCAPE_TEST_RE.test(str)?str.replace(HTML_ESCAPE_REPLACE_RE,replaceUnsafeChar):str},exports.arrayReplaceAt=function(src,pos,newElements){return[].concat(src.slice(0,pos),newElements,src.slice(pos+1))},exports.isSpace=function(code){switch(code){case 9:case 32:return!0}return!1},exports.isWhiteSpace=function(code){if(code>=8192&&code<=8202)return!0;switch(code){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1},exports.isMdAsciiPunct=function(ch){switch(ch){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}},exports.isPunctChar=function(ch){return UNICODE_PUNCT_RE.test(ch)},exports.escapeRE=function(str){return str.replace(REGEXP_ESCAPE_RE,"\\$&")},exports.normalizeReference=function(str){return str.trim().replace(/\s+/g," ").toUpperCase()}},{"./entities":208,mdurl:262,"uc.micro":275,"uc.micro/categories/P/regex":273}],212:[function(require,module,exports){"use strict";exports.parseLinkLabel=require("./parse_link_label"),exports.parseLinkDestination=require("./parse_link_destination"),exports.parseLinkTitle=require("./parse_link_title")},{"./parse_link_destination":213,"./parse_link_label":214,"./parse_link_title":215}],213:[function(require,module,exports){"use strict";var isSpace=require("../common/utils").isSpace,unescapeAll=require("../common/utils").unescapeAll;module.exports=function(str,pos,max){var code,level,start=pos,result={ok:!1,pos:0,lines:0,str:""};if(60===str.charCodeAt(pos)){for(pos++;pos=max)return result;if(34!==(marker=str.charCodeAt(pos))&&39!==marker&&40!==marker)return result;for(pos++,40===marker&&(marker=41);pos=0))try{parsed.hostname=punycode.toASCII(parsed.hostname)}catch(er){}return mdurl.encode(mdurl.format(parsed))}function normalizeLinkText(url){var parsed=mdurl.parse(url,!0);if(parsed.hostname&&(!parsed.protocol||RECODE_HOSTNAME_FOR.indexOf(parsed.protocol)>=0))try{parsed.hostname=punycode.toUnicode(parsed.hostname)}catch(er){}return mdurl.decode(mdurl.format(parsed))}function MarkdownIt(presetName,options){if(!(this instanceof MarkdownIt))return new MarkdownIt(presetName,options);options||utils.isString(presetName)||(options=presetName||{},presetName="default"),this.inline=new ParserInline,this.block=new ParserBlock,this.core=new ParserCore,this.renderer=new Renderer,this.linkify=new LinkifyIt,this.validateLink=validateLink,this.normalizeLink=normalizeLink,this.normalizeLinkText=normalizeLinkText,this.utils=utils,this.helpers=utils.assign({},helpers),this.options={},this.configure(presetName),options&&this.set(options)}var utils=require("./common/utils"),helpers=require("./helpers"),Renderer=require("./renderer"),ParserCore=require("./parser_core"),ParserBlock=require("./parser_block"),ParserInline=require("./parser_inline"),LinkifyIt=require("linkify-it"),mdurl=require("mdurl"),punycode=require("punycode"),config={default:require("./presets/default"),zero:require("./presets/zero"),commonmark:require("./presets/commonmark")},BAD_PROTO_RE=/^(vbscript|javascript|file|data):/,GOOD_DATA_RE=/^data:image\/(gif|png|jpeg|webp);/,RECODE_HOSTNAME_FOR=["http:","https:","mailto:"];MarkdownIt.prototype.set=function(options){return utils.assign(this.options,options),this},MarkdownIt.prototype.configure=function(presets){var presetName,self=this;if(utils.isString(presets)&&(presetName=presets,!(presets=config[presetName])))throw new Error('Wrong `markdown-it` preset "'+presetName+'", check name');if(!presets)throw new Error("Wrong `markdown-it` preset, can't be empty");return presets.options&&self.set(presets.options),presets.components&&Object.keys(presets.components).forEach(function(name){presets.components[name].rules&&self[name].ruler.enableOnly(presets.components[name].rules),presets.components[name].rules2&&self[name].ruler2.enableOnly(presets.components[name].rules2)}),this},MarkdownIt.prototype.enable=function(list,ignoreInvalid){var result=[];Array.isArray(list)||(list=[list]),["core","block","inline"].forEach(function(chain){result=result.concat(this[chain].ruler.enable(list,!0))},this),result=result.concat(this.inline.ruler2.enable(list,!0));var missed=list.filter(function(name){return result.indexOf(name)<0});if(missed.length&&!ignoreInvalid)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+missed);return this},MarkdownIt.prototype.disable=function(list,ignoreInvalid){var result=[];Array.isArray(list)||(list=[list]),["core","block","inline"].forEach(function(chain){result=result.concat(this[chain].ruler.disable(list,!0))},this),result=result.concat(this.inline.ruler2.disable(list,!0));var missed=list.filter(function(name){return result.indexOf(name)<0});if(missed.length&&!ignoreInvalid)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+missed);return this},MarkdownIt.prototype.use=function(plugin){var args=[this].concat(Array.prototype.slice.call(arguments,1));return plugin.apply(plugin,args),this},MarkdownIt.prototype.parse=function(src,env){if("string"!=typeof src)throw new Error("Input data should be a String");var state=new this.core.State(src,this,env);return this.core.process(state),state.tokens},MarkdownIt.prototype.render=function(src,env){return env=env||{},this.renderer.render(this.parse(src,env),this.options,env)},MarkdownIt.prototype.parseInline=function(src,env){var state=new this.core.State(src,this,env);return state.inlineMode=!0,this.core.process(state),state.tokens},MarkdownIt.prototype.renderInline=function(src,env){return env=env||{},this.renderer.render(this.parseInline(src,env),this.options,env)},module.exports=MarkdownIt},{"./common/utils":211,"./helpers":212,"./parser_block":217,"./parser_core":218,"./parser_inline":219,"./presets/commonmark":220,"./presets/default":221,"./presets/zero":222,"./renderer":223,"linkify-it":205,mdurl:262,punycode:270}],217:[function(require,module,exports){"use strict";function ParserBlock(){this.ruler=new Ruler;for(var i=0;i<_rules.length;i++)this.ruler.push(_rules[i][0],_rules[i][1],{alt:(_rules[i][2]||[]).slice()})}var Ruler=require("./ruler"),_rules=[["table",require("./rules_block/table"),["paragraph","reference"]],["code",require("./rules_block/code")],["fence",require("./rules_block/fence"),["paragraph","reference","blockquote","list"]],["blockquote",require("./rules_block/blockquote"),["paragraph","reference","blockquote","list"]],["hr",require("./rules_block/hr"),["paragraph","reference","blockquote","list"]],["list",require("./rules_block/list"),["paragraph","reference","blockquote"]],["reference",require("./rules_block/reference")],["heading",require("./rules_block/heading"),["paragraph","reference","blockquote"]],["lheading",require("./rules_block/lheading")],["html_block",require("./rules_block/html_block"),["paragraph","reference","blockquote"]],["paragraph",require("./rules_block/paragraph")]];ParserBlock.prototype.tokenize=function(state,startLine,endLine){for(var i,rules=this.ruler.getRules(""),len=rules.length,line=startLine,hasEmptyLines=!1,maxNesting=state.md.options.maxNesting;line=endLine))&&!(state.sCount[line]=maxNesting){state.line=endLine;break}for(i=0;i=end)break}else state.pending+=state.src[state.pos++]}state.pending&&state.pushPending()},ParserInline.prototype.parse=function(str,md,env,outTokens){var i,rules,len,state=new this.State(str,md,env,outTokens);for(this.tokenize(state),len=(rules=this.ruler2.getRules("")).length,i=0;i"+escapeHtml(tokens[idx].content)+"
"},default_rules.code_block=function(tokens,idx,options,env,slf){var token=tokens[idx];return""+escapeHtml(tokens[idx].content)+"
\n"},default_rules.fence=function(tokens,idx,options,env,slf){var highlighted,i,tmpAttrs,tmpToken,token=tokens[idx],info=token.info?unescapeAll(token.info).trim():"",langName="";return info&&(langName=info.split(/\s+/g)[0]),0===(highlighted=options.highlight?options.highlight(token.content,langName)||escapeHtml(token.content):escapeHtml(token.content)).indexOf(""+highlighted+"
\n"):""+highlighted+"
\n"},default_rules.image=function(tokens,idx,options,env,slf){var token=tokens[idx];return token.attrs[token.attrIndex("alt")][1]=slf.renderInlineAsText(token.children,options,env),slf.renderToken(tokens,idx,options)},default_rules.hardbreak=function(tokens,idx,options){return options.xhtmlOut?" \n":" \n"},default_rules.softbreak=function(tokens,idx,options){return options.breaks?options.xhtmlOut?" \n":" \n":"\n"},default_rules.text=function(tokens,idx){return escapeHtml(tokens[idx].content)},default_rules.html_block=function(tokens,idx){return tokens[idx].content},default_rules.html_inline=function(tokens,idx){return tokens[idx].content},Renderer.prototype.renderAttrs=function(token){var i,l,result;if(!token.attrs)return"";for(result="",i=0,l=token.attrs.length;i\n":">")},Renderer.prototype.renderInline=function(tokens,options,env){for(var type,result="",rules=this.rules,i=0,len=tokens.length;i=4)return!1;if(62!==state.src.charCodeAt(pos++))return!1;if(silent)return!0;for(initial=offset=state.sCount[startLine]+pos-(state.bMarks[startLine]+state.tShift[startLine]),32===state.src.charCodeAt(pos)?(pos++,initial++,offset++,adjustTab=!1,spaceAfterMarker=!0):9===state.src.charCodeAt(pos)?(spaceAfterMarker=!0,(state.bsCount[startLine]+offset)%4==3?(pos++,initial++,offset++,adjustTab=!1):adjustTab=!0):spaceAfterMarker=!1,oldBMarks=[state.bMarks[startLine]],state.bMarks[startLine]=pos;pos=max,oldSCount=[state.sCount[startLine]],state.sCount[startLine]=offset-initial,oldTShift=[state.tShift[startLine]],state.tShift[startLine]=pos-state.bMarks[startLine],terminatorRules=state.md.block.ruler.getRules("blockquote"),oldParentType=state.parentType,state.parentType="blockquote",wasOutdented=!1,nextLine=startLine+1;nextLine=max));nextLine++)if(62!==state.src.charCodeAt(pos++)||wasOutdented){if(lastLineEmpty)break;for(terminate=!1,i=0,l=terminatorRules.length;i=max,oldBSCount.push(state.bsCount[nextLine]),state.bsCount[nextLine]=state.sCount[nextLine]+1+(spaceAfterMarker?1:0),oldSCount.push(state.sCount[nextLine]),state.sCount[nextLine]=offset-initial,oldTShift.push(state.tShift[nextLine]),state.tShift[nextLine]=pos-state.bMarks[nextLine]}for(oldIndent=state.blkIndent,state.blkIndent=0,(token=state.push("blockquote_open","blockquote",1)).markup=">",token.map=lines=[startLine,0],state.md.block.tokenize(state,startLine,nextLine),(token=state.push("blockquote_close","blockquote",-1)).markup=">",state.lineMax=oldLineMax,state.parentType=oldParentType,lines[1]=state.line,i=0;i=4))break;last=++nextLine}return state.line=last,token=state.push("code_block","code",0),token.content=state.getLines(startLine,last,4+state.blkIndent,!0),token.map=[startLine,state.line],!0}},{}],227:[function(require,module,exports){"use strict";module.exports=function(state,startLine,endLine,silent){var marker,len,params,nextLine,mem,token,markup,haveEndMarker=!1,pos=state.bMarks[startLine]+state.tShift[startLine],max=state.eMarks[startLine];if(state.sCount[startLine]-state.blkIndent>=4)return!1;if(pos+3>max)return!1;if(126!==(marker=state.src.charCodeAt(pos))&&96!==marker)return!1;if(mem=pos,pos=state.skipChars(pos,marker),(len=pos-mem)<3)return!1;if(markup=state.src.slice(mem,pos),(params=state.src.slice(pos,max)).indexOf(String.fromCharCode(marker))>=0)return!1;if(silent)return!0;for(nextLine=startLine;!(++nextLine>=endLine)&&(pos=mem=state.bMarks[nextLine]+state.tShift[nextLine],max=state.eMarks[nextLine],!(pos=4||(pos=state.skipChars(pos,marker))-mem=4)return!1;if(35!==(ch=state.src.charCodeAt(pos))||pos>=max)return!1;for(level=1,ch=state.src.charCodeAt(++pos);35===ch&&pos6||pospos&&isSpace(state.src.charCodeAt(tmp-1))&&(max=tmp),state.line=startLine+1,token=state.push("heading_open","h"+String(level),1),token.markup="########".slice(0,level),token.map=[startLine,state.line],token=state.push("inline","",0),token.content=state.src.slice(pos,max).trim(),token.map=[startLine,state.line],token.children=[],token=state.push("heading_close","h"+String(level),-1),token.markup="########".slice(0,level),!0))}},{"../common/utils":211}],229:[function(require,module,exports){"use strict";var isSpace=require("../common/utils").isSpace;module.exports=function(state,startLine,endLine,silent){var marker,cnt,ch,token,pos=state.bMarks[startLine]+state.tShift[startLine],max=state.eMarks[startLine];if(state.sCount[startLine]-state.blkIndent>=4)return!1;if(42!==(marker=state.src.charCodeAt(pos++))&&45!==marker&&95!==marker)return!1;for(cnt=1;pos|$))/i,/<\/(script|pre|style)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^?("+block_names.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(HTML_OPEN_CLOSE_TAG_RE.source+"\\s*$"),/^$/,!1]];module.exports=function(state,startLine,endLine,silent){var i,nextLine,token,lineText,pos=state.bMarks[startLine]+state.tShift[startLine],max=state.eMarks[startLine];if(state.sCount[startLine]-state.blkIndent>=4)return!1;if(!state.md.options.html)return!1;if(60!==state.src.charCodeAt(pos))return!1;for(lineText=state.src.slice(pos,max),i=0;i=4)return!1;for(oldParentType=state.parentType,state.parentType="paragraph";nextLine3)){if(state.sCount[nextLine]>=state.blkIndent&&(pos=state.bMarks[nextLine]+state.tShift[nextLine],max=state.eMarks[nextLine],pos=max))){level=61===marker?1:2;break}if(!(state.sCount[nextLine]<0)){for(terminate=!1,i=0,l=terminatorRules.length;i=max)return-1;if((ch=state.src.charCodeAt(pos++))<48||ch>57)return-1;for(;;){if(pos>=max)return-1;if(!((ch=state.src.charCodeAt(pos++))>=48&&ch<=57)){if(41===ch||46===ch)break;return-1}if(pos-start>=10)return-1}return pos=4)return!1;if(silent&&"paragraph"===state.parentType&&state.tShift[startLine]>=state.blkIndent&&(isTerminatingParagraph=!0),(posAfterMarker=skipOrderedListMarker(state,startLine))>=0){if(isOrdered=!0,start=state.bMarks[startLine]+state.tShift[startLine],markerValue=Number(state.src.substr(start,posAfterMarker-start-1)),isTerminatingParagraph&&1!==markerValue)return!1}else{if(!((posAfterMarker=skipBulletListMarker(state,startLine))>=0))return!1;isOrdered=!1}if(isTerminatingParagraph&&state.skipSpaces(posAfterMarker)>=state.eMarks[startLine])return!1;if(markerCharCode=state.src.charCodeAt(posAfterMarker-1),silent)return!0;for(listTokIdx=state.tokens.length,isOrdered?(token=state.push("ordered_list_open","ol",1),1!==markerValue&&(token.attrs=[["start",markerValue]])):token=state.push("bullet_list_open","ul",1),token.map=listLines=[startLine,0],token.markup=String.fromCharCode(markerCharCode),nextLine=startLine,prevEmptyEnd=!1,terminatorRules=state.md.block.ruler.getRules("list"),oldParentType=state.parentType,state.parentType="list";nextLine=max?1:offset-initial)>4&&(indentAfterMarker=1),indent=initial+indentAfterMarker,token=state.push("list_item_open","li",1),token.markup=String.fromCharCode(markerCharCode),token.map=itemLines=[startLine,0],oldIndent=state.blkIndent,oldTight=state.tight,oldTShift=state.tShift[startLine],oldLIndent=state.sCount[startLine],state.blkIndent=indent,state.tight=!0,state.tShift[startLine]=contentStart-state.bMarks[startLine],state.sCount[startLine]=offset,contentStart>=max&&state.isEmpty(startLine+1)?state.line=Math.min(state.line+2,endLine):state.md.block.tokenize(state,startLine,endLine,!0),state.tight&&!prevEmptyEnd||(tight=!1),prevEmptyEnd=state.line-startLine>1&&state.isEmpty(state.line-1),state.blkIndent=oldIndent,state.tShift[startLine]=oldTShift,state.sCount[startLine]=oldLIndent,state.tight=oldTight,token=state.push("list_item_close","li",-1),token.markup=String.fromCharCode(markerCharCode),nextLine=startLine=state.line,itemLines[1]=nextLine,contentStart=state.bMarks[startLine],nextLine>=endLine)break;if(state.sCount[nextLine]3||state.sCount[nextLine]<0)){for(terminate=!1,i=0,l=terminatorRules.length;i=4)return!1;if(91!==state.src.charCodeAt(pos))return!1;for(;++pos3||state.sCount[nextLine]<0)){for(terminate=!1,i=0,l=terminatorRules.length;i0&&this.level++,this.tokens.push(token),token},StateBlock.prototype.isEmpty=function(line){return this.bMarks[line]+this.tShift[line]>=this.eMarks[line]},StateBlock.prototype.skipEmptyLines=function(from){for(var max=this.lineMax;frommin;)if(!isSpace(this.src.charCodeAt(--pos)))return pos+1;return pos},StateBlock.prototype.skipChars=function(pos,code){for(var max=this.src.length;posmin;)if(code!==this.src.charCodeAt(--pos))return pos+1;return pos},StateBlock.prototype.getLines=function(begin,end,indent,keepLastLF){var i,lineIndent,ch,first,last,queue,lineStart,line=begin;if(begin>=end)return"";for(queue=new Array(end-begin),i=0;lineindent?new Array(lineIndent-indent+1).join(" ")+this.src.slice(first,last):this.src.slice(first,last)}return queue.join("")},StateBlock.prototype.Token=Token,module.exports=StateBlock},{"../common/utils":211,"../token":258}],236:[function(require,module,exports){"use strict";function getLine(state,line){var pos=state.bMarks[line]+state.blkIndent,max=state.eMarks[line];return state.src.substr(pos,max-pos)}function escapedSplit(str){var ch,result=[],pos=0,max=str.length,escapes=0,lastPos=0,backTicked=!1,lastBackTick=0;for(ch=str.charCodeAt(pos);posendLine)return!1;if(nextLine=startLine+1,state.sCount[nextLine]=4)return!1;if((pos=state.bMarks[nextLine]+state.tShift[nextLine])>=state.eMarks[nextLine])return!1;if(124!==(ch=state.src.charCodeAt(pos++))&&45!==ch&&58!==ch)return!1;for(;pos=4)return!1;if(columns=escapedSplit(lineText.replace(/^\||\|$/g,"")),(columnCount=columns.length)>aligns.length)return!1;if(silent)return!0;for((token=state.push("table_open","table",1)).map=tableLines=[startLine,0],(token=state.push("thead_open","thead",1)).map=[startLine,startLine+1],(token=state.push("tr_open","tr",1)).map=[startLine,startLine+1],i=0;i=4);nextLine++){for(columns=escapedSplit(lineText.replace(/^\||\|$/g,"")),token=state.push("tr_open","tr",1),i=0;i\s]/i.test(str)}function isLinkClose(str){return/^<\/a\s*>/i.test(str)}var arrayReplaceAt=require("../common/utils").arrayReplaceAt;module.exports=function(state){var i,j,l,tokens,token,currentToken,nodes,ln,text,pos,lastPos,level,htmlLinkLevel,url,fullUrl,urlText,links,blockTokens=state.tokens;if(state.md.options.linkify)for(j=0,l=blockTokens.length;j=0;i--)if("link_close"!==(currentToken=tokens[i]).type){if("html_inline"===currentToken.type&&(isLinkOpen(currentToken.content)&&htmlLinkLevel>0&&htmlLinkLevel--,isLinkClose(currentToken.content)&&htmlLinkLevel++),!(htmlLinkLevel>0)&&"text"===currentToken.type&&state.md.linkify.test(currentToken.content)){for(text=currentToken.content,links=state.md.linkify.match(text),nodes=[],level=currentToken.level,lastPos=0,ln=0;lnlastPos&&((token=new state.Token("text","",0)).content=text.slice(lastPos,pos),token.level=level,nodes.push(token)),(token=new state.Token("link_open","a",1)).attrs=[["href",fullUrl]],token.level=level++,token.markup="linkify",token.info="auto",nodes.push(token),(token=new state.Token("text","",0)).content=urlText,token.level=level,nodes.push(token),(token=new state.Token("link_close","a",-1)).level=--level,token.markup="linkify",token.info="auto",nodes.push(token),lastPos=links[ln].lastIndex);lastPos=0;i--)"text"!==(token=inlineTokens[i]).type||inside_autolink||(token.content=token.content.replace(SCOPED_ABBR_RE,replaceFn)),"link_open"===token.type&&"auto"===token.info&&inside_autolink--,"link_close"===token.type&&"auto"===token.info&&inside_autolink++}function replace_rare(inlineTokens){var i,token,inside_autolink=0;for(i=inlineTokens.length-1;i>=0;i--)"text"!==(token=inlineTokens[i]).type||inside_autolink||RARE_RE.test(token.content)&&(token.content=token.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---([^-]|$)/gm,"$1—$2").replace(/(^|\s)--(\s|$)/gm,"$1–$2").replace(/(^|[^-\s])--([^-\s]|$)/gm,"$1–$2")),"link_open"===token.type&&"auto"===token.info&&inside_autolink--,"link_close"===token.type&&"auto"===token.info&&inside_autolink++}var RARE_RE=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,SCOPED_ABBR_TEST_RE=/\((c|tm|r|p)\)/i,SCOPED_ABBR_RE=/\((c|tm|r|p)\)/gi,SCOPED_ABBR={c:"©",r:"®",p:"§",tm:"™"};module.exports=function(state){var blkIdx;if(state.md.options.typographer)for(blkIdx=state.tokens.length-1;blkIdx>=0;blkIdx--)"inline"===state.tokens[blkIdx].type&&(SCOPED_ABBR_TEST_RE.test(state.tokens[blkIdx].content)&&replace_scoped(state.tokens[blkIdx].children),RARE_RE.test(state.tokens[blkIdx].content)&&replace_rare(state.tokens[blkIdx].children))}},{}],242:[function(require,module,exports){"use strict";function replaceAt(str,index,ch){return str.substr(0,index)+ch+str.substr(index+1)}function process_inlines(tokens,state){var i,token,text,t,pos,max,thisLevel,item,lastChar,nextChar,isLastPunctChar,isNextPunctChar,isLastWhiteSpace,isNextWhiteSpace,canOpen,canClose,j,isSingle,stack,openQuote,closeQuote;for(stack=[],i=0;i=0&&!(stack[j].level<=thisLevel);j--);if(stack.length=j+1,"text"===token.type){pos=0,max=(text=token.content).length;OUTER:for(;pos=0)lastChar=text.charCodeAt(t.index-1);else for(j=i-1;j>=0;j--)if("text"===tokens[j].type){lastChar=tokens[j].content.charCodeAt(tokens[j].content.length-1);break}if(nextChar=32,pos=48&&lastChar<=57&&(canClose=canOpen=!1),canOpen&&canClose&&(canOpen=!1,canClose=isNextPunctChar),canOpen||canClose){if(canClose)for(j=stack.length-1;j>=0&&(item=stack[j],!(stack[j].level=0;blkIdx--)"inline"===state.tokens[blkIdx].type&"E_TEST_RE.test(state.tokens[blkIdx].content)&&process_inlines(state.tokens[blkIdx].children,state)}},{"../common/utils":211}],243:[function(require,module,exports){"use strict";function StateCore(src,md,env){this.src=src,this.env=env,this.tokens=[],this.inlineMode=!1,this.md=md}var Token=require("../token");StateCore.prototype.Token=Token,module.exports=StateCore},{"../token":258}],244:[function(require,module,exports){"use strict";var EMAIL_RE=/^<([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/,AUTOLINK_RE=/^<([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)>/;module.exports=function(state,silent){var tail,linkMatch,emailMatch,url,fullUrl,token,pos=state.pos;return 60===state.src.charCodeAt(pos)&&!((tail=state.src.slice(pos)).indexOf(">")<0||(AUTOLINK_RE.test(tail)?(linkMatch=tail.match(AUTOLINK_RE),url=linkMatch[0].slice(1,-1),fullUrl=state.md.normalizeLink(url),!state.md.validateLink(fullUrl)||(silent||((token=state.push("link_open","a",1)).attrs=[["href",fullUrl]],token.markup="autolink",token.info="auto",(token=state.push("text","",0)).content=state.md.normalizeLinkText(url),(token=state.push("link_close","a",-1)).markup="autolink",token.info="auto"),state.pos+=linkMatch[0].length,0)):!EMAIL_RE.test(tail)||(emailMatch=tail.match(EMAIL_RE),url=emailMatch[0].slice(1,-1),fullUrl=state.md.normalizeLink("mailto:"+url),!state.md.validateLink(fullUrl)||(silent||((token=state.push("link_open","a",1)).attrs=[["href",fullUrl]],token.markup="autolink",token.info="auto",(token=state.push("text","",0)).content=state.md.normalizeLinkText(url),(token=state.push("link_close","a",-1)).markup="autolink",token.info="auto"),state.pos+=emailMatch[0].length,0))))}},{}],245:[function(require,module,exports){"use strict";module.exports=function(state,silent){var start,max,marker,matchStart,matchEnd,token,pos=state.pos;if(96!==state.src.charCodeAt(pos))return!1;for(start=pos,pos++,max=state.posMax;pos=0;){if((currDelim=delimiters[j]).open&&currDelim.marker===lastDelim.marker&&currDelim.end<0&&currDelim.level===lastDelim.level&&!((currDelim.close||lastDelim.open)&&void 0!==currDelim.length&&void 0!==lastDelim.length&&(currDelim.length+lastDelim.length)%3==0)){lastDelim.jump=i-j,lastDelim.open=!1,currDelim.end=i,currDelim.jump=0;break}j-=currDelim.jump+1}}},{}],247:[function(require,module,exports){"use strict";module.exports.tokenize=function(state,silent){var i,scanned,start=state.pos,marker=state.src.charCodeAt(start);if(silent)return!1;if(95!==marker&&42!==marker)return!1;for(scanned=state.scanDelims(state.pos,42===marker),i=0;i=0;i--)95!==(startDelim=delimiters[i]).marker&&42!==startDelim.marker||-1!==startDelim.end&&(endDelim=delimiters[startDelim.end],isStrong=i>0&&delimiters[i-1].end===startDelim.end+1&&delimiters[i-1].token===startDelim.token-1&&delimiters[startDelim.end+1].token===endDelim.token+1&&delimiters[i-1].marker===startDelim.marker,ch=String.fromCharCode(startDelim.marker),(token=state.tokens[startDelim.token]).type=isStrong?"strong_open":"em_open",token.tag=isStrong?"strong":"em",token.nesting=1,token.markup=isStrong?ch+ch:ch,token.content="",(token=state.tokens[endDelim.token]).type=isStrong?"strong_close":"em_close",token.tag=isStrong?"strong":"em",token.nesting=-1,token.markup=isStrong?ch+ch:ch,token.content="",isStrong&&(state.tokens[delimiters[i-1].token].content="",state.tokens[delimiters[startDelim.end+1].token].content="",i--))}},{}],248:[function(require,module,exports){"use strict";var entities=require("../common/entities"),has=require("../common/utils").has,isValidEntityCode=require("../common/utils").isValidEntityCode,fromCodePoint=require("../common/utils").fromCodePoint,DIGITAL_RE=/^((?:x[a-f0-9]{1,8}|[0-9]{1,8}));/i,NAMED_RE=/^&([a-z][a-z0-9]{1,31});/i;module.exports=function(state,silent){var code,match,pos=state.pos,max=state.posMax;if(38!==state.src.charCodeAt(pos))return!1;if(pos+1?@[]^_`{|}~-".split("").forEach(function(ch){ESCAPED[ch.charCodeAt(0)]=1}),module.exports=function(state,silent){var ch,pos=state.pos,max=state.posMax;if(92!==state.src.charCodeAt(pos))return!1;if(++pos=97&&lc<=122}var HTML_TAG_RE=require("../common/html_re").HTML_TAG_RE;module.exports=function(state,silent){var ch,match,max,pos=state.pos;return!!state.md.options.html&&(max=state.posMax,!(60!==state.src.charCodeAt(pos)||pos+2>=max)&&(!(33!==(ch=state.src.charCodeAt(pos+1))&&63!==ch&&47!==ch&&!isLetter(ch))&&(!!(match=state.src.slice(pos).match(HTML_TAG_RE))&&(silent||(state.push("html_inline","",0).content=state.src.slice(pos,pos+match[0].length)),state.pos+=match[0].length,!0))))}},{"../common/html_re":210}],251:[function(require,module,exports){"use strict";var normalizeReference=require("../common/utils").normalizeReference,isSpace=require("../common/utils").isSpace;module.exports=function(state,silent){var attrs,code,content,label,labelEnd,labelStart,pos,ref,res,title,token,tokens,start,href="",oldPos=state.pos,max=state.posMax;if(33!==state.src.charCodeAt(state.pos))return!1;if(91!==state.src.charCodeAt(state.pos+1))return!1;if(labelStart=state.pos+2,(labelEnd=state.md.helpers.parseLinkLabel(state,state.pos+1,!1))<0)return!1;if((pos=labelEnd+1)=max)return!1;for(start=pos,(res=state.md.helpers.parseLinkDestination(state.src,pos,state.posMax)).ok&&(href=state.md.normalizeLink(res.str),state.md.validateLink(href)?pos=res.pos:href=""),start=pos;pos=max||41!==state.src.charCodeAt(pos))return state.pos=oldPos,!1;pos++}else{if(void 0===state.env.references)return!1;if(pos=0?label=state.src.slice(start,pos++):pos=labelEnd+1):pos=labelEnd+1,label||(label=state.src.slice(labelStart,labelEnd)),!(ref=state.env.references[normalizeReference(label)]))return state.pos=oldPos,!1;href=ref.href,title=ref.title}return silent||(content=state.src.slice(labelStart,labelEnd),state.md.inline.parse(content,state.md,state.env,tokens=[]),(token=state.push("image","img",0)).attrs=attrs=[["src",href],["alt",""]],token.children=tokens,token.content=content,title&&attrs.push(["title",title])),state.pos=pos,state.posMax=max,!0}},{"../common/utils":211}],252:[function(require,module,exports){"use strict";var normalizeReference=require("../common/utils").normalizeReference,isSpace=require("../common/utils").isSpace;module.exports=function(state,silent){var attrs,code,label,labelEnd,labelStart,pos,res,ref,title,href="",oldPos=state.pos,max=state.posMax,start=state.pos,parseReference=!0;if(91!==state.src.charCodeAt(state.pos))return!1;if(labelStart=state.pos+1,(labelEnd=state.md.helpers.parseLinkLabel(state,state.pos,!0))<0)return!1;if((pos=labelEnd+1)=max)return!1;for(start=pos,(res=state.md.helpers.parseLinkDestination(state.src,pos,state.posMax)).ok&&(href=state.md.normalizeLink(res.str),state.md.validateLink(href)?pos=res.pos:href=""),start=pos;pos=max||41!==state.src.charCodeAt(pos))&&(parseReference=!0),pos++}if(parseReference){if(void 0===state.env.references)return!1;if(pos=0?label=state.src.slice(start,pos++):pos=labelEnd+1):pos=labelEnd+1,label||(label=state.src.slice(labelStart,labelEnd)),!(ref=state.env.references[normalizeReference(label)]))return state.pos=oldPos,!1;href=ref.href,title=ref.title}return silent||(state.pos=labelStart,state.posMax=labelEnd,state.push("link_open","a",1).attrs=attrs=[["href",href]],title&&attrs.push(["title",title]),state.md.inline.tokenize(state),state.push("link_close","a",-1)),state.pos=pos,state.posMax=max,!0}},{"../common/utils":211}],253:[function(require,module,exports){"use strict";var isSpace=require("../common/utils").isSpace;module.exports=function(state,silent){var pmax,max,pos=state.pos;if(10!==state.src.charCodeAt(pos))return!1;for(pmax=state.pending.length-1,max=state.posMax,silent||(pmax>=0&&32===state.pending.charCodeAt(pmax)?pmax>=1&&32===state.pending.charCodeAt(pmax-1)?(state.pending=state.pending.replace(/ +$/,""),state.push("hardbreak","br",0)):(state.pending=state.pending.slice(0,-1),state.push("softbreak","br",0)):state.push("softbreak","br",0)),pos++;pos0&&this.level++,this.pendingLevel=this.level,this.tokens.push(token),token},StateInline.prototype.scanDelims=function(start,canSplitWord){var lastChar,nextChar,count,can_open,can_close,isLastWhiteSpace,isLastPunctChar,isNextWhiteSpace,isNextPunctChar,pos=start,left_flanking=!0,right_flanking=!0,max=this.posMax,marker=this.src.charCodeAt(start);for(lastChar=start>0?this.src.charCodeAt(start-1):32;pos=0&&(value=this.attrs[idx][1]),value},Token.prototype.attrJoin=function(name,value){var idx=this.attrIndex(name);idx<0?this.attrPush([name,value]):this.attrs[idx][1]=this.attrs[idx][1]+" "+value},module.exports=Token},{}],259:[function(require,module,exports){"use strict";function getDecodeCache(exclude){var i,ch,cache=decodeCache[exclude];if(cache)return cache;for(cache=decodeCache[exclude]=[],i=0;i<128;i++)ch=String.fromCharCode(i),cache.push(ch);for(i=0;i=55296&&chr<=57343?"���":String.fromCharCode(chr),i+=6):240==(248&b1)&&i+91114111?result+="����":(chr-=65536,result+=String.fromCharCode(55296+(chr>>10),56320+(1023&chr))),i+=9):result+="�";return result})}var decodeCache={};decode.defaultChars=";/?:@&=+$,#",decode.componentChars="",module.exports=decode},{}],260:[function(require,module,exports){"use strict";function getEncodeCache(exclude){var i,ch,cache=encodeCache[exclude];if(cache)return cache;for(cache=encodeCache[exclude]=[],i=0;i<128;i++)ch=String.fromCharCode(i),/^[0-9a-z]$/i.test(ch)?cache.push(ch):cache.push("%"+("0"+i.toString(16).toUpperCase()).slice(-2));for(i=0;i=55296&&code<=57343){if(code>=55296&&code<=56319&&i+1=56320&&nextCode<=57343){result+=encodeURIComponent(string[i]+string[i+1]),i++;continue}result+="%EF%BF%BD"}else result+=encodeURIComponent(string[i]);return result}var encodeCache={};encode.defaultChars=";/?:@&=+$,-_.!~*'()#",encode.componentChars="-_.!~*'()",module.exports=encode},{}],261:[function(require,module,exports){"use strict";module.exports=function(url){var result="";return result+=url.protocol||"",result+=url.slashes?"//":"",result+=url.auth?url.auth+"@":"",url.hostname&&-1!==url.hostname.indexOf(":")?result+="["+url.hostname+"]":result+=url.hostname||"",result+=url.port?":"+url.port:"",result+=url.pathname||"",result+=url.search||"",result+=url.hash||""}},{}],262:[function(require,module,exports){"use strict";module.exports.encode=require("./encode"),module.exports.decode=require("./decode"),module.exports.format=require("./format"),module.exports.parse=require("./parse")},{"./decode":259,"./encode":260,"./format":261,"./parse":263}],263:[function(require,module,exports){"use strict";function Url(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var protocolPattern=/^([a-z0-9.+-]+:)/i,portPattern=/:[0-9]*$/,simplePathPattern=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,delims=["<",">",'"',"`"," ","\r","\n","\t"],unwise=["{","}","|","\\","^","`"].concat(delims),autoEscape=["'"].concat(unwise),nonHostChars=["%","/","?",";","#"].concat(autoEscape),hostEndingChars=["/","?","#"],hostnamePartPattern=/^[+a-z0-9A-Z_-]{0,63}$/,hostnamePartStart=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,hostlessProtocol={javascript:!0,"javascript:":!0},slashedProtocol={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};Url.prototype.parse=function(url,slashesDenoteHost){var i,l,lowerProto,hec,slashes,rest=url;if(rest=rest.trim(),!slashesDenoteHost&&1===url.split("#").length){var simplePath=simplePathPattern.exec(rest);if(simplePath)return this.pathname=simplePath[1],simplePath[2]&&(this.search=simplePath[2]),this}var proto=protocolPattern.exec(rest);if(proto&&(lowerProto=(proto=proto[0]).toLowerCase(),this.protocol=proto,rest=rest.substr(proto.length)),(slashesDenoteHost||proto||rest.match(/^\/\/[^@\/]+@[^@\/]+/))&&(!(slashes="//"===rest.substr(0,2))||proto&&hostlessProtocol[proto]||(rest=rest.substr(2),this.slashes=!0)),!hostlessProtocol[proto]&&(slashes||proto&&!slashedProtocol[proto])){var hostEnd=-1;for(i=0;i127?newpart+="x":newpart+=part[j];if(!newpart.match(hostnamePartPattern)){var validParts=hostparts.slice(0,i),notHost=hostparts.slice(i+1),bit=part.match(hostnamePartStart);bit&&(validParts.push(bit[1]),notHost.unshift(bit[2])),notHost.length&&(rest=notHost.join(".")+rest),this.hostname=validParts.join(".");break}}}}this.hostname.length>255&&(this.hostname=""),ipv6Hostname&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var hash=rest.indexOf("#");-1!==hash&&(this.hash=rest.substr(hash),rest=rest.slice(0,hash));var qm=rest.indexOf("?");return-1!==qm&&(this.search=rest.substr(qm),rest=rest.slice(0,qm)),rest&&(this.pathname=rest),slashedProtocol[lowerProto]&&this.hostname&&!this.pathname&&(this.pathname=""),this},Url.prototype.parseHost=function(host){var port=portPattern.exec(host);port&&(":"!==(port=port[0])&&(this.port=port.substr(1)),host=host.substr(0,host.length-port.length)),host&&(this.hostname=host)},module.exports=function(url,slashesDenoteHost){if(url&&url instanceof Url)return url;var u=new Url;return u.parse(url,slashesDenoteHost),u}},{}],264:[function(require,module,exports){function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}function runTimeout(fun){if(cachedSetTimeout===setTimeout)return setTimeout(fun,0);if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout)return cachedSetTimeout=setTimeout,setTimeout(fun,0);try{return cachedSetTimeout(fun,0)}catch(e){try{return cachedSetTimeout.call(null,fun,0)}catch(e){return cachedSetTimeout.call(this,fun,0)}}}function runClearTimeout(marker){if(cachedClearTimeout===clearTimeout)return clearTimeout(marker);if((cachedClearTimeout===defaultClearTimeout||!cachedClearTimeout)&&clearTimeout)return cachedClearTimeout=clearTimeout,clearTimeout(marker);try{return cachedClearTimeout(marker)}catch(e){try{return cachedClearTimeout.call(null,marker)}catch(e){return cachedClearTimeout.call(this,marker)}}}function cleanUpNextTick(){draining&¤tQueue&&(draining=!1,currentQueue.length?queue=currentQueue.concat(queue):queueIndex=-1,queue.length&&drainQueue())}function drainQueue(){if(!draining){var timeout=runTimeout(cleanUpNextTick);draining=!0;for(var len=queue.length;len;){for(currentQueue=queue,queue=[];++queueIndex1)for(var i=1;i>",ReactPropTypes={array:createPrimitiveTypeChecker("array"),bool:createPrimitiveTypeChecker("boolean"),func:createPrimitiveTypeChecker("function"),number:createPrimitiveTypeChecker("number"),object:createPrimitiveTypeChecker("object"),string:createPrimitiveTypeChecker("string"),symbol:createPrimitiveTypeChecker("symbol"),any:createChainableTypeChecker(emptyFunction.thatReturnsNull),arrayOf:function(typeChecker){return createChainableTypeChecker(function(props,propName,componentName,location,propFullName){if("function"!=typeof typeChecker)return new PropTypeError("Property `"+propFullName+"` of component `"+componentName+"` has invalid PropType notation inside arrayOf.");var propValue=props[propName];if(!Array.isArray(propValue))return new PropTypeError("Invalid "+location+" `"+propFullName+"` of type `"+getPropType(propValue)+"` supplied to `"+componentName+"`, expected an array.");for(var i=0;i1&&(result=parts[0]+"@",string=parts[1]),result+map((string=string.replace(regexSeparators,".")).split("."),fn).join(".")}function ucs2decode(string){for(var value,extra,output=[],counter=0,length=string.length;counter=55296&&value<=56319&&counter65535&&(output+=stringFromCharCode((value-=65536)>>>10&1023|55296),value=56320|1023&value),output+=stringFromCharCode(value)}).join("")}function basicToDigit(codePoint){return codePoint-48<10?codePoint-22:codePoint-65<26?codePoint-65:codePoint-97<26?codePoint-97:base}function digitToBasic(digit,flag){return digit+22+75*(digit<26)-((0!=flag)<<5)}function adapt(delta,numPoints,firstTime){var k=0;for(delta=firstTime?floor(delta/damp):delta>>1,delta+=floor(delta/numPoints);delta>baseMinusTMin*tMax>>1;k+=base)delta=floor(delta/baseMinusTMin);return floor(k+(baseMinusTMin+1)*delta/(delta+skew))}function decode(input){var out,basic,j,index,oldi,w,k,digit,t,baseMinusT,output=[],inputLength=input.length,i=0,n=initialN,bias=initialBias;for((basic=input.lastIndexOf(delimiter))<0&&(basic=0),j=0;j=128&&error("not-basic"),output.push(input.charCodeAt(j));for(index=basic>0?basic+1:0;index=inputLength&&error("invalid-input"),((digit=basicToDigit(input.charCodeAt(index++)))>=base||digit>floor((maxInt-i)/w))&&error("overflow"),i+=digit*w,t=k<=bias?tMin:k>=bias+tMax?tMax:k-bias,!(digitfloor(maxInt/(baseMinusT=base-t))&&error("overflow"),w*=baseMinusT;bias=adapt(i-oldi,out=output.length+1,0==oldi),floor(i/out)>maxInt-n&&error("overflow"),n+=floor(i/out),i%=out,output.splice(i++,0,n)}return ucs2encode(output)}function encode(input){var n,delta,handledCPCount,basicLength,bias,j,m,q,k,t,currentValue,inputLength,handledCPCountPlusOne,baseMinusT,qMinusT,output=[];for(inputLength=(input=ucs2decode(input)).length,n=initialN,delta=0,bias=initialBias,j=0;j=n&¤tValuefloor((maxInt-delta)/(handledCPCountPlusOne=handledCPCount+1))&&error("overflow"),delta+=(m-n)*handledCPCountPlusOne,n=m,j=0;jmaxInt&&error("overflow"),currentValue==n){for(q=delta,k=base;t=k<=bias?tMin:k>=bias+tMax?tMax:k-bias,!(q= 0x80 (not a basic code point)","invalid-input":"Invalid input"},baseMinusTMin=base-tMin,floor=Math.floor,stringFromCharCode=String.fromCharCode;if(punycode={version:"1.4.1",ucs2:{decode:ucs2decode,encode:ucs2encode},decode:decode,encode:encode,toASCII:function(input){return mapDomain(input,function(string){return regexNonASCII.test(string)?"xn--"+encode(string):string})},toUnicode:function(input){return mapDomain(input,function(string){return regexPunycode.test(string)?decode(string.slice(4).toLowerCase()):string})}},freeExports&&freeModule)if(module.exports==freeExports)freeModule.exports=punycode;else for(key in punycode)punycode.hasOwnProperty(key)&&(freeExports[key]=punycode[key]);else root.punycode=punycode}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],271:[function(require,module,exports){module.exports=/[\0-\x1F\x7F-\x9F]/},{}],272:[function(require,module,exports){module.exports=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804\uDCBD|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/},{}],273:[function(require,module,exports){module.exports=/[!-#%-\*,-/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E44\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD807[\uDC41-\uDC45\uDC70\uDC71]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/},{}],274:[function(require,module,exports){module.exports=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/},{}],275:[function(require,module,exports){"use strict";exports.Any=require("./properties/Any/regex"),exports.Cc=require("./categories/Cc/regex"),exports.Cf=require("./categories/Cf/regex"),exports.P=require("./categories/P/regex"),exports.Z=require("./categories/Z/regex")},{"./categories/Cc/regex":271,"./categories/Cf/regex":272,"./categories/P/regex":273,"./categories/Z/regex":274,"./properties/Any/regex":276}],276:[function(require,module,exports){module.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/},{}],277:[function(require,module,exports){"function"==typeof Object.create?module.exports=function(ctor,superCtor){ctor.super_=superCtor,ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:!1,writable:!0,configurable:!0}})}:module.exports=function(ctor,superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype,ctor.prototype=new TempCtor,ctor.prototype.constructor=ctor}},{}],278:[function(require,module,exports){module.exports=function(arg){return arg&&"object"==typeof arg&&"function"==typeof arg.copy&&"function"==typeof arg.fill&&"function"==typeof arg.readUInt8}},{}],279:[function(require,module,exports){(function(process,global){function inspect(obj,opts){var ctx={seen:[],stylize:stylizeNoColor};return arguments.length>=3&&(ctx.depth=arguments[2]),arguments.length>=4&&(ctx.colors=arguments[3]),isBoolean(opts)?ctx.showHidden=opts:opts&&exports._extend(ctx,opts),isUndefined(ctx.showHidden)&&(ctx.showHidden=!1),isUndefined(ctx.depth)&&(ctx.depth=2),isUndefined(ctx.colors)&&(ctx.colors=!1),isUndefined(ctx.customInspect)&&(ctx.customInspect=!0),ctx.colors&&(ctx.stylize=stylizeWithColor),formatValue(ctx,obj,ctx.depth)}function stylizeWithColor(str,styleType){var style=inspect.styles[styleType];return style?"["+inspect.colors[style][0]+"m"+str+"["+inspect.colors[style][1]+"m":str}function stylizeNoColor(str,styleType){return str}function arrayToHash(array){var hash={};return array.forEach(function(val,idx){hash[val]=!0}),hash}function formatValue(ctx,value,recurseTimes){if(ctx.customInspect&&value&&isFunction(value.inspect)&&value.inspect!==exports.inspect&&(!value.constructor||value.constructor.prototype!==value)){var ret=value.inspect(recurseTimes,ctx);return isString(ret)||(ret=formatValue(ctx,ret,recurseTimes)),ret}var primitive=formatPrimitive(ctx,value);if(primitive)return primitive;var keys=Object.keys(value),visibleKeys=arrayToHash(keys);if(ctx.showHidden&&(keys=Object.getOwnPropertyNames(value)),isError(value)&&(keys.indexOf("message")>=0||keys.indexOf("description")>=0))return formatError(value);if(0===keys.length){if(isFunction(value)){var name=value.name?": "+value.name:"";return ctx.stylize("[Function"+name+"]","special")}if(isRegExp(value))return ctx.stylize(RegExp.prototype.toString.call(value),"regexp");if(isDate(value))return ctx.stylize(Date.prototype.toString.call(value),"date");if(isError(value))return formatError(value)}var base="",array=!1,braces=["{","}"];if(isArray(value)&&(array=!0,braces=["[","]"]),isFunction(value)&&(base=" [Function"+(value.name?": "+value.name:"")+"]"),isRegExp(value)&&(base=" "+RegExp.prototype.toString.call(value)),isDate(value)&&(base=" "+Date.prototype.toUTCString.call(value)),isError(value)&&(base=" "+formatError(value)),0===keys.length&&(!array||0==value.length))return braces[0]+base+braces[1];if(recurseTimes<0)return isRegExp(value)?ctx.stylize(RegExp.prototype.toString.call(value),"regexp"):ctx.stylize("[Object]","special");ctx.seen.push(value);var output;return output=array?formatArray(ctx,value,recurseTimes,visibleKeys,keys):keys.map(function(key){return formatProperty(ctx,value,recurseTimes,visibleKeys,key,array)}),ctx.seen.pop(),reduceToSingleString(output,base,braces)}function formatPrimitive(ctx,value){if(isUndefined(value))return ctx.stylize("undefined","undefined");if(isString(value)){var simple="'"+JSON.stringify(value).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return ctx.stylize(simple,"string")}return isNumber(value)?ctx.stylize(""+value,"number"):isBoolean(value)?ctx.stylize(""+value,"boolean"):isNull(value)?ctx.stylize("null","null"):void 0}function formatError(value){return"["+Error.prototype.toString.call(value)+"]"}function formatArray(ctx,value,recurseTimes,visibleKeys,keys){for(var output=[],i=0,l=value.length;i-1&&(str=array?str.split("\n").map(function(line){return" "+line}).join("\n").substr(2):"\n"+str.split("\n").map(function(line){return" "+line}).join("\n")):str=ctx.stylize("[Circular]","special")),isUndefined(name)){if(array&&key.match(/^\d+$/))return str;(name=JSON.stringify(""+key)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(name=name.substr(1,name.length-2),name=ctx.stylize(name,"name")):(name=name.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),name=ctx.stylize(name,"string"))}return name+": "+str}function reduceToSingleString(output,base,braces){var numLinesEst=0;return output.reduce(function(prev,cur){return numLinesEst++,cur.indexOf("\n")>=0&&numLinesEst++,prev+cur.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?braces[0]+(""===base?"":base+"\n ")+" "+output.join(",\n ")+" "+braces[1]:braces[0]+base+" "+output.join(", ")+" "+braces[1]}function isArray(ar){return Array.isArray(ar)}function isBoolean(arg){return"boolean"==typeof arg}function isNull(arg){return null===arg}function isNumber(arg){return"number"==typeof arg}function isString(arg){return"string"==typeof arg}function isUndefined(arg){return void 0===arg}function isRegExp(re){return isObject(re)&&"[object RegExp]"===objectToString(re)}function isObject(arg){return"object"==typeof arg&&null!==arg}function isDate(d){return isObject(d)&&"[object Date]"===objectToString(d)}function isError(e){return isObject(e)&&("[object Error]"===objectToString(e)||e instanceof Error)}function isFunction(arg){return"function"==typeof arg}function objectToString(o){return Object.prototype.toString.call(o)}function pad(n){return n<10?"0"+n.toString(10):n.toString(10)}function timestamp(){var d=new Date,time=[pad(d.getHours()),pad(d.getMinutes()),pad(d.getSeconds())].join(":");return[d.getDate(),months[d.getMonth()],time].join(" ")}function hasOwnProperty(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop)}var formatRegExp=/%[sdj%]/g;exports.format=function(f){if(!isString(f)){for(var objects=[],i=0;i=len)return x;switch(x){case"%s":return String(args[i++]);case"%d":return Number(args[i++]);case"%j":try{return JSON.stringify(args[i++])}catch(_){return"[Circular]"}default:return x}}),x=args[i];i