From 3edf38ab90dd82b465095de9f9b2b6722994f5b9 Mon Sep 17 00:00:00 2001 From: liusclub Date: Fri, 8 Mar 2024 14:37:30 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=96=B0=E5=A2=9E3.11=E7=89=88=E7=BF=BB?= =?UTF-8?q?=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app-3.3.11/resources/app/main.js | 14856 +++ app-3.3.11/resources/app/renderer.js | 121324 ++++++++++++++++++++++++ 2 files changed, 136180 insertions(+) create mode 100644 app-3.3.11/resources/app/main.js create mode 100644 app-3.3.11/resources/app/renderer.js diff --git a/app-3.3.11/resources/app/main.js b/app-3.3.11/resources/app/main.js new file mode 100644 index 0000000..7316938 --- /dev/null +++ b/app-3.3.11/resources/app/main.js @@ -0,0 +1,14856 @@ +/*! For license information please see main.js.LICENSE.txt */ +(() => { + var e = { + 9e3: (e, t, r) => { + var n = {}; + (e.exports = n), (n.themes = {}); + var o = r(3837), + i = (n.styles = r(8093)), + s = Object.defineProperties, + a = new RegExp(/[\r\n]+/g); + (n.supportsColor = r(3969).supportsColor), + void 0 === n.enabled && (n.enabled = !1 !== n.supportsColor()), + (n.enable = function () { + n.enabled = !0; + }), + (n.disable = function () { + n.enabled = !1; + }), + (n.stripColors = n.strip = + function (e) { + return ("" + e).replace(/\x1B\[\d+m/g, ""); + }), + (n.stylize = function (e, t) { + if (!n.enabled) return e + ""; + var r = i[t]; + return !r && t in n ? n[t](e) : r.open + e + r.close; + }); + var l = /[|\\{}()[\]^$+*?.]/g; + function c(e) { + var t = function e() { + return h.apply(e, arguments); + }; + return (t._styles = e), (t.__proto__ = f), t; + } + var u, + d = + ((u = {}), + (i.grey = i.gray), + Object.keys(i).forEach(function (e) { + (i[e].closeRe = new RegExp( + (function (e) { + if ("string" != typeof e) + throw new TypeError("Expected a string"); + return e.replace(l, "\\$&"); + })(i[e].close), + "g" + )), + (u[e] = { + get: function () { + return c(this._styles.concat(e)); + }, + }); + }), + u), + f = s(function () {}, d); + function h() { + var e = Array.prototype.slice.call(arguments), + t = e + .map(function (e) { + return null != e && e.constructor === String ? e : o.inspect(e); + }) + .join(" "); + if (!n.enabled || !t) return t; + for ( + var r = -1 != t.indexOf("\n"), s = this._styles, l = s.length; + l--; + + ) { + var c = i[s[l]]; + (t = c.open + t.replace(c.closeRe, c.open) + c.close), + r && + (t = t.replace(a, function (e) { + return c.close + e + c.open; + })); + } + return t; + } + n.setTheme = function (e) { + if ("string" != typeof e) + for (var t in e) + !(function (t) { + n[t] = function (r) { + if ("object" == typeof e[t]) { + var o = r; + for (var i in e[t]) o = n[e[t][i]](o); + return o; + } + return n[e[t]](r); + }; + })(t); + else + console.log( + "colors.setTheme now only accepts an object, not a string. If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file. The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));" + ); + }; + var p = function (e, t) { + var r = t.split(""); + return (r = r.map(e)).join(""); + }; + for (var m in ((n.trap = r(1158)), + (n.zalgo = r(7452)), + (n.maps = {}), + (n.maps.america = r(6315)(n)), + (n.maps.zebra = r(1397)(n)), + (n.maps.rainbow = r(6538)(n)), + (n.maps.random = r(5044)(n)), + n.maps)) + !(function (e) { + n[e] = function (t) { + return p(n.maps[e], t); + }; + })(m); + s( + n, + (function () { + var e = {}; + return ( + Object.keys(d).forEach(function (t) { + e[t] = { + get: function () { + return c([t]); + }, + }; + }), + e + ); + })() + ); + }, + 1158: (e) => { + e.exports = function (e, t) { + var r = ""; + e = (e = e || "Run the trap, drop the bass").split(""); + var n = { + a: ["@", "Ą", "Ⱥ", "Ʌ", "Δ", "Λ", "Д"], + b: ["ß", "Ɓ", "Ƀ", "ɮ", "β", "฿"], + c: ["©", "Ȼ", "Ͼ"], + d: ["Ð", "Ɗ", "Ԁ", "ԁ", "Ԃ", "ԃ"], + e: ["Ë", "ĕ", "Ǝ", "ɘ", "Σ", "ξ", "Ҽ", "੬"], + f: ["Ӻ"], + g: ["ɢ"], + h: ["Ħ", "ƕ", "Ң", "Һ", "Ӈ", "Ԋ"], + i: ["༏"], + j: ["Ĵ"], + k: ["ĸ", "Ҡ", "Ӄ", "Ԟ"], + l: ["Ĺ"], + m: ["ʍ", "Ӎ", "ӎ", "Ԡ", "ԡ", "൩"], + n: ["Ñ", "ŋ", "Ɲ", "Ͷ", "Π", "Ҋ"], + o: ["Ø", "õ", "ø", "Ǿ", "ʘ", "Ѻ", "ם", "۝", "๏"], + p: ["Ƿ", "Ҏ"], + q: ["্"], + r: ["®", "Ʀ", "Ȑ", "Ɍ", "ʀ", "Я"], + s: ["§", "Ϟ", "ϟ", "Ϩ"], + t: ["Ł", "Ŧ", "ͳ"], + u: ["Ʊ", "Ս"], + v: ["ט"], + w: ["Ш", "Ѡ", "Ѽ", "൰"], + x: ["Ҳ", "Ӿ", "Ӽ", "ӽ"], + y: ["¥", "Ұ", "Ӌ"], + z: ["Ƶ", "ɀ"], + }; + return ( + e.forEach(function (e) { + e = e.toLowerCase(); + var t = n[e] || [" "], + o = Math.floor(Math.random() * t.length); + r += void 0 !== n[e] ? n[e][o] : e; + }), + r + ); + }; + }, + 7452: (e) => { + e.exports = function (e, t) { + e = e || " he is here "; + var r = { + up: [ + "̍", + "̎", + "̄", + "̅", + "̿", + "̑", + "̆", + "̐", + "͒", + "͗", + "͑", + "̇", + "̈", + "̊", + "͂", + "̓", + "̈", + "͊", + "͋", + "͌", + "̃", + "̂", + "̌", + "͐", + "̀", + "́", + "̋", + "̏", + "̒", + "̓", + "̔", + "̽", + "̉", + "ͣ", + "ͤ", + "ͥ", + "ͦ", + "ͧ", + "ͨ", + "ͩ", + "ͪ", + "ͫ", + "ͬ", + "ͭ", + "ͮ", + "ͯ", + "̾", + "͛", + "͆", + "̚", + ], + down: [ + "̖", + "̗", + "̘", + "̙", + "̜", + "̝", + "̞", + "̟", + "̠", + "̤", + "̥", + "̦", + "̩", + "̪", + "̫", + "̬", + "̭", + "̮", + "̯", + "̰", + "̱", + "̲", + "̳", + "̹", + "̺", + "̻", + "̼", + "ͅ", + "͇", + "͈", + "͉", + "͍", + "͎", + "͓", + "͔", + "͕", + "͖", + "͙", + "͚", + "̣", + ], + mid: [ + "̕", + "̛", + "̀", + "́", + "͘", + "̡", + "̢", + "̧", + "̨", + "̴", + "̵", + "̶", + "͜", + "͝", + "͞", + "͟", + "͠", + "͢", + "̸", + "̷", + "͡", + " ҉", + ], + }, + n = [].concat(r.up, r.down, r.mid); + function o(e) { + return Math.floor(Math.random() * e); + } + function i(e) { + var t = !1; + return ( + n.filter(function (r) { + t = r === e; + }), + t + ); + } + return (function (e, t) { + var n, + s, + a = ""; + for (s in (((t = t || {}).up = void 0 === t.up || t.up), + (t.mid = void 0 === t.mid || t.mid), + (t.down = void 0 === t.down || t.down), + (t.size = void 0 !== t.size ? t.size : "maxi"), + (e = e.split("")))) + if (!i(s)) { + switch ( + ((a += e[s]), (n = { up: 0, down: 0, mid: 0 }), t.size) + ) { + case "mini": + (n.up = o(8)), (n.mid = o(2)), (n.down = o(8)); + break; + case "maxi": + (n.up = o(16) + 3), + (n.mid = o(4) + 1), + (n.down = o(64) + 3); + break; + default: + (n.up = o(8) + 1), (n.mid = o(6) / 2), (n.down = o(8) + 1); + } + var l = ["up", "mid", "down"]; + for (var c in l) + for (var u = l[c], d = 0; d <= n[u]; d++) + t[u] && (a += r[u][o(r[u].length)]); + } + return a; + })(e, t); + }; + }, + 6315: (e) => { + e.exports = function (e) { + return function (t, r, n) { + if (" " === t) return t; + switch (r % 3) { + case 0: + return e.red(t); + case 1: + return e.white(t); + case 2: + return e.blue(t); + } + }; + }; + }, + 6538: (e) => { + e.exports = function (e) { + var t = ["red", "yellow", "green", "blue", "magenta"]; + return function (r, n, o) { + return " " === r ? r : e[t[n++ % t.length]](r); + }; + }; + }, + 5044: (e) => { + e.exports = function (e) { + var t = [ + "underline", + "inverse", + "grey", + "yellow", + "red", + "green", + "blue", + "white", + "cyan", + "magenta", + "brightYellow", + "brightRed", + "brightGreen", + "brightBlue", + "brightWhite", + "brightCyan", + "brightMagenta", + ]; + return function (r, n, o) { + return " " === r + ? r + : e[t[Math.round(Math.random() * (t.length - 2))]](r); + }; + }; + }, + 1397: (e) => { + e.exports = function (e) { + return function (t, r, n) { + return r % 2 == 0 ? t : e.inverse(t); + }; + }; + }, + 8093: (e) => { + var t = {}; + e.exports = t; + var r = { + reset: [0, 0], + bold: [1, 22], + dim: [2, 22], + italic: [3, 23], + underline: [4, 24], + inverse: [7, 27], + hidden: [8, 28], + strikethrough: [9, 29], + black: [30, 39], + red: [31, 39], + green: [32, 39], + yellow: [33, 39], + blue: [34, 39], + magenta: [35, 39], + cyan: [36, 39], + white: [37, 39], + gray: [90, 39], + grey: [90, 39], + brightRed: [91, 39], + brightGreen: [92, 39], + brightYellow: [93, 39], + brightBlue: [94, 39], + brightMagenta: [95, 39], + brightCyan: [96, 39], + brightWhite: [97, 39], + bgBlack: [40, 49], + bgRed: [41, 49], + bgGreen: [42, 49], + bgYellow: [43, 49], + bgBlue: [44, 49], + bgMagenta: [45, 49], + bgCyan: [46, 49], + bgWhite: [47, 49], + bgGray: [100, 49], + bgGrey: [100, 49], + bgBrightRed: [101, 49], + bgBrightGreen: [102, 49], + bgBrightYellow: [103, 49], + bgBrightBlue: [104, 49], + bgBrightMagenta: [105, 49], + bgBrightCyan: [106, 49], + bgBrightWhite: [107, 49], + blackBG: [40, 49], + redBG: [41, 49], + greenBG: [42, 49], + yellowBG: [43, 49], + blueBG: [44, 49], + magentaBG: [45, 49], + cyanBG: [46, 49], + whiteBG: [47, 49], + }; + Object.keys(r).forEach(function (e) { + var n = r[e], + o = (t[e] = []); + (o.open = "[" + n[0] + "m"), (o.close = "[" + n[1] + "m"); + }); + }, + 5951: (e) => { + "use strict"; + e.exports = function (e, t) { + var r = (t = t || process.argv).indexOf("--"), + n = /^-{1,2}/.test(e) ? "" : "--", + o = t.indexOf(n + e); + return -1 !== o && (-1 === r || o < r); + }; + }, + 3969: (e, t, r) => { + "use strict"; + var n = r(2037), + o = r(5951), + i = process.env, + s = void 0; + function a(e) { + var t = (function (e) { + if (!1 === s) return 0; + if (o("color=16m") || o("color=full") || o("color=truecolor")) + return 3; + if (o("color=256")) return 2; + if (e && !e.isTTY && !0 !== s) return 0; + var t = n.release().split("."); + return Number(process.versions.node.split(".")[0]) >= 8 && + Number(t[0]) >= 10 && + Number(t[2]) >= 10586 + ? Number(t[2]) >= 14931 + ? 3 + : 2 + : 1; + })(e); + return (function (e) { + return ( + 0 !== e && { + level: e, + hasBasic: !0, + has256: e >= 2, + has16m: e >= 3, + } + ); + })(t); + } + o("no-color") || o("no-colors") || o("color=false") + ? (s = !1) + : (o("color") || + o("colors") || + o("color=true") || + o("color=always")) && + (s = !0), + "FORCE_COLOR" in i && + (s = + 0 === i.FORCE_COLOR.length || 0 !== parseInt(i.FORCE_COLOR, 10)), + (e.exports = { + supportsColor: a, + stdout: a(process.stdout), + stderr: a(process.stderr), + }); + }, + 3450: (e, t, r) => { + var n = r(9e3); + e.exports = n; + }, + 684: (e) => { + var t = [], + r = [], + n = function () {}; + function o(e) { + return !~t.indexOf(e) && (t.push(e), !0); + } + function i(e) { + n = e; + } + function s(e) { + for (var r = [], n = 0; n < t.length; n++) + if (t[n].async) r.push(t[n]); + else if (t[n](e)) return !0; + return ( + !!r.length && + new Promise(function (t) { + Promise.all( + r.map(function (t) { + return t(e); + }) + ).then(function (e) { + t(e.some(Boolean)); + }); + }) + ); + } + function a(e) { + return !~r.indexOf(e) && (r.push(e), !0); + } + function l() { + n.apply(n, arguments); + } + function c(e) { + for (var t = 0; t < r.length; t++) e = r[t].apply(r[t], arguments); + return e; + } + function u(e, t) { + var r = Object.prototype.hasOwnProperty; + for (var n in t) r.call(t, n) && (e[n] = t[n]); + return e; + } + function d(e) { + return ( + (e.enabled = !1), + (e.modify = a), + (e.set = i), + (e.use = o), + u(function () { + return !1; + }, e) + ); + } + function f(e) { + return ( + (e.enabled = !0), + (e.modify = a), + (e.set = i), + (e.use = o), + u(function () { + var t = Array.prototype.slice.call(arguments, 0); + return l.call(l, e, c(t, e)), !0; + }, e) + ); + } + e.exports = function (e) { + return ( + (e.introduce = u), + (e.enabled = s), + (e.process = c), + (e.modify = a), + (e.write = l), + (e.nope = d), + (e.yep = f), + (e.set = i), + (e.use = o), + e + ); + }; + }, + 9256: (e, t, r) => { + e.exports = r(5811); + }, + 5811: (e, t, r) => { + var n = r(684)(function e(t, r) { + return ( + ((r = r || {}).namespace = t), + (r.prod = !0), + (r.dev = !1), + r.force || e.force ? e.yep(r) : e.nope(r) + ); + }); + e.exports = n; + }, + 2201: (e, t, r) => { + "use strict"; + Object.defineProperty(t, "__esModule", { value: !0 }), + (t.default = function (e) { + return (0, i.isAsync)(e) + ? function (...t) { + const r = t.pop(); + return a(e.apply(this, t), r); + } + : (0, n.default)(function (t, r) { + var n; + try { + n = e.apply(this, t); + } catch (e) { + return r(e); + } + if (n && "function" == typeof n.then) return a(n, r); + r(null, n); + }); + }); + var n = s(r(6646)), + o = s(r(5933)), + i = r(1940); + function s(e) { + return e && e.__esModule ? e : { default: e }; + } + function a(e, t) { + return e.then( + (e) => { + l(t, null, e); + }, + (e) => { + l(t, e && e.message ? e : new Error(e)); + } + ); + } + function l(e, t, r) { + try { + e(t, r); + } catch (e) { + (0, o.default)((e) => { + throw e; + }, e); + } + } + e.exports = t.default; + }, + 7931: (e, t, r) => { + "use strict"; + Object.defineProperty(t, "__esModule", { value: !0 }); + var n = u(r(1771)), + o = u(r(2325)), + i = u(r(9622)), + s = u(r(5498)), + a = u(r(9485)), + l = u(r(1940)), + c = u(r(3171)); + function u(e) { + return e && e.__esModule ? e : { default: e }; + } + function d(e, t, r) { + r = (0, s.default)(r); + var n = 0, + i = 0, + { length: l } = e, + c = !1; + function u(e, t) { + !1 === e && (c = !0), + !0 !== c && + (e ? r(e) : (++i !== l && t !== o.default) || r(null)); + } + for (0 === l && r(null); n < l; n++) t(e[n], n, (0, a.default)(u)); + } + function f(e, t, r) { + return (0, i.default)(e, 1 / 0, t, r); + } + (t.default = (0, c.default)(function (e, t, r) { + return ((0, n.default)(e) ? d : f)(e, (0, l.default)(t), r); + }, 3)), + (e.exports = t.default); + }, + 9622: (e, t, r) => { + "use strict"; + Object.defineProperty(t, "__esModule", { value: !0 }); + var n = s(r(9925)), + o = s(r(1940)), + i = s(r(3171)); + function s(e) { + return e && e.__esModule ? e : { default: e }; + } + (t.default = (0, i.default)(function (e, t, r, i) { + return (0, n.default)(t)(e, (0, o.default)(r), i); + }, 4)), + (e.exports = t.default); + }, + 1080: (e, t, r) => { + "use strict"; + Object.defineProperty(t, "__esModule", { value: !0 }); + var n = i(r(9622)), + o = i(r(3171)); + function i(e) { + return e && e.__esModule ? e : { default: e }; + } + (t.default = (0, o.default)(function (e, t, r) { + return (0, n.default)(e, 1, t, r); + }, 3)), + (e.exports = t.default); + }, + 9508: (e, t, r) => { + "use strict"; + Object.defineProperty(t, "__esModule", { value: !0 }); + var n = a(r(7931)), + o = a(r(5926)), + i = a(r(1940)), + s = a(r(3171)); + function a(e) { + return e && e.__esModule ? e : { default: e }; + } + (t.default = (0, s.default)(function (e, t, r) { + return (0, n.default)(e, (0, o.default)((0, i.default)(t)), r); + }, 3)), + (e.exports = t.default); + }, + 8463: (e, t, r) => { + "use strict"; + Object.defineProperty(t, "__esModule", { value: !0 }), + (t.default = function (e, t, r, n) { + let i = !1, + s = !1, + a = !1, + l = 0, + c = 0; + function u() { + l >= t || + a || + i || + ((a = !0), + e + .next() + .then(({ value: e, done: t }) => { + if (!s && !i) { + if (((a = !1), t)) + return (i = !0), void (l <= 0 && n(null)); + l++, r(e, c, d), c++, u(); + } + }) + .catch(f)); + } + function d(e, t) { + if (((l -= 1), !s)) + return e + ? f(e) + : !1 === e + ? ((i = !0), void (s = !0)) + : t === o.default || (i && l <= 0) + ? ((i = !0), n(null)) + : void u(); + } + function f(e) { + s || ((a = !1), (i = !0), n(e)); + } + u(); + }); + var n, + o = (n = r(2325)) && n.__esModule ? n : { default: n }; + e.exports = t.default; + }, + 3171: (e, t) => { + "use strict"; + Object.defineProperty(t, "__esModule", { value: !0 }), + (t.default = function (e, t = e.length) { + if (!t) throw new Error("arity is undefined"); + return function (...r) { + return "function" == typeof r[t - 1] + ? e.apply(this, r) + : new Promise((n, o) => { + (r[t - 1] = (e, ...t) => { + if (e) return o(e); + n(t.length > 1 ? t : t[0]); + }), + e.apply(this, r); + }); + }; + }), + (e.exports = t.default); + }, + 2325: (e, t) => { + "use strict"; + Object.defineProperty(t, "__esModule", { value: !0 }), + (t.default = {}), + (e.exports = t.default); + }, + 9925: (e, t, r) => { + "use strict"; + Object.defineProperty(t, "__esModule", { value: !0 }); + var n = c(r(5498)), + o = c(r(8561)), + i = c(r(9485)), + s = r(1940), + a = c(r(8463)), + l = c(r(2325)); + function c(e) { + return e && e.__esModule ? e : { default: e }; + } + (t.default = (e) => (t, r, c) => { + if (((c = (0, n.default)(c)), e <= 0)) + throw new RangeError("concurrency limit cannot be less than 1"); + if (!t) return c(null); + if ((0, s.isAsyncGenerator)(t)) return (0, a.default)(t, e, r, c); + if ((0, s.isAsyncIterable)(t)) + return (0, a.default)(t[Symbol.asyncIterator](), e, r, c); + var u = (0, o.default)(t), + d = !1, + f = !1, + h = 0, + p = !1; + function m(e, t) { + if (!f) + if (((h -= 1), e)) (d = !0), c(e); + else if (!1 === e) (d = !0), (f = !0); + else { + if (t === l.default || (d && h <= 0)) return (d = !0), c(null); + p || g(); + } + } + function g() { + for (p = !0; h < e && !d; ) { + var t = u(); + if (null === t) return (d = !0), void (h <= 0 && c(null)); + (h += 1), r(t.value, t.key, (0, i.default)(m)); + } + p = !1; + } + g(); + }), + (e.exports = t.default); + }, + 4344: (e, t) => { + "use strict"; + Object.defineProperty(t, "__esModule", { value: !0 }), + (t.default = function (e) { + return e[Symbol.iterator] && e[Symbol.iterator](); + }), + (e.exports = t.default); + }, + 6646: (e, t) => { + "use strict"; + Object.defineProperty(t, "__esModule", { value: !0 }), + (t.default = function (e) { + return function (...t) { + var r = t.pop(); + return e.call(this, t, r); + }; + }), + (e.exports = t.default); + }, + 1771: (e, t) => { + "use strict"; + Object.defineProperty(t, "__esModule", { value: !0 }), + (t.default = function (e) { + return ( + e && + "number" == typeof e.length && + e.length >= 0 && + e.length % 1 == 0 + ); + }), + (e.exports = t.default); + }, + 8561: (e, t, r) => { + "use strict"; + Object.defineProperty(t, "__esModule", { value: !0 }), + (t.default = function (e) { + if ((0, n.default)(e)) + return (function (e) { + var t = -1, + r = e.length; + return function () { + return ++t < r ? { value: e[t], key: t } : null; + }; + })(e); + var t, + r, + i, + s, + a = (0, o.default)(e); + return a + ? (function (e) { + var t = -1; + return function () { + var r = e.next(); + return r.done ? null : (t++, { value: r.value, key: t }); + }; + })(a) + : ((r = (t = e) ? Object.keys(t) : []), + (i = -1), + (s = r.length), + function e() { + var n = r[++i]; + return "__proto__" === n + ? e() + : i < s + ? { value: t[n], key: n } + : null; + }); + }); + var n = i(r(1771)), + o = i(r(4344)); + function i(e) { + return e && e.__esModule ? e : { default: e }; + } + e.exports = t.default; + }, + 5498: (e, t) => { + "use strict"; + Object.defineProperty(t, "__esModule", { value: !0 }), + (t.default = function (e) { + function t(...t) { + if (null !== e) { + var r = e; + (e = null), r.apply(this, t); + } + } + return Object.assign(t, e), t; + }), + (e.exports = t.default); + }, + 9485: (e, t) => { + "use strict"; + Object.defineProperty(t, "__esModule", { value: !0 }), + (t.default = function (e) { + return function (...t) { + if (null === e) throw new Error("Callback was already called."); + var r = e; + (e = null), r.apply(this, t); + }; + }), + (e.exports = t.default); + }, + 2686: (e, t, r) => { + "use strict"; + Object.defineProperty(t, "__esModule", { value: !0 }); + var n = s(r(1771)), + o = s(r(1940)), + i = s(r(3171)); + function s(e) { + return e && e.__esModule ? e : { default: e }; + } + (t.default = (0, i.default)((e, t, r) => { + var i = (0, n.default)(t) ? [] : {}; + e( + t, + (e, t, r) => { + (0, o.default)(e)((e, ...n) => { + n.length < 2 && ([n] = n), (i[t] = n), r(e); + }); + }, + (e) => r(e, i) + ); + }, 3)), + (e.exports = t.default); + }, + 5933: (e, t) => { + "use strict"; + Object.defineProperty(t, "__esModule", { value: !0 }), + (t.fallback = s), + (t.wrap = a); + var r, + n = (t.hasQueueMicrotask = + "function" == typeof queueMicrotask && queueMicrotask), + o = (t.hasSetImmediate = + "function" == typeof setImmediate && setImmediate), + i = (t.hasNextTick = + "object" == typeof process && + "function" == typeof process.nextTick); + function s(e) { + setTimeout(e, 0); + } + function a(e) { + return (t, ...r) => e(() => t(...r)); + } + (r = n ? queueMicrotask : o ? setImmediate : i ? process.nextTick : s), + (t.default = a(r)); + }, + 5926: (e, t) => { + "use strict"; + Object.defineProperty(t, "__esModule", { value: !0 }), + (t.default = function (e) { + return (t, r, n) => e(t, n); + }), + (e.exports = t.default); + }, + 1940: (e, t, r) => { + "use strict"; + Object.defineProperty(t, "__esModule", { value: !0 }), + (t.isAsyncIterable = t.isAsyncGenerator = t.isAsync = void 0); + var n, + o = (n = r(2201)) && n.__esModule ? n : { default: n }; + function i(e) { + return "AsyncFunction" === e[Symbol.toStringTag]; + } + (t.default = function (e) { + if ("function" != typeof e) throw new Error("expected a function"); + return i(e) ? (0, o.default)(e) : e; + }), + (t.isAsync = i), + (t.isAsyncGenerator = function (e) { + return "AsyncGenerator" === e[Symbol.toStringTag]; + }), + (t.isAsyncIterable = function (e) { + return "function" == typeof e[Symbol.asyncIterator]; + }); + }, + 8370: (e, t, r) => { + "use strict"; + Object.defineProperty(t, "__esModule", { value: !0 }), + (t.default = function (e, t) { + return (0, n.default)(o.default, e, t); + }); + var n = i(r(2686)), + o = i(r(1080)); + function i(e) { + return e && e.__esModule ? e : { default: e }; + } + e.exports = t.default; + }, + 7492: function (e, t) { + var r, n; + void 0 === + (n = + "function" == + typeof (r = function () { + var e = + /^v?(?:\d+)(\.(?:[x*]|\d+)(\.(?:[x*]|\d+)(\.(?:[x*]|\d+))?(?:-[\da-z\-]+(?:\.[\da-z\-]+)*)?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i; + function t(e) { + var t, + r, + n = e.replace(/^v/, "").replace(/\+.*$/, ""), + o = + ((r = "-"), + -1 === (t = n).indexOf(r) ? t.length : t.indexOf(r)), + i = n.substring(0, o).split("."); + return i.push(n.substring(o + 1)), i; + } + function r(e) { + return isNaN(Number(e)) ? e : Number(e); + } + function n(t) { + if ("string" != typeof t) + throw new TypeError("Invalid argument expected string"); + if (!e.test(t)) + throw new Error( + "Invalid argument not valid semver ('" + t + "' received)" + ); + } + function o(e, o) { + [e, o].forEach(n); + for ( + var i = t(e), s = t(o), a = 0; + a < Math.max(i.length - 1, s.length - 1); + a++ + ) { + var l = parseInt(i[a] || 0, 10), + c = parseInt(s[a] || 0, 10); + if (l > c) return 1; + if (c > l) return -1; + } + var u = i[i.length - 1], + d = s[s.length - 1]; + if (u && d) { + var f = u.split(".").map(r), + h = d.split(".").map(r); + for (a = 0; a < Math.max(f.length, h.length); a++) { + if ( + void 0 === f[a] || + ("string" == typeof h[a] && "number" == typeof f[a]) + ) + return -1; + if ( + void 0 === h[a] || + ("string" == typeof f[a] && "number" == typeof h[a]) + ) + return 1; + if (f[a] > h[a]) return 1; + if (h[a] > f[a]) return -1; + } + } else if (u || d) return u ? -1 : 1; + return 0; + } + var i = [">", ">=", "=", "<", "<="], + s = { + ">": [1], + ">=": [0, 1], + "=": [0], + "<=": [-1, 0], + "<": [-1], + }; + return ( + (o.validate = function (t) { + return "string" == typeof t && e.test(t); + }), + (o.compare = function (e, t, r) { + !(function (e) { + if ("string" != typeof e) + throw new TypeError( + "Invalid operator type, expected string but got " + + typeof e + ); + if (-1 === i.indexOf(e)) + throw new TypeError( + "Invalid operator, expected one of " + i.join("|") + ); + })(r); + var n = o(e, t); + return s[r].indexOf(n) > -1; + }), + o + ); + }) + ? r.apply(t, []) + : r) || (e.exports = n); + }, + 3861: (e, t, r) => { + "use strict"; + const n = r(2081), + o = r(8032), + i = r(463); + function s(e, t, r) { + const s = o(e, t, r), + a = n.spawn(s.command, s.args, s.options); + return i.hookChildProcess(a, s), a; + } + (e.exports = s), + (e.exports.spawn = s), + (e.exports.sync = function (e, t, r) { + const s = o(e, t, r), + a = n.spawnSync(s.command, s.args, s.options); + return (a.error = a.error || i.verifyENOENTSync(a.status, s)), a; + }), + (e.exports._parse = o), + (e.exports._enoent = i); + }, + 463: (e) => { + "use strict"; + function t(e, t) { + return Object.assign(new Error(`${t} ${e.command} ENOENT`), { + code: "ENOENT", + errno: "ENOENT", + syscall: `${t} ${e.command}`, + path: e.command, + spawnargs: e.args, + }); + } + function r(e, r) { + return 1 !== e || r.file ? null : t(r.original, "spawn"); + } + e.exports = { + hookChildProcess: function (e, t) { + const n = e.emit; + e.emit = function (o, i) { + if ("exit" === o) { + const o = r(i, t); + if (o) return n.call(e, "error", o); + } + return n.apply(e, arguments); + }; + }, + verifyENOENT: r, + verifyENOENTSync: function (e, r) { + return 1 !== e || r.file ? null : t(r.original, "spawnSync"); + }, + notFoundError: t, + }; + }, + 8032: (e, t, r) => { + "use strict"; + const n = r(1017), + o = r(5419), + i = r(9573), + s = r(546), + a = r(5339), + l = r(7891), + c = /\.(?:com|exe)$/i, + u = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i, + d = + o(() => + l.satisfies(process.version, "^4.8.0 || ^5.7.0 || >= 6.0.0", !0) + ) || !1; + e.exports = function (e, t, r) { + t && !Array.isArray(t) && ((r = t), (t = null)); + const o = { + command: e, + args: (t = t ? t.slice(0) : []), + options: (r = Object.assign({}, r)), + file: void 0, + original: { command: e, args: t }, + }; + return r.shell + ? (function (e) { + if (d) return e; + const t = [e.command].concat(e.args).join(" "); + return ( + (e.command = + "string" == typeof e.options.shell + ? e.options.shell + : process.env.comspec || "cmd.exe"), + (e.args = ["/d", "/s", "/c", `"${t}"`]), + (e.options.windowsVerbatimArguments = !0), + e + ); + })(o) + : (function (e) { + const t = (function (e) { + e.file = i(e); + const t = e.file && a(e.file); + return t + ? (e.args.unshift(e.file), (e.command = t), i(e)) + : e.file; + })(e), + r = !c.test(t); + if (e.options.forceShell || r) { + const r = u.test(t); + (e.command = n.normalize(e.command)), + (e.command = s.command(e.command)), + (e.args = e.args.map((e) => s.argument(e, r))); + const o = [e.command].concat(e.args).join(" "); + (e.args = ["/d", "/s", "/c", `"${o}"`]), + (e.command = process.env.comspec || "cmd.exe"), + (e.options.windowsVerbatimArguments = !0); + } + return e; + })(o); + }; + }, + 546: (e) => { + "use strict"; + const t = /([()\][%!^"`<>&|;, *?])/g; + (e.exports.command = function (e) { + return e.replace(t, "^$1"); + }), + (e.exports.argument = function (e, r) { + return ( + (e = (e = `"${(e = (e = (e = `${e}`).replace( + /(\\*)"/g, + '$1$1\\"' + )).replace(/(\\*)$/, "$1$1"))}"`).replace(t, "^$1")), + r && (e = e.replace(t, "^$1")), + e + ); + }); + }, + 5339: (e, t, r) => { + "use strict"; + const n = r(7147), + o = r(7306); + e.exports = function (e) { + let t, r; + Buffer.alloc + ? (t = Buffer.alloc(150)) + : ((t = new Buffer(150)), t.fill(0)); + try { + (r = n.openSync(e, "r")), + n.readSync(r, t, 0, 150, 0), + n.closeSync(r); + } catch (e) {} + return o(t.toString()); + }; + }, + 9573: (e, t, r) => { + "use strict"; + const n = r(1017), + o = r(9891), + i = r(5620)(); + function s(e, t) { + const r = process.cwd(), + s = null != e.options.cwd; + if (s) + try { + process.chdir(e.options.cwd); + } catch (e) {} + let a; + try { + a = o.sync(e.command, { + path: (e.options.env || process.env)[i], + pathExt: t ? n.delimiter : void 0, + }); + } catch (e) { + } finally { + process.chdir(r); + } + return a && (a = n.resolve(s ? e.options.cwd : "", a)), a; + } + e.exports = function (e) { + return s(e) || s(e, !0); + }; + }, + 9379: (e, t, r) => { + "use strict"; + var n = r(7231); + Object.defineProperty(t, "_R", { + enumerable: !0, + get: function () { + return n.initializeNotifications; + }, + }), + Object.defineProperty(t, "c0", { + enumerable: !0, + get: function () { + return n.showNotification; + }, + }), + Object.defineProperty(t, "pD", { + enumerable: !0, + get: function () { + return n.terminateNotifications; + }, + }), + Object.defineProperty(t, "X", { + enumerable: !0, + get: function () { + return n.getNotificationsPermission; + }, + }), + Object.defineProperty(t, "QJ", { + enumerable: !0, + get: function () { + return n.requestNotificationsPermission; + }, + }); + r(7344), r(7838); + var o = r(4747); + Object.defineProperty(t, "V2", { + enumerable: !0, + get: function () { + return o.onNotificationEvent; + }, + }); + }, + 7231: function (e, t, r) { + "use strict"; + var n = + (this && this.__awaiter) || + function (e, t, r, n) { + return new (r || (r = Promise))(function (o, i) { + function s(e) { + try { + l(n.next(e)); + } catch (e) { + i(e); + } + } + function a(e) { + try { + l(n.throw(e)); + } catch (e) { + i(e); + } + } + function l(e) { + var t; + e.done + ? o(e.value) + : ((t = e.value), + t instanceof r + ? t + : new r(function (e) { + e(t); + })).then(s, a); + } + l((n = n.apply(e, t || [])).next()); + }); + }; + Object.defineProperty(t, "__esModule", { value: !0 }), + (t.closeNotification = + t.showNotification = + t.requestNotificationsPermission = + t.getNotificationsPermission = + t.terminateNotifications = + t.initializeNotifications = + void 0); + const o = r(7344), + i = r(4747), + s = r(7196); + let a; + function l() { + return ( + void 0 !== a || (a = o.supportsNotifications() ? r(33) : null), a + ); + } + (t.initializeNotifications = (e) => { + var t; + return null === (t = l()) || void 0 === t + ? void 0 + : t.initializeNotifications(i.notificationCallback, e); + }), + (t.terminateNotifications = () => { + var e; + return null === (e = l()) || void 0 === e + ? void 0 + : e.terminateNotifications(); + }), + (t.getNotificationsPermission = () => { + var e; + return null === (e = l()) || void 0 === e + ? void 0 + : e.getNotificationsPermission(); + }), + (t.requestNotificationsPermission = () => { + var e; + return null === (e = l()) || void 0 === e + ? void 0 + : e.requestNotificationsPermission(); + }), + (t.showNotification = (...e) => + n(void 0, void 0, void 0, function* () { + var t; + const r = s.v4(); + try { + yield null === (t = l()) || void 0 === t + ? void 0 + : t.showNotification(r, ...e); + } catch (e) { + return null; + } + return r; + })), + (t.closeNotification = (...e) => { + var t; + return null === (t = l()) || void 0 === t + ? void 0 + : t.closeNotification(...e); + }); + }, + 4747: (e, t) => { + "use strict"; + Object.defineProperty(t, "__esModule", { value: !0 }), + (t.onNotificationEvent = t.notificationCallback = void 0); + let r = null; + (t.notificationCallback = (...e) => (null == r ? void 0 : r(...e))), + (t.onNotificationEvent = (e) => { + r = e; + }); + }, + 7838: (e, t, r) => { + "use strict"; + Object.defineProperty(t, "__esModule", { value: !0 }), + (t.getNotificationSettingsUrl = void 0); + const n = r(7344); + t.getNotificationSettingsUrl = function () { + return n.supportsNotifications() ? "ms-settings:notifications" : null; + }; + }, + 7344: (e, t, r) => { + "use strict"; + Object.defineProperty(t, "__esModule", { value: !0 }), + (t.supportsNotificationsPermissionRequest = t.supportsNotifications = + void 0); + const n = r(2037); + (t.supportsNotifications = function () { + return (function () { + const e = n.release().split("."), + t = parseInt(e[0], 10), + r = e.length >= 3 ? parseInt(e[2], 10) : 15063; + return t > 10 || (10 === t && r >= 15063); + })(); + }), + (t.supportsNotificationsPermissionRequest = function () { + return !1; + }); + }, + 7196: (e, t, r) => { + "use strict"; + r.r(t), + r.d(t, { + NIL: () => E, + parse: () => v, + stringify: () => d, + v1: () => g, + v3: () => w, + v4: () => b, + v5: () => _, + validate: () => c, + version: () => S, + }); + var n = r(6113), + o = r.n(n); + const i = new Uint8Array(256); + let s = i.length; + function a() { + return ( + s > i.length - 16 && (o().randomFillSync(i), (s = 0)), + i.slice(s, (s += 16)) + ); + } + const l = + /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i, + c = function (e) { + return "string" == typeof e && l.test(e); + }, + u = []; + for (let e = 0; e < 256; ++e) u.push((e + 256).toString(16).substr(1)); + const d = function (e, t = 0) { + const r = ( + u[e[t + 0]] + + u[e[t + 1]] + + u[e[t + 2]] + + u[e[t + 3]] + + "-" + + u[e[t + 4]] + + u[e[t + 5]] + + "-" + + u[e[t + 6]] + + u[e[t + 7]] + + "-" + + u[e[t + 8]] + + u[e[t + 9]] + + "-" + + u[e[t + 10]] + + u[e[t + 11]] + + u[e[t + 12]] + + u[e[t + 13]] + + u[e[t + 14]] + + u[e[t + 15]] + ).toLowerCase(); + if (!c(r)) throw TypeError("Stringified UUID is invalid"); + return r; + }; + let f, + h, + p = 0, + m = 0; + const g = function (e, t, r) { + let n = (t && r) || 0; + const o = t || new Array(16); + let i = (e = e || {}).node || f, + s = void 0 !== e.clockseq ? e.clockseq : h; + if (null == i || null == s) { + const t = e.random || (e.rng || a)(); + null == i && (i = f = [1 | t[0], t[1], t[2], t[3], t[4], t[5]]), + null == s && (s = h = 16383 & ((t[6] << 8) | t[7])); + } + let l = void 0 !== e.msecs ? e.msecs : Date.now(), + c = void 0 !== e.nsecs ? e.nsecs : m + 1; + const u = l - p + (c - m) / 1e4; + if ( + (u < 0 && void 0 === e.clockseq && (s = (s + 1) & 16383), + (u < 0 || l > p) && void 0 === e.nsecs && (c = 0), + c >= 1e4) + ) + throw new Error( + "uuid.v1(): Can't create more than 10M uuids/sec" + ); + (p = l), (m = c), (h = s), (l += 122192928e5); + const g = (1e4 * (268435455 & l) + c) % 4294967296; + (o[n++] = (g >>> 24) & 255), + (o[n++] = (g >>> 16) & 255), + (o[n++] = (g >>> 8) & 255), + (o[n++] = 255 & g); + const v = ((l / 4294967296) * 1e4) & 268435455; + (o[n++] = (v >>> 8) & 255), + (o[n++] = 255 & v), + (o[n++] = ((v >>> 24) & 15) | 16), + (o[n++] = (v >>> 16) & 255), + (o[n++] = (s >>> 8) | 128), + (o[n++] = 255 & s); + for (let e = 0; e < 6; ++e) o[n + e] = i[e]; + return t || d(o); + }, + v = function (e) { + if (!c(e)) throw TypeError("Invalid UUID"); + let t; + const r = new Uint8Array(16); + return ( + (r[0] = (t = parseInt(e.slice(0, 8), 16)) >>> 24), + (r[1] = (t >>> 16) & 255), + (r[2] = (t >>> 8) & 255), + (r[3] = 255 & t), + (r[4] = (t = parseInt(e.slice(9, 13), 16)) >>> 8), + (r[5] = 255 & t), + (r[6] = (t = parseInt(e.slice(14, 18), 16)) >>> 8), + (r[7] = 255 & t), + (r[8] = (t = parseInt(e.slice(19, 23), 16)) >>> 8), + (r[9] = 255 & t), + (r[10] = + ((t = parseInt(e.slice(24, 36), 16)) / 1099511627776) & 255), + (r[11] = (t / 4294967296) & 255), + (r[12] = (t >>> 24) & 255), + (r[13] = (t >>> 16) & 255), + (r[14] = (t >>> 8) & 255), + (r[15] = 255 & t), + r + ); + }; + function y(e, t, r) { + function n(e, n, o, i) { + if ( + ("string" == typeof e && + (e = (function (e) { + e = unescape(encodeURIComponent(e)); + const t = []; + for (let r = 0; r < e.length; ++r) t.push(e.charCodeAt(r)); + return t; + })(e)), + "string" == typeof n && (n = v(n)), + 16 !== n.length) + ) + throw TypeError( + "Namespace must be array-like (16 iterable integer values, 0-255)" + ); + let s = new Uint8Array(16 + e.length); + if ( + (s.set(n), + s.set(e, n.length), + (s = r(s)), + (s[6] = (15 & s[6]) | t), + (s[8] = (63 & s[8]) | 128), + o) + ) { + i = i || 0; + for (let e = 0; e < 16; ++e) o[i + e] = s[e]; + return o; + } + return d(s); + } + try { + n.name = e; + } catch (e) {} + return ( + (n.DNS = "6ba7b810-9dad-11d1-80b4-00c04fd430c8"), + (n.URL = "6ba7b811-9dad-11d1-80b4-00c04fd430c8"), + n + ); + } + const w = y("v3", 48, function (e) { + return ( + Array.isArray(e) + ? (e = Buffer.from(e)) + : "string" == typeof e && (e = Buffer.from(e, "utf8")), + o().createHash("md5").update(e).digest() + ); + }), + b = function (e, t, r) { + const n = (e = e || {}).random || (e.rng || a)(); + if (((n[6] = (15 & n[6]) | 64), (n[8] = (63 & n[8]) | 128), t)) { + r = r || 0; + for (let e = 0; e < 16; ++e) t[r + e] = n[e]; + return t; + } + return d(n); + }, + _ = y("v5", 80, function (e) { + return ( + Array.isArray(e) + ? (e = Buffer.from(e)) + : "string" == typeof e && (e = Buffer.from(e, "utf8")), + o().createHash("sha1").update(e).digest() + ); + }), + E = "00000000-0000-0000-0000-000000000000", + S = function (e) { + if (!c(e)) throw TypeError("Invalid UUID"); + return parseInt(e.substr(14, 1), 16); + }; + }, + 2382: (e, t, r) => { + "use strict"; + const n = r(1017), + o = r(2298), + i = r(8822), + s = r(7207); + e.exports = function (e) { + const t = o.app || o.remote.app, + r = o.screen || o.remote.screen; + let a, l, c; + const u = Object.assign( + { + file: "window-state.json", + path: t.getPath("userData"), + maximize: !0, + fullScreen: !0, + }, + e + ), + d = n.join(u.path, u.file); + function f() { + return ( + a && + Number.isInteger(a.x) && + Number.isInteger(a.y) && + Number.isInteger(a.width) && + a.width > 0 && + Number.isInteger(a.height) && + a.height > 0 + ); + } + function h() { + const e = r.getPrimaryDisplay().bounds; + a = { + width: u.defaultWidth || 800, + height: u.defaultHeight || 600, + x: 0, + y: 0, + displayBounds: e, + }; + } + function p(e) { + if ((e = e || l)) + try { + const t = e.getBounds(); + (function (e) { + return ( + !e.isMaximized() && !e.isMinimized() && !e.isFullScreen() + ); + })(e) && + ((a.x = t.x), + (a.y = t.y), + (a.width = t.width), + (a.height = t.height)), + (a.isMaximized = e.isMaximized()), + (a.isFullScreen = e.isFullScreen()), + (a.displayBounds = r.getDisplayMatching(t).bounds); + } catch (e) {} + } + function m(e) { + e && p(e); + try { + s.sync(n.dirname(d)), i.writeFileSync(d, a); + } catch (e) {} + } + function g() { + clearTimeout(c), (c = setTimeout(p, 100)); + } + function v() { + p(); + } + function y() { + w(), m(); + } + function w() { + l && + (l.removeListener("resize", g), + l.removeListener("move", g), + clearTimeout(c), + l.removeListener("close", v), + l.removeListener("closed", y), + (l = null)); + } + try { + a = i.readFileSync(d); + } catch (e) {} + return ( + a && (f() || a.isMaximized || a.isFullScreen) + ? f() && + a.displayBounds && + (function () { + if ( + !r.getAllDisplays().some((e) => { + return ( + (t = e.bounds), + a.x >= t.x && + a.y >= t.y && + a.x + a.width <= t.x + t.width && + a.y + a.height <= t.y + t.height + ); + var t; + }) + ) + h(); + })() + : (a = null), + (a = Object.assign( + { width: u.defaultWidth || 800, height: u.defaultHeight || 600 }, + a + )), + { + get x() { + return a.x; + }, + get y() { + return a.y; + }, + get width() { + return a.width; + }, + get height() { + return a.height; + }, + get displayBounds() { + return a.displayBounds; + }, + get isMaximized() { + return a.isMaximized; + }, + get isFullScreen() { + return a.isFullScreen; + }, + saveState: m, + unmanage: w, + manage: function (e) { + u.maximize && a.isMaximized && e.maximize(), + u.fullScreen && a.isFullScreen && e.setFullScreen(!0), + e.on("resize", g), + e.on("move", g), + e.on("close", v), + e.on("closed", y), + (l = e); + }, + resetStateToDefault: h, + } + ); + }; + }, + 3558: (e, t, r) => { + var n = r(3417), + o = function () {}, + i = function (e, t, r) { + if ("function" == typeof t) return i(e, null, t); + t || (t = {}), (r = n(r || o)); + var s = e._writableState, + a = e._readableState, + l = t.readable || (!1 !== t.readable && e.readable), + c = t.writable || (!1 !== t.writable && e.writable), + u = function () { + e.writable || d(); + }, + d = function () { + (c = !1), l || r.call(e); + }, + f = function () { + (l = !1), c || r.call(e); + }, + h = function (t) { + r.call(e, t ? new Error("exited with error code: " + t) : null); + }, + p = function (t) { + r.call(e, t); + }, + m = function () { + return (!l || (a && a.ended)) && (!c || (s && s.ended)) + ? void 0 + : r.call(e, new Error("premature close")); + }, + g = function () { + e.req.on("finish", d); + }; + return ( + (function (e) { + return e.setHeader && "function" == typeof e.abort; + })(e) + ? (e.on("complete", d), + e.on("abort", m), + e.req ? g() : e.on("request", g)) + : c && !s && (e.on("end", u), e.on("close", u)), + (function (e) { + return ( + e.stdio && Array.isArray(e.stdio) && 3 === e.stdio.length + ); + })(e) && e.on("exit", h), + e.on("end", f), + e.on("finish", d), + !1 !== t.error && e.on("error", p), + e.on("close", m), + function () { + e.removeListener("complete", d), + e.removeListener("abort", m), + e.removeListener("request", g), + e.req && e.req.removeListener("finish", d), + e.removeListener("end", u), + e.removeListener("close", u), + e.removeListener("finish", d), + e.removeListener("exit", h), + e.removeListener("end", f), + e.removeListener("error", p), + e.removeListener("close", m); + } + ); + }; + e.exports = i; + }, + 7750: function (e, t, r) { + (function () { + var t, n; + (t = null), + (e.exports = (function () { + function e() { + var e, t, r; + for ( + this.disposables = new Set(), t = 0, r = arguments.length; + t < r; + t++ + ) + (e = arguments[t]), this.add(e); + } + return ( + (e.prototype.disposed = !1), + (e.prototype.dispose = function () { + this.disposed || + ((this.disposed = !0), + this.disposables.forEach(function (e) { + return e.dispose(); + }), + (this.disposables = null)); + }), + (e.prototype.add = function () { + var e, t, r; + if (!this.disposed) + for (t = 0, r = arguments.length; t < r; t += 1) + n((e = arguments[t])), this.disposables.add(e); + }), + (e.prototype.remove = function (e) { + this.disposed || this.disposables.delete(e); + }), + (e.prototype.delete = function (e) { + this.remove(e); + }), + (e.prototype.clear = function () { + this.disposed || this.disposables.clear(); + }), + e + ); + })()), + (n = function (e) { + if ((null == t && (t = r(6122)), !t.isDisposable(e))) + throw new TypeError( + "Arguments to CompositeDisposable.add must have a .dispose() method" + ); + }); + }).call(this); + }, + 6122: function (e) { + (function () { + e.exports = (function () { + function e(e) { + this.disposalAction = e; + } + return ( + (e.prototype.disposed = !1), + (e.isDisposable = function (e) { + return "function" == typeof (null != e ? e.dispose : void 0); + }), + (e.prototype.dispose = function () { + this.disposed || + ((this.disposed = !0), + "function" == typeof this.disposalAction && + this.disposalAction(), + (this.disposalAction = null)); + }), + e + ); + })(); + }).call(this); + }, + 7601: function (e, t, r) { + (function () { + var t; + (t = r(6122)), + (e.exports = (function () { + function e() { + this.clear(); + } + return ( + (e.exceptionHandlers = []), + (e.onEventHandlerException = function (e) { + return ( + 0 === this.exceptionHandlers.length && + (this.dispatch = this.exceptionHandlingDispatch), + this.exceptionHandlers.push(e), + new t( + ((r = this), + function () { + if ( + (r.exceptionHandlers.splice( + r.exceptionHandlers.indexOf(e), + 1 + ), + 0 === r.exceptionHandlers.length) + ) + return (r.dispatch = r.simpleDispatch); + }) + ) + ); + var r; + }), + (e.simpleDispatch = function (e, t) { + return e(t); + }), + (e.exceptionHandlingDispatch = function (e, t) { + var r, n, o, i, s, a; + try { + return e(t); + } catch (e) { + for ( + r = e, + a = [], + o = 0, + i = (s = this.exceptionHandlers).length; + o < i; + o++ + ) + (n = s[o]), a.push(n(r)); + return a; + } + }), + (e.dispatch = e.simpleDispatch), + (e.prototype.disposed = !1), + (e.prototype.clear = function () { + return (this.handlersByEventName = {}); + }), + (e.prototype.dispose = function () { + return ( + (this.handlersByEventName = null), (this.disposed = !0) + ); + }), + (e.prototype.on = function (e, r, n) { + var o; + if ((null == n && (n = !1), this.disposed)) + throw new Error("Emitter has been disposed"); + if ("function" != typeof r) + throw new Error("Handler must be a function"); + return ( + (o = this.handlersByEventName[e]) + ? (this.handlersByEventName[e] = n + ? [r].concat(o) + : o.concat(r)) + : (this.handlersByEventName[e] = [r]), + new t(this.off.bind(this, e, r)) + ); + }), + (e.prototype.once = function (e, t, r) { + var n, o; + return ( + null == r && (r = !1), + (o = function (e) { + return n.dispose(), t(e); + }), + (n = this.on(e, o, r)) + ); + }), + (e.prototype.preempt = function (e, t) { + return this.on(e, t, !0); + }), + (e.prototype.off = function (e, t) { + var r, n, o, i, s; + if (!this.disposed && (o = this.handlersByEventName[e])) { + for (n = [], i = 0, s = o.length; i < s; i++) + (r = o[i]) !== t && n.push(r); + n.length > 0 + ? (this.handlersByEventName[e] = n) + : delete this.handlersByEventName[e]; + } + }), + (e.prototype.emit = function (e, t) { + var r, n, o, i, s; + if ( + (n = null != (s = this.handlersByEventName) ? s[e] : void 0) + ) + for (o = 0, i = n.length; o < i; o++) + (r = n[o]), this.constructor.dispatch(r, t); + }), + (e.prototype.emitAsync = function (e, t) { + var r, n, o, i; + return (n = + null != (i = this.handlersByEventName) ? i[e] : void 0) + ? ((o = function () { + var e, o, i; + for (i = [], e = 0, o = n.length; e < o; e++) + (r = n[e]), i.push(this.constructor.dispatch(r, t)); + return i; + }.call(this)), + Promise.all(o).then(function () {})) + : Promise.resolve(); + }), + (e.prototype.getEventNames = function () { + return Object.keys(this.handlersByEventName); + }), + (e.prototype.listenerCountForEventName = function (e) { + var t, r; + return null != + (t = + null != (r = this.handlersByEventName[e]) + ? r.length + : void 0) + ? t + : 0; + }), + (e.prototype.getTotalListenerCount = function () { + var e, t, r, n, o; + for ( + t = 0, + r = 0, + n = (o = Object.keys(this.handlersByEventName)).length; + r < n; + r++ + ) + (e = o[r]), (t += this.handlersByEventName[e].length); + return t; + }), + e + ); + })()); + }).call(this); + }, + 1391: function (e, t, r) { + (function () { + (t.Emitter = r(7601)), + (t.Disposable = r(6122)), + (t.CompositeDisposable = r(7750)); + }).call(this); + }, + 8734: (e, t, r) => { + "use strict"; + const n = r(1017), + o = r(2081), + i = r(3861), + s = r(6097), + a = r(1829), + l = r(697), + c = r(3675), + u = r(8911), + d = r(8419), + f = r(8047), + h = r(5709); + function p(e, t, r) { + let o; + return ( + (r = Object.assign({ extendEnv: !0, env: {} }, r)).extendEnv && + (r.env = Object.assign({}, process.env, r.env)), + !0 === r.__winShell + ? (delete r.__winShell, + (o = { + command: e, + args: t, + options: r, + file: e, + original: { cmd: e, args: t }, + })) + : (o = i._parse(e, t, r)), + ((r = Object.assign( + { + maxBuffer: 1e7, + buffer: !0, + stripEof: !0, + preferLocal: !0, + localDir: o.options.cwd || process.cwd(), + encoding: "utf8", + reject: !0, + cleanup: !0, + }, + o.options + )).stdio = h(r)), + r.preferLocal && + (r.env = a.env(Object.assign({}, r, { cwd: r.localDir }))), + r.detached && (r.cleanup = !1), + "cmd.exe" === n.basename(o.command) && o.args.unshift("/q"), + { cmd: o.command, args: o.args, opts: r, parsed: o } + ); + } + function m(e, t) { + return t && e.stripEof && (t = s(t)), t; + } + function g(e, t, r) { + let n = "/bin/sh", + o = ["-c", t]; + return ( + ((r = Object.assign({}, r)).__winShell = !0), + (n = process.env.comspec || "cmd.exe"), + (o = ["/s", "/c", `"${t}"`]), + (r.windowsVerbatimArguments = !0), + r.shell && ((n = r.shell), delete r.shell), + e(n, o, r) + ); + } + function v(e, t, { encoding: r, buffer: n, maxBuffer: o }) { + if (!e[t]) return null; + let i; + return ( + (i = n + ? r + ? c(e[t], { encoding: r, maxBuffer: o }) + : c.buffer(e[t], { maxBuffer: o }) + : new Promise((r, n) => { + e[t].once("end", r).once("error", n); + })), + i.catch((e) => { + throw ((e.stream = t), (e.message = `${t} ${e.message}`), e); + }) + ); + } + function y(e, t) { + const { stdout: r, stderr: n } = e; + let o = e.error; + const { code: i, signal: s } = e, + { parsed: a, joinedCmd: l } = t, + c = t.timedOut || !1; + if (!o) { + let e = ""; + Array.isArray(a.opts.stdio) + ? ("inherit" !== a.opts.stdio[2] && + (e += e.length > 0 ? n : `\n${n}`), + "inherit" !== a.opts.stdio[1] && (e += `\n${r}`)) + : "inherit" !== a.opts.stdio && (e = `\n${n}${r}`), + (o = new Error(`Command failed: ${l}${e}`)), + (o.code = i < 0 ? f(i) : i); + } + return ( + (o.stdout = r), + (o.stderr = n), + (o.failed = !0), + (o.signal = s || null), + (o.cmd = l), + (o.timedOut = c), + o + ); + } + function w(e, t) { + let r = e; + return ( + Array.isArray(t) && t.length > 0 && (r += " " + t.join(" ")), r + ); + } + (e.exports = (e, t, r) => { + const n = p(e, t, r), + { encoding: s, buffer: a, maxBuffer: c } = n.opts, + f = w(e, t); + let h, g; + try { + h = o.spawn(n.cmd, n.args, n.opts); + } catch (e) { + return Promise.reject(e); + } + n.opts.cleanup && + (g = d(() => { + h.kill(); + })); + let b = null, + _ = !1; + const E = () => { + b && (clearTimeout(b), (b = null)), g && g(); + }; + n.opts.timeout > 0 && + (b = setTimeout(() => { + (b = null), (_ = !0), h.kill(n.opts.killSignal); + }, n.opts.timeout)); + const S = new Promise((e) => { + h.on("exit", (t, r) => { + E(), e({ code: t, signal: r }); + }), + h.on("error", (t) => { + E(), e({ error: t }); + }), + h.stdin && + h.stdin.on("error", (t) => { + E(), e({ error: t }); + }); + }); + function x() { + h.stdout && h.stdout.destroy(), h.stderr && h.stderr.destroy(); + } + const O = () => + u( + Promise.all([ + S, + v(h, "stdout", { encoding: s, buffer: a, maxBuffer: c }), + v(h, "stderr", { encoding: s, buffer: a, maxBuffer: c }), + ]).then((e) => { + const t = e[0]; + if ( + ((t.stdout = e[1]), + (t.stderr = e[2]), + t.error || 0 !== t.code || null !== t.signal) + ) { + const e = y(t, { joinedCmd: f, parsed: n, timedOut: _ }); + if (((e.killed = e.killed || h.killed), !n.opts.reject)) + return e; + throw e; + } + return { + stdout: m(n.opts, t.stdout), + stderr: m(n.opts, t.stderr), + code: 0, + failed: !1, + killed: !1, + signal: null, + cmd: f, + timedOut: !1, + }; + }), + x + ); + return ( + i._enoent.hookChildProcess(h, n.parsed), + (function (e, t) { + null != t && (l(t) ? t.pipe(e.stdin) : e.stdin.end(t)); + })(h, n.opts.input), + (h.then = (e, t) => O().then(e, t)), + (h.catch = (e) => O().catch(e)), + h + ); + }), + (e.exports.stdout = (...t) => e.exports(...t).then((e) => e.stdout)), + (e.exports.stderr = (...t) => e.exports(...t).then((e) => e.stderr)), + (e.exports.shell = (t, r) => g(e.exports, t, r)), + (e.exports.sync = (e, t, r) => { + const n = p(e, t, r), + i = w(e, t); + if (l(n.opts.input)) + throw new TypeError( + "The `input` option cannot be a stream in sync mode" + ); + const s = o.spawnSync(n.cmd, n.args, n.opts); + if ( + ((s.code = s.status), + s.error || 0 !== s.status || null !== s.signal) + ) { + const e = y(s, { joinedCmd: i, parsed: n }); + if (!n.opts.reject) return e; + throw e; + } + return { + stdout: m(n.opts, s.stdout), + stderr: m(n.opts, s.stderr), + code: 0, + failed: !1, + signal: null, + cmd: i, + timedOut: !1, + }; + }), + (e.exports.shellSync = (t, r) => g(e.exports.sync, t, r)); + }, + 8047: (e, t, r) => { + "use strict"; + const n = r(3837); + let o; + if ("function" == typeof n.getSystemErrorName) + e.exports = n.getSystemErrorName; + else { + try { + if (((o = process.binding("uv")), "function" != typeof o.errname)) + throw new TypeError("uv.errname is not a function"); + } catch (e) { + console.error( + "execa/lib/errname: unable to establish process.binding('uv')", + e + ), + (o = null); + } + e.exports = (e) => i(o, e); + } + function i(e, t) { + if (e) return e.errname(t); + if (!(t < 0)) throw new Error("err >= 0"); + return `Unknown system error ${t}`; + } + e.exports.__test__ = i; + }, + 5709: (e) => { + "use strict"; + const t = ["stdin", "stdout", "stderr"]; + e.exports = (e) => { + if (!e) return null; + if (e.stdio && ((e) => t.some((t) => Boolean(e[t])))(e)) + throw new Error( + `It's not possible to provide \`stdio\` in combination with one of ${t + .map((e) => `\`${e}\``) + .join(", ")}` + ); + if ("string" == typeof e.stdio) return e.stdio; + const r = e.stdio || []; + if (!Array.isArray(r)) + throw new TypeError( + `Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof r}\`` + ); + const n = [], + o = Math.max(r.length, t.length); + for (let i = 0; i < o; i++) { + let o = null; + void 0 !== r[i] ? (o = r[i]) : void 0 !== e[t[i]] && (o = e[t[i]]), + (n[i] = o); + } + return n; + }; + }, + 697: (e) => { + "use strict"; + var t = (e.exports = function (e) { + return ( + null !== e && "object" == typeof e && "function" == typeof e.pipe + ); + }); + (t.writable = function (e) { + return ( + t(e) && + !1 !== e.writable && + "function" == typeof e._write && + "object" == typeof e._writableState + ); + }), + (t.readable = function (e) { + return ( + t(e) && + !1 !== e.readable && + "function" == typeof e._read && + "object" == typeof e._readableState + ); + }), + (t.duplex = function (e) { + return t.writable(e) && t.readable(e); + }), + (t.transform = function (e) { + return ( + t.duplex(e) && + "function" == typeof e._transform && + "object" == typeof e._transformState + ); + }); + }, + 1260: (e, t, r) => { + "use strict"; + r.r(t), + r.d(t, { + assign: () => u, + default: () => j, + defaultI18n: () => p, + format: () => M, + parse: () => A, + setGlobalDateI18n: () => g, + setGlobalDateMasks: () => R, + }); + var n = + /d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g, + o = "[1-9]\\d?", + i = "\\d\\d", + s = "[^\\s]+", + a = /\[([^]*?)\]/gm; + function l(e, t) { + for (var r = [], n = 0, o = e.length; n < o; n++) + r.push(e[n].substr(0, t)); + return r; + } + var c = function (e) { + return function (t, r) { + var n = r[e].map(function (e) { + return e.toLowerCase(); + }), + o = n.indexOf(t.toLowerCase()); + return o > -1 ? o : null; + }; + }; + function u(e) { + for (var t = [], r = 1; r < arguments.length; r++) + t[r - 1] = arguments[r]; + for (var n = 0, o = t; n < o.length; n++) { + var i = o[n]; + for (var s in i) e[s] = i[s]; + } + return e; + } + var d = [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday", + ], + f = [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December", + ], + h = l(f, 3), + p = { + dayNamesShort: l(d, 3), + dayNames: d, + monthNamesShort: h, + monthNames: f, + amPm: ["am", "pm"], + DoFn: function (e) { + return ( + e + + ["th", "st", "nd", "rd"][ + e % 10 > 3 ? 0 : ((e - (e % 10) != 10 ? 1 : 0) * e) % 10 + ] + ); + }, + }, + m = u({}, p), + g = function (e) { + return (m = u(m, e)); + }, + v = function (e) { + return e.replace(/[|\\{()[^$+*?.-]/g, "\\$&"); + }, + y = function (e, t) { + for (void 0 === t && (t = 2), e = String(e); e.length < t; ) + e = "0" + e; + return e; + }, + w = { + D: function (e) { + return String(e.getDate()); + }, + DD: function (e) { + return y(e.getDate()); + }, + Do: function (e, t) { + return t.DoFn(e.getDate()); + }, + d: function (e) { + return String(e.getDay()); + }, + dd: function (e) { + return y(e.getDay()); + }, + ddd: function (e, t) { + return t.dayNamesShort[e.getDay()]; + }, + dddd: function (e, t) { + return t.dayNames[e.getDay()]; + }, + M: function (e) { + return String(e.getMonth() + 1); + }, + MM: function (e) { + return y(e.getMonth() + 1); + }, + MMM: function (e, t) { + return t.monthNamesShort[e.getMonth()]; + }, + MMMM: function (e, t) { + return t.monthNames[e.getMonth()]; + }, + YY: function (e) { + return y(String(e.getFullYear()), 4).substr(2); + }, + YYYY: function (e) { + return y(e.getFullYear(), 4); + }, + h: function (e) { + return String(e.getHours() % 12 || 12); + }, + hh: function (e) { + return y(e.getHours() % 12 || 12); + }, + H: function (e) { + return String(e.getHours()); + }, + HH: function (e) { + return y(e.getHours()); + }, + m: function (e) { + return String(e.getMinutes()); + }, + mm: function (e) { + return y(e.getMinutes()); + }, + s: function (e) { + return String(e.getSeconds()); + }, + ss: function (e) { + return y(e.getSeconds()); + }, + S: function (e) { + return String(Math.round(e.getMilliseconds() / 100)); + }, + SS: function (e) { + return y(Math.round(e.getMilliseconds() / 10), 2); + }, + SSS: function (e) { + return y(e.getMilliseconds(), 3); + }, + a: function (e, t) { + return e.getHours() < 12 ? t.amPm[0] : t.amPm[1]; + }, + A: function (e, t) { + return e.getHours() < 12 + ? t.amPm[0].toUpperCase() + : t.amPm[1].toUpperCase(); + }, + ZZ: function (e) { + var t = e.getTimezoneOffset(); + return ( + (t > 0 ? "-" : "+") + + y(100 * Math.floor(Math.abs(t) / 60) + (Math.abs(t) % 60), 4) + ); + }, + Z: function (e) { + var t = e.getTimezoneOffset(); + return ( + (t > 0 ? "-" : "+") + + y(Math.floor(Math.abs(t) / 60), 2) + + ":" + + y(Math.abs(t) % 60, 2) + ); + }, + }, + b = function (e) { + return +e - 1; + }, + _ = [null, o], + E = [null, s], + S = [ + "isPm", + s, + function (e, t) { + var r = e.toLowerCase(); + return r === t.amPm[0] ? 0 : r === t.amPm[1] ? 1 : null; + }, + ], + x = [ + "timezoneOffset", + "[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?", + function (e) { + var t = (e + "").match(/([+-]|\d\d)/gi); + if (t) { + var r = 60 * +t[1] + parseInt(t[2], 10); + return "+" === t[0] ? r : -r; + } + return 0; + }, + ], + O = { + D: ["day", o], + DD: ["day", i], + Do: [ + "day", + "[1-9]\\d?[^\\s]+", + function (e) { + return parseInt(e, 10); + }, + ], + M: ["month", o, b], + MM: ["month", i, b], + YY: [ + "year", + i, + function (e) { + var t = +("" + new Date().getFullYear()).substr(0, 2); + return +("" + (+e > 68 ? t - 1 : t) + e); + }, + ], + h: ["hour", o, void 0, "isPm"], + hh: ["hour", i, void 0, "isPm"], + H: ["hour", o], + HH: ["hour", i], + m: ["minute", o], + mm: ["minute", i], + s: ["second", o], + ss: ["second", i], + YYYY: ["year", "\\d{4}"], + S: [ + "millisecond", + "\\d", + function (e) { + return 100 * +e; + }, + ], + SS: [ + "millisecond", + i, + function (e) { + return 10 * +e; + }, + ], + SSS: ["millisecond", "\\d{3}"], + d: _, + dd: _, + ddd: E, + dddd: E, + MMM: ["month", s, c("monthNamesShort")], + MMMM: ["month", s, c("monthNames")], + a: S, + A: S, + ZZ: x, + Z: x, + }, + C = { + default: "ddd MMM DD YYYY HH:mm:ss", + shortDate: "M/D/YY", + mediumDate: "MMM D, YYYY", + longDate: "MMMM D, YYYY", + fullDate: "dddd, MMMM D, YYYY", + isoDate: "YYYY-MM-DD", + isoDateTime: "YYYY-MM-DDTHH:mm:ssZ", + shortTime: "HH:mm", + mediumTime: "HH:mm:ss", + longTime: "HH:mm:ss.SSS", + }, + R = function (e) { + return u(C, e); + }, + M = function (e, t, r) { + if ( + (void 0 === t && (t = C.default), + void 0 === r && (r = {}), + "number" == typeof e && (e = new Date(e)), + "[object Date]" !== Object.prototype.toString.call(e) || + isNaN(e.getTime())) + ) + throw new Error("Invalid Date pass to format"); + var o = []; + t = (t = C[t] || t).replace(a, function (e, t) { + return o.push(t), "@@@"; + }); + var i = u(u({}, m), r); + return (t = t.replace(n, function (t) { + return w[t](e, i); + })).replace(/@@@/g, function () { + return o.shift(); + }); + }; + function A(e, t, r) { + if ((void 0 === r && (r = {}), "string" != typeof t)) + throw new Error("Invalid format in fecha parse"); + if (((t = C[t] || t), e.length > 1e3)) return null; + var o = { + year: new Date().getFullYear(), + month: 0, + day: 1, + hour: 0, + minute: 0, + second: 0, + millisecond: 0, + isPm: null, + timezoneOffset: null, + }, + i = [], + s = [], + l = t.replace(a, function (e, t) { + return s.push(v(t)), "@@@"; + }), + c = {}, + d = {}; + (l = v(l).replace(n, function (e) { + var t = O[e], + r = t[0], + n = t[1], + o = t[3]; + if (c[r]) + throw new Error( + "Invalid format. " + r + " specified twice in format" + ); + return (c[r] = !0), o && (d[o] = !0), i.push(t), "(" + n + ")"; + })), + Object.keys(d).forEach(function (e) { + if (!c[e]) + throw new Error( + "Invalid format. " + e + " is required in specified format" + ); + }), + (l = l.replace(/@@@/g, function () { + return s.shift(); + })); + var f = e.match(new RegExp(l, "i")); + if (!f) return null; + for (var h = u(u({}, m), r), p = 1; p < f.length; p++) { + var g = i[p - 1], + y = g[0], + w = g[2], + b = w ? w(f[p], h) : +f[p]; + if (null == b) return null; + o[y] = b; + } + 1 === o.isPm && null != o.hour && 12 != +o.hour + ? (o.hour = +o.hour + 12) + : 0 === o.isPm && 12 == +o.hour && (o.hour = 0); + for ( + var _ = new Date( + o.year, + o.month, + o.day, + o.hour, + o.minute, + o.second, + o.millisecond + ), + E = [ + ["month", "getMonth"], + ["day", "getDate"], + ["hour", "getHours"], + ["minute", "getMinutes"], + ["second", "getSeconds"], + ], + S = ((p = 0), E.length); + p < S; + p++ + ) + if (c[E[p][0]] && o[E[p][0]] !== _[E[p][1]]()) return null; + return null == o.timezoneOffset + ? _ + : new Date( + Date.UTC( + o.year, + o.month, + o.day, + o.hour, + o.minute - o.timezoneOffset, + o.second, + o.millisecond + ) + ); + } + const j = { + format: M, + parse: A, + defaultI18n: p, + setGlobalDateI18n: g, + setGlobalDateMasks: R, + }; + }, + 3039: (e) => { + "use strict"; + var t = Object.prototype.toString; + e.exports = function (e) { + if ("string" == typeof e.displayName && e.constructor.name) + return e.displayName; + if ("string" == typeof e.name && e.name) return e.name; + if ( + "object" == typeof e && + e.constructor && + "string" == typeof e.constructor.name + ) + return e.constructor.name; + var r = e.toString(), + n = t.call(e).slice(8, -1); + return ( + (r = + "Function" === n + ? r.substring(r.indexOf("(") + 1, r.indexOf(")")) + : n) || "anonymous" + ); + }; + }, + 3603: (e, t, r) => { + "use strict"; + const { PassThrough: n } = r(2781); + e.exports = (e) => { + e = Object.assign({}, e); + const { array: t } = e; + let { encoding: r } = e; + const o = "buffer" === r; + let i = !1; + t ? (i = !(r || o)) : (r = r || "utf8"), o && (r = null); + let s = 0; + const a = [], + l = new n({ objectMode: i }); + return ( + r && l.setEncoding(r), + l.on("data", (e) => { + a.push(e), i ? (s = a.length) : (s += e.length); + }), + (l.getBufferedValue = () => + t ? a : o ? Buffer.concat(a, s) : a.join("")), + (l.getBufferedLength = () => s), + l + ); + }; + }, + 3675: (e, t, r) => { + "use strict"; + const n = r(3021), + o = r(3603); + class i extends Error { + constructor() { + super("maxBuffer exceeded"), (this.name = "MaxBufferError"); + } + } + function s(e, t) { + if (!e) return Promise.reject(new Error("Expected a stream")); + t = Object.assign({ maxBuffer: 1 / 0 }, t); + const { maxBuffer: r } = t; + let s; + return new Promise((a, l) => { + const c = (e) => { + e && (e.bufferedData = s.getBufferedValue()), l(e); + }; + (s = n(e, o(t), (e) => { + e ? c(e) : a(); + })), + s.on("data", () => { + s.getBufferedLength() > r && c(new i()); + }); + }).then(() => s.getBufferedValue()); + } + (e.exports = s), + (e.exports.buffer = (e, t) => + s(e, Object.assign({}, t, { encoding: "buffer" }))), + (e.exports.array = (e, t) => + s(e, Object.assign({}, t, { array: !0 }))), + (e.exports.MaxBufferError = i); + }, + 3901: (e, t, r) => { + "use strict"; + var n = r(7147); + e.exports = (function (e) { + if (null === e || "object" != typeof e) return e; + if (e instanceof Object) var t = { __proto__: e.__proto__ }; + else t = Object.create(null); + return ( + Object.getOwnPropertyNames(e).forEach(function (r) { + Object.defineProperty( + t, + r, + Object.getOwnPropertyDescriptor(e, r) + ); + }), + t + ); + })(n); + }, + 391: (e, t, r) => { + var n, + o, + i = r(7147), + s = r(9033), + a = r(1215), + l = [], + c = r(3837), + u = function () {}; + function d(e) { + s(e), + (e.gracefulify = d), + (e.FileReadStream = p), + (e.FileWriteStream = m), + (e.createReadStream = function (e, t) { + return new p(e, t); + }), + (e.createWriteStream = function (e, t) { + return new m(e, t); + }); + var t = e.readFile; + e.readFile = function (e, r, n) { + return ( + "function" == typeof r && ((n = r), (r = null)), + (function e(r, n, o) { + return t(r, n, function (t) { + !t || ("EMFILE" !== t.code && "ENFILE" !== t.code) + ? ("function" == typeof o && o.apply(this, arguments), h()) + : f([e, [r, n, o]]); + }); + })(e, r, n) + ); + }; + var r = e.writeFile; + e.writeFile = function (e, t, n, o) { + return ( + "function" == typeof n && ((o = n), (n = null)), + (function e(t, n, o, i) { + return r(t, n, o, function (r) { + !r || ("EMFILE" !== r.code && "ENFILE" !== r.code) + ? ("function" == typeof i && i.apply(this, arguments), h()) + : f([e, [t, n, o, i]]); + }); + })(e, t, n, o) + ); + }; + var n = e.appendFile; + n && + (e.appendFile = function (e, t, r, o) { + return ( + "function" == typeof r && ((o = r), (r = null)), + (function e(t, r, o, i) { + return n(t, r, o, function (n) { + !n || ("EMFILE" !== n.code && "ENFILE" !== n.code) + ? ("function" == typeof i && i.apply(this, arguments), + h()) + : f([e, [t, r, o, i]]); + }); + })(e, t, r, o) + ); + }); + var o = e.readdir; + function i(t) { + return o.apply(e, t); + } + if ( + ((e.readdir = function (e, t, r) { + var n = [e]; + return ( + "function" != typeof t ? n.push(t) : (r = t), + n.push(function (e, t) { + t && t.sort && t.sort(), + !e || ("EMFILE" !== e.code && "ENFILE" !== e.code) + ? ("function" == typeof r && r.apply(this, arguments), + h()) + : f([i, [n]]); + }), + i(n) + ); + }), + "v0.8" === process.version.substr(0, 4)) + ) { + var l = a(e); + (p = l.ReadStream), (m = l.WriteStream); + } + var c = e.ReadStream; + (p.prototype = Object.create(c.prototype)), + (p.prototype.open = function () { + var e = this; + v(e.path, e.flags, e.mode, function (t, r) { + t + ? (e.autoClose && e.destroy(), e.emit("error", t)) + : ((e.fd = r), e.emit("open", r), e.read()); + }); + }); + var u = e.WriteStream; + function p(e, t) { + return this instanceof p + ? (c.apply(this, arguments), this) + : p.apply(Object.create(p.prototype), arguments); + } + function m(e, t) { + return this instanceof m + ? (u.apply(this, arguments), this) + : m.apply(Object.create(m.prototype), arguments); + } + (m.prototype = Object.create(u.prototype)), + (m.prototype.open = function () { + var e = this; + v(e.path, e.flags, e.mode, function (t, r) { + t + ? (e.destroy(), e.emit("error", t)) + : ((e.fd = r), e.emit("open", r)); + }); + }), + (e.ReadStream = p), + (e.WriteStream = m); + var g = e.open; + function v(e, t, r, n) { + return ( + "function" == typeof r && ((n = r), (r = null)), + (function e(t, r, n, o) { + return g(t, r, n, function (i, s) { + !i || ("EMFILE" !== i.code && "ENFILE" !== i.code) + ? ("function" == typeof o && o.apply(this, arguments), h()) + : f([e, [t, r, n, o]]); + }); + })(e, t, r, n) + ); + } + return (e.open = v), e; + } + function f(e) { + u("ENQUEUE", e[0].name, e[1]), l.push(e); + } + function h() { + var e = l.shift(); + e && (u("RETRY", e[0].name, e[1]), e[0].apply(null, e[1])); + } + c.debuglog + ? (u = c.debuglog("gfs4")) + : /\bgfs4\b/i.test(process.env.NODE_DEBUG || "") && + (u = function () { + var e = c.format.apply(c, arguments); + (e = "GFS4: " + e.split(/\n/).join("\nGFS4: ")), console.error(e); + }), + /\bgfs4\b/i.test(process.env.NODE_DEBUG || "") && + process.on("exit", function () { + u(l), r(9491).equal(l.length, 0); + }), + (e.exports = d(r(3901))), + process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && (e.exports = d(i)), + (e.exports.close = i.close = + ((n = i.close), + function (e, t) { + return n.call(i, e, function (e) { + e || h(), "function" == typeof t && t.apply(this, arguments); + }); + })), + (e.exports.closeSync = i.closeSync = + ((o = i.closeSync), + function (e) { + var t = o.apply(i, arguments); + return h(), t; + })); + }, + 1215: (e, t, r) => { + var n = r(2781).Stream; + e.exports = function (e) { + return { + ReadStream: function t(r, o) { + if (!(this instanceof t)) return new t(r, o); + n.call(this); + var i = this; + (this.path = r), + (this.fd = null), + (this.readable = !0), + (this.paused = !1), + (this.flags = "r"), + (this.mode = 438), + (this.bufferSize = 65536), + (o = o || {}); + for (var s = Object.keys(o), a = 0, l = s.length; a < l; a++) { + var c = s[a]; + this[c] = o[c]; + } + if ( + (this.encoding && this.setEncoding(this.encoding), + void 0 !== this.start) + ) { + if ("number" != typeof this.start) + throw TypeError("start must be a Number"); + if (void 0 === this.end) this.end = 1 / 0; + else if ("number" != typeof this.end) + throw TypeError("end must be a Number"); + if (this.start > this.end) + throw new Error("start must be <= end"); + this.pos = this.start; + } + null === this.fd + ? e.open(this.path, this.flags, this.mode, function (e, t) { + if (e) return i.emit("error", e), void (i.readable = !1); + (i.fd = t), i.emit("open", t), i._read(); + }) + : process.nextTick(function () { + i._read(); + }); + }, + WriteStream: function t(r, o) { + if (!(this instanceof t)) return new t(r, o); + n.call(this), + (this.path = r), + (this.fd = null), + (this.writable = !0), + (this.flags = "w"), + (this.encoding = "binary"), + (this.mode = 438), + (this.bytesWritten = 0), + (o = o || {}); + for (var i = Object.keys(o), s = 0, a = i.length; s < a; s++) { + var l = i[s]; + this[l] = o[l]; + } + if (void 0 !== this.start) { + if ("number" != typeof this.start) + throw TypeError("start must be a Number"); + if (this.start < 0) throw new Error("start must be >= zero"); + this.pos = this.start; + } + (this.busy = !1), + (this._queue = []), + null === this.fd && + ((this._open = e.open), + this._queue.push([ + this._open, + this.path, + this.flags, + this.mode, + void 0, + ]), + this.flush()); + }, + }; + }; + }, + 9033: (e, t, r) => { + var n = r(3901), + o = r(2057), + i = process.cwd, + s = null, + a = process.env.GRACEFUL_FS_PLATFORM || "win32"; + process.cwd = function () { + return s || (s = i.call(process)), s; + }; + try { + process.cwd(); + } catch (e) {} + var l = process.chdir; + function c(e) { + return e + ? function (t, r, o) { + return e.call(n, t, r, function (e) { + m(e) && (e = null), o && o.apply(this, arguments); + }); + } + : e; + } + function u(e) { + return e + ? function (t, r) { + try { + return e.call(n, t, r); + } catch (e) { + if (!m(e)) throw e; + } + } + : e; + } + function d(e) { + return e + ? function (t, r, o, i) { + return e.call(n, t, r, o, function (e) { + m(e) && (e = null), i && i.apply(this, arguments); + }); + } + : e; + } + function f(e) { + return e + ? function (t, r, o) { + try { + return e.call(n, t, r, o); + } catch (e) { + if (!m(e)) throw e; + } + } + : e; + } + function h(e) { + return e + ? function (t, r) { + return e.call(n, t, function (e, t) { + if (!t) return r.apply(this, arguments); + t.uid < 0 && (t.uid += 4294967296), + t.gid < 0 && (t.gid += 4294967296), + r && r.apply(this, arguments); + }); + } + : e; + } + function p(e) { + return e + ? function (t) { + var r = e.call(n, t); + return ( + r.uid < 0 && (r.uid += 4294967296), + r.gid < 0 && (r.gid += 4294967296), + r + ); + } + : e; + } + function m(e) { + return ( + !e || + "ENOSYS" === e.code || + !( + (process.getuid && 0 === process.getuid()) || + ("EINVAL" !== e.code && "EPERM" !== e.code) + ) + ); + } + (process.chdir = function (e) { + (s = null), l.call(process, e); + }), + (e.exports = function (e) { + var t, r, n; + o.hasOwnProperty("O_SYMLINK") && + process.version.match(/^v0\.6\.[0-2]|^v0\.5\./) && + (function (e) { + (e.lchmod = function (t, r, n) { + e.open(t, o.O_WRONLY | o.O_SYMLINK, r, function (t, o) { + t + ? n && n(t) + : e.fchmod(o, r, function (t) { + e.close(o, function (e) { + n && n(t || e); + }); + }); + }); + }), + (e.lchmodSync = function (t, r) { + var n, + i = e.openSync(t, o.O_WRONLY | o.O_SYMLINK, r), + s = !0; + try { + (n = e.fchmodSync(i, r)), (s = !1); + } finally { + if (s) + try { + e.closeSync(i); + } catch (e) {} + else e.closeSync(i); + } + return n; + }); + })(e), + e.lutimes || + (function (e) { + o.hasOwnProperty("O_SYMLINK") + ? ((e.lutimes = function (t, r, n, i) { + e.open(t, o.O_SYMLINK, function (t, o) { + t + ? i && i(t) + : e.futimes(o, r, n, function (t) { + e.close(o, function (e) { + i && i(t || e); + }); + }); + }); + }), + (e.lutimesSync = function (t, r, n) { + var i, + s = e.openSync(t, o.O_SYMLINK), + a = !0; + try { + (i = e.futimesSync(s, r, n)), (a = !1); + } finally { + if (a) + try { + e.closeSync(s); + } catch (e) {} + else e.closeSync(s); + } + return i; + })) + : ((e.lutimes = function (e, t, r, n) { + n && process.nextTick(n); + }), + (e.lutimesSync = function () {})); + })(e), + (e.chown = d(e.chown)), + (e.fchown = d(e.fchown)), + (e.lchown = d(e.lchown)), + (e.chmod = c(e.chmod)), + (e.fchmod = c(e.fchmod)), + (e.lchmod = c(e.lchmod)), + (e.chownSync = f(e.chownSync)), + (e.fchownSync = f(e.fchownSync)), + (e.lchownSync = f(e.lchownSync)), + (e.chmodSync = u(e.chmodSync)), + (e.fchmodSync = u(e.fchmodSync)), + (e.lchmodSync = u(e.lchmodSync)), + (e.stat = h(e.stat)), + (e.fstat = h(e.fstat)), + (e.lstat = h(e.lstat)), + (e.statSync = p(e.statSync)), + (e.fstatSync = p(e.fstatSync)), + (e.lstatSync = p(e.lstatSync)), + e.lchmod || + ((e.lchmod = function (e, t, r) { + r && process.nextTick(r); + }), + (e.lchmodSync = function () {})), + e.lchown || + ((e.lchown = function (e, t, r, n) { + n && process.nextTick(n); + }), + (e.lchownSync = function () {})), + "win32" === a && + (e.rename = + ((t = e.rename), + function (r, n, o) { + var i = Date.now(), + s = 0; + t(r, n, function a(l) { + if ( + l && + ("EACCES" === l.code || "EPERM" === l.code) && + Date.now() - i < 6e4 + ) + return ( + setTimeout(function () { + e.stat(n, function (e, i) { + e && "ENOENT" === e.code ? t(r, n, a) : o(l); + }); + }, s), + void (s < 100 && (s += 10)) + ); + o && o(l); + }); + })), + (e.read = + ((n = e.read), + function (t, r, o, i, s, a) { + var l; + if (a && "function" == typeof a) { + var c = 0; + l = function (u, d, f) { + if (u && "EAGAIN" === u.code && c < 10) + return c++, n.call(e, t, r, o, i, s, l); + a.apply(this, arguments); + }; + } + return n.call(e, t, r, o, i, s, l); + })), + (e.readSync = + ((r = e.readSync), + function (t, n, o, i, s) { + for (var a = 0; ; ) + try { + return r.call(e, t, n, o, i, s); + } catch (e) { + if ("EAGAIN" === e.code && a < 10) { + a++; + continue; + } + throw e; + } + })); + }); + }, + 609: (e, t, r) => { + try { + var n = r(3837); + if ("function" != typeof n.inherits) throw ""; + e.exports = n.inherits; + } catch (t) { + e.exports = r(4849); + } + }, + 4849: (e) => { + "function" == typeof Object.create + ? (e.exports = function (e, t) { + t && + ((e.super_ = t), + (e.prototype = Object.create(t.prototype, { + constructor: { + value: e, + enumerable: !1, + writable: !0, + configurable: !0, + }, + }))); + }) + : (e.exports = function (e, t) { + if (t) { + e.super_ = t; + var r = function () {}; + (r.prototype = t.prototype), + (e.prototype = new r()), + (e.prototype.constructor = e); + } + }); + }, + 818: (e) => { + "use strict"; + const t = (e) => + null !== e && "object" == typeof e && "function" == typeof e.pipe; + (t.writable = (e) => + t(e) && + !1 !== e.writable && + "function" == typeof e._write && + "object" == typeof e._writableState), + (t.readable = (e) => + t(e) && + !1 !== e.readable && + "function" == typeof e._read && + "object" == typeof e._readableState), + (t.duplex = (e) => t.writable(e) && t.readable(e)), + (t.transform = (e) => + t.duplex(e) && "function" == typeof e._transform), + (e.exports = t); + }, + 557: (e, t, r) => { + var n; + function o(e, t, r) { + if (("function" == typeof t && ((r = t), (t = {})), !r)) { + if ("function" != typeof Promise) + throw new TypeError("callback not provided"); + return new Promise(function (r, n) { + o(e, t || {}, function (e, t) { + e ? n(e) : r(t); + }); + }); + } + n(e, t || {}, function (e, n) { + e && + ("EACCES" === e.code || (t && t.ignoreErrors)) && + ((e = null), (n = !1)), + r(e, n); + }); + } + r(7147), + (n = r(1905)), + (e.exports = o), + (o.sync = function (e, t) { + try { + return n.sync(e, t || {}); + } catch (e) { + if ((t && t.ignoreErrors) || "EACCES" === e.code) return !1; + throw e; + } + }); + }, + 1905: (e, t, r) => { + (e.exports = i), + (i.sync = function (e, t) { + return o(n.statSync(e), e, t); + }); + var n = r(7147); + function o(e, t, r) { + return ( + !(!e.isSymbolicLink() && !e.isFile()) && + (function (e, t) { + var r = void 0 !== t.pathExt ? t.pathExt : process.env.PATHEXT; + if (!r) return !0; + if (-1 !== (r = r.split(";")).indexOf("")) return !0; + for (var n = 0; n < r.length; n++) { + var o = r[n].toLowerCase(); + if (o && e.substr(-o.length).toLowerCase() === o) return !0; + } + return !1; + })(t, r) + ); + } + function i(e, t, r) { + n.stat(e, function (n, i) { + r(n, !n && o(i, e, t)); + }); + } + }, + 8822: (e, t, r) => { + var n; + try { + n = r(391); + } catch (e) { + n = r(7147); + } + function o(e, t) { + var r, + n = "\n"; + return ( + "object" == typeof t && + null !== t && + (t.spaces && (r = t.spaces), t.EOL && (n = t.EOL)), + JSON.stringify(e, t ? t.replacer : null, r).replace(/\n/g, n) + n + ); + } + function i(e) { + return ( + Buffer.isBuffer(e) && (e = e.toString("utf8")), + e.replace(/^\uFEFF/, "") + ); + } + var s = { + readFile: function (e, t, r) { + null == r && ((r = t), (t = {})), + "string" == typeof t && (t = { encoding: t }); + var o = (t = t || {}).fs || n, + s = !0; + "throws" in t && (s = t.throws), + o.readFile(e, t, function (n, o) { + if (n) return r(n); + var a; + o = i(o); + try { + a = JSON.parse(o, t ? t.reviver : null); + } catch (t) { + return s + ? ((t.message = e + ": " + t.message), r(t)) + : r(null, null); + } + r(null, a); + }); + }, + readFileSync: function (e, t) { + "string" == typeof (t = t || {}) && (t = { encoding: t }); + var r = t.fs || n, + o = !0; + "throws" in t && (o = t.throws); + try { + var s = r.readFileSync(e, t); + return (s = i(s)), JSON.parse(s, t.reviver); + } catch (t) { + if (o) throw ((t.message = e + ": " + t.message), t); + return null; + } + }, + writeFile: function (e, t, r, i) { + null == i && ((i = r), (r = {})); + var s = (r = r || {}).fs || n, + a = ""; + try { + a = o(t, r); + } catch (e) { + return void (i && i(e, null)); + } + s.writeFile(e, a, r, i); + }, + writeFileSync: function (e, t, r) { + var i = (r = r || {}).fs || n, + s = o(t, r); + return i.writeFileSync(e, s, r); + }, + }; + e.exports = s; + }, + 7325: (e, t, r) => { + var n = r(1794).Symbol; + e.exports = n; + }, + 9382: (e) => { + e.exports = function (e, t) { + for ( + var r = -1, n = null == e ? 0 : e.length, o = Array(n); + ++r < n; + + ) + o[r] = t(e[r], r, e); + return o; + }; + }, + 5635: (e, t, r) => { + var n = r(7325), + o = r(7926), + i = r(3792), + s = n ? n.toStringTag : void 0; + e.exports = function (e) { + return null == e + ? void 0 === e + ? "[object Undefined]" + : "[object Null]" + : s && s in Object(e) + ? o(e) + : i(e); + }; + }, + 8849: (e, t, r) => { + var n = r(7325), + o = r(9382), + i = r(2441), + s = r(6307), + a = n ? n.prototype : void 0, + l = a ? a.toString : void 0; + e.exports = function e(t) { + if ("string" == typeof t) return t; + if (i(t)) return o(t, e) + ""; + if (s(t)) return l ? l.call(t) : ""; + var r = t + ""; + return "0" == r && 1 / t == -1 / 0 ? "-0" : r; + }; + }, + 1331: (e) => { + var t = + "object" == typeof global && + global && + global.Object === Object && + global; + e.exports = t; + }, + 7926: (e, t, r) => { + var n = r(7325), + o = Object.prototype, + i = o.hasOwnProperty, + s = o.toString, + a = n ? n.toStringTag : void 0; + e.exports = function (e) { + var t = i.call(e, a), + r = e[a]; + try { + e[a] = void 0; + var n = !0; + } catch (e) {} + var o = s.call(e); + return n && (t ? (e[a] = r) : delete e[a]), o; + }; + }, + 3792: (e) => { + var t = Object.prototype.toString; + e.exports = function (e) { + return t.call(e); + }; + }, + 1794: (e, t, r) => { + var n = r(1331), + o = "object" == typeof self && self && self.Object === Object && self, + i = n || o || Function("return this")(); + e.exports = i; + }, + 6539: (e) => { + e.exports = function (e) { + return function () { + return e; + }; + }; + }, + 2229: (e, t, r) => { + var n = r(9948), + o = /[\\^$.*+?()[\]{}|]/g, + i = RegExp(o.source); + e.exports = function (e) { + return (e = n(e)) && i.test(e) ? e.replace(o, "\\$&") : e; + }; + }, + 2441: (e) => { + var t = Array.isArray; + e.exports = t; + }, + 8863: (e) => { + e.exports = function (e) { + return null != e && "object" == typeof e; + }; + }, + 6307: (e, t, r) => { + var n = r(5635), + o = r(8863); + e.exports = function (e) { + return "symbol" == typeof e || (o(e) && "[object Symbol]" == n(e)); + }; + }, + 5478: (e) => { + e.exports = function () {}; + }, + 9948: (e, t, r) => { + var n = r(8849); + e.exports = function (e) { + return null == e ? "" : n(e); + }; + }, + 6938: (e, t, r) => { + "use strict"; + const n = r(9353); + e.exports = n((e) => ((e.message = `\t${e.message}`), e)); + }, + 4139: (e, t, r) => { + "use strict"; + const { Colorizer: n } = r(838), + { Padder: o } = r(3885), + { configs: i, MESSAGE: s } = r(7286); + class a { + constructor(e = {}) { + e.levels || (e.levels = i.cli.levels), + (this.colorizer = new n(e)), + (this.padder = new o(e)), + (this.options = e); + } + transform(e, t) { + return ( + this.colorizer.transform(this.padder.transform(e, t), t), + (e[s] = `${e.level}:${e.message}`), + e + ); + } + } + (e.exports = (e) => new a(e)), (e.exports.Format = a); + }, + 838: (e, t, r) => { + "use strict"; + const n = r(3450), + { LEVEL: o, MESSAGE: i } = r(7286); + n.enabled = !0; + const s = /\s+/; + class a { + constructor(e = {}) { + e.colors && this.addColors(e.colors), (this.options = e); + } + static addColors(e) { + const t = Object.keys(e).reduce( + (t, r) => ((t[r] = s.test(e[r]) ? e[r].split(s) : e[r]), t), + {} + ); + return ( + (a.allColors = Object.assign({}, a.allColors || {}, t)), + a.allColors + ); + } + addColors(e) { + return a.addColors(e); + } + colorize(e, t, r) { + if ((void 0 === r && (r = t), !Array.isArray(a.allColors[e]))) + return n[a.allColors[e]](r); + for (let t = 0, o = a.allColors[e].length; t < o; t++) + r = n[a.allColors[e][t]](r); + return r; + } + transform(e, t) { + return ( + t.all && + "string" == typeof e[i] && + (e[i] = this.colorize(e[o], e.level, e[i])), + (t.level || t.all || !t.message) && + (e.level = this.colorize(e[o], e.level)), + (t.all || t.message) && + (e.message = this.colorize(e[o], e.level, e.message)), + e + ); + } + } + (e.exports = (e) => new a(e)), + (e.exports.Colorizer = e.exports.Format = a); + }, + 248: (e, t, r) => { + "use strict"; + const n = r(9353); + function o(e) { + if (e.every(i)) + return (t) => { + let r = t; + for (let t = 0; t < e.length; t++) + if (((r = e[t].transform(r, e[t].options)), !r)) return !1; + return r; + }; + } + function i(e) { + if ("function" != typeof e.transform) + throw new Error( + [ + "No transform function found on format. Did you create a format instance?", + "const myFormat = format(formatFn);", + "const instance = myFormat();", + ].join("\n") + ); + return !0; + } + (e.exports = (...e) => { + const t = n(o(e)), + r = t(); + return (r.Format = t.Format), r; + }), + (e.exports.cascade = o); + }, + 3684: (e, t, r) => { + "use strict"; + const n = r(9353), + { LEVEL: o, MESSAGE: i } = r(7286); + e.exports = n((e, { stack: t }) => { + if (e instanceof Error) { + const r = Object.assign({}, e, { + level: e.level, + [o]: e[o] || e.level, + message: e.message, + [i]: e[i] || e.message, + }); + return t && (r.stack = e.stack), r; + } + if (!(e.message instanceof Error)) return e; + const r = e.message; + return ( + Object.assign(e, r), + (e.message = r.message), + (e[i] = r.message), + t && (e.stack = r.stack), + e + ); + }); + }, + 9353: (e) => { + "use strict"; + class t extends Error { + constructor(e) { + super( + `Format functions must be synchronous taking a two arguments: (info, opts)\nFound: ${ + e.toString().split("\n")[0] + }\n` + ), + Error.captureStackTrace(this, t); + } + } + e.exports = (e) => { + if (e.length > 2) throw new t(e); + function r(e = {}) { + this.options = e; + } + function n(e) { + return new r(e); + } + return (r.prototype.transform = e), (n.Format = r), n; + }; + }, + 3252: (e, t, r) => { + "use strict"; + const n = (t.format = r(9353)); + function o(e, t) { + Object.defineProperty(n, e, { get: () => t(), configurable: !0 }); + } + (t.levels = r(9548)), + o("align", function () { + return r(6938); + }), + o("errors", function () { + return r(3684); + }), + o("cli", function () { + return r(4139); + }), + o("combine", function () { + return r(248); + }), + o("colorize", function () { + return r(838); + }), + o("json", function () { + return r(5242); + }), + o("label", function () { + return r(8826); + }), + o("logstash", function () { + return r(6827); + }), + o("metadata", function () { + return r(454); + }), + o("ms", function () { + return r(8416); + }), + o("padLevels", function () { + return r(3885); + }), + o("prettyPrint", function () { + return r(9262); + }), + o("printf", function () { + return r(5606); + }), + o("simple", function () { + return r(8884); + }), + o("splat", function () { + return r(6636); + }), + o("timestamp", function () { + return r(7088); + }), + o("uncolorize", function () { + return r(381); + }); + }, + 5242: (e, t, r) => { + "use strict"; + const n = r(9353), + { MESSAGE: o } = r(7286), + i = r(2776); + function s(e, t) { + return "bigint" == typeof t ? t.toString() : t; + } + e.exports = n((e, t) => { + const r = i.configure(t); + return (e[o] = r(e, t.replacer || s, t.space)), e; + }); + }, + 8826: (e, t, r) => { + "use strict"; + const n = r(9353); + e.exports = n((e, t) => + t.message + ? ((e.message = `[${t.label}] ${e.message}`), e) + : ((e.label = t.label), e) + ); + }, + 9548: (e, t, r) => { + "use strict"; + const { Colorizer: n } = r(838); + e.exports = (e) => (n.addColors(e.colors || e), e); + }, + 6827: (e, t, r) => { + "use strict"; + const n = r(9353), + { MESSAGE: o } = r(7286), + i = r(2776); + e.exports = n((e) => { + const t = {}; + return ( + e.message && ((t["@message"] = e.message), delete e.message), + e.timestamp && + ((t["@timestamp"] = e.timestamp), delete e.timestamp), + (t["@fields"] = e), + (e[o] = i(t)), + e + ); + }); + }, + 454: (e, t, r) => { + "use strict"; + const n = r(9353); + e.exports = n((e, t = {}) => { + let r = "metadata"; + t.key && (r = t.key); + let n = []; + return ( + t.fillExcept || t.fillWith || (n.push("level"), n.push("message")), + t.fillExcept && (n = t.fillExcept), + n.length > 0 + ? (function (e, t, r) { + const n = t.reduce( + (t, r) => ((t[r] = e[r]), delete e[r], t), + {} + ), + o = Object.keys(e).reduce( + (t, r) => ((t[r] = e[r]), delete e[r], t), + {} + ); + return Object.assign(e, n, { [r]: o }), e; + })(e, n, r) + : t.fillWith + ? (function (e, t, r) { + return ( + (e[r] = t.reduce( + (t, r) => ((t[r] = e[r]), delete e[r], t), + {} + )), + e + ); + })(e, t.fillWith, r) + : e + ); + }); + }, + 8416: function (e, t, r) { + "use strict"; + const n = r(9353), + o = r(2079); + e.exports = n((e) => { + const t = +new Date(); + return ( + (this.diff = t - (this.prevTime || t)), + (this.prevTime = t), + (e.ms = `+${o(this.diff)}`), + e + ); + }); + }, + 3885: (e, t, r) => { + "use strict"; + const { configs: n, LEVEL: o, MESSAGE: i } = r(7286); + class s { + constructor(e = { levels: n.npm.levels }) { + (this.paddings = s.paddingForLevels(e.levels, e.filler)), + (this.options = e); + } + static getLongestLevel(e) { + const t = Object.keys(e).map((e) => e.length); + return Math.max(...t); + } + static paddingForLevel(e, t, r) { + const n = r + 1 - e.length, + o = Math.floor(n / t.length); + return `${t}${t.repeat(o)}`.slice(0, n); + } + static paddingForLevels(e, t = " ") { + const r = s.getLongestLevel(e); + return Object.keys(e).reduce( + (e, n) => ((e[n] = s.paddingForLevel(n, t, r)), e), + {} + ); + } + transform(e, t) { + return ( + (e.message = `${this.paddings[e[o]]}${e.message}`), + e[i] && (e[i] = `${this.paddings[e[o]]}${e[i]}`), + e + ); + } + } + (e.exports = (e) => new s(e)), + (e.exports.Padder = e.exports.Format = s); + }, + 9262: (e, t, r) => { + "use strict"; + const n = r(3837).inspect, + o = r(9353), + { LEVEL: i, MESSAGE: s, SPLAT: a } = r(7286); + e.exports = o((e, t = {}) => { + const r = Object.assign({}, e); + return ( + delete r[i], + delete r[s], + delete r[a], + (e[s] = n(r, !1, t.depth || null, t.colorize)), + e + ); + }); + }, + 5606: (e, t, r) => { + "use strict"; + const { MESSAGE: n } = r(7286); + class o { + constructor(e) { + this.template = e; + } + transform(e) { + return (e[n] = this.template(e)), e; + } + } + (e.exports = (e) => new o(e)), + (e.exports.Printf = e.exports.Format = o); + }, + 8884: (e, t, r) => { + "use strict"; + const n = r(9353), + { MESSAGE: o } = r(7286), + i = r(2776); + e.exports = n((e) => { + const t = i( + Object.assign({}, e, { + level: void 0, + message: void 0, + splat: void 0, + }) + ), + r = (e.padding && e.padding[e.level]) || ""; + return ( + (e[o] = + "{}" !== t + ? `${e.level}:${r} ${e.message} ${t}` + : `${e.level}:${r} ${e.message}`), + e + ); + }); + }, + 6636: (e, t, r) => { + "use strict"; + const n = r(3837), + { SPLAT: o } = r(7286), + i = /%[scdjifoO%]/g, + s = /%%/g; + class a { + constructor(e) { + this.options = e; + } + _splat(e, t) { + const r = e.message, + i = e[o] || e.splat || [], + a = r.match(s), + l = (a && a.length) || 0, + c = t.length - l - i.length, + u = c < 0 ? i.splice(c, -1 * c) : [], + d = u.length; + if (d) for (let t = 0; t < d; t++) Object.assign(e, u[t]); + return (e.message = n.format(r, ...i)), e; + } + transform(e) { + const t = e.message, + r = e[o] || e.splat; + if (!r || !r.length) return e; + const n = t && t.match && t.match(i); + if (!n && (r || r.length)) { + const t = r.length > 1 ? r.splice(0) : r, + n = t.length; + if (n) for (let r = 0; r < n; r++) Object.assign(e, t[r]); + return e; + } + return n ? this._splat(e, n) : e; + } + } + e.exports = (e) => new a(e); + }, + 7088: (e, t, r) => { + "use strict"; + const n = r(1260), + o = r(9353); + e.exports = o( + (e, t = {}) => ( + t.format && + (e.timestamp = + "function" == typeof t.format + ? t.format() + : n.format(new Date(), t.format)), + e.timestamp || (e.timestamp = new Date().toISOString()), + t.alias && (e[t.alias] = e.timestamp), + e + ) + ); + }, + 381: (e, t, r) => { + "use strict"; + const n = r(3450), + o = r(9353), + { MESSAGE: i } = r(7286); + e.exports = o( + (e, t) => ( + !1 !== t.level && (e.level = n.strip(e.level)), + !1 !== t.message && (e.message = n.strip(e.message)), + !1 !== t.raw && e[i] && (e[i] = n.strip(e[i])), + e + ) + ); + }, + 3229: function (e, t, r) { + "use strict"; + var n = + (this && this.__awaiter) || + function (e, t, r, n) { + return new (r || (r = Promise))(function (o, i) { + function s(e) { + try { + l(n.next(e)); + } catch (e) { + i(e); + } + } + function a(e) { + try { + l(n.throw(e)); + } catch (e) { + i(e); + } + } + function l(e) { + e.done + ? o(e.value) + : new r(function (t) { + t(e.value); + }).then(s, a); + } + l((n = n.apply(e, t || [])).next()); + }); + }, + o = + (this && this.__importDefault) || + function (e) { + return e && e.__esModule ? e : { default: e }; + }; + Object.defineProperty(t, "__esModule", { value: !0 }); + const i = o(r(3766)); + function s(e, t = "maxAge") { + let r, o, s; + const a = () => + n(this, void 0, void 0, function* () { + if (void 0 !== r) return; + const a = (a) => + n(this, void 0, void 0, function* () { + s = i.default(); + const n = a[1][t] - Date.now(); + return n <= 0 + ? (e.delete(a[0]), void s.resolve()) + : ((r = a[0]), + (o = setTimeout(() => { + e.delete(a[0]), s && s.resolve(); + }, n)), + "function" == typeof o.unref && o.unref(), + s.promise); + }); + try { + for (const t of e) yield a(t); + } catch (e) {} + r = void 0; + }), + l = e.set.bind(e); + return ( + (e.set = (t, n) => { + e.has(t) && e.delete(t); + const i = l(t, n); + return ( + r && + r === t && + ((r = void 0), + void 0 !== o && (clearTimeout(o), (o = void 0)), + void 0 !== s && (s.reject(void 0), (s = void 0))), + a(), + i + ); + }), + a(), + e + ); + } + (t.default = s), (e.exports = s), (e.exports.default = s); + }, + 2878: (e, t, r) => { + "use strict"; + const n = r(1689), + o = r(3264), + i = r(3229), + s = new WeakMap(), + a = (...e) => { + if (0 === e.length) return "__defaultKey"; + if (1 === e.length) { + const [t] = e; + if (null == t || ("function" != typeof t && "object" != typeof t)) + return t; + } + return JSON.stringify(e); + }, + l = (e, t) => { + "number" == + typeof (t = Object.assign( + { cacheKey: a, cache: new Map(), cachePromiseRejection: !1 }, + t + )).maxAge && i(t.cache); + const { cache: r } = t; + t.maxAge = t.maxAge || 0; + const l = function (...n) { + const i = t.cacheKey(...n); + if (r.has(i)) return r.get(i).data; + const s = e.call(this, ...n); + return ( + ((e, n) => { + r.set(e, { data: n, maxAge: Date.now() + t.maxAge }); + })(i, s), + o(s) && + !1 === t.cachePromiseRejection && + s.catch(() => r.delete(i)), + s + ); + }; + try { + n(l, e); + } catch (e) {} + return s.set(l, t.cache), l; + }; + (e.exports = l), + (e.exports.default = l), + (e.exports.clear = (e) => { + const t = s.get(e); + t && "function" == typeof t.clear && t.clear(); + }); + }, + 1689: (e) => { + "use strict"; + const t = (e, t) => { + for (const r of Reflect.ownKeys(t)) + Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); + return e; + }; + (e.exports = t), (e.exports.default = t); + }, + 7207: (e, t, r) => { + var n = r(1017), + o = r(7147), + i = parseInt("0777", 8); + function s(e, t, r, a) { + "function" == typeof t + ? ((r = t), (t = {})) + : (t && "object" == typeof t) || (t = { mode: t }); + var l = t.mode, + c = t.fs || o; + void 0 === l && (l = i), a || (a = null); + var u = r || function () {}; + (e = n.resolve(e)), + c.mkdir(e, l, function (r) { + if (!r) return u(null, (a = a || e)); + if ("ENOENT" === r.code) { + if (n.dirname(e) === e) return u(r); + s(n.dirname(e), t, function (r, n) { + r ? u(r, n) : s(e, t, u, n); + }); + } else + c.stat(e, function (e, t) { + e || !t.isDirectory() ? u(r, a) : u(null, a); + }); + }); + } + (e.exports = s.mkdirp = s.mkdirP = s), + (s.sync = function e(t, r, s) { + (r && "object" == typeof r) || (r = { mode: r }); + var a = r.mode, + l = r.fs || o; + void 0 === a && (a = i), s || (s = null), (t = n.resolve(t)); + try { + l.mkdirSync(t, a), (s = s || t); + } catch (o) { + if ("ENOENT" === o.code) (s = e(n.dirname(t), r, s)), e(t, r, s); + else { + var c; + try { + c = l.statSync(t); + } catch (e) { + throw o; + } + if (!c.isDirectory()) throw o; + } + } + return s; + }); + }, + 2079: (e) => { + var t = 1e3, + r = 60 * t, + n = 60 * r, + o = 24 * n; + function i(e, t, r, n) { + var o = t >= 1.5 * r; + return Math.round(e / r) + " " + n + (o ? "s" : ""); + } + e.exports = function (e, s) { + s = s || {}; + var a, + l, + c = typeof e; + if ("string" === c && e.length > 0) + return (function (e) { + if (!((e = String(e)).length > 100)) { + var i = + /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec( + e + ); + if (i) { + var s = parseFloat(i[1]); + switch ((i[2] || "ms").toLowerCase()) { + case "years": + case "year": + case "yrs": + case "yr": + case "y": + return 315576e5 * s; + case "weeks": + case "week": + case "w": + return 6048e5 * s; + case "days": + case "day": + case "d": + return s * o; + case "hours": + case "hour": + case "hrs": + case "hr": + case "h": + return s * n; + case "minutes": + case "minute": + case "mins": + case "min": + case "m": + return s * r; + case "seconds": + case "second": + case "secs": + case "sec": + case "s": + return s * t; + case "milliseconds": + case "millisecond": + case "msecs": + case "msec": + case "ms": + return s; + default: + return; + } + } + } + })(e); + if ("number" === c && isFinite(e)) + return s.long + ? ((a = e), + (l = Math.abs(a)) >= o + ? i(a, l, o, "day") + : l >= n + ? i(a, l, n, "hour") + : l >= r + ? i(a, l, r, "minute") + : l >= t + ? i(a, l, t, "second") + : a + " ms") + : (function (e) { + var i = Math.abs(e); + return i >= o + ? Math.round(e / o) + "d" + : i >= n + ? Math.round(e / n) + "h" + : i >= r + ? Math.round(e / r) + "m" + : i >= t + ? Math.round(e / t) + "s" + : e + "ms"; + })(e); + throw new Error( + "val is not a non-empty string or a valid number. val=" + + JSON.stringify(e) + ); + }; + }, + 5419: (e) => { + "use strict"; + e.exports = function (e) { + try { + return e(); + } catch (e) {} + }; + }, + 1829: (e, t, r) => { + "use strict"; + const n = r(1017), + o = r(5620); + (e.exports = (e) => { + let t; + e = Object.assign({ cwd: process.cwd(), path: process.env[o()] }, e); + let r = n.resolve(e.cwd); + const i = []; + for (; t !== r; ) + i.push(n.join(r, "node_modules/.bin")), + (t = r), + (r = n.resolve(r, "..")); + return ( + i.push(n.dirname(process.execPath)), + i.concat(e.path).join(n.delimiter) + ); + }), + (e.exports.env = (t) => { + t = Object.assign({ env: process.env }, t); + const r = Object.assign({}, t.env), + n = o({ env: r }); + return (t.path = r[n]), (r[n] = e.exports(t)), r; + }); + }, + 3417: (e, t, r) => { + var n = r(4934); + function o(e) { + var t = function () { + return t.called + ? t.value + : ((t.called = !0), (t.value = e.apply(this, arguments))); + }; + return (t.called = !1), t; + } + function i(e) { + var t = function () { + if (t.called) throw new Error(t.onceError); + return (t.called = !0), (t.value = e.apply(this, arguments)); + }, + r = e.name || "Function wrapped with `once`"; + return ( + (t.onceError = r + " shouldn't be called more than once"), + (t.called = !1), + t + ); + } + (e.exports = n(o)), + (e.exports.strict = n(i)), + (o.proto = o(function () { + Object.defineProperty(Function.prototype, "once", { + value: function () { + return o(this); + }, + configurable: !0, + }), + Object.defineProperty(Function.prototype, "onceStrict", { + value: function () { + return i(this); + }, + configurable: !0, + }); + })); + }, + 7004: (e, t, r) => { + "use strict"; + var n = r(3039); + e.exports = function (e) { + var t, + r = 0; + function o() { + return ( + r || ((r = 1), (t = e.apply(this, arguments)), (e = null)), t + ); + } + return (o.displayName = n(e)), o; + }; + }, + 3766: (e) => { + "use strict"; + e.exports = () => { + const e = {}; + return ( + (e.promise = new Promise((t, r) => { + (e.resolve = t), (e.reject = r); + })), + e + ); + }; + }, + 8911: (e) => { + "use strict"; + e.exports = (e, t) => ( + (t = t || (() => {})), + e.then( + (e) => + new Promise((e) => { + e(t()); + }).then(() => e), + (e) => + new Promise((e) => { + e(t()); + }).then(() => { + throw e; + }) + ) + ); + }, + 3264: (e) => { + "use strict"; + const t = (e) => + e instanceof Promise || + (null !== e && + "object" == typeof e && + "function" == typeof e.then && + "function" == typeof e.catch); + (e.exports = t), (e.exports.default = t); + }, + 5620: (e) => { + "use strict"; + e.exports = (e) => { + const t = (e = e || {}).env || process.env; + return "win32" !== (e.platform || "win32") + ? "PATH" + : Object.keys(t).find((e) => "PATH" === e.toUpperCase()) || "Path"; + }; + }, + 3021: (e, t, r) => { + var n = r(3417), + o = r(3558), + i = r(7147), + s = function () {}, + a = /^v?\.0/.test(process.version), + l = function (e) { + return "function" == typeof e; + }, + c = function (e, t, r, c) { + c = n(c); + var u = !1; + e.on("close", function () { + u = !0; + }), + o(e, { readable: t, writable: r }, function (e) { + if (e) return c(e); + (u = !0), c(); + }); + var d = !1; + return function (t) { + if (!u && !d) + return ( + (d = !0), + (function (e) { + return ( + !!a && + !!i && + (e instanceof (i.ReadStream || s) || + e instanceof (i.WriteStream || s)) && + l(e.close) + ); + })(e) + ? e.close(s) + : (function (e) { + return e.setHeader && l(e.abort); + })(e) + ? e.abort() + : l(e.destroy) + ? e.destroy() + : void c(t || new Error("stream was destroyed")) + ); + }; + }, + u = function (e) { + e(); + }, + d = function (e, t) { + return e.pipe(t); + }; + e.exports = function () { + var e, + t = Array.prototype.slice.call(arguments), + r = (l(t[t.length - 1] || s) && t.pop()) || s; + if ((Array.isArray(t[0]) && (t = t[0]), t.length < 2)) + throw new Error("pump requires two streams per minimum"); + var n = t.map(function (o, i) { + var s = i < t.length - 1; + return c(o, s, i > 0, function (t) { + e || (e = t), t && n.forEach(u), s || (n.forEach(u), r(e)); + }); + }); + return t.reduce(d); + }; + }, + 4274: (e) => { + "use strict"; + const t = {}; + function r(e, r, n) { + n || (n = Error); + class o extends n { + constructor(e, t, n) { + super( + (function (e, t, n) { + return "string" == typeof r ? r : r(e, t, n); + })(e, t, n) + ); + } + } + (o.prototype.name = n.name), (o.prototype.code = e), (t[e] = o); + } + function n(e, t) { + if (Array.isArray(e)) { + const r = e.length; + return ( + (e = e.map((e) => String(e))), + r > 2 + ? `one of ${t} ${e.slice(0, r - 1).join(", ")}, or ` + e[r - 1] + : 2 === r + ? `one of ${t} ${e[0]} or ${e[1]}` + : `of ${t} ${e[0]}` + ); + } + return `of ${t} ${String(e)}`; + } + r( + "ERR_INVALID_OPT_VALUE", + function (e, t) { + return 'The value "' + t + '" is invalid for option "' + e + '"'; + }, + TypeError + ), + r( + "ERR_INVALID_ARG_TYPE", + function (e, t, r) { + let o; + var i; + let s; + if ( + ("string" == typeof t && + ((i = "not "), t.substr(0, i.length) === i) + ? ((o = "must not be"), (t = t.replace(/^not /, ""))) + : (o = "must be"), + (function (e, t, r) { + return ( + (void 0 === r || r > e.length) && (r = e.length), + e.substring(r - t.length, r) === t + ); + })(e, " argument")) + ) + s = `The ${e} ${o} ${n(t, "type")}`; + else { + s = `The "${e}" ${ + ("number" != typeof l && (l = 0), + l + ".".length > (a = e).length || -1 === a.indexOf(".", l) + ? "argument" + : "property") + } ${o} ${n(t, "type")}`; + } + var a, l; + return (s += ". Received type " + typeof r), s; + }, + TypeError + ), + r("ERR_STREAM_PUSH_AFTER_EOF", "stream.push() after EOF"), + r("ERR_METHOD_NOT_IMPLEMENTED", function (e) { + return "The " + e + " method is not implemented"; + }), + r("ERR_STREAM_PREMATURE_CLOSE", "Premature close"), + r("ERR_STREAM_DESTROYED", function (e) { + return "Cannot call " + e + " after a stream was destroyed"; + }), + r("ERR_MULTIPLE_CALLBACK", "Callback called multiple times"), + r("ERR_STREAM_CANNOT_PIPE", "Cannot pipe, not readable"), + r("ERR_STREAM_WRITE_AFTER_END", "write after end"), + r( + "ERR_STREAM_NULL_VALUES", + "May not write null values to stream", + TypeError + ), + r( + "ERR_UNKNOWN_ENCODING", + function (e) { + return "Unknown encoding: " + e; + }, + TypeError + ), + r( + "ERR_STREAM_UNSHIFT_AFTER_END_EVENT", + "stream.unshift() after end event" + ), + (e.exports.q = t); + }, + 686: (e, t, r) => { + "use strict"; + var n = + Object.keys || + function (e) { + var t = []; + for (var r in e) t.push(r); + return t; + }; + e.exports = c; + var o = r(4079), + i = r(1739); + r(609)(c, o); + for (var s = n(i.prototype), a = 0; a < s.length; a++) { + var l = s[a]; + c.prototype[l] || (c.prototype[l] = i.prototype[l]); + } + function c(e) { + if (!(this instanceof c)) return new c(e); + o.call(this, e), + i.call(this, e), + (this.allowHalfOpen = !0), + e && + (!1 === e.readable && (this.readable = !1), + !1 === e.writable && (this.writable = !1), + !1 === e.allowHalfOpen && + ((this.allowHalfOpen = !1), this.once("end", u))); + } + function u() { + this._writableState.ended || process.nextTick(d, this); + } + function d(e) { + e.end(); + } + Object.defineProperty(c.prototype, "writableHighWaterMark", { + enumerable: !1, + get: function () { + return this._writableState.highWaterMark; + }, + }), + Object.defineProperty(c.prototype, "writableBuffer", { + enumerable: !1, + get: function () { + return this._writableState && this._writableState.getBuffer(); + }, + }), + Object.defineProperty(c.prototype, "writableLength", { + enumerable: !1, + get: function () { + return this._writableState.length; + }, + }), + Object.defineProperty(c.prototype, "destroyed", { + enumerable: !1, + get: function () { + return ( + void 0 !== this._readableState && + void 0 !== this._writableState && + this._readableState.destroyed && + this._writableState.destroyed + ); + }, + set: function (e) { + void 0 !== this._readableState && + void 0 !== this._writableState && + ((this._readableState.destroyed = e), + (this._writableState.destroyed = e)); + }, + }); + }, + 5114: (e, t, r) => { + "use strict"; + e.exports = o; + var n = r(3672); + function o(e) { + if (!(this instanceof o)) return new o(e); + n.call(this, e); + } + r(609)(o, n), + (o.prototype._transform = function (e, t, r) { + r(null, e); + }); + }, + 4079: (e, t, r) => { + "use strict"; + var n; + (e.exports = x), (x.ReadableState = S), r(2361).EventEmitter; + var o, + i = function (e, t) { + return e.listeners(t).length; + }, + s = r(1647), + a = r(4300).Buffer, + l = global.Uint8Array || function () {}, + c = r(3837); + o = c && c.debuglog ? c.debuglog("stream") : function () {}; + var u, + d, + f, + h = r(4888), + p = r(7498), + m = r(653).getHighWaterMark, + g = r(4274).q, + v = g.ERR_INVALID_ARG_TYPE, + y = g.ERR_STREAM_PUSH_AFTER_EOF, + w = g.ERR_METHOD_NOT_IMPLEMENTED, + b = g.ERR_STREAM_UNSHIFT_AFTER_END_EVENT; + r(609)(x, s); + var _ = p.errorOrDestroy, + E = ["error", "close", "destroy", "pause", "resume"]; + function S(e, t, o) { + (n = n || r(686)), + (e = e || {}), + "boolean" != typeof o && (o = t instanceof n), + (this.objectMode = !!e.objectMode), + o && (this.objectMode = this.objectMode || !!e.readableObjectMode), + (this.highWaterMark = m(this, e, "readableHighWaterMark", o)), + (this.buffer = new h()), + (this.length = 0), + (this.pipes = null), + (this.pipesCount = 0), + (this.flowing = null), + (this.ended = !1), + (this.endEmitted = !1), + (this.reading = !1), + (this.sync = !0), + (this.needReadable = !1), + (this.emittedReadable = !1), + (this.readableListening = !1), + (this.resumeScheduled = !1), + (this.paused = !0), + (this.emitClose = !1 !== e.emitClose), + (this.autoDestroy = !!e.autoDestroy), + (this.destroyed = !1), + (this.defaultEncoding = e.defaultEncoding || "utf8"), + (this.awaitDrain = 0), + (this.readingMore = !1), + (this.decoder = null), + (this.encoding = null), + e.encoding && + (u || (u = r(3976).s), + (this.decoder = new u(e.encoding)), + (this.encoding = e.encoding)); + } + function x(e) { + if (((n = n || r(686)), !(this instanceof x))) return new x(e); + var t = this instanceof n; + (this._readableState = new S(e, this, t)), + (this.readable = !0), + e && + ("function" == typeof e.read && (this._read = e.read), + "function" == typeof e.destroy && (this._destroy = e.destroy)), + s.call(this); + } + function O(e, t, r, n, i) { + o("readableAddChunk", t); + var s, + c = e._readableState; + if (null === t) + (c.reading = !1), + (function (e, t) { + if ((o("onEofChunk"), !t.ended)) { + if (t.decoder) { + var r = t.decoder.end(); + r && + r.length && + (t.buffer.push(r), + (t.length += t.objectMode ? 1 : r.length)); + } + (t.ended = !0), + t.sync + ? A(e) + : ((t.needReadable = !1), + t.emittedReadable || ((t.emittedReadable = !0), j(e))); + } + })(e, c); + else if ( + (i || + (s = (function (e, t) { + var r, n; + return ( + (n = t), + a.isBuffer(n) || + n instanceof l || + "string" == typeof t || + void 0 === t || + e.objectMode || + (r = new v("chunk", ["string", "Buffer", "Uint8Array"], t)), + r + ); + })(c, t)), + s) + ) + _(e, s); + else if (c.objectMode || (t && t.length > 0)) + if ( + ("string" == typeof t || + c.objectMode || + Object.getPrototypeOf(t) === a.prototype || + (t = (function (e) { + return a.from(e); + })(t)), + n) + ) + c.endEmitted ? _(e, new b()) : C(e, c, t, !0); + else if (c.ended) _(e, new y()); + else { + if (c.destroyed) return !1; + (c.reading = !1), + c.decoder && !r + ? ((t = c.decoder.write(t)), + c.objectMode || 0 !== t.length ? C(e, c, t, !1) : k(e, c)) + : C(e, c, t, !1); + } + else n || ((c.reading = !1), k(e, c)); + return !c.ended && (c.length < c.highWaterMark || 0 === c.length); + } + function C(e, t, r, n) { + t.flowing && 0 === t.length && !t.sync + ? ((t.awaitDrain = 0), e.emit("data", r)) + : ((t.length += t.objectMode ? 1 : r.length), + n ? t.buffer.unshift(r) : t.buffer.push(r), + t.needReadable && A(e)), + k(e, t); + } + Object.defineProperty(x.prototype, "destroyed", { + enumerable: !1, + get: function () { + return ( + void 0 !== this._readableState && this._readableState.destroyed + ); + }, + set: function (e) { + this._readableState && (this._readableState.destroyed = e); + }, + }), + (x.prototype.destroy = p.destroy), + (x.prototype._undestroy = p.undestroy), + (x.prototype._destroy = function (e, t) { + t(e); + }), + (x.prototype.push = function (e, t) { + var r, + n = this._readableState; + return ( + n.objectMode + ? (r = !0) + : "string" == typeof e && + ((t = t || n.defaultEncoding) !== n.encoding && + ((e = a.from(e, t)), (t = "")), + (r = !0)), + O(this, e, t, !1, r) + ); + }), + (x.prototype.unshift = function (e) { + return O(this, e, null, !0, !1); + }), + (x.prototype.isPaused = function () { + return !1 === this._readableState.flowing; + }), + (x.prototype.setEncoding = function (e) { + u || (u = r(3976).s); + var t = new u(e); + (this._readableState.decoder = t), + (this._readableState.encoding = + this._readableState.decoder.encoding); + for (var n = this._readableState.buffer.head, o = ""; null !== n; ) + (o += t.write(n.data)), (n = n.next); + return ( + this._readableState.buffer.clear(), + "" !== o && this._readableState.buffer.push(o), + (this._readableState.length = o.length), + this + ); + }); + var R = 1073741824; + function M(e, t) { + return e <= 0 || (0 === t.length && t.ended) + ? 0 + : t.objectMode + ? 1 + : e != e + ? t.flowing && t.length + ? t.buffer.head.data.length + : t.length + : (e > t.highWaterMark && + (t.highWaterMark = (function (e) { + return ( + e >= R + ? (e = R) + : (e--, + (e |= e >>> 1), + (e |= e >>> 2), + (e |= e >>> 4), + (e |= e >>> 8), + (e |= e >>> 16), + e++), + e + ); + })(e)), + e <= t.length + ? e + : t.ended + ? t.length + : ((t.needReadable = !0), 0)); + } + function A(e) { + var t = e._readableState; + o("emitReadable", t.needReadable, t.emittedReadable), + (t.needReadable = !1), + t.emittedReadable || + (o("emitReadable", t.flowing), + (t.emittedReadable = !0), + process.nextTick(j, e)); + } + function j(e) { + var t = e._readableState; + o("emitReadable_", t.destroyed, t.length, t.ended), + t.destroyed || + (!t.length && !t.ended) || + (e.emit("readable"), (t.emittedReadable = !1)), + (t.needReadable = + !t.flowing && !t.ended && t.length <= t.highWaterMark), + D(e); + } + function k(e, t) { + t.readingMore || ((t.readingMore = !0), process.nextTick(T, e, t)); + } + function T(e, t) { + for ( + ; + !t.reading && + !t.ended && + (t.length < t.highWaterMark || (t.flowing && 0 === t.length)); + + ) { + var r = t.length; + if ((o("maybeReadMore read 0"), e.read(0), r === t.length)) break; + } + t.readingMore = !1; + } + function L(e) { + var t = e._readableState; + (t.readableListening = e.listenerCount("readable") > 0), + t.resumeScheduled && !t.paused + ? (t.flowing = !0) + : e.listenerCount("data") > 0 && e.resume(); + } + function N(e) { + o("readable nexttick read 0"), e.read(0); + } + function P(e, t) { + o("resume", t.reading), + t.reading || e.read(0), + (t.resumeScheduled = !1), + e.emit("resume"), + D(e), + t.flowing && !t.reading && e.read(0); + } + function D(e) { + var t = e._readableState; + for (o("flow", t.flowing); t.flowing && null !== e.read(); ); + } + function $(e, t) { + return 0 === t.length + ? null + : (t.objectMode + ? (r = t.buffer.shift()) + : !e || e >= t.length + ? ((r = t.decoder + ? t.buffer.join("") + : 1 === t.buffer.length + ? t.buffer.first() + : t.buffer.concat(t.length)), + t.buffer.clear()) + : (r = t.buffer.consume(e, t.decoder)), + r); + var r; + } + function I(e) { + var t = e._readableState; + o("endReadable", t.endEmitted), + t.endEmitted || ((t.ended = !0), process.nextTick(F, t, e)); + } + function F(e, t) { + if ( + (o("endReadableNT", e.endEmitted, e.length), + !e.endEmitted && + 0 === e.length && + ((e.endEmitted = !0), + (t.readable = !1), + t.emit("end"), + e.autoDestroy)) + ) { + var r = t._writableState; + (!r || (r.autoDestroy && r.finished)) && t.destroy(); + } + } + function B(e, t) { + for (var r = 0, n = e.length; r < n; r++) if (e[r] === t) return r; + return -1; + } + (x.prototype.read = function (e) { + o("read", e), (e = parseInt(e, 10)); + var t = this._readableState, + r = e; + if ( + (0 !== e && (t.emittedReadable = !1), + 0 === e && + t.needReadable && + ((0 !== t.highWaterMark + ? t.length >= t.highWaterMark + : t.length > 0) || + t.ended)) + ) + return ( + o("read: emitReadable", t.length, t.ended), + 0 === t.length && t.ended ? I(this) : A(this), + null + ); + if (0 === (e = M(e, t)) && t.ended) + return 0 === t.length && I(this), null; + var n, + i = t.needReadable; + return ( + o("need readable", i), + (0 === t.length || t.length - e < t.highWaterMark) && + o("length less than watermark", (i = !0)), + t.ended || t.reading + ? o("reading or ended", (i = !1)) + : i && + (o("do read"), + (t.reading = !0), + (t.sync = !0), + 0 === t.length && (t.needReadable = !0), + this._read(t.highWaterMark), + (t.sync = !1), + t.reading || (e = M(r, t))), + null === (n = e > 0 ? $(e, t) : null) + ? ((t.needReadable = t.length <= t.highWaterMark), (e = 0)) + : ((t.length -= e), (t.awaitDrain = 0)), + 0 === t.length && + (t.ended || (t.needReadable = !0), r !== e && t.ended && I(this)), + null !== n && this.emit("data", n), + n + ); + }), + (x.prototype._read = function (e) { + _(this, new w("_read()")); + }), + (x.prototype.pipe = function (e, t) { + var r = this, + n = this._readableState; + switch (n.pipesCount) { + case 0: + n.pipes = e; + break; + case 1: + n.pipes = [n.pipes, e]; + break; + default: + n.pipes.push(e); + } + (n.pipesCount += 1), o("pipe count=%d opts=%j", n.pipesCount, t); + var s = + (t && !1 === t.end) || + e === process.stdout || + e === process.stderr + ? p + : a; + function a() { + o("onend"), e.end(); + } + n.endEmitted ? process.nextTick(s) : r.once("end", s), + e.on("unpipe", function t(i, s) { + o("onunpipe"), + i === r && + s && + !1 === s.hasUnpiped && + ((s.hasUnpiped = !0), + o("cleanup"), + e.removeListener("close", f), + e.removeListener("finish", h), + e.removeListener("drain", l), + e.removeListener("error", d), + e.removeListener("unpipe", t), + r.removeListener("end", a), + r.removeListener("end", p), + r.removeListener("data", u), + (c = !0), + !n.awaitDrain || + (e._writableState && !e._writableState.needDrain) || + l()); + }); + var l = (function (e) { + return function () { + var t = e._readableState; + o("pipeOnDrain", t.awaitDrain), + t.awaitDrain && t.awaitDrain--, + 0 === t.awaitDrain && + i(e, "data") && + ((t.flowing = !0), D(e)); + }; + })(r); + e.on("drain", l); + var c = !1; + function u(t) { + o("ondata"); + var i = e.write(t); + o("dest.write", i), + !1 === i && + (((1 === n.pipesCount && n.pipes === e) || + (n.pipesCount > 1 && -1 !== B(n.pipes, e))) && + !c && + (o("false write response, pause", n.awaitDrain), + n.awaitDrain++), + r.pause()); + } + function d(t) { + o("onerror", t), + p(), + e.removeListener("error", d), + 0 === i(e, "error") && _(e, t); + } + function f() { + e.removeListener("finish", h), p(); + } + function h() { + o("onfinish"), e.removeListener("close", f), p(); + } + function p() { + o("unpipe"), r.unpipe(e); + } + return ( + r.on("data", u), + (function (e, t, r) { + if ("function" == typeof e.prependListener) + return e.prependListener(t, r); + e._events && e._events.error + ? Array.isArray(e._events.error) + ? e._events.error.unshift(r) + : (e._events.error = [r, e._events.error]) + : e.on(t, r); + })(e, "error", d), + e.once("close", f), + e.once("finish", h), + e.emit("pipe", r), + n.flowing || (o("pipe resume"), r.resume()), + e + ); + }), + (x.prototype.unpipe = function (e) { + var t = this._readableState, + r = { hasUnpiped: !1 }; + if (0 === t.pipesCount) return this; + if (1 === t.pipesCount) + return ( + (e && e !== t.pipes) || + (e || (e = t.pipes), + (t.pipes = null), + (t.pipesCount = 0), + (t.flowing = !1), + e && e.emit("unpipe", this, r)), + this + ); + if (!e) { + var n = t.pipes, + o = t.pipesCount; + (t.pipes = null), (t.pipesCount = 0), (t.flowing = !1); + for (var i = 0; i < o; i++) + n[i].emit("unpipe", this, { hasUnpiped: !1 }); + return this; + } + var s = B(t.pipes, e); + return ( + -1 === s || + (t.pipes.splice(s, 1), + (t.pipesCount -= 1), + 1 === t.pipesCount && (t.pipes = t.pipes[0]), + e.emit("unpipe", this, r)), + this + ); + }), + (x.prototype.on = function (e, t) { + var r = s.prototype.on.call(this, e, t), + n = this._readableState; + return ( + "data" === e + ? ((n.readableListening = this.listenerCount("readable") > 0), + !1 !== n.flowing && this.resume()) + : "readable" === e && + (n.endEmitted || + n.readableListening || + ((n.readableListening = n.needReadable = !0), + (n.flowing = !1), + (n.emittedReadable = !1), + o("on readable", n.length, n.reading), + n.length + ? A(this) + : n.reading || process.nextTick(N, this))), + r + ); + }), + (x.prototype.addListener = x.prototype.on), + (x.prototype.removeListener = function (e, t) { + var r = s.prototype.removeListener.call(this, e, t); + return "readable" === e && process.nextTick(L, this), r; + }), + (x.prototype.removeAllListeners = function (e) { + var t = s.prototype.removeAllListeners.apply(this, arguments); + return ( + ("readable" !== e && void 0 !== e) || process.nextTick(L, this), t + ); + }), + (x.prototype.resume = function () { + var e = this._readableState; + return ( + e.flowing || + (o("resume"), + (e.flowing = !e.readableListening), + (function (e, t) { + t.resumeScheduled || + ((t.resumeScheduled = !0), process.nextTick(P, e, t)); + })(this, e)), + (e.paused = !1), + this + ); + }), + (x.prototype.pause = function () { + return ( + o("call pause flowing=%j", this._readableState.flowing), + !1 !== this._readableState.flowing && + (o("pause"), + (this._readableState.flowing = !1), + this.emit("pause")), + (this._readableState.paused = !0), + this + ); + }), + (x.prototype.wrap = function (e) { + var t = this, + r = this._readableState, + n = !1; + for (var i in (e.on("end", function () { + if ((o("wrapped end"), r.decoder && !r.ended)) { + var e = r.decoder.end(); + e && e.length && t.push(e); + } + t.push(null); + }), + e.on("data", function (i) { + o("wrapped data"), + r.decoder && (i = r.decoder.write(i)), + (r.objectMode && null == i) || + ((r.objectMode || (i && i.length)) && + (t.push(i) || ((n = !0), e.pause()))); + }), + e)) + void 0 === this[i] && + "function" == typeof e[i] && + (this[i] = (function (t) { + return function () { + return e[t].apply(e, arguments); + }; + })(i)); + for (var s = 0; s < E.length; s++) + e.on(E[s], this.emit.bind(this, E[s])); + return ( + (this._read = function (t) { + o("wrapped _read", t), n && ((n = !1), e.resume()); + }), + this + ); + }), + "function" == typeof Symbol && + (x.prototype[Symbol.asyncIterator] = function () { + return void 0 === d && (d = r(3105)), d(this); + }), + Object.defineProperty(x.prototype, "readableHighWaterMark", { + enumerable: !1, + get: function () { + return this._readableState.highWaterMark; + }, + }), + Object.defineProperty(x.prototype, "readableBuffer", { + enumerable: !1, + get: function () { + return this._readableState && this._readableState.buffer; + }, + }), + Object.defineProperty(x.prototype, "readableFlowing", { + enumerable: !1, + get: function () { + return this._readableState.flowing; + }, + set: function (e) { + this._readableState && (this._readableState.flowing = e); + }, + }), + (x._fromList = $), + Object.defineProperty(x.prototype, "readableLength", { + enumerable: !1, + get: function () { + return this._readableState.length; + }, + }), + "function" == typeof Symbol && + (x.from = function (e, t) { + return void 0 === f && (f = r(2286)), f(x, e, t); + }); + }, + 3672: (e, t, r) => { + "use strict"; + e.exports = u; + var n = r(4274).q, + o = n.ERR_METHOD_NOT_IMPLEMENTED, + i = n.ERR_MULTIPLE_CALLBACK, + s = n.ERR_TRANSFORM_ALREADY_TRANSFORMING, + a = n.ERR_TRANSFORM_WITH_LENGTH_0, + l = r(686); + function c(e, t) { + var r = this._transformState; + r.transforming = !1; + var n = r.writecb; + if (null === n) return this.emit("error", new i()); + (r.writechunk = null), + (r.writecb = null), + null != t && this.push(t), + n(e); + var o = this._readableState; + (o.reading = !1), + (o.needReadable || o.length < o.highWaterMark) && + this._read(o.highWaterMark); + } + function u(e) { + if (!(this instanceof u)) return new u(e); + l.call(this, e), + (this._transformState = { + afterTransform: c.bind(this), + needTransform: !1, + transforming: !1, + writecb: null, + writechunk: null, + writeencoding: null, + }), + (this._readableState.needReadable = !0), + (this._readableState.sync = !1), + e && + ("function" == typeof e.transform && + (this._transform = e.transform), + "function" == typeof e.flush && (this._flush = e.flush)), + this.on("prefinish", d); + } + function d() { + var e = this; + "function" != typeof this._flush || this._readableState.destroyed + ? f(this, null, null) + : this._flush(function (t, r) { + f(e, t, r); + }); + } + function f(e, t, r) { + if (t) return e.emit("error", t); + if ((null != r && e.push(r), e._writableState.length)) throw new a(); + if (e._transformState.transforming) throw new s(); + return e.push(null); + } + r(609)(u, l), + (u.prototype.push = function (e, t) { + return ( + (this._transformState.needTransform = !1), + l.prototype.push.call(this, e, t) + ); + }), + (u.prototype._transform = function (e, t, r) { + r(new o("_transform()")); + }), + (u.prototype._write = function (e, t, r) { + var n = this._transformState; + if ( + ((n.writecb = r), + (n.writechunk = e), + (n.writeencoding = t), + !n.transforming) + ) { + var o = this._readableState; + (n.needTransform || + o.needReadable || + o.length < o.highWaterMark) && + this._read(o.highWaterMark); + } + }), + (u.prototype._read = function (e) { + var t = this._transformState; + null === t.writechunk || t.transforming + ? (t.needTransform = !0) + : ((t.transforming = !0), + this._transform( + t.writechunk, + t.writeencoding, + t.afterTransform + )); + }), + (u.prototype._destroy = function (e, t) { + l.prototype._destroy.call(this, e, function (e) { + t(e); + }); + }); + }, + 1739: (e, t, r) => { + "use strict"; + function n(e) { + var t = this; + (this.next = null), + (this.entry = null), + (this.finish = function () { + !(function (e, t, r) { + var n = e.entry; + for (e.entry = null; n; ) { + var o = n.callback; + t.pendingcb--, o(undefined), (n = n.next); + } + t.corkedRequestsFree.next = e; + })(t, e); + }); + } + var o; + (e.exports = x), (x.WritableState = S); + var i, + s = { deprecate: r(5902) }, + a = r(1647), + l = r(4300).Buffer, + c = global.Uint8Array || function () {}, + u = r(7498), + d = r(653).getHighWaterMark, + f = r(4274).q, + h = f.ERR_INVALID_ARG_TYPE, + p = f.ERR_METHOD_NOT_IMPLEMENTED, + m = f.ERR_MULTIPLE_CALLBACK, + g = f.ERR_STREAM_CANNOT_PIPE, + v = f.ERR_STREAM_DESTROYED, + y = f.ERR_STREAM_NULL_VALUES, + w = f.ERR_STREAM_WRITE_AFTER_END, + b = f.ERR_UNKNOWN_ENCODING, + _ = u.errorOrDestroy; + function E() {} + function S(e, t, i) { + (o = o || r(686)), + (e = e || {}), + "boolean" != typeof i && (i = t instanceof o), + (this.objectMode = !!e.objectMode), + i && (this.objectMode = this.objectMode || !!e.writableObjectMode), + (this.highWaterMark = d(this, e, "writableHighWaterMark", i)), + (this.finalCalled = !1), + (this.needDrain = !1), + (this.ending = !1), + (this.ended = !1), + (this.finished = !1), + (this.destroyed = !1); + var s = !1 === e.decodeStrings; + (this.decodeStrings = !s), + (this.defaultEncoding = e.defaultEncoding || "utf8"), + (this.length = 0), + (this.writing = !1), + (this.corked = 0), + (this.sync = !0), + (this.bufferProcessing = !1), + (this.onwrite = function (e) { + !(function (e, t) { + var r = e._writableState, + n = r.sync, + o = r.writecb; + if ("function" != typeof o) throw new m(); + if ( + ((function (e) { + (e.writing = !1), + (e.writecb = null), + (e.length -= e.writelen), + (e.writelen = 0); + })(r), + t) + ) + !(function (e, t, r, n, o) { + --t.pendingcb, + r + ? (process.nextTick(o, n), + process.nextTick(j, e, t), + (e._writableState.errorEmitted = !0), + _(e, n)) + : (o(n), + (e._writableState.errorEmitted = !0), + _(e, n), + j(e, t)); + })(e, r, n, t, o); + else { + var i = M(r) || e.destroyed; + i || + r.corked || + r.bufferProcessing || + !r.bufferedRequest || + R(e, r), + n ? process.nextTick(C, e, r, i, o) : C(e, r, i, o); + } + })(t, e); + }), + (this.writecb = null), + (this.writelen = 0), + (this.bufferedRequest = null), + (this.lastBufferedRequest = null), + (this.pendingcb = 0), + (this.prefinished = !1), + (this.errorEmitted = !1), + (this.emitClose = !1 !== e.emitClose), + (this.autoDestroy = !!e.autoDestroy), + (this.bufferedRequestCount = 0), + (this.corkedRequestsFree = new n(this)); + } + function x(e) { + var t = this instanceof (o = o || r(686)); + if (!t && !i.call(x, this)) return new x(e); + (this._writableState = new S(e, this, t)), + (this.writable = !0), + e && + ("function" == typeof e.write && (this._write = e.write), + "function" == typeof e.writev && (this._writev = e.writev), + "function" == typeof e.destroy && (this._destroy = e.destroy), + "function" == typeof e.final && (this._final = e.final)), + a.call(this); + } + function O(e, t, r, n, o, i, s) { + (t.writelen = n), + (t.writecb = s), + (t.writing = !0), + (t.sync = !0), + t.destroyed + ? t.onwrite(new v("write")) + : r + ? e._writev(o, t.onwrite) + : e._write(o, i, t.onwrite), + (t.sync = !1); + } + function C(e, t, r, n) { + r || + (function (e, t) { + 0 === t.length && + t.needDrain && + ((t.needDrain = !1), e.emit("drain")); + })(e, t), + t.pendingcb--, + n(), + j(e, t); + } + function R(e, t) { + t.bufferProcessing = !0; + var r = t.bufferedRequest; + if (e._writev && r && r.next) { + var o = t.bufferedRequestCount, + i = new Array(o), + s = t.corkedRequestsFree; + s.entry = r; + for (var a = 0, l = !0; r; ) + (i[a] = r), r.isBuf || (l = !1), (r = r.next), (a += 1); + (i.allBuffers = l), + O(e, t, !0, t.length, i, "", s.finish), + t.pendingcb++, + (t.lastBufferedRequest = null), + s.next + ? ((t.corkedRequestsFree = s.next), (s.next = null)) + : (t.corkedRequestsFree = new n(t)), + (t.bufferedRequestCount = 0); + } else { + for (; r; ) { + var c = r.chunk, + u = r.encoding, + d = r.callback; + if ( + (O(e, t, !1, t.objectMode ? 1 : c.length, c, u, d), + (r = r.next), + t.bufferedRequestCount--, + t.writing) + ) + break; + } + null === r && (t.lastBufferedRequest = null); + } + (t.bufferedRequest = r), (t.bufferProcessing = !1); + } + function M(e) { + return ( + e.ending && + 0 === e.length && + null === e.bufferedRequest && + !e.finished && + !e.writing + ); + } + function A(e, t) { + e._final(function (r) { + t.pendingcb--, + r && _(e, r), + (t.prefinished = !0), + e.emit("prefinish"), + j(e, t); + }); + } + function j(e, t) { + var r = M(t); + if ( + r && + ((function (e, t) { + t.prefinished || + t.finalCalled || + ("function" != typeof e._final || t.destroyed + ? ((t.prefinished = !0), e.emit("prefinish")) + : (t.pendingcb++, + (t.finalCalled = !0), + process.nextTick(A, e, t))); + })(e, t), + 0 === t.pendingcb && + ((t.finished = !0), e.emit("finish"), t.autoDestroy)) + ) { + var n = e._readableState; + (!n || (n.autoDestroy && n.endEmitted)) && e.destroy(); + } + return r; + } + r(609)(x, a), + (S.prototype.getBuffer = function () { + for (var e = this.bufferedRequest, t = []; e; ) + t.push(e), (e = e.next); + return t; + }), + (function () { + try { + Object.defineProperty(S.prototype, "buffer", { + get: s.deprecate( + function () { + return this.getBuffer(); + }, + "_writableState.buffer is deprecated. Use _writableState.getBuffer instead.", + "DEP0003" + ), + }); + } catch (e) {} + })(), + "function" == typeof Symbol && + Symbol.hasInstance && + "function" == typeof Function.prototype[Symbol.hasInstance] + ? ((i = Function.prototype[Symbol.hasInstance]), + Object.defineProperty(x, Symbol.hasInstance, { + value: function (e) { + return ( + !!i.call(this, e) || + (this === x && e && e._writableState instanceof S) + ); + }, + })) + : (i = function (e) { + return e instanceof this; + }), + (x.prototype.pipe = function () { + _(this, new g()); + }), + (x.prototype.write = function (e, t, r) { + var n, + o = this._writableState, + i = !1, + s = !o.objectMode && ((n = e), l.isBuffer(n) || n instanceof c); + return ( + s && + !l.isBuffer(e) && + (e = (function (e) { + return l.from(e); + })(e)), + "function" == typeof t && ((r = t), (t = null)), + s ? (t = "buffer") : t || (t = o.defaultEncoding), + "function" != typeof r && (r = E), + o.ending + ? (function (e, t) { + var r = new w(); + _(e, r), process.nextTick(t, r); + })(this, r) + : (s || + (function (e, t, r, n) { + var o; + return ( + null === r + ? (o = new y()) + : "string" == typeof r || + t.objectMode || + (o = new h("chunk", ["string", "Buffer"], r)), + !o || (_(e, o), process.nextTick(n, o), !1) + ); + })(this, o, e, r)) && + (o.pendingcb++, + (i = (function (e, t, r, n, o, i) { + if (!r) { + var s = (function (e, t, r) { + return ( + e.objectMode || + !1 === e.decodeStrings || + "string" != typeof t || + (t = l.from(t, r)), + t + ); + })(t, n, o); + n !== s && ((r = !0), (o = "buffer"), (n = s)); + } + var a = t.objectMode ? 1 : n.length; + t.length += a; + var c = t.length < t.highWaterMark; + if ((c || (t.needDrain = !0), t.writing || t.corked)) { + var u = t.lastBufferedRequest; + (t.lastBufferedRequest = { + chunk: n, + encoding: o, + isBuf: r, + callback: i, + next: null, + }), + u + ? (u.next = t.lastBufferedRequest) + : (t.bufferedRequest = t.lastBufferedRequest), + (t.bufferedRequestCount += 1); + } else O(e, t, !1, a, n, o, i); + return c; + })(this, o, s, e, t, r))), + i + ); + }), + (x.prototype.cork = function () { + this._writableState.corked++; + }), + (x.prototype.uncork = function () { + var e = this._writableState; + e.corked && + (e.corked--, + e.writing || + e.corked || + e.bufferProcessing || + !e.bufferedRequest || + R(this, e)); + }), + (x.prototype.setDefaultEncoding = function (e) { + if ( + ("string" == typeof e && (e = e.toLowerCase()), + !( + [ + "hex", + "utf8", + "utf-8", + "ascii", + "binary", + "base64", + "ucs2", + "ucs-2", + "utf16le", + "utf-16le", + "raw", + ].indexOf((e + "").toLowerCase()) > -1 + )) + ) + throw new b(e); + return (this._writableState.defaultEncoding = e), this; + }), + Object.defineProperty(x.prototype, "writableBuffer", { + enumerable: !1, + get: function () { + return this._writableState && this._writableState.getBuffer(); + }, + }), + Object.defineProperty(x.prototype, "writableHighWaterMark", { + enumerable: !1, + get: function () { + return this._writableState.highWaterMark; + }, + }), + (x.prototype._write = function (e, t, r) { + r(new p("_write()")); + }), + (x.prototype._writev = null), + (x.prototype.end = function (e, t, r) { + var n = this._writableState; + return ( + "function" == typeof e + ? ((r = e), (e = null), (t = null)) + : "function" == typeof t && ((r = t), (t = null)), + null != e && this.write(e, t), + n.corked && ((n.corked = 1), this.uncork()), + n.ending || + (function (e, t, r) { + (t.ending = !0), + j(e, t), + r && + (t.finished ? process.nextTick(r) : e.once("finish", r)), + (t.ended = !0), + (e.writable = !1); + })(this, n, r), + this + ); + }), + Object.defineProperty(x.prototype, "writableLength", { + enumerable: !1, + get: function () { + return this._writableState.length; + }, + }), + Object.defineProperty(x.prototype, "destroyed", { + enumerable: !1, + get: function () { + return ( + void 0 !== this._writableState && this._writableState.destroyed + ); + }, + set: function (e) { + this._writableState && (this._writableState.destroyed = e); + }, + }), + (x.prototype.destroy = u.destroy), + (x.prototype._undestroy = u.undestroy), + (x.prototype._destroy = function (e, t) { + t(e); + }); + }, + 3105: (e, t, r) => { + "use strict"; + var n; + function o(e, t, r) { + return ( + t in e + ? Object.defineProperty(e, t, { + value: r, + enumerable: !0, + configurable: !0, + writable: !0, + }) + : (e[t] = r), + e + ); + } + var i = r(7117), + s = Symbol("lastResolve"), + a = Symbol("lastReject"), + l = Symbol("error"), + c = Symbol("ended"), + u = Symbol("lastPromise"), + d = Symbol("handlePromise"), + f = Symbol("stream"); + function h(e, t) { + return { value: e, done: t }; + } + function p(e) { + var t = e[s]; + if (null !== t) { + var r = e[f].read(); + null !== r && + ((e[u] = null), (e[s] = null), (e[a] = null), t(h(r, !1))); + } + } + function m(e) { + process.nextTick(p, e); + } + var g = Object.getPrototypeOf(function () {}), + v = Object.setPrototypeOf( + (o( + (n = { + get stream() { + return this[f]; + }, + next: function () { + var e = this, + t = this[l]; + if (null !== t) return Promise.reject(t); + if (this[c]) return Promise.resolve(h(void 0, !0)); + if (this[f].destroyed) + return new Promise(function (t, r) { + process.nextTick(function () { + e[l] ? r(e[l]) : t(h(void 0, !0)); + }); + }); + var r, + n = this[u]; + if (n) + r = new Promise( + (function (e, t) { + return function (r, n) { + e.then(function () { + t[c] ? r(h(void 0, !0)) : t[d](r, n); + }, n); + }; + })(n, this) + ); + else { + var o = this[f].read(); + if (null !== o) return Promise.resolve(h(o, !1)); + r = new Promise(this[d]); + } + return (this[u] = r), r; + }, + }), + Symbol.asyncIterator, + function () { + return this; + } + ), + o(n, "return", function () { + var e = this; + return new Promise(function (t, r) { + e[f].destroy(null, function (e) { + e ? r(e) : t(h(void 0, !0)); + }); + }); + }), + n), + g + ); + e.exports = function (e) { + var t, + r = Object.create( + v, + (o((t = {}), f, { value: e, writable: !0 }), + o(t, s, { value: null, writable: !0 }), + o(t, a, { value: null, writable: !0 }), + o(t, l, { value: null, writable: !0 }), + o(t, c, { value: e._readableState.endEmitted, writable: !0 }), + o(t, d, { + value: function (e, t) { + var n = r[f].read(); + n + ? ((r[u] = null), (r[s] = null), (r[a] = null), e(h(n, !1))) + : ((r[s] = e), (r[a] = t)); + }, + writable: !0, + }), + t) + ); + return ( + (r[u] = null), + i(e, function (e) { + if (e && "ERR_STREAM_PREMATURE_CLOSE" !== e.code) { + var t = r[a]; + return ( + null !== t && + ((r[u] = null), (r[s] = null), (r[a] = null), t(e)), + void (r[l] = e) + ); + } + var n = r[s]; + null !== n && + ((r[u] = null), (r[s] = null), (r[a] = null), n(h(void 0, !0))), + (r[c] = !0); + }), + e.on("readable", m.bind(null, r)), + r + ); + }; + }, + 4888: (e, t, r) => { + "use strict"; + function n(e, t) { + var r = Object.keys(e); + if (Object.getOwnPropertySymbols) { + var n = Object.getOwnPropertySymbols(e); + t && + (n = n.filter(function (t) { + return Object.getOwnPropertyDescriptor(e, t).enumerable; + })), + r.push.apply(r, n); + } + return r; + } + function o(e, t, r) { + return ( + t in e + ? Object.defineProperty(e, t, { + value: r, + enumerable: !0, + configurable: !0, + writable: !0, + }) + : (e[t] = r), + e + ); + } + function i(e, t) { + for (var r = 0; r < t.length; r++) { + var n = t[r]; + (n.enumerable = n.enumerable || !1), + (n.configurable = !0), + "value" in n && (n.writable = !0), + Object.defineProperty(e, n.key, n); + } + } + var s = r(4300).Buffer, + a = r(3837).inspect, + l = (a && a.custom) || "inspect"; + e.exports = (function () { + function e() { + !(function (e, t) { + if (!(e instanceof t)) + throw new TypeError("Cannot call a class as a function"); + })(this, e), + (this.head = null), + (this.tail = null), + (this.length = 0); + } + var t, r; + return ( + (t = e), + (r = [ + { + key: "push", + value: function (e) { + var t = { data: e, next: null }; + this.length > 0 ? (this.tail.next = t) : (this.head = t), + (this.tail = t), + ++this.length; + }, + }, + { + key: "unshift", + value: function (e) { + var t = { data: e, next: this.head }; + 0 === this.length && (this.tail = t), + (this.head = t), + ++this.length; + }, + }, + { + key: "shift", + value: function () { + if (0 !== this.length) { + var e = this.head.data; + return ( + 1 === this.length + ? (this.head = this.tail = null) + : (this.head = this.head.next), + --this.length, + e + ); + } + }, + }, + { + key: "clear", + value: function () { + (this.head = this.tail = null), (this.length = 0); + }, + }, + { + key: "join", + value: function (e) { + if (0 === this.length) return ""; + for (var t = this.head, r = "" + t.data; (t = t.next); ) + r += e + t.data; + return r; + }, + }, + { + key: "concat", + value: function (e) { + if (0 === this.length) return s.alloc(0); + for ( + var t, + r, + n, + o = s.allocUnsafe(e >>> 0), + i = this.head, + a = 0; + i; + + ) + (t = i.data), + (r = o), + (n = a), + s.prototype.copy.call(t, r, n), + (a += i.data.length), + (i = i.next); + return o; + }, + }, + { + key: "consume", + value: function (e, t) { + var r; + return ( + e < this.head.data.length + ? ((r = this.head.data.slice(0, e)), + (this.head.data = this.head.data.slice(e))) + : (r = + e === this.head.data.length + ? this.shift() + : t + ? this._getString(e) + : this._getBuffer(e)), + r + ); + }, + }, + { + key: "first", + value: function () { + return this.head.data; + }, + }, + { + key: "_getString", + value: function (e) { + var t = this.head, + r = 1, + n = t.data; + for (e -= n.length; (t = t.next); ) { + var o = t.data, + i = e > o.length ? o.length : e; + if ( + (i === o.length ? (n += o) : (n += o.slice(0, e)), + 0 == (e -= i)) + ) { + i === o.length + ? (++r, + t.next + ? (this.head = t.next) + : (this.head = this.tail = null)) + : ((this.head = t), (t.data = o.slice(i))); + break; + } + ++r; + } + return (this.length -= r), n; + }, + }, + { + key: "_getBuffer", + value: function (e) { + var t = s.allocUnsafe(e), + r = this.head, + n = 1; + for (r.data.copy(t), e -= r.data.length; (r = r.next); ) { + var o = r.data, + i = e > o.length ? o.length : e; + if ((o.copy(t, t.length - e, 0, i), 0 == (e -= i))) { + i === o.length + ? (++n, + r.next + ? (this.head = r.next) + : (this.head = this.tail = null)) + : ((this.head = r), (r.data = o.slice(i))); + break; + } + ++n; + } + return (this.length -= n), t; + }, + }, + { + key: l, + value: function (e, t) { + return a( + this, + (function (e) { + for (var t = 1; t < arguments.length; t++) { + var r = null != arguments[t] ? arguments[t] : {}; + t % 2 + ? n(Object(r), !0).forEach(function (t) { + o(e, t, r[t]); + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties( + e, + Object.getOwnPropertyDescriptors(r) + ) + : n(Object(r)).forEach(function (t) { + Object.defineProperty( + e, + t, + Object.getOwnPropertyDescriptor(r, t) + ); + }); + } + return e; + })({}, t, { depth: 0, customInspect: !1 }) + ); + }, + }, + ]), + r && i(t.prototype, r), + e + ); + })(); + }, + 7498: (e) => { + "use strict"; + function t(e, t) { + n(e, t), r(e); + } + function r(e) { + (e._writableState && !e._writableState.emitClose) || + (e._readableState && !e._readableState.emitClose) || + e.emit("close"); + } + function n(e, t) { + e.emit("error", t); + } + e.exports = { + destroy: function (e, o) { + var i = this, + s = this._readableState && this._readableState.destroyed, + a = this._writableState && this._writableState.destroyed; + return s || a + ? (o + ? o(e) + : e && + (this._writableState + ? this._writableState.errorEmitted || + ((this._writableState.errorEmitted = !0), + process.nextTick(n, this, e)) + : process.nextTick(n, this, e)), + this) + : (this._readableState && (this._readableState.destroyed = !0), + this._writableState && (this._writableState.destroyed = !0), + this._destroy(e || null, function (e) { + !o && e + ? i._writableState + ? i._writableState.errorEmitted + ? process.nextTick(r, i) + : ((i._writableState.errorEmitted = !0), + process.nextTick(t, i, e)) + : process.nextTick(t, i, e) + : o + ? (process.nextTick(r, i), o(e)) + : process.nextTick(r, i); + }), + this); + }, + undestroy: function () { + this._readableState && + ((this._readableState.destroyed = !1), + (this._readableState.reading = !1), + (this._readableState.ended = !1), + (this._readableState.endEmitted = !1)), + this._writableState && + ((this._writableState.destroyed = !1), + (this._writableState.ended = !1), + (this._writableState.ending = !1), + (this._writableState.finalCalled = !1), + (this._writableState.prefinished = !1), + (this._writableState.finished = !1), + (this._writableState.errorEmitted = !1)); + }, + errorOrDestroy: function (e, t) { + var r = e._readableState, + n = e._writableState; + (r && r.autoDestroy) || (n && n.autoDestroy) + ? e.destroy(t) + : e.emit("error", t); + }, + }; + }, + 7117: (e, t, r) => { + "use strict"; + var n = r(4274).q.ERR_STREAM_PREMATURE_CLOSE; + function o() {} + e.exports = function e(t, r, i) { + if ("function" == typeof r) return e(t, null, r); + r || (r = {}), + (i = (function (e) { + var t = !1; + return function () { + if (!t) { + t = !0; + for ( + var r = arguments.length, n = new Array(r), o = 0; + o < r; + o++ + ) + n[o] = arguments[o]; + e.apply(this, n); + } + }; + })(i || o)); + var s = r.readable || (!1 !== r.readable && t.readable), + a = r.writable || (!1 !== r.writable && t.writable), + l = function () { + t.writable || u(); + }, + c = t._writableState && t._writableState.finished, + u = function () { + (a = !1), (c = !0), s || i.call(t); + }, + d = t._readableState && t._readableState.endEmitted, + f = function () { + (s = !1), (d = !0), a || i.call(t); + }, + h = function (e) { + i.call(t, e); + }, + p = function () { + var e; + return s && !d + ? ((t._readableState && t._readableState.ended) || + (e = new n()), + i.call(t, e)) + : a && !c + ? ((t._writableState && t._writableState.ended) || + (e = new n()), + i.call(t, e)) + : void 0; + }, + m = function () { + t.req.on("finish", u); + }; + return ( + (function (e) { + return e.setHeader && "function" == typeof e.abort; + })(t) + ? (t.on("complete", u), + t.on("abort", p), + t.req ? m() : t.on("request", m)) + : a && !t._writableState && (t.on("end", l), t.on("close", l)), + t.on("end", f), + t.on("finish", u), + !1 !== r.error && t.on("error", h), + t.on("close", p), + function () { + t.removeListener("complete", u), + t.removeListener("abort", p), + t.removeListener("request", m), + t.req && t.req.removeListener("finish", u), + t.removeListener("end", l), + t.removeListener("close", l), + t.removeListener("finish", u), + t.removeListener("end", f), + t.removeListener("error", h), + t.removeListener("close", p); + } + ); + }; + }, + 2286: (e, t, r) => { + "use strict"; + function n(e, t, r, n, o, i, s) { + try { + var a = e[i](s), + l = a.value; + } catch (e) { + return void r(e); + } + a.done ? t(l) : Promise.resolve(l).then(n, o); + } + function o(e) { + return function () { + var t = this, + r = arguments; + return new Promise(function (o, i) { + var s = e.apply(t, r); + function a(e) { + n(s, o, i, a, l, "next", e); + } + function l(e) { + n(s, o, i, a, l, "throw", e); + } + a(void 0); + }); + }; + } + function i(e, t) { + var r = Object.keys(e); + if (Object.getOwnPropertySymbols) { + var n = Object.getOwnPropertySymbols(e); + t && + (n = n.filter(function (t) { + return Object.getOwnPropertyDescriptor(e, t).enumerable; + })), + r.push.apply(r, n); + } + return r; + } + function s(e, t, r) { + return ( + t in e + ? Object.defineProperty(e, t, { + value: r, + enumerable: !0, + configurable: !0, + writable: !0, + }) + : (e[t] = r), + e + ); + } + var a = r(4274).q.ERR_INVALID_ARG_TYPE; + e.exports = function (e, t, r) { + var n; + if (t && "function" == typeof t.next) n = t; + else if (t && t[Symbol.asyncIterator]) n = t[Symbol.asyncIterator](); + else { + if (!t || !t[Symbol.iterator]) + throw new a("iterable", ["Iterable"], t); + n = t[Symbol.iterator](); + } + var l = new e( + (function (e) { + for (var t = 1; t < arguments.length; t++) { + var r = null != arguments[t] ? arguments[t] : {}; + t % 2 + ? i(Object(r), !0).forEach(function (t) { + s(e, t, r[t]); + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties( + e, + Object.getOwnPropertyDescriptors(r) + ) + : i(Object(r)).forEach(function (t) { + Object.defineProperty( + e, + t, + Object.getOwnPropertyDescriptor(r, t) + ); + }); + } + return e; + })({ objectMode: !0 }, r) + ), + c = !1; + function u() { + return d.apply(this, arguments); + } + function d() { + return (d = o(function* () { + try { + var e = yield n.next(), + t = e.value; + e.done ? l.push(null) : l.push(yield t) ? u() : (c = !1); + } catch (e) { + l.destroy(e); + } + })).apply(this, arguments); + } + return ( + (l._read = function () { + c || ((c = !0), u()); + }), + l + ); + }; + }, + 1872: (e, t, r) => { + "use strict"; + var n, + o = r(4274).q, + i = o.ERR_MISSING_ARGS, + s = o.ERR_STREAM_DESTROYED; + function a(e) { + if (e) throw e; + } + function l(e, t, o, i) { + i = (function (e) { + var t = !1; + return function () { + t || ((t = !0), e.apply(void 0, arguments)); + }; + })(i); + var a = !1; + e.on("close", function () { + a = !0; + }), + void 0 === n && (n = r(7117)), + n(e, { readable: t, writable: o }, function (e) { + if (e) return i(e); + (a = !0), i(); + }); + var l = !1; + return function (t) { + if (!a && !l) + return ( + (l = !0), + (function (e) { + return e.setHeader && "function" == typeof e.abort; + })(e) + ? e.abort() + : "function" == typeof e.destroy + ? e.destroy() + : void i(t || new s("pipe")) + ); + }; + } + function c(e) { + e(); + } + function u(e, t) { + return e.pipe(t); + } + function d(e) { + return e.length + ? "function" != typeof e[e.length - 1] + ? a + : e.pop() + : a; + } + e.exports = function () { + for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++) + t[r] = arguments[r]; + var n, + o = d(t); + if ((Array.isArray(t[0]) && (t = t[0]), t.length < 2)) + throw new i("streams"); + var s = t.map(function (e, r) { + var i = r < t.length - 1; + return l(e, i, r > 0, function (e) { + n || (n = e), e && s.forEach(c), i || (s.forEach(c), o(n)); + }); + }); + return t.reduce(u); + }; + }, + 653: (e, t, r) => { + "use strict"; + var n = r(4274).q.ERR_INVALID_OPT_VALUE; + e.exports = { + getHighWaterMark: function (e, t, r, o) { + var i = (function (e, t, r) { + return null != e.highWaterMark + ? e.highWaterMark + : t + ? e[r] + : null; + })(t, o, r); + if (null != i) { + if (!isFinite(i) || Math.floor(i) !== i || i < 0) + throw new n(o ? r : "highWaterMark", i); + return Math.floor(i); + } + return e.objectMode ? 16 : 16384; + }, + }; + }, + 1647: (e, t, r) => { + e.exports = r(2781); + }, + 6207: (e, t, r) => { + var n = r(2781); + "disable" === process.env.READABLE_STREAM && n + ? ((e.exports = n.Readable), + Object.assign(e.exports, n), + (e.exports.Stream = n)) + : (((t = e.exports = r(4079)).Stream = n || t), + (t.Readable = t), + (t.Writable = r(1739)), + (t.Duplex = r(686)), + (t.Transform = r(3672)), + (t.PassThrough = r(5114)), + (t.finished = r(7117)), + (t.pipeline = r(1872))); + }, + 6969: function (e, t, r) { + "use strict"; + var n = + (this && this.__createBinding) || + (Object.create + ? function (e, t, r, n) { + void 0 === n && (n = r), + Object.defineProperty(e, n, { + enumerable: !0, + get: function () { + return t[r]; + }, + }); + } + : function (e, t, r, n) { + void 0 === n && (n = r), (e[n] = t[r]); + }), + o = + (this && this.__exportStar) || + function (e, t) { + for (var r in e) + "default" === r || t.hasOwnProperty(r) || n(t, e, r); + }; + Object.defineProperty(t, "__esModule", { value: !0 }), o(r(5820), t); + }, + 5820: (e, t, r) => { + "use strict"; + Object.defineProperty(t, "__esModule", { value: !0 }), + (t.setValueSafe = + t.setValue = + t.createKeySafe = + t.createKey = + t.enumerateKeysSafe = + t.enumerateKeys = + t.enumerateValuesSafe = + t.enumerateValues = + t.HKEY = + t.RegistryValueType = + void 0); + const n = r(1323); + var o, i; + function s(e) { + return e === i.HKEY_CLASSES_ROOT + ? 2147483648 + : e === i.HKEY_CURRENT_USER + ? 2147483649 + : e === i.HKEY_LOCAL_MACHINE + ? 2147483650 + : e === i.HKEY_USERS + ? 2147483651 + : e === i.HKEY_PERFORMANCE_DATA + ? 2147483652 + : e === i.HKEY_CURRENT_CONFIG + ? 2147483653 + : e === i.HKEY_DYN_DATA + ? 2147483654 + : e === i.HKEY_CURRENT_USER_LOCAL_SETTINGS + ? 2147483655 + : e === i.HKEY_PERFORMANCE_TEXT + ? 2147483728 + : e === i.HKEY_PERFORMANCE_NLSTEXT + ? 2147483744 + : (function (e, t) { + throw new Error( + "The key does not map to an expected number value" + ); + })(); + } + function a(e, t) { + if (!n) return []; + const r = s(e); + return n.readValues(r, t); + } + function l(e, t) { + if (!n) return []; + const r = s(e); + return n.enumKeys(r, t); + } + function c(e, t) { + if (!n) return !1; + const r = s(e); + return n.createKey(r, t); + } + function u(e, t, r, i, a) { + if (!n) return !1; + if (i != o.REG_SZ && i != o.REG_DWORD) return !1; + const l = s(e); + return n.setValue(l, t, r, i, a); + } + !(function (e) { + (e.REG_BINARY = "REG_BINARY"), + (e.REG_DWORD = "REG_DWORD"), + (e.REG_DWORD_LITTLE_ENDIAN = "REG_DWORD_LITTLE_ENDIAN"), + (e.REG_DWORD_BIG_ENDIAN = "REG_DWORD_BIG_ENDIAN"), + (e.REG_EXPAND_SZ = "REG_EXPAND_SZ"), + (e.REG_LINK = "REG_LINK"), + (e.REG_MULTI_SZ = "REG_MULTI_SZ"), + (e.REG_NONE = "REG_NONE"), + (e.REG_QWORD = "REG_QWORD"), + (e.REG_QWORD_LITTLE_ENDIAN = "REG_QWORD_LITTLE_ENDIAN"), + (e.REG_SZ = "REG_SZ"); + })((o = t.RegistryValueType || (t.RegistryValueType = {}))), + (function (e) { + (e.HKEY_CLASSES_ROOT = "HKEY_CLASSES_ROOT"), + (e.HKEY_CURRENT_CONFIG = "HKEY_CURRENT_CONFIG"), + (e.HKEY_DYN_DATA = "HKEY_DYN_DATA"), + (e.HKEY_CURRENT_USER_LOCAL_SETTINGS = + "HKEY_CURRENT_USER_LOCAL_SETTINGS"), + (e.HKEY_CURRENT_USER = "HKEY_CURRENT_USER"), + (e.HKEY_LOCAL_MACHINE = "HKEY_LOCAL_MACHINE"), + (e.HKEY_PERFORMANCE_DATA = "HKEY_PERFORMANCE_DATA"), + (e.HKEY_PERFORMANCE_TEXT = "HKEY_PERFORMANCE_TEXT"), + (e.HKEY_PERFORMANCE_NLSTEXT = "HKEY_PERFORMANCE_NLSTEXT"), + (e.HKEY_USERS = "HKEY_USERS"); + })((i = t.HKEY || (t.HKEY = {}))), + (t.enumerateValues = a), + (t.enumerateValuesSafe = function (e, t) { + try { + return a(e, t); + } catch (e) { + return []; + } + }), + (t.enumerateKeys = l), + (t.enumerateKeysSafe = function (e, t) { + try { + return l(e, t); + } catch (e) { + return []; + } + }), + (t.createKey = c), + (t.createKeySafe = function (e, t) { + try { + return c(e, t); + } catch (e) { + return !1; + } + }), + (t.setValue = u), + (t.setValueSafe = function (e, t, r, n, o) { + try { + return u(e, t, r, n, o); + } catch (e) { + return !1; + } + }); + }, + 2776: (e, t) => { + "use strict"; + const r = g(); + (r.configure = g), + (r.stringify = r), + (r.default = r), + (t.stringify = r), + (t.configure = g), + (e.exports = r); + const n = + /[\u0000-\u001f\u0022\u005c\ud800-\udfff]|[\ud800-\udbff](?![\udc00-\udfff])|(?:[^\ud800-\udbff]|^)[\udc00-\udfff]/, + o = + /[\u0000-\u001f\u0022\u005c\ud800-\udfff]|[\ud800-\udbff](?![\udc00-\udfff])|(?:[^\ud800-\udbff]|^)[\udc00-\udfff]/g, + i = [ + "\\u0000", + "\\u0001", + "\\u0002", + "\\u0003", + "\\u0004", + "\\u0005", + "\\u0006", + "\\u0007", + "\\b", + "\\t", + "\\n", + "\\u000b", + "\\f", + "\\r", + "\\u000e", + "\\u000f", + "\\u0010", + "\\u0011", + "\\u0012", + "\\u0013", + "\\u0014", + "\\u0015", + "\\u0016", + "\\u0017", + "\\u0018", + "\\u0019", + "\\u001a", + "\\u001b", + "\\u001c", + "\\u001d", + "\\u001e", + "\\u001f", + "", + "", + '\\"', + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "\\\\", + ]; + function s(e) { + if (2 === e.length) { + const t = e.charCodeAt(1); + return `${e[0]}\\u${t.toString(16)}`; + } + const t = e.charCodeAt(0); + return i.length > t ? i[t] : `\\u${t.toString(16)}`; + } + function a(e) { + if (e.length < 5e3 && !n.test(e)) return e; + if (e.length > 100) return e.replace(o, s); + let t = "", + r = 0; + for (let n = 0; n < e.length; n++) { + const o = e.charCodeAt(n); + if (34 === o || 92 === o || o < 32) + (t += `${e.slice(r, n)}${i[o]}`), (r = n + 1); + else if (o >= 55296 && o <= 57343) { + if (o <= 56319 && n + 1 < e.length) { + const t = e.charCodeAt(n + 1); + if (t >= 56320 && t <= 57343) { + n++; + continue; + } + } + (t += `${e.slice(r, n)}\\u${o.toString(16)}`), (r = n + 1); + } + } + return (t += e.slice(r)), t; + } + function l(e) { + if (e.length > 200) return e.sort(); + for (let t = 1; t < e.length; t++) { + const r = e[t]; + let n = t; + for (; 0 !== n && e[n - 1] > r; ) (e[n] = e[n - 1]), n--; + e[n] = r; + } + return e; + } + const c = Object.getOwnPropertyDescriptor( + Object.getPrototypeOf(Object.getPrototypeOf(new Uint8Array())), + Symbol.toStringTag + ).get; + function u(e) { + return void 0 !== c.call(e) && 0 !== e.length; + } + function d(e, t, r) { + e.length < r && (r = e.length); + const n = "," === t ? "" : " "; + let o = `"0":${n}${e[0]}`; + for (let i = 1; i < r; i++) o += `${t}"${i}":${n}${e[i]}`; + return o; + } + function f(e, t) { + if (e && Object.prototype.hasOwnProperty.call(e, t)) { + var r = e[t]; + if ("boolean" != typeof r) + throw new TypeError( + `The "${t}" argument must be of type boolean` + ); + } + return void 0 === r || r; + } + function h(e, t) { + if (e && Object.prototype.hasOwnProperty.call(e, t)) { + var r = e[t]; + if ("number" != typeof r) + throw new TypeError(`The "${t}" argument must be of type number`); + if (!Number.isInteger(r)) + throw new TypeError(`The "${t}" argument must be an integer`); + if (r < 1) throw new RangeError(`The "${t}" argument must be >= 1`); + } + return void 0 === r ? 1 / 0 : r; + } + function p(e) { + return 1 === e ? "1 item" : `${e} items`; + } + function m(e) { + const t = new Set(); + for (const r of e) + "string" == typeof r + ? t.add(r) + : "number" == typeof r && t.add(String(r)); + return t; + } + function g(e) { + const t = (function (e) { + if ( + e && + Object.prototype.hasOwnProperty.call(e, "circularValue") + ) { + var t = e.circularValue; + if ("string" == typeof t) return `"${t}"`; + if (null == t) return t; + if (t === Error || t === TypeError) + return { + toString() { + throw new TypeError( + "Converting circular structure to JSON" + ); + }, + }; + throw new TypeError( + 'The "circularValue" argument must be of type string or the value null or undefined' + ); + } + return '"[Circular]"'; + })(e), + r = f(e, "bigint"), + n = f(e, "deterministic"), + o = h(e, "maximumDepth"), + i = h(e, "maximumBreadth"); + function s(e, c, f, h, m, g) { + let v = c[e]; + switch ( + ("object" == typeof v && + null !== v && + "function" == typeof v.toJSON && + (v = v.toJSON(e)), + (v = h.call(c, e, v)), + typeof v) + ) { + case "string": + return `"${a(v)}"`; + case "object": { + if (null === v) return "null"; + if (-1 !== f.indexOf(v)) return t; + let e = "", + r = ","; + const c = g; + if (Array.isArray(v)) { + if (0 === v.length) return "[]"; + if (o < f.length + 1) return '"[Array]"'; + f.push(v), + "" !== m && ((e += `\n${(g += m)}`), (r = `,\n${g}`)); + const t = Math.min(v.length, i); + let n = 0; + for (; n < t - 1; n++) { + const t = s(n, v, f, h, m, g); + (e += void 0 !== t ? t : "null"), (e += r); + } + const a = s(n, v, f, h, m, g); + return ( + (e += void 0 !== a ? a : "null"), + v.length - 1 > i && + (e += `${r}"... ${p(v.length - i - 1)} not stringified"`), + "" !== m && (e += `\n${c}`), + f.pop(), + `[${e}]` + ); + } + let y = Object.keys(v); + const w = y.length; + if (0 === w) return "{}"; + if (o < f.length + 1) return '"[Object]"'; + let b = "", + _ = ""; + "" !== m && ((r = `,\n${(g += m)}`), (b = " ")); + let E = Math.min(w, i); + u(v) && + ((e += d(v, r, i)), + (y = y.slice(v.length)), + (E -= v.length), + (_ = r)), + n && (y = l(y)), + f.push(v); + for (let t = 0; t < E; t++) { + const n = y[t], + o = s(n, v, f, h, m, g); + void 0 !== o && ((e += `${_}"${a(n)}":${b}${o}`), (_ = r)); + } + return ( + w > i && + ((e += `${_}"...":${b}"${p(w - i)} not stringified"`), + (_ = r)), + "" !== m && _.length > 1 && (e = `\n${g}${e}\n${c}`), + f.pop(), + `{${e}}` + ); + } + case "number": + return isFinite(v) ? String(v) : "null"; + case "boolean": + return !0 === v ? "true" : "false"; + case "bigint": + return r ? String(v) : void 0; + } + } + function c(e, n, s, l, u, d) { + switch ( + ("object" == typeof n && + null !== n && + "function" == typeof n.toJSON && + (n = n.toJSON(e)), + typeof n) + ) { + case "string": + return `"${a(n)}"`; + case "object": { + if (null === n) return "null"; + if (-1 !== s.indexOf(n)) return t; + const e = d; + let r = "", + f = ","; + if (Array.isArray(n)) { + if (0 === n.length) return "[]"; + if (o < s.length + 1) return '"[Array]"'; + s.push(n), + "" !== u && ((r += `\n${(d += u)}`), (f = `,\n${d}`)); + const t = Math.min(n.length, i); + let a = 0; + for (; a < t - 1; a++) { + const e = c(a, n[a], s, l, u, d); + (r += void 0 !== e ? e : "null"), (r += f); + } + const h = c(a, n[a], s, l, u, d); + return ( + (r += void 0 !== h ? h : "null"), + n.length - 1 > i && + (r += `${f}"... ${p(n.length - i - 1)} not stringified"`), + "" !== u && (r += `\n${e}`), + s.pop(), + `[${r}]` + ); + } + if (0 === l.size) return "{}"; + s.push(n); + let h = ""; + "" !== u && ((f = `,\n${(d += u)}`), (h = " ")); + let m = ""; + for (const e of l) { + const t = c(e, n[e], s, l, u, d); + void 0 !== t && ((r += `${m}"${a(e)}":${h}${t}`), (m = f)); + } + return ( + "" !== u && m.length > 1 && (r = `\n${d}${r}\n${e}`), + s.pop(), + `{${r}}` + ); + } + case "number": + return isFinite(n) ? String(n) : "null"; + case "boolean": + return !0 === n ? "true" : "false"; + case "bigint": + return r ? String(n) : void 0; + } + } + function g(e, s, c, f, h) { + switch (typeof s) { + case "string": + return `"${a(s)}"`; + case "object": { + if (null === s) return "null"; + if ("function" == typeof s.toJSON) { + if ("object" != typeof (s = s.toJSON(e))) + return g(e, s, c, f, h); + if (null === s) return "null"; + } + if (-1 !== c.indexOf(s)) return t; + const r = h; + if (Array.isArray(s)) { + if (0 === s.length) return "[]"; + if (o < c.length + 1) return '"[Array]"'; + c.push(s); + let e = `\n${(h += f)}`; + const t = `,\n${h}`, + n = Math.min(s.length, i); + let a = 0; + for (; a < n - 1; a++) { + const r = g(a, s[a], c, f, h); + (e += void 0 !== r ? r : "null"), (e += t); + } + const l = g(a, s[a], c, f, h); + return ( + (e += void 0 !== l ? l : "null"), + s.length - 1 > i && + (e += `${t}"... ${p(s.length - i - 1)} not stringified"`), + (e += `\n${r}`), + c.pop(), + `[${e}]` + ); + } + let m = Object.keys(s); + const v = m.length; + if (0 === v) return "{}"; + if (o < c.length + 1) return '"[Object]"'; + const y = `,\n${(h += f)}`; + let w = "", + b = "", + _ = Math.min(v, i); + u(s) && + ((w += d(s, y, i)), + (m = m.slice(s.length)), + (_ -= s.length), + (b = y)), + n && (m = l(m)), + c.push(s); + for (let e = 0; e < _; e++) { + const t = m[e], + r = g(t, s[t], c, f, h); + void 0 !== r && ((w += `${b}"${a(t)}": ${r}`), (b = y)); + } + return ( + v > i && + ((w += `${b}"...": "${p(v - i)} not stringified"`), + (b = y)), + "" !== b && (w = `\n${h}${w}\n${r}`), + c.pop(), + `{${w}}` + ); + } + case "number": + return isFinite(s) ? String(s) : "null"; + case "boolean": + return !0 === s ? "true" : "false"; + case "bigint": + return r ? String(s) : void 0; + } + } + function v(e, s, c) { + switch (typeof s) { + case "string": + return `"${a(s)}"`; + case "object": { + if (null === s) return "null"; + if ("function" == typeof s.toJSON) { + if ("object" != typeof (s = s.toJSON(e))) return v(e, s, c); + if (null === s) return "null"; + } + if (-1 !== c.indexOf(s)) return t; + let r = ""; + if (Array.isArray(s)) { + if (0 === s.length) return "[]"; + if (o < c.length + 1) return '"[Array]"'; + c.push(s); + const e = Math.min(s.length, i); + let t = 0; + for (; t < e - 1; t++) { + const e = v(t, s[t], c); + (r += void 0 !== e ? e : "null"), (r += ","); + } + const n = v(t, s[t], c); + return ( + (r += void 0 !== n ? n : "null"), + s.length - 1 > i && + (r += `,"... ${p(s.length - i - 1)} not stringified"`), + c.pop(), + `[${r}]` + ); + } + let f = Object.keys(s); + const h = f.length; + if (0 === h) return "{}"; + if (o < c.length + 1) return '"[Object]"'; + let m = "", + g = Math.min(h, i); + u(s) && + ((r += d(s, ",", i)), + (f = f.slice(s.length)), + (g -= s.length), + (m = ",")), + n && (f = l(f)), + c.push(s); + for (let e = 0; e < g; e++) { + const t = f[e], + n = v(t, s[t], c); + void 0 !== n && ((r += `${m}"${a(t)}":${n}`), (m = ",")); + } + return ( + h > i && (r += `${m}"...":"${p(h - i)} not stringified"`), + c.pop(), + `{${r}}` + ); + } + case "number": + return isFinite(s) ? String(s) : "null"; + case "boolean": + return !0 === s ? "true" : "false"; + case "bigint": + return r ? String(s) : void 0; + } + } + return function (e, t, r) { + if (arguments.length > 1) { + let n = ""; + if ( + ("number" == typeof r + ? (n = " ".repeat(Math.min(r, 10))) + : "string" == typeof r && (n = r.slice(0, 10)), + null != t) + ) { + if ("function" == typeof t) + return s("", { "": e }, [], t, n, ""); + if (Array.isArray(t)) return c("", e, [], m(t), n, ""); + } + if (0 !== n.length) return g("", e, [], n, ""); + } + return v("", e, []); + }; + } + }, + 7891: (e, t) => { + var r; + (t = e.exports = K), + (r = + "object" == typeof process && + process.env && + process.env.NODE_DEBUG && + /\bsemver\b/i.test(process.env.NODE_DEBUG) + ? function () { + var e = Array.prototype.slice.call(arguments, 0); + e.unshift("SEMVER"), console.log.apply(console, e); + } + : function () {}), + (t.SEMVER_SPEC_VERSION = "2.0.0"); + var n = Number.MAX_SAFE_INTEGER || 9007199254740991, + o = (t.re = []), + i = (t.safeRe = []), + s = (t.src = []), + a = 0, + l = [ + ["\\s", 1], + ["\\d", 256], + ["[a-zA-Z0-9-]", 250], + ]; + function c(e) { + for (var t = 0; t < l.length; t++) { + var r = l[t][0], + n = l[t][1]; + e = e + .split(r + "*") + .join(r + "{0," + n + "}") + .split(r + "+") + .join(r + "{1," + n + "}"); + } + return e; + } + var u = a++; + s[u] = "0|[1-9]\\d*"; + var d = a++; + s[d] = "\\d+"; + var f = a++; + s[f] = "\\d*[a-zA-Z-][a-zA-Z0-9-]*"; + var h = a++; + s[h] = "(" + s[u] + ")\\.(" + s[u] + ")\\.(" + s[u] + ")"; + var p = a++; + s[p] = "(" + s[d] + ")\\.(" + s[d] + ")\\.(" + s[d] + ")"; + var m = a++; + s[m] = "(?:" + s[u] + "|" + s[f] + ")"; + var g = a++; + s[g] = "(?:" + s[d] + "|" + s[f] + ")"; + var v = a++; + s[v] = "(?:-(" + s[m] + "(?:\\." + s[m] + ")*))"; + var y = a++; + s[y] = "(?:-?(" + s[g] + "(?:\\." + s[g] + ")*))"; + var w = a++; + s[w] = "[a-zA-Z0-9-]+"; + var b = a++; + s[b] = "(?:\\+(" + s[w] + "(?:\\." + s[w] + ")*))"; + var _ = a++, + E = "v?" + s[h] + s[v] + "?" + s[b] + "?"; + s[_] = "^" + E + "$"; + var S = "[v=\\s]*" + s[p] + s[y] + "?" + s[b] + "?", + x = a++; + s[x] = "^" + S + "$"; + var O = a++; + s[O] = "((?:<|>)?=?)"; + var C = a++; + s[C] = s[d] + "|x|X|\\*"; + var R = a++; + s[R] = s[u] + "|x|X|\\*"; + var M = a++; + s[M] = + "[v=\\s]*(" + + s[R] + + ")(?:\\.(" + + s[R] + + ")(?:\\.(" + + s[R] + + ")(?:" + + s[v] + + ")?" + + s[b] + + "?)?)?"; + var A = a++; + s[A] = + "[v=\\s]*(" + + s[C] + + ")(?:\\.(" + + s[C] + + ")(?:\\.(" + + s[C] + + ")(?:" + + s[y] + + ")?" + + s[b] + + "?)?)?"; + var j = a++; + s[j] = "^" + s[O] + "\\s*" + s[M] + "$"; + var k = a++; + s[k] = "^" + s[O] + "\\s*" + s[A] + "$"; + var T = a++; + s[T] = + "(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])"; + var L = a++; + s[L] = "(?:~>?)"; + var N = a++; + (s[N] = "(\\s*)" + s[L] + "\\s+"), + (o[N] = new RegExp(s[N], "g")), + (i[N] = new RegExp(c(s[N]), "g")); + var P = a++; + s[P] = "^" + s[L] + s[M] + "$"; + var D = a++; + s[D] = "^" + s[L] + s[A] + "$"; + var $ = a++; + s[$] = "(?:\\^)"; + var I = a++; + (s[I] = "(\\s*)" + s[$] + "\\s+"), + (o[I] = new RegExp(s[I], "g")), + (i[I] = new RegExp(c(s[I]), "g")); + var F = a++; + s[F] = "^" + s[$] + s[M] + "$"; + var B = a++; + s[B] = "^" + s[$] + s[A] + "$"; + var U = a++; + s[U] = "^" + s[O] + "\\s*(" + S + ")$|^$"; + var H = a++; + s[H] = "^" + s[O] + "\\s*(" + E + ")$|^$"; + var q = a++; + (s[q] = "(\\s*)" + s[O] + "\\s*(" + S + "|" + s[M] + ")"), + (o[q] = new RegExp(s[q], "g")), + (i[q] = new RegExp(c(s[q]), "g")); + var z = a++; + s[z] = "^\\s*(" + s[M] + ")\\s+-\\s+(" + s[M] + ")\\s*$"; + var G = a++; + s[G] = "^\\s*(" + s[A] + ")\\s+-\\s+(" + s[A] + ")\\s*$"; + var W = a++; + s[W] = "(<|>)?=?\\s*\\*"; + for (var Y = 0; Y < 35; Y++) + r(Y, s[Y]), + o[Y] || ((o[Y] = new RegExp(s[Y])), (i[Y] = new RegExp(c(s[Y])))); + function V(e, t) { + if ( + ((t && "object" == typeof t) || + (t = { loose: !!t, includePrerelease: !1 }), + e instanceof K) + ) + return e; + if ("string" != typeof e) return null; + if (e.length > 256) return null; + if (!(t.loose ? i[x] : i[_]).test(e)) return null; + try { + return new K(e, t); + } catch (e) { + return null; + } + } + function K(e, t) { + if ( + ((t && "object" == typeof t) || + (t = { loose: !!t, includePrerelease: !1 }), + e instanceof K) + ) { + if (e.loose === t.loose) return e; + e = e.version; + } else if ("string" != typeof e) + throw new TypeError("Invalid Version: " + e); + if (e.length > 256) + throw new TypeError("version is longer than 256 characters"); + if (!(this instanceof K)) return new K(e, t); + r("SemVer", e, t), (this.options = t), (this.loose = !!t.loose); + var o = e.trim().match(t.loose ? i[x] : i[_]); + if (!o) throw new TypeError("Invalid Version: " + e); + if ( + ((this.raw = e), + (this.major = +o[1]), + (this.minor = +o[2]), + (this.patch = +o[3]), + this.major > n || this.major < 0) + ) + throw new TypeError("Invalid major version"); + if (this.minor > n || this.minor < 0) + throw new TypeError("Invalid minor version"); + if (this.patch > n || this.patch < 0) + throw new TypeError("Invalid patch version"); + o[4] + ? (this.prerelease = o[4].split(".").map(function (e) { + if (/^[0-9]+$/.test(e)) { + var t = +e; + if (t >= 0 && t < n) return t; + } + return e; + })) + : (this.prerelease = []), + (this.build = o[5] ? o[5].split(".") : []), + this.format(); + } + (t.parse = V), + (t.valid = function (e, t) { + var r = V(e, t); + return r ? r.version : null; + }), + (t.clean = function (e, t) { + var r = V(e.trim().replace(/^[=v]+/, ""), t); + return r ? r.version : null; + }), + (t.SemVer = K), + (K.prototype.format = function () { + return ( + (this.version = this.major + "." + this.minor + "." + this.patch), + this.prerelease.length && + (this.version += "-" + this.prerelease.join(".")), + this.version + ); + }), + (K.prototype.toString = function () { + return this.version; + }), + (K.prototype.compare = function (e) { + return ( + r("SemVer.compare", this.version, this.options, e), + e instanceof K || (e = new K(e, this.options)), + this.compareMain(e) || this.comparePre(e) + ); + }), + (K.prototype.compareMain = function (e) { + return ( + e instanceof K || (e = new K(e, this.options)), + J(this.major, e.major) || + J(this.minor, e.minor) || + J(this.patch, e.patch) + ); + }), + (K.prototype.comparePre = function (e) { + if ( + (e instanceof K || (e = new K(e, this.options)), + this.prerelease.length && !e.prerelease.length) + ) + return -1; + if (!this.prerelease.length && e.prerelease.length) return 1; + if (!this.prerelease.length && !e.prerelease.length) return 0; + var t = 0; + do { + var n = this.prerelease[t], + o = e.prerelease[t]; + if ( + (r("prerelease compare", t, n, o), void 0 === n && void 0 === o) + ) + return 0; + if (void 0 === o) return 1; + if (void 0 === n) return -1; + if (n !== o) return J(n, o); + } while (++t); + }), + (K.prototype.inc = function (e, t) { + switch (e) { + case "premajor": + (this.prerelease.length = 0), + (this.patch = 0), + (this.minor = 0), + this.major++, + this.inc("pre", t); + break; + case "preminor": + (this.prerelease.length = 0), + (this.patch = 0), + this.minor++, + this.inc("pre", t); + break; + case "prepatch": + (this.prerelease.length = 0), + this.inc("patch", t), + this.inc("pre", t); + break; + case "prerelease": + 0 === this.prerelease.length && this.inc("patch", t), + this.inc("pre", t); + break; + case "major": + (0 === this.minor && + 0 === this.patch && + 0 !== this.prerelease.length) || + this.major++, + (this.minor = 0), + (this.patch = 0), + (this.prerelease = []); + break; + case "minor": + (0 === this.patch && 0 !== this.prerelease.length) || + this.minor++, + (this.patch = 0), + (this.prerelease = []); + break; + case "patch": + 0 === this.prerelease.length && this.patch++, + (this.prerelease = []); + break; + case "pre": + if (0 === this.prerelease.length) this.prerelease = [0]; + else { + for (var r = this.prerelease.length; --r >= 0; ) + "number" == typeof this.prerelease[r] && + (this.prerelease[r]++, (r = -2)); + -1 === r && this.prerelease.push(0); + } + t && + (this.prerelease[0] === t + ? isNaN(this.prerelease[1]) && (this.prerelease = [t, 0]) + : (this.prerelease = [t, 0])); + break; + default: + throw new Error("invalid increment argument: " + e); + } + return this.format(), (this.raw = this.version), this; + }), + (t.inc = function (e, t, r, n) { + "string" == typeof r && ((n = r), (r = void 0)); + try { + return new K(e, r).inc(t, n).version; + } catch (e) { + return null; + } + }), + (t.diff = function (e, t) { + if (te(e, t)) return null; + var r = V(e), + n = V(t), + o = ""; + if (r.prerelease.length || n.prerelease.length) { + o = "pre"; + var i = "prerelease"; + } + for (var s in r) + if ( + ("major" === s || "minor" === s || "patch" === s) && + r[s] !== n[s] + ) + return o + s; + return i; + }), + (t.compareIdentifiers = J); + var Z = /^[0-9]+$/; + function J(e, t) { + var r = Z.test(e), + n = Z.test(t); + return ( + r && n && ((e = +e), (t = +t)), + e === t ? 0 : r && !n ? -1 : n && !r ? 1 : e < t ? -1 : 1 + ); + } + function X(e, t, r) { + return new K(e, r).compare(new K(t, r)); + } + function Q(e, t, r) { + return X(e, t, r) > 0; + } + function ee(e, t, r) { + return X(e, t, r) < 0; + } + function te(e, t, r) { + return 0 === X(e, t, r); + } + function re(e, t, r) { + return 0 !== X(e, t, r); + } + function ne(e, t, r) { + return X(e, t, r) >= 0; + } + function oe(e, t, r) { + return X(e, t, r) <= 0; + } + function ie(e, t, r, n) { + switch (t) { + case "===": + return ( + "object" == typeof e && (e = e.version), + "object" == typeof r && (r = r.version), + e === r + ); + case "!==": + return ( + "object" == typeof e && (e = e.version), + "object" == typeof r && (r = r.version), + e !== r + ); + case "": + case "=": + case "==": + return te(e, r, n); + case "!=": + return re(e, r, n); + case ">": + return Q(e, r, n); + case ">=": + return ne(e, r, n); + case "<": + return ee(e, r, n); + case "<=": + return oe(e, r, n); + default: + throw new TypeError("Invalid operator: " + t); + } + } + function se(e, t) { + if ( + ((t && "object" == typeof t) || + (t = { loose: !!t, includePrerelease: !1 }), + e instanceof se) + ) { + if (e.loose === !!t.loose) return e; + e = e.value; + } + if (!(this instanceof se)) return new se(e, t); + (e = e.trim().split(/\s+/).join(" ")), + r("comparator", e, t), + (this.options = t), + (this.loose = !!t.loose), + this.parse(e), + this.semver === ae + ? (this.value = "") + : (this.value = this.operator + this.semver.version), + r("comp", this); + } + (t.rcompareIdentifiers = function (e, t) { + return J(t, e); + }), + (t.major = function (e, t) { + return new K(e, t).major; + }), + (t.minor = function (e, t) { + return new K(e, t).minor; + }), + (t.patch = function (e, t) { + return new K(e, t).patch; + }), + (t.compare = X), + (t.compareLoose = function (e, t) { + return X(e, t, !0); + }), + (t.rcompare = function (e, t, r) { + return X(t, e, r); + }), + (t.sort = function (e, r) { + return e.sort(function (e, n) { + return t.compare(e, n, r); + }); + }), + (t.rsort = function (e, r) { + return e.sort(function (e, n) { + return t.rcompare(e, n, r); + }); + }), + (t.gt = Q), + (t.lt = ee), + (t.eq = te), + (t.neq = re), + (t.gte = ne), + (t.lte = oe), + (t.cmp = ie), + (t.Comparator = se); + var ae = {}; + function le(e, t) { + if ( + ((t && "object" == typeof t) || + (t = { loose: !!t, includePrerelease: !1 }), + e instanceof le) + ) + return e.loose === !!t.loose && + e.includePrerelease === !!t.includePrerelease + ? e + : new le(e.raw, t); + if (e instanceof se) return new le(e.value, t); + if (!(this instanceof le)) return new le(e, t); + if ( + ((this.options = t), + (this.loose = !!t.loose), + (this.includePrerelease = !!t.includePrerelease), + (this.raw = e.trim().split(/\s+/).join(" ")), + (this.set = this.raw + .split("||") + .map(function (e) { + return this.parseRange(e.trim()); + }, this) + .filter(function (e) { + return e.length; + })), + !this.set.length) + ) + throw new TypeError("Invalid SemVer Range: " + this.raw); + this.format(); + } + function ce(e) { + return !e || "x" === e.toLowerCase() || "*" === e; + } + function ue(e, t, r, n, o, i, s, a, l, c, u, d, f) { + return ( + (t = ce(r) + ? "" + : ce(n) + ? ">=" + r + ".0.0" + : ce(o) + ? ">=" + r + "." + n + ".0" + : ">=" + t) + + " " + + (a = ce(l) + ? "" + : ce(c) + ? "<" + (+l + 1) + ".0.0" + : ce(u) + ? "<" + l + "." + (+c + 1) + ".0" + : d + ? "<=" + l + "." + c + "." + u + "-" + d + : "<=" + a) + ).trim(); + } + function de(e, t, n) { + for (var o = 0; o < e.length; o++) if (!e[o].test(t)) return !1; + if (t.prerelease.length && !n.includePrerelease) { + for (o = 0; o < e.length; o++) + if ( + (r(e[o].semver), + e[o].semver !== ae && e[o].semver.prerelease.length > 0) + ) { + var i = e[o].semver; + if ( + i.major === t.major && + i.minor === t.minor && + i.patch === t.patch + ) + return !0; + } + return !1; + } + return !0; + } + function fe(e, t, r) { + try { + t = new le(t, r); + } catch (e) { + return !1; + } + return t.test(e); + } + function he(e, t, r, n) { + var o, i, s, a, l; + switch (((e = new K(e, n)), (t = new le(t, n)), r)) { + case ">": + (o = Q), (i = oe), (s = ee), (a = ">"), (l = ">="); + break; + case "<": + (o = ee), (i = ne), (s = Q), (a = "<"), (l = "<="); + break; + default: + throw new TypeError('Must provide a hilo val of "<" or ">"'); + } + if (fe(e, t, n)) return !1; + for (var c = 0; c < t.set.length; ++c) { + var u = t.set[c], + d = null, + f = null; + if ( + (u.forEach(function (e) { + e.semver === ae && (e = new se(">=0.0.0")), + (d = d || e), + (f = f || e), + o(e.semver, d.semver, n) + ? (d = e) + : s(e.semver, f.semver, n) && (f = e); + }), + d.operator === a || d.operator === l) + ) + return !1; + if ((!f.operator || f.operator === a) && i(e, f.semver)) return !1; + if (f.operator === l && s(e, f.semver)) return !1; + } + return !0; + } + (se.prototype.parse = function (e) { + var t = this.options.loose ? i[U] : i[H], + r = e.match(t); + if (!r) throw new TypeError("Invalid comparator: " + e); + (this.operator = r[1]), + "=" === this.operator && (this.operator = ""), + r[2] + ? (this.semver = new K(r[2], this.options.loose)) + : (this.semver = ae); + }), + (se.prototype.toString = function () { + return this.value; + }), + (se.prototype.test = function (e) { + return ( + r("Comparator.test", e, this.options.loose), + this.semver === ae || + ("string" == typeof e && (e = new K(e, this.options)), + ie(e, this.operator, this.semver, this.options)) + ); + }), + (se.prototype.intersects = function (e, t) { + if (!(e instanceof se)) + throw new TypeError("a Comparator is required"); + var r; + if ( + ((t && "object" == typeof t) || + (t = { loose: !!t, includePrerelease: !1 }), + "" === this.operator) + ) + return (r = new le(e.value, t)), fe(this.value, r, t); + if ("" === e.operator) + return (r = new le(this.value, t)), fe(e.semver, r, t); + var n = !( + (">=" !== this.operator && ">" !== this.operator) || + (">=" !== e.operator && ">" !== e.operator) + ), + o = !( + ("<=" !== this.operator && "<" !== this.operator) || + ("<=" !== e.operator && "<" !== e.operator) + ), + i = this.semver.version === e.semver.version, + s = !( + (">=" !== this.operator && "<=" !== this.operator) || + (">=" !== e.operator && "<=" !== e.operator) + ), + a = + ie(this.semver, "<", e.semver, t) && + (">=" === this.operator || ">" === this.operator) && + ("<=" === e.operator || "<" === e.operator), + l = + ie(this.semver, ">", e.semver, t) && + ("<=" === this.operator || "<" === this.operator) && + (">=" === e.operator || ">" === e.operator); + return n || o || (i && s) || a || l; + }), + (t.Range = le), + (le.prototype.format = function () { + return ( + (this.range = this.set + .map(function (e) { + return e.join(" ").trim(); + }) + .join("||") + .trim()), + this.range + ); + }), + (le.prototype.toString = function () { + return this.range; + }), + (le.prototype.parseRange = function (e) { + var t = this.options.loose, + n = t ? i[G] : i[z]; + (e = e.replace(n, ue)), + r("hyphen replace", e), + (e = e.replace(i[q], "$1$2$3")), + r("comparator trim", e, i[q]), + (e = (e = e.replace(i[N], "$1~")).replace(i[I], "$1^")); + var o = t ? i[U] : i[H], + s = e + .split(" ") + .map(function (e) { + return (function (e, t) { + return ( + r("comp", e, t), + (e = (function (e, t) { + return e + .trim() + .split(/\s+/) + .map(function (e) { + return (function (e, t) { + r("caret", e, t); + var n = t.loose ? i[B] : i[F]; + return e.replace(n, function (t, n, o, i, s) { + var a; + return ( + r("caret", e, t, n, o, i, s), + ce(n) + ? (a = "") + : ce(o) + ? (a = + ">=" + n + ".0.0 <" + (+n + 1) + ".0.0") + : ce(i) + ? (a = + "0" === n + ? ">=" + + n + + "." + + o + + ".0 <" + + n + + "." + + (+o + 1) + + ".0" + : ">=" + + n + + "." + + o + + ".0 <" + + (+n + 1) + + ".0.0") + : s + ? (r("replaceCaret pr", s), + (a = + "0" === n + ? "0" === o + ? ">=" + + n + + "." + + o + + "." + + i + + "-" + + s + + " <" + + n + + "." + + o + + "." + + (+i + 1) + : ">=" + + n + + "." + + o + + "." + + i + + "-" + + s + + " <" + + n + + "." + + (+o + 1) + + ".0" + : ">=" + + n + + "." + + o + + "." + + i + + "-" + + s + + " <" + + (+n + 1) + + ".0.0")) + : (r("no pr"), + (a = + "0" === n + ? "0" === o + ? ">=" + + n + + "." + + o + + "." + + i + + " <" + + n + + "." + + o + + "." + + (+i + 1) + : ">=" + + n + + "." + + o + + "." + + i + + " <" + + n + + "." + + (+o + 1) + + ".0" + : ">=" + + n + + "." + + o + + "." + + i + + " <" + + (+n + 1) + + ".0.0")), + r("caret return", a), + a + ); + }); + })(e, t); + }) + .join(" "); + })(e, t)), + r("caret", e), + (e = (function (e, t) { + return e + .trim() + .split(/\s+/) + .map(function (e) { + return (function (e, t) { + var n = t.loose ? i[D] : i[P]; + return e.replace(n, function (t, n, o, i, s) { + var a; + return ( + r("tilde", e, t, n, o, i, s), + ce(n) + ? (a = "") + : ce(o) + ? (a = + ">=" + n + ".0.0 <" + (+n + 1) + ".0.0") + : ce(i) + ? (a = + ">=" + + n + + "." + + o + + ".0 <" + + n + + "." + + (+o + 1) + + ".0") + : s + ? (r("replaceTilde pr", s), + (a = + ">=" + + n + + "." + + o + + "." + + i + + "-" + + s + + " <" + + n + + "." + + (+o + 1) + + ".0")) + : (a = + ">=" + + n + + "." + + o + + "." + + i + + " <" + + n + + "." + + (+o + 1) + + ".0"), + r("tilde return", a), + a + ); + }); + })(e, t); + }) + .join(" "); + })(e, t)), + r("tildes", e), + (e = (function (e, t) { + return ( + r("replaceXRanges", e, t), + e + .split(/\s+/) + .map(function (e) { + return (function (e, t) { + e = e.trim(); + var n = t.loose ? i[k] : i[j]; + return e.replace( + n, + function (t, n, o, i, s, a) { + r("xRange", e, t, n, o, i, s, a); + var l = ce(o), + c = l || ce(i), + u = c || ce(s); + return ( + "=" === n && u && (n = ""), + l + ? (t = + ">" === n || "<" === n + ? "<0.0.0" + : "*") + : n && u + ? (c && (i = 0), + (s = 0), + ">" === n + ? ((n = ">="), + c + ? ((o = +o + 1), + (i = 0), + (s = 0)) + : ((i = +i + 1), (s = 0))) + : "<=" === n && + ((n = "<"), + c ? (o = +o + 1) : (i = +i + 1)), + (t = n + o + "." + i + "." + s)) + : c + ? (t = + ">=" + + o + + ".0.0 <" + + (+o + 1) + + ".0.0") + : u && + (t = + ">=" + + o + + "." + + i + + ".0 <" + + o + + "." + + (+i + 1) + + ".0"), + r("xRange return", t), + t + ); + } + ); + })(e, t); + }) + .join(" ") + ); + })(e, t)), + r("xrange", e), + (e = (function (e, t) { + return ( + r("replaceStars", e, t), e.trim().replace(i[W], "") + ); + })(e, t)), + r("stars", e), + e + ); + })(e, this.options); + }, this) + .join(" ") + .split(/\s+/); + return ( + this.options.loose && + (s = s.filter(function (e) { + return !!e.match(o); + })), + s.map(function (e) { + return new se(e, this.options); + }, this) + ); + }), + (le.prototype.intersects = function (e, t) { + if (!(e instanceof le)) throw new TypeError("a Range is required"); + return this.set.some(function (r) { + return r.every(function (r) { + return e.set.some(function (e) { + return e.every(function (e) { + return r.intersects(e, t); + }); + }); + }); + }); + }), + (t.toComparators = function (e, t) { + return new le(e, t).set.map(function (e) { + return e + .map(function (e) { + return e.value; + }) + .join(" ") + .trim() + .split(" "); + }); + }), + (le.prototype.test = function (e) { + if (!e) return !1; + "string" == typeof e && (e = new K(e, this.options)); + for (var t = 0; t < this.set.length; t++) + if (de(this.set[t], e, this.options)) return !0; + return !1; + }), + (t.satisfies = fe), + (t.maxSatisfying = function (e, t, r) { + var n = null, + o = null; + try { + var i = new le(t, r); + } catch (e) { + return null; + } + return ( + e.forEach(function (e) { + i.test(e) && + ((n && -1 !== o.compare(e)) || (o = new K((n = e), r))); + }), + n + ); + }), + (t.minSatisfying = function (e, t, r) { + var n = null, + o = null; + try { + var i = new le(t, r); + } catch (e) { + return null; + } + return ( + e.forEach(function (e) { + i.test(e) && + ((n && 1 !== o.compare(e)) || (o = new K((n = e), r))); + }), + n + ); + }), + (t.minVersion = function (e, t) { + e = new le(e, t); + var r = new K("0.0.0"); + if (e.test(r)) return r; + if (((r = new K("0.0.0-0")), e.test(r))) return r; + r = null; + for (var n = 0; n < e.set.length; ++n) + e.set[n].forEach(function (e) { + var t = new K(e.semver.version); + switch (e.operator) { + case ">": + 0 === t.prerelease.length + ? t.patch++ + : t.prerelease.push(0), + (t.raw = t.format()); + case "": + case ">=": + (r && !Q(r, t)) || (r = t); + break; + case "<": + case "<=": + break; + default: + throw new Error("Unexpected operation: " + e.operator); + } + }); + return r && e.test(r) ? r : null; + }), + (t.validRange = function (e, t) { + try { + return new le(e, t).range || "*"; + } catch (e) { + return null; + } + }), + (t.ltr = function (e, t, r) { + return he(e, t, "<", r); + }), + (t.gtr = function (e, t, r) { + return he(e, t, ">", r); + }), + (t.outside = he), + (t.prerelease = function (e, t) { + var r = V(e, t); + return r && r.prerelease.length ? r.prerelease : null; + }), + (t.intersects = function (e, t, r) { + return (e = new le(e, r)), (t = new le(t, r)), e.intersects(t); + }), + (t.coerce = function (e) { + if (e instanceof K) return e; + if ("string" != typeof e) return null; + var t = e.match(i[T]); + return null == t + ? null + : V(t[1] + "." + (t[2] || "0") + "." + (t[3] || "0")); + }); + }, + 7306: (e, t, r) => { + "use strict"; + var n = r(5663); + e.exports = function (e) { + var t = e.match(n); + if (!t) return null; + var r = t[0].replace(/#! ?/, "").split(" "), + o = r[0].split("/").pop(), + i = r[1]; + return "env" === o ? i : o + (i ? " " + i : ""); + }; + }, + 5663: (e) => { + "use strict"; + e.exports = /^#!.*/; + }, + 8419: (e, t, r) => { + var n, + o = r(9491), + i = r(9291), + s = r(2361); + function a() { + u && + ((u = !1), + i.forEach(function (e) { + try { + process.removeListener(e, c[e]); + } catch (e) {} + }), + (process.emit = p), + (process.reallyExit = f), + (n.count -= 1)); + } + function l(e, t, r) { + n.emitted[e] || ((n.emitted[e] = !0), n.emit(e, t, r)); + } + "function" != typeof s && (s = s.EventEmitter), + process.__signal_exit_emitter__ + ? (n = process.__signal_exit_emitter__) + : (((n = process.__signal_exit_emitter__ = new s()).count = 0), + (n.emitted = {})), + n.infinite || (n.setMaxListeners(1 / 0), (n.infinite = !0)), + (e.exports = function (e, t) { + o.equal( + typeof e, + "function", + "a callback must be provided for exit handler" + ), + !1 === u && d(); + var r = "exit"; + return ( + t && t.alwaysLast && (r = "afterexit"), + n.on(r, e), + function () { + n.removeListener(r, e), + 0 === n.listeners("exit").length && + 0 === n.listeners("afterexit").length && + a(); + } + ); + }), + (e.exports.unload = a); + var c = {}; + i.forEach(function (e) { + c[e] = function () { + process.listeners(e).length === n.count && + (a(), + l("exit", null, e), + l("afterexit", null, e), + process.kill(process.pid, e)); + }; + }), + (e.exports.signals = function () { + return i; + }), + (e.exports.load = d); + var u = !1; + function d() { + u || + ((u = !0), + (n.count += 1), + (i = i.filter(function (e) { + try { + return process.on(e, c[e]), !0; + } catch (e) { + return !1; + } + })), + (process.emit = m), + (process.reallyExit = h)); + } + var f = process.reallyExit; + function h(e) { + (process.exitCode = e || 0), + l("exit", process.exitCode, null), + l("afterexit", process.exitCode, null), + f.call(process, process.exitCode); + } + var p = process.emit; + function m(e, t) { + if ("exit" === e) { + void 0 !== t && (process.exitCode = t); + var r = p.apply(this, arguments); + return ( + l("exit", process.exitCode, null), + l("afterexit", process.exitCode, null), + r + ); + } + return p.apply(this, arguments); + } + }, + 9291: (e) => { + e.exports = ["SIGABRT", "SIGALRM", "SIGHUP", "SIGINT", "SIGTERM"]; + }, + 9764: (e, t, r) => { + var n, + o = r(6947).SourceMapConsumer, + i = r(1017); + try { + ((n = r(7147)).existsSync && n.readFileSync) || (n = null); + } catch (e) {} + var s = !1, + a = !1, + l = !1, + c = "auto", + u = {}, + d = {}, + f = /^data:application\/json[^,]+base64,/, + h = [], + p = []; + function m() { + return ( + "browser" === c || + ("node" !== c && + "undefined" != typeof window && + "function" == typeof XMLHttpRequest && + !( + window.require && + window.module && + window.process && + "renderer" === window.process.type + )) + ); + } + function g(e) { + return function (t) { + for (var r = 0; r < e.length; r++) { + var n = e[r](t); + if (n) return n; + } + return null; + }; + } + var v = g(h); + function y(e, t) { + if (!e) return t; + var r = i.dirname(e), + n = /^\w+:\/\/[^\/]*/.exec(r), + o = n ? n[0] : ""; + return o + i.resolve(r.slice(o.length), t); + } + h.push(function (e) { + if ((e = e.trim()) in u) return u[e]; + var t = null; + if (n) { + if (n.existsSync(e)) + try { + t = n.readFileSync(e, "utf8"); + } catch (e) { + t = ""; + } + } else { + var r = new XMLHttpRequest(); + r.open("GET", e, !1), + r.send(null), + (t = null), + 4 === r.readyState && 200 === r.status && (t = r.responseText); + } + return (u[e] = t); + }); + var w = g(p); + function b(e) { + var t = d[e.source]; + if (!t) { + var r = w(e.source); + r + ? (t = d[e.source] = { url: r.url, map: new o(r.map) }).map + .sourcesContent && + t.map.sources.forEach(function (e, r) { + var n = t.map.sourcesContent[r]; + if (n) { + var o = y(t.url, e); + u[o] = n; + } + }) + : (t = d[e.source] = { url: null, map: null }); + } + if (t && t.map) { + var n = t.map.originalPositionFor(e); + if (null !== n.source) return (n.source = y(t.url, n.source)), n; + } + return e; + } + function _(e) { + var t = /^eval at ([^(]+) \((.+):(\d+):(\d+)\)$/.exec(e); + if (t) { + var r = b({ source: t[2], line: +t[3], column: t[4] - 1 }); + return ( + "eval at " + + t[1] + + " (" + + r.source + + ":" + + r.line + + ":" + + (r.column + 1) + + ")" + ); + } + return (t = /^eval at ([^(]+) \((.+)\)$/.exec(e)) + ? "eval at " + t[1] + " (" + _(t[2]) + ")" + : e; + } + function E() { + var e, + t = ""; + if (this.isNative()) t = "native"; + else { + !(e = this.getScriptNameOrSourceURL()) && + this.isEval() && + ((t = this.getEvalOrigin()), (t += ", ")), + (t += e || ""); + var r = this.getLineNumber(); + if (null != r) { + t += ":" + r; + var n = this.getColumnNumber(); + n && (t += ":" + n); + } + } + var o = "", + i = this.getFunctionName(), + s = !0, + a = this.isConstructor(); + if (this.isToplevel() || a) + a + ? (o += "new " + (i || "")) + : i + ? (o += i) + : ((o += t), (s = !1)); + else { + var l = this.getTypeName(); + "[object Object]" === l && (l = "null"); + var c = this.getMethodName(); + i + ? (l && 0 != i.indexOf(l) && (o += l + "."), + (o += i), + c && + i.indexOf("." + c) != i.length - c.length - 1 && + (o += " [as " + c + "]")) + : (o += l + "." + (c || "")); + } + return s && (o += " (" + t + ")"), o; + } + function S(e) { + var t = {}; + return ( + Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach( + function (r) { + t[r] = /^(?:is|get)/.test(r) + ? function () { + return e[r].call(e); + } + : e[r]; + } + ), + (t.toString = E), + t + ); + } + function x(e) { + if (e.isNative()) return e; + var t = e.getFileName() || e.getScriptNameOrSourceURL(); + if (t) { + var r = e.getLineNumber(), + n = e.getColumnNumber() - 1; + 1 === r && n > 62 && !m() && !e.isEval() && (n -= 62); + var o = b({ source: t, line: r, column: n }); + return ( + ((e = S(e)).getFileName = function () { + return o.source; + }), + (e.getLineNumber = function () { + return o.line; + }), + (e.getColumnNumber = function () { + return o.column + 1; + }), + (e.getScriptNameOrSourceURL = function () { + return o.source; + }), + e + ); + } + var i = e.isEval() && e.getEvalOrigin(); + return i + ? ((i = _(i)), + ((e = S(e)).getEvalOrigin = function () { + return i; + }), + e) + : e; + } + function O(e, t) { + return ( + l && ((u = {}), (d = {})), + e + + t + .map(function (e) { + return "\n at " + x(e); + }) + .join("") + ); + } + function C(e) { + var t = /\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(e.stack); + if (t) { + var r = t[1], + o = +t[2], + i = +t[3], + s = u[r]; + if (!s && n && n.existsSync(r)) + try { + s = n.readFileSync(r, "utf8"); + } catch (e) { + s = ""; + } + if (s) { + var a = s.split(/(?:\r\n|\r|\n)/)[o - 1]; + if (a) + return ( + r + ":" + o + "\n" + a + "\n" + new Array(i).join(" ") + "^" + ); + } + } + return null; + } + function R(e) { + var t = C(e); + t && (console.error(), console.error(t)), + console.error(e.stack), + process.exit(1); + } + p.push(function (e) { + var t, + r = (function (e) { + var t; + if (m()) + try { + var r = new XMLHttpRequest(); + r.open("GET", e, !1), + r.send(null), + (t = 4 === r.readyState ? r.responseText : null); + var n = + r.getResponseHeader("SourceMap") || + r.getResponseHeader("X-SourceMap"); + if (n) return n; + } catch (e) {} + t = v(e); + for ( + var o, + i, + s = + /(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^\*]+?)[ \t]*(?:\*\/)[ \t]*$)/gm; + (i = s.exec(t)); + + ) + o = i; + return o ? o[1] : null; + })(e); + if (!r) return null; + if (f.test(r)) { + var n = r.slice(r.indexOf(",") + 1); + (t = new Buffer(n, "base64").toString()), (r = e); + } else (r = y(e, r)), (t = v(r)); + return t ? { url: r, map: t } : null; + }), + (t.wrapCallSite = x), + (t.getErrorSource = C), + (t.mapSourcePosition = b), + (t.retrieveSourceMap = w), + (t.install = function (e) { + if ( + (e = e || {}).environment && + ((c = e.environment), + -1 === ["node", "browser", "auto"].indexOf(c)) + ) + throw new Error( + "environment " + + c + + " was unknown. Available options are {auto, browser, node}" + ); + if ( + (e.retrieveFile && + (e.overrideRetrieveFile && (h.length = 0), + h.unshift(e.retrieveFile)), + e.retrieveSourceMap && + (e.overrideRetrieveSourceMap && (p.length = 0), + p.unshift(e.retrieveSourceMap)), + e.hookRequire && !m()) + ) { + var t; + try { + t = r(8188); + } catch (e) {} + var n = t.prototype._compile; + n.__sourceMapSupport || + ((t.prototype._compile = function (e, t) { + return (u[t] = e), (d[t] = void 0), n.call(this, e, t); + }), + (t.prototype._compile.__sourceMapSupport = !0)); + } + var o; + l || + (l = + "emptyCacheBetweenOperations" in e && + e.emptyCacheBetweenOperations), + s || ((s = !0), (Error.prepareStackTrace = O)), + a || + ((!("handleUncaughtExceptions" in e) || + e.handleUncaughtExceptions) && + "object" == typeof process && + null !== process && + "function" == typeof process.on && + ((a = !0), + (o = process.emit), + (process.emit = function (e) { + if ("uncaughtException" === e) { + var t = arguments[1] && arguments[1].stack, + r = this.listeners(e).length > 0; + if (t && !r) return R(arguments[1]); + } + return o.apply(this, arguments); + }))); + }); + }, + 1862: (e, t, r) => { + var n = r(6268), + o = Object.prototype.hasOwnProperty, + i = "undefined" != typeof Map; + function s() { + (this._array = []), (this._set = i ? new Map() : Object.create(null)); + } + (s.fromArray = function (e, t) { + for (var r = new s(), n = 0, o = e.length; n < o; n++) r.add(e[n], t); + return r; + }), + (s.prototype.size = function () { + return i + ? this._set.size + : Object.getOwnPropertyNames(this._set).length; + }), + (s.prototype.add = function (e, t) { + var r = i ? e : n.toSetString(e), + s = i ? this.has(e) : o.call(this._set, r), + a = this._array.length; + (s && !t) || this._array.push(e), + s || (i ? this._set.set(e, a) : (this._set[r] = a)); + }), + (s.prototype.has = function (e) { + if (i) return this._set.has(e); + var t = n.toSetString(e); + return o.call(this._set, t); + }), + (s.prototype.indexOf = function (e) { + if (i) { + var t = this._set.get(e); + if (t >= 0) return t; + } else { + var r = n.toSetString(e); + if (o.call(this._set, r)) return this._set[r]; + } + throw new Error('"' + e + '" is not in the set.'); + }), + (s.prototype.at = function (e) { + if (e >= 0 && e < this._array.length) return this._array[e]; + throw new Error("No element indexed by " + e); + }), + (s.prototype.toArray = function () { + return this._array.slice(); + }), + (t.I = s); + }, + 4754: (e, t, r) => { + var n = r(5978); + (t.encode = function (e) { + var t, + r = "", + o = (function (e) { + return e < 0 ? 1 + (-e << 1) : 0 + (e << 1); + })(e); + do { + (t = 31 & o), (o >>>= 5) > 0 && (t |= 32), (r += n.encode(t)); + } while (o > 0); + return r; + }), + (t.decode = function (e, t, r) { + var o, + i, + s, + a, + l = e.length, + c = 0, + u = 0; + do { + if (t >= l) + throw new Error("Expected more digits in base 64 VLQ value."); + if (-1 === (i = n.decode(e.charCodeAt(t++)))) + throw new Error("Invalid base64 digit: " + e.charAt(t - 1)); + (o = !!(32 & i)), (c += (i &= 31) << u), (u += 5); + } while (o); + (r.value = ((a = (s = c) >> 1), 1 == (1 & s) ? -a : a)), + (r.rest = t); + }); + }, + 5978: (e, t) => { + var r = + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split( + "" + ); + (t.encode = function (e) { + if (0 <= e && e < r.length) return r[e]; + throw new TypeError("Must be between 0 and 63: " + e); + }), + (t.decode = function (e) { + return 65 <= e && e <= 90 + ? e - 65 + : 97 <= e && e <= 122 + ? e - 97 + 26 + : 48 <= e && e <= 57 + ? e - 48 + 52 + : 43 == e + ? 62 + : 47 == e + ? 63 + : -1; + }); + }, + 5583: (e, t) => { + function r(e, n, o, i, s, a) { + var l = Math.floor((n - e) / 2) + e, + c = s(o, i[l], !0); + return 0 === c + ? l + : c > 0 + ? n - l > 1 + ? r(l, n, o, i, s, a) + : a == t.LEAST_UPPER_BOUND + ? n < i.length + ? n + : -1 + : l + : l - e > 1 + ? r(e, l, o, i, s, a) + : a == t.LEAST_UPPER_BOUND + ? l + : e < 0 + ? -1 + : e; + } + (t.GREATEST_LOWER_BOUND = 1), + (t.LEAST_UPPER_BOUND = 2), + (t.search = function (e, n, o, i) { + if (0 === n.length) return -1; + var s = r(-1, n.length, e, n, o, i || t.GREATEST_LOWER_BOUND); + if (s < 0) return -1; + for (; s - 1 >= 0 && 0 === o(n[s], n[s - 1], !0); ) --s; + return s; + }); + }, + 6546: (e, t, r) => { + var n = r(6268); + function o() { + (this._array = []), + (this._sorted = !0), + (this._last = { generatedLine: -1, generatedColumn: 0 }); + } + (o.prototype.unsortedForEach = function (e, t) { + this._array.forEach(e, t); + }), + (o.prototype.add = function (e) { + var t, r, o, i, s, a; + (r = e), + (o = (t = this._last).generatedLine), + (i = r.generatedLine), + (s = t.generatedColumn), + (a = r.generatedColumn), + i > o || + (i == o && a >= s) || + n.compareByGeneratedPositionsInflated(t, r) <= 0 + ? ((this._last = e), this._array.push(e)) + : ((this._sorted = !1), this._array.push(e)); + }), + (o.prototype.toArray = function () { + return ( + this._sorted || + (this._array.sort(n.compareByGeneratedPositionsInflated), + (this._sorted = !0)), + this._array + ); + }), + (t.H = o); + }, + 9888: (e, t) => { + function r(e, t, r) { + var n = e[t]; + (e[t] = e[r]), (e[r] = n); + } + function n(e, t, o, i) { + if (o < i) { + var s = o - 1; + r( + e, + ((u = o), (d = i), Math.round(u + Math.random() * (d - u))), + i + ); + for (var a = e[i], l = o; l < i; l++) + t(e[l], a) <= 0 && r(e, (s += 1), l); + r(e, s + 1, l); + var c = s + 1; + n(e, t, o, c - 1), n(e, t, c + 1, i); + } + var u, d; + } + t.U = function (e, t) { + n(e, t, 0, e.length - 1); + }; + }, + 5600: (e, t, r) => { + var n = r(6268), + o = r(5583), + i = r(1862).I, + s = r(4754), + a = r(9888).U; + function l(e) { + var t = e; + return ( + "string" == typeof e && (t = JSON.parse(e.replace(/^\)\]\}'/, ""))), + null != t.sections ? new d(t) : new c(t) + ); + } + function c(e) { + var t = e; + "string" == typeof e && (t = JSON.parse(e.replace(/^\)\]\}'/, ""))); + var r = n.getArg(t, "version"), + o = n.getArg(t, "sources"), + s = n.getArg(t, "names", []), + a = n.getArg(t, "sourceRoot", null), + l = n.getArg(t, "sourcesContent", null), + c = n.getArg(t, "mappings"), + u = n.getArg(t, "file", null); + if (r != this._version) throw new Error("Unsupported version: " + r); + (o = o + .map(String) + .map(n.normalize) + .map(function (e) { + return a && n.isAbsolute(a) && n.isAbsolute(e) + ? n.relative(a, e) + : e; + })), + (this._names = i.fromArray(s.map(String), !0)), + (this._sources = i.fromArray(o, !0)), + (this.sourceRoot = a), + (this.sourcesContent = l), + (this._mappings = c), + (this.file = u); + } + function u() { + (this.generatedLine = 0), + (this.generatedColumn = 0), + (this.source = null), + (this.originalLine = null), + (this.originalColumn = null), + (this.name = null); + } + function d(e) { + var t = e; + "string" == typeof e && (t = JSON.parse(e.replace(/^\)\]\}'/, ""))); + var r = n.getArg(t, "version"), + o = n.getArg(t, "sections"); + if (r != this._version) throw new Error("Unsupported version: " + r); + (this._sources = new i()), (this._names = new i()); + var s = { line: -1, column: 0 }; + this._sections = o.map(function (e) { + if (e.url) + throw new Error( + "Support for url field in sections not implemented." + ); + var t = n.getArg(e, "offset"), + r = n.getArg(t, "line"), + o = n.getArg(t, "column"); + if (r < s.line || (r === s.line && o < s.column)) + throw new Error( + "Section offsets must be ordered and non-overlapping." + ); + return ( + (s = t), + { + generatedOffset: { + generatedLine: r + 1, + generatedColumn: o + 1, + }, + consumer: new l(n.getArg(e, "map")), + } + ); + }); + } + (l.fromSourceMap = function (e) { + return c.fromSourceMap(e); + }), + (l.prototype._version = 3), + (l.prototype.__generatedMappings = null), + Object.defineProperty(l.prototype, "_generatedMappings", { + get: function () { + return ( + this.__generatedMappings || + this._parseMappings(this._mappings, this.sourceRoot), + this.__generatedMappings + ); + }, + }), + (l.prototype.__originalMappings = null), + Object.defineProperty(l.prototype, "_originalMappings", { + get: function () { + return ( + this.__originalMappings || + this._parseMappings(this._mappings, this.sourceRoot), + this.__originalMappings + ); + }, + }), + (l.prototype._charIsMappingSeparator = function (e, t) { + var r = e.charAt(t); + return ";" === r || "," === r; + }), + (l.prototype._parseMappings = function (e, t) { + throw new Error("Subclasses must implement _parseMappings"); + }), + (l.GENERATED_ORDER = 1), + (l.ORIGINAL_ORDER = 2), + (l.GREATEST_LOWER_BOUND = 1), + (l.LEAST_UPPER_BOUND = 2), + (l.prototype.eachMapping = function (e, t, r) { + var o, + i = t || null; + switch (r || l.GENERATED_ORDER) { + case l.GENERATED_ORDER: + o = this._generatedMappings; + break; + case l.ORIGINAL_ORDER: + o = this._originalMappings; + break; + default: + throw new Error("Unknown order of iteration."); + } + var s = this.sourceRoot; + o.map(function (e) { + var t = null === e.source ? null : this._sources.at(e.source); + return ( + null != t && null != s && (t = n.join(s, t)), + { + source: t, + generatedLine: e.generatedLine, + generatedColumn: e.generatedColumn, + originalLine: e.originalLine, + originalColumn: e.originalColumn, + name: null === e.name ? null : this._names.at(e.name), + } + ); + }, this).forEach(e, i); + }), + (l.prototype.allGeneratedPositionsFor = function (e) { + var t = n.getArg(e, "line"), + r = { + source: n.getArg(e, "source"), + originalLine: t, + originalColumn: n.getArg(e, "column", 0), + }; + if ( + (null != this.sourceRoot && + (r.source = n.relative(this.sourceRoot, r.source)), + !this._sources.has(r.source)) + ) + return []; + r.source = this._sources.indexOf(r.source); + var i = [], + s = this._findMapping( + r, + this._originalMappings, + "originalLine", + "originalColumn", + n.compareByOriginalPositions, + o.LEAST_UPPER_BOUND + ); + if (s >= 0) { + var a = this._originalMappings[s]; + if (void 0 === e.column) + for (var l = a.originalLine; a && a.originalLine === l; ) + i.push({ + line: n.getArg(a, "generatedLine", null), + column: n.getArg(a, "generatedColumn", null), + lastColumn: n.getArg(a, "lastGeneratedColumn", null), + }), + (a = this._originalMappings[++s]); + else + for ( + var c = a.originalColumn; + a && a.originalLine === t && a.originalColumn == c; + + ) + i.push({ + line: n.getArg(a, "generatedLine", null), + column: n.getArg(a, "generatedColumn", null), + lastColumn: n.getArg(a, "lastGeneratedColumn", null), + }), + (a = this._originalMappings[++s]); + } + return i; + }), + (t.SourceMapConsumer = l), + (c.prototype = Object.create(l.prototype)), + (c.prototype.consumer = l), + (c.fromSourceMap = function (e) { + var t = Object.create(c.prototype), + r = (t._names = i.fromArray(e._names.toArray(), !0)), + o = (t._sources = i.fromArray(e._sources.toArray(), !0)); + (t.sourceRoot = e._sourceRoot), + (t.sourcesContent = e._generateSourcesContent( + t._sources.toArray(), + t.sourceRoot + )), + (t.file = e._file); + for ( + var s = e._mappings.toArray().slice(), + l = (t.__generatedMappings = []), + d = (t.__originalMappings = []), + f = 0, + h = s.length; + f < h; + f++ + ) { + var p = s[f], + m = new u(); + (m.generatedLine = p.generatedLine), + (m.generatedColumn = p.generatedColumn), + p.source && + ((m.source = o.indexOf(p.source)), + (m.originalLine = p.originalLine), + (m.originalColumn = p.originalColumn), + p.name && (m.name = r.indexOf(p.name)), + d.push(m)), + l.push(m); + } + return a(t.__originalMappings, n.compareByOriginalPositions), t; + }), + (c.prototype._version = 3), + Object.defineProperty(c.prototype, "sources", { + get: function () { + return this._sources.toArray().map(function (e) { + return null != this.sourceRoot ? n.join(this.sourceRoot, e) : e; + }, this); + }, + }), + (c.prototype._parseMappings = function (e, t) { + for ( + var r, + o, + i, + l, + c, + d = 1, + f = 0, + h = 0, + p = 0, + m = 0, + g = 0, + v = e.length, + y = 0, + w = {}, + b = {}, + _ = [], + E = []; + y < v; + + ) + if (";" === e.charAt(y)) d++, y++, (f = 0); + else if ("," === e.charAt(y)) y++; + else { + for ( + (r = new u()).generatedLine = d, l = y; + l < v && !this._charIsMappingSeparator(e, l); + l++ + ); + if ((i = w[(o = e.slice(y, l))])) y += o.length; + else { + for (i = []; y < l; ) + s.decode(e, y, b), (c = b.value), (y = b.rest), i.push(c); + if (2 === i.length) + throw new Error("Found a source, but no line and column"); + if (3 === i.length) + throw new Error("Found a source and line, but no column"); + w[o] = i; + } + (r.generatedColumn = f + i[0]), + (f = r.generatedColumn), + i.length > 1 && + ((r.source = m + i[1]), + (m += i[1]), + (r.originalLine = h + i[2]), + (h = r.originalLine), + (r.originalLine += 1), + (r.originalColumn = p + i[3]), + (p = r.originalColumn), + i.length > 4 && ((r.name = g + i[4]), (g += i[4]))), + E.push(r), + "number" == typeof r.originalLine && _.push(r); + } + a(E, n.compareByGeneratedPositionsDeflated), + (this.__generatedMappings = E), + a(_, n.compareByOriginalPositions), + (this.__originalMappings = _); + }), + (c.prototype._findMapping = function (e, t, r, n, i, s) { + if (e[r] <= 0) + throw new TypeError( + "Line must be greater than or equal to 1, got " + e[r] + ); + if (e[n] < 0) + throw new TypeError( + "Column must be greater than or equal to 0, got " + e[n] + ); + return o.search(e, t, i, s); + }), + (c.prototype.computeColumnSpans = function () { + for (var e = 0; e < this._generatedMappings.length; ++e) { + var t = this._generatedMappings[e]; + if (e + 1 < this._generatedMappings.length) { + var r = this._generatedMappings[e + 1]; + if (t.generatedLine === r.generatedLine) { + t.lastGeneratedColumn = r.generatedColumn - 1; + continue; + } + } + t.lastGeneratedColumn = 1 / 0; + } + }), + (c.prototype.originalPositionFor = function (e) { + var t = { + generatedLine: n.getArg(e, "line"), + generatedColumn: n.getArg(e, "column"), + }, + r = this._findMapping( + t, + this._generatedMappings, + "generatedLine", + "generatedColumn", + n.compareByGeneratedPositionsDeflated, + n.getArg(e, "bias", l.GREATEST_LOWER_BOUND) + ); + if (r >= 0) { + var o = this._generatedMappings[r]; + if (o.generatedLine === t.generatedLine) { + var i = n.getArg(o, "source", null); + null !== i && + ((i = this._sources.at(i)), + null != this.sourceRoot && (i = n.join(this.sourceRoot, i))); + var s = n.getArg(o, "name", null); + return ( + null !== s && (s = this._names.at(s)), + { + source: i, + line: n.getArg(o, "originalLine", null), + column: n.getArg(o, "originalColumn", null), + name: s, + } + ); + } + } + return { source: null, line: null, column: null, name: null }; + }), + (c.prototype.hasContentsOfAllSources = function () { + return ( + !!this.sourcesContent && + this.sourcesContent.length >= this._sources.size() && + !this.sourcesContent.some(function (e) { + return null == e; + }) + ); + }), + (c.prototype.sourceContentFor = function (e, t) { + if (!this.sourcesContent) return null; + if ( + (null != this.sourceRoot && (e = n.relative(this.sourceRoot, e)), + this._sources.has(e)) + ) + return this.sourcesContent[this._sources.indexOf(e)]; + var r; + if (null != this.sourceRoot && (r = n.urlParse(this.sourceRoot))) { + var o = e.replace(/^file:\/\//, ""); + if ("file" == r.scheme && this._sources.has(o)) + return this.sourcesContent[this._sources.indexOf(o)]; + if ((!r.path || "/" == r.path) && this._sources.has("/" + e)) + return this.sourcesContent[this._sources.indexOf("/" + e)]; + } + if (t) return null; + throw new Error('"' + e + '" is not in the SourceMap.'); + }), + (c.prototype.generatedPositionFor = function (e) { + var t = n.getArg(e, "source"); + if ( + (null != this.sourceRoot && (t = n.relative(this.sourceRoot, t)), + !this._sources.has(t)) + ) + return { line: null, column: null, lastColumn: null }; + var r = { + source: (t = this._sources.indexOf(t)), + originalLine: n.getArg(e, "line"), + originalColumn: n.getArg(e, "column"), + }, + o = this._findMapping( + r, + this._originalMappings, + "originalLine", + "originalColumn", + n.compareByOriginalPositions, + n.getArg(e, "bias", l.GREATEST_LOWER_BOUND) + ); + if (o >= 0) { + var i = this._originalMappings[o]; + if (i.source === r.source) + return { + line: n.getArg(i, "generatedLine", null), + column: n.getArg(i, "generatedColumn", null), + lastColumn: n.getArg(i, "lastGeneratedColumn", null), + }; + } + return { line: null, column: null, lastColumn: null }; + }), + (d.prototype = Object.create(l.prototype)), + (d.prototype.constructor = l), + (d.prototype._version = 3), + Object.defineProperty(d.prototype, "sources", { + get: function () { + for (var e = [], t = 0; t < this._sections.length; t++) + for ( + var r = 0; + r < this._sections[t].consumer.sources.length; + r++ + ) + e.push(this._sections[t].consumer.sources[r]); + return e; + }, + }), + (d.prototype.originalPositionFor = function (e) { + var t = { + generatedLine: n.getArg(e, "line"), + generatedColumn: n.getArg(e, "column"), + }, + r = o.search(t, this._sections, function (e, t) { + return ( + e.generatedLine - t.generatedOffset.generatedLine || + e.generatedColumn - t.generatedOffset.generatedColumn + ); + }), + i = this._sections[r]; + return i + ? i.consumer.originalPositionFor({ + line: t.generatedLine - (i.generatedOffset.generatedLine - 1), + column: + t.generatedColumn - + (i.generatedOffset.generatedLine === t.generatedLine + ? i.generatedOffset.generatedColumn - 1 + : 0), + bias: e.bias, + }) + : { source: null, line: null, column: null, name: null }; + }), + (d.prototype.hasContentsOfAllSources = function () { + return this._sections.every(function (e) { + return e.consumer.hasContentsOfAllSources(); + }); + }), + (d.prototype.sourceContentFor = function (e, t) { + for (var r = 0; r < this._sections.length; r++) { + var n = this._sections[r].consumer.sourceContentFor(e, !0); + if (n) return n; + } + if (t) return null; + throw new Error('"' + e + '" is not in the SourceMap.'); + }), + (d.prototype.generatedPositionFor = function (e) { + for (var t = 0; t < this._sections.length; t++) { + var r = this._sections[t]; + if (-1 !== r.consumer.sources.indexOf(n.getArg(e, "source"))) { + var o = r.consumer.generatedPositionFor(e); + if (o) + return { + line: o.line + (r.generatedOffset.generatedLine - 1), + column: + o.column + + (r.generatedOffset.generatedLine === o.line + ? r.generatedOffset.generatedColumn - 1 + : 0), + }; + } + } + return { line: null, column: null }; + }), + (d.prototype._parseMappings = function (e, t) { + (this.__generatedMappings = []), (this.__originalMappings = []); + for (var r = 0; r < this._sections.length; r++) + for ( + var o = this._sections[r], + i = o.consumer._generatedMappings, + s = 0; + s < i.length; + s++ + ) { + var l = i[s], + c = o.consumer._sources.at(l.source); + null !== o.consumer.sourceRoot && + (c = n.join(o.consumer.sourceRoot, c)), + this._sources.add(c), + (c = this._sources.indexOf(c)); + var u = o.consumer._names.at(l.name); + this._names.add(u), (u = this._names.indexOf(u)); + var d = { + source: c, + generatedLine: + l.generatedLine + (o.generatedOffset.generatedLine - 1), + generatedColumn: + l.generatedColumn + + (o.generatedOffset.generatedLine === l.generatedLine + ? o.generatedOffset.generatedColumn - 1 + : 0), + originalLine: l.originalLine, + originalColumn: l.originalColumn, + name: u, + }; + this.__generatedMappings.push(d), + "number" == typeof d.originalLine && + this.__originalMappings.push(d); + } + a(this.__generatedMappings, n.compareByGeneratedPositionsDeflated), + a(this.__originalMappings, n.compareByOriginalPositions); + }); + }, + 9947: (e, t, r) => { + var n = r(4754), + o = r(6268), + i = r(1862).I, + s = r(6546).H; + function a(e) { + e || (e = {}), + (this._file = o.getArg(e, "file", null)), + (this._sourceRoot = o.getArg(e, "sourceRoot", null)), + (this._skipValidation = o.getArg(e, "skipValidation", !1)), + (this._sources = new i()), + (this._names = new i()), + (this._mappings = new s()), + (this._sourcesContents = null); + } + (a.prototype._version = 3), + (a.fromSourceMap = function (e) { + var t = e.sourceRoot, + r = new a({ file: e.file, sourceRoot: t }); + return ( + e.eachMapping(function (e) { + var n = { + generated: { + line: e.generatedLine, + column: e.generatedColumn, + }, + }; + null != e.source && + ((n.source = e.source), + null != t && (n.source = o.relative(t, n.source)), + (n.original = { + line: e.originalLine, + column: e.originalColumn, + }), + null != e.name && (n.name = e.name)), + r.addMapping(n); + }), + e.sources.forEach(function (t) { + var n = e.sourceContentFor(t); + null != n && r.setSourceContent(t, n); + }), + r + ); + }), + (a.prototype.addMapping = function (e) { + var t = o.getArg(e, "generated"), + r = o.getArg(e, "original", null), + n = o.getArg(e, "source", null), + i = o.getArg(e, "name", null); + this._skipValidation || this._validateMapping(t, r, n, i), + null != n && + ((n = String(n)), this._sources.has(n) || this._sources.add(n)), + null != i && + ((i = String(i)), this._names.has(i) || this._names.add(i)), + this._mappings.add({ + generatedLine: t.line, + generatedColumn: t.column, + originalLine: null != r && r.line, + originalColumn: null != r && r.column, + source: n, + name: i, + }); + }), + (a.prototype.setSourceContent = function (e, t) { + var r = e; + null != this._sourceRoot && (r = o.relative(this._sourceRoot, r)), + null != t + ? (this._sourcesContents || + (this._sourcesContents = Object.create(null)), + (this._sourcesContents[o.toSetString(r)] = t)) + : this._sourcesContents && + (delete this._sourcesContents[o.toSetString(r)], + 0 === Object.keys(this._sourcesContents).length && + (this._sourcesContents = null)); + }), + (a.prototype.applySourceMap = function (e, t, r) { + var n = t; + if (null == t) { + if (null == e.file) + throw new Error( + 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.' + ); + n = e.file; + } + var s = this._sourceRoot; + null != s && (n = o.relative(s, n)); + var a = new i(), + l = new i(); + this._mappings.unsortedForEach(function (t) { + if (t.source === n && null != t.originalLine) { + var i = e.originalPositionFor({ + line: t.originalLine, + column: t.originalColumn, + }); + null != i.source && + ((t.source = i.source), + null != r && (t.source = o.join(r, t.source)), + null != s && (t.source = o.relative(s, t.source)), + (t.originalLine = i.line), + (t.originalColumn = i.column), + null != i.name && (t.name = i.name)); + } + var c = t.source; + null == c || a.has(c) || a.add(c); + var u = t.name; + null == u || l.has(u) || l.add(u); + }, this), + (this._sources = a), + (this._names = l), + e.sources.forEach(function (t) { + var n = e.sourceContentFor(t); + null != n && + (null != r && (t = o.join(r, t)), + null != s && (t = o.relative(s, t)), + this.setSourceContent(t, n)); + }, this); + }), + (a.prototype._validateMapping = function (e, t, r, n) { + if (t && "number" != typeof t.line && "number" != typeof t.column) + throw new Error( + "original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values." + ); + if ( + (!( + e && + "line" in e && + "column" in e && + e.line > 0 && + e.column >= 0 + ) || + t || + r || + n) && + !( + e && + "line" in e && + "column" in e && + t && + "line" in t && + "column" in t && + e.line > 0 && + e.column >= 0 && + t.line > 0 && + t.column >= 0 && + r + ) + ) + throw new Error( + "Invalid mapping: " + + JSON.stringify({ + generated: e, + source: r, + original: t, + name: n, + }) + ); + }), + (a.prototype._serializeMappings = function () { + for ( + var e, + t, + r, + i, + s = 0, + a = 1, + l = 0, + c = 0, + u = 0, + d = 0, + f = "", + h = this._mappings.toArray(), + p = 0, + m = h.length; + p < m; + p++ + ) { + if (((e = ""), (t = h[p]).generatedLine !== a)) + for (s = 0; t.generatedLine !== a; ) (e += ";"), a++; + else if (p > 0) { + if (!o.compareByGeneratedPositionsInflated(t, h[p - 1])) + continue; + e += ","; + } + (e += n.encode(t.generatedColumn - s)), + (s = t.generatedColumn), + null != t.source && + ((i = this._sources.indexOf(t.source)), + (e += n.encode(i - d)), + (d = i), + (e += n.encode(t.originalLine - 1 - c)), + (c = t.originalLine - 1), + (e += n.encode(t.originalColumn - l)), + (l = t.originalColumn), + null != t.name && + ((r = this._names.indexOf(t.name)), + (e += n.encode(r - u)), + (u = r))), + (f += e); + } + return f; + }), + (a.prototype._generateSourcesContent = function (e, t) { + return e.map(function (e) { + if (!this._sourcesContents) return null; + null != t && (e = o.relative(t, e)); + var r = o.toSetString(e); + return Object.prototype.hasOwnProperty.call( + this._sourcesContents, + r + ) + ? this._sourcesContents[r] + : null; + }, this); + }), + (a.prototype.toJSON = function () { + var e = { + version: this._version, + sources: this._sources.toArray(), + names: this._names.toArray(), + mappings: this._serializeMappings(), + }; + return ( + null != this._file && (e.file = this._file), + null != this._sourceRoot && (e.sourceRoot = this._sourceRoot), + this._sourcesContents && + (e.sourcesContent = this._generateSourcesContent( + e.sources, + e.sourceRoot + )), + e + ); + }), + (a.prototype.toString = function () { + return JSON.stringify(this.toJSON()); + }), + (t.h = a); + }, + 4047: (e, t, r) => { + var n = r(9947).h, + o = r(6268), + i = /(\r?\n)/, + s = "$$$isSourceNode$$$"; + function a(e, t, r, n, o) { + (this.children = []), + (this.sourceContents = {}), + (this.line = null == e ? null : e), + (this.column = null == t ? null : t), + (this.source = null == r ? null : r), + (this.name = null == o ? null : o), + (this[s] = !0), + null != n && this.add(n); + } + (a.fromStringWithSourceMap = function (e, t, r) { + var n = new a(), + s = e.split(i), + l = 0, + c = function () { + return e() + (e() || ""); + function e() { + return l < s.length ? s[l++] : void 0; + } + }, + u = 1, + d = 0, + f = null; + return ( + t.eachMapping(function (e) { + if (null !== f) { + if (!(u < e.generatedLine)) { + var t = (r = s[l]).substr(0, e.generatedColumn - d); + return ( + (s[l] = r.substr(e.generatedColumn - d)), + (d = e.generatedColumn), + h(f, t), + void (f = e) + ); + } + h(f, c()), u++, (d = 0); + } + for (; u < e.generatedLine; ) n.add(c()), u++; + if (d < e.generatedColumn) { + var r = s[l]; + n.add(r.substr(0, e.generatedColumn)), + (s[l] = r.substr(e.generatedColumn)), + (d = e.generatedColumn); + } + f = e; + }, this), + l < s.length && (f && h(f, c()), n.add(s.splice(l).join(""))), + t.sources.forEach(function (e) { + var i = t.sourceContentFor(e); + null != i && + (null != r && (e = o.join(r, e)), n.setSourceContent(e, i)); + }), + n + ); + function h(e, t) { + if (null === e || void 0 === e.source) n.add(t); + else { + var i = r ? o.join(r, e.source) : e.source; + n.add(new a(e.originalLine, e.originalColumn, i, t, e.name)); + } + } + }), + (a.prototype.add = function (e) { + if (Array.isArray(e)) + e.forEach(function (e) { + this.add(e); + }, this); + else { + if (!e[s] && "string" != typeof e) + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + + e + ); + e && this.children.push(e); + } + return this; + }), + (a.prototype.prepend = function (e) { + if (Array.isArray(e)) + for (var t = e.length - 1; t >= 0; t--) this.prepend(e[t]); + else { + if (!e[s] && "string" != typeof e) + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + + e + ); + this.children.unshift(e); + } + return this; + }), + (a.prototype.walk = function (e) { + for (var t, r = 0, n = this.children.length; r < n; r++) + (t = this.children[r])[s] + ? t.walk(e) + : "" !== t && + e(t, { + source: this.source, + line: this.line, + column: this.column, + name: this.name, + }); + }), + (a.prototype.join = function (e) { + var t, + r, + n = this.children.length; + if (n > 0) { + for (t = [], r = 0; r < n - 1; r++) + t.push(this.children[r]), t.push(e); + t.push(this.children[r]), (this.children = t); + } + return this; + }), + (a.prototype.replaceRight = function (e, t) { + var r = this.children[this.children.length - 1]; + return ( + r[s] + ? r.replaceRight(e, t) + : "string" == typeof r + ? (this.children[this.children.length - 1] = r.replace(e, t)) + : this.children.push("".replace(e, t)), + this + ); + }), + (a.prototype.setSourceContent = function (e, t) { + this.sourceContents[o.toSetString(e)] = t; + }), + (a.prototype.walkSourceContents = function (e) { + for (var t = 0, r = this.children.length; t < r; t++) + this.children[t][s] && this.children[t].walkSourceContents(e); + var n = Object.keys(this.sourceContents); + for (t = 0, r = n.length; t < r; t++) + e(o.fromSetString(n[t]), this.sourceContents[n[t]]); + }), + (a.prototype.toString = function () { + var e = ""; + return ( + this.walk(function (t) { + e += t; + }), + e + ); + }), + (a.prototype.toStringWithSourceMap = function (e) { + var t = { code: "", line: 1, column: 0 }, + r = new n(e), + o = !1, + i = null, + s = null, + a = null, + l = null; + return ( + this.walk(function (e, n) { + (t.code += e), + null !== n.source && null !== n.line && null !== n.column + ? ((i === n.source && + s === n.line && + a === n.column && + l === n.name) || + r.addMapping({ + source: n.source, + original: { line: n.line, column: n.column }, + generated: { line: t.line, column: t.column }, + name: n.name, + }), + (i = n.source), + (s = n.line), + (a = n.column), + (l = n.name), + (o = !0)) + : o && + (r.addMapping({ + generated: { line: t.line, column: t.column }, + }), + (i = null), + (o = !1)); + for (var c = 0, u = e.length; c < u; c++) + 10 === e.charCodeAt(c) + ? (t.line++, + (t.column = 0), + c + 1 === u + ? ((i = null), (o = !1)) + : o && + r.addMapping({ + source: n.source, + original: { line: n.line, column: n.column }, + generated: { line: t.line, column: t.column }, + name: n.name, + })) + : t.column++; + }), + this.walkSourceContents(function (e, t) { + r.setSourceContent(e, t); + }), + { code: t.code, map: r } + ); + }); + }, + 6268: (e, t) => { + t.getArg = function (e, t, r) { + if (t in e) return e[t]; + if (3 === arguments.length) return r; + throw new Error('"' + t + '" is a required argument.'); + }; + var r = + /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/, + n = /^data:.+\,.+$/; + function o(e) { + var t = e.match(r); + return t + ? { scheme: t[1], auth: t[2], host: t[3], port: t[4], path: t[5] } + : null; + } + function i(e) { + var t = ""; + return ( + e.scheme && (t += e.scheme + ":"), + (t += "//"), + e.auth && (t += e.auth + "@"), + e.host && (t += e.host), + e.port && (t += ":" + e.port), + e.path && (t += e.path), + t + ); + } + function s(e) { + var r = e, + n = o(e); + if (n) { + if (!n.path) return e; + r = n.path; + } + for ( + var s, + a = t.isAbsolute(r), + l = r.split(/\/+/), + c = 0, + u = l.length - 1; + u >= 0; + u-- + ) + "." === (s = l[u]) + ? l.splice(u, 1) + : ".." === s + ? c++ + : c > 0 && + ("" === s + ? (l.splice(u + 1, c), (c = 0)) + : (l.splice(u, 2), c--)); + return ( + "" === (r = l.join("/")) && (r = a ? "/" : "."), + n ? ((n.path = r), i(n)) : r + ); + } + (t.urlParse = o), + (t.urlGenerate = i), + (t.normalize = s), + (t.join = function (e, t) { + "" === e && (e = "."), "" === t && (t = "."); + var r = o(t), + a = o(e); + if ((a && (e = a.path || "/"), r && !r.scheme)) + return a && (r.scheme = a.scheme), i(r); + if (r || t.match(n)) return t; + if (a && !a.host && !a.path) return (a.host = t), i(a); + var l = + "/" === t.charAt(0) ? t : s(e.replace(/\/+$/, "") + "/" + t); + return a ? ((a.path = l), i(a)) : l; + }), + (t.isAbsolute = function (e) { + return "/" === e.charAt(0) || !!e.match(r); + }), + (t.relative = function (e, t) { + "" === e && (e = "."), (e = e.replace(/\/$/, "")); + for (var r = 0; 0 !== t.indexOf(e + "/"); ) { + var n = e.lastIndexOf("/"); + if (n < 0) return t; + if ((e = e.slice(0, n)).match(/^([^\/]+:\/)?\/*$/)) return t; + ++r; + } + return Array(r + 1).join("../") + t.substr(e.length + 1); + }); + var a = !("__proto__" in Object.create(null)); + function l(e) { + return e; + } + function c(e) { + if (!e) return !1; + var t = e.length; + if (t < 9) return !1; + if ( + 95 !== e.charCodeAt(t - 1) || + 95 !== e.charCodeAt(t - 2) || + 111 !== e.charCodeAt(t - 3) || + 116 !== e.charCodeAt(t - 4) || + 111 !== e.charCodeAt(t - 5) || + 114 !== e.charCodeAt(t - 6) || + 112 !== e.charCodeAt(t - 7) || + 95 !== e.charCodeAt(t - 8) || + 95 !== e.charCodeAt(t - 9) + ) + return !1; + for (var r = t - 10; r >= 0; r--) + if (36 !== e.charCodeAt(r)) return !1; + return !0; + } + function u(e, t) { + return e === t ? 0 : e > t ? 1 : -1; + } + (t.toSetString = a + ? l + : function (e) { + return c(e) ? "$" + e : e; + }), + (t.fromSetString = a + ? l + : function (e) { + return c(e) ? e.slice(1) : e; + }), + (t.compareByOriginalPositions = function (e, t, r) { + var n = e.source - t.source; + return 0 !== n || + 0 != (n = e.originalLine - t.originalLine) || + 0 != (n = e.originalColumn - t.originalColumn) || + r || + 0 != (n = e.generatedColumn - t.generatedColumn) || + 0 != (n = e.generatedLine - t.generatedLine) + ? n + : e.name - t.name; + }), + (t.compareByGeneratedPositionsDeflated = function (e, t, r) { + var n = e.generatedLine - t.generatedLine; + return 0 !== n || + 0 != (n = e.generatedColumn - t.generatedColumn) || + r || + 0 != (n = e.source - t.source) || + 0 != (n = e.originalLine - t.originalLine) || + 0 != (n = e.originalColumn - t.originalColumn) + ? n + : e.name - t.name; + }), + (t.compareByGeneratedPositionsInflated = function (e, t) { + var r = e.generatedLine - t.generatedLine; + return 0 !== r || + 0 != (r = e.generatedColumn - t.generatedColumn) || + 0 !== (r = u(e.source, t.source)) || + 0 != (r = e.originalLine - t.originalLine) || + 0 != (r = e.originalColumn - t.originalColumn) + ? r + : u(e.name, t.name); + }); + }, + 6947: (e, t, r) => { + r(9947).h, (t.SourceMapConsumer = r(5600).SourceMapConsumer), r(4047); + }, + 9037: (e, t) => { + function r(e) { + for (var t in e) this[t] = e[t]; + } + (t.get = function (e) { + var r = Error.stackTraceLimit; + Error.stackTraceLimit = 1 / 0; + var n = {}, + o = Error.prepareStackTrace; + (Error.prepareStackTrace = function (e, t) { + return t; + }), + Error.captureStackTrace(n, e || t.get); + var i = n.stack; + return (Error.prepareStackTrace = o), (Error.stackTraceLimit = r), i; + }), + (t.parse = function (e) { + if (!e.stack) return []; + var t = this; + return e.stack + .split("\n") + .slice(1) + .map(function (e) { + if (e.match(/^\s*[-]{4,}$/)) + return t._createParsedCallSite({ + fileName: e, + lineNumber: null, + functionName: null, + typeName: null, + methodName: null, + columnNumber: null, + native: null, + }); + var r = e.match( + /at (?:(.+)\s+\()?(?:(.+?):(\d+)(?::(\d+))?|([^)]+))\)?/ + ); + if (r) { + var n = null, + o = null, + i = null, + s = null, + a = null, + l = "native" === r[5]; + if (r[1]) { + var c = (i = r[1]).lastIndexOf("."); + if (("." == i[c - 1] && c--, c > 0)) { + (n = i.substr(0, c)), (o = i.substr(c + 1)); + var u = n.indexOf(".Module"); + u > 0 && ((i = i.substr(u + 1)), (n = n.substr(0, u))); + } + s = null; + } + o && ((s = n), (a = o)), + "" === o && ((a = null), (i = null)); + var d = { + fileName: r[2] || null, + lineNumber: parseInt(r[3], 10) || null, + functionName: i, + typeName: s, + methodName: a, + columnNumber: parseInt(r[4], 10) || null, + native: l, + }; + return t._createParsedCallSite(d); + } + }) + .filter(function (e) { + return !!e; + }); + }), + [ + "this", + "typeName", + "functionName", + "methodName", + "fileName", + "lineNumber", + "columnNumber", + "function", + "evalOrigin", + ].forEach(function (e) { + (r.prototype[e] = null), + (r.prototype["get" + e[0].toUpperCase() + e.substr(1)] = + function () { + return this[e]; + }); + }), + ["topLevel", "eval", "native", "constructor"].forEach(function (e) { + (r.prototype[e] = !1), + (r.prototype["is" + e[0].toUpperCase() + e.substr(1)] = + function () { + return this[e]; + }); + }), + (t._createParsedCallSite = function (e) { + return new r(e); + }); + }, + 3976: (e, t, r) => { + "use strict"; + var n = r(496).Buffer, + o = + n.isEncoding || + function (e) { + switch ((e = "" + e) && e.toLowerCase()) { + case "hex": + case "utf8": + case "utf-8": + case "ascii": + case "binary": + case "base64": + case "ucs2": + case "ucs-2": + case "utf16le": + case "utf-16le": + case "raw": + return !0; + default: + return !1; + } + }; + function i(e) { + var t; + switch ( + ((this.encoding = (function (e) { + var t = (function (e) { + if (!e) return "utf8"; + for (var t; ; ) + switch (e) { + case "utf8": + case "utf-8": + return "utf8"; + case "ucs2": + case "ucs-2": + case "utf16le": + case "utf-16le": + return "utf16le"; + case "latin1": + case "binary": + return "latin1"; + case "base64": + case "ascii": + case "hex": + return e; + default: + if (t) return; + (e = ("" + e).toLowerCase()), (t = !0); + } + })(e); + if ("string" != typeof t && (n.isEncoding === o || !o(e))) + throw new Error("Unknown encoding: " + e); + return t || e; + })(e)), + this.encoding) + ) { + case "utf16le": + (this.text = l), (this.end = c), (t = 4); + break; + case "utf8": + (this.fillLast = a), (t = 4); + break; + case "base64": + (this.text = u), (this.end = d), (t = 3); + break; + default: + return (this.write = f), void (this.end = h); + } + (this.lastNeed = 0), + (this.lastTotal = 0), + (this.lastChar = n.allocUnsafe(t)); + } + function s(e) { + return e <= 127 + ? 0 + : e >> 5 == 6 + ? 2 + : e >> 4 == 14 + ? 3 + : e >> 3 == 30 + ? 4 + : e >> 6 == 2 + ? -1 + : -2; + } + function a(e) { + var t = this.lastTotal - this.lastNeed, + r = (function (e, t, r) { + if (128 != (192 & t[0])) return (e.lastNeed = 0), "�"; + if (e.lastNeed > 1 && t.length > 1) { + if (128 != (192 & t[1])) return (e.lastNeed = 1), "�"; + if (e.lastNeed > 2 && t.length > 2 && 128 != (192 & t[2])) + return (e.lastNeed = 2), "�"; + } + })(this, e); + return void 0 !== r + ? r + : this.lastNeed <= e.length + ? (e.copy(this.lastChar, t, 0, this.lastNeed), + this.lastChar.toString(this.encoding, 0, this.lastTotal)) + : (e.copy(this.lastChar, t, 0, e.length), + void (this.lastNeed -= e.length)); + } + function l(e, t) { + if ((e.length - t) % 2 == 0) { + var r = e.toString("utf16le", t); + if (r) { + var n = r.charCodeAt(r.length - 1); + if (n >= 55296 && n <= 56319) + return ( + (this.lastNeed = 2), + (this.lastTotal = 4), + (this.lastChar[0] = e[e.length - 2]), + (this.lastChar[1] = e[e.length - 1]), + r.slice(0, -1) + ); + } + return r; + } + return ( + (this.lastNeed = 1), + (this.lastTotal = 2), + (this.lastChar[0] = e[e.length - 1]), + e.toString("utf16le", t, e.length - 1) + ); + } + function c(e) { + var t = e && e.length ? this.write(e) : ""; + if (this.lastNeed) { + var r = this.lastTotal - this.lastNeed; + return t + this.lastChar.toString("utf16le", 0, r); + } + return t; + } + function u(e, t) { + var r = (e.length - t) % 3; + return 0 === r + ? e.toString("base64", t) + : ((this.lastNeed = 3 - r), + (this.lastTotal = 3), + 1 === r + ? (this.lastChar[0] = e[e.length - 1]) + : ((this.lastChar[0] = e[e.length - 2]), + (this.lastChar[1] = e[e.length - 1])), + e.toString("base64", t, e.length - r)); + } + function d(e) { + var t = e && e.length ? this.write(e) : ""; + return this.lastNeed + ? t + this.lastChar.toString("base64", 0, 3 - this.lastNeed) + : t; + } + function f(e) { + return e.toString(this.encoding); + } + function h(e) { + return e && e.length ? this.write(e) : ""; + } + (t.s = i), + (i.prototype.write = function (e) { + if (0 === e.length) return ""; + var t, r; + if (this.lastNeed) { + if (void 0 === (t = this.fillLast(e))) return ""; + (r = this.lastNeed), (this.lastNeed = 0); + } else r = 0; + return r < e.length + ? t + ? t + this.text(e, r) + : this.text(e, r) + : t || ""; + }), + (i.prototype.end = function (e) { + var t = e && e.length ? this.write(e) : ""; + return this.lastNeed ? t + "�" : t; + }), + (i.prototype.text = function (e, t) { + var r = (function (e, t, r) { + var n = t.length - 1; + if (n < r) return 0; + var o = s(t[n]); + return o >= 0 + ? (o > 0 && (e.lastNeed = o - 1), o) + : --n < r || -2 === o + ? 0 + : (o = s(t[n])) >= 0 + ? (o > 0 && (e.lastNeed = o - 2), o) + : --n < r || -2 === o + ? 0 + : (o = s(t[n])) >= 0 + ? (o > 0 && (2 === o ? (o = 0) : (e.lastNeed = o - 3)), o) + : 0; + })(this, e, t); + if (!this.lastNeed) return e.toString("utf8", t); + this.lastTotal = r; + var n = e.length - (r - this.lastNeed); + return e.copy(this.lastChar, 0, n), e.toString("utf8", t, n); + }), + (i.prototype.fillLast = function (e) { + if (this.lastNeed <= e.length) + return ( + e.copy( + this.lastChar, + this.lastTotal - this.lastNeed, + 0, + this.lastNeed + ), + this.lastChar.toString(this.encoding, 0, this.lastTotal) + ); + e.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, e.length), + (this.lastNeed -= e.length); + }); + }, + 496: (e, t, r) => { + var n = r(4300), + o = n.Buffer; + function i(e, t) { + for (var r in e) t[r] = e[r]; + } + function s(e, t, r) { + return o(e, t, r); + } + o.from && o.alloc && o.allocUnsafe && o.allocUnsafeSlow + ? (e.exports = n) + : (i(n, t), (t.Buffer = s)), + (s.prototype = Object.create(o.prototype)), + i(o, s), + (s.from = function (e, t, r) { + if ("number" == typeof e) + throw new TypeError("Argument must not be a number"); + return o(e, t, r); + }), + (s.alloc = function (e, t, r) { + if ("number" != typeof e) + throw new TypeError("Argument must be a number"); + var n = o(e); + return ( + void 0 !== t + ? "string" == typeof r + ? n.fill(t, r) + : n.fill(t) + : n.fill(0), + n + ); + }), + (s.allocUnsafe = function (e) { + if ("number" != typeof e) + throw new TypeError("Argument must be a number"); + return o(e); + }), + (s.allocUnsafeSlow = function (e) { + if ("number" != typeof e) + throw new TypeError("Argument must be a number"); + return n.SlowBuffer(e); + }); + }, + 6097: (e) => { + "use strict"; + e.exports = function (e) { + var t = "string" == typeof e ? "\n" : "\n".charCodeAt(), + r = "string" == typeof e ? "\r" : "\r".charCodeAt(); + return ( + e[e.length - 1] === t && (e = e.slice(0, e.length - 1)), + e[e.length - 1] === r && (e = e.slice(0, e.length - 1)), + e + ); + }; + }, + 3812: (e, t) => { + "use strict"; + (t.levels = { + error: 0, + warn: 1, + help: 2, + data: 3, + info: 4, + debug: 5, + prompt: 6, + verbose: 7, + input: 8, + silly: 9, + }), + (t.colors = { + error: "red", + warn: "yellow", + help: "cyan", + data: "grey", + info: "green", + debug: "blue", + prompt: "grey", + verbose: "cyan", + input: "grey", + silly: "magenta", + }); + }, + 2343: (e, t, r) => { + "use strict"; + Object.defineProperty(t, "cli", { value: r(3812) }), + Object.defineProperty(t, "npm", { value: r(5609) }), + Object.defineProperty(t, "syslog", { value: r(330) }); + }, + 5609: (e, t) => { + "use strict"; + (t.levels = { + error: 0, + warn: 1, + info: 2, + http: 3, + verbose: 4, + debug: 5, + silly: 6, + }), + (t.colors = { + error: "red", + warn: "yellow", + info: "green", + http: "green", + verbose: "cyan", + debug: "blue", + silly: "magenta", + }); + }, + 330: (e, t) => { + "use strict"; + (t.levels = { + emerg: 0, + alert: 1, + crit: 2, + error: 3, + warning: 4, + notice: 5, + info: 6, + debug: 7, + }), + (t.colors = { + emerg: "red", + alert: "yellow", + crit: "red", + error: "red", + warning: "red", + notice: "yellow", + info: "green", + debug: "blue", + }); + }, + 7286: (e, t, r) => { + "use strict"; + Object.defineProperty(t, "LEVEL", { value: Symbol.for("level") }), + Object.defineProperty(t, "MESSAGE", { value: Symbol.for("message") }), + Object.defineProperty(t, "SPLAT", { value: Symbol.for("splat") }), + Object.defineProperty(t, "configs", { value: r(2343) }); + }, + 4515: (e, t, r) => { + "use strict"; + const n = r(2037), + o = r(8734), + i = r(2878), + s = () => { + const { env: e } = process; + return ( + e.SUDO_USER || + e.C9_USER || + e.LOGNAME || + e.USER || + e.LNAME || + e.USERNAME + ); + }, + a = () => { + try { + return n.userInfo().username; + } catch (e) {} + }, + l = (e) => e.replace(/^.*\\/, ""); + (e.exports = i(async () => { + const e = s(); + if (e) return e; + const t = a(); + if (t) return t; + try { + return l(await o.stdout("whoami")); + } catch (e) {} + })), + (e.exports.sync = i(() => { + const e = s(); + if (e) return e; + const t = a(); + if (t) return t; + try { + return l(o.sync("whoami").stdout); + } catch (e) {} + })); + }, + 5902: (e, t, r) => { + e.exports = r(3837).deprecate; + }, + 1875: (e) => { + for (var t = [], r = 0; r < 256; ++r) + t[r] = (r + 256).toString(16).substr(1); + e.exports = function (e, r) { + var n = r || 0, + o = t; + return ( + o[e[n++]] + + o[e[n++]] + + o[e[n++]] + + o[e[n++]] + + "-" + + o[e[n++]] + + o[e[n++]] + + "-" + + o[e[n++]] + + o[e[n++]] + + "-" + + o[e[n++]] + + o[e[n++]] + + "-" + + o[e[n++]] + + o[e[n++]] + + o[e[n++]] + + o[e[n++]] + + o[e[n++]] + + o[e[n++]] + ); + }; + }, + 1479: (e, t, r) => { + var n = r(6113).randomBytes; + e.exports = function () { + return n(16); + }; + }, + 4790: (e, t, r) => { + var n = r(1479), + o = r(1875); + e.exports = function (e, t, r) { + var i = (t && r) || 0; + "string" == typeof e && + ((t = "binary" == e ? new Array(16) : null), (e = null)); + var s = (e = e || {}).random || (e.rng || n)(); + if (((s[6] = (15 & s[6]) | 64), (s[8] = (63 & s[8]) | 128), t)) + for (var a = 0; a < 16; ++a) t[i + a] = s[a]; + return t || o(s); + }; + }, + 9891: (e, t, r) => { + (e.exports = a), + (a.sync = function (e, t) { + for ( + var r = s(e, (t = t || {})), + a = r.env, + l = r.ext, + c = r.extExe, + u = [], + d = 0, + f = a.length; + d < f; + d++ + ) { + var h = a[d]; + '"' === h.charAt(0) && + '"' === h.slice(-1) && + (h = h.slice(1, -1)); + var p = n.join(h, e); + !h && /^\.[\\\/]/.test(e) && (p = e.slice(0, 2) + p); + for (var m = 0, g = l.length; m < g; m++) { + var v = p + l[m]; + try { + if (o.sync(v, { pathExt: c })) { + if (!t.all) return v; + u.push(v); + } + } catch (e) {} + } + } + if (t.all && u.length) return u; + if (t.nothrow) return null; + throw i(e); + }); + var n = r(1017), + o = r(557); + function i(e) { + var t = new Error("not found: " + e); + return (t.code = "ENOENT"), t; + } + function s(e, t) { + var r = t.colon || ";", + n = t.path || process.env.PATH || "", + o = [""], + i = ""; + return ( + (n = n.split(r)).unshift(process.cwd()), + (o = (i = + t.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM").split( + r + )), + -1 !== e.indexOf(".") && "" !== o[0] && o.unshift(""), + (e.match(/\//) || e.match(/\\/)) && (n = [""]), + { env: n, ext: o, extExe: i } + ); + } + function a(e, t, r) { + "function" == typeof t && ((r = t), (t = {})); + var a = s(e, t), + l = a.env, + c = a.ext, + u = a.extExe, + d = []; + !(function s(a, f) { + if (a === f) return t.all && d.length ? r(null, d) : r(i(e)); + var h = l[a]; + '"' === h.charAt(0) && '"' === h.slice(-1) && (h = h.slice(1, -1)); + var p = n.join(h, e); + !h && /^\.[\\\/]/.test(e) && (p = e.slice(0, 2) + p), + (function e(n, i) { + if (n === i) return s(a + 1, f); + var l = c[n]; + o(p + l, { pathExt: u }, function (o, s) { + if (!o && s) { + if (!t.all) return r(null, p + l); + d.push(p + l); + } + return e(n + 1, i); + }); + })(0, c.length); + })(0, l.length); + } + }, + 5496: (e, t, r) => { + "use strict"; + const n = r(3837), + o = r(1739), + { LEVEL: i } = r(7286), + s = (e.exports = function (e = {}) { + o.call(this, { objectMode: !0, highWaterMark: e.highWaterMark }), + (this.format = e.format), + (this.level = e.level), + (this.handleExceptions = e.handleExceptions), + (this.handleRejections = e.handleRejections), + (this.silent = e.silent), + e.log && (this.log = e.log), + e.logv && (this.logv = e.logv), + e.close && (this.close = e.close), + this.once("pipe", (e) => { + (this.levels = e.levels), (this.parent = e); + }), + this.once("unpipe", (e) => { + e === this.parent && + ((this.parent = null), this.close && this.close()); + }); + }); + n.inherits(s, o), + (s.prototype._write = function (e, t, r) { + if (this.silent || (!0 === e.exception && !this.handleExceptions)) + return r(null); + const n = this.level || (this.parent && this.parent.level); + if (!n || this.levels[n] >= this.levels[e[i]]) { + if (e && !this.format) return this.log(e, r); + let t, n; + try { + n = this.format.transform( + Object.assign({}, e), + this.format.options + ); + } catch (e) { + t = e; + } + if (t || !n) { + if ((r(), t)) throw t; + return; + } + return this.log(n, r); + } + return (this._writableState.sync = !1), r(null); + }), + (s.prototype._writev = function (e, t) { + if (this.logv) { + const r = e.filter(this._accept, this); + return r.length ? this.logv(r, t) : t(null); + } + for (let r = 0; r < e.length; r++) { + if (!this._accept(e[r])) continue; + if (e[r].chunk && !this.format) { + this.log(e[r].chunk, e[r].callback); + continue; + } + let n, o; + try { + o = this.format.transform( + Object.assign({}, e[r].chunk), + this.format.options + ); + } catch (e) { + n = e; + } + if (n || !o) { + if ((e[r].callback(), n)) throw (t(null), n); + } else this.log(o, e[r].callback); + } + return t(null); + }), + (s.prototype._accept = function (e) { + const t = e.chunk; + if (this.silent) return !1; + const r = this.level || (this.parent && this.parent.level); + return !( + (!0 !== t.exception && + r && + !(this.levels[r] >= this.levels[t[i]])) || + (!this.handleExceptions && !0 === t.exception) + ); + }), + (s.prototype._nop = function () {}), + (e.exports.LegacyTransportStream = r(6420)); + }, + 6420: (e, t, r) => { + "use strict"; + const n = r(3837), + { LEVEL: o } = r(7286), + i = r(5496), + s = (e.exports = function (e = {}) { + if ( + (i.call(this, e), + !e.transport || "function" != typeof e.transport.log) + ) + throw new Error( + "Invalid transport, must be an object with a log method." + ); + (this.transport = e.transport), + (this.level = this.level || e.transport.level), + (this.handleExceptions = + this.handleExceptions || e.transport.handleExceptions), + this._deprecated(), + this.transport.__winstonError || + ((this.transport.__winstonError = function (e) { + this.emit("error", e, this.transport); + }.bind(this)), + this.transport.on("error", this.transport.__winstonError)); + }); + n.inherits(s, i), + (s.prototype._write = function (e, t, r) { + if (this.silent || (!0 === e.exception && !this.handleExceptions)) + return r(null); + (!this.level || this.levels[this.level] >= this.levels[e[o]]) && + this.transport.log(e[o], e.message, e, this._nop), + r(null); + }), + (s.prototype._writev = function (e, t) { + for (let t = 0; t < e.length; t++) + this._accept(e[t]) && + (this.transport.log( + e[t].chunk[o], + e[t].chunk.message, + e[t].chunk, + this._nop + ), + e[t].callback()); + return t(null); + }), + (s.prototype._deprecated = function () { + console.error( + [ + `${this.transport.name} is a legacy winston transport. Consider upgrading: `, + "- Upgrade docs: https://github.com/winstonjs/winston/blob/master/UPGRADE-3.0.md", + ].join("\n") + ); + }), + (s.prototype.close = function () { + this.transport.close && this.transport.close(), + this.transport.__winstonError && + (this.transport.removeListener( + "error", + this.transport.__winstonError + ), + (this.transport.__winstonError = null)); + }); + }, + 5067: (e, t, r) => { + "use strict"; + const n = r(3252), + { warn: o } = r(3325); + (t.version = r(9770).version), + (t.transports = r(3830)), + (t.config = r(8659)), + (t.addColors = n.levels), + (t.format = n.format), + (t.createLogger = r(8677)), + (t.ExceptionHandler = r(2807)), + (t.RejectionHandler = r(7490)), + (t.Container = r(6473)), + (t.Transport = r(5496)), + (t.loggers = new t.Container()); + const i = t.createLogger(); + Object.keys(t.config.npm.levels) + .concat([ + "log", + "query", + "stream", + "add", + "remove", + "clear", + "profile", + "startTimer", + "handleExceptions", + "unhandleExceptions", + "handleRejections", + "unhandleRejections", + "configure", + "child", + ]) + .forEach((e) => (t[e] = (...t) => i[e](...t))), + Object.defineProperty(t, "level", { + get: () => i.level, + set(e) { + i.level = e; + }, + }), + Object.defineProperty(t, "exceptions", { get: () => i.exceptions }), + ["exitOnError"].forEach((e) => { + Object.defineProperty(t, e, { + get: () => i[e], + set(t) { + i[e] = t; + }, + }); + }), + Object.defineProperty(t, "default", { + get: () => ({ + exceptionHandlers: i.exceptionHandlers, + rejectionHandlers: i.rejectionHandlers, + transports: i.transports, + }), + }), + o.deprecated(t, "setLevels"), + o.forFunctions(t, "useFormat", ["cli"]), + o.forProperties(t, "useFormat", ["padLevels", "stripColors"]), + o.forFunctions(t, "deprecated", [ + "addRewriter", + "addFilter", + "clone", + "extend", + ]), + o.forProperties(t, "deprecated", ["emitErrs", "levelLength"]), + o.moved(t, "createLogger", "Logger"); + }, + 3325: (e, t, r) => { + "use strict"; + const { format: n } = r(3837); + t.warn = { + deprecated: (e) => () => { + throw new Error(n("{ %s } was removed in winston@3.0.0.", e)); + }, + useFormat: (e) => () => { + throw new Error( + [ + n("{ %s } was removed in winston@3.0.0.", e), + "Use a custom winston.format = winston.format(function) instead.", + ].join("\n") + ); + }, + forFunctions(e, r, n) { + n.forEach((n) => { + e[n] = t.warn[r](n); + }); + }, + moved(e, t, r) { + function o() { + return () => { + throw new Error( + [ + n("winston.%s was moved in winston@3.0.0.", r), + n("Use a winston.%s instead.", t), + ].join("\n") + ); + }; + } + Object.defineProperty(e, r, { get: o, set: o }); + }, + forProperties(e, r, n) { + n.forEach((n) => { + const o = t.warn[r](n); + Object.defineProperty(e, n, { get: o, set: o }); + }); + }, + }; + }, + 8659: (e, t, r) => { + "use strict"; + const n = r(3252), + { configs: o } = r(7286); + (t.cli = n.levels(o.cli)), + (t.npm = n.levels(o.npm)), + (t.syslog = n.levels(o.syslog)), + (t.addColors = n.levels); + }, + 6473: (e, t, r) => { + "use strict"; + const n = r(8677); + e.exports = class { + constructor(e = {}) { + (this.loggers = new Map()), (this.options = e); + } + add(e, t) { + if (!this.loggers.has(e)) { + const r = + (t = Object.assign({}, t || this.options)).transports || + this.options.transports; + t.transports = r ? r.slice() : []; + const o = n(t); + o.on("close", () => this._delete(e)), this.loggers.set(e, o); + } + return this.loggers.get(e); + } + get(e, t) { + return this.add(e, t); + } + has(e) { + return !!this.loggers.has(e); + } + close(e) { + if (e) return this._removeLogger(e); + this.loggers.forEach((e, t) => this._removeLogger(t)); + } + _removeLogger(e) { + this.loggers.has(e) && + (this.loggers.get(e).close(), this._delete(e)); + } + _delete(e) { + this.loggers.delete(e); + } + }; + }, + 8677: (e, t, r) => { + "use strict"; + const { LEVEL: n } = r(7286), + o = r(8659), + i = r(8438), + s = r(9256)("winston:create-logger"); + e.exports = function (e = {}) { + e.levels = e.levels || o.npm.levels; + class t extends i { + constructor(e) { + super(e); + } + } + const r = new t(e); + return ( + Object.keys(e.levels).forEach(function (e) { + s('Define prototype method for "%s"', e), + "log" !== e + ? ((t.prototype[e] = function (...t) { + const o = this || r; + if (1 === t.length) { + const [i] = t, + s = (i && i.message && i) || { message: i }; + return ( + (s.level = s[n] = e), + o._addDefaultMeta(s), + o.write(s), + this || r + ); + } + return 0 === t.length + ? (o.log(e, ""), o) + : o.log(e, ...t); + }), + (t.prototype[ + (function (e) { + return ( + "is" + + e.charAt(0).toUpperCase() + + e.slice(1) + + "Enabled" + ); + })(e) + ] = function () { + return (this || r).isLevelEnabled(e); + })) + : console.warn( + 'Level "log" not defined: conflicts with the method "log". Use a different level name.' + ); + }), + r + ); + }; + }, + 2807: (e, t, r) => { + "use strict"; + const n = r(2037), + o = r(9508), + i = r(9256)("winston:exception"), + s = r(7004), + a = r(9037), + l = r(6573); + e.exports = class { + constructor(e) { + if (!e) throw new Error("Logger is required to handle exceptions"); + (this.logger = e), (this.handlers = new Map()); + } + handle(...e) { + e.forEach((e) => { + if (Array.isArray(e)) + return e.forEach((e) => this._addHandler(e)); + this._addHandler(e); + }), + this.catcher || + ((this.catcher = this._uncaughtException.bind(this)), + process.on("uncaughtException", this.catcher)); + } + unhandle() { + this.catcher && + (process.removeListener("uncaughtException", this.catcher), + (this.catcher = !1), + Array.from(this.handlers.values()).forEach((e) => + this.logger.unpipe(e) + )); + } + getAllInfo(e) { + let { message: t } = e; + return ( + t || "string" != typeof e || (t = e), + { + error: e, + level: "error", + message: [ + `uncaughtException: ${t || "(no error message)"}`, + e.stack || " No stack trace", + ].join("\n"), + stack: e.stack, + exception: !0, + date: new Date().toString(), + process: this.getProcessInfo(), + os: this.getOsInfo(), + trace: this.getTrace(e), + } + ); + } + getProcessInfo() { + return { + pid: process.pid, + uid: process.getuid ? process.getuid() : null, + gid: process.getgid ? process.getgid() : null, + cwd: process.cwd(), + execPath: process.execPath, + version: process.version, + argv: process.argv, + memoryUsage: process.memoryUsage(), + }; + } + getOsInfo() { + return { loadavg: n.loadavg(), uptime: n.uptime() }; + } + getTrace(e) { + return (e ? a.parse(e) : a.get()).map((e) => ({ + column: e.getColumnNumber(), + file: e.getFileName(), + function: e.getFunctionName(), + line: e.getLineNumber(), + method: e.getMethodName(), + native: e.isNative(), + })); + } + _addHandler(e) { + if (!this.handlers.has(e)) { + e.handleExceptions = !0; + const t = new l(e); + this.handlers.set(e, t), this.logger.pipe(t); + } + } + _uncaughtException(e) { + const t = this.getAllInfo(e), + r = this._getExceptionHandlers(); + let n, + a = + "function" == typeof this.logger.exitOnError + ? this.logger.exitOnError(e) + : this.logger.exitOnError; + function l() { + i("doExit", a), + i("process._exiting", process._exiting), + a && + !process._exiting && + (n && clearTimeout(n), process.exit(1)); + } + if ( + (!r.length && + a && + (console.warn( + "winston: exitOnError cannot be true with no exception handlers." + ), + console.warn("winston: not exiting process."), + (a = !1)), + !r || 0 === r.length) + ) + return process.nextTick(l); + o( + r, + (e, t) => { + const r = s(t), + n = e.transport || e; + function o(e) { + return () => { + i(e), r(); + }; + } + (n._ending = !0), + n.once("finish", o("finished")), + n.once("error", o("error")); + }, + () => a && l() + ), + this.logger.log(t), + a && (n = setTimeout(l, 3e3)); + } + _getExceptionHandlers() { + return this.logger.transports.filter( + (e) => (e.transport || e).handleExceptions + ); + } + }; + }, + 6573: (e, t, r) => { + "use strict"; + const { Writable: n } = r(6207); + e.exports = class extends n { + constructor(e) { + if ((super({ objectMode: !0 }), !e)) + throw new Error( + "ExceptionStream requires a TransportStream instance." + ); + (this.handleExceptions = !0), (this.transport = e); + } + _write(e, t, r) { + return e.exception ? this.transport.log(e, r) : (r(), !0); + } + }; + }, + 8438: (e, t, r) => { + "use strict"; + const { Stream: n, Transform: o } = r(6207), + i = r(9508), + { LEVEL: s, SPLAT: a } = r(7286), + l = r(818), + c = r(2807), + u = r(7490), + d = r(6420), + f = r(8335), + { warn: h } = r(3325), + p = r(8659), + m = /%[scdjifoO%]/g; + class g extends o { + constructor(e) { + super({ objectMode: !0 }), this.configure(e); + } + child(e) { + const t = this; + return Object.create(t, { + write: { + value: function (r) { + const n = Object.assign({}, e, r); + r instanceof Error && + ((n.stack = r.stack), (n.message = r.message)), + t.write(n); + }, + }, + }); + } + configure({ + silent: e, + format: t, + defaultMeta: n, + levels: o, + level: i = "info", + exitOnError: s = !0, + transports: a, + colors: l, + emitErrs: d, + formatters: f, + padLevels: h, + rewriters: m, + stripColors: g, + exceptionHandlers: v, + rejectionHandlers: y, + } = {}) { + if ( + (this.transports.length && this.clear(), + (this.silent = e), + (this.format = t || this.format || r(5242)()), + (this.defaultMeta = n || null), + (this.levels = o || this.levels || p.npm.levels), + (this.level = i), + this.exceptions && this.exceptions.unhandle(), + this.rejections && this.rejections.unhandle(), + (this.exceptions = new c(this)), + (this.rejections = new u(this)), + (this.profilers = {}), + (this.exitOnError = s), + a && (a = Array.isArray(a) ? a : [a]).forEach((e) => this.add(e)), + l || d || f || h || m || g) + ) + throw new Error( + [ + "{ colors, emitErrs, formatters, padLevels, rewriters, stripColors } were removed in winston@3.0.0.", + "Use a custom winston.format(function) instead.", + "See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md", + ].join("\n") + ); + v && this.exceptions.handle(v), y && this.rejections.handle(y); + } + isLevelEnabled(e) { + const t = v(this.levels, e); + if (null === t) return !1; + const r = v(this.levels, this.level); + return ( + null !== r && + (this.transports && 0 !== this.transports.length + ? -1 !== + this.transports.findIndex((e) => { + let n = v(this.levels, e.level); + return null === n && (n = r), n >= t; + }) + : r >= t) + ); + } + log(e, t, ...r) { + if (1 === arguments.length) + return ( + (e[s] = e.level), this._addDefaultMeta(e), this.write(e), this + ); + if (2 === arguments.length) + return t && "object" == typeof t + ? ((t[s] = t.level = e), + this._addDefaultMeta(t), + this.write(t), + this) + : ((t = { [s]: e, level: e, message: t }), + this._addDefaultMeta(t), + this.write(t), + this); + const [n] = r; + if ( + "object" == typeof n && + null !== n && + !(t && t.match && t.match(m)) + ) { + const o = Object.assign({}, this.defaultMeta, n, { + [s]: e, + [a]: r, + level: e, + message: t, + }); + return ( + n.message && (o.message = `${o.message} ${n.message}`), + n.stack && (o.stack = n.stack), + this.write(o), + this + ); + } + return ( + this.write( + Object.assign({}, this.defaultMeta, { + [s]: e, + [a]: r, + level: e, + message: t, + }) + ), + this + ); + } + _transform(e, t, r) { + if (this.silent) return r(); + e[s] || (e[s] = e.level), + this.levels[e[s]] || + 0 === this.levels[e[s]] || + console.error("[winston] Unknown logger level: %s", e[s]), + this._readableState.pipes || + console.error( + "[winston] Attempt to write logs with no transports %j", + e + ); + try { + this.push(this.format.transform(e, this.format.options)); + } finally { + (this._writableState.sync = !1), r(); + } + } + _final(e) { + const t = this.transports.slice(); + i( + t, + (e, t) => { + if (!e || e.finished) return setImmediate(t); + e.once("finish", t), e.end(); + }, + e + ); + } + add(e) { + const t = !l(e) || e.log.length > 2 ? new d({ transport: e }) : e; + if (!t._writableState || !t._writableState.objectMode) + throw new Error( + "Transports must WritableStreams in objectMode. Set { objectMode: true }." + ); + return ( + this._onEvent("error", t), + this._onEvent("warn", t), + this.pipe(t), + e.handleExceptions && this.exceptions.handle(), + e.handleRejections && this.rejections.handle(), + this + ); + } + remove(e) { + if (!e) return this; + let t = e; + return ( + (!l(e) || e.log.length > 2) && + (t = this.transports.filter((t) => t.transport === e)[0]), + t && this.unpipe(t), + this + ); + } + clear() { + return this.unpipe(), this; + } + close() { + return ( + this.exceptions.unhandle(), + this.rejections.unhandle(), + this.clear(), + this.emit("close"), + this + ); + } + setLevels() { + h.deprecated("setLevels"); + } + query(e, t) { + "function" == typeof e && ((t = e), (e = {})), (e = e || {}); + const r = {}, + n = Object.assign({}, e.query || {}); + i( + this.transports.filter((e) => !!e.query), + function (t, o) { + !(function (t, r) { + e.query && + "function" == typeof t.formatQuery && + (e.query = t.formatQuery(n)), + t.query(e, (n, o) => { + if (n) return r(n); + "function" == typeof t.formatResults && + (o = t.formatResults(o, e.format)), + r(null, o); + }); + })(t, (e, n) => { + o && ((n = e || n) && (r[t.name] = n), o()), (o = null); + }); + }, + () => t(null, r) + ); + } + stream(e = {}) { + const t = new n(), + r = []; + return ( + (t._streams = r), + (t.destroy = () => { + let e = r.length; + for (; e--; ) r[e].destroy(); + }), + this.transports + .filter((e) => !!e.stream) + .forEach((n) => { + const o = n.stream(e); + o && + (r.push(o), + o.on("log", (e) => { + (e.transport = e.transport || []), + e.transport.push(n.name), + t.emit("log", e); + }), + o.on("error", (e) => { + (e.transport = e.transport || []), + e.transport.push(n.name), + t.emit("error", e); + })); + }), + t + ); + } + startTimer() { + return new f(this); + } + profile(e, ...t) { + const r = Date.now(); + if (this.profilers[e]) { + const n = this.profilers[e]; + delete this.profilers[e], + "function" == typeof t[t.length - 2] && + (console.warn( + "Callback function no longer supported as of winston@3.0.0" + ), + t.pop()); + const o = "object" == typeof t[t.length - 1] ? t.pop() : {}; + return ( + (o.level = o.level || "info"), + (o.durationMs = r - n), + (o.message = o.message || e), + this.write(o) + ); + } + return (this.profilers[e] = r), this; + } + handleExceptions(...e) { + console.warn( + "Deprecated: .handleExceptions() will be removed in winston@4. Use .exceptions.handle()" + ), + this.exceptions.handle(...e); + } + unhandleExceptions(...e) { + console.warn( + "Deprecated: .unhandleExceptions() will be removed in winston@4. Use .exceptions.unhandle()" + ), + this.exceptions.unhandle(...e); + } + cli() { + throw new Error( + [ + "Logger.cli() was removed in winston@3.0.0", + "Use a custom winston.formats.cli() instead.", + "See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md", + ].join("\n") + ); + } + _onEvent(e, t) { + t["__winston" + e] || + ((t["__winston" + e] = function (r) { + "error" !== e || this.transports.includes(t) || this.add(t), + this.emit(e, r, t); + }.bind(this)), + t.on(e, t["__winston" + e])); + } + _addDefaultMeta(e) { + this.defaultMeta && Object.assign(e, this.defaultMeta); + } + } + function v(e, t) { + const r = e[t]; + return r || 0 === r ? r : null; + } + Object.defineProperty(g.prototype, "transports", { + configurable: !1, + enumerable: !0, + get() { + const { pipes: e } = this._readableState; + return Array.isArray(e) ? e : [e].filter(Boolean); + }, + }), + (e.exports = g); + }, + 8335: (e) => { + "use strict"; + e.exports = class { + constructor(e) { + if (!e) throw new Error("Logger is required for profiling."); + (this.logger = e), (this.start = Date.now()); + } + done(...e) { + "function" == typeof e[e.length - 1] && + (console.warn( + "Callback function no longer supported as of winston@3.0.0" + ), + e.pop()); + const t = "object" == typeof e[e.length - 1] ? e.pop() : {}; + return ( + (t.level = t.level || "info"), + (t.durationMs = Date.now() - this.start), + this.logger.write(t) + ); + } + }; + }, + 7490: (e, t, r) => { + "use strict"; + const n = r(2037), + o = r(9508), + i = r(9256)("winston:rejection"), + s = r(7004), + a = r(9037), + l = r(6573); + e.exports = class { + constructor(e) { + if (!e) throw new Error("Logger is required to handle rejections"); + (this.logger = e), (this.handlers = new Map()); + } + handle(...e) { + e.forEach((e) => { + if (Array.isArray(e)) + return e.forEach((e) => this._addHandler(e)); + this._addHandler(e); + }), + this.catcher || + ((this.catcher = this._unhandledRejection.bind(this)), + process.on("unhandledRejection", this.catcher)); + } + unhandle() { + this.catcher && + (process.removeListener("unhandledRejection", this.catcher), + (this.catcher = !1), + Array.from(this.handlers.values()).forEach((e) => + this.logger.unpipe(e) + )); + } + getAllInfo(e) { + let t = null; + return ( + e && (t = "string" == typeof e ? e : e.message), + { + error: e, + level: "error", + message: [ + `unhandledRejection: ${t || "(no error message)"}`, + (e && e.stack) || " No stack trace", + ].join("\n"), + stack: e && e.stack, + exception: !0, + date: new Date().toString(), + process: this.getProcessInfo(), + os: this.getOsInfo(), + trace: this.getTrace(e), + } + ); + } + getProcessInfo() { + return { + pid: process.pid, + uid: process.getuid ? process.getuid() : null, + gid: process.getgid ? process.getgid() : null, + cwd: process.cwd(), + execPath: process.execPath, + version: process.version, + argv: process.argv, + memoryUsage: process.memoryUsage(), + }; + } + getOsInfo() { + return { loadavg: n.loadavg(), uptime: n.uptime() }; + } + getTrace(e) { + return (e ? a.parse(e) : a.get()).map((e) => ({ + column: e.getColumnNumber(), + file: e.getFileName(), + function: e.getFunctionName(), + line: e.getLineNumber(), + method: e.getMethodName(), + native: e.isNative(), + })); + } + _addHandler(e) { + if (!this.handlers.has(e)) { + e.handleRejections = !0; + const t = new l(e); + this.handlers.set(e, t), this.logger.pipe(t); + } + } + _unhandledRejection(e) { + const t = this.getAllInfo(e), + r = this._getRejectionHandlers(); + let n, + a = + "function" == typeof this.logger.exitOnError + ? this.logger.exitOnError(e) + : this.logger.exitOnError; + function l() { + i("doExit", a), + i("process._exiting", process._exiting), + a && + !process._exiting && + (n && clearTimeout(n), process.exit(1)); + } + if ( + (!r.length && + a && + (console.warn( + "winston: exitOnError cannot be true with no rejection handlers." + ), + console.warn("winston: not exiting process."), + (a = !1)), + !r || 0 === r.length) + ) + return process.nextTick(l); + o( + r, + (e, t) => { + const r = s(t), + n = e.transport || e; + function o(e) { + return () => { + i(e), r(); + }; + } + (n._ending = !0), + n.once("finish", o("finished")), + n.once("error", o("error")); + }, + () => a && l() + ), + this.logger.log(t), + a && (n = setTimeout(l, 3e3)); + } + _getRejectionHandlers() { + return this.logger.transports.filter( + (e) => (e.transport || e).handleRejections + ); + } + }; + }, + 2996: (e, t, r) => { + "use strict"; + const n = r(7147), + { StringDecoder: o } = r(1576), + { Stream: i } = r(6207); + function s() {} + e.exports = (e, t) => { + const r = Buffer.alloc(65536), + a = new o("utf8"), + l = new i(); + let c = "", + u = 0, + d = 0; + return ( + -1 === e.start && delete e.start, + (l.readable = !0), + (l.destroy = () => { + (l.destroyed = !0), l.emit("end"), l.emit("close"); + }), + n.open(e.file, "a+", "0644", (o, i) => { + if (o) return t ? t(o) : l.emit("error", o), void l.destroy(); + !(function o() { + if (!l.destroyed) + return n.read(i, r, 0, r.length, u, (n, i) => { + if (n) + return t ? t(n) : l.emit("error", n), void l.destroy(); + if (!i) + return ( + c && + ((null == e.start || d > e.start) && + (t ? t(null, c) : l.emit("line", c)), + d++, + (c = "")), + setTimeout(o, 1e3) + ); + let s = a.write(r.slice(0, i)); + t || l.emit("data", s), (s = (c + s).split(/\n+/)); + const f = s.length - 1; + let h = 0; + for (; h < f; h++) + (null == e.start || d > e.start) && + (t ? t(null, s[h]) : l.emit("line", s[h])), + d++; + return (c = s[f]), (u += i), o(); + }); + n.close(i, s); + })(); + }), + t ? l.destroy : l + ); + }; + }, + 7953: (e, t, r) => { + "use strict"; + const n = r(2037), + { LEVEL: o, MESSAGE: i } = r(7286), + s = r(5496); + e.exports = class extends s { + constructor(e = {}) { + super(e), + (this.name = e.name || "console"), + (this.stderrLevels = this._stringArrayToSet(e.stderrLevels)), + (this.consoleWarnLevels = this._stringArrayToSet( + e.consoleWarnLevels + )), + (this.eol = "string" == typeof e.eol ? e.eol : n.EOL), + this.setMaxListeners(30); + } + log(e, t) { + return ( + setImmediate(() => this.emit("logged", e)), + this.stderrLevels[e[o]] + ? (console._stderr + ? console._stderr.write(`${e[i]}${this.eol}`) + : console.error(e[i]), + void (t && t())) + : this.consoleWarnLevels[e[o]] + ? (console._stderr + ? console._stderr.write(`${e[i]}${this.eol}`) + : console.warn(e[i]), + void (t && t())) + : (console._stdout + ? console._stdout.write(`${e[i]}${this.eol}`) + : console.log(e[i]), + void (t && t())) + ); + } + _stringArrayToSet(e, t) { + if (!e) return {}; + if ( + ((t = + t || + "Cannot make set from type other than Array of string elements"), + !Array.isArray(e)) + ) + throw new Error(t); + return e.reduce((e, r) => { + if ("string" != typeof r) throw new Error(t); + return (e[r] = !0), e; + }, {}); + } + }; + }, + 6832: (e, t, r) => { + "use strict"; + const n = r(7147), + o = r(1017), + i = r(8370), + s = r(9796), + { MESSAGE: a } = r(7286), + { Stream: l, PassThrough: c } = r(6207), + u = r(5496), + d = r(9256)("winston:file"), + f = r(2037), + h = r(2996); + e.exports = class extends u { + constructor(e = {}) { + function t(t, ...r) { + r.slice(1).forEach((r) => { + if (e[r]) throw new Error(`Cannot set ${r} and ${t} together`); + }); + } + if ( + (super(e), + (this.name = e.name || "file"), + (this._stream = new c()), + this._stream.setMaxListeners(30), + (this._onError = this._onError.bind(this)), + e.filename || e.dirname) + ) + t("filename or dirname", "stream"), + (this._basename = this.filename = + e.filename ? o.basename(e.filename) : "winston.log"), + (this.dirname = e.dirname || o.dirname(e.filename)), + (this.options = e.options || { flags: "a" }); + else { + if (!e.stream) + throw new Error( + "Cannot log to file without filename or stream." + ); + console.warn( + "options.stream will be removed in winston@4. Use winston.transports.Stream" + ), + t("stream", "filename", "maxsize"), + (this._dest = this._stream.pipe(this._setupStream(e.stream))), + (this.dirname = o.dirname(this._dest.path)); + } + (this.maxsize = e.maxsize || null), + (this.rotationFormat = e.rotationFormat || !1), + (this.zippedArchive = e.zippedArchive || !1), + (this.maxFiles = e.maxFiles || null), + (this.eol = "string" == typeof e.eol ? e.eol : f.EOL), + (this.tailable = e.tailable || !1), + (this._size = 0), + (this._pendingSize = 0), + (this._created = 0), + (this._drain = !1), + (this._opening = !1), + (this._ending = !1), + this.dirname && this._createLogDirIfNotExist(this.dirname), + this.open(); + } + finishIfEnding() { + this._ending && + (this._opening + ? this.once("open", () => { + this._stream.once("finish", () => this.emit("finish")), + setImmediate(() => this._stream.end()); + }) + : (this._stream.once("finish", () => this.emit("finish")), + setImmediate(() => this._stream.end()))); + } + log(e, t = () => {}) { + if (this.silent) return t(), !0; + if (this._drain) + return void this._stream.once("drain", () => { + (this._drain = !1), this.log(e, t); + }); + if (this._rotate) + return void this._stream.once("rotate", () => { + (this._rotate = !1), this.log(e, t); + }); + const r = `${e[a]}${this.eol}`, + n = Buffer.byteLength(r); + (this._pendingSize += n), + this._opening && + !this.rotatedWhileOpening && + this._needsNewFile(this._size + this._pendingSize) && + (this.rotatedWhileOpening = !0); + const o = this._stream.write( + r, + function () { + (this._size += n), + (this._pendingSize -= n), + d("logged %s %s", this._size, r), + this.emit("logged", e), + this._opening || + (this._needsNewFile() && + ((this._rotate = !0), + this._endStream(() => this._rotateFile()))); + }.bind(this) + ); + return ( + o + ? t() + : ((this._drain = !0), + this._stream.once("drain", () => { + (this._drain = !1), t(); + })), + d("written", o, this._drain), + this.finishIfEnding(), + o + ); + } + query(e, t) { + "function" == typeof e && ((t = e), (e = {})), + (e = (function (e) { + return ( + ((e = e || {}).rows = e.rows || e.limit || 10), + (e.start = e.start || 0), + (e.until = e.until || new Date()), + "object" != typeof e.until && (e.until = new Date(e.until)), + (e.from = e.from || e.until - 864e5), + "object" != typeof e.from && (e.from = new Date(e.from)), + (e.order = e.order || "desc"), + e + ); + })(e)); + const r = o.join(this.dirname, this.filename); + let i = "", + s = [], + a = 0; + const l = n.createReadStream(r, { encoding: "utf8" }); + function c(t, r) { + try { + const r = JSON.parse(t); + (function (t) { + if (!t) return; + if ("object" != typeof t) return; + const r = new Date(t.timestamp); + return ( + !( + (e.from && r < e.from) || + (e.until && r > e.until) || + (e.level && e.level !== t.level) + ) || void 0 + ); + })(r) && + (function (t) { + e.rows && s.length >= e.rows && "desc" !== e.order + ? l.readable && l.destroy() + : (e.fields && + (t = e.fields.reduce( + (e, r) => ((e[r] = t[r]), e), + {} + )), + "desc" === e.order && s.length >= e.rows && s.shift(), + s.push(t)); + })(r); + } catch (e) { + r || l.emit("error", e); + } + } + l.on("error", (e) => { + if ((l.readable && l.destroy(), t)) + return "ENOENT" !== e.code ? t(e) : t(null, s); + }), + l.on("data", (t) => { + const r = (t = (i + t).split(/\n+/)).length - 1; + let n = 0; + for (; n < r; n++) (!e.start || a >= e.start) && c(t[n]), a++; + i = t[r]; + }), + l.on("close", () => { + i && c(i, !0), + "desc" === e.order && (s = s.reverse()), + t && t(null, s); + }); + } + stream(e = {}) { + const t = o.join(this.dirname, this.filename), + r = new l(), + n = { file: t, start: e.start }; + return ( + (r.destroy = h(n, (e, t) => { + if (e) return r.emit("error", e); + try { + r.emit("data", t), (t = JSON.parse(t)), r.emit("log", t); + } catch (e) { + r.emit("error", e); + } + })), + r + ); + } + open() { + this.filename && + (this._opening || + ((this._opening = !0), + this.stat((e, t) => { + if (e) return this.emit("error", e); + d("stat done: %s { size: %s }", this.filename, t), + (this._size = t), + (this._dest = this._createStream(this._stream)), + (this._opening = !1), + this.once("open", () => { + this._stream.eventNames().includes("rotate") + ? this._stream.emit("rotate") + : (this._rotate = !1); + }); + }))); + } + stat(e) { + const t = this._getFile(), + r = o.join(this.dirname, t); + n.stat(r, (n, o) => + n && "ENOENT" === n.code + ? (d("ENOENT ok", r), (this.filename = t), e(null, 0)) + : n + ? (d(`err ${n.code} ${r}`), e(n)) + : !o || this._needsNewFile(o.size) + ? this._incFile(() => this.stat(e)) + : ((this.filename = t), void e(null, o.size)) + ); + } + close(e) { + this._stream && + this._stream.end(() => { + e && e(), this.emit("flush"), this.emit("closed"); + }); + } + _needsNewFile(e) { + return (e = e || this._size), this.maxsize && e >= this.maxsize; + } + _onError(e) { + this.emit("error", e); + } + _setupStream(e) { + return e.on("error", this._onError), e; + } + _cleanupStream(e) { + return e.removeListener("error", this._onError), e; + } + _rotateFile() { + this._incFile(() => this.open()); + } + _endStream(e = () => {}) { + this._dest + ? (this._stream.unpipe(this._dest), + this._dest.end(() => { + this._cleanupStream(this._dest), e(); + })) + : e(); + } + _createStream(e) { + const t = o.join(this.dirname, this.filename); + d("create stream start", t, this.options); + const r = n + .createWriteStream(t, this.options) + .on("error", (e) => d(e)) + .on("close", () => d("close", r.path, r.bytesWritten)) + .on("open", () => { + d("file open ok", t), + this.emit("open", t), + e.pipe(r), + this.rotatedWhileOpening && + ((this._stream = new c()), + this._stream.setMaxListeners(30), + this._rotateFile(), + (this.rotatedWhileOpening = !1), + this._cleanupStream(r), + e.end()); + }); + if ((d("create stream ok", t), this.zippedArchive)) { + const e = s.createGzip(); + return e.pipe(r), e; + } + return r; + } + _incFile(e) { + d("_incFile", this.filename); + const t = o.extname(this._basename), + r = o.basename(this._basename, t); + this.tailable + ? this._checkMaxFilesTailable(t, r, e) + : ((this._created += 1), + this._checkMaxFilesIncrementing(t, r, e)); + } + _getFile() { + const e = o.extname(this._basename), + t = o.basename(this._basename, e), + r = this.rotationFormat ? this.rotationFormat() : this._created, + n = !this.tailable && this._created ? `${t}${r}${e}` : `${t}${e}`; + return this.zippedArchive && !this.tailable ? `${n}.gz` : n; + } + _checkMaxFilesIncrementing(e, t, r) { + if (!this.maxFiles || this._created < this.maxFiles) + return setImmediate(r); + const i = this._created - this.maxFiles, + s = `${t}${0 !== i ? i : ""}${e}${ + this.zippedArchive ? ".gz" : "" + }`, + a = o.join(this.dirname, s); + n.unlink(a, r); + } + _checkMaxFilesTailable(e, t, r) { + const s = []; + if (!this.maxFiles) return; + const a = this.zippedArchive ? ".gz" : ""; + for (let r = this.maxFiles - 1; r > 1; r--) + s.push( + function (r, i) { + let s = `${t}${r - 1}${e}${a}`; + const l = o.join(this.dirname, s); + n.exists(l, (c) => { + if (!c) return i(null); + (s = `${t}${r}${e}${a}`), + n.rename(l, o.join(this.dirname, s), i); + }); + }.bind(this, r) + ); + i(s, () => { + n.rename( + o.join(this.dirname, `${t}${e}`), + o.join(this.dirname, `${t}1${e}${a}`), + r + ); + }); + } + _createLogDirIfNotExist(e) { + n.existsSync(e) || n.mkdirSync(e, { recursive: !0 }); + } + }; + }, + 2930: (e, t, r) => { + "use strict"; + const n = r(3685), + o = r(5687), + { Stream: i } = r(6207), + s = r(5496), + a = r(2776); + e.exports = class extends s { + constructor(e = {}) { + super(e), + (this.options = e), + (this.name = e.name || "http"), + (this.ssl = !!e.ssl), + (this.host = e.host || "localhost"), + (this.port = e.port), + (this.auth = e.auth), + (this.path = e.path || ""), + (this.agent = e.agent), + (this.headers = e.headers || {}), + (this.headers["content-type"] = "application/json"), + (this.batch = e.batch || !1), + (this.batchInterval = e.batchInterval || 5e3), + (this.batchCount = e.batchCount || 10), + (this.batchOptions = []), + (this.batchTimeoutID = -1), + (this.batchCallback = {}), + this.port || (this.port = this.ssl ? 443 : 80); + } + log(e, t) { + this._request(e, (t, r) => { + r && + 200 !== r.statusCode && + (t = new Error(`Invalid HTTP Status Code: ${r.statusCode}`)), + t ? this.emit("warn", t) : this.emit("logged", e); + }), + t && setImmediate(t); + } + query(e, t) { + "function" == typeof e && ((t = e), (e = {})), + (e = { method: "query", params: this.normalizeQuery(e) }).params + .path && ((e.path = e.params.path), delete e.params.path), + e.params.auth && ((e.auth = e.params.auth), delete e.params.auth), + this._request(e, (e, r, n) => { + if ( + (r && + 200 !== r.statusCode && + (e = new Error( + `Invalid HTTP Status Code: ${r.statusCode}` + )), + e) + ) + return t(e); + if ("string" == typeof n) + try { + n = JSON.parse(n); + } catch (e) { + return t(e); + } + t(null, n); + }); + } + stream(e = {}) { + const t = new i(); + (e = { method: "stream", params: e }).params.path && + ((e.path = e.params.path), delete e.params.path), + e.params.auth && ((e.auth = e.params.auth), delete e.params.auth); + let r = ""; + const n = this._request(e); + return ( + (t.destroy = () => n.destroy()), + n.on("data", (e) => { + const n = (e = (r + e).split(/\n+/)).length - 1; + let o = 0; + for (; o < n; o++) + try { + t.emit("log", JSON.parse(e[o])); + } catch (e) { + t.emit("error", e); + } + r = e[n]; + }), + n.on("error", (e) => t.emit("error", e)), + t + ); + } + _request(e, t) { + const r = (e = e || {}).auth || this.auth, + n = e.path || this.path || ""; + delete e.auth, + delete e.path, + this.batch + ? this._doBatch(e, t, r, n) + : this._doRequest(e, t, r, n); + } + _doBatch(e, t, r, n) { + if ((this.batchOptions.push(e), 1 === this.batchOptions.length)) { + const e = this; + (this.batchCallback = t), + (this.batchTimeoutID = setTimeout(function () { + (e.batchTimeoutID = -1), + e._doBatchRequest(e.batchCallback, r, n); + }, this.batchInterval)); + } + this.batchOptions.length === this.batchCount && + this._doBatchRequest(this.batchCallback, r, n); + } + _doBatchRequest(e, t, r) { + this.batchTimeoutID > 0 && + (clearTimeout(this.batchTimeoutID), (this.batchTimeoutID = -1)); + const n = this.batchOptions.slice(); + (this.batchOptions = []), this._doRequest(n, e, t, r); + } + _doRequest(e, t, r, i) { + const s = Object.assign({}, this.headers); + r && r.bearer && (s.Authorization = `Bearer ${r.bearer}`); + const l = (this.ssl ? o : n).request({ + ...this.options, + method: "POST", + host: this.host, + port: this.port, + path: `/${i.replace(/^\//, "")}`, + headers: s, + auth: + r && r.username && r.password + ? `${r.username}:${r.password}` + : "", + agent: this.agent, + }); + l.on("error", t), + l.on("response", (e) => e.on("end", () => t(null, e)).resume()), + l.end(Buffer.from(a(e), "utf8")); + } + }; + }, + 3830: (e, t, r) => { + "use strict"; + Object.defineProperty(t, "Console", { + configurable: !0, + enumerable: !0, + get: () => r(7953), + }), + Object.defineProperty(t, "File", { + configurable: !0, + enumerable: !0, + get: () => r(6832), + }), + Object.defineProperty(t, "Http", { + configurable: !0, + enumerable: !0, + get: () => r(2930), + }), + Object.defineProperty(t, "Stream", { + configurable: !0, + enumerable: !0, + get: () => r(7700), + }); + }, + 7700: (e, t, r) => { + "use strict"; + const n = r(818), + { MESSAGE: o } = r(7286), + i = r(2037), + s = r(5496); + e.exports = class extends s { + constructor(e = {}) { + if ((super(e), !e.stream || !n(e.stream))) + throw new Error("options.stream is required."); + (this._stream = e.stream), + this._stream.setMaxListeners(1 / 0), + (this.isObjectMode = e.stream._writableState.objectMode), + (this.eol = "string" == typeof e.eol ? e.eol : i.EOL); + } + log(e, t) { + if ((setImmediate(() => this.emit("logged", e)), this.isObjectMode)) + return this._stream.write(e), void (t && t()); + this._stream.write(`${e[o]}${this.eol}`), t && t(); + } + }; + }, + 4934: (e) => { + e.exports = function e(t, r) { + if (t && r) return e(t)(r); + if ("function" != typeof t) + throw new TypeError("need wrapper function"); + return ( + Object.keys(t).forEach(function (e) { + n[e] = t[e]; + }), + n + ); + function n() { + for (var e = new Array(arguments.length), r = 0; r < e.length; r++) + e[r] = arguments[r]; + var n = t.apply(this, e), + o = e[e.length - 1]; + return ( + "function" == typeof n && + n !== o && + Object.keys(o).forEach(function (e) { + n[e] = o[e]; + }), + n + ); + } + }; + }, + 33: (e, t, r) => { + e = r.nmd(e); + const n = r(1017).join(__dirname, "desktop-notifications.node"); + try { + global.process.dlopen(e, n); + } catch (e) { + throw new Error("Cannot open " + n + ": " + e); + } + }, + 1323: (e, t, r) => { + e = r.nmd(e); + const n = r(1017).join(__dirname, "registry.node"); + try { + global.process.dlopen(e, n); + } catch (e) { + throw new Error("Cannot open " + n + ": " + e); + } + }, + 9491: (e) => { + "use strict"; + e.exports = require("assert"); + }, + 4300: (e) => { + "use strict"; + e.exports = require("buffer"); + }, + 2081: (e) => { + "use strict"; + e.exports = require("child_process"); + }, + 2057: (e) => { + "use strict"; + e.exports = require("constants"); + }, + 6113: (e) => { + "use strict"; + e.exports = require("crypto"); + }, + 2298: (e) => { + "use strict"; + e.exports = require("electron"); + }, + 2361: (e) => { + "use strict"; + e.exports = require("events"); + }, + 7147: (e) => { + "use strict"; + e.exports = require("fs"); + }, + 3685: (e) => { + "use strict"; + e.exports = require("http"); + }, + 5687: (e) => { + "use strict"; + e.exports = require("https"); + }, + 8188: (e) => { + "use strict"; + e.exports = require("module"); + }, + 2037: (e) => { + "use strict"; + e.exports = require("os"); + }, + 1017: (e) => { + "use strict"; + e.exports = require("path"); + }, + 2781: (e) => { + "use strict"; + e.exports = require("stream"); + }, + 1576: (e) => { + "use strict"; + e.exports = require("string_decoder"); + }, + 3837: (e) => { + "use strict"; + e.exports = require("util"); + }, + 9796: (e) => { + "use strict"; + e.exports = require("zlib"); + }, + 9770: (e) => { + "use strict"; + e.exports = { version: "3.11.0" }; + }, + }, + t = {}; + function r(n) { + var o = t[n]; + if (void 0 !== o) return o.exports; + var i = (t[n] = { id: n, loaded: !1, exports: {} }); + return e[n].call(i.exports, i, i.exports, r), (i.loaded = !0), i.exports; + } + (r.n = (e) => { + var t = e && e.__esModule ? () => e.default : () => e; + return r.d(t, { a: t }), t; + }), + (r.d = (e, t) => { + for (var n in t) + r.o(t, n) && + !r.o(e, n) && + Object.defineProperty(e, n, { enumerable: !0, get: t[n] }); + }), + (r.o = (e, t) => Object.prototype.hasOwnProperty.call(e, t)), + (r.r = (e) => { + "undefined" != typeof Symbol && + Symbol.toStringTag && + Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }), + Object.defineProperty(e, "__esModule", { value: !0 }); + }), + (r.nmd = (e) => ((e.paths = []), e.children || (e.children = []), e)); + var n = {}; + (() => { + "use strict"; + r.r(n); + var e = r(5067), + t = r(1017), + o = r(2298); + let i = null; + function s() { + if (!i) { + const e = o.app.getPath("userData"); + i = t.join(e, "logs"); + } + return i; + } + var a = r(5478), + l = r.n(a), + c = r(5496), + u = r.n(c), + d = r(7286); + const f = { + error: console.error, + warn: console.warn, + info: console.info, + debug: console.debug, + }; + class h extends u() { + log(e, t) { + setImmediate(() => this.emit("logged", e)); + const r = f[e[d.LEVEL]] ?? console.log; + try { + r(e[d.MESSAGE]); + } catch {} + t?.(); + } + } + var p = function (e, t) { + return e === t; + }; + const m = function (e, t) { + var r; + void 0 === t && (t = p); + var n, + o = [], + i = !1, + s = function (e, r) { + return t(e, o[r]); + }; + return function () { + for (var t = arguments.length, a = new Array(t), l = 0; l < t; l++) + a[l] = arguments[l]; + return ( + (i && r === this && a.length === o.length && a.every(s)) || + ((n = e.apply(this, a)), (i = !0), (r = this), (o = a)), + n + ); + }; + }, + g = require("fs/promises"); + var v = r(7147), + y = r(2037), + w = r(3837), + b = r(2229); + const _ = ".desktop.production.log", + E = new RegExp("(\\d{4}-\\d{2}-\\d{2})" + r.n(b)()(_) + "$"); + class S extends u() { + stream; + logDirectory; + constructor(e) { + const { logDirectory: t, ...r } = e; + super(r), (this.logDirectory = t); + } + async log(e, t) { + const r = O(this.logDirectory); + (void 0 !== this.stream && this.stream.path === r) || + (this.stream?.end(), + (this.stream = (0, v.createWriteStream)(r, { flags: "a" })), + this.stream.on("error", (e) => {}), + await C(this.logDirectory).catch((e) => {})), + void 0 !== this.stream && + (await x(this.stream, `${e[d.MESSAGE]}${y.EOL}`).catch((e) => {}), + this.emit("logged", e)), + t?.(); + } + close(e) { + this.stream?.end(e), (this.stream = void 0); + } + } + const x = (0, w.promisify)((e, t, r) => e.write(t, r)), + O = (e) => + (0, t.join)( + e, + `${((e = new Date()) => e.toISOString().split("T", 1)[0])()}${_}` + ), + C = async (e) => { + const r = await ((e) => + (0, g.readdir)(e, { withFileTypes: !0 }) + .then((e) => e.filter((e) => e.isFile() && E.test(e.name))) + .catch((e) => {}))(e); + if (r && r.length > 14) { + const n = r.length - 14 + 1, + o = r.sort().slice(0, n); + for (const r of o) + await (0, g.unlink)((0, t.join)(e, r.name)).catch((e) => {}); + } + }; + const R = m(async () => { + const t = s(); + return ( + await (0, g.mkdir)(t, { recursive: !0 }), + (function (t) { + const r = new S({ + logDirectory: t, + level: "info", + format: e.format.printf( + ({ level: e, message: t }) => + `${new Date().toISOString()} - ${e}: ${t}` + ), + }); + r.on("error", l()); + const n = new h({ level: "error" }); + return ( + e.configure({ transports: [n, r], format: e.format.simple() }), + e.log + ); + })(t) + ); + }); + async function M(e, t) { + try { + const r = await R(); + await new Promise((n, o) => { + r(e, t, (e) => { + e ? o(e) : n(); + }); + }); + } catch (e) {} + } + var A = r(9764); + const j = require("url"), + k = ["renderer.js", "main.js"]; + function T(e) { + if (!k.some((t) => e.endsWith(t))) return null; + e.startsWith("file://") && (e = (0, j.fileURLToPath)(e)); + const r = `${e}.map`; + if (!v.existsSync(r)) return null; + try { + const e = v.readFileSync(r, "utf8"); + return { url: t.basename(r), map: e }; + } catch (e) { + return null; + } + } + const L = new WeakMap(); + let N; + function P(e, t) { + return L.set(e, t), e + t.map((e) => `\n at ${e}`).join(""); + } + function D(e) { + return { name: e.name, message: e.message, stack: $(e) }; + } + function $(e) { + let t = L.get(e); + return ( + t || ((e.stack || "").toString(), (t = L.get(e))), t ? N(e, t) : e.stack + ); + } + function I(e, t) { + return (e = D(e)).stack + ? t + ? `${t}\n${e.stack}` + : e.stack.trim() + : t + ? `${t}\n${e.name}: ${e.message}` + : `${e.name}: ${e.message}`; + } + function F(e, t) { + return t ? I(t, e) : e; + } + global.log = { + error(e, t) { + M("error", "[main] " + F(e, t)); + }, + warn(e, t) { + M("warn", "[main] " + F(e, t)); + }, + info(e, t) { + M("info", "[main] " + F(e, t)); + }, + debug(e, t) { + M("debug", "[main] " + F(e, t)); + }, + }; + var B = r(1391); + function U(e, t, ...r) { + if (e.isDestroyed()) { + const e = `failed to send on ${t}, webContents was destroyed`; + log.error(e); + } else e.send(t, ...r); + } + function H(e) { + return e.isFullScreen() + ? "full-screen" + : e.isMaximized() + ? "maximized" + : e.isMinimized() + ? "minimized" + : e.isVisible() + ? "normal" + : "hidden"; + } + function q(e) { + e.on("enter-full-screen", () => z(e, "full-screen")), + e.on("leave-full-screen", () => z(e, "normal")), + e.on("maximize", () => z(e, "maximized")), + e.on("minimize", () => z(e, "minimized")), + e.on("unmaximize", () => z(e, "normal")), + e.on("restore", () => z(e, "normal")), + e.on("hide", () => z(e, "hidden")), + e.on("show", () => { + z(e, H(e)); + }); + } + function z(e, t) { + U(e.webContents, "window-state-changed", t); + } + function G(e) { + throw new Error(e); + } + function W(e) { + const t = e.id; + if (!t) throw new Error(`menuItem must specify id: ${e.label}`); + const r = e.enabled, + n = e.visible, + o = e.label, + i = e.checked, + s = (function (e) { + if (e.accelerator) return e.accelerator; + if (e.role) { + const t = e.getDefaultRoleAccelerator; + if ("function" == typeof t) + try { + const r = t.call(e); + if ("string" == typeof r) return r; + } catch (e) { + console.error("Could not retrieve default accelerator", e); + } + } + return null; + })(e), + a = (function (e) { + const t = e.match(/&([^&])/); + return t ? t[1] : null; + })(e.label), + l = (function (e) { + switch (e) { + case "normal": + case "separator": + case "submenu": + case "checkbox": + case "radio": + return e; + default: + throw new Error( + `Unable to parse string ${e} to a valid menu item type` + ); + } + })(e.type); + switch (l) { + case "normal": + return { + id: t, + type: "menuItem", + label: o, + enabled: r, + visible: n, + accelerator: s, + accessKey: a, + }; + case "separator": + return { id: t, type: "separator", visible: n }; + case "submenu": + return { + id: t, + type: "submenuItem", + label: o, + enabled: r, + visible: n, + menu: Y(e.submenu, t), + accessKey: a, + }; + case "checkbox": + return { + id: t, + type: "checkbox", + label: o, + enabled: r, + visible: n, + accelerator: s, + checked: i, + accessKey: a, + }; + case "radio": + return { + id: t, + type: "radio", + label: o, + enabled: r, + visible: n, + accelerator: s, + checked: i, + accessKey: a, + }; + default: + return (function (e, t) { + throw new Error(t); + })(0, `Unknown menu item type ${l}`); + } + } + function Y(e, t) { + return { id: t, type: "menu", items: e.items.map(W) }; + } + function V() { + const e = process.hrtime(); + return 1e3 * e[0] + e[1] / 1e6; + } + var K = r(2382), + Z = r.n(K); + const J = new Set(), + X = (e) => { + J.add(e.id), e.on("destroyed", () => J.delete(e.id)); + }; + function Q(e, t) { + o.ipcMain.on(e, te(t)); + } + function ee(e, t) { + o.ipcMain.handle(e, te(t)); + } + function te(e) { + return (t, ...r) => { + var n; + if (((n = t.sender), J.has(n.id))) return e(t, ...r); + log.error( + `IPC message received from invalid sender: ${t.senderFrame.url}` + ); + }; + } + var re = r(9379); + function ne(e) { + try { + const t = o.shell.readShortcutLink(e); + if (void 0 === t.toastActivatorClsid || "" === t.toastActivatorClsid) + return; + return t.toastActivatorClsid; + } catch (t) { + return void log.error( + `Error looking for toast activator CLSID in shortcut ${e}`, + t + ); + } + } + let oe; + class ie { + window; + emitter = new B.Emitter(); + _loadTime = null; + _rendererReadyTime = null; + isDownloadingUpdate = !1; + minWidth = 960; + minHeight = 660; + shouldMaximizeOnShow = !1; + constructor() { + const e = Z()({ + defaultWidth: this.minWidth, + defaultHeight: this.minHeight, + maximize: !1, + }), + t = { + x: e.x, + y: e.y, + width: e.width, + height: e.height, + minWidth: this.minWidth, + minHeight: this.minHeight, + show: !1, + backgroundColor: "#fff", + webPreferences: { + disableBlinkFeatures: "Auxclick", + nodeIntegration: !0, + spellcheck: !0, + contextIsolation: !1, + }, + acceptFirstMouse: !0, + frame: !1, + }; + (this.window = new o.BrowserWindow(t)), + X(this.window.webContents), + (function (e) { + (0, re.V2)((t, r, n) => { + U(e.webContents, "notification-event", t, r, n); + }); + })(this.window), + e.manage(this.window), + (this.shouldMaximizeOnShow = e.isMaximized); + let r = !1, + n = !1; + o.app.on("before-quit", () => { + r = !0; + }), + Q("will-quit", (e) => { + (r = !0), (e.returnValue = !0); + }), + Q("will-quit-even-if-updating", (e) => { + (r = !0), (n = !0), (e.returnValue = !0); + }), + Q("cancel-quitting", (e) => { + (r = !1), (n = !1), (e.returnValue = !0); + }), + this.window.on("close", (e) => { + if (!n && this.isDownloadingUpdate) + return ( + e.preventDefault(), + U(this.window.webContents, "show-installing-update"), + void this.show() + ); + o.nativeTheme.removeAllListeners(), + o.autoUpdater.removeAllListeners(), + (0, re.pD)(); + }), + this.window.once("ready-to-show", () => { + this.window.on("unmaximize", () => { + setTimeout(() => { + const e = this.window.getBounds(); + (e.width += 1), + this.window.setBounds(e), + (e.width -= 1), + this.window.setBounds(e); + }, 5); + }); + }); + } + load() { + let e = 0; + var r; + this.window.webContents.once("did-start-loading", () => { + (this._rendererReadyTime = null), (this._loadTime = null), (e = V()); + }), + this.window.webContents.once("did-finish-load", () => { + (this._loadTime = V() - e), this.maybeEmitDidLoad(); + }), + this.window.webContents.on("did-finish-load", () => { + this.window.webContents.setVisualZoomLevelLimits(1, 1); + }), + this.window.webContents.on("did-fail-load", () => { + this.window.webContents.openDevTools(), this.window.show(); + }), + (r = (e, t) => { + (this._rendererReadyTime = t), this.maybeEmitDidLoad(); + }), + o.ipcMain.once("renderer-ready", te(r)), + this.window.on("focus", () => U(this.window.webContents, "focus")), + this.window.on("blur", () => U(this.window.webContents, "blur")), + q(this.window), + this.window.loadURL( + ((...e) => (0, j.pathToFileURL)(t.resolve(...e)).toString())( + __dirname, + "index.html" + ) + ), + o.nativeTheme.addListener("updated", (e, t) => { + U(this.window.webContents, "native-theme-updated"); + }), + this.setupAutoUpdater(); + } + maybeEmitDidLoad() { + this.rendererLoaded && this.emitter.emit("did-load", null); + } + get rendererLoaded() { + return !!this.loadTime && !!this.rendererReadyTime; + } + onClosed(e) { + this.window.on("closed", e); + } + onDidLoad(e) { + return this.emitter.on("did-load", e); + } + isMinimized() { + return this.window.isMinimized(); + } + isVisible() { + return this.window.isVisible(); + } + restore() { + this.window.restore(); + } + isFocused() { + return this.window.isFocused(); + } + focus() { + this.window.focus(); + } + selectAllWindowContents() { + this.window.webContents.selectAll(); + } + show() { + this.window.show(), + this.shouldMaximizeOnShow && + ((this.shouldMaximizeOnShow = !1), this.window.maximize()); + } + sendMenuEvent(e) { + this.show(), U(this.window.webContents, "menu-event", e); + } + sendURLAction(e) { + this.show(), U(this.window.webContents, "url-action", e); + } + sendLaunchTimingStats(e) { + U(this.window.webContents, "launch-timing-stats", e); + } + sendAppMenu() { + const e = o.Menu.getApplicationMenu(); + if (e) { + const t = Y(e); + U(this.window.webContents, "app-menu", t); + } + } + sendCertificateError(e, t, r) { + U(this.window.webContents, "certificate-error", e, t, r); + } + showCertificateTrustDialog(e, t) { + o.dialog.showCertificateTrustDialog( + this.window, + { certificate: e, message: t }, + () => {} + ); + } + get loadTime() { + return this._loadTime; + } + get rendererReadyTime() { + return this._rendererReadyTime; + } + destroy() { + this.window.destroy(); + } + setupAutoUpdater() { + o.autoUpdater.on("error", (e) => { + (this.isDownloadingUpdate = !1), + U(this.window.webContents, "auto-updater-error", e); + }), + o.autoUpdater.on("checking-for-update", () => { + (this.isDownloadingUpdate = !1), + U(this.window.webContents, "auto-updater-checking-for-update"); + }), + o.autoUpdater.on("update-available", () => { + (this.isDownloadingUpdate = !0), + U(this.window.webContents, "auto-updater-update-available"); + }), + o.autoUpdater.on("update-not-available", () => { + (this.isDownloadingUpdate = !1), + U(this.window.webContents, "auto-updater-update-not-available"); + }), + o.autoUpdater.on("update-downloaded", () => { + (this.isDownloadingUpdate = !1), + U(this.window.webContents, "auto-updater-update-downloaded"); + }); + } + checkForUpdates(e) { + try { + o.autoUpdater.setFeedURL({ url: e }), o.autoUpdater.checkForUpdates(); + } catch (e) { + return e; + } + } + quitAndInstallUpdate() { + o.autoUpdater.quitAndInstall(); + } + minimizeWindow() { + this.window.minimize(); + } + maximizeWindow() { + this.window.maximize(); + } + unmaximizeWindow() { + this.window.unmaximize(); + } + closeWindow() { + this.window.close(); + } + isMaximized() { + return this.window.isMaximized(); + } + getCurrentWindowState() { + return H(this.window); + } + getCurrentWindowZoomFactor() { + return this.window.webContents.zoomFactor; + } + setWindowZoomFactor(e) { + this.window.webContents.zoomFactor = e; + } + async showSaveDialog(e) { + const { canceled: t, filePath: r } = await o.dialog.showSaveDialog( + this.window, + e + ); + return t || void 0 === r ? null : r; + } + async showOpenDialog(e) { + const { filePaths: t } = await o.dialog.showOpenDialog(this.window, e); + return t.length > 0 ? t[0] : null; + } + } + function se(e) { + return e.id || e.label || e.role || "unknown"; + } + function ae(e, t = "@", r = new Set()) { + for (const n of e) { + let e = 0, + o = n.id; + if (!o) + do { + o = `${t}.${se(n)}${e++ || ""}`; + } while (r.has(o)); + (n.id = o), r.add(o), n.submenu && ae(n.submenu, n.id, r); + } + } + function le(e) { + const t = e.endsWith("\\") ? e : `${e}\\`; + o.shell.openPath(t).then((t) => { + "" !== t && log.error(`Failed to open directory (${e}): ${t}`); + }); + } + var ce; + function ue({ + selectedExternalEditor: e, + selectedShell: t, + askForConfirmationOnForcePush: r, + askForConfirmationOnRepositoryRemoval: n, + hasCurrentPullRequest: i = !1, + contributionTargetDefaultBranch: a = "default branch", + isForcePushForCurrentRepository: l = !1, + isStashedChangesVisible: c = !1, + askForConfirmationWhenStashingAllChanges: u = !0, + }) { + a = (function (e, t) { + if (e.length <= 25) return e; + const r = [...e]; + if (r.length <= 25) return e; + const n = r.reduce( + (e, t) => ( + t >= "︀" && t <= "️" + ? e.length && e.push(`${e.pop()}${t}`) + : e.push(t), + e + ), + [] + ); + return n.length <= 25 ? e : `${n.slice(0, 25).join("")}…`; + })(a); + const d = n ? "&删除…" : "&删除", + f = i ? "&在GitHub上查看拉取请求" : "&创建拉取请求", + h = new Array(), + p = { type: "separator" }, + m = { + label: "&文件", + submenu: [ + { + label: "&新仓库…", + id: "new-repository", + click: fe("create-repository"), + accelerator: "CmdOrCtrl+N", + }, + p, + { + label: "&导入本地仓库…", + id: "add-local-repository", + accelerator: "CmdOrCtrl+O", + click: fe("add-local-repository"), + }, + { + label: "&克隆仓库…", + id: "clone-repository", + accelerator: "CmdOrCtrl+Shift+O", + click: fe("clone-repository"), + }, + ], + }; + m.submenu.push( + p, + { + label: "&选项…", + id: "preferences", + accelerator: "CmdOrCtrl+,", + click: fe("show-preferences"), + }, + p, + { role: "quit", label: "&退出", accelerator: "Alt+F4" } + ), + h.push(m), + h.push({ + label: "&编辑", + submenu: [ + { role: "undo", label: "&撤销" }, + { role: "redo", label: "&恢复" }, + p, + { role: "cut", label: "&剪切" }, + { role: "copy", label: "&复制" }, + { role: "paste", label: "&粘贴" }, + { + label: "&全选", + accelerator: "CmdOrCtrl+A", + click: fe("select-all"), + }, + p, + { + id: "find", + label: "&查找", + accelerator: "CmdOrCtrl+F", + click: fe("find-text"), + }, + ], + }), + h.push({ + label: "&查看", + submenu: [ + { + label: "&更改", + id: "show-changes", + accelerator: "CmdOrCtrl+1", + click: fe("show-changes"), + }, + { + label: "&历史", + id: "show-history", + accelerator: "CmdOrCtrl+2", + click: fe("show-history"), + }, + { + label: "&仓库列表", + id: "show-repository-list", + accelerator: "CmdOrCtrl+T", + click: fe("choose-repository"), + }, + { + label: "&分支列表", + id: "show-branches-list", + accelerator: "CmdOrCtrl+B", + click: fe("show-branches"), + }, + p, + { + label: "&填写提交备注", + id: "go-to-commit-message", + accelerator: "CmdOrCtrl+G", + click: fe("go-to-commit-message"), + }, + { + label: de(c), + id: "toggle-stashed-changes", + accelerator: "Ctrl+H", + click: fe(c ? "hide-stashed-changes" : "show-stashed-changes"), + }, + { label: "&切换为全屏", role: "togglefullscreen" }, + p, + { + label: "重置缩放", + accelerator: "CmdOrCtrl+0", + click: me(ce.Reset), + }, + { label: "放大", accelerator: "CmdOrCtrl+=", click: me(ce.In) }, + { + label: "缩小", + accelerator: "CmdOrCtrl+-", + click: me(ce.Out), + }, + { + label: "扩大活动项大小", + id: "increase-active-resizable-width", + accelerator: "CmdOrCtrl+9", + click: fe("increase-active-resizable-width"), + }, + { + label: "缩小活动项大小", + id: "decrease-active-resizable-width", + accelerator: "CmdOrCtrl+8", + click: fe("decrease-active-resizable-width"), + }, + p, + { + label: "&重载", + id: "reload-window", + accelerator: "CmdOrCtrl+Alt+R", + click(e, t) { + t && t.reload(); + }, + visible: !1, + }, + { + id: "show-devtools", + label: "&切换开发人员工具", + accelerator: "Ctrl+Shift+I", + click(e, t) { + t && t.webContents.toggleDevTools(); + }, + }, + ], + }); + const v = (function (e, t) { + return e ? (t ? "Force P&ush…" : "Force P&ush") : "&推送"; + })(l, r), + y = l ? "force-push" : "push"; + h.push({ + label: "&仓库", + id: "repository", + submenu: [ + { id: "push", label: v, accelerator: "CmdOrCtrl+P", click: fe(y) }, + { + id: "pull", + label: "&拉取", + accelerator: "CmdOrCtrl+Shift+P", + click: fe("pull"), + }, + { + id: "fetch", + label: "&获取", + accelerator: "CmdOrCtrl+Shift+T", + click: fe("fetch"), + }, + { + label: d, + id: "remove-repository", + accelerator: "CmdOrCtrl+Backspace", + click: fe("remove-repository"), + }, + p, + { + id: "view-repository-on-github", + label: "&在GitHub上查看", + accelerator: "CmdOrCtrl+Shift+G", + click: fe("view-repository-on-github"), + }, + { + label: `&在${t ?? "命令行"}中打开`, + id: "open-in-shell", + accelerator: "Ctrl+`", + click: fe("open-in-shell"), + }, + { + label: "&在资源管理器中显示", + id: "open-working-directory", + accelerator: "CmdOrCtrl+Shift+F", + click: fe("open-working-directory"), + }, + { + label: `&在${e ?? "外部编辑器"}中打开`, + id: "open-external-editor", + accelerator: "CmdOrCtrl+Shift+A", + click: fe("open-external-editor"), + }, + p, + { + id: "create-issue-in-repository-on-github", + label: "&在GitHub上创建issue", + accelerator: "CmdOrCtrl+I", + click: fe("create-issue-in-repository-on-github"), + }, + p, + { + label: "&仓库设置…", + id: "show-repository-settings", + click: fe("show-repository-settings"), + }, + ], + }); + const w = [ + { + label: "&新建分支…", + id: "create-branch", + accelerator: "CmdOrCtrl+Shift+N", + click: fe("create-branch"), + }, + { + label: "&重命名…", + id: "rename-branch", + accelerator: "CmdOrCtrl+Shift+R", + click: fe("rename-branch"), + }, + { + label: "&删除当前分支…", + id: "delete-branch", + accelerator: "CmdOrCtrl+Shift+D", + click: fe("delete-branch"), + }, + p, + { + label: "放弃所有更改…", + id: "discard-all-changes", + accelerator: "CmdOrCtrl+Shift+Backspace", + click: fe("discard-all-changes"), + }, + { + label: u ? "&暂存所有更改……" : "&暂存所有更改", + id: "stash-all-changes", + accelerator: "CmdOrCtrl+Shift+S", + click: fe("stash-all-changes"), + }, + p, + { + label: `&从${a}中拉取更新`, + id: "update-branch-with-contribution-target-branch", + accelerator: "CmdOrCtrl+Shift+U", + click: fe("update-branch-with-contribution-target-branch"), + }, + { + label: "&比较分支", + id: "compare-to-branch", + accelerator: "CmdOrCtrl+Shift+B", + click: fe("compare-to-branch"), + }, + { + label: "&合并到当前分支…", + id: "merge-branch", + accelerator: "CmdOrCtrl+Shift+M", + click: fe("merge-branch"), + }, + { + label: "&挤压合并到当前分支…", + id: "squash-and-merge-branch", + accelerator: "CmdOrCtrl+Shift+H", + click: fe("squash-and-merge-branch"), + }, + { + label: "&将当前分支变基…", + id: "rebase-branch", + accelerator: "CmdOrCtrl+Shift+E", + click: fe("rebase-branch"), + }, + p, + { + label: "&在GitHub上进行比较", + id: "compare-on-github", + accelerator: "CmdOrCtrl+Shift+C", + click: fe("compare-on-github"), + }, + { + label: "查看GitHub上的分支", + id: "branch-on-github", + accelerator: "CmdOrCtrl+Alt+B", + click: fe("branch-on-github"), + }, + ]; + w.push({ + label: "预览拉取请求", + id: "preview-pull-request", + accelerator: "CmdOrCtrl+Alt+P", + click: fe("preview-pull-request"), + }), + w.push({ + label: f, + id: "create-pull-request", + accelerator: "CmdOrCtrl+R", + click: fe("open-pull-request"), + }), + h.push({ label: "&分支", id: "branch", submenu: w }); + const b = [ + { + label: "报告问题…", + click() { + o.shell + .openExternal( + "https://github.com/desktop/desktop/issues/new/choose" + ) + .catch((e) => log.error("Failed opening issue creation page", e)); + }, + }, + { + label: "&联系GitHub支持…", + click() { + o.shell + .openExternal( + `https://github.com/contact?from_desktop_app=1&app_version=${o.app.getVersion()}` + ) + .catch((e) => + log.error("Failed opening contact support page", e) + ); + }, + }, + { + label: "显示用户指南", + click() { + o.shell + .openExternal("https://docs.github.com/en/desktop") + .catch((e) => log.error("Failed opening user guides page", e)); + }, + }, + { + label: "显示键盘快捷键", + click() { + o.shell + .openExternal( + "https://docs.github.com/en/desktop/installing-and-configuring-github-desktop/overview/keyboard-shortcuts" + ) + .catch((e) => + log.error("Failed opening keyboard shortcuts page", e) + ); + }, + }, + { + label: "&显示本地日志", + click() { + const e = s(); + (0, g.mkdir)(e, { recursive: !0 }) + .then(() => le(e)) + .catch((e) => log.error("Failed opening logs directory", e)); + }, + }, + ]; + return ( + h.push({ + label: "&帮助", + submenu: [ + ...b, + p, + { + label: "&关于 GitHub Desktop", + click: fe("show-about"), + id: "about", + }, + ], + }), + ae(h), + o.Menu.buildFromTemplate(h) + ); + } + function de(e) { + return e ? "&隐藏更改" : "&显示隐藏的更改"; + } + function fe(e) { + return (t, r) => { + const n = r ?? o.BrowserWindow.getAllWindows()[0]; + void 0 !== n && U(n.webContents, "menu-event", e); + }; + } + !(function (e) { + (e[(e.Reset = 0)] = "Reset"), + (e[(e.In = 1)] = "In"), + (e[(e.Out = 2)] = "Out"); + })(ce || (ce = {})); + const he = [0.67, 0.75, 0.8, 0.9, 1, 1.1, 1.25, 1.5, 1.75, 2], + pe = he.slice().reverse(); + function me(e) { + return (t, r) => { + if (!r) return; + const { webContents: n } = r; + if (e === ce.Reset) (n.zoomFactor = 1), U(n, "zoom-factor-changed", 1); + else { + const t = n.zoomFactor, + r = e === ce.In ? he : pe, + i = + ((o = t), + r.reduce((e, t) => (Math.abs(t - o) < Math.abs(e - o) ? t : e))), + s = r.find((t) => (e === ce.In ? t > i : t < i)), + a = void 0 === s ? i : s; + (n.zoomFactor = a), U(n, "zoom-factor-changed", a); + } + var o; + }; + } + function ge(e) { + let t = !1; + if (e.submenu instanceof o.Menu) + for (const r of e.submenu.items) ge(r) && (t = !0); + if (t || e.role) return !0; + const r = e.id; + return ( + "show-devtools" === r || "reload-window" === r || ((e.enabled = !1), !1) + ); + } + function* ve(e) { + for (const t of e.items) + yield t, + "submenu" === t.type && + void 0 !== t.submenu && + (yield* ve(t.submenu)); + } + var ye = r(2081); + (0, w.promisify)(ye.execFile); + var we = r(7492); + function be() { + return y.release(); + } + m(() => !1), m(() => !1); + const _e = m(() => !1); + m(() => !1), + m(() => !1), + m(() => + (function (e) { + const t = be(); + return void 0 !== t && (0, we.compare)(t, "10.0.17666", ">="); + })() + ), + m(() => + (function (e) { + const t = be(); + return void 0 !== t && (0, we.compare)(t, "10", "<"); + })() + ), + new Set(["LOCAL_GIT_DIRECTORY"]); + const Ee = /[\x00-\x20\x7F~^:?*\[\\|""<>]+|@{|\.\.+|^\.|\.$|\.lock$|\/$/g; + function Se(e, t) { + const r = e[t]; + return null == r ? null : Array.isArray(r) ? r[0] : r; + } + var xe = r(6969); + function Oe() { + for (const t of (0, xe.enumerateValues)( + xe.HKEY.HKEY_CURRENT_USER, + "Environment" + )) + if ( + "Path" === t.name && + ((e = t).type === xe.RegistryValueType.REG_SZ || + e.type === xe.RegistryValueType.REG_EXPAND_SZ) + ) + return t.data.split(";").filter((e) => e.length > 0); + var e; + throw new Error("Could not find PATH environment variable"); + } + async function Ce(e) { + let r; + const n = process.env.SystemRoot; + if (n) { + const e = t.join(n, "System32"); + r = t.join(e, "setx.exe"); + } else r = "setx.exe"; + await Re(r, ["Path", e.join(";")]); + } + function Re(e, t) { + try { + const r = (0, ye.spawn)(e, t); + return new Promise((n, o) => { + let i = ""; + r.stdout && + r.stdout.on("data", (e) => { + i += e; + }), + r.on("close", (r) => { + 0 === r + ? n(i) + : o(new Error(`Command "${e} ${t}" failed: "${i}"`)); + }), + r.on("error", (e) => { + o(e); + }), + r.stdin && r.stdin.end(); + }); + } catch (e) { + return Promise.reject(e); + } + } + var Me = r(6539), + Ae = r.n(Me); + const je = t.resolve(process.execPath, ".."), + ke = t.resolve(je, ".."), + Te = t.resolve(t.join(ke, "Update.exe")), + Le = t.basename(process.execPath); + async function Ne() { + const e = Pe(); + await (0, g.mkdir)(e, { recursive: !0 }), + await (function (e) { + const r = `@echo off\n"%~dp0\\${De( + e, + "resources/app/static/github.bat" + )}" %*`, + n = t.join(e, "github.bat"); + return (0, g.writeFile)(n, r); + })(e), + await (function (e) { + const r = `#!/usr/bin/env bash\n DIR="$( cd "$( dirname "\${BASH_SOURCE[0]}" )" && pwd )"\n sh "$DIR/${De( + e, + "resources/app/static/github.sh" + ).replace(/\\/g, "/")}" "$@"`, + n = t.join(e, "github"); + return (0, g.writeFile)(n, r, { encoding: "utf8", mode: 755 }); + })(e); + try { + const t = Oe(); + t.indexOf(e) < 0 && (await Ce([...t, e])); + } catch (e) { + log.error( + "Failed inserting bin path into PATH environment variable", + e + ); + } + } + function Pe() { + return t.resolve(process.execPath, "../../bin"); + } + function De(e, r) { + const n = t.resolve(process.execPath, ".."); + return t.relative(e, t.join(n, r)); + } + async function $e(e) { + await Re(Te, e); + } + function Ie(e) { + return $e(["--createShortcut", Le, "-l", e.join(",")]); + } + function Fe(e) { + return Be(e) + ? "x64-emulated" + : "arm64" === process.arch + ? "arm64" + : "x64"; + } + function Be(e) { + return "x64" === process.arch && !0 === e.runningUnderARM64Translation; + } + var Ue = r(6113), + He = r(4790), + qe = r.n(He); + function ze(e) { + if ("undefined" != typeof window && window.crypto) { + const t = new Uint8Array(e); + return crypto.getRandomValues(t), t; + } + return (0, Ue.randomBytes)(e); + } + let Ge = null; + async function We() { + if (!Ge) { + let e = await (async function () { + let e; + try { + (e = (await (0, g.readFile)(Ve(), "utf8")).trim()), + 36 !== e.length && (e = void 0); + } catch (e) {} + return e; + })(); + void 0 === e && + ((e = qe()({ random: ze(16) })), + await Ye(e).catch((e) => { + log.error(e); + })), + (Ge = e); + } + return Ge; + } + async function Ye(e) { + (Ge = e), await (0, g.writeFile)(Ve(), e, "utf8"); + } + const Ve = () => (0, t.join)(o.app.getPath("userData"), ".guid"); + let Ke = !1; + async function Ze(e, t, r) { + if (!0 !== r) { + if (Ke) return; + Ke = !0; + } + const n = new Map(); + if ( + (n.set("name", e.name), + n.set("message", e.message), + e.stack && n.set("stack", e.stack), + n.set("platform", "win32"), + n.set("architecture", Fe(o.app)), + n.set("sha", "4616f73de8a0246da679448e260fd3c2fccd3db0"), + n.set("version", o.app.getVersion()), + n.set("guid", await We()), + t) + ) + for (const e of Object.keys(t)) n.set(e, t[e]); + const i = [...n.entries()] + .map(([e, t]) => `${encodeURIComponent(e)}=${encodeURIComponent(t)}`) + .join("&"); + try { + await new Promise((e, t) => { + const n = r + ? "https://central.github.com/api/desktop-non-fatal/exception" + : "https://central.github.com/api/desktop/exception", + s = o.net.request({ method: "POST", url: n }); + s.setHeader("Content-Type", "application/x-www-form-urlencoded"), + s.on("response", (r) => { + 200 === r.statusCode + ? e() + : t(`Got ${r.statusCode} - ${r.statusMessage} from central`); + }), + s.on("error", t), + s.end(i); + }), + log.info("Error report submitted"); + } catch (t) { + log.error("Failed submitting error report", e); + } + } + class Je { + window; + emitter = new B.Emitter(); + errorType; + error; + hasFinishedLoading = !1; + hasSentReadyEvent = !1; + constructor(e, t) { + (this.window = new o.BrowserWindow({ + width: 600, + height: 500, + minWidth: 600, + minHeight: 500, + show: !1, + backgroundColor: "#fff", + webPreferences: { + disableBlinkFeatures: "Auxclick", + nodeIntegration: !0, + spellcheck: !1, + contextIsolation: !1, + }, + frame: !1, + })), + X(this.window.webContents), + (this.error = t), + (this.errorType = e); + } + load() { + log.debug("Starting crash process"), + this.window.webContents.once("did-start-loading", () => { + log.debug("Crash process in startup"); + }), + this.window.webContents.once("did-finish-load", () => { + log.debug("Crash process started"), + (this.hasFinishedLoading = !0), + this.maybeEmitDidLoad(); + }), + this.window.webContents.on("did-finish-load", () => { + this.window.webContents.setVisualZoomLevelLimits(1, 1); + }), + this.window.webContents.on("did-fail-load", () => { + log.error("Crash process failed to load"), + this.emitter.emit("did-fail-load", null); + }), + Q("crash-ready", () => { + log.debug("Crash process is ready"), + (this.hasSentReadyEvent = !0), + this.sendError(), + this.maybeEmitDidLoad(); + }), + Q("crash-quit", () => { + log.debug("Got quit signal from crash process"), + this.window.close(); + }), + q(this.window), + this.window.loadURL(`file://${__dirname}/crash.html`); + } + maybeEmitDidLoad() { + this.hasFinishedLoading && + this.hasSentReadyEvent && + this.emitter.emit("did-load", null); + } + onClose(e) { + this.window.on("closed", e); + } + onFailedToLoad(e) { + this.emitter.on("did-fail-load", e); + } + onDidLoad(e) { + return this.emitter.on("did-load", e); + } + focus() { + this.window.focus(); + } + show() { + log.debug("Showing crash process window"), this.window.show(); + } + sendError() { + const e = { + stack: this.error.stack, + message: this.error.message, + name: this.error.name, + }, + t = { type: this.errorType, error: e }; + U(this.window.webContents, "error", t); + } + destroy() { + this.window.destroy(); + } + } + let Xe = !1; + function Qe(e, t) { + return (e ? e.toLowerCase() : e) === (t ? t.toLowerCase() : t); + } + function et() { + const e = o.Menu.buildFromTemplate([{ role: "editMenu" }]).items[0]; + return (e && e.submenu ? e.submenu.items : []).filter( + (e) => !Qe(e.role, "pasteandmatchstyle") + ); + } + function tt(e, t, r) { + const n = rt(e, t); + if (void 0 === r) return n; + for (const e of r) n.append(e); + return n; + } + function rt(e, t, r = []) { + const n = new o.Menu(); + for (const [i, s] of e.entries()) + if (Qe(s.role, "editmenu")) for (const e of et()) n.append(e); + else { + const e = [...r, i]; + n.append( + new o.MenuItem({ + label: s.label, + type: s.type, + enabled: s.enabled, + role: s.role, + click: () => t(e), + submenu: s.submenu ? rt(s.submenu, t, e) : void 0, + }) + ); + } + return n; + } + class nt { + subscribe; + listeners = new Set(); + constructor(e) { + this.subscribe = e; + } + addEventListener(e) { + const t = 0 === this.listeners.size; + this.listeners.add(e), + t && this.subscribe((e) => this.listeners.forEach((t) => t(e))); + } + removeEventListener(e) { + this.listeners.delete(e), + 0 === this.listeners.size && this.subscribe(null); + } + } + class ot { + subscribe; + eventHandler; + listeners = new Set(); + constructor(e, t) { + (this.subscribe = e), (this.eventHandler = t); + } + addEventListener(e) { + const t = 0 === this.listeners.size; + this.listeners.add(e), + t && + this.subscribe(async (e, t) => { + t(await this.eventHandler([...this.listeners], e)); + }); + } + removeEventListener(e) { + this.listeners.delete(e), + 0 === this.listeners.size && this.subscribe(null); + } + } + class it { + onBeforeRedirect; + onBeforeRequest; + onBeforeSendHeaders; + onCompleted; + onErrorOccurred; + onHeadersReceived; + onResponseStarted; + onSendHeaders; + constructor(e) { + (this.onBeforeRedirect = new nt(e.onBeforeRedirect.bind(e))), + (this.onBeforeRequest = new ot( + e.onBeforeRequest.bind(e), + async (e, t) => { + let r = {}; + for (const n of e) + if ( + ((r = await n(t)), + !0 === r.cancel || void 0 !== r.redirectURL) + ) + break; + return r; + } + )), + (this.onBeforeSendHeaders = new ot( + e.onBeforeSendHeaders.bind(e), + async (e, t) => { + let r = t, + n = {}; + for (const t of e) { + if (((n = await t(r)), !0 === n.cancel)) break; + if (void 0 !== n.requestHeaders) { + const e = st(n.requestHeaders); + r = { ...r, requestHeaders: e }; + } + } + return r; + } + )), + (this.onCompleted = new nt(e.onCompleted.bind(e))), + (this.onErrorOccurred = new nt(e.onErrorOccurred.bind(e))), + (this.onHeadersReceived = new ot( + e.onHeadersReceived.bind(e), + async (e, t) => { + let r = t, + n = {}; + for (const t of e) { + if (((n = await t(r)), !0 === n.cancel)) break; + if (void 0 !== n.responseHeaders) { + const e = at(n.responseHeaders); + r = { ...r, responseHeaders: e }; + } + if (void 0 !== n.statusLine) { + const { statusLine: e } = n, + t = parseInt(e.split(" ", 2)[1], 10); + r = { ...r, statusLine: e, statusCode: t }; + } + } + return r; + } + )), + (this.onResponseStarted = new nt(e.onResponseStarted.bind(e))), + (this.onSendHeaders = new nt(e.onSendHeaders.bind(e))); + } + } + const st = (e) => + Object.entries(e).reduce( + (e, [t, r]) => ((e[t] = Array.isArray(r) ? r.join(",") : r), e), + {} + ), + at = (e) => + Object.entries(e).reduce( + (e, [t, r]) => ((e[t] = Array.isArray(r) ? r : r.split(",")), e), + {} + ); + function lt(e, t) { + return (...r) => ( + (r = r.length !== t ? r.slice(0, t) : r), + (function (e, ...t) { + return o.ipcRenderer.invoke(e, ...t); + })(e, ...r) + ); + } + function ct(e, t) { + return (...r) => { + (r = r.length !== t ? r.slice(0, t) : r), + (function (e, ...t) { + o.ipcRenderer.send(e, ...t); + })(e, ...r); + }; + } + var ut, dt; + ct("select-all-window-contents", 0), + ct("update-menu-state", 1), + ct("renderer-ready", 1), + ct("execute-menu-item-by-id", 1), + lt("is-window-focused", 0), + ct("focus-window", 0), + lt("show-item-in-folder", 1), + ct("unsafe-open-directory", 1), + lt("open-external", 1), + lt("move-to-trash", 1), + lt("get-current-window-state", 0), + lt("get-current-window-zoom-factor", 0), + ct("set-window-zoom-factor", 1), + lt("check-for-updates", 1), + ct("quit-and-install-updates", 0), + ct("quit-app", 0), + ct("set-native-theme-source", 1), + lt("should-use-dark-colors", 0), + ct("minimize-window", 0), + ct("maximize-window", 0), + ct("unmaximize-window", 0), + ct("close-window", 0), + lt("is-window-maximized", 0), + lt("get-apple-action-on-double-click", 0), + ct("show-certificate-trust-dialog", 2), + lt("get-path", 1), + lt("get-app-architecture", 0), + lt("get-app-path", 0), + lt("is-running-under-arm64-translation", 0), + lt("move-to-applications-folder", 0), + ct("get-app-menu", 0), + lt("show-contextual-menu", 2), + ct("update-preferred-app-menu-item-labels", 1), + ct("uncaught-exception", 1), + ct("send-error-report", 3), + ct("update-accounts", 1), + lt("resolve-proxy", 1), + lt("is-in-application-folder", 0), + lt("show-save-dialog", 1), + lt("show-open-dialog", 1), + lt("save-guid", 1), + lt("get-guid", 0), + lt("show-notification", 3), + lt("get-notifications-permission", 0), + lt("request-notifications-permission", 0), + Error, + ((dt = ut || (ut = {}))[(dt.Sms = 0)] = "Sms"), + (dt[(dt.App = 1)] = "App"), + r(4515); + var ft = r(7891); + const ht = new ft.SemVer("3.1.0"), + pt = new ft.SemVer("3.2.0"), + mt = (new Map(), new Map()), + gt = (e) => e === jt(), + vt = (e) => /^https:\/\/[a-z0-9-]+\.ghe\.com$/i.test(e); + function yt(e) { + const t = `endpoint-version:${e}`, + r = mt.get(t); + if (void 0 !== r) return r; + const n = localStorage.getItem(t), + o = null === n ? null : ft.parse(n); + return null !== o && mt.set(t, o), o; + } + function wt(e, t, r) { + return ( + !1 !== e && + (!0 === e + ? t + : (null == r && G("Need to provide a version to compare against"), + t && ft.satisfies(r, e))) + ); + } + const bt = + ({ dotcom: e, ae: t, es: r }, n = yt) => + (o) => + wt(e, gt(o)) || + wt(t, vt(o), pt) || + wt(r, ((e) => !gt(e) && !vt(e))(o), n(o) ?? ht), + _t = + (bt({ dotcom: !1, ae: ">= 3.0.0", es: ">= 3.0.0" }), + bt({ dotcom: !0, ae: ">= 3.4.0", es: ">= 3.4.0" }), + bt({ dotcom: !0, ae: !1, es: !1 }), + bt({ dotcom: !0, ae: !1, es: !1 }), + bt({ dotcom: !0, ae: !1, es: !1 }), + bt({ dotcom: !0, ae: !1, es: !1 }), + process.env.DESKTOP_GITHUB_DOTCOM_API_ENDPOINT), + Et = process.env.DESKTOP_GITHUB_DOTCOM_HTML_URL, + St = process.env.DESKTOP_GITHUB_DOTCOM_ADDITIONAL_COOKIES; + void 0 !== St && (document.cookie += "; " + St); + var xt, Ot, Ct, Rt, Mt, At; + function jt() { + return _t && _t.length > 0 ? _t : "https://api.github.com"; + } + ("de0e3c7e9973e1c4dd77".length && + "1273305a5fc2737c2ca2911948ba24a9d961e2a3".length) || + log.warn( + "DESKTOP_OAUTH_CLIENT_ID and/or DESKTOP_OAUTH_CLIENT_SECRET is undefined. You won't be able to authenticate new users." + ), + (function (e) { + (e[(e.NotModified = 304)] = "NotModified"), + (e[(e.NotFound = 404)] = "NotFound"); + })(xt || (xt = {})), + Error, + (function (e) { + (e.Queued = "queued"), + (e.InProgress = "in_progress"), + (e.Completed = "completed"); + })(Ot || (Ot = {})), + (function (e) { + (e.ActionRequired = "action_required"), + (e.Canceled = "cancelled"), + (e.TimedOut = "timed_out"), + (e.Failure = "failure"), + (e.Neutral = "neutral"), + (e.Success = "success"), + (e.Skipped = "skipped"), + (e.Stale = "stale"); + })(Ct || (Ct = {})), + (function (e) { + (e.Creation = "creation"), + (e.Update = "update"), + (e.RequiredDeployments = "required_deployments"), + (e.RequiredSignatures = "required_signatures"), + (e.RequiredStatusChecks = "required_status_checks"), + (e.PullRequest = "pull_request"), + (e.CommitMessagePattern = "commit_message_pattern"), + (e.CommitAuthorEmailPattern = "commit_author_email_pattern"), + (e.CommitterEmailPattern = "committer_email_pattern"), + (e.BranchNamePattern = "branch_name_pattern"); + })(Rt || (Rt = {})), + (function (e) { + (e.StartsWith = "starts_with"), + (e.EndsWith = "ends_with"), + (e.Contains = "contains"), + (e.RegexMatch = "regex"); + })(Mt || (Mt = {})), + new B.Emitter(), + (function (e) { + (e[(e.Authorized = 0)] = "Authorized"), + (e[(e.Failed = 1)] = "Failed"), + (e[(e.TwoFactorAuthenticationRequired = 2)] = + "TwoFactorAuthenticationRequired"), + (e[(e.UserRequiresVerification = 3)] = "UserRequiresVerification"), + (e[(e.PersonalAccessTokenBlocked = 4)] = + "PersonalAccessTokenBlocked"), + (e[(e.Error = 5)] = "Error"), + (e[(e.EnterpriseTooOld = 6)] = "EnterpriseTooOld"), + (e[(e.WebFlowRequired = 7)] = "WebFlowRequired"); + })(At || (At = {})); + const kt = "Set spellcheck to English", + Tt = "Set spellcheck to system language"; + o.app.setAppLogsPath(), + (function () { + A.install({ + environment: "node", + handleUncaughtExceptions: !1, + retrieveSourceMap: T, + }); + const e = Error; + (N = e.prepareStackTrace), (e.prepareStackTrace = P); + })(); + let Lt = null; + const Nt = V(); + let Pt = !1, + Dt = null, + $t = []; + function It(e) { + Pt = !0; + const t = null === Lt; + Lt && (Lt.destroy(), (Lt = null)), + (function (e, t) { + if ((log.error(I(t)), Xe)) return; + (Xe = !0), + (function () { + const e = o.Menu.getApplicationMenu(); + if (e) for (const t of e.items) ge(t); + })(); + const r = new Je(e ? "launch" : "generic", t); + r.onDidLoad(() => { + r.show(); + }), + r.onFailedToLoad(async () => { + await o.dialog.showMessageBox({ + type: "error", + title: "Unrecoverable error", + message: `GitHub Desktop has encountered an unrecoverable error and will need to restart.\n\nThis has been reported to the team, but if you encounter this repeatedly please report this issue to the GitHub Desktop issue tracker.\n\n${ + t.stack || t.message + }`, + }), + o.app.relaunch(), + o.app.quit(); + }), + r.onClose(() => { + o.app.relaunch(), o.app.quit(); + }), + r.load(); + })(t, e); + } + function Ft() { + return { + uptime: ((V() - Nt) / 1e3).toFixed(3), + time: new Date().toString(), + }; + } + const Bt = "--protocol-launcher", + Ut = new Set(["x-github-client"]); + Ut.add("x-github-desktop-auth"), + Ut.add("github-windows"), + o.app.on("window-all-closed", () => {}), + process.on("uncaughtException", (e) => { + Ze((e = D(e)), Ft()), It(e); + }); + let Ht = !1; + if (process.argv.length > 1) { + const e = process.argv[1], + r = (function (e) { + switch (e) { + case "--squirrel-install": + return (async function () { + await Ie(["StartMenu", "Desktop"]), await Ne(); + })(); + case "--squirrel-updated": + return (async function () { + await (async function () { + const e = y.homedir(); + if (e) { + const n = t.join(e, "Desktop", "GitHub Desktop.lnk"); + return Ie( + (await ((r = n), + (0, g.access)(r).then(Ae()(!0), Ae()(!1)))) + ? ["StartMenu", "Desktop"] + : ["StartMenu"] + ); + } + var r; + return Ie(["StartMenu", "Desktop"]); + })(), + await Ne(); + })(); + case "--squirrel-uninstall": + return (async function () { + await $e(["--removeShortcut", Le]); + try { + const e = Oe(), + t = Pe(); + return Ce(e.filter((e) => e !== t)); + } catch (e) { + log.error( + "Failed removing bin path from PATH environment variable", + e + ); + } + })(); + case "--squirrel-obsolete": + return Promise.resolve(); + } + return null; + })(e); + r + ? ((Ht = !0), + r + .catch((t) => { + log.error(`Failed handling Squirrel event: ${e}`, t); + }) + .then(() => { + o.app.quit(); + })) + : Gt(process.argv); + } + function qt(e) { + log.info("Processing protocol url"); + const t = (function (e) { + const t = j.parse(e, !0), + r = t.hostname, + n = { name: "unknown", url: e }; + if (!r) return n; + const o = t.query, + i = r.toLowerCase(); + if ("oauth" === i) { + const e = Se(o, "code"), + t = Se(o, "state"); + return null != e && null != t + ? { name: "oauth", code: e, state: t } + : n; + } + const s = t.pathname; + if (!s || s.length <= 1) return n; + const a = s.substring(1); + if ("openrepo" === i) { + const e = Se(o, "pr"), + t = Se(o, "branch"), + r = Se(o, "filepath"); + if (null != e) { + if (!/^\d+$/.test(e)) return n; + if (null != t && !/^pr\/\d+$/.test(t)) return n; + } + return null != t && ((l = t), Ee.test(l)) + ? n + : { + name: "open-repository-from-url", + url: a, + branch: t, + pr: e, + filepath: r, + }; + } + var l; + return "openlocalrepo" === i + ? { name: "open-repository-from-path", path: decodeURIComponent(a) } + : n; + })(e); + Wt((e) => { + e.focus(), e.sendURLAction(t); + }); + } + void 0 === oe && + ((oe = (function () { + const e = [ + t.join( + y.homedir(), + "AppData", + "Roaming", + "Microsoft", + "Windows", + "Start Menu", + "Programs", + "GitHub, Inc", + "GitHub Desktop.lnk" + ), + t.join(y.homedir(), "Desktop", "GitHub Desktop.lnk"), + ]; + for (const t of e) { + const e = ne(t); + if (void 0 !== e) return e; + } + })()), + void 0 === oe && + (log.error( + "Toast activator CLSID not found in any of the shortcuts. Falling back to known CLSIDs." + ), + (oe = "{27D44D0C-A542-5B90-BCDB-AC3126048BA2}")), + log.info(`Using toast activator CLSID ${oe}`), + (0, re._R)({ toastActivatorClsid: oe })); + let zt = !1; + if (!Ht) { + const e = o.app.requestSingleInstanceLock(); + (zt = !e), + o.app.on("second-instance", (e, t, r) => { + Lt && + (Lt.isMinimized() && Lt.restore(), + Lt.isVisible() || Lt.show(), + Lt.focus()), + Gt(t); + }), + zt && o.app.quit(); + } + function Gt(e) { + log.info(`Received possible protocol arguments: ${e.length}`); + { + const t = e.filter((e) => { + try { + const t = j.parse(e); + return t.protocol && Ut.has(t.protocol.slice(0, -1)); + } catch (t) { + return log.error(`Unable to parse argument as URL: ${e}`), !1; + } + }); + e.includes(Bt) && 1 === t.length + ? qt(t[0]) + : log.error(`Malformed launch arguments received: ${e}`); + } + } + function Wt(e) { + $t ? $t.push(e) : Lt && e(Lt); + } + (function (e) { + return "browser" === e.type && _e(), !1; + })(process) && (async function () {})(), + o.app.on("will-finish-launching", () => { + o.app.on("open-url", (e, t) => { + e.preventDefault(), qt(t); + }); + }), + process.env.GITHUB_DESKTOP_DISABLE_HARDWARE_ACCELERATION && + (log.info( + "GITHUB_DESKTOP_DISABLE_HARDWARE_ACCELERATION environment variable set, disabling hardware acceleration" + ), + o.app.disableHardwareAcceleration()), + o.app.on("ready", () => { + if (zt || Ht) return; + (Dt = V() - Nt), + Ut.forEach((e) => + (function (e) { + o.app.setAsDefaultProtocolClient(e, process.execPath, [Bt]); + })(e) + ), + (function () { + const e = new ie(); + e.onClosed(() => { + (Lt = null), Pt || o.app.quit(); + }), + e.onDidLoad(() => { + e.show(), + e.sendLaunchTimingStats({ + mainReadyTime: Dt, + loadTime: e.loadTime, + rendererReadyTime: e.rendererReadyTime, + }); + const t = $t; + $t = null; + for (const r of t) r(e); + }), + e.load(), + (Lt = e); + })(); + const e = new it(o.session.defaultSession.webRequest); + !(function (e) { + const t = new Map(), + r = new Set(["devtools:", "file:", "chrome-extension:"]), + n = new Set(["authentication", "authorization", "cookie"]); + e.onBeforeRequest.addEventListener(async (e) => { + const { protocol: n, origin: o } = new URL(e.url); + return r.has(n) || t.has(e.id) || t.set(e.id, o), {}; + }), + e.onBeforeSendHeaders.addEventListener(async (e) => { + const r = t.get(e.id), + { origin: o } = new URL(e.url); + if (void 0 === r || r === o) + return { requestHeaders: e.requestHeaders }; + const i = {}; + for (const [t, r] of Object.entries(e.requestHeaders)) + n.has(t.toLowerCase()) || (i[t] = r); + return ( + log.debug(`Sanitizing cross-origin redirect to ${o}`), + { requestHeaders: i } + ); + }), + e.onCompleted.addEventListener((e) => t.delete(e.id)); + })(e), + (function (e) { + e.onBeforeSendHeaders.addEventListener(async (e) => { + const { protocol: t, host: r } = new URL(e.url); + return "wss:" === t && /(^|\.)github\.com$/.test(r) + ? { + requestHeaders: { + ...e.requestHeaders, + Origin: "https://desktop.github.com", + }, + } + : {}; + }); + })(e); + const t = (function (e) { + let t = new Map(); + return ( + e.onBeforeSendHeaders.addEventListener(async (e) => { + const { origin: r, pathname: n } = new URL(e.url), + o = t.get(r); + return o && + ((function (e) { + return e.startsWith("/api/v3/enterprise/avatars/"); + })(n) || + (function (e) { + return /^\/[^/]+\/[^/]+\/assets\/[^/]+\/[^/]+\/?$/.test(e); + })(n)) + ? { + requestHeaders: { + ...e.requestHeaders, + Authorization: `token ${o}`, + }, + } + : {}; + }), + (e) => { + t = new Map( + e.map(({ endpoint: e, token: t }) => [new URL(e).origin, t]) + ); + const r = jt(), + n = t.get(r); + n && + t.set( + (function (e) { + if (void 0 !== Et) return Et; + if (e !== jt() || _t) { + const t = j.parse(e); + return `${t.protocol}//${t.hostname}`; + } + return "https://github.com"; + })(r), + n + ); + } + ); + })(e); + o.Menu.setApplicationMenu( + ue({ + selectedShell: null, + selectedExternalEditor: null, + askForConfirmationOnRepositoryRemoval: !1, + askForConfirmationOnForcePush: !1, + }) + ), + Q("update-accounts", (e, r) => t(r)), + Q("update-preferred-app-menu-item-labels", (e, t) => { + const r = ue(t), + n = o.Menu.getApplicationMenu(); + if (null === n) + return ( + o.Menu.setApplicationMenu(r), + void (null !== Lt && Lt.sendAppMenu()) + ); + let i = !1; + for (const e of ve(r)) { + const t = e.id; + if (!t) continue; + const r = n.getMenuItemById(t); + r + ? (r.label !== e.label && (i = !0), + r.enabled !== e.enabled && + ((e.enabled = r.enabled), (i = !0))) + : (i = !0); + } + i && Lt && (o.Menu.setApplicationMenu(r), Lt.sendAppMenu()); + }), + Q("execute-menu-item-by-id", (e, t) => { + const r = o.Menu.getApplicationMenu(); + if (null === r) return; + const n = r.getMenuItemById(t); + if (n) { + const t = o.BrowserWindow.fromWebContents(e.sender) || void 0, + r = { preventDefault: () => {}, sender: e.sender }; + n.click(r, t, e.sender); + } + }), + Q("update-menu-state", (e, t) => { + let r = !1; + const n = o.Menu.getApplicationMenu(); + if (null !== n) { + for (const e of t) { + const { id: t, state: o } = e, + i = n.getMenuItemById(t); + i + ? void 0 !== o.enabled && + i.enabled !== o.enabled && + ((i.enabled = o.enabled), (r = !0)) + : G(`Unknown menu id: ${t}`); + } + r && Lt && (o.Menu.setApplicationMenu(n), Lt.sendAppMenu()); + } else log.debug("unable to get current menu, bailing out..."); + }), + ee( + "show-contextual-menu", + (e, t, r) => + new Promise(async (n) => { + const i = o.BrowserWindow.fromWebContents(e.sender) || void 0, + s = r + ? await (async function (e) { + if (void 0 !== e) + return new Promise((t) => { + e.webContents.once("context-menu", (r, n) => + t( + (function (e, t, r) { + const { + misspelledWord: n, + dictionarySuggestions: i, + } = t; + if (!n && 0 === i.length) return; + const s = new Array(); + s.push(new o.MenuItem({ type: "separator" })); + for (const e of i) + s.push( + new o.MenuItem({ + label: e, + click: () => r.replaceMisspelling(e), + }) + ); + n && + s.push( + new o.MenuItem({ + label: "Add to dictionary", + click: () => + r.session.addWordToSpellCheckerDictionary( + n + ), + }) + ); + { + const { session: e } = r, + t = (function (e, t, r) { + const n = "en-US"; + if ( + (e === n && t.includes(n)) || + !r.includes(e) + ) + return null; + const o = + t.includes(n) && !t.includes(e) + ? e + : n; + return { + label: o === n ? kt : Tt, + languages: [o], + }; + })( + o.app.getLocale(), + e.getSpellCheckerLanguages(), + e.availableSpellCheckerLanguages + ); + null !== t && + s.push( + new o.MenuItem({ + label: t.label, + click: () => + e.setSpellCheckerLanguages( + t.languages + ), + }) + ); + } + return s; + })(0, n, e.webContents) + ) + ); + }); + })(i) + : void 0; + tt(t, (e) => n(e), s).popup({ + window: i, + callback: () => n(null), + }); + }) + ), + ee("check-for-updates", async (e, t) => Lt?.checkForUpdates(t)), + Q("quit-and-install-updates", () => Lt?.quitAndInstallUpdate()), + Q("quit-app", () => o.app.quit()), + Q("minimize-window", () => Lt?.minimizeWindow()), + Q("maximize-window", () => Lt?.maximizeWindow()), + Q("unmaximize-window", () => Lt?.unmaximizeWindow()), + Q("close-window", () => Lt?.closeWindow()), + ee("is-window-maximized", async () => Lt?.isMaximized() ?? !1), + ee("get-apple-action-on-double-click", async () => + o.systemPreferences.getUserDefault( + "AppleActionOnDoubleClick", + "string" + ) + ), + ee("get-current-window-state", async () => + Lt?.getCurrentWindowState() + ), + ee("get-current-window-zoom-factor", async () => + Lt?.getCurrentWindowZoomFactor() + ), + Q("set-window-zoom-factor", (e, t) => Lt?.setWindowZoomFactor(t)), + Q("get-app-menu", () => Lt?.sendAppMenu()), + Q("show-certificate-trust-dialog", (e, t, r) => { + Wt((e) => { + e.showCertificateTrustDialog(t, r); + }); + }), + Q("log", (e, t, r) => M(t, r)), + Q("uncaught-exception", (e, t) => It(t)), + Q("send-error-report", (e, t, r, n) => { + Ze(t, { ...Ft(), ...r }, n); + }), + ee("open-external", async (e, t) => { + const r = t.toLowerCase(); + (r.startsWith("http://") || r.startsWith("https://")) && + log.info(`opening in browser: ${t}`); + try { + return await o.shell.openExternal(t), !0; + } catch (e) { + return log.error(`Call to openExternal failed: '${e}'`), !1; + } + }), + ee("get-path", async (e, t) => o.app.getPath(t)), + ee("get-app-architecture", async () => Fe(o.app)), + ee("get-app-path", async () => o.app.getAppPath()), + ee("is-running-under-arm64-translation", async () => Be(o.app)), + ee("move-to-applications-folder", async () => { + o.app.moveToApplicationsFolder?.(); + }), + ee("move-to-trash", (e, t) => o.shell.trashItem(t)), + ee("show-item-in-folder", async (e, t) => + o.shell.showItemInFolder(t) + ), + Q("unsafe-open-directory", async (e, t) => le(t)), + Q("select-all-window-contents", () => Lt?.selectAllWindowContents()), + ee( + "is-in-application-folder", + async () => o.app.isInApplicationsFolder?.() ?? null + ), + ee("resolve-proxy", async (e, t) => + o.session.defaultSession.resolveProxy(t) + ), + ee("show-save-dialog", async (e, t) => Lt?.showSaveDialog(t) ?? null), + ee("show-open-dialog", async (e, t) => Lt?.showOpenDialog(t) ?? null), + ee("is-window-focused", async () => Lt?.isFocused() ?? !1), + Q("focus-window", () => { + Lt?.focus(); + }), + Q("set-native-theme-source", (e, t) => { + o.nativeTheme.themeSource = t; + }), + ee( + "should-use-dark-colors", + async () => o.nativeTheme.shouldUseDarkColors + ), + ee("get-guid", () => We()), + ee("save-guid", (e, t) => Ye(t)), + ee("show-notification", async (e, t, r, n) => (0, re.c0)(t, r, n)), + ee("get-notifications-permission", async () => (0, re.X)()), + ee("request-notifications-permission", async () => (0, re.QJ)()); + }), + o.app.on("activate", () => { + Wt((e) => { + e.show(); + }); + }), + o.app.on("web-contents-created", (e, t) => { + t.setWindowOpenHandler( + ({ url: e }) => ( + log.warn(`Prevented new window to: ${e}`), { action: "deny" } + ) + ), + t.on("will-navigate", (e, t) => { + e.preventDefault(), log.warn(`Prevented navigation to: ${t}`); + }); + }), + o.app.on("certificate-error", (e, t, r, n, o, i) => { + i(!1), + Wt((e) => { + e.sendCertificateError(o, n, r); + }); + }); + })(), + (module.exports.main = n); +})(); +//# sourceMappingURL=main.js.map diff --git a/app-3.3.11/resources/app/renderer.js b/app-3.3.11/resources/app/renderer.js new file mode 100644 index 0000000..48a0171 --- /dev/null +++ b/app-3.3.11/resources/app/renderer.js @@ -0,0 +1,121324 @@ +/*! For license information please see renderer.js.LICENSE.txt */ +(() => { + var e = { + 8469: (e, t, n) => { + "use strict"; + n(8734); + const r = async (e) => { + throw new Error("macOS only"); + }; + (e.exports = r), + (e.exports.default = r), + (e.exports.sync = (e) => { + throw new Error("macOS only"); + }); + }, + 9159: (e, t, n) => { + e.exports = { default: n(1958), __esModule: !0 }; + }, + 9364: (e, t, n) => { + e.exports = { default: n(5417), __esModule: !0 }; + }, + 6521: (e, t, n) => { + e.exports = { default: n(9460), __esModule: !0 }; + }, + 9042: (e, t, n) => { + e.exports = { default: n(2665), __esModule: !0 }; + }, + 1698: (e, t, n) => { + e.exports = { default: n(8013), __esModule: !0 }; + }, + 4578: (e, t, n) => { + e.exports = { default: n(292), __esModule: !0 }; + }, + 7133: (e, t, n) => { + e.exports = { default: n(6171), __esModule: !0 }; + }, + 659: (e, t, n) => { + e.exports = { default: n(8481), __esModule: !0 }; + }, + 6684: (e, t, n) => { + e.exports = { default: n(5738), __esModule: !0 }; + }, + 5682: (e, t) => { + "use strict"; + t.Z = function (e, t) { + if (!(e instanceof t)) + throw new TypeError("Cannot call a class as a function"); + }; + }, + 5256: (e, t, n) => { + "use strict"; + var r, + i = (r = n(6521)) && r.__esModule ? r : { default: r }; + t.Z = (function () { + function e(e, t) { + for (var n = 0; n < t.length; n++) { + var r = t[n]; + (r.enumerable = r.enumerable || !1), + (r.configurable = !0), + "value" in r && (r.writable = !0), + (0, i.default)(e, r.key, r); + } + } + return function (t, n, r) { + return n && e(t.prototype, n), r && e(t, r), t; + }; + })(); + }, + 6218: (e, t, n) => { + "use strict"; + var r, + i = (r = n(9159)) && r.__esModule ? r : { default: r }; + t.Z = + i.default || + function (e) { + for (var t = 1; t < arguments.length; t++) { + var n = arguments[t]; + for (var r in n) + Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]); + } + return e; + }; + }, + 4122: (e, t, n) => { + "use strict"; + var r = s(n(7133)), + i = s(n(9364)), + o = s(n(7158)); + function s(e) { + return e && e.__esModule ? e : { default: e }; + } + t.Z = function (e, t) { + if ("function" != typeof t && null !== t) + throw new TypeError( + "Super expression must either be null or a function, not " + + (void 0 === t ? "undefined" : (0, o.default)(t)) + ); + (e.prototype = (0, i.default)(t && t.prototype, { + constructor: { + value: e, + enumerable: !1, + writable: !0, + configurable: !0, + }, + })), + t && (r.default ? (0, r.default)(e, t) : (e.__proto__ = t)); + }; + }, + 9326: (e, t) => { + "use strict"; + t.Z = function (e, t) { + var n = {}; + for (var r in e) + t.indexOf(r) >= 0 || + (Object.prototype.hasOwnProperty.call(e, r) && (n[r] = e[r])); + return n; + }; + }, + 9002: (e, t, n) => { + "use strict"; + var r, + i = (r = n(7158)) && r.__esModule ? r : { default: r }; + t.Z = function (e, t) { + if (!e) + throw new ReferenceError( + "this hasn't been initialised - super() hasn't been called" + ); + return !t || + ("object" !== (void 0 === t ? "undefined" : (0, i.default)(t)) && + "function" != typeof t) + ? e + : t; + }; + }, + 7158: (e, t, n) => { + "use strict"; + t.__esModule = !0; + var r = s(n(6684)), + i = s(n(659)), + o = + "function" == typeof i.default && "symbol" == typeof r.default + ? function (e) { + return typeof e; + } + : function (e) { + return e && + "function" == typeof i.default && + e.constructor === i.default && + e !== i.default.prototype + ? "symbol" + : typeof e; + }; + function s(e) { + return e && e.__esModule ? e : { default: e }; + } + t.default = + "function" == typeof i.default && "symbol" === o(r.default) + ? function (e) { + return void 0 === e ? "undefined" : o(e); + } + : function (e) { + return e && + "function" == typeof i.default && + e.constructor === i.default && + e !== i.default.prototype + ? "symbol" + : void 0 === e + ? "undefined" + : o(e); + }; + }, + 8122: (e, t, n) => { + var r = n(2781), + i = n(3837), + o = n(9512); + function s(e, t) { + if (!e) throw new Error("expected readStream"); + if (!e.readable) throw new Error("readStream must be readable"); + var n = new a(t); + return e.pipe(n), n; + } + function a(e) { + r.Transform.call(this, e), + (e = e || {}), + (this._readableState.objectMode = !0), + (this._lineBuffer = []), + (this._keepEmptyLines = e.keepEmptyLines || !1), + (this._lastChunkEndedWithCR = !1); + var t = this; + this.on("pipe", function (e) { + t.encoding || + (e instanceof r.Readable && + (t.encoding = e._readableState.encoding)); + }); + } + (e.exports = function (t, n) { + return e.exports.createStream(t, n); + }), + (e.exports.createStream = function (e, t) { + return e ? s(e, t) : new a(t); + }), + (e.exports.createLineStream = function (e) { + return ( + console.log( + "WARNING: byline#createLineStream is deprecated and will be removed soon" + ), + s(e) + ); + }), + (e.exports.LineStream = a), + i.inherits(a, r.Transform), + (a.prototype._transform = function (e, t, n) { + (t = t || "utf8"), + Buffer.isBuffer(e) && + ("buffer" == t + ? ((e = e.toString()), (t = "utf8")) + : (e = e.toString(t))), + (this._chunkEncoding = t); + var r = e.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/g); + this._lastChunkEndedWithCR && "\n" == e[0] && r.shift(), + this._lineBuffer.length > 0 && + ((this._lineBuffer[this._lineBuffer.length - 1] += r[0]), + r.shift()), + (this._lastChunkEndedWithCR = "\r" == e[e.length - 1]), + (this._lineBuffer = this._lineBuffer.concat(r)), + this._pushBuffer(t, 1, n); + }), + (a.prototype._pushBuffer = function (e, t, n) { + for (; this._lineBuffer.length > t; ) { + var r = this._lineBuffer.shift(); + if ( + (this._keepEmptyLines || r.length > 0) && + !this.push(this._reencode(r, e)) + ) { + var i = this; + return void o.setImmediate(function () { + i._pushBuffer(e, t, n); + }); + } + } + n(); + }), + (a.prototype._flush = function (e) { + this._pushBuffer(this._chunkEncoding, 0, e); + }), + (a.prototype._reencode = function (e, t) { + return this.encoding && this.encoding != t + ? new Buffer(e, t).toString(this.encoding) + : this.encoding + ? e + : new Buffer(e, t); + }); + }, + 5402: (e) => { + e.exports = function () { + for (var e = arguments.length, t = [], n = 0; n < e; n++) + t[n] = arguments[n]; + if ( + 0 !== + (t = t.filter(function (e) { + return null != e; + })).length + ) + return 1 === t.length + ? t[0] + : t.reduce(function (e, t) { + return function () { + e.apply(this, arguments), t.apply(this, arguments); + }; + }); + }; + }, + 8076: (e, t) => { + var n; + !(function () { + "use strict"; + var r = {}.hasOwnProperty; + function i() { + for (var e = [], t = 0; t < arguments.length; t++) { + var n = arguments[t]; + if (n) { + var o = typeof n; + if ("string" === o || "number" === o) e.push(n); + else if (Array.isArray(n)) e.push(i.apply(null, n)); + else if ("object" === o) + for (var s in n) r.call(n, s) && n[s] && e.push(s); + } + } + return e.join(" "); + } + e.exports + ? (e.exports = i) + : void 0 === + (n = function () { + return i; + }.apply(t, [])) || (e.exports = n); + })(); + }, + 4309: (e, t, n) => { + !(function (e) { + function t(t, n, r) { + var i, + o = t.getWrapperElement(); + return ( + ((i = o.appendChild(document.createElement("div"))).className = r + ? "CodeMirror-dialog CodeMirror-dialog-bottom" + : "CodeMirror-dialog CodeMirror-dialog-top"), + "string" == typeof n ? (i.innerHTML = n) : i.appendChild(n), + e.addClass(o, "dialog-opened"), + i + ); + } + function n(e, t) { + e.state.currentNotificationClose && + e.state.currentNotificationClose(), + (e.state.currentNotificationClose = t); + } + e.defineExtension("openDialog", function (r, i, o) { + o || (o = {}), n(this, null); + var s = t(this, r, o.bottom), + a = !1, + l = this; + function c(t) { + if ("string" == typeof t) h.value = t; + else { + if (a) return; + (a = !0), + e.rmClass(s.parentNode, "dialog-opened"), + s.parentNode.removeChild(s), + l.focus(), + o.onClose && o.onClose(s); + } + } + var u, + h = s.getElementsByTagName("input")[0]; + return ( + h + ? (h.focus(), + o.value && + ((h.value = o.value), + !1 !== o.selectValueOnOpen && h.select()), + o.onInput && + e.on(h, "input", function (e) { + o.onInput(e, h.value, c); + }), + o.onKeyUp && + e.on(h, "keyup", function (e) { + o.onKeyUp(e, h.value, c); + }), + e.on(h, "keydown", function (t) { + (o && o.onKeyDown && o.onKeyDown(t, h.value, c)) || + ((27 == t.keyCode || + (!1 !== o.closeOnEnter && 13 == t.keyCode)) && + (h.blur(), e.e_stop(t), c()), + 13 == t.keyCode && i(h.value, t)); + }), + !1 !== o.closeOnBlur && + e.on(s, "focusout", function (e) { + null !== e.relatedTarget && c(); + })) + : (u = s.getElementsByTagName("button")[0]) && + (e.on(u, "click", function () { + c(), l.focus(); + }), + !1 !== o.closeOnBlur && e.on(u, "blur", c), + u.focus()), + c + ); + }), + e.defineExtension("openConfirm", function (r, i, o) { + n(this, null); + var s = t(this, r, o && o.bottom), + a = s.getElementsByTagName("button"), + l = !1, + c = this, + u = 1; + function h() { + l || + ((l = !0), + e.rmClass(s.parentNode, "dialog-opened"), + s.parentNode.removeChild(s), + c.focus()); + } + a[0].focus(); + for (var p = 0; p < a.length; ++p) { + var d = a[p]; + !(function (t) { + e.on(d, "click", function (n) { + e.e_preventDefault(n), h(), t && t(c); + }); + })(i[p]), + e.on(d, "blur", function () { + --u, + setTimeout(function () { + u <= 0 && h(); + }, 200); + }), + e.on(d, "focus", function () { + ++u; + }); + } + }), + e.defineExtension("openNotification", function (r, i) { + n(this, c); + var o, + s = t(this, r, i && i.bottom), + a = !1, + l = i && void 0 !== i.duration ? i.duration : 5e3; + function c() { + a || + ((a = !0), + clearTimeout(o), + e.rmClass(s.parentNode, "dialog-opened"), + s.parentNode.removeChild(s)); + } + return ( + e.on(s, "click", function (t) { + e.e_preventDefault(t), c(); + }), + l && (o = setTimeout(c, l)), + c + ); + }); + })(n(4045)); + }, + 9659: (e, t, n) => { + !(function (e) { + "use strict"; + function t(e, t) { + if ( + ((this.cm = e), + (this.options = t), + (this.widget = null), + (this.debounce = 0), + (this.tick = 0), + (this.startPos = this.cm.getCursor("start")), + (this.startLen = + this.cm.getLine(this.startPos.line).length - + this.cm.getSelection().length), + this.options.updateOnCursorActivity) + ) { + var n = this; + e.on( + "cursorActivity", + (this.activityFunc = function () { + n.cursorActivity(); + }) + ); + } + } + (e.showHint = function (e, t, n) { + if (!t) return e.showHint(n); + n && n.async && (t.async = !0); + var r = { hint: t }; + if (n) for (var i in n) r[i] = n[i]; + return e.showHint(r); + }), + e.defineExtension("showHint", function (n) { + n = (function (e, t, n) { + var r = e.options.hintOptions, + i = {}; + for (var o in l) i[o] = l[o]; + if (r) for (var o in r) void 0 !== r[o] && (i[o] = r[o]); + if (n) for (var o in n) void 0 !== n[o] && (i[o] = n[o]); + return i.hint.resolve && (i.hint = i.hint.resolve(e, t)), i; + })(this, this.getCursor("start"), n); + var r = this.listSelections(); + if (!(r.length > 1)) { + if (this.somethingSelected()) { + if (!n.hint.supportsSelection) return; + for (var i = 0; i < r.length; i++) + if (r[i].head.line != r[i].anchor.line) return; + } + this.state.completionActive && + this.state.completionActive.close(); + var o = (this.state.completionActive = new t(this, n)); + o.options.hint && + (e.signal(this, "startCompletion", this), o.update(!0)); + } + }), + e.defineExtension("closeHint", function () { + this.state.completionActive && + this.state.completionActive.close(); + }); + var n = + window.requestAnimationFrame || + function (e) { + return setTimeout(e, 1e3 / 60); + }, + r = window.cancelAnimationFrame || clearTimeout; + function i(e) { + return "string" == typeof e ? e : e.text; + } + function o(e, t) { + for (; t && t != e; ) { + if ("LI" === t.nodeName.toUpperCase() && t.parentNode == e) + return t; + t = t.parentNode; + } + } + function s(t, n) { + (this.completion = t), (this.data = n), (this.picked = !1); + var r = this, + s = t.cm, + a = s.getInputField().ownerDocument, + l = a.defaultView || a.parentWindow, + c = (this.hints = a.createElement("ul")), + u = t.cm.options.theme; + (c.className = "CodeMirror-hints " + u), + (this.selectedHint = n.selectedHint || 0); + for (var h = n.list, p = 0; p < h.length; ++p) { + var d = c.appendChild(a.createElement("li")), + m = h[p], + f = + "CodeMirror-hint" + + (p != this.selectedHint ? "" : " CodeMirror-hint-active"); + null != m.className && (f = m.className + " " + f), + (d.className = f), + m.render + ? m.render(d, n, m) + : d.appendChild(a.createTextNode(m.displayText || i(m))), + (d.hintId = p); + } + var g = t.options.container || a.body, + y = s.cursorCoords(t.options.alignWithWord ? n.from : null), + b = y.left, + v = y.bottom, + w = !0, + C = 0, + S = 0; + if (g !== a.body) { + var E = + -1 !== + ["absolute", "relative", "fixed"].indexOf( + l.getComputedStyle(g).position + ) + ? g + : g.offsetParent, + k = E.getBoundingClientRect(), + R = a.body.getBoundingClientRect(); + (C = k.left - R.left - E.scrollLeft), + (S = k.top - R.top - E.scrollTop); + } + (c.style.left = b - C + "px"), (c.style.top = v - S + "px"); + var x = + l.innerWidth || + Math.max(a.body.offsetWidth, a.documentElement.offsetWidth), + T = + l.innerHeight || + Math.max(a.body.offsetHeight, a.documentElement.offsetHeight); + g.appendChild(c); + var D, + A = t.options.moveOnOverlap + ? c.getBoundingClientRect() + : new DOMRect(), + _ = + !!t.options.paddingForScrollbar && + c.scrollHeight > c.clientHeight + 1; + if ( + (setTimeout(function () { + D = s.getScrollInfo(); + }), + A.bottom - T > 0) + ) { + var P = A.bottom - A.top; + if (y.top - (y.bottom - A.top) - P > 0) + (c.style.top = (v = y.top - P - S) + "px"), (w = !1); + else if (P > T) { + (c.style.height = T - 5 + "px"), + (c.style.top = (v = y.bottom - A.top - S) + "px"); + var I = s.getCursor(); + n.from.ch != I.ch && + ((y = s.cursorCoords(I)), + (c.style.left = (b = y.left - C) + "px"), + (A = c.getBoundingClientRect())); + } + } + var O, + N = A.right - x; + if ( + (N > 0 && + (A.right - A.left > x && + ((c.style.width = x - 5 + "px"), (N -= A.right - A.left - x)), + (c.style.left = (b = y.left - N - C) + "px")), + _) + ) + for (var M = c.firstChild; M; M = M.nextSibling) + M.style.paddingRight = s.display.nativeBarWidth + "px"; + s.addKeyMap( + (this.keyMap = (function (e, t) { + var n = { + Up: function () { + t.moveFocus(-1); + }, + Down: function () { + t.moveFocus(1); + }, + PageUp: function () { + t.moveFocus(1 - t.menuSize(), !0); + }, + PageDown: function () { + t.moveFocus(t.menuSize() - 1, !0); + }, + Home: function () { + t.setFocus(0); + }, + End: function () { + t.setFocus(t.length - 1); + }, + Enter: t.pick, + Tab: t.pick, + Esc: t.close, + }; + /Mac/.test(navigator.platform) && + ((n["Ctrl-P"] = function () { + t.moveFocus(-1); + }), + (n["Ctrl-N"] = function () { + t.moveFocus(1); + })); + var r = e.options.customKeys, + i = r ? {} : n; + function o(e, r) { + var o; + (o = + "string" != typeof r + ? function (e) { + return r(e, t); + } + : n.hasOwnProperty(r) + ? n[r] + : r), + (i[e] = o); + } + if (r) for (var s in r) r.hasOwnProperty(s) && o(s, r[s]); + var a = e.options.extraKeys; + if (a) for (var s in a) a.hasOwnProperty(s) && o(s, a[s]); + return i; + })(t, { + moveFocus: function (e, t) { + r.changeActive(r.selectedHint + e, t); + }, + setFocus: function (e) { + r.changeActive(e); + }, + menuSize: function () { + return r.screenAmount(); + }, + length: h.length, + close: function () { + t.close(); + }, + pick: function () { + r.pick(); + }, + data: n, + })) + ), + t.options.closeOnUnfocus && + (s.on( + "blur", + (this.onBlur = function () { + O = setTimeout(function () { + t.close(); + }, 100); + }) + ), + s.on( + "focus", + (this.onFocus = function () { + clearTimeout(O); + }) + )), + s.on( + "scroll", + (this.onScroll = function () { + var e = s.getScrollInfo(), + n = s.getWrapperElement().getBoundingClientRect(), + r = v + D.top - e.top, + i = + r - + (l.pageYOffset || + (a.documentElement || a.body).scrollTop); + if ((w || (i += c.offsetHeight), i <= n.top || i >= n.bottom)) + return t.close(); + (c.style.top = r + "px"), + (c.style.left = b + D.left - e.left + "px"); + }) + ), + e.on(c, "dblclick", function (e) { + var t = o(c, e.target || e.srcElement); + t && null != t.hintId && (r.changeActive(t.hintId), r.pick()); + }), + e.on(c, "click", function (e) { + var n = o(c, e.target || e.srcElement); + n && + null != n.hintId && + (r.changeActive(n.hintId), + t.options.completeOnSingleClick && r.pick()); + }), + e.on(c, "mousedown", function () { + setTimeout(function () { + s.focus(); + }, 20); + }); + var B = this.getSelectedHintRange(); + return ( + (0 === B.from && 0 === B.to) || this.scrollToActive(), + e.signal( + n, + "select", + h[this.selectedHint], + c.childNodes[this.selectedHint] + ), + !0 + ); + } + function a(e, t, n, r) { + if (e.async) e(t, r, n); + else { + var i = e(t, n); + i && i.then ? i.then(r) : r(i); + } + } + (t.prototype = { + close: function () { + this.active() && + ((this.cm.state.completionActive = null), + (this.tick = null), + this.options.updateOnCursorActivity && + this.cm.off("cursorActivity", this.activityFunc), + this.widget && this.data && e.signal(this.data, "close"), + this.widget && this.widget.close(), + e.signal(this.cm, "endCompletion", this.cm)); + }, + active: function () { + return this.cm.state.completionActive == this; + }, + pick: function (t, n) { + var r = t.list[n], + o = this; + this.cm.operation(function () { + r.hint + ? r.hint(o.cm, t, r) + : o.cm.replaceRange( + i(r), + r.from || t.from, + r.to || t.to, + "complete" + ), + e.signal(t, "pick", r), + o.cm.scrollIntoView(); + }), + this.options.closeOnPick && this.close(); + }, + cursorActivity: function () { + this.debounce && (r(this.debounce), (this.debounce = 0)); + var e = this.startPos; + this.data && (e = this.data.from); + var t = this.cm.getCursor(), + i = this.cm.getLine(t.line); + if ( + t.line != this.startPos.line || + i.length - t.ch != this.startLen - this.startPos.ch || + t.ch < e.ch || + this.cm.somethingSelected() || + !t.ch || + this.options.closeCharacters.test(i.charAt(t.ch - 1)) + ) + this.close(); + else { + var o = this; + (this.debounce = n(function () { + o.update(); + })), + this.widget && this.widget.disable(); + } + }, + update: function (e) { + if (null != this.tick) { + var t = this, + n = ++this.tick; + a(this.options.hint, this.cm, this.options, function (r) { + t.tick == n && t.finishUpdate(r, e); + }); + } + }, + finishUpdate: function (t, n) { + this.data && e.signal(this.data, "update"); + var r = + (this.widget && this.widget.picked) || + (n && this.options.completeSingle); + this.widget && this.widget.close(), + (this.data = t), + t && + t.list.length && + (r && 1 == t.list.length + ? this.pick(t, 0) + : ((this.widget = new s(this, t)), e.signal(t, "shown"))); + }, + }), + (s.prototype = { + close: function () { + if (this.completion.widget == this) { + (this.completion.widget = null), + this.hints.parentNode && + this.hints.parentNode.removeChild(this.hints), + this.completion.cm.removeKeyMap(this.keyMap); + var e = this.completion.cm; + this.completion.options.closeOnUnfocus && + (e.off("blur", this.onBlur), e.off("focus", this.onFocus)), + e.off("scroll", this.onScroll); + } + }, + disable: function () { + this.completion.cm.removeKeyMap(this.keyMap); + var e = this; + (this.keyMap = { + Enter: function () { + e.picked = !0; + }, + }), + this.completion.cm.addKeyMap(this.keyMap); + }, + pick: function () { + this.completion.pick(this.data, this.selectedHint); + }, + changeActive: function (t, n) { + if ( + (t >= this.data.list.length + ? (t = n ? this.data.list.length - 1 : 0) + : t < 0 && (t = n ? 0 : this.data.list.length - 1), + this.selectedHint != t) + ) { + var r = this.hints.childNodes[this.selectedHint]; + r && + (r.className = r.className.replace( + " CodeMirror-hint-active", + "" + )), + ((r = + this.hints.childNodes[ + (this.selectedHint = t) + ]).className += " CodeMirror-hint-active"), + this.scrollToActive(), + e.signal( + this.data, + "select", + this.data.list[this.selectedHint], + r + ); + } + }, + scrollToActive: function () { + var e = this.getSelectedHintRange(), + t = this.hints.childNodes[e.from], + n = this.hints.childNodes[e.to], + r = this.hints.firstChild; + t.offsetTop < this.hints.scrollTop + ? (this.hints.scrollTop = t.offsetTop - r.offsetTop) + : n.offsetTop + n.offsetHeight > + this.hints.scrollTop + this.hints.clientHeight && + (this.hints.scrollTop = + n.offsetTop + + n.offsetHeight - + this.hints.clientHeight + + r.offsetTop); + }, + screenAmount: function () { + return ( + Math.floor( + this.hints.clientHeight / this.hints.firstChild.offsetHeight + ) || 1 + ); + }, + getSelectedHintRange: function () { + var e = this.completion.options.scrollMargin || 0; + return { + from: Math.max(0, this.selectedHint - e), + to: Math.min( + this.data.list.length - 1, + this.selectedHint + e + ), + }; + }, + }), + e.registerHelper("hint", "auto", { + resolve: function (t, n) { + var r, + i = t.getHelpers(n, "hint"); + if (i.length) { + var o = function (e, t, n) { + var r = (function (e, t) { + if (!e.somethingSelected()) return t; + for (var n = [], r = 0; r < t.length; r++) + t[r].supportsSelection && n.push(t[r]); + return n; + })(e, i); + !(function i(o) { + if (o == r.length) return t(null); + a(r[o], e, n, function (e) { + e && e.list.length > 0 ? t(e) : i(o + 1); + }); + })(0); + }; + return (o.async = !0), (o.supportsSelection = !0), o; + } + return (r = t.getHelper(t.getCursor(), "hintWords")) + ? function (t) { + return e.hint.fromList(t, { words: r }); + } + : e.hint.anyword + ? function (t, n) { + return e.hint.anyword(t, n); + } + : function () {}; + }, + }), + e.registerHelper("hint", "fromList", function (t, n) { + var r, + i = t.getCursor(), + o = t.getTokenAt(i), + s = e.Pos(i.line, o.start), + a = i; + o.start < i.ch && /\w/.test(o.string.charAt(i.ch - o.start - 1)) + ? (r = o.string.substr(0, i.ch - o.start)) + : ((r = ""), (s = i)); + for (var l = [], c = 0; c < n.words.length; c++) { + var u = n.words[c]; + u.slice(0, r.length) == r && l.push(u); + } + if (l.length) return { list: l, from: s, to: a }; + }), + (e.commands.autocomplete = e.showHint); + var l = { + hint: e.hint.auto, + completeSingle: !0, + alignWithWord: !0, + closeCharacters: /[\s()\[\]{};:>,]/, + closeOnPick: !0, + closeOnUnfocus: !0, + updateOnCursorActivity: !0, + completeOnSingleClick: !0, + container: null, + customKeys: null, + extraKeys: null, + paddingForScrollbar: !0, + moveOnOverlap: !0, + }; + e.defineOption("hintOptions", null); + })(n(4045)); + }, + 8272: (e, t, n) => { + !(function (e) { + "use strict"; + function t(t, n, r) { + (this.orientation = n), + (this.scroll = r), + (this.screen = this.total = this.size = 1), + (this.pos = 0), + (this.node = document.createElement("div")), + (this.node.className = t + "-" + n), + (this.inner = this.node.appendChild( + document.createElement("div") + )); + var i = this; + function o(t) { + var n = + e.wheelEventPixels(t)[ + "horizontal" == i.orientation ? "x" : "y" + ], + r = i.pos; + i.moveTo(i.pos + n), i.pos != r && e.e_preventDefault(t); + } + e.on(this.inner, "mousedown", function (t) { + if (1 == t.which) { + e.e_preventDefault(t); + var n = "horizontal" == i.orientation ? "pageX" : "pageY", + r = t[n], + o = i.pos; + e.on(document, "mousemove", a), e.on(document, "mouseup", s); + } + function s() { + e.off(document, "mousemove", a), e.off(document, "mouseup", s); + } + function a(e) { + if (1 != e.which) return s(); + i.moveTo(o + (e[n] - r) * (i.total / i.size)); + } + }), + e.on(this.node, "click", function (t) { + e.e_preventDefault(t); + var n, + r = i.inner.getBoundingClientRect(); + (n = + "horizontal" == i.orientation + ? t.clientX < r.left + ? -1 + : t.clientX > r.right + ? 1 + : 0 + : t.clientY < r.top + ? -1 + : t.clientY > r.bottom + ? 1 + : 0), + i.moveTo(i.pos + n * i.screen); + }), + e.on(this.node, "mousewheel", o), + e.on(this.node, "DOMMouseScroll", o); + } + (t.prototype.setPos = function (e, t) { + return ( + e < 0 && (e = 0), + e > this.total - this.screen && (e = this.total - this.screen), + !( + (!t && e == this.pos) || + ((this.pos = e), + (this.inner.style[ + "horizontal" == this.orientation ? "left" : "top" + ] = e * (this.size / this.total) + "px"), + 0) + ) + ); + }), + (t.prototype.moveTo = function (e) { + this.setPos(e) && this.scroll(e, this.orientation); + }); + function n(e, n, r) { + (this.addClass = e), + (this.horiz = new t(e, "horizontal", r)), + n(this.horiz.node), + (this.vert = new t(e, "vertical", r)), + n(this.vert.node), + (this.width = null); + } + (t.prototype.update = function (e, t, n) { + var r = this.screen != t || this.total != e || this.size != n; + r && ((this.screen = t), (this.total = e), (this.size = n)); + var i = this.screen * (this.size / this.total); + i < 10 && ((this.size -= 10 - i), (i = 10)), + (this.inner.style[ + "horizontal" == this.orientation ? "width" : "height" + ] = i + "px"), + this.setPos(this.pos, r); + }), + (n.prototype.update = function (e) { + if (null == this.width) { + var t = window.getComputedStyle + ? window.getComputedStyle(this.horiz.node) + : this.horiz.node.currentStyle; + t && (this.width = parseInt(t.height)); + } + var n = this.width || 0, + r = e.scrollWidth > e.clientWidth + 1, + i = e.scrollHeight > e.clientHeight + 1; + return ( + (this.vert.node.style.display = i ? "block" : "none"), + (this.horiz.node.style.display = r ? "block" : "none"), + i && + (this.vert.update( + e.scrollHeight, + e.clientHeight, + e.viewHeight - (r ? n : 0) + ), + (this.vert.node.style.bottom = r ? n + "px" : "0")), + r && + (this.horiz.update( + e.scrollWidth, + e.clientWidth, + e.viewWidth - (i ? n : 0) - e.barLeft + ), + (this.horiz.node.style.right = i ? n + "px" : "0"), + (this.horiz.node.style.left = e.barLeft + "px")), + { right: i ? n : 0, bottom: r ? n : 0 } + ); + }), + (n.prototype.setScrollTop = function (e) { + this.vert.setPos(e); + }), + (n.prototype.setScrollLeft = function (e) { + this.horiz.setPos(e); + }), + (n.prototype.clear = function () { + var e = this.horiz.node.parentNode; + e.removeChild(this.horiz.node), e.removeChild(this.vert.node); + }), + (e.scrollbarModel.simple = function (e, t) { + return new n("CodeMirror-simplescroll", e, t); + }), + (e.scrollbarModel.overlay = function (e, t) { + return new n("CodeMirror-overlayscroll", e, t); + }); + })(n(4045)); + }, + 9356: (e, t, n) => { + !(function (e) { + "use strict"; + function t() { + (this.posFrom = this.posTo = this.lastQuery = this.query = null), + (this.overlay = null); + } + function n(e) { + return e.state.search || (e.state.search = new t()); + } + function r(e) { + return "string" == typeof e && e == e.toLowerCase(); + } + function i(e, t, n) { + return e.getSearchCursor(t, n, { caseFold: r(t), multiline: !0 }); + } + function o(e, t, n, r, i) { + e.openDialog + ? e.openDialog(t, i, { + value: r, + selectValueOnOpen: !0, + bottom: e.options.search.bottom, + }) + : i(prompt(n, r)); + } + function s(e) { + return e.replace(/\\([nrt\\])/g, function (e, t) { + return "n" == t + ? "\n" + : "r" == t + ? "\r" + : "t" == t + ? "\t" + : "\\" == t + ? "\\" + : e; + }); + } + function a(e) { + var t = e.match(/^\/(.*)\/([a-z]*)$/); + if (t) + try { + e = new RegExp(t[1], -1 == t[2].indexOf("i") ? "" : "i"); + } catch (e) {} + else e = s(e); + return ( + ("string" == typeof e ? "" == e : e.test("")) && (e = /x^/), e + ); + } + function l(e, t, n) { + (t.queryText = n), + (t.query = a(n)), + e.removeOverlay(t.overlay, r(t.query)), + (t.overlay = (function (e, t) { + return ( + "string" == typeof e + ? (e = new RegExp( + e.replace( + /[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, + "\\$&" + ), + t ? "gi" : "g" + )) + : e.global || + (e = new RegExp(e.source, e.ignoreCase ? "gi" : "g")), + { + token: function (t) { + e.lastIndex = t.pos; + var n = e.exec(t.string); + if (n && n.index == t.pos) + return (t.pos += n[0].length || 1), "searching"; + n ? (t.pos = n.index) : t.skipToEnd(); + }, + } + ); + })(t.query, r(t.query))), + e.addOverlay(t.overlay), + e.showMatchesOnScrollbar && + (t.annotate && (t.annotate.clear(), (t.annotate = null)), + (t.annotate = e.showMatchesOnScrollbar(t.query, r(t.query)))); + } + function c(t, r, i, s) { + var a = n(t); + if (a.query) return u(t, r); + var c = t.getSelection() || a.lastQuery; + if ( + (c instanceof RegExp && "x^" == c.source && (c = null), + i && t.openDialog) + ) { + var d = null, + m = function (n, r) { + e.e_stop(r), + n && + (n != a.queryText && + (l(t, a, n), (a.posFrom = a.posTo = t.getCursor())), + d && (d.style.opacity = 1), + u(t, r.shiftKey, function (e, n) { + var r; + n.line < 3 && + document.querySelector && + (r = + t.display.wrapper.querySelector( + ".CodeMirror-dialog" + )) && + r.getBoundingClientRect().bottom - 4 > + t.cursorCoords(n, "window").top && + ((d = r).style.opacity = 0.4); + })); + }; + (function (e, t, n, r, i) { + e.openDialog(t, r, { + value: n, + selectValueOnOpen: !0, + closeOnEnter: !1, + onClose: function () { + h(e); + }, + onKeyDown: i, + bottom: e.options.search.bottom, + }); + })(t, p(t), c, m, function (r, i) { + var o = e.keyName(r), + s = t.getOption("extraKeys"), + a = (s && s[o]) || e.keyMap[t.getOption("keyMap")][o]; + "findNext" == a || + "findPrev" == a || + "findPersistentNext" == a || + "findPersistentPrev" == a + ? (e.e_stop(r), l(t, n(t), i), t.execCommand(a)) + : ("find" != a && "findPersistent" != a) || + (e.e_stop(r), m(i, r)); + }), + s && c && (l(t, a, c), u(t, r)); + } else + o(t, p(t), "Search for:", c, function (e) { + e && + !a.query && + t.operation(function () { + l(t, a, e), (a.posFrom = a.posTo = t.getCursor()), u(t, r); + }); + }); + } + function u(t, r, o) { + t.operation(function () { + var s = n(t), + a = i(t, s.query, r ? s.posFrom : s.posTo); + (a.find(r) || + (a = i( + t, + s.query, + r ? e.Pos(t.lastLine()) : e.Pos(t.firstLine(), 0) + )).find(r)) && + (t.setSelection(a.from(), a.to()), + t.scrollIntoView({ from: a.from(), to: a.to() }, 20), + (s.posFrom = a.from()), + (s.posTo = a.to()), + o && o(a.from(), a.to())); + }); + } + function h(e) { + e.operation(function () { + var t = n(e); + (t.lastQuery = t.query), + t.query && + ((t.query = t.queryText = null), + e.removeOverlay(t.overlay), + t.annotate && (t.annotate.clear(), (t.annotate = null))); + }); + } + function p(e) { + return ( + '' + + e.phrase("Search:") + + ' ' + + e.phrase("(Use /re/ syntax for regexp search)") + + "" + ); + } + function d(e, t, n) { + e.operation(function () { + for (var r = i(e, t); r.findNext(); ) + if ("string" != typeof t) { + var o = e.getRange(r.from(), r.to()).match(t); + r.replace( + n.replace(/\$(\d)/g, function (e, t) { + return o[t]; + }) + ); + } else r.replace(n); + }); + } + function m(e, t) { + if (!e.getOption("readOnly")) { + var r = e.getSelection() || n(e).lastQuery, + l = + '' + + (t ? e.phrase("Replace all:") : e.phrase("Replace:")) + + ""; + o( + e, + l + + (function (e) { + return ( + ' ' + + e.phrase("(Use /re/ syntax for regexp search)") + + "" + ); + })(e), + l, + r, + function (n) { + n && + ((n = a(n)), + o( + e, + (function (e) { + return ( + '' + + e.phrase("With:") + + ' ' + ); + })(e), + e.phrase("Replace with:"), + "", + function (r) { + if (((r = s(r)), t)) d(e, n, r); + else { + h(e); + var o = i(e, n, e.getCursor("from")), + a = function () { + var t, + s = o.from(); + (!(t = o.findNext()) && + ((o = i(e, n)), + !(t = o.findNext()) || + (s && + o.from().line == s.line && + o.from().ch == s.ch))) || + (e.setSelection(o.from(), o.to()), + e.scrollIntoView({ + from: o.from(), + to: o.to(), + }), + (function (e, t, n, r) { + e.openConfirm + ? e.openConfirm(t, r) + : confirm(n) && r[0](); + })( + e, + (function (e) { + return ( + '' + + e.phrase("Replace?") + + " " + ); + })(e), + e.phrase("Replace?"), + [ + function () { + l(t); + }, + a, + function () { + d(e, n, r); + }, + ] + )); + }, + l = function (e) { + o.replace( + "string" == typeof n + ? r + : r.replace(/\$(\d)/g, function (t, n) { + return e[n]; + }) + ), + a(); + }; + a(); + } + } + )); + } + ); + } + } + e.defineOption("search", { bottom: !1 }), + (e.commands.find = function (e) { + h(e), c(e); + }), + (e.commands.findPersistent = function (e) { + h(e), c(e, !1, !0); + }), + (e.commands.findPersistentNext = function (e) { + c(e, !1, !0, !0); + }), + (e.commands.findPersistentPrev = function (e) { + c(e, !0, !0, !0); + }), + (e.commands.findNext = c), + (e.commands.findPrev = function (e) { + c(e, !0); + }), + (e.commands.clearSearch = h), + (e.commands.replace = m), + (e.commands.replaceAll = function (e) { + m(e, !0); + }); + })(n(4045), n(9195), n(4309)); + }, + 9195: (e, t, n) => { + !(function (e) { + "use strict"; + var t, + n, + r = e.Pos; + function i(e, t) { + for ( + var n = (function (e) { + var t = e.flags; + return null != t + ? t + : (e.ignoreCase ? "i" : "") + + (e.global ? "g" : "") + + (e.multiline ? "m" : ""); + })(e), + r = n, + i = 0; + i < t.length; + i++ + ) + -1 == r.indexOf(t.charAt(i)) && (r += t.charAt(i)); + return n == r ? e : new RegExp(e.source, r); + } + function o(e) { + return /\\s|\\n|\n|\\W|\\D|\[\^/.test(e.source); + } + function s(e, t, n) { + t = i(t, "g"); + for ( + var o = n.line, s = n.ch, a = e.lastLine(); + o <= a; + o++, s = 0 + ) { + t.lastIndex = s; + var l = e.getLine(o), + c = t.exec(l); + if (c) + return { + from: r(o, c.index), + to: r(o, c.index + c[0].length), + match: c, + }; + } + } + function a(e, t, n) { + if (!o(t)) return s(e, t, n); + t = i(t, "gm"); + for (var a, l = 1, c = n.line, u = e.lastLine(); c <= u; ) { + for (var h = 0; h < l && !(c > u); h++) { + var p = e.getLine(c++); + a = null == a ? p : a + "\n" + p; + } + (l *= 2), (t.lastIndex = n.ch); + var d = t.exec(a); + if (d) { + var m = a.slice(0, d.index).split("\n"), + f = d[0].split("\n"), + g = n.line + m.length - 1, + y = m[m.length - 1].length; + return { + from: r(g, y), + to: r( + g + f.length - 1, + 1 == f.length ? y + f[0].length : f[f.length - 1].length + ), + match: d, + }; + } + } + } + function l(e, t, n) { + for (var r, i = 0; i <= e.length; ) { + t.lastIndex = i; + var o = t.exec(e); + if (!o) break; + var s = o.index + o[0].length; + if (s > e.length - n) break; + (!r || s > r.index + r[0].length) && (r = o), (i = o.index + 1); + } + return r; + } + function c(e, t, n) { + t = i(t, "g"); + for ( + var o = n.line, s = n.ch, a = e.firstLine(); + o >= a; + o--, s = -1 + ) { + var c = e.getLine(o), + u = l(c, t, s < 0 ? 0 : c.length - s); + if (u) + return { + from: r(o, u.index), + to: r(o, u.index + u[0].length), + match: u, + }; + } + } + function u(e, t, n) { + if (!o(t)) return c(e, t, n); + t = i(t, "gm"); + for ( + var s, + a = 1, + u = e.getLine(n.line).length - n.ch, + h = n.line, + p = e.firstLine(); + h >= p; + + ) { + for (var d = 0; d < a && h >= p; d++) { + var m = e.getLine(h--); + s = null == s ? m : m + "\n" + s; + } + a *= 2; + var f = l(s, t, u); + if (f) { + var g = s.slice(0, f.index).split("\n"), + y = f[0].split("\n"), + b = h + g.length, + v = g[g.length - 1].length; + return { + from: r(b, v), + to: r( + b + y.length - 1, + 1 == y.length ? v + y[0].length : y[y.length - 1].length + ), + match: f, + }; + } + } + } + function h(e, t, n, r) { + if (e.length == t.length) return n; + for (var i = 0, o = n + Math.max(0, e.length - t.length); ; ) { + if (i == o) return i; + var s = (i + o) >> 1, + a = r(e.slice(0, s)).length; + if (a == n) return s; + a > n ? (o = s) : (i = s + 1); + } + } + function p(e, i, o, s) { + if (!i.length) return null; + var a = s ? t : n, + l = a(i).split(/\r|\n\r?/); + e: for ( + var c = o.line, u = o.ch, p = e.lastLine() + 1 - l.length; + c <= p; + c++, u = 0 + ) { + var d = e.getLine(c).slice(u), + m = a(d); + if (1 == l.length) { + var f = m.indexOf(l[0]); + if (-1 == f) continue e; + return ( + (o = h(d, m, f, a) + u), + { + from: r(c, h(d, m, f, a) + u), + to: r(c, h(d, m, f + l[0].length, a) + u), + } + ); + } + var g = m.length - l[0].length; + if (m.slice(g) == l[0]) { + for (var y = 1; y < l.length - 1; y++) + if (a(e.getLine(c + y)) != l[y]) continue e; + var b = e.getLine(c + l.length - 1), + v = a(b), + w = l[l.length - 1]; + if (v.slice(0, w.length) == w) + return { + from: r(c, h(d, m, g, a) + u), + to: r(c + l.length - 1, h(b, v, w.length, a)), + }; + } + } + } + function d(e, i, o, s) { + if (!i.length) return null; + var a = s ? t : n, + l = a(i).split(/\r|\n\r?/); + e: for ( + var c = o.line, u = o.ch, p = e.firstLine() - 1 + l.length; + c >= p; + c--, u = -1 + ) { + var d = e.getLine(c); + u > -1 && (d = d.slice(0, u)); + var m = a(d); + if (1 == l.length) { + var f = m.lastIndexOf(l[0]); + if (-1 == f) continue e; + return { + from: r(c, h(d, m, f, a)), + to: r(c, h(d, m, f + l[0].length, a)), + }; + } + var g = l[l.length - 1]; + if (m.slice(0, g.length) == g) { + var y = 1; + for (o = c - l.length + 1; y < l.length - 1; y++) + if (a(e.getLine(o + y)) != l[y]) continue e; + var b = e.getLine(c + 1 - l.length), + v = a(b); + if (v.slice(v.length - l[0].length) == l[0]) + return { + from: r( + c + 1 - l.length, + h(b, v, b.length - l[0].length, a) + ), + to: r(c, h(d, m, g.length, a)), + }; + } + } + } + function m(e, t, n, o) { + var l; + (this.atOccurrence = !1), + (this.doc = e), + (n = n ? e.clipPos(n) : r(0, 0)), + (this.pos = { from: n, to: n }), + "object" == typeof o ? (l = o.caseFold) : ((l = o), (o = null)), + "string" == typeof t + ? (null == l && (l = !1), + (this.matches = function (n, r) { + return (n ? d : p)(e, t, r, l); + })) + : ((t = i(t, "gm")), + o && !1 === o.multiline + ? (this.matches = function (n, r) { + return (n ? c : s)(e, t, r); + }) + : (this.matches = function (n, r) { + return (n ? u : a)(e, t, r); + })); + } + String.prototype.normalize + ? ((t = function (e) { + return e.normalize("NFD").toLowerCase(); + }), + (n = function (e) { + return e.normalize("NFD"); + })) + : ((t = function (e) { + return e.toLowerCase(); + }), + (n = function (e) { + return e; + })), + (m.prototype = { + findNext: function () { + return this.find(!1); + }, + findPrevious: function () { + return this.find(!0); + }, + find: function (t) { + for ( + var n = this.matches( + t, + this.doc.clipPos(t ? this.pos.from : this.pos.to) + ); + n && 0 == e.cmpPos(n.from, n.to); + + ) + t + ? n.from.ch + ? (n.from = r(n.from.line, n.from.ch - 1)) + : (n = + n.from.line == this.doc.firstLine() + ? null + : this.matches( + t, + this.doc.clipPos(r(n.from.line - 1)) + )) + : n.to.ch < this.doc.getLine(n.to.line).length + ? (n.to = r(n.to.line, n.to.ch + 1)) + : (n = + n.to.line == this.doc.lastLine() + ? null + : this.matches(t, r(n.to.line + 1, 0))); + if (n) + return ( + (this.pos = n), + (this.atOccurrence = !0), + this.pos.match || !0 + ); + var i = r( + t ? this.doc.firstLine() : this.doc.lastLine() + 1, + 0 + ); + return ( + (this.pos = { from: i, to: i }), (this.atOccurrence = !1) + ); + }, + from: function () { + if (this.atOccurrence) return this.pos.from; + }, + to: function () { + if (this.atOccurrence) return this.pos.to; + }, + replace: function (t, n) { + if (this.atOccurrence) { + var i = e.splitLines(t); + this.doc.replaceRange(i, this.pos.from, this.pos.to, n), + (this.pos.to = r( + this.pos.from.line + i.length - 1, + i[i.length - 1].length + + (1 == i.length ? this.pos.from.ch : 0) + )); + } + }, + }), + e.defineExtension("getSearchCursor", function (e, t, n) { + return new m(this.doc, e, t, n); + }), + e.defineDocExtension("getSearchCursor", function (e, t, n) { + return new m(this, e, t, n); + }), + e.defineExtension("selectMatches", function (t, n) { + for ( + var r = [], + i = this.getSearchCursor(t, this.getCursor("from"), n); + i.findNext() && !(e.cmpPos(i.to(), this.getCursor("to")) > 0); + + ) + r.push({ anchor: i.from(), head: i.to() }); + r.length && this.setSelections(r, 0); + }); + })(n(4045)); + }, + 8505: (e, t, n) => { + !(function (e) { + "use strict"; + function t(e) { + e.state.markedSelection && + e.operation(function () { + !(function (e) { + if (!e.somethingSelected()) return s(e); + if (e.listSelections().length > 1) return a(e); + var t = e.getCursor("start"), + n = e.getCursor("end"), + r = e.state.markedSelection; + if (!r.length) return o(e, t, n); + var l = r[0].find(), + c = r[r.length - 1].find(); + if ( + !l || + !c || + n.line - t.line <= 8 || + i(t, c.to) >= 0 || + i(n, l.from) <= 0 + ) + return a(e); + for (; i(t, l.from) > 0; ) + r.shift().clear(), (l = r[0].find()); + for ( + i(t, l.from) < 0 && + (l.to.line - t.line < 8 + ? (r.shift().clear(), o(e, t, l.to, 0)) + : o(e, t, l.from, 0)); + i(n, c.to) < 0; + + ) + r.pop().clear(), (c = r[r.length - 1].find()); + i(n, c.to) > 0 && + (n.line - c.from.line < 8 + ? (r.pop().clear(), o(e, c.from, n)) + : o(e, c.to, n)); + })(e); + }); + } + function n(e) { + e.state.markedSelection && + e.state.markedSelection.length && + e.operation(function () { + s(e); + }); + } + e.defineOption("styleSelectedText", !1, function (r, i, o) { + var l = o && o != e.Init; + i && !l + ? ((r.state.markedSelection = []), + (r.state.markedSelectionStyle = + "string" == typeof i ? i : "CodeMirror-selectedtext"), + a(r), + r.on("cursorActivity", t), + r.on("change", n)) + : !i && + l && + (r.off("cursorActivity", t), + r.off("change", n), + s(r), + (r.state.markedSelection = r.state.markedSelectionStyle = + null)); + }); + var r = e.Pos, + i = e.cmpPos; + function o(e, t, n, o) { + if (0 != i(t, n)) + for ( + var s = e.state.markedSelection, + a = e.state.markedSelectionStyle, + l = t.line; + ; + + ) { + var c = l == t.line ? t : r(l, 0), + u = l + 8, + h = u >= n.line, + p = h ? n : r(u, 0), + d = e.markText(c, p, { className: a }); + if ((null == o ? s.push(d) : s.splice(o++, 0, d), h)) break; + l = u; + } + } + function s(e) { + for (var t = e.state.markedSelection, n = 0; n < t.length; ++n) + t[n].clear(); + t.length = 0; + } + function a(e) { + s(e); + for (var t = e.listSelections(), n = 0; n < t.length; n++) + o(e, t[n].from(), t[n].to()); + } + })(n(4045)); + }, + 4045: function (e) { + 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), + s = r || i || o, + a = s && (r ? document.documentMode || 6 : +(o || i)[1]), + l = !o && /WebKit\//.test(e), + c = l && /Qt\/\d+\.\d+/.test(e), + u = !o && /Chrome\//.test(e), + h = /Opera\//.test(e), + p = /Apple Computer/.test(navigator.vendor), + d = /Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e), + m = /PhantomJS/.test(e), + f = p && (/Mobile\/\w+/.test(e) || navigator.maxTouchPoints > 2), + g = /Android/.test(e), + y = + f || + g || + /webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e), + b = f || /Mac/.test(t), + v = /\bCrOS\b/.test(e), + w = /win/i.test(t), + C = h && e.match(/Version\/(\d*\.\d*)/); + C && (C = Number(C[1])), C && C >= 15 && ((h = !1), (l = !0)); + var S = b && (c || (h && (null == C || C < 12.11))), + E = n || (s && a >= 9); + function k(e) { + return new RegExp("(^|\\s)" + e + "(?:$|\\s)\\s*"); + } + var R, + x = 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 T(e) { + for (var t = e.childNodes.length; t > 0; --t) + e.removeChild(e.firstChild); + return e; + } + function D(e, t) { + return T(e).appendChild(t); + } + function A(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 _(e, t, n, r) { + var i = A(e, t, n, r); + return i.setAttribute("role", "presentation"), i; + } + function P(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 I() { + 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 O(e, t) { + var n = e.className; + k(t).test(n) || (e.className += (n ? " " : "") + t); + } + function N(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; + } + R = 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 B(e) { + var t = Array.prototype.slice.call(arguments, 1); + return function () { + return e.apply(null, t); + }; + } + function F(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 L(e, t, n, r, i) { + null == t && -1 == (t = e.search(/[^\s\u00a0]/)) && (t = e.length); + for (var o = r || 0, s = i || 0; ; ) { + var a = e.indexOf("\t", o); + if (a < 0 || a >= t) return s + (t - o); + (s += a - o), (s += n - (s % n)), (o = a + 1); + } + } + f + ? (M = function (e) { + (e.selectionStart = 0), (e.selectionEnd = e.value.length); + }) + : s && + (M = function (e) { + try { + e.select(); + } catch (e) {} + }); + var H = function () { + (this.id = null), + (this.f = null), + (this.time = 0), + (this.handler = B(this.onTimeout, this)); + }; + function U(e, t) { + for (var n = 0; n < e.length; ++n) if (e[n] == t) return n; + return -1; + } + (H.prototype.onTimeout = function (e) { + (e.id = 0), + e.time <= +new Date() + ? e.f() + : setTimeout(e.handler, e.time - +new Date()); + }), + (H.prototype.set = function (e, t) { + this.f = t; + var n = +new Date() + e; + (!this.id || n < this.time) && + (clearTimeout(this.id), + (this.id = setTimeout(this.handler, e)), + (this.time = n)); + }); + var W = { + toString: function () { + return "CodeMirror.Pass"; + }, + }, + $ = { scroll: !1 }, + z = { origin: "*mouse" }, + q = { origin: "+move" }; + function j(e, t, n) { + for (var r = 0, i = 0; ; ) { + var o = e.indexOf("\t", r); + -1 == o && (o = e.length); + var s = o - r; + if (o == e.length || i + s >= t) return r + Math.min(s, t - i); + if (((i += o - r), (r = o + 1), (i += n - (i % n)) >= t)) + return r; + } + } + var G = [""]; + function V(e) { + for (; G.length <= e; ) G.push(K(G) + " "); + return G[e]; + } + function K(e) { + return e[e.length - 1]; + } + function Y(e, t) { + for (var n = [], r = 0; r < e.length; r++) n[r] = t(e[r], r); + return n; + } + function X() {} + function Z(e, t) { + var n; + return ( + Object.create + ? (n = Object.create(e)) + : ((X.prototype = e), (n = new X())), + t && F(t, n), + n + ); + } + var Q = + /[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/; + function J(e) { + return ( + /\w/.test(e) || + (e > "€" && (e.toUpperCase() != e.toLowerCase() || Q.test(e))) + ); + } + function ee(e, t) { + return t + ? !!(t.source.indexOf("\\w") > -1 && J(e)) || t.test(e) + : J(e); + } + function te(e) { + for (var t in e) if (e.hasOwnProperty(t) && e[t]) return !1; + return !0; + } + var ne = + /[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/; + function re(e) { + return e.charCodeAt(0) >= 768 && ne.test(e); + } + function ie(e, t, n) { + for (; (n < 0 ? t > 0 : t < e.length) && re(e.charAt(t)); ) t += n; + return t; + } + function oe(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); + } + } + var se = null; + function ae(e, t, n) { + var r; + se = 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) : (se = i)), + o.from == t && + (o.from != o.to && "before" != n ? (r = i) : (se = i)); + } + return null != r ? r : se; + } + var le = (function () { + var e = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/, + t = /[stwN]/, + n = /[LRr]/, + r = /[Lb1n]/, + i = /[1n]/; + function o(e, t, n) { + (this.level = e), (this.from = t), (this.to = n); + } + return function (s, a) { + var l, + c = "ltr" == a ? "L" : "R"; + if (0 == s.length || ("ltr" == a && !e.test(s))) return !1; + for (var u = s.length, h = [], p = 0; p < u; ++p) + h.push( + (l = s.charCodeAt(p)) <= 247 + ? "bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN".charAt( + l + ) + : 1424 <= l && l <= 1524 + ? "R" + : 1536 <= l && l <= 1785 + ? "nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111".charAt( + l - 1536 + ) + : 1774 <= l && l <= 2220 + ? "r" + : 8192 <= l && l <= 8203 + ? "w" + : 8204 == l + ? "b" + : "L" + ); + for (var d = 0, m = c; d < u; ++d) { + var f = h[d]; + "m" == f ? (h[d] = m) : (m = f); + } + for (var g = 0, y = c; g < u; ++g) { + var b = h[g]; + "1" == b && "r" == y + ? (h[g] = "n") + : n.test(b) && ((y = b), "r" == b && (h[g] = "R")); + } + for (var v = 1, w = h[0]; v < u - 1; ++v) { + var C = h[v]; + "+" == C && "1" == w && "1" == h[v + 1] + ? (h[v] = "1") + : "," != C || + w != h[v + 1] || + ("1" != w && "n" != w) || + (h[v] = w), + (w = C); + } + for (var S = 0; S < u; ++S) { + var E = h[S]; + if ("," == E) h[S] = "N"; + else if ("%" == E) { + var k = void 0; + for (k = S + 1; k < u && "%" == h[k]; ++k); + for ( + var R = + (S && "!" == h[S - 1]) || (k < u && "1" == h[k]) + ? "1" + : "N", + x = S; + x < k; + ++x + ) + h[x] = R; + S = k - 1; + } + } + for (var T = 0, D = c; T < u; ++T) { + var A = h[T]; + "L" == D && "1" == A ? (h[T] = "L") : n.test(A) && (D = A); + } + for (var _ = 0; _ < u; ++_) + if (t.test(h[_])) { + var P = void 0; + for (P = _ + 1; P < u && t.test(h[P]); ++P); + for ( + var I = "L" == (_ ? h[_ - 1] : c), + O = + I == ("L" == (P < u ? h[P] : c)) ? (I ? "L" : "R") : c, + N = _; + N < P; + ++N + ) + h[N] = O; + _ = P - 1; + } + for (var M, B = [], F = 0; F < u; ) + if (r.test(h[F])) { + var L = F; + for (++F; F < u && r.test(h[F]); ++F); + B.push(new o(0, L, F)); + } else { + var H = F, + U = B.length, + W = "rtl" == a ? 1 : 0; + for (++F; F < u && "L" != h[F]; ++F); + for (var $ = H; $ < F; ) + if (i.test(h[$])) { + H < $ && (B.splice(U, 0, new o(1, H, $)), (U += W)); + var z = $; + for (++$; $ < F && i.test(h[$]); ++$); + B.splice(U, 0, new o(2, z, $)), (U += W), (H = $); + } else ++$; + H < F && B.splice(U, 0, new o(1, H, F)); + } + return ( + "ltr" == a && + (1 == B[0].level && + (M = s.match(/^\s+/)) && + ((B[0].from = M[0].length), + B.unshift(new o(0, 0, M[0].length))), + 1 == K(B).level && + (M = s.match(/\s+$/)) && + ((K(B).to -= M[0].length), + B.push(new o(0, u - M[0].length, u)))), + "rtl" == a ? B.reverse() : B + ); + }; + })(); + function ce(e, t) { + var n = e.order; + return null == n && (n = e.order = le(e.text, t)), n; + } + var ue = [], + he = 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] || ue).concat(n); + } + }; + function pe(e, t) { + return (e._handlers && e._handlers[t]) || ue; + } + function de(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 = U(i, n); + o > -1 && (r[t] = i.slice(0, o).concat(i.slice(o + 1))); + } + } + } + function me(e, t) { + var n = pe(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 fe(e, t, n) { + return ( + "string" == typeof t && + (t = { + type: t, + preventDefault: function () { + this.defaultPrevented = !0; + }, + }), + me(e, n || t.type, e, t), + Ce(t) || t.codemirrorIgnore + ); + } + function ge(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 == U(n, t[r]) && n.push(t[r]); + } + function ye(e, t) { + return pe(e, t).length > 0; + } + function be(e) { + (e.prototype.on = function (e, t) { + he(this, e, t); + }), + (e.prototype.off = function (e, t) { + de(this, e, t); + }); + } + function ve(e) { + e.preventDefault ? e.preventDefault() : (e.returnValue = !1); + } + function we(e) { + e.stopPropagation ? e.stopPropagation() : (e.cancelBubble = !0); + } + function Ce(e) { + return null != e.defaultPrevented + ? e.defaultPrevented + : 0 == e.returnValue; + } + function Se(e) { + ve(e), we(e); + } + function Ee(e) { + return e.target || e.srcElement; + } + function ke(e) { + var t = e.which; + return ( + null == t && + (1 & e.button + ? (t = 1) + : 2 & e.button + ? (t = 3) + : 4 & e.button && (t = 2)), + b && e.ctrlKey && 1 == t && (t = 3), + t + ); + } + var Re, + xe, + Te = (function () { + if (s && a < 9) return !1; + var e = A("div"); + return "draggable" in e || "dragDrop" in e; + })(); + function De(e) { + if (null == Re) { + var t = A("span", "​"); + D(e, A("span", [t, document.createTextNode("x")])), + 0 != e.firstChild.offsetHeight && + (Re = + t.offsetWidth <= 1 && t.offsetHeight > 2 && !(s && a < 8)); + } + var n = Re + ? A("span", "​") + : A( + "span", + " ", + null, + "display: inline-block; width: 1px; margin-right: -1px" + ); + return n.setAttribute("cm-text", ""), n; + } + function Ae(e) { + if (null != xe) return xe; + var t = D(e, document.createTextNode("AخA")), + n = R(t, 0, 1).getBoundingClientRect(), + r = R(t, 1, 2).getBoundingClientRect(); + return ( + T(e), !(!n || n.left == n.right) && (xe = r.right - n.right < 3) + ); + } + var _e, + Pe = + 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), + s = o.indexOf("\r"); + -1 != s + ? (n.push(o.slice(0, s)), (t += s + 1)) + : (n.push(o), (t = i + 1)); + } + return n; + } + : function (e) { + return e.split(/\r\n?|\n/); + }, + Ie = 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) + ); + }, + Oe = + "oncopy" in (_e = A("div")) || + (_e.setAttribute("oncopy", "return;"), + "function" == typeof _e.oncopy), + Ne = null; + var Me = {}, + Be = {}; + function Fe(e, t) { + arguments.length > 2 && + (t.dependencies = Array.prototype.slice.call(arguments, 2)), + (Me[e] = t); + } + function Le(e) { + if ("string" == typeof e && Be.hasOwnProperty(e)) e = Be[e]; + else if ( + e && + "string" == typeof e.name && + Be.hasOwnProperty(e.name) + ) { + var t = Be[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 Le("application/xml"); + if ("string" == typeof e && /^[\w\-]+\/[\w\-]+\+json$/.test(e)) + return Le("application/json"); + } + return "string" == typeof e ? { name: e } : e || { name: "null" }; + } + function He(e, t) { + t = Le(t); + var n = Me[t.name]; + if (!n) return He(e, "text/plain"); + var r = n(e, t); + if (Ue.hasOwnProperty(t.name)) { + var i = Ue[t.name]; + for (var o in i) + i.hasOwnProperty(o) && + (r.hasOwnProperty(o) && (r["_" + o] = r[o]), (r[o] = i[o])); + } + if ( + ((r.name = t.name), + t.helperType && (r.helperType = t.helperType), + t.modeProps) + ) + for (var s in t.modeProps) r[s] = t.modeProps[s]; + return r; + } + var Ue = {}; + function We(e, t) { + F(t, Ue.hasOwnProperty(e) ? Ue[e] : (Ue[e] = {})); + } + function $e(e, t) { + if (!0 === t) return t; + if (e.copyState) return e.copyState(t); + var n = {}; + for (var r in t) { + var i = t[r]; + i instanceof Array && (i = i.concat([])), (n[r] = i); + } + return n; + } + function ze(e, t) { + for (var n; e.innerMode && (n = e.innerMode(t)) && n.mode != e; ) + (t = n.state), (e = n.mode); + return n || { mode: e, state: t }; + } + function qe(e, t, n) { + return !e.startState || e.startState(t, n); + } + var je = function (e, t, n) { + (this.pos = this.start = 0), + (this.string = e), + (this.tabSize = t || 8), + (this.lastColumnPos = this.lastColumnValue = 0), + (this.lineStart = 0), + (this.lineOracle = n); + }; + function Ge(e, t) { + if ((t -= e.first) < 0 || t >= e.size) + throw new Error( + "There is no line " + (t + e.first) + " in the document." + ); + for (var n = e; !n.lines; ) + for (var r = 0; ; ++r) { + var i = n.children[r], + o = i.chunkSize(); + if (t < o) { + n = i; + break; + } + t -= o; + } + return n.lines[t]; + } + function Ve(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 Ke(e, t, n) { + var r = []; + return ( + e.iter(t, n, function (e) { + r.push(e.text); + }), + r + ); + } + function Ye(e, t) { + var n = t - e.height; + if (n) for (var r = e; r; r = r.parent) r.height += n; + } + function Xe(e) { + if (null == e.parent) return null; + for ( + var t = e.parent, n = U(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 Ze(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 s = 0; s < e.lines.length; ++s) { + var a = e.lines[s].height; + if (t < a) break; + t -= a; + } + return n + s; + } + function Qe(e, t) { + return t >= e.first && t < e.first + e.size; + } + function Je(e, t) { + return String(e.lineNumberFormatter(t + e.firstLineNumber)); + } + function et(e, t, n) { + if ((void 0 === n && (n = null), !(this instanceof et))) + return new et(e, t, n); + (this.line = e), (this.ch = t), (this.sticky = n); + } + function tt(e, t) { + return e.line - t.line || e.ch - t.ch; + } + function nt(e, t) { + return e.sticky == t.sticky && 0 == tt(e, t); + } + function rt(e) { + return et(e.line, e.ch); + } + function it(e, t) { + return tt(e, t) < 0 ? t : e; + } + function ot(e, t) { + return tt(e, t) < 0 ? e : t; + } + function st(e, t) { + return Math.max(e.first, Math.min(t, e.first + e.size - 1)); + } + function at(e, t) { + if (t.line < e.first) return et(e.first, 0); + var n = e.first + e.size - 1; + return t.line > n + ? et(n, Ge(e, n).text.length) + : (function (e, t) { + var n = e.ch; + return null == n || n > t + ? et(e.line, t) + : n < 0 + ? et(e.line, 0) + : e; + })(t, Ge(e, t.line).text.length); + } + function lt(e, t) { + for (var n = [], r = 0; r < t.length; r++) n[r] = at(e, t[r]); + return n; + } + (je.prototype.eol = function () { + return this.pos >= this.string.length; + }), + (je.prototype.sol = function () { + return this.pos == this.lineStart; + }), + (je.prototype.peek = function () { + return this.string.charAt(this.pos) || void 0; + }), + (je.prototype.next = function () { + if (this.pos < this.string.length) + return this.string.charAt(this.pos++); + }), + (je.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; + }), + (je.prototype.eatWhile = function (e) { + for (var t = this.pos; this.eat(e); ); + return this.pos > t; + }), + (je.prototype.eatSpace = function () { + for ( + var e = this.pos; + /[\s\u00a0]/.test(this.string.charAt(this.pos)); + + ) + ++this.pos; + return this.pos > e; + }), + (je.prototype.skipToEnd = function () { + this.pos = this.string.length; + }), + (je.prototype.skipTo = function (e) { + var t = this.string.indexOf(e, this.pos); + if (t > -1) return (this.pos = t), !0; + }), + (je.prototype.backUp = function (e) { + this.pos -= e; + }), + (je.prototype.column = function () { + return ( + this.lastColumnPos < this.start && + ((this.lastColumnValue = L( + this.string, + this.start, + this.tabSize, + this.lastColumnPos, + this.lastColumnValue + )), + (this.lastColumnPos = this.start)), + this.lastColumnValue - + (this.lineStart + ? L(this.string, this.lineStart, this.tabSize) + : 0) + ); + }), + (je.prototype.indentation = function () { + return ( + L(this.string, null, this.tabSize) - + (this.lineStart + ? L(this.string, this.lineStart, this.tabSize) + : 0) + ); + }), + (je.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; + }; + if (i(this.string.substr(this.pos, e.length)) == i(e)) + return !1 !== t && (this.pos += e.length), !0; + }), + (je.prototype.current = function () { + return this.string.slice(this.start, this.pos); + }), + (je.prototype.hideFirstChars = function (e, t) { + this.lineStart += e; + try { + return t(); + } finally { + this.lineStart -= e; + } + }), + (je.prototype.lookAhead = function (e) { + var t = this.lineOracle; + return t && t.lookAhead(e); + }), + (je.prototype.baseToken = function () { + var e = this.lineOracle; + return e && e.baseToken(this.pos); + }); + var ct = function (e, t) { + (this.state = e), (this.lookAhead = t); + }, + ut = 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 ht(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 s = n.state, + a = function (r) { + n.baseTokens = i; + var a = e.state.overlays[r], + l = 1, + c = 0; + (n.state = !0), + wt( + e, + t.text, + a.mode, + n, + function (e, t) { + for (var n = l; c < e; ) { + var r = i[l]; + r > e && i.splice(l, 1, e, i[l + 1], r), + (l += 2), + (c = Math.min(e, r)); + } + if (t) + if (a.opaque) + i.splice(n, l - n, e, "overlay " + t), (l = n + 2); + else + for (; n < l; n += 2) { + var o = i[n + 1]; + i[n + 1] = (o ? o + " " : "") + "overlay " + t; + } + }, + o + ), + (n.state = s), + (n.baseTokens = null), + (n.baseTokenPos = 1); + }, + l = 0; + l < e.state.overlays.length; + ++l + ) + a(l); + 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 = dt(e, Xe(t)), + i = + t.text.length > e.options.maxHighlightLength && + $e(e.doc.mode, r.state), + o = ht(e, t, r); + i && (r.state = i), + (t.stateAfter = r.save(!i)), + (t.styles = o.styles), + o.classes + ? (t.styleClasses = o.classes) + : t.styleClasses && (t.styleClasses = null), + n === e.doc.highlightFrontier && + (e.doc.modeFrontier = Math.max( + e.doc.modeFrontier, + ++e.doc.highlightFrontier + )); + } + return t.styles; + } + function dt(e, t, n) { + var r = e.doc, + i = e.display; + if (!r.mode.startState) return new ut(r, !0, t); + var o = (function (e, t, n) { + for ( + var r, + i, + o = e.doc, + s = n ? -1 : t - (e.doc.mode.innerMode ? 1e3 : 100), + a = t; + a > s; + --a + ) { + if (a <= o.first) return o.first; + var l = Ge(o, a - 1), + c = l.stateAfter; + if ( + c && + (!n || + a + (c instanceof ct ? c.lookAhead : 0) <= o.modeFrontier) + ) + return a; + var u = L(l.text, null, e.options.tabSize); + (null == i || r > u) && ((i = a - 1), (r = u)); + } + return i; + })(e, t, n), + s = o > r.first && Ge(r, o - 1).stateAfter, + a = s ? ut.fromSaved(r, s, o) : new ut(r, qe(r.mode), o); + return ( + r.iter(o, t, function (n) { + mt(e, n.text, a); + var r = a.line; + (n.stateAfter = + r == t - 1 || r % 5 == 0 || (r >= i.viewFrom && r < i.viewTo) + ? a.save() + : null), + a.nextLine(); + }), + n && (r.modeFrontier = a.line), + a + ); + } + function mt(e, t, n, r) { + var i = e.doc.mode, + o = new je(t, e.options.tabSize, n); + for ( + o.start = o.pos = r || 0, "" == t && ft(i, n.state); + !o.eol(); + + ) + gt(i, o, n.state), (o.start = o.pos); + } + function ft(e, t) { + if (e.blankLine) return e.blankLine(t); + if (e.innerMode) { + var n = ze(e, t); + return n.mode.blankLine ? n.mode.blankLine(n.state) : void 0; + } + } + function gt(e, t, n, r) { + for (var i = 0; i < 10; i++) { + r && (r[0] = ze(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."); + } + (ut.prototype.lookAhead = function (e) { + var t = this.doc.getLine(this.line + e); + return ( + null != t && e > this.maxLookAhead && (this.maxLookAhead = e), t + ); + }), + (ut.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, + }; + }), + (ut.prototype.nextLine = function () { + this.line++, this.maxLookAhead > 0 && this.maxLookAhead--; + }), + (ut.fromSaved = function (e, t, n) { + return t instanceof ct + ? new ut(e, $e(e.mode, t.state), n, t.lookAhead) + : new ut(e, $e(e.mode, t), n); + }), + (ut.prototype.save = function (e) { + var t = !1 !== e ? $e(this.doc.mode, this.state) : this.state; + return this.maxLookAhead > 0 ? new ct(t, this.maxLookAhead) : t; + }); + var yt = function (e, t, n) { + (this.start = e.start), + (this.end = e.pos), + (this.string = e.current()), + (this.type = t || null), + (this.state = n); + }; + function bt(e, t, n, r) { + var i, + o, + s = e.doc, + a = s.mode, + l = Ge(s, (t = at(s, t)).line), + c = dt(e, t.line, n), + u = new je(l.text, e.options.tabSize, c); + for (r && (o = []); (r || u.pos < t.ch) && !u.eol(); ) + (u.start = u.pos), + (i = gt(a, u, c.state)), + r && o.push(new yt(u, i, $e(s.mode, c.state))); + return r ? o : new yt(u, i, c.state); + } + function vt(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, s) { + var a = n.flattenSpans; + null == a && (a = e.options.flattenSpans); + var l, + c = 0, + u = null, + h = new je(t, e.options.tabSize, r), + p = e.options.addModeClass && [null]; + for ("" == t && vt(ft(n, r.state), o); !h.eol(); ) { + if ( + (h.pos > e.options.maxHighlightLength + ? ((a = !1), + s && mt(e, t, r, h.pos), + (h.pos = t.length), + (l = null)) + : (l = vt(gt(n, h, r.state, p), o)), + p) + ) { + var d = p[0].name; + d && (l = "m-" + (l ? d + " " + l : d)); + } + if (!a || u != l) { + for (; c < h.start; ) i((c = Math.min(h.start, c + 5e3)), u); + u = l; + } + h.start = h.pos; + } + for (; c < h.pos; ) { + var m = Math.min(h.pos, c + 5e3); + i(m, u), (c = m); + } + } + var Ct = !1, + St = !1; + function Et(e, t, n) { + (this.marker = e), (this.from = t), (this.to = n); + } + function kt(e, t) { + if (e) + for (var n = 0; n < e.length; ++n) { + var r = e[n]; + if (r.marker == t) return r; + } + } + function Rt(e, t) { + for (var n, r = 0; r < e.length; ++r) + e[r] != t && (n || (n = [])).push(e[r]); + return n; + } + function xt(e, t) { + if (t.full) return null; + var n = Qe(e, t.from.line) && Ge(e, t.from.line).markedSpans, + r = Qe(e, t.to.line) && Ge(e, t.to.line).markedSpans; + if (!n && !r) return null; + var i = t.from.ch, + o = t.to.ch, + s = 0 == tt(t.from, t.to), + a = (function (e, t, n) { + var r; + if (e) + for (var i = 0; i < e.length; ++i) { + var o = e[i], + s = o.marker; + if ( + null == o.from || + (s.inclusiveLeft ? o.from <= t : o.from < t) || + (o.from == t && + "bookmark" == s.type && + (!n || !o.marker.insertLeft)) + ) { + var a = + null == o.to || + (s.inclusiveRight ? o.to >= t : o.to > t); + (r || (r = [])).push(new Et(s, o.from, a ? null : o.to)); + } + } + return r; + })(n, i, s), + l = (function (e, t, n) { + var r; + if (e) + for (var i = 0; i < e.length; ++i) { + var o = e[i], + s = o.marker; + if ( + null == o.to || + (s.inclusiveRight ? o.to >= t : o.to > t) || + (o.from == t && + "bookmark" == s.type && + (!n || o.marker.insertLeft)) + ) { + var a = + null == o.from || + (s.inclusiveLeft ? o.from <= t : o.from < t); + (r || (r = [])).push( + new Et( + s, + a ? null : o.from - t, + null == o.to ? null : o.to - t + ) + ); + } + } + return r; + })(r, o, s), + c = 1 == t.text.length, + u = K(t.text).length + (c ? i : 0); + if (a) + for (var h = 0; h < a.length; ++h) { + var p = a[h]; + if (null == p.to) { + var d = kt(l, p.marker); + d ? c && (p.to = null == d.to ? null : d.to + u) : (p.to = i); + } + } + if (l) + for (var m = 0; m < l.length; ++m) { + var f = l[m]; + null != f.to && (f.to += u), + null == f.from + ? kt(a, f.marker) || + ((f.from = u), c && (a || (a = [])).push(f)) + : ((f.from += u), c && (a || (a = [])).push(f)); + } + a && (a = Tt(a)), l && l != a && (l = Tt(l)); + var g = [a]; + if (!c) { + var y, + b = t.text.length - 2; + if (b > 0 && a) + for (var v = 0; v < a.length; ++v) + null == a[v].to && + (y || (y = [])).push(new Et(a[v].marker, null, null)); + for (var w = 0; w < b; ++w) g.push(y); + g.push(l); + } + return g; + } + function Tt(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 Dt(e) { + var t = e.markedSpans; + if (t) { + for (var n = 0; n < t.length; ++n) t[n].marker.detachLine(e); + e.markedSpans = null; + } + } + function At(e, t) { + if (t) { + for (var n = 0; n < t.length; ++n) t[n].marker.attachLine(e); + e.markedSpans = t; + } + } + function _t(e) { + return e.inclusiveLeft ? -1 : 0; + } + function Pt(e) { + return e.inclusiveRight ? 1 : 0; + } + function It(e, t) { + var n = e.lines.length - t.lines.length; + if (0 != n) return n; + var r = e.find(), + i = t.find(), + o = tt(r.from, i.from) || _t(e) - _t(t); + return o ? -o : tt(r.to, i.to) || Pt(e) - Pt(t) || t.id - e.id; + } + function Ot(e, t) { + var n, + r = St && 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 || It(n, i.marker) < 0) && + (n = i.marker); + return n; + } + function Nt(e) { + return Ot(e, !0); + } + function Mt(e) { + return Ot(e, !1); + } + function Bt(e, t) { + var n, + r = St && 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 || It(n, o.marker) < 0) && + (n = o.marker); + } + return n; + } + function Ft(e, t, n, r, i) { + var o = Ge(e, t), + s = St && o.markedSpans; + if (s) + for (var a = 0; a < s.length; ++a) { + var l = s[a]; + if (l.marker.collapsed) { + var c = l.marker.find(0), + u = tt(c.from, n) || _t(l.marker) - _t(i), + h = tt(c.to, r) || Pt(l.marker) - Pt(i); + if ( + !((u >= 0 && h <= 0) || (u <= 0 && h >= 0)) && + ((u <= 0 && + (l.marker.inclusiveRight && i.inclusiveLeft + ? tt(c.to, n) >= 0 + : tt(c.to, n) > 0)) || + (u >= 0 && + (l.marker.inclusiveRight && i.inclusiveLeft + ? tt(c.from, r) <= 0 + : tt(c.from, r) < 0))) + ) + return !0; + } + } + } + function Lt(e) { + for (var t; (t = Nt(e)); ) e = t.find(-1, !0).line; + return e; + } + function Ht(e, t) { + var n = Ge(e, t), + r = Lt(n); + return n == r ? t : Xe(r); + } + function Ut(e, t) { + if (t > e.lastLine()) return t; + var n, + r = Ge(e, t); + if (!Wt(e, r)) return t; + for (; (n = Mt(r)); ) r = n.find(1, !0).line; + return Xe(r) + 1; + } + function Wt(e, t) { + var n = St && 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 && + $t(e, t, r) + ) + return !0; + } + } + function $t(e, t, n) { + if (null == n.to) { + var r = n.marker.find(1, !0); + return $t(e, r.line, kt(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) && + $t(e, t, i) + ) + return !0; + } + function zt(e) { + for ( + var t = 0, n = (e = Lt(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 s = 0; s < o.children.length; ++s) { + var a = o.children[s]; + if (a == n) break; + t += a.height; + } + return t; + } + function qt(e) { + if (0 == e.height) return 0; + for (var t, n = e.text.length, r = e; (t = Nt(r)); ) { + var i = t.find(0, !0); + (r = i.from.line), (n += i.from.ch - i.to.ch); + } + for (r = e; (t = Mt(r)); ) { + var o = t.find(0, !0); + (n -= r.text.length - o.from.ch), + (n += (r = o.to.line).text.length - o.to.ch); + } + return n; + } + function jt(e) { + var t = e.display, + n = e.doc; + (t.maxLine = Ge(n, n.first)), + (t.maxLineLength = qt(t.maxLine)), + (t.maxLineChanged = !0), + n.iter(function (e) { + var n = qt(e); + n > t.maxLineLength && ((t.maxLineLength = n), (t.maxLine = e)); + }); + } + var Gt = function (e, t, n) { + (this.text = e), At(this, t), (this.height = n ? n(this) : 1); + }; + function Vt(e) { + (e.parent = null), Dt(e); + } + (Gt.prototype.lineNo = function () { + return Xe(this); + }), + be(Gt); + var Kt = {}, + Yt = {}; + function Xt(e, t) { + if (!e || /^\s*$/.test(e)) return null; + var n = t.addModeClass ? Yt : Kt; + return n[e] || (n[e] = e.replace(/\S+/g, "cm-$&")); + } + function Zt(e, t) { + var n = _("span", null, null, l ? "padding-right: .1px" : null), + r = { + pre: _("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, + s = void 0; + (r.pos = 0), + (r.addToken = Jt), + Ae(e.display.measure) && + (s = ce(o, e.doc.direction)) && + (r.addToken = en(r.addToken, s)), + (r.map = []), + nn(o, r, pt(e, o, t != e.display.externalMeasured && Xe(o))), + o.styleClasses && + (o.styleClasses.bgClass && + (r.bgClass = N(o.styleClasses.bgClass, r.bgClass || "")), + o.styleClasses.textClass && + (r.textClass = N( + o.styleClasses.textClass, + r.textClass || "" + ))), + 0 == r.map.length && + r.map.push( + 0, + 0, + r.content.appendChild(De(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 (l) { + var a = r.content.lastChild; + (/\bcm-tab\b/.test(a.className) || + (a.querySelector && a.querySelector(".cm-tab"))) && + (r.content.className = "cm-tab-wrap-hack"); + } + return ( + me(e, "renderLine", e, t.line, r.pre), + r.pre.className && + (r.textClass = N(r.pre.className, r.textClass || "")), + r + ); + } + function Qt(e) { + var t = A("span", "•", "cm-invalidchar"); + return ( + (t.title = "\\u" + e.charCodeAt(0).toString(16)), + t.setAttribute("aria-label", t.title), + t + ); + } + function Jt(e, t, n, r, i, o, l) { + if (t) { + var c, + u = 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, + h = e.cm.state.specialChars, + p = !1; + if (h.test(t)) { + c = document.createDocumentFragment(); + for (var d = 0; ; ) { + h.lastIndex = d; + var m = h.exec(t), + f = m ? m.index - d : t.length - d; + if (f) { + var g = document.createTextNode(u.slice(d, d + f)); + s && a < 9 + ? c.appendChild(A("span", [g])) + : c.appendChild(g), + e.map.push(e.pos, e.pos + f, g), + (e.col += f), + (e.pos += f); + } + if (!m) break; + d += f + 1; + var y = void 0; + if ("\t" == m[0]) { + var b = e.cm.options.tabSize, + v = b - (e.col % b); + (y = c.appendChild(A("span", V(v), "cm-tab"))).setAttribute( + "role", + "presentation" + ), + y.setAttribute("cm-text", "\t"), + (e.col += v); + } else + "\r" == m[0] || "\n" == m[0] + ? ((y = c.appendChild( + A("span", "\r" == m[0] ? "␍" : "␤", "cm-invalidchar") + )).setAttribute("cm-text", m[0]), + (e.col += 1)) + : ((y = e.cm.options.specialCharPlaceholder( + m[0] + )).setAttribute("cm-text", m[0]), + s && a < 9 + ? c.appendChild(A("span", [y])) + : c.appendChild(y), + (e.col += 1)); + e.map.push(e.pos, e.pos + 1, y), e.pos++; + } + } else + (e.col += t.length), + (c = document.createTextNode(u)), + e.map.push(e.pos, e.pos + t.length, c), + s && a < 9 && (p = !0), + (e.pos += t.length); + if ( + ((e.trailingSpace = 32 == u.charCodeAt(t.length - 1)), + n || r || i || p || o || l) + ) { + var w = n || ""; + r && (w += r), i && (w += i); + var C = A("span", [c], w, o); + if (l) + for (var S in l) + l.hasOwnProperty(S) && + "style" != S && + "class" != S && + C.setAttribute(S, l[S]); + return e.content.appendChild(C); + } + e.content.appendChild(c); + } + } + function en(e, t) { + return function (n, r, i, o, s, a, l) { + i = i ? i + " cm-force-border" : "cm-force-border"; + for (var c = n.pos, u = c + r.length; ; ) { + for ( + var h = void 0, p = 0; + p < t.length && !((h = t[p]).to > c && h.from <= c); + p++ + ); + if (h.to >= u) return e(n, r, i, o, s, a, l); + e(n, r.slice(0, h.to - c), i, o, null, a, l), + (o = null), + (r = r.slice(h.to - c)), + (c = h.to); + } + }; + } + function tn(e, t, n, r) { + var i = !r && n.widgetNode; + i && e.map.push(e.pos, e.pos + t, i), + !r && + e.cm.display.input.needsContentAttribute && + (i || + (i = e.content.appendChild(document.createElement("span"))), + i.setAttribute("cm-marker", n.id)), + i && + (e.cm.display.input.setUneditable(i), e.content.appendChild(i)), + (e.pos += t), + (e.trailingSpace = !1); + } + function nn(e, t, n) { + var r = e.markedSpans, + i = e.text, + o = 0; + if (r) + for ( + var s, + a, + l, + c, + u, + h, + p, + d = i.length, + m = 0, + f = 1, + g = "", + y = 0; + ; + + ) { + if (y == m) { + (l = c = u = a = ""), (p = null), (h = null), (y = 1 / 0); + for (var b = [], v = void 0, w = 0; w < r.length; ++w) { + var C = r[w], + S = C.marker; + if ("bookmark" == S.type && C.from == m && S.widgetNode) + b.push(S); + else if ( + C.from <= m && + (null == C.to || + C.to > m || + (S.collapsed && C.to == m && C.from == m)) + ) { + if ( + (null != C.to && + C.to != m && + y > C.to && + ((y = C.to), (c = "")), + S.className && (l += " " + S.className), + S.css && (a = (a ? a + ";" : "") + S.css), + S.startStyle && + C.from == m && + (u += " " + S.startStyle), + S.endStyle && + C.to == y && + (v || (v = [])).push(S.endStyle, C.to), + S.title && ((p || (p = {})).title = S.title), + S.attributes) + ) + for (var E in S.attributes) + (p || (p = {}))[E] = S.attributes[E]; + S.collapsed && (!h || It(h.marker, S) < 0) && (h = C); + } else C.from > m && y > C.from && (y = C.from); + } + if (v) + for (var k = 0; k < v.length; k += 2) + v[k + 1] == y && (c += " " + v[k]); + if (!h || h.from == m) + for (var R = 0; R < b.length; ++R) tn(t, 0, b[R]); + if (h && (h.from || 0) == m) { + if ( + (tn( + t, + (null == h.to ? d + 1 : h.to) - m, + h.marker, + null == h.from + ), + null == h.to) + ) + return; + h.to == m && (h = !1); + } + } + if (m >= d) break; + for (var x = Math.min(d, y); ; ) { + if (g) { + var T = m + g.length; + if (!h) { + var D = T > x ? g.slice(0, x - m) : g; + t.addToken( + t, + D, + s ? s + l : l, + u, + m + D.length == y ? c : "", + a, + p + ); + } + if (T >= x) { + (g = g.slice(x - m)), (m = x); + break; + } + (m = T), (u = ""); + } + (g = i.slice(o, (o = n[f++]))), + (s = Xt(n[f++], t.cm.options)); + } + } + else + for (var A = 1; A < n.length; A += 2) + t.addToken( + t, + i.slice(o, (o = n[A])), + Xt(n[A + 1], t.cm.options) + ); + } + function rn(e, t, n) { + (this.line = t), + (this.rest = (function (e) { + for (var t, n; (t = Mt(e)); ) + (e = t.find(1, !0).line), (n || (n = [])).push(e); + return n; + })(t)), + (this.size = this.rest ? Xe(K(this.rest)) - n + 1 : 1), + (this.node = this.text = null), + (this.hidden = Wt(e, t)); + } + function on(e, t, n) { + for (var r, i = [], o = t; o < n; o = r) { + var s = new rn(e.doc, Ge(e.doc, o), o); + (r = o + s.size), i.push(s); + } + return i; + } + var sn = null; + var an = null; + function ln(e, t) { + var n = pe(e, t); + if (n.length) { + var r, + i = Array.prototype.slice.call(arguments, 2); + sn + ? (r = sn.delayedCallbacks) + : an + ? (r = an) + : ((r = an = []), setTimeout(cn, 0)); + for ( + var o = function (e) { + r.push(function () { + return n[e].apply(null, i); + }); + }, + s = 0; + s < n.length; + ++s + ) + o(s); + } + } + function cn() { + var e = an; + an = null; + for (var t = 0; t < e.length; ++t) e[t](); + } + function un(e, t, n, r) { + for (var i = 0; i < t.changes.length; i++) { + var o = t.changes[i]; + "text" == o + ? dn(e, t) + : "gutter" == o + ? fn(e, t, n, r) + : "class" == o + ? mn(e, t) + : "widget" == o && gn(e, t, r); + } + t.changes = null; + } + function hn(e) { + return ( + e.node == e.text && + ((e.node = A("div", null, null, "position: relative")), + e.text.parentNode && + e.text.parentNode.replaceChild(e.node, e.text), + e.node.appendChild(e.text), + s && a < 8 && (e.node.style.zIndex = 2)), + e.node + ); + } + function pn(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 dn(e, t) { + var n = t.text.className, + r = pn(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 = hn(t); + (t.background = r.insertBefore( + A("div", null, n), + r.firstChild + )), + e.display.input.setUneditable(t.background); + } + })(e, t), + t.line.wrapClass + ? (hn(t).className = t.line.wrapClass) + : t.node != t.text && (t.node.className = ""); + var n = t.textClass + ? t.textClass + " " + (t.line.textClass || "") + : t.line.textClass; + t.text.className = n || ""; + } + function fn(e, t, n, r) { + if ( + (t.gutter && (t.node.removeChild(t.gutter), (t.gutter = null)), + t.gutterBackground && + (t.node.removeChild(t.gutterBackground), + (t.gutterBackground = null)), + t.line.gutterClass) + ) { + var i = hn(t); + (t.gutterBackground = A( + "div", + null, + "CodeMirror-gutter-background " + t.line.gutterClass, + "left: " + + (e.options.fixedGutter ? r.fixedPos : -r.gutterTotalWidth) + + "px; width: " + + r.gutterTotalWidth + + "px" + )), + e.display.input.setUneditable(t.gutterBackground), + i.insertBefore(t.gutterBackground, t.text); + } + var o = t.line.gutterMarkers; + if (e.options.lineNumbers || o) { + var s = hn(t), + a = (t.gutter = A( + "div", + null, + "CodeMirror-gutter-wrapper", + "left: " + + (e.options.fixedGutter ? r.fixedPos : -r.gutterTotalWidth) + + "px" + )); + if ( + (e.display.input.setUneditable(a), + s.insertBefore(a, t.text), + t.line.gutterClass && (a.className += " " + t.line.gutterClass), + !e.options.lineNumbers || + (o && o["CodeMirror-linenumbers"]) || + (t.lineNumber = a.appendChild( + A( + "div", + Je(e.options, n), + "CodeMirror-linenumber CodeMirror-gutter-elt", + "left: " + + r.gutterLeft["CodeMirror-linenumbers"] + + "px; width: " + + e.display.lineNumInnerWidth + + "px" + ) + )), + o) + ) + for (var l = 0; l < e.display.gutterSpecs.length; ++l) { + var c = e.display.gutterSpecs[l].className, + u = o.hasOwnProperty(c) && o[c]; + u && + a.appendChild( + A( + "div", + [u], + "CodeMirror-gutter-elt", + "left: " + + r.gutterLeft[c] + + "px; width: " + + r.gutterWidth[c] + + "px" + ) + ); + } + } + } + function gn(e, t, n) { + t.alignable && (t.alignable = null); + for ( + var r = k("CodeMirror-linewidget"), + i = t.node.firstChild, + o = void 0; + i; + i = o + ) + (o = i.nextSibling), r.test(i.className) && t.node.removeChild(i); + bn(e, t, n); + } + function yn(e, t, n, r) { + var i = pn(e, t); + return ( + (t.text = t.node = i.pre), + i.bgClass && (t.bgClass = i.bgClass), + i.textClass && (t.textClass = i.textClass), + mn(e, t), + fn(e, t, n, r), + bn(e, t, r), + t.node + ); + } + function bn(e, t, n) { + if ((vn(e, t.line, t, n, !0), t.rest)) + for (var r = 0; r < t.rest.length; r++) + vn(e, t.rest[r], t, n, !1); + } + function vn(e, t, n, r, i) { + if (t.widgets) + for (var o = hn(n), s = 0, a = t.widgets; s < a.length; ++s) { + var l = a[s], + c = A( + "div", + [l.node], + "CodeMirror-linewidget" + + (l.className ? " " + l.className : "") + ); + l.handleMouseEvents || + c.setAttribute("cm-ignore-events", "true"), + wn(l, c, n, r), + e.display.input.setUneditable(c), + i && l.above + ? o.insertBefore(c, n.gutter || n.text) + : o.appendChild(c), + ln(l, "redraw"); + } + } + function wn(e, t, n, r) { + if (e.noHScroll) { + (n.alignable || (n.alignable = [])).push(t); + var i = r.wrapperWidth; + (t.style.left = r.fixedPos + "px"), + e.coverGutter || + ((i -= r.gutterTotalWidth), + (t.style.paddingLeft = r.gutterTotalWidth + "px")), + (t.style.width = i + "px"); + } + e.coverGutter && + ((t.style.zIndex = 5), + (t.style.position = "relative"), + e.noHScroll || (t.style.marginLeft = -r.gutterTotalWidth + "px")); + } + function Cn(e) { + if (null != e.height) return e.height; + var t = e.doc.cm; + if (!t) return 0; + if (!P(document.body, e.node)) { + var n = "position: relative;"; + e.coverGutter && + (n += "margin-left: -" + t.display.gutters.offsetWidth + "px;"), + e.noHScroll && + (n += "width: " + t.display.wrapper.clientWidth + "px;"), + D(t.display.measure, A("div", [e.node], null, n)); + } + return (e.height = e.node.parentNode.offsetHeight); + } + function Sn(e, t) { + for (var n = Ee(t); n != e.wrapper; n = n.parentNode) + if ( + !n || + (1 == n.nodeType && + "true" == n.getAttribute("cm-ignore-events")) || + (n.parentNode == e.sizer && n != e.mover) + ) + return !0; + } + function En(e) { + return e.lineSpace.offsetTop; + } + function kn(e) { + return e.mover.offsetHeight - e.lineSpace.offsetHeight; + } + function Rn(e) { + if (e.cachedPaddingH) return e.cachedPaddingH; + var t = D(e.measure, A("pre", "x", "CodeMirror-line-like")), + n = window.getComputedStyle + ? window.getComputedStyle(t) + : t.currentStyle, + r = { + left: parseInt(n.paddingLeft), + right: parseInt(n.paddingRight), + }; + return isNaN(r.left) || isNaN(r.right) || (e.cachedPaddingH = r), r; + } + function xn(e) { + return 50 - e.display.nativeBarWidth; + } + function Tn(e) { + return e.display.scroller.clientWidth - xn(e) - e.display.barWidth; + } + function Dn(e) { + return ( + e.display.scroller.clientHeight - xn(e) - e.display.barHeight + ); + } + function An(e, t, n) { + if (e.line == t) + return { map: e.measure.map, cache: e.measure.cache }; + for (var r = 0; r < e.rest.length; r++) + if (e.rest[r] == t) + return { map: e.measure.maps[r], cache: e.measure.caches[r] }; + for (var i = 0; i < e.rest.length; i++) + if (Xe(e.rest[i]) > n) + return { + map: e.measure.maps[i], + cache: e.measure.caches[i], + before: !0, + }; + } + function _n(e, t, n, r) { + return On(e, In(e, t), n, r); + } + function Pn(e, t) { + if (t >= e.display.viewFrom && t < e.display.viewTo) + return e.display.view[ur(e, t)]; + var n = e.display.externalMeasured; + return n && t >= n.lineN && t < n.lineN + n.size ? n : void 0; + } + function In(e, t) { + var n = Xe(t), + r = Pn(e, n); + r && !r.text + ? (r = null) + : r && + r.changes && + (un(e, r, n, or(e)), (e.curOp.forceUpdate = !0)), + r || + (r = (function (e, t) { + var n = Xe((t = Lt(t))), + r = (e.display.externalMeasured = new rn(e.doc, t, n)); + r.lineN = n; + var i = (r.built = Zt(e, r)); + return (r.text = i.pre), D(e.display.lineMeasure, i.pre), r; + })(e, t)); + var i = An(r, t, n); + return { + line: t, + view: r, + rect: null, + map: i.map, + cache: i.cache, + before: i.before, + hasHeights: !1, + }; + } + function On(e, t, n, r, i) { + t.before && (n = -1); + var o, + l = n + (r || ""); + return ( + t.cache.hasOwnProperty(l) + ? (o = t.cache[l]) + : (t.rect || (t.rect = t.view.text.getBoundingClientRect()), + t.hasHeights || + ((function (e, t, n) { + var r = e.options.lineWrapping, + i = r && Tn(e); + if (!t.measure.heights || (r && t.measure.width != i)) { + var o = (t.measure.heights = []); + if (r) { + t.measure.width = i; + for ( + var s = t.text.firstChild.getClientRects(), a = 0; + a < s.length - 1; + a++ + ) { + var l = s[a], + c = s[a + 1]; + Math.abs(l.bottom - c.bottom) > 2 && + o.push((l.bottom + c.top) / 2 - n.top); + } + } + o.push(n.bottom - n.top); + } + })(e, t.view, t.rect), + (t.hasHeights = !0)), + (o = (function (e, t, n, r) { + var i, + o = Bn(t.map, n, r), + l = o.node, + c = o.start, + u = o.end, + h = o.collapse; + if (3 == l.nodeType) { + for (var p = 0; p < 4; p++) { + for (; c && re(t.line.text.charAt(o.coverStart + c)); ) + --c; + for ( + ; + o.coverStart + u < o.coverEnd && + re(t.line.text.charAt(o.coverStart + u)); + + ) + ++u; + if ( + (i = + s && + a < 9 && + 0 == c && + u == o.coverEnd - o.coverStart + ? l.parentNode.getBoundingClientRect() + : Fn(R(l, c, u).getClientRects(), r)).left || + i.right || + 0 == c + ) + break; + (u = c), (c -= 1), (h = "right"); + } + s && + a < 11 && + (i = (function (e, t) { + if ( + !window.screen || + null == screen.logicalXDPI || + screen.logicalXDPI == screen.deviceXDPI || + !(function (e) { + if (null != Ne) return Ne; + var t = D(e, A("span", "x")), + n = t.getBoundingClientRect(), + r = R(t, 0, 1).getBoundingClientRect(); + return (Ne = Math.abs(n.left - r.left) > 1); + })(e) + ) + return t; + var n = screen.logicalXDPI / screen.deviceXDPI, + r = screen.logicalYDPI / screen.deviceYDPI; + return { + left: t.left * n, + right: t.right * n, + top: t.top * r, + bottom: t.bottom * r, + }; + })(e.display.measure, i)); + } else { + var d; + c > 0 && (h = r = "right"), + (i = + e.options.lineWrapping && + (d = l.getClientRects()).length > 1 + ? d["right" == r ? d.length - 1 : 0] + : l.getBoundingClientRect()); + } + if (s && a < 9 && !c && (!i || (!i.left && !i.right))) { + var m = l.parentNode.getClientRects()[0]; + i = m + ? { + left: m.left, + right: m.left + ir(e.display), + top: m.top, + bottom: m.bottom, + } + : Mn; + } + for ( + var f = i.top - t.rect.top, + g = i.bottom - t.rect.top, + y = (f + g) / 2, + b = t.view.measure.heights, + v = 0; + v < b.length - 1 && !(y < b[v]); + v++ + ); + var w = v ? b[v - 1] : 0, + C = b[v], + S = { + left: ("right" == h ? i.right : i.left) - t.rect.left, + right: ("left" == h ? i.left : i.right) - t.rect.left, + top: w, + bottom: C, + }; + return ( + i.left || i.right || (S.bogus = !0), + e.options.singleCursorHeightPerLine || + ((S.rtop = f), (S.rbottom = g)), + S + ); + })(e, t, n, r)).bogus || (t.cache[l] = o)), + { + left: o.left, + right: o.right, + top: i ? o.rtop : o.top, + bottom: i ? o.rbottom : o.bottom, + } + ); + } + var Nn, + Mn = { left: 0, right: 0, top: 0, bottom: 0 }; + function Bn(e, t, n) { + for (var r, i, o, s, a, l, c = 0; c < e.length; c += 3) + if ( + ((a = e[c]), + (l = e[c + 1]), + t < a + ? ((i = 0), (o = 1), (s = "left")) + : t < l + ? (o = 1 + (i = t - a)) + : (c == e.length - 3 || (t == l && e[c + 3] > t)) && + ((i = (o = l - a) - 1), t >= l && (s = "right")), + null != i) + ) { + if ( + ((r = e[c + 2]), + a == l && n == (r.insertLeft ? "left" : "right") && (s = n), + "left" == n && 0 == i) + ) + for (; c && e[c - 2] == e[c - 3] && e[c - 1].insertLeft; ) + (r = e[2 + (c -= 3)]), (s = "left"); + if ("right" == n && i == l - a) + for ( + ; + c < e.length - 3 && + e[c + 3] == e[c + 4] && + !e[c + 5].insertLeft; + + ) + (r = e[(c += 3) + 2]), (s = "right"); + break; + } + return { + node: r, + start: i, + end: o, + collapse: s, + coverStart: a, + coverEnd: l, + }; + } + function Fn(e, t) { + var n = Mn; + if ("left" == t) + for (var r = 0; r < e.length && (n = e[r]).left == n.right; r++); + else + for ( + var i = e.length - 1; + i >= 0 && (n = e[i]).left == n.right; + i-- + ); + return n; + } + function Ln(e) { + if ( + e.measure && + ((e.measure.cache = {}), (e.measure.heights = null), e.rest) + ) + for (var t = 0; t < e.rest.length; t++) e.measure.caches[t] = {}; + } + function Hn(e) { + (e.display.externalMeasure = null), T(e.display.lineMeasure); + for (var t = 0; t < e.display.view.length; t++) + Ln(e.display.view[t]); + } + function Un(e) { + Hn(e), + (e.display.cachedCharWidth = + e.display.cachedTextHeight = + e.display.cachedPaddingH = + null), + e.options.lineWrapping || (e.display.maxLineChanged = !0), + (e.display.lineNumChars = null); + } + function Wn() { + return u && g + ? -( + document.body.getBoundingClientRect().left - + parseInt(getComputedStyle(document.body).marginLeft) + ) + : window.pageXOffset || + (document.documentElement || document.body).scrollLeft; + } + function $n() { + return u && g + ? -( + document.body.getBoundingClientRect().top - + parseInt(getComputedStyle(document.body).marginTop) + ) + : window.pageYOffset || + (document.documentElement || document.body).scrollTop; + } + function zn(e) { + var t = 0; + if (e.widgets) + for (var n = 0; n < e.widgets.length; ++n) + e.widgets[n].above && (t += Cn(e.widgets[n])); + return t; + } + function qn(e, t, n, r, i) { + if (!i) { + var o = zn(t); + (n.top += o), (n.bottom += o); + } + if ("line" == r) return n; + r || (r = "local"); + var s = zt(t); + if ( + ("local" == r + ? (s += En(e.display)) + : (s -= e.display.viewOffset), + "page" == r || "window" == r) + ) { + var a = e.display.lineSpace.getBoundingClientRect(); + s += a.top + ("window" == r ? 0 : $n()); + var l = a.left + ("window" == r ? 0 : Wn()); + (n.left += l), (n.right += l); + } + return (n.top += s), (n.bottom += s), n; + } + function jn(e, t, n) { + if ("div" == n) return t; + var r = t.left, + i = t.top; + if ("page" == n) (r -= Wn()), (i -= $n()); + else if ("local" == n || !n) { + var o = e.display.sizer.getBoundingClientRect(); + (r += o.left), (i += o.top); + } + var s = e.display.lineSpace.getBoundingClientRect(); + return { left: r - s.left, top: i - s.top }; + } + function Gn(e, t, n, r, i) { + return r || (r = Ge(e.doc, t.line)), qn(e, r, _n(e, r, t.ch, i), n); + } + function Vn(e, t, n, r, i, o) { + function s(t, s) { + var a = On(e, i, t, s ? "right" : "left", o); + return ( + s ? (a.left = a.right) : (a.right = a.left), qn(e, r, a, n) + ); + } + (r = r || Ge(e.doc, t.line)), i || (i = In(e, r)); + var a = ce(r, e.doc.direction), + l = t.ch, + c = t.sticky; + if ( + (l >= r.text.length + ? ((l = r.text.length), (c = "before")) + : l <= 0 && ((l = 0), (c = "after")), + !a) + ) + return s("before" == c ? l - 1 : l, "before" == c); + function u(e, t, n) { + return s(n ? e - 1 : e, (1 == a[t].level) != n); + } + var h = ae(a, l, c), + p = se, + d = u(l, h, "before" == c); + return null != p && (d.other = u(l, p, "before" != c)), d; + } + function Kn(e, t) { + var n = 0; + (t = at(e.doc, t)), + e.options.lineWrapping || (n = ir(e.display) * t.ch); + var r = Ge(e.doc, t.line), + i = zt(r) + En(e.display); + return { left: n, right: n, top: i, bottom: i + r.height }; + } + function Yn(e, t, n, r, i) { + var o = et(e, t, n); + return (o.xRel = i), r && (o.outside = r), o; + } + function Xn(e, t, n) { + var r = e.doc; + if ((n += e.display.viewOffset) < 0) + return Yn(r.first, 0, null, -1, -1); + var i = Ze(r, n), + o = r.first + r.size - 1; + if (i > o) + return Yn(r.first + r.size - 1, Ge(r, o).text.length, null, 1, 1); + t < 0 && (t = 0); + for (var s = Ge(r, i); ; ) { + var a = er(e, s, i, t, n), + l = Bt(s, a.ch + (a.xRel > 0 || a.outside > 0 ? 1 : 0)); + if (!l) return a; + var c = l.find(1); + if (c.line == i) return c; + s = Ge(r, (i = c.line)); + } + } + function Zn(e, t, n, r) { + r -= zn(t); + var i = t.text.length, + o = oe( + function (t) { + return On(e, n, t - 1).bottom <= r; + }, + i, + 0 + ); + return { + begin: o, + end: (i = oe( + function (t) { + return On(e, n, t).top > r; + }, + o, + i + )), + }; + } + function Qn(e, t, n, r) { + return ( + n || (n = In(e, t)), + Zn(e, t, n, qn(e, t, On(e, n, r), "line").top) + ); + } + function Jn(e, t, n, r) { + return ( + !(e.bottom <= n) && (e.top > n || (r ? e.left : e.right) > t) + ); + } + function er(e, t, n, r, i) { + i -= zt(t); + var o = In(e, t), + s = zn(t), + a = 0, + l = t.text.length, + c = !0, + u = ce(t, e.doc.direction); + if (u) { + var h = (e.options.lineWrapping ? nr : tr)(e, t, n, o, u, r, i); + (a = (c = 1 != h.level) ? h.from : h.to - 1), + (l = c ? h.to : h.from - 1); + } + var p, + d, + m = null, + f = null, + g = oe( + function (t) { + var n = On(e, o, t); + return ( + (n.top += s), + (n.bottom += s), + !!Jn(n, r, i, !1) && + (n.top <= i && n.left <= r && ((m = t), (f = n)), !0) + ); + }, + a, + l + ), + y = !1; + if (f) { + var b = r - f.left < f.right - r, + v = b == c; + (g = m + (v ? 0 : 1)), + (d = v ? "after" : "before"), + (p = b ? f.left : f.right); + } else { + c || (g != l && g != a) || g++, + (d = + 0 == g + ? "after" + : g == t.text.length + ? "before" + : On(e, o, g - (c ? 1 : 0)).bottom + s <= i == c + ? "after" + : "before"); + var w = Vn(e, et(n, g, d), "line", t, o); + (p = w.left), (y = i < w.top ? -1 : i >= w.bottom ? 1 : 0); + } + return Yn(n, (g = ie(t.text, g, 1)), d, y, r - p); + } + function tr(e, t, n, r, i, o, s) { + var a = oe( + function (a) { + var l = i[a], + c = 1 != l.level; + return Jn( + Vn( + e, + et(n, c ? l.to : l.from, c ? "before" : "after"), + "line", + t, + r + ), + o, + s, + !0 + ); + }, + 0, + i.length - 1 + ), + l = i[a]; + if (a > 0) { + var c = 1 != l.level, + u = Vn( + e, + et(n, c ? l.from : l.to, c ? "after" : "before"), + "line", + t, + r + ); + Jn(u, o, s, !0) && u.top > s && (l = i[a - 1]); + } + return l; + } + function nr(e, t, n, r, i, o, s) { + var a = Zn(e, t, r, s), + l = a.begin, + c = a.end; + /\s/.test(t.text.charAt(c - 1)) && c--; + for (var u = null, h = null, p = 0; p < i.length; p++) { + var d = i[p]; + if (!(d.from >= c || d.to <= l)) { + var m = On( + e, + r, + 1 != d.level ? Math.min(c, d.to) - 1 : Math.max(l, d.from) + ).right, + f = m < o ? o - m + 1e9 : m - o; + (!u || h > f) && ((u = d), (h = f)); + } + } + return ( + u || (u = i[i.length - 1]), + u.from < l && (u = { from: l, to: u.to, level: u.level }), + u.to > c && (u = { from: u.from, to: c, level: u.level }), + u + ); + } + function rr(e) { + if (null != e.cachedTextHeight) return e.cachedTextHeight; + if (null == Nn) { + Nn = A("pre", null, "CodeMirror-line-like"); + for (var t = 0; t < 49; ++t) + Nn.appendChild(document.createTextNode("x")), + Nn.appendChild(A("br")); + Nn.appendChild(document.createTextNode("x")); + } + D(e.measure, Nn); + var n = Nn.offsetHeight / 50; + return n > 3 && (e.cachedTextHeight = n), T(e.measure), n || 1; + } + function ir(e) { + if (null != e.cachedCharWidth) return e.cachedCharWidth; + var t = A("span", "xxxxxxxxxx"), + n = A("pre", [t], "CodeMirror-line-like"); + D(e.measure, n); + var r = t.getBoundingClientRect(), + i = (r.right - r.left) / 10; + return i > 2 && (e.cachedCharWidth = i), i || 10; + } + function or(e) { + for ( + var t = e.display, + n = {}, + r = {}, + i = t.gutters.clientLeft, + o = t.gutters.firstChild, + s = 0; + o; + o = o.nextSibling, ++s + ) { + var a = e.display.gutterSpecs[s].className; + (n[a] = o.offsetLeft + o.clientLeft + i), (r[a] = o.clientWidth); + } + return { + fixedPos: sr(t), + gutterTotalWidth: t.gutters.offsetWidth, + gutterLeft: n, + gutterWidth: r, + wrapperWidth: t.wrapper.clientWidth, + }; + } + function sr(e) { + return ( + e.scroller.getBoundingClientRect().left - + e.sizer.getBoundingClientRect().left + ); + } + function ar(e) { + var t = rr(e.display), + n = e.options.lineWrapping, + r = + n && + Math.max(5, e.display.scroller.clientWidth / ir(e.display) - 3); + return function (i) { + if (Wt(e.doc, i)) return 0; + var o = 0; + if (i.widgets) + for (var s = 0; s < i.widgets.length; s++) + i.widgets[s].height && (o += i.widgets[s].height); + return n ? o + (Math.ceil(i.text.length / r) || 1) * t : o + t; + }; + } + function lr(e) { + var t = e.doc, + n = ar(e); + t.iter(function (e) { + var t = n(e); + t != e.height && Ye(e, t); + }); + } + function cr(e, t, n, r) { + var i = e.display; + if (!n && "true" == Ee(t).getAttribute("cm-not-content")) + return null; + var o, + s, + a = i.lineSpace.getBoundingClientRect(); + try { + (o = t.clientX - a.left), (s = t.clientY - a.top); + } catch (e) { + return null; + } + var l, + c = Xn(e, o, s); + if ( + r && + c.xRel > 0 && + (l = Ge(e.doc, c.line).text).length == c.ch + ) { + var u = L(l, l.length, e.options.tabSize) - l.length; + c = et( + c.line, + Math.max( + 0, + Math.round((o - Rn(e.display).left) / ir(e.display)) - u + ) + ); + } + return c; + } + function ur(e, t) { + if (t >= e.display.viewTo) return null; + if ((t -= e.display.viewFrom) < 0) return null; + for (var n = e.display.view, r = 0; r < n.length; r++) + if ((t -= n[r].size) < 0) return r; + } + function hr(e, t, n, r) { + null == t && (t = e.doc.first), + null == n && (n = e.doc.first + e.doc.size), + r || (r = 0); + var i = e.display; + if ( + (r && + n < i.viewTo && + (null == i.updateLineNumbers || i.updateLineNumbers > t) && + (i.updateLineNumbers = t), + (e.curOp.viewChanged = !0), + t >= i.viewTo) + ) + St && Ht(e.doc, t) < i.viewTo && dr(e); + else if (n <= i.viewFrom) + St && Ut(e.doc, n + r) > i.viewFrom + ? dr(e) + : ((i.viewFrom += r), (i.viewTo += r)); + else if (t <= i.viewFrom && n >= i.viewTo) dr(e); + else if (t <= i.viewFrom) { + var o = mr(e, n, n + r, 1); + o + ? ((i.view = i.view.slice(o.index)), + (i.viewFrom = o.lineN), + (i.viewTo += r)) + : dr(e); + } else if (n >= i.viewTo) { + var s = mr(e, t, t, -1); + s + ? ((i.view = i.view.slice(0, s.index)), (i.viewTo = s.lineN)) + : dr(e); + } else { + var a = mr(e, t, t, -1), + l = mr(e, n, n + r, 1); + a && l + ? ((i.view = i.view + .slice(0, a.index) + .concat(on(e, a.lineN, l.lineN)) + .concat(i.view.slice(l.index))), + (i.viewTo += r)) + : dr(e); + } + var c = i.externalMeasured; + c && + (n < c.lineN + ? (c.lineN += r) + : t < c.lineN + c.size && (i.externalMeasured = null)); + } + function pr(e, t, n) { + e.curOp.viewChanged = !0; + var r = e.display, + i = e.display.externalMeasured; + if ( + (i && + t >= i.lineN && + t < i.lineN + i.size && + (r.externalMeasured = null), + !(t < r.viewFrom || t >= r.viewTo)) + ) { + var o = r.view[ur(e, t)]; + if (null != o.node) { + var s = o.changes || (o.changes = []); + -1 == U(s, n) && s.push(n); + } + } + } + function dr(e) { + (e.display.viewFrom = e.display.viewTo = e.doc.first), + (e.display.view = []), + (e.display.viewOffset = 0); + } + function mr(e, t, n, r) { + var i, + o = ur(e, t), + s = e.display.view; + if (!St || n == e.doc.first + e.doc.size) + return { index: o, lineN: n }; + for (var a = e.display.viewFrom, l = 0; l < o; l++) a += s[l].size; + if (a != t) { + if (r > 0) { + if (o == s.length - 1) return null; + (i = a + s[o].size - t), o++; + } else i = a - t; + (t += i), (n += i); + } + for (; Ht(e.doc, n) != n; ) { + if (o == (r < 0 ? 0 : s.length - 1)) return null; + (n += r * s[o - (r < 0 ? 1 : 0)].size), (o += r); + } + return { index: o, lineN: n }; + } + function fr(e) { + for (var t = e.display.view, n = 0, r = 0; r < t.length; r++) { + var i = t[r]; + i.hidden || (i.node && !i.changes) || ++n; + } + return n; + } + function gr(e) { + e.display.input.showSelection(e.display.input.prepareSelection()); + } + function yr(e, t) { + void 0 === t && (t = !0); + for ( + var n = e.doc, + r = {}, + i = (r.cursors = document.createDocumentFragment()), + o = (r.selection = document.createDocumentFragment()), + s = 0; + s < n.sel.ranges.length; + s++ + ) + if (t || s != n.sel.primIndex) { + var a = n.sel.ranges[s]; + if ( + !( + a.from().line >= e.display.viewTo || + a.to().line < e.display.viewFrom + ) + ) { + var l = a.empty(); + (l || e.options.showCursorWhenSelecting) && br(e, a.head, i), + l || wr(e, a, o); + } + } + return r; + } + function br(e, t, n) { + var r = Vn( + e, + t, + "div", + null, + null, + !e.options.singleCursorHeightPerLine + ), + i = n.appendChild(A("div", " ", "CodeMirror-cursor")); + if ( + ((i.style.left = r.left + "px"), + (i.style.top = r.top + "px"), + (i.style.height = + Math.max(0, r.bottom - r.top) * e.options.cursorHeight + "px"), + r.other) + ) { + var o = n.appendChild( + A("div", " ", "CodeMirror-cursor CodeMirror-secondarycursor") + ); + (o.style.display = ""), + (o.style.left = r.other.left + "px"), + (o.style.top = r.other.top + "px"), + (o.style.height = 0.85 * (r.other.bottom - r.other.top) + "px"); + } + } + function vr(e, t) { + return e.top - t.top || e.left - t.left; + } + function wr(e, t, n) { + var r = e.display, + i = e.doc, + o = document.createDocumentFragment(), + s = Rn(e.display), + a = s.left, + l = Math.max(r.sizerWidth, Tn(e) - r.sizer.offsetLeft) - s.right, + c = "ltr" == i.direction; + function u(e, t, n, r) { + t < 0 && (t = 0), + (t = Math.round(t)), + (r = Math.round(r)), + o.appendChild( + A( + "div", + null, + "CodeMirror-selected", + "position: absolute; left: " + + e + + "px;\n top: " + + t + + "px; width: " + + (null == n ? l - e : n) + + "px;\n height: " + + (r - t) + + "px" + ) + ); + } + function h(t, n, r) { + var o, + s, + h = Ge(i, t), + p = h.text.length; + function d(n, r) { + return Gn(e, et(t, n), "div", h, r); + } + function m(t, n, r) { + var i = Qn(e, h, null, t), + o = ("ltr" == n) == ("after" == r) ? "left" : "right"; + return d( + "after" == r + ? i.begin + : i.end - (/\s/.test(h.text.charAt(i.end - 1)) ? 2 : 1), + o + )[o]; + } + var f = ce(h, i.direction); + return ( + (function (e, t, n, r) { + if (!e) return r(t, n, "ltr", 0); + for (var i = !1, o = 0; o < e.length; ++o) { + var s = e[o]; + ((s.from < n && s.to > t) || (t == n && s.to == t)) && + (r( + Math.max(s.from, t), + Math.min(s.to, n), + 1 == s.level ? "rtl" : "ltr", + o + ), + (i = !0)); + } + i || r(t, n, "ltr"); + })(f, n || 0, null == r ? p : r, function (e, t, i, h) { + var g = "ltr" == i, + y = d(e, g ? "left" : "right"), + b = d(t - 1, g ? "right" : "left"), + v = null == n && 0 == e, + w = null == r && t == p, + C = 0 == h, + S = !f || h == f.length - 1; + if (b.top - y.top <= 3) { + var E = (c ? w : v) && S, + k = (c ? v : w) && C ? a : (g ? y : b).left, + R = E ? l : (g ? b : y).right; + u(k, y.top, R - k, y.bottom); + } else { + var x, T, D, A; + g + ? ((x = c && v && C ? a : y.left), + (T = c ? l : m(e, i, "before")), + (D = c ? a : m(t, i, "after")), + (A = c && w && S ? l : b.right)) + : ((x = c ? m(e, i, "before") : a), + (T = !c && v && C ? l : y.right), + (D = !c && w && S ? a : b.left), + (A = c ? m(t, i, "after") : l)), + u(x, y.top, T - x, y.bottom), + y.bottom < b.top && u(a, y.bottom, null, b.top), + u(D, b.top, A - D, b.bottom); + } + (!o || vr(y, o) < 0) && (o = y), + vr(b, o) < 0 && (o = b), + (!s || vr(y, s) < 0) && (s = y), + vr(b, s) < 0 && (s = b); + }), + { start: o, end: s } + ); + } + var p = t.from(), + d = t.to(); + if (p.line == d.line) h(p.line, p.ch, d.ch); + else { + var m = Ge(i, p.line), + f = Ge(i, d.line), + g = Lt(m) == Lt(f), + y = h(p.line, p.ch, g ? m.text.length + 1 : null).end, + b = h(d.line, g ? 0 : null, d.ch).start; + g && + (y.top < b.top - 2 + ? (u(y.right, y.top, null, y.bottom), + u(a, b.top, b.left, b.bottom)) + : u(y.right, y.top, b.left - y.right, y.bottom)), + y.bottom < b.top && u(a, y.bottom, null, b.top); + } + n.appendChild(o); + } + function Cr(e) { + if (e.state.focused) { + var t = e.display; + clearInterval(t.blinker); + var n = !0; + (t.cursorDiv.style.visibility = ""), + e.options.cursorBlinkRate > 0 + ? (t.blinker = setInterval(function () { + e.hasFocus() || Rr(e), + (t.cursorDiv.style.visibility = (n = !n) + ? "" + : "hidden"); + }, e.options.cursorBlinkRate)) + : e.options.cursorBlinkRate < 0 && + (t.cursorDiv.style.visibility = "hidden"); + } + } + function Sr(e) { + e.hasFocus() || (e.display.input.focus(), e.state.focused || kr(e)); + } + function Er(e) { + (e.state.delayingBlurEvent = !0), + setTimeout(function () { + e.state.delayingBlurEvent && + ((e.state.delayingBlurEvent = !1), e.state.focused && Rr(e)); + }, 100); + } + function kr(e, t) { + e.state.delayingBlurEvent && + !e.state.draggingText && + (e.state.delayingBlurEvent = !1), + "nocursor" != e.options.readOnly && + (e.state.focused || + (me(e, "focus", e, t), + (e.state.focused = !0), + O(e.display.wrapper, "CodeMirror-focused"), + e.curOp || + e.display.selForContextMenu == e.doc.sel || + (e.display.input.reset(), + l && + setTimeout(function () { + return e.display.input.reset(!0); + }, 20)), + e.display.input.receivedFocus()), + Cr(e)); + } + function Rr(e, t) { + e.state.delayingBlurEvent || + (e.state.focused && + (me(e, "blur", e, t), + (e.state.focused = !1), + x(e.display.wrapper, "CodeMirror-focused")), + clearInterval(e.display.blinker), + setTimeout(function () { + e.state.focused || (e.display.shift = !1); + }, 150)); + } + function xr(e) { + for ( + var t = e.display, n = t.lineDiv.offsetTop, r = 0; + r < t.view.length; + r++ + ) { + var i = t.view[r], + o = e.options.lineWrapping, + l = void 0, + c = 0; + if (!i.hidden) { + if (s && a < 8) { + var u = i.node.offsetTop + i.node.offsetHeight; + (l = u - n), (n = u); + } else { + var h = i.node.getBoundingClientRect(); + (l = h.bottom - h.top), + !o && + i.text.firstChild && + (c = + i.text.firstChild.getBoundingClientRect().right - + h.left - + 1); + } + var p = i.line.height - l; + if ( + (p > 0.005 || p < -0.005) && + (Ye(i.line, l), Tr(i.line), i.rest) + ) + for (var d = 0; d < i.rest.length; d++) Tr(i.rest[d]); + if (c > e.display.sizerWidth) { + var m = Math.ceil(c / ir(e.display)); + m > e.display.maxLineLength && + ((e.display.maxLineLength = m), + (e.display.maxLine = i.line), + (e.display.maxLineChanged = !0)); + } + } + } + } + function Tr(e) { + if (e.widgets) + for (var t = 0; t < e.widgets.length; ++t) { + var n = e.widgets[t], + r = n.node.parentNode; + r && (n.height = r.offsetHeight); + } + } + function Dr(e, t, n) { + var r = + n && null != n.top ? Math.max(0, n.top) : e.scroller.scrollTop; + r = Math.floor(r - En(e)); + var i = + n && null != n.bottom ? n.bottom : r + e.wrapper.clientHeight, + o = Ze(t, r), + s = Ze(t, i); + if (n && n.ensure) { + var a = n.ensure.from.line, + l = n.ensure.to.line; + a < o + ? ((o = a), (s = Ze(t, zt(Ge(t, a)) + e.wrapper.clientHeight))) + : Math.min(l, t.lastLine()) >= s && + ((o = Ze(t, zt(Ge(t, l)) - e.wrapper.clientHeight)), (s = l)); + } + return { from: o, to: Math.max(s, o + 1) }; + } + function Ar(e, t) { + var n = e.display, + r = rr(e.display); + t.top < 0 && (t.top = 0); + var i = + e.curOp && null != e.curOp.scrollTop + ? e.curOp.scrollTop + : n.scroller.scrollTop, + o = Dn(e), + s = {}; + t.bottom - t.top > o && (t.bottom = t.top + o); + var a = e.doc.height + kn(n), + l = t.top < r, + c = t.bottom > a - r; + if (t.top < i) s.scrollTop = l ? 0 : t.top; + else if (t.bottom > i + o) { + var u = Math.min(t.top, (c ? a : t.bottom) - o); + u != i && (s.scrollTop = u); + } + var h = e.options.fixedGutter ? 0 : n.gutters.offsetWidth, + p = + e.curOp && null != e.curOp.scrollLeft + ? e.curOp.scrollLeft + : n.scroller.scrollLeft - h, + d = Tn(e) - n.gutters.offsetWidth, + m = t.right - t.left > d; + return ( + m && (t.right = t.left + d), + t.left < 10 + ? (s.scrollLeft = 0) + : t.left < p + ? (s.scrollLeft = Math.max(0, t.left + h - (m ? 0 : 10))) + : t.right > d + p - 3 && + (s.scrollLeft = t.right + (m ? 0 : 10) - d), + s + ); + } + function _r(e, t) { + null != t && + (Or(e), + (e.curOp.scrollTop = + (null == e.curOp.scrollTop + ? e.doc.scrollTop + : e.curOp.scrollTop) + t)); + } + function Pr(e) { + Or(e); + var t = e.getCursor(); + e.curOp.scrollToPos = { + from: t, + to: t, + margin: e.options.cursorScrollMargin, + }; + } + function Ir(e, t, n) { + (null == t && null == n) || Or(e), + null != t && (e.curOp.scrollLeft = t), + null != n && (e.curOp.scrollTop = n); + } + function Or(e) { + var t = e.curOp.scrollToPos; + t && + ((e.curOp.scrollToPos = null), + Nr(e, Kn(e, t.from), Kn(e, t.to), t.margin)); + } + function Nr(e, t, n, r) { + var i = Ar(e, { + left: Math.min(t.left, n.left), + top: Math.min(t.top, n.top) - r, + right: Math.max(t.right, n.right), + bottom: Math.max(t.bottom, n.bottom) + r, + }); + Ir(e, i.scrollLeft, i.scrollTop); + } + function Mr(e, t) { + Math.abs(e.doc.scrollTop - t) < 2 || + (n || li(e, { top: t }), Br(e, t, !0), n && li(e), ri(e, 100)); + } + function Br(e, t, n) { + (t = Math.max( + 0, + Math.min( + e.display.scroller.scrollHeight - + e.display.scroller.clientHeight, + t + ) + )), + (e.display.scroller.scrollTop != t || n) && + ((e.doc.scrollTop = t), + e.display.scrollbars.setScrollTop(t), + e.display.scroller.scrollTop != t && + (e.display.scroller.scrollTop = t)); + } + function Fr(e, t, n, r) { + (t = Math.max( + 0, + Math.min( + t, + e.display.scroller.scrollWidth - e.display.scroller.clientWidth + ) + )), + ((n + ? t == e.doc.scrollLeft + : Math.abs(e.doc.scrollLeft - t) < 2) && + !r) || + ((e.doc.scrollLeft = t), + hi(e), + e.display.scroller.scrollLeft != t && + (e.display.scroller.scrollLeft = t), + e.display.scrollbars.setScrollLeft(t)); + } + function Lr(e) { + var t = e.display, + n = t.gutters.offsetWidth, + r = Math.round(e.doc.height + kn(e.display)); + return { + clientHeight: t.scroller.clientHeight, + viewHeight: t.wrapper.clientHeight, + scrollWidth: t.scroller.scrollWidth, + clientWidth: t.scroller.clientWidth, + viewWidth: t.wrapper.clientWidth, + barLeft: e.options.fixedGutter ? n : 0, + docHeight: r, + scrollHeight: r + xn(e) + t.barHeight, + nativeBarWidth: t.nativeBarWidth, + gutterWidth: n, + }; + } + var Hr = function (e, t, n) { + this.cm = n; + var r = (this.vert = A( + "div", + [A("div", null, null, "min-width: 1px")], + "CodeMirror-vscrollbar" + )), + i = (this.horiz = A( + "div", + [A("div", null, null, "height: 100%; min-height: 1px")], + "CodeMirror-hscrollbar" + )); + (r.tabIndex = i.tabIndex = -1), + e(r), + e(i), + he(r, "scroll", function () { + r.clientHeight && t(r.scrollTop, "vertical"); + }), + he(i, "scroll", function () { + i.clientWidth && t(i.scrollLeft, "horizontal"); + }), + (this.checkedZeroWidth = !1), + s && + a < 8 && + (this.horiz.style.minHeight = this.vert.style.minWidth = + "18px"); + }; + (Hr.prototype.update = function (e) { + var t = e.scrollWidth > e.clientWidth + 1, + n = e.scrollHeight > e.clientHeight + 1, + r = e.nativeBarWidth; + if (n) { + (this.vert.style.display = "block"), + (this.vert.style.bottom = t ? r + "px" : "0"); + var i = e.viewHeight - (t ? r : 0); + this.vert.firstChild.style.height = + Math.max(0, e.scrollHeight - e.clientHeight + i) + "px"; + } else + (this.vert.style.display = ""), + (this.vert.firstChild.style.height = "0"); + if (t) { + (this.horiz.style.display = "block"), + (this.horiz.style.right = n ? r + "px" : "0"), + (this.horiz.style.left = e.barLeft + "px"); + var o = e.viewWidth - e.barLeft - (n ? r : 0); + this.horiz.firstChild.style.width = + Math.max(0, e.scrollWidth - e.clientWidth + o) + "px"; + } else + (this.horiz.style.display = ""), + (this.horiz.firstChild.style.width = "0"); + return ( + !this.checkedZeroWidth && + e.clientHeight > 0 && + (0 == r && this.zeroWidthHack(), (this.checkedZeroWidth = !0)), + { right: n ? r : 0, bottom: t ? r : 0 } + ); + }), + (Hr.prototype.setScrollLeft = function (e) { + this.horiz.scrollLeft != e && (this.horiz.scrollLeft = e), + this.disableHoriz && + this.enableZeroWidthBar( + this.horiz, + this.disableHoriz, + "horiz" + ); + }), + (Hr.prototype.setScrollTop = function (e) { + this.vert.scrollTop != e && (this.vert.scrollTop = e), + this.disableVert && + this.enableZeroWidthBar(this.vert, this.disableVert, "vert"); + }), + (Hr.prototype.zeroWidthHack = function () { + var e = b && !d ? "12px" : "18px"; + (this.horiz.style.height = this.vert.style.width = e), + (this.horiz.style.pointerEvents = + this.vert.style.pointerEvents = + "none"), + (this.disableHoriz = new H()), + (this.disableVert = new H()); + }), + (Hr.prototype.enableZeroWidthBar = function (e, t, n) { + (e.style.pointerEvents = "auto"), + t.set(1e3, function r() { + var i = e.getBoundingClientRect(); + ("vert" == n + ? document.elementFromPoint( + i.right - 1, + (i.top + i.bottom) / 2 + ) + : document.elementFromPoint( + (i.right + i.left) / 2, + i.bottom - 1 + )) != e + ? (e.style.pointerEvents = "none") + : t.set(1e3, r); + }); + }), + (Hr.prototype.clear = function () { + var e = this.horiz.parentNode; + e.removeChild(this.horiz), e.removeChild(this.vert); + }); + var Ur = function () {}; + function Wr(e, t) { + t || (t = Lr(e)); + var n = e.display.barWidth, + r = e.display.barHeight; + $r(e, t); + for ( + var i = 0; + (i < 4 && n != e.display.barWidth) || r != e.display.barHeight; + i++ + ) + n != e.display.barWidth && e.options.lineWrapping && xr(e), + $r(e, Lr(e)), + (n = e.display.barWidth), + (r = e.display.barHeight); + } + function $r(e, t) { + var n = e.display, + r = n.scrollbars.update(t); + (n.sizer.style.paddingRight = (n.barWidth = r.right) + "px"), + (n.sizer.style.paddingBottom = (n.barHeight = r.bottom) + "px"), + (n.heightForcer.style.borderBottom = + r.bottom + "px solid transparent"), + r.right && r.bottom + ? ((n.scrollbarFiller.style.display = "block"), + (n.scrollbarFiller.style.height = r.bottom + "px"), + (n.scrollbarFiller.style.width = r.right + "px")) + : (n.scrollbarFiller.style.display = ""), + r.bottom && + e.options.coverGutterNextToScrollbar && + e.options.fixedGutter + ? ((n.gutterFiller.style.display = "block"), + (n.gutterFiller.style.height = r.bottom + "px"), + (n.gutterFiller.style.width = t.gutterWidth + "px")) + : (n.gutterFiller.style.display = ""); + } + (Ur.prototype.update = function () { + return { bottom: 0, right: 0 }; + }), + (Ur.prototype.setScrollLeft = function () {}), + (Ur.prototype.setScrollTop = function () {}), + (Ur.prototype.clear = function () {}); + var zr = { native: Hr, null: Ur }; + function qr(e) { + e.display.scrollbars && + (e.display.scrollbars.clear(), + e.display.scrollbars.addClass && + x(e.display.wrapper, e.display.scrollbars.addClass)), + (e.display.scrollbars = new zr[e.options.scrollbarStyle]( + function (t) { + e.display.wrapper.insertBefore(t, e.display.scrollbarFiller), + he(t, "mousedown", function () { + e.state.focused && + setTimeout(function () { + return e.display.input.focus(); + }, 0); + }), + t.setAttribute("cm-not-content", "true"); + }, + function (t, n) { + "horizontal" == n ? Fr(e, t) : Mr(e, t); + }, + e + )), + e.display.scrollbars.addClass && + O(e.display.wrapper, e.display.scrollbars.addClass); + } + var jr = 0; + function Gr(e) { + var t; + (e.curOp = { + cm: e, + viewChanged: !1, + startHeight: e.doc.height, + forceUpdate: !1, + updateInput: 0, + typing: !1, + changeObjs: null, + cursorActivityHandlers: null, + cursorActivityCalled: 0, + selectionChanged: !1, + updateMaxLine: !1, + scrollLeft: null, + scrollTop: null, + scrollToPos: null, + focus: !1, + id: ++jr, + }), + (t = e.curOp), + sn + ? sn.ops.push(t) + : (t.ownsGroup = sn = { ops: [t], delayedCallbacks: [] }); + } + function Vr(e) { + var t = e.curOp; + t && + (function (e, t) { + var n = e.ownsGroup; + if (n) + try { + !(function (e) { + var t = e.delayedCallbacks, + n = 0; + do { + for (; n < t.length; n++) t[n].call(null); + for (var r = 0; r < e.ops.length; r++) { + var i = e.ops[r]; + if (i.cursorActivityHandlers) + for ( + ; + i.cursorActivityCalled < + i.cursorActivityHandlers.length; + + ) + i.cursorActivityHandlers[ + i.cursorActivityCalled++ + ].call(null, i.cm); + } + } while (n < t.length); + })(n); + } finally { + (sn = null), t(n); + } + })(t, function (e) { + for (var t = 0; t < e.ops.length; t++) e.ops[t].cm.curOp = null; + !(function (e) { + for (var t = e.ops, n = 0; n < t.length; n++) Kr(t[n]); + for (var r = 0; r < t.length; r++) Yr(t[r]); + for (var i = 0; i < t.length; i++) Xr(t[i]); + for (var o = 0; o < t.length; o++) Zr(t[o]); + for (var s = 0; s < t.length; s++) Qr(t[s]); + })(e); + }); + } + function Kr(e) { + var t = e.cm, + n = t.display; + (function (e) { + var t = e.display; + !t.scrollbarsClipped && + t.scroller.offsetWidth && + ((t.nativeBarWidth = + t.scroller.offsetWidth - t.scroller.clientWidth), + (t.heightForcer.style.height = xn(e) + "px"), + (t.sizer.style.marginBottom = -t.nativeBarWidth + "px"), + (t.sizer.style.borderRightWidth = xn(e) + "px"), + (t.scrollbarsClipped = !0)); + })(t), + e.updateMaxLine && jt(t), + (e.mustUpdate = + e.viewChanged || + e.forceUpdate || + null != e.scrollTop || + (e.scrollToPos && + (e.scrollToPos.from.line < n.viewFrom || + e.scrollToPos.to.line >= n.viewTo)) || + (n.maxLineChanged && t.options.lineWrapping)), + (e.update = + e.mustUpdate && + new oi( + t, + e.mustUpdate && { top: e.scrollTop, ensure: e.scrollToPos }, + e.forceUpdate + )); + } + function Yr(e) { + e.updatedDisplay = e.mustUpdate && si(e.cm, e.update); + } + function Xr(e) { + var t = e.cm, + n = t.display; + e.updatedDisplay && xr(t), + (e.barMeasure = Lr(t)), + n.maxLineChanged && + !t.options.lineWrapping && + ((e.adjustWidthTo = + _n(t, n.maxLine, n.maxLine.text.length).left + 3), + (t.display.sizerWidth = e.adjustWidthTo), + (e.barMeasure.scrollWidth = Math.max( + n.scroller.clientWidth, + n.sizer.offsetLeft + + e.adjustWidthTo + + xn(t) + + t.display.barWidth + )), + (e.maxScrollLeft = Math.max( + 0, + n.sizer.offsetLeft + e.adjustWidthTo - Tn(t) + ))), + (e.updatedDisplay || e.selectionChanged) && + (e.preparedSelection = n.input.prepareSelection()); + } + function Zr(e) { + var t = e.cm; + null != e.adjustWidthTo && + ((t.display.sizer.style.minWidth = e.adjustWidthTo + "px"), + e.maxScrollLeft < t.doc.scrollLeft && + Fr( + t, + Math.min(t.display.scroller.scrollLeft, e.maxScrollLeft), + !0 + ), + (t.display.maxLineChanged = !1)); + var n = e.focus && e.focus == I(); + e.preparedSelection && + t.display.input.showSelection(e.preparedSelection, n), + (e.updatedDisplay || e.startHeight != t.doc.height) && + Wr(t, e.barMeasure), + e.updatedDisplay && ui(t, e.barMeasure), + e.selectionChanged && Cr(t), + t.state.focused && + e.updateInput && + t.display.input.reset(e.typing), + n && Sr(e.cm); + } + function Qr(e) { + var t = e.cm, + n = t.display, + r = t.doc; + e.updatedDisplay && ai(t, e.update), + null == n.wheelStartX || + (null == e.scrollTop && + null == e.scrollLeft && + !e.scrollToPos) || + (n.wheelStartX = n.wheelStartY = null), + null != e.scrollTop && Br(t, e.scrollTop, e.forceScroll), + null != e.scrollLeft && Fr(t, e.scrollLeft, !0, !0), + e.scrollToPos && + (function (e, t) { + if (!fe(e, "scrollCursorIntoView")) { + var n = e.display, + r = n.sizer.getBoundingClientRect(), + i = null; + if ( + (t.top + r.top < 0 + ? (i = !0) + : t.bottom + r.top > + (window.innerHeight || + document.documentElement.clientHeight) && + (i = !1), + null != i && !m) + ) { + var o = A( + "div", + "​", + null, + "position: absolute;\n top: " + + (t.top - n.viewOffset - En(e.display)) + + "px;\n height: " + + (t.bottom - t.top + xn(e) + n.barHeight) + + "px;\n left: " + + t.left + + "px; width: " + + Math.max(2, t.right - t.left) + + "px;" + ); + e.display.lineSpace.appendChild(o), + o.scrollIntoView(i), + e.display.lineSpace.removeChild(o); + } + } + })( + t, + (function (e, t, n, r) { + var i; + null == r && (r = 0), + e.options.lineWrapping || + t != n || + (n = + "before" == + (t = t.ch + ? et( + t.line, + "before" == t.sticky ? t.ch - 1 : t.ch, + "after" + ) + : t).sticky + ? et(t.line, t.ch + 1, "before") + : t); + for (var o = 0; o < 5; o++) { + var s = !1, + a = Vn(e, t), + l = n && n != t ? Vn(e, n) : a, + c = Ar( + e, + (i = { + left: Math.min(a.left, l.left), + top: Math.min(a.top, l.top) - r, + right: Math.max(a.left, l.left), + bottom: Math.max(a.bottom, l.bottom) + r, + }) + ), + u = e.doc.scrollTop, + h = e.doc.scrollLeft; + if ( + (null != c.scrollTop && + (Mr(e, c.scrollTop), + Math.abs(e.doc.scrollTop - u) > 1 && (s = !0)), + null != c.scrollLeft && + (Fr(e, c.scrollLeft), + Math.abs(e.doc.scrollLeft - h) > 1 && (s = !0)), + !s) + ) + break; + } + return i; + })( + t, + at(r, e.scrollToPos.from), + at(r, e.scrollToPos.to), + e.scrollToPos.margin + ) + ); + var i = e.maybeHiddenMarkers, + o = e.maybeUnhiddenMarkers; + if (i) + for (var s = 0; s < i.length; ++s) + i[s].lines.length || me(i[s], "hide"); + if (o) + for (var a = 0; a < o.length; ++a) + o[a].lines.length && me(o[a], "unhide"); + n.wrapper.offsetHeight && + (r.scrollTop = t.display.scroller.scrollTop), + e.changeObjs && me(t, "changes", t, e.changeObjs), + e.update && e.update.finish(); + } + function Jr(e, t) { + if (e.curOp) return t(); + Gr(e); + try { + return t(); + } finally { + Vr(e); + } + } + function ei(e, t) { + return function () { + if (e.curOp) return t.apply(e, arguments); + Gr(e); + try { + return t.apply(e, arguments); + } finally { + Vr(e); + } + }; + } + function ti(e) { + return function () { + if (this.curOp) return e.apply(this, arguments); + Gr(this); + try { + return e.apply(this, arguments); + } finally { + Vr(this); + } + }; + } + function ni(e) { + return function () { + var t = this.cm; + if (!t || t.curOp) return e.apply(this, arguments); + Gr(t); + try { + return e.apply(this, arguments); + } finally { + Vr(t); + } + }; + } + function ri(e, t) { + e.doc.highlightFrontier < e.display.viewTo && + e.state.highlight.set(t, B(ii, e)); + } + function ii(e) { + var t = e.doc; + if (!(t.highlightFrontier >= e.display.viewTo)) { + var n = +new Date() + e.options.workTime, + r = dt(e, t.highlightFrontier), + i = []; + t.iter( + r.line, + Math.min(t.first + t.size, e.display.viewTo + 500), + function (o) { + if (r.line >= e.display.viewFrom) { + var s = o.styles, + a = + o.text.length > e.options.maxHighlightLength + ? $e(t.mode, r.state) + : null, + l = ht(e, o, r, !0); + a && (r.state = a), (o.styles = l.styles); + var c = o.styleClasses, + u = l.classes; + u ? (o.styleClasses = u) : c && (o.styleClasses = null); + for ( + var h = + !s || + s.length != o.styles.length || + (c != u && + (!c || + !u || + c.bgClass != u.bgClass || + c.textClass != u.textClass)), + p = 0; + !h && p < s.length; + ++p + ) + h = s[p] != o.styles[p]; + h && i.push(r.line), + (o.stateAfter = r.save()), + r.nextLine(); + } else + o.text.length <= e.options.maxHighlightLength && + mt(e, o.text, r), + (o.stateAfter = r.line % 5 == 0 ? r.save() : null), + r.nextLine(); + if (+new Date() > n) return ri(e, e.options.workDelay), !0; + } + ), + (t.highlightFrontier = r.line), + (t.modeFrontier = Math.max(t.modeFrontier, r.line)), + i.length && + Jr(e, function () { + for (var t = 0; t < i.length; t++) pr(e, i[t], "text"); + }); + } + } + var oi = function (e, t, n) { + var r = e.display; + (this.viewport = t), + (this.visible = Dr(r, e.doc, t)), + (this.editorIsHidden = !r.wrapper.offsetWidth), + (this.wrapperHeight = r.wrapper.clientHeight), + (this.wrapperWidth = r.wrapper.clientWidth), + (this.oldDisplayWidth = Tn(e)), + (this.force = n), + (this.dims = or(e)), + (this.events = []); + }; + function si(e, t) { + var n = e.display, + r = e.doc; + if (t.editorIsHidden) return dr(e), !1; + if ( + !t.force && + t.visible.from >= n.viewFrom && + t.visible.to <= n.viewTo && + (null == n.updateLineNumbers || + n.updateLineNumbers >= n.viewTo) && + n.renderedView == n.view && + 0 == fr(e) + ) + return !1; + pi(e) && (dr(e), (t.dims = or(e))); + var i = r.first + r.size, + o = Math.max(t.visible.from - e.options.viewportMargin, r.first), + s = Math.min(i, t.visible.to + e.options.viewportMargin); + n.viewFrom < o && + o - n.viewFrom < 20 && + (o = Math.max(r.first, n.viewFrom)), + n.viewTo > s && n.viewTo - s < 20 && (s = Math.min(i, n.viewTo)), + St && ((o = Ht(e.doc, o)), (s = Ut(e.doc, s))); + var a = + o != n.viewFrom || + s != n.viewTo || + n.lastWrapHeight != t.wrapperHeight || + n.lastWrapWidth != t.wrapperWidth; + (function (e, t, n) { + var r = e.display; + 0 == r.view.length || t >= r.viewTo || n <= r.viewFrom + ? ((r.view = on(e, t, n)), (r.viewFrom = t)) + : (r.viewFrom > t + ? (r.view = on(e, t, r.viewFrom).concat(r.view)) + : r.viewFrom < t && (r.view = r.view.slice(ur(e, t))), + (r.viewFrom = t), + r.viewTo < n + ? (r.view = r.view.concat(on(e, r.viewTo, n))) + : r.viewTo > n && (r.view = r.view.slice(0, ur(e, n)))), + (r.viewTo = n); + })(e, o, s), + (n.viewOffset = zt(Ge(e.doc, n.viewFrom))), + (e.display.mover.style.top = n.viewOffset + "px"); + var c = fr(e); + if ( + !a && + 0 == c && + !t.force && + n.renderedView == n.view && + (null == n.updateLineNumbers || n.updateLineNumbers >= n.viewTo) + ) + return !1; + var u = (function (e) { + if (e.hasFocus()) return null; + var t = I(); + if (!t || !P(e.display.lineDiv, t)) return null; + var n = { activeElt: t }; + if (window.getSelection) { + var r = window.getSelection(); + r.anchorNode && + r.extend && + P(e.display.lineDiv, r.anchorNode) && + ((n.anchorNode = r.anchorNode), + (n.anchorOffset = r.anchorOffset), + (n.focusNode = r.focusNode), + (n.focusOffset = r.focusOffset)); + } + return n; + })(e); + return ( + c > 4 && (n.lineDiv.style.display = "none"), + (function (e, t, n) { + var r = e.display, + i = e.options.lineNumbers, + o = r.lineDiv, + s = o.firstChild; + function a(t) { + var n = t.nextSibling; + return ( + l && b && e.display.currentWheelTarget == t + ? (t.style.display = "none") + : t.parentNode.removeChild(t), + n + ); + } + for (var c = r.view, u = r.viewFrom, h = 0; h < c.length; h++) { + var p = c[h]; + if (p.hidden); + else if (p.node && p.node.parentNode == o) { + for (; s != p.node; ) s = a(s); + var d = i && null != t && t <= u && p.lineNumber; + p.changes && + (U(p.changes, "gutter") > -1 && (d = !1), un(e, p, u, n)), + d && + (T(p.lineNumber), + p.lineNumber.appendChild( + document.createTextNode(Je(e.options, u)) + )), + (s = p.node.nextSibling); + } else { + var m = yn(e, p, u, n); + o.insertBefore(m, s); + } + u += p.size; + } + for (; s; ) s = a(s); + })(e, n.updateLineNumbers, t.dims), + c > 4 && (n.lineDiv.style.display = ""), + (n.renderedView = n.view), + (function (e) { + if ( + e && + e.activeElt && + e.activeElt != I() && + (e.activeElt.focus(), + !/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName) && + e.anchorNode && + P(document.body, e.anchorNode) && + P(document.body, e.focusNode)) + ) { + var t = window.getSelection(), + n = document.createRange(); + n.setEnd(e.anchorNode, e.anchorOffset), + n.collapse(!1), + t.removeAllRanges(), + t.addRange(n), + t.extend(e.focusNode, e.focusOffset); + } + })(u), + T(n.cursorDiv), + T(n.selectionDiv), + (n.gutters.style.height = n.sizer.style.minHeight = 0), + a && + ((n.lastWrapHeight = t.wrapperHeight), + (n.lastWrapWidth = t.wrapperWidth), + ri(e, 400)), + (n.updateLineNumbers = null), + !0 + ); + } + function ai(e, t) { + for (var n = t.viewport, r = !0; ; r = !1) { + if (r && e.options.lineWrapping && t.oldDisplayWidth != Tn(e)) + r && (t.visible = Dr(e.display, e.doc, n)); + else if ( + (n && + null != n.top && + (n = { + top: Math.min(e.doc.height + kn(e.display) - Dn(e), n.top), + }), + (t.visible = Dr(e.display, e.doc, n)), + t.visible.from >= e.display.viewFrom && + t.visible.to <= e.display.viewTo) + ) + break; + if (!si(e, t)) break; + xr(e); + var i = Lr(e); + gr(e), Wr(e, i), ui(e, i), (t.force = !1); + } + t.signal(e, "update", e), + (e.display.viewFrom == e.display.reportedViewFrom && + e.display.viewTo == e.display.reportedViewTo) || + (t.signal( + e, + "viewportChange", + e, + e.display.viewFrom, + e.display.viewTo + ), + (e.display.reportedViewFrom = e.display.viewFrom), + (e.display.reportedViewTo = e.display.viewTo)); + } + function li(e, t) { + var n = new oi(e, t); + if (si(e, n)) { + xr(e), ai(e, n); + var r = Lr(e); + gr(e), Wr(e, r), ui(e, r), n.finish(); + } + } + function ci(e) { + var t = e.gutters.offsetWidth; + e.sizer.style.marginLeft = t + "px"; + } + function ui(e, t) { + (e.display.sizer.style.minHeight = t.docHeight + "px"), + (e.display.heightForcer.style.top = t.docHeight + "px"), + (e.display.gutters.style.height = + t.docHeight + e.display.barHeight + xn(e) + "px"); + } + function hi(e) { + var t = e.display, + n = t.view; + if ( + t.alignWidgets || + (t.gutters.firstChild && e.options.fixedGutter) + ) { + for ( + var r = sr(t) - t.scroller.scrollLeft + e.doc.scrollLeft, + i = t.gutters.offsetWidth, + o = r + "px", + s = 0; + s < n.length; + s++ + ) + if (!n[s].hidden) { + e.options.fixedGutter && + (n[s].gutter && (n[s].gutter.style.left = o), + n[s].gutterBackground && + (n[s].gutterBackground.style.left = o)); + var a = n[s].alignable; + if (a) for (var l = 0; l < a.length; l++) a[l].style.left = o; + } + e.options.fixedGutter && (t.gutters.style.left = r + i + "px"); + } + } + function pi(e) { + if (!e.options.lineNumbers) return !1; + var t = e.doc, + n = Je(e.options, t.first + t.size - 1), + r = e.display; + if (n.length != r.lineNumChars) { + var i = r.measure.appendChild( + A( + "div", + [A("div", n)], + "CodeMirror-linenumber CodeMirror-gutter-elt" + ) + ), + o = i.firstChild.offsetWidth, + s = i.offsetWidth - o; + return ( + (r.lineGutter.style.width = ""), + (r.lineNumInnerWidth = + Math.max(o, r.lineGutter.offsetWidth - s) + 1), + (r.lineNumWidth = r.lineNumInnerWidth + s), + (r.lineNumChars = r.lineNumInnerWidth ? n.length : -1), + (r.lineGutter.style.width = r.lineNumWidth + "px"), + ci(e.display), + !0 + ); + } + return !1; + } + function di(e, t) { + for (var n = [], r = !1, i = 0; i < e.length; i++) { + var o = e[i], + s = null; + if ( + ("string" != typeof o && ((s = o.style), (o = o.className)), + "CodeMirror-linenumbers" == o) + ) { + if (!t) continue; + r = !0; + } + n.push({ className: o, style: s }); + } + return ( + t && + !r && + n.push({ className: "CodeMirror-linenumbers", style: null }), + n + ); + } + function mi(e) { + var t = e.gutters, + n = e.gutterSpecs; + T(t), (e.lineGutter = null); + for (var r = 0; r < n.length; ++r) { + var i = n[r], + o = i.className, + s = i.style, + a = t.appendChild(A("div", null, "CodeMirror-gutter " + o)); + s && (a.style.cssText = s), + "CodeMirror-linenumbers" == o && + ((e.lineGutter = a), + (a.style.width = (e.lineNumWidth || 1) + "px")); + } + (t.style.display = n.length ? "" : "none"), ci(e); + } + function fi(e) { + mi(e.display), hr(e), hi(e); + } + function gi(e, t, r, i) { + var o = this; + (this.input = r), + (o.scrollbarFiller = A( + "div", + null, + "CodeMirror-scrollbar-filler" + )), + o.scrollbarFiller.setAttribute("cm-not-content", "true"), + (o.gutterFiller = A("div", null, "CodeMirror-gutter-filler")), + o.gutterFiller.setAttribute("cm-not-content", "true"), + (o.lineDiv = _("div", null, "CodeMirror-code")), + (o.selectionDiv = A( + "div", + null, + null, + "position: relative; z-index: 1" + )), + (o.cursorDiv = A("div", null, "CodeMirror-cursors")), + (o.measure = A("div", null, "CodeMirror-measure")), + (o.lineMeasure = A("div", null, "CodeMirror-measure")), + (o.lineSpace = _( + "div", + [ + o.measure, + o.lineMeasure, + o.selectionDiv, + o.cursorDiv, + o.lineDiv, + ], + null, + "position: relative; outline: none" + )); + var c = _("div", [o.lineSpace], "CodeMirror-lines"); + (o.mover = A("div", [c], null, "position: relative")), + (o.sizer = A("div", [o.mover], "CodeMirror-sizer")), + (o.sizerWidth = null), + (o.heightForcer = A( + "div", + null, + null, + "position: absolute; height: 50px; width: 1px;" + )), + (o.gutters = A("div", null, "CodeMirror-gutters")), + (o.lineGutter = null), + (o.scroller = A( + "div", + [o.sizer, o.heightForcer, o.gutters], + "CodeMirror-scroll" + )), + o.scroller.setAttribute("tabIndex", "-1"), + (o.wrapper = A( + "div", + [o.scrollbarFiller, o.gutterFiller, o.scroller], + "CodeMirror" + )), + s && + a < 8 && + ((o.gutters.style.zIndex = -1), + (o.scroller.style.paddingRight = 0)), + l || (n && y) || (o.scroller.draggable = !0), + e && (e.appendChild ? e.appendChild(o.wrapper) : e(o.wrapper)), + (o.viewFrom = o.viewTo = t.first), + (o.reportedViewFrom = o.reportedViewTo = t.first), + (o.view = []), + (o.renderedView = null), + (o.externalMeasured = null), + (o.viewOffset = 0), + (o.lastWrapHeight = o.lastWrapWidth = 0), + (o.updateLineNumbers = null), + (o.nativeBarWidth = o.barHeight = o.barWidth = 0), + (o.scrollbarsClipped = !1), + (o.lineNumWidth = o.lineNumInnerWidth = o.lineNumChars = null), + (o.alignWidgets = !1), + (o.cachedCharWidth = + o.cachedTextHeight = + o.cachedPaddingH = + null), + (o.maxLine = null), + (o.maxLineLength = 0), + (o.maxLineChanged = !1), + (o.wheelDX = o.wheelDY = o.wheelStartX = o.wheelStartY = null), + (o.shift = !1), + (o.selForContextMenu = null), + (o.activeTouch = null), + (o.gutterSpecs = di(i.gutters, i.lineNumbers)), + mi(o), + r.init(o); + } + (oi.prototype.signal = function (e, t) { + ye(e, t) && this.events.push(arguments); + }), + (oi.prototype.finish = function () { + for (var e = 0; e < this.events.length; e++) + me.apply(null, this.events[e]); + }); + var yi = 0, + bi = null; + function vi(e) { + var t = e.wheelDeltaX, + n = e.wheelDeltaY; + return ( + null == t && + e.detail && + e.axis == e.HORIZONTAL_AXIS && + (t = e.detail), + null == n && e.detail && e.axis == e.VERTICAL_AXIS + ? (n = e.detail) + : null == n && (n = e.wheelDelta), + { x: t, y: n } + ); + } + function wi(e) { + var t = vi(e); + return (t.x *= bi), (t.y *= bi), t; + } + function Ci(e, t) { + var r = vi(t), + i = r.x, + o = r.y, + s = e.display, + a = s.scroller, + c = a.scrollWidth > a.clientWidth, + u = a.scrollHeight > a.clientHeight; + if ((i && c) || (o && u)) { + if (o && b && l) + e: for (var p = t.target, d = s.view; p != a; p = p.parentNode) + for (var m = 0; m < d.length; m++) + if (d[m].node == p) { + e.display.currentWheelTarget = p; + break e; + } + if (i && !n && !h && null != bi) + return ( + o && u && Mr(e, Math.max(0, a.scrollTop + o * bi)), + Fr(e, Math.max(0, a.scrollLeft + i * bi)), + (!o || (o && u)) && ve(t), + void (s.wheelStartX = null) + ); + if (o && null != bi) { + var f = o * bi, + g = e.doc.scrollTop, + y = g + s.wrapper.clientHeight; + f < 0 + ? (g = Math.max(0, g + f - 50)) + : (y = Math.min(e.doc.height, y + f + 50)), + li(e, { top: g, bottom: y }); + } + yi < 20 && + (null == s.wheelStartX + ? ((s.wheelStartX = a.scrollLeft), + (s.wheelStartY = a.scrollTop), + (s.wheelDX = i), + (s.wheelDY = o), + setTimeout(function () { + if (null != s.wheelStartX) { + var e = a.scrollLeft - s.wheelStartX, + t = a.scrollTop - s.wheelStartY, + n = + (t && s.wheelDY && t / s.wheelDY) || + (e && s.wheelDX && e / s.wheelDX); + (s.wheelStartX = s.wheelStartY = null), + n && ((bi = (bi * yi + n) / (yi + 1)), ++yi); + } + }, 200)) + : ((s.wheelDX += i), (s.wheelDY += o))); + } + } + s + ? (bi = -0.53) + : n + ? (bi = 15) + : u + ? (bi = -0.7) + : p && (bi = -1 / 3); + var Si = function (e, t) { + (this.ranges = e), (this.primIndex = t); + }; + (Si.prototype.primary = function () { + return this.ranges[this.primIndex]; + }), + (Si.prototype.equals = function (e) { + if (e == this) return !0; + if ( + e.primIndex != this.primIndex || + e.ranges.length != this.ranges.length + ) + return !1; + for (var t = 0; t < this.ranges.length; t++) { + var n = this.ranges[t], + r = e.ranges[t]; + if (!nt(n.anchor, r.anchor) || !nt(n.head, r.head)) return !1; + } + return !0; + }), + (Si.prototype.deepCopy = function () { + for (var e = [], t = 0; t < this.ranges.length; t++) + e[t] = new Ei( + rt(this.ranges[t].anchor), + rt(this.ranges[t].head) + ); + return new Si(e, this.primIndex); + }), + (Si.prototype.somethingSelected = function () { + for (var e = 0; e < this.ranges.length; e++) + if (!this.ranges[e].empty()) return !0; + return !1; + }), + (Si.prototype.contains = function (e, t) { + t || (t = e); + for (var n = 0; n < this.ranges.length; n++) { + var r = this.ranges[n]; + if (tt(t, r.from()) >= 0 && tt(e, r.to()) <= 0) return n; + } + return -1; + }); + var Ei = function (e, t) { + (this.anchor = e), (this.head = t); + }; + function ki(e, t, n) { + var r = e && e.options.selectionsMayTouch, + i = t[n]; + t.sort(function (e, t) { + return tt(e.from(), t.from()); + }), + (n = U(t, i)); + for (var o = 1; o < t.length; o++) { + var s = t[o], + a = t[o - 1], + l = tt(a.to(), s.from()); + if (r && !s.empty() ? l > 0 : l >= 0) { + var c = ot(a.from(), s.from()), + u = it(a.to(), s.to()), + h = a.empty() ? s.from() == s.head : a.from() == a.head; + o <= n && --n, t.splice(--o, 2, new Ei(h ? u : c, h ? c : u)); + } + } + return new Si(t, n); + } + function Ri(e, t) { + return new Si([new Ei(e, t || e)], 0); + } + function xi(e) { + return e.text + ? et( + e.from.line + e.text.length - 1, + K(e.text).length + (1 == e.text.length ? e.from.ch : 0) + ) + : e.to; + } + function Ti(e, t) { + if (tt(e, t.from) < 0) return e; + if (tt(e, t.to) <= 0) return xi(t); + var n = e.line + t.text.length - (t.to.line - t.from.line) - 1, + r = e.ch; + return e.line == t.to.line && (r += xi(t).ch - t.to.ch), et(n, r); + } + function Di(e, t) { + for (var n = [], r = 0; r < e.sel.ranges.length; r++) { + var i = e.sel.ranges[r]; + n.push(new Ei(Ti(i.anchor, t), Ti(i.head, t))); + } + return ki(e.cm, n, e.sel.primIndex); + } + function Ai(e, t, n) { + return e.line == t.line + ? et(n.line, e.ch - t.ch + n.ch) + : et(n.line + (e.line - t.line), e.ch); + } + function _i(e) { + (e.doc.mode = He(e.options, e.doc.modeOption)), Pi(e); + } + function Pi(e) { + e.doc.iter(function (e) { + e.stateAfter && (e.stateAfter = null), + e.styles && (e.styles = null); + }), + (e.doc.modeFrontier = e.doc.highlightFrontier = e.doc.first), + ri(e, 100), + e.state.modeGen++, + e.curOp && hr(e); + } + function Ii(e, t) { + return ( + 0 == t.from.ch && + 0 == t.to.ch && + "" == K(t.text) && + (!e.cm || e.cm.options.wholeLineUpdateBefore) + ); + } + function Oi(e, t, n, r) { + function i(e) { + return n ? n[e] : null; + } + function o(e, n, i) { + (function (e, t, n, r) { + (e.text = t), + e.stateAfter && (e.stateAfter = null), + e.styles && (e.styles = null), + null != e.order && (e.order = null), + Dt(e), + At(e, n); + var i = r ? r(e) : 1; + i != e.height && Ye(e, i); + })(e, n, i, r), + ln(e, "change", e, t); + } + function s(e, t) { + for (var n = [], o = e; o < t; ++o) n.push(new Gt(c[o], i(o), r)); + return n; + } + var a = t.from, + l = t.to, + c = t.text, + u = Ge(e, a.line), + h = Ge(e, l.line), + p = K(c), + d = i(c.length - 1), + m = l.line - a.line; + if (t.full) + e.insert(0, s(0, c.length)), + e.remove(c.length, e.size - c.length); + else if (Ii(e, t)) { + var f = s(0, c.length - 1); + o(h, h.text, d), + m && e.remove(a.line, m), + f.length && e.insert(a.line, f); + } else if (u == h) + if (1 == c.length) + o(u, u.text.slice(0, a.ch) + p + u.text.slice(l.ch), d); + else { + var g = s(1, c.length - 1); + g.push(new Gt(p + u.text.slice(l.ch), d, r)), + o(u, u.text.slice(0, a.ch) + c[0], i(0)), + e.insert(a.line + 1, g); + } + else if (1 == c.length) + o(u, u.text.slice(0, a.ch) + c[0] + h.text.slice(l.ch), i(0)), + e.remove(a.line + 1, m); + else { + o(u, u.text.slice(0, a.ch) + c[0], i(0)), + o(h, p + h.text.slice(l.ch), d); + var y = s(1, c.length - 1); + m > 1 && e.remove(a.line + 1, m - 1), e.insert(a.line + 1, y); + } + ln(e, "change", e, t); + } + function Ni(e, t, n) { + !(function e(r, i, o) { + if (r.linked) + for (var s = 0; s < r.linked.length; ++s) { + var a = r.linked[s]; + if (a.doc != i) { + var l = o && a.sharedHist; + (n && !l) || (t(a.doc, l), e(a.doc, r, l)); + } + } + })(e, null, !0); + } + function Mi(e, t) { + if (t.cm) throw new Error("This document is already in use."); + (e.doc = t), + (t.cm = e), + lr(e), + _i(e), + Bi(e), + e.options.lineWrapping || jt(e), + (e.options.mode = t.modeOption), + hr(e); + } + function Bi(e) { + ("rtl" == e.doc.direction ? O : x)( + e.display.lineDiv, + "CodeMirror-rtl" + ); + } + function Fi(e) { + (this.done = []), + (this.undone = []), + (this.undoDepth = e ? e.undoDepth : 1 / 0), + (this.lastModTime = this.lastSelTime = 0), + (this.lastOp = this.lastSelOp = null), + (this.lastOrigin = this.lastSelOrigin = null), + (this.generation = this.maxGeneration = e ? e.maxGeneration : 1); + } + function Li(e, t) { + var n = { from: rt(t.from), to: xi(t), text: Ve(e, t.from, t.to) }; + return ( + zi(e, n, t.from.line, t.to.line + 1), + Ni( + e, + function (e) { + return zi(e, n, t.from.line, t.to.line + 1); + }, + !0 + ), + n + ); + } + function Hi(e) { + for (; e.length && K(e).ranges; ) e.pop(); + } + function Ui(e, t, n, r) { + var i = e.history; + i.undone.length = 0; + var o, + s, + a = +new Date(); + if ( + (i.lastOp == r || + (i.lastOrigin == t.origin && + t.origin && + (("+" == t.origin.charAt(0) && + i.lastModTime > + a - (e.cm ? e.cm.options.historyEventDelay : 500)) || + "*" == t.origin.charAt(0)))) && + (o = (function (e, t) { + return t + ? (Hi(e.done), K(e.done)) + : e.done.length && !K(e.done).ranges + ? K(e.done) + : e.done.length > 1 && !e.done[e.done.length - 2].ranges + ? (e.done.pop(), K(e.done)) + : void 0; + })(i, i.lastOp == r)) + ) + (s = K(o.changes)), + 0 == tt(t.from, t.to) && 0 == tt(t.from, s.to) + ? (s.to = xi(t)) + : o.changes.push(Li(e, t)); + else { + var l = K(i.done); + for ( + (l && l.ranges) || $i(e.sel, i.done), + o = { changes: [Li(e, t)], generation: i.generation }, + i.done.push(o); + i.done.length > i.undoDepth; + + ) + i.done.shift(), i.done[0].ranges || i.done.shift(); + } + i.done.push(n), + (i.generation = ++i.maxGeneration), + (i.lastModTime = i.lastSelTime = a), + (i.lastOp = i.lastSelOp = r), + (i.lastOrigin = i.lastSelOrigin = t.origin), + s || me(e, "historyAdded"); + } + function Wi(e, t, n, r) { + var i = e.history, + o = r && r.origin; + n == i.lastSelOp || + (o && + i.lastSelOrigin == o && + ((i.lastModTime == i.lastSelTime && i.lastOrigin == o) || + (function (e, t, n, r) { + var i = t.charAt(0); + return ( + "*" == i || + ("+" == i && + n.ranges.length == r.ranges.length && + n.somethingSelected() == r.somethingSelected() && + new Date() - e.history.lastSelTime <= + (e.cm ? e.cm.options.historyEventDelay : 500)) + ); + })(e, o, K(i.done), t))) + ? (i.done[i.done.length - 1] = t) + : $i(t, i.done), + (i.lastSelTime = +new Date()), + (i.lastSelOrigin = o), + (i.lastSelOp = n), + r && !1 !== r.clearRedo && Hi(i.undone); + } + function $i(e, t) { + var n = K(t); + (n && n.ranges && n.equals(e)) || t.push(e); + } + function zi(e, t, n, r) { + var i = t["spans_" + e.id], + o = 0; + e.iter( + Math.max(e.first, n), + Math.min(e.first + e.size, r), + function (n) { + n.markedSpans && + ((i || (i = t["spans_" + e.id] = {}))[o] = n.markedSpans), + ++o; + } + ); + } + function qi(e) { + if (!e) return null; + for (var t, n = 0; n < e.length; ++n) + e[n].marker.explicitlyCleared + ? t || (t = e.slice(0, n)) + : t && t.push(e[n]); + return t ? (t.length ? t : null) : e; + } + function ji(e, t) { + var n = (function (e, t) { + var n = t["spans_" + e.id]; + if (!n) return null; + for (var r = [], i = 0; i < t.text.length; ++i) + r.push(qi(n[i])); + return r; + })(e, t), + r = xt(e, t); + if (!n) return r; + if (!r) return n; + for (var i = 0; i < n.length; ++i) { + var o = n[i], + s = r[i]; + if (o && s) + e: for (var a = 0; a < s.length; ++a) { + for (var l = s[a], c = 0; c < o.length; ++c) + if (o[c].marker == l.marker) continue e; + o.push(l); + } + else s && (n[i] = s); + } + return n; + } + function Gi(e, t, n) { + for (var r = [], i = 0; i < e.length; ++i) { + var o = e[i]; + if (o.ranges) r.push(n ? Si.prototype.deepCopy.call(o) : o); + else { + var s = o.changes, + a = []; + r.push({ changes: a }); + for (var l = 0; l < s.length; ++l) { + var c = s[l], + u = void 0; + if ((a.push({ from: c.from, to: c.to, text: c.text }), t)) + for (var h in c) + (u = h.match(/^spans_(\d+)$/)) && + U(t, Number(u[1])) > -1 && + ((K(a)[h] = c[h]), delete c[h]); + } + } + } + return r; + } + function Vi(e, t, n, r) { + if (r) { + var i = e.anchor; + if (n) { + var o = tt(t, i) < 0; + o != tt(n, i) < 0 + ? ((i = t), (t = n)) + : o != tt(t, n) < 0 && (t = n); + } + return new Ei(i, t); + } + return new Ei(n || t, t); + } + function Ki(e, t, n, r, i) { + null == i && (i = e.cm && (e.cm.display.shift || e.extend)), + Ji(e, new Si([Vi(e.sel.primary(), t, n, i)], 0), r); + } + function Yi(e, t, n) { + for ( + var r = [], i = e.cm && (e.cm.display.shift || e.extend), o = 0; + o < e.sel.ranges.length; + o++ + ) + r[o] = Vi(e.sel.ranges[o], t[o], null, i); + Ji(e, ki(e.cm, r, e.sel.primIndex), n); + } + function Xi(e, t, n, r) { + var i = e.sel.ranges.slice(0); + (i[t] = n), Ji(e, ki(e.cm, i, e.sel.primIndex), r); + } + function Zi(e, t, n, r) { + Ji(e, Ri(t, n), r); + } + function Qi(e, t, n) { + var r = e.history.done, + i = K(r); + i && i.ranges ? ((r[r.length - 1] = t), eo(e, t, n)) : Ji(e, t, n); + } + function Ji(e, t, n) { + eo(e, t, n), Wi(e, e.sel, e.cm ? e.cm.curOp.id : NaN, n); + } + function eo(e, t, n) { + (ye(e, "beforeSelectionChange") || + (e.cm && ye(e.cm, "beforeSelectionChange"))) && + (t = (function (e, t, n) { + var r = { + ranges: t.ranges, + update: function (t) { + this.ranges = []; + for (var n = 0; n < t.length; n++) + this.ranges[n] = new Ei( + at(e, t[n].anchor), + at(e, t[n].head) + ); + }, + origin: n && n.origin, + }; + return ( + me(e, "beforeSelectionChange", e, r), + e.cm && me(e.cm, "beforeSelectionChange", e.cm, r), + r.ranges != t.ranges + ? ki(e.cm, r.ranges, r.ranges.length - 1) + : t + ); + })(e, t, n)); + var r = + (n && n.bias) || + (tt(t.primary().head, e.sel.primary().head) < 0 ? -1 : 1); + to(e, ro(e, t, r, !0)), + (n && !1 === n.scroll) || + !e.cm || + "nocursor" == e.cm.getOption("readOnly") || + Pr(e.cm); + } + function to(e, t) { + t.equals(e.sel) || + ((e.sel = t), + e.cm && + ((e.cm.curOp.updateInput = 1), + (e.cm.curOp.selectionChanged = !0), + ge(e.cm)), + ln(e, "cursorActivity", e)); + } + function no(e) { + to(e, ro(e, e.sel, null, !1)); + } + function ro(e, t, n, r) { + for (var i, o = 0; o < t.ranges.length; o++) { + var s = t.ranges[o], + a = t.ranges.length == e.sel.ranges.length && e.sel.ranges[o], + l = oo(e, s.anchor, a && a.anchor, n, r), + c = oo(e, s.head, a && a.head, n, r); + (i || l != s.anchor || c != s.head) && + (i || (i = t.ranges.slice(0, o)), (i[o] = new Ei(l, c))); + } + return i ? ki(e.cm, i, t.primIndex) : t; + } + function io(e, t, n, r, i) { + var o = Ge(e, t.line); + if (o.markedSpans) + for (var s = 0; s < o.markedSpans.length; ++s) { + var a = o.markedSpans[s], + l = a.marker, + c = "selectLeft" in l ? !l.selectLeft : l.inclusiveLeft, + u = "selectRight" in l ? !l.selectRight : l.inclusiveRight; + if ( + (null == a.from || (c ? a.from <= t.ch : a.from < t.ch)) && + (null == a.to || (u ? a.to >= t.ch : a.to > t.ch)) + ) { + if (i && (me(l, "beforeCursorEnter"), l.explicitlyCleared)) { + if (o.markedSpans) { + --s; + continue; + } + break; + } + if (!l.atomic) continue; + if (n) { + var h = l.find(r < 0 ? 1 : -1), + p = void 0; + if ( + ((r < 0 ? u : c) && + (h = so(e, h, -r, h && h.line == t.line ? o : null)), + h && + h.line == t.line && + (p = tt(h, n)) && + (r < 0 ? p < 0 : p > 0)) + ) + return io(e, h, t, r, i); + } + var d = l.find(r < 0 ? -1 : 1); + return ( + (r < 0 ? c : u) && + (d = so(e, d, r, d.line == t.line ? o : null)), + d ? io(e, d, t, r, i) : null + ); + } + } + return t; + } + function oo(e, t, n, r, i) { + var o = r || 1; + return ( + io(e, t, n, o, i) || + (!i && io(e, t, n, o, !0)) || + io(e, t, n, -o, i) || + (!i && io(e, t, n, -o, !0)) || + ((e.cantEdit = !0), et(e.first, 0)) + ); + } + function so(e, t, n, r) { + return n < 0 && 0 == t.ch + ? t.line > e.first + ? at(e, et(t.line - 1)) + : null + : n > 0 && t.ch == (r || Ge(e, t.line)).text.length + ? t.line < e.first + e.size - 1 + ? et(t.line + 1, 0) + : null + : new et(t.line, t.ch + n); + } + function ao(e) { + e.setSelection(et(e.firstLine(), 0), et(e.lastLine()), $); + } + function lo(e, t, n) { + var r = { + canceled: !1, + from: t.from, + to: t.to, + text: t.text, + origin: t.origin, + cancel: function () { + return (r.canceled = !0); + }, + }; + return ( + n && + (r.update = function (t, n, i, o) { + t && (r.from = at(e, t)), + n && (r.to = at(e, n)), + i && (r.text = i), + void 0 !== o && (r.origin = o); + }), + me(e, "beforeChange", e, r), + e.cm && me(e.cm, "beforeChange", e.cm, r), + r.canceled + ? (e.cm && (e.cm.curOp.updateInput = 2), null) + : { from: r.from, to: r.to, text: r.text, origin: r.origin } + ); + } + function co(e, t, n) { + if (e.cm) { + if (!e.cm.curOp) return ei(e.cm, co)(e, t, n); + if (e.cm.state.suppressEdits) return; + } + if ( + !(ye(e, "beforeChange") || (e.cm && ye(e.cm, "beforeChange"))) || + (t = lo(e, t, !0)) + ) { + var r = + Ct && + !n && + (function (e, t, n) { + var r = null; + if ( + (e.iter(t.line, n.line + 1, function (e) { + if (e.markedSpans) + for (var t = 0; t < e.markedSpans.length; ++t) { + var n = e.markedSpans[t].marker; + !n.readOnly || + (r && -1 != U(r, n)) || + (r || (r = [])).push(n); + } + }), + !r) + ) + return null; + for (var i = [{ from: t, to: n }], o = 0; o < r.length; ++o) + for ( + var s = r[o], a = s.find(0), l = 0; + l < i.length; + ++l + ) { + var c = i[l]; + if (!(tt(c.to, a.from) < 0 || tt(c.from, a.to) > 0)) { + var u = [l, 1], + h = tt(c.from, a.from), + p = tt(c.to, a.to); + (h < 0 || (!s.inclusiveLeft && !h)) && + u.push({ from: c.from, to: a.from }), + (p > 0 || (!s.inclusiveRight && !p)) && + u.push({ from: a.to, to: c.to }), + i.splice.apply(i, u), + (l += u.length - 3); + } + } + return i; + })(e, t.from, t.to); + if (r) + for (var i = r.length - 1; i >= 0; --i) + uo(e, { + from: r[i].from, + to: r[i].to, + text: i ? [""] : t.text, + origin: t.origin, + }); + else uo(e, t); + } + } + function uo(e, t) { + if ( + 1 != t.text.length || + "" != t.text[0] || + 0 != tt(t.from, t.to) + ) { + var n = Di(e, t); + Ui(e, t, n, e.cm ? e.cm.curOp.id : NaN), mo(e, t, n, xt(e, t)); + var r = []; + Ni(e, function (e, n) { + n || + -1 != U(r, e.history) || + (bo(e.history, t), r.push(e.history)), + mo(e, t, null, xt(e, t)); + }); + } + } + function ho(e, t, n) { + var r = e.cm && e.cm.state.suppressEdits; + if (!r || n) { + for ( + var i, + o = e.history, + s = e.sel, + a = "undo" == t ? o.done : o.undone, + l = "undo" == t ? o.undone : o.done, + c = 0; + c < a.length && + ((i = a[c]), n ? !i.ranges || i.equals(e.sel) : i.ranges); + c++ + ); + if (c != a.length) { + for (o.lastOrigin = o.lastSelOrigin = null; ; ) { + if (!(i = a.pop()).ranges) { + if (r) return void a.push(i); + break; + } + if (($i(i, l), n && !i.equals(e.sel))) + return void Ji(e, i, { clearRedo: !1 }); + s = i; + } + var u = []; + $i(s, l), + l.push({ changes: u, generation: o.generation }), + (o.generation = i.generation || ++o.maxGeneration); + for ( + var h = + ye(e, "beforeChange") || + (e.cm && ye(e.cm, "beforeChange")), + p = function (n) { + var r = i.changes[n]; + if (((r.origin = t), h && !lo(e, r, !1))) + return (a.length = 0), {}; + u.push(Li(e, r)); + var o = n ? Di(e, r) : K(a); + mo(e, r, o, ji(e, r)), + !n && + e.cm && + e.cm.scrollIntoView({ from: r.from, to: xi(r) }); + var s = []; + Ni(e, function (e, t) { + t || + -1 != U(s, e.history) || + (bo(e.history, r), s.push(e.history)), + mo(e, r, null, ji(e, r)); + }); + }, + d = i.changes.length - 1; + d >= 0; + --d + ) { + var m = p(d); + if (m) return m.v; + } + } + } + } + function po(e, t) { + if ( + 0 != t && + ((e.first += t), + (e.sel = new Si( + Y(e.sel.ranges, function (e) { + return new Ei( + et(e.anchor.line + t, e.anchor.ch), + et(e.head.line + t, e.head.ch) + ); + }), + e.sel.primIndex + )), + e.cm) + ) { + hr(e.cm, e.first, e.first - t, t); + for (var n = e.cm.display, r = n.viewFrom; r < n.viewTo; r++) + pr(e.cm, r, "gutter"); + } + } + function mo(e, t, n, r) { + if (e.cm && !e.cm.curOp) return ei(e.cm, mo)(e, t, n, r); + if (t.to.line < e.first) + po(e, t.text.length - 1 - (t.to.line - t.from.line)); + else if (!(t.from.line > e.lastLine())) { + if (t.from.line < e.first) { + var i = t.text.length - 1 - (e.first - t.from.line); + po(e, i), + (t = { + from: et(e.first, 0), + to: et(t.to.line + i, t.to.ch), + text: [K(t.text)], + origin: t.origin, + }); + } + var o = e.lastLine(); + t.to.line > o && + (t = { + from: t.from, + to: et(o, Ge(e, o).text.length), + text: [t.text[0]], + origin: t.origin, + }), + (t.removed = Ve(e, t.from, t.to)), + n || (n = Di(e, t)), + e.cm + ? (function (e, t, n) { + var r = e.doc, + i = e.display, + o = t.from, + s = t.to, + a = !1, + l = o.line; + e.options.lineWrapping || + ((l = Xe(Lt(Ge(r, o.line)))), + r.iter(l, s.line + 1, function (e) { + if (e == i.maxLine) return (a = !0), !0; + })), + r.sel.contains(t.from, t.to) > -1 && ge(e), + Oi(r, t, n, ar(e)), + e.options.lineWrapping || + (r.iter(l, o.line + t.text.length, function (e) { + var t = qt(e); + t > i.maxLineLength && + ((i.maxLine = e), + (i.maxLineLength = t), + (i.maxLineChanged = !0), + (a = !1)); + }), + a && (e.curOp.updateMaxLine = !0)), + (function (e, t) { + if ( + ((e.modeFrontier = Math.min(e.modeFrontier, t)), + !(e.highlightFrontier < t - 10)) + ) { + for (var n = e.first, r = t - 1; r > n; r--) { + var i = Ge(e, r).stateAfter; + if ( + i && + (!(i instanceof ct) || r + i.lookAhead < t) + ) { + n = r + 1; + break; + } + } + e.highlightFrontier = Math.min( + e.highlightFrontier, + n + ); + } + })(r, o.line), + ri(e, 400); + var c = t.text.length - (s.line - o.line) - 1; + t.full + ? hr(e) + : o.line != s.line || 1 != t.text.length || Ii(e.doc, t) + ? hr(e, o.line, s.line + 1, c) + : pr(e, o.line, "text"); + var u = ye(e, "changes"), + h = ye(e, "change"); + if (h || u) { + var p = { + from: o, + to: s, + text: t.text, + removed: t.removed, + origin: t.origin, + }; + h && ln(e, "change", e, p), + u && + ( + e.curOp.changeObjs || (e.curOp.changeObjs = []) + ).push(p); + } + e.display.selForContextMenu = null; + })(e.cm, t, r) + : Oi(e, t, r), + eo(e, n, $), + e.cantEdit && oo(e, et(e.firstLine(), 0)) && (e.cantEdit = !1); + } + } + function fo(e, t, n, r, i) { + var o; + r || (r = n), + tt(r, n) < 0 && ((n = (o = [r, n])[0]), (r = o[1])), + "string" == typeof t && (t = e.splitLines(t)), + co(e, { from: n, to: r, text: t, origin: i }); + } + function go(e, t, n, r) { + n < e.line + ? (e.line += r) + : t < e.line && ((e.line = t), (e.ch = 0)); + } + function yo(e, t, n, r) { + for (var i = 0; i < e.length; ++i) { + var o = e[i], + s = !0; + if (o.ranges) { + o.copied || ((o = e[i] = o.deepCopy()).copied = !0); + for (var a = 0; a < o.ranges.length; a++) + go(o.ranges[a].anchor, t, n, r), + go(o.ranges[a].head, t, n, r); + } else { + for (var l = 0; l < o.changes.length; ++l) { + var c = o.changes[l]; + if (n < c.from.line) + (c.from = et(c.from.line + r, c.from.ch)), + (c.to = et(c.to.line + r, c.to.ch)); + else if (t <= c.to.line) { + s = !1; + break; + } + } + s || (e.splice(0, i + 1), (i = 0)); + } + } + } + function bo(e, t) { + var n = t.from.line, + r = t.to.line, + i = t.text.length - (r - n) - 1; + yo(e.done, n, r, i), yo(e.undone, n, r, i); + } + function vo(e, t, n, r) { + var i = t, + o = t; + return ( + "number" == typeof t ? (o = Ge(e, st(e, t))) : (i = Xe(t)), + null == i ? null : (r(o, i) && e.cm && pr(e.cm, i, n), o) + ); + } + function wo(e) { + (this.lines = e), (this.parent = null); + for (var t = 0, n = 0; n < e.length; ++n) + (e[n].parent = this), (t += e[n].height); + this.height = t; + } + function Co(e) { + this.children = e; + for (var t = 0, n = 0, r = 0; r < e.length; ++r) { + var i = e[r]; + (t += i.chunkSize()), (n += i.height), (i.parent = this); + } + (this.size = t), (this.height = n), (this.parent = null); + } + (Ei.prototype.from = function () { + return ot(this.anchor, this.head); + }), + (Ei.prototype.to = function () { + return it(this.anchor, this.head); + }), + (Ei.prototype.empty = function () { + return ( + this.head.line == this.anchor.line && + this.head.ch == this.anchor.ch + ); + }), + (wo.prototype = { + chunkSize: function () { + return this.lines.length; + }, + removeInner: function (e, t) { + for (var n = e, r = e + t; n < r; ++n) { + var i = this.lines[n]; + (this.height -= i.height), Vt(i), ln(i, "delete"); + } + this.lines.splice(e, t); + }, + collapse: function (e) { + e.push.apply(e, this.lines); + }, + insertInner: function (e, t, n) { + (this.height += n), + (this.lines = this.lines + .slice(0, e) + .concat(t) + .concat(this.lines.slice(e))); + for (var r = 0; r < t.length; ++r) t[r].parent = this; + }, + iterN: function (e, t, n) { + for (var r = e + t; e < r; ++e) if (n(this.lines[e])) return !0; + }, + }), + (Co.prototype = { + chunkSize: function () { + return this.size; + }, + removeInner: function (e, t) { + this.size -= t; + for (var n = 0; n < this.children.length; ++n) { + var r = this.children[n], + i = r.chunkSize(); + if (e < i) { + var o = Math.min(t, i - e), + s = r.height; + if ( + (r.removeInner(e, o), + (this.height -= s - r.height), + i == o && + (this.children.splice(n--, 1), (r.parent = null)), + 0 == (t -= o)) + ) + break; + e = 0; + } else e -= i; + } + if ( + this.size - t < 25 && + (this.children.length > 1 || + !(this.children[0] instanceof wo)) + ) { + var a = []; + this.collapse(a), + (this.children = [new wo(a)]), + (this.children[0].parent = this); + } + }, + collapse: function (e) { + for (var t = 0; t < this.children.length; ++t) + this.children[t].collapse(e); + }, + insertInner: function (e, t, n) { + (this.size += t.length), (this.height += n); + for (var r = 0; r < this.children.length; ++r) { + var i = this.children[r], + o = i.chunkSize(); + if (e <= o) { + if ( + (i.insertInner(e, t, n), i.lines && i.lines.length > 50) + ) { + for ( + var s = (i.lines.length % 25) + 25, a = s; + a < i.lines.length; + + ) { + var l = new wo(i.lines.slice(a, (a += 25))); + (i.height -= l.height), + this.children.splice(++r, 0, l), + (l.parent = this); + } + (i.lines = i.lines.slice(0, s)), this.maybeSpill(); + } + break; + } + e -= o; + } + }, + maybeSpill: function () { + if (!(this.children.length <= 10)) { + var e = this; + do { + var t = new Co(e.children.splice(e.children.length - 5, 5)); + if (e.parent) { + (e.size -= t.size), (e.height -= t.height); + var n = U(e.parent.children, e); + e.parent.children.splice(n + 1, 0, t); + } else { + var r = new Co(e.children); + (r.parent = e), (e.children = [r, t]), (e = r); + } + t.parent = e.parent; + } while (e.children.length > 10); + e.parent.maybeSpill(); + } + }, + iterN: function (e, t, n) { + for (var r = 0; r < this.children.length; ++r) { + var i = this.children[r], + o = i.chunkSize(); + if (e < o) { + var s = Math.min(t, o - e); + if (i.iterN(e, s, n)) return !0; + if (0 == (t -= s)) break; + e = 0; + } else e -= o; + } + }, + }); + var So = function (e, t, n) { + if (n) for (var r in n) n.hasOwnProperty(r) && (this[r] = n[r]); + (this.doc = e), (this.node = t); + }; + function Eo(e, t, n) { + zt(t) < ((e.curOp && e.curOp.scrollTop) || e.doc.scrollTop) && + _r(e, n); + } + (So.prototype.clear = function () { + var e = this.doc.cm, + t = this.line.widgets, + n = this.line, + r = Xe(n); + if (null != r && t) { + for (var i = 0; i < t.length; ++i) + t[i] == this && t.splice(i--, 1); + t.length || (n.widgets = null); + var o = Cn(this); + Ye(n, Math.max(0, n.height - o)), + e && + (Jr(e, function () { + Eo(e, n, -o), pr(e, r, "widget"); + }), + ln(e, "lineWidgetCleared", e, this, r)); + } + }), + (So.prototype.changed = function () { + var e = this, + t = this.height, + n = this.doc.cm, + r = this.line; + this.height = null; + var i = Cn(this) - t; + i && + (Wt(this.doc, r) || Ye(r, r.height + i), + n && + Jr(n, function () { + (n.curOp.forceUpdate = !0), + Eo(n, r, i), + ln(n, "lineWidgetChanged", n, e, Xe(r)); + })); + }), + be(So); + var ko = 0, + Ro = function (e, t) { + (this.lines = []), + (this.type = t), + (this.doc = e), + (this.id = ++ko); + }; + function xo(e, t, n, r, i) { + if (r && r.shared) + return (function (e, t, n, r, i) { + (r = F(r)).shared = !1; + var o = [xo(e, t, n, r, i)], + s = o[0], + a = r.widgetNode; + return ( + Ni(e, function (e) { + a && (r.widgetNode = a.cloneNode(!0)), + o.push(xo(e, at(e, t), at(e, n), r, i)); + for (var l = 0; l < e.linked.length; ++l) + if (e.linked[l].isParent) return; + s = K(o); + }), + new To(o, s) + ); + })(e, t, n, r, i); + if (e.cm && !e.cm.curOp) return ei(e.cm, xo)(e, t, n, r, i); + var o = new Ro(e, i), + s = tt(t, n); + if ( + (r && F(r, o, !1), s > 0 || (0 == s && !1 !== o.clearWhenEmpty)) + ) + return o; + if ( + (o.replacedWith && + ((o.collapsed = !0), + (o.widgetNode = _( + "span", + [o.replacedWith], + "CodeMirror-widget" + )), + r.handleMouseEvents || + o.widgetNode.setAttribute("cm-ignore-events", "true"), + r.insertLeft && (o.widgetNode.insertLeft = !0)), + o.collapsed) + ) { + if ( + Ft(e, t.line, t, n, o) || + (t.line != n.line && Ft(e, n.line, t, n, o)) + ) + throw new Error( + "Inserting collapsed marker partially overlapping an existing one" + ); + St = !0; + } + o.addToHistory && + Ui(e, { from: t, to: n, origin: "markText" }, e.sel, NaN); + var a, + l = t.line, + c = e.cm; + if ( + (e.iter(l, n.line + 1, function (e) { + c && + o.collapsed && + !c.options.lineWrapping && + Lt(e) == c.display.maxLine && + (a = !0), + o.collapsed && l != t.line && Ye(e, 0), + (function (e, t) { + (e.markedSpans = e.markedSpans + ? e.markedSpans.concat([t]) + : [t]), + t.marker.attachLine(e); + })( + e, + new Et( + o, + l == t.line ? t.ch : null, + l == n.line ? n.ch : null + ) + ), + ++l; + }), + o.collapsed && + e.iter(t.line, n.line + 1, function (t) { + Wt(e, t) && Ye(t, 0); + }), + o.clearOnEnter && + he(o, "beforeCursorEnter", function () { + return o.clear(); + }), + o.readOnly && + ((Ct = !0), + (e.history.done.length || e.history.undone.length) && + e.clearHistory()), + o.collapsed && ((o.id = ++ko), (o.atomic = !0)), + c) + ) { + if ((a && (c.curOp.updateMaxLine = !0), o.collapsed)) + hr(c, t.line, n.line + 1); + else if ( + o.className || + o.startStyle || + o.endStyle || + o.css || + o.attributes || + o.title + ) + for (var u = t.line; u <= n.line; u++) pr(c, u, "text"); + o.atomic && no(c.doc), ln(c, "markerAdded", c, o); + } + return o; + } + (Ro.prototype.clear = function () { + if (!this.explicitlyCleared) { + var e = this.doc.cm, + t = e && !e.curOp; + if ((t && Gr(e), ye(this, "clear"))) { + var n = this.find(); + n && ln(this, "clear", n.from, n.to); + } + for (var r = null, i = null, o = 0; o < this.lines.length; ++o) { + var s = this.lines[o], + a = kt(s.markedSpans, this); + e && !this.collapsed + ? pr(e, Xe(s), "text") + : e && + (null != a.to && (i = Xe(s)), + null != a.from && (r = Xe(s))), + (s.markedSpans = Rt(s.markedSpans, a)), + null == a.from && + this.collapsed && + !Wt(this.doc, s) && + e && + Ye(s, rr(e.display)); + } + if (e && this.collapsed && !e.options.lineWrapping) + for (var l = 0; l < this.lines.length; ++l) { + var c = Lt(this.lines[l]), + u = qt(c); + u > e.display.maxLineLength && + ((e.display.maxLine = c), + (e.display.maxLineLength = u), + (e.display.maxLineChanged = !0)); + } + null != r && e && this.collapsed && hr(e, r, i + 1), + (this.lines.length = 0), + (this.explicitlyCleared = !0), + this.atomic && + this.doc.cantEdit && + ((this.doc.cantEdit = !1), e && no(e.doc)), + e && ln(e, "markerCleared", e, this, r, i), + t && Vr(e), + this.parent && this.parent.clear(); + } + }), + (Ro.prototype.find = function (e, t) { + var n, r; + null == e && "bookmark" == this.type && (e = 1); + for (var i = 0; i < this.lines.length; ++i) { + var o = this.lines[i], + s = kt(o.markedSpans, this); + if ( + null != s.from && + ((n = et(t ? o : Xe(o), s.from)), -1 == e) + ) + return n; + if (null != s.to && ((r = et(t ? o : Xe(o), s.to)), 1 == e)) + return r; + } + return n && { from: n, to: r }; + }), + (Ro.prototype.changed = function () { + var e = this, + t = this.find(-1, !0), + n = this, + r = this.doc.cm; + t && + r && + Jr(r, function () { + var i = t.line, + o = Xe(t.line), + s = Pn(r, o); + if ( + (s && + (Ln(s), + (r.curOp.selectionChanged = r.curOp.forceUpdate = !0)), + (r.curOp.updateMaxLine = !0), + !Wt(n.doc, i) && null != n.height) + ) { + var a = n.height; + n.height = null; + var l = Cn(n) - a; + l && Ye(i, i.height + l); + } + ln(r, "markerChanged", r, e); + }); + }), + (Ro.prototype.attachLine = function (e) { + if (!this.lines.length && this.doc.cm) { + var t = this.doc.cm.curOp; + (t.maybeHiddenMarkers && -1 != U(t.maybeHiddenMarkers, this)) || + ( + t.maybeUnhiddenMarkers || (t.maybeUnhiddenMarkers = []) + ).push(this); + } + this.lines.push(e); + }), + (Ro.prototype.detachLine = function (e) { + if ( + (this.lines.splice(U(this.lines, e), 1), + !this.lines.length && this.doc.cm) + ) { + var t = this.doc.cm.curOp; + (t.maybeHiddenMarkers || (t.maybeHiddenMarkers = [])).push( + this + ); + } + }), + be(Ro); + var To = function (e, t) { + (this.markers = e), (this.primary = t); + for (var n = 0; n < e.length; ++n) e[n].parent = this; + }; + function Do(e) { + return e.findMarks( + et(e.first, 0), + e.clipPos(et(e.lastLine())), + function (e) { + return e.parent; + } + ); + } + function Ao(e) { + for ( + var t = function (t) { + var n = e[t], + r = [n.primary.doc]; + Ni(n.primary.doc, function (e) { + return r.push(e); + }); + for (var i = 0; i < n.markers.length; i++) { + var o = n.markers[i]; + -1 == U(r, o.doc) && + ((o.parent = null), n.markers.splice(i--, 1)); + } + }, + n = 0; + n < e.length; + n++ + ) + t(n); + } + (To.prototype.clear = function () { + if (!this.explicitlyCleared) { + this.explicitlyCleared = !0; + for (var e = 0; e < this.markers.length; ++e) + this.markers[e].clear(); + ln(this, "clear"); + } + }), + (To.prototype.find = function (e, t) { + return this.primary.find(e, t); + }), + be(To); + var _o = 0, + Po = function (e, t, n, r, i) { + if (!(this instanceof Po)) return new Po(e, t, n, r, i); + null == n && (n = 0), + Co.call(this, [new wo([new Gt("", null)])]), + (this.first = n), + (this.scrollTop = this.scrollLeft = 0), + (this.cantEdit = !1), + (this.cleanGeneration = 1), + (this.modeFrontier = this.highlightFrontier = n); + var o = et(n, 0); + (this.sel = Ri(o)), + (this.history = new Fi(null)), + (this.id = ++_o), + (this.modeOption = t), + (this.lineSep = r), + (this.direction = "rtl" == i ? "rtl" : "ltr"), + (this.extend = !1), + "string" == typeof e && (e = this.splitLines(e)), + Oi(this, { from: o, to: o, text: e }), + Ji(this, Ri(o), $); + }; + (Po.prototype = Z(Co.prototype, { + constructor: Po, + iter: function (e, t, n) { + n + ? this.iterN(e - this.first, t - e, n) + : this.iterN(this.first, this.first + this.size, e); + }, + insert: function (e, t) { + for (var n = 0, r = 0; r < t.length; ++r) n += t[r].height; + this.insertInner(e - this.first, t, n); + }, + remove: function (e, t) { + this.removeInner(e - this.first, t); + }, + getValue: function (e) { + var t = Ke(this, this.first, this.first + this.size); + return !1 === e ? t : t.join(e || this.lineSeparator()); + }, + setValue: ni(function (e) { + var t = et(this.first, 0), + n = this.first + this.size - 1; + co( + this, + { + from: t, + to: et(n, Ge(this, n).text.length), + text: this.splitLines(e), + origin: "setValue", + full: !0, + }, + !0 + ), + this.cm && Ir(this.cm, 0, 0), + Ji(this, Ri(t), $); + }), + replaceRange: function (e, t, n, r) { + fo(this, e, (t = at(this, t)), (n = n ? at(this, n) : t), r); + }, + getRange: function (e, t, n) { + var r = Ve(this, at(this, e), at(this, t)); + return !1 === n ? r : r.join(n || this.lineSeparator()); + }, + getLine: function (e) { + var t = this.getLineHandle(e); + return t && t.text; + }, + getLineHandle: function (e) { + if (Qe(this, e)) return Ge(this, e); + }, + getLineNumber: function (e) { + return Xe(e); + }, + getLineHandleVisualStart: function (e) { + return "number" == typeof e && (e = Ge(this, e)), Lt(e); + }, + lineCount: function () { + return this.size; + }, + firstLine: function () { + return this.first; + }, + lastLine: function () { + return this.first + this.size - 1; + }, + clipPos: function (e) { + return at(this, e); + }, + getCursor: function (e) { + var t = this.sel.primary(); + return null == e || "head" == e + ? t.head + : "anchor" == e + ? t.anchor + : "end" == e || "to" == e || !1 === e + ? t.to() + : t.from(); + }, + listSelections: function () { + return this.sel.ranges; + }, + somethingSelected: function () { + return this.sel.somethingSelected(); + }, + setCursor: ni(function (e, t, n) { + Zi( + this, + at(this, "number" == typeof e ? et(e, t || 0) : e), + null, + n + ); + }), + setSelection: ni(function (e, t, n) { + Zi(this, at(this, e), at(this, t || e), n); + }), + extendSelection: ni(function (e, t, n) { + Ki(this, at(this, e), t && at(this, t), n); + }), + extendSelections: ni(function (e, t) { + Yi(this, lt(this, e), t); + }), + extendSelectionsBy: ni(function (e, t) { + Yi(this, lt(this, Y(this.sel.ranges, e)), t); + }), + setSelections: ni(function (e, t, n) { + if (e.length) { + for (var r = [], i = 0; i < e.length; i++) + r[i] = new Ei( + at(this, e[i].anchor), + at(this, e[i].head || e[i].anchor) + ); + null == t && (t = Math.min(e.length - 1, this.sel.primIndex)), + Ji(this, ki(this.cm, r, t), n); + } + }), + addSelection: ni(function (e, t, n) { + var r = this.sel.ranges.slice(0); + r.push(new Ei(at(this, e), at(this, t || e))), + Ji(this, ki(this.cm, r, r.length - 1), n); + }), + getSelection: function (e) { + for (var t, n = this.sel.ranges, r = 0; r < n.length; r++) { + var i = Ve(this, n[r].from(), n[r].to()); + t = t ? t.concat(i) : i; + } + return !1 === e ? t : t.join(e || this.lineSeparator()); + }, + getSelections: function (e) { + for (var t = [], n = this.sel.ranges, r = 0; r < n.length; r++) { + var i = Ve(this, n[r].from(), n[r].to()); + !1 !== e && (i = i.join(e || this.lineSeparator())), (t[r] = i); + } + return t; + }, + replaceSelection: function (e, t, n) { + for (var r = [], i = 0; i < this.sel.ranges.length; i++) r[i] = e; + this.replaceSelections(r, t, n || "+input"); + }, + replaceSelections: ni(function (e, t, n) { + for (var r = [], i = this.sel, o = 0; o < i.ranges.length; o++) { + var s = i.ranges[o]; + r[o] = { + from: s.from(), + to: s.to(), + text: this.splitLines(e[o]), + origin: n, + }; + } + for ( + var a = + t && + "end" != t && + (function (e, t, n) { + for ( + var r = [], i = et(e.first, 0), o = i, s = 0; + s < t.length; + s++ + ) { + var a = t[s], + l = Ai(a.from, i, o), + c = Ai(xi(a), i, o); + if (((i = a.to), (o = c), "around" == n)) { + var u = e.sel.ranges[s], + h = tt(u.head, u.anchor) < 0; + r[s] = new Ei(h ? c : l, h ? l : c); + } else r[s] = new Ei(l, l); + } + return new Si(r, e.sel.primIndex); + })(this, r, t), + l = r.length - 1; + l >= 0; + l-- + ) + co(this, r[l]); + a ? Qi(this, a) : this.cm && Pr(this.cm); + }), + undo: ni(function () { + ho(this, "undo"); + }), + redo: ni(function () { + ho(this, "redo"); + }), + undoSelection: ni(function () { + ho(this, "undo", !0); + }), + redoSelection: ni(function () { + ho(this, "redo", !0); + }), + setExtending: function (e) { + this.extend = e; + }, + getExtending: function () { + return this.extend; + }, + historySize: function () { + for ( + var e = this.history, t = 0, n = 0, r = 0; + r < e.done.length; + r++ + ) + e.done[r].ranges || ++t; + for (var i = 0; i < e.undone.length; i++) + e.undone[i].ranges || ++n; + return { undo: t, redo: n }; + }, + clearHistory: function () { + var e = this; + (this.history = new Fi(this.history)), + Ni( + this, + function (t) { + return (t.history = e.history); + }, + !0 + ); + }, + markClean: function () { + this.cleanGeneration = this.changeGeneration(!0); + }, + changeGeneration: function (e) { + return ( + e && + (this.history.lastOp = + this.history.lastSelOp = + this.history.lastOrigin = + null), + this.history.generation + ); + }, + isClean: function (e) { + return this.history.generation == (e || this.cleanGeneration); + }, + getHistory: function () { + return { + done: Gi(this.history.done), + undone: Gi(this.history.undone), + }; + }, + setHistory: function (e) { + var t = (this.history = new Fi(this.history)); + (t.done = Gi(e.done.slice(0), null, !0)), + (t.undone = Gi(e.undone.slice(0), null, !0)); + }, + setGutterMarker: ni(function (e, t, n) { + return vo(this, e, "gutter", function (e) { + var r = e.gutterMarkers || (e.gutterMarkers = {}); + return (r[t] = n), !n && te(r) && (e.gutterMarkers = null), !0; + }); + }), + clearGutter: ni(function (e) { + var t = this; + this.iter(function (n) { + n.gutterMarkers && + n.gutterMarkers[e] && + vo(t, n, "gutter", function () { + return ( + (n.gutterMarkers[e] = null), + te(n.gutterMarkers) && (n.gutterMarkers = null), + !0 + ); + }); + }); + }), + lineInfo: function (e) { + var t; + if ("number" == typeof e) { + if (!Qe(this, e)) return null; + if (((t = e), !(e = Ge(this, e)))) return null; + } else if (null == (t = Xe(e))) return null; + return { + line: t, + handle: e, + text: e.text, + gutterMarkers: e.gutterMarkers, + textClass: e.textClass, + bgClass: e.bgClass, + wrapClass: e.wrapClass, + widgets: e.widgets, + }; + }, + addLineClass: ni(function (e, t, n) { + return vo( + this, + e, + "gutter" == t ? "gutter" : "class", + function (e) { + var r = + "text" == t + ? "textClass" + : "background" == t + ? "bgClass" + : "gutter" == t + ? "gutterClass" + : "wrapClass"; + if (e[r]) { + if (k(n).test(e[r])) return !1; + e[r] += " " + n; + } else e[r] = n; + return !0; + } + ); + }), + removeLineClass: ni(function (e, t, n) { + return vo( + this, + e, + "gutter" == t ? "gutter" : "class", + function (e) { + var r = + "text" == t + ? "textClass" + : "background" == t + ? "bgClass" + : "gutter" == t + ? "gutterClass" + : "wrapClass", + i = e[r]; + if (!i) return !1; + if (null == n) e[r] = null; + else { + var o = i.match(k(n)); + if (!o) return !1; + var s = o.index + o[0].length; + e[r] = + i.slice(0, o.index) + + (o.index && s != i.length ? " " : "") + + i.slice(s) || null; + } + return !0; + } + ); + }), + addLineWidget: ni(function (e, t, n) { + return (function (e, t, n, r) { + var i = new So(e, n, r), + o = e.cm; + return ( + o && i.noHScroll && (o.display.alignWidgets = !0), + vo(e, t, "widget", function (t) { + var n = t.widgets || (t.widgets = []); + if ( + (null == i.insertAt + ? n.push(i) + : n.splice( + Math.min(n.length, Math.max(0, i.insertAt)), + 0, + i + ), + (i.line = t), + o && !Wt(e, t)) + ) { + var r = zt(t) < e.scrollTop; + Ye(t, t.height + Cn(i)), + r && _r(o, i.height), + (o.curOp.forceUpdate = !0); + } + return !0; + }), + o && + ln( + o, + "lineWidgetAdded", + o, + i, + "number" == typeof t ? t : Xe(t) + ), + i + ); + })(this, e, t, n); + }), + removeLineWidget: function (e) { + e.clear(); + }, + markText: function (e, t, n) { + return xo( + this, + at(this, e), + at(this, t), + n, + (n && n.type) || "range" + ); + }, + setBookmark: function (e, t) { + var n = { + replacedWith: t && (null == t.nodeType ? t.widget : t), + insertLeft: t && t.insertLeft, + clearWhenEmpty: !1, + shared: t && t.shared, + handleMouseEvents: t && t.handleMouseEvents, + }; + return xo(this, (e = at(this, e)), e, n, "bookmark"); + }, + findMarksAt: function (e) { + var t = [], + n = Ge(this, (e = at(this, e)).line).markedSpans; + if (n) + for (var r = 0; r < n.length; ++r) { + var i = n[r]; + (null == i.from || i.from <= e.ch) && + (null == i.to || i.to >= e.ch) && + t.push(i.marker.parent || i.marker); + } + return t; + }, + findMarks: function (e, t, n) { + (e = at(this, e)), (t = at(this, t)); + var r = [], + i = e.line; + return ( + this.iter(e.line, t.line + 1, function (o) { + var s = o.markedSpans; + if (s) + for (var a = 0; a < s.length; a++) { + var l = s[a]; + (null != l.to && i == e.line && e.ch >= l.to) || + (null == l.from && i != e.line) || + (null != l.from && i == t.line && l.from >= t.ch) || + (n && !n(l.marker)) || + r.push(l.marker.parent || l.marker); + } + ++i; + }), + r + ); + }, + getAllMarks: function () { + var e = []; + return ( + this.iter(function (t) { + var n = t.markedSpans; + if (n) + for (var r = 0; r < n.length; ++r) + null != n[r].from && e.push(n[r].marker); + }), + e + ); + }, + posFromIndex: function (e) { + var t, + n = this.first, + r = this.lineSeparator().length; + return ( + this.iter(function (i) { + var o = i.text.length + r; + if (o > e) return (t = e), !0; + (e -= o), ++n; + }), + at(this, et(n, t)) + ); + }, + indexFromPos: function (e) { + var t = (e = at(this, e)).ch; + if (e.line < this.first || e.ch < 0) return 0; + var n = this.lineSeparator().length; + return ( + this.iter(this.first, e.line, function (e) { + t += e.text.length + n; + }), + t + ); + }, + copy: function (e) { + var t = new Po( + Ke(this, this.first, this.first + this.size), + this.modeOption, + this.first, + this.lineSep, + this.direction + ); + return ( + (t.scrollTop = this.scrollTop), + (t.scrollLeft = this.scrollLeft), + (t.sel = this.sel), + (t.extend = !1), + e && + ((t.history.undoDepth = this.history.undoDepth), + t.setHistory(this.getHistory())), + t + ); + }, + linkedDoc: function (e) { + e || (e = {}); + var t = this.first, + n = this.first + this.size; + null != e.from && e.from > t && (t = e.from), + null != e.to && e.to < n && (n = e.to); + var r = new Po( + Ke(this, t, n), + e.mode || this.modeOption, + t, + this.lineSep, + this.direction + ); + return ( + e.sharedHist && (r.history = this.history), + (this.linked || (this.linked = [])).push({ + doc: r, + sharedHist: e.sharedHist, + }), + (r.linked = [ + { doc: this, isParent: !0, sharedHist: e.sharedHist }, + ]), + (function (e, t) { + for (var n = 0; n < t.length; n++) { + var r = t[n], + i = r.find(), + o = e.clipPos(i.from), + s = e.clipPos(i.to); + if (tt(o, s)) { + var a = xo(e, o, s, r.primary, r.primary.type); + r.markers.push(a), (a.parent = r); + } + } + })(r, Do(this)), + r + ); + }, + unlinkDoc: function (e) { + if ((e instanceof Ts && (e = e.doc), this.linked)) + for (var t = 0; t < this.linked.length; ++t) + if (this.linked[t].doc == e) { + this.linked.splice(t, 1), e.unlinkDoc(this), Ao(Do(this)); + break; + } + if (e.history == this.history) { + var n = [e.id]; + Ni( + e, + function (e) { + return n.push(e.id); + }, + !0 + ), + (e.history = new Fi(null)), + (e.history.done = Gi(this.history.done, n)), + (e.history.undone = Gi(this.history.undone, n)); + } + }, + iterLinkedDocs: function (e) { + Ni(this, e); + }, + getMode: function () { + return this.mode; + }, + getEditor: function () { + return this.cm; + }, + splitLines: function (e) { + return this.lineSep ? e.split(this.lineSep) : Pe(e); + }, + lineSeparator: function () { + return this.lineSep || "\n"; + }, + setDirection: ni(function (e) { + var t; + "rtl" != e && (e = "ltr"), + e != this.direction && + ((this.direction = e), + this.iter(function (e) { + return (e.order = null); + }), + this.cm && + Jr((t = this.cm), function () { + Bi(t), hr(t); + })); + }), + })), + (Po.prototype.eachLine = Po.prototype.iter); + var Io = 0; + function Oo(e) { + var t = this; + if ((No(t), !fe(t, e) && !Sn(t.display, e))) { + ve(e), s && (Io = +new Date()); + var n = cr(t, e, !0), + r = e.dataTransfer.files; + if (n && !t.isReadOnly()) + if (r && r.length && window.FileReader && window.File) + for ( + var i = r.length, + o = Array(i), + a = 0, + l = function () { + ++a == i && + ei(t, function () { + var e = { + from: (n = at(t.doc, n)), + to: n, + text: t.doc.splitLines( + o + .filter(function (e) { + return null != e; + }) + .join(t.doc.lineSeparator()) + ), + origin: "paste", + }; + co(t.doc, e), + Qi(t.doc, Ri(at(t.doc, n), at(t.doc, xi(e)))); + })(); + }, + c = function (e, n) { + if ( + t.options.allowDropFileTypes && + -1 == U(t.options.allowDropFileTypes, e.type) + ) + l(); + else { + var r = new FileReader(); + (r.onerror = function () { + return l(); + }), + (r.onload = function () { + var e = r.result; + /[\x00-\x08\x0e-\x1f]{2}/.test(e) || (o[n] = e), + l(); + }), + r.readAsText(e); + } + }, + u = 0; + u < r.length; + u++ + ) + c(r[u], u); + else { + if (t.state.draggingText && t.doc.sel.contains(n) > -1) + return ( + t.state.draggingText(e), + void setTimeout(function () { + return t.display.input.focus(); + }, 20) + ); + try { + var h = e.dataTransfer.getData("Text"); + if (h) { + var p; + if ( + (t.state.draggingText && + !t.state.draggingText.copy && + (p = t.listSelections()), + eo(t.doc, Ri(n, n)), + p) + ) + for (var d = 0; d < p.length; ++d) + fo(t.doc, "", p[d].anchor, p[d].head, "drag"); + t.replaceSelection(h, "around", "paste"), + t.display.input.focus(); + } + } catch (e) {} + } + } + } + function No(e) { + e.display.dragCursor && + (e.display.lineSpace.removeChild(e.display.dragCursor), + (e.display.dragCursor = null)); + } + function Mo(e) { + if (document.getElementsByClassName) { + for ( + var t = document.getElementsByClassName("CodeMirror"), + n = [], + r = 0; + r < t.length; + r++ + ) { + var i = t[r].CodeMirror; + i && n.push(i); + } + n.length && + n[0].operation(function () { + for (var t = 0; t < n.length; t++) e(n[t]); + }); + } + } + var Bo = !1; + function Fo() { + var e; + Bo || + (he(window, "resize", function () { + null == e && + (e = setTimeout(function () { + (e = null), Mo(Lo); + }, 100)); + }), + he(window, "blur", function () { + return Mo(Rr); + }), + (Bo = !0)); + } + function Lo(e) { + var t = e.display; + (t.cachedCharWidth = t.cachedTextHeight = t.cachedPaddingH = null), + (t.scrollbarsClipped = !1), + e.setSize(); + } + for ( + var Ho = { + 3: "Pause", + 8: "Backspace", + 9: "Tab", + 13: "Enter", + 16: "Shift", + 17: "Ctrl", + 18: "Alt", + 19: "Pause", + 20: "CapsLock", + 27: "Esc", + 32: "Space", + 33: "PageUp", + 34: "PageDown", + 35: "End", + 36: "Home", + 37: "Left", + 38: "Up", + 39: "Right", + 40: "Down", + 44: "PrintScrn", + 45: "Insert", + 46: "Delete", + 59: ";", + 61: "=", + 91: "Mod", + 92: "Mod", + 93: "Mod", + 106: "*", + 107: "=", + 109: "-", + 110: ".", + 111: "/", + 145: "ScrollLock", + 173: "-", + 186: ";", + 187: "=", + 188: ",", + 189: "-", + 190: ".", + 191: "/", + 192: "`", + 219: "[", + 220: "\\", + 221: "]", + 222: "'", + 224: "Mod", + 63232: "Up", + 63233: "Down", + 63234: "Left", + 63235: "Right", + 63272: "Delete", + 63273: "Home", + 63275: "End", + 63276: "PageUp", + 63277: "PageDown", + 63302: "Insert", + }, + Uo = 0; + Uo < 10; + Uo++ + ) + Ho[Uo + 48] = Ho[Uo + 96] = String(Uo); + for (var Wo = 65; Wo <= 90; Wo++) Ho[Wo] = String.fromCharCode(Wo); + for (var $o = 1; $o <= 12; $o++) + Ho[$o + 111] = Ho[$o + 63235] = "F" + $o; + var zo = {}; + function qo(e) { + var t, + n, + r, + i, + o = e.split(/-(?!$)/); + e = o[o.length - 1]; + for (var s = 0; s < o.length - 1; s++) { + var a = o[s]; + if (/^(cmd|meta|m)$/i.test(a)) i = !0; + else if (/^a(lt)?$/i.test(a)) t = !0; + else if (/^(c|ctrl|control)$/i.test(a)) n = !0; + else { + if (!/^s(hift)?$/i.test(a)) + throw new Error("Unrecognized modifier name: " + a); + r = !0; + } + } + return ( + t && (e = "Alt-" + e), + n && (e = "Ctrl-" + e), + i && (e = "Cmd-" + e), + r && (e = "Shift-" + e), + e + ); + } + function jo(e) { + var t = {}; + for (var n in e) + if (e.hasOwnProperty(n)) { + var r = e[n]; + if (/^(name|fallthrough|(de|at)tach)$/.test(n)) continue; + if ("..." == r) { + delete e[n]; + continue; + } + for (var i = Y(n.split(" "), qo), o = 0; o < i.length; o++) { + var s = void 0, + a = void 0; + o == i.length - 1 + ? ((a = i.join(" ")), (s = r)) + : ((a = i.slice(0, o + 1).join(" ")), (s = "...")); + var l = t[a]; + if (l) { + if (l != s) + throw new Error("Inconsistent bindings for " + a); + } else t[a] = s; + } + delete e[n]; + } + for (var c in t) e[c] = t[c]; + return e; + } + function Go(e, t, n, r) { + var i = (t = Xo(t)).call ? t.call(e, r) : t[e]; + if (!1 === i) return "nothing"; + if ("..." === i) return "multi"; + if (null != i && n(i)) return "handled"; + if (t.fallthrough) { + if ( + "[object Array]" != + Object.prototype.toString.call(t.fallthrough) + ) + return Go(e, t.fallthrough, n, r); + for (var o = 0; o < t.fallthrough.length; o++) { + var s = Go(e, t.fallthrough[o], n, r); + if (s) return s; + } + } + } + function Vo(e) { + var t = "string" == typeof e ? e : Ho[e.keyCode]; + return "Ctrl" == t || "Alt" == t || "Shift" == t || "Mod" == t; + } + function Ko(e, t, n) { + var r = e; + return ( + t.altKey && "Alt" != r && (e = "Alt-" + e), + (S ? t.metaKey : t.ctrlKey) && "Ctrl" != r && (e = "Ctrl-" + e), + (S ? t.ctrlKey : t.metaKey) && "Mod" != r && (e = "Cmd-" + e), + !n && t.shiftKey && "Shift" != r && (e = "Shift-" + e), + e + ); + } + function Yo(e, t) { + if (h && 34 == e.keyCode && e.char) return !1; + var n = Ho[e.keyCode]; + return ( + null != n && + !e.altGraphKey && + (3 == e.keyCode && e.code && (n = e.code), Ko(n, e, t)) + ); + } + function Xo(e) { + return "string" == typeof e ? zo[e] : e; + } + function Zo(e, t) { + for (var n = e.doc.sel.ranges, r = [], i = 0; i < n.length; i++) { + for (var o = t(n[i]); r.length && tt(o.from, K(r).to) <= 0; ) { + var s = r.pop(); + if (tt(s.from, o.from) < 0) { + o.from = s.from; + break; + } + } + r.push(o); + } + Jr(e, function () { + for (var t = r.length - 1; t >= 0; t--) + fo(e.doc, "", r[t].from, r[t].to, "+delete"); + Pr(e); + }); + } + function Qo(e, t, n) { + var r = ie(e.text, t + n, n); + return r < 0 || r > e.text.length ? null : r; + } + function Jo(e, t, n) { + var r = Qo(e, t.ch, n); + return null == r + ? null + : new et(t.line, r, n < 0 ? "after" : "before"); + } + function es(e, t, n, r, i) { + if (e) { + "rtl" == t.doc.direction && (i = -i); + var o = ce(n, t.doc.direction); + if (o) { + var s, + a = i < 0 ? K(o) : o[0], + l = i < 0 == (1 == a.level) ? "after" : "before"; + if (a.level > 0 || "rtl" == t.doc.direction) { + var c = In(t, n); + s = i < 0 ? n.text.length - 1 : 0; + var u = On(t, c, s).top; + (s = oe( + function (e) { + return On(t, c, e).top == u; + }, + i < 0 == (1 == a.level) ? a.from : a.to - 1, + s + )), + "before" == l && (s = Qo(n, s, 1)); + } else s = i < 0 ? a.to : a.from; + return new et(r, s, l); + } + } + return new et( + r, + i < 0 ? n.text.length : 0, + i < 0 ? "before" : "after" + ); + } + (zo.basic = { + Left: "goCharLeft", + Right: "goCharRight", + Up: "goLineUp", + Down: "goLineDown", + End: "goLineEnd", + Home: "goLineStartSmart", + PageUp: "goPageUp", + PageDown: "goPageDown", + Delete: "delCharAfter", + Backspace: "delCharBefore", + "Shift-Backspace": "delCharBefore", + Tab: "defaultTab", + "Shift-Tab": "indentAuto", + Enter: "newlineAndIndent", + Insert: "toggleOverwrite", + Esc: "singleSelection", + }), + (zo.pcDefault = { + "Ctrl-A": "selectAll", + "Ctrl-D": "deleteLine", + "Ctrl-Z": "undo", + "Shift-Ctrl-Z": "redo", + "Ctrl-Y": "redo", + "Ctrl-Home": "goDocStart", + "Ctrl-End": "goDocEnd", + "Ctrl-Up": "goLineUp", + "Ctrl-Down": "goLineDown", + "Ctrl-Left": "goGroupLeft", + "Ctrl-Right": "goGroupRight", + "Alt-Left": "goLineStart", + "Alt-Right": "goLineEnd", + "Ctrl-Backspace": "delGroupBefore", + "Ctrl-Delete": "delGroupAfter", + "Ctrl-S": "save", + "Ctrl-F": "find", + "Ctrl-G": "findNext", + "Shift-Ctrl-G": "findPrev", + "Shift-Ctrl-F": "replace", + "Shift-Ctrl-R": "replaceAll", + "Ctrl-[": "indentLess", + "Ctrl-]": "indentMore", + "Ctrl-U": "undoSelection", + "Shift-Ctrl-U": "redoSelection", + "Alt-U": "redoSelection", + fallthrough: "basic", + }), + (zo.emacsy = { + "Ctrl-F": "goCharRight", + "Ctrl-B": "goCharLeft", + "Ctrl-P": "goLineUp", + "Ctrl-N": "goLineDown", + "Alt-F": "goWordRight", + "Alt-B": "goWordLeft", + "Ctrl-A": "goLineStart", + "Ctrl-E": "goLineEnd", + "Ctrl-V": "goPageDown", + "Shift-Ctrl-V": "goPageUp", + "Ctrl-D": "delCharAfter", + "Ctrl-H": "delCharBefore", + "Alt-D": "delWordAfter", + "Alt-Backspace": "delWordBefore", + "Ctrl-K": "killLine", + "Ctrl-T": "transposeChars", + "Ctrl-O": "openLine", + }), + (zo.macDefault = { + "Cmd-A": "selectAll", + "Cmd-D": "deleteLine", + "Cmd-Z": "undo", + "Shift-Cmd-Z": "redo", + "Cmd-Y": "redo", + "Cmd-Home": "goDocStart", + "Cmd-Up": "goDocStart", + "Cmd-End": "goDocEnd", + "Cmd-Down": "goDocEnd", + "Alt-Left": "goGroupLeft", + "Alt-Right": "goGroupRight", + "Cmd-Left": "goLineLeft", + "Cmd-Right": "goLineRight", + "Alt-Backspace": "delGroupBefore", + "Ctrl-Alt-Backspace": "delGroupAfter", + "Alt-Delete": "delGroupAfter", + "Cmd-S": "save", + "Cmd-F": "find", + "Cmd-G": "findNext", + "Shift-Cmd-G": "findPrev", + "Cmd-Alt-F": "replace", + "Shift-Cmd-Alt-F": "replaceAll", + "Cmd-[": "indentLess", + "Cmd-]": "indentMore", + "Cmd-Backspace": "delWrappedLineLeft", + "Cmd-Delete": "delWrappedLineRight", + "Cmd-U": "undoSelection", + "Shift-Cmd-U": "redoSelection", + "Ctrl-Up": "goDocStart", + "Ctrl-Down": "goDocEnd", + fallthrough: ["basic", "emacsy"], + }), + (zo.default = b ? zo.macDefault : zo.pcDefault); + var ts = { + selectAll: ao, + singleSelection: function (e) { + return e.setSelection( + e.getCursor("anchor"), + e.getCursor("head"), + $ + ); + }, + killLine: function (e) { + return Zo(e, function (t) { + if (t.empty()) { + var n = Ge(e.doc, t.head.line).text.length; + return t.head.ch == n && t.head.line < e.lastLine() + ? { from: t.head, to: et(t.head.line + 1, 0) } + : { from: t.head, to: et(t.head.line, n) }; + } + return { from: t.from(), to: t.to() }; + }); + }, + deleteLine: function (e) { + return Zo(e, function (t) { + return { + from: et(t.from().line, 0), + to: at(e.doc, et(t.to().line + 1, 0)), + }; + }); + }, + delLineLeft: function (e) { + return Zo(e, function (e) { + return { from: et(e.from().line, 0), to: e.from() }; + }); + }, + delWrappedLineLeft: function (e) { + return Zo(e, function (t) { + var n = e.charCoords(t.head, "div").top + 5; + return { + from: e.coordsChar({ left: 0, top: n }, "div"), + to: t.from(), + }; + }); + }, + delWrappedLineRight: function (e) { + return Zo(e, function (t) { + var n = e.charCoords(t.head, "div").top + 5, + r = e.coordsChar( + { left: e.display.lineDiv.offsetWidth + 100, top: n }, + "div" + ); + return { from: t.from(), to: r }; + }); + }, + undo: function (e) { + return e.undo(); + }, + redo: function (e) { + return e.redo(); + }, + undoSelection: function (e) { + return e.undoSelection(); + }, + redoSelection: function (e) { + return e.redoSelection(); + }, + goDocStart: function (e) { + return e.extendSelection(et(e.firstLine(), 0)); + }, + goDocEnd: function (e) { + return e.extendSelection(et(e.lastLine())); + }, + goLineStart: function (e) { + return e.extendSelectionsBy( + function (t) { + return ns(e, t.head.line); + }, + { origin: "+move", bias: 1 } + ); + }, + goLineStartSmart: function (e) { + return e.extendSelectionsBy( + function (t) { + return rs(e, t.head); + }, + { origin: "+move", bias: 1 } + ); + }, + goLineEnd: function (e) { + return e.extendSelectionsBy( + function (t) { + return (function (e, t) { + var n = Ge(e.doc, t), + r = (function (e) { + for (var t; (t = Mt(e)); ) e = t.find(1, !0).line; + return e; + })(n); + return r != n && (t = Xe(r)), es(!0, e, n, t, -1); + })(e, t.head.line); + }, + { origin: "+move", bias: -1 } + ); + }, + goLineRight: function (e) { + return e.extendSelectionsBy(function (t) { + var n = e.cursorCoords(t.head, "div").top + 5; + return e.coordsChar( + { left: e.display.lineDiv.offsetWidth + 100, top: n }, + "div" + ); + }, q); + }, + goLineLeft: function (e) { + return e.extendSelectionsBy(function (t) { + var n = e.cursorCoords(t.head, "div").top + 5; + return e.coordsChar({ left: 0, top: n }, "div"); + }, q); + }, + goLineLeftSmart: function (e) { + return e.extendSelectionsBy(function (t) { + var n = e.cursorCoords(t.head, "div").top + 5, + r = e.coordsChar({ left: 0, top: n }, "div"); + return r.ch < e.getLine(r.line).search(/\S/) + ? rs(e, t.head) + : r; + }, q); + }, + goLineUp: function (e) { + return e.moveV(-1, "line"); + }, + goLineDown: function (e) { + return e.moveV(1, "line"); + }, + goPageUp: function (e) { + return e.moveV(-1, "page"); + }, + goPageDown: function (e) { + return e.moveV(1, "page"); + }, + goCharLeft: function (e) { + return e.moveH(-1, "char"); + }, + goCharRight: function (e) { + return e.moveH(1, "char"); + }, + goColumnLeft: function (e) { + return e.moveH(-1, "column"); + }, + goColumnRight: function (e) { + return e.moveH(1, "column"); + }, + goWordLeft: function (e) { + return e.moveH(-1, "word"); + }, + goGroupRight: function (e) { + return e.moveH(1, "group"); + }, + goGroupLeft: function (e) { + return e.moveH(-1, "group"); + }, + goWordRight: function (e) { + return e.moveH(1, "word"); + }, + delCharBefore: function (e) { + return e.deleteH(-1, "codepoint"); + }, + delCharAfter: function (e) { + return e.deleteH(1, "char"); + }, + delWordBefore: function (e) { + return e.deleteH(-1, "word"); + }, + delWordAfter: function (e) { + return e.deleteH(1, "word"); + }, + delGroupBefore: function (e) { + return e.deleteH(-1, "group"); + }, + delGroupAfter: function (e) { + return e.deleteH(1, "group"); + }, + indentAuto: function (e) { + return e.indentSelection("smart"); + }, + indentMore: function (e) { + return e.indentSelection("add"); + }, + indentLess: function (e) { + return e.indentSelection("subtract"); + }, + insertTab: function (e) { + return e.replaceSelection("\t"); + }, + insertSoftTab: function (e) { + for ( + var t = [], + n = e.listSelections(), + r = e.options.tabSize, + i = 0; + i < n.length; + i++ + ) { + var o = n[i].from(), + s = L(e.getLine(o.line), o.ch, r); + t.push(V(r - (s % r))); + } + e.replaceSelections(t); + }, + defaultTab: function (e) { + e.somethingSelected() + ? e.indentSelection("add") + : e.execCommand("insertTab"); + }, + transposeChars: function (e) { + return Jr(e, function () { + for ( + var t = e.listSelections(), n = [], r = 0; + r < t.length; + r++ + ) + if (t[r].empty()) { + var i = t[r].head, + o = Ge(e.doc, i.line).text; + if (o) + if ( + (i.ch == o.length && (i = new et(i.line, i.ch - 1)), + i.ch > 0) + ) + (i = new et(i.line, i.ch + 1)), + e.replaceRange( + o.charAt(i.ch - 1) + o.charAt(i.ch - 2), + et(i.line, i.ch - 2), + i, + "+transpose" + ); + else if (i.line > e.doc.first) { + var s = Ge(e.doc, i.line - 1).text; + s && + ((i = new et(i.line, 1)), + e.replaceRange( + o.charAt(0) + + e.doc.lineSeparator() + + s.charAt(s.length - 1), + et(i.line - 1, s.length - 1), + i, + "+transpose" + )); + } + n.push(new Ei(i, i)); + } + e.setSelections(n); + }); + }, + newlineAndIndent: function (e) { + return Jr(e, function () { + for (var t = e.listSelections(), n = t.length - 1; n >= 0; n--) + e.replaceRange( + e.doc.lineSeparator(), + t[n].anchor, + t[n].head, + "+input" + ); + t = e.listSelections(); + for (var r = 0; r < t.length; r++) + e.indentLine(t[r].from().line, null, !0); + Pr(e); + }); + }, + openLine: function (e) { + return e.replaceSelection("\n", "start"); + }, + toggleOverwrite: function (e) { + return e.toggleOverwrite(); + }, + }; + function ns(e, t) { + var n = Ge(e.doc, t), + r = Lt(n); + return r != n && (t = Xe(r)), es(!0, e, r, t, 1); + } + function rs(e, t) { + var n = ns(e, t.line), + r = Ge(e.doc, n.line), + i = ce(r, e.doc.direction); + if (!i || 0 == i[0].level) { + var o = Math.max(n.ch, r.text.search(/\S/)), + s = t.line == n.line && t.ch <= o && t.ch; + return et(n.line, s ? 0 : o, n.sticky); + } + return n; + } + function is(e, t, n) { + if ("string" == typeof t && !(t = ts[t])) return !1; + e.display.input.ensurePolled(); + var r = e.display.shift, + i = !1; + try { + e.isReadOnly() && (e.state.suppressEdits = !0), + n && (e.display.shift = !1), + (i = t(e) != W); + } finally { + (e.display.shift = r), (e.state.suppressEdits = !1); + } + return i; + } + var os = new H(); + function ss(e, t, n, r) { + var i = e.state.keySeq; + if (i) { + if (Vo(t)) return "handled"; + if ( + (/\'$/.test(t) + ? (e.state.keySeq = null) + : os.set(50, function () { + e.state.keySeq == i && + ((e.state.keySeq = null), e.display.input.reset()); + }), + as(e, i + " " + t, n, r)) + ) + return !0; + } + return as(e, t, n, r); + } + function as(e, t, n, r) { + var i = (function (e, t, n) { + for (var r = 0; r < e.state.keyMaps.length; r++) { + var i = Go(t, e.state.keyMaps[r], n, e); + if (i) return i; + } + return ( + (e.options.extraKeys && Go(t, e.options.extraKeys, n, e)) || + Go(t, e.options.keyMap, n, e) + ); + })(e, t, r); + return ( + "multi" == i && (e.state.keySeq = t), + "handled" == i && ln(e, "keyHandled", e, t, n), + ("handled" != i && "multi" != i) || (ve(n), Cr(e)), + !!i + ); + } + function ls(e, t) { + var n = Yo(t, !0); + return ( + !!n && + (t.shiftKey && !e.state.keySeq + ? ss(e, "Shift-" + n, t, function (t) { + return is(e, t, !0); + }) || + ss(e, n, t, function (t) { + if ("string" == typeof t ? /^go[A-Z]/.test(t) : t.motion) + return is(e, t); + }) + : ss(e, n, t, function (t) { + return is(e, t); + })) + ); + } + var cs = null; + function us(e) { + var t = this; + if ( + !( + (e.target && e.target != t.display.input.getField()) || + ((t.curOp.focus = I()), fe(t, e)) + ) + ) { + s && a < 11 && 27 == e.keyCode && (e.returnValue = !1); + var r = e.keyCode; + t.display.shift = 16 == r || e.shiftKey; + var i = ls(t, e); + h && + ((cs = i ? r : null), + i || + 88 != r || + Oe || + !(b ? e.metaKey : e.ctrlKey) || + t.replaceSelection("", null, "cut")), + n && + !b && + !i && + 46 == r && + e.shiftKey && + !e.ctrlKey && + document.execCommand && + document.execCommand("cut"), + 18 != r || + /\bCodeMirror-crosshair\b/.test( + t.display.lineDiv.className + ) || + (function (e) { + var t = e.display.lineDiv; + function n(e) { + (18 != e.keyCode && e.altKey) || + (x(t, "CodeMirror-crosshair"), + de(document, "keyup", n), + de(document, "mouseover", n)); + } + O(t, "CodeMirror-crosshair"), + he(document, "keyup", n), + he(document, "mouseover", n); + })(t); + } + } + function hs(e) { + 16 == e.keyCode && (this.doc.sel.shift = !1), fe(this, e); + } + function ps(e) { + var t = this; + if ( + !( + (e.target && e.target != t.display.input.getField()) || + Sn(t.display, e) || + fe(t, e) || + (e.ctrlKey && !e.altKey) || + (b && e.metaKey) + ) + ) { + var n = e.keyCode, + r = e.charCode; + if (h && n == cs) return (cs = null), void ve(e); + if (!h || (e.which && !(e.which < 10)) || !ls(t, e)) { + var i = String.fromCharCode(null == r ? n : r); + "\b" != i && + ((function (e, t, n) { + return ss(e, "'" + n + "'", t, function (t) { + return is(e, t, !0); + }); + })(t, e, i) || + t.display.input.onKeyPress(e)); + } + } + } + var ds, + ms, + fs = function (e, t, n) { + (this.time = e), (this.pos = t), (this.button = n); + }; + function gs(e) { + var t = this, + n = t.display; + if (!(fe(t, e) || (n.activeTouch && n.input.supportsTouch()))) + if ((n.input.ensurePolled(), (n.shift = e.shiftKey), Sn(n, e))) + l || + ((n.scroller.draggable = !1), + setTimeout(function () { + return (n.scroller.draggable = !0); + }, 100)); + else if (!vs(t, e)) { + var r = cr(t, e), + i = ke(e), + o = r + ? (function (e, t) { + var n = +new Date(); + return ms && ms.compare(n, e, t) + ? ((ds = ms = null), "triple") + : ds && ds.compare(n, e, t) + ? ((ms = new fs(n, e, t)), (ds = null), "double") + : ((ds = new fs(n, e, t)), (ms = null), "single"); + })(r, i) + : "single"; + window.focus(), + 1 == i && t.state.selectingText && t.state.selectingText(e), + (r && + (function (e, t, n, r, i) { + var o = "Click"; + return ( + "double" == r + ? (o = "Double" + o) + : "triple" == r && (o = "Triple" + o), + ss( + e, + Ko( + (o = + (1 == t ? "Left" : 2 == t ? "Middle" : "Right") + + o), + i + ), + i, + function (t) { + if (("string" == typeof t && (t = ts[t]), !t)) + return !1; + var r = !1; + try { + e.isReadOnly() && (e.state.suppressEdits = !0), + (r = t(e, n) != W); + } finally { + e.state.suppressEdits = !1; + } + return r; + } + ) + ); + })(t, i, r, o, e)) || + (1 == i + ? r + ? (function (e, t, n, r) { + s ? setTimeout(B(Sr, e), 0) : (e.curOp.focus = I()); + var i, + o = (function (e, t, n) { + var r = e.getOption("configureMouse"), + i = r ? r(e, t, n) : {}; + if (null == i.unit) { + var o = v + ? n.shiftKey && n.metaKey + : n.altKey; + i.unit = o + ? "rectangle" + : "single" == t + ? "char" + : "double" == t + ? "word" + : "line"; + } + return ( + (null == i.extend || e.doc.extend) && + (i.extend = e.doc.extend || n.shiftKey), + null == i.addNew && + (i.addNew = b ? n.metaKey : n.ctrlKey), + null == i.moveOnDrag && + (i.moveOnDrag = !(b + ? n.altKey + : n.ctrlKey)), + i + ); + })(e, n, r), + c = e.doc.sel; + e.options.dragDrop && + Te && + !e.isReadOnly() && + "single" == n && + (i = c.contains(t)) > -1 && + (tt((i = c.ranges[i]).from(), t) < 0 || + t.xRel > 0) && + (tt(i.to(), t) > 0 || t.xRel < 0) + ? (function (e, t, n, r) { + var i = e.display, + o = !1, + c = ei(e, function (t) { + l && (i.scroller.draggable = !1), + (e.state.draggingText = !1), + e.state.delayingBlurEvent && + (e.hasFocus() + ? (e.state.delayingBlurEvent = !1) + : Er(e)), + de( + i.wrapper.ownerDocument, + "mouseup", + c + ), + de( + i.wrapper.ownerDocument, + "mousemove", + u + ), + de(i.scroller, "dragstart", h), + de(i.scroller, "drop", c), + o || + (ve(t), + r.addNew || + Ki(e.doc, n, null, null, r.extend), + (l && !p) || (s && 9 == a) + ? setTimeout(function () { + i.wrapper.ownerDocument.body.focus( + { preventScroll: !0 } + ), + i.input.focus(); + }, 20) + : i.input.focus()); + }), + u = function (e) { + o = + o || + Math.abs(t.clientX - e.clientX) + + Math.abs(t.clientY - e.clientY) >= + 10; + }, + h = function () { + return (o = !0); + }; + l && (i.scroller.draggable = !0), + (e.state.draggingText = c), + (c.copy = !r.moveOnDrag), + he(i.wrapper.ownerDocument, "mouseup", c), + he(i.wrapper.ownerDocument, "mousemove", u), + he(i.scroller, "dragstart", h), + he(i.scroller, "drop", c), + (e.state.delayingBlurEvent = !0), + setTimeout(function () { + return i.input.focus(); + }, 20), + i.scroller.dragDrop && + i.scroller.dragDrop(); + })(e, r, t, o) + : (function (e, t, n, r) { + s && Er(e); + var i = e.display, + o = e.doc; + ve(t); + var a, + l, + c = o.sel, + u = c.ranges; + if ( + (r.addNew && !r.extend + ? ((l = o.sel.contains(n)), + (a = l > -1 ? u[l] : new Ei(n, n))) + : ((a = o.sel.primary()), + (l = o.sel.primIndex)), + "rectangle" == r.unit) + ) + r.addNew || (a = new Ei(n, n)), + (n = cr(e, t, !0, !0)), + (l = -1); + else { + var h = ys(e, n, r.unit); + a = r.extend + ? Vi(a, h.anchor, h.head, r.extend) + : h; + } + r.addNew + ? -1 == l + ? ((l = u.length), + Ji(o, ki(e, u.concat([a]), l), { + scroll: !1, + origin: "*mouse", + })) + : u.length > 1 && + u[l].empty() && + "char" == r.unit && + !r.extend + ? (Ji( + o, + ki( + e, + u + .slice(0, l) + .concat(u.slice(l + 1)), + 0 + ), + { scroll: !1, origin: "*mouse" } + ), + (c = o.sel)) + : Xi(o, l, a, z) + : ((l = 0), + Ji(o, new Si([a], 0), z), + (c = o.sel)); + var p = n; + function d(t) { + if (0 != tt(p, t)) + if (((p = t), "rectangle" == r.unit)) { + for ( + var i = [], + s = e.options.tabSize, + u = L(Ge(o, n.line).text, n.ch, s), + h = L(Ge(o, t.line).text, t.ch, s), + d = Math.min(u, h), + m = Math.max(u, h), + f = Math.min(n.line, t.line), + g = Math.min( + e.lastLine(), + Math.max(n.line, t.line) + ); + f <= g; + f++ + ) { + var y = Ge(o, f).text, + b = j(y, d, s); + d == m + ? i.push(new Ei(et(f, b), et(f, b))) + : y.length > b && + i.push( + new Ei( + et(f, b), + et(f, j(y, m, s)) + ) + ); + } + i.length || i.push(new Ei(n, n)), + Ji( + o, + ki( + e, + c.ranges.slice(0, l).concat(i), + l + ), + { origin: "*mouse", scroll: !1 } + ), + e.scrollIntoView(t); + } else { + var v, + w = a, + C = ys(e, t, r.unit), + S = w.anchor; + tt(C.anchor, S) > 0 + ? ((v = C.head), + (S = ot(w.from(), C.anchor))) + : ((v = C.anchor), + (S = it(w.to(), C.head))); + var E = c.ranges.slice(0); + (E[l] = (function (e, t) { + var n = t.anchor, + r = t.head, + i = Ge(e.doc, n.line); + if ( + 0 == tt(n, r) && + n.sticky == r.sticky + ) + return t; + var o = ce(i); + if (!o) return t; + var s = ae(o, n.ch, n.sticky), + a = o[s]; + if (a.from != n.ch && a.to != n.ch) + return t; + var l, + c = + s + + ((a.from == n.ch) == + (1 != a.level) + ? 0 + : 1); + if (0 == c || c == o.length) return t; + if (r.line != n.line) + l = + (r.line - n.line) * + ("ltr" == e.doc.direction + ? 1 + : -1) > + 0; + else { + var u = ae(o, r.ch, r.sticky), + h = + u - s || + (r.ch - n.ch) * + (1 == a.level ? -1 : 1); + l = + u == c - 1 || u == c + ? h < 0 + : h > 0; + } + var p = o[c + (l ? -1 : 0)], + d = l == (1 == p.level), + m = d ? p.from : p.to, + f = d ? "after" : "before"; + return n.ch == m && n.sticky == f + ? t + : new Ei(new et(n.line, m, f), r); + })(e, new Ei(at(o, S), v))), + Ji(o, ki(e, E, l), z); + } + } + var m = i.wrapper.getBoundingClientRect(), + f = 0; + function g(t) { + var n = ++f, + s = cr(e, t, !0, "rectangle" == r.unit); + if (s) + if (0 != tt(s, p)) { + (e.curOp.focus = I()), d(s); + var a = Dr(i, o); + (s.line >= a.to || s.line < a.from) && + setTimeout( + ei(e, function () { + f == n && g(t); + }), + 150 + ); + } else { + var l = + t.clientY < m.top + ? -20 + : t.clientY > m.bottom + ? 20 + : 0; + l && + setTimeout( + ei(e, function () { + f == n && + ((i.scroller.scrollTop += l), + g(t)); + }), + 50 + ); + } + } + function y(t) { + (e.state.selectingText = !1), + (f = 1 / 0), + t && (ve(t), i.input.focus()), + de( + i.wrapper.ownerDocument, + "mousemove", + b + ), + de(i.wrapper.ownerDocument, "mouseup", v), + (o.history.lastSelOrigin = null); + } + var b = ei(e, function (e) { + 0 !== e.buttons && ke(e) ? g(e) : y(e); + }), + v = ei(e, y); + (e.state.selectingText = v), + he(i.wrapper.ownerDocument, "mousemove", b), + he(i.wrapper.ownerDocument, "mouseup", v); + })(e, r, t, o); + })(t, r, o, e) + : Ee(e) == n.scroller && ve(e) + : 2 == i + ? (r && Ki(t.doc, r), + setTimeout(function () { + return n.input.focus(); + }, 20)) + : 3 == i && + (E ? t.display.input.onContextMenu(e) : Er(t))); + } + } + function ys(e, t, n) { + if ("char" == n) return new Ei(t, t); + if ("word" == n) return e.findWordAt(t); + if ("line" == n) + return new Ei(et(t.line, 0), at(e.doc, et(t.line + 1, 0))); + var r = n(e, t); + return new Ei(r.from, r.to); + } + function bs(e, t, n, r) { + var i, o; + if (t.touches) + (i = t.touches[0].clientX), (o = t.touches[0].clientY); + else + try { + (i = t.clientX), (o = t.clientY); + } catch (e) { + return !1; + } + if ( + i >= Math.floor(e.display.gutters.getBoundingClientRect().right) + ) + return !1; + r && ve(t); + var s = e.display, + a = s.lineDiv.getBoundingClientRect(); + if (o > a.bottom || !ye(e, n)) return Ce(t); + o -= a.top - s.viewOffset; + for (var l = 0; l < e.display.gutterSpecs.length; ++l) { + var c = s.gutters.childNodes[l]; + if (c && c.getBoundingClientRect().right >= i) + return ( + me( + e, + n, + e, + Ze(e.doc, o), + e.display.gutterSpecs[l].className, + t + ), + Ce(t) + ); + } + } + function vs(e, t) { + return bs(e, t, "gutterClick", !0); + } + function ws(e, t) { + Sn(e.display, t) || + (function (e, t) { + return ( + !!ye(e, "gutterContextMenu") && + bs(e, t, "gutterContextMenu", !1) + ); + })(e, t) || + fe(e, t, "contextmenu") || + E || + e.display.input.onContextMenu(t); + } + function Cs(e) { + (e.display.wrapper.className = + e.display.wrapper.className.replace(/\s*cm-s-\S+/g, "") + + e.options.theme.replace(/(^|\s)\s*/g, " cm-s-")), + Un(e); + } + fs.prototype.compare = function (e, t, n) { + return ( + this.time + 400 > e && 0 == tt(t, this.pos) && n == this.button + ); + }; + var Ss = { + toString: function () { + return "CodeMirror.Init"; + }, + }, + Es = {}, + ks = {}; + function Rs(e, t, n) { + if (!t != !(n && n != Ss)) { + var r = e.display.dragFunctions, + i = t ? he : de; + i(e.display.scroller, "dragstart", r.start), + i(e.display.scroller, "dragenter", r.enter), + i(e.display.scroller, "dragover", r.over), + i(e.display.scroller, "dragleave", r.leave), + i(e.display.scroller, "drop", r.drop); + } + } + function xs(e) { + e.options.lineWrapping + ? (O(e.display.wrapper, "CodeMirror-wrap"), + (e.display.sizer.style.minWidth = ""), + (e.display.sizerWidth = null)) + : (x(e.display.wrapper, "CodeMirror-wrap"), jt(e)), + lr(e), + hr(e), + Un(e), + setTimeout(function () { + return Wr(e); + }, 100); + } + function Ts(e, t) { + var n = this; + if (!(this instanceof Ts)) return new Ts(e, t); + (this.options = t = t ? F(t) : {}), F(Es, t, !1); + var r = t.value; + "string" == typeof r + ? (r = new Po(r, t.mode, null, t.lineSeparator, t.direction)) + : t.mode && (r.modeOption = t.mode), + (this.doc = r); + var i = new Ts.inputStyles[t.inputStyle](this), + o = (this.display = new gi(e, r, i, t)); + for (var c in ((o.wrapper.CodeMirror = this), + Cs(this), + t.lineWrapping && + (this.display.wrapper.className += " CodeMirror-wrap"), + qr(this), + (this.state = { + keyMaps: [], + overlays: [], + modeGen: 0, + overwrite: !1, + delayingBlurEvent: !1, + focused: !1, + suppressEdits: !1, + pasteIncoming: -1, + cutIncoming: -1, + selectingText: !1, + draggingText: !1, + highlight: new H(), + keySeq: null, + specialChars: null, + }), + t.autofocus && !y && o.input.focus(), + s && + a < 11 && + setTimeout(function () { + return n.display.input.reset(!0); + }, 20), + (function (e) { + var t = e.display; + he(t.scroller, "mousedown", ei(e, gs)), + he( + t.scroller, + "dblclick", + s && a < 11 + ? ei(e, function (t) { + if (!fe(e, t)) { + var n = cr(e, t); + if (n && !vs(e, t) && !Sn(e.display, t)) { + ve(t); + var r = e.findWordAt(n); + Ki(e.doc, r.anchor, r.head); + } + } + }) + : function (t) { + return fe(e, t) || ve(t); + } + ), + he(t.scroller, "contextmenu", function (t) { + return ws(e, t); + }), + he(t.input.getField(), "contextmenu", function (n) { + t.scroller.contains(n.target) || ws(e, n); + }); + var n, + r = { end: 0 }; + function i() { + t.activeTouch && + ((n = setTimeout(function () { + return (t.activeTouch = null); + }, 1e3)), + ((r = t.activeTouch).end = +new Date())); + } + function o(e) { + if (1 != e.touches.length) return !1; + var t = e.touches[0]; + return t.radiusX <= 1 && t.radiusY <= 1; + } + function l(e, t) { + if (null == t.left) return !0; + var n = t.left - e.left, + r = t.top - e.top; + return n * n + r * r > 400; + } + he(t.scroller, "touchstart", function (i) { + if (!fe(e, i) && !o(i) && !vs(e, i)) { + t.input.ensurePolled(), clearTimeout(n); + var s = +new Date(); + (t.activeTouch = { + start: s, + moved: !1, + prev: s - r.end <= 300 ? r : null, + }), + 1 == i.touches.length && + ((t.activeTouch.left = i.touches[0].pageX), + (t.activeTouch.top = i.touches[0].pageY)); + } + }), + he(t.scroller, "touchmove", function () { + t.activeTouch && (t.activeTouch.moved = !0); + }), + he(t.scroller, "touchend", function (n) { + var r = t.activeTouch; + if ( + r && + !Sn(t, n) && + null != r.left && + !r.moved && + new Date() - r.start < 300 + ) { + var o, + s = e.coordsChar(t.activeTouch, "page"); + (o = + !r.prev || l(r, r.prev) + ? new Ei(s, s) + : !r.prev.prev || l(r, r.prev.prev) + ? e.findWordAt(s) + : new Ei(et(s.line, 0), at(e.doc, et(s.line + 1, 0)))), + e.setSelection(o.anchor, o.head), + e.focus(), + ve(n); + } + i(); + }), + he(t.scroller, "touchcancel", i), + he(t.scroller, "scroll", function () { + t.scroller.clientHeight && + (Mr(e, t.scroller.scrollTop), + Fr(e, t.scroller.scrollLeft, !0), + me(e, "scroll", e)); + }), + he(t.scroller, "mousewheel", function (t) { + return Ci(e, t); + }), + he(t.scroller, "DOMMouseScroll", function (t) { + return Ci(e, t); + }), + he(t.wrapper, "scroll", function () { + return (t.wrapper.scrollTop = t.wrapper.scrollLeft = 0); + }), + (t.dragFunctions = { + enter: function (t) { + fe(e, t) || Se(t); + }, + over: function (t) { + fe(e, t) || + ((function (e, t) { + var n = cr(e, t); + if (n) { + var r = document.createDocumentFragment(); + br(e, n, r), + e.display.dragCursor || + ((e.display.dragCursor = A( + "div", + null, + "CodeMirror-cursors CodeMirror-dragcursors" + )), + e.display.lineSpace.insertBefore( + e.display.dragCursor, + e.display.cursorDiv + )), + D(e.display.dragCursor, r); + } + })(e, t), + Se(t)); + }, + start: function (t) { + return (function (e, t) { + if ( + s && + (!e.state.draggingText || +new Date() - Io < 100) + ) + Se(t); + else if ( + !fe(e, t) && + !Sn(e.display, t) && + (t.dataTransfer.setData("Text", e.getSelection()), + (t.dataTransfer.effectAllowed = "copyMove"), + t.dataTransfer.setDragImage && !p) + ) { + var n = A( + "img", + null, + null, + "position: fixed; left: 0; top: 0;" + ); + (n.src = + "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="), + h && + ((n.width = n.height = 1), + e.display.wrapper.appendChild(n), + (n._top = n.offsetTop)), + t.dataTransfer.setDragImage(n, 0, 0), + h && n.parentNode.removeChild(n); + } + })(e, t); + }, + drop: ei(e, Oo), + leave: function (t) { + fe(e, t) || No(e); + }, + }); + var c = t.input.getField(); + he(c, "keyup", function (t) { + return hs.call(e, t); + }), + he(c, "keydown", ei(e, us)), + he(c, "keypress", ei(e, ps)), + he(c, "focus", function (t) { + return kr(e, t); + }), + he(c, "blur", function (t) { + return Rr(e, t); + }); + })(this), + Fo(), + Gr(this), + (this.curOp.forceUpdate = !0), + Mi(this, r), + (t.autofocus && !y) || this.hasFocus() + ? setTimeout(function () { + n.hasFocus() && !n.state.focused && kr(n); + }, 20) + : Rr(this), + ks)) + ks.hasOwnProperty(c) && ks[c](this, t[c], Ss); + pi(this), t.finishInit && t.finishInit(this); + for (var u = 0; u < Ds.length; ++u) Ds[u](this); + Vr(this), + l && + t.lineWrapping && + "optimizelegibility" == + getComputedStyle(o.lineDiv).textRendering && + (o.lineDiv.style.textRendering = "auto"); + } + (Ts.defaults = Es), (Ts.optionHandlers = ks); + var Ds = []; + function As(e, t, n, r) { + var i, + o = e.doc; + null == n && (n = "add"), + "smart" == n && + (o.mode.indent ? (i = dt(e, t).state) : (n = "prev")); + var s = e.options.tabSize, + a = Ge(o, t), + l = L(a.text, null, s); + a.stateAfter && (a.stateAfter = null); + var c, + u = a.text.match(/^\s*/)[0]; + if (r || /\S/.test(a.text)) { + if ( + "smart" == n && + ((c = o.mode.indent(i, a.text.slice(u.length), a.text)) == W || + c > 150) + ) { + if (!r) return; + n = "prev"; + } + } else (c = 0), (n = "not"); + "prev" == n + ? (c = t > o.first ? L(Ge(o, t - 1).text, null, s) : 0) + : "add" == n + ? (c = l + e.options.indentUnit) + : "subtract" == n + ? (c = l - e.options.indentUnit) + : "number" == typeof n && (c = l + n), + (c = Math.max(0, c)); + var h = "", + p = 0; + if (e.options.indentWithTabs) + for (var d = Math.floor(c / s); d; --d) (p += s), (h += "\t"); + if ((p < c && (h += V(c - p)), h != u)) + return ( + fo(o, h, et(t, 0), et(t, u.length), "+input"), + (a.stateAfter = null), + !0 + ); + for (var m = 0; m < o.sel.ranges.length; m++) { + var f = o.sel.ranges[m]; + if (f.head.line == t && f.head.ch < u.length) { + var g = et(t, u.length); + Xi(o, m, new Ei(g, g)); + break; + } + } + } + Ts.defineInitHook = function (e) { + return Ds.push(e); + }; + var _s = null; + function Ps(e) { + _s = e; + } + function Is(e, t, n, r, i) { + var o = e.doc; + (e.display.shift = !1), r || (r = o.sel); + var s = +new Date() - 200, + a = "paste" == i || e.state.pasteIncoming > s, + l = Pe(t), + c = null; + if (a && r.ranges.length > 1) + if (_s && _s.text.join("\n") == t) { + if (r.ranges.length % _s.text.length == 0) { + c = []; + for (var u = 0; u < _s.text.length; u++) + c.push(o.splitLines(_s.text[u])); + } + } else + l.length == r.ranges.length && + e.options.pasteLinesPerSelection && + (c = Y(l, function (e) { + return [e]; + })); + for ( + var h = e.curOp.updateInput, p = r.ranges.length - 1; + p >= 0; + p-- + ) { + var d = r.ranges[p], + m = d.from(), + f = d.to(); + d.empty() && + (n && n > 0 + ? (m = et(m.line, m.ch - n)) + : e.state.overwrite && !a + ? (f = et( + f.line, + Math.min(Ge(o, f.line).text.length, f.ch + K(l).length) + )) + : a && + _s && + _s.lineWise && + _s.text.join("\n") == l.join("\n") && + (m = f = et(m.line, 0))); + var g = { + from: m, + to: f, + text: c ? c[p % c.length] : l, + origin: + i || + (a ? "paste" : e.state.cutIncoming > s ? "cut" : "+input"), + }; + co(e.doc, g), ln(e, "inputRead", e, g); + } + t && !a && Ns(e, t), + Pr(e), + e.curOp.updateInput < 2 && (e.curOp.updateInput = h), + (e.curOp.typing = !0), + (e.state.pasteIncoming = e.state.cutIncoming = -1); + } + function Os(e, t) { + var n = e.clipboardData && e.clipboardData.getData("Text"); + if (n) + return ( + e.preventDefault(), + t.isReadOnly() || + t.options.disableInput || + Jr(t, function () { + return Is(t, n, 0, null, "paste"); + }), + !0 + ); + } + function Ns(e, t) { + if (e.options.electricChars && e.options.smartIndent) + for (var n = e.doc.sel, r = n.ranges.length - 1; r >= 0; r--) { + var i = n.ranges[r]; + if ( + !( + i.head.ch > 100 || + (r && n.ranges[r - 1].head.line == i.head.line) + ) + ) { + var o = e.getModeAt(i.head), + s = !1; + if (o.electricChars) { + for (var a = 0; a < o.electricChars.length; a++) + if (t.indexOf(o.electricChars.charAt(a)) > -1) { + s = As(e, i.head.line, "smart"); + break; + } + } else + o.electricInput && + o.electricInput.test( + Ge(e.doc, i.head.line).text.slice(0, i.head.ch) + ) && + (s = As(e, i.head.line, "smart")); + s && ln(e, "electricInput", e, i.head.line); + } + } + } + function Ms(e) { + for (var t = [], n = [], r = 0; r < e.doc.sel.ranges.length; r++) { + var i = e.doc.sel.ranges[r].head.line, + o = { anchor: et(i, 0), head: et(i + 1, 0) }; + n.push(o), t.push(e.getRange(o.anchor, o.head)); + } + return { text: t, ranges: n }; + } + function Bs(e, t, n, r) { + e.setAttribute("autocorrect", n ? "" : "off"), + e.setAttribute("autocapitalize", r ? "" : "off"), + e.setAttribute("spellcheck", !!t); + } + function Fs() { + var e = A( + "textarea", + null, + null, + "position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none" + ), + t = A( + "div", + [e], + null, + "overflow: hidden; position: relative; width: 3px; height: 0px;" + ); + return ( + l ? (e.style.width = "1000px") : e.setAttribute("wrap", "off"), + f && (e.style.border = "1px solid black"), + Bs(e), + t + ); + } + function Ls(e, t, n, r, i) { + var o = t, + s = n, + a = Ge(e, t.line), + l = i && "rtl" == e.direction ? -n : n; + function c(o) { + var s, c; + if ("codepoint" == r) { + var u = a.text.charCodeAt(t.ch + (n > 0 ? 0 : -1)); + if (isNaN(u)) s = null; + else { + var h = + n > 0 ? u >= 55296 && u < 56320 : u >= 56320 && u < 57343; + s = new et( + t.line, + Math.max( + 0, + Math.min(a.text.length, t.ch + n * (h ? 2 : 1)) + ), + -n + ); + } + } else + s = i + ? (function (e, t, n, r) { + var i = ce(t, e.doc.direction); + if (!i) return Jo(t, n, r); + n.ch >= t.text.length + ? ((n.ch = t.text.length), (n.sticky = "before")) + : n.ch <= 0 && ((n.ch = 0), (n.sticky = "after")); + var o = ae(i, n.ch, n.sticky), + s = i[o]; + if ( + "ltr" == e.doc.direction && + s.level % 2 == 0 && + (r > 0 ? s.to > n.ch : s.from < n.ch) + ) + return Jo(t, n, r); + var a, + l = function (e, n) { + return Qo(t, e instanceof et ? e.ch : e, n); + }, + c = function (n) { + return e.options.lineWrapping + ? ((a = a || In(e, t)), Qn(e, t, a, n)) + : { begin: 0, end: t.text.length }; + }, + u = c("before" == n.sticky ? l(n, -1) : n.ch); + if ("rtl" == e.doc.direction || 1 == s.level) { + var h = (1 == s.level) == r < 0, + p = l(n, h ? 1 : -1); + if ( + null != p && + (h + ? p <= s.to && p <= u.end + : p >= s.from && p >= u.begin) + ) { + var d = h ? "before" : "after"; + return new et(n.line, p, d); + } + } + var m = function (e, t, r) { + for ( + var o = function (e, t) { + return t + ? new et(n.line, l(e, 1), "before") + : new et(n.line, e, "after"); + }; + e >= 0 && e < i.length; + e += t + ) { + var s = i[e], + a = t > 0 == (1 != s.level), + c = a ? r.begin : l(r.end, -1); + if (s.from <= c && c < s.to) return o(c, a); + if ( + ((c = a ? s.from : l(s.to, -1)), + r.begin <= c && c < r.end) + ) + return o(c, a); + } + }, + f = m(o + r, r, u); + if (f) return f; + var g = r > 0 ? u.end : l(u.begin, -1); + return null == g || + (r > 0 && g == t.text.length) || + !(f = m(r > 0 ? 0 : i.length - 1, r, c(g))) + ? null + : f; + })(e.cm, a, t, n) + : Jo(a, t, n); + if (null == s) { + if ( + o || + (c = t.line + l) < e.first || + c >= e.first + e.size || + ((t = new et(c, t.ch, t.sticky)), !(a = Ge(e, c))) + ) + return !1; + t = es(i, e.cm, a, t.line, l); + } else t = s; + return !0; + } + if ("char" == r || "codepoint" == r) c(); + else if ("column" == r) c(!0); + else if ("word" == r || "group" == r) + for ( + var u = null, + h = "group" == r, + p = e.cm && e.cm.getHelper(t, "wordChars"), + d = !0; + !(n < 0) || c(!d); + d = !1 + ) { + var m = a.text.charAt(t.ch) || "\n", + f = ee(m, p) + ? "w" + : h && "\n" == m + ? "n" + : !h || /\s/.test(m) + ? null + : "p"; + if ((!h || d || f || (f = "s"), u && u != f)) { + n < 0 && ((n = 1), c(), (t.sticky = "after")); + break; + } + if ((f && (u = f), n > 0 && !c(!d))) break; + } + var g = oo(e, t, o, s, !0); + return nt(o, g) && (g.hitSide = !0), g; + } + function Hs(e, t, n, r) { + var i, + o, + s = e.doc, + a = t.left; + if ("page" == r) { + var l = Math.min( + e.display.wrapper.clientHeight, + window.innerHeight || document.documentElement.clientHeight + ), + c = Math.max(l - 0.5 * rr(e.display), 3); + i = (n > 0 ? t.bottom : t.top) + n * c; + } else "line" == r && (i = n > 0 ? t.bottom + 3 : t.top - 3); + for (; (o = Xn(e, a, i)).outside; ) { + if (n < 0 ? i <= 0 : i >= s.height) { + o.hitSide = !0; + break; + } + i += 5 * n; + } + return o; + } + var Us = function (e) { + (this.cm = e), + (this.lastAnchorNode = + this.lastAnchorOffset = + this.lastFocusNode = + this.lastFocusOffset = + null), + (this.polling = new H()), + (this.composing = null), + (this.gracePeriod = !1), + (this.readDOMTimeout = null); + }; + function Ws(e, t) { + var n = Pn(e, t.line); + if (!n || n.hidden) return null; + var r = Ge(e.doc, t.line), + i = An(n, r, t.line), + o = ce(r, e.doc.direction), + s = "left"; + o && (s = ae(o, t.ch) % 2 ? "right" : "left"); + var a = Bn(i.map, t.ch, s); + return (a.offset = "right" == a.collapse ? a.end : a.start), a; + } + function $s(e, t) { + return t && (e.bad = !0), e; + } + function zs(e, t, n) { + var r; + if (t == e.display.lineDiv) { + if (!(r = e.display.lineDiv.childNodes[n])) + return $s(e.clipPos(et(e.display.viewTo - 1)), !0); + (t = null), (n = 0); + } else + for (r = t; ; r = r.parentNode) { + if (!r || r == e.display.lineDiv) return null; + if (r.parentNode && r.parentNode == e.display.lineDiv) break; + } + for (var i = 0; i < e.display.view.length; i++) { + var o = e.display.view[i]; + if (o.node == r) return qs(o, t, n); + } + } + function qs(e, t, n) { + var r = e.text.firstChild, + i = !1; + if (!t || !P(r, t)) return $s(et(Xe(e.line), 0), !0); + if (t == r && ((i = !0), (t = r.childNodes[n]), (n = 0), !t)) { + var o = e.rest ? K(e.rest) : e.line; + return $s(et(Xe(o), o.text.length), i); + } + var s = 3 == t.nodeType ? t : null, + a = t; + for ( + s || + 1 != t.childNodes.length || + 3 != t.firstChild.nodeType || + ((s = t.firstChild), n && (n = s.nodeValue.length)); + a.parentNode != r; + + ) + a = a.parentNode; + var l = e.measure, + c = l.maps; + function u(t, n, r) { + for (var i = -1; i < (c ? c.length : 0); i++) + for ( + var o = i < 0 ? l.map : c[i], s = 0; + s < o.length; + s += 3 + ) { + var a = o[s + 2]; + if (a == t || a == n) { + var u = Xe(i < 0 ? e.line : e.rest[i]), + h = o[s] + r; + return ( + (r < 0 || a != t) && (h = o[s + (r ? 1 : 0)]), et(u, h) + ); + } + } + } + var h = u(s, a, n); + if (h) return $s(h, i); + for ( + var p = a.nextSibling, d = s ? s.nodeValue.length - n : 0; + p; + p = p.nextSibling + ) { + if ((h = u(p, p.firstChild, 0))) + return $s(et(h.line, h.ch - d), i); + d += p.textContent.length; + } + for (var m = a.previousSibling, f = n; m; m = m.previousSibling) { + if ((h = u(m, m.firstChild, -1))) + return $s(et(h.line, h.ch + f), i); + f += m.textContent.length; + } + } + (Us.prototype.init = function (e) { + var t = this, + n = this, + r = n.cm, + i = (n.div = e.lineDiv); + function o(e) { + for (var t = e.target; t; t = t.parentNode) { + if (t == i) return !0; + if (/\bCodeMirror-(?:line)?widget\b/.test(t.className)) break; + } + return !1; + } + function s(e) { + if (o(e) && !fe(r, e)) { + if (r.somethingSelected()) + Ps({ lineWise: !1, text: r.getSelections() }), + "cut" == e.type && r.replaceSelection("", null, "cut"); + else { + if (!r.options.lineWiseCopyCut) return; + var t = Ms(r); + Ps({ lineWise: !0, text: t.text }), + "cut" == e.type && + r.operation(function () { + r.setSelections(t.ranges, 0, $), + r.replaceSelection("", null, "cut"); + }); + } + if (e.clipboardData) { + e.clipboardData.clearData(); + var s = _s.text.join("\n"); + if ( + (e.clipboardData.setData("Text", s), + e.clipboardData.getData("Text") == s) + ) + return void e.preventDefault(); + } + var a = Fs(), + l = a.firstChild; + r.display.lineSpace.insertBefore( + a, + r.display.lineSpace.firstChild + ), + (l.value = _s.text.join("\n")); + var c = document.activeElement; + M(l), + setTimeout(function () { + r.display.lineSpace.removeChild(a), + c.focus(), + c == i && n.showPrimarySelection(); + }, 50); + } + } + (i.contentEditable = !0), + Bs( + i, + r.options.spellcheck, + r.options.autocorrect, + r.options.autocapitalize + ), + he(i, "paste", function (e) { + !o(e) || + fe(r, e) || + Os(e, r) || + (a <= 11 && + setTimeout( + ei(r, function () { + return t.updateFromDOM(); + }), + 20 + )); + }), + he(i, "compositionstart", function (e) { + t.composing = { data: e.data, done: !1 }; + }), + he(i, "compositionupdate", function (e) { + t.composing || (t.composing = { data: e.data, done: !1 }); + }), + he(i, "compositionend", function (e) { + t.composing && + (e.data != t.composing.data && t.readFromDOMSoon(), + (t.composing.done = !0)); + }), + he(i, "touchstart", function () { + return n.forceCompositionEnd(); + }), + he(i, "input", function () { + t.composing || t.readFromDOMSoon(); + }), + he(i, "copy", s), + he(i, "cut", s); + }), + (Us.prototype.screenReaderLabelChanged = function (e) { + e + ? this.div.setAttribute("aria-label", e) + : this.div.removeAttribute("aria-label"); + }), + (Us.prototype.prepareSelection = function () { + var e = yr(this.cm, !1); + return (e.focus = document.activeElement == this.div), e; + }), + (Us.prototype.showSelection = function (e, t) { + e && + this.cm.display.view.length && + ((e.focus || t) && this.showPrimarySelection(), + this.showMultipleSelections(e)); + }), + (Us.prototype.getSelection = function () { + return this.cm.display.wrapper.ownerDocument.getSelection(); + }), + (Us.prototype.showPrimarySelection = function () { + var e = this.getSelection(), + t = this.cm, + r = t.doc.sel.primary(), + i = r.from(), + o = r.to(); + if ( + t.display.viewTo == t.display.viewFrom || + i.line >= t.display.viewTo || + o.line < t.display.viewFrom + ) + e.removeAllRanges(); + else { + var s = zs(t, e.anchorNode, e.anchorOffset), + a = zs(t, e.focusNode, e.focusOffset); + if ( + !s || + s.bad || + !a || + a.bad || + 0 != tt(ot(s, a), i) || + 0 != tt(it(s, a), o) + ) { + var l = t.display.view, + c = (i.line >= t.display.viewFrom && Ws(t, i)) || { + node: l[0].measure.map[2], + offset: 0, + }, + u = o.line < t.display.viewTo && Ws(t, o); + if (!u) { + var h = l[l.length - 1].measure, + p = h.maps ? h.maps[h.maps.length - 1] : h.map; + u = { + node: p[p.length - 1], + offset: p[p.length - 2] - p[p.length - 3], + }; + } + if (c && u) { + var d, + m = e.rangeCount && e.getRangeAt(0); + try { + d = R(c.node, c.offset, u.offset, u.node); + } catch (e) {} + d && + (!n && t.state.focused + ? (e.collapse(c.node, c.offset), + d.collapsed || (e.removeAllRanges(), e.addRange(d))) + : (e.removeAllRanges(), e.addRange(d)), + m && null == e.anchorNode + ? e.addRange(m) + : n && this.startGracePeriod()), + this.rememberSelection(); + } else e.removeAllRanges(); + } + } + }), + (Us.prototype.startGracePeriod = function () { + var e = this; + clearTimeout(this.gracePeriod), + (this.gracePeriod = setTimeout(function () { + (e.gracePeriod = !1), + e.selectionChanged() && + e.cm.operation(function () { + return (e.cm.curOp.selectionChanged = !0); + }); + }, 20)); + }), + (Us.prototype.showMultipleSelections = function (e) { + D(this.cm.display.cursorDiv, e.cursors), + D(this.cm.display.selectionDiv, e.selection); + }), + (Us.prototype.rememberSelection = function () { + var e = this.getSelection(); + (this.lastAnchorNode = e.anchorNode), + (this.lastAnchorOffset = e.anchorOffset), + (this.lastFocusNode = e.focusNode), + (this.lastFocusOffset = e.focusOffset); + }), + (Us.prototype.selectionInEditor = function () { + var e = this.getSelection(); + if (!e.rangeCount) return !1; + var t = e.getRangeAt(0).commonAncestorContainer; + return P(this.div, t); + }), + (Us.prototype.focus = function () { + "nocursor" != this.cm.options.readOnly && + ((this.selectionInEditor() && + document.activeElement == this.div) || + this.showSelection(this.prepareSelection(), !0), + this.div.focus()); + }), + (Us.prototype.blur = function () { + this.div.blur(); + }), + (Us.prototype.getField = function () { + return this.div; + }), + (Us.prototype.supportsTouch = function () { + return !0; + }), + (Us.prototype.receivedFocus = function () { + var e = this; + this.selectionInEditor() + ? this.pollSelection() + : Jr(this.cm, function () { + return (e.cm.curOp.selectionChanged = !0); + }), + this.polling.set(this.cm.options.pollInterval, function t() { + e.cm.state.focused && + (e.pollSelection(), + e.polling.set(e.cm.options.pollInterval, t)); + }); + }), + (Us.prototype.selectionChanged = function () { + var e = this.getSelection(); + return ( + e.anchorNode != this.lastAnchorNode || + e.anchorOffset != this.lastAnchorOffset || + e.focusNode != this.lastFocusNode || + e.focusOffset != this.lastFocusOffset + ); + }), + (Us.prototype.pollSelection = function () { + if ( + null == this.readDOMTimeout && + !this.gracePeriod && + this.selectionChanged() + ) { + var e = this.getSelection(), + t = this.cm; + if ( + g && + u && + this.cm.display.gutterSpecs.length && + (function (e) { + for (var t = e; t; t = t.parentNode) + if (/CodeMirror-gutter-wrapper/.test(t.className)) + return !0; + return !1; + })(e.anchorNode) + ) + return ( + this.cm.triggerOnKeyDown({ + type: "keydown", + keyCode: 8, + preventDefault: Math.abs, + }), + this.blur(), + void this.focus() + ); + if (!this.composing) { + this.rememberSelection(); + var n = zs(t, e.anchorNode, e.anchorOffset), + r = zs(t, e.focusNode, e.focusOffset); + n && + r && + Jr(t, function () { + Ji(t.doc, Ri(n, r), $), + (n.bad || r.bad) && (t.curOp.selectionChanged = !0); + }); + } + } + }), + (Us.prototype.pollContent = function () { + null != this.readDOMTimeout && + (clearTimeout(this.readDOMTimeout), + (this.readDOMTimeout = null)); + var e, + t, + n, + r = this.cm, + i = r.display, + o = r.doc.sel.primary(), + s = o.from(), + a = o.to(); + if ( + (0 == s.ch && + s.line > r.firstLine() && + (s = et(s.line - 1, Ge(r.doc, s.line - 1).length)), + a.ch == Ge(r.doc, a.line).text.length && + a.line < r.lastLine() && + (a = et(a.line + 1, 0)), + s.line < i.viewFrom || a.line > i.viewTo - 1) + ) + return !1; + s.line == i.viewFrom || 0 == (e = ur(r, s.line)) + ? ((t = Xe(i.view[0].line)), (n = i.view[0].node)) + : ((t = Xe(i.view[e].line)), + (n = i.view[e - 1].node.nextSibling)); + var l, + c, + u = ur(r, a.line); + if ( + (u == i.view.length - 1 + ? ((l = i.viewTo - 1), (c = i.lineDiv.lastChild)) + : ((l = Xe(i.view[u + 1].line) - 1), + (c = i.view[u + 1].node.previousSibling)), + !n) + ) + return !1; + for ( + var h = r.doc.splitLines( + (function (e, t, n, r, i) { + var o = "", + s = !1, + a = e.doc.lineSeparator(), + l = !1; + function c() { + s && ((o += a), l && (o += a), (s = l = !1)); + } + function u(e) { + e && (c(), (o += e)); + } + function h(t) { + if (1 == t.nodeType) { + var n = t.getAttribute("cm-text"); + if (n) return void u(n); + var o, + p = t.getAttribute("cm-marker"); + if (p) { + var d = e.findMarks( + et(r, 0), + et(i + 1, 0), + ((g = +p), + function (e) { + return e.id == g; + }) + ); + return void ( + d.length && + (o = d[0].find(0)) && + u(Ve(e.doc, o.from, o.to).join(a)) + ); + } + if ("false" == t.getAttribute("contenteditable")) + return; + var m = /^(pre|div|p|li|table|br)$/i.test(t.nodeName); + if ( + !/^br$/i.test(t.nodeName) && + 0 == t.textContent.length + ) + return; + m && c(); + for (var f = 0; f < t.childNodes.length; f++) + h(t.childNodes[f]); + /^(pre|p)$/i.test(t.nodeName) && (l = !0), + m && (s = !0); + } else + 3 == t.nodeType && + u( + t.nodeValue + .replace(/\u200b/g, "") + .replace(/\u00a0/g, " ") + ); + var g; + } + for (; h(t), t != n; ) (t = t.nextSibling), (l = !1); + return o; + })(r, n, c, t, l) + ), + p = Ve(r.doc, et(t, 0), et(l, Ge(r.doc, l).text.length)); + h.length > 1 && p.length > 1; + + ) + if (K(h) == K(p)) h.pop(), p.pop(), l--; + else { + if (h[0] != p[0]) break; + h.shift(), p.shift(), t++; + } + for ( + var d = 0, + m = 0, + f = h[0], + g = p[0], + y = Math.min(f.length, g.length); + d < y && f.charCodeAt(d) == g.charCodeAt(d); + + ) + ++d; + for ( + var b = K(h), + v = K(p), + w = Math.min( + b.length - (1 == h.length ? d : 0), + v.length - (1 == p.length ? d : 0) + ); + m < w && + b.charCodeAt(b.length - m - 1) == + v.charCodeAt(v.length - m - 1); + + ) + ++m; + if (1 == h.length && 1 == p.length && t == s.line) + for ( + ; + d && + d > s.ch && + b.charCodeAt(b.length - m - 1) == + v.charCodeAt(v.length - m - 1); + + ) + d--, m++; + (h[h.length - 1] = b + .slice(0, b.length - m) + .replace(/^\u200b+/, "")), + (h[0] = h[0].slice(d).replace(/\u200b+$/, "")); + var C = et(t, d), + S = et(l, p.length ? K(p).length - m : 0); + return h.length > 1 || h[0] || tt(C, S) + ? (fo(r.doc, h, C, S, "+input"), !0) + : void 0; + }), + (Us.prototype.ensurePolled = function () { + this.forceCompositionEnd(); + }), + (Us.prototype.reset = function () { + this.forceCompositionEnd(); + }), + (Us.prototype.forceCompositionEnd = function () { + this.composing && + (clearTimeout(this.readDOMTimeout), + (this.composing = null), + this.updateFromDOM(), + this.div.blur(), + this.div.focus()); + }), + (Us.prototype.readFromDOMSoon = function () { + var e = this; + null == this.readDOMTimeout && + (this.readDOMTimeout = setTimeout(function () { + if (((e.readDOMTimeout = null), e.composing)) { + if (!e.composing.done) return; + e.composing = null; + } + e.updateFromDOM(); + }, 80)); + }), + (Us.prototype.updateFromDOM = function () { + var e = this; + (!this.cm.isReadOnly() && this.pollContent()) || + Jr(this.cm, function () { + return hr(e.cm); + }); + }), + (Us.prototype.setUneditable = function (e) { + e.contentEditable = "false"; + }), + (Us.prototype.onKeyPress = function (e) { + 0 == e.charCode || + this.composing || + (e.preventDefault(), + this.cm.isReadOnly() || + ei(this.cm, Is)( + this.cm, + String.fromCharCode( + null == e.charCode ? e.keyCode : e.charCode + ), + 0 + )); + }), + (Us.prototype.readOnlyChanged = function (e) { + this.div.contentEditable = String("nocursor" != e); + }), + (Us.prototype.onContextMenu = function () {}), + (Us.prototype.resetPosition = function () {}), + (Us.prototype.needsContentAttribute = !0); + var js = function (e) { + (this.cm = e), + (this.prevInput = ""), + (this.pollingFast = !1), + (this.polling = new H()), + (this.hasSelection = !1), + (this.composing = null); + }; + (js.prototype.init = function (e) { + var t = this, + n = this, + r = this.cm; + this.createField(e); + var i = this.textarea; + function o(e) { + if (!fe(r, e)) { + if (r.somethingSelected()) + Ps({ lineWise: !1, text: r.getSelections() }); + else { + if (!r.options.lineWiseCopyCut) return; + var t = Ms(r); + Ps({ lineWise: !0, text: t.text }), + "cut" == e.type + ? r.setSelections(t.ranges, null, $) + : ((n.prevInput = ""), + (i.value = t.text.join("\n")), + M(i)); + } + "cut" == e.type && (r.state.cutIncoming = +new Date()); + } + } + e.wrapper.insertBefore(this.wrapper, e.wrapper.firstChild), + f && (i.style.width = "0px"), + he(i, "input", function () { + s && a >= 9 && t.hasSelection && (t.hasSelection = null), + n.poll(); + }), + he(i, "paste", function (e) { + fe(r, e) || + Os(e, r) || + ((r.state.pasteIncoming = +new Date()), n.fastPoll()); + }), + he(i, "cut", o), + he(i, "copy", o), + he(e.scroller, "paste", function (t) { + if (!Sn(e, t) && !fe(r, t)) { + if (!i.dispatchEvent) + return ( + (r.state.pasteIncoming = +new Date()), void n.focus() + ); + var o = new Event("paste"); + (o.clipboardData = t.clipboardData), i.dispatchEvent(o); + } + }), + he(e.lineSpace, "selectstart", function (t) { + Sn(e, t) || ve(t); + }), + he(i, "compositionstart", function () { + var e = r.getCursor("from"); + n.composing && n.composing.range.clear(), + (n.composing = { + start: e, + range: r.markText(e, r.getCursor("to"), { + className: "CodeMirror-composing", + }), + }); + }), + he(i, "compositionend", function () { + n.composing && + (n.poll(), n.composing.range.clear(), (n.composing = null)); + }); + }), + (js.prototype.createField = function (e) { + (this.wrapper = Fs()), (this.textarea = this.wrapper.firstChild); + }), + (js.prototype.screenReaderLabelChanged = function (e) { + e + ? this.textarea.setAttribute("aria-label", e) + : this.textarea.removeAttribute("aria-label"); + }), + (js.prototype.prepareSelection = function () { + var e = this.cm, + t = e.display, + n = e.doc, + r = yr(e); + if (e.options.moveInputWithCursor) { + var i = Vn(e, n.sel.primary().head, "div"), + o = t.wrapper.getBoundingClientRect(), + s = t.lineDiv.getBoundingClientRect(); + (r.teTop = Math.max( + 0, + Math.min(t.wrapper.clientHeight - 10, i.top + s.top - o.top) + )), + (r.teLeft = Math.max( + 0, + Math.min( + t.wrapper.clientWidth - 10, + i.left + s.left - o.left + ) + )); + } + return r; + }), + (js.prototype.showSelection = function (e) { + var t = this.cm.display; + D(t.cursorDiv, e.cursors), + D(t.selectionDiv, e.selection), + null != e.teTop && + ((this.wrapper.style.top = e.teTop + "px"), + (this.wrapper.style.left = e.teLeft + "px")); + }), + (js.prototype.reset = function (e) { + if (!this.contextMenuPending && !this.composing) { + var t = this.cm; + if (t.somethingSelected()) { + this.prevInput = ""; + var n = t.getSelection(); + (this.textarea.value = n), + t.state.focused && M(this.textarea), + s && a >= 9 && (this.hasSelection = n); + } else + e || + ((this.prevInput = this.textarea.value = ""), + s && a >= 9 && (this.hasSelection = null)); + } + }), + (js.prototype.getField = function () { + return this.textarea; + }), + (js.prototype.supportsTouch = function () { + return !1; + }), + (js.prototype.focus = function () { + if ( + "nocursor" != this.cm.options.readOnly && + (!y || I() != this.textarea) + ) + try { + this.textarea.focus(); + } catch (e) {} + }), + (js.prototype.blur = function () { + this.textarea.blur(); + }), + (js.prototype.resetPosition = function () { + this.wrapper.style.top = this.wrapper.style.left = 0; + }), + (js.prototype.receivedFocus = function () { + this.slowPoll(); + }), + (js.prototype.slowPoll = function () { + var e = this; + this.pollingFast || + this.polling.set(this.cm.options.pollInterval, function () { + e.poll(), e.cm.state.focused && e.slowPoll(); + }); + }), + (js.prototype.fastPoll = function () { + var e = !1, + t = this; + (t.pollingFast = !0), + t.polling.set(20, function n() { + t.poll() || e + ? ((t.pollingFast = !1), t.slowPoll()) + : ((e = !0), t.polling.set(60, n)); + }); + }), + (js.prototype.poll = function () { + var e = this, + t = this.cm, + n = this.textarea, + r = this.prevInput; + if ( + this.contextMenuPending || + !t.state.focused || + (Ie(n) && !r && !this.composing) || + t.isReadOnly() || + t.options.disableInput || + t.state.keySeq + ) + return !1; + var i = n.value; + if (i == r && !t.somethingSelected()) return !1; + if ( + (s && a >= 9 && this.hasSelection === i) || + (b && /[\uf700-\uf7ff]/.test(i)) + ) + return t.display.input.reset(), !1; + if (t.doc.sel == t.display.selForContextMenu) { + var o = i.charCodeAt(0); + if ((8203 != o || r || (r = "​"), 8666 == o)) + return this.reset(), this.cm.execCommand("undo"); + } + for ( + var l = 0, c = Math.min(r.length, i.length); + l < c && r.charCodeAt(l) == i.charCodeAt(l); + + ) + ++l; + return ( + Jr(t, function () { + Is( + t, + i.slice(l), + r.length - l, + null, + e.composing ? "*compose" : null + ), + i.length > 1e3 || i.indexOf("\n") > -1 + ? (n.value = e.prevInput = "") + : (e.prevInput = i), + e.composing && + (e.composing.range.clear(), + (e.composing.range = t.markText( + e.composing.start, + t.getCursor("to"), + { className: "CodeMirror-composing" } + ))); + }), + !0 + ); + }), + (js.prototype.ensurePolled = function () { + this.pollingFast && this.poll() && (this.pollingFast = !1); + }), + (js.prototype.onKeyPress = function () { + s && a >= 9 && (this.hasSelection = null), this.fastPoll(); + }), + (js.prototype.onContextMenu = function (e) { + var t = this, + n = t.cm, + r = n.display, + i = t.textarea; + t.contextMenuPending && t.contextMenuPending(); + var o = cr(n, e), + c = r.scroller.scrollTop; + if (o && !h) { + n.options.resetSelectionOnContextMenu && + -1 == n.doc.sel.contains(o) && + ei(n, Ji)(n.doc, Ri(o), $); + var u, + p = i.style.cssText, + d = t.wrapper.style.cssText, + m = t.wrapper.offsetParent.getBoundingClientRect(); + if ( + ((t.wrapper.style.cssText = "position: static"), + (i.style.cssText = + "position: absolute; width: 30px; height: 30px;\n top: " + + (e.clientY - m.top - 5) + + "px; left: " + + (e.clientX - m.left - 5) + + "px;\n z-index: 1000; background: " + + (s ? "rgba(255, 255, 255, .05)" : "transparent") + + ";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);"), + l && (u = window.scrollY), + r.input.focus(), + l && window.scrollTo(null, u), + r.input.reset(), + n.somethingSelected() || (i.value = t.prevInput = " "), + (t.contextMenuPending = y), + (r.selForContextMenu = n.doc.sel), + clearTimeout(r.detectingSelectAll), + s && a >= 9 && g(), + E) + ) { + Se(e); + var f = function () { + de(window, "mouseup", f), setTimeout(y, 20); + }; + he(window, "mouseup", f); + } else setTimeout(y, 50); + } + function g() { + if (null != i.selectionStart) { + var e = n.somethingSelected(), + o = "​" + (e ? i.value : ""); + (i.value = "⇚"), + (i.value = o), + (t.prevInput = e ? "" : "​"), + (i.selectionStart = 1), + (i.selectionEnd = o.length), + (r.selForContextMenu = n.doc.sel); + } + } + function y() { + if ( + t.contextMenuPending == y && + ((t.contextMenuPending = !1), + (t.wrapper.style.cssText = d), + (i.style.cssText = p), + s && + a < 9 && + r.scrollbars.setScrollTop((r.scroller.scrollTop = c)), + null != i.selectionStart) + ) { + (!s || (s && a < 9)) && g(); + var e = 0, + o = function () { + r.selForContextMenu == n.doc.sel && + 0 == i.selectionStart && + i.selectionEnd > 0 && + "​" == t.prevInput + ? ei(n, ao)(n) + : e++ < 10 + ? (r.detectingSelectAll = setTimeout(o, 500)) + : ((r.selForContextMenu = null), r.input.reset()); + }; + r.detectingSelectAll = setTimeout(o, 200); + } + } + }), + (js.prototype.readOnlyChanged = function (e) { + e || this.reset(), + (this.textarea.disabled = "nocursor" == e), + (this.textarea.readOnly = !!e); + }), + (js.prototype.setUneditable = function () {}), + (js.prototype.needsContentAttribute = !1), + (function (e) { + var t = e.optionHandlers; + function n(n, r, i, o) { + (e.defaults[n] = r), + i && + (t[n] = o + ? function (e, t, n) { + n != Ss && i(e, t, n); + } + : i); + } + (e.defineOption = n), + (e.Init = Ss), + n( + "value", + "", + function (e, t) { + return e.setValue(t); + }, + !0 + ), + n( + "mode", + null, + function (e, t) { + (e.doc.modeOption = t), _i(e); + }, + !0 + ), + n("indentUnit", 2, _i, !0), + n("indentWithTabs", !1), + n("smartIndent", !0), + n( + "tabSize", + 4, + function (e) { + Pi(e), Un(e), hr(e); + }, + !0 + ), + n("lineSeparator", null, function (e, t) { + if (((e.doc.lineSep = t), t)) { + var n = [], + r = e.doc.first; + e.doc.iter(function (e) { + for (var i = 0; ; ) { + var o = e.text.indexOf(t, i); + if (-1 == o) break; + (i = o + t.length), n.push(et(r, o)); + } + r++; + }); + for (var i = n.length - 1; i >= 0; i--) + fo(e.doc, t, n[i], et(n[i].line, n[i].ch + t.length)); + } + }), + n( + "specialChars", + /[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g, + function (e, t, n) { + (e.state.specialChars = new RegExp( + t.source + (t.test("\t") ? "" : "|\t"), + "g" + )), + n != Ss && e.refresh(); + } + ), + n( + "specialCharPlaceholder", + Qt, + function (e) { + return e.refresh(); + }, + !0 + ), + n("electricChars", !0), + n( + "inputStyle", + y ? "contenteditable" : "textarea", + function () { + throw new Error( + "inputStyle can not (yet) be changed in a running editor" + ); + }, + !0 + ), + n( + "spellcheck", + !1, + function (e, t) { + return (e.getInputField().spellcheck = t); + }, + !0 + ), + n( + "autocorrect", + !1, + function (e, t) { + return (e.getInputField().autocorrect = t); + }, + !0 + ), + n( + "autocapitalize", + !1, + function (e, t) { + return (e.getInputField().autocapitalize = t); + }, + !0 + ), + n("rtlMoveVisually", !w), + n("wholeLineUpdateBefore", !0), + n( + "theme", + "default", + function (e) { + Cs(e), fi(e); + }, + !0 + ), + n("keyMap", "default", function (e, t, n) { + var r = Xo(t), + i = n != Ss && Xo(n); + i && i.detach && i.detach(e, r), + r.attach && r.attach(e, i || null); + }), + n("extraKeys", null), + n("configureMouse", null), + n("lineWrapping", !1, xs, !0), + n( + "gutters", + [], + function (e, t) { + (e.display.gutterSpecs = di(t, e.options.lineNumbers)), + fi(e); + }, + !0 + ), + n( + "fixedGutter", + !0, + function (e, t) { + (e.display.gutters.style.left = t + ? sr(e.display) + "px" + : "0"), + e.refresh(); + }, + !0 + ), + n( + "coverGutterNextToScrollbar", + !1, + function (e) { + return Wr(e); + }, + !0 + ), + n( + "scrollbarStyle", + "native", + function (e) { + qr(e), + Wr(e), + e.display.scrollbars.setScrollTop(e.doc.scrollTop), + e.display.scrollbars.setScrollLeft(e.doc.scrollLeft); + }, + !0 + ), + n( + "lineNumbers", + !1, + function (e, t) { + (e.display.gutterSpecs = di(e.options.gutters, t)), fi(e); + }, + !0 + ), + n("firstLineNumber", 1, fi, !0), + n( + "lineNumberFormatter", + function (e) { + return e; + }, + fi, + !0 + ), + n("showCursorWhenSelecting", !1, gr, !0), + n("resetSelectionOnContextMenu", !0), + n("lineWiseCopyCut", !0), + n("pasteLinesPerSelection", !0), + n("selectionsMayTouch", !1), + n("readOnly", !1, function (e, t) { + "nocursor" == t && (Rr(e), e.display.input.blur()), + e.display.input.readOnlyChanged(t); + }), + n("screenReaderLabel", null, function (e, t) { + (t = "" === t ? null : t), + e.display.input.screenReaderLabelChanged(t); + }), + n( + "disableInput", + !1, + function (e, t) { + t || e.display.input.reset(); + }, + !0 + ), + n("dragDrop", !0, Rs), + n("allowDropFileTypes", null), + n("cursorBlinkRate", 530), + n("cursorScrollMargin", 0), + n("cursorHeight", 1, gr, !0), + n("singleCursorHeightPerLine", !0, gr, !0), + n("workTime", 100), + n("workDelay", 100), + n("flattenSpans", !0, Pi, !0), + n("addModeClass", !1, Pi, !0), + n("pollInterval", 100), + n("undoDepth", 200, function (e, t) { + return (e.doc.history.undoDepth = t); + }), + n("historyEventDelay", 1250), + n( + "viewportMargin", + 10, + function (e) { + return e.refresh(); + }, + !0 + ), + n("maxHighlightLength", 1e4, Pi, !0), + n("moveInputWithCursor", !0, function (e, t) { + t || e.display.input.resetPosition(); + }), + n("tabindex", null, function (e, t) { + return (e.display.input.getField().tabIndex = t || ""); + }), + n("autofocus", null), + n( + "direction", + "ltr", + function (e, t) { + return e.doc.setDirection(t); + }, + !0 + ), + n("phrases", null); + })(Ts), + (function (e) { + var t = e.optionHandlers, + n = (e.helpers = {}); + (e.prototype = { + constructor: e, + focus: function () { + window.focus(), this.display.input.focus(); + }, + setOption: function (e, n) { + var r = this.options, + i = r[e]; + (r[e] == n && "mode" != e) || + ((r[e] = n), + t.hasOwnProperty(e) && ei(this, t[e])(this, n, i), + me(this, "optionChange", this, e)); + }, + getOption: function (e) { + return this.options[e]; + }, + getDoc: function () { + return this.doc; + }, + addKeyMap: function (e, t) { + this.state.keyMaps[t ? "push" : "unshift"](Xo(e)); + }, + removeKeyMap: function (e) { + for (var t = this.state.keyMaps, n = 0; n < t.length; ++n) + if (t[n] == e || t[n].name == e) return t.splice(n, 1), !0; + }, + addOverlay: ti(function (t, n) { + var r = t.token ? t : e.getMode(this.options, t); + if (r.startState) + throw new Error("Overlays may not be stateful."); + (function (e, t, n) { + for (var r = 0, i = n(t); r < e.length && n(e[r]) <= i; ) + r++; + e.splice(r, 0, t); + })( + this.state.overlays, + { + mode: r, + modeSpec: t, + opaque: n && n.opaque, + priority: (n && n.priority) || 0, + }, + function (e) { + return e.priority; + } + ), + this.state.modeGen++, + hr(this); + }), + removeOverlay: ti(function (e) { + for (var t = this.state.overlays, n = 0; n < t.length; ++n) { + var r = t[n].modeSpec; + if (r == e || ("string" == typeof e && r.name == e)) + return ( + t.splice(n, 1), this.state.modeGen++, void hr(this) + ); + } + }), + indentLine: ti(function (e, t, n) { + "string" != typeof t && + "number" != typeof t && + (t = + null == t + ? this.options.smartIndent + ? "smart" + : "prev" + : t + ? "add" + : "subtract"), + Qe(this.doc, e) && As(this, e, t, n); + }), + indentSelection: ti(function (e) { + for ( + var t = this.doc.sel.ranges, n = -1, r = 0; + r < t.length; + r++ + ) { + var i = t[r]; + if (i.empty()) + i.head.line > n && + (As(this, i.head.line, e, !0), + (n = i.head.line), + r == this.doc.sel.primIndex && Pr(this)); + else { + var o = i.from(), + s = i.to(), + a = Math.max(n, o.line); + n = + Math.min(this.lastLine(), s.line - (s.ch ? 0 : 1)) + 1; + for (var l = a; l < n; ++l) As(this, l, e); + var c = this.doc.sel.ranges; + 0 == o.ch && + t.length == c.length && + c[r].from().ch > 0 && + Xi(this.doc, r, new Ei(o, c[r].to()), $); + } + } + }), + getTokenAt: function (e, t) { + return bt(this, e, t); + }, + getLineTokens: function (e, t) { + return bt(this, et(e), t, !0); + }, + getTokenTypeAt: function (e) { + e = at(this.doc, e); + var t, + n = pt(this, Ge(this.doc, e.line)), + r = 0, + i = (n.length - 1) / 2, + o = e.ch; + if (0 == o) t = n[2]; + else + for (;;) { + var s = (r + i) >> 1; + if ((s ? n[2 * s - 1] : 0) >= o) i = s; + else { + if (!(n[2 * s + 1] < o)) { + t = n[2 * s + 2]; + break; + } + r = s + 1; + } + } + var a = t ? t.indexOf("overlay ") : -1; + return a < 0 ? t : 0 == a ? null : t.slice(0, a - 1); + }, + getModeAt: function (t) { + var n = this.doc.mode; + return n.innerMode + ? e.innerMode(n, this.getTokenAt(t).state).mode + : n; + }, + getHelper: function (e, t) { + return this.getHelpers(e, t)[0]; + }, + getHelpers: function (e, t) { + var r = []; + if (!n.hasOwnProperty(t)) return r; + var i = n[t], + o = this.getModeAt(e); + if ("string" == typeof o[t]) i[o[t]] && r.push(i[o[t]]); + else if (o[t]) + for (var s = 0; s < o[t].length; s++) { + var a = i[o[t][s]]; + a && r.push(a); + } + else + o.helperType && i[o.helperType] + ? r.push(i[o.helperType]) + : i[o.name] && r.push(i[o.name]); + for (var l = 0; l < i._global.length; l++) { + var c = i._global[l]; + c.pred(o, this) && -1 == U(r, c.val) && r.push(c.val); + } + return r; + }, + getStateAfter: function (e, t) { + var n = this.doc; + return dt( + this, + (e = st(n, null == e ? n.first + n.size - 1 : e)) + 1, + t + ).state; + }, + cursorCoords: function (e, t) { + var n = this.doc.sel.primary(); + return Vn( + this, + null == e + ? n.head + : "object" == typeof e + ? at(this.doc, e) + : e + ? n.from() + : n.to(), + t || "page" + ); + }, + charCoords: function (e, t) { + return Gn(this, at(this.doc, e), t || "page"); + }, + coordsChar: function (e, t) { + return Xn(this, (e = jn(this, e, t || "page")).left, e.top); + }, + lineAtHeight: function (e, t) { + return ( + (e = jn(this, { top: e, left: 0 }, t || "page").top), + Ze(this.doc, e + this.display.viewOffset) + ); + }, + heightAtLine: function (e, t, n) { + var r, + i = !1; + if ("number" == typeof e) { + var o = this.doc.first + this.doc.size - 1; + e < this.doc.first + ? (e = this.doc.first) + : e > o && ((e = o), (i = !0)), + (r = Ge(this.doc, e)); + } else r = e; + return ( + qn(this, r, { top: 0, left: 0 }, t || "page", n || i).top + + (i ? this.doc.height - zt(r) : 0) + ); + }, + defaultTextHeight: function () { + return rr(this.display); + }, + defaultCharWidth: function () { + return ir(this.display); + }, + getViewport: function () { + return { + from: this.display.viewFrom, + to: this.display.viewTo, + }; + }, + addWidget: function (e, t, n, r, i) { + var o, + s, + a, + l = this.display, + c = (e = Vn(this, at(this.doc, e))).bottom, + u = e.left; + if ( + ((t.style.position = "absolute"), + t.setAttribute("cm-ignore-events", "true"), + this.display.input.setUneditable(t), + l.sizer.appendChild(t), + "over" == r) + ) + c = e.top; + else if ("above" == r || "near" == r) { + var h = Math.max(l.wrapper.clientHeight, this.doc.height), + p = Math.max( + l.sizer.clientWidth, + l.lineSpace.clientWidth + ); + ("above" == r || e.bottom + t.offsetHeight > h) && + e.top > t.offsetHeight + ? (c = e.top - t.offsetHeight) + : e.bottom + t.offsetHeight <= h && (c = e.bottom), + u + t.offsetWidth > p && (u = p - t.offsetWidth); + } + (t.style.top = c + "px"), + (t.style.left = t.style.right = ""), + "right" == i + ? ((u = l.sizer.clientWidth - t.offsetWidth), + (t.style.right = "0px")) + : ("left" == i + ? (u = 0) + : "middle" == i && + (u = (l.sizer.clientWidth - t.offsetWidth) / 2), + (t.style.left = u + "px")), + n && + ((o = this), + (s = { + left: u, + top: c, + right: u + t.offsetWidth, + bottom: c + t.offsetHeight, + }), + null != (a = Ar(o, s)).scrollTop && Mr(o, a.scrollTop), + null != a.scrollLeft && Fr(o, a.scrollLeft)); + }, + triggerOnKeyDown: ti(us), + triggerOnKeyPress: ti(ps), + triggerOnKeyUp: hs, + triggerOnMouseDown: ti(gs), + execCommand: function (e) { + if (ts.hasOwnProperty(e)) return ts[e].call(null, this); + }, + triggerElectric: ti(function (e) { + Ns(this, e); + }), + findPosH: function (e, t, n, r) { + var i = 1; + t < 0 && ((i = -1), (t = -t)); + for ( + var o = at(this.doc, e), s = 0; + s < t && !(o = Ls(this.doc, o, i, n, r)).hitSide; + ++s + ); + return o; + }, + moveH: ti(function (e, t) { + var n = this; + this.extendSelectionsBy(function (r) { + return n.display.shift || n.doc.extend || r.empty() + ? Ls(n.doc, r.head, e, t, n.options.rtlMoveVisually) + : e < 0 + ? r.from() + : r.to(); + }, q); + }), + deleteH: ti(function (e, t) { + var n = this.doc.sel, + r = this.doc; + n.somethingSelected() + ? r.replaceSelection("", null, "+delete") + : Zo(this, function (n) { + var i = Ls(r, n.head, e, t, !1); + return e < 0 + ? { from: i, to: n.head } + : { from: n.head, to: i }; + }); + }), + findPosV: function (e, t, n, r) { + var i = 1, + o = r; + t < 0 && ((i = -1), (t = -t)); + for (var s = at(this.doc, e), a = 0; a < t; ++a) { + var l = Vn(this, s, "div"); + if ( + (null == o ? (o = l.left) : (l.left = o), + (s = Hs(this, l, i, n)).hitSide) + ) + break; + } + return s; + }, + moveV: ti(function (e, t) { + var n = this, + r = this.doc, + i = [], + o = + !this.display.shift && + !r.extend && + r.sel.somethingSelected(); + if ( + (r.extendSelectionsBy(function (s) { + if (o) return e < 0 ? s.from() : s.to(); + var a = Vn(n, s.head, "div"); + null != s.goalColumn && (a.left = s.goalColumn), + i.push(a.left); + var l = Hs(n, a, e, t); + return ( + "page" == t && + s == r.sel.primary() && + _r(n, Gn(n, l, "div").top - a.top), + l + ); + }, q), + i.length) + ) + for (var s = 0; s < r.sel.ranges.length; s++) + r.sel.ranges[s].goalColumn = i[s]; + }), + findWordAt: function (e) { + var t = Ge(this.doc, e.line).text, + n = e.ch, + r = e.ch; + if (t) { + var i = this.getHelper(e, "wordChars"); + ("before" != e.sticky && r != t.length) || !n ? ++r : --n; + for ( + var o = t.charAt(n), + s = ee(o, i) + ? function (e) { + return ee(e, i); + } + : /\s/.test(o) + ? function (e) { + return /\s/.test(e); + } + : function (e) { + return !/\s/.test(e) && !ee(e); + }; + n > 0 && s(t.charAt(n - 1)); + + ) + --n; + for (; r < t.length && s(t.charAt(r)); ) ++r; + } + return new Ei(et(e.line, n), et(e.line, r)); + }, + toggleOverwrite: function (e) { + (null != e && e == this.state.overwrite) || + ((this.state.overwrite = !this.state.overwrite) + ? O(this.display.cursorDiv, "CodeMirror-overwrite") + : x(this.display.cursorDiv, "CodeMirror-overwrite"), + me(this, "overwriteToggle", this, this.state.overwrite)); + }, + hasFocus: function () { + return this.display.input.getField() == I(); + }, + isReadOnly: function () { + return !(!this.options.readOnly && !this.doc.cantEdit); + }, + scrollTo: ti(function (e, t) { + Ir(this, e, t); + }), + getScrollInfo: function () { + var e = this.display.scroller; + return { + left: e.scrollLeft, + top: e.scrollTop, + height: e.scrollHeight - xn(this) - this.display.barHeight, + width: e.scrollWidth - xn(this) - this.display.barWidth, + clientHeight: Dn(this), + clientWidth: Tn(this), + }; + }, + scrollIntoView: ti(function (e, t) { + null == e + ? ((e = { from: this.doc.sel.primary().head, to: null }), + null == t && (t = this.options.cursorScrollMargin)) + : "number" == typeof e + ? (e = { from: et(e, 0), to: null }) + : null == e.from && (e = { from: e, to: null }), + e.to || (e.to = e.from), + (e.margin = t || 0), + null != e.from.line + ? (function (e, t) { + Or(e), (e.curOp.scrollToPos = t); + })(this, e) + : Nr(this, e.from, e.to, e.margin); + }), + setSize: ti(function (e, t) { + var n = this, + r = function (e) { + return "number" == typeof e || /^\d+$/.test(String(e)) + ? e + "px" + : e; + }; + null != e && (this.display.wrapper.style.width = r(e)), + null != t && (this.display.wrapper.style.height = r(t)), + this.options.lineWrapping && Hn(this); + var i = this.display.viewFrom; + this.doc.iter(i, this.display.viewTo, function (e) { + if (e.widgets) + for (var t = 0; t < e.widgets.length; t++) + if (e.widgets[t].noHScroll) { + pr(n, i, "widget"); + break; + } + ++i; + }), + (this.curOp.forceUpdate = !0), + me(this, "refresh", this); + }), + operation: function (e) { + return Jr(this, e); + }, + startOperation: function () { + return Gr(this); + }, + endOperation: function () { + return Vr(this); + }, + refresh: ti(function () { + var e = this.display.cachedTextHeight; + hr(this), + (this.curOp.forceUpdate = !0), + Un(this), + Ir(this, this.doc.scrollLeft, this.doc.scrollTop), + ci(this.display), + (null == e || + Math.abs(e - rr(this.display)) > 0.5 || + this.options.lineWrapping) && + lr(this), + me(this, "refresh", this); + }), + swapDoc: ti(function (e) { + var t = this.doc; + return ( + (t.cm = null), + this.state.selectingText && this.state.selectingText(), + Mi(this, e), + Un(this), + this.display.input.reset(), + Ir(this, e.scrollLeft, e.scrollTop), + (this.curOp.forceScroll = !0), + ln(this, "swapDoc", this, t), + t + ); + }), + phrase: function (e) { + var t = this.options.phrases; + return t && Object.prototype.hasOwnProperty.call(t, e) + ? t[e] + : e; + }, + getInputField: function () { + return this.display.input.getField(); + }, + getWrapperElement: function () { + return this.display.wrapper; + }, + getScrollerElement: function () { + return this.display.scroller; + }, + getGutterElement: function () { + return this.display.gutters; + }, + }), + be(e), + (e.registerHelper = function (t, r, i) { + n.hasOwnProperty(t) || (n[t] = e[t] = { _global: [] }), + (n[t][r] = i); + }), + (e.registerGlobalHelper = function (t, r, i, o) { + e.registerHelper(t, r, o), + n[t]._global.push({ pred: i, val: o }); + }); + })(Ts); + var Gs = "iter insert remove copy getEditor constructor".split(" "); + for (var Vs in Po.prototype) + Po.prototype.hasOwnProperty(Vs) && + U(Gs, Vs) < 0 && + (Ts.prototype[Vs] = (function (e) { + return function () { + return e.apply(this.doc, arguments); + }; + })(Po.prototype[Vs])); + return ( + be(Po), + (Ts.inputStyles = { textarea: js, contenteditable: Us }), + (Ts.defineMode = function (e) { + Ts.defaults.mode || "null" == e || (Ts.defaults.mode = e), + Fe.apply(this, arguments); + }), + (Ts.defineMIME = function (e, t) { + Be[e] = t; + }), + Ts.defineMode("null", function () { + return { + token: function (e) { + return e.skipToEnd(); + }, + }; + }), + Ts.defineMIME("text/plain", "null"), + (Ts.defineExtension = function (e, t) { + Ts.prototype[e] = t; + }), + (Ts.defineDocExtension = function (e, t) { + Po.prototype[e] = t; + }), + (Ts.fromTextArea = function (e, t) { + if ( + (((t = t ? F(t) : {}).value = e.value), + !t.tabindex && e.tabIndex && (t.tabindex = e.tabIndex), + !t.placeholder && + e.placeholder && + (t.placeholder = e.placeholder), + null == t.autofocus) + ) { + var n = I(); + t.autofocus = + n == e || + (null != e.getAttribute("autofocus") && n == document.body); + } + function r() { + e.value = a.getValue(); + } + var i; + if ( + e.form && + (he(e.form, "submit", r), !t.leaveSubmitMethodAlone) + ) { + var o = e.form; + i = o.submit; + try { + var s = (o.submit = function () { + r(), (o.submit = i), o.submit(), (o.submit = s); + }); + } catch (e) {} + } + (t.finishInit = function (n) { + (n.save = r), + (n.getTextArea = function () { + return e; + }), + (n.toTextArea = function () { + (n.toTextArea = isNaN), + r(), + e.parentNode.removeChild(n.getWrapperElement()), + (e.style.display = ""), + e.form && + (de(e.form, "submit", r), + t.leaveSubmitMethodAlone || + "function" != typeof e.form.submit || + (e.form.submit = i)); + }); + }), + (e.style.display = "none"); + var a = Ts(function (t) { + return e.parentNode.insertBefore(t, e.nextSibling); + }, t); + return a; + }), + (function (e) { + (e.off = de), + (e.on = he), + (e.wheelEventPixels = wi), + (e.Doc = Po), + (e.splitLines = Pe), + (e.countColumn = L), + (e.findColumn = j), + (e.isWordChar = J), + (e.Pass = W), + (e.signal = me), + (e.Line = Gt), + (e.changeEnd = xi), + (e.scrollbarModel = zr), + (e.Pos = et), + (e.cmpPos = tt), + (e.modes = Me), + (e.mimeModes = Be), + (e.resolveMode = Le), + (e.getMode = He), + (e.modeExtensions = Ue), + (e.extendMode = We), + (e.copyState = $e), + (e.startState = qe), + (e.innerMode = ze), + (e.commands = ts), + (e.keyMap = zo), + (e.keyName = Yo), + (e.isModifierKey = Vo), + (e.lookupKey = Go), + (e.normalizeKeyMap = jo), + (e.StringStream = je), + (e.SharedTextMarker = To), + (e.TextMarker = Ro), + (e.LineWidget = So), + (e.e_preventDefault = ve), + (e.e_stopPropagation = we), + (e.e_stop = Se), + (e.addClass = O), + (e.contains = P), + (e.rmClass = x), + (e.keyNames = Ho); + })(Ts), + (Ts.version = "5.60.0"), + Ts + ); + })(); + }, + 6406: (e, t, n) => { + !(function (e) { + "use strict"; + e.defineMode("javascript", function (t, n) { + var r, + i, + o = t.indentUnit, + s = n.statementIndent, + a = n.jsonld, + l = n.json || a, + c = n.typescript, + u = n.wordCharacters || /[\w$\xa1-\uffff]/, + h = (function () { + function e(e) { + return { type: e, style: "keyword" }; + } + var t = e("keyword a"), + n = e("keyword b"), + r = e("keyword c"), + i = e("keyword d"), + o = e("operator"), + s = { type: "atom", style: "atom" }; + return { + if: e("if"), + while: t, + with: t, + else: n, + do: n, + try: n, + finally: n, + return: i, + break: i, + continue: i, + new: e("new"), + delete: r, + void: r, + throw: r, + debugger: e("debugger"), + var: e("var"), + const: e("var"), + let: e("var"), + function: e("function"), + catch: e("catch"), + for: e("for"), + switch: e("switch"), + case: e("case"), + default: e("default"), + in: o, + typeof: o, + instanceof: o, + true: s, + false: s, + null: s, + undefined: s, + NaN: s, + Infinity: s, + this: e("this"), + class: e("class"), + super: e("atom"), + yield: r, + export: e("export"), + import: e("import"), + extends: r, + await: r, + }; + })(), + p = /[+\-*&%=<>!?|~^@]/, + d = + /^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/; + function m(e, t, n) { + return (r = e), (i = n), t; + } + function f(e, t) { + var n, + r = e.next(); + if ('"' == r || "'" == r) + return ( + (t.tokenize = + ((n = r), + function (e, t) { + var r, + i = !1; + if (a && "@" == e.peek() && e.match(d)) + return (t.tokenize = f), m("jsonld-keyword", "meta"); + for (; null != (r = e.next()) && (r != n || i); ) + i = !i && "\\" == r; + return i || (t.tokenize = f), m("string", "string"); + })), + t.tokenize(e, t) + ); + if ("." == r && e.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/)) + return m("number", "number"); + if ("." == r && e.match("..")) return m("spread", "meta"); + if (/[\[\]{}\(\),;\:\.]/.test(r)) return m(r); + if ("=" == r && e.eat(">")) return m("=>", "operator"); + if ("0" == r && e.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/)) + return m("number", "number"); + if (/\d/.test(r)) + return ( + e.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/), + m("number", "number") + ); + if ("/" == r) + return e.eat("*") + ? ((t.tokenize = g), g(e, t)) + : e.eat("/") + ? (e.skipToEnd(), m("comment", "comment")) + : Ye(e, t, 1) + ? ((function (e) { + for (var t, n = !1, r = !1; null != (t = e.next()); ) { + if (!n) { + if ("/" == t && !r) return; + "[" == t ? (r = !0) : r && "]" == t && (r = !1); + } + n = !n && "\\" == t; + } + })(e), + e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/), + m("regexp", "string-2")) + : (e.eat("="), m("operator", "operator", e.current())); + if ("`" == r) return (t.tokenize = y), y(e, t); + if ("#" == r && "!" == e.peek()) + return e.skipToEnd(), m("meta", "meta"); + if ("#" == r && e.eatWhile(u)) return m("variable", "property"); + if ( + ("<" == r && e.match("!--")) || + ("-" == r && + e.match("->") && + !/\S/.test(e.string.slice(0, e.start))) + ) + return e.skipToEnd(), m("comment", "comment"); + if (p.test(r)) + return ( + (">" == r && t.lexical && ">" == t.lexical.type) || + (e.eat("=") + ? ("!" != r && "=" != r) || e.eat("=") + : /[<>*+\-|&?]/.test(r) && + (e.eat(r), ">" == r && e.eat(r))), + "?" == r && e.eat(".") + ? m(".") + : m("operator", "operator", e.current()) + ); + if (u.test(r)) { + e.eatWhile(u); + var i = e.current(); + if ("." != t.lastType) { + if (h.propertyIsEnumerable(i)) { + var o = h[i]; + return m(o.type, o.style, i); + } + if ( + "async" == i && + e.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/, !1) + ) + return m("async", "keyword", i); + } + return m("variable", "variable", i); + } + } + function g(e, t) { + for (var n, r = !1; (n = e.next()); ) { + if ("/" == n && r) { + t.tokenize = f; + break; + } + r = "*" == n; + } + return m("comment", "comment"); + } + function y(e, t) { + for (var n, r = !1; null != (n = e.next()); ) { + if (!r && ("`" == n || ("$" == n && e.eat("{")))) { + t.tokenize = f; + break; + } + r = !r && "\\" == n; + } + return m("quasi", "string-2", e.current()); + } + function b(e, t) { + t.fatArrowAt && (t.fatArrowAt = null); + var n = e.string.indexOf("=>", e.start); + if (!(n < 0)) { + if (c) { + var r = /:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec( + e.string.slice(e.start, n) + ); + r && (n = r.index); + } + for (var i = 0, o = !1, s = n - 1; s >= 0; --s) { + var a = e.string.charAt(s), + l = "([{}])".indexOf(a); + if (l >= 0 && l < 3) { + if (!i) { + ++s; + break; + } + if (0 == --i) { + "(" == a && (o = !0); + break; + } + } else if (l >= 3 && l < 6) ++i; + else if (u.test(a)) o = !0; + else if (/["'\/`]/.test(a)) + for (; ; --s) { + if (0 == s) return; + if ( + e.string.charAt(s - 1) == a && + "\\" != e.string.charAt(s - 2) + ) { + s--; + break; + } + } + else if (o && !i) { + ++s; + break; + } + } + o && !i && (t.fatArrowAt = s); + } + } + var v = { + atom: !0, + number: !0, + variable: !0, + string: !0, + regexp: !0, + this: !0, + import: !0, + "jsonld-keyword": !0, + }; + function w(e, t, n, r, i, o) { + (this.indented = e), + (this.column = t), + (this.type = n), + (this.prev = i), + (this.info = o), + null != r && (this.align = r); + } + function C(e, t) { + for (var n = e.localVars; n; n = n.next) + if (n.name == t) return !0; + for (var r = e.context; r; r = r.prev) + for (n = r.vars; n; n = n.next) if (n.name == t) return !0; + } + var S = { state: null, column: null, marked: null, cc: null }; + function E() { + for (var e = arguments.length - 1; e >= 0; e--) + S.cc.push(arguments[e]); + } + function k() { + return E.apply(null, arguments), !0; + } + function R(e, t) { + for (var n = t; n; n = n.next) if (n.name == e) return !0; + return !1; + } + function x(e) { + var t = S.state; + if (((S.marked = "def"), t.context)) + if ("var" == t.lexical.info && t.context && t.context.block) { + var r = T(e, t.context); + if (null != r) return void (t.context = r); + } else if (!R(e, t.localVars)) + return void (t.localVars = new _(e, t.localVars)); + n.globalVars && + !R(e, t.globalVars) && + (t.globalVars = new _(e, t.globalVars)); + } + function T(e, t) { + if (t) { + if (t.block) { + var n = T(e, t.prev); + return n ? (n == t.prev ? t : new A(n, t.vars, !0)) : null; + } + return R(e, t.vars) ? t : new A(t.prev, new _(e, t.vars), !1); + } + return null; + } + function D(e) { + return ( + "public" == e || + "private" == e || + "protected" == e || + "abstract" == e || + "readonly" == e + ); + } + function A(e, t, n) { + (this.prev = e), (this.vars = t), (this.block = n); + } + function _(e, t) { + (this.name = e), (this.next = t); + } + var P = new _("this", new _("arguments", null)); + function I() { + (S.state.context = new A(S.state.context, S.state.localVars, !1)), + (S.state.localVars = P); + } + function O() { + (S.state.context = new A(S.state.context, S.state.localVars, !0)), + (S.state.localVars = null); + } + function N() { + (S.state.localVars = S.state.context.vars), + (S.state.context = S.state.context.prev); + } + function M(e, t) { + var n = function () { + var n = S.state, + r = n.indented; + if ("stat" == n.lexical.type) r = n.lexical.indented; + else + for ( + var i = n.lexical; + i && ")" == i.type && i.align; + i = i.prev + ) + r = i.indented; + n.lexical = new w(r, S.stream.column(), e, null, n.lexical, t); + }; + return (n.lex = !0), n; + } + function B() { + var e = S.state; + e.lexical.prev && + (")" == e.lexical.type && (e.indented = e.lexical.indented), + (e.lexical = e.lexical.prev)); + } + function F(e) { + return function t(n) { + return n == e + ? k() + : ";" == e || "}" == n || ")" == n || "]" == n + ? E() + : k(t); + }; + } + function L(e, t) { + return "var" == e + ? k(M("vardef", t), we, F(";"), B) + : "keyword a" == e + ? k(M("form"), $, L, B) + : "keyword b" == e + ? k(M("form"), L, B) + : "keyword d" == e + ? S.stream.match(/^\s*$/, !1) + ? k() + : k(M("stat"), q, F(";"), B) + : "debugger" == e + ? k(F(";")) + : "{" == e + ? k(M("}"), O, se, B, N) + : ";" == e + ? k() + : "if" == e + ? ("else" == S.state.lexical.info && + S.state.cc[S.state.cc.length - 1] == B && + S.state.cc.pop()(), + k(M("form"), $, L, B, xe)) + : "function" == e + ? k(_e) + : "for" == e + ? k(M("form"), Te, L, B) + : "class" == e || (c && "interface" == t) + ? ((S.marked = "keyword"), + k(M("form", "class" == e ? e : t), Me, B)) + : "variable" == e + ? c && "declare" == t + ? ((S.marked = "keyword"), k(L)) + : c && + ("module" == t || "enum" == t || "type" == t) && + S.stream.match(/^\s*\w/, !1) + ? ((S.marked = "keyword"), + "enum" == t + ? k(Ve) + : "type" == t + ? k(Ie, F("operator"), he, F(";")) + : k(M("form"), Ce, F("{"), M("}"), se, B, B)) + : c && "namespace" == t + ? ((S.marked = "keyword"), k(M("form"), U, L, B)) + : c && "abstract" == t + ? ((S.marked = "keyword"), k(L)) + : k(M("stat"), J) + : "switch" == e + ? k(M("form"), $, F("{"), M("}", "switch"), O, se, B, B, N) + : "case" == e + ? k(U, F(":")) + : "default" == e + ? k(F(":")) + : "catch" == e + ? k(M("form"), I, H, L, B, N) + : "export" == e + ? k(M("stat"), He, B) + : "import" == e + ? k(M("stat"), We, B) + : "async" == e + ? k(L) + : "@" == t + ? k(U, L) + : E(M("stat"), U, F(";"), B); + } + function H(e) { + if ("(" == e) return k(Oe, F(")")); + } + function U(e, t) { + return z(e, t, !1); + } + function W(e, t) { + return z(e, t, !0); + } + function $(e) { + return "(" != e ? E() : k(M(")"), q, F(")"), B); + } + function z(e, t, n) { + if (S.state.fatArrowAt == S.stream.start) { + var r = n ? X : Y; + if ("(" == e) + return k(I, M(")"), ie(Oe, ")"), B, F("=>"), r, N); + if ("variable" == e) return E(I, Ce, F("=>"), r, N); + } + var i = n ? G : j; + return v.hasOwnProperty(e) + ? k(i) + : "function" == e + ? k(_e, i) + : "class" == e || (c && "interface" == t) + ? ((S.marked = "keyword"), k(M("form"), Ne, B)) + : "keyword c" == e || "async" == e + ? k(n ? W : U) + : "(" == e + ? k(M(")"), q, F(")"), B, i) + : "operator" == e || "spread" == e + ? k(n ? W : U) + : "[" == e + ? k(M("]"), Ge, B, i) + : "{" == e + ? oe(te, "}", null, i) + : "quasi" == e + ? E(V, i) + : "new" == e + ? k( + (function (e) { + return function (t) { + return "." == t + ? k(e ? Q : Z) + : "variable" == t && c + ? k(ye, e ? G : j) + : E(e ? W : U); + }; + })(n) + ) + : k(); + } + function q(e) { + return e.match(/[;\}\)\],]/) ? E() : E(U); + } + function j(e, t) { + return "," == e ? k(q) : G(e, t, !1); + } + function G(e, t, n) { + var r = 0 == n ? j : G, + i = 0 == n ? U : W; + return "=>" == e + ? k(I, n ? X : Y, N) + : "operator" == e + ? /\+\+|--/.test(t) || (c && "!" == t) + ? k(r) + : c && + "<" == t && + S.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/, !1) + ? k(M(">"), ie(he, ">"), B, r) + : "?" == t + ? k(U, F(":"), i) + : k(i) + : "quasi" == e + ? E(V, r) + : ";" != e + ? "(" == e + ? oe(W, ")", "call", r) + : "." == e + ? k(ee, r) + : "[" == e + ? k(M("]"), q, F("]"), B, r) + : c && "as" == t + ? ((S.marked = "keyword"), k(he, r)) + : "regexp" == e + ? ((S.state.lastType = S.marked = "operator"), + S.stream.backUp(S.stream.pos - S.stream.start - 1), + k(i)) + : void 0 + : void 0; + } + function V(e, t) { + return "quasi" != e + ? E() + : "${" != t.slice(t.length - 2) + ? k(V) + : k(U, K); + } + function K(e) { + if ("}" == e) + return (S.marked = "string-2"), (S.state.tokenize = y), k(V); + } + function Y(e) { + return b(S.stream, S.state), E("{" == e ? L : U); + } + function X(e) { + return b(S.stream, S.state), E("{" == e ? L : W); + } + function Z(e, t) { + if ("target" == t) return (S.marked = "keyword"), k(j); + } + function Q(e, t) { + if ("target" == t) return (S.marked = "keyword"), k(G); + } + function J(e) { + return ":" == e ? k(B, L) : E(j, F(";"), B); + } + function ee(e) { + if ("variable" == e) return (S.marked = "property"), k(); + } + function te(e, t) { + return "async" == e + ? ((S.marked = "property"), k(te)) + : "variable" == e || "keyword" == S.style + ? ((S.marked = "property"), + "get" == t || "set" == t + ? k(ne) + : (c && + S.state.fatArrowAt == S.stream.start && + (n = S.stream.match(/^\s*:\s*/, !1)) && + (S.state.fatArrowAt = S.stream.pos + n[0].length), + k(re))) + : "number" == e || "string" == e + ? ((S.marked = a ? "property" : S.style + " property"), k(re)) + : "jsonld-keyword" == e + ? k(re) + : c && D(t) + ? ((S.marked = "keyword"), k(te)) + : "[" == e + ? k(U, ae, F("]"), re) + : "spread" == e + ? k(W, re) + : "*" == t + ? ((S.marked = "keyword"), k(te)) + : ":" == e + ? E(re) + : void 0; + var n; + } + function ne(e) { + return "variable" != e ? E(re) : ((S.marked = "property"), k(_e)); + } + function re(e) { + return ":" == e ? k(W) : "(" == e ? E(_e) : void 0; + } + function ie(e, t, n) { + function r(i, o) { + if (n ? n.indexOf(i) > -1 : "," == i) { + var s = S.state.lexical; + return ( + "call" == s.info && (s.pos = (s.pos || 0) + 1), + k(function (n, r) { + return n == t || r == t ? E() : E(e); + }, r) + ); + } + return i == t || o == t + ? k() + : n && n.indexOf(";") > -1 + ? E(e) + : k(F(t)); + } + return function (n, i) { + return n == t || i == t ? k() : E(e, r); + }; + } + function oe(e, t, n) { + for (var r = 3; r < arguments.length; r++) + S.cc.push(arguments[r]); + return k(M(t, n), ie(e, t), B); + } + function se(e) { + return "}" == e ? k() : E(L, se); + } + function ae(e, t) { + if (c) { + if (":" == e) return k(he); + if ("?" == t) return k(ae); + } + } + function le(e, t) { + if (c && (":" == e || "in" == t)) return k(he); + } + function ce(e) { + if (c && ":" == e) + return S.stream.match(/^\s*\w+\s+is\b/, !1) + ? k(U, ue, he) + : k(he); + } + function ue(e, t) { + if ("is" == t) return (S.marked = "keyword"), k(); + } + function he(e, t) { + return "keyof" == t || + "typeof" == t || + "infer" == t || + "readonly" == t + ? ((S.marked = "keyword"), k("typeof" == t ? W : he)) + : "variable" == e || "void" == t + ? ((S.marked = "type"), k(ge)) + : "|" == t || "&" == t + ? k(he) + : "string" == e || "number" == e || "atom" == e + ? k(ge) + : "[" == e + ? k(M("]"), ie(he, "]", ","), B, ge) + : "{" == e + ? k(M("}"), de, B, ge) + : "(" == e + ? k(ie(fe, ")"), pe, ge) + : "<" == e + ? k(ie(he, ">"), he) + : void 0; + } + function pe(e) { + if ("=>" == e) return k(he); + } + function de(e) { + return e.match(/[\}\)\]]/) + ? k() + : "," == e || ";" == e + ? k(de) + : E(me, de); + } + function me(e, t) { + return "variable" == e || "keyword" == S.style + ? ((S.marked = "property"), k(me)) + : "?" == t || "number" == e || "string" == e + ? k(me) + : ":" == e + ? k(he) + : "[" == e + ? k(F("variable"), le, F("]"), me) + : "(" == e + ? E(Pe, me) + : e.match(/[;\}\)\],]/) + ? void 0 + : k(); + } + function fe(e, t) { + return ("variable" == e && S.stream.match(/^\s*[?:]/, !1)) || + "?" == t + ? k(fe) + : ":" == e + ? k(he) + : "spread" == e + ? k(fe) + : E(he); + } + function ge(e, t) { + return "<" == t + ? k(M(">"), ie(he, ">"), B, ge) + : "|" == t || "." == e || "&" == t + ? k(he) + : "[" == e + ? k(he, F("]"), ge) + : "extends" == t || "implements" == t + ? ((S.marked = "keyword"), k(he)) + : "?" == t + ? k(he, F(":"), he) + : void 0; + } + function ye(e, t) { + if ("<" == t) return k(M(">"), ie(he, ">"), B, ge); + } + function be() { + return E(he, ve); + } + function ve(e, t) { + if ("=" == t) return k(he); + } + function we(e, t) { + return "enum" == t + ? ((S.marked = "keyword"), k(Ve)) + : E(Ce, ae, ke, Re); + } + function Ce(e, t) { + return c && D(t) + ? ((S.marked = "keyword"), k(Ce)) + : "variable" == e + ? (x(t), k()) + : "spread" == e + ? k(Ce) + : "[" == e + ? oe(Ee, "]") + : "{" == e + ? oe(Se, "}") + : void 0; + } + function Se(e, t) { + return "variable" != e || S.stream.match(/^\s*:/, !1) + ? ("variable" == e && (S.marked = "property"), + "spread" == e + ? k(Ce) + : "}" == e + ? E() + : "[" == e + ? k(U, F("]"), F(":"), Se) + : k(F(":"), Ce, ke)) + : (x(t), k(ke)); + } + function Ee() { + return E(Ce, ke); + } + function ke(e, t) { + if ("=" == t) return k(W); + } + function Re(e) { + if ("," == e) return k(we); + } + function xe(e, t) { + if ("keyword b" == e && "else" == t) + return k(M("form", "else"), L, B); + } + function Te(e, t) { + return "await" == t + ? k(Te) + : "(" == e + ? k(M(")"), De, B) + : void 0; + } + function De(e) { + return "var" == e ? k(we, Ae) : "variable" == e ? k(Ae) : E(Ae); + } + function Ae(e, t) { + return ")" == e + ? k() + : ";" == e + ? k(Ae) + : "in" == t || "of" == t + ? ((S.marked = "keyword"), k(U, Ae)) + : E(U, Ae); + } + function _e(e, t) { + return "*" == t + ? ((S.marked = "keyword"), k(_e)) + : "variable" == e + ? (x(t), k(_e)) + : "(" == e + ? k(I, M(")"), ie(Oe, ")"), B, ce, L, N) + : c && "<" == t + ? k(M(">"), ie(be, ">"), B, _e) + : void 0; + } + function Pe(e, t) { + return "*" == t + ? ((S.marked = "keyword"), k(Pe)) + : "variable" == e + ? (x(t), k(Pe)) + : "(" == e + ? k(I, M(")"), ie(Oe, ")"), B, ce, N) + : c && "<" == t + ? k(M(">"), ie(be, ">"), B, Pe) + : void 0; + } + function Ie(e, t) { + return "keyword" == e || "variable" == e + ? ((S.marked = "type"), k(Ie)) + : "<" == t + ? k(M(">"), ie(be, ">"), B) + : void 0; + } + function Oe(e, t) { + return ( + "@" == t && k(U, Oe), + "spread" == e + ? k(Oe) + : c && D(t) + ? ((S.marked = "keyword"), k(Oe)) + : c && "this" == e + ? k(ae, ke) + : E(Ce, ae, ke) + ); + } + function Ne(e, t) { + return "variable" == e ? Me(e, t) : Be(e, t); + } + function Me(e, t) { + if ("variable" == e) return x(t), k(Be); + } + function Be(e, t) { + return "<" == t + ? k(M(">"), ie(be, ">"), B, Be) + : "extends" == t || "implements" == t || (c && "," == e) + ? ("implements" == t && (S.marked = "keyword"), + k(c ? he : U, Be)) + : "{" == e + ? k(M("}"), Fe, B) + : void 0; + } + function Fe(e, t) { + return "async" == e || + ("variable" == e && + ("static" == t || "get" == t || "set" == t || (c && D(t))) && + S.stream.match(/^\s+[\w$\xa1-\uffff]/, !1)) + ? ((S.marked = "keyword"), k(Fe)) + : "variable" == e || "keyword" == S.style + ? ((S.marked = "property"), k(Le, Fe)) + : "number" == e || "string" == e + ? k(Le, Fe) + : "[" == e + ? k(U, ae, F("]"), Le, Fe) + : "*" == t + ? ((S.marked = "keyword"), k(Fe)) + : c && "(" == e + ? E(Pe, Fe) + : ";" == e || "," == e + ? k(Fe) + : "}" == e + ? k() + : "@" == t + ? k(U, Fe) + : void 0; + } + function Le(e, t) { + if ("?" == t) return k(Le); + if (":" == e) return k(he, ke); + if ("=" == t) return k(W); + var n = S.state.lexical.prev; + return E(n && "interface" == n.info ? Pe : _e); + } + function He(e, t) { + return "*" == t + ? ((S.marked = "keyword"), k(je, F(";"))) + : "default" == t + ? ((S.marked = "keyword"), k(U, F(";"))) + : "{" == e + ? k(ie(Ue, "}"), je, F(";")) + : E(L); + } + function Ue(e, t) { + return "as" == t + ? ((S.marked = "keyword"), k(F("variable"))) + : "variable" == e + ? E(W, Ue) + : void 0; + } + function We(e) { + return "string" == e + ? k() + : "(" == e + ? E(U) + : "." == e + ? E(j) + : E($e, ze, je); + } + function $e(e, t) { + return "{" == e + ? oe($e, "}") + : ("variable" == e && x(t), + "*" == t && (S.marked = "keyword"), + k(qe)); + } + function ze(e) { + if ("," == e) return k($e, ze); + } + function qe(e, t) { + if ("as" == t) return (S.marked = "keyword"), k($e); + } + function je(e, t) { + if ("from" == t) return (S.marked = "keyword"), k(U); + } + function Ge(e) { + return "]" == e ? k() : E(ie(W, "]")); + } + function Ve() { + return E(M("form"), Ce, F("{"), M("}"), ie(Ke, "}"), B, B); + } + function Ke() { + return E(Ce, ke); + } + function Ye(e, t, n) { + return ( + (t.tokenize == f && + /^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test( + t.lastType + )) || + ("quasi" == t.lastType && + /\{\s*$/.test(e.string.slice(0, e.pos - (n || 0)))) + ); + } + return ( + (N.lex = !0), + (B.lex = !0), + { + startState: function (e) { + var t = { + tokenize: f, + lastType: "sof", + cc: [], + lexical: new w((e || 0) - o, 0, "block", !1), + localVars: n.localVars, + context: n.localVars && new A(null, null, !1), + indented: e || 0, + }; + return ( + n.globalVars && + "object" == typeof n.globalVars && + (t.globalVars = n.globalVars), + t + ); + }, + token: function (e, t) { + if ( + (e.sol() && + (t.lexical.hasOwnProperty("align") || + (t.lexical.align = !1), + (t.indented = e.indentation()), + b(e, t)), + t.tokenize != g && e.eatSpace()) + ) + return null; + var n = t.tokenize(e, t); + return "comment" == r + ? n + : ((t.lastType = + "operator" != r || ("++" != i && "--" != i) + ? r + : "incdec"), + (function (e, t, n, r, i) { + var o = e.cc; + for ( + S.state = e, + S.stream = i, + S.marked = null, + S.cc = o, + S.style = t, + e.lexical.hasOwnProperty("align") || + (e.lexical.align = !0); + ; + + ) + if ((o.length ? o.pop() : l ? U : L)(n, r)) { + for (; o.length && o[o.length - 1].lex; ) o.pop()(); + return S.marked + ? S.marked + : "variable" == n && C(e, r) + ? "variable-2" + : t; + } + })(t, n, r, i, e)); + }, + indent: function (t, r) { + if (t.tokenize == g || t.tokenize == y) return e.Pass; + if (t.tokenize != f) return 0; + var i, + a = r && r.charAt(0), + l = t.lexical; + if (!/^\s*else\b/.test(r)) + for (var c = t.cc.length - 1; c >= 0; --c) { + var u = t.cc[c]; + if (u == B) l = l.prev; + else if (u != xe) break; + } + for ( + ; + ("stat" == l.type || "form" == l.type) && + ("}" == a || + ((i = t.cc[t.cc.length - 1]) && + (i == j || i == G) && + !/^[,\.=+\-*:?[\(]/.test(r))); + + ) + l = l.prev; + s && ")" == l.type && "stat" == l.prev.type && (l = l.prev); + var h = l.type, + d = a == h; + return "vardef" == h + ? l.indented + + ("operator" == t.lastType || "," == t.lastType + ? l.info.length + 1 + : 0) + : "form" == h && "{" == a + ? l.indented + : "form" == h + ? l.indented + o + : "stat" == h + ? l.indented + + ((function (e, t) { + return ( + "operator" == e.lastType || + "," == e.lastType || + p.test(t.charAt(0)) || + /[,.]/.test(t.charAt(0)) + ); + })(t, r) + ? s || o + : 0) + : "switch" != l.info || d || 0 == n.doubleIndentSwitch + ? l.align + ? l.column + (d ? 0 : 1) + : l.indented + (d ? 0 : o) + : l.indented + (/^(?:case|default)\b/.test(r) ? o : 2 * o); + }, + electricInput: /^\s*(?:case .*?:|default:|\{|\})$/, + blockCommentStart: l ? null : "/*", + blockCommentEnd: l ? null : "*/", + blockCommentContinue: l ? null : " * ", + lineComment: l ? null : "//", + fold: "brace", + closeBrackets: "()[]{}''\"\"``", + helperType: l ? "json" : "javascript", + jsonldMode: a, + jsonMode: l, + expressionAllowed: Ye, + skipExpression: function (e) { + var t = e.cc[e.cc.length - 1]; + (t != U && t != W) || e.cc.pop(); + }, + } + ); + }), + e.registerHelper("wordChars", "javascript", /[\w$]/), + e.defineMIME("text/javascript", "javascript"), + e.defineMIME("text/ecmascript", "javascript"), + e.defineMIME("application/javascript", "javascript"), + e.defineMIME("application/x-javascript", "javascript"), + e.defineMIME("application/ecmascript", "javascript"), + e.defineMIME("application/json", { name: "javascript", json: !0 }), + e.defineMIME("application/x-json", { + name: "javascript", + json: !0, + }), + e.defineMIME("application/manifest+json", { + name: "javascript", + json: !0, + }), + e.defineMIME("application/ld+json", { + name: "javascript", + jsonld: !0, + }), + e.defineMIME("text/typescript", { + name: "javascript", + typescript: !0, + }), + e.defineMIME("application/typescript", { + name: "javascript", + typescript: !0, + }); + })(n(4045)); + }, + 7492: function (e, t) { + var n, r; + void 0 === + (r = + "function" == + typeof (n = function () { + var e = + /^v?(?:\d+)(\.(?:[x*]|\d+)(\.(?:[x*]|\d+)(\.(?:[x*]|\d+))?(?:-[\da-z\-]+(?:\.[\da-z\-]+)*)?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i; + function t(e) { + var t, + n, + r = e.replace(/^v/, "").replace(/\+.*$/, ""), + i = + ((n = "-"), + -1 === (t = r).indexOf(n) ? t.length : t.indexOf(n)), + o = r.substring(0, i).split("."); + return o.push(r.substring(i + 1)), o; + } + function n(e) { + return isNaN(Number(e)) ? e : Number(e); + } + function r(t) { + if ("string" != typeof t) + throw new TypeError("Invalid argument expected string"); + if (!e.test(t)) + throw new Error( + "Invalid argument not valid semver ('" + t + "' received)" + ); + } + function i(e, i) { + [e, i].forEach(r); + for ( + var o = t(e), s = t(i), a = 0; + a < Math.max(o.length - 1, s.length - 1); + a++ + ) { + var l = parseInt(o[a] || 0, 10), + c = parseInt(s[a] || 0, 10); + if (l > c) return 1; + if (c > l) return -1; + } + var u = o[o.length - 1], + h = s[s.length - 1]; + if (u && h) { + var p = u.split(".").map(n), + d = h.split(".").map(n); + for (a = 0; a < Math.max(p.length, d.length); a++) { + if ( + void 0 === p[a] || + ("string" == typeof d[a] && "number" == typeof p[a]) + ) + return -1; + if ( + void 0 === d[a] || + ("string" == typeof p[a] && "number" == typeof d[a]) + ) + return 1; + if (p[a] > d[a]) return 1; + if (d[a] > p[a]) return -1; + } + } else if (u || h) return u ? -1 : 1; + return 0; + } + var o = [">", ">=", "=", "<", "<="], + s = { + ">": [1], + ">=": [0, 1], + "=": [0], + "<=": [-1, 0], + "<": [-1], + }; + return ( + (i.validate = function (t) { + return "string" == typeof t && e.test(t); + }), + (i.compare = function (e, t, n) { + !(function (e) { + if ("string" != typeof e) + throw new TypeError( + "Invalid operator type, expected string but got " + + typeof e + ); + if (-1 === o.indexOf(e)) + throw new TypeError( + "Invalid operator, expected one of " + o.join("|") + ); + })(n); + var r = i(e, t); + return s[n].indexOf(r) > -1; + }), + i + ); + }) + ? n.apply(t, []) + : n) || (e.exports = r); + }, + 1958: (e, t, n) => { + n(7138), (e.exports = n(4386).Object.assign); + }, + 5417: (e, t, n) => { + n(9036); + var r = n(4386).Object; + e.exports = function (e, t) { + return r.create(e, t); + }; + }, + 9460: (e, t, n) => { + n(6019); + var r = n(4386).Object; + e.exports = function (e, t, n) { + return r.defineProperty(e, t, n); + }; + }, + 2665: (e, t, n) => { + n(8511); + var r = n(4386).Object; + e.exports = function (e, t) { + return r.getOwnPropertyDescriptor(e, t); + }; + }, + 8013: (e, t, n) => { + n(7141), (e.exports = n(4386).Object.getPrototypeOf); + }, + 292: (e, t, n) => { + n(2360), (e.exports = n(4386).Object.keys); + }, + 6171: (e, t, n) => { + n(7025), (e.exports = n(4386).Object.setPrototypeOf); + }, + 8481: (e, t, n) => { + n(3218), n(7394), n(4616), n(5174), (e.exports = n(4386).Symbol); + }, + 5738: (e, t, n) => { + n(1586), n(5130), (e.exports = n(9232).f("iterator")); + }, + 5425: (e) => { + e.exports = function (e) { + if ("function" != typeof e) + throw TypeError(e + " is not a function!"); + return e; + }; + }, + 6137: (e) => { + e.exports = function () {}; + }, + 781: (e, t, n) => { + var r = n(1246); + e.exports = function (e) { + if (!r(e)) throw TypeError(e + " is not an object!"); + return e; + }; + }, + 8363: (e, t, n) => { + var r = n(6917), + i = n(4434), + o = n(7339); + e.exports = function (e) { + return function (t, n, s) { + var a, + l = r(t), + c = i(l.length), + u = o(s, c); + if (e && n != n) { + for (; c > u; ) if ((a = l[u++]) != a) return !0; + } else + for (; c > u; u++) + if ((e || u in l) && l[u] === n) return e || u || 0; + return !e && -1; + }; + }; + }, + 5454: (e) => { + var t = {}.toString; + e.exports = function (e) { + return t.call(e).slice(8, -1); + }; + }, + 4386: (e) => { + var t = (e.exports = { version: "2.5.1" }); + "number" == typeof __e && (__e = t); + }, + 4717: (e, t, n) => { + var r = n(5425); + e.exports = function (e, t, n) { + if ((r(e), void 0 === t)) return e; + switch (n) { + case 1: + return function (n) { + return e.call(t, n); + }; + case 2: + return function (n, r) { + return e.call(t, n, r); + }; + case 3: + return function (n, r, i) { + return e.call(t, n, r, i); + }; + } + return function () { + return e.apply(t, arguments); + }; + }; + }, + 3111: (e) => { + e.exports = function (e) { + if (null == e) throw TypeError("Can't call method on " + e); + return e; + }; + }, + 477: (e, t, n) => { + e.exports = !n(3038)(function () { + return ( + 7 != + Object.defineProperty({}, "a", { + get: function () { + return 7; + }, + }).a + ); + }); + }, + 1455: (e, t, n) => { + var r = n(1246), + i = n(3908).document, + o = r(i) && r(i.createElement); + e.exports = function (e) { + return o ? i.createElement(e) : {}; + }; + }, + 7352: (e) => { + e.exports = + "constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split( + "," + ); + }, + 3871: (e, t, n) => { + var r = n(7906), + i = n(6130), + o = n(5032); + e.exports = function (e) { + var t = r(e), + n = i.f; + if (n) + for (var s, a = n(e), l = o.f, c = 0; a.length > c; ) + l.call(e, (s = a[c++])) && t.push(s); + return t; + }; + }, + 1290: (e, t, n) => { + var r = n(3908), + i = n(4386), + o = n(4717), + s = n(1655), + a = function (e, t, n) { + var l, + c, + u, + h = e & a.F, + p = e & a.G, + d = e & a.S, + m = e & a.P, + f = e & a.B, + g = e & a.W, + y = p ? i : i[t] || (i[t] = {}), + b = y.prototype, + v = p ? r : d ? r[t] : (r[t] || {}).prototype; + for (l in (p && (n = t), n)) + ((c = !h && v && void 0 !== v[l]) && l in y) || + ((u = c ? v[l] : n[l]), + (y[l] = + p && "function" != typeof v[l] + ? n[l] + : f && c + ? o(u, r) + : g && v[l] == u + ? (function (e) { + var t = function (t, n, r) { + if (this instanceof e) { + switch (arguments.length) { + case 0: + return new e(); + case 1: + return new e(t); + case 2: + return new e(t, n); + } + return new e(t, n, r); + } + return e.apply(this, arguments); + }; + return (t.prototype = e.prototype), t; + })(u) + : m && "function" == typeof u + ? o(Function.call, u) + : u), + m && + (((y.virtual || (y.virtual = {}))[l] = u), + e & a.R && b && !b[l] && s(b, l, u))); + }; + (a.F = 1), + (a.G = 2), + (a.S = 4), + (a.P = 8), + (a.B = 16), + (a.W = 32), + (a.U = 64), + (a.R = 128), + (e.exports = a); + }, + 3038: (e) => { + e.exports = function (e) { + try { + return !!e(); + } catch (e) { + return !0; + } + }; + }, + 3908: (e) => { + var t = (e.exports = + "undefined" != typeof window && window.Math == Math + ? window + : "undefined" != typeof self && self.Math == Math + ? self + : Function("return this")()); + "number" == typeof __g && (__g = t); + }, + 1820: (e) => { + var t = {}.hasOwnProperty; + e.exports = function (e, n) { + return t.call(e, n); + }; + }, + 1655: (e, t, n) => { + var r = n(8348), + i = n(9759); + e.exports = n(477) + ? function (e, t, n) { + return r.f(e, t, i(1, n)); + } + : function (e, t, n) { + return (e[t] = n), e; + }; + }, + 5394: (e, t, n) => { + var r = n(3908).document; + e.exports = r && r.documentElement; + }, + 303: (e, t, n) => { + e.exports = + !n(477) && + !n(3038)(function () { + return ( + 7 != + Object.defineProperty(n(1455)("div"), "a", { + get: function () { + return 7; + }, + }).a + ); + }); + }, + 9201: (e, t, n) => { + var r = n(5454); + e.exports = Object("z").propertyIsEnumerable(0) + ? Object + : function (e) { + return "String" == r(e) ? e.split("") : Object(e); + }; + }, + 3542: (e, t, n) => { + var r = n(5454); + e.exports = + Array.isArray || + function (e) { + return "Array" == r(e); + }; + }, + 1246: (e) => { + e.exports = function (e) { + return "object" == typeof e ? null !== e : "function" == typeof e; + }; + }, + 5e3: (e, t, n) => { + "use strict"; + var r = n(5813), + i = n(9759), + o = n(4236), + s = {}; + n(1655)(s, n(6384)("iterator"), function () { + return this; + }), + (e.exports = function (e, t, n) { + (e.prototype = r(s, { next: i(1, n) })), o(e, t + " Iterator"); + }); + }, + 7673: (e, t, n) => { + "use strict"; + var r = n(7636), + i = n(1290), + o = n(7691), + s = n(1655), + a = n(1820), + l = n(622), + c = n(5e3), + u = n(4236), + h = n(233), + p = n(6384)("iterator"), + d = !([].keys && "next" in [].keys()), + m = "keys", + f = "values", + g = function () { + return this; + }; + e.exports = function (e, t, n, y, b, v, w) { + c(n, t, y); + var C, + S, + E, + k = function (e) { + if (!d && e in D) return D[e]; + switch (e) { + case m: + case f: + return function () { + return new n(this, e); + }; + } + return function () { + return new n(this, e); + }; + }, + R = t + " Iterator", + x = b == f, + T = !1, + D = e.prototype, + A = D[p] || D["@@iterator"] || (b && D[b]), + _ = A || k(b), + P = b ? (x ? k("entries") : _) : void 0, + I = ("Array" == t && D.entries) || A; + if ( + (I && + (E = h(I.call(new e()))) !== Object.prototype && + E.next && + (u(E, R, !0), r || a(E, p) || s(E, p, g)), + x && + A && + A.name !== f && + ((T = !0), + (_ = function () { + return A.call(this); + })), + (r && !w) || (!d && !T && D[p]) || s(D, p, _), + (l[t] = _), + (l[R] = g), + b) + ) + if ( + ((C = { values: x ? _ : k(f), keys: v ? _ : k(m), entries: P }), + w) + ) + for (S in C) S in D || o(D, S, C[S]); + else i(i.P + i.F * (d || T), t, C); + return C; + }; + }, + 8942: (e) => { + e.exports = function (e, t) { + return { value: t, done: !!e }; + }; + }, + 622: (e) => { + e.exports = {}; + }, + 7636: (e) => { + e.exports = !0; + }, + 9603: (e, t, n) => { + var r = n(1167)("meta"), + i = n(1246), + o = n(1820), + s = n(8348).f, + a = 0, + l = + Object.isExtensible || + function () { + return !0; + }, + c = !n(3038)(function () { + return l(Object.preventExtensions({})); + }), + u = function (e) { + s(e, r, { value: { i: "O" + ++a, w: {} } }); + }, + h = (e.exports = { + KEY: r, + NEED: !1, + fastKey: function (e, t) { + if (!i(e)) + return "symbol" == typeof e + ? e + : ("string" == typeof e ? "S" : "P") + e; + if (!o(e, r)) { + if (!l(e)) return "F"; + if (!t) return "E"; + u(e); + } + return e[r].i; + }, + getWeak: function (e, t) { + if (!o(e, r)) { + if (!l(e)) return !0; + if (!t) return !1; + u(e); + } + return e[r].w; + }, + onFreeze: function (e) { + return c && h.NEED && l(e) && !o(e, r) && u(e), e; + }, + }); + }, + 7606: (e, t, n) => { + "use strict"; + var r = n(7906), + i = n(6130), + o = n(5032), + s = n(9012), + a = n(9201), + l = Object.assign; + e.exports = + !l || + n(3038)(function () { + var e = {}, + t = {}, + n = Symbol(), + r = "abcdefghijklmnopqrst"; + return ( + (e[n] = 7), + r.split("").forEach(function (e) { + t[e] = e; + }), + 7 != l({}, e)[n] || Object.keys(l({}, t)).join("") != r + ); + }) + ? function (e, t) { + for ( + var n = s(e), l = arguments.length, c = 1, u = i.f, h = o.f; + l > c; + + ) + for ( + var p, + d = a(arguments[c++]), + m = u ? r(d).concat(u(d)) : r(d), + f = m.length, + g = 0; + f > g; + + ) + h.call(d, (p = m[g++])) && (n[p] = d[p]); + return n; + } + : l; + }, + 5813: (e, t, n) => { + var r = n(781), + i = n(9475), + o = n(7352), + s = n(3889)("IE_PROTO"), + a = function () {}, + l = function () { + var e, + t = n(1455)("iframe"), + r = o.length; + for ( + t.style.display = "none", + n(5394).appendChild(t), + t.src = "javascript:", + (e = t.contentWindow.document).open(), + e.write(""), + e.close(), + l = e.F; + r--; + + ) + delete l.prototype[o[r]]; + return l(); + }; + e.exports = + Object.create || + function (e, t) { + var n; + return ( + null !== e + ? ((a.prototype = r(e)), + (n = new a()), + (a.prototype = null), + (n[s] = e)) + : (n = l()), + void 0 === t ? n : i(n, t) + ); + }; + }, + 8348: (e, t, n) => { + var r = n(781), + i = n(303), + o = n(9067), + s = Object.defineProperty; + t.f = n(477) + ? Object.defineProperty + : function (e, t, n) { + if ((r(e), (t = o(t, !0)), r(n), i)) + try { + return s(e, t, n); + } catch (e) {} + if ("get" in n || "set" in n) + throw TypeError("Accessors not supported!"); + return "value" in n && (e[t] = n.value), e; + }; + }, + 9475: (e, t, n) => { + var r = n(8348), + i = n(781), + o = n(7906); + e.exports = n(477) + ? Object.defineProperties + : function (e, t) { + i(e); + for (var n, s = o(t), a = s.length, l = 0; a > l; ) + r.f(e, (n = s[l++]), t[n]); + return e; + }; + }, + 3106: (e, t, n) => { + var r = n(5032), + i = n(9759), + o = n(6917), + s = n(9067), + a = n(1820), + l = n(303), + c = Object.getOwnPropertyDescriptor; + t.f = n(477) + ? c + : function (e, t) { + if (((e = o(e)), (t = s(t, !0)), l)) + try { + return c(e, t); + } catch (e) {} + if (a(e, t)) return i(!r.f.call(e, t), e[t]); + }; + }, + 6286: (e, t, n) => { + var r = n(6917), + i = n(3308).f, + o = {}.toString, + s = + "object" == typeof window && window && Object.getOwnPropertyNames + ? Object.getOwnPropertyNames(window) + : []; + e.exports.f = function (e) { + return s && "[object Window]" == o.call(e) + ? (function (e) { + try { + return i(e); + } catch (e) { + return s.slice(); + } + })(e) + : i(r(e)); + }; + }, + 3308: (e, t, n) => { + var r = n(2764), + i = n(7352).concat("length", "prototype"); + t.f = + Object.getOwnPropertyNames || + function (e) { + return r(e, i); + }; + }, + 6130: (e, t) => { + t.f = Object.getOwnPropertySymbols; + }, + 233: (e, t, n) => { + var r = n(1820), + i = n(9012), + o = n(3889)("IE_PROTO"), + s = Object.prototype; + e.exports = + Object.getPrototypeOf || + function (e) { + return ( + (e = i(e)), + r(e, o) + ? e[o] + : "function" == typeof e.constructor && + e instanceof e.constructor + ? e.constructor.prototype + : e instanceof Object + ? s + : null + ); + }; + }, + 2764: (e, t, n) => { + var r = n(1820), + i = n(6917), + o = n(8363)(!1), + s = n(3889)("IE_PROTO"); + e.exports = function (e, t) { + var n, + a = i(e), + l = 0, + c = []; + for (n in a) n != s && r(a, n) && c.push(n); + for (; t.length > l; ) r(a, (n = t[l++])) && (~o(c, n) || c.push(n)); + return c; + }; + }, + 7906: (e, t, n) => { + var r = n(2764), + i = n(7352); + e.exports = + Object.keys || + function (e) { + return r(e, i); + }; + }, + 5032: (e, t) => { + t.f = {}.propertyIsEnumerable; + }, + 9273: (e, t, n) => { + var r = n(1290), + i = n(4386), + o = n(3038); + e.exports = function (e, t) { + var n = (i.Object || {})[e] || Object[e], + s = {}; + (s[e] = t(n)), + r( + r.S + + r.F * + o(function () { + n(1); + }), + "Object", + s + ); + }; + }, + 9759: (e) => { + e.exports = function (e, t) { + return { + enumerable: !(1 & e), + configurable: !(2 & e), + writable: !(4 & e), + value: t, + }; + }; + }, + 7691: (e, t, n) => { + e.exports = n(1655); + }, + 283: (e, t, n) => { + var r = n(1246), + i = n(781), + o = function (e, t) { + if ((i(e), !r(t) && null !== t)) + throw TypeError(t + ": can't set as prototype!"); + }; + e.exports = { + set: + Object.setPrototypeOf || + ("__proto__" in {} + ? (function (e, t, r) { + try { + (r = n(4717)( + Function.call, + n(3106).f(Object.prototype, "__proto__").set, + 2 + ))(e, []), + (t = !(e instanceof Array)); + } catch (e) { + t = !0; + } + return function (e, n) { + return o(e, n), t ? (e.__proto__ = n) : r(e, n), e; + }; + })({}, !1) + : void 0), + check: o, + }; + }, + 4236: (e, t, n) => { + var r = n(8348).f, + i = n(1820), + o = n(6384)("toStringTag"); + e.exports = function (e, t, n) { + e && + !i((e = n ? e : e.prototype), o) && + r(e, o, { configurable: !0, value: t }); + }; + }, + 3889: (e, t, n) => { + var r = n(9609)("keys"), + i = n(1167); + e.exports = function (e) { + return r[e] || (r[e] = i(e)); + }; + }, + 9609: (e, t, n) => { + var r = n(3908), + i = "__core-js_shared__", + o = r[i] || (r[i] = {}); + e.exports = function (e) { + return o[e] || (o[e] = {}); + }; + }, + 5677: (e, t, n) => { + var r = n(2931), + i = n(3111); + e.exports = function (e) { + return function (t, n) { + var o, + s, + a = String(i(t)), + l = r(n), + c = a.length; + return l < 0 || l >= c + ? e + ? "" + : void 0 + : (o = a.charCodeAt(l)) < 55296 || + o > 56319 || + l + 1 === c || + (s = a.charCodeAt(l + 1)) < 56320 || + s > 57343 + ? e + ? a.charAt(l) + : o + : e + ? a.slice(l, l + 2) + : s - 56320 + ((o - 55296) << 10) + 65536; + }; + }; + }, + 7339: (e, t, n) => { + var r = n(2931), + i = Math.max, + o = Math.min; + e.exports = function (e, t) { + return (e = r(e)) < 0 ? i(e + t, 0) : o(e, t); + }; + }, + 2931: (e) => { + var t = Math.ceil, + n = Math.floor; + e.exports = function (e) { + return isNaN((e = +e)) ? 0 : (e > 0 ? n : t)(e); + }; + }, + 6917: (e, t, n) => { + var r = n(9201), + i = n(3111); + e.exports = function (e) { + return r(i(e)); + }; + }, + 4434: (e, t, n) => { + var r = n(2931), + i = Math.min; + e.exports = function (e) { + return e > 0 ? i(r(e), 9007199254740991) : 0; + }; + }, + 9012: (e, t, n) => { + var r = n(3111); + e.exports = function (e) { + return Object(r(e)); + }; + }, + 9067: (e, t, n) => { + var r = n(1246); + e.exports = function (e, t) { + if (!r(e)) return e; + var n, i; + if (t && "function" == typeof (n = e.toString) && !r((i = n.call(e)))) + return i; + if ("function" == typeof (n = e.valueOf) && !r((i = n.call(e)))) + return i; + if ( + !t && + "function" == typeof (n = e.toString) && + !r((i = n.call(e))) + ) + return i; + throw TypeError("Can't convert object to primitive value"); + }; + }, + 1167: (e) => { + var t = 0, + n = Math.random(); + e.exports = function (e) { + return "Symbol(".concat( + void 0 === e ? "" : e, + ")_", + (++t + n).toString(36) + ); + }; + }, + 1191: (e, t, n) => { + var r = n(3908), + i = n(4386), + o = n(7636), + s = n(9232), + a = n(8348).f; + e.exports = function (e) { + var t = i.Symbol || (i.Symbol = o ? {} : r.Symbol || {}); + "_" == e.charAt(0) || e in t || a(t, e, { value: s.f(e) }); + }; + }, + 9232: (e, t, n) => { + t.f = n(6384); + }, + 6384: (e, t, n) => { + var r = n(9609)("wks"), + i = n(1167), + o = n(3908).Symbol, + s = "function" == typeof o; + (e.exports = function (e) { + return r[e] || (r[e] = (s && o[e]) || (s ? o : i)("Symbol." + e)); + }).store = r; + }, + 6058: (e, t, n) => { + "use strict"; + var r = n(6137), + i = n(8942), + o = n(622), + s = n(6917); + (e.exports = n(7673)( + Array, + "Array", + function (e, t) { + (this._t = s(e)), (this._i = 0), (this._k = t); + }, + function () { + var e = this._t, + t = this._k, + n = this._i++; + return !e || n >= e.length + ? ((this._t = void 0), i(1)) + : i(0, "keys" == t ? n : "values" == t ? e[n] : [n, e[n]]); + }, + "values" + )), + (o.Arguments = o.Array), + r("keys"), + r("values"), + r("entries"); + }, + 7138: (e, t, n) => { + var r = n(1290); + r(r.S + r.F, "Object", { assign: n(7606) }); + }, + 9036: (e, t, n) => { + var r = n(1290); + r(r.S, "Object", { create: n(5813) }); + }, + 6019: (e, t, n) => { + var r = n(1290); + r(r.S + r.F * !n(477), "Object", { defineProperty: n(8348).f }); + }, + 8511: (e, t, n) => { + var r = n(6917), + i = n(3106).f; + n(9273)("getOwnPropertyDescriptor", function () { + return function (e, t) { + return i(r(e), t); + }; + }); + }, + 7141: (e, t, n) => { + var r = n(9012), + i = n(233); + n(9273)("getPrototypeOf", function () { + return function (e) { + return i(r(e)); + }; + }); + }, + 2360: (e, t, n) => { + var r = n(9012), + i = n(7906); + n(9273)("keys", function () { + return function (e) { + return i(r(e)); + }; + }); + }, + 7025: (e, t, n) => { + var r = n(1290); + r(r.S, "Object", { setPrototypeOf: n(283).set }); + }, + 7394: () => {}, + 1586: (e, t, n) => { + "use strict"; + var r = n(5677)(!0); + n(7673)( + String, + "String", + function (e) { + (this._t = String(e)), (this._i = 0); + }, + function () { + var e, + t = this._t, + n = this._i; + return n >= t.length + ? { value: void 0, done: !0 } + : ((e = r(t, n)), (this._i += e.length), { value: e, done: !1 }); + } + ); + }, + 3218: (e, t, n) => { + "use strict"; + var r = n(3908), + i = n(1820), + o = n(477), + s = n(1290), + a = n(7691), + l = n(9603).KEY, + c = n(3038), + u = n(9609), + h = n(4236), + p = n(1167), + d = n(6384), + m = n(9232), + f = n(1191), + g = n(3871), + y = n(3542), + b = n(781), + v = n(6917), + w = n(9067), + C = n(9759), + S = n(5813), + E = n(6286), + k = n(3106), + R = n(8348), + x = n(7906), + T = k.f, + D = R.f, + A = E.f, + _ = r.Symbol, + P = r.JSON, + I = P && P.stringify, + O = d("_hidden"), + N = d("toPrimitive"), + M = {}.propertyIsEnumerable, + B = u("symbol-registry"), + F = u("symbols"), + L = u("op-symbols"), + H = Object.prototype, + U = "function" == typeof _, + W = r.QObject, + $ = !W || !W.prototype || !W.prototype.findChild, + z = + o && + c(function () { + return ( + 7 != + S( + D({}, "a", { + get: function () { + return D(this, "a", { value: 7 }).a; + }, + }) + ).a + ); + }) + ? function (e, t, n) { + var r = T(H, t); + r && delete H[t], D(e, t, n), r && e !== H && D(H, t, r); + } + : D, + q = function (e) { + var t = (F[e] = S(_.prototype)); + return (t._k = e), t; + }, + j = + U && "symbol" == typeof _.iterator + ? function (e) { + return "symbol" == typeof e; + } + : function (e) { + return e instanceof _; + }, + G = function (e, t, n) { + return ( + e === H && G(L, t, n), + b(e), + (t = w(t, !0)), + b(n), + i(F, t) + ? (n.enumerable + ? (i(e, O) && e[O][t] && (e[O][t] = !1), + (n = S(n, { enumerable: C(0, !1) }))) + : (i(e, O) || D(e, O, C(1, {})), (e[O][t] = !0)), + z(e, t, n)) + : D(e, t, n) + ); + }, + V = function (e, t) { + b(e); + for (var n, r = g((t = v(t))), i = 0, o = r.length; o > i; ) + G(e, (n = r[i++]), t[n]); + return e; + }, + K = function (e) { + var t = M.call(this, (e = w(e, !0))); + return ( + !(this === H && i(F, e) && !i(L, e)) && + (!(t || !i(this, e) || !i(F, e) || (i(this, O) && this[O][e])) || + t) + ); + }, + Y = function (e, t) { + if (((e = v(e)), (t = w(t, !0)), e !== H || !i(F, t) || i(L, t))) { + var n = T(e, t); + return ( + !n || !i(F, t) || (i(e, O) && e[O][t]) || (n.enumerable = !0), n + ); + } + }, + X = function (e) { + for (var t, n = A(v(e)), r = [], o = 0; n.length > o; ) + i(F, (t = n[o++])) || t == O || t == l || r.push(t); + return r; + }, + Z = function (e) { + for ( + var t, n = e === H, r = A(n ? L : v(e)), o = [], s = 0; + r.length > s; + + ) + !i(F, (t = r[s++])) || (n && !i(H, t)) || o.push(F[t]); + return o; + }; + U || + (a( + (_ = function () { + if (this instanceof _) + throw TypeError("Symbol is not a constructor!"); + var e = p(arguments.length > 0 ? arguments[0] : void 0), + t = function (n) { + this === H && t.call(L, n), + i(this, O) && i(this[O], e) && (this[O][e] = !1), + z(this, e, C(1, n)); + }; + return o && $ && z(H, e, { configurable: !0, set: t }), q(e); + }).prototype, + "toString", + function () { + return this._k; + } + ), + (k.f = Y), + (R.f = G), + (n(3308).f = E.f = X), + (n(5032).f = K), + (n(6130).f = Z), + o && !n(7636) && a(H, "propertyIsEnumerable", K, !0), + (m.f = function (e) { + return q(d(e)); + })), + s(s.G + s.W + s.F * !U, { Symbol: _ }); + for ( + var Q = + "hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split( + "," + ), + J = 0; + Q.length > J; + + ) + d(Q[J++]); + for (var ee = x(d.store), te = 0; ee.length > te; ) f(ee[te++]); + s(s.S + s.F * !U, "Symbol", { + for: function (e) { + return i(B, (e += "")) ? B[e] : (B[e] = _(e)); + }, + keyFor: function (e) { + if (!j(e)) throw TypeError(e + " is not a symbol!"); + for (var t in B) if (B[t] === e) return t; + }, + useSetter: function () { + $ = !0; + }, + useSimple: function () { + $ = !1; + }, + }), + s(s.S + s.F * !U, "Object", { + create: function (e, t) { + return void 0 === t ? S(e) : V(S(e), t); + }, + defineProperty: G, + defineProperties: V, + getOwnPropertyDescriptor: Y, + getOwnPropertyNames: X, + getOwnPropertySymbols: Z, + }), + P && + s( + s.S + + s.F * + (!U || + c(function () { + var e = _(); + return ( + "[null]" != I([e]) || + "{}" != I({ a: e }) || + "{}" != I(Object(e)) + ); + })), + "JSON", + { + stringify: function (e) { + if (void 0 !== e && !j(e)) { + for (var t, n, r = [e], i = 1; arguments.length > i; ) + r.push(arguments[i++]); + return ( + "function" == typeof (t = r[1]) && (n = t), + (!n && y(t)) || + (t = function (e, t) { + if ((n && (t = n.call(this, e, t)), !j(t))) return t; + }), + (r[1] = t), + I.apply(P, r) + ); + } + }, + } + ), + _.prototype[N] || n(1655)(_.prototype, N, _.prototype.valueOf), + h(_, "Symbol"), + h(Math, "Math", !0), + h(r.JSON, "JSON", !0); + }, + 4616: (e, t, n) => { + n(1191)("asyncIterator"); + }, + 5174: (e, t, n) => { + n(1191)("observable"); + }, + 5130: (e, t, n) => { + n(6058); + for ( + var r = n(3908), + i = n(1655), + o = n(622), + s = n(6384)("toStringTag"), + a = + "CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split( + "," + ), + l = 0; + l < a.length; + l++ + ) { + var c = a[l], + u = r[c], + h = u && u.prototype; + h && !h[s] && i(h, s, c), (o[c] = o.Array); + } + }, + 3861: (e, t, n) => { + "use strict"; + const r = n(2081), + i = n(8032), + o = n(463); + function s(e, t, n) { + const s = i(e, t, n), + a = r.spawn(s.command, s.args, s.options); + return o.hookChildProcess(a, s), a; + } + (e.exports = s), + (e.exports.spawn = s), + (e.exports.sync = function (e, t, n) { + const s = i(e, t, n), + a = r.spawnSync(s.command, s.args, s.options); + return (a.error = a.error || o.verifyENOENTSync(a.status, s)), a; + }), + (e.exports._parse = i), + (e.exports._enoent = o); + }, + 463: (e) => { + "use strict"; + function t(e, t) { + return Object.assign(new Error(`${t} ${e.command} ENOENT`), { + code: "ENOENT", + errno: "ENOENT", + syscall: `${t} ${e.command}`, + path: e.command, + spawnargs: e.args, + }); + } + function n(e, n) { + return 1 !== e || n.file ? null : t(n.original, "spawn"); + } + e.exports = { + hookChildProcess: function (e, t) { + const r = e.emit; + e.emit = function (i, o) { + if ("exit" === i) { + const i = n(o, t); + if (i) return r.call(e, "error", i); + } + return r.apply(e, arguments); + }; + }, + verifyENOENT: n, + verifyENOENTSync: function (e, n) { + return 1 !== e || n.file ? null : t(n.original, "spawnSync"); + }, + notFoundError: t, + }; + }, + 8032: (e, t, n) => { + "use strict"; + const r = n(1017), + i = n(5419), + o = n(9573), + s = n(546), + a = n(5339), + l = n(7891), + c = /\.(?:com|exe)$/i, + u = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i, + h = + i(() => + l.satisfies(process.version, "^4.8.0 || ^5.7.0 || >= 6.0.0", !0) + ) || !1; + e.exports = function (e, t, n) { + t && !Array.isArray(t) && ((n = t), (t = null)); + const i = { + command: e, + args: (t = t ? t.slice(0) : []), + options: (n = Object.assign({}, n)), + file: void 0, + original: { command: e, args: t }, + }; + return n.shell + ? (function (e) { + if (h) return e; + const t = [e.command].concat(e.args).join(" "); + return ( + (e.command = + "string" == typeof e.options.shell + ? e.options.shell + : process.env.comspec || "cmd.exe"), + (e.args = ["/d", "/s", "/c", `"${t}"`]), + (e.options.windowsVerbatimArguments = !0), + e + ); + })(i) + : (function (e) { + const t = (function (e) { + e.file = o(e); + const t = e.file && a(e.file); + return t + ? (e.args.unshift(e.file), (e.command = t), o(e)) + : e.file; + })(e), + n = !c.test(t); + if (e.options.forceShell || n) { + const n = u.test(t); + (e.command = r.normalize(e.command)), + (e.command = s.command(e.command)), + (e.args = e.args.map((e) => s.argument(e, n))); + const i = [e.command].concat(e.args).join(" "); + (e.args = ["/d", "/s", "/c", `"${i}"`]), + (e.command = process.env.comspec || "cmd.exe"), + (e.options.windowsVerbatimArguments = !0); + } + return e; + })(i); + }; + }, + 546: (e) => { + "use strict"; + const t = /([()\][%!^"`<>&|;, *?])/g; + (e.exports.command = function (e) { + return e.replace(t, "^$1"); + }), + (e.exports.argument = function (e, n) { + return ( + (e = (e = `"${(e = (e = (e = `${e}`).replace( + /(\\*)"/g, + '$1$1\\"' + )).replace(/(\\*)$/, "$1$1"))}"`).replace(t, "^$1")), + n && (e = e.replace(t, "^$1")), + e + ); + }); + }, + 5339: (e, t, n) => { + "use strict"; + const r = n(7147), + i = n(7306); + e.exports = function (e) { + let t, n; + Buffer.alloc + ? (t = Buffer.alloc(150)) + : ((t = new Buffer(150)), t.fill(0)); + try { + (n = r.openSync(e, "r")), + r.readSync(n, t, 0, 150, 0), + r.closeSync(n); + } catch (e) {} + return i(t.toString()); + }; + }, + 9573: (e, t, n) => { + "use strict"; + const r = n(1017), + i = n(9891), + o = n(5620)(); + function s(e, t) { + const n = process.cwd(), + s = null != e.options.cwd; + if (s) + try { + process.chdir(e.options.cwd); + } catch (e) {} + let a; + try { + a = i.sync(e.command, { + path: (e.options.env || process.env)[o], + pathExt: t ? r.delimiter : void 0, + }); + } catch (e) { + } finally { + process.chdir(n); + } + return a && (a = r.resolve(s ? e.options.cwd : "", a)), a; + } + e.exports = function (e) { + return s(e) || s(e, !0); + }; + }, + 9177: (e, t, n) => { + var r = Array.prototype.slice, + i = n(5674), + o = n(1031), + s = (e.exports = function (e, t, n) { + return ( + n || (n = {}), + e === t || + (e instanceof Date && t instanceof Date + ? e.getTime() === t.getTime() + : !e || !t || ("object" != typeof e && "object" != typeof t) + ? n.strict + ? e === t + : e == t + : (function (e, t, n) { + var c, u; + if (a(e) || a(t)) return !1; + if (e.prototype !== t.prototype) return !1; + if (o(e)) + return ( + !!o(t) && + ((e = r.call(e)), (t = r.call(t)), s(e, t, n)) + ); + if (l(e)) { + if (!l(t)) return !1; + if (e.length !== t.length) return !1; + for (c = 0; c < e.length; c++) + if (e[c] !== t[c]) return !1; + return !0; + } + try { + var h = i(e), + p = i(t); + } catch (e) { + return !1; + } + if (h.length != p.length) return !1; + for (h.sort(), p.sort(), c = h.length - 1; c >= 0; c--) + if (h[c] != p[c]) return !1; + for (c = h.length - 1; c >= 0; c--) + if (((u = h[c]), !s(e[u], t[u], n))) return !1; + return typeof e == typeof t; + })(e, t, n)) + ); + }); + function a(e) { + return null == e; + } + function l(e) { + return !( + !e || + "object" != typeof e || + "number" != typeof e.length || + "function" != typeof e.copy || + "function" != typeof e.slice || + (e.length > 0 && "number" != typeof e[0]) + ); + } + }, + 1031: (e, t) => { + var n = + "[object Arguments]" == + (function () { + return Object.prototype.toString.call(arguments); + })(); + function r(e) { + return "[object Arguments]" == Object.prototype.toString.call(e); + } + function i(e) { + return ( + (e && + "object" == typeof e && + "number" == typeof e.length && + Object.prototype.hasOwnProperty.call(e, "callee") && + !Object.prototype.propertyIsEnumerable.call(e, "callee")) || + !1 + ); + } + ((t = e.exports = n ? r : i).supported = r), (t.unsupported = i); + }, + 5674: (e, t) => { + function n(e) { + var t = []; + for (var n in e) t.push(n); + return t; + } + (e.exports = "function" == typeof Object.keys ? Object.keys : n).shim = + n; + }, + 9379: (e, t, n) => { + "use strict"; + var r = n(7231); + Object.defineProperty(t, "X", { + enumerable: !0, + get: function () { + return r.getNotificationsPermission; + }, + }), + Object.defineProperty(t, "QJ", { + enumerable: !0, + get: function () { + return r.requestNotificationsPermission; + }, + }); + var i = n(7344); + Object.defineProperty(t, "VB", { + enumerable: !0, + get: function () { + return i.supportsNotifications; + }, + }), + Object.defineProperty(t, "YF", { + enumerable: !0, + get: function () { + return i.supportsNotificationsPermissionRequest; + }, + }); + var o = n(7838); + Object.defineProperty(t, "Y4", { + enumerable: !0, + get: function () { + return o.getNotificationSettingsUrl; + }, + }); + n(4747); + }, + 7231: function (e, t, n) { + "use strict"; + var r = + (this && this.__awaiter) || + function (e, t, n, r) { + return new (n || (n = Promise))(function (i, o) { + function s(e) { + try { + l(r.next(e)); + } catch (e) { + o(e); + } + } + function a(e) { + try { + l(r.throw(e)); + } catch (e) { + o(e); + } + } + function l(e) { + var t; + e.done + ? i(e.value) + : ((t = e.value), + t instanceof n + ? t + : new n(function (e) { + e(t); + })).then(s, a); + } + l((r = r.apply(e, t || [])).next()); + }); + }; + Object.defineProperty(t, "__esModule", { value: !0 }), + (t.closeNotification = + t.showNotification = + t.requestNotificationsPermission = + t.getNotificationsPermission = + t.terminateNotifications = + t.initializeNotifications = + void 0); + const i = n(7344), + o = n(4747), + s = n(6776); + let a; + function l() { + return ( + void 0 !== a || (a = i.supportsNotifications() ? n(33) : null), a + ); + } + (t.initializeNotifications = (e) => { + var t; + return null === (t = l()) || void 0 === t + ? void 0 + : t.initializeNotifications(o.notificationCallback, e); + }), + (t.terminateNotifications = () => { + var e; + return null === (e = l()) || void 0 === e + ? void 0 + : e.terminateNotifications(); + }), + (t.getNotificationsPermission = () => { + var e; + return null === (e = l()) || void 0 === e + ? void 0 + : e.getNotificationsPermission(); + }), + (t.requestNotificationsPermission = () => { + var e; + return null === (e = l()) || void 0 === e + ? void 0 + : e.requestNotificationsPermission(); + }), + (t.showNotification = (...e) => + r(void 0, void 0, void 0, function* () { + var t; + const n = s.v4(); + try { + yield null === (t = l()) || void 0 === t + ? void 0 + : t.showNotification(n, ...e); + } catch (e) { + return null; + } + return n; + })), + (t.closeNotification = (...e) => { + var t; + return null === (t = l()) || void 0 === t + ? void 0 + : t.closeNotification(...e); + }); + }, + 4747: (e, t) => { + "use strict"; + Object.defineProperty(t, "__esModule", { value: !0 }), + (t.onNotificationEvent = t.notificationCallback = void 0); + let n = null; + (t.notificationCallback = (...e) => (null == n ? void 0 : n(...e))), + (t.onNotificationEvent = (e) => { + n = e; + }); + }, + 7838: (e, t, n) => { + "use strict"; + Object.defineProperty(t, "__esModule", { value: !0 }), + (t.getNotificationSettingsUrl = void 0); + const r = n(7344); + t.getNotificationSettingsUrl = function () { + return r.supportsNotifications() ? "ms-settings:notifications" : null; + }; + }, + 7344: (e, t, n) => { + "use strict"; + Object.defineProperty(t, "__esModule", { value: !0 }), + (t.supportsNotificationsPermissionRequest = t.supportsNotifications = + void 0); + const r = n(2037); + (t.supportsNotifications = function () { + return (function () { + const e = r.release().split("."), + t = parseInt(e[0], 10), + n = e.length >= 3 ? parseInt(e[2], 10) : 15063; + return t > 10 || (10 === t && n >= 15063); + })(); + }), + (t.supportsNotificationsPermissionRequest = function () { + return !1; + }); + }, + 6776: (e, t, n) => { + "use strict"; + var r; + n.r(t), + n.d(t, { + NIL: () => _, + parse: () => g, + stringify: () => u, + v1: () => f, + v3: () => R, + v4: () => x, + v5: () => A, + validate: () => a, + version: () => P, + }); + var i = new Uint8Array(16); + function o() { + if ( + !r && + !(r = + ("undefined" != typeof crypto && + crypto.getRandomValues && + crypto.getRandomValues.bind(crypto)) || + ("undefined" != typeof msCrypto && + "function" == typeof msCrypto.getRandomValues && + msCrypto.getRandomValues.bind(msCrypto))) + ) + throw new Error( + "crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported" + ); + return r(i); + } + const s = + /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i, + a = function (e) { + return "string" == typeof e && s.test(e); + }; + for (var l = [], c = 0; c < 256; ++c) + l.push((c + 256).toString(16).substr(1)); + const u = function (e) { + var t = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : 0, + n = ( + l[e[t + 0]] + + l[e[t + 1]] + + l[e[t + 2]] + + l[e[t + 3]] + + "-" + + l[e[t + 4]] + + l[e[t + 5]] + + "-" + + l[e[t + 6]] + + l[e[t + 7]] + + "-" + + l[e[t + 8]] + + l[e[t + 9]] + + "-" + + l[e[t + 10]] + + l[e[t + 11]] + + l[e[t + 12]] + + l[e[t + 13]] + + l[e[t + 14]] + + l[e[t + 15]] + ).toLowerCase(); + if (!a(n)) throw TypeError("Stringified UUID is invalid"); + return n; + }; + var h, + p, + d = 0, + m = 0; + const f = function (e, t, n) { + var r = (t && n) || 0, + i = t || new Array(16), + s = (e = e || {}).node || h, + a = void 0 !== e.clockseq ? e.clockseq : p; + if (null == s || null == a) { + var l = e.random || (e.rng || o)(); + null == s && (s = h = [1 | l[0], l[1], l[2], l[3], l[4], l[5]]), + null == a && (a = p = 16383 & ((l[6] << 8) | l[7])); + } + var c = void 0 !== e.msecs ? e.msecs : Date.now(), + f = void 0 !== e.nsecs ? e.nsecs : m + 1, + g = c - d + (f - m) / 1e4; + if ( + (g < 0 && void 0 === e.clockseq && (a = (a + 1) & 16383), + (g < 0 || c > d) && void 0 === e.nsecs && (f = 0), + f >= 1e4) + ) + throw new Error( + "uuid.v1(): Can't create more than 10M uuids/sec" + ); + (d = c), (m = f), (p = a); + var y = (1e4 * (268435455 & (c += 122192928e5)) + f) % 4294967296; + (i[r++] = (y >>> 24) & 255), + (i[r++] = (y >>> 16) & 255), + (i[r++] = (y >>> 8) & 255), + (i[r++] = 255 & y); + var b = ((c / 4294967296) * 1e4) & 268435455; + (i[r++] = (b >>> 8) & 255), + (i[r++] = 255 & b), + (i[r++] = ((b >>> 24) & 15) | 16), + (i[r++] = (b >>> 16) & 255), + (i[r++] = (a >>> 8) | 128), + (i[r++] = 255 & a); + for (var v = 0; v < 6; ++v) i[r + v] = s[v]; + return t || u(i); + }, + g = function (e) { + if (!a(e)) throw TypeError("Invalid UUID"); + var t, + n = new Uint8Array(16); + return ( + (n[0] = (t = parseInt(e.slice(0, 8), 16)) >>> 24), + (n[1] = (t >>> 16) & 255), + (n[2] = (t >>> 8) & 255), + (n[3] = 255 & t), + (n[4] = (t = parseInt(e.slice(9, 13), 16)) >>> 8), + (n[5] = 255 & t), + (n[6] = (t = parseInt(e.slice(14, 18), 16)) >>> 8), + (n[7] = 255 & t), + (n[8] = (t = parseInt(e.slice(19, 23), 16)) >>> 8), + (n[9] = 255 & t), + (n[10] = + ((t = parseInt(e.slice(24, 36), 16)) / 1099511627776) & 255), + (n[11] = (t / 4294967296) & 255), + (n[12] = (t >>> 24) & 255), + (n[13] = (t >>> 16) & 255), + (n[14] = (t >>> 8) & 255), + (n[15] = 255 & t), + n + ); + }; + function y(e, t, n) { + function r(e, r, i, o) { + if ( + ("string" == typeof e && + (e = (function (e) { + e = unescape(encodeURIComponent(e)); + for (var t = [], n = 0; n < e.length; ++n) + t.push(e.charCodeAt(n)); + return t; + })(e)), + "string" == typeof r && (r = g(r)), + 16 !== r.length) + ) + throw TypeError( + "Namespace must be array-like (16 iterable integer values, 0-255)" + ); + var s = new Uint8Array(16 + e.length); + if ( + (s.set(r), + s.set(e, r.length), + ((s = n(s))[6] = (15 & s[6]) | t), + (s[8] = (63 & s[8]) | 128), + i) + ) { + o = o || 0; + for (var a = 0; a < 16; ++a) i[o + a] = s[a]; + return i; + } + return u(s); + } + try { + r.name = e; + } catch (e) {} + return ( + (r.DNS = "6ba7b810-9dad-11d1-80b4-00c04fd430c8"), + (r.URL = "6ba7b811-9dad-11d1-80b4-00c04fd430c8"), + r + ); + } + function b(e) { + return 14 + (((e + 64) >>> 9) << 4) + 1; + } + function v(e, t) { + var n = (65535 & e) + (65535 & t); + return (((e >> 16) + (t >> 16) + (n >> 16)) << 16) | (65535 & n); + } + function w(e, t, n, r, i, o) { + return v( + ((s = v(v(t, e), v(r, o))) << (a = i)) | (s >>> (32 - a)), + n + ); + var s, a; + } + function C(e, t, n, r, i, o, s) { + return w((t & n) | (~t & r), e, t, i, o, s); + } + function S(e, t, n, r, i, o, s) { + return w((t & r) | (n & ~r), e, t, i, o, s); + } + function E(e, t, n, r, i, o, s) { + return w(t ^ n ^ r, e, t, i, o, s); + } + function k(e, t, n, r, i, o, s) { + return w(n ^ (t | ~r), e, t, i, o, s); + } + const R = y("v3", 48, function (e) { + if ("string" == typeof e) { + var t = unescape(encodeURIComponent(e)); + e = new Uint8Array(t.length); + for (var n = 0; n < t.length; ++n) e[n] = t.charCodeAt(n); + } + return (function (e) { + for ( + var t = [], n = 32 * e.length, r = "0123456789abcdef", i = 0; + i < n; + i += 8 + ) { + var o = (e[i >> 5] >>> i % 32) & 255, + s = parseInt(r.charAt((o >>> 4) & 15) + r.charAt(15 & o), 16); + t.push(s); + } + return t; + })( + (function (e, t) { + (e[t >> 5] |= 128 << t % 32), (e[b(t) - 1] = t); + for ( + var n = 1732584193, + r = -271733879, + i = -1732584194, + o = 271733878, + s = 0; + s < e.length; + s += 16 + ) { + var a = n, + l = r, + c = i, + u = o; + (n = C(n, r, i, o, e[s], 7, -680876936)), + (o = C(o, n, r, i, e[s + 1], 12, -389564586)), + (i = C(i, o, n, r, e[s + 2], 17, 606105819)), + (r = C(r, i, o, n, e[s + 3], 22, -1044525330)), + (n = C(n, r, i, o, e[s + 4], 7, -176418897)), + (o = C(o, n, r, i, e[s + 5], 12, 1200080426)), + (i = C(i, o, n, r, e[s + 6], 17, -1473231341)), + (r = C(r, i, o, n, e[s + 7], 22, -45705983)), + (n = C(n, r, i, o, e[s + 8], 7, 1770035416)), + (o = C(o, n, r, i, e[s + 9], 12, -1958414417)), + (i = C(i, o, n, r, e[s + 10], 17, -42063)), + (r = C(r, i, o, n, e[s + 11], 22, -1990404162)), + (n = C(n, r, i, o, e[s + 12], 7, 1804603682)), + (o = C(o, n, r, i, e[s + 13], 12, -40341101)), + (i = C(i, o, n, r, e[s + 14], 17, -1502002290)), + (n = S( + n, + (r = C(r, i, o, n, e[s + 15], 22, 1236535329)), + i, + o, + e[s + 1], + 5, + -165796510 + )), + (o = S(o, n, r, i, e[s + 6], 9, -1069501632)), + (i = S(i, o, n, r, e[s + 11], 14, 643717713)), + (r = S(r, i, o, n, e[s], 20, -373897302)), + (n = S(n, r, i, o, e[s + 5], 5, -701558691)), + (o = S(o, n, r, i, e[s + 10], 9, 38016083)), + (i = S(i, o, n, r, e[s + 15], 14, -660478335)), + (r = S(r, i, o, n, e[s + 4], 20, -405537848)), + (n = S(n, r, i, o, e[s + 9], 5, 568446438)), + (o = S(o, n, r, i, e[s + 14], 9, -1019803690)), + (i = S(i, o, n, r, e[s + 3], 14, -187363961)), + (r = S(r, i, o, n, e[s + 8], 20, 1163531501)), + (n = S(n, r, i, o, e[s + 13], 5, -1444681467)), + (o = S(o, n, r, i, e[s + 2], 9, -51403784)), + (i = S(i, o, n, r, e[s + 7], 14, 1735328473)), + (n = E( + n, + (r = S(r, i, o, n, e[s + 12], 20, -1926607734)), + i, + o, + e[s + 5], + 4, + -378558 + )), + (o = E(o, n, r, i, e[s + 8], 11, -2022574463)), + (i = E(i, o, n, r, e[s + 11], 16, 1839030562)), + (r = E(r, i, o, n, e[s + 14], 23, -35309556)), + (n = E(n, r, i, o, e[s + 1], 4, -1530992060)), + (o = E(o, n, r, i, e[s + 4], 11, 1272893353)), + (i = E(i, o, n, r, e[s + 7], 16, -155497632)), + (r = E(r, i, o, n, e[s + 10], 23, -1094730640)), + (n = E(n, r, i, o, e[s + 13], 4, 681279174)), + (o = E(o, n, r, i, e[s], 11, -358537222)), + (i = E(i, o, n, r, e[s + 3], 16, -722521979)), + (r = E(r, i, o, n, e[s + 6], 23, 76029189)), + (n = E(n, r, i, o, e[s + 9], 4, -640364487)), + (o = E(o, n, r, i, e[s + 12], 11, -421815835)), + (i = E(i, o, n, r, e[s + 15], 16, 530742520)), + (n = k( + n, + (r = E(r, i, o, n, e[s + 2], 23, -995338651)), + i, + o, + e[s], + 6, + -198630844 + )), + (o = k(o, n, r, i, e[s + 7], 10, 1126891415)), + (i = k(i, o, n, r, e[s + 14], 15, -1416354905)), + (r = k(r, i, o, n, e[s + 5], 21, -57434055)), + (n = k(n, r, i, o, e[s + 12], 6, 1700485571)), + (o = k(o, n, r, i, e[s + 3], 10, -1894986606)), + (i = k(i, o, n, r, e[s + 10], 15, -1051523)), + (r = k(r, i, o, n, e[s + 1], 21, -2054922799)), + (n = k(n, r, i, o, e[s + 8], 6, 1873313359)), + (o = k(o, n, r, i, e[s + 15], 10, -30611744)), + (i = k(i, o, n, r, e[s + 6], 15, -1560198380)), + (r = k(r, i, o, n, e[s + 13], 21, 1309151649)), + (n = k(n, r, i, o, e[s + 4], 6, -145523070)), + (o = k(o, n, r, i, e[s + 11], 10, -1120210379)), + (i = k(i, o, n, r, e[s + 2], 15, 718787259)), + (r = k(r, i, o, n, e[s + 9], 21, -343485551)), + (n = v(n, a)), + (r = v(r, l)), + (i = v(i, c)), + (o = v(o, u)); + } + return [n, r, i, o]; + })( + (function (e) { + if (0 === e.length) return []; + for ( + var t = 8 * e.length, n = new Uint32Array(b(t)), r = 0; + r < t; + r += 8 + ) + n[r >> 5] |= (255 & e[r / 8]) << r % 32; + return n; + })(e), + 8 * e.length + ) + ); + }), + x = function (e, t, n) { + var r = (e = e || {}).random || (e.rng || o)(); + if (((r[6] = (15 & r[6]) | 64), (r[8] = (63 & r[8]) | 128), t)) { + n = n || 0; + for (var i = 0; i < 16; ++i) t[n + i] = r[i]; + return t; + } + return u(r); + }; + function T(e, t, n, r) { + switch (e) { + case 0: + return (t & n) ^ (~t & r); + case 1: + case 3: + return t ^ n ^ r; + case 2: + return (t & n) ^ (t & r) ^ (n & r); + } + } + function D(e, t) { + return (e << t) | (e >>> (32 - t)); + } + const A = y("v5", 80, function (e) { + var t = [1518500249, 1859775393, 2400959708, 3395469782], + n = [1732584193, 4023233417, 2562383102, 271733878, 3285377520]; + if ("string" == typeof e) { + var r = unescape(encodeURIComponent(e)); + e = []; + for (var i = 0; i < r.length; ++i) e.push(r.charCodeAt(i)); + } else Array.isArray(e) || (e = Array.prototype.slice.call(e)); + e.push(128); + for ( + var o = e.length / 4 + 2, + s = Math.ceil(o / 16), + a = new Array(s), + l = 0; + l < s; + ++l + ) { + for (var c = new Uint32Array(16), u = 0; u < 16; ++u) + c[u] = + (e[64 * l + 4 * u] << 24) | + (e[64 * l + 4 * u + 1] << 16) | + (e[64 * l + 4 * u + 2] << 8) | + e[64 * l + 4 * u + 3]; + a[l] = c; + } + (a[s - 1][14] = (8 * (e.length - 1)) / Math.pow(2, 32)), + (a[s - 1][14] = Math.floor(a[s - 1][14])), + (a[s - 1][15] = (8 * (e.length - 1)) & 4294967295); + for (var h = 0; h < s; ++h) { + for (var p = new Uint32Array(80), d = 0; d < 16; ++d) + p[d] = a[h][d]; + for (var m = 16; m < 80; ++m) + p[m] = D(p[m - 3] ^ p[m - 8] ^ p[m - 14] ^ p[m - 16], 1); + for ( + var f = n[0], g = n[1], y = n[2], b = n[3], v = n[4], w = 0; + w < 80; + ++w + ) { + var C = Math.floor(w / 20), + S = (D(f, 5) + T(C, g, y, b) + v + t[C] + p[w]) >>> 0; + (v = b), (b = y), (y = D(g, 30) >>> 0), (g = f), (f = S); + } + (n[0] = (n[0] + f) >>> 0), + (n[1] = (n[1] + g) >>> 0), + (n[2] = (n[2] + y) >>> 0), + (n[3] = (n[3] + b) >>> 0), + (n[4] = (n[4] + v) >>> 0); + } + return [ + (n[0] >> 24) & 255, + (n[0] >> 16) & 255, + (n[0] >> 8) & 255, + 255 & n[0], + (n[1] >> 24) & 255, + (n[1] >> 16) & 255, + (n[1] >> 8) & 255, + 255 & n[1], + (n[2] >> 24) & 255, + (n[2] >> 16) & 255, + (n[2] >> 8) & 255, + 255 & n[2], + (n[3] >> 24) & 255, + (n[3] >> 16) & 255, + (n[3] >> 8) & 255, + 255 & n[3], + (n[4] >> 24) & 255, + (n[4] >> 16) & 255, + (n[4] >> 8) & 255, + 255 & n[4], + ]; + }), + _ = "00000000-0000-0000-0000-000000000000", + P = function (e) { + if (!a(e)) throw TypeError("Invalid UUID"); + return parseInt(e.substr(14, 1), 16); + }; + }, + 2750: (e, t, n) => { + const r = n(1017); + function i() { + return "desktop-trampoline.exe"; + } + function o() { + return "ssh-wrapper.exe"; + } + e.exports = { + getDesktopTrampolinePath: function () { + return r.join( + __dirname, + "build", + "Release", + "desktop-trampoline.exe" + ); + }, + getDesktopTrampolineFilename: i, + getSSHWrapperPath: function () { + return r.join(__dirname, "build", "Release", "ssh-wrapper.exe"); + }, + getSSHWrapperFilename: o, + }; + }, + 2843: (e, t, n) => { + "use strict"; + var r = n(1553); + (t.__esModule = !0), + (t.default = function (e, t) { + e.classList + ? e.classList.add(t) + : (0, i.default)(e, t) || + ("string" == typeof e.className + ? (e.className = e.className + " " + t) + : e.setAttribute( + "class", + ((e.className && e.className.baseVal) || "") + " " + t + )); + }); + var i = r(n(6295)); + e.exports = t.default; + }, + 6295: (e, t) => { + "use strict"; + (t.__esModule = !0), + (t.default = function (e, t) { + return e.classList + ? !!t && e.classList.contains(t) + : -1 !== + (" " + (e.className.baseVal || e.className) + " ").indexOf( + " " + t + " " + ); + }), + (e.exports = t.default); + }, + 3199: (e) => { + "use strict"; + function t(e, t) { + return e + .replace(new RegExp("(^|\\s)" + t + "(?:\\s|$)", "g"), "$1") + .replace(/\s+/g, " ") + .replace(/^\s*|\s*$/g, ""); + } + e.exports = function (e, n) { + e.classList + ? e.classList.remove(n) + : "string" == typeof e.className + ? (e.className = t(e.className, n)) + : e.setAttribute( + "class", + t((e.className && e.className.baseVal) || "", n) + ); + }; + }, + 1553: (e) => { + e.exports = function (e) { + return e && e.__esModule ? e : { default: e }; + }; + }, + 1721: (e, t, n) => { + "use strict"; + var r = n(1553); + (t.__esModule = !0), + (t.default = + t.animationEnd = + t.animationDelay = + t.animationTiming = + t.animationDuration = + t.animationName = + t.transitionEnd = + t.transitionDuration = + t.transitionDelay = + t.transitionTiming = + t.transitionProperty = + t.transform = + void 0); + var i, + o, + s, + a, + l, + c, + u, + h, + p, + d, + m, + f = r(n(2184)), + g = "transform"; + if ( + ((t.transform = g), + (t.animationEnd = s), + (t.transitionEnd = o), + (t.transitionDelay = u), + (t.transitionTiming = c), + (t.transitionDuration = l), + (t.transitionProperty = a), + (t.animationDelay = m), + (t.animationTiming = d), + (t.animationDuration = p), + (t.animationName = h), + f.default) + ) { + var y = (function () { + for ( + var e, + t, + n = document.createElement("div").style, + r = { + O: function (e) { + return "o" + e.toLowerCase(); + }, + Moz: function (e) { + return e.toLowerCase(); + }, + Webkit: function (e) { + return "webkit" + e; + }, + ms: function (e) { + return "MS" + e; + }, + }, + i = Object.keys(r), + o = "", + s = 0; + s < i.length; + s++ + ) { + var a = i[s]; + if (a + "TransitionProperty" in n) { + (o = "-" + a.toLowerCase()), + (e = r[a]("TransitionEnd")), + (t = r[a]("AnimationEnd")); + break; + } + } + return ( + !e && "transitionProperty" in n && (e = "transitionend"), + !t && "animationName" in n && (t = "animationend"), + (n = null), + { animationEnd: t, transitionEnd: e, prefix: o } + ); + })(); + (i = y.prefix), + (t.transitionEnd = o = y.transitionEnd), + (t.animationEnd = s = y.animationEnd), + (t.transform = g = i + "-" + g), + (t.transitionProperty = a = i + "-transition-property"), + (t.transitionDuration = l = i + "-transition-duration"), + (t.transitionDelay = u = i + "-transition-delay"), + (t.transitionTiming = c = i + "-transition-timing-function"), + (t.animationName = h = i + "-animation-name"), + (t.animationDuration = p = i + "-animation-duration"), + (t.animationTiming = d = i + "-animation-delay"), + (t.animationDelay = m = i + "-animation-timing-function"); + } + var b = { + transform: g, + end: o, + property: a, + timing: c, + delay: u, + duration: l, + }; + t.default = b; + }, + 2184: (e, t) => { + "use strict"; + (t.__esModule = !0), (t.default = void 0); + var n = !( + "undefined" == typeof window || + !window.document || + !window.document.createElement + ); + (t.default = n), (e.exports = t.default); + }, + 1388: (e, t, n) => { + "use strict"; + var r = n(1553); + (t.__esModule = !0), (t.default = void 0); + var i, + o = r(n(2184)), + s = "clearTimeout", + a = function (e) { + var t = new Date().getTime(), + n = Math.max(0, 16 - (t - c)), + r = setTimeout(e, n); + return (c = t), r; + }, + l = function (e, t) { + return ( + e + (e ? t[0].toUpperCase() + t.substr(1) : t) + "AnimationFrame" + ); + }; + o.default && + ["", "webkit", "moz", "o", "ms"].some(function (e) { + var t = l(e, "request"); + if (t in window) + return ( + (s = l(e, "cancel")), + (a = function (e) { + return window[t](e); + }) + ); + }); + var c = new Date().getTime(); + (i = function (e) { + return a(e); + }).cancel = function (e) { + window[s] && "function" == typeof window[s] && window[s](e); + }; + var u = i; + (t.default = u), (e.exports = t.default); + }, + 6328: (e, t, n) => { + "use strict"; + var r = n(1553); + (t.__esModule = !0), + (t.default = function (e) { + if (((!i && 0 !== i) || e) && o.default) { + var t = document.createElement("div"); + (t.style.position = "absolute"), + (t.style.top = "-9999px"), + (t.style.width = "50px"), + (t.style.height = "50px"), + (t.style.overflow = "scroll"), + document.body.appendChild(t), + (i = t.offsetWidth - t.clientWidth), + document.body.removeChild(t); + } + return i; + }); + var i, + o = r(n(2184)); + e.exports = t.default; + }, + 746: function (e) { + e.exports = (function () { + "use strict"; + var e = Object.hasOwnProperty, + t = Object.setPrototypeOf, + n = Object.isFrozen, + r = Object.getPrototypeOf, + i = Object.getOwnPropertyDescriptor, + o = Object.freeze, + s = Object.seal, + a = Object.create, + l = "undefined" != typeof Reflect && Reflect, + c = l.apply, + u = l.construct; + c || + (c = function (e, t, n) { + return e.apply(t, n); + }), + o || + (o = function (e) { + return e; + }), + s || + (s = function (e) { + return e; + }), + u || + (u = function (e, t) { + return new (Function.prototype.bind.apply( + e, + [null].concat( + (function (e) { + if (Array.isArray(e)) { + for (var t = 0, n = Array(e.length); t < e.length; t++) + n[t] = e[t]; + return n; + } + return Array.from(e); + })(t) + ) + ))(); + }); + var h, + p = S(Array.prototype.forEach), + d = S(Array.prototype.pop), + m = S(Array.prototype.push), + f = S(String.prototype.toLowerCase), + g = S(String.prototype.match), + y = S(String.prototype.replace), + b = S(String.prototype.indexOf), + v = S(String.prototype.trim), + w = S(RegExp.prototype.test), + C = + ((h = TypeError), + function () { + for (var e = arguments.length, t = Array(e), n = 0; n < e; n++) + t[n] = arguments[n]; + return u(h, t); + }); + function S(e) { + return function (t) { + for ( + var n = arguments.length, r = Array(n > 1 ? n - 1 : 0), i = 1; + i < n; + i++ + ) + r[i - 1] = arguments[i]; + return c(e, t, r); + }; + } + function E(e, r) { + t && t(e, null); + for (var i = r.length; i--; ) { + var o = r[i]; + if ("string" == typeof o) { + var s = f(o); + s !== o && (n(r) || (r[i] = s), (o = s)); + } + e[o] = !0; + } + return e; + } + function k(t) { + var n = a(null), + r = void 0; + for (r in t) c(e, t, [r]) && (n[r] = t[r]); + return n; + } + function R(e, t) { + for (; null !== e; ) { + var n = i(e, t); + if (n) { + if (n.get) return S(n.get); + if ("function" == typeof n.value) return S(n.value); + } + e = r(e); + } + return function (e) { + return console.warn("fallback value for", e), null; + }; + } + var x = o([ + "a", + "abbr", + "acronym", + "address", + "area", + "article", + "aside", + "audio", + "b", + "bdi", + "bdo", + "big", + "blink", + "blockquote", + "body", + "br", + "button", + "canvas", + "caption", + "center", + "cite", + "code", + "col", + "colgroup", + "content", + "data", + "datalist", + "dd", + "decorator", + "del", + "details", + "dfn", + "dialog", + "dir", + "div", + "dl", + "dt", + "element", + "em", + "fieldset", + "figcaption", + "figure", + "font", + "footer", + "form", + "h1", + "h2", + "h3", + "h4", + "h5", + "h6", + "head", + "header", + "hgroup", + "hr", + "html", + "i", + "img", + "input", + "ins", + "kbd", + "label", + "legend", + "li", + "main", + "map", + "mark", + "marquee", + "menu", + "menuitem", + "meter", + "nav", + "nobr", + "ol", + "optgroup", + "option", + "output", + "p", + "picture", + "pre", + "progress", + "q", + "rp", + "rt", + "ruby", + "s", + "samp", + "section", + "select", + "shadow", + "small", + "source", + "spacer", + "span", + "strike", + "strong", + "style", + "sub", + "summary", + "sup", + "table", + "tbody", + "td", + "template", + "textarea", + "tfoot", + "th", + "thead", + "time", + "tr", + "track", + "tt", + "u", + "ul", + "var", + "video", + "wbr", + ]), + T = o([ + "svg", + "a", + "altglyph", + "altglyphdef", + "altglyphitem", + "animatecolor", + "animatemotion", + "animatetransform", + "circle", + "clippath", + "defs", + "desc", + "ellipse", + "filter", + "font", + "g", + "glyph", + "glyphref", + "hkern", + "image", + "line", + "lineargradient", + "marker", + "mask", + "metadata", + "mpath", + "path", + "pattern", + "polygon", + "polyline", + "radialgradient", + "rect", + "stop", + "style", + "switch", + "symbol", + "text", + "textpath", + "title", + "tref", + "tspan", + "view", + "vkern", + ]), + D = o([ + "feBlend", + "feColorMatrix", + "feComponentTransfer", + "feComposite", + "feConvolveMatrix", + "feDiffuseLighting", + "feDisplacementMap", + "feDistantLight", + "feFlood", + "feFuncA", + "feFuncB", + "feFuncG", + "feFuncR", + "feGaussianBlur", + "feMerge", + "feMergeNode", + "feMorphology", + "feOffset", + "fePointLight", + "feSpecularLighting", + "feSpotLight", + "feTile", + "feTurbulence", + ]), + A = o([ + "animate", + "color-profile", + "cursor", + "discard", + "fedropshadow", + "feimage", + "font-face", + "font-face-format", + "font-face-name", + "font-face-src", + "font-face-uri", + "foreignobject", + "hatch", + "hatchpath", + "mesh", + "meshgradient", + "meshpatch", + "meshrow", + "missing-glyph", + "script", + "set", + "solidcolor", + "unknown", + "use", + ]), + _ = o([ + "math", + "menclose", + "merror", + "mfenced", + "mfrac", + "mglyph", + "mi", + "mlabeledtr", + "mmultiscripts", + "mn", + "mo", + "mover", + "mpadded", + "mphantom", + "mroot", + "mrow", + "ms", + "mspace", + "msqrt", + "mstyle", + "msub", + "msup", + "msubsup", + "mtable", + "mtd", + "mtext", + "mtr", + "munder", + "munderover", + ]), + P = o([ + "maction", + "maligngroup", + "malignmark", + "mlongdiv", + "mscarries", + "mscarry", + "msgroup", + "mstack", + "msline", + "msrow", + "semantics", + "annotation", + "annotation-xml", + "mprescripts", + "none", + ]), + I = o(["#text"]), + O = o([ + "accept", + "action", + "align", + "alt", + "autocapitalize", + "autocomplete", + "autopictureinpicture", + "autoplay", + "background", + "bgcolor", + "border", + "capture", + "cellpadding", + "cellspacing", + "checked", + "cite", + "class", + "clear", + "color", + "cols", + "colspan", + "controls", + "controlslist", + "coords", + "crossorigin", + "datetime", + "decoding", + "default", + "dir", + "disabled", + "disablepictureinpicture", + "disableremoteplayback", + "download", + "draggable", + "enctype", + "enterkeyhint", + "face", + "for", + "headers", + "height", + "hidden", + "high", + "href", + "hreflang", + "id", + "inputmode", + "integrity", + "ismap", + "kind", + "label", + "lang", + "list", + "loading", + "loop", + "low", + "max", + "maxlength", + "media", + "method", + "min", + "minlength", + "multiple", + "muted", + "name", + "noshade", + "novalidate", + "nowrap", + "open", + "optimum", + "pattern", + "placeholder", + "playsinline", + "poster", + "preload", + "pubdate", + "radiogroup", + "readonly", + "rel", + "required", + "rev", + "reversed", + "role", + "rows", + "rowspan", + "spellcheck", + "scope", + "selected", + "shape", + "size", + "sizes", + "span", + "srclang", + "start", + "src", + "srcset", + "step", + "style", + "summary", + "tabindex", + "title", + "translate", + "type", + "usemap", + "valign", + "value", + "width", + "xmlns", + "slot", + ]), + N = o([ + "accent-height", + "accumulate", + "additive", + "alignment-baseline", + "ascent", + "attributename", + "attributetype", + "azimuth", + "basefrequency", + "baseline-shift", + "begin", + "bias", + "by", + "class", + "clip", + "clippathunits", + "clip-path", + "clip-rule", + "color", + "color-interpolation", + "color-interpolation-filters", + "color-profile", + "color-rendering", + "cx", + "cy", + "d", + "dx", + "dy", + "diffuseconstant", + "direction", + "display", + "divisor", + "dur", + "edgemode", + "elevation", + "end", + "fill", + "fill-opacity", + "fill-rule", + "filter", + "filterunits", + "flood-color", + "flood-opacity", + "font-family", + "font-size", + "font-size-adjust", + "font-stretch", + "font-style", + "font-variant", + "font-weight", + "fx", + "fy", + "g1", + "g2", + "glyph-name", + "glyphref", + "gradientunits", + "gradienttransform", + "height", + "href", + "id", + "image-rendering", + "in", + "in2", + "k", + "k1", + "k2", + "k3", + "k4", + "kerning", + "keypoints", + "keysplines", + "keytimes", + "lang", + "lengthadjust", + "letter-spacing", + "kernelmatrix", + "kernelunitlength", + "lighting-color", + "local", + "marker-end", + "marker-mid", + "marker-start", + "markerheight", + "markerunits", + "markerwidth", + "maskcontentunits", + "maskunits", + "max", + "mask", + "media", + "method", + "mode", + "min", + "name", + "numoctaves", + "offset", + "operator", + "opacity", + "order", + "orient", + "orientation", + "origin", + "overflow", + "paint-order", + "path", + "pathlength", + "patterncontentunits", + "patterntransform", + "patternunits", + "points", + "preservealpha", + "preserveaspectratio", + "primitiveunits", + "r", + "rx", + "ry", + "radius", + "refx", + "refy", + "repeatcount", + "repeatdur", + "restart", + "result", + "rotate", + "scale", + "seed", + "shape-rendering", + "specularconstant", + "specularexponent", + "spreadmethod", + "startoffset", + "stddeviation", + "stitchtiles", + "stop-color", + "stop-opacity", + "stroke-dasharray", + "stroke-dashoffset", + "stroke-linecap", + "stroke-linejoin", + "stroke-miterlimit", + "stroke-opacity", + "stroke", + "stroke-width", + "style", + "surfacescale", + "systemlanguage", + "tabindex", + "targetx", + "targety", + "transform", + "text-anchor", + "text-decoration", + "text-rendering", + "textlength", + "type", + "u1", + "u2", + "unicode", + "values", + "viewbox", + "visibility", + "version", + "vert-adv-y", + "vert-origin-x", + "vert-origin-y", + "width", + "word-spacing", + "wrap", + "writing-mode", + "xchannelselector", + "ychannelselector", + "x", + "x1", + "x2", + "xmlns", + "y", + "y1", + "y2", + "z", + "zoomandpan", + ]), + M = o([ + "accent", + "accentunder", + "align", + "bevelled", + "close", + "columnsalign", + "columnlines", + "columnspan", + "denomalign", + "depth", + "dir", + "display", + "displaystyle", + "encoding", + "fence", + "frame", + "height", + "href", + "id", + "largeop", + "length", + "linethickness", + "lspace", + "lquote", + "mathbackground", + "mathcolor", + "mathsize", + "mathvariant", + "maxsize", + "minsize", + "movablelimits", + "notation", + "numalign", + "open", + "rowalign", + "rowlines", + "rowspacing", + "rowspan", + "rspace", + "rquote", + "scriptlevel", + "scriptminsize", + "scriptsizemultiplier", + "selection", + "separator", + "separators", + "stretchy", + "subscriptshift", + "supscriptshift", + "symmetric", + "voffset", + "width", + "xmlns", + ]), + B = o([ + "xlink:href", + "xml:id", + "xlink:title", + "xml:space", + "xmlns:xlink", + ]), + F = s(/\{\{[\s\S]*|[\s\S]*\}\}/gm), + L = s(/<%[\s\S]*|[\s\S]*%>/gm), + H = s(/^data-[\-\w.\u00B7-\uFFFF]/), + U = s(/^aria-[\-\w]+$/), + W = s( + /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i + ), + $ = s(/^(?:\w+script|data):/i), + z = s( + /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g + ), + q = + "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; + }; + function j(e) { + if (Array.isArray(e)) { + for (var t = 0, n = Array(e.length); t < e.length; t++) + n[t] = e[t]; + return n; + } + return Array.from(e); + } + var G = function () { + return "undefined" == typeof window ? null : window; + }, + V = function (e, t) { + if ( + "object" !== (void 0 === e ? "undefined" : q(e)) || + "function" != typeof e.createPolicy + ) + return null; + var n = null, + r = "data-tt-policy-suffix"; + t.currentScript && + t.currentScript.hasAttribute(r) && + (n = t.currentScript.getAttribute(r)); + var i = "dompurify" + (n ? "#" + n : ""); + try { + return e.createPolicy(i, { + createHTML: function (e) { + return e; + }, + }); + } catch (e) { + return ( + console.warn( + "TrustedTypes policy " + i + " could not be created." + ), + null + ); + } + }; + return (function e() { + var t = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : G(), + n = function (t) { + return e(t); + }; + if ( + ((n.version = "2.3.3"), + (n.removed = []), + !t || !t.document || 9 !== t.document.nodeType) + ) + return (n.isSupported = !1), n; + var r = t.document, + i = t.document, + s = t.DocumentFragment, + a = t.HTMLTemplateElement, + l = t.Node, + c = t.Element, + u = t.NodeFilter, + h = t.NamedNodeMap, + S = void 0 === h ? t.NamedNodeMap || t.MozNamedAttrMap : h, + K = t.Text, + Y = t.Comment, + X = t.DOMParser, + Z = t.trustedTypes, + Q = c.prototype, + J = R(Q, "cloneNode"), + ee = R(Q, "nextSibling"), + te = R(Q, "childNodes"), + ne = R(Q, "parentNode"); + if ("function" == typeof a) { + var re = i.createElement("template"); + re.content && + re.content.ownerDocument && + (i = re.content.ownerDocument); + } + var ie = V(Z, r), + oe = ie && Fe ? ie.createHTML("") : "", + se = i, + ae = se.implementation, + le = se.createNodeIterator, + ce = se.createDocumentFragment, + ue = se.getElementsByTagName, + he = r.importNode, + pe = {}; + try { + pe = k(i).documentMode ? i.documentMode : {}; + } catch (e) {} + var de = {}; + n.isSupported = + "function" == typeof ne && + ae && + void 0 !== ae.createHTMLDocument && + 9 !== pe; + var me = F, + fe = L, + ge = H, + ye = U, + be = $, + ve = z, + we = W, + Ce = null, + Se = E({}, [].concat(j(x), j(T), j(D), j(_), j(I))), + Ee = null, + ke = E({}, [].concat(j(O), j(N), j(M), j(B))), + Re = null, + xe = null, + Te = !0, + De = !0, + Ae = !1, + _e = !1, + Pe = !1, + Ie = !1, + Oe = !1, + Ne = !1, + Me = !1, + Be = !0, + Fe = !1, + Le = !0, + He = !0, + Ue = !1, + We = {}, + $e = null, + ze = E({}, [ + "annotation-xml", + "audio", + "colgroup", + "desc", + "foreignobject", + "head", + "iframe", + "math", + "mi", + "mn", + "mo", + "ms", + "mtext", + "noembed", + "noframes", + "noscript", + "plaintext", + "script", + "style", + "svg", + "template", + "thead", + "title", + "video", + "xmp", + ]), + qe = null, + je = E({}, ["audio", "video", "img", "source", "image", "track"]), + Ge = null, + Ve = E({}, [ + "alt", + "class", + "for", + "id", + "label", + "name", + "pattern", + "placeholder", + "role", + "summary", + "title", + "value", + "style", + "xmlns", + ]), + Ke = "http://www.w3.org/1998/Math/MathML", + Ye = "http://www.w3.org/2000/svg", + Xe = "http://www.w3.org/1999/xhtml", + Ze = Xe, + Qe = !1, + Je = void 0, + et = ["application/xhtml+xml", "text/html"], + tt = "text/html", + nt = void 0, + rt = null, + it = i.createElement("form"), + ot = function (e) { + (rt && rt === e) || + ((e && "object" === (void 0 === e ? "undefined" : q(e))) || + (e = {}), + (e = k(e)), + (Ce = "ALLOWED_TAGS" in e ? E({}, e.ALLOWED_TAGS) : Se), + (Ee = "ALLOWED_ATTR" in e ? E({}, e.ALLOWED_ATTR) : ke), + (Ge = + "ADD_URI_SAFE_ATTR" in e + ? E(k(Ve), e.ADD_URI_SAFE_ATTR) + : Ve), + (qe = + "ADD_DATA_URI_TAGS" in e + ? E(k(je), e.ADD_DATA_URI_TAGS) + : je), + ($e = "FORBID_CONTENTS" in e ? E({}, e.FORBID_CONTENTS) : ze), + (Re = "FORBID_TAGS" in e ? E({}, e.FORBID_TAGS) : {}), + (xe = "FORBID_ATTR" in e ? E({}, e.FORBID_ATTR) : {}), + (We = "USE_PROFILES" in e && e.USE_PROFILES), + (Te = !1 !== e.ALLOW_ARIA_ATTR), + (De = !1 !== e.ALLOW_DATA_ATTR), + (Ae = e.ALLOW_UNKNOWN_PROTOCOLS || !1), + (_e = e.SAFE_FOR_TEMPLATES || !1), + (Pe = e.WHOLE_DOCUMENT || !1), + (Ne = e.RETURN_DOM || !1), + (Me = e.RETURN_DOM_FRAGMENT || !1), + (Be = !1 !== e.RETURN_DOM_IMPORT), + (Fe = e.RETURN_TRUSTED_TYPE || !1), + (Oe = e.FORCE_BODY || !1), + (Le = !1 !== e.SANITIZE_DOM), + (He = !1 !== e.KEEP_CONTENT), + (Ue = e.IN_PLACE || !1), + (we = e.ALLOWED_URI_REGEXP || we), + (Ze = e.NAMESPACE || Xe), + (Je = Je = + -1 === et.indexOf(e.PARSER_MEDIA_TYPE) + ? tt + : e.PARSER_MEDIA_TYPE), + (nt = + "application/xhtml+xml" === Je + ? function (e) { + return e; + } + : f), + _e && (De = !1), + Me && (Ne = !0), + We && + ((Ce = E({}, [].concat(j(I)))), + (Ee = []), + !0 === We.html && (E(Ce, x), E(Ee, O)), + !0 === We.svg && (E(Ce, T), E(Ee, N), E(Ee, B)), + !0 === We.svgFilters && (E(Ce, D), E(Ee, N), E(Ee, B)), + !0 === We.mathMl && (E(Ce, _), E(Ee, M), E(Ee, B))), + e.ADD_TAGS && (Ce === Se && (Ce = k(Ce)), E(Ce, e.ADD_TAGS)), + e.ADD_ATTR && (Ee === ke && (Ee = k(Ee)), E(Ee, e.ADD_ATTR)), + e.ADD_URI_SAFE_ATTR && E(Ge, e.ADD_URI_SAFE_ATTR), + e.FORBID_CONTENTS && + ($e === ze && ($e = k($e)), E($e, e.FORBID_CONTENTS)), + He && (Ce["#text"] = !0), + Pe && E(Ce, ["html", "head", "body"]), + Ce.table && (E(Ce, ["tbody"]), delete Re.tbody), + o && o(e), + (rt = e)); + }, + st = E({}, ["mi", "mo", "mn", "ms", "mtext"]), + at = E({}, ["foreignobject", "desc", "title", "annotation-xml"]), + lt = E({}, T); + E(lt, D), E(lt, A); + var ct = E({}, _); + E(ct, P); + var ut = function (e) { + var t = ne(e); + (t && t.tagName) || + (t = { namespaceURI: Xe, tagName: "template" }); + var n = f(e.tagName), + r = f(t.tagName); + if (e.namespaceURI === Ye) + return t.namespaceURI === Xe + ? "svg" === n + : t.namespaceURI === Ke + ? "svg" === n && ("annotation-xml" === r || st[r]) + : Boolean(lt[n]); + if (e.namespaceURI === Ke) + return t.namespaceURI === Xe + ? "math" === n + : t.namespaceURI === Ye + ? "math" === n && at[r] + : Boolean(ct[n]); + if (e.namespaceURI === Xe) { + if (t.namespaceURI === Ye && !at[r]) return !1; + if (t.namespaceURI === Ke && !st[r]) return !1; + var i = E({}, ["title", "style", "font", "a", "script"]); + return !ct[n] && (i[n] || !lt[n]); + } + return !1; + }, + ht = function (e) { + m(n.removed, { element: e }); + try { + e.parentNode.removeChild(e); + } catch (t) { + try { + e.outerHTML = oe; + } catch (t) { + e.remove(); + } + } + }, + pt = function (e, t) { + try { + m(n.removed, { attribute: t.getAttributeNode(e), from: t }); + } catch (e) { + m(n.removed, { attribute: null, from: t }); + } + if ((t.removeAttribute(e), "is" === e && !Ee[e])) + if (Ne || Me) + try { + ht(t); + } catch (e) {} + else + try { + t.setAttribute(e, ""); + } catch (e) {} + }, + dt = function (e) { + var t = void 0, + n = void 0; + if (Oe) e = "" + e; + else { + var r = g(e, /^[\r\n\t ]+/); + n = r && r[0]; + } + "application/xhtml+xml" === Je && + (e = + '' + + e + + ""); + var o = ie ? ie.createHTML(e) : e; + if (Ze === Xe) + try { + t = new X().parseFromString(o, Je); + } catch (e) {} + if (!t || !t.documentElement) { + t = ae.createDocument(Ze, "template", null); + try { + t.documentElement.innerHTML = Qe ? "" : o; + } catch (e) {} + } + var s = t.body || t.documentElement; + return ( + e && + n && + s.insertBefore( + i.createTextNode(n), + s.childNodes[0] || null + ), + Ze === Xe + ? ue.call(t, Pe ? "html" : "body")[0] + : Pe + ? t.documentElement + : s + ); + }, + mt = function (e) { + return le.call( + e.ownerDocument || e, + e, + u.SHOW_ELEMENT | u.SHOW_COMMENT | u.SHOW_TEXT, + null, + !1 + ); + }, + ft = function (e) { + return !( + e instanceof K || + e instanceof Y || + ("string" == typeof e.nodeName && + "string" == typeof e.textContent && + "function" == typeof e.removeChild && + e.attributes instanceof S && + "function" == typeof e.removeAttribute && + "function" == typeof e.setAttribute && + "string" == typeof e.namespaceURI && + "function" == typeof e.insertBefore) + ); + }, + gt = function (e) { + return "object" === (void 0 === l ? "undefined" : q(l)) + ? e instanceof l + : e && + "object" === (void 0 === e ? "undefined" : q(e)) && + "number" == typeof e.nodeType && + "string" == typeof e.nodeName; + }, + yt = function (e, t, r) { + de[e] && + p(de[e], function (e) { + e.call(n, t, r, rt); + }); + }, + bt = function (e) { + var t = void 0; + if ((yt("beforeSanitizeElements", e, null), ft(e))) + return ht(e), !0; + if (g(e.nodeName, /[\u0080-\uFFFF]/)) return ht(e), !0; + var r = nt(e.nodeName); + if ( + (yt("uponSanitizeElement", e, { + tagName: r, + allowedTags: Ce, + }), + !gt(e.firstElementChild) && + (!gt(e.content) || !gt(e.content.firstElementChild)) && + w(/<[/\w]/g, e.innerHTML) && + w(/<[/\w]/g, e.textContent)) + ) + return ht(e), !0; + if ("select" === r && w(/