UNPKG

cluedin-widget

Version:
1 lines 629 kB
(window.webpackJsonp=window.webpackJsonp||[]).push([[40],{1724:function(e,t,n){"use strict";n.d(t,"R",function(){return h}),n.d(t,"w",function(){return m}),n.d(t,"Q",function(){return v}),n.d(t,"v",function(){return g}),n.d(t,"M",function(){return y}),n.d(t,"t",function(){return b}),n.d(t,"G",function(){return w}),n.d(t,"n",function(){return T}),n.d(t,"S",function(){return O}),n.d(t,"x",function(){return _}),n.d(t,"D",function(){return k}),n.d(t,"k",function(){return E}),n.d(t,"E",function(){return C}),n.d(t,"l",function(){return S}),n.d(t,"I",function(){return x}),n.d(t,"p",function(){return N}),n.d(t,"K",function(){return D}),n.d(t,"r",function(){return j}),n.d(t,"F",function(){return L}),n.d(t,"m",function(){return A}),n.d(t,"N",function(){return I}),n.d(t,"u",function(){return M}),n.d(t,"H",function(){return F}),n.d(t,"o",function(){return R}),n.d(t,"C",function(){return P}),n.d(t,"j",function(){return V}),n.d(t,"B",function(){return B}),n.d(t,"i",function(){return q}),n.d(t,"d",function(){return U}),n.d(t,"e",function(){return z}),n.d(t,"T",function(){return H}),n.d(t,"y",function(){return G}),n.d(t,"L",function(){return W}),n.d(t,"s",function(){return Q}),n.d(t,"A",function(){return K}),n.d(t,"J",function(){return Y}),n.d(t,"q",function(){return J}),n.d(t,"z",function(){return $}),n.d(t,"g",function(){return X}),n.d(t,"f",function(){return ee}),n.d(t,"O",function(){return re}),n.d(t,"c",function(){return ie}),n.d(t,"h",function(){return oe}),n.d(t,"a",function(){return ae}),n.d(t,"b",function(){return se}),n.d(t,"P",function(){return ue});var r=n(1847),i=n(565),o=n(1800),a=n(337),s=n(458),u=n(1739),l=n(57),c=n(1801);function f(e){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){d(e,t,n[t])})}return e}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h(e){return v(e)||y(e)||w(e)||O(e)||k(e)||C(e)||x(e)||D(e)}function m(e){return h(e)||Object(s.a)(0,"Expected ".concat(Object(a.a)(e)," to be a GraphQL type.")),e}function v(e){return Object(o.a)(e,X)}function g(e){return v(e)||Object(s.a)(0,"Expected ".concat(Object(a.a)(e)," to be a GraphQL Scalar type.")),e}function y(e){return Object(o.a)(e,ee)}function b(e){return y(e)||Object(s.a)(0,"Expected ".concat(Object(a.a)(e)," to be a GraphQL Object type.")),e}function w(e){return Object(o.a)(e,ie)}function T(e){return w(e)||Object(s.a)(0,"Expected ".concat(Object(a.a)(e)," to be a GraphQL Interface type.")),e}function O(e){return Object(o.a)(e,oe)}function _(e){return O(e)||Object(s.a)(0,"Expected ".concat(Object(a.a)(e)," to be a GraphQL Union type.")),e}function k(e){return Object(o.a)(e,ae)}function E(e){return k(e)||Object(s.a)(0,"Expected ".concat(Object(a.a)(e)," to be a GraphQL Enum type.")),e}function C(e){return Object(o.a)(e,se)}function S(e){return C(e)||Object(s.a)(0,"Expected ".concat(Object(a.a)(e)," to be a GraphQL Input Object type.")),e}function x(e){return Object(o.a)(e,U)}function N(e){return x(e)||Object(s.a)(0,"Expected ".concat(Object(a.a)(e)," to be a GraphQL List type.")),e}function D(e){return Object(o.a)(e,z)}function j(e){return D(e)||Object(s.a)(0,"Expected ".concat(Object(a.a)(e)," to be a GraphQL Non-Null type.")),e}function L(e){return v(e)||k(e)||C(e)||H(e)&&L(e.ofType)}function A(e){return L(e)||Object(s.a)(0,"Expected ".concat(Object(a.a)(e)," to be a GraphQL input type.")),e}function I(e){return v(e)||y(e)||w(e)||O(e)||k(e)||H(e)&&I(e.ofType)}function M(e){return I(e)||Object(s.a)(0,"Expected ".concat(Object(a.a)(e)," to be a GraphQL output type.")),e}function F(e){return v(e)||k(e)}function R(e){return F(e)||Object(s.a)(0,"Expected ".concat(Object(a.a)(e)," to be a GraphQL leaf type.")),e}function P(e){return y(e)||w(e)||O(e)}function V(e){return P(e)||Object(s.a)(0,"Expected ".concat(Object(a.a)(e)," to be a GraphQL composite type.")),e}function B(e){return w(e)||O(e)}function q(e){return B(e)||Object(s.a)(0,"Expected ".concat(Object(a.a)(e)," to be a GraphQL abstract type.")),e}function U(e){if(!(this instanceof U))return new U(e);this.ofType=m(e)}function z(e){if(!(this instanceof z))return new z(e);this.ofType=Q(e)}function H(e){return x(e)||D(e)}function G(e){return H(e)||Object(s.a)(0,"Expected ".concat(Object(a.a)(e)," to be a GraphQL wrapping type.")),e}function W(e){return h(e)&&!D(e)}function Q(e){return W(e)||Object(s.a)(0,"Expected ".concat(Object(a.a)(e)," to be a GraphQL nullable type.")),e}function K(e){if(e)return D(e)?e.ofType:e}function Y(e){return v(e)||y(e)||w(e)||O(e)||k(e)||C(e)}function J(e){return Y(e)||Object(s.a)(0,"Expected ".concat(Object(a.a)(e)," to be a GraphQL named type.")),e}function $(e){if(e){for(var t=e;H(t);)t=t.ofType;return t}}function Z(e){return"function"==typeof e?e():e}U.prototype.toString=function(){return"["+String(this.ofType)+"]"},Object(r.a)(U),z.prototype.toString=function(){return String(this.ofType)+"!"},Object(r.a)(z);var X=function(){function e(e){d(this,"name",void 0),d(this,"description",void 0),d(this,"serialize",void 0),d(this,"parseValue",void 0),d(this,"parseLiteral",void 0),d(this,"astNode",void 0),d(this,"extensionASTNodes",void 0),this.name=e.name,this.description=e.description,this.serialize=e.serialize,this.parseValue=e.parseValue||function(e){return e},this.parseLiteral=e.parseLiteral||c.a,this.astNode=e.astNode,this.extensionASTNodes=e.extensionASTNodes,"string"!=typeof e.name&&Object(s.a)(0,"Must provide name."),"function"!=typeof e.serialize&&Object(s.a)(0,"".concat(this.name,' must provide "serialize" function. If this custom Scalar ')+'is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.'),(e.parseValue||e.parseLiteral)&&("function"!=typeof e.parseValue||"function"!=typeof e.parseLiteral)&&Object(s.a)(0,"".concat(this.name,' must provide both "parseValue" and "parseLiteral" ')+"functions.")}return e.prototype.toString=function(){return this.name},e}();Object(i.a)(X),Object(r.a)(X);var ee=function(){function e(e){d(this,"name",void 0),d(this,"description",void 0),d(this,"astNode",void 0),d(this,"extensionASTNodes",void 0),d(this,"isTypeOf",void 0),d(this,"_fields",void 0),d(this,"_interfaces",void 0),this.name=e.name,this.description=e.description,this.astNode=e.astNode,this.extensionASTNodes=e.extensionASTNodes,this.isTypeOf=e.isTypeOf,this._fields=te.bind(void 0,e),this._interfaces=function(e){var t=Z(e.interfaces)||[];return Array.isArray(t)||Object(s.a)(0,"".concat(e.name," interfaces must be an Array or a function which returns ")+"an Array."),t}.bind(void 0,e),"string"!=typeof e.name&&Object(s.a)(0,"Must provide name."),null!=e.isTypeOf&&"function"!=typeof e.isTypeOf&&Object(s.a)(0,"".concat(this.name,' must provide "isTypeOf" as a function, ')+"but got: ".concat(Object(a.a)(e.isTypeOf),"."))}var t=e.prototype;return t.getFields=function(){return"function"==typeof this._fields&&(this._fields=this._fields()),this._fields},t.getInterfaces=function(){return"function"==typeof this._interfaces&&(this._interfaces=this._interfaces()),this._interfaces},t.toString=function(){return this.name},e}();function te(e){var t=Z(e.fields)||{};ne(t)||Object(s.a)(0,"".concat(e.name," fields must be an object with field names as keys or a ")+"function which returns such an object.");for(var n=Object.create(null),r=Object.keys(t),i=function(){var i=r[o],u=t[i];ne(u)||Object(s.a)(0,"".concat(e.name,".").concat(i," field config must be an object")),u.hasOwnProperty("isDeprecated")&&Object(s.a)(0,"".concat(e.name,".").concat(i,' should provide "deprecationReason" ')+'instead of "isDeprecated".');var l=p({},u,{isDeprecated:Boolean(u.deprecationReason),name:i});null!=l.resolve&&"function"!=typeof l.resolve&&Object(s.a)(0,"".concat(e.name,".").concat(i," field resolver must be a function if ")+"provided, but got: ".concat(Object(a.a)(l.resolve),"."));var c=u.args;c?(ne(c)||Object(s.a)(0,"".concat(e.name,".").concat(i," args must be an object with argument ")+"names as keys."),l.args=Object.keys(c).map(function(e){var t=c[e];return{name:e,description:void 0===t.description?null:t.description,type:t.type,defaultValue:t.defaultValue,astNode:t.astNode}})):l.args=[],n[i]=l},o=0;o<r.length;o++)i();return n}function ne(e){return e&&"object"===f(e)&&!Array.isArray(e)}function re(e){return D(e.type)&&void 0===e.defaultValue}Object(i.a)(ee),Object(r.a)(ee);var ie=function(){function e(e){d(this,"name",void 0),d(this,"description",void 0),d(this,"astNode",void 0),d(this,"extensionASTNodes",void 0),d(this,"resolveType",void 0),d(this,"_fields",void 0),this.name=e.name,this.description=e.description,this.astNode=e.astNode,this.extensionASTNodes=e.extensionASTNodes,this.resolveType=e.resolveType,this._fields=te.bind(void 0,e),"string"!=typeof e.name&&Object(s.a)(0,"Must provide name."),null!=e.resolveType&&"function"!=typeof e.resolveType&&Object(s.a)(0,"".concat(this.name,' must provide "resolveType" as a function, ')+"but got: ".concat(Object(a.a)(e.resolveType),"."))}var t=e.prototype;return t.getFields=function(){return"function"==typeof this._fields&&(this._fields=this._fields()),this._fields},t.toString=function(){return this.name},e}();Object(i.a)(ie),Object(r.a)(ie);var oe=function(){function e(e){d(this,"name",void 0),d(this,"description",void 0),d(this,"astNode",void 0),d(this,"extensionASTNodes",void 0),d(this,"resolveType",void 0),d(this,"_types",void 0),this.name=e.name,this.description=e.description,this.astNode=e.astNode,this.extensionASTNodes=e.extensionASTNodes,this.resolveType=e.resolveType,this._types=function(e){var t=Z(e.types)||[];return Array.isArray(t)||Object(s.a)(0,"Must provide Array of types or a function which returns "+"such an array for Union ".concat(e.name,".")),t}.bind(void 0,e),"string"!=typeof e.name&&Object(s.a)(0,"Must provide name."),null!=e.resolveType&&"function"!=typeof e.resolveType&&Object(s.a)(0,"".concat(this.name,' must provide "resolveType" as a function, ')+"but got: ".concat(Object(a.a)(e.resolveType),"."))}var t=e.prototype;return t.getTypes=function(){return"function"==typeof this._types&&(this._types=this._types()),this._types},t.toString=function(){return this.name},e}();Object(i.a)(oe),Object(r.a)(oe);var ae=function(){function e(e){var t,n;d(this,"name",void 0),d(this,"description",void 0),d(this,"astNode",void 0),d(this,"extensionASTNodes",void 0),d(this,"_values",void 0),d(this,"_valueLookup",void 0),d(this,"_nameLookup",void 0),this.name=e.name,this.description=e.description,this.astNode=e.astNode,this.extensionASTNodes=e.extensionASTNodes,this._values=(t=this,ne(n=e.values)||Object(s.a)(0,"".concat(t.name," values must be an object with value names as keys.")),Object.keys(n).map(function(e){var r=n[e];return ne(r)||Object(s.a)(0,"".concat(t.name,".").concat(e,' must refer to an object with a "value" key ')+"representing an internal value but got: ".concat(Object(a.a)(r),".")),r.hasOwnProperty("isDeprecated")&&Object(s.a)(0,"".concat(t.name,".").concat(e,' should provide "deprecationReason" instead ')+'of "isDeprecated".'),{name:e,description:r.description,isDeprecated:Boolean(r.deprecationReason),deprecationReason:r.deprecationReason,astNode:r.astNode,value:r.hasOwnProperty("value")?r.value:e}})),this._valueLookup=new Map(this._values.map(function(e){return[e.value,e]})),this._nameLookup=Object(u.a)(this._values,function(e){return e.name}),"string"!=typeof e.name&&Object(s.a)(0,"Must provide name.")}var t=e.prototype;return t.getValues=function(){return this._values},t.getValue=function(e){return this._nameLookup[e]},t.serialize=function(e){var t=this._valueLookup.get(e);if(t)return t.name},t.parseValue=function(e){if("string"==typeof e){var t=this.getValue(e);if(t)return t.value}},t.parseLiteral=function(e,t){if(e.kind===l.a.ENUM){var n=this.getValue(e.value);if(n)return n.value}},t.toString=function(){return this.name},e}();Object(i.a)(ae),Object(r.a)(ae);var se=function(){function e(e){d(this,"name",void 0),d(this,"description",void 0),d(this,"astNode",void 0),d(this,"extensionASTNodes",void 0),d(this,"_fields",void 0),this.name=e.name,this.description=e.description,this.astNode=e.astNode,this.extensionASTNodes=e.extensionASTNodes,this._fields=function(e){var t=Z(e.fields)||{};ne(t)||Object(s.a)(0,"".concat(e.name," fields must be an object with field names as keys or a ")+"function which returns such an object.");for(var n=Object.create(null),r=Object.keys(t),i=0;i<r.length;i++){var o=r[i],a=p({},t[o],{name:o});a.hasOwnProperty("resolve")&&Object(s.a)(0,"".concat(e.name,".").concat(o," field has a resolve property, but ")+"Input Types cannot define resolvers."),n[o]=a}return n}.bind(void 0,e),"string"!=typeof e.name&&Object(s.a)(0,"Must provide name.")}var t=e.prototype;return t.getFields=function(){return"function"==typeof this._fields&&(this._fields=this._fields()),this._fields},t.toString=function(){return this.name},e}();function ue(e){return D(e.type)&&void 0===e.defaultValue}Object(i.a)(se),Object(r.a)(se)},1728:function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty;function i(e,t){return r.call(e,t)}function o(e){return!(e>=55296&&e<=57343)&&(!(e>=64976&&e<=65007)&&(65535!=(65535&e)&&65534!=(65535&e)&&(!(e>=0&&e<=8)&&(11!==e&&(!(e>=14&&e<=31)&&(!(e>=127&&e<=159)&&!(e>1114111)))))))}function a(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}var s=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,u=new RegExp(s.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),l=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,c=n(1849);var f=/[&<>"]/,p=/[&<>"]/g,d={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function h(e){return d[e]}var m=/[.?*+^$[\]\\(){}|-]/g;var v=n(1804);t.lib={},t.lib.mdurl=n(1850),t.lib.ucmicro=n(2088),t.assign=function(e){return Array.prototype.slice.call(arguments,1).forEach(function(t){if(t){if("object"!=typeof t)throw new TypeError(t+"must be object");Object.keys(t).forEach(function(n){e[n]=t[n]})}}),e},t.isString=function(e){return"[object String]"===function(e){return Object.prototype.toString.call(e)}(e)},t.has=i,t.unescapeMd=function(e){return e.indexOf("\\")<0?e:e.replace(s,"$1")},t.unescapeAll=function(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(u,function(e,t,n){return t||function(e,t){var n=0;return i(c,t)?c[t]:35===t.charCodeAt(0)&&l.test(t)&&o(n="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10))?a(n):e}(e,n)})},t.isValidEntityCode=o,t.fromCodePoint=a,t.escapeHtml=function(e){return f.test(e)?e.replace(p,h):e},t.arrayReplaceAt=function(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))},t.isSpace=function(e){switch(e){case 9:case 32:return!0}return!1},t.isWhiteSpace=function(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1},t.isMdAsciiPunct=function(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}},t.isPunctChar=function(e){return v.test(e)},t.escapeRE=function(e){return e.replace(m,"\\$&")},t.normalizeReference=function(e){return e.trim().replace(/\s+/g," ").toUpperCase()}},1729:function(e,t,n){e.exports=function(){"use strict";var e=navigator.userAgent,t=navigator.platform,n=/gecko\/\d/i.test(e),r=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),o=/Edge\/(\d+)/.exec(e),a=r||i||o,s=a&&(r?document.documentMode||6:+(o||i)[1]),u=!o&&/WebKit\//.test(e),l=u&&/Qt\/\d+\.\d+/.test(e),c=!o&&/Chrome\//.test(e),f=/Opera\//.test(e),p=/Apple Computer/.test(navigator.vendor),d=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),h=/PhantomJS/.test(e),m=!o&&/AppleWebKit/.test(e)&&/Mobile\/\w+/.test(e),v=/Android/.test(e),g=m||v||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),y=m||/Mac/.test(t),b=/\bCrOS\b/.test(e),w=/win/i.test(t),T=f&&e.match(/Version\/(\d*\.\d*)/);T&&(T=Number(T[1])),T&&T>=15&&(f=!1,u=!0);var O=y&&(l||f&&(null==T||T<12.11)),_=n||a&&s>=9;function k(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var E,C=function(e,t){var n=e.className,r=k(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function S(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function x(e,t){return S(e).appendChild(t)}function N(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function D(e,t,n,r){var i=N(e,t,n,r);return i.setAttribute("role","presentation"),i}function j(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do{if(11==t.nodeType&&(t=t.host),t==e)return!0}while(t=t.parentNode)}function L(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function A(e,t){var n=e.className;k(t).test(n)||(e.className+=(n?" ":"")+t)}function I(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!k(n[r]).test(t)&&(t+=" "+n[r]);return t}E=document.createRange?function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(e){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};var M=function(e){e.select()};function F(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function R(e,t,n){for(var r in t||(t={}),e)!e.hasOwnProperty(r)||!1===n&&t.hasOwnProperty(r)||(t[r]=e[r]);return t}function P(e,t,n,r,i){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var o=r||0,a=i||0;;){var s=e.indexOf("\t",o);if(s<0||s>=t)return a+(t-o);a+=s-o,a+=n-a%n,o=s+1}}m?M=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:a&&(M=function(e){try{e.select()}catch(e){}});var V=function(){this.id=null};function B(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}V.prototype.set=function(e,t){clearTimeout(this.id),this.id=setTimeout(t,e)};var q=30,U={toString:function(){return"CodeMirror.Pass"}},z={scroll:!1},H={origin:"*mouse"},G={origin:"+move"};function W(e,t,n){for(var r=0,i=0;;){var o=e.indexOf("\t",r);-1==o&&(o=e.length);var a=o-r;if(o==e.length||i+a>=t)return r+Math.min(a,t-i);if(i+=o-r,r=o+1,(i+=n-i%n)>=t)return r}}var Q=[""];function K(e){for(;Q.length<=e;)Q.push(Y(Q)+" ");return Q[e]}function Y(e){return e[e.length-1]}function J(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function $(){}function Z(e,t){var n;return Object.create?n=Object.create(e):($.prototype=e,n=new $),t&&R(t,n),n}var X=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function ee(e){return/\w/.test(e)||e>"€"&&(e.toUpperCase()!=e.toLowerCase()||X.test(e))}function te(e,t){return t?!!(t.source.indexOf("\\w")>-1&&ee(e))||t.test(e):ee(e)}function ne(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var re=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function ie(e){return e.charCodeAt(0)>=768&&re.test(e)}function oe(e,t,n){for(;(n<0?t>0:t<e.length)&&ie(e.charAt(t));)t+=n;return t}function ae(e,t,n){for(var r=t>n?-1:1;;){if(t==n)return t;var i=(t+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:n;e(o)?n=o:t=o+r}}function se(e,t,r){var i=this;this.input=r,i.scrollbarFiller=N("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=N("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=D("div",null,"CodeMirror-code"),i.selectionDiv=N("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=N("div",null,"CodeMirror-cursors"),i.measure=N("div",null,"CodeMirror-measure"),i.lineMeasure=N("div",null,"CodeMirror-measure"),i.lineSpace=D("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var o=D("div",[i.lineSpace],"CodeMirror-lines");i.mover=N("div",[o],null,"position: relative"),i.sizer=N("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=N("div",null,null,"position: absolute; height: "+q+"px; width: 1px;"),i.gutters=N("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=N("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=N("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),a&&s<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),u||n&&g||(i.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(i.wrapper):e(i.wrapper)),i.viewFrom=i.viewTo=t.first,i.reportedViewFrom=i.reportedViewTo=t.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,r.init(i)}function ue(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t<o){n=i;break}t-=o}return n.lines[t]}function le(e,t,n){var r=[],i=t.line;return e.iter(t.line,n.line+1,function(e){var o=e.text;i==n.line&&(o=o.slice(0,n.ch)),i==t.line&&(o=o.slice(t.ch)),r.push(o),++i}),r}function ce(e,t,n){var r=[];return e.iter(t,n,function(e){r.push(e.text)}),r}function fe(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function pe(e){if(null==e.parent)return null;for(var t=e.parent,n=B(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var i=0;r.children[i]!=t;++i)n+=r.children[i].chunkSize();return n+t.first}function de(e,t){var n=e.first;e:do{for(var r=0;r<e.children.length;++r){var i=e.children[r],o=i.height;if(t<o){e=i;continue e}t-=o,n+=i.chunkSize()}return n}while(!e.lines);for(var a=0;a<e.lines.length;++a){var s=e.lines[a],u=s.height;if(t<u)break;t-=u}return n+a}function he(e,t){return t>=e.first&&t<e.first+e.size}function me(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function ve(e,t,n){if(void 0===n&&(n=null),!(this instanceof ve))return new ve(e,t,n);this.line=e,this.ch=t,this.sticky=n}function ge(e,t){return e.line-t.line||e.ch-t.ch}function ye(e,t){return e.sticky==t.sticky&&0==ge(e,t)}function be(e){return ve(e.line,e.ch)}function we(e,t){return ge(e,t)<0?t:e}function Te(e,t){return ge(e,t)<0?e:t}function Oe(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function _e(e,t){if(t.line<e.first)return ve(e.first,0);var n=e.first+e.size-1;return t.line>n?ve(n,ue(e,n).text.length):function(e,t){var n=e.ch;return null==n||n>t?ve(e.line,t):n<0?ve(e.line,0):e}(t,ue(e,t.line).text.length)}function ke(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=_e(e,t[r]);return n}var Ee=!1,Ce=!1;function Se(e,t,n){this.marker=e,this.from=t,this.to=n}function xe(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function Ne(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||(n=[])).push(e[r]);return n}function De(e,t){if(t.full)return null;var n=he(e,t.from.line)&&ue(e,t.from.line).markedSpans,r=he(e,t.to.line)&&ue(e,t.to.line).markedSpans;if(!n&&!r)return null;var i=t.from.ch,o=t.to.ch,a=0==ge(t.from,t.to),s=function(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker,s=null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t);if(s||o.from==t&&"bookmark"==a.type&&(!n||!o.marker.insertLeft)){var u=null==o.to||(a.inclusiveRight?o.to>=t:o.to>t);(r||(r=[])).push(new Se(a,o.from,u?null:o.to))}}return r}(n,i,a),u=function(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker,s=null==o.to||(a.inclusiveRight?o.to>=t:o.to>t);if(s||o.from==t&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var u=null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t);(r||(r=[])).push(new Se(a,u?null:o.from-t,null==o.to?null:o.to-t))}}return r}(r,o,a),l=1==t.text.length,c=Y(t.text).length+(l?i:0);if(s)for(var f=0;f<s.length;++f){var p=s[f];if(null==p.to){var d=xe(u,p.marker);d?l&&(p.to=null==d.to?null:d.to+c):p.to=i}}if(u)for(var h=0;h<u.length;++h){var m=u[h];if(null!=m.to&&(m.to+=c),null==m.from){var v=xe(s,m.marker);v||(m.from=c,l&&(s||(s=[])).push(m))}else m.from+=c,l&&(s||(s=[])).push(m)}s&&(s=je(s)),u&&u!=s&&(u=je(u));var g=[s];if(!l){var y,b=t.text.length-2;if(b>0&&s)for(var w=0;w<s.length;++w)null==s[w].to&&(y||(y=[])).push(new Se(s[w].marker,null,null));for(var T=0;T<b;++T)g.push(y);g.push(u)}return g}function je(e){for(var t=0;t<e.length;++t){var n=e[t];null!=n.from&&n.from==n.to&&!1!==n.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function Le(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function Ae(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function Ie(e){return e.inclusiveLeft?-1:0}function Me(e){return e.inclusiveRight?1:0}function Fe(e,t){var n=e.lines.length-t.lines.length;if(0!=n)return n;var r=e.find(),i=t.find(),o=ge(r.from,i.from)||Ie(e)-Ie(t);if(o)return-o;var a=ge(r.to,i.to)||Me(e)-Me(t);return a||t.id-e.id}function Re(e,t){var n,r=Ce&&e.markedSpans;if(r)for(var i=void 0,o=0;o<r.length;++o)(i=r[o]).marker.collapsed&&null==(t?i.from:i.to)&&(!n||Fe(n,i.marker)<0)&&(n=i.marker);return n}function Pe(e){return Re(e,!0)}function Ve(e){return Re(e,!1)}function Be(e,t){var n,r=Ce&&e.markedSpans;if(r)for(var i=0;i<r.length;++i){var o=r[i];o.marker.collapsed&&(null==o.from||o.from<t)&&(null==o.to||o.to>t)&&(!n||Fe(n,o.marker)<0)&&(n=o.marker)}return n}function qe(e,t,n,r,i){var o=ue(e,t),a=Ce&&o.markedSpans;if(a)for(var s=0;s<a.length;++s){var u=a[s];if(u.marker.collapsed){var l=u.marker.find(0),c=ge(l.from,n)||Ie(u.marker)-Ie(i),f=ge(l.to,r)||Me(u.marker)-Me(i);if(!(c>=0&&f<=0||c<=0&&f>=0)&&(c<=0&&(u.marker.inclusiveRight&&i.inclusiveLeft?ge(l.to,n)>=0:ge(l.to,n)>0)||c>=0&&(u.marker.inclusiveRight&&i.inclusiveLeft?ge(l.from,r)<=0:ge(l.from,r)<0)))return!0}}}function Ue(e){for(var t;t=Pe(e);)e=t.find(-1,!0).line;return e}function ze(e,t){var n=ue(e,t),r=Ue(n);return n==r?t:pe(r)}function He(e,t){if(t>e.lastLine())return t;var n,r=ue(e,t);if(!Ge(e,r))return t;for(;n=Ve(r);)r=n.find(1,!0).line;return pe(r)+1}function Ge(e,t){var n=Ce&&t.markedSpans;if(n)for(var r=void 0,i=0;i<n.length;++i)if((r=n[i]).marker.collapsed){if(null==r.from)return!0;if(!r.marker.widgetNode&&0==r.from&&r.marker.inclusiveLeft&&We(e,t,r))return!0}}function We(e,t,n){if(null==n.to){var r=n.marker.find(1,!0);return We(e,r.line,xe(r.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var i=void 0,o=0;o<t.markedSpans.length;++o)if((i=t.markedSpans[o]).marker.collapsed&&!i.marker.widgetNode&&i.from==n.to&&(null==i.to||i.to!=n.from)&&(i.marker.inclusiveLeft||n.marker.inclusiveRight)&&We(e,t,i))return!0}function Qe(e){e=Ue(e);for(var t=0,n=e.parent,r=0;r<n.lines.length;++r){var i=n.lines[r];if(i==e)break;t+=i.height}for(var o=n.parent;o;o=(n=o).parent)for(var a=0;a<o.children.length;++a){var s=o.children[a];if(s==n)break;t+=s.height}return t}function Ke(e){if(0==e.height)return 0;for(var t,n=e.text.length,r=e;t=Pe(r);){var i=t.find(0,!0);r=i.from.line,n+=i.from.ch-i.to.ch}for(r=e;t=Ve(r);){var o=t.find(0,!0);n-=r.text.length-o.from.ch,r=o.to.line,n+=r.text.length-o.to.ch}return n}function Ye(e){var t=e.display,n=e.doc;t.maxLine=ue(n,n.first),t.maxLineLength=Ke(t.maxLine),t.maxLineChanged=!0,n.iter(function(e){var n=Ke(e);n>t.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)})}var Je=null;function $e(e,t,n){var r;Je=null;for(var i=0;i<e.length;++i){var o=e[i];if(o.from<t&&o.to>t)return i;o.to==t&&(o.from!=o.to&&"before"==n?r=i:Je=i),o.from==t&&(o.from!=o.to&&"before"!=n?r=i:Je=i)}return null!=r?r:Je}var Ze=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,r=/[stwN]/,i=/[LRr]/,o=/[Lb1n]/,a=/[1n]/;function s(e,t,n){this.level=e,this.from=t,this.to=n}return function(u,l){var c,f="ltr"==l?"L":"R";if(0==u.length||"ltr"==l&&!n.test(u))return!1;for(var p=u.length,d=[],h=0;h<p;++h)d.push((c=u.charCodeAt(h))<=247?e.charAt(c):1424<=c&&c<=1524?"R":1536<=c&&c<=1785?t.charAt(c-1536):1774<=c&&c<=2220?"r":8192<=c&&c<=8203?"w":8204==c?"b":"L");for(var m=0,v=f;m<p;++m){var g=d[m];"m"==g?d[m]=v:v=g}for(var y=0,b=f;y<p;++y){var w=d[y];"1"==w&&"r"==b?d[y]="n":i.test(w)&&(b=w,"r"==w&&(d[y]="R"))}for(var T=1,O=d[0];T<p-1;++T){var _=d[T];"+"==_&&"1"==O&&"1"==d[T+1]?d[T]="1":","!=_||O!=d[T+1]||"1"!=O&&"n"!=O||(d[T]=O),O=_}for(var k=0;k<p;++k){var E=d[k];if(","==E)d[k]="N";else if("%"==E){var C=void 0;for(C=k+1;C<p&&"%"==d[C];++C);for(var S=k&&"!"==d[k-1]||C<p&&"1"==d[C]?"1":"N",x=k;x<C;++x)d[x]=S;k=C-1}}for(var N=0,D=f;N<p;++N){var j=d[N];"L"==D&&"1"==j?d[N]="L":i.test(j)&&(D=j)}for(var L=0;L<p;++L)if(r.test(d[L])){var A=void 0;for(A=L+1;A<p&&r.test(d[A]);++A);for(var I="L"==(L?d[L-1]:f),M="L"==(A<p?d[A]:f),F=I==M?I?"L":"R":f,R=L;R<A;++R)d[R]=F;L=A-1}for(var P,V=[],B=0;B<p;)if(o.test(d[B])){var q=B;for(++B;B<p&&o.test(d[B]);++B);V.push(new s(0,q,B))}else{var U=B,z=V.length;for(++B;B<p&&"L"!=d[B];++B);for(var H=U;H<B;)if(a.test(d[H])){U<H&&V.splice(z,0,new s(1,U,H));var G=H;for(++H;H<B&&a.test(d[H]);++H);V.splice(z,0,new s(2,G,H)),U=H}else++H;U<B&&V.splice(z,0,new s(1,U,B))}return"ltr"==l&&(1==V[0].level&&(P=u.match(/^\s+/))&&(V[0].from=P[0].length,V.unshift(new s(0,0,P[0].length))),1==Y(V).level&&(P=u.match(/\s+$/))&&(Y(V).to-=P[0].length,V.push(new s(0,p-P[0].length,p)))),"rtl"==l?V.reverse():V}}();function Xe(e,t){var n=e.order;return null==n&&(n=e.order=Ze(e.text,t)),n}var et=[],tt=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent("on"+t,n);else{var r=e._handlers||(e._handlers={});r[t]=(r[t]||et).concat(n)}};function nt(e,t){return e._handlers&&e._handlers[t]||et}function rt(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var r=e._handlers,i=r&&r[t];if(i){var o=B(i,n);o>-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function it(e,t){var n=nt(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i<n.length;++i)n[i].apply(null,r)}function ot(e,t,n){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),it(e,n||t.type,e,t),ft(t)||t.codemirrorIgnore}function at(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)-1==B(n,t[r])&&n.push(t[r])}function st(e,t){return nt(e,t).length>0}function ut(e){e.prototype.on=function(e,t){tt(this,e,t)},e.prototype.off=function(e,t){rt(this,e,t)}}function lt(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function ct(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function ft(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function pt(e){lt(e),ct(e)}function dt(e){return e.target||e.srcElement}function ht(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),y&&e.ctrlKey&&1==t&&(t=3),t}var mt,vt,gt=function(){if(a&&s<9)return!1;var e=N("div");return"draggable"in e||"dragDrop"in e}();function yt(e){if(null==mt){var t=N("span","​");x(e,N("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(mt=t.offsetWidth<=1&&t.offsetHeight>2&&!(a&&s<8))}var n=mt?N("span","​"):N("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function bt(e){if(null!=vt)return vt;var t=x(e,document.createTextNode("AخA")),n=E(t,0,1).getBoundingClientRect(),r=E(t,1,2).getBoundingClientRect();return S(e),!(!n||n.left==n.right)&&(vt=r.right-n.right<3)}var wt,Tt=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(n.push(o.slice(0,a)),t+=a+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Ot=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},_t="oncopy"in(wt=N("div"))||(wt.setAttribute("oncopy","return;"),"function"==typeof wt.oncopy),kt=null,Et={},Ct={};function St(e){if("string"==typeof e&&Ct.hasOwnProperty(e))e=Ct[e];else if(e&&"string"==typeof e.name&&Ct.hasOwnProperty(e.name)){var t=Ct[e.name];"string"==typeof t&&(t={name:t}),(e=Z(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return St("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return St("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function xt(e,t){t=St(t);var n=Et[t.name];if(!n)return xt(e,"text/plain");var r=n(e,t);if(Nt.hasOwnProperty(t.name)){var i=Nt[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)r[a]=t.modeProps[a];return r}var Nt={};function Dt(e,t){var n=Nt.hasOwnProperty(e)?Nt[e]:Nt[e]={};R(t,n)}function jt(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function Lt(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function At(e,t,n){return!e.startState||e.startState(t,n)}var It=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};It.prototype.eol=function(){return this.pos>=this.string.length},It.prototype.sol=function(){return this.pos==this.lineStart},It.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},It.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},It.prototype.eat=function(e){var t=this.string.charAt(this.pos);if("string"==typeof e?t==e:t&&(e.test?e.test(t):e(t)))return++this.pos,t},It.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},It.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},It.prototype.skipToEnd=function(){this.pos=this.string.length},It.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},It.prototype.backUp=function(e){this.pos-=e},It.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=P(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?P(this.string,this.lineStart,this.tabSize):0)},It.prototype.indentation=function(){return P(this.string,null,this.tabSize)-(this.lineStart?P(this.string,this.lineStart,this.tabSize):0)},It.prototype.match=function(e,t,n){if("string"!=typeof e){var r=this.string.slice(this.pos).match(e);return r&&r.index>0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e},o=this.string.substr(this.pos,e.length);if(i(o)==i(e))return!1!==t&&(this.pos+=e.length),!0},It.prototype.current=function(){return this.string.slice(this.start,this.pos)},It.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},It.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},It.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var Mt=function(e,t){this.state=e,this.lookAhead=t},Ft=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function Rt(e,t,n,r){var i=[e.state.modeGen],o={};Wt(e,t.text,e.doc.mode,n,function(e,t){return i.push(e,t)},o,r);for(var a=n.state,s=function(r){n.baseTokens=i;var s=e.state.overlays[r],u=1,l=0;n.state=!0,Wt(e,t.text,s.mode,n,function(e,t){for(var n=u;l<e;){var r=i[u];r>e&&i.splice(u,1,e,i[u+1],r),u+=2,l=Math.min(e,r)}if(t)if(s.opaque)i.splice(n,u-n,e,"overlay "+t),u=n+2;else for(;n<u;n+=2){var o=i[n+1];i[n+1]=(o?o+" ":"")+"overlay "+t}},o),n.state=a,n.baseTokens=null,n.baseTokenPos=1},u=0;u<e.state.overlays.length;++u)s(u);return{styles:i,classes:o.bgClass||o.textClass?o:null}}function Pt(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=Vt(e,pe(t)),i=t.text.length>e.options.maxHighlightLength&&jt(e.doc.mode,r.state),o=Rt(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function Vt(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new Ft(r,!0,t);var o=function(e,t,n){for(var r,i,o=e.doc,a=n?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>a;--s){if(s<=o.first)return o.first;var u=ue(o,s-1),l=u.stateAfter;if(l&&(!n||s+(l instanceof Mt?l.lookAhead:0)<=o.modeFrontier))return s;var c=P(u.text,null,e.options.tabSize);(null==i||r>c)&&(i=s-1,r=c)}return i}(e,t,n),a=o>r.first&&ue(r,o-1).stateAfter,s=a?Ft.fromSaved(r,a,o):new Ft(r,At(r.mode),o);return r.iter(o,t,function(n){Bt(e,n.text,s);var r=s.line;n.stateAfter=r==t-1||r%5==0||r>=i.viewFrom&&r<i.viewTo?s.save():null,s.nextLine()}),n&&(r.modeFrontier=s.line),s}function Bt(e,t,n,r){var i=e.doc.mode,o=new It(t,e.options.tabSize,n);for(o.start=o.pos=r||0,""==t&&qt(i,n.state);!o.eol();)Ut(i,o,n.state),o.start=o.pos}function qt(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=Lt(e,t);return n.mode.blankLine?n.mode.blankLine(n.state):void 0}}function Ut(e,t,n,r){for(var i=0;i<10;i++){r&&(r[0]=Lt(e,n).mode);var o=e.token(t,n);if(t.pos>t.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}Ft.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},Ft.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},Ft.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Ft.fromSaved=function(e,t,n){return t instanceof Mt?new Ft(e,jt(e.mode,t.state),n,t.lookAhead):new Ft(e,jt(e.mode,t),n)},Ft.prototype.save=function(e){var t=!1!==e?jt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Mt(t,this.maxLookAhead):t};var zt=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function Ht(e,t,n,r){var i,o=e.doc,a=o.mode;t=_e(o,t);var s,u=ue(o,t.line),l=Vt(e,t.line,n),c=new It(u.text,e.options.tabSize,l);for(r&&(s=[]);(r||c.pos<t.ch)&&!c.eol();)c.start=c.pos,i=Ut(a,c,l.state),r&&s.push(new zt(c,i,jt(o.mode,l.state)));return r?s:new zt(c,i,l.state)}function Gt(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var r=n[1]?"bgClass":"textClass";null==t[r]?t[r]=n[2]:new RegExp("(?:^|s)"+n[2]+"(?:$|s)").test(t[r])||(t[r]+=" "+n[2])}return e}function Wt(e,t,n,r,i,o,a){var s=n.flattenSpans;null==s&&(s=e.options.flattenSpans);var u,l=0,c=null,f=new It(t,e.options.tabSize,r),p=e.options.addModeClass&&[null];for(""==t&&Gt(qt(n,r.state),o);!f.eol();){if(f.pos>e.options.maxHighlightLength?(s=!1,a&&Bt(e,t,r,f.pos),f.pos=t.length,u=null):u=Gt(Ut(n,f,r.state,p),o),p){var d=p[0].name;d&&(u="m-"+(u?d+" "+u:d))}if(!s||c!=u){for(;l<f.start;)l=Math.min(f.start,l+5e3),i(l,c);c=u}f.start=f.pos}for(;l<f.pos;){var h=Math.min(f.pos,l+5e3);i(h,c),l=h}}var Qt=function(e,t,n){this.text=e,Ae(this,t),this.height=n?n(this):1};function Kt(e){e.parent=null,Le(e)}Qt.prototype.lineNo=function(){return pe(this)},ut(Qt);var Yt={},Jt={};function $t(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?Jt:Yt;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function Zt(e,t){var n=D("span",null,null,u?"padding-right: .1px":null),r={pre:D("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,a=void 0;r.pos=0,r.addToken=en,bt(e.display.measure)&&(a=Xe(o,e.doc.direction))&&(r.addToken=tn(r.addToken,a)),r.map=[];var s=t!=e.display.externalMeasured&&pe(o);rn(o,r,Pt(e,o,s)),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=I(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=I(o.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(yt(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(u){var l=r.content.lastChild;(/\bcm-tab\b/.test(l.className)||l.querySelector&&l.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return it(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=I(r.pre.className,r.textClass||"")),r}function Xt(e){var t=N("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function en(e,t,n,r,i,o,u){if(t){var l,c=e.splitSpaces?function(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;i<e.length;i++){var o=e.charAt(i);" "!=o||!n||i!=e.length-1&&32!=e.charCodeAt(i+1)||(o=" "),r+=o,n=" "==o}return r}(t,e.trailingSpace):t,f=e.cm.state.specialChars,p=!1;if(f.test(t)){l=document.createDocumentFragment();for(var d=0;;){f.lastIndex=d;var h=f.exec(t),m=h?h.index-d:t.length-d;if(m){var v=document.createTextNode(c.slice(d,d+m));a&&s<9?l.appendChild(N("span",[v])):l.appendChild(v),e.map.push(e.pos,e.pos+m,v),e.col+=m,e.pos+=m}if(!h)break;d+=m+1;var g=void 0;if("\t"==h[0]){var y=e.cm.options.tabSize,b=y-e.col%y;(g=l.appendChild(N("span",K(b),"cm-tab"))).setAttribute("role","presentation"),g.setAttribute("cm-text","\t"),e.col+=b}else"\r"==h[0]||"\n"==h[0]?((g=l.appendChild(N("span","\r"==h[0]?"␍":"␤","cm-invalidchar"))).setAttribute("cm-text",h[0]),e.col+=1):((g=e.cm.options.specialCharPlaceholder(h[0])).setAttribute("cm-text",h[0]),a&&s<9?l.appendChild(N("span",[g])):l.appendChild(g),e.col+=1);e.map.push(e.pos,e.pos+1,g),e.pos++}}else e.col+=t.length,l=document.createTextNode(c),e.map.push(e.pos,e.pos+t.length,l),a&&s<9&&(p=!0),e.pos+=t.length;if(e.trailingSpace=32==c.charCodeAt(t.length-1),n||r||i||p||o){var w=n||"";r&&(w+=r),i&&(w+=i);var T=N("span",[l],w,o);if(u)for(var O in u)u.hasOwnProperty(O)&&"style"!=O&&"class"!=O&&T.setAttribute(O,u[O]);return e.content.appendChild(T)}e.content.appendChild(l)}}function tn(e,t){return function(n,r,i,o,a,s,u){i=i?i+" cm-force-border":"cm-force-border";for(var l=n.pos,c=l+r.length;;){for(var f=void 0,p=0;p<t.length&&!((f=t[p]).to>l&&f.from<=l);p++);if(f.to>=c)return e(n,r,i,o,a,s,u);e(n,r.slice(0,f.to-l),i,o,null,s,u),o=null,r=r.slice(f.to-l),l=f.to}}}function nn(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function rn(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var a,s,u,l,c,f,p,d=i.length,h=0,m=1,v="",g=0;;){if(g==h){u=l=c=s="",p=null,f=null,g=1/0;for(var y=[],b=void 0,w=0;w<r.length;++w){var T=r[w],O=T.marker;if("bookmark"==O.type&&T.from==h&&O.widgetNode)y.push(O);else if(T.from<=h&&(null==T.to||T.to>h||O.collapsed&&T.to==h&&T.from==h)){if(null!=T.to&&T.to!=h&&g>T.to&&(g=T.to,l=""),O.className&&(u+=" "+O.className),O.css&&(s=(s?s+";":"")+O.css),O.startStyle&&T.from==h&&(c+=" "+O.startStyle),O.endStyle&&T.to==g&&(b||(b=[])).push(O.endStyle,T.to),O.title&&((p||(p={})).title=O.title),O.attributes)for(var _ in O.attributes)(p||(p={}))[_]=O.attributes[_];O.collapsed&&(!f||Fe(f.marker,O)<0)&&(f=T)}else T.from>h&&g>T.from&&(g=T.from)}if(b)for(var k=0;k<b.length;k+=2)b[k+1]==g&&(l+=" "+b[k]);if(!f||f.from==h)for(var E=0;E<y.length;++E)nn(t,0,y[E]);if(f&&(f.from||0)==h){if(nn(t,(null==f.to?d+1:f.to)-h,f.marker,null==f.from),null==f.to)return;f.to==h&&(f=!1)}}if(h>=d)break;for(var C=Math.min(d,g);;){if(v){var S=h+v.length;if(!f){var x=S>C?v.slice(0,C-h):v;t.addToken(t,x,a?a+u:u,c,h+x.length==g?l:"",s,p)}if(S>=C){v=v.slice(C-h),h=C;break}h=S,c=""}v=i.slice(o,o=n[m++]),a=$t(n[m++],t.cm.options)}}else for(var N=1;N<n.length;N+=2)t.addToken(t,i.slice(o,o=n[N]),$t(n[N+1],t.cm.options))}function on(e,t,n){this.line=t,this.rest=function(e){for(var t,n;t=Ve(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}(t),this.size=this.rest?pe(Y(this.rest))-n+1:1,this.node=this.text=null,this.hidden=Ge(e,t)}function an(e,t,n){for(var r,i=[],o=t;o<n;o=r){var a=new on(e.doc,ue(e.doc,o),o);r=o+a.size,i.push(a)}return i}var sn=null,un=null;function ln(e,t){var n=nt(e,t);if(n.length){var r,i=Array.prototype.slice.call(arguments,2);sn?r=sn.delayedCallbacks:un?r=un:(r=un=[],setTimeout(cn,0));for(var o=function(e){r.push(function(){return n[e].apply(null,i)})},a=0;a<n.length;++a)o(a)}}function cn(){var e=un;un=null;for(var t=0;t<e.length;++t)e[t]()}function fn(e,t,n,r){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];"text"==o?hn(e,t):"gutter"==o?vn(e,t,n,r):"class"==o?mn(e,t):"widget"==o&&gn(e,t,r)}t.changes=null}function pn(e){return e.node==e.text&&(e.node=N("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),a&&s<8&&(e.node.style.zIndex=2)),e.node}function dn(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):Zt(e,t)}function hn(e,t){var n=t.text.className,r=dn(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,mn(e,t)):n&&(t.text.className=n)}function mn(e,t){!function(e,t){var n=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(n&&(n+=" CodeMirror-linebackground"),t.background)n?t.background.className=n:(t.background.parentNode.removeChild(t.background),t.background=null);else if(n){var r=pn(t);t.background=r.insertBefore(N("div",null,n),r.firstChild),e.display.input.setUneditable(t.background)}}(e,t),t.line.wrapClass?pn(t).className=t