Typings are available on GitHub.com/obsidianmd/obsidian-api and as npm:obsidian
Last active
April 23, 2025 14:34
-
-
Save renoirb/50f61d5a5c2425c1f8ff6ef49d8d0c88 to your computer and use it in GitHub Desktop.
Obsidian Desktop Client transpiled code and notes
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(()=>{ | |
var e = { | |
6043: (e,t,n)=>{ | |
"use strict"; | |
n.d(t, { | |
E_: ()=>c, | |
F3: ()=>l, | |
Ii: ()=>s | |
}); | |
const i = (e=>e.CapacitorPlatforms = (e=>{ | |
const t = new Map; | |
t.set("web", { | |
name: "web" | |
}); | |
const n = e.CapacitorPlatforms || { | |
currentPlatform: { | |
name: "web" | |
}, | |
platforms: t | |
}; | |
return n.addPlatform = (e,t)=>{ | |
n.platforms.set(e, t) | |
} | |
, | |
n.setPlatform = e=>{ | |
n.platforms.has(e) && (n.currentPlatform = n.platforms.get(e)) | |
} | |
, | |
n | |
} | |
)(e))("undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : "undefined" != typeof window ? window : void 0 !== n.g ? n.g : {}); | |
i.addPlatform, | |
i.setPlatform; | |
var r; | |
!function(e) { | |
e.Unimplemented = "UNIMPLEMENTED", | |
e.Unavailable = "UNAVAILABLE" | |
}(r || (r = {})); | |
class o extends Error { | |
constructor(e, t, n) { | |
super(e), | |
this.message = e, | |
this.code = t, | |
this.data = n | |
} | |
} | |
const a = e=>{ | |
var t, n, i, a, s; | |
const l = e.CapacitorCustomPlatform || null | |
, c = e.Capacitor || {} | |
, u = c.Plugins = c.Plugins || {} | |
, h = e.CapacitorPlatforms | |
, d = (null === (t = null == h ? void 0 : h.currentPlatform) || void 0 === t ? void 0 : t.getPlatform) || (()=>null !== l ? l.name : (e=>{ | |
var t, n; | |
return (null == e ? void 0 : e.androidBridge) ? "android" : (null === (n = null === (t = null == e ? void 0 : e.webkit) || void 0 === t ? void 0 : t.messageHandlers) || void 0 === n ? void 0 : n.bridge) ? "ios" : "web" | |
} | |
)(e)) | |
, p = (null === (n = null == h ? void 0 : h.currentPlatform) || void 0 === n ? void 0 : n.isNativePlatform) || (()=>"web" !== d()) | |
, f = (null === (i = null == h ? void 0 : h.currentPlatform) || void 0 === i ? void 0 : i.isPluginAvailable) || (e=>{ | |
const t = v.get(e); | |
return !!(null == t ? void 0 : t.platforms.has(d())) || !!m(e) | |
} | |
) | |
, m = (null === (a = null == h ? void 0 : h.currentPlatform) || void 0 === a ? void 0 : a.getPluginHeader) || (e=>{ | |
var t; | |
return null === (t = c.PluginHeaders) || void 0 === t ? void 0 : t.find((t=>t.name === e)) | |
} | |
) | |
, v = new Map | |
, g = (null === (s = null == h ? void 0 : h.currentPlatform) || void 0 === s ? void 0 : s.registerPlugin) || ((e,t={})=>{ | |
const n = v.get(e); | |
if (n) | |
return console.warn(`Capacitor plugin "${e}" already registered. Cannot register plugins twice.`), | |
n.proxy; | |
const i = d() | |
, a = m(e); | |
let s; | |
const h = n=>{ | |
let u; | |
const h = (...h)=>{ | |
const d = (async()=>(!s && i in t ? s = s = "function" == typeof t[i] ? await t[i]() : t[i] : null !== l && !s && "web"in t && (s = s = "function" == typeof t.web ? await t.web() : t.web), | |
s))().then((t=>{ | |
const s = ((t,n)=>{ | |
var s, l; | |
if (!a) { | |
if (t) | |
return null === (l = t[n]) || void 0 === l ? void 0 : l.bind(t); | |
throw new o(`"${e}" plugin is not implemented on ${i}`,r.Unimplemented) | |
} | |
{ | |
const i = null == a ? void 0 : a.methods.find((e=>n === e.name)); | |
if (i) | |
return "promise" === i.rtype ? t=>c.nativePromise(e, n.toString(), t) : (t,i)=>c.nativeCallback(e, n.toString(), t, i); | |
if (t) | |
return null === (s = t[n]) || void 0 === s ? void 0 : s.bind(t) | |
} | |
} | |
)(t, n); | |
if (s) { | |
const e = s(...h); | |
return u = null == e ? void 0 : e.remove, | |
e | |
} | |
throw new o(`"${e}.${n}()" is not implemented on ${i}`,r.Unimplemented) | |
} | |
)); | |
return "addListener" === n && (d.remove = async()=>u()), | |
d | |
} | |
; | |
return h.toString = ()=>`${n.toString()}() { [capacitor code] }`, | |
Object.defineProperty(h, "name", { | |
value: n, | |
writable: !1, | |
configurable: !1 | |
}), | |
h | |
} | |
, p = h("addListener") | |
, f = h("removeListener") | |
, g = (e,t)=>{ | |
const n = p({ | |
eventName: e | |
}, t) | |
, i = async()=>{ | |
const i = await n; | |
f({ | |
eventName: e, | |
callbackId: i | |
}, t) | |
} | |
, r = new Promise((e=>n.then((()=>e({ | |
remove: i | |
}))))); | |
return r.remove = async()=>{ | |
console.warn("Using addListener() without 'await' is deprecated."), | |
await i() | |
} | |
, | |
r | |
} | |
, y = new Proxy({},{ | |
get(e, t) { | |
switch (t) { | |
case "$$typeof": | |
return; | |
case "toJSON": | |
return ()=>({}); | |
case "addListener": | |
return a ? g : p; | |
case "removeListener": | |
return f; | |
default: | |
return h(t) | |
} | |
} | |
}); | |
return u[e] = y, | |
v.set(e, { | |
name: e, | |
proxy: y, | |
platforms: new Set([...Object.keys(t), ...a ? [i] : []]) | |
}), | |
y | |
} | |
); | |
return c.convertFileSrc || (c.convertFileSrc = e=>e), | |
c.getPlatform = d, | |
c.handleError = t=>e.console.error(t), | |
c.isNativePlatform = p, | |
c.isPluginAvailable = f, | |
c.pluginMethodNoop = (e,t,n)=>Promise.reject(`${n} does not have an implementation of "${t}".`), | |
c.registerPlugin = g, | |
c.Exception = o, | |
c.DEBUG = !!c.DEBUG, | |
c.isLoggingEnabled = !!c.isLoggingEnabled, | |
c.platform = c.getPlatform(), | |
c.isNative = c.isNativePlatform(), | |
c | |
} | |
, s = (e=>e.Capacitor = a(e))("undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : "undefined" != typeof window ? window : void 0 !== n.g ? n.g : {}) | |
, l = s.registerPlugin; | |
s.Plugins; | |
class c { | |
constructor(e) { | |
this.listeners = {}, | |
this.windowListeners = {}, | |
e && (console.warn(`Capacitor WebPlugin "${e.name}" config object was deprecated in v3 and will be removed in v4.`), | |
this.config = e) | |
} | |
addListener(e, t) { | |
this.listeners[e] || (this.listeners[e] = []), | |
this.listeners[e].push(t); | |
const n = this.windowListeners[e]; | |
n && !n.registered && this.addWindowListener(n); | |
const i = async()=>this.removeListener(e, t) | |
, r = Promise.resolve({ | |
remove: i | |
}); | |
return Object.defineProperty(r, "remove", { | |
value: async()=>{ | |
console.warn("Using addListener() without 'await' is deprecated."), | |
await i() | |
} | |
}), | |
r | |
} | |
async removeAllListeners() { | |
this.listeners = {}; | |
for (const e in this.windowListeners) | |
this.removeWindowListener(this.windowListeners[e]); | |
this.windowListeners = {} | |
} | |
notifyListeners(e, t) { | |
const n = this.listeners[e]; | |
n && n.forEach((e=>e(t))) | |
} | |
hasListeners(e) { | |
return !!this.listeners[e].length | |
} | |
registerWindowListener(e, t) { | |
this.windowListeners[t] = { | |
registered: !1, | |
windowEventName: e, | |
pluginEventName: t, | |
handler: e=>{ | |
this.notifyListeners(t, e) | |
} | |
} | |
} | |
unimplemented(e="not implemented") { | |
return new s.Exception(e,r.Unimplemented) | |
} | |
unavailable(e="not available") { | |
return new s.Exception(e,r.Unavailable) | |
} | |
async removeListener(e, t) { | |
const n = this.listeners[e]; | |
if (!n) | |
return; | |
const i = n.indexOf(t); | |
this.listeners[e].splice(i, 1), | |
this.listeners[e].length || this.removeWindowListener(this.windowListeners[e]) | |
} | |
addWindowListener(e) { | |
window.addEventListener(e.windowEventName, e.handler), | |
e.registered = !0 | |
} | |
removeWindowListener(e) { | |
e && (window.removeEventListener(e.windowEventName, e.handler), | |
e.registered = !1) | |
} | |
} | |
const u = e=>encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape) | |
, h = e=>e.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent); | |
class d extends c { | |
async getCookies() { | |
const e = document.cookie | |
, t = {}; | |
return e.split(";").forEach((e=>{ | |
if (e.length <= 0) | |
return; | |
let[n,i] = e.replace(/=/, "CAP_COOKIE").split("CAP_COOKIE"); | |
n = h(n).trim(), | |
i = h(i).trim(), | |
t[n] = i | |
} | |
)), | |
t | |
} | |
async setCookie(e) { | |
try { | |
const t = u(e.key) | |
, n = u(e.value) | |
, i = `; expires=${(e.expires || "").replace("expires=", "")}` | |
, r = (e.path || "/").replace("path=", "") | |
, o = null != e.url && e.url.length > 0 ? `domain=${e.url}` : ""; | |
document.cookie = `${t}=${n || ""}${i}; path=${r}; ${o};` | |
} catch (e) { | |
return Promise.reject(e) | |
} | |
} | |
async deleteCookie(e) { | |
try { | |
document.cookie = `${e.key}=; Max-Age=0` | |
} catch (e) { | |
return Promise.reject(e) | |
} | |
} | |
async clearCookies() { | |
try { | |
const e = document.cookie.split(";") || []; | |
for (const t of e) | |
document.cookie = t.replace(/^ +/, "").replace(/=.*/, `=;expires=${(new Date).toUTCString()};path=/`) | |
} catch (e) { | |
return Promise.reject(e) | |
} | |
} | |
async clearAllCookies() { | |
try { | |
await this.clearCookies() | |
} catch (e) { | |
return Promise.reject(e) | |
} | |
} | |
} | |
l("CapacitorCookies", { | |
web: ()=>new d | |
}); | |
const p = (e,t={})=>{ | |
const n = Object.assign({ | |
method: e.method || "GET", | |
headers: e.headers | |
}, t) | |
, i = ((e={})=>{ | |
const t = Object.keys(e); | |
return Object.keys(e).map((e=>e.toLocaleLowerCase())).reduce(((n,i,r)=>(n[i] = e[t[r]], | |
n)), {}) | |
} | |
)(e.headers)["content-type"] || ""; | |
if ("string" == typeof e.data) | |
n.body = e.data; | |
else if (i.includes("application/x-www-form-urlencoded")) { | |
const t = new URLSearchParams; | |
for (const [n,i] of Object.entries(e.data || {})) | |
t.set(n, i); | |
n.body = t.toString() | |
} else if (i.includes("multipart/form-data") || e.data instanceof FormData) { | |
const t = new FormData; | |
if (e.data instanceof FormData) | |
e.data.forEach(((e,n)=>{ | |
t.append(n, e) | |
} | |
)); | |
else | |
for (const n of Object.keys(e.data)) | |
t.append(n, e.data[n]); | |
n.body = t; | |
const i = new Headers(n.headers); | |
i.delete("content-type"), | |
n.headers = i | |
} else | |
(i.includes("application/json") || "object" == typeof e.data) && (n.body = JSON.stringify(e.data)); | |
return n | |
} | |
; | |
class f extends c { | |
async request(e) { | |
const t = p(e, e.webFetchExtra) | |
, n = ((e,t=!0)=>e ? Object.entries(e).reduce(((e,n)=>{ | |
const [i,r] = n; | |
let o, a; | |
return Array.isArray(r) ? (a = "", | |
r.forEach((e=>{ | |
o = t ? encodeURIComponent(e) : e, | |
a += `${i}=${o}&` | |
} | |
)), | |
a.slice(0, -1)) : (o = t ? encodeURIComponent(r) : r, | |
a = `${i}=${o}`), | |
`${e}&${a}` | |
} | |
), "").substr(1) : null)(e.params, e.shouldEncodeUrlParams) | |
, i = n ? `${e.url}?${n}` : e.url | |
, r = await fetch(i, t) | |
, o = r.headers.get("content-type") || ""; | |
let a, s, {responseType: l="text"} = r.ok ? e : {}; | |
switch (o.includes("application/json") && (l = "json"), | |
l) { | |
case "arraybuffer": | |
case "blob": | |
s = await r.blob(), | |
a = await (async e=>new Promise(((t,n)=>{ | |
const i = new FileReader; | |
i.onload = ()=>{ | |
const e = i.result; | |
t(e.indexOf(",") >= 0 ? e.split(",")[1] : e) | |
} | |
, | |
i.onerror = e=>n(e), | |
i.readAsDataURL(e) | |
} | |
)))(s); | |
break; | |
case "json": | |
a = await r.json(); | |
break; | |
default: | |
a = await r.text() | |
} | |
const c = {}; | |
return r.headers.forEach(((e,t)=>{ | |
c[t] = e | |
} | |
)), | |
{ | |
data: a, | |
headers: c, | |
status: r.status, | |
url: r.url | |
} | |
} | |
async get(e) { | |
return this.request(Object.assign(Object.assign({}, e), { | |
method: "GET" | |
})) | |
} | |
async post(e) { | |
return this.request(Object.assign(Object.assign({}, e), { | |
method: "POST" | |
})) | |
} | |
async put(e) { | |
return this.request(Object.assign(Object.assign({}, e), { | |
method: "PUT" | |
})) | |
} | |
async patch(e) { | |
return this.request(Object.assign(Object.assign({}, e), { | |
method: "PATCH" | |
})) | |
} | |
async delete(e) { | |
return this.request(Object.assign(Object.assign({}, e), { | |
method: "DELETE" | |
})) | |
} | |
} | |
l("CapacitorHttp", { | |
web: ()=>new f | |
}) | |
} | |
, | |
5350: (e,t)=>{ | |
"use strict"; | |
t.byteLength = function(e) { | |
var t = s(e) | |
, n = t[0] | |
, i = t[1]; | |
return 3 * (n + i) / 4 - i | |
} | |
, | |
t.toByteArray = function(e) { | |
var t, n, o = s(e), a = o[0], l = o[1], c = new r(function(e, t, n) { | |
return 3 * (t + n) / 4 - n | |
}(0, a, l)), u = 0, h = l > 0 ? a - 4 : a; | |
for (n = 0; n < h; n += 4) | |
t = i[e.charCodeAt(n)] << 18 | i[e.charCodeAt(n + 1)] << 12 | i[e.charCodeAt(n + 2)] << 6 | i[e.charCodeAt(n + 3)], | |
c[u++] = t >> 16 & 255, | |
c[u++] = t >> 8 & 255, | |
c[u++] = 255 & t; | |
2 === l && (t = i[e.charCodeAt(n)] << 2 | i[e.charCodeAt(n + 1)] >> 4, | |
c[u++] = 255 & t); | |
1 === l && (t = i[e.charCodeAt(n)] << 10 | i[e.charCodeAt(n + 1)] << 4 | i[e.charCodeAt(n + 2)] >> 2, | |
c[u++] = t >> 8 & 255, | |
c[u++] = 255 & t); | |
return c | |
} | |
, | |
t.fromByteArray = function(e) { | |
for (var t, i = e.length, r = i % 3, o = [], a = 16383, s = 0, c = i - r; s < c; s += a) | |
o.push(l(e, s, s + a > c ? c : s + a)); | |
1 === r ? (t = e[i - 1], | |
o.push(n[t >> 2] + n[t << 4 & 63] + "==")) : 2 === r && (t = (e[i - 2] << 8) + e[i - 1], | |
o.push(n[t >> 10] + n[t >> 4 & 63] + n[t << 2 & 63] + "=")); | |
return o.join("") | |
} | |
; | |
for (var n = [], i = [], r = "undefined" != typeof Uint8Array ? Uint8Array : Array, o = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", a = 0; a < 64; ++a) | |
n[a] = o[a], | |
i[o.charCodeAt(a)] = a; | |
function s(e) { | |
var t = e.length; | |
if (t % 4 > 0) | |
throw new Error("Invalid string. Length must be a multiple of 4"); | |
var n = e.indexOf("="); | |
return -1 === n && (n = t), | |
[n, n === t ? 0 : 4 - n % 4] | |
} | |
function l(e, t, i) { | |
for (var r, o, a = [], s = t; s < i; s += 3) | |
r = (e[s] << 16 & 16711680) + (e[s + 1] << 8 & 65280) + (255 & e[s + 2]), | |
a.push(n[(o = r) >> 18 & 63] + n[o >> 12 & 63] + n[o >> 6 & 63] + n[63 & o]); | |
return a.join("") | |
} | |
i["-".charCodeAt(0)] = 62, | |
i["_".charCodeAt(0)] = 63 | |
} | |
, | |
4686: (e,t,n)=>{ | |
"use strict"; | |
const i = n(5350) | |
, r = n(7947) | |
, o = "function" == typeof Symbol && "function" == typeof Symbol.for ? Symbol.for("nodejs.util.inspect.custom") : null; | |
t.Buffer = l, | |
t.SlowBuffer = function(e) { | |
+e != e && (e = 0); | |
return l.alloc(+e) | |
} | |
, | |
t.INSPECT_MAX_BYTES = 50; | |
const a = 2147483647; | |
function s(e) { | |
if (e > a) | |
throw new RangeError('The value "' + e + '" is invalid for option "size"'); | |
const t = new Uint8Array(e); | |
return Object.setPrototypeOf(t, l.prototype), | |
t | |
} | |
function l(e, t, n) { | |
if ("number" == typeof e) { | |
if ("string" == typeof t) | |
throw new TypeError('The "string" argument must be of type string. Received type number'); | |
return h(e) | |
} | |
return c(e, t, n) | |
} | |
function c(e, t, n) { | |
if ("string" == typeof e) | |
return function(e, t) { | |
"string" == typeof t && "" !== t || (t = "utf8"); | |
if (!l.isEncoding(t)) | |
throw new TypeError("Unknown encoding: " + t); | |
const n = 0 | m(e, t); | |
let i = s(n); | |
const r = i.write(e, t); | |
r !== n && (i = i.slice(0, r)); | |
return i | |
}(e, t); | |
if (ArrayBuffer.isView(e)) | |
return function(e) { | |
if (Z(e, Uint8Array)) { | |
const t = new Uint8Array(e); | |
return p(t.buffer, t.byteOffset, t.byteLength) | |
} | |
return d(e) | |
}(e); | |
if (null == e) | |
throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof e); | |
if (Z(e, ArrayBuffer) || e && Z(e.buffer, ArrayBuffer)) | |
return p(e, t, n); | |
if ("undefined" != typeof SharedArrayBuffer && (Z(e, SharedArrayBuffer) || e && Z(e.buffer, SharedArrayBuffer))) | |
return p(e, t, n); | |
if ("number" == typeof e) | |
throw new TypeError('The "value" argument must not be of type number. Received type number'); | |
const i = e.valueOf && e.valueOf(); | |
if (null != i && i !== e) | |
return l.from(i, t, n); | |
const r = function(e) { | |
if (l.isBuffer(e)) { | |
const t = 0 | f(e.length) | |
, n = s(t); | |
return 0 === n.length || e.copy(n, 0, 0, t), | |
n | |
} | |
if (void 0 !== e.length) | |
return "number" != typeof e.length || X(e.length) ? s(0) : d(e); | |
if ("Buffer" === e.type && Array.isArray(e.data)) | |
return d(e.data) | |
}(e); | |
if (r) | |
return r; | |
if ("undefined" != typeof Symbol && null != Symbol.toPrimitive && "function" == typeof e[Symbol.toPrimitive]) | |
return l.from(e[Symbol.toPrimitive]("string"), t, n); | |
throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof e) | |
} | |
function u(e) { | |
if ("number" != typeof e) | |
throw new TypeError('"size" argument must be of type number'); | |
if (e < 0) | |
throw new RangeError('The value "' + e + '" is invalid for option "size"') | |
} | |
function h(e) { | |
return u(e), | |
s(e < 0 ? 0 : 0 | f(e)) | |
} | |
function d(e) { | |
const t = e.length < 0 ? 0 : 0 | f(e.length) | |
, n = s(t); | |
for (let i = 0; i < t; i += 1) | |
n[i] = 255 & e[i]; | |
return n | |
} | |
function p(e, t, n) { | |
if (t < 0 || e.byteLength < t) | |
throw new RangeError('"offset" is outside of buffer bounds'); | |
if (e.byteLength < t + (n || 0)) | |
throw new RangeError('"length" is outside of buffer bounds'); | |
let i; | |
return i = void 0 === t && void 0 === n ? new Uint8Array(e) : void 0 === n ? new Uint8Array(e,t) : new Uint8Array(e,t,n), | |
Object.setPrototypeOf(i, l.prototype), | |
i | |
} | |
function f(e) { | |
if (e >= a) | |
throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + a.toString(16) + " bytes"); | |
return 0 | e | |
} | |
function m(e, t) { | |
if (l.isBuffer(e)) | |
return e.length; | |
if (ArrayBuffer.isView(e) || Z(e, ArrayBuffer)) | |
return e.byteLength; | |
if ("string" != typeof e) | |
throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof e); | |
const n = e.length | |
, i = arguments.length > 2 && !0 === arguments[2]; | |
if (!i && 0 === n) | |
return 0; | |
let r = !1; | |
for (; ; ) | |
switch (t) { | |
case "ascii": | |
case "latin1": | |
case "binary": | |
return n; | |
case "utf8": | |
case "utf-8": | |
return G(e).length; | |
case "ucs2": | |
case "ucs-2": | |
case "utf16le": | |
case "utf-16le": | |
return 2 * n; | |
case "hex": | |
return n >>> 1; | |
case "base64": | |
return K(e).length; | |
default: | |
if (r) | |
return i ? -1 : G(e).length; | |
t = ("" + t).toLowerCase(), | |
r = !0 | |
} | |
} | |
function v(e, t, n) { | |
let i = !1; | |
if ((void 0 === t || t < 0) && (t = 0), | |
t > this.length) | |
return ""; | |
if ((void 0 === n || n > this.length) && (n = this.length), | |
n <= 0) | |
return ""; | |
if ((n >>>= 0) <= (t >>>= 0)) | |
return ""; | |
for (e || (e = "utf8"); ; ) | |
switch (e) { | |
case "hex": | |
return L(this, t, n); | |
case "utf8": | |
case "utf-8": | |
return x(this, t, n); | |
case "ascii": | |
return D(this, t, n); | |
case "latin1": | |
case "binary": | |
return A(this, t, n); | |
case "base64": | |
return S(this, t, n); | |
case "ucs2": | |
case "ucs-2": | |
case "utf16le": | |
case "utf-16le": | |
return P(this, t, n); | |
default: | |
if (i) | |
throw new TypeError("Unknown encoding: " + e); | |
e = (e + "").toLowerCase(), | |
i = !0 | |
} | |
} | |
function g(e, t, n) { | |
const i = e[t]; | |
e[t] = e[n], | |
e[n] = i | |
} | |
function y(e, t, n, i, r) { | |
if (0 === e.length) | |
return -1; | |
if ("string" == typeof n ? (i = n, | |
n = 0) : n > 2147483647 ? n = 2147483647 : n < -2147483648 && (n = -2147483648), | |
X(n = +n) && (n = r ? 0 : e.length - 1), | |
n < 0 && (n = e.length + n), | |
n >= e.length) { | |
if (r) | |
return -1; | |
n = e.length - 1 | |
} else if (n < 0) { | |
if (!r) | |
return -1; | |
n = 0 | |
} | |
if ("string" == typeof t && (t = l.from(t, i)), | |
l.isBuffer(t)) | |
return 0 === t.length ? -1 : b(e, t, n, i, r); | |
if ("number" == typeof t) | |
return t &= 255, | |
"function" == typeof Uint8Array.prototype.indexOf ? r ? Uint8Array.prototype.indexOf.call(e, t, n) : Uint8Array.prototype.lastIndexOf.call(e, t, n) : b(e, [t], n, i, r); | |
throw new TypeError("val must be string, number or Buffer") | |
} | |
function b(e, t, n, i, r) { | |
let o, a = 1, s = e.length, l = t.length; | |
if (void 0 !== i && ("ucs2" === (i = String(i).toLowerCase()) || "ucs-2" === i || "utf16le" === i || "utf-16le" === i)) { | |
if (e.length < 2 || t.length < 2) | |
return -1; | |
a = 2, | |
s /= 2, | |
l /= 2, | |
n /= 2 | |
} | |
function c(e, t) { | |
return 1 === a ? e[t] : e.readUInt16BE(t * a) | |
} | |
if (r) { | |
let i = -1; | |
for (o = n; o < s; o++) | |
if (c(e, o) === c(t, -1 === i ? 0 : o - i)) { | |
if (-1 === i && (i = o), | |
o - i + 1 === l) | |
return i * a | |
} else | |
-1 !== i && (o -= o - i), | |
i = -1 | |
} else | |
for (n + l > s && (n = s - l), | |
o = n; o >= 0; o--) { | |
let n = !0; | |
for (let i = 0; i < l; i++) | |
if (c(e, o + i) !== c(t, i)) { | |
n = !1; | |
break | |
} | |
if (n) | |
return o | |
} | |
return -1 | |
} | |
function w(e, t, n, i) { | |
n = Number(n) || 0; | |
const r = e.length - n; | |
i ? (i = Number(i)) > r && (i = r) : i = r; | |
const o = t.length; | |
let a; | |
for (i > o / 2 && (i = o / 2), | |
a = 0; a < i; ++a) { | |
const i = parseInt(t.substr(2 * a, 2), 16); | |
if (X(i)) | |
return a; | |
e[n + a] = i | |
} | |
return a | |
} | |
function k(e, t, n, i) { | |
return Y(G(t, e.length - n), e, n, i) | |
} | |
function C(e, t, n, i) { | |
return Y(function(e) { | |
const t = []; | |
for (let n = 0; n < e.length; ++n) | |
t.push(255 & e.charCodeAt(n)); | |
return t | |
}(t), e, n, i) | |
} | |
function M(e, t, n, i) { | |
return Y(K(t), e, n, i) | |
} | |
function E(e, t, n, i) { | |
return Y(function(e, t) { | |
let n, i, r; | |
const o = []; | |
for (let a = 0; a < e.length && !((t -= 2) < 0); ++a) | |
n = e.charCodeAt(a), | |
i = n >> 8, | |
r = n % 256, | |
o.push(r), | |
o.push(i); | |
return o | |
}(t, e.length - n), e, n, i) | |
} | |
function S(e, t, n) { | |
return 0 === t && n === e.length ? i.fromByteArray(e) : i.fromByteArray(e.slice(t, n)) | |
} | |
function x(e, t, n) { | |
n = Math.min(e.length, n); | |
const i = []; | |
let r = t; | |
for (; r < n; ) { | |
const t = e[r]; | |
let o = null | |
, a = t > 239 ? 4 : t > 223 ? 3 : t > 191 ? 2 : 1; | |
if (r + a <= n) { | |
let n, i, s, l; | |
switch (a) { | |
case 1: | |
t < 128 && (o = t); | |
break; | |
case 2: | |
n = e[r + 1], | |
128 == (192 & n) && (l = (31 & t) << 6 | 63 & n, | |
l > 127 && (o = l)); | |
break; | |
case 3: | |
n = e[r + 1], | |
i = e[r + 2], | |
128 == (192 & n) && 128 == (192 & i) && (l = (15 & t) << 12 | (63 & n) << 6 | 63 & i, | |
l > 2047 && (l < 55296 || l > 57343) && (o = l)); | |
break; | |
case 4: | |
n = e[r + 1], | |
i = e[r + 2], | |
s = e[r + 3], | |
128 == (192 & n) && 128 == (192 & i) && 128 == (192 & s) && (l = (15 & t) << 18 | (63 & n) << 12 | (63 & i) << 6 | 63 & s, | |
l > 65535 && l < 1114112 && (o = l)) | |
} | |
} | |
null === o ? (o = 65533, | |
a = 1) : o > 65535 && (o -= 65536, | |
i.push(o >>> 10 & 1023 | 55296), | |
o = 56320 | 1023 & o), | |
i.push(o), | |
r += a | |
} | |
return function(e) { | |
const t = e.length; | |
if (t <= T) | |
return String.fromCharCode.apply(String, e); | |
let n = "" | |
, i = 0; | |
for (; i < t; ) | |
n += String.fromCharCode.apply(String, e.slice(i, i += T)); | |
return n | |
}(i) | |
} | |
t.kMaxLength = a, | |
l.TYPED_ARRAY_SUPPORT = function() { | |
try { | |
const e = new Uint8Array(1) | |
, t = { | |
foo: function() { | |
return 42 | |
} | |
}; | |
return Object.setPrototypeOf(t, Uint8Array.prototype), | |
Object.setPrototypeOf(e, t), | |
42 === e.foo() | |
} catch (e) { | |
return !1 | |
} | |
}(), | |
l.TYPED_ARRAY_SUPPORT || "undefined" == typeof console || "function" != typeof console.error || console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."), | |
Object.defineProperty(l.prototype, "parent", { | |
enumerable: !0, | |
get: function() { | |
if (l.isBuffer(this)) | |
return this.buffer | |
} | |
}), | |
Object.defineProperty(l.prototype, "offset", { | |
enumerable: !0, | |
get: function() { | |
if (l.isBuffer(this)) | |
return this.byteOffset | |
} | |
}), | |
l.poolSize = 8192, | |
l.from = function(e, t, n) { | |
return c(e, t, n) | |
} | |
, | |
Object.setPrototypeOf(l.prototype, Uint8Array.prototype), | |
Object.setPrototypeOf(l, Uint8Array), | |
l.alloc = function(e, t, n) { | |
return function(e, t, n) { | |
return u(e), | |
e <= 0 ? s(e) : void 0 !== t ? "string" == typeof n ? s(e).fill(t, n) : s(e).fill(t) : s(e) | |
}(e, t, n) | |
} | |
, | |
l.allocUnsafe = function(e) { | |
return h(e) | |
} | |
, | |
l.allocUnsafeSlow = function(e) { | |
return h(e) | |
} | |
, | |
l.isBuffer = function(e) { | |
return null != e && !0 === e._isBuffer && e !== l.prototype | |
} | |
, | |
l.compare = function(e, t) { | |
if (Z(e, Uint8Array) && (e = l.from(e, e.offset, e.byteLength)), | |
Z(t, Uint8Array) && (t = l.from(t, t.offset, t.byteLength)), | |
!l.isBuffer(e) || !l.isBuffer(t)) | |
throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'); | |
if (e === t) | |
return 0; | |
let n = e.length | |
, i = t.length; | |
for (let r = 0, o = Math.min(n, i); r < o; ++r) | |
if (e[r] !== t[r]) { | |
n = e[r], | |
i = t[r]; | |
break | |
} | |
return n < i ? -1 : i < n ? 1 : 0 | |
} | |
, | |
l.isEncoding = function(e) { | |
switch (String(e).toLowerCase()) { | |
case "hex": | |
case "utf8": | |
case "utf-8": | |
case "ascii": | |
case "latin1": | |
case "binary": | |
case "base64": | |
case "ucs2": | |
case "ucs-2": | |
case "utf16le": | |
case "utf-16le": | |
return !0; | |
default: | |
return !1 | |
} | |
} | |
, | |
l.concat = function(e, t) { | |
if (!Array.isArray(e)) | |
throw new TypeError('"list" argument must be an Array of Buffers'); | |
if (0 === e.length) | |
return l.alloc(0); | |
let n; | |
if (void 0 === t) | |
for (t = 0, | |
n = 0; n < e.length; ++n) | |
t += e[n].length; | |
const i = l.allocUnsafe(t); | |
let r = 0; | |
for (n = 0; n < e.length; ++n) { | |
let t = e[n]; | |
if (Z(t, Uint8Array)) | |
r + t.length > i.length ? (l.isBuffer(t) || (t = l.from(t)), | |
t.copy(i, r)) : Uint8Array.prototype.set.call(i, t, r); | |
else { | |
if (!l.isBuffer(t)) | |
throw new TypeError('"list" argument must be an Array of Buffers'); | |
t.copy(i, r) | |
} | |
r += t.length | |
} | |
return i | |
} | |
, | |
l.byteLength = m, | |
l.prototype._isBuffer = !0, | |
l.prototype.swap16 = function() { | |
const e = this.length; | |
if (e % 2 != 0) | |
throw new RangeError("Buffer size must be a multiple of 16-bits"); | |
for (let t = 0; t < e; t += 2) | |
g(this, t, t + 1); | |
return this | |
} | |
, | |
l.prototype.swap32 = function() { | |
const e = this.length; | |
if (e % 4 != 0) | |
throw new RangeError("Buffer size must be a multiple of 32-bits"); | |
for (let t = 0; t < e; t += 4) | |
g(this, t, t + 3), | |
g(this, t + 1, t + 2); | |
return this | |
} | |
, | |
l.prototype.swap64 = function() { | |
const e = this.length; | |
if (e % 8 != 0) | |
throw new RangeError("Buffer size must be a multiple of 64-bits"); | |
for (let t = 0; t < e; t += 8) | |
g(this, t, t + 7), | |
g(this, t + 1, t + 6), | |
g(this, t + 2, t + 5), | |
g(this, t + 3, t + 4); | |
return this | |
} | |
, | |
l.prototype.toString = function() { | |
const e = this.length; | |
return 0 === e ? "" : 0 === arguments.length ? x(this, 0, e) : v.apply(this, arguments) | |
} | |
, | |
l.prototype.toLocaleString = l.prototype.toString, | |
l.prototype.equals = function(e) { | |
if (!l.isBuffer(e)) | |
throw new TypeError("Argument must be a Buffer"); | |
return this === e || 0 === l.compare(this, e) | |
} | |
, | |
l.prototype.inspect = function() { | |
let e = ""; | |
const n = t.INSPECT_MAX_BYTES; | |
return e = this.toString("hex", 0, n).replace(/(.{2})/g, "$1 ").trim(), | |
this.length > n && (e += " ... "), | |
"<Buffer " + e + ">" | |
} | |
, | |
o && (l.prototype[o] = l.prototype.inspect), | |
l.prototype.compare = function(e, t, n, i, r) { | |
if (Z(e, Uint8Array) && (e = l.from(e, e.offset, e.byteLength)), | |
!l.isBuffer(e)) | |
throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof e); | |
if (void 0 === t && (t = 0), | |
void 0 === n && (n = e ? e.length : 0), | |
void 0 === i && (i = 0), | |
void 0 === r && (r = this.length), | |
t < 0 || n > e.length || i < 0 || r > this.length) | |
throw new RangeError("out of range index"); | |
if (i >= r && t >= n) | |
return 0; | |
if (i >= r) | |
return -1; | |
if (t >= n) | |
return 1; | |
if (this === e) | |
return 0; | |
let o = (r >>>= 0) - (i >>>= 0) | |
, a = (n >>>= 0) - (t >>>= 0); | |
const s = Math.min(o, a) | |
, c = this.slice(i, r) | |
, u = e.slice(t, n); | |
for (let e = 0; e < s; ++e) | |
if (c[e] !== u[e]) { | |
o = c[e], | |
a = u[e]; | |
break | |
} | |
return o < a ? -1 : a < o ? 1 : 0 | |
} | |
, | |
l.prototype.includes = function(e, t, n) { | |
return -1 !== this.indexOf(e, t, n) | |
} | |
, | |
l.prototype.indexOf = function(e, t, n) { | |
return y(this, e, t, n, !0) | |
} | |
, | |
l.prototype.lastIndexOf = function(e, t, n) { | |
return y(this, e, t, n, !1) | |
} | |
, | |
l.prototype.write = function(e, t, n, i) { | |
if (void 0 === t) | |
i = "utf8", | |
n = this.length, | |
t = 0; | |
else if (void 0 === n && "string" == typeof t) | |
i = t, | |
n = this.length, | |
t = 0; | |
else { | |
if (!isFinite(t)) | |
throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported"); | |
t >>>= 0, | |
isFinite(n) ? (n >>>= 0, | |
void 0 === i && (i = "utf8")) : (i = n, | |
n = void 0) | |
} | |
const r = this.length - t; | |
if ((void 0 === n || n > r) && (n = r), | |
e.length > 0 && (n < 0 || t < 0) || t > this.length) | |
throw new RangeError("Attempt to write outside buffer bounds"); | |
i || (i = "utf8"); | |
let o = !1; | |
for (; ; ) | |
switch (i) { | |
case "hex": | |
return w(this, e, t, n); | |
case "utf8": | |
case "utf-8": | |
return k(this, e, t, n); | |
case "ascii": | |
case "latin1": | |
case "binary": | |
return C(this, e, t, n); | |
case "base64": | |
return M(this, e, t, n); | |
case "ucs2": | |
case "ucs-2": | |
case "utf16le": | |
case "utf-16le": | |
return E(this, e, t, n); | |
default: | |
if (o) | |
throw new TypeError("Unknown encoding: " + i); | |
i = ("" + i).toLowerCase(), | |
o = !0 | |
} | |
} | |
, | |
l.prototype.toJSON = function() { | |
return { | |
type: "Buffer", | |
data: Array.prototype.slice.call(this._arr || this, 0) | |
} | |
} | |
; | |
const T = 4096; | |
function D(e, t, n) { | |
let i = ""; | |
n = Math.min(e.length, n); | |
for (let r = t; r < n; ++r) | |
i += String.fromCharCode(127 & e[r]); | |
return i | |
} | |
function A(e, t, n) { | |
let i = ""; | |
n = Math.min(e.length, n); | |
for (let r = t; r < n; ++r) | |
i += String.fromCharCode(e[r]); | |
return i | |
} | |
function L(e, t, n) { | |
const i = e.length; | |
(!t || t < 0) && (t = 0), | |
(!n || n < 0 || n > i) && (n = i); | |
let r = ""; | |
for (let i = t; i < n; ++i) | |
r += $[e[i]]; | |
return r | |
} | |
function P(e, t, n) { | |
const i = e.slice(t, n); | |
let r = ""; | |
for (let e = 0; e < i.length - 1; e += 2) | |
r += String.fromCharCode(i[e] + 256 * i[e + 1]); | |
return r | |
} | |
function I(e, t, n) { | |
if (e % 1 != 0 || e < 0) | |
throw new RangeError("offset is not uint"); | |
if (e + t > n) | |
throw new RangeError("Trying to access beyond buffer length") | |
} | |
function F(e, t, n, i, r, o) { | |
if (!l.isBuffer(e)) | |
throw new TypeError('"buffer" argument must be a Buffer instance'); | |
if (t > r || t < o) | |
throw new RangeError('"value" argument is out of bounds'); | |
if (n + i > e.length) | |
throw new RangeError("Index out of range") | |
} | |
function O(e, t, n, i, r) { | |
U(t, i, r, e, n, 7); | |
let o = Number(t & BigInt(4294967295)); | |
e[n++] = o, | |
o >>= 8, | |
e[n++] = o, | |
o >>= 8, | |
e[n++] = o, | |
o >>= 8, | |
e[n++] = o; | |
let a = Number(t >> BigInt(32) & BigInt(4294967295)); | |
return e[n++] = a, | |
a >>= 8, | |
e[n++] = a, | |
a >>= 8, | |
e[n++] = a, | |
a >>= 8, | |
e[n++] = a, | |
n | |
} | |
function B(e, t, n, i, r) { | |
U(t, i, r, e, n, 7); | |
let o = Number(t & BigInt(4294967295)); | |
e[n + 7] = o, | |
o >>= 8, | |
e[n + 6] = o, | |
o >>= 8, | |
e[n + 5] = o, | |
o >>= 8, | |
e[n + 4] = o; | |
let a = Number(t >> BigInt(32) & BigInt(4294967295)); | |
return e[n + 3] = a, | |
a >>= 8, | |
e[n + 2] = a, | |
a >>= 8, | |
e[n + 1] = a, | |
a >>= 8, | |
e[n] = a, | |
n + 8 | |
} | |
function N(e, t, n, i, r, o) { | |
if (n + i > e.length) | |
throw new RangeError("Index out of range"); | |
if (n < 0) | |
throw new RangeError("Index out of range") | |
} | |
function R(e, t, n, i, o) { | |
return t = +t, | |
n >>>= 0, | |
o || N(e, 0, n, 4), | |
r.write(e, t, n, i, 23, 4), | |
n + 4 | |
} | |
function H(e, t, n, i, o) { | |
return t = +t, | |
n >>>= 0, | |
o || N(e, 0, n, 8), | |
r.write(e, t, n, i, 52, 8), | |
n + 8 | |
} | |
l.prototype.slice = function(e, t) { | |
const n = this.length; | |
(e = ~~e) < 0 ? (e += n) < 0 && (e = 0) : e > n && (e = n), | |
(t = void 0 === t ? n : ~~t) < 0 ? (t += n) < 0 && (t = 0) : t > n && (t = n), | |
t < e && (t = e); | |
const i = this.subarray(e, t); | |
return Object.setPrototypeOf(i, l.prototype), | |
i | |
} | |
, | |
l.prototype.readUintLE = l.prototype.readUIntLE = function(e, t, n) { | |
e >>>= 0, | |
t >>>= 0, | |
n || I(e, t, this.length); | |
let i = this[e] | |
, r = 1 | |
, o = 0; | |
for (; ++o < t && (r *= 256); ) | |
i += this[e + o] * r; | |
return i | |
} | |
, | |
l.prototype.readUintBE = l.prototype.readUIntBE = function(e, t, n) { | |
e >>>= 0, | |
t >>>= 0, | |
n || I(e, t, this.length); | |
let i = this[e + --t] | |
, r = 1; | |
for (; t > 0 && (r *= 256); ) | |
i += this[e + --t] * r; | |
return i | |
} | |
, | |
l.prototype.readUint8 = l.prototype.readUInt8 = function(e, t) { | |
return e >>>= 0, | |
t || I(e, 1, this.length), | |
this[e] | |
} | |
, | |
l.prototype.readUint16LE = l.prototype.readUInt16LE = function(e, t) { | |
return e >>>= 0, | |
t || I(e, 2, this.length), | |
this[e] | this[e + 1] << 8 | |
} | |
, | |
l.prototype.readUint16BE = l.prototype.readUInt16BE = function(e, t) { | |
return e >>>= 0, | |
t || I(e, 2, this.length), | |
this[e] << 8 | this[e + 1] | |
} | |
, | |
l.prototype.readUint32LE = l.prototype.readUInt32LE = function(e, t) { | |
return e >>>= 0, | |
t || I(e, 4, this.length), | |
(this[e] | this[e + 1] << 8 | this[e + 2] << 16) + 16777216 * this[e + 3] | |
} | |
, | |
l.prototype.readUint32BE = l.prototype.readUInt32BE = function(e, t) { | |
return e >>>= 0, | |
t || I(e, 4, this.length), | |
16777216 * this[e] + (this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3]) | |
} | |
, | |
l.prototype.readBigUInt64LE = Q((function(e) { | |
_(e >>>= 0, "offset"); | |
const t = this[e] | |
, n = this[e + 7]; | |
void 0 !== t && void 0 !== n || W(e, this.length - 8); | |
const i = t + 256 * this[++e] + 65536 * this[++e] + this[++e] * 2 ** 24 | |
, r = this[++e] + 256 * this[++e] + 65536 * this[++e] + n * 2 ** 24; | |
return BigInt(i) + (BigInt(r) << BigInt(32)) | |
} | |
)), | |
l.prototype.readBigUInt64BE = Q((function(e) { | |
_(e >>>= 0, "offset"); | |
const t = this[e] | |
, n = this[e + 7]; | |
void 0 !== t && void 0 !== n || W(e, this.length - 8); | |
const i = t * 2 ** 24 + 65536 * this[++e] + 256 * this[++e] + this[++e] | |
, r = this[++e] * 2 ** 24 + 65536 * this[++e] + 256 * this[++e] + n; | |
return (BigInt(i) << BigInt(32)) + BigInt(r) | |
} | |
)), | |
l.prototype.readIntLE = function(e, t, n) { | |
e >>>= 0, | |
t >>>= 0, | |
n || I(e, t, this.length); | |
let i = this[e] | |
, r = 1 | |
, o = 0; | |
for (; ++o < t && (r *= 256); ) | |
i += this[e + o] * r; | |
return r *= 128, | |
i >= r && (i -= Math.pow(2, 8 * t)), | |
i | |
} | |
, | |
l.prototype.readIntBE = function(e, t, n) { | |
e >>>= 0, | |
t >>>= 0, | |
n || I(e, t, this.length); | |
let i = t | |
, r = 1 | |
, o = this[e + --i]; | |
for (; i > 0 && (r *= 256); ) | |
o += this[e + --i] * r; | |
return r *= 128, | |
o >= r && (o -= Math.pow(2, 8 * t)), | |
o | |
} | |
, | |
l.prototype.readInt8 = function(e, t) { | |
return e >>>= 0, | |
t || I(e, 1, this.length), | |
128 & this[e] ? -1 * (255 - this[e] + 1) : this[e] | |
} | |
, | |
l.prototype.readInt16LE = function(e, t) { | |
e >>>= 0, | |
t || I(e, 2, this.length); | |
const n = this[e] | this[e + 1] << 8; | |
return 32768 & n ? 4294901760 | n : n | |
} | |
, | |
l.prototype.readInt16BE = function(e, t) { | |
e >>>= 0, | |
t || I(e, 2, this.length); | |
const n = this[e + 1] | this[e] << 8; | |
return 32768 & n ? 4294901760 | n : n | |
} | |
, | |
l.prototype.readInt32LE = function(e, t) { | |
return e >>>= 0, | |
t || I(e, 4, this.length), | |
this[e] | this[e + 1] << 8 | this[e + 2] << 16 | this[e + 3] << 24 | |
} | |
, | |
l.prototype.readInt32BE = function(e, t) { | |
return e >>>= 0, | |
t || I(e, 4, this.length), | |
this[e] << 24 | this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3] | |
} | |
, | |
l.prototype.readBigInt64LE = Q((function(e) { | |
_(e >>>= 0, "offset"); | |
const t = this[e] | |
, n = this[e + 7]; | |
void 0 !== t && void 0 !== n || W(e, this.length - 8); | |
const i = this[e + 4] + 256 * this[e + 5] + 65536 * this[e + 6] + (n << 24); | |
return (BigInt(i) << BigInt(32)) + BigInt(t + 256 * this[++e] + 65536 * this[++e] + this[++e] * 2 ** 24) | |
} | |
)), | |
l.prototype.readBigInt64BE = Q((function(e) { | |
_(e >>>= 0, "offset"); | |
const t = this[e] | |
, n = this[e + 7]; | |
void 0 !== t && void 0 !== n || W(e, this.length - 8); | |
const i = (t << 24) + 65536 * this[++e] + 256 * this[++e] + this[++e]; | |
return (BigInt(i) << BigInt(32)) + BigInt(this[++e] * 2 ** 24 + 65536 * this[++e] + 256 * this[++e] + n) | |
} | |
)), | |
l.prototype.readFloatLE = function(e, t) { | |
return e >>>= 0, | |
t || I(e, 4, this.length), | |
r.read(this, e, !0, 23, 4) | |
} | |
, | |
l.prototype.readFloatBE = function(e, t) { | |
return e >>>= 0, | |
t || I(e, 4, this.length), | |
r.read(this, e, !1, 23, 4) | |
} | |
, | |
l.prototype.readDoubleLE = function(e, t) { | |
return e >>>= 0, | |
t || I(e, 8, this.length), | |
r.read(this, e, !0, 52, 8) | |
} | |
, | |
l.prototype.readDoubleBE = function(e, t) { | |
return e >>>= 0, | |
t || I(e, 8, this.length), | |
r.read(this, e, !1, 52, 8) | |
} | |
, | |
l.prototype.writeUintLE = l.prototype.writeUIntLE = function(e, t, n, i) { | |
if (e = +e, | |
t >>>= 0, | |
n >>>= 0, | |
!i) { | |
F(this, e, t, n, Math.pow(2, 8 * n) - 1, 0) | |
} | |
let r = 1 | |
, o = 0; | |
for (this[t] = 255 & e; ++o < n && (r *= 256); ) | |
this[t + o] = e / r & 255; | |
return t + n | |
} | |
, | |
l.prototype.writeUintBE = l.prototype.writeUIntBE = function(e, t, n, i) { | |
if (e = +e, | |
t >>>= 0, | |
n >>>= 0, | |
!i) { | |
F(this, e, t, n, Math.pow(2, 8 * n) - 1, 0) | |
} | |
let r = n - 1 | |
, o = 1; | |
for (this[t + r] = 255 & e; --r >= 0 && (o *= 256); ) | |
this[t + r] = e / o & 255; | |
return t + n | |
} | |
, | |
l.prototype.writeUint8 = l.prototype.writeUInt8 = function(e, t, n) { | |
return e = +e, | |
t >>>= 0, | |
n || F(this, e, t, 1, 255, 0), | |
this[t] = 255 & e, | |
t + 1 | |
} | |
, | |
l.prototype.writeUint16LE = l.prototype.writeUInt16LE = function(e, t, n) { | |
return e = +e, | |
t >>>= 0, | |
n || F(this, e, t, 2, 65535, 0), | |
this[t] = 255 & e, | |
this[t + 1] = e >>> 8, | |
t + 2 | |
} | |
, | |
l.prototype.writeUint16BE = l.prototype.writeUInt16BE = function(e, t, n) { | |
return e = +e, | |
t >>>= 0, | |
n || F(this, e, t, 2, 65535, 0), | |
this[t] = e >>> 8, | |
this[t + 1] = 255 & e, | |
t + 2 | |
} | |
, | |
l.prototype.writeUint32LE = l.prototype.writeUInt32LE = function(e, t, n) { | |
return e = +e, | |
t >>>= 0, | |
n || F(this, e, t, 4, 4294967295, 0), | |
this[t + 3] = e >>> 24, | |
this[t + 2] = e >>> 16, | |
this[t + 1] = e >>> 8, | |
this[t] = 255 & e, | |
t + 4 | |
} | |
, | |
l.prototype.writeUint32BE = l.prototype.writeUInt32BE = function(e, t, n) { | |
return e = +e, | |
t >>>= 0, | |
n || F(this, e, t, 4, 4294967295, 0), | |
this[t] = e >>> 24, | |
this[t + 1] = e >>> 16, | |
this[t + 2] = e >>> 8, | |
this[t + 3] = 255 & e, | |
t + 4 | |
} | |
, | |
l.prototype.writeBigUInt64LE = Q((function(e, t=0) { | |
return O(this, e, t, BigInt(0), BigInt("0xffffffffffffffff")) | |
} | |
)), | |
l.prototype.writeBigUInt64BE = Q((function(e, t=0) { | |
return B(this, e, t, BigInt(0), BigInt("0xffffffffffffffff")) | |
} | |
)), | |
l.prototype.writeIntLE = function(e, t, n, i) { | |
if (e = +e, | |
t >>>= 0, | |
!i) { | |
const i = Math.pow(2, 8 * n - 1); | |
F(this, e, t, n, i - 1, -i) | |
} | |
let r = 0 | |
, o = 1 | |
, a = 0; | |
for (this[t] = 255 & e; ++r < n && (o *= 256); ) | |
e < 0 && 0 === a && 0 !== this[t + r - 1] && (a = 1), | |
this[t + r] = (e / o | 0) - a & 255; | |
return t + n | |
} | |
, | |
l.prototype.writeIntBE = function(e, t, n, i) { | |
if (e = +e, | |
t >>>= 0, | |
!i) { | |
const i = Math.pow(2, 8 * n - 1); | |
F(this, e, t, n, i - 1, -i) | |
} | |
let r = n - 1 | |
, o = 1 | |
, a = 0; | |
for (this[t + r] = 255 & e; --r >= 0 && (o *= 256); ) | |
e < 0 && 0 === a && 0 !== this[t + r + 1] && (a = 1), | |
this[t + r] = (e / o | 0) - a & 255; | |
return t + n | |
} | |
, | |
l.prototype.writeInt8 = function(e, t, n) { | |
return e = +e, | |
t >>>= 0, | |
n || F(this, e, t, 1, 127, -128), | |
e < 0 && (e = 255 + e + 1), | |
this[t] = 255 & e, | |
t + 1 | |
} | |
, | |
l.prototype.writeInt16LE = function(e, t, n) { | |
return e = +e, | |
t >>>= 0, | |
n || F(this, e, t, 2, 32767, -32768), | |
this[t] = 255 & e, | |
this[t + 1] = e >>> 8, | |
t + 2 | |
} | |
, | |
l.prototype.writeInt16BE = function(e, t, n) { | |
return e = +e, | |
t >>>= 0, | |
n || F(this, e, t, 2, 32767, -32768), | |
this[t] = e >>> 8, | |
this[t + 1] = 255 & e, | |
t + 2 | |
} | |
, | |
l.prototype.writeInt32LE = function(e, t, n) { | |
return e = +e, | |
t >>>= 0, | |
n || F(this, e, t, 4, 2147483647, -2147483648), | |
this[t] = 255 & e, | |
this[t + 1] = e >>> 8, | |
this[t + 2] = e >>> 16, | |
this[t + 3] = e >>> 24, | |
t + 4 | |
} | |
, | |
l.prototype.writeInt32BE = function(e, t, n) { | |
return e = +e, | |
t >>>= 0, | |
n || F(this, e, t, 4, 2147483647, -2147483648), | |
e < 0 && (e = 4294967295 + e + 1), | |
this[t] = e >>> 24, | |
this[t + 1] = e >>> 16, | |
this[t + 2] = e >>> 8, | |
this[t + 3] = 255 & e, | |
t + 4 | |
} | |
, | |
l.prototype.writeBigInt64LE = Q((function(e, t=0) { | |
return O(this, e, t, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff")) | |
} | |
)), | |
l.prototype.writeBigInt64BE = Q((function(e, t=0) { | |
return B(this, e, t, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff")) | |
} | |
)), | |
l.prototype.writeFloatLE = function(e, t, n) { | |
return R(this, e, t, !0, n) | |
} | |
, | |
l.prototype.writeFloatBE = function(e, t, n) { | |
return R(this, e, t, !1, n) | |
} | |
, | |
l.prototype.writeDoubleLE = function(e, t, n) { | |
return H(this, e, t, !0, n) | |
} | |
, | |
l.prototype.writeDoubleBE = function(e, t, n) { | |
return H(this, e, t, !1, n) | |
} | |
, | |
l.prototype.copy = function(e, t, n, i) { | |
if (!l.isBuffer(e)) | |
throw new TypeError("argument should be a Buffer"); | |
if (n || (n = 0), | |
i || 0 === i || (i = this.length), | |
t >= e.length && (t = e.length), | |
t || (t = 0), | |
i > 0 && i < n && (i = n), | |
i === n) | |
return 0; | |
if (0 === e.length || 0 === this.length) | |
return 0; | |
if (t < 0) | |
throw new RangeError("targetStart out of bounds"); | |
if (n < 0 || n >= this.length) | |
throw new RangeError("Index out of range"); | |
if (i < 0) | |
throw new RangeError("sourceEnd out of bounds"); | |
i > this.length && (i = this.length), | |
e.length - t < i - n && (i = e.length - t + n); | |
const r = i - n; | |
return this === e && "function" == typeof Uint8Array.prototype.copyWithin ? this.copyWithin(t, n, i) : Uint8Array.prototype.set.call(e, this.subarray(n, i), t), | |
r | |
} | |
, | |
l.prototype.fill = function(e, t, n, i) { | |
if ("string" == typeof e) { | |
if ("string" == typeof t ? (i = t, | |
t = 0, | |
n = this.length) : "string" == typeof n && (i = n, | |
n = this.length), | |
void 0 !== i && "string" != typeof i) | |
throw new TypeError("encoding must be a string"); | |
if ("string" == typeof i && !l.isEncoding(i)) | |
throw new TypeError("Unknown encoding: " + i); | |
if (1 === e.length) { | |
const t = e.charCodeAt(0); | |
("utf8" === i && t < 128 || "latin1" === i) && (e = t) | |
} | |
} else | |
"number" == typeof e ? e &= 255 : "boolean" == typeof e && (e = Number(e)); | |
if (t < 0 || this.length < t || this.length < n) | |
throw new RangeError("Out of range index"); | |
if (n <= t) | |
return this; | |
let r; | |
if (t >>>= 0, | |
n = void 0 === n ? this.length : n >>> 0, | |
e || (e = 0), | |
"number" == typeof e) | |
for (r = t; r < n; ++r) | |
this[r] = e; | |
else { | |
const o = l.isBuffer(e) ? e : l.from(e, i) | |
, a = o.length; | |
if (0 === a) | |
throw new TypeError('The value "' + e + '" is invalid for argument "value"'); | |
for (r = 0; r < n - t; ++r) | |
this[r + t] = o[r % a] | |
} | |
return this | |
} | |
; | |
const V = {}; | |
function z(e, t, n) { | |
V[e] = class extends n { | |
constructor() { | |
super(), | |
Object.defineProperty(this, "message", { | |
value: t.apply(this, arguments), | |
writable: !0, | |
configurable: !0 | |
}), | |
this.name = `${this.name} [${e}]`, | |
this.stack, | |
delete this.name | |
} | |
get code() { | |
return e | |
} | |
set code(e) { | |
Object.defineProperty(this, "code", { | |
configurable: !0, | |
enumerable: !0, | |
value: e, | |
writable: !0 | |
}) | |
} | |
toString() { | |
return `${this.name} [${e}]: ${this.message}` | |
} | |
} | |
} | |
function q(e) { | |
let t = "" | |
, n = e.length; | |
const i = "-" === e[0] ? 1 : 0; | |
for (; n >= i + 4; n -= 3) | |
t = `_${e.slice(n - 3, n)}${t}`; | |
return `${e.slice(0, n)}${t}` | |
} | |
function U(e, t, n, i, r, o) { | |
if (e > n || e < t) { | |
const i = "bigint" == typeof t ? "n" : ""; | |
let r; | |
throw r = o > 3 ? 0 === t || t === BigInt(0) ? `>= 0${i} and < 2${i} ** ${8 * (o + 1)}${i}` : `>= -(2${i} ** ${8 * (o + 1) - 1}${i}) and < 2 ** ${8 * (o + 1) - 1}${i}` : `>= ${t}${i} and <= ${n}${i}`, | |
new V.ERR_OUT_OF_RANGE("value",r,e) | |
} | |
!function(e, t, n) { | |
_(t, "offset"), | |
void 0 !== e[t] && void 0 !== e[t + n] || W(t, e.length - (n + 1)) | |
}(i, r, o) | |
} | |
function _(e, t) { | |
if ("number" != typeof e) | |
throw new V.ERR_INVALID_ARG_TYPE(t,"number",e) | |
} | |
function W(e, t, n) { | |
if (Math.floor(e) !== e) | |
throw _(e, n), | |
new V.ERR_OUT_OF_RANGE(n || "offset","an integer",e); | |
if (t < 0) | |
throw new V.ERR_BUFFER_OUT_OF_BOUNDS; | |
throw new V.ERR_OUT_OF_RANGE(n || "offset",`>= ${n ? 1 : 0} and <= ${t}`,e) | |
} | |
z("ERR_BUFFER_OUT_OF_BOUNDS", (function(e) { | |
return e ? `${e} is outside of buffer bounds` : "Attempt to access memory outside buffer bounds" | |
} | |
), RangeError), | |
z("ERR_INVALID_ARG_TYPE", (function(e, t) { | |
return `The "${e}" argument must be of type number. Received type ${typeof t}` | |
} | |
), TypeError), | |
z("ERR_OUT_OF_RANGE", (function(e, t, n) { | |
let i = `The value of "${e}" is out of range.` | |
, r = n; | |
return Number.isInteger(n) && Math.abs(n) > 2 ** 32 ? r = q(String(n)) : "bigint" == typeof n && (r = String(n), | |
(n > BigInt(2) ** BigInt(32) || n < -(BigInt(2) ** BigInt(32))) && (r = q(r)), | |
r += "n"), | |
i += ` It must be ${t}. Received ${r}`, | |
i | |
} | |
), RangeError); | |
const j = /[^+/0-9A-Za-z-_]/g; | |
function G(e, t) { | |
let n; | |
t = t || 1 / 0; | |
const i = e.length; | |
let r = null; | |
const o = []; | |
for (let a = 0; a < i; ++a) { | |
if (n = e.charCodeAt(a), | |
n > 55295 && n < 57344) { | |
if (!r) { | |
if (n > 56319) { | |
(t -= 3) > -1 && o.push(239, 191, 189); | |
continue | |
} | |
if (a + 1 === i) { | |
(t -= 3) > -1 && o.push(239, 191, 189); | |
continue | |
} | |
r = n; | |
continue | |
} | |
if (n < 56320) { | |
(t -= 3) > -1 && o.push(239, 191, 189), | |
r = n; | |
continue | |
} | |
n = 65536 + (r - 55296 << 10 | n - 56320) | |
} else | |
r && (t -= 3) > -1 && o.push(239, 191, 189); | |
if (r = null, | |
n < 128) { | |
if ((t -= 1) < 0) | |
break; | |
o.push(n) | |
} else if (n < 2048) { | |
if ((t -= 2) < 0) | |
break; | |
o.push(n >> 6 | 192, 63 & n | 128) | |
} else if (n < 65536) { | |
if ((t -= 3) < 0) | |
break; | |
o.push(n >> 12 | 224, n >> 6 & 63 | 128, 63 & n | 128) | |
} else { | |
if (!(n < 1114112)) | |
throw new Error("Invalid code point"); | |
if ((t -= 4) < 0) | |
break; | |
o.push(n >> 18 | 240, n >> 12 & 63 | 128, n >> 6 & 63 | 128, 63 & n | 128) | |
} | |
} | |
return o | |
} | |
function K(e) { | |
return i.toByteArray(function(e) { | |
if ((e = (e = e.split("=")[0]).trim().replace(j, "")).length < 2) | |
return ""; | |
for (; e.length % 4 != 0; ) | |
e += "="; | |
return e | |
}(e)) | |
} | |
function Y(e, t, n, i) { | |
let r; | |
for (r = 0; r < i && !(r + n >= t.length || r >= e.length); ++r) | |
t[r + n] = e[r]; | |
return r | |
} | |
function Z(e, t) { | |
return e instanceof t || null != e && null != e.constructor && null != e.constructor.name && e.constructor.name === t.name | |
} | |
function X(e) { | |
return e != e | |
} | |
const $ = function() { | |
const e = "0123456789abcdef" | |
, t = new Array(256); | |
for (let n = 0; n < 16; ++n) { | |
const i = 16 * n; | |
for (let r = 0; r < 16; ++r) | |
t[i + r] = e[n] + e[r] | |
} | |
return t | |
}(); | |
function Q(e) { | |
return "undefined" == typeof BigInt ? J : e | |
} | |
function J() { | |
throw new Error("BigInt not supported") | |
} | |
} | |
, | |
1979: (e,t,n)=>{ | |
"use strict"; | |
n.r(t), | |
n.d(t, { | |
RateAppWeb: ()=>r | |
}); | |
var i = n(6043); | |
class r extends i.E_ { | |
async requestReview() {} | |
} | |
} | |
, | |
7137: e=>{ | |
"use strict"; | |
e.exports = function(e, t) { | |
var n, i = String(e), r = 0; | |
if ("string" != typeof t) | |
throw new Error("Expected character"); | |
n = i.indexOf(t); | |
for (; -1 !== n; ) | |
r++, | |
n = i.indexOf(t, n + t.length); | |
return r | |
} | |
} | |
, | |
1606: (e,t)=>{ | |
"use strict"; | |
t.A = function(e, t) { | |
var o = t || {} | |
, a = !1 === o.padLeft ? r : i | |
, s = o.padRight ? i : r; | |
e[e.length - 1] === r && (e = e.concat(r)); | |
return e.join(s + n + a).trim() | |
} | |
; | |
var n = "," | |
, i = " " | |
, r = "" | |
} | |
, | |
927: (e,t,n)=>{ | |
var i = n(2877); | |
e.exports = function(e) { | |
var t = {} | |
, n = new i(e); | |
t.trackNumber = n.nextUIntV(), | |
t.timecode = n.nextInt16BE(); | |
var r = n.nextUInt8(); | |
t.invisible = !!(8 & r), | |
t.keyframe = !!(128 & r), | |
t.discardable = !!(1 & r); | |
var o = (6 & r) >> 1; | |
return t.frames = function(e, t) { | |
if (!t) | |
return [e.nextBuffer()]; | |
var n, i, r = [], o = e.nextUInt8() + 1; | |
if (2 === t) { | |
if (e.length % o != 0) | |
throw new Error("Fixed-Size Lacing Error"); | |
for (i = e.length / o, | |
n = 0; n < o; n++) | |
r.push(e.nextBuffer(i)); | |
return r | |
} | |
var a = []; | |
if (1 === t) | |
for (n = 0; n < o - 1; n++) { | |
var s; | |
i = 0; | |
do { | |
i += s = e.nextUInt8() | |
} while (255 === s); | |
a.push(i) | |
} | |
else if (3 === t) | |
for (i = e.nextUIntV(), | |
a.push(i), | |
n = 1; n < o - 1; n++) | |
i += e.nextIntV(), | |
a.push(i); | |
for (n = 0; n < o - 1; n++) | |
r.push(e.nextBuffer(a[n])); | |
return r.push(e.nextBuffer()), | |
r | |
}(n, o), | |
t | |
} | |
} | |
, | |
2877: (e,t,n)=>{ | |
var i = n(5420); | |
function r(e) { | |
this.buffer = e, | |
this.offset = 0 | |
} | |
r.prototype.nextInt16BE = function() { | |
var e = this.buffer.readInt16BE(this.offset); | |
return this.offset += 2, | |
e | |
} | |
, | |
r.prototype.nextUInt8 = function() { | |
var e = this.buffer.readUInt8(this.offset); | |
return this.offset += 1, | |
e | |
} | |
, | |
r.prototype.nextUIntV = function() { | |
var e = i(this.buffer, this.offset); | |
return this.offset += e.length, | |
e.value | |
} | |
, | |
r.prototype.nextIntV = function() { | |
var e = i(this.buffer, this.offset, !0); | |
return this.offset += e.length, | |
e.value | |
} | |
, | |
r.prototype.nextBuffer = function(e) { | |
var t = e ? this.buffer.slice(this.offset, this.offset + e) : this.buffer.slice(this.offset); | |
return this.offset += e || this.length, | |
t | |
} | |
, | |
Object.defineProperty(r.prototype, "length", { | |
get: function() { | |
return this.buffer.length - this.offset | |
} | |
}), | |
e.exports = r | |
} | |
, | |
5420: e=>{ | |
e.exports = function(e, t, n) { | |
t = t || 0; | |
for (var i = 1; i <= 8 && !(e[t] >= Math.pow(2, 8 - i)); i++) | |
; | |
if (i > 8) | |
throw new Error("Unrepresentable length: " + i + " " + e.toString("hex", t, t + i)); | |
if (t + i > e.length) | |
return null; | |
var r, o = e[t] & (1 << 8 - i) - 1; | |
for (r = 1; r < i; r++) { | |
if (7 === r && o >= Math.pow(2, 45) && e[t + 7] > 0) | |
return { | |
length: i, | |
value: -1 | |
}; | |
o *= Math.pow(2, 8), | |
o += e[t + r] | |
} | |
return n && (o -= Math.pow(2, 7 * i - 1) - 1), | |
{ | |
length: i, | |
value: o | |
} | |
} | |
} | |
, | |
9784: e=>{ | |
"use strict"; | |
var t, n = "object" == typeof Reflect ? Reflect : null, i = n && "function" == typeof n.apply ? n.apply : function(e, t, n) { | |
return Function.prototype.apply.call(e, t, n) | |
} | |
; | |
t = n && "function" == typeof n.ownKeys ? n.ownKeys : Object.getOwnPropertySymbols ? function(e) { | |
return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e)) | |
} | |
: function(e) { | |
return Object.getOwnPropertyNames(e) | |
} | |
; | |
var r = Number.isNaN || function(e) { | |
return e != e | |
} | |
; | |
function o() { | |
o.init.call(this) | |
} | |
e.exports = o, | |
e.exports.once = function(e, t) { | |
return new Promise((function(n, i) { | |
function r(n) { | |
e.removeListener(t, o), | |
i(n) | |
} | |
function o() { | |
"function" == typeof e.removeListener && e.removeListener("error", r), | |
n([].slice.call(arguments)) | |
} | |
m(e, t, o, { | |
once: !0 | |
}), | |
"error" !== t && function(e, t, n) { | |
"function" == typeof e.on && m(e, "error", t, n) | |
}(e, r, { | |
once: !0 | |
}) | |
} | |
)) | |
} | |
, | |
o.EventEmitter = o, | |
o.prototype._events = void 0, | |
o.prototype._eventsCount = 0, | |
o.prototype._maxListeners = void 0; | |
var a = 10; | |
function s(e) { | |
if ("function" != typeof e) | |
throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof e) | |
} | |
function l(e) { | |
return void 0 === e._maxListeners ? o.defaultMaxListeners : e._maxListeners | |
} | |
function c(e, t, n, i) { | |
var r, o, a, c; | |
if (s(n), | |
void 0 === (o = e._events) ? (o = e._events = Object.create(null), | |
e._eventsCount = 0) : (void 0 !== o.newListener && (e.emit("newListener", t, n.listener ? n.listener : n), | |
o = e._events), | |
a = o[t]), | |
void 0 === a) | |
a = o[t] = n, | |
++e._eventsCount; | |
else if ("function" == typeof a ? a = o[t] = i ? [n, a] : [a, n] : i ? a.unshift(n) : a.push(n), | |
(r = l(e)) > 0 && a.length > r && !a.warned) { | |
a.warned = !0; | |
var u = new Error("Possible EventEmitter memory leak detected. " + a.length + " " + String(t) + " listeners added. Use emitter.setMaxListeners() to increase limit"); | |
u.name = "MaxListenersExceededWarning", | |
u.emitter = e, | |
u.type = t, | |
u.count = a.length, | |
c = u, | |
console && console.warn && console.warn(c) | |
} | |
return e | |
} | |
function u() { | |
if (!this.fired) | |
return this.target.removeListener(this.type, this.wrapFn), | |
this.fired = !0, | |
0 === arguments.length ? this.listener.call(this.target) : this.listener.apply(this.target, arguments) | |
} | |
function h(e, t, n) { | |
var i = { | |
fired: !1, | |
wrapFn: void 0, | |
target: e, | |
type: t, | |
listener: n | |
} | |
, r = u.bind(i); | |
return r.listener = n, | |
i.wrapFn = r, | |
r | |
} | |
function d(e, t, n) { | |
var i = e._events; | |
if (void 0 === i) | |
return []; | |
var r = i[t]; | |
return void 0 === r ? [] : "function" == typeof r ? n ? [r.listener || r] : [r] : n ? function(e) { | |
for (var t = new Array(e.length), n = 0; n < t.length; ++n) | |
t[n] = e[n].listener || e[n]; | |
return t | |
}(r) : f(r, r.length) | |
} | |
function p(e) { | |
var t = this._events; | |
if (void 0 !== t) { | |
var n = t[e]; | |
if ("function" == typeof n) | |
return 1; | |
if (void 0 !== n) | |
return n.length | |
} | |
return 0 | |
} | |
function f(e, t) { | |
for (var n = new Array(t), i = 0; i < t; ++i) | |
n[i] = e[i]; | |
return n | |
} | |
function m(e, t, n, i) { | |
if ("function" == typeof e.on) | |
i.once ? e.once(t, n) : e.on(t, n); | |
else { | |
if ("function" != typeof e.addEventListener) | |
throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof e); | |
e.addEventListener(t, (function r(o) { | |
i.once && e.removeEventListener(t, r), | |
n(o) | |
} | |
)) | |
} | |
} | |
Object.defineProperty(o, "defaultMaxListeners", { | |
enumerable: !0, | |
get: function() { | |
return a | |
}, | |
set: function(e) { | |
if ("number" != typeof e || e < 0 || r(e)) | |
throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + e + "."); | |
a = e | |
} | |
}), | |
o.init = function() { | |
void 0 !== this._events && this._events !== Object.getPrototypeOf(this)._events || (this._events = Object.create(null), | |
this._eventsCount = 0), | |
this._maxListeners = this._maxListeners || void 0 | |
} | |
, | |
o.prototype.setMaxListeners = function(e) { | |
if ("number" != typeof e || e < 0 || r(e)) | |
throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + e + "."); | |
return this._maxListeners = e, | |
this | |
} | |
, | |
o.prototype.getMaxListeners = function() { | |
return l(this) | |
} | |
, | |
o.prototype.emit = function(e) { | |
for (var t = [], n = 1; n < arguments.length; n++) | |
t.push(arguments[n]); | |
var r = "error" === e | |
, o = this._events; | |
if (void 0 !== o) | |
r = r && void 0 === o.error; | |
else if (!r) | |
return !1; | |
if (r) { | |
var a; | |
if (t.length > 0 && (a = t[0]), | |
a instanceof Error) | |
throw a; | |
var s = new Error("Unhandled error." + (a ? " (" + a.message + ")" : "")); | |
throw s.context = a, | |
s | |
} | |
var l = o[e]; | |
if (void 0 === l) | |
return !1; | |
if ("function" == typeof l) | |
i(l, this, t); | |
else { | |
var c = l.length | |
, u = f(l, c); | |
for (n = 0; n < c; ++n) | |
i(u[n], this, t) | |
} | |
return !0 | |
} | |
, | |
o.prototype.addListener = function(e, t) { | |
return c(this, e, t, !1) | |
} | |
, | |
o.prototype.on = o.prototype.addListener, | |
o.prototype.prependListener = function(e, t) { | |
return c(this, e, t, !0) | |
} | |
, | |
o.prototype.once = function(e, t) { | |
return s(t), | |
this.on(e, h(this, e, t)), | |
this | |
} | |
, | |
o.prototype.prependOnceListener = function(e, t) { | |
return s(t), | |
this.prependListener(e, h(this, e, t)), | |
this | |
} | |
, | |
o.prototype.removeListener = function(e, t) { | |
var n, i, r, o, a; | |
if (s(t), | |
void 0 === (i = this._events)) | |
return this; | |
if (void 0 === (n = i[e])) | |
return this; | |
if (n === t || n.listener === t) | |
0 == --this._eventsCount ? this._events = Object.create(null) : (delete i[e], | |
i.removeListener && this.emit("removeListener", e, n.listener || t)); | |
else if ("function" != typeof n) { | |
for (r = -1, | |
o = n.length - 1; o >= 0; o--) | |
if (n[o] === t || n[o].listener === t) { | |
a = n[o].listener, | |
r = o; | |
break | |
} | |
if (r < 0) | |
return this; | |
0 === r ? n.shift() : function(e, t) { | |
for (; t + 1 < e.length; t++) | |
e[t] = e[t + 1]; | |
e.pop() | |
}(n, r), | |
1 === n.length && (i[e] = n[0]), | |
void 0 !== i.removeListener && this.emit("removeListener", e, a || t) | |
} | |
return this | |
} | |
, | |
o.prototype.off = o.prototype.removeListener, | |
o.prototype.removeAllListeners = function(e) { | |
var t, n, i; | |
if (void 0 === (n = this._events)) | |
return this; | |
if (void 0 === n.removeListener) | |
return 0 === arguments.length ? (this._events = Object.create(null), | |
this._eventsCount = 0) : void 0 !== n[e] && (0 == --this._eventsCount ? this._events = Object.create(null) : delete n[e]), | |
this; | |
if (0 === arguments.length) { | |
var r, o = Object.keys(n); | |
for (i = 0; i < o.length; ++i) | |
"removeListener" !== (r = o[i]) && this.removeAllListeners(r); | |
return this.removeAllListeners("removeListener"), | |
this._events = Object.create(null), | |
this._eventsCount = 0, | |
this | |
} | |
if ("function" == typeof (t = n[e])) | |
this.removeListener(e, t); | |
else if (void 0 !== t) | |
for (i = t.length - 1; i >= 0; i--) | |
this.removeListener(e, t[i]); | |
return this | |
} | |
, | |
o.prototype.listeners = function(e) { | |
return d(this, e, !0) | |
} | |
, | |
o.prototype.rawListeners = function(e) { | |
return d(this, e, !1) | |
} | |
, | |
o.listenerCount = function(e, t) { | |
return "function" == typeof e.listenerCount ? e.listenerCount(t) : p.call(e, t) | |
} | |
, | |
o.prototype.listenerCount = p, | |
o.prototype.eventNames = function() { | |
return this._eventsCount > 0 ? t(this._events) : [] | |
} | |
} | |
, | |
1918: e=>{ | |
"use strict"; | |
function t(e) { | |
if ("string" == typeof e) | |
return function(e) { | |
return t; | |
function t(t) { | |
return n(t) && t.tagName === e | |
} | |
}(e); | |
if (null == e) | |
return n; | |
if ("object" == typeof e) | |
return function(e) { | |
var n = function(e) { | |
var n = e.length | |
, i = -1 | |
, r = []; | |
for (; ++i < n; ) | |
r[i] = t(e[i]); | |
return r | |
}(e) | |
, i = n.length; | |
return r; | |
function r() { | |
for (var e = -1; ++e < i; ) | |
if (n[e].apply(this, arguments)) | |
return !0; | |
return !1 | |
} | |
}(e); | |
if ("function" == typeof e) | |
return function(e) { | |
return t; | |
function t(t) { | |
return n(t) && Boolean(e.apply(this, arguments)) | |
} | |
}(e); | |
throw new Error("Expected function, string, or array as test") | |
} | |
function n(e) { | |
return e && "object" == typeof e && "element" === e.type && "string" == typeof e.tagName | |
} | |
e.exports = t | |
} | |
, | |
1765: (e,t,n)=>{ | |
"use strict"; | |
var i = n(1918); | |
function r(e, t, n, r, o) { | |
var a = null != r | |
, s = null != n | |
, l = i(t); | |
if (s && ("number" != typeof n || n < 0 || n === 1 / 0)) | |
throw new Error("Expected positive finite index for child node"); | |
if (a && (!r.type || !r.children)) | |
throw new Error("Expected parent node"); | |
if (!e || !e.type || "string" != typeof e.type) | |
return !1; | |
if (a !== s) | |
throw new Error("Expected both parent and index"); | |
return l.call(o, e, n, r) | |
} | |
e.exports = r, | |
r.convert = i | |
} | |
, | |
2292: (e,t,n)=>{ | |
"use strict"; | |
e.exports = n(1184) | |
} | |
, | |
9795: (e,t,n)=>{ | |
"use strict"; | |
var i = n(2700); | |
e.exports = function(e, t) { | |
var n = t && t.children | |
, r = n && n.length | |
, o = -1 | |
, a = []; | |
for (; ++o < r; ) | |
a[o] = i(e, n[o], o, t); | |
return a.join("") | |
} | |
} | |
, | |
5393: (e,t,n)=>{ | |
"use strict"; | |
var i = n(8593) | |
, r = n(631); | |
e.exports = function(e, t) { | |
var n = t.value; | |
if (e.bogusComments) | |
return "<?" + r(n, i(e.entities, { | |
subset: s | |
})) + ">"; | |
return "\x3c!--" + n.replace(o, (function(t) { | |
return r(t, i(e.entities, { | |
subset: a | |
})) | |
} | |
)) + "--\x3e" | |
} | |
; | |
var o = /^>|^->|<!--|-->|--!>|<!-$/g | |
, a = ["<", ">"] | |
, s = [">"] | |
} | |
, | |
6405: e=>{ | |
"use strict"; | |
var t = "\0" | |
, n = "&" | |
, i = "`" | |
, r = '"' | |
, o = "'" | |
, a = [" ", "\t", "\n", "\r", "\f"] | |
, s = a.concat(n, "/", ">", "=") | |
, l = a.concat(n, ">") | |
, c = l.concat(t, r, o, "<", "=", i) | |
, u = [n, o] | |
, h = [n, r]; | |
e.exports = { | |
name: [[s, s.concat(r, o, i)], [s.concat(t, r, o, "<"), s.concat(t, r, o, "<", i)]], | |
unquoted: [[l, c], [c, c]], | |
single: [[u, u.concat(r, i)], [u.concat(t), u.concat(t, r, i)]], | |
double: [[h, h.concat(o, i)], [h.concat(t), h.concat(t, o, i)]] | |
} | |
} | |
, | |
326: (e,t,n)=>{ | |
"use strict"; | |
var i = n(8593) | |
, r = n(7137) | |
, o = n(631); | |
e.exports = function(e, t) { | |
var n = e.upperDoctype ? s : a | |
, i = e.tightDoctype ? "" : " " | |
, r = t.name | |
, o = t.public | |
, c = t.system | |
, u = ["<!" + n]; | |
r && (u.push(i, r), | |
null != o ? u.push(" public", i, l(e, o)) : null != c && u.push(" system"), | |
null != c && u.push(i, l(e, c))); | |
return u.join("") + ">" | |
} | |
; | |
var a = "doctype" | |
, s = a.toUpperCase(); | |
function l(e, t) { | |
var n = e.quote | |
, a = e.alternative | |
, s = String(t) | |
, l = r(s, n) > r(s, a) ? a : n; | |
return l + o(s, i(e.entities, { | |
subset: ["<", "&", l] | |
})) + l | |
} | |
} | |
, | |
5684: (e,t,n)=>{ | |
"use strict"; | |
var i = n(8593) | |
, r = n(7422) | |
, o = n(9489) | |
, a = n(8502).A | |
, s = n(1606).A | |
, l = n(631) | |
, c = n(7137) | |
, u = n(9795) | |
, h = n(6405); | |
e.exports = function(e, t, n, i) { | |
var o, a, s, l, c, h, m = e.schema, w = t.tagName, k = "", C = t; | |
"html" === m.space && "svg" === w && (e.schema = r); | |
c = function(e, t) { | |
var n, i, r, o, a, s, l = []; | |
for (n in t) | |
null != (i = t[n]) && (r = b(e, n, i)) && l.push(r); | |
o = l.length, | |
a = -1; | |
for (; ++a < o; ) | |
r = l[a], | |
s = null, | |
e.tight && (s = r.charAt(r.length - 1)), | |
a !== o - 1 && s !== p && s !== f && (l[a] = r + d); | |
return l.join("") | |
}(e, t.properties), | |
"svg" === e.schema.space ? (s = !1, | |
a = !0, | |
o = e.closeEmpty) : (s = e.omit, | |
a = e.close, | |
o = -1 !== e.voids.indexOf(w.toLowerCase()), | |
"template" === w && (C = t.content)); | |
l = u(e, C), | |
o = !l && o, | |
!c && s && s.opening(t, n, i) || (k = v + w + (c ? d + c : ""), | |
o && a && (h = c.charAt(c.length - 1), | |
(!e.tightClose || h === y || "svg" === e.schema.space && h && h !== p && h !== f) && (k += d), | |
k += y), | |
k += g); | |
k += l, | |
o || s && s.closing(t, n, i) || (k += v + y + w + g); | |
return e.schema = m, | |
k | |
} | |
; | |
var d = " " | |
, p = '"' | |
, f = "'" | |
, m = "=" | |
, v = "<" | |
, g = ">" | |
, y = "/"; | |
function b(e, t, n) { | |
var r = e.schema | |
, u = o(r, t) | |
, d = u.attribute; | |
return !u.overloadedBoolean || n !== d && "" !== n ? (u.boolean || u.overloadedBoolean && "string" != typeof n) && (n = Boolean(n)) : n = !0, | |
null == n || !1 === n || "number" == typeof n && isNaN(n) ? "" : (d = function(e, t) { | |
var n = "html" === e.schema.space ? e.valid : 1 | |
, r = h.name[n][e.safe]; | |
return l(t, i(e.entities, { | |
subset: r | |
})) | |
}(e, d), | |
!0 === n ? d : d + function(e, t, n, r) { | |
var o, u, d = e.entities, p = e.quote, v = e.alternative, g = e.smart; | |
"object" == typeof n && "length"in n && (n = (r.commaSeparated ? s : a)(n, { | |
padLeft: !e.tightLists | |
})); | |
n = String(n), | |
(n || !e.collapseEmpty) && (o = n, | |
e.unquoted && (u = h.unquoted[e.valid][e.safe], | |
o = l(n, i(d, { | |
subset: u, | |
attribute: !0 | |
}))), | |
e.unquoted && o === n || (g && c(n, p) > c(n, v) && (p = v), | |
u = (u = p === f ? h.single : h.double)["html" === e.schema.space ? e.valid : 1][e.safe], | |
n = p + (n = l(n, i(d, { | |
subset: u, | |
attribute: !0 | |
}))) + p), | |
n = n ? m + n : n); | |
return n | |
}(e, 0, n, u)) | |
} | |
} | |
, | |
1184: (e,t,n)=>{ | |
"use strict"; | |
var i = n(8707) | |
, r = n(7422) | |
, o = n(7274) | |
, a = n(3784) | |
, s = n(2700); | |
e.exports = function(e, t) { | |
var n = t || {} | |
, h = n.quote || l | |
, d = h === l ? c : l | |
, p = n.quoteSmart | |
, f = e && "object" == typeof e && "length"in e ? { | |
type: "root", | |
children: e | |
} : e; | |
if (h !== l && h !== c) | |
throw new Error("Invalid quote `" + h + "`, expected `" + c + "` or `" + l + "`"); | |
void 0 !== n.allowDangerousHTML && (u || (u = !0, | |
console.warn("Deprecation warning: `allowDangerousHTML` is a nonstandard option, use `allowDangerousHtml` instead"))); | |
return s({ | |
valid: n.allowParseErrors ? 0 : 1, | |
safe: n.allowDangerousCharacters ? 0 : 1, | |
schema: "svg" === n.space ? r : i, | |
omit: n.omitOptionalTags && a, | |
quote: h, | |
alternative: d, | |
smart: p, | |
unquoted: Boolean(n.preferUnquoted), | |
tight: n.tightAttributes, | |
upperDoctype: Boolean(n.upperDoctype), | |
tightDoctype: Boolean(n.tightDoctype), | |
bogusComments: Boolean(n.bogusComments), | |
tightLists: n.tightCommaSeparatedLists, | |
tightClose: n.tightSelfClosing, | |
collapseEmpty: n.collapseEmptyAttributes, | |
dangerous: n.allowDangerousHtml || n.allowDangerousHTML, | |
voids: n.voids || o.concat(), | |
entities: n.entities || {}, | |
close: n.closeSelfClosing, | |
closeEmpty: n.closeEmptyElements | |
}, f) | |
} | |
; | |
var l = '"' | |
, c = "'" | |
, u = !1 | |
} | |
, | |
1339: (e,t,n)=>{ | |
"use strict"; | |
var i = n(493) | |
, r = n(1765) | |
, o = n(6134) | |
, a = n(7578).P | |
, s = n(1575) | |
, l = i("comment") | |
, c = "optgroup" | |
, u = ["option"].concat(c) | |
, h = ["dt", "dd"] | |
, d = ["menuitem", "hr", "menu"] | |
, p = ["rp", "rt"] | |
, f = ["tbody", "tfoot"] | |
, m = ["td", "th"] | |
, v = ["a", "audio", "del", "ins", "map", "noscript", "video"] | |
, g = ["address", "article", "aside", "blockquote", "details", "div", "dl", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "header", "hgroup", "hr", "main", "menu", "nav", "ol", "p", "pre", "section", "table", "ul"]; | |
function y(e, t, n) { | |
var i = a(n, t, !0); | |
return !i || !l(i) && !o(i) | |
} | |
function b(e, t, n) { | |
var i = a(n, t); | |
return !i || r(i, p) | |
} | |
function w(e, t, n) { | |
var i = a(n, t); | |
return !i || r(i, m) | |
} | |
e.exports = s({ | |
html: function(e, t, n) { | |
var i = a(n, t); | |
return !i || !l(i) | |
}, | |
head: y, | |
body: function(e, t, n) { | |
var i = a(n, t); | |
return !i || !l(i) | |
}, | |
p: function(e, t, n) { | |
var i = a(n, t); | |
return i ? r(i, g) : !n || !r(n, v) | |
}, | |
li: function(e, t, n) { | |
var i = a(n, t); | |
return !i || r(i, "li") | |
}, | |
dt: function(e, t, n) { | |
var i = a(n, t); | |
return i && r(i, h) | |
}, | |
dd: function(e, t, n) { | |
var i = a(n, t); | |
return !i || r(i, h) | |
}, | |
rt: b, | |
rp: b, | |
optgroup: function(e, t, n) { | |
var i = a(n, t); | |
return !i || r(i, c) | |
}, | |
option: function(e, t, n) { | |
var i = a(n, t); | |
return !i || r(i, u) | |
}, | |
menuitem: function(e, t, n) { | |
var i = a(n, t); | |
return !i || r(i, d) | |
}, | |
colgroup: y, | |
caption: y, | |
thead: function(e, t, n) { | |
var i = a(n, t); | |
return i && r(i, f) | |
}, | |
tbody: function(e, t, n) { | |
var i = a(n, t); | |
return !i || r(i, f) | |
}, | |
tfoot: function(e, t, n) { | |
return !a(n, t) | |
}, | |
tr: function(e, t, n) { | |
var i = a(n, t); | |
return !i || r(i, "tr") | |
}, | |
td: w, | |
th: w | |
}) | |
} | |
, | |
3784: (e,t,n)=>{ | |
"use strict"; | |
t.opening = n(3804), | |
t.closing = n(1339) | |
} | |
, | |
1575: e=>{ | |
"use strict"; | |
e.exports = function(e) { | |
return function(n, i, r) { | |
var o = n.tagName; | |
return !!t.call(e, o) && e[o](n, i, r) | |
} | |
} | |
; | |
var t = {}.hasOwnProperty | |
} | |
, | |
3804: (e,t,n)=>{ | |
"use strict"; | |
var i = n(493) | |
, r = n(1765) | |
, o = n(7578).g | |
, a = n(4159) | |
, s = n(8518) | |
, l = n(6134) | |
, c = n(1339) | |
, u = n(1575) | |
, h = i("comment") | |
, d = ["title", "base"] | |
, p = ["meta", "link", "script", "style", "template"] | |
, f = ["thead", "tbody"]; | |
e.exports = u({ | |
html: function(e) { | |
var t = a(e); | |
return !t || !h(t) | |
}, | |
head: function(e) { | |
var t, n, i = e.children, o = i.length, a = [], s = -1; | |
for (; ++s < o; ) | |
if (n = (t = i[s]).tagName, | |
r(t, d)) { | |
if (-1 !== a.indexOf(n)) | |
return !1; | |
a.push(n) | |
} | |
return 0 !== o | |
}, | |
body: function(e) { | |
var t = a(e, !0); | |
return !t || !h(t) && !l(t) && !r(t, p) | |
}, | |
colgroup: function(e, t, n) { | |
var i = o(n, t) | |
, l = a(e, !0); | |
if (r(i, "colgroup") && c(i, s(n, i), n)) | |
return !1; | |
return l && r(l, "col") | |
}, | |
tbody: function(e, t, n) { | |
var i = o(n, t) | |
, l = a(e); | |
if (r(i, f) && c(i, s(n, i), n)) | |
return !1; | |
return l && r(l, "tr") | |
} | |
}) | |
} | |
, | |
4159: (e,t,n)=>{ | |
"use strict"; | |
var i = n(7578).P; | |
e.exports = function(e, t) { | |
return i(e, -1, t) | |
} | |
} | |
, | |
8518: e=>{ | |
"use strict"; | |
e.exports = function(e, t) { | |
return e && e.children && e.children.indexOf(t) | |
} | |
} | |
, | |
7578: (e,t,n)=>{ | |
"use strict"; | |
var i = n(9098); | |
function r(e) { | |
return function(t, n, r) { | |
var o = t && t.children | |
, a = n + e | |
, s = o && o[a]; | |
if (!r) | |
for (; s && i(s); ) | |
s = o[a += e]; | |
return s | |
} | |
} | |
t.g = r(-1), | |
t.P = r(1) | |
} | |
, | |
6134: (e,t,n)=>{ | |
"use strict"; | |
var i = n(493) | |
, r = n(9098); | |
e.exports = function(e) { | |
return o(e) && r(e.value.charAt(0)) | |
} | |
; | |
var o = i("text") | |
} | |
, | |
2700: (e,t,n)=>{ | |
"use strict"; | |
e.exports = function(e, t, n, o) { | |
var a = t && t.type; | |
if (!a) | |
throw new Error("Expected node, not `" + t + "`"); | |
if (!i.call(r, a)) | |
throw new Error("Cannot compile unknown node `" + a + "`"); | |
return r[a](e, t, n, o) | |
} | |
; | |
var i = {}.hasOwnProperty | |
, r = {}; | |
r.root = n(9795), | |
r.text = n(8785), | |
r.element = n(5684), | |
r.doctype = n(326), | |
r.comment = n(5393), | |
r.raw = n(618) | |
} | |
, | |
618: (e,t,n)=>{ | |
"use strict"; | |
var i = n(8785); | |
e.exports = function(e, t) { | |
return e.dangerous ? t.value : i(e, t) | |
} | |
} | |
, | |
8785: (e,t,n)=>{ | |
"use strict"; | |
var i = n(8593) | |
, r = n(631); | |
e.exports = function(e, t, n, o) { | |
var a = t.value; | |
return function(e) { | |
return e && ("script" === e.tagName || "style" === e.tagName) | |
}(o) ? a : r(a, i(e.entities, { | |
subset: ["<", "&"] | |
})) | |
} | |
} | |
, | |
9098: e=>{ | |
"use strict"; | |
e.exports = function(e) { | |
var n; | |
if (e && "object" == typeof e && "text" === e.type) | |
n = e.value || ""; | |
else { | |
if ("string" != typeof e) | |
return !1; | |
n = e | |
} | |
return "" === n.replace(t, "") | |
} | |
; | |
var t = /[ \t\n\f\r]/g | |
} | |
, | |
7947: (e,t)=>{ | |
t.read = function(e, t, n, i, r) { | |
var o, a, s = 8 * r - i - 1, l = (1 << s) - 1, c = l >> 1, u = -7, h = n ? r - 1 : 0, d = n ? -1 : 1, p = e[t + h]; | |
for (h += d, | |
o = p & (1 << -u) - 1, | |
p >>= -u, | |
u += s; u > 0; o = 256 * o + e[t + h], | |
h += d, | |
u -= 8) | |
; | |
for (a = o & (1 << -u) - 1, | |
o >>= -u, | |
u += i; u > 0; a = 256 * a + e[t + h], | |
h += d, | |
u -= 8) | |
; | |
if (0 === o) | |
o = 1 - c; | |
else { | |
if (o === l) | |
return a ? NaN : 1 / 0 * (p ? -1 : 1); | |
a += Math.pow(2, i), | |
o -= c | |
} | |
return (p ? -1 : 1) * a * Math.pow(2, o - i) | |
} | |
, | |
t.write = function(e, t, n, i, r, o) { | |
var a, s, l, c = 8 * o - r - 1, u = (1 << c) - 1, h = u >> 1, d = 23 === r ? Math.pow(2, -24) - Math.pow(2, -77) : 0, p = i ? 0 : o - 1, f = i ? 1 : -1, m = t < 0 || 0 === t && 1 / t < 0 ? 1 : 0; | |
for (t = Math.abs(t), | |
isNaN(t) || t === 1 / 0 ? (s = isNaN(t) ? 1 : 0, | |
a = u) : (a = Math.floor(Math.log(t) / Math.LN2), | |
t * (l = Math.pow(2, -a)) < 1 && (a--, | |
l *= 2), | |
(t += a + h >= 1 ? d / l : d * Math.pow(2, 1 - h)) * l >= 2 && (a++, | |
l /= 2), | |
a + h >= u ? (s = 0, | |
a = u) : a + h >= 1 ? (s = (t * l - 1) * Math.pow(2, r), | |
a += h) : (s = t * Math.pow(2, h - 1) * Math.pow(2, r), | |
a = 0)); r >= 8; e[n + p] = 255 & s, | |
p += f, | |
s /= 256, | |
r -= 8) | |
; | |
for (a = a << r | s, | |
c += r; c > 0; e[n + p] = 255 & a, | |
p += f, | |
a /= 256, | |
c -= 8) | |
; | |
e[n + p - f] |= 128 * m | |
} | |
} | |
, | |
6661: function(e, t) { | |
!function(e) { | |
var t, n = "undefined", i = n !== typeof Buffer && Buffer, r = n !== typeof Uint8Array && Uint8Array, o = n !== typeof ArrayBuffer && ArrayBuffer, a = [0, 0, 0, 0, 0, 0, 0, 0], s = Array.isArray || function(e) { | |
return !!e && "[object Array]" == Object.prototype.toString.call(e) | |
} | |
, l = 4294967296; | |
function c(s, c, w) { | |
var k = c ? 0 : 4 | |
, C = c ? 4 : 0 | |
, M = c ? 0 : 3 | |
, E = c ? 1 : 2 | |
, S = c ? 2 : 1 | |
, x = c ? 3 : 0 | |
, T = c ? v : y | |
, D = c ? g : b | |
, A = I.prototype | |
, L = "is" + s | |
, P = "_" + L; | |
return A.buffer = void 0, | |
A.offset = 0, | |
A[P] = !0, | |
A.toNumber = F, | |
A.toString = function(e) { | |
var t = this.buffer | |
, n = this.offset | |
, i = B(t, n + k) | |
, r = B(t, n + C) | |
, o = "" | |
, a = !w && 2147483648 & i; | |
a && (i = ~i, | |
r = l - r); | |
e = e || 10; | |
for (; ; ) { | |
var s = i % e * l + r; | |
if (i = Math.floor(i / e), | |
r = Math.floor(s / e), | |
o = (s % e).toString(e) + o, | |
!i && !r) | |
break | |
} | |
a && (o = "-" + o); | |
return o | |
} | |
, | |
A.toJSON = F, | |
A.toArray = u, | |
i && (A.toBuffer = h), | |
r && (A.toArrayBuffer = d), | |
I[L] = function(e) { | |
return !(!e || !e[P]) | |
} | |
, | |
e[s] = I, | |
I; | |
function I(e, s, c, u) { | |
return this instanceof I ? function(e, s, c, u, h) { | |
r && o && (s instanceof o && (s = new r(s)), | |
u instanceof o && (u = new r(u))); | |
if (!(s || c || u || t)) | |
return void (e.buffer = m(a, 0)); | |
if (!p(s, c)) { | |
var d = t || Array; | |
h = c, | |
u = s, | |
c = 0, | |
s = t === i ? i.alloc(8) : new d(8) | |
} | |
if (e.buffer = s, | |
e.offset = c |= 0, | |
n === typeof u) | |
return; | |
"string" == typeof u ? function(e, t, n, i) { | |
var r = 0 | |
, o = n.length | |
, a = 0 | |
, s = 0; | |
"-" === n[0] && r++; | |
var c = r; | |
for (; r < o; ) { | |
var u = parseInt(n[r++], i); | |
if (!(u >= 0)) | |
break; | |
s = s * i + u, | |
a = a * i + Math.floor(s / l), | |
s %= l | |
} | |
c && (a = ~a, | |
s ? s = l - s : a++); | |
O(e, t + k, a), | |
O(e, t + C, s) | |
}(s, c, u, h || 10) : p(u, h) ? f(s, c, u, h) : "number" == typeof h ? (O(s, c + k, u), | |
O(s, c + C, h)) : u > 0 ? T(s, c, u) : u < 0 ? D(s, c, u) : f(s, c, a, 0) | |
}(this, e, s, c, u) : new I(e,s,c,u) | |
} | |
function F() { | |
var e = this.buffer | |
, t = this.offset | |
, n = B(e, t + k) | |
, i = B(e, t + C); | |
return w || (n |= 0), | |
n ? n * l + i : i | |
} | |
function O(e, t, n) { | |
e[t + x] = 255 & n, | |
n >>= 8, | |
e[t + S] = 255 & n, | |
n >>= 8, | |
e[t + E] = 255 & n, | |
n >>= 8, | |
e[t + M] = 255 & n | |
} | |
function B(e, t) { | |
return 16777216 * e[t + M] + (e[t + E] << 16) + (e[t + S] << 8) + e[t + x] | |
} | |
} | |
function u(e) { | |
var n = this.buffer | |
, i = this.offset; | |
return t = null, | |
!1 !== e && s(n) ? 8 === n.length ? n : n.slice(i, i + 8) : m(n, i) | |
} | |
function h(e) { | |
var n = this.buffer | |
, r = this.offset; | |
return t = i, | |
!1 !== e && i.isBuffer(n) ? 8 === n.length ? n : n.slice(r, r + 8) : i.from(d.call(this, e)) | |
} | |
function d(e) { | |
var n = this.buffer | |
, i = this.offset | |
, a = n.buffer; | |
if (t = r, | |
!1 !== e && !n.offset && a instanceof o) | |
return 8 === a.byteLength ? a : a.slice(i, i + 8); | |
var s = new r(8); | |
return f(s, 0, n, i), | |
s.buffer | |
} | |
function p(e, t) { | |
var n = e && e.length; | |
return t |= 0, | |
n && t + 8 <= n && "string" != typeof e[t] | |
} | |
function f(e, t, n, i) { | |
t |= 0, | |
i |= 0; | |
for (var r = 0; r < 8; r++) | |
e[t++] = 255 & n[i++] | |
} | |
function m(e, t) { | |
return Array.prototype.slice.call(e, t, t + 8) | |
} | |
function v(e, t, n) { | |
for (var i = t + 8; i > t; ) | |
e[--i] = 255 & n, | |
n /= 256 | |
} | |
function g(e, t, n) { | |
var i = t + 8; | |
for (n++; i > t; ) | |
e[--i] = 255 & -n ^ 255, | |
n /= 256 | |
} | |
function y(e, t, n) { | |
for (var i = t + 8; t < i; ) | |
e[t++] = 255 & n, | |
n /= 256 | |
} | |
function b(e, t, n) { | |
var i = t + 8; | |
for (n++; t < i; ) | |
e[t++] = 255 & -n ^ 255, | |
n /= 256 | |
} | |
c("Uint64BE", !0, !0), | |
c("Int64BE", !0, !1), | |
c("Uint64LE", !1, !0), | |
c("Int64LE", !1, !1) | |
}("string" != typeof t.nodeName ? t : this || {}) | |
}, | |
2346: e=>{ | |
"use strict"; | |
e.exports = function(e) { | |
var t = "string" == typeof e ? e.charCodeAt(0) : e; | |
return t >= 97 && t <= 122 || t >= 65 && t <= 90 | |
} | |
} | |
, | |
5514: (e,t,n)=>{ | |
"use strict"; | |
var i = n(2346) | |
, r = n(3502); | |
e.exports = function(e) { | |
return i(e) || r(e) | |
} | |
} | |
, | |
2660: e=>{ | |
e.exports = function(e) { | |
return null != e && null != e.constructor && "function" == typeof e.constructor.isBuffer && e.constructor.isBuffer(e) | |
} | |
} | |
, | |
3502: e=>{ | |
"use strict"; | |
e.exports = function(e) { | |
var t = "string" == typeof e ? e.charCodeAt(0) : e; | |
return t >= 48 && t <= 57 | |
} | |
} | |
, | |
6966: e=>{ | |
"use strict"; | |
e.exports = function(e) { | |
var t = "string" == typeof e ? e.charCodeAt(0) : e; | |
return t >= 97 && t <= 102 || t >= 65 && t <= 70 || t >= 48 && t <= 57 | |
} | |
} | |
, | |
7497: (e,t,n)=>{ | |
"use strict"; | |
var i = n(6658); | |
e.exports = function(e, t) { | |
return function(e) { | |
return t; | |
function t(t) { | |
var n = t && o(t); | |
return n && r.call(e, n) ? e[n] : null | |
} | |
}(function(e) { | |
var t = {}; | |
if (!e || !e.type) | |
throw new Error("mdast-util-definitions expected node"); | |
return i(e, "definition", n), | |
t; | |
function n(e) { | |
var n = o(e.identifier); | |
r.call(t, n) || (t[n] = e) | |
} | |
}(e)) | |
} | |
; | |
var r = {}.hasOwnProperty; | |
function o(e) { | |
return e.toUpperCase() | |
} | |
} | |
, | |
4297: (e,t,n)=>{ | |
"use strict"; | |
e.exports = function(e, t) { | |
var n, r, o = t.children || [], a = o.length, s = [], l = -1; | |
for (; ++l < a; ) | |
(n = i(e, o[l], t)) && (l && "break" === o[l - 1].type && (n.value && (n.value = n.value.replace(/^\s+/, "")), | |
(r = n.children && n.children[0]) && r.value && (r.value = r.value.replace(/^\s+/, ""))), | |
s = s.concat(n)); | |
return s | |
} | |
; | |
var i = n(7194) | |
} | |
, | |
7583: (e,t,n)=>{ | |
"use strict"; | |
e.exports = function(e) { | |
var t, n, a, s, l = e.footnoteById, c = e.footnoteOrder, u = c.length, h = -1, d = []; | |
for (; ++h < u; ) | |
(t = l[c[h].toUpperCase()]) && (s = (a = t.children.concat())[a.length - 1], | |
n = { | |
type: "link", | |
url: "#fnref-" + t.identifier, | |
data: { | |
hProperties: { | |
className: ["footnote-backref"] | |
} | |
}, | |
children: [{ | |
type: "text", | |
value: "↩" | |
}] | |
}, | |
s && "paragraph" === s.type || (s = { | |
type: "paragraph", | |
children: [] | |
}, | |
a.push(s)), | |
s.children.push(n), | |
d.push({ | |
type: "listItem", | |
data: { | |
hProperties: { | |
id: "fn-" + t.identifier | |
} | |
}, | |
children: a, | |
position: t.position | |
})); | |
if (0 === d.length) | |
return null; | |
return e(null, "div", { | |
className: ["footnotes"] | |
}, o([i(e), r(e, { | |
type: "list", | |
ordered: !0, | |
children: d | |
})], !0)) | |
} | |
; | |
var i = n(5125) | |
, r = n(396) | |
, o = n(7824) | |
} | |
, | |
9331: (e,t,n)=>{ | |
"use strict"; | |
e.exports = function(e, t) { | |
return e(t, "blockquote", i(r(e, t), !0)) | |
} | |
; | |
var i = n(7824) | |
, r = n(4297) | |
} | |
, | |
1501: (e,t,n)=>{ | |
"use strict"; | |
e.exports = function(e, t) { | |
return [e(t, "br"), i("text", "\n")] | |
} | |
; | |
var i = n(9650) | |
} | |
, | |
3849: (e,t,n)=>{ | |
"use strict"; | |
e.exports = function(e, t) { | |
var n, r = t.value ? t.value + "\n" : "", o = t.lang && t.lang.match(/^[^ \t]+(?=[ \t]|$)/), a = {}; | |
o && (a.className = ["language-" + o]); | |
n = e(t, "code", a, [i("text", r)]), | |
t.meta && (n.data = { | |
meta: t.meta | |
}); | |
return e(t.position, "pre", [n]) | |
} | |
; | |
var i = n(9650) | |
} | |
, | |
5275: (e,t,n)=>{ | |
"use strict"; | |
e.exports = function(e, t) { | |
return e(t, "del", i(e, t)) | |
} | |
; | |
var i = n(4297) | |
} | |
, | |
4738: (e,t,n)=>{ | |
"use strict"; | |
e.exports = function(e, t) { | |
return e(t, "em", i(e, t)) | |
} | |
; | |
var i = n(4297) | |
} | |
, | |
3632: (e,t,n)=>{ | |
"use strict"; | |
e.exports = function(e, t) { | |
var n = e.footnoteOrder | |
, r = String(t.identifier); | |
-1 === n.indexOf(r) && n.push(r); | |
return e(t.position, "sup", { | |
id: "fnref-" + r | |
}, [e(t, "a", { | |
href: "#fn-" + r, | |
className: ["footnote-ref"] | |
}, [i("text", t.label || r)])]) | |
} | |
; | |
var i = n(9650) | |
} | |
, | |
8812: (e,t,n)=>{ | |
"use strict"; | |
e.exports = function(e, t) { | |
var n = e.footnoteById | |
, r = e.footnoteOrder | |
, o = 1; | |
for (; o in n; ) | |
o++; | |
return o = String(o), | |
r.push(o), | |
n[o] = { | |
type: "footnoteDefinition", | |
identifier: o, | |
children: [{ | |
type: "paragraph", | |
children: t.children | |
}], | |
position: t.position | |
}, | |
i(e, { | |
type: "footnoteReference", | |
identifier: o, | |
position: t.position | |
}) | |
} | |
; | |
var i = n(3632) | |
} | |
, | |
544: (e,t,n)=>{ | |
"use strict"; | |
e.exports = function(e, t) { | |
return e(t, "h" + t.depth, i(e, t)) | |
} | |
; | |
var i = n(4297) | |
} | |
, | |
9941: (e,t,n)=>{ | |
"use strict"; | |
e.exports = function(e, t) { | |
return e.dangerous ? e.augment(t, i("raw", t.value)) : null | |
} | |
; | |
var i = n(9650) | |
} | |
, | |
4255: (e,t,n)=>{ | |
"use strict"; | |
e.exports = function(e, t) { | |
var n, o = e.definition(t.identifier); | |
if (!o) | |
return r(e, t); | |
n = { | |
src: i(o.url || ""), | |
alt: t.alt | |
}, | |
null !== o.title && void 0 !== o.title && (n.title = o.title); | |
return e(t, "img", n) | |
} | |
; | |
var i = n(8131) | |
, r = n(3390) | |
} | |
, | |
3603: (e,t,n)=>{ | |
"use strict"; | |
var i = n(8131); | |
e.exports = function(e, t) { | |
var n = { | |
src: i(t.url), | |
alt: t.alt | |
}; | |
null !== t.title && void 0 !== t.title && (n.title = t.title); | |
return e(t, "img", n) | |
} | |
} | |
, | |
942: (e,t,n)=>{ | |
"use strict"; | |
function i() { | |
return null | |
} | |
e.exports = { | |
blockquote: n(9331), | |
break: n(1501), | |
code: n(3849), | |
delete: n(5275), | |
emphasis: n(4738), | |
footnoteReference: n(3632), | |
footnote: n(8812), | |
heading: n(544), | |
html: n(9941), | |
imageReference: n(4255), | |
image: n(3603), | |
inlineCode: n(935), | |
linkReference: n(7756), | |
link: n(9040), | |
listItem: n(8942), | |
list: n(396), | |
paragraph: n(6504), | |
root: n(4824), | |
strong: n(5151), | |
table: n(2258), | |
text: n(8711), | |
thematicBreak: n(5125), | |
toml: i, | |
yaml: i, | |
definition: i, | |
footnoteDefinition: i | |
} | |
} | |
, | |
935: (e,t,n)=>{ | |
"use strict"; | |
e.exports = function(e, t) { | |
var n = t.value.replace(/\r?\n|\r/g, " "); | |
return e(t, "code", [i("text", n)]) | |
} | |
; | |
var i = n(9650) | |
} | |
, | |
7756: (e,t,n)=>{ | |
"use strict"; | |
e.exports = function(e, t) { | |
var n, a = e.definition(t.identifier); | |
if (!a) | |
return r(e, t); | |
n = { | |
href: i(a.url || "") | |
}, | |
null !== a.title && void 0 !== a.title && (n.title = a.title); | |
return e(t, "a", n, o(e, t)) | |
} | |
; | |
var i = n(8131) | |
, r = n(3390) | |
, o = n(4297) | |
} | |
, | |
9040: (e,t,n)=>{ | |
"use strict"; | |
var i = n(8131) | |
, r = n(4297); | |
e.exports = function(e, t) { | |
var n = { | |
href: i(t.url) | |
}; | |
null !== t.title && void 0 !== t.title && (n.title = t.title); | |
return e(t, "a", n, r(e, t)) | |
} | |
} | |
, | |
8942: (e,t,n)=>{ | |
"use strict"; | |
e.exports = function(e, t, n) { | |
var a, s, l, c = r(e, t), u = c[0], h = n ? function(e) { | |
var t = e.spread | |
, n = e.children | |
, i = n.length | |
, r = -1; | |
for (; !t && ++r < i; ) | |
t = o(n[r]); | |
return t | |
}(n) : o(t), d = {}, p = []; | |
"boolean" == typeof t.checked && (u && "p" === u.tagName || (u = e(null, "p", []), | |
c.unshift(u)), | |
u.children.length > 0 && u.children.unshift(i("text", " ")), | |
u.children.unshift(e(null, "input", { | |
type: "checkbox", | |
checked: t.checked, | |
disabled: !0 | |
})), | |
d.className = ["task-list-item"]); | |
a = c.length, | |
s = -1; | |
for (; ++s < a; ) | |
l = c[s], | |
(h || 0 !== s || "p" !== l.tagName) && p.push(i("text", "\n")), | |
"p" !== l.tagName || h ? p.push(l) : p = p.concat(l.children); | |
a && (h || "p" !== l.tagName) && p.push(i("text", "\n")); | |
return e(t, "li", d, p) | |
} | |
; | |
var i = n(9650) | |
, r = n(4297); | |
function o(e) { | |
var t = e.spread; | |
return null == t ? e.children.length > 1 : t | |
} | |
} | |
, | |
396: (e,t,n)=>{ | |
"use strict"; | |
e.exports = function(e, t) { | |
var n, o, a = {}, s = t.ordered ? "ol" : "ul", l = -1; | |
"number" == typeof t.start && 1 !== t.start && (a.start = t.start); | |
n = r(e, t), | |
o = n.length; | |
for (; ++l < o; ) | |
if (n[l].properties.className && -1 !== n[l].properties.className.indexOf("task-list-item")) { | |
a.className = ["contains-task-list"]; | |
break | |
} | |
return e(t, s, a, i(n, !0)) | |
} | |
; | |
var i = n(7824) | |
, r = n(4297) | |
} | |
, | |
6504: (e,t,n)=>{ | |
"use strict"; | |
e.exports = function(e, t) { | |
return e(t, "p", i(e, t)) | |
} | |
; | |
var i = n(4297) | |
} | |
, | |
4824: (e,t,n)=>{ | |
"use strict"; | |
e.exports = function(e, t) { | |
return e.augment(t, i("root", r(o(e, t)))) | |
} | |
; | |
var i = n(9650) | |
, r = n(7824) | |
, o = n(4297) | |
} | |
, | |
5151: (e,t,n)=>{ | |
"use strict"; | |
e.exports = function(e, t) { | |
return e(t, "strong", i(e, t)) | |
} | |
; | |
var i = n(4297) | |
} | |
, | |
2258: (e,t,n)=>{ | |
"use strict"; | |
e.exports = function(e, t) { | |
var n, a, s, l, c, u = t.children, h = u.length, d = t.align || [], p = d.length, f = []; | |
for (; h--; ) { | |
for (a = u[h].children, | |
l = 0 === h ? "th" : "td", | |
n = p || a.length, | |
s = []; n--; ) | |
c = a[n], | |
s[n] = e(c, l, { | |
align: d[n] | |
}, c ? o(e, c) : []); | |
f[h] = e(u[h], "tr", r(s, !0)) | |
} | |
return e(t, "table", r([e(f[0].position, "thead", r([f[0]], !0))].concat(f[1] ? e({ | |
start: i.start(f[1]), | |
end: i.end(f[f.length - 1]) | |
}, "tbody", r(f.slice(1), !0)) : []), !0)) | |
} | |
; | |
var i = n(1039) | |
, r = n(7824) | |
, o = n(4297) | |
} | |
, | |
8711: (e,t,n)=>{ | |
"use strict"; | |
e.exports = function(e, t) { | |
return e.augment(t, i("text", String(t.value).replace(/[ \t]*(\r?\n|\r)[ \t]*/g, "$1"))) | |
} | |
; | |
var i = n(9650) | |
} | |
, | |
5125: e=>{ | |
"use strict"; | |
e.exports = function(e, t) { | |
return e(t, "hr") | |
} | |
} | |
, | |
7194: (e,t,n)=>{ | |
"use strict"; | |
e.exports = function(e, t, n) { | |
var i, r = t && t.type; | |
if (!r) | |
throw new Error("Expected node, got `" + t + "`"); | |
i = o.call(e.handlers, r) ? e.handlers[r] : e.passThrough && e.passThrough.indexOf(r) > -1 ? s : e.unknownHandler; | |
return ("function" == typeof i ? i : a)(e, t, n) | |
} | |
; | |
var i = n(9650) | |
, r = n(4297) | |
, o = {}.hasOwnProperty; | |
function a(e, t) { | |
return function(e) { | |
var t = e.data || {}; | |
if (o.call(t, "hName") || o.call(t, "hProperties") || o.call(t, "hChildren")) | |
return !1; | |
return "value"in e | |
}(t) ? e.augment(t, i("text", t.value)) : e(t, "div", r(e, t)) | |
} | |
function s(e, t) { | |
var n; | |
return t.children ? ((n = Object.assign({}, t)).children = r(e, t), | |
n) : t | |
} | |
} | |
, | |
3390: (e,t,n)=>{ | |
"use strict"; | |
e.exports = function(e, t) { | |
var n, o, a, s = t.referenceType, l = "]"; | |
"collapsed" === s ? l += "[]" : "full" === s && (l += "[" + (t.label || t.identifier) + "]"); | |
if ("imageReference" === t.type) | |
return i("text", "![" + t.alt + l); | |
n = r(e, t), | |
(o = n[0]) && "text" === o.type ? o.value = "[" + o.value : n.unshift(i("text", "[")); | |
(a = n[n.length - 1]) && "text" === a.type ? a.value += l : n.push(i("text", l)); | |
return n | |
} | |
; | |
var i = n(9650) | |
, r = n(4297) | |
} | |
, | |
7824: (e,t,n)=>{ | |
"use strict"; | |
e.exports = function(e, t) { | |
var n = [] | |
, r = -1 | |
, o = e.length; | |
t && n.push(i("text", "\n")); | |
for (; ++r < o; ) | |
r && n.push(i("text", "\n")), | |
n.push(e[r]); | |
t && e.length > 0 && n.push(i("text", "\n")); | |
return n | |
} | |
; | |
var i = n(9650) | |
} | |
, | |
8131: e=>{ | |
"use strict"; | |
var t = {}; | |
function n(e, i, r) { | |
var o, a, s, l, c, u = ""; | |
for ("string" != typeof i && (r = i, | |
i = n.defaultChars), | |
void 0 === r && (r = !0), | |
c = function(e) { | |
var n, i, r = t[e]; | |
if (r) | |
return r; | |
for (r = t[e] = [], | |
n = 0; n < 128; n++) | |
i = String.fromCharCode(n), | |
/^[0-9a-z]$/i.test(i) ? r.push(i) : r.push("%" + ("0" + n.toString(16).toUpperCase()).slice(-2)); | |
for (n = 0; n < e.length; n++) | |
r[e.charCodeAt(n)] = e[n]; | |
return r | |
}(i), | |
o = 0, | |
a = e.length; o < a; o++) | |
if (s = e.charCodeAt(o), | |
r && 37 === s && o + 2 < a && /^[0-9a-f]{2}$/i.test(e.slice(o + 1, o + 3))) | |
u += e.slice(o, o + 3), | |
o += 2; | |
else if (s < 128) | |
u += c[s]; | |
else if (s >= 55296 && s <= 57343) { | |
if (s >= 55296 && s <= 56319 && o + 1 < a && (l = e.charCodeAt(o + 1)) >= 56320 && l <= 57343) { | |
u += encodeURIComponent(e[o] + e[o + 1]), | |
o++; | |
continue | |
} | |
u += "%EF%BF%BD" | |
} else | |
u += encodeURIComponent(e[o]); | |
return u | |
} | |
n.defaultChars = ";/?:@&=+$,-_.!~*'()#", | |
n.componentChars = "-_.!~*'()", | |
e.exports = n | |
} | |
, | |
4013: (e,t,n)=>{ | |
"use strict"; | |
var i = n(5115); | |
e.exports = function(e) { | |
return !!r.call(i, e) && i[e] | |
} | |
; | |
var r = {}.hasOwnProperty | |
} | |
, | |
3507: (e,t,n)=>{ | |
"use strict"; | |
var i = n(4472) | |
, r = n(8192) | |
, o = n(3502) | |
, a = n(6966) | |
, s = n(5514) | |
, l = n(4013); | |
e.exports = function(e, t) { | |
var n, o, a = {}; | |
t || (t = {}); | |
for (o in d) | |
n = t[o], | |
a[o] = null == n ? d[o] : n; | |
(a.position.indent || a.position.start) && (a.indent = a.position.indent || [], | |
a.position = a.position.start); | |
return function(e, t) { | |
var n, o, a, d, z, q, U, _, W, j, G, K, Y, Z, X, $, Q, J, ee, te = t.additional, ne = t.nonTerminated, ie = t.text, re = t.reference, oe = t.warning, ae = t.textContext, se = t.referenceContext, le = t.warningContext, ce = t.position, ue = t.indent || [], he = e.length, de = 0, pe = -1, fe = ce.column || 1, me = ce.line || 1, ve = "", ge = []; | |
"string" == typeof te && (te = te.charCodeAt(0)); | |
$ = ye(), | |
_ = oe ? be : h, | |
de--, | |
he++; | |
for (; ++de < he; ) | |
if (z === f && (fe = ue[pe] || 1), | |
(z = e.charCodeAt(de)) === g) { | |
if ((U = e.charCodeAt(de + 1)) === p || U === f || U === m || U === v || U === g || U === b || U != U || te && U === te) { | |
ve += u(z), | |
fe++; | |
continue | |
} | |
for (K = Y = de + 1, | |
ee = Y, | |
U === k ? (ee = ++K, | |
(U = e.charCodeAt(ee)) === C || U === M ? (Z = x, | |
ee = ++K) : Z = T) : Z = S, | |
n = "", | |
G = "", | |
d = "", | |
X = A[Z], | |
ee--; ++ee < he && X(U = e.charCodeAt(ee)); ) | |
d += u(U), | |
Z === S && c.call(i, d) && (n = d, | |
G = i[d]); | |
(a = e.charCodeAt(ee) === y) && (ee++, | |
(o = Z === S && l(d)) && (n = d, | |
G = o)), | |
J = 1 + ee - Y, | |
(a || ne) && (d ? Z === S ? (a && !G ? _(O, 1) : (n !== d && (J = 1 + (ee = K + n.length) - K, | |
a = !1), | |
a || (W = n ? L : I, | |
t.attribute ? (U = e.charCodeAt(ee)) === w ? (_(W, J), | |
G = null) : s(U) ? G = null : _(W, J) : _(W, J))), | |
q = G) : (a || _(P, J), | |
H(q = parseInt(d, D[Z])) ? (_(N, J), | |
q = u(E)) : q in r ? (_(B, J), | |
q = r[q]) : (j = "", | |
V(q) && _(B, J), | |
q > 65535 && (j += u((q -= 65536) >>> 10 | 55296), | |
q = 56320 | 1023 & q), | |
q = j + u(q))) : Z !== S && _(F, J)), | |
q ? (we(), | |
$ = ye(), | |
de = ee - 1, | |
fe += ee - Y + 1, | |
ge.push(q), | |
(Q = ye()).offset++, | |
re && re.call(se, q, { | |
start: $, | |
end: Q | |
}, e.slice(Y - 1, ee)), | |
$ = Q) : (d = e.slice(Y - 1, ee), | |
ve += d, | |
fe += d.length, | |
de = ee - 1) | |
} else | |
10 === z && (me++, | |
pe++, | |
fe = 0), | |
z == z ? (ve += u(z), | |
fe++) : we(); | |
return ge.join(""); | |
function ye() { | |
return { | |
line: me, | |
column: fe, | |
offset: de + (ce.offset || 0) | |
} | |
} | |
function be(e, t) { | |
var n = ye(); | |
n.column += t, | |
n.offset += t, | |
oe.call(le, R[e], n, e) | |
} | |
function we() { | |
ve && (ge.push(ve), | |
ie && ie.call(ae, ve, { | |
start: $, | |
end: ye() | |
}), | |
ve = "") | |
} | |
}(e, a) | |
} | |
; | |
var c = {}.hasOwnProperty | |
, u = String.fromCharCode | |
, h = Function.prototype | |
, d = { | |
warning: null, | |
reference: null, | |
text: null, | |
warningContext: null, | |
referenceContext: null, | |
textContext: null, | |
position: {}, | |
additional: null, | |
attribute: !1, | |
nonTerminated: !0 | |
} | |
, p = 9 | |
, f = 10 | |
, m = 12 | |
, v = 32 | |
, g = 38 | |
, y = 59 | |
, b = 60 | |
, w = 61 | |
, k = 35 | |
, C = 88 | |
, M = 120 | |
, E = 65533 | |
, S = "named" | |
, x = "hexadecimal" | |
, T = "decimal" | |
, D = {}; | |
D[x] = 16, | |
D[T] = 10; | |
var A = {}; | |
A[S] = s, | |
A[T] = o, | |
A[x] = a; | |
var L = 1 | |
, P = 2 | |
, I = 3 | |
, F = 4 | |
, O = 5 | |
, B = 6 | |
, N = 7 | |
, R = {}; | |
function H(e) { | |
return e >= 55296 && e <= 57343 || e > 1114111 | |
} | |
function V(e) { | |
return e >= 1 && e <= 8 || 11 === e || e >= 13 && e <= 31 || e >= 127 && e <= 159 || e >= 64976 && e <= 65007 || !(65535 & ~e) || 65534 == (65535 & e) | |
} | |
R[L] = "Named character references must be terminated by a semicolon", | |
R[P] = "Numeric character references must be terminated by a semicolon", | |
R[I] = "Named character references cannot be empty", | |
R[F] = "Numeric character references cannot be empty", | |
R[O] = "Named character references must be known", | |
R[B] = "Numeric character references cannot be disallowed", | |
R[N] = "Numeric character references cannot be outside the permissible Unicode range" | |
} | |
, | |
9489: (e,t,n)=>{ | |
"use strict"; | |
var i = n(1383) | |
, r = n(4197) | |
, o = n(5325) | |
, a = "data"; | |
e.exports = function(e, t) { | |
var n = i(t) | |
, d = t | |
, p = o; | |
if (n in e.normal) | |
return e.property[e.normal[n]]; | |
n.length > 4 && n.slice(0, 4) === a && s.test(t) && ("-" === t.charAt(4) ? d = function(e) { | |
var t = e.slice(5).replace(l, h); | |
return a + t.charAt(0).toUpperCase() + t.slice(1) | |
}(t) : t = function(e) { | |
var t = e.slice(4); | |
if (l.test(t)) | |
return e; | |
t = t.replace(c, u), | |
"-" !== t.charAt(0) && (t = "-" + t); | |
return a + t | |
}(t), | |
p = r); | |
return new p(d,t) | |
} | |
; | |
var s = /^data[-\w.:]+$/i | |
, l = /-[a-z]/g | |
, c = /[A-Z]/g; | |
function u(e) { | |
return "-" + e.toLowerCase() | |
} | |
function h(e) { | |
return e.charAt(1).toUpperCase() | |
} | |
} | |
, | |
8707: (e,t,n)=>{ | |
"use strict"; | |
var i = n(5261) | |
, r = n(6920) | |
, o = n(313) | |
, a = n(4506) | |
, s = n(8055) | |
, l = n(535); | |
e.exports = i([o, r, a, s, l]) | |
} | |
, | |
8055: (e,t,n)=>{ | |
"use strict"; | |
var i = n(5176) | |
, r = n(7297) | |
, o = i.booleanish | |
, a = i.number | |
, s = i.spaceSeparated; | |
e.exports = r({ | |
transform: function(e, t) { | |
return "role" === t ? t : "aria-" + t.slice(4).toLowerCase() | |
}, | |
properties: { | |
ariaActiveDescendant: null, | |
ariaAtomic: o, | |
ariaAutoComplete: null, | |
ariaBusy: o, | |
ariaChecked: o, | |
ariaColCount: a, | |
ariaColIndex: a, | |
ariaColSpan: a, | |
ariaControls: s, | |
ariaCurrent: null, | |
ariaDescribedBy: s, | |
ariaDetails: null, | |
ariaDisabled: o, | |
ariaDropEffect: s, | |
ariaErrorMessage: null, | |
ariaExpanded: o, | |
ariaFlowTo: s, | |
ariaGrabbed: o, | |
ariaHasPopup: null, | |
ariaHidden: o, | |
ariaInvalid: null, | |
ariaKeyShortcuts: null, | |
ariaLabel: null, | |
ariaLabelledBy: s, | |
ariaLevel: a, | |
ariaLive: null, | |
ariaModal: o, | |
ariaMultiLine: o, | |
ariaMultiSelectable: o, | |
ariaOrientation: null, | |
ariaOwns: s, | |
ariaPlaceholder: null, | |
ariaPosInSet: a, | |
ariaPressed: o, | |
ariaReadOnly: o, | |
ariaRelevant: null, | |
ariaRequired: o, | |
ariaRoleDescription: s, | |
ariaRowCount: a, | |
ariaRowIndex: a, | |
ariaRowSpan: a, | |
ariaSelected: o, | |
ariaSetSize: a, | |
ariaSort: null, | |
ariaValueMax: a, | |
ariaValueMin: a, | |
ariaValueNow: a, | |
ariaValueText: null, | |
role: null | |
} | |
}) | |
} | |
, | |
535: (e,t,n)=>{ | |
"use strict"; | |
var i = n(5176) | |
, r = n(7297) | |
, o = n(1716) | |
, a = i.boolean | |
, s = i.overloadedBoolean | |
, l = i.booleanish | |
, c = i.number | |
, u = i.spaceSeparated | |
, h = i.commaSeparated; | |
e.exports = r({ | |
space: "html", | |
attributes: { | |
acceptcharset: "accept-charset", | |
classname: "class", | |
htmlfor: "for", | |
httpequiv: "http-equiv" | |
}, | |
transform: o, | |
mustUseProperty: ["checked", "multiple", "muted", "selected"], | |
properties: { | |
abbr: null, | |
accept: h, | |
acceptCharset: u, | |
accessKey: u, | |
action: null, | |
allow: null, | |
allowFullScreen: a, | |
allowPaymentRequest: a, | |
allowUserMedia: a, | |
alt: null, | |
as: null, | |
async: a, | |
autoCapitalize: null, | |
autoComplete: u, | |
autoFocus: a, | |
autoPlay: a, | |
capture: a, | |
charSet: null, | |
checked: a, | |
cite: null, | |
className: u, | |
cols: c, | |
colSpan: null, | |
content: null, | |
contentEditable: l, | |
controls: a, | |
controlsList: u, | |
coords: c | h, | |
crossOrigin: null, | |
data: null, | |
dateTime: null, | |
decoding: null, | |
default: a, | |
defer: a, | |
dir: null, | |
dirName: null, | |
disabled: a, | |
download: s, | |
draggable: l, | |
encType: null, | |
enterKeyHint: null, | |
form: null, | |
formAction: null, | |
formEncType: null, | |
formMethod: null, | |
formNoValidate: a, | |
formTarget: null, | |
headers: u, | |
height: c, | |
hidden: a, | |
high: c, | |
href: null, | |
hrefLang: null, | |
htmlFor: u, | |
httpEquiv: u, | |
id: null, | |
imageSizes: null, | |
imageSrcSet: h, | |
inputMode: null, | |
integrity: null, | |
is: null, | |
isMap: a, | |
itemId: null, | |
itemProp: u, | |
itemRef: u, | |
itemScope: a, | |
itemType: u, | |
kind: null, | |
label: null, | |
lang: null, | |
language: null, | |
list: null, | |
loading: null, | |
loop: a, | |
low: c, | |
manifest: null, | |
max: null, | |
maxLength: c, | |
media: null, | |
method: null, | |
min: null, | |
minLength: c, | |
multiple: a, | |
muted: a, | |
name: null, | |
nonce: null, | |
noModule: a, | |
noValidate: a, | |
onAbort: null, | |
onAfterPrint: null, | |
onAuxClick: null, | |
onBeforePrint: null, | |
onBeforeUnload: null, | |
onBlur: null, | |
onCancel: null, | |
onCanPlay: null, | |
onCanPlayThrough: null, | |
onChange: null, | |
onClick: null, | |
onClose: null, | |
onContextMenu: null, | |
onCopy: null, | |
onCueChange: null, | |
onCut: null, | |
onDblClick: null, | |
onDrag: null, | |
onDragEnd: null, | |
onDragEnter: null, | |
onDragExit: null, | |
onDragLeave: null, | |
onDragOver: null, | |
onDragStart: null, | |
onDrop: null, | |
onDurationChange: null, | |
onEmptied: null, | |
onEnded: null, | |
onError: null, | |
onFocus: null, | |
onFormData: null, | |
onHashChange: null, | |
onInput: null, | |
onInvalid: null, | |
onKeyDown: null, | |
onKeyPress: null, | |
onKeyUp: null, | |
onLanguageChange: null, | |
onLoad: null, | |
onLoadedData: null, | |
onLoadedMetadata: null, | |
onLoadEnd: null, | |
onLoadStart: null, | |
onMessage: null, | |
onMessageError: null, | |
onMouseDown: null, | |
onMouseEnter: null, | |
onMouseLeave: null, | |
onMouseMove: null, | |
onMouseOut: null, | |
onMouseOver: null, | |
onMouseUp: null, | |
onOffline: null, | |
onOnline: null, | |
onPageHide: null, | |
onPageShow: null, | |
onPaste: null, | |
onPause: null, | |
onPlay: null, | |
onPlaying: null, | |
onPopState: null, | |
onProgress: null, | |
onRateChange: null, | |
onRejectionHandled: null, | |
onReset: null, | |
onResize: null, | |
onScroll: null, | |
onSecurityPolicyViolation: null, | |
onSeeked: null, | |
onSeeking: null, | |
onSelect: null, | |
onSlotChange: null, | |
onStalled: null, | |
onStorage: null, | |
onSubmit: null, | |
onSuspend: null, | |
onTimeUpdate: null, | |
onToggle: null, | |
onUnhandledRejection: null, | |
onUnload: null, | |
onVolumeChange: null, | |
onWaiting: null, | |
onWheel: null, | |
open: a, | |
optimum: c, | |
pattern: null, | |
ping: u, | |
placeholder: null, | |
playsInline: a, | |
poster: null, | |
preload: null, | |
readOnly: a, | |
referrerPolicy: null, | |
rel: u, | |
required: a, | |
reversed: a, | |
rows: c, | |
rowSpan: c, | |
sandbox: u, | |
scope: null, | |
scoped: a, | |
seamless: a, | |
selected: a, | |
shape: null, | |
size: c, | |
sizes: null, | |
slot: null, | |
span: c, | |
spellCheck: l, | |
src: null, | |
srcDoc: null, | |
srcLang: null, | |
srcSet: h, | |
start: c, | |
step: null, | |
style: null, | |
tabIndex: c, | |
target: null, | |
title: null, | |
translate: null, | |
type: null, | |
typeMustMatch: a, | |
useMap: null, | |
value: l, | |
width: c, | |
wrap: null, | |
align: null, | |
aLink: null, | |
archive: u, | |
axis: null, | |
background: null, | |
bgColor: null, | |
border: c, | |
borderColor: null, | |
bottomMargin: c, | |
cellPadding: null, | |
cellSpacing: null, | |
char: null, | |
charOff: null, | |
classId: null, | |
clear: null, | |
code: null, | |
codeBase: null, | |
codeType: null, | |
color: null, | |
compact: a, | |
declare: a, | |
event: null, | |
face: null, | |
frame: null, | |
frameBorder: null, | |
hSpace: c, | |
leftMargin: c, | |
link: null, | |
longDesc: null, | |
lowSrc: null, | |
marginHeight: c, | |
marginWidth: c, | |
noResize: a, | |
noHref: a, | |
noShade: a, | |
noWrap: a, | |
object: null, | |
profile: null, | |
prompt: null, | |
rev: null, | |
rightMargin: c, | |
rules: null, | |
scheme: null, | |
scrolling: l, | |
standby: null, | |
summary: null, | |
text: null, | |
topMargin: c, | |
valueType: null, | |
version: null, | |
vAlign: null, | |
vLink: null, | |
vSpace: c, | |
allowTransparency: null, | |
autoCorrect: null, | |
autoSave: null, | |
disablePictureInPicture: a, | |
disableRemotePlayback: a, | |
prefix: null, | |
property: null, | |
results: c, | |
security: null, | |
unselectable: null | |
} | |
}) | |
} | |
, | |
4834: (e,t,n)=>{ | |
"use strict"; | |
var i = n(5176) | |
, r = n(7297) | |
, o = n(6933) | |
, a = i.boolean | |
, s = i.number | |
, l = i.spaceSeparated | |
, c = i.commaSeparated | |
, u = i.commaOrSpaceSeparated; | |
e.exports = r({ | |
space: "svg", | |
attributes: { | |
accentHeight: "accent-height", | |
alignmentBaseline: "alignment-baseline", | |
arabicForm: "arabic-form", | |
baselineShift: "baseline-shift", | |
capHeight: "cap-height", | |
className: "class", | |
clipPath: "clip-path", | |
clipRule: "clip-rule", | |
colorInterpolation: "color-interpolation", | |
colorInterpolationFilters: "color-interpolation-filters", | |
colorProfile: "color-profile", | |
colorRendering: "color-rendering", | |
crossOrigin: "crossorigin", | |
dataType: "datatype", | |
dominantBaseline: "dominant-baseline", | |
enableBackground: "enable-background", | |
fillOpacity: "fill-opacity", | |
fillRule: "fill-rule", | |
floodColor: "flood-color", | |
floodOpacity: "flood-opacity", | |
fontFamily: "font-family", | |
fontSize: "font-size", | |
fontSizeAdjust: "font-size-adjust", | |
fontStretch: "font-stretch", | |
fontStyle: "font-style", | |
fontVariant: "font-variant", | |
fontWeight: "font-weight", | |
glyphName: "glyph-name", | |
glyphOrientationHorizontal: "glyph-orientation-horizontal", | |
glyphOrientationVertical: "glyph-orientation-vertical", | |
hrefLang: "hreflang", | |
horizAdvX: "horiz-adv-x", | |
horizOriginX: "horiz-origin-x", | |
horizOriginY: "horiz-origin-y", | |
imageRendering: "image-rendering", | |
letterSpacing: "letter-spacing", | |
lightingColor: "lighting-color", | |
markerEnd: "marker-end", | |
markerMid: "marker-mid", | |
markerStart: "marker-start", | |
navDown: "nav-down", | |
navDownLeft: "nav-down-left", | |
navDownRight: "nav-down-right", | |
navLeft: "nav-left", | |
navNext: "nav-next", | |
navPrev: "nav-prev", | |
navRight: "nav-right", | |
navUp: "nav-up", | |
navUpLeft: "nav-up-left", | |
navUpRight: "nav-up-right", | |
onAbort: "onabort", | |
onActivate: "onactivate", | |
onAfterPrint: "onafterprint", | |
onBeforePrint: "onbeforeprint", | |
onBegin: "onbegin", | |
onCancel: "oncancel", | |
onCanPlay: "oncanplay", | |
onCanPlayThrough: "oncanplaythrough", | |
onChange: "onchange", | |
onClick: "onclick", | |
onClose: "onclose", | |
onCopy: "oncopy", | |
onCueChange: "oncuechange", | |
onCut: "oncut", | |
onDblClick: "ondblclick", | |
onDrag: "ondrag", | |
onDragEnd: "ondragend", | |
onDragEnter: "ondragenter", | |
onDragExit: "ondragexit", | |
onDragLeave: "ondragleave", | |
onDragOver: "ondragover", | |
onDragStart: "ondragstart", | |
onDrop: "ondrop", | |
onDurationChange: "ondurationchange", | |
onEmptied: "onemptied", | |
onEnd: "onend", | |
onEnded: "onended", | |
onError: "onerror", | |
onFocus: "onfocus", | |
onFocusIn: "onfocusin", | |
onFocusOut: "onfocusout", | |
onHashChange: "onhashchange", | |
onInput: "oninput", | |
onInvalid: "oninvalid", | |
onKeyDown: "onkeydown", | |
onKeyPress: "onkeypress", | |
onKeyUp: "onkeyup", | |
onLoad: "onload", | |
onLoadedData: "onloadeddata", | |
onLoadedMetadata: "onloadedmetadata", | |
onLoadStart: "onloadstart", | |
onMessage: "onmessage", | |
onMouseDown: "onmousedown", | |
onMouseEnter: "onmouseenter", | |
onMouseLeave: "onmouseleave", | |
onMouseMove: "onmousemove", | |
onMouseOut: "onmouseout", | |
onMouseOver: "onmouseover", | |
onMouseUp: "onmouseup", | |
onMouseWheel: "onmousewheel", | |
onOffline: "onoffline", | |
onOnline: "ononline", | |
onPageHide: "onpagehide", | |
onPageShow: "onpageshow", | |
onPaste: "onpaste", | |
onPause: "onpause", | |
onPlay: "onplay", | |
onPlaying: "onplaying", | |
onPopState: "onpopstate", | |
onProgress: "onprogress", | |
onRateChange: "onratechange", | |
onRepeat: "onrepeat", | |
onReset: "onreset", | |
onResize: "onresize", | |
onScroll: "onscroll", | |
onSeeked: "onseeked", | |
onSeeking: "onseeking", | |
onSelect: "onselect", | |
onShow: "onshow", | |
onStalled: "onstalled", | |
onStorage: "onstorage", | |
onSubmit: "onsubmit", | |
onSuspend: "onsuspend", | |
onTimeUpdate: "ontimeupdate", | |
onToggle: "ontoggle", | |
onUnload: "onunload", | |
onVolumeChange: "onvolumechange", | |
onWaiting: "onwaiting", | |
onZoom: "onzoom", | |
overlinePosition: "overline-position", | |
overlineThickness: "overline-thickness", | |
paintOrder: "paint-order", | |
panose1: "panose-1", | |
pointerEvents: "pointer-events", | |
referrerPolicy: "referrerpolicy", | |
renderingIntent: "rendering-intent", | |
shapeRendering: "shape-rendering", | |
stopColor: "stop-color", | |
stopOpacity: "stop-opacity", | |
strikethroughPosition: "strikethrough-position", | |
strikethroughThickness: "strikethrough-thickness", | |
strokeDashArray: "stroke-dasharray", | |
strokeDashOffset: "stroke-dashoffset", | |
strokeLineCap: "stroke-linecap", | |
strokeLineJoin: "stroke-linejoin", | |
strokeMiterLimit: "stroke-miterlimit", | |
strokeOpacity: "stroke-opacity", | |
strokeWidth: "stroke-width", | |
tabIndex: "tabindex", | |
textAnchor: "text-anchor", | |
textDecoration: "text-decoration", | |
textRendering: "text-rendering", | |
typeOf: "typeof", | |
underlinePosition: "underline-position", | |
underlineThickness: "underline-thickness", | |
unicodeBidi: "unicode-bidi", | |
unicodeRange: "unicode-range", | |
unitsPerEm: "units-per-em", | |
vAlphabetic: "v-alphabetic", | |
vHanging: "v-hanging", | |
vIdeographic: "v-ideographic", | |
vMathematical: "v-mathematical", | |
vectorEffect: "vector-effect", | |
vertAdvY: "vert-adv-y", | |
vertOriginX: "vert-origin-x", | |
vertOriginY: "vert-origin-y", | |
wordSpacing: "word-spacing", | |
writingMode: "writing-mode", | |
xHeight: "x-height", | |
playbackOrder: "playbackorder", | |
timelineBegin: "timelinebegin" | |
}, | |
transform: o, | |
properties: { | |
about: u, | |
accentHeight: s, | |
accumulate: null, | |
additive: null, | |
alignmentBaseline: null, | |
alphabetic: s, | |
amplitude: s, | |
arabicForm: null, | |
ascent: s, | |
attributeName: null, | |
attributeType: null, | |
azimuth: s, | |
bandwidth: null, | |
baselineShift: null, | |
baseFrequency: null, | |
baseProfile: null, | |
bbox: null, | |
begin: null, | |
bias: s, | |
by: null, | |
calcMode: null, | |
capHeight: s, | |
className: l, | |
clip: null, | |
clipPath: null, | |
clipPathUnits: null, | |
clipRule: null, | |
color: null, | |
colorInterpolation: null, | |
colorInterpolationFilters: null, | |
colorProfile: null, | |
colorRendering: null, | |
content: null, | |
contentScriptType: null, | |
contentStyleType: null, | |
crossOrigin: null, | |
cursor: null, | |
cx: null, | |
cy: null, | |
d: null, | |
dataType: null, | |
defaultAction: null, | |
descent: s, | |
diffuseConstant: s, | |
direction: null, | |
display: null, | |
dur: null, | |
divisor: s, | |
dominantBaseline: null, | |
download: a, | |
dx: null, | |
dy: null, | |
edgeMode: null, | |
editable: null, | |
elevation: s, | |
enableBackground: null, | |
end: null, | |
event: null, | |
exponent: s, | |
externalResourcesRequired: null, | |
fill: null, | |
fillOpacity: s, | |
fillRule: null, | |
filter: null, | |
filterRes: null, | |
filterUnits: null, | |
floodColor: null, | |
floodOpacity: null, | |
focusable: null, | |
focusHighlight: null, | |
fontFamily: null, | |
fontSize: null, | |
fontSizeAdjust: null, | |
fontStretch: null, | |
fontStyle: null, | |
fontVariant: null, | |
fontWeight: null, | |
format: null, | |
fr: null, | |
from: null, | |
fx: null, | |
fy: null, | |
g1: c, | |
g2: c, | |
glyphName: c, | |
glyphOrientationHorizontal: null, | |
glyphOrientationVertical: null, | |
glyphRef: null, | |
gradientTransform: null, | |
gradientUnits: null, | |
handler: null, | |
hanging: s, | |
hatchContentUnits: null, | |
hatchUnits: null, | |
height: null, | |
href: null, | |
hrefLang: null, | |
horizAdvX: s, | |
horizOriginX: s, | |
horizOriginY: s, | |
id: null, | |
ideographic: s, | |
imageRendering: null, | |
initialVisibility: null, | |
in: null, | |
in2: null, | |
intercept: s, | |
k: s, | |
k1: s, | |
k2: s, | |
k3: s, | |
k4: s, | |
kernelMatrix: u, | |
kernelUnitLength: null, | |
keyPoints: null, | |
keySplines: null, | |
keyTimes: null, | |
kerning: null, | |
lang: null, | |
lengthAdjust: null, | |
letterSpacing: null, | |
lightingColor: null, | |
limitingConeAngle: s, | |
local: null, | |
markerEnd: null, | |
markerMid: null, | |
markerStart: null, | |
markerHeight: null, | |
markerUnits: null, | |
markerWidth: null, | |
mask: null, | |
maskContentUnits: null, | |
maskUnits: null, | |
mathematical: null, | |
max: null, | |
media: null, | |
mediaCharacterEncoding: null, | |
mediaContentEncodings: null, | |
mediaSize: s, | |
mediaTime: null, | |
method: null, | |
min: null, | |
mode: null, | |
name: null, | |
navDown: null, | |
navDownLeft: null, | |
navDownRight: null, | |
navLeft: null, | |
navNext: null, | |
navPrev: null, | |
navRight: null, | |
navUp: null, | |
navUpLeft: null, | |
navUpRight: null, | |
numOctaves: null, | |
observer: null, | |
offset: null, | |
onAbort: null, | |
onActivate: null, | |
onAfterPrint: null, | |
onBeforePrint: null, | |
onBegin: null, | |
onCancel: null, | |
onCanPlay: null, | |
onCanPlayThrough: null, | |
onChange: null, | |
onClick: null, | |
onClose: null, | |
onCopy: null, | |
onCueChange: null, | |
onCut: null, | |
onDblClick: null, | |
onDrag: null, | |
onDragEnd: null, | |
onDragEnter: null, | |
onDragExit: null, | |
onDragLeave: null, | |
onDragOver: null, | |
onDragStart: null, | |
onDrop: null, | |
onDurationChange: null, | |
onEmptied: null, | |
onEnd: null, | |
onEnded: null, | |
onError: null, | |
onFocus: null, | |
onFocusIn: null, | |
onFocusOut: null, | |
onHashChange: null, | |
onInput: null, | |
onInvalid: null, | |
onKeyDown: null, | |
onKeyPress: null, | |
onKeyUp: null, | |
onLoad: null, | |
onLoadedData: null, | |
onLoadedMetadata: null, | |
onLoadStart: null, | |
onMessage: null, | |
onMouseDown: null, | |
onMouseEnter: null, | |
onMouseLeave: null, | |
onMouseMove: null, | |
onMouseOut: null, | |
onMouseOver: null, | |
onMouseUp: null, | |
onMouseWheel: null, | |
onOffline: null, | |
onOnline: null, | |
onPageHide: null, | |
onPageShow: null, | |
onPaste: null, | |
onPause: null, | |
onPlay: null, | |
onPlaying: null, | |
onPopState: null, | |
onProgress: null, | |
onRateChange: null, | |
onRepeat: null, | |
onReset: null, | |
onResize: null, | |
onScroll: null, | |
onSeeked: null, | |
onSeeking: null, | |
onSelect: null, | |
onShow: null, | |
onStalled: null, | |
onStorage: null, | |
onSubmit: null, | |
onSuspend: null, | |
onTimeUpdate: null, | |
onToggle: null, | |
onUnload: null, | |
onVolumeChange: null, | |
onWaiting: null, | |
onZoom: null, | |
opacity: null, | |
operator: null, | |
order: null, | |
orient: null, | |
orientation: null, | |
origin: null, | |
overflow: null, | |
overlay: null, | |
overlinePosition: s, | |
overlineThickness: s, | |
paintOrder: null, | |
panose1: null, | |
path: null, | |
pathLength: s, | |
patternContentUnits: null, | |
patternTransform: null, | |
patternUnits: null, | |
phase: null, | |
ping: l, | |
pitch: null, | |
playbackOrder: null, | |
pointerEvents: null, | |
points: null, | |
pointsAtX: s, | |
pointsAtY: s, | |
pointsAtZ: s, | |
preserveAlpha: null, | |
preserveAspectRatio: null, | |
primitiveUnits: null, | |
propagate: null, | |
property: u, | |
r: null, | |
radius: null, | |
referrerPolicy: null, | |
refX: null, | |
refY: null, | |
rel: u, | |
rev: u, | |
renderingIntent: null, | |
repeatCount: null, | |
repeatDur: null, | |
requiredExtensions: u, | |
requiredFeatures: u, | |
requiredFonts: u, | |
requiredFormats: u, | |
resource: null, | |
restart: null, | |
result: null, | |
rotate: null, | |
rx: null, | |
ry: null, | |
scale: null, | |
seed: null, | |
shapeRendering: null, | |
side: null, | |
slope: null, | |
snapshotTime: null, | |
specularConstant: s, | |
specularExponent: s, | |
spreadMethod: null, | |
spacing: null, | |
startOffset: null, | |
stdDeviation: null, | |
stemh: null, | |
stemv: null, | |
stitchTiles: null, | |
stopColor: null, | |
stopOpacity: null, | |
strikethroughPosition: s, | |
strikethroughThickness: s, | |
string: null, | |
stroke: null, | |
strokeDashArray: u, | |
strokeDashOffset: null, | |
strokeLineCap: null, | |
strokeLineJoin: null, | |
strokeMiterLimit: s, | |
strokeOpacity: s, | |
strokeWidth: null, | |
style: null, | |
surfaceScale: s, | |
syncBehavior: null, | |
syncBehaviorDefault: null, | |
syncMaster: null, | |
syncTolerance: null, | |
syncToleranceDefault: null, | |
systemLanguage: u, | |
tabIndex: s, | |
tableValues: null, | |
target: null, | |
targetX: s, | |
targetY: s, | |
textAnchor: null, | |
textDecoration: null, | |
textRendering: null, | |
textLength: null, | |
timelineBegin: null, | |
title: null, | |
transformBehavior: null, | |
type: null, | |
typeOf: u, | |
to: null, | |
transform: null, | |
u1: null, | |
u2: null, | |
underlinePosition: s, | |
underlineThickness: s, | |
unicode: null, | |
unicodeBidi: null, | |
unicodeRange: null, | |
unitsPerEm: s, | |
values: null, | |
vAlphabetic: s, | |
vMathematical: s, | |
vectorEffect: null, | |
vHanging: s, | |
vIdeographic: s, | |
version: null, | |
vertAdvY: s, | |
vertOriginX: s, | |
vertOriginY: s, | |
viewBox: null, | |
viewTarget: null, | |
visibility: null, | |
width: null, | |
widths: null, | |
wordSpacing: null, | |
writingMode: null, | |
x: null, | |
x1: null, | |
x2: null, | |
xChannelSelector: null, | |
xHeight: s, | |
y: null, | |
y1: null, | |
y2: null, | |
yChannelSelector: null, | |
z: null, | |
zoomAndPan: null | |
} | |
}) | |
} | |
, | |
1716: (e,t,n)=>{ | |
"use strict"; | |
var i = n(6933); | |
e.exports = function(e, t) { | |
return i(e, t.toLowerCase()) | |
} | |
} | |
, | |
6933: e=>{ | |
"use strict"; | |
e.exports = function(e, t) { | |
return t in e ? e[t] : t | |
} | |
} | |
, | |
7297: (e,t,n)=>{ | |
"use strict"; | |
var i = n(1383) | |
, r = n(1782) | |
, o = n(4197); | |
e.exports = function(e) { | |
var t, n, a = e.space, s = e.mustUseProperty || [], l = e.attributes || {}, c = e.properties, u = e.transform, h = {}, d = {}; | |
for (t in c) | |
n = new o(t,u(l, t),c[t],a), | |
-1 !== s.indexOf(t) && (n.mustUseProperty = !0), | |
h[t] = n, | |
d[i(t)] = t, | |
d[i(n.attribute)] = t; | |
return new r(h,d,a) | |
} | |
} | |
, | |
4197: (e,t,n)=>{ | |
"use strict"; | |
var i = n(5325) | |
, r = n(5176); | |
e.exports = s, | |
s.prototype = new i, | |
s.prototype.defined = !0; | |
var o = ["boolean", "booleanish", "overloadedBoolean", "number", "commaSeparated", "spaceSeparated", "commaOrSpaceSeparated"] | |
, a = o.length; | |
function s(e, t, n, s) { | |
var c, u = -1; | |
for (l(this, "space", s), | |
i.call(this, e, t); ++u < a; ) | |
l(this, c = o[u], (n & r[c]) === r[c]) | |
} | |
function l(e, t, n) { | |
n && (e[t] = n) | |
} | |
} | |
, | |
5325: e=>{ | |
"use strict"; | |
e.exports = n; | |
var t = n.prototype; | |
function n(e, t) { | |
this.property = e, | |
this.attribute = t | |
} | |
t.space = null, | |
t.attribute = null, | |
t.property = null, | |
t.boolean = !1, | |
t.booleanish = !1, | |
t.overloadedBoolean = !1, | |
t.number = !1, | |
t.commaSeparated = !1, | |
t.spaceSeparated = !1, | |
t.commaOrSpaceSeparated = !1, | |
t.mustUseProperty = !1, | |
t.defined = !1 | |
} | |
, | |
5261: (e,t,n)=>{ | |
"use strict"; | |
var i = n(8593) | |
, r = n(1782); | |
e.exports = function(e) { | |
var t, n, o = e.length, a = [], s = [], l = -1; | |
for (; ++l < o; ) | |
t = e[l], | |
a.push(t.property), | |
s.push(t.normal), | |
n = t.space; | |
return new r(i.apply(null, a),i.apply(null, s),n) | |
} | |
} | |
, | |
1782: e=>{ | |
"use strict"; | |
e.exports = n; | |
var t = n.prototype; | |
function n(e, t, n) { | |
this.property = e, | |
this.normal = t, | |
n && (this.space = n) | |
} | |
t.space = null, | |
t.normal = {}, | |
t.property = {} | |
} | |
, | |
5176: (e,t)=>{ | |
"use strict"; | |
var n = 0; | |
function i() { | |
return Math.pow(2, ++n) | |
} | |
t.boolean = i(), | |
t.booleanish = i(), | |
t.overloadedBoolean = i(), | |
t.number = i(), | |
t.spaceSeparated = i(), | |
t.commaSeparated = i(), | |
t.commaOrSpaceSeparated = i() | |
} | |
, | |
6920: (e,t,n)=>{ | |
"use strict"; | |
var i = n(7297); | |
e.exports = i({ | |
space: "xlink", | |
transform: function(e, t) { | |
return "xlink:" + t.slice(5).toLowerCase() | |
}, | |
properties: { | |
xLinkActuate: null, | |
xLinkArcRole: null, | |
xLinkHref: null, | |
xLinkRole: null, | |
xLinkShow: null, | |
xLinkTitle: null, | |
xLinkType: null | |
} | |
}) | |
} | |
, | |
313: (e,t,n)=>{ | |
"use strict"; | |
var i = n(7297); | |
e.exports = i({ | |
space: "xml", | |
transform: function(e, t) { | |
return "xml:" + t.slice(3).toLowerCase() | |
}, | |
properties: { | |
xmlLang: null, | |
xmlBase: null, | |
xmlSpace: null | |
} | |
}) | |
} | |
, | |
4506: (e,t,n)=>{ | |
"use strict"; | |
var i = n(7297) | |
, r = n(1716); | |
e.exports = i({ | |
space: "xmlns", | |
attributes: { | |
xmlnsxlink: "xmlns:xlink" | |
}, | |
transform: r, | |
properties: { | |
xmlns: null, | |
xmlnsXLink: null | |
} | |
}) | |
} | |
, | |
1383: e=>{ | |
"use strict"; | |
e.exports = function(e) { | |
return e.toLowerCase() | |
} | |
} | |
, | |
7422: (e,t,n)=>{ | |
"use strict"; | |
var i = n(5261) | |
, r = n(6920) | |
, o = n(313) | |
, a = n(4506) | |
, s = n(8055) | |
, l = n(4834); | |
e.exports = i([o, r, a, s, l]) | |
} | |
, | |
8502: (e,t)=>{ | |
"use strict"; | |
t.A = function(e) { | |
return e.join(i).trim() | |
} | |
; | |
var n = "" | |
, i = " " | |
, r = /[ \t\n\r\f]+/g | |
} | |
, | |
631: (e,t,n)=>{ | |
"use strict"; | |
e.exports = n(9159) | |
} | |
, | |
6426: (e,t,n)=>{ | |
var i, r = n(9710), o = {}; | |
for (i in e.exports = o, | |
r) | |
o[r[i]] = i | |
} | |
, | |
9677: e=>{ | |
e.exports = String.fromCharCode | |
} | |
, | |
3303: e=>{ | |
e.exports = {}.hasOwnProperty | |
} | |
, | |
1632: e=>{ | |
"use strict"; | |
e.exports = function(e, t) { | |
if (e = e.replace(t.subset ? function(e) { | |
var t = [] | |
, n = -1; | |
for (; ++n < e.length; ) | |
t.push(e[n].replace(/[|\\{}()[\]^$+*?.]/g, "\\$&")); | |
return new RegExp("(?:" + t.join("|") + ")","g") | |
}(t.subset) : /["&'<>`]/g, n), | |
t.subset || t.escapeOnly) | |
return e; | |
return e.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g, (function(e, n, i) { | |
return t.format(1024 * (e.charCodeAt(0) - 55296) + e.charCodeAt(1) - 56320 + 65536, i.charCodeAt(n + 2), t) | |
} | |
)).replace(/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g, n); | |
function n(e, n, i) { | |
return t.format(e.charCodeAt(0), i.charCodeAt(n + 1), t) | |
} | |
} | |
} | |
, | |
1185: (e,t,n)=>{ | |
"use strict"; | |
var i = n(8593) | |
, r = n(1632) | |
, o = n(6901); | |
e.exports = function(e, t) { | |
return r(e, i(t, { | |
format: o | |
})) | |
} | |
} | |
, | |
9932: (e,t,n)=>{ | |
"use strict"; | |
var i = n(1632) | |
, r = n(6901); | |
e.exports = function(e) { | |
return i(e, { | |
escapeOnly: !0, | |
useNamedReferences: !0, | |
format: r | |
}) | |
} | |
} | |
, | |
9159: (e,t,n)=>{ | |
"use strict"; | |
var i = n(1185) | |
, r = n(9932); | |
e.exports = i, | |
i.escape = r | |
} | |
, | |
6901: (e,t,n)=>{ | |
e.exports = function(e, t, n) { | |
var a, s, l; | |
(n.useNamedReferences || n.useShortestReferences) && (a = o(e, t, n.omitOptionalSemicolons, n.attribute)); | |
!n.useShortestReferences && a || (s = i(e, t, n.omitOptionalSemicolons), | |
n.useShortestReferences && (l = r(e, t, n.omitOptionalSemicolons)).length < s.length && (s = l)); | |
return a && (!n.useShortestReferences || a.length < s.length) ? a : s | |
} | |
; | |
var i = n(4169) | |
, r = n(5245) | |
, o = n(2315) | |
} | |
, | |
5245: (e,t,n)=>{ | |
e.exports = function(e, t, n) { | |
var r = "&#" + String(e); | |
return n && t && !/\d/.test(i(t)) ? r : r + ";" | |
} | |
; | |
var i = n(9677) | |
} | |
, | |
4169: (e,t,n)=>{ | |
e.exports = function(e, t, n) { | |
var r = "&#x" + e.toString(16).toUpperCase(); | |
return n && t && !/[\dA-Fa-f]/.test(i(t)) ? r : r + ";" | |
} | |
; | |
var i = n(9677) | |
} | |
, | |
2315: (e,t,n)=>{ | |
e.exports = function(e, t, n, l) { | |
var c, u, h = o(e); | |
if (a.call(r, h)) | |
return u = "&" + (c = r[h]), | |
n && a.call(i, c) && -1 === s.indexOf(c) && (!l || t && 61 !== t && /[^\da-z]/i.test(o(t))) ? u : u + ";"; | |
return "" | |
} | |
; | |
var i = n(4472) | |
, r = n(6426) | |
, o = n(9677) | |
, a = n(3303) | |
, s = n(5547) | |
} | |
, | |
9650: e=>{ | |
"use strict"; | |
e.exports = function(e, t, n) { | |
var i; | |
null != n || "object" == typeof t && !Array.isArray(t) || (n = t, | |
t = {}); | |
i = Object.assign({ | |
type: String(e) | |
}, t), | |
Array.isArray(n) ? i.children = n : null != n && (i.value = String(n)); | |
return i | |
} | |
} | |
, | |
6859: e=>{ | |
"use strict"; | |
e.exports = function(e) { | |
return !(e && e.position && e.position.start && e.position.start.line && e.position.start.column && e.position.end && e.position.end.line && e.position.end.column) | |
} | |
} | |
, | |
493: e=>{ | |
"use strict"; | |
function t(e) { | |
if (null == e) | |
return n; | |
if ("string" == typeof e) | |
return function(e) { | |
return t; | |
function t(t) { | |
return Boolean(t && t.type === e) | |
} | |
}(e); | |
if ("object" == typeof e) | |
return "length"in e ? function(e) { | |
var n = [] | |
, i = -1; | |
for (; ++i < e.length; ) | |
n[i] = t(e[i]); | |
return r; | |
function r() { | |
for (var e = -1; ++e < n.length; ) | |
if (n[e].apply(this, arguments)) | |
return !0; | |
return !1 | |
} | |
}(e) : function(e) { | |
return t; | |
function t(t) { | |
var n; | |
for (n in e) | |
if (t[n] !== e[n]) | |
return !1; | |
return !0 | |
} | |
}(e); | |
if ("function" == typeof e) | |
return e; | |
throw new Error("Expected function, string, or object as test") | |
} | |
function n() { | |
return !0 | |
} | |
e.exports = t | |
} | |
, | |
1039: e=>{ | |
"use strict"; | |
var t = r("start") | |
, n = r("end"); | |
function i(e) { | |
return { | |
start: t(e), | |
end: n(e) | |
} | |
} | |
function r(e) { | |
return t.displayName = e, | |
t; | |
function t(t) { | |
var n = t && t.position && t.position[e] || {}; | |
return { | |
line: n.line || null, | |
column: n.column || null, | |
offset: isNaN(n.offset) ? null : n.offset | |
} | |
} | |
} | |
e.exports = i, | |
i.start = t, | |
i.end = n | |
} | |
, | |
8124: (e,t,n)=>{ | |
"use strict"; | |
var i = n(6658); | |
function r(e) { | |
delete e.position | |
} | |
function o(e) { | |
e.position = void 0 | |
} | |
e.exports = function(e, t) { | |
return i(e, t ? r : o), | |
e | |
} | |
} | |
, | |
2472: e=>{ | |
"use strict"; | |
var t = {}.hasOwnProperty; | |
function n(e) { | |
return e && "object" == typeof e || (e = {}), | |
r(e.line) + ":" + r(e.column) | |
} | |
function i(e) { | |
return e && "object" == typeof e || (e = {}), | |
n(e.start) + "-" + n(e.end) | |
} | |
function r(e) { | |
return e && "number" == typeof e ? e : 1 | |
} | |
e.exports = function(e) { | |
if (!e || "object" != typeof e) | |
return ""; | |
if (t.call(e, "position") || t.call(e, "type")) | |
return i(e.position); | |
if (t.call(e, "start") || t.call(e, "end")) | |
return i(e); | |
if (t.call(e, "line") || t.call(e, "column")) | |
return n(e); | |
return "" | |
} | |
} | |
, | |
5001: e=>{ | |
e.exports = function(e) { | |
return e | |
} | |
} | |
, | |
2888: (e,t,n)=>{ | |
"use strict"; | |
e.exports = l; | |
var i = n(493) | |
, r = n(5001) | |
, o = !0 | |
, a = "skip" | |
, s = !1; | |
function l(e, t, n, l) { | |
var c, u; | |
"function" == typeof t && "function" != typeof n && (l = n, | |
n = t, | |
t = null), | |
u = i(t), | |
c = l ? -1 : 1, | |
function e(i, h, d) { | |
var p, f = "object" == typeof i && null !== i ? i : {}; | |
"string" == typeof f.type && (p = "string" == typeof f.tagName ? f.tagName : "string" == typeof f.name ? f.name : void 0, | |
m.displayName = "node (" + r(f.type + (p ? "<" + p + ">" : "")) + ")"); | |
return m; | |
function m() { | |
var r, p, f = d.concat(i), m = []; | |
if ((!t || u(i, h, d[d.length - 1] || null)) && (m = function(e) { | |
if (null !== e && "object" == typeof e && "length"in e) | |
return e; | |
if ("number" == typeof e) | |
return [o, e]; | |
return [e] | |
}(n(i, d)), | |
m[0] === s)) | |
return m; | |
if (i.children && m[0] !== a) | |
for (p = (l ? i.children.length : -1) + c; p > -1 && p < i.children.length; ) { | |
if ((r = e(i.children[p], p, f)())[0] === s) | |
return r; | |
p = "number" == typeof r[1] ? r[1] : p + c | |
} | |
return m | |
} | |
}(e, null, [])() | |
} | |
l.CONTINUE = o, | |
l.SKIP = a, | |
l.EXIT = s | |
} | |
, | |
6658: (e,t,n)=>{ | |
"use strict"; | |
e.exports = s; | |
var i = n(2888) | |
, r = i.CONTINUE | |
, o = i.SKIP | |
, a = i.EXIT; | |
function s(e, t, n, r) { | |
"function" == typeof t && "function" != typeof n && (r = n, | |
n = t, | |
t = null), | |
i(e, t, (function(e, t) { | |
var i = t[t.length - 1] | |
, r = i ? i.children.indexOf(e) : null; | |
return n(e, r, i) | |
} | |
), r) | |
} | |
s.CONTINUE = r, | |
s.SKIP = o, | |
s.EXIT = a | |
} | |
, | |
922: e=>{ | |
"use strict"; | |
e.exports = function(e) { | |
var t = String(e) | |
, n = [] | |
, i = /\r?\n|\r/g; | |
for (; i.exec(t); ) | |
n.push(i.lastIndex); | |
return n.push(t.length + 1), | |
{ | |
toPoint: r, | |
toPosition: r, | |
toOffset: function(e) { | |
var t, i = e && e.line, r = e && e.column; | |
isNaN(i) || isNaN(r) || !(i - 1 in n) || (t = (n[i - 2] || 0) + r - 1 || 0); | |
return t > -1 && t < n[n.length - 1] ? t : -1 | |
} | |
}; | |
function r(e) { | |
var t = -1; | |
if (e > -1 && e < n[n.length - 1]) | |
for (; ++t < n.length; ) | |
if (n[t] > e) | |
return { | |
line: t + 1, | |
column: e - (n[t - 1] || 0) + 1, | |
offset: e | |
}; | |
return {} | |
} | |
} | |
} | |
, | |
859: (e,t,n)=>{ | |
"use strict"; | |
var i = n(2472); | |
function r() {} | |
e.exports = a, | |
r.prototype = Error.prototype, | |
a.prototype = new r; | |
var o = a.prototype; | |
function a(e, t, n) { | |
var r, o, a; | |
"string" == typeof t && (n = t, | |
t = null), | |
r = function(e) { | |
var t, n = [null, null]; | |
"string" == typeof e && (-1 === (t = e.indexOf(":")) ? n[1] = e : (n[0] = e.slice(0, t), | |
n[1] = e.slice(t + 1))); | |
return n | |
}(n), | |
o = i(t) || "1:1", | |
a = { | |
start: { | |
line: null, | |
column: null | |
}, | |
end: { | |
line: null, | |
column: null | |
} | |
}, | |
t && t.position && (t = t.position), | |
t && (t.start ? (a = t, | |
t = t.start) : a.start = t), | |
e.stack && (this.stack = e.stack, | |
e = e.message), | |
this.message = e, | |
this.name = o, | |
this.reason = e, | |
this.line = t ? t.line : null, | |
this.column = t ? t.column : null, | |
this.location = a, | |
this.source = r[0], | |
this.ruleId = r[1] | |
} | |
o.file = "", | |
o.name = "", | |
o.reason = "", | |
o.message = "", | |
o.stack = "", | |
o.fatal = null, | |
o.column = null, | |
o.line = null | |
} | |
, | |
7074: (e,t,n)=>{ | |
"use strict"; | |
e.exports = n(9478) | |
} | |
, | |
4571: (e,t,n)=>{ | |
"use strict"; | |
var i = n(6931) | |
, r = n(7512) | |
, o = n(2660); | |
e.exports = l; | |
var a = {}.hasOwnProperty | |
, s = ["history", "path", "basename", "stem", "extname", "dirname"]; | |
function l(e) { | |
var t, n; | |
if (e) { | |
if ("string" == typeof e || o(e)) | |
e = { | |
contents: e | |
}; | |
else if ("message"in e && "messages"in e) | |
return e | |
} else | |
e = {}; | |
if (!(this instanceof l)) | |
return new l(e); | |
for (this.data = {}, | |
this.messages = [], | |
this.history = [], | |
this.cwd = r.cwd(), | |
n = -1; ++n < s.length; ) | |
t = s[n], | |
a.call(e, t) && (this[t] = e[t]); | |
for (t in e) | |
s.indexOf(t) < 0 && (this[t] = e[t]) | |
} | |
function c(e, t) { | |
if (e && e.indexOf(i.sep) > -1) | |
throw new Error("`" + t + "` cannot be a path: did not expect `" + i.sep + "`") | |
} | |
function u(e, t) { | |
if (!e) | |
throw new Error("`" + t + "` cannot be empty") | |
} | |
function h(e, t) { | |
if (!e) | |
throw new Error("Setting `" + t + "` requires `path` to be set too") | |
} | |
l.prototype.toString = function(e) { | |
return (this.contents || "").toString(e) | |
} | |
, | |
Object.defineProperty(l.prototype, "path", { | |
get: function() { | |
return this.history[this.history.length - 1] | |
}, | |
set: function(e) { | |
u(e, "path"), | |
this.path !== e && this.history.push(e) | |
} | |
}), | |
Object.defineProperty(l.prototype, "dirname", { | |
get: function() { | |
return "string" == typeof this.path ? i.dirname(this.path) : void 0 | |
}, | |
set: function(e) { | |
h(this.path, "dirname"), | |
this.path = i.join(e || "", this.basename) | |
} | |
}), | |
Object.defineProperty(l.prototype, "basename", { | |
get: function() { | |
return "string" == typeof this.path ? i.basename(this.path) : void 0 | |
}, | |
set: function(e) { | |
u(e, "basename"), | |
c(e, "basename"), | |
this.path = i.join(this.dirname || "", e) | |
} | |
}), | |
Object.defineProperty(l.prototype, "extname", { | |
get: function() { | |
return "string" == typeof this.path ? i.extname(this.path) : void 0 | |
}, | |
set: function(e) { | |
if (c(e, "extname"), | |
h(this.path, "extname"), | |
e) { | |
if (46 !== e.charCodeAt(0)) | |
throw new Error("`extname` must start with `.`"); | |
if (e.indexOf(".", 1) > -1) | |
throw new Error("`extname` cannot contain multiple dots") | |
} | |
this.path = i.join(this.dirname, this.stem + (e || "")) | |
} | |
}), | |
Object.defineProperty(l.prototype, "stem", { | |
get: function() { | |
return "string" == typeof this.path ? i.basename(this.path, this.extname) : void 0 | |
}, | |
set: function(e) { | |
u(e, "stem"), | |
c(e, "stem"), | |
this.path = i.join(this.dirname || "", e + (this.extname || "")) | |
} | |
}) | |
} | |
, | |
9478: (e,t,n)=>{ | |
"use strict"; | |
var i = n(859) | |
, r = n(4571); | |
e.exports = r, | |
r.prototype.message = function(e, t, n) { | |
var r = new i(e,t,n); | |
this.path && (r.name = this.path + ":" + r.name, | |
r.file = this.path); | |
return r.fatal = !1, | |
this.messages.push(r), | |
r | |
} | |
, | |
r.prototype.info = function() { | |
var e = this.message.apply(this, arguments); | |
return e.fatal = null, | |
e | |
} | |
, | |
r.prototype.fail = function() { | |
var e = this.message.apply(this, arguments); | |
throw e.fatal = !0, | |
e | |
} | |
} | |
, | |
6931: (e,t)=>{ | |
"use strict"; | |
function n(e) { | |
if ("string" != typeof e) | |
throw new TypeError("Path must be a string. Received " + JSON.stringify(e)) | |
} | |
t.basename = function(e, t) { | |
var i, r, o, a, s = 0, l = -1; | |
if (void 0 !== t && "string" != typeof t) | |
throw new TypeError('"ext" argument must be a string'); | |
if (n(e), | |
i = e.length, | |
void 0 === t || !t.length || t.length > e.length) { | |
for (; i--; ) | |
if (47 === e.charCodeAt(i)) { | |
if (o) { | |
s = i + 1; | |
break | |
} | |
} else | |
l < 0 && (o = !0, | |
l = i + 1); | |
return l < 0 ? "" : e.slice(s, l) | |
} | |
if (t === e) | |
return ""; | |
r = -1, | |
a = t.length - 1; | |
for (; i--; ) | |
if (47 === e.charCodeAt(i)) { | |
if (o) { | |
s = i + 1; | |
break | |
} | |
} else | |
r < 0 && (o = !0, | |
r = i + 1), | |
a > -1 && (e.charCodeAt(i) === t.charCodeAt(a--) ? a < 0 && (l = i) : (a = -1, | |
l = r)); | |
s === l ? l = r : l < 0 && (l = e.length); | |
return e.slice(s, l) | |
} | |
, | |
t.dirname = function(e) { | |
var t, i, r; | |
if (n(e), | |
!e.length) | |
return "."; | |
t = -1, | |
r = e.length; | |
for (; --r; ) | |
if (47 === e.charCodeAt(r)) { | |
if (i) { | |
t = r; | |
break | |
} | |
} else | |
i || (i = !0); | |
return t < 0 ? 47 === e.charCodeAt(0) ? "/" : "." : 1 === t && 47 === e.charCodeAt(0) ? "//" : e.slice(0, t) | |
} | |
, | |
t.extname = function(e) { | |
var t, i, r, o = -1, a = 0, s = -1, l = 0; | |
n(e), | |
r = e.length; | |
for (; r--; ) | |
if (47 !== (i = e.charCodeAt(r))) | |
s < 0 && (t = !0, | |
s = r + 1), | |
46 === i ? o < 0 ? o = r : 1 !== l && (l = 1) : o > -1 && (l = -1); | |
else if (t) { | |
a = r + 1; | |
break | |
} | |
if (o < 0 || s < 0 || 0 === l || 1 === l && o === s - 1 && o === a + 1) | |
return ""; | |
return e.slice(o, s) | |
} | |
, | |
t.join = function() { | |
var e, t = -1; | |
for (; ++t < arguments.length; ) | |
n(arguments[t]), | |
arguments[t] && (e = void 0 === e ? arguments[t] : e + "/" + arguments[t]); | |
return void 0 === e ? "." : function(e) { | |
var t, i; | |
n(e), | |
t = 47 === e.charCodeAt(0), | |
i = function(e, t) { | |
var n, i, r = "", o = 0, a = -1, s = 0, l = -1; | |
for (; ++l <= e.length; ) { | |
if (l < e.length) | |
n = e.charCodeAt(l); | |
else { | |
if (47 === n) | |
break; | |
n = 47 | |
} | |
if (47 === n) { | |
if (a === l - 1 || 1 === s) | |
; | |
else if (a !== l - 1 && 2 === s) { | |
if (r.length < 2 || 2 !== o || 46 !== r.charCodeAt(r.length - 1) || 46 !== r.charCodeAt(r.length - 2)) | |
if (r.length > 2) { | |
if ((i = r.lastIndexOf("/")) !== r.length - 1) { | |
i < 0 ? (r = "", | |
o = 0) : o = (r = r.slice(0, i)).length - 1 - r.lastIndexOf("/"), | |
a = l, | |
s = 0; | |
continue | |
} | |
} else if (r.length) { | |
r = "", | |
o = 0, | |
a = l, | |
s = 0; | |
continue | |
} | |
t && (r = r.length ? r + "/.." : "..", | |
o = 2) | |
} else | |
r.length ? r += "/" + e.slice(a + 1, l) : r = e.slice(a + 1, l), | |
o = l - a - 1; | |
a = l, | |
s = 0 | |
} else | |
46 === n && s > -1 ? s++ : s = -1 | |
} | |
return r | |
}(e, !t), | |
i.length || t || (i = "."); | |
i.length && 47 === e.charCodeAt(e.length - 1) && (i += "/"); | |
return t ? "/" + i : i | |
}(e) | |
} | |
, | |
t.sep = "/" | |
} | |
, | |
7512: (e,t)=>{ | |
"use strict"; | |
t.cwd = function() { | |
return "/" | |
} | |
} | |
, | |
8177: (e,t)=>{ | |
"use strict"; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}) | |
} | |
, | |
8193: (e,t,n)=>{ | |
"use strict"; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var i, r = n(6661), o = n(9840), a = n(9840), s = n(5416); | |
!function(e) { | |
e[e.STATE_TAG = 1] = "STATE_TAG", | |
e[e.STATE_SIZE = 2] = "STATE_SIZE", | |
e[e.STATE_CONTENT = 3] = "STATE_CONTENT" | |
}(i || (i = {})); | |
var l = function() { | |
function e() { | |
this._buffer = new o.Buffer(0), | |
this._tag_stack = [], | |
this._state = i.STATE_TAG, | |
this._cursor = 0, | |
this._total = 0, | |
this._schema = s.byEbmlID, | |
this._result = [] | |
} | |
return e.prototype.decode = function(e) { | |
this.readChunk(e); | |
var t = this._result; | |
return this._result = [], | |
t | |
} | |
, | |
e.prototype.readChunk = function(e) { | |
for (this._buffer = a.concat([this._buffer, new o.Buffer(e)]); this._cursor < this._buffer.length && (this._state !== i.STATE_TAG || this.readTag()) && (this._state !== i.STATE_SIZE || this.readSize()) && (this._state !== i.STATE_CONTENT || this.readContent()); ) | |
; | |
} | |
, | |
e.prototype.getSchemaInfo = function(e) { | |
return this._schema[e] || { | |
name: "unknown", | |
level: -1, | |
type: "unknown", | |
description: "unknown" | |
} | |
} | |
, | |
e.prototype.readTag = function() { | |
if (this._cursor >= this._buffer.length) | |
return !1; | |
var e = (0, | |
o.readVint)(this._buffer, this._cursor); | |
if (null == e) | |
return !1; | |
var t = this._buffer.slice(this._cursor, this._cursor + e.length).reduce((function(e, t, n, i) { | |
return e + t * Math.pow(16, 2 * (i.length - 1 - n)) | |
} | |
), 0) | |
, n = this.getSchemaInfo(t) | |
, r = { | |
EBML_ID: t.toString(16), | |
schema: n, | |
type: n.type, | |
name: n.name, | |
level: n.level, | |
tagStart: this._total, | |
tagEnd: this._total + e.length, | |
sizeStart: this._total + e.length, | |
sizeEnd: null, | |
dataStart: null, | |
dataEnd: null, | |
dataSize: null, | |
data: null | |
}; | |
return this._tag_stack.push(r), | |
this._cursor += e.length, | |
this._total += e.length, | |
this._state = i.STATE_SIZE, | |
!0 | |
} | |
, | |
e.prototype.readSize = function() { | |
if (this._cursor >= this._buffer.length) | |
return !1; | |
var e = (0, | |
o.readVint)(this._buffer, this._cursor); | |
if (null == e) | |
return !1; | |
var t = this._tag_stack[this._tag_stack.length - 1]; | |
return t.sizeEnd = t.sizeStart + e.length, | |
t.dataStart = t.sizeEnd, | |
t.dataSize = e.value, | |
-1 === e.value ? (t.dataEnd = -1, | |
"m" === t.type && (t.unknownSize = !0)) : t.dataEnd = t.sizeEnd + e.value, | |
this._cursor += e.length, | |
this._total += e.length, | |
this._state = i.STATE_CONTENT, | |
!0 | |
} | |
, | |
e.prototype.readContent = function() { | |
var e = this._tag_stack[this._tag_stack.length - 1]; | |
if ("m" === e.type) { | |
if (e.isEnd = !1, | |
this._result.push(e), | |
this._state = i.STATE_TAG, | |
0 === e.dataSize) { | |
var t = Object.assign({}, e, { | |
isEnd: !0 | |
}); | |
this._result.push(t), | |
this._tag_stack.pop() | |
} | |
return !0 | |
} | |
if (this._buffer.length < this._cursor + e.dataSize) | |
return !1; | |
var n = this._buffer.slice(this._cursor, this._cursor + e.dataSize); | |
switch (this._buffer = this._buffer.slice(this._cursor + e.dataSize), | |
e.data = n, | |
e.type) { | |
case "u": | |
e.value = n.readUIntBE(0, n.length); | |
break; | |
case "i": | |
e.value = n.readIntBE(0, n.length); | |
break; | |
case "f": | |
e.value = 4 === e.dataSize ? n.readFloatBE(0) : 8 === e.dataSize ? n.readDoubleBE(0) : (console.warn("cannot read ".concat(e.dataSize, " octets float. failback to 0")), | |
0); | |
break; | |
case "s": | |
e.value = n.toString("ascii"); | |
break; | |
case "8": | |
e.value = n.toString("utf8"); | |
break; | |
case "b": | |
e.value = n; | |
break; | |
case "d": | |
e.value = (0, | |
o.convertEBMLDateToJSDate)(new r.Int64BE(n).toNumber()) | |
} | |
if (null === e.value) | |
throw new Error("unknown tag type:" + e.type); | |
for (this._result.push(e), | |
this._total += e.dataSize, | |
this._state = i.STATE_TAG, | |
this._cursor = 0, | |
this._tag_stack.pop(); this._tag_stack.length > 0; ) { | |
var a = this._tag_stack[this._tag_stack.length - 1]; | |
if (a.dataEnd < 0) | |
return this._tag_stack.pop(), | |
!0; | |
if (this._total < a.dataEnd) | |
break; | |
if ("m" !== a.type) | |
throw new Error("parent element is not master element"); | |
t = Object.assign({}, a, { | |
isEnd: !0 | |
}); | |
this._result.push(t), | |
this._tag_stack.pop() | |
} | |
return !0 | |
} | |
, | |
e | |
}(); | |
t.default = l | |
} | |
, | |
4741: (e,t,n)=>{ | |
"use strict"; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var i = n(9840) | |
, r = n(9840) | |
, o = n(5416) | |
, a = function() { | |
function e() { | |
this._schema = o.byEbmlID, | |
this._buffers = [], | |
this._stack = [] | |
} | |
return e.prototype.encode = function(e) { | |
var t = this; | |
return i.concat(e.reduce((function(e, n) { | |
return e.concat(t.encodeChunk(n)) | |
} | |
), [])).buffer | |
} | |
, | |
e.prototype.encodeChunk = function(e) { | |
return "m" === e.type ? e.isEnd ? this.endTag(e) : this.startTag(e) : (e.data = r.Buffer.from(e.data), | |
this.writeTag(e)), | |
this.flush() | |
} | |
, | |
e.prototype.flush = function() { | |
var e = this._buffers; | |
return this._buffers = [], | |
e | |
} | |
, | |
e.prototype.getSchemaInfo = function(e) { | |
for (var t = Object.keys(this._schema).map(Number), n = 0; n < t.length; n++) { | |
var i = t[n]; | |
if (this._schema[i].name === e) | |
return new r.Buffer(i.toString(16),"hex") | |
} | |
return null | |
} | |
, | |
e.prototype.writeTag = function(e) { | |
var t = e.name | |
, n = this.getSchemaInfo(t) | |
, r = e.data; | |
if (null == n) | |
throw new Error("No schema entry found for " + t); | |
var o = i.encodeTag(n, r); | |
this._stack.length > 0 ? this._stack[this._stack.length - 1].children.push({ | |
tagId: n, | |
elm: e, | |
children: [], | |
data: o | |
}) : this._buffers = this._buffers.concat(o) | |
} | |
, | |
e.prototype.startTag = function(e) { | |
var t = e.name | |
, n = this.getSchemaInfo(t); | |
if (null == n) | |
throw new Error("No schema entry found for " + t); | |
if (e.unknownSize) { | |
var o = i.encodeTag(n, new r.Buffer(0), e.unknownSize); | |
this._buffers = this._buffers.concat(o) | |
} else { | |
var a = { | |
tagId: n, | |
elm: e, | |
children: [], | |
data: null | |
}; | |
this._stack.length > 0 && this._stack[this._stack.length - 1].children.push(a), | |
this._stack.push(a) | |
} | |
} | |
, | |
e.prototype.endTag = function(e) { | |
e.name; | |
var t = this._stack.pop(); | |
if (null == t) | |
throw new Error("EBML structure is broken"); | |
if (t.elm.name !== e.name) | |
throw new Error("EBML structure is broken"); | |
var n = t.children.reduce((function(e, t) { | |
if (null === t.data) | |
throw new Error("EBML structure is broken"); | |
return e.concat(t.data) | |
} | |
), []) | |
, r = i.concat(n); | |
"m" === t.elm.type ? t.data = i.encodeTag(t.tagId, r, t.elm.unknownSize) : t.data = i.encodeTag(t.tagId, r), | |
this._stack.length < 1 && (this._buffers = this._buffers.concat(t.data)) | |
} | |
, | |
e | |
}(); | |
t.default = a | |
} | |
, | |
5226: function(e, t, n) { | |
"use strict"; | |
var i, r = this && this.__extends || (i = function(e, t) { | |
return i = Object.setPrototypeOf || { | |
__proto__: [] | |
}instanceof Array && function(e, t) { | |
e.__proto__ = t | |
} | |
|| function(e, t) { | |
for (var n in t) | |
Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]) | |
} | |
, | |
i(e, t) | |
} | |
, | |
function(e, t) { | |
if ("function" != typeof t && null !== t) | |
throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); | |
function n() { | |
this.constructor = e | |
} | |
i(e, t), | |
e.prototype = null === t ? Object.create(t) : (n.prototype = t.prototype, | |
new n) | |
} | |
); | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var o = n(9784) | |
, a = n(9840) | |
, s = function(e) { | |
function t() { | |
var t = e.call(this) || this; | |
return t.logGroup = "", | |
t.hasLoggingStarted = !1, | |
t.metadataloaded = !1, | |
t.chunks = [], | |
t.stack = [], | |
t.segmentOffset = 0, | |
t.last2SimpleBlockVideoTrackTimecode = [0, 0], | |
t.last2SimpleBlockAudioTrackTimecode = [0, 0], | |
t.lastClusterTimecode = 0, | |
t.lastClusterPosition = 0, | |
t.timecodeScale = 1e6, | |
t.metadataSize = 0, | |
t.metadatas = [], | |
t.cues = [], | |
t.firstVideoBlockRead = !1, | |
t.firstAudioBlockRead = !1, | |
t.currentTrack = { | |
TrackNumber: -1, | |
TrackType: -1, | |
DefaultDuration: null, | |
CodecDelay: null | |
}, | |
t.trackTypes = [], | |
t.trackDefaultDuration = [], | |
t.trackCodecDelay = [], | |
t.trackInfo = { | |
type: "nothing" | |
}, | |
t.ended = !1, | |
t.logging = !1, | |
t.use_duration_every_simpleblock = !1, | |
t.use_webp = !1, | |
t.use_segment_info = !0, | |
t.drop_default_duration = !0, | |
t | |
} | |
return r(t, e), | |
t.prototype.stop = function() { | |
for (this.ended = !0, | |
this.emit_segment_info(); this.stack.length; ) | |
this.stack.pop(), | |
this.logging && console.groupEnd(); | |
this.logging && this.hasLoggingStarted && this.logGroup && console.groupEnd() | |
} | |
, | |
t.prototype.emit_segment_info = function() { | |
var e = this.chunks; | |
if (this.chunks = [], | |
this.metadataloaded) { | |
if (!this.use_segment_info) | |
return; | |
var t = this.lastClusterTimecode | |
, n = this.duration | |
, i = this.timecodeScale; | |
this.emit("cluster", { | |
timecode: t, | |
data: e | |
}), | |
this.emit("duration", { | |
timecodeScale: i, | |
duration: n | |
}) | |
} else { | |
this.metadataloaded = !0, | |
this.metadatas = e; | |
var r = this.trackTypes.indexOf(1) | |
, o = this.trackTypes.indexOf(2); | |
if (this.trackInfo = r >= 0 && o >= 0 ? { | |
type: "both", | |
trackNumber: r | |
} : r >= 0 ? { | |
type: "video", | |
trackNumber: r | |
} : o >= 0 ? { | |
type: "audio", | |
trackNumber: o | |
} : { | |
type: "nothing" | |
}, | |
!this.use_segment_info) | |
return; | |
this.emit("metadata", { | |
data: e, | |
metadataSize: this.metadataSize | |
}) | |
} | |
} | |
, | |
t.prototype.read = function(e) { | |
var t = this | |
, n = !1; | |
if (!this.ended) { | |
if ("m" === e.type) | |
if (e.isEnd) | |
this.stack.pop(); | |
else { | |
var i = this.stack[this.stack.length - 1]; | |
if (null != i && i.level >= e.level) { | |
this.stack.pop(), | |
this.logging && console.groupEnd(), | |
i.dataEnd = e.dataEnd, | |
i.dataSize = e.dataEnd - i.dataStart, | |
i.unknownSize = !1; | |
var r = Object.assign({}, i, { | |
name: i.name, | |
type: i.type, | |
isEnd: !0 | |
}); | |
this.chunks.push(r) | |
} | |
this.stack.push(e) | |
} | |
if ("m" === e.type && "Segment" == e.name) | |
0 != this.segmentOffset && console.warn("Multiple segments detected!"), | |
this.segmentOffset = e.dataStart, | |
this.emit("segment_offset", this.segmentOffset); | |
else if ("b" === e.type && "SimpleBlock" === e.name) { | |
var o = a.ebmlBlock(e.data) | |
, s = o.timecode | |
, l = o.trackNumber | |
, c = o.frames; | |
if (1 === this.trackTypes[l]) { | |
if (!this.firstVideoBlockRead && (this.firstVideoBlockRead = !0, | |
"both" === this.trackInfo.type || "video" === this.trackInfo.type)) { | |
var u = this.lastClusterTimecode + s; | |
this.cues.push({ | |
CueTrack: l, | |
CueClusterPosition: this.lastClusterPosition, | |
CueTime: u | |
}), | |
this.emit("cue_info", { | |
CueTrack: l, | |
CueClusterPosition: this.lastClusterPosition, | |
CueTime: this.lastClusterTimecode | |
}), | |
this.emit("cue", { | |
CueTrack: l, | |
CueClusterPosition: this.lastClusterPosition, | |
CueTime: u | |
}) | |
} | |
this.last2SimpleBlockVideoTrackTimecode = [this.last2SimpleBlockVideoTrackTimecode[1], s] | |
} else if (2 === this.trackTypes[l]) { | |
if (!this.firstAudioBlockRead && (this.firstAudioBlockRead = !0, | |
"audio" === this.trackInfo.type)) { | |
u = this.lastClusterTimecode + s; | |
this.cues.push({ | |
CueTrack: l, | |
CueClusterPosition: this.lastClusterPosition, | |
CueTime: u | |
}), | |
this.emit("cue_info", { | |
CueTrack: l, | |
CueClusterPosition: this.lastClusterPosition, | |
CueTime: this.lastClusterTimecode | |
}), | |
this.emit("cue", { | |
CueTrack: l, | |
CueClusterPosition: this.lastClusterPosition, | |
CueTime: u | |
}) | |
} | |
this.last2SimpleBlockAudioTrackTimecode = [this.last2SimpleBlockAudioTrackTimecode[1], s] | |
} | |
this.use_duration_every_simpleblock && this.emit("duration", { | |
timecodeScale: this.timecodeScale, | |
duration: this.duration | |
}), | |
this.use_webp && c.forEach((function(e) { | |
if ("9d012a" === e.slice(3, 6).toString("hex")) { | |
var n = a.VP8BitStreamToRiffWebPBuffer(e) | |
, i = new Blob([n],{ | |
type: "image/webp" | |
}) | |
, r = t.duration; | |
t.emit("webp", { | |
currentTime: r, | |
webp: i | |
}) | |
} | |
} | |
)) | |
} else | |
"m" === e.type && "Cluster" === e.name && !1 === e.isEnd ? (this.firstVideoBlockRead = !1, | |
this.firstAudioBlockRead = !1, | |
this.emit_segment_info(), | |
this.emit("cluster_ptr", e.tagStart), | |
this.lastClusterPosition = e.tagStart) : "u" === e.type && "Timecode" === e.name ? this.lastClusterTimecode = e.value : "u" === e.type && "TimecodeScale" === e.name ? this.timecodeScale = e.value : "m" === e.type && "TrackEntry" === e.name ? e.isEnd ? (this.trackTypes[this.currentTrack.TrackNumber] = this.currentTrack.TrackType, | |
this.trackDefaultDuration[this.currentTrack.TrackNumber] = this.currentTrack.DefaultDuration, | |
this.trackCodecDelay[this.currentTrack.TrackNumber] = this.currentTrack.CodecDelay) : this.currentTrack = { | |
TrackNumber: -1, | |
TrackType: -1, | |
DefaultDuration: null, | |
CodecDelay: null | |
} : "u" === e.type && "TrackType" === e.name ? this.currentTrack.TrackType = e.value : "u" === e.type && "TrackNumber" === e.name ? this.currentTrack.TrackNumber = e.value : "u" === e.type && "CodecDelay" === e.name ? this.currentTrack.CodecDelay = e.value : "u" === e.type && "DefaultDuration" === e.name ? this.drop_default_duration ? (console.warn("DefaultDuration detected!, remove it"), | |
n = !0) : this.currentTrack.DefaultDuration = e.value : "unknown" === e.name && console.warn(e); | |
!this.metadataloaded && e.dataEnd > 0 && (this.metadataSize = e.dataEnd), | |
n || this.chunks.push(e), | |
this.logging && this.put(e) | |
} | |
} | |
, | |
Object.defineProperty(t.prototype, "duration", { | |
get: function() { | |
if ("nothing" === this.trackInfo.type) | |
return console.warn("no video, no audio track"), | |
0; | |
var e = 0 | |
, t = 0 | |
, n = 0 | |
, i = this.trackDefaultDuration[this.trackInfo.trackNumber]; | |
if ("number" == typeof i) | |
e = i; | |
else if ("both" === this.trackInfo.type) | |
this.last2SimpleBlockAudioTrackTimecode[1] > this.last2SimpleBlockVideoTrackTimecode[1] ? (e = (this.last2SimpleBlockAudioTrackTimecode[1] - this.last2SimpleBlockAudioTrackTimecode[0]) * this.timecodeScale, | |
"number" == typeof (r = this.trackCodecDelay[this.trackTypes.indexOf(2)]) && (t = r), | |
n = this.last2SimpleBlockAudioTrackTimecode[1]) : (e = (this.last2SimpleBlockVideoTrackTimecode[1] - this.last2SimpleBlockVideoTrackTimecode[0]) * this.timecodeScale, | |
"number" == typeof (r = this.trackCodecDelay[this.trackTypes.indexOf(1)]) && (t = r), | |
n = this.last2SimpleBlockVideoTrackTimecode[1]); | |
else if ("video" === this.trackInfo.type) { | |
e = (this.last2SimpleBlockVideoTrackTimecode[1] - this.last2SimpleBlockVideoTrackTimecode[0]) * this.timecodeScale, | |
"number" == typeof (r = this.trackCodecDelay[this.trackInfo.trackNumber]) && (t = r), | |
n = this.last2SimpleBlockVideoTrackTimecode[1] | |
} else if ("audio" === this.trackInfo.type) { | |
var r; | |
e = (this.last2SimpleBlockAudioTrackTimecode[1] - this.last2SimpleBlockAudioTrackTimecode[0]) * this.timecodeScale, | |
"number" == typeof (r = this.trackCodecDelay[this.trackInfo.trackNumber]) && (t = r), | |
n = this.last2SimpleBlockAudioTrackTimecode[1] | |
} | |
var o = ((this.lastClusterTimecode + n) * this.timecodeScale + e - t) / this.timecodeScale; | |
return Math.floor(o) | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
t.prototype.addListener = function(t, n) { | |
return e.prototype.addListener.call(this, t, n) | |
} | |
, | |
t.prototype.put = function(e) { | |
this.hasLoggingStarted || (this.hasLoggingStarted = !0, | |
this.logging && this.logGroup && console.groupCollapsed(this.logGroup)), | |
"m" === e.type ? e.isEnd ? console.groupEnd() : console.group(e.name + ":" + e.tagStart) : "b" === e.type ? console.log(e.name, e.type) : console.log(e.name, e.tagStart, e.type, e.value) | |
} | |
, | |
t | |
}(o.EventEmitter); | |
t.default = s | |
}, | |
5416: (e,t)=>{ | |
"use strict"; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}), | |
t.byEbmlID = void 0, | |
t.byEbmlID = { | |
128: { | |
name: "ChapterDisplay", | |
level: 4, | |
type: "m", | |
multiple: !0, | |
minver: 1, | |
webm: !0, | |
description: "Contains all possible strings to use for the chapter display." | |
}, | |
131: { | |
name: "TrackType", | |
level: 3, | |
type: "u", | |
mandatory: !0, | |
minver: 1, | |
range: "1-254", | |
description: "A set of track types coded on 8 bits (1: video, 2: audio, 3: complex, 0x10: logo, 0x11: subtitle, 0x12: buttons, 0x20: control)." | |
}, | |
133: { | |
name: "ChapString", | |
cppname: "ChapterString", | |
level: 5, | |
type: "8", | |
mandatory: !0, | |
minver: 1, | |
webm: !0, | |
description: "Contains the string to use as the chapter atom." | |
}, | |
134: { | |
name: "CodecID", | |
level: 3, | |
type: "s", | |
mandatory: !0, | |
minver: 1, | |
description: "An ID corresponding to the codec, see the codec page for more info." | |
}, | |
136: { | |
name: "FlagDefault", | |
cppname: "TrackFlagDefault", | |
level: 3, | |
type: "u", | |
mandatory: !0, | |
minver: 1, | |
default: 1, | |
range: "0-1", | |
description: "Set if that track (audio, video or subs) SHOULD be active if no language found matches the user preference. (1 bit)" | |
}, | |
137: { | |
name: "ChapterTrackNumber", | |
level: 5, | |
type: "u", | |
mandatory: !0, | |
multiple: !0, | |
minver: 1, | |
webm: !1, | |
range: "not 0", | |
description: "UID of the Track to apply this chapter too. In the absense of a control track, choosing this chapter will select the listed Tracks and deselect unlisted tracks. Absense of this element indicates that the Chapter should be applied to any currently used Tracks." | |
}, | |
145: { | |
name: "ChapterTimeStart", | |
level: 4, | |
type: "u", | |
mandatory: !0, | |
minver: 1, | |
webm: !0, | |
description: "Timestamp of the start of Chapter (not scaled)." | |
}, | |
146: { | |
name: "ChapterTimeEnd", | |
level: 4, | |
type: "u", | |
minver: 1, | |
webm: !1, | |
description: "Timestamp of the end of Chapter (timestamp excluded, not scaled)." | |
}, | |
150: { | |
name: "CueRefTime", | |
level: 5, | |
type: "u", | |
mandatory: !0, | |
minver: 2, | |
webm: !1, | |
description: "Timestamp of the referenced Block." | |
}, | |
151: { | |
name: "CueRefCluster", | |
level: 5, | |
type: "u", | |
mandatory: !0, | |
webm: !1, | |
description: "The Position of the Cluster containing the referenced Block." | |
}, | |
152: { | |
name: "ChapterFlagHidden", | |
level: 4, | |
type: "u", | |
mandatory: !0, | |
minver: 1, | |
webm: !1, | |
default: 0, | |
range: "0-1", | |
description: "If a chapter is hidden (1), it should not be available to the user interface (but still to Control Tracks; see flag notes). (1 bit)" | |
}, | |
16980: { | |
name: "ContentCompAlgo", | |
level: 6, | |
type: "u", | |
mandatory: !0, | |
minver: 1, | |
webm: !1, | |
default: 0, | |
description: "The compression algorithm used. Algorithms that have been specified so far are: 0 - zlib, 3 - Header Stripping" | |
}, | |
16981: { | |
name: "ContentCompSettings", | |
level: 6, | |
type: "b", | |
minver: 1, | |
webm: !1, | |
description: "Settings that might be needed by the decompressor. For Header Stripping (ContentCompAlgo=3), the bytes that were removed from the beggining of each frames of the track." | |
}, | |
17026: { | |
name: "DocType", | |
level: 1, | |
type: "s", | |
mandatory: !0, | |
default: "matroska", | |
minver: 1, | |
description: "A string that describes the type of document that follows this EBML header. 'matroska' in our case or 'webm' for webm files." | |
}, | |
17029: { | |
name: "DocTypeReadVersion", | |
level: 1, | |
type: "u", | |
mandatory: !0, | |
default: 1, | |
minver: 1, | |
description: "The minimum DocType version an interpreter has to support to read this file." | |
}, | |
17030: { | |
name: "EBMLVersion", | |
level: 1, | |
type: "u", | |
mandatory: !0, | |
default: 1, | |
minver: 1, | |
description: "The version of EBML parser used to create the file." | |
}, | |
17031: { | |
name: "DocTypeVersion", | |
level: 1, | |
type: "u", | |
mandatory: !0, | |
default: 1, | |
minver: 1, | |
description: "The version of DocType interpreter used to create the file." | |
}, | |
17476: { | |
name: "SegmentFamily", | |
level: 2, | |
type: "b", | |
multiple: !0, | |
minver: 1, | |
webm: !1, | |
bytesize: 16, | |
description: "A randomly generated unique ID that all segments related to each other must use (128 bits)." | |
}, | |
17505: { | |
name: "DateUTC", | |
level: 2, | |
type: "d", | |
minver: 1, | |
description: "Date of the origin of timestamp (value 0), i.e. production date." | |
}, | |
17540: { | |
name: "TagDefault", | |
level: 4, | |
type: "u", | |
mandatory: !0, | |
minver: 1, | |
webm: !1, | |
default: 1, | |
range: "0-1", | |
description: "Indication to know if this is the default/original language to use for the given tag. (1 bit)" | |
}, | |
17541: { | |
name: "TagBinary", | |
level: 4, | |
type: "b", | |
minver: 1, | |
webm: !1, | |
description: "The values of the Tag if it is binary. Note that this cannot be used in the same SimpleTag as TagString." | |
}, | |
17543: { | |
name: "TagString", | |
level: 4, | |
type: "8", | |
minver: 1, | |
webm: !1, | |
description: "The value of the Element." | |
}, | |
17545: { | |
name: "Duration", | |
level: 2, | |
type: "f", | |
minver: 1, | |
range: "> 0", | |
description: "Duration of the segment (based on TimecodeScale)." | |
}, | |
17816: { | |
name: "ChapterFlagEnabled", | |
level: 4, | |
type: "u", | |
mandatory: !0, | |
minver: 1, | |
webm: !1, | |
default: 1, | |
range: "0-1", | |
description: "Specify wether the chapter is enabled. It can be enabled/disabled by a Control Track. When disabled, the movie should skip all the content between the TimeStart and TimeEnd of this chapter (see flag notes). (1 bit)" | |
}, | |
18016: { | |
name: "FileMimeType", | |
level: 3, | |
type: "s", | |
mandatory: !0, | |
minver: 1, | |
webm: !1, | |
description: "MIME type of the file." | |
}, | |
18017: { | |
name: "FileUsedStartTime", | |
level: 3, | |
type: "u", | |
divx: !0, | |
description: "DivX font extension" | |
}, | |
18018: { | |
name: "FileUsedEndTime", | |
level: 3, | |
type: "u", | |
divx: !0, | |
description: "DivX font extension" | |
}, | |
18037: { | |
name: "FileReferral", | |
level: 3, | |
type: "b", | |
webm: !1, | |
description: "A binary value that a track/codec can refer to when the attachment is needed." | |
}, | |
20529: { | |
name: "ContentEncodingOrder", | |
level: 5, | |
type: "u", | |
mandatory: !0, | |
minver: 1, | |
webm: !1, | |
default: 0, | |
description: "Tells when this modification was used during encoding/muxing starting with 0 and counting upwards. The decoder/demuxer has to start with the highest order number it finds and work its way down. This value has to be unique over all ContentEncodingOrder elements in the segment." | |
}, | |
20530: { | |
name: "ContentEncodingScope", | |
level: 5, | |
type: "u", | |
mandatory: !0, | |
minver: 1, | |
webm: !1, | |
default: 1, | |
range: "not 0", | |
description: "A bit field that describes which elements have been modified in this way. Values (big endian) can be OR'ed. Possible values: 1 - all frame contents, 2 - the track's private data, 4 - the next ContentEncoding (next ContentEncodingOrder. Either the data inside ContentCompression and/or ContentEncryption)" | |
}, | |
20531: { | |
name: "ContentEncodingType", | |
level: 5, | |
type: "u", | |
mandatory: !0, | |
minver: 1, | |
webm: !1, | |
default: 0, | |
description: "A value describing what kind of transformation has been done. Possible values: 0 - compression, 1 - encryption" | |
}, | |
20532: { | |
name: "ContentCompression", | |
level: 5, | |
type: "m", | |
minver: 1, | |
webm: !1, | |
description: "Settings describing the compression used. Must be present if the value of ContentEncodingType is 0 and absent otherwise. Each block must be decompressable even if no previous block is available in order not to prevent seeking." | |
}, | |
20533: { | |
name: "ContentEncryption", | |
level: 5, | |
type: "m", | |
minver: 1, | |
webm: !1, | |
description: "Settings describing the encryption used. Must be present if the value of ContentEncodingType is 1 and absent otherwise." | |
}, | |
21368: { | |
name: "CueBlockNumber", | |
level: 4, | |
type: "u", | |
minver: 1, | |
default: 1, | |
range: "not 0", | |
description: "Number of the Block in the specified Cluster." | |
}, | |
22100: { | |
name: "ChapterStringUID", | |
level: 4, | |
type: "8", | |
mandatory: !1, | |
minver: 3, | |
webm: !0, | |
description: "A unique string ID to identify the Chapter. Use for WebVTT cue identifier storage." | |
}, | |
22337: { | |
name: "WritingApp", | |
level: 2, | |
type: "8", | |
mandatory: !0, | |
minver: 1, | |
description: 'Writing application ("mkvmerge-0.3.3").' | |
}, | |
22612: { | |
name: "SilentTracks", | |
cppname: "ClusterSilentTracks", | |
level: 2, | |
type: "m", | |
minver: 1, | |
webm: !1, | |
description: "The list of tracks that are not used in that part of the stream. It is useful when using overlay tracks on seeking. Then you should decide what track to use." | |
}, | |
25152: { | |
name: "ContentEncoding", | |
level: 4, | |
type: "m", | |
mandatory: !0, | |
multiple: !0, | |
minver: 1, | |
webm: !1, | |
description: "Settings for one content encoding like compression or encryption." | |
}, | |
25188: { | |
name: "BitDepth", | |
cppname: "AudioBitDepth", | |
level: 4, | |
type: "u", | |
minver: 1, | |
range: "not 0", | |
description: "Bits per sample, mostly used for PCM." | |
}, | |
25906: { | |
name: "SignedElement", | |
level: 3, | |
type: "b", | |
multiple: !0, | |
webm: !1, | |
description: "An element ID whose data will be used to compute the signature." | |
}, | |
26148: { | |
name: "TrackTranslate", | |
level: 3, | |
type: "m", | |
multiple: !0, | |
minver: 1, | |
webm: !1, | |
description: "The track identification for the given Chapter Codec." | |
}, | |
26897: { | |
name: "ChapProcessCommand", | |
cppname: "ChapterProcessCommand", | |
level: 5, | |
type: "m", | |
multiple: !0, | |
minver: 1, | |
webm: !1, | |
description: "Contains all the commands associated to the Atom." | |
}, | |
26914: { | |
name: "ChapProcessTime", | |
cppname: "ChapterProcessTime", | |
level: 6, | |
type: "u", | |
mandatory: !0, | |
minver: 1, | |
webm: !1, | |
description: "Defines when the process command should be handled (0: during the whole chapter, 1: before starting playback, 2: after playback of the chapter)." | |
}, | |
26916: { | |
name: "ChapterTranslate", | |
level: 2, | |
type: "m", | |
multiple: !0, | |
minver: 1, | |
webm: !1, | |
description: "A tuple of corresponding ID used by chapter codecs to represent this segment." | |
}, | |
26931: { | |
name: "ChapProcessData", | |
cppname: "ChapterProcessData", | |
level: 6, | |
type: "b", | |
mandatory: !0, | |
minver: 1, | |
webm: !1, | |
description: "Contains the command information. The data should be interpreted depending on the ChapProcessCodecID value. For ChapProcessCodecID = 1, the data correspond to the binary DVD cell pre/post commands." | |
}, | |
26948: { | |
name: "ChapProcess", | |
cppname: "ChapterProcess", | |
level: 4, | |
type: "m", | |
multiple: !0, | |
minver: 1, | |
webm: !1, | |
description: "Contains all the commands associated to the Atom." | |
}, | |
26965: { | |
name: "ChapProcessCodecID", | |
cppname: "ChapterProcessCodecID", | |
level: 5, | |
type: "u", | |
mandatory: !0, | |
minver: 1, | |
webm: !1, | |
default: 0, | |
description: "Contains the type of the codec used for the processing. A value of 0 means native Matroska processing (to be defined), a value of 1 means the DVD command set is used. More codec IDs can be added later." | |
}, | |
29555: { | |
name: "Tag", | |
level: 2, | |
type: "m", | |
mandatory: !0, | |
multiple: !0, | |
minver: 1, | |
webm: !1, | |
description: "Element containing elements specific to Tracks/Chapters." | |
}, | |
29572: { | |
name: "SegmentFilename", | |
level: 2, | |
type: "8", | |
minver: 1, | |
webm: !1, | |
description: "A filename corresponding to this segment." | |
}, | |
29766: { | |
name: "AttachmentLink", | |
cppname: "TrackAttachmentLink", | |
level: 3, | |
type: "u", | |
minver: 1, | |
webm: !1, | |
range: "not 0", | |
description: "The UID of an attachment that is used by this codec." | |
}, | |
2459272: { | |
name: "CodecName", | |
level: 3, | |
type: "8", | |
minver: 1, | |
description: "A human-readable string specifying the codec." | |
}, | |
408125543: { | |
name: "Segment", | |
level: "0", | |
type: "m", | |
mandatory: !0, | |
multiple: !0, | |
minver: 1, | |
description: "This element contains all other top-level (level 1) elements. Typically a Matroska file is composed of 1 segment." | |
}, | |
17530: { | |
name: "TagLanguage", | |
level: 4, | |
type: "s", | |
mandatory: !0, | |
minver: 1, | |
webm: !1, | |
default: "und", | |
description: "Specifies the language of the tag specified, in the Matroska languages form." | |
}, | |
17827: { | |
name: "TagName", | |
level: 4, | |
type: "8", | |
mandatory: !0, | |
minver: 1, | |
webm: !1, | |
description: "The name of the Tag that is going to be stored." | |
}, | |
26568: { | |
name: "SimpleTag", | |
cppname: "TagSimple", | |
level: 3, | |
recursive: "1", | |
type: "m", | |
mandatory: !0, | |
multiple: !0, | |
minver: 1, | |
webm: !1, | |
description: "Contains general information about the target." | |
}, | |
25542: { | |
name: "TagAttachmentUID", | |
level: 4, | |
type: "u", | |
multiple: !0, | |
minver: 1, | |
webm: !1, | |
default: 0, | |
description: "A unique ID to identify the Attachment(s) the tags belong to. If the value is 0 at this level, the tags apply to all the attachments in the Segment." | |
}, | |
25540: { | |
name: "TagChapterUID", | |
level: 4, | |
type: "u", | |
multiple: !0, | |
minver: 1, | |
webm: !1, | |
default: 0, | |
description: "A unique ID to identify the Chapter(s) the tags belong to. If the value is 0 at this level, the tags apply to all chapters in the Segment." | |
}, | |
25545: { | |
name: "TagEditionUID", | |
level: 4, | |
type: "u", | |
multiple: !0, | |
minver: 1, | |
webm: !1, | |
default: 0, | |
description: "A unique ID to identify the EditionEntry(s) the tags belong to. If the value is 0 at this level, the tags apply to all editions in the Segment." | |
}, | |
25541: { | |
name: "TagTrackUID", | |
level: 4, | |
type: "u", | |
multiple: !0, | |
minver: 1, | |
webm: !1, | |
default: 0, | |
description: "A unique ID to identify the Track(s) the tags belong to. If the value is 0 at this level, the tags apply to all tracks in the Segment." | |
}, | |
25546: { | |
name: "TargetType", | |
cppname: "TagTargetType", | |
level: 4, | |
type: "s", | |
minver: 1, | |
webm: !1, | |
strong: "informational", | |
description: 'An string that can be used to display the logical level of the target like "ALBUM", "TRACK", "MOVIE", "CHAPTER", etc (see TargetType).' | |
}, | |
26826: { | |
name: "TargetTypeValue", | |
cppname: "TagTargetTypeValue", | |
level: 4, | |
type: "u", | |
minver: 1, | |
webm: !1, | |
default: 50, | |
description: "A number to indicate the logical level of the target (see TargetType)." | |
}, | |
25536: { | |
name: "Targets", | |
cppname: "TagTargets", | |
level: 3, | |
type: "m", | |
mandatory: !0, | |
minver: 1, | |
webm: !1, | |
description: "Contain all UIDs where the specified meta data apply. It is empty to describe everything in the segment." | |
}, | |
307544935: { | |
name: "Tags", | |
level: 1, | |
type: "m", | |
multiple: !0, | |
minver: 1, | |
webm: !1, | |
description: "Element containing elements specific to Tracks/Chapters. A list of valid tags can be found here." | |
}, | |
17677: { | |
name: "ChapProcessPrivate", | |
cppname: "ChapterProcessPrivate", | |
level: 5, | |
type: "b", | |
minver: 1, | |
webm: !1, | |
description: 'Some optional data attached to the ChapProcessCodecID information. For ChapProcessCodecID = 1, it is the "DVD level" equivalent.' | |
}, | |
17278: { | |
name: "ChapCountry", | |
cppname: "ChapterCountry", | |
level: 5, | |
type: "s", | |
multiple: !0, | |
minver: 1, | |
webm: !1, | |
description: "The countries corresponding to the string, same 2 octets as in Internet domains." | |
}, | |
17276: { | |
name: "ChapLanguage", | |
cppname: "ChapterLanguage", | |
level: 5, | |
type: "s", | |
mandatory: !0, | |
multiple: !0, | |
minver: 1, | |
webm: !0, | |
default: "eng", | |
description: "The languages corresponding to the string, in the bibliographic ISO-639-2 form." | |
}, | |
143: { | |
name: "ChapterTrack", | |
level: 4, | |
type: "m", | |
minver: 1, | |
webm: !1, | |
description: "List of tracks on which the chapter applies. If this element is not present, all tracks apply" | |
}, | |
25539: { | |
name: "ChapterPhysicalEquiv", | |
level: 4, | |
type: "u", | |
minver: 1, | |
webm: !1, | |
description: 'Specify the physical equivalent of this ChapterAtom like "DVD" (60) or "SIDE" (50), see complete list of values.' | |
}, | |
28348: { | |
name: "ChapterSegmentEditionUID", | |
level: 4, | |
type: "u", | |
minver: 1, | |
webm: !1, | |
range: "not 0", | |
description: "The EditionUID to play from the segment linked in ChapterSegmentUID." | |
}, | |
28263: { | |
name: "ChapterSegmentUID", | |
level: 4, | |
type: "b", | |
minver: 1, | |
webm: !1, | |
range: ">0", | |
bytesize: 16, | |
description: "A segment to play in place of this chapter. Edition ChapterSegmentEditionUID should be used for this segment, otherwise no edition is used." | |
}, | |
29636: { | |
name: "ChapterUID", | |
level: 4, | |
type: "u", | |
mandatory: !0, | |
minver: 1, | |
webm: !0, | |
range: "not 0", | |
description: "A unique ID to identify the Chapter." | |
}, | |
182: { | |
name: "ChapterAtom", | |
level: 3, | |
recursive: "1", | |
type: "m", | |
mandatory: !0, | |
multiple: !0, | |
minver: 1, | |
webm: !0, | |
description: "Contains the atom information to use as the chapter atom (apply to all tracks)." | |
}, | |
17885: { | |
name: "EditionFlagOrdered", | |
level: 3, | |
type: "u", | |
minver: 1, | |
webm: !1, | |
default: 0, | |
range: "0-1", | |
description: "Specify if the chapters can be defined multiple times and the order to play them is enforced. (1 bit)" | |
}, | |
17883: { | |
name: "EditionFlagDefault", | |
level: 3, | |
type: "u", | |
mandatory: !0, | |
minver: 1, | |
webm: !1, | |
default: 0, | |
range: "0-1", | |
description: "If a flag is set (1) the edition should be used as the default one. (1 bit)" | |
}, | |
17853: { | |
name: "EditionFlagHidden", | |
level: 3, | |
type: "u", | |
mandatory: !0, | |
minver: 1, | |
webm: !1, | |
default: 0, | |
range: "0-1", | |
description: "If an edition is hidden (1), it should not be available to the user interface (but still to Control Tracks; see flag notes). (1 bit)" | |
}, | |
17852: { | |
name: "EditionUID", | |
level: 3, | |
type: "u", | |
minver: 1, | |
webm: !1, | |
range: "not 0", | |
description: "A unique ID to identify the edition. It's useful for tagging an edition." | |
}, | |
17849: { | |
name: "EditionEntry", | |
level: 2, | |
type: "m", | |
mandatory: !0, | |
multiple: !0, | |
minver: 1, | |
webm: !0, | |
description: "Contains all information about a segment edition." | |
}, | |
272869232: { | |
name: "Chapters", | |
level: 1, | |
type: "m", | |
minver: 1, | |
webm: !0, | |
description: "A system to define basic menus and partition data. For more detailed information, look at the Chapters Explanation." | |
}, | |
18094: { | |
name: "FileUID", | |
level: 3, | |
type: "u", | |
mandatory: !0, | |
minver: 1, | |
webm: !1, | |
range: "not 0", | |
description: "Unique ID representing the file, as random as possible." | |
}, | |
18012: { | |
name: "FileData", | |
level: 3, | |
type: "b", | |
mandatory: !0, | |
minver: 1, | |
webm: !1, | |
description: "The data of the file." | |
}, | |
18030: { | |
name: "FileName", | |
level: 3, | |
type: "8", | |
mandatory: !0, | |
minver: 1, | |
webm: !1, | |
description: "Filename of the attached file." | |
}, | |
18046: { | |
name: "FileDescription", | |
level: 3, | |
type: "8", | |
minver: 1, | |
webm: !1, | |
description: "A human-friendly name for the attached file." | |
}, | |
24999: { | |
name: "AttachedFile", | |
level: 2, | |
type: "m", | |
mandatory: !0, | |
multiple: !0, | |
minver: 1, | |
webm: !1, | |
description: "An attached file." | |
}, | |
423732329: { | |
name: "Attachments", | |
level: 1, | |
type: "m", | |
minver: 1, | |
webm: !1, | |
description: "Contain attached files." | |
}, | |
235: { | |
name: "CueRefCodecState", | |
level: 5, | |
type: "u", | |
webm: !1, | |
default: 0, | |
description: "The position of the Codec State corresponding to this referenced element. 0 means that the data is taken from the initial Track Entry." | |
}, | |
21343: { | |
name: "CueRefNumber", | |
level: 5, | |
type: "u", | |
webm: !1, | |
default: 1, | |
range: "not 0", | |
description: "Number of the referenced Block of Track X in the specified Cluster." | |
}, | |
219: { | |
name: "CueReference", | |
level: 4, | |
type: "m", | |
multiple: !0, | |
minver: 2, | |
webm: !1, | |
description: "The Clusters containing the required referenced Blocks." | |
}, | |
234: { | |
name: "CueCodecState", | |
level: 4, | |
type: "u", | |
minver: 2, | |
webm: !1, | |
default: 0, | |
description: "The position of the Codec State corresponding to this Cue element. 0 means that the data is taken from the initial Track Entry." | |
}, | |
178: { | |
name: "CueDuration", | |
level: 4, | |
type: "u", | |
mandatory: !1, | |
minver: 4, | |
webm: !1, | |
description: "The duration of the block according to the segment time base. If missing the track's DefaultDuration does not apply and no duration information is available in terms of the cues." | |
}, | |
240: { | |
name: "CueRelativePosition", | |
level: 4, | |
type: "u", | |
mandatory: !1, | |
minver: 4, | |
webm: !1, | |
description: "The relative position of the referenced block inside the cluster with 0 being the first possible position for an element inside that cluster.", | |
position: "clusterRelative" | |
}, | |
241: { | |
name: "CueClusterPosition", | |
level: 4, | |
type: "u", | |
mandatory: !0, | |
minver: 1, | |
description: "The position of the Cluster containing the required Block.", | |
position: "segment" | |
}, | |
247: { | |
name: "CueTrack", | |
level: 4, | |
type: "u", | |
mandatory: !0, | |
minver: 1, | |
range: "not 0", | |
description: "The track for which a position is given." | |
}, | |
183: { | |
name: "CueTrackPositions", | |
level: 3, | |
type: "m", | |
mandatory: !0, | |
multiple: !0, | |
minver: 1, | |
description: "Contain positions for different tracks corresponding to the timestamp." | |
}, | |
179: { | |
name: "CueTime", | |
level: 3, | |
type: "u", | |
mandatory: !0, | |
minver: 1, | |
description: "Absolute timestamp according to the segment time base." | |
}, | |
187: { | |
name: "CuePoint", | |
level: 2, | |
type: "m", | |
mandatory: !0, | |
multiple: !0, | |
minver: 1, | |
description: "Contains all information relative to a seek point in the segment." | |
}, | |
475249515: { | |
name: "Cues", | |
level: 1, | |
type: "m", | |
minver: 1, | |
description: 'A top-level element to speed seeking access. All entries are local to the segment. Should be mandatory for non "live" streams.' | |
}, | |
18406: { | |
name: "ContentSigHashAlgo", | |
level: 6, | |
type: "u", | |
minver: 1, | |
webm: !1, | |
default: 0, | |
description: "The hash algorithm used for the signature. A value of '0' means that the contents have not been signed but only encrypted. Predefined values: 1 - SHA1-160 2 - MD5" | |
}, | |
18405: { | |
name: "ContentSigAlgo", | |
level: 6, | |
type: "u", | |
minver: 1, | |
webm: !1, | |
default: 0, | |
description: "The algorithm used for the signature. A value of '0' means that the contents have not been signed but only encrypted. Predefined values: 1 - RSA" | |
}, | |
18404: { | |
name: "ContentSigKeyID", | |
level: 6, | |
type: "b", | |
minver: 1, | |
webm: !1, | |
description: "This is the ID of the private key the data was signed with." | |
}, | |
18403: { | |
name: "ContentSignature", | |
level: 6, | |
type: "b", | |
minver: 1, | |
webm: !1, | |
description: "A cryptographic signature of the contents." | |
}, | |
18402: { | |
name: "ContentEncKeyID", | |
level: 6, | |
type: "b", | |
minver: 1, | |
webm: !1, | |
description: "For public key algorithms this is the ID of the public key the the data was encrypted with." | |
}, | |
18401: { | |
name: "ContentEncAlgo", | |
level: 6, | |
type: "u", | |
minver: 1, | |
webm: !1, | |
default: 0, | |
description: "The encryption algorithm used. The value '0' means that the contents have not been encrypted but only signed. Predefined values: 1 - DES, 2 - 3DES, 3 - Twofish, 4 - Blowfish, 5 - AES" | |
}, | |
28032: { | |
name: "ContentEncodings", | |
level: 3, | |
type: "m", | |
minver: 1, | |
webm: !1, | |
description: "Settings for several content encoding mechanisms like compression or encryption." | |
}, | |
196: { | |
name: "TrickMasterTrackSegmentUID", | |
level: 3, | |
type: "b", | |
divx: !0, | |
bytesize: 16, | |
description: "DivX trick track extenstions" | |
}, | |
199: { | |
name: "TrickMasterTrackUID", | |
level: 3, | |
type: "u", | |
divx: !0, | |
description: "DivX trick track extenstions" | |
}, | |
198: { | |
name: "TrickTrackFlag", | |
level: 3, | |
type: "u", | |
divx: !0, | |
default: 0, | |
description: "DivX trick track extenstions" | |
}, | |
193: { | |
name: "TrickTrackSegmentUID", | |
level: 3, | |
type: "b", | |
divx: !0, | |
bytesize: 16, | |
description: "DivX trick track extenstions" | |
}, | |
192: { | |
name: "TrickTrackUID", | |
level: 3, | |
type: "u", | |
divx: !0, | |
description: "DivX trick track extenstions" | |
}, | |
237: { | |
name: "TrackJoinUID", | |
level: 5, | |
type: "u", | |
mandatory: !0, | |
multiple: !0, | |
minver: 3, | |
webm: !1, | |
range: "not 0", | |
description: "The trackUID number of a track whose blocks are used to create this virtual track." | |
}, | |
233: { | |
name: "TrackJoinBlocks", | |
level: 4, | |
type: "m", | |
minver: 3, | |
webm: !1, | |
description: "Contains the list of all tracks whose Blocks need to be combined to create this virtual track" | |
}, | |
230: { | |
name: "TrackPlaneType", | |
level: 6, | |
type: "u", | |
mandatory: !0, | |
minver: 3, | |
webm: !1, | |
description: "The kind of plane this track corresponds to (0: left eye, 1: right eye, 2: background)." | |
}, | |
229: { | |
name: "TrackPlaneUID", | |
level: 6, | |
type: "u", | |
mandatory: !0, | |
minver: 3, | |
webm: !1, | |
range: "not 0", | |
description: "The trackUID number of the track representing the plane." | |
}, | |
228: { | |
name: "TrackPlane", | |
level: 5, | |
type: "m", | |
mandatory: !0, | |
multiple: !0, | |
minver: 3, | |
webm: !1, | |
description: "Contains a video plane track that need to be combined to create this 3D track" | |
}, | |
227: { | |
name: "TrackCombinePlanes", | |
level: 4, | |
type: "m", | |
minver: 3, | |
webm: !1, | |
description: "Contains the list of all video plane tracks that need to be combined to create this 3D track" | |
}, | |
226: { | |
name: "TrackOperation", | |
level: 3, | |
type: "m", | |
minver: 3, | |
webm: !1, | |
description: "Operation that needs to be applied on tracks to create this virtual track. For more details look at the Specification Notes on the subject." | |
}, | |
32123: { | |
name: "ChannelPositions", | |
cppname: "AudioPosition", | |
level: 4, | |
type: "b", | |
webm: !1, | |
description: "Table of horizontal angles for each successive channel, see appendix." | |
}, | |
159: { | |
name: "Channels", | |
cppname: "AudioChannels", | |
level: 4, | |
type: "u", | |
mandatory: !0, | |
minver: 1, | |
default: 1, | |
range: "not 0", | |
description: "Numbers of channels in the track." | |
}, | |
30901: { | |
name: "OutputSamplingFrequency", | |
cppname: "AudioOutputSamplingFreq", | |
level: 4, | |
type: "f", | |
minver: 1, | |
default: "Sampling Frequency", | |
range: "> 0", | |
description: "Real output sampling frequency in Hz (used for SBR techniques)." | |
}, | |
181: { | |
name: "SamplingFrequency", | |
cppname: "AudioSamplingFreq", | |
level: 4, | |
type: "f", | |
mandatory: !0, | |
minver: 1, | |
default: 8e3, | |
range: "> 0", | |
description: "Sampling frequency in Hz." | |
}, | |
225: { | |
name: "Audio", | |
cppname: "TrackAudio", | |
level: 3, | |
type: "m", | |
minver: 1, | |
description: "Audio settings." | |
}, | |
2327523: { | |
name: "FrameRate", | |
cppname: "VideoFrameRate", | |
level: 4, | |
type: "f", | |
range: "> 0", | |
strong: "Informational", | |
description: "Number of frames per second. only." | |
}, | |
3126563: { | |
name: "GammaValue", | |
cppname: "VideoGamma", | |
level: 4, | |
type: "f", | |
webm: !1, | |
range: "> 0", | |
description: "Gamma Value." | |
}, | |
3061028: { | |
name: "ColourSpace", | |
cppname: "VideoColourSpace", | |
level: 4, | |
type: "b", | |
minver: 1, | |
webm: !1, | |
bytesize: 4, | |
description: "Same value as in AVI (32 bits)." | |
}, | |
21683: { | |
name: "AspectRatioType", | |
cppname: "VideoAspectRatio", | |
level: 4, | |
type: "u", | |
minver: 1, | |
default: 0, | |
description: "Specify the possible modifications to the aspect ratio (0: free resizing, 1: keep aspect ratio, 2: fixed)." | |
}, | |
21682: { | |
name: "DisplayUnit", | |
cppname: "VideoDisplayUnit", | |
level: 4, | |
type: "u", | |
minver: 1, | |
default: 0, | |
description: "How DisplayWidth & DisplayHeight should be interpreted (0: pixels, 1: centimeters, 2: inches, 3: Display Aspect Ratio)." | |
}, | |
21690: { | |
name: "DisplayHeight", | |
cppname: "VideoDisplayHeight", | |
level: 4, | |
type: "u", | |
minver: 1, | |
default: "PixelHeight", | |
range: "not 0", | |
description: "Height of the video frames to display. The default value is only valid when DisplayUnit is 0." | |
}, | |
21680: { | |
name: "DisplayWidth", | |
cppname: "VideoDisplayWidth", | |
level: 4, | |
type: "u", | |
minver: 1, | |
default: "PixelWidth", | |
range: "not 0", | |
description: "Width of the video frames to display. The default value is only valid when DisplayUnit is 0." | |
}, | |
21725: { | |
name: "PixelCropRight", | |
cppname: "VideoPixelCropRight", | |
level: 4, | |
type: "u", | |
minver: 1, | |
default: 0, | |
description: "The number of video pixels to remove on the right of the image." | |
}, | |
21708: { | |
name: "PixelCropLeft", | |
cppname: "VideoPixelCropLeft", | |
level: 4, | |
type: "u", | |
minver: 1, | |
default: 0, | |
description: "The number of video pixels to remove on the left of the image." | |
}, | |
21691: { | |
name: "PixelCropTop", | |
cppname: "VideoPixelCropTop", | |
level: 4, | |
type: "u", | |
minver: 1, | |
default: 0, | |
description: "The number of video pixels to remove at the top of the image." | |
}, | |
21674: { | |
name: "PixelCropBottom", | |
cppname: "VideoPixelCropBottom", | |
level: 4, | |
type: "u", | |
minver: 1, | |
default: 0, | |
description: "The number of video pixels to remove at the bottom of the image (for HDTV content)." | |
}, | |
186: { | |
name: "PixelHeight", | |
cppname: "VideoPixelHeight", | |
level: 4, | |
type: "u", | |
mandatory: !0, | |
minver: 1, | |
range: "not 0", | |
description: "Height of the encoded video frames in pixels." | |
}, | |
176: { | |
name: "PixelWidth", | |
cppname: "VideoPixelWidth", | |
level: 4, | |
type: "u", | |
mandatory: !0, | |
minver: 1, | |
range: "not 0", | |
description: "Width of the encoded video frames in pixels." | |
}, | |
21433: { | |
name: "OldStereoMode", | |
level: 4, | |
type: "u", | |
maxver: "0", | |
webm: !1, | |
divx: !1, | |
description: "DEPRECATED, DO NOT USE. Bogus StereoMode value used in old versions of libmatroska. (0: mono, 1: right eye, 2: left eye, 3: both eyes)." | |
}, | |
21440: { | |
name: "AlphaMode", | |
cppname: "VideoAlphaMode", | |
level: 4, | |
type: "u", | |
minver: 3, | |
webm: !0, | |
default: 0, | |
description: "Alpha Video Mode. Presence of this element indicates that the BlockAdditional element could contain Alpha data." | |
}, | |
21432: { | |
name: "StereoMode", | |
cppname: "VideoStereoMode", | |
level: 4, | |
type: "u", | |
minver: 3, | |
webm: !0, | |
default: 0, | |
description: "Stereo-3D video mode (0: mono, 1: side by side (left eye is first), 2: top-bottom (right eye is first), 3: top-bottom (left eye is first), 4: checkboard (right is first), 5: checkboard (left is first), 6: row interleaved (right is first), 7: row interleaved (left is first), 8: column interleaved (right is first), 9: column interleaved (left is first), 10: anaglyph (cyan/red), 11: side by side (right eye is first), 12: anaglyph (green/magenta), 13 both eyes laced in one Block (left eye is first), 14 both eyes laced in one Block (right eye is first)) . There are some more details on 3D support in the Specification Notes." | |
}, | |
154: { | |
name: "FlagInterlaced", | |
cppname: "VideoFlagInterlaced", | |
level: 4, | |
type: "u", | |
mandatory: !0, | |
minver: 2, | |
webm: !0, | |
default: 0, | |
range: "0-1", | |
description: "Set if the video is interlaced. (1 bit)" | |
}, | |
224: { | |
name: "Video", | |
cppname: "TrackVideo", | |
level: 3, | |
type: "m", | |
minver: 1, | |
description: "Video settings." | |
}, | |
26277: { | |
name: "TrackTranslateTrackID", | |
level: 4, | |
type: "b", | |
mandatory: !0, | |
minver: 1, | |
webm: !1, | |
description: "The binary value used to represent this track in the chapter codec data. The format depends on the ChapProcessCodecID used." | |
}, | |
26303: { | |
name: "TrackTranslateCodec", | |
level: 4, | |
type: "u", | |
mandatory: !0, | |
minver: 1, | |
webm: !1, | |
description: "The chapter codec using this ID (0: Matroska Script, 1: DVD-menu)." | |
}, | |
26364: { | |
name: "TrackTranslateEditionUID", | |
level: 4, | |
type: "u", | |
multiple: !0, | |
minver: 1, | |
webm: !1, | |
description: "Specify an edition UID on which this translation applies. When not specified, it means for all editions found in the segment." | |
}, | |
22203: { | |
name: "SeekPreRoll", | |
level: 3, | |
type: "u", | |
mandatory: !0, | |
multiple: !1, | |
default: 0, | |
minver: 4, | |
webm: !0, | |
description: "After a discontinuity, SeekPreRoll is the duration in nanoseconds of the data the decoder must decode before the decoded data is valid." | |
}, | |
22186: { | |
name: "CodecDelay", | |
level: 3, | |
type: "u", | |
multiple: !1, | |
default: 0, | |
minver: 4, | |
webm: !0, | |
description: "CodecDelay is The codec-built-in delay in nanoseconds. This value must be subtracted from each block timestamp in order to get the actual timestamp. The value should be small so the muxing of tracks with the same actual timestamp are in the same Cluster." | |
}, | |
28587: { | |
name: "TrackOverlay", | |
level: 3, | |
type: "u", | |
multiple: !0, | |
minver: 1, | |
webm: !1, | |
description: "Specify that this track is an overlay track for the Track specified (in the u-integer). That means when this track has a gap (see SilentTracks) the overlay track should be used instead. The order of multiple TrackOverlay matters, the first one is the one that should be used. If not found it should be the second, etc." | |
}, | |
170: { | |
name: "CodecDecodeAll", | |
level: 3, | |
type: "u", | |
mandatory: !0, | |
minver: 2, | |
webm: !1, | |
default: 1, | |
range: "0-1", | |
description: "The codec can decode potentially damaged data (1 bit)." | |
}, | |
2536e3: { | |
name: "CodecDownloadURL", | |
level: 3, | |
type: "s", | |
multiple: !0, | |
webm: !1, | |
description: "A URL to download about the codec used." | |
}, | |
3883072: { | |
name: "CodecInfoURL", | |
level: 3, | |
type: "s", | |
multiple: !0, | |
webm: !1, | |
description: "A URL to find information about the codec used." | |
}, | |
3839639: { | |
name: "CodecSettings", | |
level: 3, | |
type: "8", | |
webm: !1, | |
description: "A string describing the encoding setting used." | |
}, | |
25506: { | |
name: "CodecPrivate", | |
level: 3, | |
type: "b", | |
minver: 1, | |
description: "Private data only known to the codec." | |
}, | |
2274716: { | |
name: "Language", | |
cppname: "TrackLanguage", | |
level: 3, | |
type: "s", | |
minver: 1, | |
default: "eng", | |
description: "Specifies the language of the track in the Matroska languages form." | |
}, | |
21358: { | |
name: "Name", | |
cppname: "TrackName", | |
level: 3, | |
type: "8", | |
minver: 1, | |
description: "A human-readable track name." | |
}, | |
21998: { | |
name: "MaxBlockAdditionID", | |
level: 3, | |
type: "u", | |
mandatory: !0, | |
minver: 1, | |
webm: !1, | |
default: 0, | |
description: "The maximum value of BlockAdditions for this track." | |
}, | |
21375: { | |
name: "TrackOffset", | |
level: 3, | |
type: "i", | |
webm: !1, | |
default: 0, | |
description: "A value to add to the Block's Timestamp. This can be used to adjust the playback offset of a track." | |
}, | |
2306383: { | |
name: "TrackTimecodeScale", | |
level: 3, | |
type: "f", | |
mandatory: !0, | |
minver: 1, | |
maxver: "3", | |
webm: !1, | |
default: 1, | |
range: "> 0", | |
description: "DEPRECATED, DO NOT USE. The scale to apply on this track to work at normal speed in relation with other tracks (mostly used to adjust video speed when the audio length differs)." | |
}, | |
2313850: { | |
name: "DefaultDecodedFieldDuration", | |
cppname: "TrackDefaultDecodedFieldDuration", | |
level: 3, | |
type: "u", | |
minver: 4, | |
range: "not 0", | |
description: "The period in nanoseconds (not scaled by TimcodeScale)\nbetween two successive fields at the output of the decoding process (see the notes)" | |
}, | |
2352003: { | |
name: "DefaultDuration", | |
cppname: "TrackDefaultDuration", | |
level: 3, | |
type: "u", | |
minver: 1, | |
range: "not 0", | |
description: "Number of nanoseconds (not scaled via TimecodeScale) per frame ('frame' in the Matroska sense -- one element put into a (Simple)Block)." | |
}, | |
28152: { | |
name: "MaxCache", | |
cppname: "TrackMaxCache", | |
level: 3, | |
type: "u", | |
minver: 1, | |
webm: !1, | |
description: "The maximum cache size required to store referenced frames in and the current frame. 0 means no cache is needed." | |
}, | |
28135: { | |
name: "MinCache", | |
cppname: "TrackMinCache", | |
level: 3, | |
type: "u", | |
mandatory: !0, | |
minver: 1, | |
webm: !1, | |
default: 0, | |
description: "The minimum number of frames a player should be able to cache during playback. If set to 0, the reference pseudo-cache system is not used." | |
}, | |
156: { | |
name: "FlagLacing", | |
cppname: "TrackFlagLacing", | |
level: 3, | |
type: "u", | |
mandatory: !0, | |
minver: 1, | |
default: 1, | |
range: "0-1", | |
description: "Set if the track may contain blocks using lacing. (1 bit)" | |
}, | |
21930: { | |
name: "FlagForced", | |
cppname: "TrackFlagForced", | |
level: 3, | |
type: "u", | |
mandatory: !0, | |
minver: 1, | |
default: 0, | |
range: "0-1", | |
description: "Set if that track MUST be active during playback. There can be many forced track for a kind (audio, video or subs), the player should select the one which language matches the user preference or the default + forced track. Overlay MAY happen between a forced and non-forced track of the same kind. (1 bit)" | |
}, | |
185: { | |
name: "FlagEnabled", | |
cppname: "TrackFlagEnabled", | |
level: 3, | |
type: "u", | |
mandatory: !0, | |
minver: 2, | |
webm: !0, | |
default: 1, | |
range: "0-1", | |
description: "Set if the track is usable. (1 bit)" | |
}, | |
29637: { | |
name: "TrackUID", | |
level: 3, | |
type: "u", | |
mandatory: !0, | |
minver: 1, | |
range: "not 0", | |
description: "A unique ID to identify the Track. This should be kept the same when making a direct stream copy of the Track to another file." | |
}, | |
215: { | |
name: "TrackNumber", | |
level: 3, | |
type: "u", | |
mandatory: !0, | |
minver: 1, | |
range: "not 0", | |
description: "The track number as used in the Block Header (using more than 127 tracks is not encouraged, though the design allows an unlimited number)." | |
}, | |
174: { | |
name: "TrackEntry", | |
level: 2, | |
type: "m", | |
mandatory: !0, | |
multiple: !0, | |
minver: 1, | |
description: "Describes a track with all elements." | |
}, | |
374648427: { | |
name: "Tracks", | |
level: 1, | |
type: "m", | |
multiple: !0, | |
minver: 1, | |
description: "A top-level block of information with many tracks described." | |
}, | |
175: { | |
name: "EncryptedBlock", | |
level: 2, | |
type: "b", | |
multiple: !0, | |
webm: !1, | |
description: "Similar to EncryptedBlock Structure)" | |
}, | |
202: { | |
name: "ReferenceTimeCode", | |
level: 4, | |
type: "u", | |
multiple: !1, | |
mandatory: !0, | |
minver: 0, | |
webm: !1, | |
divx: !0, | |
description: "DivX trick track extenstions" | |
}, | |
201: { | |
name: "ReferenceOffset", | |
level: 4, | |
type: "u", | |
multiple: !1, | |
mandatory: !0, | |
minver: 0, | |
webm: !1, | |
divx: !0, | |
description: "DivX trick track extenstions" | |
}, | |
200: { | |
name: "ReferenceFrame", | |
level: 3, | |
type: "m", | |
multiple: !1, | |
minver: 0, | |
webm: !1, | |
divx: !0, | |
description: "DivX trick track extenstions" | |
}, | |
207: { | |
name: "SliceDuration", | |
level: 5, | |
type: "u", | |
default: 0, | |
description: "The (scaled) duration to apply to the element." | |
}, | |
206: { | |
name: "Delay", | |
cppname: "SliceDelay", | |
level: 5, | |
type: "u", | |
default: 0, | |
description: "The (scaled) delay to apply to the element." | |
}, | |
203: { | |
name: "BlockAdditionID", | |
cppname: "SliceBlockAddID", | |
level: 5, | |
type: "u", | |
default: 0, | |
description: "The ID of the BlockAdditional element (0 is the main Block)." | |
}, | |
205: { | |
name: "FrameNumber", | |
cppname: "SliceFrameNumber", | |
level: 5, | |
type: "u", | |
default: 0, | |
description: "The number of the frame to generate from this lace with this delay (allow you to generate many frames from the same Block/Frame)." | |
}, | |
204: { | |
name: "LaceNumber", | |
cppname: "SliceLaceNumber", | |
level: 5, | |
type: "u", | |
minver: 1, | |
default: 0, | |
divx: !1, | |
description: "The reverse number of the frame in the lace (0 is the last frame, 1 is the next to last, etc). While there are a few files in the wild with this element, it is no longer in use and has been deprecated. Being able to interpret this element is not required for playback." | |
}, | |
232: { | |
name: "TimeSlice", | |
level: 4, | |
type: "m", | |
multiple: !0, | |
minver: 1, | |
divx: !1, | |
description: "Contains extra time information about the data contained in the Block. While there are a few files in the wild with this element, it is no longer in use and has been deprecated. Being able to interpret this element is not required for playback." | |
}, | |
142: { | |
name: "Slices", | |
level: 3, | |
type: "m", | |
minver: 1, | |
divx: !1, | |
description: "Contains slices description." | |
}, | |
30114: { | |
name: "DiscardPadding", | |
level: 3, | |
type: "i", | |
minver: 4, | |
webm: !0, | |
description: "Duration in nanoseconds of the silent data added to the Block (padding at the end of the Block for positive value, at the beginning of the Block for negative value). The duration of DiscardPadding is not calculated in the duration of the TrackEntry and should be discarded during playback." | |
}, | |
164: { | |
name: "CodecState", | |
level: 3, | |
type: "b", | |
minver: 2, | |
webm: !1, | |
description: "The new codec state to use. Data interpretation is private to the codec. This information should always be referenced by a seek entry." | |
}, | |
253: { | |
name: "ReferenceVirtual", | |
level: 3, | |
type: "i", | |
webm: !1, | |
description: "Relative position of the data that should be in position of the virtual block." | |
}, | |
251: { | |
name: "ReferenceBlock", | |
level: 3, | |
type: "i", | |
multiple: !0, | |
minver: 1, | |
description: "Timestamp of another frame used as a reference (ie: B or P frame). The timestamp is relative to the block it's attached to." | |
}, | |
250: { | |
name: "ReferencePriority", | |
cppname: "FlagReferenced", | |
level: 3, | |
type: "u", | |
mandatory: !0, | |
minver: 1, | |
webm: !1, | |
default: 0, | |
description: "This frame is referenced and has the specified cache priority. In cache only a frame of the same or higher priority can replace this frame. A value of 0 means the frame is not referenced." | |
}, | |
155: { | |
name: "BlockDuration", | |
level: 3, | |
type: "u", | |
minver: 1, | |
default: "TrackDuration", | |
description: 'The duration of the Block (based on TimecodeScale). This element is mandatory when DefaultDuration is set for the track (but can be omitted as other default values). When not written and with no DefaultDuration, the value is assumed to be the difference between the timestamp of this Block and the timestamp of the next Block in "display" order (not coding order). This element can be useful at the end of a Track (as there is not other Block available), or when there is a break in a track like for subtitle tracks. When set to 0 that means the frame is not a keyframe.' | |
}, | |
165: { | |
name: "BlockAdditional", | |
level: 5, | |
type: "b", | |
mandatory: !0, | |
minver: 1, | |
webm: !1, | |
description: "Interpreted by the codec as it wishes (using the BlockAddID)." | |
}, | |
238: { | |
name: "BlockAddID", | |
level: 5, | |
type: "u", | |
mandatory: !0, | |
minver: 1, | |
webm: !1, | |
default: 1, | |
range: "not 0", | |
description: "An ID to identify the BlockAdditional level." | |
}, | |
166: { | |
name: "BlockMore", | |
level: 4, | |
type: "m", | |
mandatory: !0, | |
multiple: !0, | |
minver: 1, | |
webm: !1, | |
description: "Contain the BlockAdditional and some parameters." | |
}, | |
30113: { | |
name: "BlockAdditions", | |
level: 3, | |
type: "m", | |
minver: 1, | |
webm: !1, | |
description: "Contain additional blocks to complete the main one. An EBML parser that has no knowledge of the Block structure could still see and use/skip these data." | |
}, | |
162: { | |
name: "BlockVirtual", | |
level: 3, | |
type: "b", | |
webm: !1, | |
description: "A Block with no data. It must be stored in the stream at the place the real Block should be in display order. (see Block Virtual)" | |
}, | |
161: { | |
name: "Block", | |
level: 3, | |
type: "b", | |
mandatory: !0, | |
minver: 1, | |
description: "Block containing the actual data to be rendered and a timestamp relative to the Cluster Timecode. (see Block Structure)" | |
}, | |
160: { | |
name: "BlockGroup", | |
level: 2, | |
type: "m", | |
multiple: !0, | |
minver: 1, | |
description: "Basic container of information containing a single Block or BlockVirtual, and information specific to that Block/VirtualBlock." | |
}, | |
163: { | |
name: "SimpleBlock", | |
level: 2, | |
type: "b", | |
multiple: !0, | |
minver: 2, | |
webm: !0, | |
divx: !0, | |
description: "Similar to SimpleBlock Structure" | |
}, | |
171: { | |
name: "PrevSize", | |
cppname: "ClusterPrevSize", | |
level: 2, | |
type: "u", | |
minver: 1, | |
description: "Size of the previous Cluster, in octets. Can be useful for backward playing.", | |
position: "prevCluster" | |
}, | |
167: { | |
name: "Position", | |
cppname: "ClusterPosition", | |
level: 2, | |
type: "u", | |
minver: 1, | |
webm: !1, | |
description: "The Position of the Cluster in the segment (0 in live broadcast streams). It might help to resynchronise offset on damaged streams.", | |
position: "segment" | |
}, | |
22743: { | |
name: "SilentTrackNumber", | |
cppname: "ClusterSilentTrackNumber", | |
level: 3, | |
type: "u", | |
multiple: !0, | |
minver: 1, | |
webm: !1, | |
description: "One of the track number that are not used from now on in the stream. It could change later if not specified as silent in a further Cluster." | |
}, | |
231: { | |
name: "Timecode", | |
cppname: "ClusterTimecode", | |
level: 2, | |
type: "u", | |
mandatory: !0, | |
minver: 1, | |
description: "Absolute timestamp of the cluster (based on TimecodeScale)." | |
}, | |
524531317: { | |
name: "Cluster", | |
level: 1, | |
type: "m", | |
multiple: !0, | |
minver: 1, | |
description: "The lower level element containing the (monolithic) Block structure." | |
}, | |
19840: { | |
name: "MuxingApp", | |
level: 2, | |
type: "8", | |
mandatory: !0, | |
minver: 1, | |
description: 'Muxing application or library ("libmatroska-0.4.3").' | |
}, | |
31657: { | |
name: "Title", | |
level: 2, | |
type: "8", | |
minver: 1, | |
webm: !1, | |
description: "General name of the segment." | |
}, | |
2807730: { | |
name: "TimecodeScaleDenominator", | |
level: 2, | |
type: "u", | |
mandatory: !0, | |
minver: 4, | |
default: "1000000000", | |
description: "Timestamp scale numerator, see TimecodeScale." | |
}, | |
2807729: { | |
name: "TimecodeScale", | |
level: 2, | |
type: "u", | |
mandatory: !0, | |
minver: 1, | |
default: "1000000", | |
description: "Timestamp scale in nanoseconds (1.000.000 means all timestamps in the segment are expressed in milliseconds)." | |
}, | |
27045: { | |
name: "ChapterTranslateID", | |
level: 3, | |
type: "b", | |
mandatory: !0, | |
minver: 1, | |
webm: !1, | |
description: "The binary value used to represent this segment in the chapter codec data. The format depends on the ChapProcessCodecID used." | |
}, | |
27071: { | |
name: "ChapterTranslateCodec", | |
level: 3, | |
type: "u", | |
mandatory: !0, | |
minver: 1, | |
webm: !1, | |
description: "The chapter codec using this ID (0: Matroska Script, 1: DVD-menu)." | |
}, | |
27132: { | |
name: "ChapterTranslateEditionUID", | |
level: 3, | |
type: "u", | |
multiple: !0, | |
minver: 1, | |
webm: !1, | |
description: "Specify an edition UID on which this correspondance applies. When not specified, it means for all editions found in the segment." | |
}, | |
4096955: { | |
name: "NextFilename", | |
level: 2, | |
type: "8", | |
minver: 1, | |
webm: !1, | |
description: "An escaped filename corresponding to the next segment." | |
}, | |
4110627: { | |
name: "NextUID", | |
level: 2, | |
type: "b", | |
minver: 1, | |
webm: !1, | |
bytesize: 16, | |
description: "A unique ID to identify the next chained segment (128 bits)." | |
}, | |
3965867: { | |
name: "PrevFilename", | |
level: 2, | |
type: "8", | |
minver: 1, | |
webm: !1, | |
description: "An escaped filename corresponding to the previous segment." | |
}, | |
3979555: { | |
name: "PrevUID", | |
level: 2, | |
type: "b", | |
minver: 1, | |
webm: !1, | |
bytesize: 16, | |
description: "A unique ID to identify the previous chained segment (128 bits)." | |
}, | |
29604: { | |
name: "SegmentUID", | |
level: 2, | |
type: "b", | |
minver: 1, | |
webm: !1, | |
range: "not 0", | |
bytesize: 16, | |
description: "A randomly generated unique ID to identify the current segment between many others (128 bits)." | |
}, | |
357149030: { | |
name: "Info", | |
level: 1, | |
type: "m", | |
mandatory: !0, | |
multiple: !0, | |
minver: 1, | |
description: "Contains miscellaneous general information and statistics on the file." | |
}, | |
21420: { | |
name: "SeekPosition", | |
level: 3, | |
type: "u", | |
mandatory: !0, | |
minver: 1, | |
description: "The position of the element in the segment in octets (0 = first level 1 element).", | |
position: "segment" | |
}, | |
21419: { | |
name: "SeekID", | |
level: 3, | |
type: "b", | |
mandatory: !0, | |
minver: 1, | |
description: "The binary ID corresponding to the element name.", | |
type2: "ebmlID" | |
}, | |
19899: { | |
name: "Seek", | |
cppname: "SeekPoint", | |
level: 2, | |
type: "m", | |
mandatory: !0, | |
multiple: !0, | |
minver: 1, | |
description: "Contains a single seek entry to an EBML element." | |
}, | |
290298740: { | |
name: "SeekHead", | |
cppname: "SeekHeader", | |
level: 1, | |
type: "m", | |
multiple: !0, | |
minver: 1, | |
description: "Contains the position of other level 1 elements." | |
}, | |
32379: { | |
name: "SignatureElementList", | |
level: 2, | |
type: "m", | |
multiple: !0, | |
webm: !1, | |
i: "Cluster|Block|BlockAdditional", | |
description: "A list consists of a number of consecutive elements that represent one case where data is used in signature. Ex: means that the BlockAdditional of all Blocks in all Clusters is used for encryption." | |
}, | |
32347: { | |
name: "SignatureElements", | |
level: 1, | |
type: "m", | |
webm: !1, | |
description: "Contains elements that will be used to compute the signature." | |
}, | |
32437: { | |
name: "Signature", | |
level: 1, | |
type: "b", | |
webm: !1, | |
description: "The signature of the data (until a new." | |
}, | |
32421: { | |
name: "SignaturePublicKey", | |
level: 1, | |
type: "b", | |
webm: !1, | |
description: "The public key to use with the algorithm (in the case of a PKI-based signature)." | |
}, | |
32410: { | |
name: "SignatureHash", | |
level: 1, | |
type: "u", | |
webm: !1, | |
description: "Hash algorithm used (1=SHA1-160, 2=MD5)." | |
}, | |
32394: { | |
name: "SignatureAlgo", | |
level: 1, | |
type: "u", | |
webm: !1, | |
description: "Signature algorithm used (1=RSA, 2=elliptic)." | |
}, | |
458458727: { | |
name: "SignatureSlot", | |
level: -1, | |
type: "m", | |
multiple: !0, | |
webm: !1, | |
description: "Contain signature of some (coming) elements in the stream." | |
}, | |
191: { | |
name: "CRC-32", | |
level: -1, | |
type: "b", | |
minver: 1, | |
webm: !1, | |
description: "The CRC is computed on all the data of the Master element it's in. The CRC element should be the first in it's parent master for easier reading. All level 1 elements should include a CRC-32. The CRC in use is the IEEE CRC32 Little Endian", | |
crc: !0 | |
}, | |
236: { | |
name: "Void", | |
level: -1, | |
type: "b", | |
minver: 1, | |
description: "Used to void damaged data, to avoid unexpected behaviors when using damaged data. The content is discarded. Also used to reserve space in a sub-element for later use." | |
}, | |
17139: { | |
name: "EBMLMaxSizeLength", | |
level: 1, | |
type: "u", | |
mandatory: !0, | |
default: 8, | |
minver: 1, | |
description: "The maximum length of the sizes you'll find in this file (8 or less in Matroska). This does not override the element size indicated at the beginning of an element. Elements that have an indicated size which is larger than what is allowed by EBMLMaxSizeLength shall be considered invalid." | |
}, | |
17138: { | |
name: "EBMLMaxIDLength", | |
level: 1, | |
type: "u", | |
mandatory: !0, | |
default: 4, | |
minver: 1, | |
description: "The maximum length of the IDs you'll find in this file (4 or less in Matroska)." | |
}, | |
17143: { | |
name: "EBMLReadVersion", | |
level: 1, | |
type: "u", | |
mandatory: !0, | |
default: 1, | |
minver: 1, | |
description: "The minimum EBML version a parser has to support to read this file." | |
}, | |
440786851: { | |
name: "EBML", | |
level: "0", | |
type: "m", | |
mandatory: !0, | |
multiple: !0, | |
minver: 1, | |
description: "Set the EBML characteristics of the data to follow. Each EBML document has to start with this." | |
}, | |
21936: { | |
name: "Colour", | |
level: "4", | |
type: "m", | |
mandatory: !0, | |
multiple: !0, | |
description: "Settings describing the colour format." | |
}, | |
21937: { | |
name: "MatrixCoefficients", | |
level: "5", | |
type: "u", | |
mandatory: !0, | |
multiple: !0, | |
description: "The Matrix Coefficients of the video used to derive luma and chroma values from red, green, and blue color primaries. For clarity, the value and meanings for MatrixCoefficients are adopted from Table 4 of ISO/IEC 23001-8:2016 or ITU-T H.273." | |
}, | |
21945: { | |
name: "Range", | |
level: "5", | |
type: "u", | |
mandatory: !0, | |
multiple: !0, | |
description: "Clipping of the color ranges." | |
}, | |
21946: { | |
name: "TransferCharacteristics", | |
level: "5", | |
type: "u", | |
mandatory: !0, | |
multiple: !0, | |
description: "The transfer characteristics of the video." | |
}, | |
21947: { | |
name: "Primaries", | |
level: "5", | |
type: "u", | |
mandatory: !0, | |
multiple: !0, | |
description: "The colour primaries of the video. For clarity, the value and meanings for Primaries are adopted from Table 2 of ISO/IEC 23091-4 or ITU-T H.273." | |
} | |
} | |
} | |
, | |
3179: function(e, t, n) { | |
"use strict"; | |
var i = this && this.__createBinding || (Object.create ? function(e, t, n, i) { | |
void 0 === i && (i = n), | |
Object.defineProperty(e, i, { | |
enumerable: !0, | |
get: function() { | |
return t[n] | |
} | |
}) | |
} | |
: function(e, t, n, i) { | |
void 0 === i && (i = n), | |
e[i] = t[n] | |
} | |
) | |
, r = this && this.__exportStar || function(e, t) { | |
for (var n in e) | |
"default" === n || Object.prototype.hasOwnProperty.call(t, n) || i(t, e, n) | |
} | |
; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}), | |
t.tools = t.Reader = t.Encoder = t.Decoder = void 0, | |
r(n(8177), t); | |
var o = n(8193); | |
t.Decoder = o.default; | |
var a = n(4741); | |
t.Encoder = a.default; | |
var s = n(5226); | |
t.Reader = s.default; | |
var l = n(9840); | |
t.tools = l | |
}, | |
4635: function(e, t, n) { | |
"use strict"; | |
var i = this && this.__assign || function() { | |
return i = Object.assign || function(e) { | |
for (var t, n = 1, i = arguments.length; n < i; n++) | |
for (var r in t = arguments[n]) | |
Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]); | |
return e | |
} | |
, | |
i.apply(this, arguments) | |
} | |
, r = this && this.__spreadArray || function(e, t, n) { | |
if (n || 2 === arguments.length) | |
for (var i, r = 0, o = t.length; r < o; r++) | |
!i && r in t || (i || (i = Array.prototype.slice.call(t, 0, r)), | |
i[r] = t[r]); | |
return e.concat(i || Array.prototype.slice.call(t)) | |
} | |
; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var o = n(9840) | |
, a = function() { | |
function e() {} | |
return e.readVint = function(t, n) { | |
void 0 === n && (n = 0); | |
var i = 8 - Math.floor(Math.log2(t[n])); | |
if (i > 8) { | |
var r = e.readHexString(t, n, n + i); | |
throw new Error("Unrepresentable length: ".concat(i, " ").concat(r)) | |
} | |
if (n + i > t.length) | |
return null; | |
for (var o = t[n] & (1 << 8 - i) - 1, a = 1; a < i; a += 1) { | |
if (7 === a && o >= Math.pow(2, 8) && t[n + 7] > 0) | |
return { | |
length: i, | |
value: -1 | |
}; | |
o *= Math.pow(2, 8), | |
o += t[n + a] | |
} | |
return { | |
length: i, | |
value: o | |
} | |
} | |
, | |
e.writeVint = function(e) { | |
if (e < 0 || e > Math.pow(2, 53)) | |
throw new Error("Unrepresentable value: ".concat(e)); | |
var t = 1; | |
for (t = 1; t <= 8 && !(e < Math.pow(2, 7 * t) - 1); t += 1) | |
; | |
for (var n = o.Buffer.alloc(t), i = e, r = 1; r <= t; r += 1) { | |
var a = 255 & i; | |
n[t - r] = a, | |
i -= a, | |
i /= Math.pow(2, 8) | |
} | |
return n[0] |= 1 << 8 - t, | |
n | |
} | |
, | |
e.concatenate = function(e, t) { | |
return e || t ? e && 0 !== e.byteLength ? t && 0 !== t.byteLength ? o.Buffer.from(r(r([], e, !0), t, !0)) : e : t : o.Buffer.from([]) | |
} | |
, | |
e.readHexString = function(e, t, n) { | |
return void 0 === t && (t = 0), | |
void 0 === n && (n = e.byteLength), | |
Array.from(e.slice(t, n)).map((function(e) { | |
return Number(e).toString(16) | |
} | |
)).reduce((function(e, t) { | |
return "".concat(e).concat(t.padStart(2, "0")) | |
} | |
), "") | |
} | |
, | |
e.readUtf8 = function(e) { | |
try { | |
return o.Buffer.from(e).toString("utf8") | |
} catch (e) { | |
return null | |
} | |
} | |
, | |
e.readUnsigned = function(t) { | |
var n = new DataView(t.buffer,t.byteOffset,t.byteLength); | |
switch (t.byteLength) { | |
case 1: | |
return n.getUint8(0); | |
case 2: | |
return n.getUint16(0); | |
case 4: | |
return n.getUint32(0) | |
} | |
return t.byteLength <= 6 ? t.reduce((function(e, t) { | |
return 256 * e + t | |
} | |
), 0) : e.readHexString(t, 0, t.byteLength) | |
} | |
, | |
e.readSigned = function(e) { | |
var t = new DataView(e.buffer,e.byteOffset,e.byteLength); | |
switch (e.byteLength) { | |
case 1: | |
return t.getInt8(0); | |
case 2: | |
return t.getInt16(0); | |
case 4: | |
return t.getInt32(0); | |
default: | |
return NaN | |
} | |
} | |
, | |
e.readFloat = function(e) { | |
var t = new DataView(e.buffer,e.byteOffset,e.byteLength); | |
switch (e.byteLength) { | |
case 4: | |
return t.getFloat32(0); | |
case 8: | |
return t.getFloat64(0); | |
default: | |
return NaN | |
} | |
} | |
, | |
e.readDate = function(t) { | |
var n = new DataView(t.buffer,t.byteOffset,t.byteLength); | |
switch (t.byteLength) { | |
case 1: | |
return new Date(n.getUint8(0)); | |
case 2: | |
return new Date(n.getUint16(0)); | |
case 4: | |
return new Date(n.getUint32(0)); | |
case 8: | |
return new Date(Number.parseInt(e.readHexString(t), 16)); | |
default: | |
return new Date(0) | |
} | |
} | |
, | |
e.readDataFromTag = function(t, n) { | |
var r, o = t.type, a = t.name, s = t.track, l = t.discardable || !1, c = t.keyframe || !1, u = null; | |
switch (o) { | |
case "u": | |
r = e.readUnsigned(n); | |
break; | |
case "f": | |
r = e.readFloat(n); | |
break; | |
case "i": | |
r = e.readSigned(n); | |
break; | |
case "s": | |
r = String.fromCharCode.apply(String, n); | |
break; | |
case "8": | |
r = e.readUtf8(n); | |
break; | |
case "d": | |
r = e.readDate(n) | |
} | |
if ("SimpleBlock" === a || "Block" === a) { | |
var h = 0 | |
, d = e.readVint(n, h) | |
, p = d.length; | |
h += p, | |
s = d.value, | |
r = e.readSigned(n.subarray(h, h + 2)), | |
h += 2, | |
"SimpleBlock" === a && (c = Boolean(128 & n[p + 2]), | |
l = Boolean(1 & n[p + 2])), | |
h += 1, | |
u = n.subarray(h) | |
} | |
return i(i({}, t), { | |
data: n, | |
discardable: l, | |
keyframe: c, | |
payload: u, | |
track: s, | |
value: r | |
}) | |
} | |
, | |
e | |
}(); | |
t.default = a | |
}, | |
9840: (e,t,n)=>{ | |
"use strict"; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}), | |
t.convertEBMLDateToJSDate = t.createFloatBuffer = t.createIntBuffer = t.createUIntBuffer = t.encodeValueToBuffer = t.concat = t.putRefinedMetaData = t.extractElement = t.removeElement = t.makeMetadataSeekable = t.createRIFFChunk = t.VP8BitStreamToRiffWebPBuffer = t.WebPBlockFilter = t.encodeTag = t.readBlock = t.ebmlBlock = t.writeVint = t.readVint = t.Buffer = void 0; | |
var i = n(6661) | |
, r = n(4741) | |
, o = n(4686) | |
, a = n(4635) | |
, s = n(927); | |
function l(e, n) { | |
var i = new t.Buffer(4); | |
return i.writeUInt32LE(n.byteLength, 0), | |
f([new t.Buffer(e.substr(0, 4),"ascii"), i, n, new t.Buffer(n.byteLength % 2 == 0 ? 0 : 1)]) | |
} | |
function c(e, t) { | |
for (var n = -1, i = 0; i < t.length; i++) { | |
var r = t[i]; | |
if (r.name === e) { | |
if ("m" !== r.type) | |
return void t.splice(i, 1); | |
if (r.isEnd) { | |
if (-1 == n) | |
throw new Error("Detected ".concat(e, " closing element before finding the start")); | |
return void t.splice(n, i - n + 1) | |
} | |
n = i | |
} | |
} | |
} | |
function u(e, t) { | |
for (var n = [], i = -1, r = 0; r < t.length; r++) { | |
var o = t[r]; | |
if (o.name === e) { | |
if ("m" !== o.type) { | |
n.push(t[r]); | |
break | |
} | |
if (o.isEnd) { | |
if (-1 == i) | |
throw new Error("Detected ".concat(e, " closing element before finding the start")); | |
n = t.slice(i, r + 1); | |
break | |
} | |
i = r | |
} | |
} | |
return n | |
} | |
function h(e) { | |
var t = new r.default; | |
return e.reduce((function(e, n) { | |
return e.concat(t.encode([n])) | |
} | |
), []).reduce((function(e, t) { | |
return e + t.byteLength | |
} | |
), 0) | |
} | |
function d(e, n, i) { | |
var r = i.duration | |
, o = i.clusterPtrs | |
, a = i.cues | |
, s = e.slice(0); | |
if ("number" == typeof r) { | |
var l = !1; | |
s.forEach((function(e) { | |
"f" === e.type && "Duration" === e.name && (l = !0, | |
e.data = g(r, 8)) | |
} | |
)), | |
l || p(s, "Info", [{ | |
name: "Duration", | |
type: "f", | |
data: g(r, 8) | |
}]) | |
} | |
Array.isArray(a) && p(s, "Cues", function(e, t) { | |
var n = []; | |
return e.forEach((function(e) { | |
var i = e.CueTrack | |
, r = e.CueClusterPosition | |
, o = e.CueTime; | |
n.push({ | |
name: "CuePoint", | |
type: "m", | |
isEnd: !1 | |
}), | |
n.push({ | |
name: "CueTime", | |
type: "u", | |
data: m(o) | |
}), | |
n.push({ | |
name: "CueTrackPositions", | |
type: "m", | |
isEnd: !1 | |
}), | |
n.push({ | |
name: "CueTrack", | |
type: "u", | |
data: m(i) | |
}), | |
n.push({ | |
name: "CueClusterPosition", | |
type: "u", | |
data: m(r + t) | |
}), | |
n.push({ | |
name: "CueTrackPositions", | |
type: "m", | |
isEnd: !0 | |
}), | |
n.push({ | |
name: "CuePoint", | |
type: "m", | |
isEnd: !0 | |
}) | |
} | |
)), | |
n | |
}(a, n)); | |
var c = []; | |
return Array.isArray(o) && (console.warn("append cluster pointers to seekhead is deprecated. please use cues"), | |
c = function(e, n) { | |
var i = []; | |
return e.forEach((function(e) { | |
i.push({ | |
name: "Seek", | |
type: "m", | |
isEnd: !1 | |
}), | |
i.push({ | |
name: "SeekID", | |
type: "b", | |
data: new t.Buffer([31, 67, 182, 117]) | |
}), | |
i.push({ | |
name: "SeekPosition", | |
type: "u", | |
data: m(e + n) | |
}), | |
i.push({ | |
name: "Seek", | |
type: "m", | |
isEnd: !0 | |
}) | |
} | |
)), | |
i | |
}(o, n)), | |
p(s, "SeekHead", c, !0), | |
s | |
} | |
function p(e, t, n, i) { | |
void 0 === i && (i = !1); | |
for (var r = -1, o = 0; o < e.length; o++) { | |
var a = e[o]; | |
if ("m" === a.type && a.name === t && !1 === a.isEnd) { | |
r = o; | |
break | |
} | |
} | |
r >= 0 ? Array.prototype.splice.apply(e, [r + 1, 0].concat(n)) : i ? [].concat([{ | |
name: t, | |
type: "m", | |
isEnd: !1 | |
}], n, [{ | |
name: t, | |
type: "m", | |
isEnd: !0 | |
}]).reverse().forEach((function(t) { | |
e.unshift(t) | |
} | |
)) : (e.push({ | |
name: t, | |
type: "m", | |
isEnd: !1 | |
}), | |
n.forEach((function(t) { | |
e.push(t) | |
} | |
)), | |
e.push({ | |
name: t, | |
type: "m", | |
isEnd: !0 | |
})) | |
} | |
function f(e) { | |
return t.Buffer.concat(e) | |
} | |
function m(e) { | |
for (var n = 1; e >= Math.pow(2, 8 * n); n++) | |
; | |
if (n >= 7) | |
return console.warn("7bit or more bigger uint not supported."), | |
new i.Uint64BE(e).toBuffer(); | |
var r = new t.Buffer(n); | |
return r.writeUIntBE(e, 0, n), | |
r | |
} | |
function v(e) { | |
for (var n = 1; e >= Math.pow(2, 8 * n); n++) | |
; | |
if (n >= 7) | |
return console.warn("7bit or more bigger uint not supported."), | |
new i.Int64BE(e).toBuffer(); | |
var r = new t.Buffer(n); | |
return r.writeIntBE(e, 0, n), | |
r | |
} | |
function g(e, n) { | |
var i; | |
if (void 0 === n && (n = 8), | |
8 === n) | |
return (i = new t.Buffer(8)).writeDoubleBE(e, 0), | |
i; | |
if (4 === n) | |
return (i = new t.Buffer(4)).writeFloatBE(e, 0), | |
i; | |
throw new Error("float type bits must 4bytes or 8bytes") | |
} | |
t.Buffer = o.Buffer, | |
t.readVint = a.default.readVint, | |
t.writeVint = a.default.writeVint, | |
t.ebmlBlock = s, | |
t.readBlock = function(e) { | |
return (0, | |
t.ebmlBlock)(new t.Buffer(e)) | |
} | |
, | |
t.encodeTag = function(e, n, i) { | |
return void 0 === i && (i = !1), | |
f([e, i ? new t.Buffer("01ffffffffffffff","hex") : (0, | |
t.writeVint)(n.length), n]) | |
} | |
, | |
t.WebPBlockFilter = function(e) { | |
return e.reduce((function(e, n) { | |
return "b" !== n.type || "SimpleBlock" !== n.name ? e : (0, | |
t.ebmlBlock)(n.data).frames.some((function(e) { | |
return "9d012a" === e.slice(3, 6).toString("hex") | |
} | |
)) ? e.concat(n) : e | |
} | |
), []) | |
} | |
, | |
t.VP8BitStreamToRiffWebPBuffer = function(e) { | |
var n = l("VP8 ", e); | |
return l("RIFF", f([new t.Buffer("WEBP","ascii"), n])) | |
} | |
, | |
t.createRIFFChunk = l, | |
t.makeMetadataSeekable = function(e, n, i) { | |
var o = u("EBML", e) | |
, a = h(o) + 12 | |
, s = e[e.length - 1].dataEnd - a | |
, l = u("Info", e); | |
c("Duration", l), | |
l.splice(1, 0, { | |
name: "Duration", | |
type: "f", | |
data: g(n, 8) | |
}); | |
for (var d = h(l), p = u("Tracks", e), f = h(p), v = 47, y = [], b = 5 + 15 * i.length, w = [], k = -1, C = function(e) { | |
var n = v | |
, r = n + d | |
, o = r + f | |
, l = o + b - s; | |
if ((y = []).push({ | |
name: "SeekHead", | |
type: "m", | |
isEnd: !1 | |
}), | |
y.push({ | |
name: "Seek", | |
type: "m", | |
isEnd: !1 | |
}), | |
y.push({ | |
name: "SeekID", | |
type: "b", | |
data: new t.Buffer([21, 73, 169, 102]) | |
}), | |
y.push({ | |
name: "SeekPosition", | |
type: "u", | |
data: m(n) | |
}), | |
y.push({ | |
name: "Seek", | |
type: "m", | |
isEnd: !0 | |
}), | |
y.push({ | |
name: "Seek", | |
type: "m", | |
isEnd: !1 | |
}), | |
y.push({ | |
name: "SeekID", | |
type: "b", | |
data: new t.Buffer([22, 84, 174, 107]) | |
}), | |
y.push({ | |
name: "SeekPosition", | |
type: "u", | |
data: m(r) | |
}), | |
y.push({ | |
name: "Seek", | |
type: "m", | |
isEnd: !0 | |
}), | |
y.push({ | |
name: "Seek", | |
type: "m", | |
isEnd: !1 | |
}), | |
y.push({ | |
name: "SeekID", | |
type: "b", | |
data: new t.Buffer([28, 83, 187, 107]) | |
}), | |
y.push({ | |
name: "SeekPosition", | |
type: "u", | |
data: m(o) | |
}), | |
y.push({ | |
name: "Seek", | |
type: "m", | |
isEnd: !0 | |
}), | |
y.push({ | |
name: "SeekHead", | |
type: "m", | |
isEnd: !0 | |
}), | |
v = h(y), | |
(w = []).push({ | |
name: "Cues", | |
type: "m", | |
isEnd: !1 | |
}), | |
i.forEach((function(e) { | |
var t = e.CueTrack | |
, n = e.CueClusterPosition | |
, i = e.CueTime; | |
w.push({ | |
name: "CuePoint", | |
type: "m", | |
isEnd: !1 | |
}), | |
w.push({ | |
name: "CueTime", | |
type: "u", | |
data: m(i) | |
}), | |
w.push({ | |
name: "CueTrackPositions", | |
type: "m", | |
isEnd: !1 | |
}), | |
w.push({ | |
name: "CueTrack", | |
type: "u", | |
data: m(t) | |
}), | |
n -= a, | |
n += l, | |
w.push({ | |
name: "CueClusterPosition", | |
type: "u", | |
data: m(n) | |
}), | |
w.push({ | |
name: "CueTrackPositions", | |
type: "m", | |
isEnd: !0 | |
}), | |
w.push({ | |
name: "CuePoint", | |
type: "m", | |
isEnd: !0 | |
}) | |
} | |
)), | |
w.push({ | |
name: "Cues", | |
type: "m", | |
isEnd: !0 | |
}), | |
b = h(w), | |
k === l) | |
return "break"; | |
if (k = l, | |
9 === e) | |
throw new Error("Failed to converge to a stable metadata size") | |
}, M = 0; M < 10; M++) { | |
if ("break" === C(M)) | |
break | |
} | |
var E = [].concat.apply([], [o, { | |
name: "Segment", | |
type: "m", | |
isEnd: !1, | |
unknownSize: !0 | |
}, y, l, p, w]); | |
return (new r.default).encode(E) | |
} | |
, | |
t.removeElement = c, | |
t.extractElement = u, | |
t.putRefinedMetaData = function(e, n) { | |
Array.isArray(n.cueInfos) && !Array.isArray(n.cues) && (console.warn("putRefinedMetaData: info.cueInfos property is deprecated. please use info.cues"), | |
n.cues = n.cueInfos); | |
for (var i = [], o = [], a = 0; a < e.length; a++) { | |
var s = e[a]; | |
if ("m" === s.type && "Segment" === s.name) { | |
if (i = e.slice(0, a), | |
o = e.slice(a), | |
s.unknownSize) { | |
o.shift(); | |
break | |
} | |
throw new Error("this metadata is not streaming webm file") | |
} | |
} | |
if (!(o[o.length - 1].dataEnd > 0)) | |
throw new Error("metadata dataEnd has wrong number"); | |
var l, c = o[o.length - 1].dataEnd, u = i[i.length - 1].dataEnd, h = (new r.default).encode(i).byteLength - u, p = c - o[0].tagStart, f = (o[0].tagStart, | |
o[0].tagStart, | |
new t.Buffer([24, 83, 128, 103])), m = new t.Buffer("01ffffffffffffff","hex"), v = f.byteLength + m.byteLength, g = p; | |
for (l = 1; l < 20; l++) { | |
var y = d(o, h + (u + v + g - c), n) | |
, b = (new r.default).encode(y).byteLength; | |
if (b === g) | |
return (new r.default).encode([].concat(i, [{ | |
type: "m", | |
name: "Segment", | |
isEnd: !1, | |
unknownSize: !0 | |
}], y)); | |
g = b | |
} | |
throw new Error("unable to refine metadata, stable size could not be found in " + l + " iterations!") | |
} | |
, | |
t.concat = f, | |
t.encodeValueToBuffer = function(e) { | |
var n = new t.Buffer(0); | |
if ("m" === e.type) | |
return e; | |
switch (e.type) { | |
case "u": | |
n = m(e.value); | |
break; | |
case "i": | |
n = v(e.value); | |
break; | |
case "f": | |
n = g(e.value); | |
break; | |
case "s": | |
n = new t.Buffer(e.value,"ascii"); | |
break; | |
case "8": | |
n = new t.Buffer(e.value,"utf8"); | |
break; | |
case "b": | |
n = e.value; | |
break; | |
case "d": | |
n = new i.Int64BE(e.value.getTime().toString()).toBuffer() | |
} | |
return Object.assign({}, e, { | |
data: n | |
}) | |
} | |
, | |
t.createUIntBuffer = m, | |
t.createIntBuffer = v, | |
t.createFloatBuffer = g, | |
t.convertEBMLDateToJSDate = function(e) { | |
return e instanceof Date ? e : new Date(new Date("2001-01-01T00:00:00.000Z").getTime() + Number(e) / 1e3 / 1e3) | |
} | |
} | |
, | |
1928: function(e, t, n) { | |
"use strict"; | |
var i = this && this.__awaiter || function(e, t, n, i) { | |
return new (n || (n = Promise))((function(r, o) { | |
function a(e) { | |
try { | |
l(i.next(e)) | |
} catch (e) { | |
o(e) | |
} | |
} | |
function s(e) { | |
try { | |
l(i.throw(e)) | |
} catch (e) { | |
o(e) | |
} | |
} | |
function l(e) { | |
var t; | |
e.done ? r(e.value) : (t = e.value, | |
t instanceof n ? t : new n((function(e) { | |
e(t) | |
} | |
))).then(a, s) | |
} | |
l((i = i.apply(e, t || [])).next()) | |
} | |
)) | |
} | |
, r = this && this.__generator || function(e, t) { | |
var n, i, r, o, a = { | |
label: 0, | |
sent: function() { | |
if (1 & r[0]) | |
throw r[1]; | |
return r[1] | |
}, | |
trys: [], | |
ops: [] | |
}; | |
return o = { | |
next: s(0), | |
throw: s(1), | |
return: s(2) | |
}, | |
"function" == typeof Symbol && (o[Symbol.iterator] = function() { | |
return this | |
} | |
), | |
o; | |
function s(o) { | |
return function(s) { | |
return function(o) { | |
if (n) | |
throw new TypeError("Generator is already executing."); | |
for (; a; ) | |
try { | |
if (n = 1, | |
i && (r = 2 & o[0] ? i.return : o[0] ? i.throw || ((r = i.return) && r.call(i), | |
0) : i.next) && !(r = r.call(i, o[1])).done) | |
return r; | |
switch (i = 0, | |
r && (o = [2 & o[0], r.value]), | |
o[0]) { | |
case 0: | |
case 1: | |
r = o; | |
break; | |
case 4: | |
return a.label++, | |
{ | |
value: o[1], | |
done: !1 | |
}; | |
case 5: | |
a.label++, | |
i = o[1], | |
o = [0]; | |
continue; | |
case 7: | |
o = a.ops.pop(), | |
a.trys.pop(); | |
continue; | |
default: | |
if (!(r = a.trys, | |
(r = r.length > 0 && r[r.length - 1]) || 6 !== o[0] && 2 !== o[0])) { | |
a = 0; | |
continue | |
} | |
if (3 === o[0] && (!r || o[1] > r[0] && o[1] < r[3])) { | |
a.label = o[1]; | |
break | |
} | |
if (6 === o[0] && a.label < r[1]) { | |
a.label = r[1], | |
r = o; | |
break | |
} | |
if (r && a.label < r[2]) { | |
a.label = r[2], | |
a.ops.push(o); | |
break | |
} | |
r[2] && a.ops.pop(), | |
a.trys.pop(); | |
continue | |
} | |
o = t.call(e, a) | |
} catch (e) { | |
o = [6, e], | |
i = 0 | |
} finally { | |
n = r = 0 | |
} | |
if (5 & o[0]) | |
throw o[1]; | |
return { | |
value: o[0] ? o[1] : void 0, | |
done: !0 | |
} | |
}([o, s]) | |
} | |
} | |
} | |
; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var o = n(3179); | |
t.default = function(e) { | |
return i(this, void 0, void 0, (function() { | |
var t, n, i, a, s, l, c, u, h, d, p; | |
return r(this, (function(r) { | |
switch (r.label) { | |
case 0: | |
if (!e) | |
throw Error("call to fixWebmDuration requires a blob"); | |
t = new o.Decoder, | |
n = new o.Reader, | |
i = e.stream(), | |
a = i.getReader(), | |
r.label = 1; | |
case 1: | |
return [4, a.read()]; | |
case 2: | |
return s = r.sent(), | |
l = s.done, | |
c = s.value, | |
l ? (n.stop(), | |
[3, 3]) : ((u = null == (u = t.decode(c)) ? void 0 : u.filter((function(e) { | |
return "unknown" !== e.type | |
} | |
))).forEach((function(e) { | |
n.read(e) | |
} | |
)), | |
c = null, | |
[3, 1]); | |
case 3: | |
return h = o.tools.makeMetadataSeekable(n.metadatas, n.duration, n.cues), | |
d = new Blob([h],{ | |
type: e.type | |
}), | |
p = e.slice(n.metadataSize), | |
[2, new Blob([d, p],{ | |
type: e.type | |
})] | |
} | |
} | |
)) | |
} | |
)) | |
} | |
}, | |
8593: e=>{ | |
e.exports = function() { | |
for (var e = {}, n = 0; n < arguments.length; n++) { | |
var i = arguments[n]; | |
for (var r in i) | |
t.call(i, r) && (e[r] = i[r]) | |
} | |
return e | |
} | |
; | |
var t = Object.prototype.hasOwnProperty | |
} | |
, | |
4967: (e,t,n)=>{ | |
"use strict"; | |
var i = n(1528); | |
e.exports = { | |
Parser: i | |
} | |
} | |
, | |
5810: e=>{ | |
"use strict"; | |
e.exports = ["address", "article", "aside", "base", "basefont", "blockquote", "body", "caption", "center", "col", "colgroup", "dd", "details", "dialog", "dir", "div", "dl", "dt", "fieldset", "figcaption", "figure", "footer", "form", "frame", "frameset", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "iframe", "legend", "li", "link", "main", "menu", "menuitem", "meta", "nav", "noframes", "ol", "optgroup", "option", "p", "param", "pre", "section", "source", "title", "summary", "table", "tbody", "td", "tfoot", "th", "thead", "title", "tr", "track", "ul"] | |
} | |
, | |
5785: (e,t,n)=>{ | |
"use strict"; | |
var i = n(7057) | |
, r = n(3507); | |
e.exports = function(e) { | |
return n.raw = function(e, n, a) { | |
return r(e, i(a, { | |
position: t(n), | |
warning: o | |
})) | |
} | |
, | |
n; | |
function t(t) { | |
for (var n = e.offset, i = t.line, r = []; ++i && i in n; ) | |
r.push((n[i] || 0) + 1); | |
return { | |
start: t, | |
indent: r | |
} | |
} | |
function n(n, i, a) { | |
r(n, { | |
position: t(i), | |
warning: o, | |
text: a, | |
reference: a, | |
textContext: e, | |
referenceContext: e | |
}) | |
} | |
function o(t, n, i) { | |
3 !== i && e.file.message(t, n) | |
} | |
} | |
} | |
, | |
1393: (e,t,n)=>{ | |
"use strict"; | |
e.exports = { | |
position: !0, | |
gfm: !0, | |
commonmark: !1, | |
pedantic: !1, | |
blocks: n(5810) | |
} | |
} | |
, | |
753: e=>{ | |
"use strict"; | |
e.exports = function(e, t) { | |
var n = e.indexOf("\n", t); | |
for (; n > t && " " === e.charAt(n - 1); ) | |
n--; | |
return n | |
} | |
} | |
, | |
2163: e=>{ | |
"use strict"; | |
e.exports = function(e, t) { | |
return e.indexOf("`", t) | |
} | |
} | |
, | |
1071: e=>{ | |
"use strict"; | |
e.exports = function(e, t) { | |
return e.indexOf("~~", t) | |
} | |
} | |
, | |
2298: (e,t,n)=>{ | |
"use strict"; | |
var i = n(7092) | |
, r = n(741); | |
function o(e) { | |
return i(e) || r(e) || 43 === e || 45 === e || 46 === e || 95 === e | |
} | |
e.exports = function e(t, n) { | |
var i, r; | |
if (!this.options.gfm) | |
return -1; | |
if (-1 === (i = t.indexOf("@", n))) | |
return -1; | |
if ((r = i) === n || !o(t.charCodeAt(r - 1))) | |
return e.call(this, t, i + 1); | |
for (; r > n && o(t.charCodeAt(r - 1)); ) | |
r--; | |
return r | |
} | |
} | |
, | |
1030: e=>{ | |
"use strict"; | |
e.exports = function(e, t) { | |
var n = e.indexOf("*", t) | |
, i = e.indexOf("_", t); | |
if (-1 === i) | |
return n; | |
if (-1 === n) | |
return i; | |
return i < n ? i : n | |
} | |
} | |
, | |
3115: e=>{ | |
"use strict"; | |
e.exports = function(e, t) { | |
return e.indexOf("\\", t) | |
} | |
} | |
, | |
2356: e=>{ | |
"use strict"; | |
e.exports = function(e, t) { | |
var n = e.indexOf("[", t) | |
, i = e.indexOf("![", t); | |
if (-1 === i) | |
return n; | |
return n < i ? n : i | |
} | |
} | |
, | |
6451: e=>{ | |
"use strict"; | |
e.exports = function(e, t) { | |
var n = e.indexOf("**", t) | |
, i = e.indexOf("__", t); | |
if (-1 === i) | |
return n; | |
if (-1 === n) | |
return i; | |
return i < n ? i : n | |
} | |
} | |
, | |
1890: e=>{ | |
"use strict"; | |
e.exports = function(e, t) { | |
return e.indexOf("<", t) | |
} | |
} | |
, | |
4307: e=>{ | |
"use strict"; | |
e.exports = function(e, n) { | |
var i, r, o, a = -1; | |
if (!this.options.gfm) | |
return a; | |
r = t.length, | |
i = -1; | |
for (; ++i < r; ) | |
-1 !== (o = e.indexOf(t[i], n)) && (-1 === a || o < a) && (a = o); | |
return a | |
} | |
; | |
var t = ["www.", "http://", "https://"] | |
} | |
, | |
4272: (e,t,n)=>{ | |
"use strict"; | |
var i = n(7057) | |
, r = n(8124); | |
e.exports = function() { | |
var e, t = this, n = String(t.file), s = { | |
line: 1, | |
column: 1, | |
offset: 0 | |
}, l = i(s); | |
65279 === (n = n.replace(a, o)).charCodeAt(0) && (n = n.slice(1), | |
l.column++, | |
l.offset++); | |
e = { | |
type: "root", | |
children: t.tokenizeBlock(n, l), | |
position: { | |
start: s, | |
end: t.eof || i(s) | |
} | |
}, | |
t.options.position || r(e, !0); | |
return e | |
} | |
; | |
var o = "\n" | |
, a = /\r\n|\r/g | |
} | |
, | |
1528: (e,t,n)=>{ | |
"use strict"; | |
var i = n(7057) | |
, r = n(9546) | |
, o = n(922) | |
, a = n(9359) | |
, s = n(5785) | |
, l = n(7269); | |
function c(e, t) { | |
this.file = t, | |
this.offset = {}, | |
this.options = i(this.options), | |
this.setOptions({}), | |
this.inList = !1, | |
this.inBlock = !1, | |
this.inLink = !1, | |
this.atStart = !0, | |
this.toOffset = o(t).toOffset, | |
this.unescape = a(this, "escape"), | |
this.decode = s(this) | |
} | |
e.exports = c; | |
var u = c.prototype; | |
function h(e) { | |
var t, n = []; | |
for (t in e) | |
n.push(t); | |
return n | |
} | |
u.setOptions = n(3228), | |
u.parse = n(4272), | |
u.options = n(1393), | |
u.exitStart = r("atStart", !0), | |
u.enterList = r("inList", !1), | |
u.enterLink = r("inLink", !1), | |
u.enterBlock = r("inBlock", !1), | |
u.interruptParagraph = [["thematicBreak"], ["list"], ["atxHeading"], ["fencedCode"], ["blockquote"], ["html"], ["setextHeading", { | |
commonmark: !1 | |
}], ["definition", { | |
commonmark: !1 | |
}]], | |
u.interruptList = [["atxHeading", { | |
pedantic: !1 | |
}], ["fencedCode", { | |
pedantic: !1 | |
}], ["thematicBreak", { | |
pedantic: !1 | |
}], ["definition", { | |
commonmark: !1 | |
}]], | |
u.interruptBlockquote = [["indentedCode", { | |
commonmark: !0 | |
}], ["fencedCode", { | |
commonmark: !0 | |
}], ["atxHeading", { | |
commonmark: !0 | |
}], ["setextHeading", { | |
commonmark: !0 | |
}], ["thematicBreak", { | |
commonmark: !0 | |
}], ["html", { | |
commonmark: !0 | |
}], ["list", { | |
commonmark: !0 | |
}], ["definition", { | |
commonmark: !1 | |
}]], | |
u.blockTokenizers = { | |
blankLine: n(1694), | |
indentedCode: n(134), | |
fencedCode: n(1498), | |
blockquote: n(6234), | |
atxHeading: n(8469), | |
thematicBreak: n(6968), | |
list: n(745), | |
setextHeading: n(8671), | |
html: n(8776), | |
definition: n(1616), | |
table: n(7793), | |
paragraph: n(8607) | |
}, | |
u.inlineTokenizers = { | |
escape: n(470), | |
autoLink: n(8775), | |
url: n(1944), | |
email: n(5657), | |
html: n(7648), | |
link: n(9405), | |
reference: n(6252), | |
strong: n(5702), | |
emphasis: n(439), | |
deletion: n(1134), | |
code: n(1891), | |
break: n(5874), | |
text: n(4410) | |
}, | |
u.blockMethods = h(u.blockTokenizers), | |
u.inlineMethods = h(u.inlineTokenizers), | |
u.tokenizeBlock = l("block"), | |
u.tokenizeInline = l("inline"), | |
u.tokenizeFactory = l | |
} | |
, | |
3228: (e,t,n)=>{ | |
"use strict"; | |
var i = n(7057) | |
, r = n(4982) | |
, o = n(1393); | |
e.exports = function(e) { | |
var t, n, a = this, s = a.options; | |
if (null == e) | |
e = {}; | |
else { | |
if ("object" != typeof e) | |
throw new Error("Invalid value `" + e + "` for setting `options`"); | |
e = i(e) | |
} | |
for (t in o) { | |
if (null == (n = e[t]) && (n = s[t]), | |
"blocks" !== t && "boolean" != typeof n || "blocks" === t && "object" != typeof n) | |
throw new Error("Invalid value `" + n + "` for setting `options." + t + "`"); | |
e[t] = n | |
} | |
return a.options = e, | |
a.escape = r(e), | |
a | |
} | |
} | |
, | |
8775: (e,t,n)=>{ | |
"use strict"; | |
var i = n(1900) | |
, r = n(3507) | |
, o = n(1890); | |
e.exports = d, | |
d.locator = o, | |
d.notInLink = !0; | |
var a = "<" | |
, s = ">" | |
, l = "@" | |
, c = "/" | |
, u = "mailto:" | |
, h = u.length; | |
function d(e, t, n) { | |
var o, d, p, f, m, v = this, g = "", y = t.length, b = 0, w = "", k = !1, C = ""; | |
if (t.charAt(0) === a) { | |
for (b++, | |
g = a; b < y && (o = t.charAt(b), | |
!(i(o) || o === s || o === l || ":" === o && t.charAt(b + 1) === c)); ) | |
w += o, | |
b++; | |
if (w) { | |
if (C += w, | |
w = "", | |
C += o = t.charAt(b), | |
b++, | |
o === l) | |
k = !0; | |
else { | |
if (":" !== o || t.charAt(b + 1) !== c) | |
return; | |
C += c, | |
b++ | |
} | |
for (; b < y && (o = t.charAt(b), | |
!i(o) && o !== s); ) | |
w += o, | |
b++; | |
if (o = t.charAt(b), | |
w && o === s) | |
return !!n || (p = C += w, | |
g += C + o, | |
(d = e.now()).column++, | |
d.offset++, | |
k && (C.slice(0, h).toLowerCase() === u ? (p = p.slice(h), | |
d.column += h, | |
d.offset += h) : C = u + C), | |
f = v.inlineTokenizers, | |
v.inlineTokenizers = { | |
text: f.text | |
}, | |
m = v.enterLink(), | |
p = v.tokenizeInline(p, d), | |
v.inlineTokenizers = f, | |
m(), | |
e(g)({ | |
type: "link", | |
title: null, | |
url: r(C, { | |
nonTerminated: !1 | |
}), | |
children: p | |
})) | |
} | |
} | |
} | |
} | |
, | |
1694: e=>{ | |
"use strict"; | |
var t = /^[ \t]*(\n|$)/; | |
e.exports = function(e, n, i) { | |
var r, o = "", a = 0, s = n.length; | |
for (; a < s && null != (r = t.exec(n.slice(a))); ) | |
a += r[0].length, | |
o += r[0]; | |
if ("" === o) | |
return; | |
if (i) | |
return !0; | |
e(o) | |
} | |
} | |
, | |
6234: (e,t,n)=>{ | |
"use strict"; | |
var i = n(4898) | |
, r = n(6047); | |
e.exports = function(e, t, n) { | |
var c, u, h, d, p, f, m, v, g, y = this, b = y.offset, w = y.blockTokenizers, k = y.interruptBlockquote, C = e.now(), M = C.line, E = t.length, S = [], x = [], T = [], D = [], A = 0; | |
for (; A < E && ((u = t.charAt(A)) === s || u === a); ) | |
A++; | |
if (t.charAt(A) !== l) | |
return; | |
if (n) | |
return !0; | |
A = 0; | |
var L = null | |
, P = !1; | |
for (; A < E; ) { | |
for (m = A, | |
v = !1, | |
-1 === (d = t.indexOf(o, A)) && (d = E); A < E && ((u = t.charAt(A)) === s || u === a); ) | |
A++; | |
if (t.charAt(A) === l ? (A++, | |
v = !0, | |
t.charAt(A) === s && A++) : A = m, | |
p = t.slice(A, d), | |
!v && !i(p)) { | |
A = m; | |
break | |
} | |
if (!v && (h = t.slice(A), | |
r(k, w, y, [e, h, !0]))) | |
break; | |
if (0 === m) { | |
var I = p.match(/^\[!([^\]]+)\]([+\-]?)(?:\s|$)/); | |
if (I) { | |
let e = I[1] | |
, t = e | |
, n = "" | |
, i = e.indexOf("|"); | |
-1 !== i && (t = e.substr(0, i), | |
n = e.substr(i + 1)), | |
L = { | |
type: t.trim().toLowerCase().replace(/\s+/g, "-"), | |
fold: I[2], | |
data: n | |
}; | |
var F = I[0].length; | |
A += F, | |
(p = p.substr(F)).trim() && (P = !0) | |
} | |
} | |
f = m === A ? p : t.slice(m, d), | |
D.push(A - m), | |
S.push(f), | |
x.push(p), | |
A = d + 1 | |
} | |
A = -1, | |
E = D.length, | |
c = e(S.join(o)); | |
for (; ++A < E; ) | |
b[M] = (b[M] || 0) + D[A], | |
M++; | |
g = y.enterBlock(), | |
y.options.breakOnce = P, | |
L && x[0] && (T = y.tokenizeBlock(x.shift(), C), | |
C.line += 1); | |
return x = y.tokenizeBlock(x.join(o), C), | |
T.push(...x), | |
y.options.breakOnce = !1, | |
g(), | |
c({ | |
type: "blockquote", | |
children: T, | |
callout: L | |
}) | |
} | |
; | |
var o = "\n" | |
, a = "\t" | |
, s = " " | |
, l = ">" | |
} | |
, | |
5874: (e,t,n)=>{ | |
"use strict"; | |
var i = n(753); | |
e.exports = s, | |
s.locator = i; | |
var r = " " | |
, o = "\n" | |
, a = 2; | |
function s(e, t, n) { | |
for (var i, s = t.length, l = -1, c = ""; ++l < s; ) { | |
if ((i = t.charAt(l)) === o) { | |
if (l < a) | |
return; | |
return !!n || e(c += i)({ | |
type: "break" | |
}) | |
} | |
if (i !== r) | |
return; | |
c += i | |
} | |
} | |
} | |
, | |
1498: e=>{ | |
"use strict"; | |
e.exports = function(e, l, c) { | |
var u, h, d, p, f, m, v, g, y, b, w, k, C, M = this, E = M.options.gfm, S = l.length + 1, x = 0, T = ""; | |
if (!E) | |
return; | |
for (; x < S && ((d = l.charAt(x)) === i || d === n); ) | |
T += d, | |
x++; | |
if (k = x, | |
(d = l.charAt(x)) !== r && d !== o) | |
return; | |
x++, | |
h = d, | |
u = 1, | |
T += d; | |
for (; x < S && (d = l.charAt(x)) === h; ) | |
T += d, | |
u++, | |
x++; | |
if (u < a) | |
return; | |
for (; x < S && ((d = l.charAt(x)) === i || d === n); ) | |
T += d, | |
x++; | |
p = "", | |
v = ""; | |
for (; x < S && (d = l.charAt(x)) !== t && (h !== o || d !== h); ) | |
d === i || d === n ? v += d : (p += v + d, | |
v = ""), | |
x++; | |
if ((d = l.charAt(x)) && d !== t) | |
return; | |
if (c) | |
return !0; | |
(C = e.now()).column += T.length, | |
C.offset += T.length, | |
T += p, | |
p = M.decode.raw(M.unescape(p), C), | |
v && (T += v); | |
v = "", | |
b = "", | |
w = "", | |
g = "", | |
y = ""; | |
var D = !0; | |
for (; x < S; ) | |
if (g += b, | |
y += w, | |
b = "", | |
w = "", | |
(d = l.charAt(x)) === t) { | |
for (D ? (T += d, | |
D = !1) : (b += d, | |
w += d), | |
v = "", | |
x++; x < S && (d = l.charAt(x)) === i; ) | |
v += d, | |
x++; | |
if (b += v, | |
w += v.slice(k), | |
!(v.length >= s)) { | |
for (v = ""; x < S && (d = l.charAt(x)) === h; ) | |
v += d, | |
x++; | |
if (b += v, | |
w += v, | |
!(v.length < u)) { | |
for (v = ""; x < S && ((d = l.charAt(x)) === i || d === n); ) | |
b += d, | |
w += d, | |
x++; | |
if (!d || d === t) | |
break | |
} | |
} | |
} else | |
g += d, | |
w += d, | |
x++; | |
T += g + b, | |
x = -1, | |
S = p.length; | |
for (; ++x < S; ) | |
if ((d = p.charAt(x)) === i || d === n) | |
f || (f = p.slice(0, x)); | |
else if (f) { | |
m = p.slice(x); | |
break | |
} | |
return e(T)({ | |
type: "code", | |
lang: f || p || null, | |
meta: m || null, | |
value: y | |
}) | |
} | |
; | |
var t = "\n" | |
, n = "\t" | |
, i = " " | |
, r = "~" | |
, o = "`" | |
, a = 3 | |
, s = 4 | |
} | |
, | |
134: (e,t,n)=>{ | |
"use strict"; | |
var i = n(8813); | |
e.exports = function(e, t, n) { | |
var l, c, u, h = -1, d = t.length, p = "", f = "", m = "", v = ""; | |
for (; ++h < d; ) | |
if (l = t.charAt(h), | |
u) | |
if (u = !1, | |
p += m, | |
f += v, | |
m = "", | |
v = "", | |
l === r) | |
m = l, | |
v = l; | |
else | |
for (p += l, | |
f += l; ++h < d; ) { | |
if (!(l = t.charAt(h)) || l === r) { | |
v = l, | |
m = l; | |
break | |
} | |
p += l, | |
f += l | |
} | |
else if (l === a && t.charAt(h + 1) === l && t.charAt(h + 2) === l && t.charAt(h + 3) === l) | |
m += s, | |
h += 3, | |
u = !0; | |
else if (l === o) | |
m += l, | |
u = !0; | |
else { | |
for (c = ""; l === o || l === a; ) | |
c += l, | |
l = t.charAt(++h); | |
if (l !== r) | |
break; | |
m += c + l, | |
v += l | |
} | |
if (f) | |
return !!n || e(p)({ | |
type: "code", | |
lang: null, | |
meta: null, | |
value: i(f) | |
}) | |
} | |
; | |
var r = "\n" | |
, o = "\t" | |
, a = " " | |
, s = a.repeat(4) | |
} | |
, | |
1891: (e,t,n)=>{ | |
"use strict"; | |
var i = n(2163); | |
e.exports = s, | |
s.locator = i; | |
var r = 10 | |
, o = 32 | |
, a = 96; | |
function s(e, t, n) { | |
for (var i, s, l, c, u, h, d = t.length, p = 0; p < d && t.charCodeAt(p) === a; ) | |
p++; | |
if (0 !== p && p !== d) { | |
for (i = p, | |
u = t.charCodeAt(p); p < d; ) { | |
if (c = u, | |
u = t.charCodeAt(p + 1), | |
c === a) { | |
if (void 0 === s && (s = p), | |
l = p + 1, | |
u !== a && l - s === i) { | |
h = !0; | |
break | |
} | |
} else | |
void 0 !== s && (s = void 0, | |
l = void 0); | |
p++ | |
} | |
if (h) { | |
if (n) | |
return !0; | |
if (p = i, | |
d = s, | |
c = t.charCodeAt(p), | |
u = t.charCodeAt(d - 1), | |
h = !1, | |
d - p > 2 && (c === o || c === r) && (u === o || u === r)) { | |
for (p++, | |
d--; p < d; ) { | |
if ((c = t.charCodeAt(p)) !== o && c !== r) { | |
h = !0; | |
break | |
} | |
p++ | |
} | |
!0 === h && (i++, | |
s--) | |
} | |
return e(t.slice(0, l))({ | |
type: "inlineCode", | |
value: t.slice(i, s) | |
}) | |
} | |
} | |
} | |
} | |
, | |
1616: (e,t,n)=>{ | |
"use strict"; | |
var i = n(1900) | |
, r = n(2115); | |
e.exports = function(e, t, n) { | |
var i, g, w, k, C, M, E, S, x = this, T = x.options.commonmark, D = 0, A = t.length, L = ""; | |
for (; D < A && ((k = t.charAt(D)) === u || k === c); ) | |
L += k, | |
D++; | |
if ((k = t.charAt(D)) !== h) | |
return; | |
D++, | |
L += k, | |
w = ""; | |
for (; D < A && (k = t.charAt(D)) !== d; ) | |
k === s && (w += k, | |
D++, | |
k = t.charAt(D)), | |
w += k, | |
D++; | |
if (!w || t.charAt(D) !== d || t.charAt(D + 1) !== m) | |
return; | |
M = w, | |
D = (L += w + d + m).length, | |
w = ""; | |
for (; D < A && ((k = t.charAt(D)) === c || k === u || k === l); ) | |
L += k, | |
D++; | |
if (k = t.charAt(D), | |
w = "", | |
i = L, | |
k === v) { | |
for (D++; D < A && y(k = t.charAt(D)); ) | |
w += k, | |
D++; | |
if ((k = t.charAt(D)) === y.delimiter) | |
L += v + w + k, | |
D++; | |
else { | |
if (T) | |
return; | |
D -= w.length + 1, | |
w = "" | |
} | |
} | |
if (!w) { | |
for (; D < A && b(k = t.charAt(D)); ) | |
w += k, | |
D++; | |
L += w | |
} | |
if (!w) | |
return; | |
E = w, | |
w = ""; | |
for (; D < A && ((k = t.charAt(D)) === c || k === u || k === l); ) | |
w += k, | |
D++; | |
k = t.charAt(D), | |
C = null, | |
k === o ? C = o : k === a ? C = a : k === p && (C = f); | |
if (C) { | |
if (!w) | |
return; | |
for (D = (L += w + k).length, | |
w = ""; D < A && (k = t.charAt(D)) !== C; ) { | |
if (k === l) { | |
if (D++, | |
(k = t.charAt(D)) === l || k === C) | |
return; | |
w += l | |
} | |
w += k, | |
D++ | |
} | |
if ((k = t.charAt(D)) !== C) | |
return; | |
g = L, | |
L += w + k, | |
D++, | |
S = w, | |
w = "" | |
} else | |
w = "", | |
D = L.length; | |
for (; D < A && ((k = t.charAt(D)) === c || k === u); ) | |
L += k, | |
D++; | |
if (!(k = t.charAt(D)) || k === l) | |
return !!n || (i = e(i).test().end, | |
E = x.decode.raw(x.unescape(E), i, { | |
nonTerminated: !1 | |
}), | |
S && (g = e(g).test().end, | |
S = x.decode.raw(x.unescape(S), g)), | |
e(L)({ | |
type: "definition", | |
identifier: r(M), | |
label: M, | |
title: S || null, | |
url: E | |
})) | |
} | |
; | |
var o = '"' | |
, a = "'" | |
, s = "\\" | |
, l = "\n" | |
, c = "\t" | |
, u = " " | |
, h = "[" | |
, d = "]" | |
, p = "(" | |
, f = ")" | |
, m = ":" | |
, v = "<" | |
, g = ">"; | |
function y(e) { | |
return e !== g && e !== h && e !== d | |
} | |
function b(e) { | |
return e !== h && e !== d && !i(e) | |
} | |
y.delimiter = g | |
} | |
, | |
1134: (e,t,n)=>{ | |
"use strict"; | |
var i = n(1900) | |
, r = n(1071); | |
e.exports = s, | |
s.locator = r; | |
var o = "~" | |
, a = "~~"; | |
function s(e, t, n) { | |
var r, s, l, c = "", u = "", h = "", d = ""; | |
if (this.options.gfm && t.charAt(0) === o && t.charAt(1) === o && !i(t.charAt(2))) | |
for (r = 1, | |
s = t.length, | |
(l = e.now()).column += 2, | |
l.offset += 2; ++r < s; ) { | |
if (!((c = t.charAt(r)) !== o || u !== o || h && i(h))) | |
return !!n || e(a + d + a)({ | |
type: "delete", | |
children: this.tokenizeInline(d, l) | |
}); | |
d += u, | |
h = u, | |
u = c | |
} | |
} | |
} | |
, | |
5657: (e,t,n)=>{ | |
"use strict"; | |
var i = n(3507) | |
, r = n(7092) | |
, o = n(741) | |
, a = n(2298); | |
e.exports = d, | |
d.locator = a, | |
d.notInLink = !0; | |
var s = 43 | |
, l = 45 | |
, c = 46 | |
, u = 64 | |
, h = 95; | |
function d(e, t, n) { | |
var a, d, p, f, m = this, v = m.options.gfm, g = m.inlineTokenizers, y = 0, b = t.length, w = -1; | |
if (v) { | |
for (a = t.charCodeAt(y); r(a) || o(a) || a === s || a === l || a === c || a === h; ) | |
a = t.charCodeAt(++y); | |
if (0 !== y && a === u) { | |
for (y++; y < b && (a = t.charCodeAt(y), | |
r(a) || o(a) || a === l || a === c || a === h); ) | |
y++, | |
-1 === w && a === c && (w = y); | |
if (-1 !== w && w !== y && a !== l && a !== h) | |
return a === c && y--, | |
d = t.slice(0, y), | |
!!n || (f = m.enterLink(), | |
m.inlineTokenizers = { | |
text: g.text | |
}, | |
p = m.tokenizeInline(d, e.now()), | |
m.inlineTokenizers = g, | |
f(), | |
e(d)({ | |
type: "link", | |
title: null, | |
url: "mailto:" + i(d, { | |
nonTerminated: !1 | |
}), | |
children: p | |
})) | |
} | |
} | |
} | |
} | |
, | |
439: (e,t,n)=>{ | |
"use strict"; | |
var i = n(4898) | |
, r = n(8257) | |
, o = n(1900) | |
, a = n(1030); | |
e.exports = u, | |
u.locator = a; | |
var s = "*" | |
, l = "_" | |
, c = "\\"; | |
function u(e, t, n) { | |
var a, u, h, d, p, f, m, v = 0, g = t.charAt(v); | |
if (!(g !== s && g !== l || (u = this.options.pedantic, | |
p = g, | |
h = g, | |
f = t.length, | |
v++, | |
d = "", | |
g = "", | |
u && o(t.charAt(v))))) | |
for (; v < f; ) { | |
if (m = g, | |
!((g = t.charAt(v)) !== h || u && o(m))) { | |
if ((g = t.charAt(++v)) !== h) { | |
if (!i(d) || m === h) | |
return; | |
if (!u && h === l && r(g)) { | |
d += h; | |
continue | |
} | |
return !!n || ((a = e.now()).column++, | |
a.offset++, | |
e(p + d + h)({ | |
type: "emphasis", | |
children: this.tokenizeInline(d, a) | |
})) | |
} | |
d += h | |
} | |
u || g !== c || (d += g, | |
g = t.charAt(++v)), | |
d += g, | |
v++ | |
} | |
} | |
} | |
, | |
470: (e,t,n)=>{ | |
"use strict"; | |
var i = n(3115); | |
e.exports = a, | |
a.locator = i; | |
var r = "\n" | |
, o = "\\"; | |
function a(e, t, n) { | |
var i, a; | |
if (t.charAt(0) === o && (i = t.charAt(1), | |
-1 !== this.escape.indexOf(i))) | |
return !!n || (a = i === r ? { | |
type: "break" | |
} : { | |
type: "text", | |
value: i | |
}, | |
e(o + i)(a)) | |
} | |
} | |
, | |
8469: e=>{ | |
"use strict"; | |
e.exports = function(e, a, s) { | |
var l, c, u, h = this.options.pedantic, d = a.length + 1, p = -1, f = e.now(), m = "", v = ""; | |
for (; ++p < d; ) { | |
if ((l = a.charAt(p)) !== i && l !== n) { | |
p--; | |
break | |
} | |
m += l | |
} | |
u = 0; | |
for (; ++p <= d; ) { | |
if ((l = a.charAt(p)) !== r) { | |
p--; | |
break | |
} | |
m += l, | |
u++ | |
} | |
if (u > o) | |
return; | |
if (!u || !h && a.charAt(p + 1) === r) | |
return; | |
d = a.length + 1, | |
c = ""; | |
for (; ++p < d; ) { | |
if ((l = a.charAt(p)) !== i && l !== n) { | |
p--; | |
break | |
} | |
c += l | |
} | |
if (!h && 0 === c.length && l && l !== t) | |
return; | |
if (s) | |
return !0; | |
m += c, | |
c = "", | |
v = ""; | |
for (; ++p < d && (l = a.charAt(p)) && l !== t; ) | |
if (l === i || l === n || l === r) { | |
for (; l === i || l === n; ) | |
c += l, | |
l = a.charAt(++p); | |
if (h || !v || c || l !== r) { | |
for (; l === r; ) | |
c += l, | |
l = a.charAt(++p); | |
for (; l === i || l === n; ) | |
c += l, | |
l = a.charAt(++p); | |
p-- | |
} else | |
v += l | |
} else | |
v += c + l, | |
c = ""; | |
return f.column += m.length, | |
f.offset += m.length, | |
e(m += v + c)({ | |
type: "heading", | |
depth: u, | |
children: this.tokenizeInline(v, f) | |
}) | |
} | |
; | |
var t = "\n" | |
, n = "\t" | |
, i = " " | |
, r = "#" | |
, o = 6 | |
} | |
, | |
8671: e=>{ | |
"use strict"; | |
e.exports = function(e, c, u) { | |
var h, d, p, f, m, v = e.now(), g = c.length, y = -1, b = ""; | |
for (; ++y < g; ) { | |
if ((p = c.charAt(y)) !== i || y >= a) { | |
y--; | |
break | |
} | |
b += p | |
} | |
h = "", | |
d = ""; | |
for (; ++y < g; ) { | |
if ((p = c.charAt(y)) === t) { | |
y--; | |
break | |
} | |
p === i || p === n ? d += p : (h += d + p, | |
d = "") | |
} | |
if (v.column += b.length, | |
v.offset += b.length, | |
b += h + d, | |
p = c.charAt(++y), | |
f = c.charAt(++y), | |
p !== t || f !== r && f !== o) | |
return; | |
b += p, | |
d = f, | |
m = f === r ? s : l; | |
for (; ++y < g; ) { | |
if ((p = c.charAt(y)) !== f) { | |
if (p !== t) | |
return; | |
y--; | |
break | |
} | |
d += p | |
} | |
if (u) | |
return !0; | |
return e(b + d)({ | |
type: "heading", | |
depth: m, | |
children: this.tokenizeInline(h, v) | |
}) | |
} | |
; | |
var t = "\n" | |
, n = "\t" | |
, i = " " | |
, r = "=" | |
, o = "-" | |
, a = 3 | |
, s = 1 | |
, l = 2 | |
} | |
, | |
8776: (e,t,n)=>{ | |
"use strict"; | |
var i = n(4839).X; | |
e.exports = function(e, t, n) { | |
var i, w, k, C, M, E, S, x = this.options.blocks.join("|"), T = new RegExp("^</?(" + x + ")(?=(\\s|/?>|$))","i"), D = t.length, A = 0, L = [[l, c, !0], [u, h, !0], [d, p, !0], [f, m, !0], [v, g, !0], [T, y, !0], [b, y, !1]]; | |
for (; A < D && ((C = t.charAt(A)) === r || C === o); ) | |
A++; | |
if (t.charAt(A) !== s) | |
return; | |
i = -1 === (i = t.indexOf(a, A + 1)) ? D : i, | |
w = t.slice(A, i), | |
k = -1, | |
M = L.length; | |
for (; ++k < M; ) | |
if (L[k][0].test(w)) { | |
E = L[k]; | |
break | |
} | |
if (!E) | |
return; | |
if (n) | |
return E[2]; | |
if (A = i, | |
!E[1].test(w)) | |
for (; A < D; ) { | |
if (i = -1 === (i = t.indexOf(a, A + 1)) ? D : i, | |
w = t.slice(A + 1, i), | |
E[1].test(w)) { | |
w && (A = i); | |
break | |
} | |
A = i | |
} | |
return S = t.slice(0, A), | |
e(S)({ | |
type: "html", | |
value: S | |
}) | |
} | |
; | |
var r = "\t" | |
, o = " " | |
, a = "\n" | |
, s = "<" | |
, l = /^<(script|pre|style)(?=(\s|>|$))/i | |
, c = /<\/(script|pre|style)>/i | |
, u = /^<!--/ | |
, h = /-->/ | |
, d = /^<\?/ | |
, p = /\?>/ | |
, f = /^<![A-Za-z]/ | |
, m = />/ | |
, v = /^<!\[CDATA\[/ | |
, g = /]]>/ | |
, y = /^$/ | |
, b = new RegExp(i.source + "\\s*$") | |
} | |
, | |
7648: (e,t,n)=>{ | |
"use strict"; | |
var i = n(741) | |
, r = n(1890) | |
, o = n(4839).T; | |
e.exports = d, | |
d.locator = r; | |
var a = "<" | |
, s = "?" | |
, l = "!" | |
, c = "/" | |
, u = /^<a /i | |
, h = /^<\/a>/i; | |
function d(e, t, n) { | |
var r, d, p = this, f = t.length; | |
if (!(t.charAt(0) !== a || f < 3) && (r = t.charAt(1), | |
(i(r) || r === s || r === l || r === c) && (d = t.match(o)))) | |
return !!n || (d = d[0], | |
!p.inLink && u.test(d) ? p.inLink = !0 : p.inLink && h.test(d) && (p.inLink = !1), | |
e(d)({ | |
type: "html", | |
value: d | |
})) | |
} | |
} | |
, | |
9405: (e,t,n)=>{ | |
"use strict"; | |
var i = n(1900) | |
, r = n(2356); | |
e.exports = g, | |
g.locator = r; | |
var o = "\n" | |
, a = "!" | |
, s = '"' | |
, l = "'" | |
, c = "(" | |
, u = ")" | |
, h = "<" | |
, d = ">" | |
, p = "[" | |
, f = "\\" | |
, m = "]" | |
, v = "`"; | |
function g(e, t, n) { | |
var r, g, y, b, w, k, C, M, E, S, x, T, D, A, L, P, I, F, O = this, B = "", N = 0, R = t.charAt(0), H = O.options.pedantic, V = O.options.commonmark, z = O.options.gfm; | |
if (R === a && (M = !0, | |
B = R, | |
R = t.charAt(++N)), | |
R === p && (M || !O.inLink)) { | |
for (B += R, | |
A = "", | |
N++, | |
x = t.length, | |
D = 0, | |
(P = e.now()).column += N, | |
P.offset += N; N < x; ) { | |
if (k = R = t.charAt(N), | |
R === v) { | |
for (g = 1; t.charAt(N + 1) === v; ) | |
k += R, | |
N++, | |
g++; | |
y ? g >= y && (y = 0) : y = g | |
} else if (R === f) | |
N++, | |
k += t.charAt(N); | |
else if (y && !z || R !== p) { | |
if ((!y || z) && R === m) { | |
if (!D) { | |
if (t.charAt(N + 1) !== c) | |
return; | |
k += c, | |
r = !0, | |
N++; | |
break | |
} | |
D-- | |
} | |
} else | |
D++; | |
A += k, | |
k = "", | |
N++ | |
} | |
if (r) { | |
for (E = A, | |
B += A + k, | |
N++; N < x && (R = t.charAt(N), | |
i(R)); ) | |
B += R, | |
N++; | |
if (A = "", | |
b = B, | |
(R = t.charAt(N)) === h) { | |
for (N++, | |
b += h; N < x && (R = t.charAt(N)) !== d; ) { | |
if (V && R === o) | |
return; | |
A += R, | |
N++ | |
} | |
if (t.charAt(N) !== d) | |
return; | |
B += h + A + d, | |
L = A, | |
N++ | |
} else { | |
for (R = null, | |
k = ""; N < x && (R = t.charAt(N), | |
!k || !(R === s || R === l || V && R === c)); ) { | |
if (i(R)) { | |
if (!H) | |
break; | |
k += R | |
} else { | |
if (R === c) | |
D++; | |
else if (R === u) { | |
if (0 === D) | |
break; | |
D-- | |
} | |
A += k, | |
k = "", | |
R === f && (A += f, | |
R = t.charAt(++N)), | |
A += R | |
} | |
N++ | |
} | |
L = A, | |
N = (B += A).length | |
} | |
for (A = ""; N < x && (R = t.charAt(N), | |
i(R)); ) | |
A += R, | |
N++; | |
if (R = t.charAt(N), | |
B += A, | |
A && (R === s || R === l || V && R === c)) | |
if (N++, | |
A = "", | |
S = R === c ? u : R, | |
w = B += R, | |
V) { | |
for (; N < x && (R = t.charAt(N)) !== S; ) | |
R === f && (A += f, | |
R = t.charAt(++N)), | |
N++, | |
A += R; | |
if ((R = t.charAt(N)) !== S) | |
return; | |
for (T = A, | |
B += A + R, | |
N++; N < x && (R = t.charAt(N), | |
i(R)); ) | |
B += R, | |
N++ | |
} else | |
for (k = ""; N < x; ) { | |
if ((R = t.charAt(N)) === S) | |
C && (A += S + k, | |
k = ""), | |
C = !0; | |
else if (C) { | |
if (R === u) { | |
B += A + S + k, | |
T = A; | |
break | |
} | |
i(R) ? k += R : (A += S + k + R, | |
k = "", | |
C = !1) | |
} else | |
A += R; | |
N++ | |
} | |
if (t.charAt(N) === u) | |
return !!n || (B += u, | |
L = O.decode.raw(O.unescape(L), e(b).test().end, { | |
nonTerminated: !1 | |
}), | |
T && (w = e(w).test().end, | |
T = O.decode.raw(O.unescape(T), w)), | |
F = { | |
type: M ? "image" : "link", | |
title: T || null, | |
url: L | |
}, | |
M ? F.alt = O.decode.raw(O.unescape(E), P) || null : (I = O.enterLink(), | |
F.children = O.tokenizeInline(E, P), | |
I()), | |
e(B)(F)) | |
} | |
} | |
} | |
} | |
, | |
745: (e,t,n)=>{ | |
"use strict"; | |
var i = n(4898) | |
, r = n(7092) | |
, o = n(6058) | |
, a = n(5540) | |
, s = n(6047); | |
e.exports = function(e, t, n) { | |
var o, a, y, b, w, k, C, E, S, x, T, D, A, L, P, I, F, O, B, N, R, H, V, z = this, q = z.options.commonmark, U = z.options.pedantic, _ = z.blockTokenizers, W = z.interruptList, j = 0, G = t.length, K = null, Y = !1; | |
for (; j < G && ((b = t.charAt(j)) === m || b === p); ) | |
j++; | |
if ((b = t.charAt(j)) === l || b === u || b === h) | |
w = b, | |
y = !1; | |
else { | |
for (y = !0, | |
a = ""; j < G && (b = t.charAt(j), | |
r(b)); ) | |
a += b, | |
j++; | |
if (b = t.charAt(j), | |
!a || !(b === d || q && b === v)) | |
return; | |
if (n && "1" !== a) | |
return; | |
K = parseInt(a, 10), | |
w = b | |
} | |
if ((b = t.charAt(++j)) !== p && b !== m && (U || b !== f && "" !== b)) | |
return; | |
if (n) | |
return !0; | |
j = 0, | |
L = [], | |
P = [], | |
I = []; | |
for (; j < G; ) { | |
for (C = j, | |
E = !1, | |
V = !1, | |
-1 === (k = t.indexOf(f, j)) && (k = G), | |
o = 0; j < G; ) { | |
if ((b = t.charAt(j)) === m) | |
o += g - o % g; | |
else { | |
if (b !== p) | |
break; | |
o++ | |
} | |
j++ | |
} | |
if (F && o >= F.indent && (V = !0), | |
b = t.charAt(j), | |
S = null, | |
!V) { | |
if (b === l || b === u || b === h) | |
S = b, | |
j++, | |
o++; | |
else { | |
for (a = ""; j < G && (b = t.charAt(j), | |
r(b)); ) | |
a += b, | |
j++; | |
b = t.charAt(j), | |
j++, | |
a && (b === d || q && b === v) && (S = b, | |
o += a.length + 1) | |
} | |
if (S) | |
if ((b = t.charAt(j)) === m) | |
o += g - o % g, | |
j++; | |
else if (b === p) { | |
for (H = j + g; j < H && t.charAt(j) === p; ) | |
j++, | |
o++; | |
j === H && t.charAt(j) === p && (j -= g - 1, | |
o -= g - 1) | |
} else | |
b !== f && "" !== b && (S = null) | |
} | |
if (S) { | |
if (!U && w !== S) | |
break; | |
E = !0 | |
} else | |
q || V || t.charAt(C) !== p ? q && F && (V = o >= F.indent || o > g) : V = !0, | |
E = !1, | |
j = C; | |
if (T = t.slice(C, k), | |
x = C === j ? T : t.slice(j, k), | |
(S === l || S === c || S === h) && _.thematicBreak.call(z, e, T, !0)) | |
break; | |
if (D = A, | |
A = !E && !i(x).length, | |
V && F) | |
F.value = F.value.concat(I, T), | |
P = P.concat(I, T), | |
I = []; | |
else if (E) | |
0 !== I.length && (Y = !0, | |
F.value.push(""), | |
F.trail = I.concat()), | |
F = { | |
value: [T], | |
indent: o, | |
trail: [] | |
}, | |
L.push(F), | |
P = P.concat(I, T), | |
I = []; | |
else if (A) { | |
if (D && !q) | |
break; | |
I.push(T) | |
} else { | |
if (D) | |
break; | |
if (s(W, _, z, [e, T, !0])) | |
break; | |
F.value = F.value.concat(I, T), | |
P = P.concat(I, T), | |
I = [] | |
} | |
j = k + 1 | |
} | |
N = e(P.join(f)).reset({ | |
type: "list", | |
ordered: y, | |
start: K, | |
spread: Y, | |
children: [] | |
}), | |
O = z.enterList(), | |
B = z.enterBlock(), | |
j = -1, | |
G = L.length; | |
for (; ++j < G; ) | |
F = L[j].value.join(f), | |
R = e.now(), | |
e(F)(M(z, F, R), N), | |
F = L[j].trail.join(f), | |
j !== G - 1 && (F += f), | |
e(F); | |
return O(), | |
B(), | |
N | |
} | |
; | |
var l = "*" | |
, c = "_" | |
, u = "+" | |
, h = "-" | |
, d = "." | |
, p = " " | |
, f = "\n" | |
, m = "\t" | |
, v = ")" | |
, g = 4 | |
, y = /\n\n(?!\s*$)/ | |
, b = /^\[(.)][ \t]/ | |
, w = /^([ \t]*)([*+-]|\d+[.)])( {1,4}(?! )| |\t|$|(?=\n))([^\n]*)/ | |
, k = /^([ \t]*)([*+-]|\d+[.)])([ \t]+)/ | |
, C = /^( {1,4}|\t)?/gm; | |
function M(e, t, n) { | |
var i, r, o = e.offset, a = null, s = null; | |
return t = (e.options.pedantic ? E : S).apply(null, arguments), | |
e.options.gfm && (i = t.match(b)) && (r = i[0].length, | |
a = " " !== i[1], | |
s = i[1], | |
o[n.line] += r, | |
t = t.slice(r)), | |
{ | |
type: "listItem", | |
spread: y.test(t), | |
checked: a, | |
checklist: s, | |
children: e.tokenizeBlock(t, n) | |
} | |
} | |
function E(e, t, n) { | |
var i = e.offset | |
, r = n.line; | |
return t = t.replace(k, o), | |
r = n.line, | |
t.replace(C, o); | |
function o(e) { | |
return i[r] = (i[r] || 0) + e.length, | |
r++, | |
"" | |
} | |
} | |
function S(e, t, n) { | |
var i, r, s, l, c, u, h, d = e.offset, m = n.line; | |
for (l = (t = t.replace(w, (function(e, t, n, o, a) { | |
r = t + n + o, | |
s = a, | |
Number(n) < 10 && r.length % 2 == 1 && (n = p + n); | |
return (i = t + p.repeat(n.length) + o) + s | |
} | |
))).split(f), | |
(c = a(t, o(i).indent).split(f))[0] = s, | |
d[m] = (d[m] || 0) + r.length, | |
m++, | |
u = 0, | |
h = l.length; ++u < h; ) | |
d[m] = (d[m] || 0) + l[u].length - c[u].length, | |
m++; | |
return c.join(f) | |
} | |
} | |
, | |
8607: (e,t,n)=>{ | |
"use strict"; | |
var i = n(4898) | |
, r = n(8813) | |
, o = n(6047); | |
e.exports = function(e, t, n) { | |
var u, h, d, p, f, m = this, v = m.options.commonmark, g = m.blockTokenizers, y = m.interruptParagraph, b = t.indexOf(s), w = t.length; | |
for (; b < w; ) { | |
if (-1 === b) { | |
b = w; | |
break | |
} | |
if (t.charAt(b + 1) === s) | |
break; | |
if (v) { | |
for (p = 0, | |
u = b + 1; u < w; ) { | |
if ((d = t.charAt(u)) === a) { | |
p = c; | |
break | |
} | |
if (d !== l) | |
break; | |
p++, | |
u++ | |
} | |
if (p >= c && d !== s) { | |
b = t.indexOf(s, b + 1); | |
continue | |
} | |
} | |
if (h = t.slice(b + 1), | |
o(y, g, m, [e, h, !0])) | |
break; | |
if (u = b, | |
-1 !== (b = t.indexOf(s, b + 1)) && "" === i(t.slice(u, b))) { | |
b = u; | |
break | |
} | |
} | |
if (h = t.slice(0, b), | |
n) | |
return !0; | |
return f = e.now(), | |
h = r(h), | |
e(h)({ | |
type: "paragraph", | |
children: m.tokenizeInline(h, f) | |
}) | |
} | |
; | |
var a = "\t" | |
, s = "\n" | |
, l = " " | |
, c = 4 | |
} | |
, | |
6252: (e,t,n)=>{ | |
"use strict"; | |
var i = n(1900) | |
, r = n(2356) | |
, o = n(2115); | |
e.exports = m, | |
m.locator = r; | |
var a = "link" | |
, s = "image" | |
, l = "shortcut" | |
, c = "collapsed" | |
, u = "full" | |
, h = "!" | |
, d = "[" | |
, p = "\\" | |
, f = "]"; | |
function m(e, t, n) { | |
var r, m, v, g, y, b, w, k, C = this, M = C.options.commonmark, E = t.charAt(0), S = 0, x = t.length, T = "", D = "", A = a, L = l; | |
if (E === h && (A = s, | |
D = E, | |
E = t.charAt(++S)), | |
E === d) { | |
for (S++, | |
D += E, | |
b = "", | |
k = 0; S < x; ) { | |
if ((E = t.charAt(S)) === d) | |
w = !0, | |
k++; | |
else if (E === f) { | |
if (!k) | |
break; | |
k-- | |
} | |
E === p && (b += p, | |
E = t.charAt(++S)), | |
b += E, | |
S++ | |
} | |
if (T = b, | |
r = b, | |
(E = t.charAt(S)) === f) { | |
if (S++, | |
T += E, | |
b = "", | |
!M) | |
for (; S < x && (E = t.charAt(S), | |
i(E)); ) | |
b += E, | |
S++; | |
if ((E = t.charAt(S)) === d) { | |
for (m = "", | |
b += E, | |
S++; S < x && (E = t.charAt(S)) !== d && E !== f; ) | |
E === p && (m += p, | |
E = t.charAt(++S)), | |
m += E, | |
S++; | |
(E = t.charAt(S)) === f ? (L = m ? u : c, | |
b += m + E, | |
S++) : m = "", | |
T += b, | |
b = "" | |
} else { | |
if (!r) | |
return; | |
m = r | |
} | |
if (L === u || !w) | |
return T = D + T, | |
A === a && C.inLink ? null : !!n || ((v = e.now()).column += D.length, | |
v.offset += D.length, | |
g = { | |
type: A + "Reference", | |
identifier: o(m = L === u ? m : r), | |
label: m, | |
referenceType: L | |
}, | |
A === a ? (y = C.enterLink(), | |
g.children = C.tokenizeInline(r, v), | |
y()) : g.alt = C.decode.raw(C.unescape(r), v) || null, | |
e(T)(g)) | |
} | |
} | |
} | |
} | |
, | |
5702: (e,t,n)=>{ | |
"use strict"; | |
var i = n(4898) | |
, r = n(1900) | |
, o = n(6451); | |
e.exports = c, | |
c.locator = o; | |
var a = "\\" | |
, s = "*" | |
, l = "_"; | |
function c(e, t, n) { | |
var o, c, u, h, d, p, f, m = 0, v = t.charAt(m); | |
if (!(v !== s && v !== l || t.charAt(++m) !== v || (c = this.options.pedantic, | |
d = (u = v) + u, | |
p = t.length, | |
m++, | |
h = "", | |
v = "", | |
c && r(t.charAt(m))))) | |
for (; m < p; ) { | |
if (f = v, | |
!((v = t.charAt(m)) !== u || t.charAt(m + 1) !== u || c && r(f)) && (v = t.charAt(m + 2)) !== u) { | |
if (!i(h)) | |
return; | |
return !!n || ((o = e.now()).column += 2, | |
o.offset += 2, | |
e(d + h + d)({ | |
type: "strong", | |
children: this.tokenizeInline(h, o) | |
})) | |
} | |
c || v !== a || (h += v, | |
v = t.charAt(++m)), | |
h += v, | |
m++ | |
} | |
} | |
} | |
, | |
7793: (e,t,n)=>{ | |
"use strict"; | |
var i = n(1900); | |
e.exports = function(e, t, n) { | |
var r, a, g, y, b, w, k, C, M, E, S, x, T, D, A, L, P, I, F, O, B, N; | |
if (!this.options.gfm) | |
return; | |
r = 0, | |
A = 0, | |
w = t.length + 1, | |
k = []; | |
for (; r < w; ) { | |
if (F = t.indexOf(o, r), | |
O = t.indexOf(u, r + 1), | |
-1 === F && (F = t.length), | |
-1 === O || O > F) { | |
if (A < d) | |
return; | |
break | |
} | |
if (L = t.slice(r, F), | |
0 === A) | |
N = L[0] !== u; | |
else if (N && L[0] === u || !N && L[0] !== u) | |
break; | |
k.push(L), | |
A++, | |
r = F + 1 | |
} | |
y = k.join(o), | |
a = k.splice(1, 1)[0] || [], | |
r = 0, | |
w = a.length, | |
A--, | |
g = !1, | |
S = []; | |
for (; r < w; ) { | |
if ((M = a.charAt(r)) === u) { | |
if (E = null, | |
!1 === g) { | |
if (!1 === B) | |
return | |
} else | |
S.push(g), | |
g = !1; | |
B = !1 | |
} else if (M === s) | |
E = !0, | |
g = g || null; | |
else if (M === l) | |
g = g === p ? f : E && null === g ? m : p; | |
else if (!i(M)) | |
return; | |
r++ | |
} | |
!1 !== g && S.push(g); | |
if (S.length < h) | |
return; | |
if (n) | |
return !0; | |
D = -1, | |
P = [], | |
I = e(y).reset({ | |
type: "table", | |
align: S, | |
children: P | |
}); | |
for (; ++D < A; ) { | |
for (L = k[D], | |
b = { | |
type: "tableRow", | |
children: [] | |
}, | |
D && e(o), | |
e(L).reset(b, I), | |
w = L.length + 1, | |
r = 0, | |
C = "", | |
x = "", | |
T = !0; r < w; ) { | |
if ("" === (M = L.charAt(r)) || M === u) | |
if (T) | |
e(M); | |
else { | |
if ((x || M) && !T) { | |
y = x, | |
C.length > 1 && (M ? (y += C.slice(0, -1), | |
C = C.charAt(C.length - 1)) : (y += C, | |
C = "")); | |
let t = v(y) | |
, {start: n, end: i} = t | |
, r = y.slice(n, y.length - i) | |
, o = e.now(); | |
o.offset += n, | |
o.column += n, | |
e(y)({ | |
type: "tableCell", | |
padding: t, | |
children: this.tokenizeInline(r, o) | |
}, b) | |
} | |
e(C + M), | |
C = "", | |
x = "" | |
} | |
else | |
C && (x += C, | |
C = ""), | |
x += M, | |
M === c && r !== w - 2 && (x += L.charAt(r + 1), | |
r++); | |
T = !1, | |
r++ | |
} | |
D || e(o + a) | |
} | |
return I | |
} | |
; | |
var r = "\t" | |
, o = "\n" | |
, a = " " | |
, s = "-" | |
, l = ":" | |
, c = "\\" | |
, u = "|" | |
, h = 1 | |
, d = 2 | |
, p = "left" | |
, f = "center" | |
, m = "right"; | |
function v(e) { | |
let t = 0 | |
, n = 0; | |
for (let n = 0, i = e.length; n < i; n++) { | |
let i = e[n]; | |
if (i !== r && i !== a) | |
break; | |
t += 1 | |
} | |
for (let i = e.length - 1; i >= t; i--) { | |
let t = e[i]; | |
if (t !== r && t !== a) | |
break; | |
n += 1 | |
} | |
return { | |
start: t, | |
end: n | |
} | |
} | |
} | |
, | |
4410: e=>{ | |
"use strict"; | |
e.exports = function(e, t, n) { | |
var i, r, o, a, s, l, c, u, h, d, p = this; | |
if (n) | |
return !0; | |
i = p.inlineMethods, | |
a = i.length, | |
r = p.inlineTokenizers, | |
o = -1, | |
h = t.length; | |
for (; ++o < a; ) | |
"text" !== (u = i[o]) && r[u] && ((c = r[u].locator) || e.file.fail("Missing locator: `" + u + "`"), | |
-1 !== (l = c.call(p, t, 1)) && l < h && (h = l)); | |
s = t.slice(0, h), | |
d = e.now(), | |
p.decode(s, d, (function(t, n, i) { | |
e(i || t)({ | |
type: "text", | |
value: t | |
}) | |
} | |
)) | |
} | |
} | |
, | |
6968: e=>{ | |
"use strict"; | |
e.exports = function(e, l, c) { | |
var u, h, d, p, f = -1, m = l.length + 1, v = ""; | |
for (; ++f < m && ((u = l.charAt(f)) === t || u === i); ) | |
v += u; | |
if (u !== r && u !== o && u !== a) | |
return; | |
h = u, | |
v += u, | |
d = 1, | |
p = ""; | |
for (; ++f < m; ) | |
if ((u = l.charAt(f)) === h) | |
d++, | |
v += p + h, | |
p = ""; | |
else { | |
if (u !== i) | |
return d >= s && (!u || u === n) ? (v += p, | |
!!c || e(v)({ | |
type: "thematicBreak" | |
})) : void 0; | |
p += u | |
} | |
} | |
; | |
var t = "\t" | |
, n = "\n" | |
, i = " " | |
, r = "*" | |
, o = "-" | |
, a = "_" | |
, s = 3 | |
} | |
, | |
1944: (e,t,n)=>{ | |
"use strict"; | |
var i = n(7122) | |
, r = n(3507) | |
, o = n(7092) | |
, a = n(741) | |
, s = n(1900) | |
, l = n(4307); | |
e.exports = E, | |
E.locator = l, | |
E.notInLink = !0; | |
var c = 33 | |
, u = 38 | |
, h = 41 | |
, d = 42 | |
, p = 44 | |
, f = 45 | |
, m = 46 | |
, v = 58 | |
, g = 59 | |
, y = 63 | |
, b = 60 | |
, w = 95 | |
, k = 126 | |
, C = "(" | |
, M = ")"; | |
function E(e, t, n) { | |
var l, E, S, x, T, D, A, L, P, I, F, O, B, N, R = this, H = R.options.gfm, V = R.inlineTokenizers, z = t.length, q = -1, U = !1; | |
if (H) { | |
if ("www." === t.slice(0, 4)) | |
U = !0, | |
x = 4; | |
else if ("http://" === t.slice(0, 7).toLowerCase()) | |
x = 7; | |
else { | |
if ("https://" !== t.slice(0, 8).toLowerCase()) | |
return; | |
x = 8 | |
} | |
for (q = x - 1, | |
S = x, | |
l = []; x < z; ) | |
if ((A = t.charCodeAt(x)) !== m) { | |
if (!o(A) && !a(A) && A !== f && A !== w) | |
break; | |
x++ | |
} else { | |
if (q === x - 1) | |
break; | |
l.push(x), | |
q = x, | |
x++ | |
} | |
if (A === m && (l.pop(), | |
x--), | |
void 0 !== l[0] && (E = l.length < 2 ? S : l[l.length - 2] + 1, | |
-1 === t.slice(E, x).indexOf("_"))) { | |
if (n) | |
return !0; | |
for (L = x, | |
T = x; x < z && (A = t.charCodeAt(x), | |
!s(A) && A !== b); ) | |
x++, | |
A === c || A === d || A === p || A === m || A === v || A === y || A === w || A === k || (L = x); | |
if (x = L, | |
t.charCodeAt(x - 1) === h) | |
for (D = t.slice(T, x), | |
P = i(D, C), | |
I = i(D, M); I > P; ) | |
x = T + D.lastIndexOf(M), | |
D = t.slice(T, x), | |
I--; | |
if (t.charCodeAt(x - 1) === g && (x--, | |
a(t.charCodeAt(x - 1)))) { | |
for (L = x - 2; a(t.charCodeAt(L)); ) | |
L--; | |
t.charCodeAt(L) === u && (x = L) | |
} | |
return F = t.slice(0, x), | |
B = r(F, { | |
nonTerminated: !1 | |
}), | |
U && (B = "http://" + B), | |
N = R.enterLink(), | |
R.inlineTokenizers = { | |
text: V.text | |
}, | |
O = R.tokenizeInline(F, e.now()), | |
R.inlineTokenizers = V, | |
N(), | |
e(F)({ | |
type: "link", | |
title: null, | |
url: B, | |
children: O | |
}) | |
} | |
} | |
} | |
} | |
, | |
7269: e=>{ | |
"use strict"; | |
function t(e) { | |
var t, n; | |
return "text" !== e.type || !e.position || (t = e.position.start, | |
n = e.position.end, | |
t.line !== n.line || n.column - t.column === e.value.length) | |
} | |
function n(e, t) { | |
return e.value += t.value, | |
e | |
} | |
function i(e, t) { | |
return this.options.commonmark || this.options.gfm ? t : (e.children = e.children.concat(t.children), | |
e) | |
} | |
e.exports = function(e) { | |
return function(r, o) { | |
var a, s, l, c, u, h = this, d = h.offset, p = [], f = h[e + "Methods"], m = h[e + "Tokenizers"], v = o.line, g = o.column; | |
if (!r) | |
return p; | |
S.now = w, | |
S.file = h.file, | |
y(""); | |
for (; r; ) { | |
for (a = -1, | |
s = f.length, | |
c = !1; ++a < s && (!(l = m[f[a]]) || l.onlyAtStart && !h.atStart || l.notInList && h.inList || l.notInBlock && h.inBlock || l.notInLink && h.inLink || (u = r.length, | |
l.apply(h, [S, r]), | |
!(c = u !== r.length))); ) | |
; | |
c || h.file.fail(new Error("Infinite loop"), S.now()) | |
} | |
return h.eof = w(), | |
p; | |
function y(e) { | |
for (var t = -1, n = e.indexOf("\n"); -1 !== n; ) | |
v++, | |
t = n, | |
n = e.indexOf("\n", n + 1); | |
-1 === t ? g += e.length : g = e.length - t, | |
v in d && (-1 !== t ? g += d[v] : g <= d[v] && (g = d[v] + 1)) | |
} | |
function b() { | |
var e = [] | |
, t = v + 1; | |
return function() { | |
for (var n = v + 1; t < n; ) | |
e.push((d[t] || 0) + 1), | |
t++; | |
return e | |
} | |
} | |
function w() { | |
var e = { | |
line: v, | |
column: g | |
}; | |
return e.offset = h.toOffset(e), | |
e | |
} | |
function k(e) { | |
this.start = e, | |
this.end = w() | |
} | |
function C(e) { | |
r.slice(0, e.length) !== e && h.file.fail(new Error("Incorrectly eaten value: please report this warning on https://git.io/vg5Ft"), w()) | |
} | |
function M() { | |
var e = w(); | |
return t; | |
function t(t, n) { | |
var i = t.position | |
, r = i ? i.start : e | |
, o = [] | |
, a = i && i.end.line | |
, s = e.line; | |
if (t.position = new k(r), | |
i && n && i.indent) { | |
if (o = i.indent, | |
a < s) { | |
for (; ++a < s; ) | |
o.push((d[a] || 0) + 1); | |
o.push(e.column) | |
} | |
n = o.concat(n) | |
} | |
return t.position.indent = n || [], | |
t | |
} | |
} | |
function E(e, r) { | |
var o = r ? r.children : p | |
, a = o[o.length - 1]; | |
return a && e.type === a.type && ("text" === e.type || "blockquote" === e.type) && t(a) && t(e) && (e = ("text" === e.type ? n : i).call(h, a, e)), | |
e !== a && o.push(e), | |
e | |
} | |
function S(e) { | |
var t = b() | |
, n = M() | |
, i = w(); | |
C(e), | |
a.reset = s, | |
s.test = l, | |
a.test = l, | |
r = r.slice(e.length), | |
y(e); | |
let o = h.atStart; | |
return h.atStart && 0 !== e.length && h.exitStart(), | |
t = t(), | |
a; | |
function a(e, i) { | |
return n(E(n(e), i), t) | |
} | |
function s() { | |
var t = a.apply(null, arguments); | |
return v = i.line, | |
g = i.column, | |
r = e + r, | |
h.atStart = o, | |
t | |
} | |
function l() { | |
var t = n({}); | |
return v = i.line, | |
g = i.column, | |
r = e + r, | |
t.position | |
} | |
} | |
} | |
} | |
} | |
, | |
9359: e=>{ | |
"use strict"; | |
e.exports = function(e, n) { | |
return function(i) { | |
var r, o = 0, a = i.indexOf(t), s = e[n], l = []; | |
for (; -1 !== a; ) | |
l.push(i.slice(o, a)), | |
o = a + 1, | |
(r = i.charAt(o)) && -1 !== s.indexOf(r) || l.push(t), | |
a = i.indexOf(t, o + 1); | |
return l.push(i.slice(o)), | |
l.join("") | |
} | |
} | |
; | |
var t = "\\" | |
} | |
, | |
7122: e=>{ | |
"use strict"; | |
e.exports = function(e, t) { | |
var n, i = String(e), r = 0; | |
if ("string" != typeof t) | |
throw new Error("Expected character"); | |
n = i.indexOf(t); | |
for (; -1 !== n; ) | |
r++, | |
n = i.indexOf(t, n + t.length); | |
return r | |
} | |
} | |
, | |
9510: e=>{ | |
"use strict"; | |
e.exports = function(e) { | |
return String(e).replace(/\s+/g, " ") | |
} | |
} | |
, | |
6058: e=>{ | |
"use strict"; | |
e.exports = function(e) { | |
var o, a = 0, s = 0, l = e.charAt(a), c = {}, u = 0; | |
for (; l === t || l === n; ) { | |
for (s += o = l === t ? r : i, | |
o > 1 && (s = Math.floor(s / o) * o); u < s; ) | |
c[++u] = a; | |
l = e.charAt(++a) | |
} | |
return { | |
indent: s, | |
stops: c | |
} | |
} | |
; | |
var t = "\t" | |
, n = " " | |
, i = 1 | |
, r = 4 | |
} | |
, | |
4839: (e,t)=>{ | |
"use strict"; | |
var n = "<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\u0000-\\u0020]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>" | |
, i = "<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>"; | |
t.X = new RegExp("^(?:" + n + "|" + i + ")"), | |
t.T = new RegExp("^(?:" + n + "|" + i + "|\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e|<[?].*?[?]>|<![A-Za-z]+\\s+[^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)") | |
} | |
, | |
6047: e=>{ | |
"use strict"; | |
e.exports = function(e, t, n, i) { | |
var r, o, a = e.length, s = -1; | |
for (; ++s < a; ) | |
if ((void 0 === (o = (r = e[s])[1] || {}).pedantic || o.pedantic === n.options.pedantic) && (void 0 === o.commonmark || o.commonmark === n.options.commonmark) && t[r[0]].apply(n, i)) | |
return !0; | |
return !1 | |
} | |
} | |
, | |
741: e=>{ | |
"use strict"; | |
e.exports = function(e) { | |
var t = "string" == typeof e ? e.charCodeAt(0) : e; | |
return t >= 97 && t <= 122 || t >= 65 && t <= 90 | |
} | |
} | |
, | |
7092: e=>{ | |
"use strict"; | |
e.exports = function(e) { | |
var t = "string" == typeof e ? e.charCodeAt(0) : e; | |
return t >= 48 && t <= 57 | |
} | |
} | |
, | |
1900: e=>{ | |
"use strict"; | |
e.exports = function(e) { | |
return n.test("number" == typeof e ? t(e) : e.charAt(0)) | |
} | |
; | |
var t = String.fromCharCode | |
, n = /\s/ | |
} | |
, | |
8257: e=>{ | |
"use strict"; | |
e.exports = function(e) { | |
return n.test("number" == typeof e ? t(e) : e.charAt(0)) | |
} | |
; | |
var t = String.fromCharCode | |
, n = /\w/ | |
} | |
, | |
4982: e=>{ | |
"use strict"; | |
e.exports = r; | |
var t = ["\\", "`", "*", "{", "}", "[", "]", "(", ")", "#", "+", "-", ".", "!", "_", ">"] | |
, n = t.concat(["~", "|"]) | |
, i = n.concat(["\n", '"', "$", "%", "&", "'", ",", "/", ":", ";", "<", "=", "?", "@", "^"]); | |
function r(e) { | |
var r = e || {}; | |
return r.commonmark ? i : r.gfm ? n : t | |
} | |
r.default = t, | |
r.gfm = n, | |
r.commonmark = i | |
} | |
, | |
2115: (e,t,n)=>{ | |
"use strict"; | |
var i = n(9510); | |
e.exports = function(e) { | |
return i(e).toLowerCase() | |
} | |
} | |
, | |
5540: (e,t,n)=>{ | |
"use strict"; | |
var i = n(4898) | |
, r = n(6058); | |
e.exports = function(e, t) { | |
var n, l, c, u = e.split(o), h = u.length + 1, d = 1 / 0, p = []; | |
u.unshift(a.repeat(t) + s); | |
for (; h--; ) | |
if (l = r(u[h]), | |
p[h] = l.stops, | |
0 !== i(u[h]).length) { | |
if (!l.indent) { | |
d = 1 / 0; | |
break | |
} | |
l.indent > 0 && l.indent < d && (d = l.indent) | |
} | |
if (d !== 1 / 0) | |
for (h = u.length; h--; ) { | |
for (c = p[h], | |
n = d; n && !(n in c); ) | |
n--; | |
u[h] = u[h].slice(c[n] + 1) | |
} | |
return u.shift(), | |
u.join(o) | |
} | |
; | |
var o = "\n" | |
, a = " " | |
, s = "!" | |
} | |
, | |
9546: e=>{ | |
"use strict"; | |
e.exports = function(e, t, n) { | |
return function() { | |
var i = n || this | |
, r = i[e]; | |
return i[e] = !t, | |
o; | |
function o() { | |
i[e] = r | |
} | |
} | |
} | |
} | |
, | |
8813: e=>{ | |
"use strict"; | |
e.exports = function(e) { | |
return String(e).replace(/\n+$/, "") | |
} | |
} | |
, | |
4898: (e,t)=>{ | |
(t = e.exports = function(e) { | |
return e.replace(/^\s*|\s*$/g, "") | |
} | |
).left = function(e) { | |
return e.replace(/^\s*/, "") | |
} | |
, | |
t.right = function(e) { | |
return e.replace(/\s*$/, "") | |
} | |
} | |
, | |
7057: e=>{ | |
e.exports = function() { | |
for (var e = {}, n = 0; n < arguments.length; n++) { | |
var i = arguments[n]; | |
for (var r in i) | |
t.call(i, r) && (e[r] = i[r]) | |
} | |
return e | |
} | |
; | |
var t = Object.prototype.hasOwnProperty | |
} | |
, | |
9710: e=>{ | |
"use strict"; | |
e.exports = JSON.parse('{"nbsp":" ","iexcl":"¡","cent":"¢","pound":"£","curren":"¤","yen":"¥","brvbar":"¦","sect":"§","uml":"¨","copy":"©","ordf":"ª","laquo":"«","not":"¬","shy":"","reg":"®","macr":"¯","deg":"°","plusmn":"±","sup2":"²","sup3":"³","acute":"´","micro":"µ","para":"¶","middot":"·","cedil":"¸","sup1":"¹","ordm":"º","raquo":"»","frac14":"¼","frac12":"½","frac34":"¾","iquest":"¿","Agrave":"À","Aacute":"Á","Acirc":"Â","Atilde":"Ã","Auml":"Ä","Aring":"Å","AElig":"Æ","Ccedil":"Ç","Egrave":"È","Eacute":"É","Ecirc":"Ê","Euml":"Ë","Igrave":"Ì","Iacute":"Í","Icirc":"Î","Iuml":"Ï","ETH":"Ð","Ntilde":"Ñ","Ograve":"Ò","Oacute":"Ó","Ocirc":"Ô","Otilde":"Õ","Ouml":"Ö","times":"×","Oslash":"Ø","Ugrave":"Ù","Uacute":"Ú","Ucirc":"Û","Uuml":"Ü","Yacute":"Ý","THORN":"Þ","szlig":"ß","agrave":"à","aacute":"á","acirc":"â","atilde":"ã","auml":"ä","aring":"å","aelig":"æ","ccedil":"ç","egrave":"è","eacute":"é","ecirc":"ê","euml":"ë","igrave":"ì","iacute":"í","icirc":"î","iuml":"ï","eth":"ð","ntilde":"ñ","ograve":"ò","oacute":"ó","ocirc":"ô","otilde":"õ","ouml":"ö","divide":"÷","oslash":"ø","ugrave":"ù","uacute":"ú","ucirc":"û","uuml":"ü","yacute":"ý","thorn":"þ","yuml":"ÿ","fnof":"ƒ","Alpha":"Α","Beta":"Β","Gamma":"Γ","Delta":"Δ","Epsilon":"Ε","Zeta":"Ζ","Eta":"Η","Theta":"Θ","Iota":"Ι","Kappa":"Κ","Lambda":"Λ","Mu":"Μ","Nu":"Ν","Xi":"Ξ","Omicron":"Ο","Pi":"Π","Rho":"Ρ","Sigma":"Σ","Tau":"Τ","Upsilon":"Υ","Phi":"Φ","Chi":"Χ","Psi":"Ψ","Omega":"Ω","alpha":"α","beta":"β","gamma":"γ","delta":"δ","epsilon":"ε","zeta":"ζ","eta":"η","theta":"θ","iota":"ι","kappa":"κ","lambda":"λ","mu":"μ","nu":"ν","xi":"ξ","omicron":"ο","pi":"π","rho":"ρ","sigmaf":"ς","sigma":"σ","tau":"τ","upsilon":"υ","phi":"φ","chi":"χ","psi":"ψ","omega":"ω","thetasym":"ϑ","upsih":"ϒ","piv":"ϖ","bull":"•","hellip":"…","prime":"′","Prime":"″","oline":"‾","frasl":"⁄","weierp":"℘","image":"ℑ","real":"ℜ","trade":"™","alefsym":"ℵ","larr":"←","uarr":"↑","rarr":"→","darr":"↓","harr":"↔","crarr":"↵","lArr":"⇐","uArr":"⇑","rArr":"⇒","dArr":"⇓","hArr":"⇔","forall":"∀","part":"∂","exist":"∃","empty":"∅","nabla":"∇","isin":"∈","notin":"∉","ni":"∋","prod":"∏","sum":"∑","minus":"−","lowast":"∗","radic":"√","prop":"∝","infin":"∞","ang":"∠","and":"∧","or":"∨","cap":"∩","cup":"∪","int":"∫","there4":"∴","sim":"∼","cong":"≅","asymp":"≈","ne":"≠","equiv":"≡","le":"≤","ge":"≥","sub":"⊂","sup":"⊃","nsub":"⊄","sube":"⊆","supe":"⊇","oplus":"⊕","otimes":"⊗","perp":"⊥","sdot":"⋅","lceil":"⌈","rceil":"⌉","lfloor":"⌊","rfloor":"⌋","lang":"〈","rang":"〉","loz":"◊","spades":"♠","clubs":"♣","hearts":"♥","diams":"♦","quot":"\\"","amp":"&","lt":"<","gt":">","OElig":"Œ","oelig":"œ","Scaron":"Š","scaron":"š","Yuml":"Ÿ","circ":"ˆ","tilde":"˜","ensp":" ","emsp":" ","thinsp":" ","zwnj":"","zwj":"","lrm":"","rlm":"","ndash":"–","mdash":"—","lsquo":"‘","rsquo":"’","sbquo":"‚","ldquo":"“","rdquo":"”","bdquo":"„","dagger":"†","Dagger":"‡","permil":"‰","lsaquo":"‹","rsaquo":"›","euro":"€"}') | |
} | |
, | |
4472: e=>{ | |
"use strict"; | |
e.exports = JSON.parse('{"AElig":"Æ","AMP":"&","Aacute":"Á","Acirc":"Â","Agrave":"À","Aring":"Å","Atilde":"Ã","Auml":"Ä","COPY":"©","Ccedil":"Ç","ETH":"Ð","Eacute":"É","Ecirc":"Ê","Egrave":"È","Euml":"Ë","GT":">","Iacute":"Í","Icirc":"Î","Igrave":"Ì","Iuml":"Ï","LT":"<","Ntilde":"Ñ","Oacute":"Ó","Ocirc":"Ô","Ograve":"Ò","Oslash":"Ø","Otilde":"Õ","Ouml":"Ö","QUOT":"\\"","REG":"®","THORN":"Þ","Uacute":"Ú","Ucirc":"Û","Ugrave":"Ù","Uuml":"Ü","Yacute":"Ý","aacute":"á","acirc":"â","acute":"´","aelig":"æ","agrave":"à","amp":"&","aring":"å","atilde":"ã","auml":"ä","brvbar":"¦","ccedil":"ç","cedil":"¸","cent":"¢","copy":"©","curren":"¤","deg":"°","divide":"÷","eacute":"é","ecirc":"ê","egrave":"è","eth":"ð","euml":"ë","frac12":"½","frac14":"¼","frac34":"¾","gt":">","iacute":"í","icirc":"î","iexcl":"¡","igrave":"ì","iquest":"¿","iuml":"ï","laquo":"«","lt":"<","macr":"¯","micro":"µ","middot":"·","nbsp":" ","not":"¬","ntilde":"ñ","oacute":"ó","ocirc":"ô","ograve":"ò","ordf":"ª","ordm":"º","oslash":"ø","otilde":"õ","ouml":"ö","para":"¶","plusmn":"±","pound":"£","quot":"\\"","raquo":"»","reg":"®","sect":"§","shy":"","sup1":"¹","sup2":"²","sup3":"³","szlig":"ß","thorn":"þ","times":"×","uacute":"ú","ucirc":"û","ugrave":"ù","uml":"¨","uuml":"ü","yacute":"ý","yen":"¥","yuml":"ÿ"}') | |
} | |
, | |
5115: e=>{ | |
"use strict"; | |
e.exports = JSON.parse('{"AEli":"Æ","AElig":"Æ","AM":"&","AMP":"&","Aacut":"Á","Aacute":"Á","Abreve":"Ă","Acir":"Â","Acirc":"Â","Acy":"А","Afr":"𝔄","Agrav":"À","Agrave":"À","Alpha":"Α","Amacr":"Ā","And":"⩓","Aogon":"Ą","Aopf":"𝔸","ApplyFunction":"","Arin":"Å","Aring":"Å","Ascr":"𝒜","Assign":"≔","Atild":"Ã","Atilde":"Ã","Aum":"Ä","Auml":"Ä","Backslash":"∖","Barv":"⫧","Barwed":"⌆","Bcy":"Б","Because":"∵","Bernoullis":"ℬ","Beta":"Β","Bfr":"𝔅","Bopf":"𝔹","Breve":"˘","Bscr":"ℬ","Bumpeq":"≎","CHcy":"Ч","COP":"©","COPY":"©","Cacute":"Ć","Cap":"⋒","CapitalDifferentialD":"ⅅ","Cayleys":"ℭ","Ccaron":"Č","Ccedi":"Ç","Ccedil":"Ç","Ccirc":"Ĉ","Cconint":"∰","Cdot":"Ċ","Cedilla":"¸","CenterDot":"·","Cfr":"ℭ","Chi":"Χ","CircleDot":"⊙","CircleMinus":"⊖","CirclePlus":"⊕","CircleTimes":"⊗","ClockwiseContourIntegral":"∲","CloseCurlyDoubleQuote":"”","CloseCurlyQuote":"’","Colon":"∷","Colone":"⩴","Congruent":"≡","Conint":"∯","ContourIntegral":"∮","Copf":"ℂ","Coproduct":"∐","CounterClockwiseContourIntegral":"∳","Cross":"⨯","Cscr":"𝒞","Cup":"⋓","CupCap":"≍","DD":"ⅅ","DDotrahd":"⤑","DJcy":"Ђ","DScy":"Ѕ","DZcy":"Џ","Dagger":"‡","Darr":"↡","Dashv":"⫤","Dcaron":"Ď","Dcy":"Д","Del":"∇","Delta":"Δ","Dfr":"𝔇","DiacriticalAcute":"´","DiacriticalDot":"˙","DiacriticalDoubleAcute":"˝","DiacriticalGrave":"`","DiacriticalTilde":"˜","Diamond":"⋄","DifferentialD":"ⅆ","Dopf":"𝔻","Dot":"¨","DotDot":"⃜","DotEqual":"≐","DoubleContourIntegral":"∯","DoubleDot":"¨","DoubleDownArrow":"⇓","DoubleLeftArrow":"⇐","DoubleLeftRightArrow":"⇔","DoubleLeftTee":"⫤","DoubleLongLeftArrow":"⟸","DoubleLongLeftRightArrow":"⟺","DoubleLongRightArrow":"⟹","DoubleRightArrow":"⇒","DoubleRightTee":"⊨","DoubleUpArrow":"⇑","DoubleUpDownArrow":"⇕","DoubleVerticalBar":"∥","DownArrow":"↓","DownArrowBar":"⤓","DownArrowUpArrow":"⇵","DownBreve":"̑","DownLeftRightVector":"⥐","DownLeftTeeVector":"⥞","DownLeftVector":"↽","DownLeftVectorBar":"⥖","DownRightTeeVector":"⥟","DownRightVector":"⇁","DownRightVectorBar":"⥗","DownTee":"⊤","DownTeeArrow":"↧","Downarrow":"⇓","Dscr":"𝒟","Dstrok":"Đ","ENG":"Ŋ","ET":"Ð","ETH":"Ð","Eacut":"É","Eacute":"É","Ecaron":"Ě","Ecir":"Ê","Ecirc":"Ê","Ecy":"Э","Edot":"Ė","Efr":"𝔈","Egrav":"È","Egrave":"È","Element":"∈","Emacr":"Ē","EmptySmallSquare":"◻","EmptyVerySmallSquare":"▫","Eogon":"Ę","Eopf":"𝔼","Epsilon":"Ε","Equal":"⩵","EqualTilde":"≂","Equilibrium":"⇌","Escr":"ℰ","Esim":"⩳","Eta":"Η","Eum":"Ë","Euml":"Ë","Exists":"∃","ExponentialE":"ⅇ","Fcy":"Ф","Ffr":"𝔉","FilledSmallSquare":"◼","FilledVerySmallSquare":"▪","Fopf":"𝔽","ForAll":"∀","Fouriertrf":"ℱ","Fscr":"ℱ","GJcy":"Ѓ","G":">","GT":">","Gamma":"Γ","Gammad":"Ϝ","Gbreve":"Ğ","Gcedil":"Ģ","Gcirc":"Ĝ","Gcy":"Г","Gdot":"Ġ","Gfr":"𝔊","Gg":"⋙","Gopf":"𝔾","GreaterEqual":"≥","GreaterEqualLess":"⋛","GreaterFullEqual":"≧","GreaterGreater":"⪢","GreaterLess":"≷","GreaterSlantEqual":"⩾","GreaterTilde":"≳","Gscr":"𝒢","Gt":"≫","HARDcy":"Ъ","Hacek":"ˇ","Hat":"^","Hcirc":"Ĥ","Hfr":"ℌ","HilbertSpace":"ℋ","Hopf":"ℍ","HorizontalLine":"─","Hscr":"ℋ","Hstrok":"Ħ","HumpDownHump":"≎","HumpEqual":"≏","IEcy":"Е","IJlig":"IJ","IOcy":"Ё","Iacut":"Í","Iacute":"Í","Icir":"Î","Icirc":"Î","Icy":"И","Idot":"İ","Ifr":"ℑ","Igrav":"Ì","Igrave":"Ì","Im":"ℑ","Imacr":"Ī","ImaginaryI":"ⅈ","Implies":"⇒","Int":"∬","Integral":"∫","Intersection":"⋂","InvisibleComma":"","InvisibleTimes":"","Iogon":"Į","Iopf":"𝕀","Iota":"Ι","Iscr":"ℐ","Itilde":"Ĩ","Iukcy":"І","Ium":"Ï","Iuml":"Ï","Jcirc":"Ĵ","Jcy":"Й","Jfr":"𝔍","Jopf":"𝕁","Jscr":"𝒥","Jsercy":"Ј","Jukcy":"Є","KHcy":"Х","KJcy":"Ќ","Kappa":"Κ","Kcedil":"Ķ","Kcy":"К","Kfr":"𝔎","Kopf":"𝕂","Kscr":"𝒦","LJcy":"Љ","L":"<","LT":"<","Lacute":"Ĺ","Lambda":"Λ","Lang":"⟪","Laplacetrf":"ℒ","Larr":"↞","Lcaron":"Ľ","Lcedil":"Ļ","Lcy":"Л","LeftAngleBracket":"⟨","LeftArrow":"←","LeftArrowBar":"⇤","LeftArrowRightArrow":"⇆","LeftCeiling":"⌈","LeftDoubleBracket":"⟦","LeftDownTeeVector":"⥡","LeftDownVector":"⇃","LeftDownVectorBar":"⥙","LeftFloor":"⌊","LeftRightArrow":"↔","LeftRightVector":"⥎","LeftTee":"⊣","LeftTeeArrow":"↤","LeftTeeVector":"⥚","LeftTriangle":"⊲","LeftTriangleBar":"⧏","LeftTriangleEqual":"⊴","LeftUpDownVector":"⥑","LeftUpTeeVector":"⥠","LeftUpVector":"↿","LeftUpVectorBar":"⥘","LeftVector":"↼","LeftVectorBar":"⥒","Leftarrow":"⇐","Leftrightarrow":"⇔","LessEqualGreater":"⋚","LessFullEqual":"≦","LessGreater":"≶","LessLess":"⪡","LessSlantEqual":"⩽","LessTilde":"≲","Lfr":"𝔏","Ll":"⋘","Lleftarrow":"⇚","Lmidot":"Ŀ","LongLeftArrow":"⟵","LongLeftRightArrow":"⟷","LongRightArrow":"⟶","Longleftarrow":"⟸","Longleftrightarrow":"⟺","Longrightarrow":"⟹","Lopf":"𝕃","LowerLeftArrow":"↙","LowerRightArrow":"↘","Lscr":"ℒ","Lsh":"↰","Lstrok":"Ł","Lt":"≪","Map":"⤅","Mcy":"М","MediumSpace":" ","Mellintrf":"ℳ","Mfr":"𝔐","MinusPlus":"∓","Mopf":"𝕄","Mscr":"ℳ","Mu":"Μ","NJcy":"Њ","Nacute":"Ń","Ncaron":"Ň","Ncedil":"Ņ","Ncy":"Н","NegativeMediumSpace":"","NegativeThickSpace":"","NegativeThinSpace":"","NegativeVeryThinSpace":"","NestedGreaterGreater":"≫","NestedLessLess":"≪","NewLine":"\\n","Nfr":"𝔑","NoBreak":"","NonBreakingSpace":" ","Nopf":"ℕ","Not":"⫬","NotCongruent":"≢","NotCupCap":"≭","NotDoubleVerticalBar":"∦","NotElement":"∉","NotEqual":"≠","NotEqualTilde":"≂̸","NotExists":"∄","NotGreater":"≯","NotGreaterEqual":"≱","NotGreaterFullEqual":"≧̸","NotGreaterGreater":"≫̸","NotGreaterLess":"≹","NotGreaterSlantEqual":"⩾̸","NotGreaterTilde":"≵","NotHumpDownHump":"≎̸","NotHumpEqual":"≏̸","NotLeftTriangle":"⋪","NotLeftTriangleBar":"⧏̸","NotLeftTriangleEqual":"⋬","NotLess":"≮","NotLessEqual":"≰","NotLessGreater":"≸","NotLessLess":"≪̸","NotLessSlantEqual":"⩽̸","NotLessTilde":"≴","NotNestedGreaterGreater":"⪢̸","NotNestedLessLess":"⪡̸","NotPrecedes":"⊀","NotPrecedesEqual":"⪯̸","NotPrecedesSlantEqual":"⋠","NotReverseElement":"∌","NotRightTriangle":"⋫","NotRightTriangleBar":"⧐̸","NotRightTriangleEqual":"⋭","NotSquareSubset":"⊏̸","NotSquareSubsetEqual":"⋢","NotSquareSuperset":"⊐̸","NotSquareSupersetEqual":"⋣","NotSubset":"⊂⃒","NotSubsetEqual":"⊈","NotSucceeds":"⊁","NotSucceedsEqual":"⪰̸","NotSucceedsSlantEqual":"⋡","NotSucceedsTilde":"≿̸","NotSuperset":"⊃⃒","NotSupersetEqual":"⊉","NotTilde":"≁","NotTildeEqual":"≄","NotTildeFullEqual":"≇","NotTildeTilde":"≉","NotVerticalBar":"∤","Nscr":"𝒩","Ntild":"Ñ","Ntilde":"Ñ","Nu":"Ν","OElig":"Œ","Oacut":"Ó","Oacute":"Ó","Ocir":"Ô","Ocirc":"Ô","Ocy":"О","Odblac":"Ő","Ofr":"𝔒","Ograv":"Ò","Ograve":"Ò","Omacr":"Ō","Omega":"Ω","Omicron":"Ο","Oopf":"𝕆","OpenCurlyDoubleQuote":"“","OpenCurlyQuote":"‘","Or":"⩔","Oscr":"𝒪","Oslas":"Ø","Oslash":"Ø","Otild":"Õ","Otilde":"Õ","Otimes":"⨷","Oum":"Ö","Ouml":"Ö","OverBar":"‾","OverBrace":"⏞","OverBracket":"⎴","OverParenthesis":"⏜","PartialD":"∂","Pcy":"П","Pfr":"𝔓","Phi":"Φ","Pi":"Π","PlusMinus":"±","Poincareplane":"ℌ","Popf":"ℙ","Pr":"⪻","Precedes":"≺","PrecedesEqual":"⪯","PrecedesSlantEqual":"≼","PrecedesTilde":"≾","Prime":"″","Product":"∏","Proportion":"∷","Proportional":"∝","Pscr":"𝒫","Psi":"Ψ","QUO":"\\"","QUOT":"\\"","Qfr":"𝔔","Qopf":"ℚ","Qscr":"𝒬","RBarr":"⤐","RE":"®","REG":"®","Racute":"Ŕ","Rang":"⟫","Rarr":"↠","Rarrtl":"⤖","Rcaron":"Ř","Rcedil":"Ŗ","Rcy":"Р","Re":"ℜ","ReverseElement":"∋","ReverseEquilibrium":"⇋","ReverseUpEquilibrium":"⥯","Rfr":"ℜ","Rho":"Ρ","RightAngleBracket":"⟩","RightArrow":"→","RightArrowBar":"⇥","RightArrowLeftArrow":"⇄","RightCeiling":"⌉","RightDoubleBracket":"⟧","RightDownTeeVector":"⥝","RightDownVector":"⇂","RightDownVectorBar":"⥕","RightFloor":"⌋","RightTee":"⊢","RightTeeArrow":"↦","RightTeeVector":"⥛","RightTriangle":"⊳","RightTriangleBar":"⧐","RightTriangleEqual":"⊵","RightUpDownVector":"⥏","RightUpTeeVector":"⥜","RightUpVector":"↾","RightUpVectorBar":"⥔","RightVector":"⇀","RightVectorBar":"⥓","Rightarrow":"⇒","Ropf":"ℝ","RoundImplies":"⥰","Rrightarrow":"⇛","Rscr":"ℛ","Rsh":"↱","RuleDelayed":"⧴","SHCHcy":"Щ","SHcy":"Ш","SOFTcy":"Ь","Sacute":"Ś","Sc":"⪼","Scaron":"Š","Scedil":"Ş","Scirc":"Ŝ","Scy":"С","Sfr":"𝔖","ShortDownArrow":"↓","ShortLeftArrow":"←","ShortRightArrow":"→","ShortUpArrow":"↑","Sigma":"Σ","SmallCircle":"∘","Sopf":"𝕊","Sqrt":"√","Square":"□","SquareIntersection":"⊓","SquareSubset":"⊏","SquareSubsetEqual":"⊑","SquareSuperset":"⊐","SquareSupersetEqual":"⊒","SquareUnion":"⊔","Sscr":"𝒮","Star":"⋆","Sub":"⋐","Subset":"⋐","SubsetEqual":"⊆","Succeeds":"≻","SucceedsEqual":"⪰","SucceedsSlantEqual":"≽","SucceedsTilde":"≿","SuchThat":"∋","Sum":"∑","Sup":"⋑","Superset":"⊃","SupersetEqual":"⊇","Supset":"⋑","THOR":"Þ","THORN":"Þ","TRADE":"™","TSHcy":"Ћ","TScy":"Ц","Tab":"\\t","Tau":"Τ","Tcaron":"Ť","Tcedil":"Ţ","Tcy":"Т","Tfr":"𝔗","Therefore":"∴","Theta":"Θ","ThickSpace":" ","ThinSpace":" ","Tilde":"∼","TildeEqual":"≃","TildeFullEqual":"≅","TildeTilde":"≈","Topf":"𝕋","TripleDot":"⃛","Tscr":"𝒯","Tstrok":"Ŧ","Uacut":"Ú","Uacute":"Ú","Uarr":"↟","Uarrocir":"⥉","Ubrcy":"Ў","Ubreve":"Ŭ","Ucir":"Û","Ucirc":"Û","Ucy":"У","Udblac":"Ű","Ufr":"𝔘","Ugrav":"Ù","Ugrave":"Ù","Umacr":"Ū","UnderBar":"_","UnderBrace":"⏟","UnderBracket":"⎵","UnderParenthesis":"⏝","Union":"⋃","UnionPlus":"⊎","Uogon":"Ų","Uopf":"𝕌","UpArrow":"↑","UpArrowBar":"⤒","UpArrowDownArrow":"⇅","UpDownArrow":"↕","UpEquilibrium":"⥮","UpTee":"⊥","UpTeeArrow":"↥","Uparrow":"⇑","Updownarrow":"⇕","UpperLeftArrow":"↖","UpperRightArrow":"↗","Upsi":"ϒ","Upsilon":"Υ","Uring":"Ů","Uscr":"𝒰","Utilde":"Ũ","Uum":"Ü","Uuml":"Ü","VDash":"⊫","Vbar":"⫫","Vcy":"В","Vdash":"⊩","Vdashl":"⫦","Vee":"⋁","Verbar":"‖","Vert":"‖","VerticalBar":"∣","VerticalLine":"|","VerticalSeparator":"❘","VerticalTilde":"≀","VeryThinSpace":" ","Vfr":"𝔙","Vopf":"𝕍","Vscr":"𝒱","Vvdash":"⊪","Wcirc":"Ŵ","Wedge":"⋀","Wfr":"𝔚","Wopf":"𝕎","Wscr":"𝒲","Xfr":"𝔛","Xi":"Ξ","Xopf":"𝕏","Xscr":"𝒳","YAcy":"Я","YIcy":"Ї","YUcy":"Ю","Yacut":"Ý","Yacute":"Ý","Ycirc":"Ŷ","Ycy":"Ы","Yfr":"𝔜","Yopf":"𝕐","Yscr":"𝒴","Yuml":"Ÿ","ZHcy":"Ж","Zacute":"Ź","Zcaron":"Ž","Zcy":"З","Zdot":"Ż","ZeroWidthSpace":"","Zeta":"Ζ","Zfr":"ℨ","Zopf":"ℤ","Zscr":"𝒵","aacut":"á","aacute":"á","abreve":"ă","ac":"∾","acE":"∾̳","acd":"∿","acir":"â","acirc":"â","acut":"´","acute":"´","acy":"а","aeli":"æ","aelig":"æ","af":"","afr":"𝔞","agrav":"à","agrave":"à","alefsym":"ℵ","aleph":"ℵ","alpha":"α","amacr":"ā","amalg":"⨿","am":"&","amp":"&","and":"∧","andand":"⩕","andd":"⩜","andslope":"⩘","andv":"⩚","ang":"∠","ange":"⦤","angle":"∠","angmsd":"∡","angmsdaa":"⦨","angmsdab":"⦩","angmsdac":"⦪","angmsdad":"⦫","angmsdae":"⦬","angmsdaf":"⦭","angmsdag":"⦮","angmsdah":"⦯","angrt":"∟","angrtvb":"⊾","angrtvbd":"⦝","angsph":"∢","angst":"Å","angzarr":"⍼","aogon":"ą","aopf":"𝕒","ap":"≈","apE":"⩰","apacir":"⩯","ape":"≊","apid":"≋","apos":"\'","approx":"≈","approxeq":"≊","arin":"å","aring":"å","ascr":"𝒶","ast":"*","asymp":"≈","asympeq":"≍","atild":"ã","atilde":"ã","aum":"ä","auml":"ä","awconint":"∳","awint":"⨑","bNot":"⫭","backcong":"≌","backepsilon":"϶","backprime":"‵","backsim":"∽","backsimeq":"⋍","barvee":"⊽","barwed":"⌅","barwedge":"⌅","bbrk":"⎵","bbrktbrk":"⎶","bcong":"≌","bcy":"б","bdquo":"„","becaus":"∵","because":"∵","bemptyv":"⦰","bepsi":"϶","bernou":"ℬ","beta":"β","beth":"ℶ","between":"≬","bfr":"𝔟","bigcap":"⋂","bigcirc":"◯","bigcup":"⋃","bigodot":"⨀","bigoplus":"⨁","bigotimes":"⨂","bigsqcup":"⨆","bigstar":"★","bigtriangledown":"▽","bigtriangleup":"△","biguplus":"⨄","bigvee":"⋁","bigwedge":"⋀","bkarow":"⤍","blacklozenge":"⧫","blacksquare":"▪","blacktriangle":"▴","blacktriangledown":"▾","blacktriangleleft":"◂","blacktriangleright":"▸","blank":"␣","blk12":"▒","blk14":"░","blk34":"▓","block":"█","bne":"=⃥","bnequiv":"≡⃥","bnot":"⌐","bopf":"𝕓","bot":"⊥","bottom":"⊥","bowtie":"⋈","boxDL":"╗","boxDR":"╔","boxDl":"╖","boxDr":"╓","boxH":"═","boxHD":"╦","boxHU":"╩","boxHd":"╤","boxHu":"╧","boxUL":"╝","boxUR":"╚","boxUl":"╜","boxUr":"╙","boxV":"║","boxVH":"╬","boxVL":"╣","boxVR":"╠","boxVh":"╫","boxVl":"╢","boxVr":"╟","boxbox":"⧉","boxdL":"╕","boxdR":"╒","boxdl":"┐","boxdr":"┌","boxh":"─","boxhD":"╥","boxhU":"╨","boxhd":"┬","boxhu":"┴","boxminus":"⊟","boxplus":"⊞","boxtimes":"⊠","boxuL":"╛","boxuR":"╘","boxul":"┘","boxur":"└","boxv":"│","boxvH":"╪","boxvL":"╡","boxvR":"╞","boxvh":"┼","boxvl":"┤","boxvr":"├","bprime":"‵","breve":"˘","brvba":"¦","brvbar":"¦","bscr":"𝒷","bsemi":"⁏","bsim":"∽","bsime":"⋍","bsol":"\\\\","bsolb":"⧅","bsolhsub":"⟈","bull":"•","bullet":"•","bump":"≎","bumpE":"⪮","bumpe":"≏","bumpeq":"≏","cacute":"ć","cap":"∩","capand":"⩄","capbrcup":"⩉","capcap":"⩋","capcup":"⩇","capdot":"⩀","caps":"∩︀","caret":"⁁","caron":"ˇ","ccaps":"⩍","ccaron":"č","ccedi":"ç","ccedil":"ç","ccirc":"ĉ","ccups":"⩌","ccupssm":"⩐","cdot":"ċ","cedi":"¸","cedil":"¸","cemptyv":"⦲","cen":"¢","cent":"¢","centerdot":"·","cfr":"𝔠","chcy":"ч","check":"✓","checkmark":"✓","chi":"χ","cir":"○","cirE":"⧃","circ":"ˆ","circeq":"≗","circlearrowleft":"↺","circlearrowright":"↻","circledR":"®","circledS":"Ⓢ","circledast":"⊛","circledcirc":"⊚","circleddash":"⊝","cire":"≗","cirfnint":"⨐","cirmid":"⫯","cirscir":"⧂","clubs":"♣","clubsuit":"♣","colon":":","colone":"≔","coloneq":"≔","comma":",","commat":"@","comp":"∁","compfn":"∘","complement":"∁","complexes":"ℂ","cong":"≅","congdot":"⩭","conint":"∮","copf":"𝕔","coprod":"∐","cop":"©","copy":"©","copysr":"℗","crarr":"↵","cross":"✗","cscr":"𝒸","csub":"⫏","csube":"⫑","csup":"⫐","csupe":"⫒","ctdot":"⋯","cudarrl":"⤸","cudarrr":"⤵","cuepr":"⋞","cuesc":"⋟","cularr":"↶","cularrp":"⤽","cup":"∪","cupbrcap":"⩈","cupcap":"⩆","cupcup":"⩊","cupdot":"⊍","cupor":"⩅","cups":"∪︀","curarr":"↷","curarrm":"⤼","curlyeqprec":"⋞","curlyeqsucc":"⋟","curlyvee":"⋎","curlywedge":"⋏","curre":"¤","curren":"¤","curvearrowleft":"↶","curvearrowright":"↷","cuvee":"⋎","cuwed":"⋏","cwconint":"∲","cwint":"∱","cylcty":"⌭","dArr":"⇓","dHar":"⥥","dagger":"†","daleth":"ℸ","darr":"↓","dash":"‐","dashv":"⊣","dbkarow":"⤏","dblac":"˝","dcaron":"ď","dcy":"д","dd":"ⅆ","ddagger":"‡","ddarr":"⇊","ddotseq":"⩷","de":"°","deg":"°","delta":"δ","demptyv":"⦱","dfisht":"⥿","dfr":"𝔡","dharl":"⇃","dharr":"⇂","diam":"⋄","diamond":"⋄","diamondsuit":"♦","diams":"♦","die":"¨","digamma":"ϝ","disin":"⋲","div":"÷","divid":"÷","divide":"÷","divideontimes":"⋇","divonx":"⋇","djcy":"ђ","dlcorn":"⌞","dlcrop":"⌍","dollar":"$","dopf":"𝕕","dot":"˙","doteq":"≐","doteqdot":"≑","dotminus":"∸","dotplus":"∔","dotsquare":"⊡","doublebarwedge":"⌆","downarrow":"↓","downdownarrows":"⇊","downharpoonleft":"⇃","downharpoonright":"⇂","drbkarow":"⤐","drcorn":"⌟","drcrop":"⌌","dscr":"𝒹","dscy":"ѕ","dsol":"⧶","dstrok":"đ","dtdot":"⋱","dtri":"▿","dtrif":"▾","duarr":"⇵","duhar":"⥯","dwangle":"⦦","dzcy":"џ","dzigrarr":"⟿","eDDot":"⩷","eDot":"≑","eacut":"é","eacute":"é","easter":"⩮","ecaron":"ě","ecir":"ê","ecirc":"ê","ecolon":"≕","ecy":"э","edot":"ė","ee":"ⅇ","efDot":"≒","efr":"𝔢","eg":"⪚","egrav":"è","egrave":"è","egs":"⪖","egsdot":"⪘","el":"⪙","elinters":"⏧","ell":"ℓ","els":"⪕","elsdot":"⪗","emacr":"ē","empty":"∅","emptyset":"∅","emptyv":"∅","emsp13":" ","emsp14":" ","emsp":" ","eng":"ŋ","ensp":" ","eogon":"ę","eopf":"𝕖","epar":"⋕","eparsl":"⧣","eplus":"⩱","epsi":"ε","epsilon":"ε","epsiv":"ϵ","eqcirc":"≖","eqcolon":"≕","eqsim":"≂","eqslantgtr":"⪖","eqslantless":"⪕","equals":"=","equest":"≟","equiv":"≡","equivDD":"⩸","eqvparsl":"⧥","erDot":"≓","erarr":"⥱","escr":"ℯ","esdot":"≐","esim":"≂","eta":"η","et":"ð","eth":"ð","eum":"ë","euml":"ë","euro":"€","excl":"!","exist":"∃","expectation":"ℰ","exponentiale":"ⅇ","fallingdotseq":"≒","fcy":"ф","female":"♀","ffilig":"ffi","fflig":"ff","ffllig":"ffl","ffr":"𝔣","filig":"fi","fjlig":"fj","flat":"♭","fllig":"fl","fltns":"▱","fnof":"ƒ","fopf":"𝕗","forall":"∀","fork":"⋔","forkv":"⫙","fpartint":"⨍","frac1":"¼","frac12":"½","frac13":"⅓","frac14":"¼","frac15":"⅕","frac16":"⅙","frac18":"⅛","frac23":"⅔","frac25":"⅖","frac3":"¾","frac34":"¾","frac35":"⅗","frac38":"⅜","frac45":"⅘","frac56":"⅚","frac58":"⅝","frac78":"⅞","frasl":"⁄","frown":"⌢","fscr":"𝒻","gE":"≧","gEl":"⪌","gacute":"ǵ","gamma":"γ","gammad":"ϝ","gap":"⪆","gbreve":"ğ","gcirc":"ĝ","gcy":"г","gdot":"ġ","ge":"≥","gel":"⋛","geq":"≥","geqq":"≧","geqslant":"⩾","ges":"⩾","gescc":"⪩","gesdot":"⪀","gesdoto":"⪂","gesdotol":"⪄","gesl":"⋛︀","gesles":"⪔","gfr":"𝔤","gg":"≫","ggg":"⋙","gimel":"ℷ","gjcy":"ѓ","gl":"≷","glE":"⪒","gla":"⪥","glj":"⪤","gnE":"≩","gnap":"⪊","gnapprox":"⪊","gne":"⪈","gneq":"⪈","gneqq":"≩","gnsim":"⋧","gopf":"𝕘","grave":"`","gscr":"ℊ","gsim":"≳","gsime":"⪎","gsiml":"⪐","g":">","gt":">","gtcc":"⪧","gtcir":"⩺","gtdot":"⋗","gtlPar":"⦕","gtquest":"⩼","gtrapprox":"⪆","gtrarr":"⥸","gtrdot":"⋗","gtreqless":"⋛","gtreqqless":"⪌","gtrless":"≷","gtrsim":"≳","gvertneqq":"≩︀","gvnE":"≩︀","hArr":"⇔","hairsp":" ","half":"½","hamilt":"ℋ","hardcy":"ъ","harr":"↔","harrcir":"⥈","harrw":"↭","hbar":"ℏ","hcirc":"ĥ","hearts":"♥","heartsuit":"♥","hellip":"…","hercon":"⊹","hfr":"𝔥","hksearow":"⤥","hkswarow":"⤦","hoarr":"⇿","homtht":"∻","hookleftarrow":"↩","hookrightarrow":"↪","hopf":"𝕙","horbar":"―","hscr":"𝒽","hslash":"ℏ","hstrok":"ħ","hybull":"⁃","hyphen":"‐","iacut":"í","iacute":"í","ic":"","icir":"î","icirc":"î","icy":"и","iecy":"е","iexc":"¡","iexcl":"¡","iff":"⇔","ifr":"𝔦","igrav":"ì","igrave":"ì","ii":"ⅈ","iiiint":"⨌","iiint":"∭","iinfin":"⧜","iiota":"℩","ijlig":"ij","imacr":"ī","image":"ℑ","imagline":"ℐ","imagpart":"ℑ","imath":"ı","imof":"⊷","imped":"Ƶ","in":"∈","incare":"℅","infin":"∞","infintie":"⧝","inodot":"ı","int":"∫","intcal":"⊺","integers":"ℤ","intercal":"⊺","intlarhk":"⨗","intprod":"⨼","iocy":"ё","iogon":"į","iopf":"𝕚","iota":"ι","iprod":"⨼","iques":"¿","iquest":"¿","iscr":"𝒾","isin":"∈","isinE":"⋹","isindot":"⋵","isins":"⋴","isinsv":"⋳","isinv":"∈","it":"","itilde":"ĩ","iukcy":"і","ium":"ï","iuml":"ï","jcirc":"ĵ","jcy":"й","jfr":"𝔧","jmath":"ȷ","jopf":"𝕛","jscr":"𝒿","jsercy":"ј","jukcy":"є","kappa":"κ","kappav":"ϰ","kcedil":"ķ","kcy":"к","kfr":"𝔨","kgreen":"ĸ","khcy":"х","kjcy":"ќ","kopf":"𝕜","kscr":"𝓀","lAarr":"⇚","lArr":"⇐","lAtail":"⤛","lBarr":"⤎","lE":"≦","lEg":"⪋","lHar":"⥢","lacute":"ĺ","laemptyv":"⦴","lagran":"ℒ","lambda":"λ","lang":"⟨","langd":"⦑","langle":"⟨","lap":"⪅","laqu":"«","laquo":"«","larr":"←","larrb":"⇤","larrbfs":"⤟","larrfs":"⤝","larrhk":"↩","larrlp":"↫","larrpl":"⤹","larrsim":"⥳","larrtl":"↢","lat":"⪫","latail":"⤙","late":"⪭","lates":"⪭︀","lbarr":"⤌","lbbrk":"❲","lbrace":"{","lbrack":"[","lbrke":"⦋","lbrksld":"⦏","lbrkslu":"⦍","lcaron":"ľ","lcedil":"ļ","lceil":"⌈","lcub":"{","lcy":"л","ldca":"⤶","ldquo":"“","ldquor":"„","ldrdhar":"⥧","ldrushar":"⥋","ldsh":"↲","le":"≤","leftarrow":"←","leftarrowtail":"↢","leftharpoondown":"↽","leftharpoonup":"↼","leftleftarrows":"⇇","leftrightarrow":"↔","leftrightarrows":"⇆","leftrightharpoons":"⇋","leftrightsquigarrow":"↭","leftthreetimes":"⋋","leg":"⋚","leq":"≤","leqq":"≦","leqslant":"⩽","les":"⩽","lescc":"⪨","lesdot":"⩿","lesdoto":"⪁","lesdotor":"⪃","lesg":"⋚︀","lesges":"⪓","lessapprox":"⪅","lessdot":"⋖","lesseqgtr":"⋚","lesseqqgtr":"⪋","lessgtr":"≶","lesssim":"≲","lfisht":"⥼","lfloor":"⌊","lfr":"𝔩","lg":"≶","lgE":"⪑","lhard":"↽","lharu":"↼","lharul":"⥪","lhblk":"▄","ljcy":"љ","ll":"≪","llarr":"⇇","llcorner":"⌞","llhard":"⥫","lltri":"◺","lmidot":"ŀ","lmoust":"⎰","lmoustache":"⎰","lnE":"≨","lnap":"⪉","lnapprox":"⪉","lne":"⪇","lneq":"⪇","lneqq":"≨","lnsim":"⋦","loang":"⟬","loarr":"⇽","lobrk":"⟦","longleftarrow":"⟵","longleftrightarrow":"⟷","longmapsto":"⟼","longrightarrow":"⟶","looparrowleft":"↫","looparrowright":"↬","lopar":"⦅","lopf":"𝕝","loplus":"⨭","lotimes":"⨴","lowast":"∗","lowbar":"_","loz":"◊","lozenge":"◊","lozf":"⧫","lpar":"(","lparlt":"⦓","lrarr":"⇆","lrcorner":"⌟","lrhar":"⇋","lrhard":"⥭","lrm":"","lrtri":"⊿","lsaquo":"‹","lscr":"𝓁","lsh":"↰","lsim":"≲","lsime":"⪍","lsimg":"⪏","lsqb":"[","lsquo":"‘","lsquor":"‚","lstrok":"ł","l":"<","lt":"<","ltcc":"⪦","ltcir":"⩹","ltdot":"⋖","lthree":"⋋","ltimes":"⋉","ltlarr":"⥶","ltquest":"⩻","ltrPar":"⦖","ltri":"◃","ltrie":"⊴","ltrif":"◂","lurdshar":"⥊","luruhar":"⥦","lvertneqq":"≨︀","lvnE":"≨︀","mDDot":"∺","mac":"¯","macr":"¯","male":"♂","malt":"✠","maltese":"✠","map":"↦","mapsto":"↦","mapstodown":"↧","mapstoleft":"↤","mapstoup":"↥","marker":"▮","mcomma":"⨩","mcy":"м","mdash":"—","measuredangle":"∡","mfr":"𝔪","mho":"℧","micr":"µ","micro":"µ","mid":"∣","midast":"*","midcir":"⫰","middo":"·","middot":"·","minus":"−","minusb":"⊟","minusd":"∸","minusdu":"⨪","mlcp":"⫛","mldr":"…","mnplus":"∓","models":"⊧","mopf":"𝕞","mp":"∓","mscr":"𝓂","mstpos":"∾","mu":"μ","multimap":"⊸","mumap":"⊸","nGg":"⋙̸","nGt":"≫⃒","nGtv":"≫̸","nLeftarrow":"⇍","nLeftrightarrow":"⇎","nLl":"⋘̸","nLt":"≪⃒","nLtv":"≪̸","nRightarrow":"⇏","nVDash":"⊯","nVdash":"⊮","nabla":"∇","nacute":"ń","nang":"∠⃒","nap":"≉","napE":"⩰̸","napid":"≋̸","napos":"ʼn","napprox":"≉","natur":"♮","natural":"♮","naturals":"ℕ","nbs":" ","nbsp":" ","nbump":"≎̸","nbumpe":"≏̸","ncap":"⩃","ncaron":"ň","ncedil":"ņ","ncong":"≇","ncongdot":"⩭̸","ncup":"⩂","ncy":"н","ndash":"–","ne":"≠","neArr":"⇗","nearhk":"⤤","nearr":"↗","nearrow":"↗","nedot":"≐̸","nequiv":"≢","nesear":"⤨","nesim":"≂̸","nexist":"∄","nexists":"∄","nfr":"𝔫","ngE":"≧̸","nge":"≱","ngeq":"≱","ngeqq":"≧̸","ngeqslant":"⩾̸","nges":"⩾̸","ngsim":"≵","ngt":"≯","ngtr":"≯","nhArr":"⇎","nharr":"↮","nhpar":"⫲","ni":"∋","nis":"⋼","nisd":"⋺","niv":"∋","njcy":"њ","nlArr":"⇍","nlE":"≦̸","nlarr":"↚","nldr":"‥","nle":"≰","nleftarrow":"↚","nleftrightarrow":"↮","nleq":"≰","nleqq":"≦̸","nleqslant":"⩽̸","nles":"⩽̸","nless":"≮","nlsim":"≴","nlt":"≮","nltri":"⋪","nltrie":"⋬","nmid":"∤","nopf":"𝕟","no":"¬","not":"¬","notin":"∉","notinE":"⋹̸","notindot":"⋵̸","notinva":"∉","notinvb":"⋷","notinvc":"⋶","notni":"∌","notniva":"∌","notnivb":"⋾","notnivc":"⋽","npar":"∦","nparallel":"∦","nparsl":"⫽⃥","npart":"∂̸","npolint":"⨔","npr":"⊀","nprcue":"⋠","npre":"⪯̸","nprec":"⊀","npreceq":"⪯̸","nrArr":"⇏","nrarr":"↛","nrarrc":"⤳̸","nrarrw":"↝̸","nrightarrow":"↛","nrtri":"⋫","nrtrie":"⋭","nsc":"⊁","nsccue":"⋡","nsce":"⪰̸","nscr":"𝓃","nshortmid":"∤","nshortparallel":"∦","nsim":"≁","nsime":"≄","nsimeq":"≄","nsmid":"∤","nspar":"∦","nsqsube":"⋢","nsqsupe":"⋣","nsub":"⊄","nsubE":"⫅̸","nsube":"⊈","nsubset":"⊂⃒","nsubseteq":"⊈","nsubseteqq":"⫅̸","nsucc":"⊁","nsucceq":"⪰̸","nsup":"⊅","nsupE":"⫆̸","nsupe":"⊉","nsupset":"⊃⃒","nsupseteq":"⊉","nsupseteqq":"⫆̸","ntgl":"≹","ntild":"ñ","ntilde":"ñ","ntlg":"≸","ntriangleleft":"⋪","ntrianglelefteq":"⋬","ntriangleright":"⋫","ntrianglerighteq":"⋭","nu":"ν","num":"#","numero":"№","numsp":" ","nvDash":"⊭","nvHarr":"⤄","nvap":"≍⃒","nvdash":"⊬","nvge":"≥⃒","nvgt":">⃒","nvinfin":"⧞","nvlArr":"⤂","nvle":"≤⃒","nvlt":"<⃒","nvltrie":"⊴⃒","nvrArr":"⤃","nvrtrie":"⊵⃒","nvsim":"∼⃒","nwArr":"⇖","nwarhk":"⤣","nwarr":"↖","nwarrow":"↖","nwnear":"⤧","oS":"Ⓢ","oacut":"ó","oacute":"ó","oast":"⊛","ocir":"ô","ocirc":"ô","ocy":"о","odash":"⊝","odblac":"ő","odiv":"⨸","odot":"⊙","odsold":"⦼","oelig":"œ","ofcir":"⦿","ofr":"𝔬","ogon":"˛","ograv":"ò","ograve":"ò","ogt":"⧁","ohbar":"⦵","ohm":"Ω","oint":"∮","olarr":"↺","olcir":"⦾","olcross":"⦻","oline":"‾","olt":"⧀","omacr":"ō","omega":"ω","omicron":"ο","omid":"⦶","ominus":"⊖","oopf":"𝕠","opar":"⦷","operp":"⦹","oplus":"⊕","or":"∨","orarr":"↻","ord":"º","order":"ℴ","orderof":"ℴ","ordf":"ª","ordm":"º","origof":"⊶","oror":"⩖","orslope":"⩗","orv":"⩛","oscr":"ℴ","oslas":"ø","oslash":"ø","osol":"⊘","otild":"õ","otilde":"õ","otimes":"⊗","otimesas":"⨶","oum":"ö","ouml":"ö","ovbar":"⌽","par":"¶","para":"¶","parallel":"∥","parsim":"⫳","parsl":"⫽","part":"∂","pcy":"п","percnt":"%","period":".","permil":"‰","perp":"⊥","pertenk":"‱","pfr":"𝔭","phi":"φ","phiv":"ϕ","phmmat":"ℳ","phone":"☎","pi":"π","pitchfork":"⋔","piv":"ϖ","planck":"ℏ","planckh":"ℎ","plankv":"ℏ","plus":"+","plusacir":"⨣","plusb":"⊞","pluscir":"⨢","plusdo":"∔","plusdu":"⨥","pluse":"⩲","plusm":"±","plusmn":"±","plussim":"⨦","plustwo":"⨧","pm":"±","pointint":"⨕","popf":"𝕡","poun":"£","pound":"£","pr":"≺","prE":"⪳","prap":"⪷","prcue":"≼","pre":"⪯","prec":"≺","precapprox":"⪷","preccurlyeq":"≼","preceq":"⪯","precnapprox":"⪹","precneqq":"⪵","precnsim":"⋨","precsim":"≾","prime":"′","primes":"ℙ","prnE":"⪵","prnap":"⪹","prnsim":"⋨","prod":"∏","profalar":"⌮","profline":"⌒","profsurf":"⌓","prop":"∝","propto":"∝","prsim":"≾","prurel":"⊰","pscr":"𝓅","psi":"ψ","puncsp":" ","qfr":"𝔮","qint":"⨌","qopf":"𝕢","qprime":"⁗","qscr":"𝓆","quaternions":"ℍ","quatint":"⨖","quest":"?","questeq":"≟","quo":"\\"","quot":"\\"","rAarr":"⇛","rArr":"⇒","rAtail":"⤜","rBarr":"⤏","rHar":"⥤","race":"∽̱","racute":"ŕ","radic":"√","raemptyv":"⦳","rang":"⟩","rangd":"⦒","range":"⦥","rangle":"⟩","raqu":"»","raquo":"»","rarr":"→","rarrap":"⥵","rarrb":"⇥","rarrbfs":"⤠","rarrc":"⤳","rarrfs":"⤞","rarrhk":"↪","rarrlp":"↬","rarrpl":"⥅","rarrsim":"⥴","rarrtl":"↣","rarrw":"↝","ratail":"⤚","ratio":"∶","rationals":"ℚ","rbarr":"⤍","rbbrk":"❳","rbrace":"}","rbrack":"]","rbrke":"⦌","rbrksld":"⦎","rbrkslu":"⦐","rcaron":"ř","rcedil":"ŗ","rceil":"⌉","rcub":"}","rcy":"р","rdca":"⤷","rdldhar":"⥩","rdquo":"”","rdquor":"”","rdsh":"↳","real":"ℜ","realine":"ℛ","realpart":"ℜ","reals":"ℝ","rect":"▭","re":"®","reg":"®","rfisht":"⥽","rfloor":"⌋","rfr":"𝔯","rhard":"⇁","rharu":"⇀","rharul":"⥬","rho":"ρ","rhov":"ϱ","rightarrow":"→","rightarrowtail":"↣","rightharpoondown":"⇁","rightharpoonup":"⇀","rightleftarrows":"⇄","rightleftharpoons":"⇌","rightrightarrows":"⇉","rightsquigarrow":"↝","rightthreetimes":"⋌","ring":"˚","risingdotseq":"≓","rlarr":"⇄","rlhar":"⇌","rlm":"","rmoust":"⎱","rmoustache":"⎱","rnmid":"⫮","roang":"⟭","roarr":"⇾","robrk":"⟧","ropar":"⦆","ropf":"𝕣","roplus":"⨮","rotimes":"⨵","rpar":")","rpargt":"⦔","rppolint":"⨒","rrarr":"⇉","rsaquo":"›","rscr":"𝓇","rsh":"↱","rsqb":"]","rsquo":"’","rsquor":"’","rthree":"⋌","rtimes":"⋊","rtri":"▹","rtrie":"⊵","rtrif":"▸","rtriltri":"⧎","ruluhar":"⥨","rx":"℞","sacute":"ś","sbquo":"‚","sc":"≻","scE":"⪴","scap":"⪸","scaron":"š","sccue":"≽","sce":"⪰","scedil":"ş","scirc":"ŝ","scnE":"⪶","scnap":"⪺","scnsim":"⋩","scpolint":"⨓","scsim":"≿","scy":"с","sdot":"⋅","sdotb":"⊡","sdote":"⩦","seArr":"⇘","searhk":"⤥","searr":"↘","searrow":"↘","sec":"§","sect":"§","semi":";","seswar":"⤩","setminus":"∖","setmn":"∖","sext":"✶","sfr":"𝔰","sfrown":"⌢","sharp":"♯","shchcy":"щ","shcy":"ш","shortmid":"∣","shortparallel":"∥","sh":"","shy":"","sigma":"σ","sigmaf":"ς","sigmav":"ς","sim":"∼","simdot":"⩪","sime":"≃","simeq":"≃","simg":"⪞","simgE":"⪠","siml":"⪝","simlE":"⪟","simne":"≆","simplus":"⨤","simrarr":"⥲","slarr":"←","smallsetminus":"∖","smashp":"⨳","smeparsl":"⧤","smid":"∣","smile":"⌣","smt":"⪪","smte":"⪬","smtes":"⪬︀","softcy":"ь","sol":"/","solb":"⧄","solbar":"⌿","sopf":"𝕤","spades":"♠","spadesuit":"♠","spar":"∥","sqcap":"⊓","sqcaps":"⊓︀","sqcup":"⊔","sqcups":"⊔︀","sqsub":"⊏","sqsube":"⊑","sqsubset":"⊏","sqsubseteq":"⊑","sqsup":"⊐","sqsupe":"⊒","sqsupset":"⊐","sqsupseteq":"⊒","squ":"□","square":"□","squarf":"▪","squf":"▪","srarr":"→","sscr":"𝓈","ssetmn":"∖","ssmile":"⌣","sstarf":"⋆","star":"☆","starf":"★","straightepsilon":"ϵ","straightphi":"ϕ","strns":"¯","sub":"⊂","subE":"⫅","subdot":"⪽","sube":"⊆","subedot":"⫃","submult":"⫁","subnE":"⫋","subne":"⊊","subplus":"⪿","subrarr":"⥹","subset":"⊂","subseteq":"⊆","subseteqq":"⫅","subsetneq":"⊊","subsetneqq":"⫋","subsim":"⫇","subsub":"⫕","subsup":"⫓","succ":"≻","succapprox":"⪸","succcurlyeq":"≽","succeq":"⪰","succnapprox":"⪺","succneqq":"⪶","succnsim":"⋩","succsim":"≿","sum":"∑","sung":"♪","sup":"⊃","sup1":"¹","sup2":"²","sup3":"³","supE":"⫆","supdot":"⪾","supdsub":"⫘","supe":"⊇","supedot":"⫄","suphsol":"⟉","suphsub":"⫗","suplarr":"⥻","supmult":"⫂","supnE":"⫌","supne":"⊋","supplus":"⫀","supset":"⊃","supseteq":"⊇","supseteqq":"⫆","supsetneq":"⊋","supsetneqq":"⫌","supsim":"⫈","supsub":"⫔","supsup":"⫖","swArr":"⇙","swarhk":"⤦","swarr":"↙","swarrow":"↙","swnwar":"⤪","szli":"ß","szlig":"ß","target":"⌖","tau":"τ","tbrk":"⎴","tcaron":"ť","tcedil":"ţ","tcy":"т","tdot":"⃛","telrec":"⌕","tfr":"𝔱","there4":"∴","therefore":"∴","theta":"θ","thetasym":"ϑ","thetav":"ϑ","thickapprox":"≈","thicksim":"∼","thinsp":" ","thkap":"≈","thksim":"∼","thor":"þ","thorn":"þ","tilde":"˜","time":"×","times":"×","timesb":"⊠","timesbar":"⨱","timesd":"⨰","tint":"∭","toea":"⤨","top":"⊤","topbot":"⌶","topcir":"⫱","topf":"𝕥","topfork":"⫚","tosa":"⤩","tprime":"‴","trade":"™","triangle":"▵","triangledown":"▿","triangleleft":"◃","trianglelefteq":"⊴","triangleq":"≜","triangleright":"▹","trianglerighteq":"⊵","tridot":"◬","trie":"≜","triminus":"⨺","triplus":"⨹","trisb":"⧍","tritime":"⨻","trpezium":"⏢","tscr":"𝓉","tscy":"ц","tshcy":"ћ","tstrok":"ŧ","twixt":"≬","twoheadleftarrow":"↞","twoheadrightarrow":"↠","uArr":"⇑","uHar":"⥣","uacut":"ú","uacute":"ú","uarr":"↑","ubrcy":"ў","ubreve":"ŭ","ucir":"û","ucirc":"û","ucy":"у","udarr":"⇅","udblac":"ű","udhar":"⥮","ufisht":"⥾","ufr":"𝔲","ugrav":"ù","ugrave":"ù","uharl":"↿","uharr":"↾","uhblk":"▀","ulcorn":"⌜","ulcorner":"⌜","ulcrop":"⌏","ultri":"◸","umacr":"ū","um":"¨","uml":"¨","uogon":"ų","uopf":"𝕦","uparrow":"↑","updownarrow":"↕","upharpoonleft":"↿","upharpoonright":"↾","uplus":"⊎","upsi":"υ","upsih":"ϒ","upsilon":"υ","upuparrows":"⇈","urcorn":"⌝","urcorner":"⌝","urcrop":"⌎","uring":"ů","urtri":"◹","uscr":"𝓊","utdot":"⋰","utilde":"ũ","utri":"▵","utrif":"▴","uuarr":"⇈","uum":"ü","uuml":"ü","uwangle":"⦧","vArr":"⇕","vBar":"⫨","vBarv":"⫩","vDash":"⊨","vangrt":"⦜","varepsilon":"ϵ","varkappa":"ϰ","varnothing":"∅","varphi":"ϕ","varpi":"ϖ","varpropto":"∝","varr":"↕","varrho":"ϱ","varsigma":"ς","varsubsetneq":"⊊︀","varsubsetneqq":"⫋︀","varsupsetneq":"⊋︀","varsupsetneqq":"⫌︀","vartheta":"ϑ","vartriangleleft":"⊲","vartriangleright":"⊳","vcy":"в","vdash":"⊢","vee":"∨","veebar":"⊻","veeeq":"≚","vellip":"⋮","verbar":"|","vert":"|","vfr":"𝔳","vltri":"⊲","vnsub":"⊂⃒","vnsup":"⊃⃒","vopf":"𝕧","vprop":"∝","vrtri":"⊳","vscr":"𝓋","vsubnE":"⫋︀","vsubne":"⊊︀","vsupnE":"⫌︀","vsupne":"⊋︀","vzigzag":"⦚","wcirc":"ŵ","wedbar":"⩟","wedge":"∧","wedgeq":"≙","weierp":"℘","wfr":"𝔴","wopf":"𝕨","wp":"℘","wr":"≀","wreath":"≀","wscr":"𝓌","xcap":"⋂","xcirc":"◯","xcup":"⋃","xdtri":"▽","xfr":"𝔵","xhArr":"⟺","xharr":"⟷","xi":"ξ","xlArr":"⟸","xlarr":"⟵","xmap":"⟼","xnis":"⋻","xodot":"⨀","xopf":"𝕩","xoplus":"⨁","xotime":"⨂","xrArr":"⟹","xrarr":"⟶","xscr":"𝓍","xsqcup":"⨆","xuplus":"⨄","xutri":"△","xvee":"⋁","xwedge":"⋀","yacut":"ý","yacute":"ý","yacy":"я","ycirc":"ŷ","ycy":"ы","ye":"¥","yen":"¥","yfr":"𝔶","yicy":"ї","yopf":"𝕪","yscr":"𝓎","yucy":"ю","yum":"ÿ","yuml":"ÿ","zacute":"ź","zcaron":"ž","zcy":"з","zdot":"ż","zeetrf":"ℨ","zeta":"ζ","zfr":"𝔷","zhcy":"ж","zigrarr":"⇝","zopf":"𝕫","zscr":"𝓏","zwj":"","zwnj":""}') | |
} | |
, | |
8192: e=>{ | |
"use strict"; | |
e.exports = JSON.parse('{"0":"�","128":"€","130":"‚","131":"ƒ","132":"„","133":"…","134":"†","135":"‡","136":"ˆ","137":"‰","138":"Š","139":"‹","140":"Œ","142":"Ž","145":"‘","146":"’","147":"“","148":"”","149":"•","150":"–","151":"—","152":"˜","153":"™","154":"š","155":"›","156":"œ","158":"ž","159":"Ÿ"}') | |
} | |
, | |
7274: e=>{ | |
"use strict"; | |
e.exports = JSON.parse('["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","isindex","keygen","link","menuitem","meta","nextid","param","source","track","wbr"]') | |
} | |
, | |
5547: e=>{ | |
"use strict"; | |
e.exports = JSON.parse('["cent","copy","divide","gt","lt","not","para","times"]') | |
} | |
} | |
, t = {}; | |
function n(i) { | |
var r = t[i]; | |
if (void 0 !== r) | |
return r.exports; | |
var o = t[i] = { | |
exports: {} | |
}; | |
return e[i].call(o.exports, o, o.exports, n), | |
o.exports | |
} | |
n.n = e=>{ | |
var t = e && e.__esModule ? ()=>e.default : ()=>e; | |
return n.d(t, { | |
a: t | |
}), | |
t | |
} | |
, | |
n.d = (e,t)=>{ | |
for (var i in t) | |
n.o(t, i) && !n.o(e, i) && Object.defineProperty(e, i, { | |
enumerable: !0, | |
get: t[i] | |
}) | |
} | |
, | |
n.g = function() { | |
if ("object" == typeof globalThis) | |
return globalThis; | |
try { | |
return this || new Function("return this")() | |
} catch (e) { | |
if ("object" == typeof window) | |
return window | |
} | |
}(), | |
n.o = (e,t)=>Object.prototype.hasOwnProperty.call(e, t), | |
n.r = e=>{ | |
"undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, { | |
value: "Module" | |
}), | |
Object.defineProperty(e, "__esModule", { | |
value: !0 | |
}) | |
} | |
, | |
(()=>{ | |
"use strict"; | |
var e = {}; | |
n.r(e), | |
n.d(e, { | |
Annotation: ()=>qe, | |
AnnotationType: ()=>Ue, | |
ChangeDesc: ()=>ie, | |
ChangeSet: ()=>re, | |
CharCategory: ()=>Je, | |
Compartment: ()=>Ae, | |
EditorSelection: ()=>de, | |
EditorState: ()=>nt, | |
Facet: ()=>me, | |
Line: ()=>Z, | |
MapMode: ()=>ne, | |
Prec: ()=>Te, | |
Range: ()=>ot, | |
RangeSet: ()=>lt, | |
RangeSetBuilder: ()=>ct, | |
RangeValue: ()=>rt, | |
SelectionRange: ()=>he, | |
StateEffect: ()=>We, | |
StateEffectType: ()=>_e, | |
StateField: ()=>ke, | |
Text: ()=>q, | |
Transaction: ()=>je, | |
codePointAt: ()=>Q, | |
codePointSize: ()=>ee, | |
combineConfig: ()=>it, | |
countColumn: ()=>wt, | |
findClusterBreak: ()=>$, | |
findColumn: ()=>kt, | |
fromCodePoint: ()=>J | |
}); | |
var t = {}; | |
n.r(t), | |
n.d(t, { | |
BidiSpan: ()=>ci, | |
BlockInfo: ()=>eo, | |
BlockType: ()=>Bn, | |
Decoration: ()=>Nn, | |
Direction: ()=>Yn, | |
EditorView: ()=>Ho, | |
GutterMarker: ()=>ks, | |
MatchDecorator: ()=>Ca, | |
RectangleMarker: ()=>ea, | |
ViewPlugin: ()=>Hi, | |
ViewUpdate: ()=>$i, | |
WidgetType: ()=>On, | |
__test: ()=>el, | |
closeHoverTooltips: ()=>ds, | |
crosshairCursor: ()=>ja, | |
drawSelection: ()=>ca, | |
dropCursor: ()=>wa, | |
getDrawSelectionConfig: ()=>ua, | |
getPanel: ()=>vs, | |
getTooltip: ()=>cs, | |
gutter: ()=>xs, | |
gutterLineClass: ()=>Cs, | |
gutterWidgetClass: ()=>Ms, | |
gutters: ()=>Ds, | |
hasHoverTooltips: ()=>us, | |
highlightActiveLine: ()=>Oa, | |
highlightActiveLineGutter: ()=>Gs, | |
highlightSpecialChars: ()=>Da, | |
highlightTrailingWhitespace: ()=>Js, | |
highlightWhitespace: ()=>$s, | |
hoverTooltip: ()=>ls, | |
keymap: ()=>Go, | |
layer: ()=>aa, | |
lineNumberMarkers: ()=>Ns, | |
lineNumberWidgetMarker: ()=>Rs, | |
lineNumbers: ()=>Us, | |
logException: ()=>Oi, | |
panels: ()=>ms, | |
placeholder: ()=>Ha, | |
rectangularSelection: ()=>Ua, | |
repositionTooltips: ()=>ps, | |
runScopeHandlers: ()=>Zo, | |
scrollPastEnd: ()=>Fa, | |
showPanel: ()=>ws, | |
showTooltip: ()=>ns, | |
tooltips: ()=>Ya | |
}); | |
var i = {}; | |
n.r(i), | |
n.d(i, { | |
DefaultBufferLength: ()=>ru, | |
IterMode: ()=>hu, | |
MountedTree: ()=>lu, | |
NodeProp: ()=>su, | |
NodeSet: ()=>du, | |
NodeType: ()=>uu, | |
NodeWeakMap: ()=>Ou, | |
Parser: ()=>Nu, | |
Tree: ()=>mu, | |
TreeBuffer: ()=>gu, | |
TreeCursor: ()=>Du, | |
TreeFragment: ()=>Bu, | |
parseMixed: ()=>Hu | |
}); | |
var r = {}; | |
n.r(r), | |
n.d(r, { | |
Tag: ()=>Qu, | |
classHighlighter: ()=>Dh, | |
getStyleTags: ()=>lh, | |
highlightCode: ()=>ah, | |
highlightTree: ()=>oh, | |
styleTags: ()=>th, | |
tagHighlighter: ()=>rh, | |
tags: ()=>Eh | |
}); | |
var o = {}; | |
n.r(o), | |
n.d(o, { | |
DocInput: ()=>zh, | |
HighlightStyle: ()=>Gd, | |
IndentContext: ()=>id, | |
LRLanguage: ()=>Oh, | |
Language: ()=>Ih, | |
LanguageDescription: ()=>Xh, | |
LanguageSupport: ()=>Zh, | |
ParseContext: ()=>Uh, | |
StreamLanguage: ()=>wp, | |
StringStream: ()=>gp, | |
TreeIndentContext: ()=>ld, | |
bidiIsolates: ()=>Hp, | |
bracketMatching: ()=>up, | |
bracketMatchingHandle: ()=>hp, | |
codeFolding: ()=>Hd, | |
continuedIndent: ()=>pd, | |
defaultHighlightStyle: ()=>ep, | |
defineLanguageFacet: ()=>Lh, | |
delimitedIndent: ()=>ud, | |
ensureSyntaxTree: ()=>Nh, | |
flatIndent: ()=>dd, | |
foldAll: ()=>Pd, | |
foldCode: ()=>Dd, | |
foldEffect: ()=>kd, | |
foldGutter: ()=>Wd, | |
foldInside: ()=>yd, | |
foldKeymap: ()=>Bd, | |
foldNodeProp: ()=>gd, | |
foldService: ()=>vd, | |
foldState: ()=>Ed, | |
foldable: ()=>bd, | |
foldedRanges: ()=>Sd, | |
forceParsing: ()=>Hh, | |
getIndentUnit: ()=>Jh, | |
getIndentation: ()=>td, | |
highlightingFor: ()=>$d, | |
ignoreSpellcheckToken: ()=>Op, | |
indentNodeProp: ()=>rd, | |
indentOnInput: ()=>md, | |
indentRange: ()=>nd, | |
indentService: ()=>$h, | |
indentString: ()=>ed, | |
indentUnit: ()=>Qh, | |
language: ()=>Yh, | |
languageDataProp: ()=>Ah, | |
lineClassNodeProp: ()=>Pp, | |
lineHighlighter: ()=>Fp, | |
matchBrackets: ()=>fp, | |
sublanguageProp: ()=>Ph, | |
syntaxHighlighting: ()=>Xd, | |
syntaxParserRunning: ()=>Vh, | |
syntaxTree: ()=>Bh, | |
syntaxTreeAvailable: ()=>Rh, | |
toggleFold: ()=>Od, | |
tokenClassNodeProp: ()=>Lp, | |
unfoldAll: ()=>Id, | |
unfoldCode: ()=>Ad, | |
unfoldEffect: ()=>Cd | |
}); | |
var a = {}; | |
n.r(a), | |
n.d(a, { | |
blockComment: ()=>Pm, | |
blockUncomment: ()=>Im, | |
copyLineDown: ()=>hy, | |
copyLineUp: ()=>uy, | |
cursorCharBackward: ()=>wv, | |
cursorCharBackwardLogical: ()=>Ev, | |
cursorCharForward: ()=>bv, | |
cursorCharForwardLogical: ()=>Mv, | |
cursorCharLeft: ()=>gv, | |
cursorCharRight: ()=>yv, | |
cursorDocEnd: ()=>Ng, | |
cursorDocStart: ()=>Bg, | |
cursorGroupBackward: ()=>Av, | |
cursorGroupForward: ()=>Dv, | |
cursorGroupForwardWin: ()=>Pv, | |
cursorGroupLeft: ()=>xv, | |
cursorGroupRight: ()=>Tv, | |
cursorLineBoundaryBackward: ()=>Xv, | |
cursorLineBoundaryForward: ()=>Zv, | |
cursorLineBoundaryLeft: ()=>$v, | |
cursorLineBoundaryRight: ()=>Qv, | |
cursorLineDown: ()=>_v, | |
cursorLineEnd: ()=>eg, | |
cursorLineStart: ()=>Jv, | |
cursorLineUp: ()=>Uv, | |
cursorMatchingBracket: ()=>ng, | |
cursorPageDown: ()=>Kv, | |
cursorPageUp: ()=>Gv, | |
cursorSubwordBackward: ()=>Nv, | |
cursorSubwordForward: ()=>Bv, | |
cursorSyntaxLeft: ()=>Vv, | |
cursorSyntaxRight: ()=>zv, | |
defaultKeymap: ()=>Ty, | |
deleteCharBackward: ()=>Gg, | |
deleteCharBackwardStrict: ()=>Kg, | |
deleteCharForward: ()=>Yg, | |
deleteGroupBackward: ()=>Xg, | |
deleteGroupForward: ()=>$g, | |
deleteLine: ()=>dy, | |
deleteLineBoundaryBackward: ()=>ey, | |
deleteLineBoundaryForward: ()=>ty, | |
deleteToLineEnd: ()=>Qg, | |
deleteToLineStart: ()=>Jg, | |
deleteTrailingWhitespace: ()=>ny, | |
emacsStyleKeymap: ()=>Sy, | |
history: ()=>_m, | |
historyField: ()=>Wm, | |
historyKeymap: ()=>uv, | |
indentLess: ()=>ky, | |
indentMore: ()=>wy, | |
indentSelection: ()=>by, | |
indentWithTab: ()=>Dy, | |
insertBlankLine: ()=>vy, | |
insertNewline: ()=>py, | |
insertNewlineAndIndent: ()=>my, | |
insertNewlineKeepIndent: ()=>fy, | |
insertTab: ()=>Ey, | |
invertedEffects: ()=>zm, | |
isolateHistory: ()=>Vm, | |
lineComment: ()=>Dm, | |
lineUncomment: ()=>Am, | |
moveLineDown: ()=>ly, | |
moveLineUp: ()=>sy, | |
redo: ()=>Km, | |
redoDepth: ()=>Qm, | |
redoSelection: ()=>Zm, | |
selectAll: ()=>Vg, | |
selectCharBackward: ()=>cg, | |
selectCharBackwardLogical: ()=>hg, | |
selectCharForward: ()=>lg, | |
selectCharForwardLogical: ()=>ug, | |
selectCharLeft: ()=>ag, | |
selectCharRight: ()=>sg, | |
selectDocEnd: ()=>Hg, | |
selectDocStart: ()=>Rg, | |
selectGroupBackward: ()=>vg, | |
selectGroupForward: ()=>mg, | |
selectGroupForwardWin: ()=>gg, | |
selectGroupLeft: ()=>pg, | |
selectGroupRight: ()=>fg, | |
selectLine: ()=>zg, | |
selectLineBoundaryBackward: ()=>Lg, | |
selectLineBoundaryForward: ()=>Ag, | |
selectLineBoundaryLeft: ()=>Pg, | |
selectLineBoundaryRight: ()=>Ig, | |
selectLineDown: ()=>Sg, | |
selectLineEnd: ()=>Og, | |
selectLineStart: ()=>Fg, | |
selectLineUp: ()=>Eg, | |
selectMatchingBracket: ()=>ig, | |
selectPageDown: ()=>Dg, | |
selectPageUp: ()=>Tg, | |
selectParentSyntax: ()=>qg, | |
selectSubwordBackward: ()=>wg, | |
selectSubwordForward: ()=>bg, | |
selectSyntaxLeft: ()=>kg, | |
selectSyntaxRight: ()=>Cg, | |
simplifySelection: ()=>Ug, | |
splitLine: ()=>iy, | |
standardKeymap: ()=>xy, | |
temporarilySetTabFocusMode: ()=>My, | |
toggleBlockComment: ()=>Lm, | |
toggleBlockCommentByLine: ()=>Fm, | |
toggleComment: ()=>Sm, | |
toggleLineComment: ()=>Tm, | |
toggleTabFocusMode: ()=>Cy, | |
transposeChars: ()=>ry, | |
undo: ()=>Gm, | |
undoDepth: ()=>$m, | |
undoSelection: ()=>Ym | |
}); | |
var s = {}; | |
n.r(s), | |
n.d(s, { | |
RegExpCursor: ()=>By, | |
SearchCursor: ()=>Iy, | |
SearchQuery: ()=>nb, | |
closeSearchPanel: ()=>Pb, | |
findNext: ()=>wb, | |
findPrevious: ()=>kb, | |
getSearchQuery: ()=>pb, | |
gotoLine: ()=>_y, | |
highlightSelectionMatches: ()=>Ky, | |
openSearchPanel: ()=>Lb, | |
replaceAll: ()=>Sb, | |
replaceNext: ()=>Eb, | |
search: ()=>tb, | |
searchKeymap: ()=>Ib, | |
searchPanelOpen: ()=>fb, | |
selectMatches: ()=>Cb, | |
selectNextOccurrence: ()=>Jy, | |
selectSelectionMatches: ()=>Mb, | |
setSearchQuery: ()=>ub | |
}); | |
var l = {}; | |
n.r(l), | |
n.d(l, { | |
CompletionContext: ()=>KV, | |
acceptCompletion: ()=>Pz, | |
autocompletion: ()=>Iq, | |
clearSnippet: ()=>$z, | |
closeBrackets: ()=>vq, | |
closeBracketsKeymap: ()=>Mq, | |
closeCompletion: ()=>Fz, | |
completeAnyWord: ()=>hq, | |
completeFromList: ()=>ZV, | |
completionKeymap: ()=>Fq, | |
completionStatus: ()=>Bq, | |
currentCompletions: ()=>Rq, | |
deleteBracketPair: ()=>Cq, | |
hasNextSnippetField: ()=>eq, | |
hasPrevSnippetField: ()=>tq, | |
ifIn: ()=>XV, | |
ifNotIn: ()=>$V, | |
insertBracket: ()=>Eq, | |
insertCompletionText: ()=>nz, | |
moveCompletionSelection: ()=>Lz, | |
nextSnippetField: ()=>Qz, | |
pickedCompletion: ()=>tz, | |
prevSnippetField: ()=>Jz, | |
selectedCompletion: ()=>Hq, | |
selectedCompletionIndex: ()=>Vq, | |
setSelectedCompletion: ()=>zq, | |
snippet: ()=>Zz, | |
snippetCompletion: ()=>oq, | |
snippetKeymap: ()=>iq, | |
startCompletion: ()=>Iz | |
}); | |
var c = {}; | |
n.r(c), | |
n.d(c, { | |
collab: ()=>Gq, | |
getClientID: ()=>Xq, | |
getSyncedVersion: ()=>Zq, | |
rebaseUpdates: ()=>$q, | |
receiveUpdates: ()=>Kq, | |
sendableUpdates: ()=>Yq | |
}); | |
var u = {}; | |
n.r(u), | |
n.d(u, { | |
closeLintPanel: ()=>pU, | |
diagnosticCount: ()=>lU, | |
forEachDiagnostic: ()=>qU, | |
forceLinting: ()=>wU, | |
lintGutter: ()=>zU, | |
lintKeymap: ()=>vU, | |
linter: ()=>bU, | |
nextDiagnostic: ()=>fU, | |
openLintPanel: ()=>dU, | |
previousDiagnostic: ()=>mU, | |
setDiagnostics: ()=>iU, | |
setDiagnosticsEffect: ()=>rU | |
}); | |
var h = {}; | |
n.r(h), | |
n.d(h, { | |
ContextTracker: ()=>u_, | |
ExternalTokenizer: ()=>QU, | |
InputStream: ()=>ZU, | |
LRParser: ()=>h_, | |
LocalTokenGroup: ()=>$U, | |
Stack: ()=>UU | |
}); | |
var d = {}; | |
n.r(d), | |
n.d(d, { | |
AbstractInputSuggest: ()=>bF, | |
AbstractTextComponent: ()=>II, | |
App: ()=>p2, | |
BaseComponent: ()=>TI, | |
ButtonComponent: ()=>AI, | |
CapacitorAdapter: ()=>j_, | |
ColorComponent: ()=>zI, | |
Component: ()=>vA, | |
DropdownComponent: ()=>RI, | |
EditableFileView: ()=>XR, | |
Editor: ()=>Mm, | |
EditorSuggest: ()=>iF, | |
Events: ()=>Zb, | |
ExtraButtonComponent: ()=>LI, | |
FileManager: ()=>uL, | |
FileSystemAdapter: ()=>iu, | |
FileView: ()=>HP, | |
FuzzySuggestModal: ()=>iV, | |
HoverPopover: ()=>GN, | |
ItemView: ()=>NP, | |
Keymap: ()=>gk, | |
MarkdownPreviewRenderer: ()=>WO, | |
MarkdownPreviewSection: ()=>RO, | |
MarkdownPreviewView: ()=>hB, | |
MarkdownRenderChild: ()=>NO, | |
MarkdownRenderer: ()=>lB, | |
MarkdownView: ()=>CY, | |
Menu: ()=>kA, | |
MenuItem: ()=>gA, | |
MenuSeparator: ()=>yA, | |
MetadataCache: ()=>N_, | |
Modal: ()=>VA, | |
MomentFormatComponent: ()=>NI, | |
Notice: ()=>_A, | |
Platform: ()=>Rl, | |
Plugin: ()=>XK, | |
PluginSettingTab: ()=>$K, | |
PopoverState: ()=>ON, | |
PopoverSuggest: ()=>tF, | |
ProgressBarComponent: ()=>HI, | |
Scope: ()=>mk, | |
SearchComponent: ()=>OI, | |
Setting: ()=>xI, | |
SettingTab: ()=>lK, | |
SliderComponent: ()=>VI, | |
SuggestModal: ()=>nV, | |
TAbstractFile: ()=>aw, | |
TFile: ()=>lw, | |
TFolder: ()=>cw, | |
TextAreaComponent: ()=>BI, | |
TextComponent: ()=>FI, | |
TextFileView: ()=>z_, | |
ToggleComponent: ()=>PI, | |
ValueComponent: ()=>DI, | |
Vault: ()=>uw, | |
View: ()=>BP, | |
ViewRegistry: ()=>iW, | |
Workspace: ()=>zK, | |
WorkspaceContainer: ()=>pG, | |
WorkspaceFloating: ()=>OK, | |
WorkspaceItem: ()=>cG, | |
WorkspaceLeaf: ()=>PK, | |
WorkspaceParent: ()=>uG, | |
WorkspaceRibbon: ()=>IK, | |
WorkspaceRoot: ()=>FK, | |
WorkspaceSidedock: ()=>dG, | |
WorkspaceSplit: ()=>hG, | |
WorkspaceTabs: ()=>AK, | |
WorkspaceWindow: ()=>BK, | |
addIcon: ()=>rx, | |
apiVersion: ()=>r2, | |
arrayBufferToBase64: ()=>tf, | |
arrayBufferToHex: ()=>sf, | |
base64ToArrayBuffer: ()=>ef, | |
debounce: ()=>ic, | |
displayTooltip: ()=>Cx, | |
editorEditorField: ()=>hR, | |
editorInfoField: ()=>dR, | |
editorLivePreviewField: ()=>fR, | |
editorViewField: ()=>pR, | |
finishRenderMath: ()=>CO, | |
fuzzySearch: ()=>AL, | |
getAllTags: ()=>NS, | |
getBlobArrayBuffer: ()=>lc, | |
getFrontMatterInfo: ()=>rS, | |
getIcon: ()=>nx, | |
getIconIds: ()=>ax, | |
getLanguage: ()=>_f, | |
getLinkpath: ()=>PS, | |
hexToArrayBuffer: ()=>af, | |
htmlToMarkdown: ()=>Gb, | |
iterateCacheRefs: ()=>FS, | |
iterateRefs: ()=>BS, | |
livePreviewState: ()=>sV, | |
loadMathJax: ()=>vO, | |
loadMermaid: ()=>dO, | |
loadPdfJs: ()=>lO, | |
loadPrism: ()=>fO, | |
moment: ()=>ID, | |
normalizePath: ()=>_c, | |
parseFrontMatterAliases: ()=>hS, | |
parseFrontMatterEntry: ()=>cS, | |
parseFrontMatterStringArray: ()=>uS, | |
parseFrontMatterTags: ()=>dS, | |
parseLinktext: ()=>IS, | |
parseYaml: ()=>LD, | |
prepareFuzzySearch: ()=>xL, | |
prepareQuery: ()=>SL, | |
prepareSimpleSearch: ()=>FL, | |
removeIcon: ()=>ox, | |
renderMatches: ()=>BL, | |
renderMath: ()=>gO, | |
renderResults: ()=>OL, | |
request: ()=>FA, | |
requestUrl: ()=>IA, | |
requireApiVersion: ()=>a2, | |
resolveSubpath: ()=>qS, | |
sanitizeHTMLToDom: ()=>AT, | |
setIcon: ()=>ix, | |
setTooltip: ()=>Sx, | |
sortSearchResults: ()=>LL, | |
stringifyYaml: ()=>PD, | |
stripHeading: ()=>VS, | |
stripHeadingForLink: ()=>zS | |
}); | |
var p = function(e, t) { | |
return p = Object.setPrototypeOf || { | |
__proto__: [] | |
}instanceof Array && function(e, t) { | |
e.__proto__ = t | |
} | |
|| function(e, t) { | |
for (var n in t) | |
Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]) | |
} | |
, | |
p(e, t) | |
}; | |
function f(e, t) { | |
if ("function" != typeof t && null !== t) | |
throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); | |
function n() { | |
this.constructor = e | |
} | |
p(e, t), | |
e.prototype = null === t ? Object.create(t) : (n.prototype = t.prototype, | |
new n) | |
} | |
var m = function() { | |
return m = Object.assign || function(e) { | |
for (var t, n = 1, i = arguments.length; n < i; n++) | |
for (var r in t = arguments[n]) | |
Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]); | |
return e | |
} | |
, | |
m.apply(this, arguments) | |
}; | |
function v(e, t) { | |
var n = {}; | |
for (var i in e) | |
Object.prototype.hasOwnProperty.call(e, i) && t.indexOf(i) < 0 && (n[i] = e[i]); | |
if (null != e && "function" == typeof Object.getOwnPropertySymbols) { | |
var r = 0; | |
for (i = Object.getOwnPropertySymbols(e); r < i.length; r++) | |
t.indexOf(i[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, i[r]) && (n[i[r]] = e[i[r]]) | |
} | |
return n | |
} | |
function g(e, t, n, i) { | |
return new (n || (n = Promise))((function(r, o) { | |
function a(e) { | |
try { | |
l(i.next(e)) | |
} catch (e) { | |
o(e) | |
} | |
} | |
function s(e) { | |
try { | |
l(i.throw(e)) | |
} catch (e) { | |
o(e) | |
} | |
} | |
function l(e) { | |
var t; | |
e.done ? r(e.value) : (t = e.value, | |
t instanceof n ? t : new n((function(e) { | |
e(t) | |
} | |
))).then(a, s) | |
} | |
l((i = i.apply(e, t || [])).next()) | |
} | |
)) | |
} | |
function y(e, t) { | |
var n, i, r, o, a = { | |
label: 0, | |
sent: function() { | |
if (1 & r[0]) | |
throw r[1]; | |
return r[1] | |
}, | |
trys: [], | |
ops: [] | |
}; | |
return o = { | |
next: s(0), | |
throw: s(1), | |
return: s(2) | |
}, | |
"function" == typeof Symbol && (o[Symbol.iterator] = function() { | |
return this | |
} | |
), | |
o; | |
function s(s) { | |
return function(l) { | |
return function(s) { | |
if (n) | |
throw new TypeError("Generator is already executing."); | |
for (; o && (o = 0, | |
s[0] && (a = 0)), | |
a; ) | |
try { | |
if (n = 1, | |
i && (r = 2 & s[0] ? i.return : s[0] ? i.throw || ((r = i.return) && r.call(i), | |
0) : i.next) && !(r = r.call(i, s[1])).done) | |
return r; | |
switch (i = 0, | |
r && (s = [2 & s[0], r.value]), | |
s[0]) { | |
case 0: | |
case 1: | |
r = s; | |
break; | |
case 4: | |
return a.label++, | |
{ | |
value: s[1], | |
done: !1 | |
}; | |
case 5: | |
a.label++, | |
i = s[1], | |
s = [0]; | |
continue; | |
case 7: | |
s = a.ops.pop(), | |
a.trys.pop(); | |
continue; | |
default: | |
if (!(r = a.trys, | |
(r = r.length > 0 && r[r.length - 1]) || 6 !== s[0] && 2 !== s[0])) { | |
a = 0; | |
continue | |
} | |
if (3 === s[0] && (!r || s[1] > r[0] && s[1] < r[3])) { | |
a.label = s[1]; | |
break | |
} | |
if (6 === s[0] && a.label < r[1]) { | |
a.label = r[1], | |
r = s; | |
break | |
} | |
if (r && a.label < r[2]) { | |
a.label = r[2], | |
a.ops.push(s); | |
break | |
} | |
r[2] && a.ops.pop(), | |
a.trys.pop(); | |
continue | |
} | |
s = t.call(e, a) | |
} catch (e) { | |
s = [6, e], | |
i = 0 | |
} finally { | |
n = r = 0 | |
} | |
if (5 & s[0]) | |
throw s[1]; | |
return { | |
value: s[0] ? s[1] : void 0, | |
done: !0 | |
} | |
}([s, l]) | |
} | |
} | |
} | |
Object.create; | |
function b(e) { | |
var t = "function" == typeof Symbol && Symbol.iterator | |
, n = t && e[t] | |
, i = 0; | |
if (n) | |
return n.call(e); | |
if (e && "number" == typeof e.length) | |
return { | |
next: function() { | |
return e && i >= e.length && (e = void 0), | |
{ | |
value: e && e[i++], | |
done: !e | |
} | |
} | |
}; | |
throw new TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.") | |
} | |
function w(e, t, n) { | |
if (n || 2 === arguments.length) | |
for (var i, r = 0, o = t.length; r < o; r++) | |
!i && r in t || (i || (i = Array.prototype.slice.call(t, 0, r)), | |
i[r] = t[r]); | |
return e.concat(i || Array.prototype.slice.call(t)) | |
} | |
function k(e) { | |
return this instanceof k ? (this.v = e, | |
this) : new k(e) | |
} | |
function C(e, t, n) { | |
if (!Symbol.asyncIterator) | |
throw new TypeError("Symbol.asyncIterator is not defined."); | |
var i, r = n.apply(e, t || []), o = []; | |
return i = {}, | |
a("next"), | |
a("throw"), | |
a("return"), | |
i[Symbol.asyncIterator] = function() { | |
return this | |
} | |
, | |
i; | |
function a(e) { | |
r[e] && (i[e] = function(t) { | |
return new Promise((function(n, i) { | |
o.push([e, t, n, i]) > 1 || s(e, t) | |
} | |
)) | |
} | |
) | |
} | |
function s(e, t) { | |
try { | |
!function(e) { | |
e.value instanceof k ? Promise.resolve(e.value.v).then(l, c) : u(o[0][2], e) | |
}(r[e](t)) | |
} catch (e) { | |
u(o[0][3], e) | |
} | |
} | |
function l(e) { | |
s("next", e) | |
} | |
function c(e) { | |
s("throw", e) | |
} | |
function u(e, t) { | |
e(t), | |
o.shift(), | |
o.length && s(o[0][0], o[0][1]) | |
} | |
} | |
function M(e) { | |
if (!Symbol.asyncIterator) | |
throw new TypeError("Symbol.asyncIterator is not defined."); | |
var t, n = e[Symbol.asyncIterator]; | |
return n ? n.call(e) : (e = b(e), | |
t = {}, | |
i("next"), | |
i("throw"), | |
i("return"), | |
t[Symbol.asyncIterator] = function() { | |
return this | |
} | |
, | |
t); | |
function i(n) { | |
t[n] = e[n] && function(t) { | |
return new Promise((function(i, r) { | |
(function(e, t, n, i) { | |
Promise.resolve(i).then((function(t) { | |
e({ | |
value: t, | |
done: n | |
}) | |
} | |
), t) | |
} | |
)(i, r, (t = e[n](t)).done, t.value) | |
} | |
)) | |
} | |
} | |
} | |
Object.create; | |
var E, S, x = n(6043); | |
!function(e) { | |
e.Dark = "DARK", | |
e.Light = "LIGHT", | |
e.Default = "DEFAULT" | |
}(E || (E = {})), | |
function(e) { | |
e.Body = "body", | |
e.Ionic = "ionic", | |
e.Native = "native", | |
e.None = "none" | |
}(S || (S = {})); | |
(0, | |
x.F3)("Keyboard"); | |
var T, D; | |
!function(e) { | |
e.Dark = "DARK", | |
e.Light = "LIGHT", | |
e.Default = "DEFAULT" | |
}(T || (T = {})), | |
function(e) { | |
e.None = "NONE", | |
e.Slide = "SLIDE", | |
e.Fade = "FADE" | |
}(D || (D = {})); | |
let A = [] | |
, L = []; | |
function P(e) { | |
if (e < 768) | |
return !1; | |
for (let t = 0, n = A.length; ; ) { | |
let i = t + n >> 1; | |
if (e < A[i]) | |
n = i; | |
else { | |
if (!(e >= L[i])) | |
return !0; | |
t = i + 1 | |
} | |
if (t == n) | |
return !1 | |
} | |
} | |
function I(e) { | |
return e >= 127462 && e <= 127487 | |
} | |
(()=>{ | |
let e = "lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map((e=>e ? parseInt(e, 36) : 1)); | |
for (let t = 0, n = 0; t < e.length; t++) | |
(t % 2 ? L : A).push(n += e[t]) | |
} | |
)(); | |
const F = 8205; | |
function O(e, t, n=!0, i=!0) { | |
return (n ? B : N)(e, t, i) | |
} | |
function B(e, t, n) { | |
if (t == e.length) | |
return t; | |
t && H(e.charCodeAt(t)) && V(e.charCodeAt(t - 1)) && t--; | |
let i = R(e, t); | |
for (t += z(i); t < e.length; ) { | |
let r = R(e, t); | |
if (i == F || r == F || n && P(r)) | |
t += z(r), | |
i = r; | |
else { | |
if (!I(r)) | |
break; | |
{ | |
let n = 0 | |
, i = t - 2; | |
for (; i >= 0 && I(R(e, i)); ) | |
n++, | |
i -= 2; | |
if (n % 2 == 0) | |
break; | |
t += 2 | |
} | |
} | |
} | |
return t | |
} | |
function N(e, t, n) { | |
for (; t > 0; ) { | |
let i = B(e, t - 2, n); | |
if (i < t) | |
return i; | |
t-- | |
} | |
return 0 | |
} | |
function R(e, t) { | |
let n = e.charCodeAt(t); | |
if (!V(n) || t + 1 == e.length) | |
return n; | |
let i = e.charCodeAt(t + 1); | |
return H(i) ? i - 56320 + (n - 55296 << 10) + 65536 : n | |
} | |
function H(e) { | |
return e >= 56320 && e < 57344 | |
} | |
function V(e) { | |
return e >= 55296 && e < 56320 | |
} | |
function z(e) { | |
return e < 65536 ? 1 : 2 | |
} | |
var q = function() { | |
function e() {} | |
return e.prototype.lineAt = function(e) { | |
if (e < 0 || e > this.length) | |
throw new RangeError("Invalid position ".concat(e, " in document of length ").concat(this.length)); | |
return this.lineInner(e, !1, 1, 0) | |
} | |
, | |
e.prototype.line = function(e) { | |
if (e < 1 || e > this.lines) | |
throw new RangeError("Invalid line number ".concat(e, " in ").concat(this.lines, "-line document")); | |
return this.lineInner(e, !0, 1, 0) | |
} | |
, | |
e.prototype.replace = function(e, t, n) { | |
var i; | |
e = (i = X(this, e, t))[0], | |
t = i[1]; | |
var r = []; | |
return this.decompose(0, e, r, 2), | |
n.length && n.decompose(0, n.length, r, 3), | |
this.decompose(t, this.length, r, 1), | |
_.from(r, this.length - (t - e) + n.length) | |
} | |
, | |
e.prototype.append = function(e) { | |
return this.replace(this.length, this.length, e) | |
} | |
, | |
e.prototype.slice = function(e, t) { | |
var n; | |
void 0 === t && (t = this.length), | |
e = (n = X(this, e, t))[0], | |
t = n[1]; | |
var i = []; | |
return this.decompose(e, t, i, 0), | |
_.from(i, t - e) | |
} | |
, | |
e.prototype.eq = function(e) { | |
if (e == this) | |
return !0; | |
if (e.length != this.length || e.lines != this.lines) | |
return !1; | |
for (var t = this.scanIdentical(e, 1), n = this.length - this.scanIdentical(e, -1), i = new G(this), r = new G(e), o = t, a = t; ; ) { | |
if (i.next(o), | |
r.next(o), | |
o = 0, | |
i.lineBreak != r.lineBreak || i.done != r.done || i.value != r.value) | |
return !1; | |
if (a += i.value.length, | |
i.done || a >= n) | |
return !0 | |
} | |
} | |
, | |
e.prototype.iter = function(e) { | |
return void 0 === e && (e = 1), | |
new G(this,e) | |
} | |
, | |
e.prototype.iterRange = function(e, t) { | |
return void 0 === t && (t = this.length), | |
new K(this,e,t) | |
} | |
, | |
e.prototype.iterLines = function(e, t) { | |
var n; | |
if (null == e) | |
n = this.iter(); | |
else { | |
null == t && (t = this.lines + 1); | |
var i = this.line(e).from; | |
n = this.iterRange(i, Math.max(i, t == this.lines + 1 ? this.length : t <= 1 ? 0 : this.line(t - 1).to)) | |
} | |
return new Y(n) | |
} | |
, | |
e.prototype.toString = function() { | |
return this.sliceString(0) | |
} | |
, | |
e.prototype.toJSON = function() { | |
var e = []; | |
return this.flatten(e), | |
e | |
} | |
, | |
e.of = function(t) { | |
if (0 == t.length) | |
throw new RangeError("A document must have at least one line"); | |
return 1 != t.length || t[0] ? t.length <= 32 ? new U(t) : _.from(U.split(t, [])) : e.empty | |
} | |
, | |
e | |
}() | |
, U = function(e) { | |
function t(t, n) { | |
void 0 === n && (n = function(e) { | |
for (var t = -1, n = 0, i = e; n < i.length; n++) { | |
t += i[n].length + 1 | |
} | |
return t | |
}(t)); | |
var i = e.call(this) || this; | |
return i.text = t, | |
i.length = n, | |
i | |
} | |
return f(t, e), | |
Object.defineProperty(t.prototype, "lines", { | |
get: function() { | |
return this.text.length | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
Object.defineProperty(t.prototype, "children", { | |
get: function() { | |
return null | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
t.prototype.lineInner = function(e, t, n, i) { | |
for (var r = 0; ; r++) { | |
var o = this.text[r] | |
, a = i + o.length; | |
if ((t ? n : a) >= e) | |
return new Z(i,a,n,o); | |
i = a + 1, | |
n++ | |
} | |
} | |
, | |
t.prototype.decompose = function(e, n, i, r) { | |
var o = e <= 0 && n >= this.length ? this : new t(j(this.text, e, n),Math.min(n, this.length) - Math.max(0, e)); | |
if (1 & r) { | |
var a = i.pop() | |
, s = W(o.text, a.text.slice(), 0, o.length); | |
if (s.length <= 32) | |
i.push(new t(s,a.length + o.length)); | |
else { | |
var l = s.length >> 1; | |
i.push(new t(s.slice(0, l)), new t(s.slice(l))) | |
} | |
} else | |
i.push(o) | |
} | |
, | |
t.prototype.replace = function(n, i, r) { | |
var o; | |
if (!(r instanceof t)) | |
return e.prototype.replace.call(this, n, i, r); | |
n = (o = X(this, n, i))[0], | |
i = o[1]; | |
var a = W(this.text, W(r.text, j(this.text, 0, n)), i) | |
, s = this.length + r.length - (i - n); | |
return a.length <= 32 ? new t(a,s) : _.from(t.split(a, []), s) | |
} | |
, | |
t.prototype.sliceString = function(e, t, n) { | |
var i; | |
void 0 === t && (t = this.length), | |
void 0 === n && (n = "\n"), | |
e = (i = X(this, e, t))[0], | |
t = i[1]; | |
for (var r = "", o = 0, a = 0; o <= t && a < this.text.length; a++) { | |
var s = this.text[a] | |
, l = o + s.length; | |
o > e && a && (r += n), | |
e < l && t > o && (r += s.slice(Math.max(0, e - o), t - o)), | |
o = l + 1 | |
} | |
return r | |
} | |
, | |
t.prototype.flatten = function(e) { | |
for (var t = 0, n = this.text; t < n.length; t++) { | |
var i = n[t]; | |
e.push(i) | |
} | |
} | |
, | |
t.prototype.scanIdentical = function() { | |
return 0 | |
} | |
, | |
t.split = function(e, n) { | |
for (var i = [], r = -1, o = 0, a = e; o < a.length; o++) { | |
var s = a[o]; | |
i.push(s), | |
r += s.length + 1, | |
32 == i.length && (n.push(new t(i,r)), | |
i = [], | |
r = -1) | |
} | |
return r > -1 && n.push(new t(i,r)), | |
n | |
} | |
, | |
t | |
}(q) | |
, _ = function(e) { | |
function t(t, n) { | |
var i = e.call(this) || this; | |
i.children = t, | |
i.length = n, | |
i.lines = 0; | |
for (var r = 0, o = t; r < o.length; r++) { | |
var a = o[r]; | |
i.lines += a.lines | |
} | |
return i | |
} | |
return f(t, e), | |
t.prototype.lineInner = function(e, t, n, i) { | |
for (var r = 0; ; r++) { | |
var o = this.children[r] | |
, a = i + o.length | |
, s = n + o.lines - 1; | |
if ((t ? s : a) >= e) | |
return o.lineInner(e, t, n, i); | |
i = a + 1, | |
n = s + 1 | |
} | |
} | |
, | |
t.prototype.decompose = function(e, t, n, i) { | |
for (var r = 0, o = 0; o <= t && r < this.children.length; r++) { | |
var a = this.children[r] | |
, s = o + a.length; | |
if (e <= s && t >= o) { | |
var l = i & ((o <= e ? 1 : 0) | (s >= t ? 2 : 0)); | |
o >= e && s <= t && !l ? n.push(a) : a.decompose(e - o, t - o, n, l) | |
} | |
o = s + 1 | |
} | |
} | |
, | |
t.prototype.replace = function(n, i, r) { | |
var o; | |
if (n = (o = X(this, n, i))[0], | |
i = o[1], | |
r.lines < this.lines) | |
for (var a = 0, s = 0; a < this.children.length; a++) { | |
var l = this.children[a] | |
, c = s + l.length; | |
if (n >= s && i <= c) { | |
var u = l.replace(n - s, i - s, r) | |
, h = this.lines - l.lines + u.lines; | |
if (u.lines < h >> 4 && u.lines > h >> 6) { | |
var d = this.children.slice(); | |
return d[a] = u, | |
new t(d,this.length - (i - n) + r.length) | |
} | |
return e.prototype.replace.call(this, s, c, u) | |
} | |
s = c + 1 | |
} | |
return e.prototype.replace.call(this, n, i, r) | |
} | |
, | |
t.prototype.sliceString = function(e, t, n) { | |
var i; | |
void 0 === t && (t = this.length), | |
void 0 === n && (n = "\n"), | |
e = (i = X(this, e, t))[0], | |
t = i[1]; | |
for (var r = "", o = 0, a = 0; o < this.children.length && a <= t; o++) { | |
var s = this.children[o] | |
, l = a + s.length; | |
a > e && o && (r += n), | |
e < l && t > a && (r += s.sliceString(e - a, t - a, n)), | |
a = l + 1 | |
} | |
return r | |
} | |
, | |
t.prototype.flatten = function(e) { | |
for (var t = 0, n = this.children; t < n.length; t++) { | |
n[t].flatten(e) | |
} | |
} | |
, | |
t.prototype.scanIdentical = function(e, n) { | |
if (!(e instanceof t)) | |
return 0; | |
for (var i = 0, r = n > 0 ? [0, 0, this.children.length, e.children.length] : [this.children.length - 1, e.children.length - 1, -1, -1], o = r[0], a = r[1], s = r[2], l = r[3]; ; o += n, | |
a += n) { | |
if (o == s || a == l) | |
return i; | |
var c = this.children[o] | |
, u = e.children[a]; | |
if (c != u) | |
return i + c.scanIdentical(u, n); | |
i += c.length + 1 | |
} | |
} | |
, | |
t.from = function(e, n) { | |
void 0 === n && (n = e.reduce((function(e, t) { | |
return e + t.length + 1 | |
} | |
), -1)); | |
for (var i = 0, r = 0, o = e; r < o.length; r++) { | |
i += o[r].lines | |
} | |
if (i < 32) { | |
for (var a = [], s = 0, l = e; s < l.length; s++) { | |
l[s].flatten(a) | |
} | |
return new U(a,n) | |
} | |
var c = Math.max(32, i >> 5) | |
, u = c << 1 | |
, h = c >> 1 | |
, d = [] | |
, p = 0 | |
, f = -1 | |
, m = []; | |
function v(e) { | |
var n; | |
if (e.lines > u && e instanceof t) | |
for (var i = 0, r = e.children; i < r.length; i++) { | |
v(r[i]) | |
} | |
else | |
e.lines > h && (p > h || !p) ? (g(), | |
d.push(e)) : e instanceof U && p && (n = m[m.length - 1])instanceof U && e.lines + n.lines <= 32 ? (p += e.lines, | |
f += e.length + 1, | |
m[m.length - 1] = new U(n.text.concat(e.text),n.length + 1 + e.length)) : (p + e.lines > c && g(), | |
p += e.lines, | |
f += e.length + 1, | |
m.push(e)) | |
} | |
function g() { | |
0 != p && (d.push(1 == m.length ? m[0] : t.from(m, f)), | |
f = -1, | |
p = m.length = 0) | |
} | |
for (var y = 0, b = e; y < b.length; y++) { | |
v(b[y]) | |
} | |
return g(), | |
1 == d.length ? d[0] : new t(d,n) | |
} | |
, | |
t | |
}(q); | |
function W(e, t, n, i) { | |
void 0 === n && (n = 0), | |
void 0 === i && (i = 1e9); | |
for (var r = 0, o = 0, a = !0; o < e.length && r <= i; o++) { | |
var s = e[o] | |
, l = r + s.length; | |
l >= n && (l > i && (s = s.slice(0, i - r)), | |
r < n && (s = s.slice(n - r)), | |
a ? (t[t.length - 1] += s, | |
a = !1) : t.push(s)), | |
r = l + 1 | |
} | |
return t | |
} | |
function j(e, t, n) { | |
return W(e, [""], t, n) | |
} | |
q.empty = new U([""],0); | |
var G = function() { | |
function e(e, t) { | |
void 0 === t && (t = 1), | |
this.dir = t, | |
this.done = !1, | |
this.lineBreak = !1, | |
this.value = "", | |
this.nodes = [e], | |
this.offsets = [t > 0 ? 1 : (e instanceof U ? e.text.length : e.children.length) << 1] | |
} | |
return e.prototype.nextInner = function(e, t) { | |
for (this.done = this.lineBreak = !1; ; ) { | |
var n = this.nodes.length - 1 | |
, i = this.nodes[n] | |
, r = this.offsets[n] | |
, o = r >> 1 | |
, a = i instanceof U ? i.text.length : i.children.length; | |
if (o == (t > 0 ? a : 0)) { | |
if (0 == n) | |
return this.done = !0, | |
this.value = "", | |
this; | |
t > 0 && this.offsets[n - 1]++, | |
this.nodes.pop(), | |
this.offsets.pop() | |
} else if ((1 & r) == (t > 0 ? 0 : 1)) { | |
if (this.offsets[n] += t, | |
0 == e) | |
return this.lineBreak = !0, | |
this.value = "\n", | |
this; | |
e-- | |
} else if (i instanceof U) { | |
var s = i.text[o + (t < 0 ? -1 : 0)]; | |
if (this.offsets[n] += t, | |
s.length > Math.max(0, e)) | |
return this.value = 0 == e ? s : t > 0 ? s.slice(e) : s.slice(0, s.length - e), | |
this; | |
e -= s.length | |
} else { | |
e > (s = i.children[o + (t < 0 ? -1 : 0)]).length ? (e -= s.length, | |
this.offsets[n] += t) : (t < 0 && this.offsets[n]--, | |
this.nodes.push(s), | |
this.offsets.push(t > 0 ? 1 : (s instanceof U ? s.text.length : s.children.length) << 1)) | |
} | |
} | |
} | |
, | |
e.prototype.next = function(e) { | |
return void 0 === e && (e = 0), | |
e < 0 && (this.nextInner(-e, -this.dir), | |
e = this.value.length), | |
this.nextInner(e, this.dir) | |
} | |
, | |
e | |
}() | |
, K = function() { | |
function e(e, t, n) { | |
this.value = "", | |
this.done = !1, | |
this.cursor = new G(e,t > n ? -1 : 1), | |
this.pos = t > n ? e.length : 0, | |
this.from = Math.min(t, n), | |
this.to = Math.max(t, n) | |
} | |
return e.prototype.nextInner = function(e, t) { | |
if (t < 0 ? this.pos <= this.from : this.pos >= this.to) | |
return this.value = "", | |
this.done = !0, | |
this; | |
e += Math.max(0, t < 0 ? this.pos - this.to : this.from - this.pos); | |
var n = t < 0 ? this.pos - this.from : this.to - this.pos; | |
e > n && (e = n), | |
n -= e; | |
var i = this.cursor.next(e).value; | |
return this.pos += (i.length + e) * t, | |
this.value = i.length <= n ? i : t < 0 ? i.slice(i.length - n) : i.slice(0, n), | |
this.done = !this.value, | |
this | |
} | |
, | |
e.prototype.next = function(e) { | |
return void 0 === e && (e = 0), | |
e < 0 ? e = Math.max(e, this.from - this.pos) : e > 0 && (e = Math.min(e, this.to - this.pos)), | |
this.nextInner(e, this.cursor.dir) | |
} | |
, | |
Object.defineProperty(e.prototype, "lineBreak", { | |
get: function() { | |
return this.cursor.lineBreak && "" != this.value | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
e | |
}() | |
, Y = function() { | |
function e(e) { | |
this.inner = e, | |
this.afterBreak = !0, | |
this.value = "", | |
this.done = !1 | |
} | |
return e.prototype.next = function(e) { | |
void 0 === e && (e = 0); | |
var t = this.inner.next(e) | |
, n = t.done | |
, i = t.lineBreak | |
, r = t.value; | |
return n && this.afterBreak ? (this.value = "", | |
this.afterBreak = !1) : n ? (this.done = !0, | |
this.value = "") : i ? this.afterBreak ? this.value = "" : (this.afterBreak = !0, | |
this.next()) : (this.value = r, | |
this.afterBreak = !1), | |
this | |
} | |
, | |
Object.defineProperty(e.prototype, "lineBreak", { | |
get: function() { | |
return !1 | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
e | |
}(); | |
"undefined" != typeof Symbol && (q.prototype[Symbol.iterator] = function() { | |
return this.iter() | |
} | |
, | |
G.prototype[Symbol.iterator] = K.prototype[Symbol.iterator] = Y.prototype[Symbol.iterator] = function() { | |
return this | |
} | |
); | |
var Z = function() { | |
function e(e, t, n, i) { | |
this.from = e, | |
this.to = t, | |
this.number = n, | |
this.text = i | |
} | |
return Object.defineProperty(e.prototype, "length", { | |
get: function() { | |
return this.to - this.from | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
e | |
}(); | |
function X(e, t, n) { | |
return [t = Math.max(0, Math.min(e.length, t)), Math.max(t, Math.min(e.length, n))] | |
} | |
function $(e, t, n, i) { | |
return void 0 === n && (n = !0), | |
void 0 === i && (i = !0), | |
O(e, t, n, i) | |
} | |
function Q(e, t) { | |
var n, i = e.charCodeAt(t); | |
if (!(n = i, | |
n >= 55296 && n < 56320 && t + 1 != e.length)) | |
return i; | |
var r = e.charCodeAt(t + 1); | |
return function(e) { | |
return e >= 56320 && e < 57344 | |
}(r) ? r - 56320 + (i - 55296 << 10) + 65536 : i | |
} | |
function J(e) { | |
return e <= 65535 ? String.fromCharCode(e) : (e -= 65536, | |
String.fromCharCode(55296 + (e >> 10), 56320 + (1023 & e))) | |
} | |
function ee(e) { | |
return e < 65536 ? 1 : 2 | |
} | |
var te = /\r\n?|\n/ | |
, ne = function(e) { | |
return e[e.Simple = 0] = "Simple", | |
e[e.TrackDel = 1] = "TrackDel", | |
e[e.TrackBefore = 2] = "TrackBefore", | |
e[e.TrackAfter = 3] = "TrackAfter", | |
e | |
}(ne || (ne = {})) | |
, ie = function() { | |
function e(e) { | |
this.sections = e | |
} | |
return Object.defineProperty(e.prototype, "length", { | |
get: function() { | |
for (var e = 0, t = 0; t < this.sections.length; t += 2) | |
e += this.sections[t]; | |
return e | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
Object.defineProperty(e.prototype, "newLength", { | |
get: function() { | |
for (var e = 0, t = 0; t < this.sections.length; t += 2) { | |
var n = this.sections[t + 1]; | |
e += n < 0 ? this.sections[t] : n | |
} | |
return e | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
Object.defineProperty(e.prototype, "empty", { | |
get: function() { | |
return 0 == this.sections.length || 2 == this.sections.length && this.sections[1] < 0 | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
e.prototype.iterGaps = function(e) { | |
for (var t = 0, n = 0, i = 0; t < this.sections.length; ) { | |
var r = this.sections[t++] | |
, o = this.sections[t++]; | |
o < 0 ? (e(n, i, r), | |
i += r) : i += o, | |
n += r | |
} | |
} | |
, | |
e.prototype.iterChangedRanges = function(e, t) { | |
void 0 === t && (t = !1), | |
se(this, e, t) | |
} | |
, | |
Object.defineProperty(e.prototype, "invertedDesc", { | |
get: function() { | |
for (var t = [], n = 0; n < this.sections.length; ) { | |
var i = this.sections[n++] | |
, r = this.sections[n++]; | |
r < 0 ? t.push(i, r) : t.push(r, i) | |
} | |
return new e(t) | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
e.prototype.composeDesc = function(e) { | |
return this.empty ? e : e.empty ? this : ce(this, e) | |
} | |
, | |
e.prototype.mapDesc = function(e, t) { | |
return void 0 === t && (t = !1), | |
e.empty ? this : le(this, e, t) | |
} | |
, | |
e.prototype.mapPos = function(e, t, n) { | |
void 0 === t && (t = -1), | |
void 0 === n && (n = ne.Simple); | |
for (var i = 0, r = 0, o = 0; o < this.sections.length; ) { | |
var a = this.sections[o++] | |
, s = this.sections[o++] | |
, l = i + a; | |
if (s < 0) { | |
if (l > e) | |
return r + (e - i); | |
r += a | |
} else { | |
if (n != ne.Simple && l >= e && (n == ne.TrackDel && i < e && l > e || n == ne.TrackBefore && i < e || n == ne.TrackAfter && l > e)) | |
return null; | |
if (l > e || l == e && t < 0 && !a) | |
return e == i || t < 0 ? r : r + s; | |
r += s | |
} | |
i = l | |
} | |
if (e > i) | |
throw new RangeError("Position ".concat(e, " is out of range for changeset of length ").concat(i)); | |
return r | |
} | |
, | |
e.prototype.touchesRange = function(e, t) { | |
void 0 === t && (t = e); | |
for (var n = 0, i = 0; n < this.sections.length && i <= t; ) { | |
var r = i + this.sections[n++]; | |
if (this.sections[n++] >= 0 && i <= t && r >= e) | |
return !(i < e && r > t) || "cover"; | |
i = r | |
} | |
return !1 | |
} | |
, | |
e.prototype.toString = function() { | |
for (var e = "", t = 0; t < this.sections.length; ) { | |
var n = this.sections[t++] | |
, i = this.sections[t++]; | |
e += (e ? " " : "") + n + (i >= 0 ? ":" + i : "") | |
} | |
return e | |
} | |
, | |
e.prototype.toJSON = function() { | |
return this.sections | |
} | |
, | |
e.fromJSON = function(t) { | |
if (!Array.isArray(t) || t.length % 2 || t.some((function(e) { | |
return "number" != typeof e | |
} | |
))) | |
throw new RangeError("Invalid JSON representation of ChangeDesc"); | |
return new e(t) | |
} | |
, | |
e.create = function(t) { | |
return new e(t) | |
} | |
, | |
e | |
}() | |
, re = function(e) { | |
function t(t, n) { | |
var i = e.call(this, t) || this; | |
return i.inserted = n, | |
i | |
} | |
return f(t, e), | |
t.prototype.apply = function(e) { | |
if (this.length != e.length) | |
throw new RangeError("Applying change set to a document with the wrong length"); | |
return se(this, (function(t, n, i, r, o) { | |
return e = e.replace(i, i + (n - t), o) | |
} | |
), !1), | |
e | |
} | |
, | |
t.prototype.mapDesc = function(e, t) { | |
return void 0 === t && (t = !1), | |
le(this, e, t, !0) | |
} | |
, | |
t.prototype.invert = function(e) { | |
for (var n = this.sections.slice(), i = [], r = 0, o = 0; r < n.length; r += 2) { | |
var a = n[r] | |
, s = n[r + 1]; | |
if (s >= 0) { | |
n[r] = s, | |
n[r + 1] = a; | |
for (var l = r >> 1; i.length < l; ) | |
i.push(q.empty); | |
i.push(a ? e.slice(o, o + a) : q.empty) | |
} | |
o += a | |
} | |
return new t(n,i) | |
} | |
, | |
t.prototype.compose = function(e) { | |
return this.empty ? e : e.empty ? this : ce(this, e, !0) | |
} | |
, | |
t.prototype.map = function(e, t) { | |
return void 0 === t && (t = !1), | |
e.empty ? this : le(this, e, t, !0) | |
} | |
, | |
t.prototype.iterChanges = function(e, t) { | |
void 0 === t && (t = !1), | |
se(this, e, t) | |
} | |
, | |
Object.defineProperty(t.prototype, "desc", { | |
get: function() { | |
return ie.create(this.sections) | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
t.prototype.filter = function(e) { | |
var n = [] | |
, i = [] | |
, r = [] | |
, o = new ue(this); | |
e: for (var a = 0, s = 0; ; ) { | |
for (var l = a == e.length ? 1e9 : e[a++]; s < l || s == l && 0 == o.len; ) { | |
if (o.done) | |
break e; | |
oe(r, h = Math.min(o.len, l - s), -1); | |
var c = -1 == o.ins ? -1 : 0 == o.off ? o.ins : 0; | |
oe(n, h, c), | |
c > 0 && ae(i, n, o.text), | |
o.forward(h), | |
s += h | |
} | |
for (var u = e[a++]; s < u; ) { | |
if (o.done) | |
break e; | |
var h; | |
oe(n, h = Math.min(o.len, u - s), -1), | |
oe(r, h, -1 == o.ins ? -1 : 0 == o.off ? o.ins : 0), | |
o.forward(h), | |
s += h | |
} | |
} | |
return { | |
changes: new t(n,i), | |
filtered: ie.create(r) | |
} | |
} | |
, | |
t.prototype.toJSON = function() { | |
for (var e = [], t = 0; t < this.sections.length; t += 2) { | |
var n = this.sections[t] | |
, i = this.sections[t + 1]; | |
i < 0 ? e.push(n) : 0 == i ? e.push([n]) : e.push([n].concat(this.inserted[t >> 1].toJSON())) | |
} | |
return e | |
} | |
, | |
t.of = function(e, n, i) { | |
var r = [] | |
, o = [] | |
, a = 0 | |
, s = null; | |
function l(e) { | |
if (void 0 === e && (e = !1), | |
e || r.length) { | |
a < n && oe(r, n - a, -1); | |
var i = new t(r,o); | |
s = s ? s.compose(i.map(s)) : i, | |
r = [], | |
o = [], | |
a = 0 | |
} | |
} | |
return function e(c) { | |
if (Array.isArray(c)) | |
for (var u = 0, h = c; u < h.length; u++) { | |
e(h[u]) | |
} | |
else if (c instanceof t) { | |
if (c.length != n) | |
throw new RangeError("Mismatched change set length (got ".concat(c.length, ", expected ").concat(n, ")")); | |
l(), | |
s = s ? s.compose(c.map(s)) : c | |
} else { | |
var d = c.from | |
, p = c.to | |
, f = void 0 === p ? d : p | |
, m = c.insert; | |
if (d > f || d < 0 || f > n) | |
throw new RangeError("Invalid change range ".concat(d, " to ").concat(f, " (in doc of length ").concat(n, ")")); | |
var v = m ? "string" == typeof m ? q.of(m.split(i || te)) : m : q.empty | |
, g = v.length; | |
if (d == f && 0 == g) | |
return; | |
d < a && l(), | |
d > a && oe(r, d - a, -1), | |
oe(r, f - d, g), | |
ae(o, r, v), | |
a = f | |
} | |
}(e), | |
l(!s), | |
s | |
} | |
, | |
t.empty = function(e) { | |
return new t(e ? [e, -1] : [],[]) | |
} | |
, | |
t.fromJSON = function(e) { | |
if (!Array.isArray(e)) | |
throw new RangeError("Invalid JSON representation of ChangeSet"); | |
for (var n = [], i = [], r = 0; r < e.length; r++) { | |
var o = e[r]; | |
if ("number" == typeof o) | |
n.push(o, -1); | |
else { | |
if (!Array.isArray(o) || "number" != typeof o[0] || o.some((function(e, t) { | |
return t && "string" != typeof e | |
} | |
))) | |
throw new RangeError("Invalid JSON representation of ChangeSet"); | |
if (1 == o.length) | |
n.push(o[0], 0); | |
else { | |
for (; i.length < r; ) | |
i.push(q.empty); | |
i[r] = q.of(o.slice(1)), | |
n.push(o[0], i[r].length) | |
} | |
} | |
} | |
return new t(n,i) | |
} | |
, | |
t.createSet = function(e, n) { | |
return new t(e,n) | |
} | |
, | |
t | |
}(ie); | |
function oe(e, t, n, i) { | |
if (void 0 === i && (i = !1), | |
!(0 == t && n <= 0)) { | |
var r = e.length - 2; | |
r >= 0 && n <= 0 && n == e[r + 1] ? e[r] += t : r >= 0 && 0 == t && 0 == e[r] ? e[r + 1] += n : i ? (e[r] += t, | |
e[r + 1] += n) : e.push(t, n) | |
} | |
} | |
function ae(e, t, n) { | |
if (0 != n.length) { | |
var i = t.length - 2 >> 1; | |
if (i < e.length) | |
e[e.length - 1] = e[e.length - 1].append(n); | |
else { | |
for (; e.length < i; ) | |
e.push(q.empty); | |
e.push(n) | |
} | |
} | |
} | |
function se(e, t, n) { | |
for (var i = e.inserted, r = 0, o = 0, a = 0; a < e.sections.length; ) { | |
var s = e.sections[a++] | |
, l = e.sections[a++]; | |
if (l < 0) | |
r += s, | |
o += s; | |
else { | |
for (var c = r, u = o, h = q.empty; c += s, | |
u += l, | |
l && i && (h = h.append(i[a - 2 >> 1])), | |
!(n || a == e.sections.length || e.sections[a + 1] < 0); ) | |
s = e.sections[a++], | |
l = e.sections[a++]; | |
t(r, c, o, u, h), | |
r = c, | |
o = u | |
} | |
} | |
} | |
function le(e, t, n, i) { | |
void 0 === i && (i = !1); | |
for (var r = [], o = i ? [] : null, a = new ue(e), s = new ue(t), l = -1; ; ) { | |
if (a.done && s.len || s.done && a.len) | |
throw new Error("Mismatched change set lengths"); | |
if (-1 == a.ins && -1 == s.ins) | |
oe(r, c = Math.min(a.len, s.len), -1), | |
a.forward(c), | |
s.forward(c); | |
else if (s.ins >= 0 && (a.ins < 0 || l == a.i || 0 == a.off && (s.len < a.len || s.len == a.len && !n))) { | |
var c = s.len; | |
for (oe(r, s.ins, -1); c; ) { | |
var u = Math.min(a.len, c); | |
a.ins >= 0 && l < a.i && a.len <= u && (oe(r, 0, a.ins), | |
o && ae(o, r, a.text), | |
l = a.i), | |
a.forward(u), | |
c -= u | |
} | |
s.next() | |
} else { | |
if (!(a.ins >= 0)) { | |
if (a.done && s.done) | |
return o ? re.createSet(r, o) : ie.create(r); | |
throw new Error("Mismatched change set lengths") | |
} | |
c = 0; | |
for (var h = a.len; h; ) | |
if (-1 == s.ins) { | |
c += u = Math.min(h, s.len), | |
h -= u, | |
s.forward(u) | |
} else { | |
if (!(0 == s.ins && s.len < h)) | |
break; | |
h -= s.len, | |
s.next() | |
} | |
oe(r, c, l < a.i ? a.ins : 0), | |
o && l < a.i && ae(o, r, a.text), | |
l = a.i, | |
a.forward(a.len - h) | |
} | |
} | |
} | |
function ce(e, t, n) { | |
void 0 === n && (n = !1); | |
for (var i = [], r = n ? [] : null, o = new ue(e), a = new ue(t), s = !1; ; ) { | |
if (o.done && a.done) | |
return r ? re.createSet(i, r) : ie.create(i); | |
if (0 == o.ins) | |
oe(i, o.len, 0, s), | |
o.next(); | |
else if (0 != a.len || a.done) { | |
if (o.done || a.done) | |
throw new Error("Mismatched change set lengths"); | |
var l = Math.min(o.len2, a.len) | |
, c = i.length; | |
if (-1 == o.ins) { | |
var u = -1 == a.ins ? -1 : a.off ? 0 : a.ins; | |
oe(i, l, u, s), | |
r && u && ae(r, i, a.text) | |
} else | |
-1 == a.ins ? (oe(i, o.off ? 0 : o.len, l, s), | |
r && ae(r, i, o.textBit(l))) : (oe(i, o.off ? 0 : o.len, a.off ? 0 : a.ins, s), | |
r && !a.off && ae(r, i, a.text)); | |
s = (o.ins > l || a.ins >= 0 && a.len > l) && (s || i.length > c), | |
o.forward2(l), | |
a.forward(l) | |
} else | |
oe(i, 0, a.ins, s), | |
r && ae(r, i, a.text), | |
a.next() | |
} | |
} | |
var ue = function() { | |
function e(e) { | |
this.set = e, | |
this.i = 0, | |
this.next() | |
} | |
return e.prototype.next = function() { | |
var e = this.set.sections; | |
this.i < e.length ? (this.len = e[this.i++], | |
this.ins = e[this.i++]) : (this.len = 0, | |
this.ins = -2), | |
this.off = 0 | |
} | |
, | |
Object.defineProperty(e.prototype, "done", { | |
get: function() { | |
return -2 == this.ins | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
Object.defineProperty(e.prototype, "len2", { | |
get: function() { | |
return this.ins < 0 ? this.len : this.ins | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
Object.defineProperty(e.prototype, "text", { | |
get: function() { | |
var e = this.set.inserted | |
, t = this.i - 2 >> 1; | |
return t >= e.length ? q.empty : e[t] | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
e.prototype.textBit = function(e) { | |
var t = this.set.inserted | |
, n = this.i - 2 >> 1; | |
return n >= t.length && !e ? q.empty : t[n].slice(this.off, null == e ? void 0 : this.off + e) | |
} | |
, | |
e.prototype.forward = function(e) { | |
e == this.len ? this.next() : (this.len -= e, | |
this.off += e) | |
} | |
, | |
e.prototype.forward2 = function(e) { | |
-1 == this.ins ? this.forward(e) : e == this.ins ? this.next() : (this.ins -= e, | |
this.off += e) | |
} | |
, | |
e | |
}() | |
, he = function() { | |
function e(e, t, n) { | |
this.from = e, | |
this.to = t, | |
this.flags = n | |
} | |
return Object.defineProperty(e.prototype, "anchor", { | |
get: function() { | |
return 32 & this.flags ? this.to : this.from | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
Object.defineProperty(e.prototype, "head", { | |
get: function() { | |
return 32 & this.flags ? this.from : this.to | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
Object.defineProperty(e.prototype, "empty", { | |
get: function() { | |
return this.from == this.to | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
Object.defineProperty(e.prototype, "assoc", { | |
get: function() { | |
return 8 & this.flags ? -1 : 16 & this.flags ? 1 : 0 | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
Object.defineProperty(e.prototype, "bidiLevel", { | |
get: function() { | |
var e = 7 & this.flags; | |
return 7 == e ? null : e | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
Object.defineProperty(e.prototype, "goalColumn", { | |
get: function() { | |
var e = this.flags >> 6; | |
return 16777215 == e ? void 0 : e | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
e.prototype.map = function(t, n) { | |
var i, r; | |
return void 0 === n && (n = -1), | |
this.empty ? i = r = t.mapPos(this.from, n) : (i = t.mapPos(this.from, 1), | |
r = t.mapPos(this.to, -1)), | |
i == this.from && r == this.to ? this : new e(i,r,this.flags) | |
} | |
, | |
e.prototype.extend = function(e, t) { | |
if (void 0 === t && (t = e), | |
e <= this.anchor && t >= this.anchor) | |
return de.range(e, t); | |
var n = Math.abs(e - this.anchor) > Math.abs(t - this.anchor) ? e : t; | |
return de.range(this.anchor, n) | |
} | |
, | |
e.prototype.eq = function(e, t) { | |
return void 0 === t && (t = !1), | |
!(this.anchor != e.anchor || this.head != e.head || t && this.empty && this.assoc != e.assoc) | |
} | |
, | |
e.prototype.toJSON = function() { | |
return { | |
anchor: this.anchor, | |
head: this.head | |
} | |
} | |
, | |
e.fromJSON = function(e) { | |
if (!e || "number" != typeof e.anchor || "number" != typeof e.head) | |
throw new RangeError("Invalid JSON representation for SelectionRange"); | |
return de.range(e.anchor, e.head) | |
} | |
, | |
e.create = function(t, n, i) { | |
return new e(t,n,i) | |
} | |
, | |
e | |
}() | |
, de = function() { | |
function e(e, t) { | |
this.ranges = e, | |
this.mainIndex = t | |
} | |
return e.prototype.map = function(t, n) { | |
return void 0 === n && (n = -1), | |
t.empty ? this : e.create(this.ranges.map((function(e) { | |
return e.map(t, n) | |
} | |
)), this.mainIndex) | |
} | |
, | |
e.prototype.eq = function(e, t) { | |
if (void 0 === t && (t = !1), | |
this.ranges.length != e.ranges.length || this.mainIndex != e.mainIndex) | |
return !1; | |
for (var n = 0; n < this.ranges.length; n++) | |
if (!this.ranges[n].eq(e.ranges[n], t)) | |
return !1; | |
return !0 | |
} | |
, | |
Object.defineProperty(e.prototype, "main", { | |
get: function() { | |
return this.ranges[this.mainIndex] | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
e.prototype.asSingle = function() { | |
return 1 == this.ranges.length ? this : new e([this.main],0) | |
} | |
, | |
e.prototype.addRange = function(t, n) { | |
return void 0 === n && (n = !0), | |
e.create([t].concat(this.ranges), n ? 0 : this.mainIndex + 1) | |
} | |
, | |
e.prototype.replaceRange = function(t, n) { | |
void 0 === n && (n = this.mainIndex); | |
var i = this.ranges.slice(); | |
return i[n] = t, | |
e.create(i, this.mainIndex) | |
} | |
, | |
e.prototype.toJSON = function() { | |
return { | |
ranges: this.ranges.map((function(e) { | |
return e.toJSON() | |
} | |
)), | |
main: this.mainIndex | |
} | |
} | |
, | |
e.fromJSON = function(t) { | |
if (!t || !Array.isArray(t.ranges) || "number" != typeof t.main || t.main >= t.ranges.length) | |
throw new RangeError("Invalid JSON representation for EditorSelection"); | |
return new e(t.ranges.map((function(e) { | |
return he.fromJSON(e) | |
} | |
)),t.main) | |
} | |
, | |
e.single = function(t, n) { | |
return void 0 === n && (n = t), | |
new e([e.range(t, n)],0) | |
} | |
, | |
e.create = function(t, n) { | |
if (void 0 === n && (n = 0), | |
0 == t.length) | |
throw new RangeError("A selection needs at least one range"); | |
for (var i = 0, r = 0; r < t.length; r++) { | |
var o = t[r]; | |
if (o.empty ? o.from <= i : o.from < i) | |
return e.normalized(t.slice(), n); | |
i = o.to | |
} | |
return new e(t,n) | |
} | |
, | |
e.cursor = function(e, t, n, i) { | |
return void 0 === t && (t = 0), | |
he.create(e, e, (0 == t ? 0 : t < 0 ? 8 : 16) | (null == n ? 7 : Math.min(6, n)) | (null != i ? i : 16777215) << 6) | |
} | |
, | |
e.range = function(e, t, n, i) { | |
var r = (null != n ? n : 16777215) << 6 | (null == i ? 7 : Math.min(6, i)); | |
return t < e ? he.create(t, e, 48 | r) : he.create(e, t, (t > e ? 8 : 0) | r) | |
} | |
, | |
e.normalized = function(t, n) { | |
void 0 === n && (n = 0); | |
var i = t[n]; | |
t.sort((function(e, t) { | |
return e.from - t.from | |
} | |
)), | |
n = t.indexOf(i); | |
for (var r = 1; r < t.length; r++) { | |
var o = t[r] | |
, a = t[r - 1]; | |
if (o.empty ? o.from <= a.to : o.from < a.to) { | |
var s = a.from | |
, l = Math.max(o.to, a.to); | |
r <= n && n--, | |
t.splice(--r, 2, o.anchor > o.head ? e.range(l, s) : e.range(s, l)) | |
} | |
} | |
return new e(t,n) | |
} | |
, | |
e | |
}(); | |
function pe(e, t) { | |
for (var n = 0, i = e.ranges; n < i.length; n++) { | |
if (i[n].to > t) | |
throw new RangeError("Selection points outside of document") | |
} | |
} | |
var fe = 0 | |
, me = function() { | |
function e(e, t, n, i, r) { | |
this.combine = e, | |
this.compareInput = t, | |
this.compare = n, | |
this.isStatic = i, | |
this.id = fe++, | |
this.default = e([]), | |
this.extensions = "function" == typeof r ? r(this) : r | |
} | |
return Object.defineProperty(e.prototype, "reader", { | |
get: function() { | |
return this | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
e.define = function(t) { | |
return void 0 === t && (t = {}), | |
new e(t.combine || function(e) { | |
return e | |
} | |
,t.compareInput || function(e, t) { | |
return e === t | |
} | |
,t.compare || (t.combine ? function(e, t) { | |
return e === t | |
} | |
: ve),!!t.static,t.enables) | |
} | |
, | |
e.prototype.of = function(e) { | |
return new ge([],this,0,e) | |
} | |
, | |
e.prototype.compute = function(e, t) { | |
if (this.isStatic) | |
throw new Error("Can't compute a static facet"); | |
return new ge(e,this,1,t) | |
} | |
, | |
e.prototype.computeN = function(e, t) { | |
if (this.isStatic) | |
throw new Error("Can't compute a static facet"); | |
return new ge(e,this,2,t) | |
} | |
, | |
e.prototype.from = function(e, t) { | |
return t || (t = function(e) { | |
return e | |
} | |
), | |
this.compute([e], (function(n) { | |
return t(n.field(e)) | |
} | |
)) | |
} | |
, | |
e | |
}(); | |
function ve(e, t) { | |
return e == t || e.length == t.length && e.every((function(e, n) { | |
return e === t[n] | |
} | |
)) | |
} | |
var ge = function() { | |
function e(e, t, n, i) { | |
this.dependencies = e, | |
this.facet = t, | |
this.type = n, | |
this.value = i, | |
this.id = fe++ | |
} | |
return e.prototype.dynamicSlot = function(e) { | |
for (var t, n = this, i = this.value, r = this.facet.compareInput, o = this.id, a = e[o] >> 1, s = 2 == this.type, l = !1, c = !1, u = [], h = 0, d = this.dependencies; h < d.length; h++) { | |
var p = d[h]; | |
"doc" == p ? l = !0 : "selection" == p ? c = !0 : 1 & (null !== (t = e[p.id]) && void 0 !== t ? t : 1) || u.push(e[p.id]) | |
} | |
return { | |
create: function(e) { | |
return e.values[a] = i(e), | |
1 | |
}, | |
update: function(e, t) { | |
if (l && t.docChanged || c && (t.docChanged || t.selection) || be(e, u)) { | |
var n = i(e); | |
if (s ? !ye(n, e.values[a], r) : !r(n, e.values[a])) | |
return e.values[a] = n, | |
1 | |
} | |
return 0 | |
}, | |
reconfigure: function(e, t) { | |
var l, c = t.config.address[o]; | |
if (null != c) { | |
var u = Fe(t, c); | |
if (n.dependencies.every((function(n) { | |
return n instanceof me ? t.facet(n) === e.facet(n) : !(n instanceof ke) || t.field(n, !1) == e.field(n, !1) | |
} | |
)) || (s ? ye(l = i(e), u, r) : r(l = i(e), u))) | |
return e.values[a] = u, | |
0 | |
} else | |
l = i(e); | |
return e.values[a] = l, | |
1 | |
} | |
} | |
} | |
, | |
e | |
}(); | |
function ye(e, t, n) { | |
if (e.length != t.length) | |
return !1; | |
for (var i = 0; i < e.length; i++) | |
if (!n(e[i], t[i])) | |
return !1; | |
return !0 | |
} | |
function be(e, t) { | |
for (var n = !1, i = 0, r = t; i < r.length; i++) { | |
1 & Ie(e, r[i]) && (n = !0) | |
} | |
return n | |
} | |
var we = me.define({ | |
static: !0 | |
}) | |
, ke = function() { | |
function e(e, t, n, i, r) { | |
this.id = e, | |
this.createF = t, | |
this.updateF = n, | |
this.compareF = i, | |
this.spec = r, | |
this.provides = void 0 | |
} | |
return e.define = function(t) { | |
var n = new e(fe++,t.create,t.update,t.compare || function(e, t) { | |
return e === t | |
} | |
,t); | |
return t.provide && (n.provides = t.provide(n)), | |
n | |
} | |
, | |
e.prototype.create = function(e) { | |
var t = this | |
, n = e.facet(we).find((function(e) { | |
return e.field == t | |
} | |
)); | |
return ((null == n ? void 0 : n.create) || this.createF)(e) | |
} | |
, | |
e.prototype.slot = function(e) { | |
var t = this | |
, n = e[this.id] >> 1; | |
return { | |
create: function(e) { | |
return e.values[n] = t.create(e), | |
1 | |
}, | |
update: function(e, i) { | |
var r = e.values[n] | |
, o = t.updateF(r, i); | |
return t.compareF(r, o) ? 0 : (e.values[n] = o, | |
1) | |
}, | |
reconfigure: function(e, i) { | |
return null != i.config.address[t.id] ? (e.values[n] = i.field(t), | |
0) : (e.values[n] = t.create(e), | |
1) | |
} | |
} | |
} | |
, | |
e.prototype.init = function(e) { | |
return [this, we.of({ | |
field: this, | |
create: e | |
})] | |
} | |
, | |
Object.defineProperty(e.prototype, "extension", { | |
get: function() { | |
return this | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
e | |
}() | |
, Ce = 4 | |
, Me = 3 | |
, Ee = 2 | |
, Se = 1; | |
function xe(e) { | |
return function(t) { | |
return new De(t,e) | |
} | |
} | |
var Te = { | |
highest: xe(0), | |
high: xe(Se), | |
default: xe(Ee), | |
low: xe(Me), | |
lowest: xe(Ce) | |
} | |
, De = function(e, t) { | |
this.inner = e, | |
this.prec = t | |
} | |
, Ae = function() { | |
function e() {} | |
return e.prototype.of = function(e) { | |
return new Le(this,e) | |
} | |
, | |
e.prototype.reconfigure = function(t) { | |
return e.reconfigure.of({ | |
compartment: this, | |
extension: t | |
}) | |
} | |
, | |
e.prototype.get = function(e) { | |
return e.config.compartments.get(this) | |
} | |
, | |
e | |
}() | |
, Le = function(e, t) { | |
this.compartment = e, | |
this.inner = t | |
} | |
, Pe = function() { | |
function e(e, t, n, i, r, o) { | |
for (this.base = e, | |
this.compartments = t, | |
this.dynamicSlots = n, | |
this.address = i, | |
this.staticValues = r, | |
this.facets = o, | |
this.statusTemplate = []; this.statusTemplate.length < n.length; ) | |
this.statusTemplate.push(0) | |
} | |
return e.prototype.staticFacet = function(e) { | |
var t = this.address[e.id]; | |
return null == t ? e.default : this.staticValues[t >> 1] | |
} | |
, | |
e.resolve = function(t, n, i) { | |
for (var r = [], o = Object.create(null), a = new Map, s = 0, l = function(e, t, n) { | |
var i = [[], [], [], [], []] | |
, r = new Map; | |
function o(e, a) { | |
var s = r.get(e); | |
if (null != s) { | |
if (s <= a) | |
return; | |
var l = i[s].indexOf(e); | |
l > -1 && i[s].splice(l, 1), | |
e instanceof Le && n.delete(e.compartment) | |
} | |
if (r.set(e, a), | |
Array.isArray(e)) | |
for (var c = 0, u = e; c < u.length; c++) { | |
o(u[c], a) | |
} | |
else if (e instanceof Le) { | |
if (n.has(e.compartment)) | |
throw new RangeError("Duplicate use of compartment in extensions"); | |
var h = t.get(e.compartment) || e.inner; | |
n.set(e.compartment, h), | |
o(h, a) | |
} else if (e instanceof De) | |
o(e.inner, e.prec); | |
else if (e instanceof ke) | |
i[a].push(e), | |
e.provides && o(e.provides, a); | |
else if (e instanceof ge) | |
i[a].push(e), | |
e.facet.extensions && o(e.facet.extensions, Ee); | |
else { | |
if (!(h = e.extension)) | |
throw new Error("Unrecognized extension value in extension set (".concat(e, "). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.")); | |
o(h, a) | |
} | |
} | |
return o(e, Ee), | |
i.reduce((function(e, t) { | |
return e.concat(t) | |
} | |
)) | |
}(t, n, a); s < l.length; s++) { | |
var c = l[s]; | |
c instanceof ke ? r.push(c) : (o[c.facet.id] || (o[c.facet.id] = [])).push(c) | |
} | |
for (var u = Object.create(null), h = [], d = [], p = function(e) { | |
u[e.id] = d.length << 1, | |
d.push((function(t) { | |
return e.slot(t) | |
} | |
)) | |
}, f = 0, m = r; f < m.length; f++) { | |
p(m[f]) | |
} | |
var v = null == i ? void 0 : i.config.facets | |
, g = function(e) { | |
var t = o[e] | |
, n = t[0].facet | |
, r = v && v[e] || []; | |
if (t.every((function(e) { | |
return 0 == e.type | |
} | |
))) | |
if (u[n.id] = h.length << 1 | 1, | |
ve(r, t)) | |
h.push(i.facet(n)); | |
else { | |
var a = n.combine(t.map((function(e) { | |
return e.value | |
} | |
))); | |
h.push(i && n.compare(a, i.facet(n)) ? i.facet(n) : a) | |
} | |
else { | |
for (var s = function(e) { | |
0 == e.type ? (u[e.id] = h.length << 1 | 1, | |
h.push(e.value)) : (u[e.id] = d.length << 1, | |
d.push((function(t) { | |
return e.dynamicSlot(t) | |
} | |
))) | |
}, l = 0, c = t; l < c.length; l++) { | |
s(c[l]) | |
} | |
u[n.id] = d.length << 1, | |
d.push((function(e) { | |
return function(e, t, n) { | |
var i = n.map((function(t) { | |
return e[t.id] | |
} | |
)) | |
, r = n.map((function(e) { | |
return e.type | |
} | |
)) | |
, o = i.filter((function(e) { | |
return !(1 & e) | |
} | |
)) | |
, a = e[t.id] >> 1; | |
function s(e) { | |
for (var n = [], o = 0; o < i.length; o++) { | |
var a = Fe(e, i[o]); | |
if (2 == r[o]) | |
for (var s = 0, l = a; s < l.length; s++) { | |
var c = l[s]; | |
n.push(c) | |
} | |
else | |
n.push(a) | |
} | |
return t.combine(n) | |
} | |
return { | |
create: function(e) { | |
for (var t = 0, n = i; t < n.length; t++) | |
Ie(e, n[t]); | |
return e.values[a] = s(e), | |
1 | |
}, | |
update: function(e, n) { | |
if (!be(e, o)) | |
return 0; | |
var i = s(e); | |
return t.compare(i, e.values[a]) ? 0 : (e.values[a] = i, | |
1) | |
}, | |
reconfigure: function(e, r) { | |
var o = be(e, i) | |
, l = r.config.facets[t.id] | |
, c = r.facet(t); | |
if (l && !o && ve(n, l)) | |
return e.values[a] = c, | |
0; | |
var u = s(e); | |
return t.compare(u, c) ? (e.values[a] = c, | |
0) : (e.values[a] = u, | |
1) | |
} | |
} | |
}(e, n, t) | |
} | |
)) | |
} | |
}; | |
for (var y in o) | |
g(y); | |
return new e(t,a,d.map((function(e) { | |
return e(u) | |
} | |
)),u,h,o) | |
} | |
, | |
e | |
}(); | |
function Ie(e, t) { | |
if (1 & t) | |
return 2; | |
var n = t >> 1 | |
, i = e.status[n]; | |
if (4 == i) | |
throw new Error("Cyclic dependency between fields and/or facets"); | |
if (2 & i) | |
return i; | |
e.status[n] = 4; | |
var r = e.computeSlot(e, e.config.dynamicSlots[n]); | |
return e.status[n] = 2 | r | |
} | |
function Fe(e, t) { | |
return 1 & t ? e.config.staticValues[t >> 1] : e.values[t >> 1] | |
} | |
var Oe = me.define() | |
, Be = me.define({ | |
combine: function(e) { | |
return e.some((function(e) { | |
return e | |
} | |
)) | |
}, | |
static: !0 | |
}) | |
, Ne = me.define({ | |
combine: function(e) { | |
return e.length ? e[0] : void 0 | |
}, | |
static: !0 | |
}) | |
, Re = me.define() | |
, He = me.define() | |
, Ve = me.define() | |
, ze = me.define({ | |
combine: function(e) { | |
return !!e.length && e[0] | |
} | |
}) | |
, qe = function() { | |
function e(e, t) { | |
this.type = e, | |
this.value = t | |
} | |
return e.define = function() { | |
return new Ue | |
} | |
, | |
e | |
}() | |
, Ue = function() { | |
function e() {} | |
return e.prototype.of = function(e) { | |
return new qe(this,e) | |
} | |
, | |
e | |
}() | |
, _e = function() { | |
function e(e) { | |
this.map = e | |
} | |
return e.prototype.of = function(e) { | |
return new We(this,e) | |
} | |
, | |
e | |
}() | |
, We = function() { | |
function e(e, t) { | |
this.type = e, | |
this.value = t | |
} | |
return e.prototype.map = function(t) { | |
var n = this.type.map(this.value, t); | |
return void 0 === n ? void 0 : n == this.value ? this : new e(this.type,n) | |
} | |
, | |
e.prototype.is = function(e) { | |
return this.type == e | |
} | |
, | |
e.define = function(e) { | |
return void 0 === e && (e = {}), | |
new _e(e.map || function(e) { | |
return e | |
} | |
) | |
} | |
, | |
e.mapEffects = function(e, t) { | |
if (!e.length) | |
return e; | |
for (var n = [], i = 0, r = e; i < r.length; i++) { | |
var o = r[i].map(t); | |
o && n.push(o) | |
} | |
return n | |
} | |
, | |
e | |
}(); | |
We.reconfigure = We.define(), | |
We.appendConfig = We.define(); | |
var je = function() { | |
function e(t, n, i, r, o, a) { | |
this.startState = t, | |
this.changes = n, | |
this.selection = i, | |
this.effects = r, | |
this.annotations = o, | |
this.scrollIntoView = a, | |
this._doc = null, | |
this._state = null, | |
i && pe(i, n.newLength), | |
o.some((function(t) { | |
return t.type == e.time | |
} | |
)) || (this.annotations = o.concat(e.time.of(Date.now()))) | |
} | |
return e.create = function(t, n, i, r, o, a) { | |
return new e(t,n,i,r,o,a) | |
} | |
, | |
Object.defineProperty(e.prototype, "newDoc", { | |
get: function() { | |
return this._doc || (this._doc = this.changes.apply(this.startState.doc)) | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
Object.defineProperty(e.prototype, "newSelection", { | |
get: function() { | |
return this.selection || this.startState.selection.map(this.changes) | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
Object.defineProperty(e.prototype, "state", { | |
get: function() { | |
return this._state || this.startState.applyTransaction(this), | |
this._state | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
e.prototype.annotation = function(e) { | |
for (var t = 0, n = this.annotations; t < n.length; t++) { | |
var i = n[t]; | |
if (i.type == e) | |
return i.value | |
} | |
} | |
, | |
Object.defineProperty(e.prototype, "docChanged", { | |
get: function() { | |
return !this.changes.empty | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
Object.defineProperty(e.prototype, "reconfigured", { | |
get: function() { | |
return this.startState.config != this.state.config | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
e.prototype.isUserEvent = function(t) { | |
var n = this.annotation(e.userEvent); | |
return !(!n || !(n == t || n.length > t.length && n.slice(0, t.length) == t && "." == n[t.length])) | |
} | |
, | |
e | |
}(); | |
function Ge(e, t) { | |
for (var n = [], i = 0, r = 0; ; ) { | |
var o = void 0 | |
, a = void 0; | |
if (i < e.length && (r == t.length || t[r] >= e[i])) | |
o = e[i++], | |
a = e[i++]; | |
else { | |
if (!(r < t.length)) | |
return n; | |
o = t[r++], | |
a = t[r++] | |
} | |
!n.length || n[n.length - 1] < o ? n.push(o, a) : n[n.length - 1] < a && (n[n.length - 1] = a) | |
} | |
} | |
function Ke(e, t, n) { | |
var i, r, o, a; | |
return n ? (r = t.changes, | |
o = re.empty(t.changes.length), | |
a = e.changes.compose(t.changes)) : (r = t.changes.map(e.changes), | |
o = e.changes.mapDesc(t.changes, !0), | |
a = e.changes.compose(r)), | |
{ | |
changes: a, | |
selection: t.selection ? t.selection.map(o) : null === (i = e.selection) || void 0 === i ? void 0 : i.map(r), | |
effects: We.mapEffects(e.effects, r).concat(We.mapEffects(t.effects, o)), | |
annotations: e.annotations.length ? e.annotations.concat(t.annotations) : t.annotations, | |
scrollIntoView: e.scrollIntoView || t.scrollIntoView | |
} | |
} | |
function Ye(e, t, n) { | |
var i = t.selection | |
, r = $e(t.annotations); | |
return t.userEvent && (r = r.concat(je.userEvent.of(t.userEvent))), | |
{ | |
changes: t.changes instanceof re ? t.changes : re.of(t.changes || [], n, e.facet(Ne)), | |
selection: i && (i instanceof de ? i : de.single(i.anchor, i.head)), | |
effects: $e(t.effects), | |
annotations: r, | |
scrollIntoView: !!t.scrollIntoView | |
} | |
} | |
function Ze(e, t, n) { | |
var i = Ye(e, t.length ? t[0] : {}, e.doc.length); | |
t.length && !1 === t[0].filter && (n = !1); | |
for (var r = 1; r < t.length; r++) { | |
!1 === t[r].filter && (n = !1); | |
var o = !!t[r].sequential; | |
i = Ke(i, Ye(e, t[r], o ? i.changes.newLength : e.doc.length), o) | |
} | |
var a = je.create(e, i.changes, i.selection, i.effects, i.annotations, i.scrollIntoView); | |
return function(e) { | |
for (var t = e.startState, n = t.facet(Ve), i = e, r = n.length - 1; r >= 0; r--) { | |
var o = n[r](e); | |
o && Object.keys(o).length && (i = Ke(i, Ye(t, o, e.changes.newLength), !0)) | |
} | |
return i == e ? e : je.create(t, e.changes, e.selection, i.effects, i.annotations, i.scrollIntoView) | |
}(n ? function(e) { | |
for (var t = e.startState, n = !0, i = 0, r = t.facet(Re); i < r.length; i++) { | |
var o = (0, | |
r[i])(e); | |
if (!1 === o) { | |
n = !1; | |
break | |
} | |
Array.isArray(o) && (n = !0 === n ? o : Ge(n, o)) | |
} | |
if (!0 !== n) { | |
var a = void 0 | |
, s = void 0; | |
if (!1 === n) | |
s = e.changes.invertedDesc, | |
a = re.empty(t.doc.length); | |
else | |
a = (u = e.changes.filter(n)).changes, | |
s = u.filtered.mapDesc(u.changes).invertedDesc; | |
e = je.create(t, a, e.selection && e.selection.map(s), We.mapEffects(e.effects, s), e.annotations, e.scrollIntoView) | |
} | |
for (var l = t.facet(He), c = l.length - 1; c >= 0; c--) { | |
var u; | |
e = (u = l[c](e))instanceof je ? u : Array.isArray(u) && 1 == u.length && u[0]instanceof je ? u[0] : Ze(t, $e(u), !1) | |
} | |
return e | |
}(a) : a) | |
} | |
je.time = qe.define(), | |
je.userEvent = qe.define(), | |
je.addToHistory = qe.define(), | |
je.remote = qe.define(); | |
var Xe = []; | |
function $e(e) { | |
return null == e ? Xe : Array.isArray(e) ? e : [e] | |
} | |
var Qe, Je = function(e) { | |
return e[e.Word = 0] = "Word", | |
e[e.Space = 1] = "Space", | |
e[e.Other = 2] = "Other", | |
e | |
}(Je || (Je = {})), et = /[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/; | |
try { | |
Qe = new RegExp("[\\p{Alphabetic}\\p{Number}_]","u") | |
} catch (e) {} | |
function tt(e) { | |
return function(t) { | |
if (!/\S/.test(t)) | |
return Je.Space; | |
if (function(e) { | |
if (Qe) | |
return Qe.test(e); | |
for (var t = 0; t < e.length; t++) { | |
var n = e[t]; | |
if (/\w/.test(n) || n > "" && (n.toUpperCase() != n.toLowerCase() || et.test(n))) | |
return !0 | |
} | |
return !1 | |
}(t)) | |
return Je.Word; | |
for (var n = 0; n < e.length; n++) | |
if (t.indexOf(e[n]) > -1) | |
return Je.Word; | |
return Je.Other | |
} | |
} | |
var nt = function() { | |
function e(e, t, n, i, r, o) { | |
this.config = e, | |
this.doc = t, | |
this.selection = n, | |
this.values = i, | |
this.status = e.statusTemplate.slice(), | |
this.computeSlot = r, | |
o && (o._state = this); | |
for (var a = 0; a < this.config.dynamicSlots.length; a++) | |
Ie(this, a << 1); | |
this.computeSlot = null | |
} | |
return e.prototype.field = function(e, t) { | |
void 0 === t && (t = !0); | |
var n = this.config.address[e.id]; | |
if (null != n) | |
return Ie(this, n), | |
Fe(this, n); | |
if (t) | |
throw new RangeError("Field is not present in this state") | |
} | |
, | |
e.prototype.update = function() { | |
for (var e = [], t = 0; t < arguments.length; t++) | |
e[t] = arguments[t]; | |
return Ze(this, e, !0) | |
} | |
, | |
e.prototype.applyTransaction = function(t) { | |
for (var n, i = this, r = this.config, o = r.base, a = r.compartments, s = 0, l = t.effects; s < l.length; s++) { | |
var c = l[s]; | |
c.is(Ae.reconfigure) ? (r && (a = new Map, | |
r.compartments.forEach((function(e, t) { | |
return a.set(t, e) | |
} | |
)), | |
r = null), | |
a.set(c.value.compartment, c.value.extension)) : c.is(We.reconfigure) ? (r = null, | |
o = c.value) : c.is(We.appendConfig) && (r = null, | |
o = $e(o).concat(c.value)) | |
} | |
r ? n = t.startState.values.slice() : n = new e(r = Pe.resolve(o, a, this),this.doc,this.selection,r.dynamicSlots.map((function() { | |
return null | |
} | |
)),(function(e, t) { | |
return t.reconfigure(e, i) | |
} | |
),null).values; | |
var u = t.startState.facet(Be) ? t.newSelection : t.newSelection.asSingle(); | |
new e(r,t.newDoc,u,n,(function(e, n) { | |
return n.update(e, t) | |
} | |
),t) | |
} | |
, | |
e.prototype.replaceSelection = function(e) { | |
return "string" == typeof e && (e = this.toText(e)), | |
this.changeByRange((function(t) { | |
return { | |
changes: { | |
from: t.from, | |
to: t.to, | |
insert: e | |
}, | |
range: de.cursor(t.from + e.length) | |
} | |
} | |
)) | |
} | |
, | |
e.prototype.changeByRange = function(e) { | |
for (var t = this.selection, n = e(t.ranges[0]), i = this.changes(n.changes), r = [n.range], o = $e(n.effects), a = 1; a < t.ranges.length; a++) { | |
for (var s = e(t.ranges[a]), l = this.changes(s.changes), c = l.map(i), u = 0; u < a; u++) | |
r[u] = r[u].map(c); | |
var h = i.mapDesc(l, !0); | |
r.push(s.range.map(h)), | |
i = i.compose(c), | |
o = We.mapEffects(o, c).concat(We.mapEffects($e(s.effects), h)) | |
} | |
return { | |
changes: i, | |
selection: de.create(r, t.mainIndex), | |
effects: o | |
} | |
} | |
, | |
e.prototype.changes = function(t) { | |
return void 0 === t && (t = []), | |
t instanceof re ? t : re.of(t, this.doc.length, this.facet(e.lineSeparator)) | |
} | |
, | |
e.prototype.toText = function(t) { | |
return q.of(t.split(this.facet(e.lineSeparator) || te)) | |
} | |
, | |
e.prototype.sliceDoc = function(e, t) { | |
return void 0 === e && (e = 0), | |
void 0 === t && (t = this.doc.length), | |
this.doc.sliceString(e, t, this.lineBreak) | |
} | |
, | |
e.prototype.facet = function(e) { | |
var t = this.config.address[e.id]; | |
return null == t ? e.default : (Ie(this, t), | |
Fe(this, t)) | |
} | |
, | |
e.prototype.toJSON = function(e) { | |
var t = { | |
doc: this.sliceDoc(), | |
selection: this.selection.toJSON() | |
}; | |
if (e) | |
for (var n in e) { | |
var i = e[n]; | |
i instanceof ke && null != this.config.address[i.id] && (t[n] = i.spec.toJSON(this.field(e[n]), this)) | |
} | |
return t | |
} | |
, | |
e.fromJSON = function(t, n, i) { | |
if (void 0 === n && (n = {}), | |
!t || "string" != typeof t.doc) | |
throw new RangeError("Invalid JSON representation for EditorState"); | |
var r = []; | |
if (i) { | |
var o = function(e) { | |
if (Object.prototype.hasOwnProperty.call(t, e)) { | |
var n = i[e] | |
, o = t[e]; | |
r.push(n.init((function(e) { | |
return n.spec.fromJSON(o, e) | |
} | |
))) | |
} | |
}; | |
for (var a in i) | |
o(a) | |
} | |
return e.create({ | |
doc: t.doc, | |
selection: de.fromJSON(t.selection), | |
extensions: n.extensions ? r.concat([n.extensions]) : r | |
}) | |
} | |
, | |
e.create = function(t) { | |
void 0 === t && (t = {}); | |
var n = Pe.resolve(t.extensions || [], new Map) | |
, i = t.doc instanceof q ? t.doc : q.of((t.doc || "").split(n.staticFacet(e.lineSeparator) || te)) | |
, r = t.selection ? t.selection instanceof de ? t.selection : de.single(t.selection.anchor, t.selection.head) : de.single(0); | |
return pe(r, i.length), | |
n.staticFacet(Be) || (r = r.asSingle()), | |
new e(n,i,r,n.dynamicSlots.map((function() { | |
return null | |
} | |
)),(function(e, t) { | |
return t.create(e) | |
} | |
),null) | |
} | |
, | |
Object.defineProperty(e.prototype, "tabSize", { | |
get: function() { | |
return this.facet(e.tabSize) | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
Object.defineProperty(e.prototype, "lineBreak", { | |
get: function() { | |
return this.facet(e.lineSeparator) || "\n" | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
Object.defineProperty(e.prototype, "readOnly", { | |
get: function() { | |
return this.facet(ze) | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
e.prototype.phrase = function(t) { | |
for (var n = [], i = 1; i < arguments.length; i++) | |
n[i - 1] = arguments[i]; | |
for (var r = 0, o = this.facet(e.phrases); r < o.length; r++) { | |
var a = o[r]; | |
if (Object.prototype.hasOwnProperty.call(a, t)) { | |
t = a[t]; | |
break | |
} | |
} | |
return n.length && (t = t.replace(/\$(\$|\d*)/g, (function(e, t) { | |
if ("$" == t) | |
return "$"; | |
var i = +(t || 1); | |
return !i || i > n.length ? e : n[i - 1] | |
} | |
))), | |
t | |
} | |
, | |
e.prototype.languageDataAt = function(e, t, n) { | |
void 0 === n && (n = -1); | |
for (var i = [], r = 0, o = this.facet(Oe); r < o.length; r++) | |
for (var a = 0, s = (0, | |
o[r])(this, t, n); a < s.length; a++) { | |
var l = s[a]; | |
Object.prototype.hasOwnProperty.call(l, e) && i.push(l[e]) | |
} | |
return i | |
} | |
, | |
e.prototype.charCategorizer = function(e) { | |
return tt(this.languageDataAt("wordChars", e).join("")) | |
} | |
, | |
e.prototype.wordAt = function(e) { | |
for (var t = this.doc.lineAt(e), n = t.text, i = t.from, r = t.length, o = this.charCategorizer(e), a = e - i, s = e - i; a > 0; ) { | |
var l = $(n, a, !1); | |
if (o(n.slice(l, a)) != Je.Word) | |
break; | |
a = l | |
} | |
for (; s < r; ) { | |
var c = $(n, s); | |
if (o(n.slice(s, c)) != Je.Word) | |
break; | |
s = c | |
} | |
return a == s ? null : de.range(a + i, s + i) | |
} | |
, | |
e | |
}(); | |
function it(e, t, n) { | |
void 0 === n && (n = {}); | |
for (var i = {}, r = 0, o = e; r < o.length; r++) | |
for (var a = o[r], s = 0, l = Object.keys(a); s < l.length; s++) { | |
var c = a[h = l[s]] | |
, u = i[h]; | |
if (void 0 === u) | |
i[h] = c; | |
else if (u === c || void 0 === c) | |
; | |
else { | |
if (!Object.hasOwnProperty.call(n, h)) | |
throw new Error("Config merge conflict for field " + h); | |
i[h] = n[h](u, c) | |
} | |
} | |
for (var h in t) | |
void 0 === i[h] && (i[h] = t[h]); | |
return i | |
} | |
nt.allowMultipleSelections = Be, | |
nt.tabSize = me.define({ | |
combine: function(e) { | |
return e.length ? e[0] : 4 | |
} | |
}), | |
nt.lineSeparator = Ne, | |
nt.readOnly = ze, | |
nt.phrases = me.define({ | |
compare: function(e, t) { | |
var n = Object.keys(e) | |
, i = Object.keys(t); | |
return n.length == i.length && n.every((function(n) { | |
return e[n] == t[n] | |
} | |
)) | |
} | |
}), | |
nt.languageData = Oe, | |
nt.changeFilter = Re, | |
nt.transactionFilter = He, | |
nt.transactionExtender = Ve, | |
Ae.reconfigure = We.define(); | |
var rt = function() { | |
function e() {} | |
return e.prototype.eq = function(e) { | |
return this == e | |
} | |
, | |
e.prototype.range = function(e, t) { | |
return void 0 === t && (t = e), | |
ot.create(e, t, this) | |
} | |
, | |
e | |
}(); | |
rt.prototype.startSide = rt.prototype.endSide = 0, | |
rt.prototype.point = !1, | |
rt.prototype.mapMode = ne.TrackDel; | |
var ot = function() { | |
function e(e, t, n) { | |
this.from = e, | |
this.to = t, | |
this.value = n | |
} | |
return e.create = function(t, n, i) { | |
return new e(t,n,i) | |
} | |
, | |
e | |
}(); | |
function at(e, t) { | |
return e.from - t.from || e.value.startSide - t.value.startSide | |
} | |
var st = function() { | |
function e(e, t, n, i) { | |
this.from = e, | |
this.to = t, | |
this.value = n, | |
this.maxPoint = i | |
} | |
return Object.defineProperty(e.prototype, "length", { | |
get: function() { | |
return this.to[this.to.length - 1] | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
e.prototype.findIndex = function(e, t, n, i) { | |
void 0 === i && (i = 0); | |
for (var r = n ? this.to : this.from, o = i, a = r.length; ; ) { | |
if (o == a) | |
return o; | |
var s = o + a >> 1 | |
, l = r[s] - e || (n ? this.value[s].endSide : this.value[s].startSide) - t; | |
if (s == o) | |
return l >= 0 ? o : a; | |
l >= 0 ? a = s : o = s + 1 | |
} | |
} | |
, | |
e.prototype.between = function(e, t, n, i) { | |
for (var r = this.findIndex(t, -1e9, !0), o = this.findIndex(n, 1e9, !1, r); r < o; r++) | |
if (!1 === i(this.from[r] + e, this.to[r] + e, this.value[r])) | |
return !1 | |
} | |
, | |
e.prototype.map = function(t, n) { | |
for (var i = [], r = [], o = [], a = -1, s = -1, l = 0; l < this.value.length; l++) { | |
var c = this.value[l] | |
, u = this.from[l] + t | |
, h = this.to[l] + t | |
, d = void 0 | |
, p = void 0; | |
if (u == h) { | |
var f = n.mapPos(u, c.startSide, c.mapMode); | |
if (null == f) | |
continue; | |
if (d = p = f, | |
c.startSide != c.endSide && (p = n.mapPos(u, c.endSide)) < d) | |
continue | |
} else if ((d = n.mapPos(u, c.startSide)) > (p = n.mapPos(h, c.endSide)) || d == p && c.startSide > 0 && c.endSide <= 0) | |
continue; | |
(p - d || c.endSide - c.startSide) < 0 || (a < 0 && (a = d), | |
c.point && (s = Math.max(s, p - d)), | |
i.push(c), | |
r.push(d - a), | |
o.push(p - a)) | |
} | |
return { | |
mapped: i.length ? new e(r,o,i,s) : null, | |
pos: a | |
} | |
} | |
, | |
e | |
}() | |
, lt = function() { | |
function e(e, t, n, i) { | |
this.chunkPos = e, | |
this.chunk = t, | |
this.nextLayer = n, | |
this.maxPoint = i | |
} | |
return e.create = function(t, n, i, r) { | |
return new e(t,n,i,r) | |
} | |
, | |
Object.defineProperty(e.prototype, "length", { | |
get: function() { | |
var e = this.chunk.length - 1; | |
return e < 0 ? 0 : Math.max(this.chunkEnd(e), this.nextLayer.length) | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
Object.defineProperty(e.prototype, "size", { | |
get: function() { | |
if (this.isEmpty) | |
return 0; | |
for (var e = this.nextLayer.size, t = 0, n = this.chunk; t < n.length; t++) { | |
e += n[t].value.length | |
} | |
return e | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
e.prototype.chunkEnd = function(e) { | |
return this.chunkPos[e] + this.chunk[e].length | |
} | |
, | |
e.prototype.update = function(t) { | |
var n = t.add | |
, i = void 0 === n ? [] : n | |
, r = t.sort | |
, o = void 0 !== r && r | |
, a = t.filterFrom | |
, s = void 0 === a ? 0 : a | |
, l = t.filterTo | |
, c = void 0 === l ? this.length : l | |
, u = t.filter; | |
if (0 == i.length && !u) | |
return this; | |
if (o && (i = i.slice().sort(at)), | |
this.isEmpty) | |
return i.length ? e.of(i) : this; | |
for (var h = new ht(this,null,-1).goto(0), d = 0, p = [], f = new ct; h.value || d < i.length; ) | |
if (d < i.length && (h.from - i[d].from || h.startSide - i[d].value.startSide) >= 0) { | |
var m = i[d++]; | |
f.addInner(m.from, m.to, m.value) || p.push(m) | |
} else | |
1 == h.rangeIndex && h.chunkIndex < this.chunk.length && (d == i.length || this.chunkEnd(h.chunkIndex) < i[d].from) && (!u || s > this.chunkEnd(h.chunkIndex) || c < this.chunkPos[h.chunkIndex]) && f.addChunk(this.chunkPos[h.chunkIndex], this.chunk[h.chunkIndex]) ? h.nextChunk() : ((!u || s > h.to || c < h.from || u(h.from, h.to, h.value)) && (f.addInner(h.from, h.to, h.value) || p.push(ot.create(h.from, h.to, h.value))), | |
h.next()); | |
return f.finishInner(this.nextLayer.isEmpty && !p.length ? e.empty : this.nextLayer.update({ | |
add: p, | |
filter: u, | |
filterFrom: s, | |
filterTo: c | |
})) | |
} | |
, | |
e.prototype.map = function(t) { | |
if (t.empty || this.isEmpty) | |
return this; | |
for (var n = [], i = [], r = -1, o = 0; o < this.chunk.length; o++) { | |
var a = this.chunkPos[o] | |
, s = this.chunk[o] | |
, l = t.touchesRange(a, a + s.length); | |
if (!1 === l) | |
r = Math.max(r, s.maxPoint), | |
n.push(s), | |
i.push(t.mapPos(a)); | |
else if (!0 === l) { | |
var c = s.map(a, t) | |
, u = c.mapped | |
, h = c.pos; | |
u && (r = Math.max(r, u.maxPoint), | |
n.push(u), | |
i.push(h)) | |
} | |
} | |
var d = this.nextLayer.map(t); | |
return 0 == n.length ? d : new e(i,n,d || e.empty,r) | |
} | |
, | |
e.prototype.between = function(e, t, n) { | |
if (!this.isEmpty) { | |
for (var i = 0; i < this.chunk.length; i++) { | |
var r = this.chunkPos[i] | |
, o = this.chunk[i]; | |
if (t >= r && e <= r + o.length && !1 === o.between(r, e - r, t - r, n)) | |
return | |
} | |
this.nextLayer.between(e, t, n) | |
} | |
} | |
, | |
e.prototype.iter = function(e) { | |
return void 0 === e && (e = 0), | |
dt.from([this]).goto(e) | |
} | |
, | |
Object.defineProperty(e.prototype, "isEmpty", { | |
get: function() { | |
return this.nextLayer == this | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
e.iter = function(e, t) { | |
return void 0 === t && (t = 0), | |
dt.from(e).goto(t) | |
} | |
, | |
e.compare = function(e, t, n, i, r) { | |
void 0 === r && (r = -1); | |
var o = e.filter((function(e) { | |
return e.maxPoint > 0 || !e.isEmpty && e.maxPoint >= r | |
} | |
)) | |
, a = t.filter((function(e) { | |
return e.maxPoint > 0 || !e.isEmpty && e.maxPoint >= r | |
} | |
)) | |
, s = ut(o, a, n) | |
, l = new ft(o,s,r) | |
, c = new ft(a,s,r); | |
n.iterGaps((function(e, t, n) { | |
return mt(l, e, c, t, n, i) | |
} | |
)), | |
n.empty && 0 == n.length && mt(l, 0, c, 0, 0, i) | |
} | |
, | |
e.eq = function(e, t, n, i) { | |
void 0 === n && (n = 0), | |
null == i && (i = 999999999); | |
var r = e.filter((function(e) { | |
return !e.isEmpty && t.indexOf(e) < 0 | |
} | |
)) | |
, o = t.filter((function(t) { | |
return !t.isEmpty && e.indexOf(t) < 0 | |
} | |
)); | |
if (r.length != o.length) | |
return !1; | |
if (!r.length) | |
return !0; | |
for (var a = ut(r, o), s = new ft(r,a,0).goto(n), l = new ft(o,a,0).goto(n); ; ) { | |
if (s.to != l.to || !vt(s.active, l.active) || s.point && (!l.point || !s.point.eq(l.point))) | |
return !1; | |
if (s.to > i) | |
return !0; | |
s.next(), | |
l.next() | |
} | |
} | |
, | |
e.spans = function(e, t, n, i, r) { | |
void 0 === r && (r = -1); | |
for (var o = new ft(e,null,r).goto(t), a = t, s = o.openStart; ; ) { | |
var l = Math.min(o.to, n); | |
if (o.point) { | |
var c = o.activeForPoint(o.to) | |
, u = o.pointFrom < t ? c.length + 1 : o.point.startSide < 0 ? c.length : Math.min(c.length, s); | |
i.point(a, l, o.point, c, u, o.pointRank), | |
s = Math.min(o.openEnd(l), c.length) | |
} else | |
l > a && (i.span(a, l, o.active, s), | |
s = o.openEnd(l)); | |
if (o.to > n) | |
return s + (o.point && o.to > n ? 1 : 0); | |
a = o.to, | |
o.next() | |
} | |
} | |
, | |
e.of = function(e, t) { | |
void 0 === t && (t = !1); | |
for (var n = new ct, i = 0, r = e instanceof ot ? [e] : t ? function(e) { | |
if (e.length > 1) | |
for (var t = e[0], n = 1; n < e.length; n++) { | |
var i = e[n]; | |
if (at(t, i) > 0) | |
return e.slice().sort(at); | |
t = i | |
} | |
return e | |
}(e) : e; i < r.length; i++) { | |
var o = r[i]; | |
n.add(o.from, o.to, o.value) | |
} | |
return n.finish() | |
} | |
, | |
e.join = function(t) { | |
if (!t.length) | |
return e.empty; | |
for (var n = t[t.length - 1], i = t.length - 2; i >= 0; i--) | |
for (var r = t[i]; r != e.empty; r = r.nextLayer) | |
n = new e(r.chunkPos,r.chunk,n,Math.max(r.maxPoint, n.maxPoint)); | |
return n | |
} | |
, | |
e | |
}(); | |
lt.empty = new lt([],[],null,-1), | |
lt.empty.nextLayer = lt.empty; | |
var ct = function() { | |
function e() { | |
this.chunks = [], | |
this.chunkPos = [], | |
this.chunkStart = -1, | |
this.last = null, | |
this.lastFrom = -1e9, | |
this.lastTo = -1e9, | |
this.from = [], | |
this.to = [], | |
this.value = [], | |
this.maxPoint = -1, | |
this.setMaxPoint = -1, | |
this.nextLayer = null | |
} | |
return e.prototype.finishChunk = function(e) { | |
this.chunks.push(new st(this.from,this.to,this.value,this.maxPoint)), | |
this.chunkPos.push(this.chunkStart), | |
this.chunkStart = -1, | |
this.setMaxPoint = Math.max(this.setMaxPoint, this.maxPoint), | |
this.maxPoint = -1, | |
e && (this.from = [], | |
this.to = [], | |
this.value = []) | |
} | |
, | |
e.prototype.add = function(t, n, i) { | |
this.addInner(t, n, i) || (this.nextLayer || (this.nextLayer = new e)).add(t, n, i) | |
} | |
, | |
e.prototype.addInner = function(e, t, n) { | |
var i = e - this.lastTo || n.startSide - this.last.endSide; | |
if (i <= 0 && (e - this.lastFrom || n.startSide - this.last.startSide) < 0) | |
throw new Error("Ranges must be added sorted by `from` position and `startSide`"); | |
return !(i < 0) && (250 == this.from.length && this.finishChunk(!0), | |
this.chunkStart < 0 && (this.chunkStart = e), | |
this.from.push(e - this.chunkStart), | |
this.to.push(t - this.chunkStart), | |
this.last = n, | |
this.lastFrom = e, | |
this.lastTo = t, | |
this.value.push(n), | |
n.point && (this.maxPoint = Math.max(this.maxPoint, t - e)), | |
!0) | |
} | |
, | |
e.prototype.addChunk = function(e, t) { | |
if ((e - this.lastTo || t.value[0].startSide - this.last.endSide) < 0) | |
return !1; | |
this.from.length && this.finishChunk(!0), | |
this.setMaxPoint = Math.max(this.setMaxPoint, t.maxPoint), | |
this.chunks.push(t), | |
this.chunkPos.push(e); | |
var n = t.value.length - 1; | |
return this.last = t.value[n], | |
this.lastFrom = t.from[n] + e, | |
this.lastTo = t.to[n] + e, | |
!0 | |
} | |
, | |
e.prototype.finish = function() { | |
return this.finishInner(lt.empty) | |
} | |
, | |
e.prototype.finishInner = function(e) { | |
if (this.from.length && this.finishChunk(!1), | |
0 == this.chunks.length) | |
return e; | |
var t = lt.create(this.chunkPos, this.chunks, this.nextLayer ? this.nextLayer.finishInner(e) : e, this.setMaxPoint); | |
return this.from = null, | |
t | |
} | |
, | |
e | |
}(); | |
function ut(e, t, n) { | |
for (var i = new Map, r = 0, o = e; r < o.length; r++) | |
for (var a = o[r], s = 0; s < a.chunk.length; s++) | |
a.chunk[s].maxPoint <= 0 && i.set(a.chunk[s], a.chunkPos[s]); | |
for (var l = new Set, c = 0, u = t; c < u.length; c++) | |
for (a = u[c], | |
s = 0; s < a.chunk.length; s++) { | |
var h = i.get(a.chunk[s]); | |
null == h || (n ? n.mapPos(h) : h) != a.chunkPos[s] || (null == n ? void 0 : n.touchesRange(h, h + a.chunk[s].length)) || l.add(a.chunk[s]) | |
} | |
return l | |
} | |
var ht = function() { | |
function e(e, t, n, i) { | |
void 0 === i && (i = 0), | |
this.layer = e, | |
this.skip = t, | |
this.minPoint = n, | |
this.rank = i | |
} | |
return Object.defineProperty(e.prototype, "startSide", { | |
get: function() { | |
return this.value ? this.value.startSide : 0 | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
Object.defineProperty(e.prototype, "endSide", { | |
get: function() { | |
return this.value ? this.value.endSide : 0 | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
e.prototype.goto = function(e, t) { | |
return void 0 === t && (t = -1e9), | |
this.chunkIndex = this.rangeIndex = 0, | |
this.gotoInner(e, t, !1), | |
this | |
} | |
, | |
e.prototype.gotoInner = function(e, t, n) { | |
for (; this.chunkIndex < this.layer.chunk.length; ) { | |
var i = this.layer.chunk[this.chunkIndex]; | |
if (!(this.skip && this.skip.has(i) || this.layer.chunkEnd(this.chunkIndex) < e || i.maxPoint < this.minPoint)) | |
break; | |
this.chunkIndex++, | |
n = !1 | |
} | |
if (this.chunkIndex < this.layer.chunk.length) { | |
var r = this.layer.chunk[this.chunkIndex].findIndex(e - this.layer.chunkPos[this.chunkIndex], t, !0); | |
(!n || this.rangeIndex < r) && this.setRangeIndex(r) | |
} | |
this.next() | |
} | |
, | |
e.prototype.forward = function(e, t) { | |
(this.to - e || this.endSide - t) < 0 && this.gotoInner(e, t, !0) | |
} | |
, | |
e.prototype.next = function() { | |
for (; ; ) { | |
if (this.chunkIndex == this.layer.chunk.length) { | |
this.from = this.to = 1e9, | |
this.value = null; | |
break | |
} | |
var e = this.layer.chunkPos[this.chunkIndex] | |
, t = this.layer.chunk[this.chunkIndex] | |
, n = e + t.from[this.rangeIndex]; | |
if (this.from = n, | |
this.to = e + t.to[this.rangeIndex], | |
this.value = t.value[this.rangeIndex], | |
this.setRangeIndex(this.rangeIndex + 1), | |
this.minPoint < 0 || this.value.point && this.to - this.from >= this.minPoint) | |
break | |
} | |
} | |
, | |
e.prototype.setRangeIndex = function(e) { | |
if (e == this.layer.chunk[this.chunkIndex].value.length) { | |
if (this.chunkIndex++, | |
this.skip) | |
for (; this.chunkIndex < this.layer.chunk.length && this.skip.has(this.layer.chunk[this.chunkIndex]); ) | |
this.chunkIndex++; | |
this.rangeIndex = 0 | |
} else | |
this.rangeIndex = e | |
} | |
, | |
e.prototype.nextChunk = function() { | |
this.chunkIndex++, | |
this.rangeIndex = 0, | |
this.next() | |
} | |
, | |
e.prototype.compare = function(e) { | |
return this.from - e.from || this.startSide - e.startSide || this.rank - e.rank || this.to - e.to || this.endSide - e.endSide | |
} | |
, | |
e | |
}() | |
, dt = function() { | |
function e(e) { | |
this.heap = e | |
} | |
return e.from = function(t, n, i) { | |
void 0 === n && (n = null), | |
void 0 === i && (i = -1); | |
for (var r = [], o = 0; o < t.length; o++) | |
for (var a = t[o]; !a.isEmpty; a = a.nextLayer) | |
a.maxPoint >= i && r.push(new ht(a,n,i,o)); | |
return 1 == r.length ? r[0] : new e(r) | |
} | |
, | |
Object.defineProperty(e.prototype, "startSide", { | |
get: function() { | |
return this.value ? this.value.startSide : 0 | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
e.prototype.goto = function(e, t) { | |
void 0 === t && (t = -1e9); | |
for (var n = 0, i = this.heap; n < i.length; n++) { | |
i[n].goto(e, t) | |
} | |
for (var r = this.heap.length >> 1; r >= 0; r--) | |
pt(this.heap, r); | |
return this.next(), | |
this | |
} | |
, | |
e.prototype.forward = function(e, t) { | |
for (var n = 0, i = this.heap; n < i.length; n++) { | |
i[n].forward(e, t) | |
} | |
for (var r = this.heap.length >> 1; r >= 0; r--) | |
pt(this.heap, r); | |
(this.to - e || this.value.endSide - t) < 0 && this.next() | |
} | |
, | |
e.prototype.next = function() { | |
if (0 == this.heap.length) | |
this.from = this.to = 1e9, | |
this.value = null, | |
this.rank = -1; | |
else { | |
var e = this.heap[0]; | |
this.from = e.from, | |
this.to = e.to, | |
this.value = e.value, | |
this.rank = e.rank, | |
e.value && e.next(), | |
pt(this.heap, 0) | |
} | |
} | |
, | |
e | |
}(); | |
function pt(e, t) { | |
for (var n = e[t]; ; ) { | |
var i = 1 + (t << 1); | |
if (i >= e.length) | |
break; | |
var r = e[i]; | |
if (i + 1 < e.length && r.compare(e[i + 1]) >= 0 && (r = e[i + 1], | |
i++), | |
n.compare(r) < 0) | |
break; | |
e[i] = n, | |
e[t] = r, | |
t = i | |
} | |
} | |
var ft = function() { | |
function e(e, t, n) { | |
this.minPoint = n, | |
this.active = [], | |
this.activeTo = [], | |
this.activeRank = [], | |
this.minActive = -1, | |
this.point = null, | |
this.pointFrom = 0, | |
this.pointRank = 0, | |
this.to = -1e9, | |
this.endSide = 0, | |
this.openStart = -1, | |
this.cursor = dt.from(e, t, n) | |
} | |
return e.prototype.goto = function(e, t) { | |
return void 0 === t && (t = -1e9), | |
this.cursor.goto(e, t), | |
this.active.length = this.activeTo.length = this.activeRank.length = 0, | |
this.minActive = -1, | |
this.to = e, | |
this.endSide = t, | |
this.openStart = -1, | |
this.next(), | |
this | |
} | |
, | |
e.prototype.forward = function(e, t) { | |
for (; this.minActive > -1 && (this.activeTo[this.minActive] - e || this.active[this.minActive].endSide - t) < 0; ) | |
this.removeActive(this.minActive); | |
this.cursor.forward(e, t) | |
} | |
, | |
e.prototype.removeActive = function(e) { | |
gt(this.active, e), | |
gt(this.activeTo, e), | |
gt(this.activeRank, e), | |
this.minActive = bt(this.active, this.activeTo) | |
} | |
, | |
e.prototype.addActive = function(e) { | |
for (var t = 0, n = this.cursor, i = n.value, r = n.to, o = n.rank; t < this.activeRank.length && (o - this.activeRank[t] || r - this.activeTo[t]) > 0; ) | |
t++; | |
yt(this.active, t, i), | |
yt(this.activeTo, t, r), | |
yt(this.activeRank, t, o), | |
e && yt(e, t, this.cursor.from), | |
this.minActive = bt(this.active, this.activeTo) | |
} | |
, | |
e.prototype.next = function() { | |
var e = this.to | |
, t = this.point; | |
this.point = null; | |
for (var n = this.openStart < 0 ? [] : null; ; ) { | |
var i = this.minActive; | |
if (i > -1 && (this.activeTo[i] - this.cursor.from || this.active[i].endSide - this.cursor.startSide) < 0) { | |
if (this.activeTo[i] > e) { | |
this.to = this.activeTo[i], | |
this.endSide = this.active[i].endSide; | |
break | |
} | |
this.removeActive(i), | |
n && gt(n, i) | |
} else { | |
if (!this.cursor.value) { | |
this.to = this.endSide = 1e9; | |
break | |
} | |
if (this.cursor.from > e) { | |
this.to = this.cursor.from, | |
this.endSide = this.cursor.startSide; | |
break | |
} | |
var r = this.cursor.value; | |
if (r.point) { | |
if (!(t && this.cursor.to == this.to && this.cursor.from < this.cursor.to)) { | |
this.point = r, | |
this.pointFrom = this.cursor.from, | |
this.pointRank = this.cursor.rank, | |
this.to = this.cursor.to, | |
this.endSide = r.endSide, | |
this.cursor.next(), | |
this.forward(this.to, this.endSide); | |
break | |
} | |
this.cursor.next() | |
} else | |
this.addActive(n), | |
this.cursor.next() | |
} | |
} | |
if (n) { | |
this.openStart = 0; | |
for (var o = n.length - 1; o >= 0 && n[o] < e; o--) | |
this.openStart++ | |
} | |
} | |
, | |
e.prototype.activeForPoint = function(e) { | |
if (!this.active.length) | |
return this.active; | |
for (var t = [], n = this.active.length - 1; n >= 0 && !(this.activeRank[n] < this.pointRank); n--) | |
(this.activeTo[n] > e || this.activeTo[n] == e && this.active[n].endSide >= this.point.endSide) && t.push(this.active[n]); | |
return t.reverse() | |
} | |
, | |
e.prototype.openEnd = function(e) { | |
for (var t = 0, n = this.activeTo.length - 1; n >= 0 && this.activeTo[n] > e; n--) | |
t++; | |
return t | |
} | |
, | |
e | |
}(); | |
function mt(e, t, n, i, r, o) { | |
e.goto(t), | |
n.goto(i); | |
for (var a = i + r, s = i, l = i - t; ; ) { | |
var c = e.to + l - n.to | |
, u = c || e.endSide - n.endSide | |
, h = u < 0 ? e.to + l : n.to | |
, d = Math.min(h, a); | |
if (e.point || n.point ? e.point && n.point && (e.point == n.point || e.point.eq(n.point)) && vt(e.activeForPoint(e.to), n.activeForPoint(n.to)) || o.comparePoint(s, d, e.point, n.point) : d > s && !vt(e.active, n.active) && o.compareRange(s, d, e.active, n.active), | |
h > a) | |
break; | |
(c || e.openEnd != n.openEnd) && o.boundChange && o.boundChange(h), | |
s = h, | |
u <= 0 && e.next(), | |
u >= 0 && n.next() | |
} | |
} | |
function vt(e, t) { | |
if (e.length != t.length) | |
return !1; | |
for (var n = 0; n < e.length; n++) | |
if (e[n] != t[n] && !e[n].eq(t[n])) | |
return !1; | |
return !0 | |
} | |
function gt(e, t) { | |
for (var n = t, i = e.length - 1; n < i; n++) | |
e[n] = e[n + 1]; | |
e.pop() | |
} | |
function yt(e, t, n) { | |
for (var i = e.length - 1; i >= t; i--) | |
e[i + 1] = e[i]; | |
e[t] = n | |
} | |
function bt(e, t) { | |
for (var n = -1, i = 1e9, r = 0; r < t.length; r++) | |
(t[r] - i || e[r].endSide - e[n].endSide) < 0 && (n = r, | |
i = t[r]); | |
return n | |
} | |
function wt(e, t, n) { | |
void 0 === n && (n = e.length); | |
for (var i = 0, r = 0; r < n; ) | |
9 == e.charCodeAt(r) ? (i += t - i % t, | |
r++) : (i++, | |
r = $(e, r)); | |
return i | |
} | |
function kt(e, t, n, i) { | |
for (var r = 0, o = 0; ; ) { | |
if (o >= t) | |
return r; | |
if (r == e.length) | |
break; | |
o += 9 == e.charCodeAt(r) ? n - o % n : 1, | |
r = $(e, r) | |
} | |
return !0 === i ? -1 : e.length | |
} | |
const Ct = "undefined" == typeof Symbol ? "__ͼ" : Symbol.for("ͼ") | |
, Mt = "undefined" == typeof Symbol ? "__styleSet" + Math.floor(1e8 * Math.random()) : Symbol("styleSet") | |
, Et = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : {}; | |
class St { | |
constructor(e, t) { | |
this.rules = []; | |
let {finish: n} = t || {}; | |
function i(e) { | |
return /^@/.test(e) ? [e] : e.split(/,\s*/) | |
} | |
function r(e, t, o, a) { | |
let s = [] | |
, l = /^@(\w+)\b/.exec(e[0]) | |
, c = l && "keyframes" == l[1]; | |
if (l && null == t) | |
return o.push(e[0] + ";"); | |
for (let n in t) { | |
let a = t[n]; | |
if (/&/.test(n)) | |
r(n.split(/,\s*/).map((t=>e.map((e=>t.replace(/&/, e))))).reduce(((e,t)=>e.concat(t))), a, o); | |
else if (a && "object" == typeof a) { | |
if (!l) | |
throw new RangeError("The value of a property (" + n + ") should be a primitive value."); | |
r(i(n), a, s, c) | |
} else | |
null != a && s.push(n.replace(/_.*/, "").replace(/[A-Z]/g, (e=>"-" + e.toLowerCase())) + ": " + a + ";") | |
} | |
(s.length || c) && o.push((!n || l || a ? e : e.map(n)).join(", ") + " {" + s.join(" ") + "}") | |
} | |
for (let t in e) | |
r(i(t), e[t], this.rules) | |
} | |
getRules() { | |
return this.rules.join("\n") | |
} | |
static newName() { | |
let e = Et[Ct] || 1; | |
return Et[Ct] = e + 1, | |
"ͼ" + e.toString(36) | |
} | |
static mount(e, t, n) { | |
let i = e[Mt] | |
, r = n && n.nonce; | |
i ? r && i.setNonce(r) : i = new Tt(e,r), | |
i.mount(Array.isArray(t) ? t : [t], e) | |
} | |
} | |
let xt = new Map; | |
class Tt { | |
constructor(e, t) { | |
let n = e.ownerDocument || e | |
, i = n.defaultView; | |
if (!e.head && e.adoptedStyleSheets && i.CSSStyleSheet) { | |
let t = xt.get(n); | |
if (t) | |
return e[Mt] = t; | |
this.sheet = new i.CSSStyleSheet, | |
xt.set(n, this) | |
} else | |
this.styleTag = n.createElement("style"), | |
t && this.styleTag.setAttribute("nonce", t); | |
this.modules = [], | |
e[Mt] = this | |
} | |
mount(e, t) { | |
let n = this.sheet | |
, i = 0 | |
, r = 0; | |
for (let t = 0; t < e.length; t++) { | |
let o = e[t] | |
, a = this.modules.indexOf(o); | |
if (a < r && a > -1 && (this.modules.splice(a, 1), | |
r--, | |
a = -1), | |
-1 == a) { | |
if (this.modules.splice(r++, 0, o), | |
n) | |
for (let e = 0; e < o.rules.length; e++) | |
n.insertRule(o.rules[e], i++) | |
} else { | |
for (; r < a; ) | |
i += this.modules[r++].rules.length; | |
i += o.rules.length, | |
r++ | |
} | |
} | |
if (n) | |
t.adoptedStyleSheets.indexOf(this.sheet) < 0 && (t.adoptedStyleSheets = [this.sheet, ...t.adoptedStyleSheets]); | |
else { | |
let e = ""; | |
for (let t = 0; t < this.modules.length; t++) | |
e += this.modules[t].getRules() + "\n"; | |
this.styleTag.textContent = e; | |
let n = t.head || t; | |
this.styleTag.parentNode != n && n.insertBefore(this.styleTag, n.firstChild) | |
} | |
} | |
setNonce(e) { | |
this.styleTag && this.styleTag.getAttribute("nonce") != e && this.styleTag.setAttribute("nonce", e) | |
} | |
} | |
for (var Dt = { | |
8: "Backspace", | |
9: "Tab", | |
10: "Enter", | |
12: "NumLock", | |
13: "Enter", | |
16: "Shift", | |
17: "Control", | |
18: "Alt", | |
20: "CapsLock", | |
27: "Escape", | |
32: " ", | |
33: "PageUp", | |
34: "PageDown", | |
35: "End", | |
36: "Home", | |
37: "ArrowLeft", | |
38: "ArrowUp", | |
39: "ArrowRight", | |
40: "ArrowDown", | |
44: "PrintScreen", | |
45: "Insert", | |
46: "Delete", | |
59: ";", | |
61: "=", | |
91: "Meta", | |
92: "Meta", | |
106: "*", | |
107: "+", | |
108: ",", | |
109: "-", | |
110: ".", | |
111: "/", | |
144: "NumLock", | |
145: "ScrollLock", | |
160: "Shift", | |
161: "Shift", | |
162: "Control", | |
163: "Control", | |
164: "Alt", | |
165: "Alt", | |
173: "-", | |
186: ";", | |
187: "=", | |
188: ",", | |
189: "-", | |
190: ".", | |
191: "/", | |
192: "`", | |
219: "[", | |
220: "\\", | |
221: "]", | |
222: "'" | |
}, At = { | |
48: ")", | |
49: "!", | |
50: "@", | |
51: "#", | |
52: "$", | |
53: "%", | |
54: "^", | |
55: "&", | |
56: "*", | |
57: "(", | |
59: ":", | |
61: "+", | |
173: "_", | |
186: ":", | |
187: "+", | |
188: "<", | |
189: "_", | |
190: ">", | |
191: "?", | |
192: "~", | |
219: "{", | |
220: "|", | |
221: "}", | |
222: '"' | |
}, Lt = "undefined" != typeof navigator && /Mac/.test(navigator.platform), Pt = "undefined" != typeof navigator && /MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent), It = 0; It < 10; It++) | |
Dt[48 + It] = Dt[96 + It] = String(It); | |
for (It = 1; It <= 24; It++) | |
Dt[It + 111] = "F" + It; | |
for (It = 65; It <= 90; It++) | |
Dt[It] = String.fromCharCode(It + 32), | |
At[It] = String.fromCharCode(It); | |
for (var Ft in Dt) | |
At.hasOwnProperty(Ft) || (At[Ft] = Dt[Ft]); | |
function Ot(e) { | |
return (11 == e.nodeType ? e.getSelection ? e : e.ownerDocument : e).getSelection() | |
} | |
function Bt(e, t) { | |
return !!t && (e == t || e.contains(1 != t.nodeType ? t.parentNode : t)) | |
} | |
function Nt(e, t) { | |
if (!t || !t.anchorNode) | |
return !1; | |
try { | |
return Bt(e, t.anchorNode) | |
} catch (e) { | |
return !1 | |
} | |
} | |
function Rt(e) { | |
return 3 == e.nodeType ? Xt(e, 0, e.nodeValue.length).getClientRects() : 1 == e.nodeType ? e.getClientRects() : [] | |
} | |
function Ht(e, t, n, i) { | |
return !!n && (qt(e, t, n, i, -1) || qt(e, t, n, i, 1)) | |
} | |
function Vt(e) { | |
for (var t = 0; ; t++) | |
if (!(e = e.previousSibling)) | |
return t | |
} | |
function zt(e) { | |
return 1 == e.nodeType && /^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(e.nodeName) | |
} | |
function qt(e, t, n, i, r) { | |
for (; ; ) { | |
if (e == n && t == i) | |
return !0; | |
if (t == (r < 0 ? 0 : Ut(e))) { | |
if ("DIV" == e.nodeName) | |
return !1; | |
var o = e.parentNode; | |
if (!o || 1 != o.nodeType) | |
return !1; | |
t = Vt(e) + (r < 0 ? 0 : 1), | |
e = o | |
} else { | |
if (1 != e.nodeType) | |
return !1; | |
if (1 == (e = e.childNodes[t + (r < 0 ? -1 : 0)]).nodeType && "false" == e.contentEditable) | |
return !1; | |
t = r < 0 ? Ut(e) : 0 | |
} | |
} | |
} | |
function Ut(e) { | |
return 3 == e.nodeType ? e.nodeValue.length : e.childNodes.length | |
} | |
function _t(e, t) { | |
var n = t ? e.left : e.right; | |
return { | |
left: n, | |
right: n, | |
top: e.top, | |
bottom: e.bottom | |
} | |
} | |
function Wt(e) { | |
var t = e.visualViewport; | |
return t ? { | |
left: 0, | |
right: t.width, | |
top: 0, | |
bottom: t.height | |
} : { | |
left: 0, | |
right: e.innerWidth, | |
top: 0, | |
bottom: e.innerHeight | |
} | |
} | |
function jt(e, t) { | |
var n = t.width / e.offsetWidth | |
, i = t.height / e.offsetHeight; | |
return (n > .995 && n < 1.005 || !isFinite(n) || Math.abs(t.width - e.offsetWidth) < 1) && (n = 1), | |
(i > .995 && i < 1.005 || !isFinite(i) || Math.abs(t.height - e.offsetHeight) < 1) && (i = 1), | |
{ | |
scaleX: n, | |
scaleY: i | |
} | |
} | |
var Gt, Kt = function() { | |
function e() { | |
this.anchorNode = null, | |
this.anchorOffset = 0, | |
this.focusNode = null, | |
this.focusOffset = 0 | |
} | |
return e.prototype.eq = function(e) { | |
return this.anchorNode == e.anchorNode && this.anchorOffset == e.anchorOffset && this.focusNode == e.focusNode && this.focusOffset == e.focusOffset | |
} | |
, | |
e.prototype.setRange = function(e) { | |
var t = e.anchorNode | |
, n = e.focusNode; | |
this.set(t, Math.min(e.anchorOffset, t ? Ut(t) : 0), n, Math.min(e.focusOffset, n ? Ut(n) : 0)) | |
} | |
, | |
e.prototype.set = function(e, t, n, i) { | |
this.anchorNode = e, | |
this.anchorOffset = t, | |
this.focusNode = n, | |
this.focusOffset = i | |
} | |
, | |
e | |
}(), Yt = null; | |
function Zt(e) { | |
if (e.setActive) | |
return e.setActive(); | |
if (Yt) | |
return e.focus(Yt); | |
for (var t = [], n = e; n && (t.push(n, n.scrollTop, n.scrollLeft), | |
n != n.ownerDocument); n = n.parentNode) | |
; | |
if (e.focus(null == Yt ? { | |
get preventScroll() { | |
return Yt = { | |
preventScroll: !0 | |
}, | |
!0 | |
} | |
} : void 0), | |
!Yt) { | |
Yt = !1; | |
for (var i = 0; i < t.length; ) { | |
var r = t[i++] | |
, o = t[i++] | |
, a = t[i++]; | |
r.scrollTop != o && (r.scrollTop = o), | |
r.scrollLeft != a && (r.scrollLeft = a) | |
} | |
} | |
} | |
function Xt(e, t, n) { | |
void 0 === n && (n = t); | |
var i = Gt || (Gt = document.createRange()); | |
return i.setEnd(e, n), | |
i.setStart(e, t), | |
i | |
} | |
function $t(e, t, n, i) { | |
var r = { | |
key: t, | |
code: t, | |
keyCode: n, | |
which: n, | |
cancelable: !0 | |
}; | |
i && (r.altKey = i.altKey, | |
r.ctrlKey = i.ctrlKey, | |
r.shiftKey = i.shiftKey, | |
r.metaKey = i.metaKey); | |
var o = new KeyboardEvent("keydown",r); | |
o.synthetic = !0, | |
e.dispatchEvent(o); | |
var a = new KeyboardEvent("keyup",r); | |
return a.synthetic = !0, | |
e.dispatchEvent(a), | |
o.defaultPrevented || a.defaultPrevented | |
} | |
function Qt(e) { | |
for (; e.attributes.length; ) | |
e.removeAttributeNode(e.attributes[0]) | |
} | |
function Jt(e) { | |
return e.scrollTop > Math.max(1, e.scrollHeight - e.clientHeight - 4) | |
} | |
function en(e, t) { | |
for (var n = e, i = t; ; ) { | |
if (3 == n.nodeType && i > 0) | |
return { | |
node: n, | |
offset: i | |
}; | |
if (1 == n.nodeType && i > 0) { | |
if ("false" == n.contentEditable) | |
return null; | |
i = Ut(n = n.childNodes[i - 1]) | |
} else { | |
if (!n.parentNode || zt(n)) | |
return null; | |
i = Vt(n), | |
n = n.parentNode | |
} | |
} | |
} | |
function tn(e, t) { | |
for (var n = e, i = t; ; ) { | |
if (3 == n.nodeType && i < n.nodeValue.length) | |
return { | |
node: n, | |
offset: i | |
}; | |
if (1 == n.nodeType && i < n.childNodes.length) { | |
if ("false" == n.contentEditable) | |
return null; | |
n = n.childNodes[i], | |
i = 0 | |
} else { | |
if (!n.parentNode || zt(n)) | |
return null; | |
i = Vt(n) + 1, | |
n = n.parentNode | |
} | |
} | |
} | |
var nn = function() { | |
function e(e, t, n) { | |
void 0 === n && (n = !0), | |
this.node = e, | |
this.offset = t, | |
this.precise = n | |
} | |
return e.before = function(t, n) { | |
return new e(t.parentNode,Vt(t),n) | |
} | |
, | |
e.after = function(t, n) { | |
return new e(t.parentNode,Vt(t) + 1,n) | |
} | |
, | |
e | |
}() | |
, rn = [] | |
, on = function() { | |
function e() { | |
this.parent = null, | |
this.dom = null, | |
this.flags = 2 | |
} | |
return Object.defineProperty(e.prototype, "overrideDOMText", { | |
get: function() { | |
return null | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
Object.defineProperty(e.prototype, "posAtStart", { | |
get: function() { | |
return this.parent ? this.parent.posBefore(this) : 0 | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
Object.defineProperty(e.prototype, "posAtEnd", { | |
get: function() { | |
return this.posAtStart + this.length | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
e.prototype.posBefore = function(e) { | |
for (var t = this.posAtStart, n = 0, i = this.children; n < i.length; n++) { | |
var r = i[n]; | |
if (r == e) | |
return t; | |
t += r.length + r.breakAfter | |
} | |
throw new RangeError("Invalid child in posBefore") | |
} | |
, | |
e.prototype.posAfter = function(e) { | |
return this.posBefore(e) + e.length | |
} | |
, | |
e.prototype.sync = function(t, n) { | |
if (2 & this.flags) { | |
for (var i = this.dom, r = null, o = void 0, a = 0, s = this.children; a < s.length; a++) { | |
if (7 & (h = s[a]).flags) { | |
if (!h.dom && (o = r ? r.nextSibling : i.firstChild)) { | |
var l = e.get(o); | |
(!l || !l.parent && l.canReuseDOM(h)) && h.reuseDOM(o) | |
} | |
h.sync(t, n), | |
h.flags &= -8 | |
} | |
if (o = r ? r.nextSibling : i.firstChild, | |
n && !n.written && n.node == i && o != h.dom && (n.written = !0), | |
h.dom.parentNode == i) | |
for (; o && o != h.dom; ) | |
o = an(o); | |
else | |
i.insertBefore(h.dom, o); | |
r = h.dom | |
} | |
for ((o = r ? r.nextSibling : i.firstChild) && n && n.node == i && (n.written = !0); o; ) | |
o = an(o) | |
} else if (1 & this.flags) | |
for (var c = 0, u = this.children; c < u.length; c++) { | |
var h; | |
7 & (h = u[c]).flags && (h.sync(t, n), | |
h.flags &= -8) | |
} | |
} | |
, | |
e.prototype.reuseDOM = function(e) {} | |
, | |
e.prototype.localPosFromDOM = function(t, n) { | |
var i; | |
if (t == this.dom) | |
i = this.dom.childNodes[n]; | |
else { | |
for (var r = 0 == Ut(t) ? 0 : 0 == n ? -1 : 1; ; ) { | |
var o = t.parentNode; | |
if (o == this.dom) | |
break; | |
0 == r && o.firstChild != o.lastChild && (r = t == o.firstChild ? -1 : 1), | |
t = o | |
} | |
i = r < 0 ? t : t.nextSibling | |
} | |
if (i == this.dom.firstChild) | |
return 0; | |
for (; i && !e.get(i); ) | |
i = i.nextSibling; | |
if (!i) | |
return this.length; | |
for (var a = 0, s = 0; ; a++) { | |
var l = this.children[a]; | |
if (l.dom == i) | |
return s; | |
s += l.length + l.breakAfter | |
} | |
} | |
, | |
e.prototype.domBoundsAround = function(e, t, n) { | |
void 0 === n && (n = 0); | |
for (var i = -1, r = -1, o = -1, a = -1, s = 0, l = n, c = n; s < this.children.length; s++) { | |
var u = this.children[s] | |
, h = l + u.length; | |
if (l < e && h > t) | |
return u.domBoundsAround(e, t, l); | |
if (h >= e && -1 == i && (i = s, | |
r = l), | |
l > t && u.dom.parentNode == this.dom) { | |
o = s, | |
a = c; | |
break | |
} | |
c = h, | |
l = h + u.breakAfter | |
} | |
return { | |
from: r, | |
to: a < 0 ? n + this.length : a, | |
startDOM: (i ? this.children[i - 1].dom.nextSibling : null) || this.dom.firstChild, | |
endDOM: o < this.children.length && o >= 0 ? this.children[o].dom : null | |
} | |
} | |
, | |
e.prototype.markDirty = function(e) { | |
void 0 === e && (e = !1), | |
this.flags |= 2, | |
this.markParentsDirty(e) | |
} | |
, | |
e.prototype.markParentsDirty = function(e) { | |
for (var t = this.parent; t; t = t.parent) { | |
if (e && (t.flags |= 2), | |
1 & t.flags) | |
return; | |
t.flags |= 1, | |
e = !1 | |
} | |
} | |
, | |
e.prototype.setParent = function(e) { | |
this.parent != e && (this.parent = e, | |
7 & this.flags && this.markParentsDirty(!0)) | |
} | |
, | |
e.prototype.setDOM = function(e) { | |
this.dom != e && (this.dom && (this.dom.cmView = null), | |
this.dom = e, | |
e.cmView = this) | |
} | |
, | |
Object.defineProperty(e.prototype, "rootView", { | |
get: function() { | |
for (var e = this; ; ) { | |
var t = e.parent; | |
if (!t) | |
return e; | |
e = t | |
} | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
e.prototype.replaceChildren = function(e, t, n) { | |
var i; | |
void 0 === n && (n = rn), | |
this.markDirty(); | |
for (var r = e; r < t; r++) { | |
var o = this.children[r]; | |
o.parent == this && n.indexOf(o) < 0 && o.destroy() | |
} | |
n.length < 250 ? (i = this.children).splice.apply(i, w([e, t - e], n, !1)) : this.children = [].concat(this.children.slice(0, e), n, this.children.slice(t)); | |
for (r = 0; r < n.length; r++) | |
n[r].setParent(this) | |
} | |
, | |
e.prototype.ignoreMutation = function(e) { | |
return !1 | |
} | |
, | |
e.prototype.ignoreEvent = function(e) { | |
return !1 | |
} | |
, | |
e.prototype.childCursor = function(e) { | |
return void 0 === e && (e = this.length), | |
new sn(this.children,e,this.children.length) | |
} | |
, | |
e.prototype.childPos = function(e, t) { | |
return void 0 === t && (t = 1), | |
this.childCursor().findPos(e, t) | |
} | |
, | |
e.prototype.toString = function() { | |
var e = this.constructor.name.replace("View", ""); | |
return e + (this.children.length ? "(" + this.children.join() + ")" : this.length ? "[" + ("Text" == e ? this.text : this.length) + "]" : "") + (this.breakAfter ? "#" : "") | |
} | |
, | |
e.get = function(e) { | |
return e.cmView | |
} | |
, | |
Object.defineProperty(e.prototype, "isEditable", { | |
get: function() { | |
return !0 | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
Object.defineProperty(e.prototype, "isWidget", { | |
get: function() { | |
return !1 | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
Object.defineProperty(e.prototype, "isHidden", { | |
get: function() { | |
return !1 | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
e.prototype.merge = function(e, t, n, i, r, o) { | |
return !1 | |
} | |
, | |
e.prototype.become = function(e) { | |
return !1 | |
} | |
, | |
e.prototype.canReuseDOM = function(e) { | |
return e.constructor == this.constructor && !(8 & (this.flags | e.flags)) | |
} | |
, | |
e.prototype.getSide = function() { | |
return 0 | |
} | |
, | |
e.prototype.destroy = function() { | |
for (var e = 0, t = this.children; e < t.length; e++) { | |
var n = t[e]; | |
n.parent == this && n.destroy() | |
} | |
this.parent = null | |
} | |
, | |
e | |
}(); | |
function an(e) { | |
var t = e.nextSibling; | |
return e.parentNode.removeChild(e), | |
t | |
} | |
on.prototype.breakAfter = 0; | |
var sn = function() { | |
function e(e, t, n) { | |
this.children = e, | |
this.pos = t, | |
this.i = n, | |
this.off = 0 | |
} | |
return e.prototype.findPos = function(e, t) { | |
for (void 0 === t && (t = 1); ; ) { | |
if (e > this.pos || e == this.pos && (t > 0 || 0 == this.i || this.children[this.i - 1].breakAfter)) | |
return this.off = e - this.pos, | |
this; | |
var n = this.children[--this.i]; | |
this.pos -= n.length + n.breakAfter | |
} | |
} | |
, | |
e | |
}(); | |
function ln(e, t, n, i, r, o, a, s, l) { | |
var c = e.children | |
, u = c.length ? c[t] : null | |
, h = o.length ? o[o.length - 1] : null | |
, d = h ? h.breakAfter : a; | |
if (!(t == i && u && !a && !d && o.length < 2 && u.merge(n, r, o.length ? h : null, 0 == n, s, l))) { | |
if (i < c.length) { | |
var p = c[i]; | |
p && (r < p.length || p.breakAfter && (null == h ? void 0 : h.breakAfter)) ? (t == i && (p = p.split(r), | |
r = 0), | |
!d && h && p.merge(0, r, h, !0, 0, l) ? o[o.length - 1] = p : ((r || p.children.length && !p.children[0].length) && p.merge(0, r, null, !1, 0, l), | |
o.push(p))) : (null == p ? void 0 : p.breakAfter) && (h ? h.breakAfter = 1 : a = 1), | |
i++ | |
} | |
for (u && (u.breakAfter = a, | |
n > 0 && (!a && o.length && u.merge(n, u.length, o[0], !1, s, 0) ? u.breakAfter = o.shift().breakAfter : (n < u.length || u.children.length && 0 == u.children[u.children.length - 1].length) && u.merge(n, u.length, null, !1, s, 0), | |
t++)); t < i && o.length; ) | |
if (c[i - 1].become(o[o.length - 1])) | |
i--, | |
o.pop(), | |
l = o.length ? 0 : s; | |
else { | |
if (!c[t].become(o[0])) | |
break; | |
t++, | |
o.shift(), | |
s = o.length ? 0 : l | |
} | |
!o.length && t && i < c.length && !c[t - 1].breakAfter && c[i].merge(0, 0, c[t - 1], !1, s, l) && t--, | |
(t < i || o.length) && e.replaceChildren(t, i, o) | |
} | |
} | |
function cn(e, t, n, i, r, o) { | |
for (var a = e.childCursor(), s = a.findPos(n, 1), l = s.i, c = s.off, u = a.findPos(t, -1), h = u.i, d = u.off, p = t - n, f = 0, m = i; f < m.length; f++) { | |
p += m[f].length | |
} | |
e.length += p, | |
ln(e, h, d, l, c, i, 0, r, o) | |
} | |
var un = "undefined" != typeof navigator ? navigator : { | |
userAgent: "", | |
vendor: "", | |
platform: "" | |
} | |
, hn = "undefined" != typeof document ? document : { | |
documentElement: { | |
style: {} | |
} | |
} | |
, dn = /Edge\/(\d+)/.exec(un.userAgent) | |
, pn = /MSIE \d/.test(un.userAgent) | |
, fn = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(un.userAgent) | |
, mn = !!(pn || fn || dn) | |
, vn = !mn && /gecko\/(\d+)/i.test(un.userAgent) | |
, gn = !mn && /Chrome\/(\d+)/.exec(un.userAgent) | |
, yn = "webkitFontSmoothing"in hn.documentElement.style | |
, bn = !mn && /Apple Computer/.test(un.vendor) | |
, wn = bn && (/Mobile\/\w+/.test(un.userAgent) || un.maxTouchPoints > 2) | |
, kn = { | |
mac: wn || /Mac/.test(un.platform), | |
windows: /Win/.test(un.platform), | |
linux: /Linux|X11/.test(un.platform), | |
ie: mn, | |
ie_version: pn ? hn.documentMode || 6 : fn ? +fn[1] : dn ? +dn[1] : 0, | |
gecko: vn, | |
gecko_version: vn ? +(/Firefox\/(\d+)/.exec(un.userAgent) || [0, 0])[1] : 0, | |
chrome: !!gn, | |
chrome_version: gn ? +gn[1] : 0, | |
ios: wn, | |
android: /Android\b/.test(un.userAgent), | |
webkit: yn, | |
safari: bn, | |
webkit_version: yn ? +(/\bAppleWebKit\/(\d+)/.exec(un.userAgent) || [0, 0])[1] : 0, | |
tabSize: null != hn.documentElement.style.tabSize ? "tab-size" : "-moz-tab-size" | |
} | |
, Cn = function(e) { | |
function t(t) { | |
var n = e.call(this) || this; | |
return n.text = t, | |
n | |
} | |
return f(t, e), | |
Object.defineProperty(t.prototype, "length", { | |
get: function() { | |
return this.text.length | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
t.prototype.createDOM = function(e) { | |
this.setDOM(e || document.createTextNode(this.text)) | |
} | |
, | |
t.prototype.sync = function(e, t) { | |
this.dom || this.createDOM(), | |
this.dom.nodeValue != this.text && (t && t.node == this.dom && (t.written = !0), | |
this.dom.nodeValue = this.text) | |
} | |
, | |
t.prototype.reuseDOM = function(e) { | |
3 == e.nodeType && this.createDOM(e) | |
} | |
, | |
t.prototype.merge = function(e, n, i) { | |
return !(8 & this.flags || i && (!(i instanceof t) || this.length - (n - e) + i.length > 256 || 8 & i.flags)) && (this.text = this.text.slice(0, e) + (i ? i.text : "") + this.text.slice(n), | |
this.markDirty(), | |
!0) | |
} | |
, | |
t.prototype.split = function(e) { | |
var n = new t(this.text.slice(e)); | |
return this.text = this.text.slice(0, e), | |
this.markDirty(), | |
n.flags |= 8 & this.flags, | |
n | |
} | |
, | |
t.prototype.localPosFromDOM = function(e, t) { | |
return e == this.dom ? t : t ? this.text.length : 0 | |
} | |
, | |
t.prototype.domAtPos = function(e) { | |
return new nn(this.dom,e) | |
} | |
, | |
t.prototype.domBoundsAround = function(e, t, n) { | |
return { | |
from: n, | |
to: n + this.length, | |
startDOM: this.dom, | |
endDOM: this.dom.nextSibling | |
} | |
} | |
, | |
t.prototype.coordsAt = function(e, t) { | |
return function(e, t, n) { | |
var i = e.nodeValue.length; | |
t > i && (t = i); | |
var r = t | |
, o = t | |
, a = 0; | |
0 == t && n < 0 || t == i && n >= 0 ? kn.chrome || kn.gecko || (t ? (r--, | |
a = 1) : o < i && (o++, | |
a = -1)) : n < 0 ? r-- : o < i && o++; | |
var s = Xt(e, r, o).getClientRects(); | |
if (!s.length) | |
return null; | |
var l = s[(a ? a < 0 : n >= 0) ? 0 : s.length - 1]; | |
kn.safari && !a && 0 == l.width && (l = Array.prototype.find.call(s, (function(e) { | |
return e.width | |
} | |
)) || l); | |
return a ? _t(l, a < 0) : l || null | |
}(this.dom, e, t) | |
} | |
, | |
t | |
}(on) | |
, Mn = function(e) { | |
function t(t, n, i) { | |
void 0 === n && (n = []), | |
void 0 === i && (i = 0); | |
var r = e.call(this) || this; | |
r.mark = t, | |
r.children = n, | |
r.length = i; | |
for (var o = 0, a = n; o < a.length; o++) { | |
a[o].setParent(r) | |
} | |
return r | |
} | |
return f(t, e), | |
t.prototype.setAttrs = function(e) { | |
if (Qt(e), | |
this.mark.class && (e.className = this.mark.class), | |
this.mark.attrs) | |
for (var t in this.mark.attrs) | |
e.setAttribute(t, this.mark.attrs[t]); | |
return e | |
} | |
, | |
t.prototype.canReuseDOM = function(t) { | |
return e.prototype.canReuseDOM.call(this, t) && !(8 & (this.flags | t.flags)) | |
} | |
, | |
t.prototype.reuseDOM = function(e) { | |
e.nodeName == this.mark.tagName.toUpperCase() && (this.setDOM(e), | |
this.flags |= 6) | |
} | |
, | |
t.prototype.sync = function(t, n) { | |
this.dom ? 4 & this.flags && this.setAttrs(this.dom) : this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))), | |
e.prototype.sync.call(this, t, n) | |
} | |
, | |
t.prototype.merge = function(e, n, i, r, o, a) { | |
return (!i || !(!(i instanceof t && i.mark.eq(this.mark)) || e && o <= 0 || n < this.length && a <= 0)) && (cn(this, e, n, i ? i.children.slice() : [], o - 1, a - 1), | |
this.markDirty(), | |
!0) | |
} | |
, | |
t.prototype.split = function(e) { | |
for (var n = [], i = 0, r = -1, o = 0, a = 0, s = this.children; a < s.length; a++) { | |
var l = s[a] | |
, c = i + l.length; | |
c > e && n.push(i < e ? l.split(e - i) : l), | |
r < 0 && i >= e && (r = o), | |
i = c, | |
o++ | |
} | |
var u = this.length - e; | |
return this.length = e, | |
r > -1 && (this.children.length = r, | |
this.markDirty()), | |
new t(this.mark,n,u) | |
} | |
, | |
t.prototype.domAtPos = function(e) { | |
return xn(this, e) | |
} | |
, | |
t.prototype.coordsAt = function(e, t) { | |
return Dn(this, e, t) | |
} | |
, | |
t | |
}(on); | |
var En = function(e) { | |
function t(t, n, i) { | |
var r = e.call(this) || this; | |
return r.widget = t, | |
r.length = n, | |
r.side = i, | |
r.prevWidget = null, | |
r | |
} | |
return f(t, e), | |
t.create = function(e, n, i) { | |
return new t(e,n,i) | |
} | |
, | |
t.prototype.split = function(e) { | |
var n = t.create(this.widget, this.length - e, this.side); | |
return this.length -= e, | |
n | |
} | |
, | |
t.prototype.sync = function(e) { | |
this.dom && this.widget.updateDOM(this.dom, e) || (this.dom && this.prevWidget && this.prevWidget.destroy(this.dom), | |
this.prevWidget = null, | |
this.setDOM(this.widget.toDOM(e)), | |
this.widget.editable || (this.dom.contentEditable = "false")) | |
} | |
, | |
t.prototype.getSide = function() { | |
return this.side | |
} | |
, | |
t.prototype.merge = function(e, n, i, r, o, a) { | |
return !(i && (!(i instanceof t && this.widget.compare(i.widget)) || e > 0 && o <= 0 || n < this.length && a <= 0)) && (this.length = e + (i ? i.length : 0) + (this.length - n), | |
!0) | |
} | |
, | |
t.prototype.become = function(e) { | |
return !this.widget.noReuse && e instanceof t && e.side == this.side && this.widget.constructor == e.widget.constructor && (this.widget.compare(e.widget) ? this.dom && e.widget.become(this.dom, this.widget) : this.markDirty(!0), | |
this.dom && !this.prevWidget && (this.prevWidget = this.widget), | |
this.widget = e.widget, | |
this.length = e.length, | |
!0) | |
} | |
, | |
t.prototype.ignoreMutation = function() { | |
return !0 | |
} | |
, | |
t.prototype.ignoreEvent = function(e) { | |
return this.widget.ignoreEvent(e) | |
} | |
, | |
Object.defineProperty(t.prototype, "overrideDOMText", { | |
get: function() { | |
if (0 == this.length) | |
return q.empty; | |
for (var e = this; e.parent; ) | |
e = e.parent; | |
var t = e.view | |
, n = t && t.state.doc | |
, i = this.posAtStart; | |
return n ? n.slice(i, i + this.length) : q.empty | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
t.prototype.domAtPos = function(e) { | |
return (this.length ? 0 == e : this.side > 0) ? nn.before(this.dom) : nn.after(this.dom, e == this.length) | |
} | |
, | |
t.prototype.domBoundsAround = function() { | |
return null | |
} | |
, | |
t.prototype.coordsAt = function(e, t) { | |
var n = this.widget.coordsAt(this.dom, e, t); | |
if (n) | |
return n; | |
var i = this.dom.getClientRects() | |
, r = null; | |
if (!i.length) | |
return null; | |
for (var o = this.side ? this.side < 0 : e > 0, a = o ? i.length - 1 : 0; r = i[a], | |
!(e > 0 ? 0 == a : a == i.length - 1 || r.top < r.bottom); a += o ? -1 : 1) | |
; | |
return _t(r, !o) | |
} | |
, | |
Object.defineProperty(t.prototype, "isEditable", { | |
get: function() { | |
return !1 | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
Object.defineProperty(t.prototype, "isWidget", { | |
get: function() { | |
return !0 | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
Object.defineProperty(t.prototype, "isHidden", { | |
get: function() { | |
return this.widget.isHidden | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
t.prototype.destroy = function() { | |
e.prototype.destroy.call(this), | |
this.dom && this.widget.destroy(this.dom) | |
} | |
, | |
t | |
}(on) | |
, Sn = function(e) { | |
function t(t) { | |
var n = e.call(this) || this; | |
return n.side = t, | |
n | |
} | |
return f(t, e), | |
Object.defineProperty(t.prototype, "length", { | |
get: function() { | |
return 0 | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
t.prototype.merge = function() { | |
return !1 | |
} | |
, | |
t.prototype.become = function(e) { | |
return e instanceof t && e.side == this.side | |
} | |
, | |
t.prototype.split = function() { | |
return new t(this.side) | |
} | |
, | |
t.prototype.sync = function() { | |
if (!this.dom) { | |
var e = document.createElement("img"); | |
e.className = "cm-widgetBuffer", | |
e.setAttribute("aria-hidden", "true"), | |
this.setDOM(e) | |
} | |
} | |
, | |
t.prototype.getSide = function() { | |
return this.side | |
} | |
, | |
t.prototype.domAtPos = function(e) { | |
return this.side > 0 ? nn.before(this.dom) : nn.after(this.dom) | |
} | |
, | |
t.prototype.localPosFromDOM = function() { | |
return 0 | |
} | |
, | |
t.prototype.domBoundsAround = function() { | |
return null | |
} | |
, | |
t.prototype.coordsAt = function(e) { | |
return this.dom.getBoundingClientRect() | |
} | |
, | |
Object.defineProperty(t.prototype, "overrideDOMText", { | |
get: function() { | |
return q.empty | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
Object.defineProperty(t.prototype, "isHidden", { | |
get: function() { | |
return !0 | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
t | |
}(on); | |
function xn(e, t) { | |
for (var n = e.dom, i = e.children, r = 0, o = 0; r < i.length; r++) { | |
var a = i[r] | |
, s = o + a.length; | |
if (!(s == o && a.getSide() <= 0)) { | |
if (t > o && t < s && a.dom.parentNode == n) | |
return a.domAtPos(t - o); | |
if (t <= o) | |
break; | |
o = s | |
} | |
} | |
for (var l = r; l > 0; l--) { | |
var c = i[l - 1]; | |
if (c.dom.parentNode == n) | |
return c.domAtPos(c.length) | |
} | |
for (l = r; l < i.length; l++) { | |
var u = i[l]; | |
if (u.dom.parentNode == n) | |
return u.domAtPos(0) | |
} | |
return new nn(n,0) | |
} | |
function Tn(e, t, n) { | |
var i, r = e.children; | |
n > 0 && t instanceof Mn && r.length && (i = r[r.length - 1])instanceof Mn && i.mark.eq(t.mark) ? Tn(i, t.children[0], n - 1) : (r.push(t), | |
t.setParent(e)), | |
e.length += t.length | |
} | |
function Dn(e, t, n) { | |
var i = null | |
, r = -1 | |
, o = null | |
, a = -1; | |
!function e(t, s) { | |
for (var l = 0, c = 0; l < t.children.length && c <= s; l++) { | |
var u = t.children[l] | |
, h = c + u.length; | |
h >= s && (u.children.length ? e(u, s - c) : (!o || o.isHidden && n > 0) && (h > s || c == h && u.getSide() > 0) ? (o = u, | |
a = s - c) : (c < s || c == h && u.getSide() < 0 && !u.isHidden) && (i = u, | |
r = s - c)), | |
c = h | |
} | |
}(e, t); | |
var s = (n < 0 ? i : o) || i || o; | |
return s ? s.coordsAt(Math.max(0, s == i ? r : a), n) : function(e) { | |
var t = e.dom.lastChild; | |
if (!t) | |
return e.dom.getBoundingClientRect(); | |
var n = Rt(t); | |
return n[n.length - 1] || null | |
}(e) | |
} | |
function An(e, t) { | |
for (var n in e) | |
"class" == n && t.class ? t.class += " " + e.class : "style" == n && t.style ? t.style += ";" + e.style : t[n] = e[n]; | |
return t | |
} | |
Cn.prototype.children = En.prototype.children = Sn.prototype.children = rn; | |
var Ln = Object.create(null); | |
function Pn(e, t, n) { | |
if (e == t) | |
return !0; | |
e || (e = Ln), | |
t || (t = Ln); | |
var i = Object.keys(e) | |
, r = Object.keys(t); | |
if (i.length - (n && i.indexOf(n) > -1 ? 1 : 0) != r.length - (n && r.indexOf(n) > -1 ? 1 : 0)) | |
return !1; | |
for (var o = 0, a = i; o < a.length; o++) { | |
var s = a[o]; | |
if (s != n && (-1 == r.indexOf(s) || e[s] !== t[s])) | |
return !1 | |
} | |
return !0 | |
} | |
function In(e, t, n) { | |
var i = !1; | |
if (t) | |
for (var r in t) | |
n && r in n || (i = !0, | |
"style" == r ? e.style.cssText = "" : e.removeAttribute(r)); | |
if (n) | |
for (var r in n) | |
t && t[r] == n[r] || (i = !0, | |
"style" == r ? e.style.cssText = n[r] : e.setAttribute(r, n[r])); | |
return i | |
} | |
function Fn(e) { | |
for (var t = Object.create(null), n = 0; n < e.attributes.length; n++) { | |
var i = e.attributes[n]; | |
t[i.name] = i.value | |
} | |
return t | |
} | |
var On = function() { | |
function e() {} | |
return e.prototype.eq = function(e) { | |
return !1 | |
} | |
, | |
e.prototype.updateDOM = function(e, t) { | |
return !1 | |
} | |
, | |
e.prototype.become = function(e, t) {} | |
, | |
e.prototype.compare = function(e) { | |
return this == e || this.constructor == e.constructor && this.eq(e) | |
} | |
, | |
Object.defineProperty(e.prototype, "estimatedHeight", { | |
get: function() { | |
return -1 | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
Object.defineProperty(e.prototype, "lineBreaks", { | |
get: function() { | |
return 0 | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
e.prototype.ignoreEvent = function(e) { | |
return !0 | |
} | |
, | |
e.prototype.coordsAt = function(e, t, n) { | |
return null | |
} | |
, | |
Object.defineProperty(e.prototype, "isHidden", { | |
get: function() { | |
return !1 | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
Object.defineProperty(e.prototype, "noReuse", { | |
get: function() { | |
return !1 | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
Object.defineProperty(e.prototype, "editable", { | |
get: function() { | |
return !1 | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
e.prototype.destroy = function(e) {} | |
, | |
e | |
}() | |
, Bn = function(e) { | |
return e[e.Text = 0] = "Text", | |
e[e.WidgetBefore = 1] = "WidgetBefore", | |
e[e.WidgetAfter = 2] = "WidgetAfter", | |
e[e.WidgetRange = 3] = "WidgetRange", | |
e | |
}(Bn || (Bn = {})) | |
, Nn = function(e) { | |
function t(t, n, i, r) { | |
var o = e.call(this) || this; | |
return o.startSide = t, | |
o.endSide = n, | |
o.widget = i, | |
o.spec = r, | |
o | |
} | |
return f(t, e), | |
Object.defineProperty(t.prototype, "heightRelevant", { | |
get: function() { | |
return !1 | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
t.mark = function(e) { | |
return new Rn(e) | |
} | |
, | |
t.widget = function(e) { | |
var t = Math.max(-1e4, Math.min(1e4, e.side || 0)) | |
, n = !!e.block; | |
return t += n && !e.inlineOrder ? t > 0 ? 3e8 : -4e8 : t > 0 ? 1e8 : -1e8, | |
new Vn(e,t,t,n,e.widget || null,!1) | |
} | |
, | |
t.replace = function(e) { | |
var t, n, i = !!e.block; | |
if (e.isBlockGap) | |
t = -5e8, | |
n = 4e8; | |
else { | |
var r = zn(e, i); | |
t = (r.start ? i ? -3e8 : -1 : 5e8) - 1, | |
n = 1 + (r.end ? i ? 2e8 : 1 : -6e8) | |
} | |
return new Vn(e,t,n,i,e.widget || null,!0) | |
} | |
, | |
t.line = function(e) { | |
return new Hn(e) | |
} | |
, | |
t.set = function(e, t) { | |
return void 0 === t && (t = !1), | |
lt.of(e, t) | |
} | |
, | |
t.prototype.hasHeight = function() { | |
return !!this.widget && this.widget.estimatedHeight > -1 | |
} | |
, | |
t | |
}(rt); | |
Nn.none = lt.empty; | |
var Rn = function(e) { | |
function t(t) { | |
var n = this | |
, i = zn(t) | |
, r = i.start | |
, o = i.end; | |
return (n = e.call(this, r ? -1 : 5e8, o ? 1 : -6e8, null, t) || this).tagName = t.tagName || "span", | |
n.class = t.class || "", | |
n.attrs = t.attributes || null, | |
n | |
} | |
return f(t, e), | |
t.prototype.eq = function(e) { | |
var n, i; | |
return this == e || e instanceof t && this.tagName == e.tagName && (this.class || (null === (n = this.attrs) || void 0 === n ? void 0 : n.class)) == (e.class || (null === (i = e.attrs) || void 0 === i ? void 0 : i.class)) && Pn(this.attrs, e.attrs, "class") | |
} | |
, | |
t.prototype.range = function(t, n) { | |
if (void 0 === n && (n = t), | |
t >= n) | |
throw new RangeError("Mark decorations may not be empty"); | |
return e.prototype.range.call(this, t, n) | |
} | |
, | |
t | |
}(Nn); | |
Rn.prototype.point = !1; | |
var Hn = function(e) { | |
function t(t) { | |
return e.call(this, -2e8, -2e8, null, t) || this | |
} | |
return f(t, e), | |
t.prototype.eq = function(e) { | |
return e instanceof t && this.spec.class == e.spec.class && Pn(this.spec.attributes, e.spec.attributes) | |
} | |
, | |
t.prototype.range = function(t, n) { | |
if (void 0 === n && (n = t), | |
n != t) | |
throw new RangeError("Line decoration ranges must be zero-length"); | |
return e.prototype.range.call(this, t, n) | |
} | |
, | |
t | |
}(Nn); | |
Hn.prototype.mapMode = ne.TrackBefore, | |
Hn.prototype.point = !0; | |
var Vn = function(e) { | |
function t(t, n, i, r, o, a) { | |
var s = e.call(this, n, i, o, t) || this; | |
return s.block = r, | |
s.isReplace = a, | |
s.mapMode = r ? n <= 0 ? ne.TrackBefore : ne.TrackAfter : ne.TrackDel, | |
s | |
} | |
return f(t, e), | |
Object.defineProperty(t.prototype, "type", { | |
get: function() { | |
return this.startSide != this.endSide ? Bn.WidgetRange : this.startSide <= 0 ? Bn.WidgetBefore : Bn.WidgetAfter | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
Object.defineProperty(t.prototype, "heightRelevant", { | |
get: function() { | |
return this.block || !!this.widget && (this.widget.estimatedHeight >= 5 || this.widget.lineBreaks > 0) | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
t.prototype.eq = function(e) { | |
return e instanceof t && (n = this.widget, | |
i = e.widget, | |
n == i || !!(n && i && n.compare(i))) && this.block == e.block && this.startSide == e.startSide && this.endSide == e.endSide; | |
var n, i | |
} | |
, | |
t.prototype.range = function(t, n) { | |
if (void 0 === n && (n = t), | |
this.isReplace && (t > n || t == n && this.startSide > 0 && this.endSide <= 0)) | |
throw new RangeError("Invalid range for replacement decoration"); | |
if (!this.isReplace && n != t) | |
throw new RangeError("Widget decorations can only have zero-length ranges"); | |
return e.prototype.range.call(this, t, n) | |
} | |
, | |
t | |
}(Nn); | |
function zn(e, t) { | |
void 0 === t && (t = !1); | |
var n = e.inclusiveStart | |
, i = e.inclusiveEnd; | |
return null == n && (n = e.inclusive), | |
null == i && (i = e.inclusive), | |
{ | |
start: null != n ? n : t, | |
end: null != i ? i : t | |
} | |
} | |
function qn(e, t, n, i) { | |
void 0 === i && (i = 0); | |
var r = n.length - 1; | |
r >= 0 && n[r] + i >= e ? n[r] = Math.max(n[r], t) : n.push(e, t) | |
} | |
Vn.prototype.point = !0; | |
var Un = function(e) { | |
function t() { | |
var t = e.apply(this, arguments) || this; | |
return t.children = [], | |
t.length = 0, | |
t.prevAttrs = void 0, | |
t.attrs = null, | |
t.breakAfter = 0, | |
t | |
} | |
return f(t, e), | |
t.prototype.merge = function(e, n, i, r, o, a) { | |
if (i) { | |
if (!(i instanceof t)) | |
return !1; | |
this.dom || i.transferDOM(this) | |
} | |
return r && this.setDeco(i ? i.attrs : null), | |
cn(this, e, n, i ? i.children.slice() : [], o, a), | |
!0 | |
} | |
, | |
t.prototype.split = function(e) { | |
var n = new t; | |
if (n.breakAfter = this.breakAfter, | |
0 == this.length) | |
return n; | |
var i = this.childPos(e) | |
, r = i.i | |
, o = i.off; | |
o && (n.append(this.children[r].split(o), 0), | |
this.children[r].merge(o, this.children[r].length, null, !1, 0, 0), | |
r++); | |
for (var a = r; a < this.children.length; a++) | |
n.append(this.children[a], 0); | |
for (; r > 0 && 0 == this.children[r - 1].length; ) | |
this.children[--r].destroy(); | |
return this.children.length = r, | |
this.markDirty(), | |
this.length = e, | |
n | |
} | |
, | |
t.prototype.transferDOM = function(e) { | |
this.dom && (this.markDirty(), | |
e.setDOM(this.dom), | |
e.prevAttrs = void 0 === this.prevAttrs ? this.attrs : this.prevAttrs, | |
this.prevAttrs = void 0, | |
this.dom = null) | |
} | |
, | |
t.prototype.setDeco = function(e) { | |
Pn(this.attrs, e) || (this.dom && (this.prevAttrs = this.attrs, | |
this.markDirty()), | |
this.attrs = e) | |
} | |
, | |
t.prototype.append = function(e, t) { | |
Tn(this, e, t) | |
} | |
, | |
t.prototype.addLineDeco = function(e) { | |
var t = e.spec.attributes | |
, n = e.spec.class; | |
t && (this.attrs = An(t, this.attrs || {})), | |
n && (this.attrs = An({ | |
class: n | |
}, this.attrs || {})) | |
} | |
, | |
t.prototype.domAtPos = function(e) { | |
return xn(this, e) | |
} | |
, | |
t.prototype.reuseDOM = function(e) { | |
"DIV" == e.nodeName && e.classList.contains("cm-view") && (this.setDOM(e), | |
this.flags |= 6) | |
} | |
, | |
t.prototype.sync = function(t, n) { | |
var i; | |
this.dom ? 4 & this.flags && (Qt(this.dom), | |
this.dom.className = "cm-line", | |
this.prevAttrs = this.attrs ? null : void 0) : (this.setDOM(document.createElement("div")), | |
this.dom.className = "cm-line", | |
this.prevAttrs = this.attrs ? null : void 0), | |
void 0 !== this.prevAttrs && (In(this.dom, this.prevAttrs, this.attrs), | |
this.dom.classList.add("cm-line"), | |
this.prevAttrs = void 0), | |
e.prototype.sync.call(this, t, n); | |
for (var r = this.dom.lastChild; r && on.get(r)instanceof Mn; ) | |
r = r.lastChild; | |
if (!(r && this.length && ("BR" == r.nodeName || 0 != (null === (i = on.get(r)) || void 0 === i ? void 0 : i.isEditable) || kn.ios && this.children.some((function(e) { | |
return e instanceof Cn | |
} | |
))))) { | |
var o = document.createElement("BR"); | |
o.cmIgnore = !0, | |
this.dom.appendChild(o) | |
} | |
} | |
, | |
t.prototype.measureTextSize = function() { | |
if (0 == this.children.length || this.length > 20) | |
return null; | |
for (var e, t = 0, n = 0, i = this.children; n < i.length; n++) { | |
var r = i[n]; | |
if (!(r instanceof Cn) || /[^ -~]/.test(r.text)) | |
return null; | |
var o = Rt(r.dom); | |
if (1 != o.length) | |
return null; | |
t += o[0].width, | |
e = o[0].height | |
} | |
return t ? { | |
lineHeight: this.dom.getBoundingClientRect().height, | |
charWidth: t / this.length, | |
textHeight: e | |
} : null | |
} | |
, | |
t.prototype.coordsAt = function(e, t) { | |
var n = Dn(this, e, t); | |
if (!this.children.length && n && this.parent) { | |
var i = this.parent.view.viewState.heightOracle | |
, r = n.bottom - n.top; | |
if (Math.abs(r - i.lineHeight) < 2 && i.textHeight < r) { | |
var o = (r - i.textHeight) / 2; | |
return { | |
top: n.top + o, | |
bottom: n.bottom - o, | |
left: n.left, | |
right: n.left | |
} | |
} | |
} | |
return n | |
} | |
, | |
t.prototype.become = function(e) { | |
return e instanceof t && 0 == this.children.length && 0 == e.children.length && Pn(this.attrs, e.attrs) && this.breakAfter == e.breakAfter | |
} | |
, | |
t.prototype.covers = function() { | |
return !0 | |
} | |
, | |
t.find = function(e, n) { | |
for (var i = 0, r = 0; i < e.children.length; i++) { | |
var o = e.children[i] | |
, a = r + o.length; | |
if (a >= n) { | |
if (o instanceof t) | |
return o; | |
if (a > n) | |
break | |
} | |
r = a + o.breakAfter | |
} | |
return null | |
} | |
, | |
t | |
}(on) | |
, _n = function(e) { | |
function t(t, n, i) { | |
var r = e.call(this) || this; | |
return r.widget = t, | |
r.length = n, | |
r.deco = i, | |
r.breakAfter = 0, | |
r.prevWidget = null, | |
r | |
} | |
return f(t, e), | |
t.prototype.merge = function(e, n, i, r, o, a) { | |
return !(i && (!(i instanceof t && this.widget.compare(i.widget)) || e > 0 && o <= 0 || n < this.length && a <= 0)) && (this.length = e + (i ? i.length : 0) + (this.length - n), | |
!0) | |
} | |
, | |
t.prototype.domAtPos = function(e) { | |
return 0 == e ? nn.before(this.dom) : nn.after(this.dom, e == this.length) | |
} | |
, | |
t.prototype.split = function(e) { | |
var n = this.length - e; | |
this.length = e; | |
var i = new t(this.widget,n,this.deco); | |
return i.breakAfter = this.breakAfter, | |
i | |
} | |
, | |
Object.defineProperty(t.prototype, "children", { | |
get: function() { | |
return rn | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
t.prototype.sync = function(e) { | |
this.dom && this.widget.updateDOM(this.dom, e) || (this.dom && this.prevWidget && this.prevWidget.destroy(this.dom), | |
this.prevWidget = null, | |
this.setDOM(this.widget.toDOM(e)), | |
this.widget.editable || (this.dom.contentEditable = "false")) | |
} | |
, | |
Object.defineProperty(t.prototype, "overrideDOMText", { | |
get: function() { | |
return this.parent ? this.parent.view.state.doc.slice(this.posAtStart, this.posAtEnd) : q.empty | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
t.prototype.domBoundsAround = function() { | |
return null | |
} | |
, | |
t.prototype.become = function(e) { | |
return !this.widget.noReuse && e instanceof t && e.widget.constructor == this.widget.constructor && (e.widget.compare(this.widget) ? this.dom && e.widget.become(this.dom, this.widget) : this.markDirty(!0), | |
this.dom && !this.prevWidget && (this.prevWidget = this.widget), | |
this.widget = e.widget, | |
this.length = e.length, | |
this.deco = e.deco, | |
this.breakAfter = e.breakAfter, | |
!0) | |
} | |
, | |
t.prototype.ignoreMutation = function() { | |
return !0 | |
} | |
, | |
t.prototype.ignoreEvent = function(e) { | |
return this.widget.ignoreEvent(e) | |
} | |
, | |
Object.defineProperty(t.prototype, "isEditable", { | |
get: function() { | |
return !1 | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
Object.defineProperty(t.prototype, "isWidget", { | |
get: function() { | |
return !0 | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
t.prototype.coordsAt = function(e, t) { | |
var n = this.widget.coordsAt(this.dom, e, t); | |
return n || (this.widget instanceof Wn ? null : _t(this.dom.getBoundingClientRect(), this.length ? 0 == e : t <= 0)) | |
} | |
, | |
t.prototype.destroy = function() { | |
e.prototype.destroy.call(this), | |
this.dom && this.widget.destroy(this.dom) | |
} | |
, | |
t.prototype.covers = function(e) { | |
var t = this.deco | |
, n = t.startSide | |
, i = t.endSide; | |
return n != i && (e < 0 ? n < 0 : i > 0) | |
} | |
, | |
t | |
}(on) | |
, Wn = function(e) { | |
function t(t) { | |
var n = e.call(this) || this; | |
return n.height = t, | |
n | |
} | |
return f(t, e), | |
t.prototype.toDOM = function() { | |
var e = document.createElement("div"); | |
return e.className = "cm-gap", | |
this.updateDOM(e), | |
e | |
} | |
, | |
t.prototype.eq = function(e) { | |
return e.height == this.height | |
} | |
, | |
t.prototype.updateDOM = function(e) { | |
return e.style.height = this.height + "px", | |
!0 | |
} | |
, | |
Object.defineProperty(t.prototype, "editable", { | |
get: function() { | |
return !0 | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
Object.defineProperty(t.prototype, "estimatedHeight", { | |
get: function() { | |
return this.height | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
t.prototype.ignoreEvent = function() { | |
return !1 | |
} | |
, | |
t | |
}(On) | |
, jn = function() { | |
function e(e, t, n, i) { | |
this.doc = e, | |
this.pos = t, | |
this.end = n, | |
this.disallowBlockEffectsFor = i, | |
this.content = [], | |
this.curLine = null, | |
this.breakAtStart = 0, | |
this.pendingBuffer = 0, | |
this.bufferMarks = [], | |
this.atCursorPos = !0, | |
this.openStart = -1, | |
this.openEnd = -1, | |
this.text = "", | |
this.textOff = 0, | |
this.cursor = e.iter(), | |
this.skip = t | |
} | |
return e.prototype.posCovered = function() { | |
if (0 == this.content.length) | |
return !this.breakAtStart && this.doc.lineAt(this.pos).from != this.pos; | |
var e = this.content[this.content.length - 1]; | |
return !(e.breakAfter || e instanceof _n && e.deco.endSide < 0) | |
} | |
, | |
e.prototype.getLine = function() { | |
return this.curLine || (this.content.push(this.curLine = new Un), | |
this.atCursorPos = !0), | |
this.curLine | |
} | |
, | |
e.prototype.flushBuffer = function(e) { | |
void 0 === e && (e = this.bufferMarks), | |
this.pendingBuffer && (this.curLine.append(Gn(new Sn(-1), e), e.length), | |
this.pendingBuffer = 0) | |
} | |
, | |
e.prototype.addBlockWidget = function(e) { | |
this.flushBuffer(), | |
this.curLine = null, | |
this.content.push(e) | |
} | |
, | |
e.prototype.finish = function(e) { | |
this.pendingBuffer && e <= this.bufferMarks.length ? this.flushBuffer() : this.pendingBuffer = 0, | |
this.posCovered() || e && this.content.length && this.content[this.content.length - 1]instanceof _n || this.getLine() | |
} | |
, | |
e.prototype.buildText = function(e, t, n) { | |
for (; e > 0; ) { | |
if (this.textOff == this.text.length) { | |
var i = this.cursor.next(this.skip) | |
, r = i.value | |
, o = i.lineBreak | |
, a = i.done; | |
if (this.skip = 0, | |
a) | |
throw new Error("Ran out of text content when drawing inline views"); | |
if (o) { | |
this.posCovered() || this.getLine(), | |
this.content.length ? this.content[this.content.length - 1].breakAfter = 1 : this.breakAtStart = 1, | |
this.flushBuffer(), | |
this.curLine = null, | |
this.atCursorPos = !0, | |
e--; | |
continue | |
} | |
this.text = r, | |
this.textOff = 0 | |
} | |
var s = Math.min(this.text.length - this.textOff, e, 512); | |
this.flushBuffer(t.slice(t.length - n)), | |
this.getLine().append(Gn(new Cn(this.text.slice(this.textOff, this.textOff + s)), t), n), | |
this.atCursorPos = !0, | |
this.textOff += s, | |
e -= s, | |
n = 0 | |
} | |
} | |
, | |
e.prototype.span = function(e, t, n, i) { | |
this.buildText(t - e, n, i), | |
this.pos = t, | |
this.openStart < 0 && (this.openStart = i) | |
} | |
, | |
e.prototype.point = function(e, t, n, i, r, o) { | |
if (this.disallowBlockEffectsFor[o] && n instanceof Vn) { | |
if (n.block) | |
throw new RangeError("Block decorations may not be specified via plugins"); | |
if (t > this.doc.lineAt(this.pos).to) | |
throw new RangeError("Decorations that replace line breaks may not be specified via plugins") | |
} | |
var a = t - e; | |
if (n instanceof Vn) | |
if (n.block) | |
n.startSide > 0 && !this.posCovered() && this.getLine(), | |
this.addBlockWidget(new _n(n.widget || Kn.block,a,n)); | |
else { | |
var s = En.create(n.widget || Kn.inline, a, a ? 0 : n.startSide) | |
, l = this.atCursorPos && !s.isEditable && r <= i.length && (e < t || n.startSide > 0) | |
, c = !s.isEditable && (e < t || r > i.length || n.startSide <= 0) | |
, u = this.getLine(); | |
2 != this.pendingBuffer || l || s.isEditable || (this.pendingBuffer = 0), | |
this.flushBuffer(i), | |
l && (u.append(Gn(new Sn(1), i), r), | |
r = i.length + Math.max(0, r - i.length)), | |
u.append(Gn(s, i), r), | |
this.atCursorPos = c, | |
this.pendingBuffer = c ? e < t || r > i.length ? 1 : 2 : 0, | |
this.pendingBuffer && (this.bufferMarks = i.slice()) | |
} | |
else | |
this.doc.lineAt(this.pos).from == this.pos && this.getLine().addLineDeco(n); | |
a && (this.textOff + a <= this.text.length ? this.textOff += a : (this.skip += a - (this.text.length - this.textOff), | |
this.text = "", | |
this.textOff = 0), | |
this.pos = t), | |
this.openStart < 0 && (this.openStart = r) | |
} | |
, | |
e.build = function(t, n, i, r, o) { | |
var a = new e(t,n,i,o); | |
return a.openEnd = lt.spans(r, n, i, a), | |
a.openStart < 0 && (a.openStart = a.openEnd), | |
a.finish(a.openEnd), | |
a | |
} | |
, | |
e | |
}(); | |
function Gn(e, t) { | |
for (var n = 0, i = t; n < i.length; n++) { | |
var r = i[n]; | |
e = new Mn(r,[e],e.length) | |
} | |
return e | |
} | |
var Kn = function(e) { | |
function t(t) { | |
var n = e.call(this) || this; | |
return n.tag = t, | |
n | |
} | |
return f(t, e), | |
t.prototype.eq = function(e) { | |
return e.tag == this.tag | |
} | |
, | |
t.prototype.toDOM = function() { | |
return document.createElement(this.tag) | |
} | |
, | |
t.prototype.updateDOM = function(e) { | |
return e.nodeName.toLowerCase() == this.tag | |
} | |
, | |
Object.defineProperty(t.prototype, "isHidden", { | |
get: function() { | |
return !0 | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
t | |
}(On); | |
Kn.inline = new Kn("span"), | |
Kn.block = new Kn("div"); | |
var Yn = function(e) { | |
return e[e.LTR = 0] = "LTR", | |
e[e.RTL = 1] = "RTL", | |
e | |
}(Yn || (Yn = {})) | |
, Zn = Yn.LTR | |
, Xn = Yn.RTL; | |
function $n(e) { | |
for (var t = [], n = 0; n < e.length; n++) | |
t.push(1 << +e[n]); | |
return t | |
} | |
for (var Qn = $n("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"), Jn = $n("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"), ei = Object.create(null), ti = [], ni = 0, ii = ["()", "[]", "{}"]; ni < ii.length; ni++) { | |
var ri = ii[ni] | |
, oi = ri.charCodeAt(0) | |
, ai = ri.charCodeAt(1); | |
ei[oi] = ai, | |
ei[ai] = -oi | |
} | |
function si(e) { | |
return e <= 247 ? Qn[e] : 1424 <= e && e <= 1524 ? 2 : 1536 <= e && e <= 1785 ? Jn[e - 1536] : 1774 <= e && e <= 2220 ? 4 : 8192 <= e && e <= 8204 ? 256 : 64336 <= e && e <= 65023 ? 4 : 1 | |
} | |
var li = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/ | |
, ci = function() { | |
function e(e, t, n) { | |
this.from = e, | |
this.to = t, | |
this.level = n | |
} | |
return Object.defineProperty(e.prototype, "dir", { | |
get: function() { | |
return this.level % 2 ? Xn : Zn | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
e.prototype.side = function(e, t) { | |
return this.dir == t == e ? this.to : this.from | |
} | |
, | |
e.prototype.forward = function(e, t) { | |
return e == (this.dir == t) | |
} | |
, | |
e.find = function(e, t, n, i) { | |
for (var r = -1, o = 0; o < e.length; o++) { | |
var a = e[o]; | |
if (a.from <= t && a.to >= t) { | |
if (a.level == n) | |
return o; | |
(r < 0 || (0 != i ? i < 0 ? a.from < t : a.to > t : e[r].level > a.level)) && (r = o) | |
} | |
} | |
if (r < 0) | |
throw new RangeError("Index out of range"); | |
return r | |
} | |
, | |
e | |
}(); | |
function ui(e, t) { | |
if (e.length != t.length) | |
return !1; | |
for (var n = 0; n < e.length; n++) { | |
var i = e[n] | |
, r = t[n]; | |
if (i.from != r.from || i.to != r.to || i.direction != r.direction || !ui(i.inner, r.inner)) | |
return !1 | |
} | |
return !0 | |
} | |
var hi = []; | |
function di(e, t, n, i, r, o, a) { | |
var s = i % 2 ? 2 : 1; | |
if (i % 2 == r % 2) | |
for (var l = t, c = 0; l < n; ) { | |
var u = !0 | |
, h = !1; | |
if (c == o.length || l < o[c].from) | |
(y = hi[l]) != s && (u = !1, | |
h = 16 == y); | |
var d = u || 1 != s ? null : [] | |
, p = u ? i : i + 1 | |
, f = l; | |
e: for (; ; ) | |
if (c < o.length && f == o[c].from) { | |
if (h) | |
break e; | |
var m = o[c]; | |
if (!u) | |
for (var v = m.to, g = c + 1; ; ) { | |
if (v == n) | |
break e; | |
if (!(g < o.length && o[g].from == v)) { | |
if (hi[v] == s) | |
break e; | |
break | |
} | |
v = o[g++].to | |
} | |
if (c++, | |
d) | |
d.push(m); | |
else | |
m.from > l && a.push(new ci(l,m.from,p)), | |
pi(e, m.direction == Zn != !(p % 2) ? i + 1 : i, r, m.inner, m.from, m.to, a), | |
l = m.to; | |
f = m.to | |
} else { | |
if (f == n || (u ? hi[f] != s : hi[f] == s)) | |
break; | |
f++ | |
} | |
d ? di(e, l, f, i + 1, r, d, a) : l < f && a.push(new ci(l,f,p)), | |
l = f | |
} | |
else | |
for (l = n, | |
c = o.length; l > t; ) { | |
var y; | |
u = !0, | |
h = !1; | |
if (!c || l > o[c - 1].to) | |
(y = hi[l - 1]) != s && (u = !1, | |
h = 16 == y); | |
d = u || 1 != s ? null : [], | |
p = u ? i : i + 1, | |
f = l; | |
e: for (; ; ) | |
if (c && f == o[c - 1].to) { | |
if (h) | |
break e; | |
m = o[--c]; | |
if (!u) | |
for (v = m.from, | |
g = c; ; ) { | |
if (v == t) | |
break e; | |
if (!g || o[g - 1].to != v) { | |
if (hi[v - 1] == s) | |
break e; | |
break | |
} | |
v = o[--g].from | |
} | |
if (d) | |
d.push(m); | |
else | |
m.to < l && a.push(new ci(m.to,l,p)), | |
pi(e, m.direction == Zn != !(p % 2) ? i + 1 : i, r, m.inner, m.from, m.to, a), | |
l = m.from; | |
f = m.from | |
} else { | |
if (f == t || (u ? hi[f - 1] != s : hi[f - 1] == s)) | |
break; | |
f-- | |
} | |
d ? di(e, f, l, i + 1, r, d, a) : f < l && a.push(new ci(f,l,p)), | |
l = f | |
} | |
} | |
function pi(e, t, n, i, r, o, a) { | |
var s = t % 2 ? 2 : 1; | |
!function(e, t, n, i, r) { | |
for (var o = 0; o <= i.length; o++) { | |
for (var a = o ? i[o - 1].to : t, s = o < i.length ? i[o].from : n, l = o ? 256 : r, c = a, u = l, h = l; c < s; c++) | |
512 == (d = si(e.charCodeAt(c))) ? d = u : 8 == d && 4 == h && (d = 16), | |
hi[c] = 4 == d ? 2 : d, | |
7 & d && (h = d), | |
u = d; | |
for (c = a, | |
u = l, | |
h = l; c < s; c++) { | |
var d; | |
if (128 == (d = hi[c])) | |
c < s - 1 && u == hi[c + 1] && 24 & u ? d = hi[c] = u : hi[c] = 256; | |
else if (64 == d) { | |
for (var p = c + 1; p < s && 64 == hi[p]; ) | |
p++; | |
for (var f = c && 8 == u || p < n && 8 == hi[p] ? 1 == h ? 1 : 8 : 256, m = c; m < p; m++) | |
hi[m] = f; | |
c = p - 1 | |
} else | |
8 == d && 1 == h && (hi[c] = 1); | |
u = d, | |
7 & d && (h = d) | |
} | |
} | |
}(e, r, o, i, s), | |
function(e, t, n, i, r) { | |
for (var o = 1 == r ? 2 : 1, a = 0, s = 0, l = 0; a <= i.length; a++) | |
for (var c = a ? i[a - 1].to : t, u = a < i.length ? i[a].from : n, h = c, d = void 0, p = void 0, f = void 0; h < u; h++) | |
if (p = ei[d = e.charCodeAt(h)]) | |
if (p < 0) { | |
for (var m = s - 3; m >= 0; m -= 3) | |
if (ti[m + 1] == -p) { | |
var v = ti[m + 2] | |
, g = 2 & v ? r : 4 & v ? 1 & v ? o : r : 0; | |
g && (hi[h] = hi[ti[m]] = g), | |
s = m; | |
break | |
} | |
} else { | |
if (189 == ti.length) | |
break; | |
ti[s++] = h, | |
ti[s++] = d, | |
ti[s++] = l | |
} | |
else if (2 == (f = hi[h]) || 1 == f) { | |
var y = f == r; | |
for (l = y ? 0 : 1, | |
m = s - 3; m >= 0; m -= 3) { | |
var b = ti[m + 2]; | |
if (2 & b) | |
break; | |
if (y) | |
ti[m + 2] |= 2; | |
else { | |
if (4 & b) | |
break; | |
ti[m + 2] |= 4 | |
} | |
} | |
} | |
}(e, r, o, i, s), | |
function(e, t, n, i) { | |
for (var r = 0, o = i; r <= n.length; r++) | |
for (var a = r ? n[r - 1].to : e, s = r < n.length ? n[r].from : t, l = a; l < s; ) { | |
var c = hi[l]; | |
if (256 == c) { | |
for (var u = l + 1; ; ) | |
if (u == s) { | |
if (r == n.length) | |
break; | |
u = n[r++].to, | |
s = r < n.length ? n[r].from : t | |
} else { | |
if (256 != hi[u]) | |
break; | |
u++ | |
} | |
for (var h = 1 == o, d = h == (1 == (u < t ? hi[u] : i)) ? h ? 1 : 2 : i, p = u, f = r, m = f ? n[f - 1].to : e; p > l; ) | |
p == m && (p = n[--f].from, | |
m = f ? n[f - 1].to : e), | |
hi[--p] = d; | |
l = u | |
} else | |
o = c, | |
l++ | |
} | |
}(r, o, i, s), | |
di(e, r, o, t, n, i, a) | |
} | |
function fi(e, t, n) { | |
if (!e) | |
return [new ci(0,0,t == Xn ? 1 : 0)]; | |
if (t == Zn && !n.length && !li.test(e)) | |
return mi(e.length); | |
if (n.length) | |
for (; e.length > hi.length; ) | |
hi[hi.length] = 256; | |
var i = [] | |
, r = t == Zn ? 0 : 1; | |
return pi(e, r, r, n, 0, e.length, i), | |
i | |
} | |
function mi(e) { | |
return [new ci(0,e,0)] | |
} | |
var vi = ""; | |
function gi(e, t, n, i, r) { | |
var o, a = i.head - e.from, s = ci.find(t, a, null !== (o = i.bidiLevel) && void 0 !== o ? o : -1, i.assoc), l = t[s], c = l.side(r, n); | |
if (a == c) { | |
var u = s += r ? 1 : -1; | |
if (u < 0 || u >= t.length) | |
return null; | |
a = (l = t[s = u]).side(!r, n), | |
c = l.side(r, n) | |
} | |
var h = $(e.text, a, l.forward(r, n)); | |
(h < l.from || h > l.to) && (h = c), | |
vi = e.text.slice(Math.min(a, h), Math.max(a, h)); | |
var d = s == (r ? t.length - 1 : 0) ? null : t[s + (r ? 1 : -1)]; | |
return d && h == c && d.level + (r ? 0 : 1) < l.level ? de.cursor(d.side(!r, n) + e.from, d.forward(r, n) ? 1 : -1, d.level) : de.cursor(h + e.from, l.forward(r, n) ? -1 : 1, l.level) | |
} | |
function yi(e, t, n) { | |
for (var i = t; i < n; i++) { | |
var r = si(e.charCodeAt(i)); | |
if (1 == r) | |
return Zn; | |
if (2 == r || 4 == r) | |
return Xn | |
} | |
return Zn | |
} | |
var bi = me.define() | |
, wi = me.define() | |
, ki = me.define() | |
, Ci = me.define() | |
, Mi = me.define() | |
, Ei = me.define() | |
, Si = me.define() | |
, xi = me.define() | |
, Ti = me.define() | |
, Di = me.define({ | |
combine: function(e) { | |
return e.some((function(e) { | |
return e | |
} | |
)) | |
} | |
}) | |
, Ai = me.define({ | |
combine: function(e) { | |
return e.some((function(e) { | |
return e | |
} | |
)) | |
} | |
}) | |
, Li = me.define() | |
, Pi = function() { | |
function e(e, t, n, i, r, o) { | |
void 0 === t && (t = "nearest"), | |
void 0 === n && (n = "nearest"), | |
void 0 === i && (i = 5), | |
void 0 === r && (r = 5), | |
void 0 === o && (o = !1), | |
this.range = e, | |
this.y = t, | |
this.x = n, | |
this.yMargin = i, | |
this.xMargin = r, | |
this.isSnapshot = o | |
} | |
return e.prototype.map = function(t) { | |
return t.empty ? this : new e(this.range.map(t),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot) | |
} | |
, | |
e.prototype.clip = function(t) { | |
return this.range.to <= t.doc.length ? this : new e(de.cursor(t.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot) | |
} | |
, | |
e | |
}() | |
, Ii = We.define({ | |
map: function(e, t) { | |
return e.map(t) | |
} | |
}) | |
, Fi = We.define(); | |
function Oi(e, t, n) { | |
var i = e.facet(Ci); | |
i.length ? i[0](t) : window.onerror ? window.onerror(String(t), n, void 0, void 0, t) : n ? console.error(n + ":", t) : console.error(t) | |
} | |
var Bi = me.define({ | |
combine: function(e) { | |
return !e.length || e[0] | |
} | |
}) | |
, Ni = 0 | |
, Ri = me.define() | |
, Hi = function() { | |
function e(e, t, n, i, r) { | |
this.id = e, | |
this.create = t, | |
this.domEventHandlers = n, | |
this.domEventObservers = i, | |
this.extension = r(this) | |
} | |
return e.define = function(t, n) { | |
var i = n || {} | |
, r = i.eventHandlers | |
, o = i.eventObservers | |
, a = i.provide | |
, s = i.decorations; | |
return new e(Ni++,t,r,o,(function(e) { | |
var t = [Ri.of(e)]; | |
return s && t.push(Ui.of((function(t) { | |
var n = t.plugin(e); | |
return n ? s(n) : Nn.none | |
} | |
))), | |
a && t.push(a(e)), | |
t | |
} | |
)) | |
} | |
, | |
e.fromClass = function(t, n) { | |
return e.define((function(e) { | |
return new t(e) | |
} | |
), n) | |
} | |
, | |
e | |
}() | |
, Vi = function() { | |
function e(e) { | |
this.spec = e, | |
this.mustUpdate = null, | |
this.value = null | |
} | |
return e.prototype.update = function(e) { | |
if (this.value) { | |
if (this.mustUpdate) { | |
var t = this.mustUpdate; | |
if (this.mustUpdate = null, | |
this.value.update) | |
try { | |
this.value.update(t) | |
} catch (e) { | |
if (Oi(t.state, e, "CodeMirror plugin crashed"), | |
this.value.destroy) | |
try { | |
this.value.destroy() | |
} catch (e) {} | |
this.deactivate() | |
} | |
} | |
} else if (this.spec) | |
try { | |
this.value = this.spec.create(e) | |
} catch (t) { | |
Oi(e.state, t, "CodeMirror plugin crashed"), | |
this.deactivate() | |
} | |
return this | |
} | |
, | |
e.prototype.destroy = function(e) { | |
var t; | |
if (null === (t = this.value) || void 0 === t ? void 0 : t.destroy) | |
try { | |
this.value.destroy() | |
} catch (t) { | |
Oi(e.state, t, "CodeMirror plugin crashed") | |
} | |
} | |
, | |
e.prototype.deactivate = function() { | |
this.spec = this.value = null | |
} | |
, | |
e | |
}() | |
, zi = me.define() | |
, qi = me.define() | |
, Ui = me.define() | |
, _i = me.define() | |
, Wi = me.define() | |
, ji = me.define(); | |
function Gi(e, t) { | |
var n = e.state.facet(ji); | |
if (!n.length) | |
return n; | |
var i = n.map((function(t) { | |
return t instanceof Function ? t(e) : t | |
} | |
)) | |
, r = []; | |
return lt.spans(i, t.from, t.to, { | |
point: function() {}, | |
span: function(e, n, i, o) { | |
for (var a = e - t.from, s = n - t.from, l = r, c = i.length - 1; c >= 0; c--, | |
o--) { | |
var u = i[c].spec.bidiIsolate | |
, h = void 0; | |
if (null == u && (u = yi(t.text, a, s)), | |
o > 0 && l.length && (h = l[l.length - 1]).to == a && h.direction == u) | |
h.to = s, | |
l = h.inner; | |
else { | |
var d = { | |
from: a, | |
to: s, | |
direction: u, | |
inner: [] | |
}; | |
l.push(d), | |
l = d.inner | |
} | |
} | |
} | |
}), | |
r | |
} | |
var Ki = me.define(); | |
function Yi(e) { | |
for (var t = 0, n = 0, i = 0, r = 0, o = 0, a = e.state.facet(Ki); o < a.length; o++) { | |
var s = (0, | |
a[o])(e); | |
s && (null != s.left && (t = Math.max(t, s.left)), | |
null != s.right && (n = Math.max(n, s.right)), | |
null != s.top && (i = Math.max(i, s.top)), | |
null != s.bottom && (r = Math.max(r, s.bottom))) | |
} | |
return { | |
left: t, | |
right: n, | |
top: i, | |
bottom: r | |
} | |
} | |
var Zi = me.define() | |
, Xi = function() { | |
function e(e, t, n, i) { | |
this.fromA = e, | |
this.toA = t, | |
this.fromB = n, | |
this.toB = i | |
} | |
return e.prototype.join = function(t) { | |
return new e(Math.min(this.fromA, t.fromA),Math.max(this.toA, t.toA),Math.min(this.fromB, t.fromB),Math.max(this.toB, t.toB)) | |
} | |
, | |
e.prototype.addToSet = function(e) { | |
for (var t = e.length, n = this; t > 0; t--) { | |
var i = e[t - 1]; | |
if (!(i.fromA > n.toA)) { | |
if (i.toA < n.fromA) | |
break; | |
n = n.join(i), | |
e.splice(t - 1, 1) | |
} | |
} | |
return e.splice(t, 0, n), | |
e | |
} | |
, | |
e.extendWithRanges = function(t, n) { | |
if (0 == n.length) | |
return t; | |
for (var i = [], r = 0, o = 0, a = 0, s = 0; ; r++) { | |
for (var l = r == t.length ? null : t[r], c = a - s, u = l ? l.fromB : 1e9; o < n.length && n[o] < u; ) { | |
var h = n[o] | |
, d = n[o + 1] | |
, p = Math.max(s, h) | |
, f = Math.min(u, d); | |
if (p <= f && new e(p + c,f + c,p,f).addToSet(i), | |
d > u) | |
break; | |
o += 2 | |
} | |
if (!l) | |
return i; | |
new e(l.fromA,l.toA,l.fromB,l.toB).addToSet(i), | |
a = l.toA, | |
s = l.toB | |
} | |
} | |
, | |
e | |
}() | |
, $i = function() { | |
function e(e, t, n) { | |
this.view = e, | |
this.state = t, | |
this.transactions = n, | |
this.flags = 0, | |
this.startState = e.state, | |
this.changes = re.empty(this.startState.doc.length); | |
for (var i = 0, r = n; i < r.length; i++) { | |
var o = r[i]; | |
this.changes = this.changes.compose(o.changes) | |
} | |
var a = []; | |
this.changes.iterChangedRanges((function(e, t, n, i) { | |
return a.push(new Xi(e,t,n,i)) | |
} | |
)), | |
this.changedRanges = a | |
} | |
return e.create = function(t, n, i) { | |
return new e(t,n,i) | |
} | |
, | |
Object.defineProperty(e.prototype, "viewportChanged", { | |
get: function() { | |
return (4 & this.flags) > 0 | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
Object.defineProperty(e.prototype, "viewportMoved", { | |
get: function() { | |
return (8 & this.flags) > 0 | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
Object.defineProperty(e.prototype, "heightChanged", { | |
get: function() { | |
return (2 & this.flags) > 0 | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
Object.defineProperty(e.prototype, "geometryChanged", { | |
get: function() { | |
return this.docChanged || (18 & this.flags) > 0 | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
Object.defineProperty(e.prototype, "focusChanged", { | |
get: function() { | |
return (1 & this.flags) > 0 | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
Object.defineProperty(e.prototype, "docChanged", { | |
get: function() { | |
return !this.changes.empty | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
Object.defineProperty(e.prototype, "selectionSet", { | |
get: function() { | |
return this.transactions.some((function(e) { | |
return e.selection | |
} | |
)) | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
Object.defineProperty(e.prototype, "empty", { | |
get: function() { | |
return 0 == this.flags && 0 == this.transactions.length | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
e | |
}() | |
, Qi = function(e) { | |
function t(t) { | |
var n = e.call(this) || this; | |
return n.view = t, | |
n.decorations = [], | |
n.dynamicDecorationMap = [!1], | |
n.domChanged = null, | |
n.hasComposition = null, | |
n.markedForComposition = new Set, | |
n.editContextFormatting = Nn.none, | |
n.lastCompositionAfterCursor = !1, | |
n.minWidth = 0, | |
n.minWidthFrom = 0, | |
n.minWidthTo = 0, | |
n.impreciseAnchor = null, | |
n.impreciseHead = null, | |
n.forceSelection = !1, | |
n.lastUpdate = Date.now(), | |
n.setDOM(t.contentDOM), | |
n.children = [new Un], | |
n.children[0].setParent(n), | |
n.updateDeco(), | |
n.updateInner([new Xi(0,0,0,t.state.doc.length)], 0, null), | |
n | |
} | |
return f(t, e), | |
Object.defineProperty(t.prototype, "length", { | |
get: function() { | |
return this.view.state.doc.length | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
t.prototype.update = function(e) { | |
var t, n = this, i = e.changedRanges; | |
this.minWidth > 0 && i.length && (i.every((function(e) { | |
var t = e.fromA; | |
return e.toA < n.minWidthFrom || t > n.minWidthTo | |
} | |
)) ? (this.minWidthFrom = e.changes.mapPos(this.minWidthFrom, 1), | |
this.minWidthTo = e.changes.mapPos(this.minWidthTo, 1)) : this.minWidth = this.minWidthFrom = this.minWidthTo = 0), | |
this.updateEditContextFormatting(e); | |
var r = -1; | |
this.view.inputState.composing >= 0 && !this.view.observer.editContext && ((null === (t = this.domChanged) || void 0 === t ? void 0 : t.newSel) ? r = this.domChanged.newSel.head : function(e, t) { | |
var n = !1; | |
t && e.iterChangedRanges((function(e, i) { | |
e < t.to && i > t.from && (n = !0) | |
} | |
)); | |
return n | |
}(e.changes, this.hasComposition) || e.selectionSet || (r = e.state.selection.main.head)); | |
var o = r > -1 ? function(e, t, n) { | |
var i = Ji(e, n); | |
if (!i) | |
return null; | |
var r = i.node | |
, o = i.from | |
, a = i.to | |
, s = r.nodeValue; | |
if (/[\n\r]/.test(s)) | |
return null; | |
if (e.state.doc.sliceString(i.from, i.to) != s) | |
return null; | |
for (var l = t.invertedDesc, c = new Xi(l.mapPos(o),l.mapPos(a),o,a), u = [], h = r.parentNode; ; h = h.parentNode) { | |
var d = on.get(h); | |
if (d instanceof Mn) | |
u.push({ | |
node: h, | |
deco: d.mark | |
}); | |
else { | |
if (d instanceof Un || "DIV" == h.nodeName && h.parentNode == e.contentDOM) | |
return { | |
range: c, | |
text: r, | |
marks: u, | |
line: h | |
}; | |
if (h == e.contentDOM) | |
return null; | |
u.push({ | |
node: h, | |
deco: new Rn({ | |
inclusive: !0, | |
attributes: Fn(h), | |
tagName: h.tagName.toLowerCase() | |
}) | |
}) | |
} | |
} | |
}(this.view, e.changes, r) : null; | |
if (this.domChanged = null, | |
this.hasComposition) { | |
this.markedForComposition.clear(); | |
var a = this.hasComposition | |
, s = a.from | |
, l = a.to; | |
i = new Xi(s,l,e.changes.mapPos(s, -1),e.changes.mapPos(l, 1)).addToSet(i.slice()) | |
} | |
this.hasComposition = o ? { | |
from: o.range.fromB, | |
to: o.range.toB | |
} : null, | |
(kn.ie || kn.chrome) && !o && e && e.state.doc.lines != e.startState.doc.lines && (this.forceSelection = !0); | |
var c, u, h, d, p = this.decorations, f = this.updateDeco(), m = (c = p, | |
u = f, | |
h = e.changes, | |
d = new er, | |
lt.compare(c, u, h, d), | |
d.changes); | |
return i = Xi.extendWithRanges(i, m), | |
!!(7 & this.flags || 0 != i.length) && (this.updateInner(i, e.startState.doc.length, o), | |
e.transactions.length && (this.lastUpdate = Date.now()), | |
!0) | |
} | |
, | |
t.prototype.updateInner = function(e, t, n) { | |
var i = this; | |
this.view.viewState.mustMeasureContent = !0, | |
this.updateChildren(e, t, n); | |
var r = this.view.observer; | |
r.ignore((function() { | |
i.dom.style.height = i.view.viewState.contentHeight / i.view.scaleY + "px", | |
i.dom.style.flexBasis = i.minWidth ? i.minWidth + "px" : ""; | |
var e = kn.chrome || kn.ios ? { | |
node: r.selectionRange.focusNode, | |
written: !1 | |
} : void 0; | |
i.sync(i.view, e), | |
i.flags &= -8, | |
e && (e.written || r.selectionRange.focusNode != e.node) && (i.forceSelection = !0), | |
i.dom.style.height = "" | |
} | |
)), | |
this.markedForComposition.forEach((function(e) { | |
return e.flags &= -9 | |
} | |
)); | |
var o = []; | |
if (this.view.viewport.from || this.view.viewport.to < this.view.state.doc.length) | |
for (var a = 0, s = this.children; a < s.length; a++) { | |
var l = s[a]; | |
l instanceof _n && l.widget instanceof Wn && o.push(l.dom) | |
} | |
r.updateGaps(o) | |
} | |
, | |
t.prototype.updateChildren = function(e, t, n) { | |
for (var i, r = n ? n.range.addToSet(e.slice()) : e, o = this.childCursor(t), a = r.length - 1; ; a--) { | |
var s = a >= 0 ? r[a] : null; | |
if (!s) | |
break; | |
var l = s.fromA | |
, c = s.toA | |
, u = s.fromB | |
, h = s.toB | |
, d = void 0 | |
, p = void 0 | |
, f = void 0 | |
, m = void 0; | |
if (n && n.range.fromB < h && n.range.toB > u) { | |
var v = jn.build(this.view.state.doc, u, n.range.fromB, this.decorations, this.dynamicDecorationMap) | |
, g = jn.build(this.view.state.doc, n.range.toB, h, this.decorations, this.dynamicDecorationMap); | |
p = v.breakAtStart, | |
f = v.openStart, | |
m = g.openEnd; | |
var y = this.compositionView(n); | |
g.breakAtStart ? y.breakAfter = 1 : g.content.length && y.merge(y.length, y.length, g.content[0], !1, g.openStart, 0) && (y.breakAfter = g.content[0].breakAfter, | |
g.content.shift()), | |
v.content.length && y.merge(0, 0, v.content[v.content.length - 1], !0, 0, v.openEnd) && v.content.pop(), | |
d = v.content.concat(y).concat(g.content) | |
} else | |
d = (i = jn.build(this.view.state.doc, u, h, this.decorations, this.dynamicDecorationMap)).content, | |
p = i.breakAtStart, | |
f = i.openStart, | |
m = i.openEnd; | |
var b = o.findPos(c, 1) | |
, w = b.i | |
, k = b.off | |
, C = o.findPos(l, -1); | |
ln(this, C.i, C.off, w, k, d, p, f, m) | |
} | |
n && this.fixCompositionDOM(n) | |
} | |
, | |
t.prototype.updateEditContextFormatting = function(e) { | |
this.editContextFormatting = this.editContextFormatting.map(e.changes); | |
for (var t = 0, n = e.transactions; t < n.length; t++) | |
for (var i = 0, r = n[t].effects; i < r.length; i++) { | |
var o = r[i]; | |
o.is(Fi) && (this.editContextFormatting = o.value) | |
} | |
} | |
, | |
t.prototype.compositionView = function(e) { | |
var t = new Cn(e.text.nodeValue); | |
t.flags |= 8; | |
for (var n = 0, i = e.marks; n < i.length; n++) { | |
var r = i[n].deco; | |
t = new Mn(r,[t],t.length) | |
} | |
var o = new Un; | |
return o.append(t, 0), | |
o | |
} | |
, | |
t.prototype.fixCompositionDOM = function(e) { | |
var t = this | |
, n = function(e, n) { | |
n.flags |= 8 | (n.children.some((function(e) { | |
return 7 & e.flags | |
} | |
)) ? 1 : 0), | |
t.markedForComposition.add(n); | |
var i = on.get(e); | |
i && i != n && (i.dom = null), | |
n.setDOM(e) | |
} | |
, i = this.childPos(e.range.fromB, 1) | |
, r = this.children[i.i]; | |
n(e.line, r); | |
for (var o = e.marks.length - 1; o >= -1; o--) | |
i = r.childPos(i.off, 1), | |
r = r.children[i.i], | |
n(o >= 0 ? e.marks[o].node : e.text, r) | |
} | |
, | |
t.prototype.updateSelection = function(e, t) { | |
var n = this; | |
void 0 === e && (e = !1), | |
void 0 === t && (t = !1), | |
!e && this.view.observer.selectionRange.focusNode || this.view.observer.readSelectionRange(); | |
var i = this.view.root.activeElement | |
, r = i == this.dom | |
, o = !r && !(this.view.state.facet(Bi) || this.dom.tabIndex > -1) && Nt(this.dom, this.view.observer.selectionRange) && !(i && this.dom.contains(i)); | |
if (r || t || o) { | |
var a = this.forceSelection; | |
this.forceSelection = !1; | |
var s = this.view.state.selection.main | |
, l = this.moveToLine(this.domAtPos(s.anchor)) | |
, c = s.empty ? l : this.moveToLine(this.domAtPos(s.head)); | |
if (kn.gecko && s.empty && !this.hasComposition && function(e) { | |
return 1 == e.node.nodeType && e.node.firstChild && (0 == e.offset || "false" == e.node.childNodes[e.offset - 1].contentEditable) && (e.offset == e.node.childNodes.length || "false" == e.node.childNodes[e.offset].contentEditable) | |
}(l)) { | |
var u = document.createTextNode(""); | |
this.view.observer.ignore((function() { | |
return l.node.insertBefore(u, l.node.childNodes[l.offset] || null) | |
} | |
)), | |
l = c = new nn(u,0), | |
a = !0 | |
} | |
var h = this.view.observer.selectionRange; | |
!a && h.focusNode && (Ht(l.node, l.offset, h.anchorNode, h.anchorOffset) && Ht(c.node, c.offset, h.focusNode, h.focusOffset) || this.suppressWidgetCursorChange(h, s)) || (this.view.observer.ignore((function() { | |
var e; | |
kn.android && kn.chrome && n.dom.contains(h.focusNode) && function(e, t) { | |
for (var n = e; n && n != t; n = n.assignedSlot || n.parentNode) | |
if (1 == n.nodeType && "false" == n.contentEditable) | |
return !0; | |
return !1 | |
}(h.focusNode, n.dom) && (n.dom.blur(), | |
n.dom.focus({ | |
preventScroll: !0 | |
})); | |
var t, r, a = Ot(n.view.root); | |
if (a) | |
if (s.empty) { | |
if (kn.gecko) { | |
var u = (t = l.node, | |
r = l.offset, | |
1 != t.nodeType ? 0 : (r && "false" == t.childNodes[r - 1].contentEditable ? 1 : 0) | (r < t.childNodes.length && "false" == t.childNodes[r].contentEditable ? 2 : 0)); | |
if (u && 3 != u) { | |
var d = (1 == u ? en : tn)(l.node, l.offset); | |
d && (l = new nn(d.node,d.offset)) | |
} | |
} | |
a.collapse(l.node, l.offset), | |
null != s.bidiLevel && void 0 !== a.caretBidiLevel && (a.caretBidiLevel = s.bidiLevel) | |
} else if (a.extend) { | |
a.collapse(l.node, l.offset); | |
try { | |
a.extend(c.node, c.offset) | |
} catch (e) {} | |
} else { | |
var p = document.createRange(); | |
s.anchor > s.head && (l = (e = [c, l])[0], | |
c = e[1]), | |
p.setEnd(c.node, c.offset), | |
p.setStart(l.node, l.offset), | |
a.removeAllRanges(), | |
a.addRange(p) | |
} | |
else | |
;o && n.view.root.activeElement == n.dom && (n.dom.blur(), | |
i && i.focus()) | |
} | |
)), | |
this.view.observer.setSelectionRange(l, c)), | |
this.impreciseAnchor = l.precise ? null : new nn(h.anchorNode,h.anchorOffset), | |
this.impreciseHead = c.precise ? null : new nn(h.focusNode,h.focusOffset) | |
} | |
} | |
, | |
t.prototype.suppressWidgetCursorChange = function(e, t) { | |
return this.hasComposition && t.empty && Ht(e.focusNode, e.focusOffset, e.anchorNode, e.anchorOffset) && this.posFromDOM(e.focusNode, e.focusOffset) == t.head | |
} | |
, | |
t.prototype.enforceCursorAssoc = function() { | |
if (!this.hasComposition) { | |
var e = this.view | |
, t = e.state.selection.main | |
, n = Ot(e.root) | |
, i = e.observer.selectionRange | |
, r = i.anchorNode | |
, o = i.anchorOffset; | |
if (n && t.empty && t.assoc && n.modify) { | |
var a = Un.find(this, t.head); | |
if (a) { | |
var s = a.posAtStart; | |
if (t.head != s && t.head != s + a.length) { | |
var l = this.coordsAt(t.head, -1) | |
, c = this.coordsAt(t.head, 1); | |
if (l && c && !(l.bottom > c.top)) { | |
var u = this.domAtPos(t.head + t.assoc); | |
n.collapse(u.node, u.offset), | |
n.modify("move", t.assoc < 0 ? "forward" : "backward", "lineboundary"), | |
e.observer.readSelectionRange(); | |
var h = e.observer.selectionRange; | |
e.docView.posFromDOM(h.anchorNode, h.anchorOffset) != t.from && n.collapse(r, o) | |
} | |
} | |
} | |
} | |
} | |
} | |
, | |
t.prototype.moveToLine = function(e) { | |
var t, n = this.dom; | |
if (e.node != n) | |
return e; | |
for (var i = e.offset; !t && i < n.childNodes.length; i++) { | |
(r = on.get(n.childNodes[i]))instanceof Un && (t = r.domAtPos(0)) | |
} | |
for (i = e.offset - 1; !t && i >= 0; i--) { | |
var r; | |
(r = on.get(n.childNodes[i]))instanceof Un && (t = r.domAtPos(r.length)) | |
} | |
return t ? new nn(t.node,t.offset,!0) : e | |
} | |
, | |
t.prototype.nearest = function(e) { | |
for (var t = e; t; ) { | |
var n = on.get(t); | |
if (n && n.rootView == this) | |
return n; | |
t = t.parentNode | |
} | |
return null | |
} | |
, | |
t.prototype.posFromDOM = function(e, t) { | |
var n = this.nearest(e); | |
if (!n) | |
throw new RangeError("Trying to find position for a DOM position outside of the document"); | |
return n.localPosFromDOM(e, t) + n.posAtStart | |
} | |
, | |
t.prototype.domAtPos = function(e) { | |
for (var t = this.childCursor().findPos(e, -1), n = t.i, i = t.off; n < this.children.length - 1; ) { | |
var r = this.children[n]; | |
if (i < r.length || r instanceof Un) | |
break; | |
n++, | |
i = 0 | |
} | |
return this.children[n].domAtPos(i) | |
} | |
, | |
t.prototype.coordsAt = function(e, t) { | |
for (var n = null, i = 0, r = this.length, o = this.children.length - 1; o >= 0; o--) { | |
var a = this.children[o] | |
, s = r - a.breakAfter | |
, l = s - a.length; | |
if (s < e) | |
break; | |
if (l <= e && (l < e || a.covers(-1)) && (s > e || a.covers(1)) && (!n || a instanceof Un && !(n instanceof Un && t >= 0))) | |
n = a, | |
i = l; | |
else if (n && l == e && s == e && a instanceof _n && Math.abs(t) < 2) { | |
if (a.deco.startSide < 0) | |
break; | |
o && (n = null) | |
} | |
r = l | |
} | |
return n ? n.coordsAt(e - i, t) : null | |
} | |
, | |
t.prototype.coordsForChar = function(e) { | |
var t = this.childPos(e, 1) | |
, n = t.i | |
, i = t.off | |
, r = this.children[n]; | |
if (!(r instanceof Un)) | |
return null; | |
for (; r.children.length; ) { | |
for (var o = r.childPos(i, 1), a = o.i, s = o.off; ; a++) { | |
if (a == r.children.length) | |
return null; | |
if ((r = r.children[a]).length) | |
break | |
} | |
i = s | |
} | |
if (!(r instanceof Cn)) | |
return null; | |
var l = $(r.text, i); | |
if (l == i) | |
return null; | |
for (var c = Xt(r.dom, i, l).getClientRects(), u = 0; u < c.length; u++) { | |
var h = c[u]; | |
if (u == c.length - 1 || h.top < h.bottom && h.left < h.right) | |
return h | |
} | |
return null | |
} | |
, | |
t.prototype.measureVisibleLineHeights = function(e) { | |
for (var t = [], n = e.from, i = e.to, r = this.view.contentDOM.clientWidth, o = r > Math.max(this.view.scrollDOM.clientWidth, this.minWidth) + 1, a = -1, s = this.view.textDirection == Yn.LTR, l = 0, c = 0; c < this.children.length; c++) { | |
var u = this.children[c] | |
, h = l + u.length; | |
if (h > i) | |
break; | |
if (l >= n) { | |
var d = u.dom.getBoundingClientRect(); | |
if (t.push(d.height), | |
o) { | |
var p = u.dom.lastChild | |
, f = p ? Rt(p) : []; | |
if (f.length) { | |
var m = f[f.length - 1] | |
, v = s ? m.right - d.left : d.right - m.left; | |
v > a && (a = v, | |
this.minWidth = r, | |
this.minWidthFrom = l, | |
this.minWidthTo = h) | |
} | |
} | |
} | |
l = h + u.breakAfter | |
} | |
return t | |
} | |
, | |
t.prototype.textDirectionAt = function(e) { | |
var t = this.childPos(e, 1).i; | |
return "rtl" == getComputedStyle(this.children[t].dom).direction ? Yn.RTL : Yn.LTR | |
} | |
, | |
t.prototype.measureTextSize = function() { | |
for (var e = this, t = 0, n = this.children; t < n.length; t++) { | |
var i = n[t]; | |
if (i instanceof Un) { | |
var r = i.measureTextSize(); | |
if (r) | |
return r | |
} | |
} | |
var o, a, s, l = document.createElement("div"); | |
return l.className = "cm-line", | |
l.style.width = "99999px", | |
l.style.position = "absolute", | |
l.textContent = "abc def ghi jkl mno pqr stu", | |
this.view.observer.ignore((function() { | |
e.dom.appendChild(l); | |
var t = Rt(l.firstChild)[0]; | |
o = l.getBoundingClientRect().height, | |
a = t ? t.width / 27 : 7, | |
s = t ? t.height : o, | |
l.remove() | |
} | |
)), | |
{ | |
lineHeight: o, | |
charWidth: a, | |
textHeight: s | |
} | |
} | |
, | |
t.prototype.childCursor = function(e) { | |
void 0 === e && (e = this.length); | |
var t = this.children.length; | |
return t && (e -= this.children[--t].length), | |
new sn(this.children,e,t) | |
} | |
, | |
t.prototype.computeBlockGapDeco = function() { | |
for (var e = [], t = this.view.viewState, n = 0, i = 0; ; i++) { | |
var r = i == t.viewports.length ? null : t.viewports[i] | |
, o = r ? r.from - 1 : this.length; | |
if (o > n) { | |
var a = (t.lineBlockAt(o).bottom - t.lineBlockAt(n).top) / this.view.scaleY; | |
e.push(Nn.replace({ | |
widget: new Wn(a), | |
block: !0, | |
inclusive: !0, | |
isBlockGap: !0 | |
}).range(n, o)) | |
} | |
if (!r) | |
break; | |
n = r.to + 1 | |
} | |
return Nn.set(e) | |
} | |
, | |
t.prototype.updateDeco = function() { | |
var e = this | |
, t = 1 | |
, n = this.view.state.facet(Ui).map((function(n) { | |
return (e.dynamicDecorationMap[t++] = "function" == typeof n) ? n(e.view) : n | |
} | |
)) | |
, i = !1 | |
, r = this.view.state.facet(_i).map((function(t, n) { | |
var r = "function" == typeof t; | |
return r && (i = !0), | |
r ? t(e.view) : t | |
} | |
)); | |
for (r.length && (this.dynamicDecorationMap[t++] = i, | |
n.push(lt.join(r))), | |
this.decorations = w(w([this.editContextFormatting], n, !0), [this.computeBlockGapDeco(), this.view.viewState.lineGapDeco], !1); t < this.decorations.length; ) | |
this.dynamicDecorationMap[t++] = !1; | |
return this.decorations | |
} | |
, | |
t.prototype.scrollIntoView = function(e) { | |
if (this.dom.offsetParent) { | |
if (e.isSnapshot) { | |
var t = this.view.viewState.lineBlockAt(e.range.head); | |
return this.view.scrollDOM.scrollTop = t.top - e.yMargin, | |
void (this.view.scrollDOM.scrollLeft = e.xMargin) | |
} | |
for (var n = 0, i = this.view.state.facet(Li); n < i.length; n++) { | |
var r = i[n]; | |
try { | |
if (r(this.view, e.range, e)) | |
return !0 | |
} catch (e) { | |
Oi(this.view.state, e, "scroll handler") | |
} | |
} | |
var o, a = e.range, s = this.coordsAt(a.head, a.empty ? a.assoc : a.head > a.anchor ? -1 : 1); | |
if (s) { | |
!a.empty && (o = this.coordsAt(a.anchor, a.anchor > a.head ? -1 : 1)) && (s = { | |
left: Math.min(s.left, o.left), | |
top: Math.min(s.top, o.top), | |
right: Math.max(s.right, o.right), | |
bottom: Math.max(s.bottom, o.bottom) | |
}); | |
var l = Yi(this.view) | |
, c = { | |
left: s.left - l.left, | |
top: s.top - l.top, | |
right: s.right + l.right, | |
bottom: s.bottom + l.bottom | |
} | |
, u = this.view.scrollDOM | |
, h = u.offsetWidth | |
, d = u.offsetHeight; | |
!function(e, t, n, i, r, o, a, s) { | |
for (var l, c = e.ownerDocument, u = c.defaultView || window, h = e, d = !1; h && !d; ) | |
if (1 == h.nodeType) { | |
var p = void 0 | |
, f = h == c.body | |
, m = 1 | |
, v = 1; | |
if (f) | |
p = Wt(u); | |
else { | |
if (/^(fixed|sticky)$/.test(getComputedStyle(h).position) && (d = !0), | |
h.scrollHeight <= h.clientHeight && h.scrollWidth <= h.clientWidth) { | |
h = h.assignedSlot || h.parentNode; | |
continue | |
} | |
var g = h.getBoundingClientRect(); | |
m = (l = jt(h, g)).scaleX, | |
v = l.scaleY, | |
p = { | |
left: g.left, | |
right: g.left + h.clientWidth * m, | |
top: g.top, | |
bottom: g.top + h.clientHeight * v | |
} | |
} | |
var y = 0 | |
, b = 0; | |
if ("nearest" == r) | |
t.top < p.top ? (b = -(p.top - t.top + a), | |
n > 0 && t.bottom > p.bottom + b && (b = t.bottom - p.bottom + b + a)) : t.bottom > p.bottom && (b = t.bottom - p.bottom + a, | |
n < 0 && t.top - b < p.top && (b = -(p.top + b - t.top + a))); | |
else { | |
var w = t.bottom - t.top | |
, k = p.bottom - p.top; | |
b = ("center" == r && w <= k ? t.top + w / 2 - k / 2 : "start" == r || "center" == r && n < 0 ? t.top - a : t.bottom - k + a) - p.top | |
} | |
if ("nearest" == i ? t.left < p.left ? (y = -(p.left - t.left + o), | |
n > 0 && t.right > p.right + y && (y = t.right - p.right + y + o)) : t.right > p.right && (y = t.right - p.right + o, | |
n < 0 && t.left < p.left + y && (y = -(p.left + y - t.left + o))) : y = ("center" == i ? t.left + (t.right - t.left) / 2 - (p.right - p.left) / 2 : "start" == i == s ? t.left - o : t.right - (p.right - p.left) + o) - p.left, | |
y || b) | |
if (f) | |
u.scrollBy(y, b); | |
else { | |
var C = 0 | |
, M = 0; | |
if (b) { | |
var E = h.scrollTop; | |
h.scrollTop += b / v, | |
M = (h.scrollTop - E) * v | |
} | |
y && (E = h.scrollLeft, | |
h.scrollLeft += y / m, | |
C = (h.scrollLeft - E) * m), | |
t = { | |
left: t.left - C, | |
top: t.top - M, | |
right: t.right - C, | |
bottom: t.bottom - M | |
}, | |
C && Math.abs(C - y) < 1 && (i = "nearest"), | |
M && Math.abs(M - b) < 1 && (r = "nearest") | |
} | |
if (f) | |
break; | |
h = h.assignedSlot || h.parentNode | |
} else { | |
if (11 != h.nodeType) | |
break; | |
h = h.host | |
} | |
}(this.view.scrollDOM, c, a.head < a.anchor ? -1 : 1, e.x, e.y, Math.max(Math.min(e.xMargin, h), -h), Math.max(Math.min(e.yMargin, d), -d), this.view.textDirection == Yn.LTR) | |
} | |
} | |
} | |
, | |
t | |
}(on); | |
function Ji(e, t) { | |
var n = e.observer.selectionRange; | |
if (!n.focusNode) | |
return null; | |
var i = en(n.focusNode, n.focusOffset) | |
, r = tn(n.focusNode, n.focusOffset) | |
, o = i || r; | |
if (r && i && r.node != i.node) { | |
var a = on.get(r.node); | |
if (!a || a instanceof Cn && a.text != r.node.nodeValue) | |
o = r; | |
else if (e.docView.lastCompositionAfterCursor) { | |
var s = on.get(i.node); | |
!s || s instanceof Cn && s.text != i.node.nodeValue || (o = r) | |
} | |
} | |
if (e.docView.lastCompositionAfterCursor = o != i, | |
!o) | |
return null; | |
var l = t - o.offset; | |
return { | |
from: l, | |
to: l + o.node.nodeValue.length, | |
node: o.node | |
} | |
} | |
var er = function() { | |
function e() { | |
this.changes = [] | |
} | |
return e.prototype.compareRange = function(e, t) { | |
qn(e, t, this.changes) | |
} | |
, | |
e.prototype.comparePoint = function(e, t) { | |
qn(e, t, this.changes) | |
} | |
, | |
e.prototype.boundChange = function(e) { | |
qn(e, e, this.changes) | |
} | |
, | |
e | |
}(); | |
function tr(e, t) { | |
return t.left > e ? t.left - e : Math.max(0, e - t.right) | |
} | |
function nr(e, t) { | |
return t.top > e ? t.top - e : Math.max(0, e - t.bottom) | |
} | |
function ir(e, t) { | |
return e.top < t.bottom - 1 && e.bottom > t.top + 1 | |
} | |
function rr(e, t) { | |
return t < e.top ? { | |
top: t, | |
left: e.left, | |
right: e.right, | |
bottom: e.bottom | |
} : e | |
} | |
function or(e, t) { | |
return t > e.bottom ? { | |
top: e.top, | |
left: e.left, | |
right: e.right, | |
bottom: t | |
} : e | |
} | |
function ar(e, t, n) { | |
for (var i, r, o, a, s, l, c, u, h = !1, d = e.firstChild; d; d = d.nextSibling) | |
for (var p = Rt(d), f = 0; f < p.length; f++) { | |
var m = p[f]; | |
r && ir(r, m) && (m = rr(or(m, r.bottom), r.top)); | |
var v = tr(t, m) | |
, g = nr(n, m); | |
if (0 == v && 0 == g) | |
return 3 == d.nodeType ? sr(d, t, n) : ar(d, t, n); | |
if (!i || a > g || a == g && o > v) { | |
i = d, | |
r = m, | |
o = v, | |
a = g; | |
var y = g ? n < m.top ? -1 : 1 : v ? t < m.left ? -1 : 1 : 0; | |
h = !y || (y > 0 ? f < p.length - 1 : f > 0) | |
} | |
0 == v ? n > m.bottom && (!c || c.bottom < m.bottom) ? (s = d, | |
c = m) : n < m.top && (!u || u.top > m.top) && (l = d, | |
u = m) : c && ir(c, m) ? c = or(c, m.bottom) : u && ir(u, m) && (u = rr(u, m.top)) | |
} | |
if (c && c.bottom >= n ? (i = s, | |
r = c) : u && u.top <= n && (i = l, | |
r = u), | |
!i) | |
return { | |
node: e, | |
offset: 0 | |
}; | |
var b = Math.max(r.left, Math.min(r.right, t)); | |
return 3 == i.nodeType ? sr(i, b, n) : h && "false" != i.contentEditable ? ar(i, b, n) : { | |
node: e, | |
offset: Array.prototype.indexOf.call(e.childNodes, i) + (t >= (r.left + r.right) / 2 ? 1 : 0) | |
} | |
} | |
function sr(e, t, n) { | |
for (var i = e.nodeValue.length, r = -1, o = 1e9, a = 0, s = 0; s < i; s++) | |
for (var l = Xt(e, s, s + 1).getClientRects(), c = 0; c < l.length; c++) { | |
var u = l[c]; | |
if (u.top != u.bottom) { | |
a || (a = t - u.left); | |
var h = (u.top > n ? u.top - n : n - u.bottom) - 1; | |
if (u.left - 1 <= t && u.right + 1 >= t && h < o) { | |
var d = t >= (u.left + u.right) / 2 | |
, p = d; | |
if (kn.chrome || kn.gecko) | |
Xt(e, s).getBoundingClientRect().left == u.right && (p = !d); | |
if (h <= 0) | |
return { | |
node: e, | |
offset: s + (p ? 1 : 0) | |
}; | |
r = s + (p ? 1 : 0), | |
o = h | |
} | |
} | |
} | |
return { | |
node: e, | |
offset: r > -1 ? r : a > 0 ? e.nodeValue.length : 0 | |
} | |
} | |
function lr(e, t, n, i) { | |
var r, o, a; | |
void 0 === i && (i = -1); | |
var s, l = e.contentDOM.getBoundingClientRect(), c = l.top + e.viewState.paddingTop, u = e.viewState.docHeight, h = t.x, d = t.y, p = d - c; | |
if (p < 0) | |
return 0; | |
if (p > u) | |
return e.state.doc.length; | |
for (var f = e.viewState.heightOracle.textHeight / 2, m = !1; (s = e.elementAtHeight(p)).type != Bn.Text; ) | |
for (; !((p = i > 0 ? s.bottom + f : s.top - f) >= 0 && p <= u); ) { | |
if (m) | |
return n ? null : 0; | |
m = !0, | |
i = -i | |
} | |
d = c + p; | |
var v = s.from; | |
if (v < e.viewport.from) | |
return 0 == e.viewport.from ? 0 : n ? null : cr(e, l, s, h, d); | |
if (v > e.viewport.to) | |
return e.viewport.to == e.state.doc.length ? e.state.doc.length : n ? null : cr(e, l, s, h, d); | |
var g = e.dom.ownerDocument | |
, y = e.root.elementFromPoint ? e.root : g | |
, b = y.elementFromPoint(h, d); | |
b && !e.contentDOM.contains(b) && (b = null), | |
b || (h = Math.max(l.left + 1, Math.min(l.right - 1, h)), | |
(b = y.elementFromPoint(h, d)) && !e.contentDOM.contains(b) && (b = null)); | |
var w, k = -1; | |
if (b && 0 != (null === (o = e.docView.nearest(b)) || void 0 === o ? void 0 : o.isEditable)) { | |
if (g.caretPositionFromPoint) { | |
var C = g.caretPositionFromPoint(h, d); | |
C && (w = C.offsetNode, | |
k = C.offset) | |
} else if (g.caretRangeFromPoint) { | |
var M = g.caretRangeFromPoint(h, d); | |
M && (w = M.startContainer, | |
k = M.startOffset, | |
(!e.contentDOM.contains(w) || kn.safari && function(e, t, n) { | |
var i; | |
if (3 != e.nodeType || t != (i = e.nodeValue.length)) | |
return !1; | |
for (var r = e.nextSibling; r; r = r.nextSibling) | |
if (1 != r.nodeType || "BR" != r.nodeName) | |
return !1; | |
return Xt(e, i - 1, i).getBoundingClientRect().left > n | |
}(w, k, h) || kn.chrome && function(e, t, n) { | |
if (0 != t) | |
return !1; | |
for (var i = e; ; ) { | |
var r = i.parentNode; | |
if (!r || 1 != r.nodeType || r.firstChild != i) | |
return !1; | |
if (r.classList.contains("cm-line")) | |
break; | |
i = r | |
} | |
var o = 1 == e.nodeType ? e.getBoundingClientRect() : Xt(e, 0, Math.max(e.nodeValue.length, 1)).getBoundingClientRect(); | |
return n - o.left > 5 | |
}(w, k, h)) && (w = void 0)) | |
} | |
w && (k = Math.min(Ut(w), k)) | |
} | |
if (!w || !e.docView.dom.contains(w)) { | |
var E = Un.find(e.docView, v); | |
if (!E) | |
return p > s.top + s.height / 2 ? s.to : s.from; | |
w = (r = ar(E.dom, h, d)).node, | |
k = r.offset | |
} | |
var S = e.docView.nearest(w); | |
if (!S) | |
return null; | |
if (S.isWidget && 1 == (null === (a = S.dom) || void 0 === a ? void 0 : a.nodeType)) { | |
var x = S.dom.getBoundingClientRect(); | |
return t.y < x.top || t.y <= x.bottom && t.x <= (x.left + x.right) / 2 ? S.posAtStart : S.posAtEnd | |
} | |
return S.localPosFromDOM(w, k) + S.posAtStart | |
} | |
function cr(e, t, n, i, r) { | |
var o = Math.round((i - t.left) * e.defaultCharacterWidth); | |
if (e.lineWrapping && n.height > 1.5 * e.defaultLineHeight) { | |
var a = e.viewState.heightOracle.textHeight; | |
o += Math.floor((r - n.top - .5 * (e.defaultLineHeight - a)) / a) * e.viewState.heightOracle.lineLength | |
} | |
var s = e.state.sliceDoc(n.from, n.to); | |
return n.from + kt(s, o, e.state.tabSize) | |
} | |
function ur(e, t) { | |
var n = e.lineBlockAt(t); | |
if (Array.isArray(n.type)) | |
for (var i = 0, r = n.type; i < r.length; i++) { | |
var o = r[i]; | |
if (o.to > t || o.to == t && (o.to == n.to || o.type == Bn.Text)) | |
return o | |
} | |
return n | |
} | |
function hr(e, t, n, i) { | |
for (var r = e.state.doc.lineAt(t.head), o = e.bidiSpans(r), a = e.textDirectionAt(r.from), s = t, l = null; ; ) { | |
var c = gi(r, o, a, s, n) | |
, u = vi; | |
if (!c) { | |
if (r.number == (n ? e.state.doc.lines : 1)) | |
return s; | |
u = "\n", | |
r = e.state.doc.line(r.number + (n ? 1 : -1)), | |
o = e.bidiSpans(r), | |
c = e.visualLineSide(r, !n) | |
} | |
if (l) { | |
if (!l(u)) | |
return s | |
} else { | |
if (!i) | |
return c; | |
l = i(u) | |
} | |
s = c | |
} | |
} | |
function dr(e, t, n) { | |
for (var i = function() { | |
for (var i = 0, r = 0, o = e; r < o.length; r++) { | |
o[r].between(t - 1, t + 1, (function(e, r, o) { | |
if (t > e && t < r) { | |
var a = i || n || (t - e < r - t ? -1 : 1); | |
t = a < 0 ? e : r, | |
i = a | |
} | |
} | |
)) | |
} | |
if (!i) | |
return { | |
value: t | |
} | |
}; ; ) { | |
var r = i(); | |
if ("object" == typeof r) | |
return r.value | |
} | |
} | |
function pr(e, t, n) { | |
var i = dr(e.state.facet(Wi).map((function(t) { | |
return t(e) | |
} | |
)), n.from, t.head > n.from ? -1 : 1); | |
return i == n.from ? n : de.cursor(i, i < n.from ? 1 : -1) | |
} | |
var fr = "" | |
, mr = function() { | |
function e(e, t) { | |
this.points = e, | |
this.text = "", | |
this.lineSeparator = t.facet(nt.lineSeparator) | |
} | |
return e.prototype.append = function(e) { | |
this.text += e | |
} | |
, | |
e.prototype.lineBreak = function() { | |
this.text += fr | |
} | |
, | |
e.prototype.readRange = function(e, t) { | |
if (!e) | |
return this; | |
for (var n = e.parentNode, i = e; ; ) { | |
this.findPointBefore(n, i); | |
var r = this.text.length; | |
this.readNode(i); | |
var o = i.nextSibling; | |
if (o == t) | |
break; | |
var a = on.get(i) | |
, s = on.get(o); | |
(a && s ? a.breakAfter : (a ? a.breakAfter : zt(i)) || zt(o) && ("BR" != i.nodeName || i.cmIgnore) && this.text.length > r) && this.lineBreak(), | |
i = o | |
} | |
return this.findPointBefore(n, t), | |
this | |
} | |
, | |
e.prototype.readTextNode = function(e) { | |
for (var t = e.nodeValue, n = 0, i = this.points; n < i.length; n++) { | |
(h = i[n]).node == e && (h.pos = this.text.length + Math.min(h.offset, t.length)) | |
} | |
for (var r = 0, o = this.lineSeparator ? null : /\r\n?|\n/g; ; ) { | |
var a = -1 | |
, s = 1 | |
, l = void 0; | |
if (this.lineSeparator ? (a = t.indexOf(this.lineSeparator, r), | |
s = this.lineSeparator.length) : (l = o.exec(t)) && (a = l.index, | |
s = l[0].length), | |
this.append(t.slice(r, a < 0 ? t.length : a)), | |
a < 0) | |
break; | |
if (this.lineBreak(), | |
s > 1) | |
for (var c = 0, u = this.points; c < u.length; c++) { | |
var h; | |
(h = u[c]).node == e && h.pos > this.text.length && (h.pos -= s - 1) | |
} | |
r = a + s | |
} | |
} | |
, | |
e.prototype.readNode = function(e) { | |
if (!e.cmIgnore) { | |
var t = on.get(e) | |
, n = t && t.overrideDOMText; | |
if (null != n) { | |
this.findPointInside(e, n.length); | |
for (var i = n.iter(); !i.next().done; ) | |
i.lineBreak ? this.lineBreak() : this.append(i.value) | |
} else | |
3 == e.nodeType ? this.readTextNode(e) : "BR" == e.nodeName ? e.nextSibling && this.lineBreak() : 1 == e.nodeType && this.readRange(e.firstChild, null) | |
} | |
} | |
, | |
e.prototype.findPointBefore = function(e, t) { | |
for (var n = 0, i = this.points; n < i.length; n++) { | |
var r = i[n]; | |
r.node == e && e.childNodes[r.offset] == t && (r.pos = this.text.length) | |
} | |
} | |
, | |
e.prototype.findPointInside = function(e, t) { | |
for (var n = 0, i = this.points; n < i.length; n++) { | |
var r = i[n]; | |
(3 == e.nodeType ? r.node == e : e.contains(r.node)) && (r.pos = this.text.length + (vr(e, r.node, r.offset) ? t : 0)) | |
} | |
} | |
, | |
e | |
}(); | |
function vr(e, t, n) { | |
for (; ; ) { | |
if (!t || n < Ut(t)) | |
return !1; | |
if (t == e) | |
return !0; | |
n = Vt(t) + 1, | |
t = t.parentNode | |
} | |
} | |
var gr = function(e, t) { | |
this.node = e, | |
this.offset = t, | |
this.pos = -1 | |
} | |
, yr = function(e, t, n, i) { | |
this.typeOver = i, | |
this.bounds = null, | |
this.text = "", | |
this.domChanged = t > -1; | |
var r = e.docView | |
, o = r.impreciseHead | |
, a = r.impreciseAnchor; | |
if (e.state.readOnly && t > -1) | |
this.newSel = null; | |
else if (t > -1 && (this.bounds = e.docView.domBoundsAround(t, n, 0))) { | |
var s = o || a ? [] : function(e) { | |
var t = []; | |
if (e.root.activeElement != e.contentDOM) | |
return t; | |
var n = e.observer.selectionRange | |
, i = n.anchorNode | |
, r = n.anchorOffset | |
, o = n.focusNode | |
, a = n.focusOffset; | |
return i && (t.push(new gr(i,r)), | |
o == i && a == r || t.push(new gr(o,a))), | |
t | |
}(e) | |
, l = new mr(s,e.state); | |
l.readRange(this.bounds.startDOM, this.bounds.endDOM), | |
this.text = l.text, | |
this.newSel = function(e, t) { | |
if (0 == e.length) | |
return null; | |
var n = e[0].pos | |
, i = 2 == e.length ? e[1].pos : n; | |
return n > -1 && i > -1 ? de.single(n + t, i + t) : null | |
}(s, this.bounds.from) | |
} else { | |
var c = e.observer.selectionRange | |
, u = o && o.node == c.focusNode && o.offset == c.focusOffset || !Bt(e.contentDOM, c.focusNode) ? e.state.selection.main.head : e.docView.posFromDOM(c.focusNode, c.focusOffset) | |
, h = a && a.node == c.anchorNode && a.offset == c.anchorOffset || !Bt(e.contentDOM, c.anchorNode) ? e.state.selection.main.anchor : e.docView.posFromDOM(c.anchorNode, c.anchorOffset) | |
, d = e.viewport; | |
if ((kn.ios || kn.chrome) && e.state.selection.main.empty && u != h && (d.from > 0 || d.to < e.state.doc.length)) { | |
var p = Math.min(u, h) | |
, f = Math.max(u, h) | |
, m = d.from - p | |
, v = d.to - f; | |
0 != m && 1 != m && 0 != p || 0 != v && -1 != v && f != e.state.doc.length || (u = 0, | |
h = e.state.doc.length) | |
} | |
this.newSel = de.single(h, u) | |
} | |
}; | |
function br(e, t) { | |
var n, i = t.newSel, r = e.state.selection.main, o = e.inputState.lastKeyTime > Date.now() - 100 ? e.inputState.lastKeyCode : -1; | |
if (t.bounds) { | |
var a = t.bounds | |
, s = a.from | |
, l = a.to | |
, c = r.from | |
, u = null; | |
(8 === o || kn.android && t.text.length < l - s) && (c = r.to, | |
u = "end"); | |
var h = function(e, t, n, i) { | |
var r = Math.min(e.length, t.length) | |
, o = 0; | |
for (; o < r && e.charCodeAt(o) == t.charCodeAt(o); ) | |
o++; | |
if (o == r && e.length == t.length) | |
return null; | |
var a = e.length | |
, s = t.length; | |
for (; a > 0 && s > 0 && e.charCodeAt(a - 1) == t.charCodeAt(s - 1); ) | |
a--, | |
s--; | |
if ("end" == i) { | |
n -= a + Math.max(0, o - Math.min(a, s)) - o | |
} | |
if (a < o && e.length < t.length) { | |
s = (o -= n <= o && n >= a ? o - n : 0) + (s - a), | |
a = o | |
} else if (s < o) { | |
a = (o -= n <= o && n >= s ? o - n : 0) + (a - s), | |
s = o | |
} | |
return { | |
from: o, | |
toA: a, | |
toB: s | |
} | |
}(e.state.doc.sliceString(s, l, fr), t.text, c - s, u); | |
h && (kn.chrome && 13 == o && h.toB == h.from + 2 && t.text.slice(h.from, h.toB) == fr + fr && h.toB--, | |
n = { | |
from: s + h.from, | |
to: s + h.toA, | |
insert: q.of(t.text.slice(h.from, h.toB).split(fr)) | |
}) | |
} else | |
i && (!e.hasFocus && e.state.facet(Bi) || i.main.eq(r)) && (i = null); | |
if (!n && !i) | |
return !1; | |
if (!n && t.typeOver && !r.empty && i && i.main.empty ? n = { | |
from: r.from, | |
to: r.to, | |
insert: e.state.doc.slice(r.from, r.to) | |
} : n && n.from >= r.from && n.to <= r.to && (n.from != r.from || n.to != r.to) && r.to - r.from - (n.to - n.from) <= 4 ? n = { | |
from: r.from, | |
to: r.to, | |
insert: e.state.doc.slice(r.from, n.from).append(n.insert).append(e.state.doc.slice(n.to, r.to)) | |
} : kn.chrome && n && n.from == n.to && n.from == r.head && "\n " == n.insert.toString() && e.lineWrapping && (i && (i = de.single(i.main.anchor - 1, i.main.head - 1)), | |
n = { | |
from: r.from, | |
to: r.to, | |
insert: q.of([" "]) | |
}), | |
n) | |
return wr(e, n, i, o); | |
if (i && !i.main.eq(r)) { | |
var d = !1 | |
, p = "select"; | |
return e.inputState.lastSelectionTime > Date.now() - 50 && ("select" == e.inputState.lastSelectionOrigin && (d = !0), | |
p = e.inputState.lastSelectionOrigin), | |
e.dispatch({ | |
selection: i, | |
scrollIntoView: d, | |
userEvent: p | |
}), | |
!0 | |
} | |
return !1 | |
} | |
function wr(e, t, n, i) { | |
if (void 0 === i && (i = -1), | |
kn.ios && e.inputState.flushIOSKey(t)) | |
return !0; | |
var r = e.state.selection.main; | |
if (kn.android && (t.to == r.to && (t.from == r.from || t.from == r.from - 1 && " " == e.state.sliceDoc(t.from, r.from)) && 1 == t.insert.length && 2 == t.insert.lines && $t(e.contentDOM, "Enter", 13) || (t.from == r.from - 1 && t.to == r.to && 0 == t.insert.length || 8 == i && t.insert.length < t.to - t.from && t.to > r.head) && $t(e.contentDOM, "Backspace", 8) || t.from == r.from && t.to == r.to + 1 && 0 == t.insert.length && $t(e.contentDOM, "Delete", 46))) | |
return !0; | |
var o, a = t.insert.toString(); | |
e.inputState.composing >= 0 && e.inputState.composing++; | |
var s = function() { | |
return o || (o = function(e, t, n) { | |
var i, r = e.state, o = r.selection.main; | |
if (t.from >= o.from && t.to <= o.to && t.to - t.from >= (o.to - o.from) / 3 && (!n || n.main.empty && n.main.from == t.from + t.insert.length) && e.inputState.composing < 0) { | |
var a = o.from < t.from ? r.sliceDoc(o.from, t.from) : "" | |
, s = o.to > t.to ? r.sliceDoc(t.to, o.to) : ""; | |
i = r.replaceSelection(e.state.toText(a + t.insert.sliceString(0, void 0, e.state.lineBreak) + s)) | |
} else { | |
var l = r.changes(t) | |
, c = n && n.main.to <= l.newLength ? n.main : void 0; | |
if (r.selection.ranges.length > 1 && e.inputState.composing >= 0 && t.to <= o.to && t.to >= o.to - 10) { | |
var u, h = e.state.sliceDoc(t.from, t.to), d = n && Ji(e, n.main.head); | |
if (d) { | |
var p = t.insert.length - (t.to - t.from); | |
u = { | |
from: d.from, | |
to: d.to - p | |
} | |
} else | |
u = e.state.doc.lineAt(o.head); | |
var f = o.to - t.to | |
, m = o.to - o.from; | |
i = r.changeByRange((function(n) { | |
if (n.from == o.from && n.to == o.to) | |
return { | |
changes: l, | |
range: c || n.map(l) | |
}; | |
var i = n.to - f | |
, a = i - h.length; | |
if (n.to - n.from != m || e.state.sliceDoc(a, i) != h || n.to >= u.from && n.from <= u.to) | |
return { | |
range: n | |
}; | |
var s = r.changes({ | |
from: a, | |
to: i, | |
insert: t.insert | |
}) | |
, d = n.to - o.to; | |
return { | |
changes: s, | |
range: c ? de.range(Math.max(0, c.anchor + d), Math.max(0, c.head + d)) : n.map(s) | |
} | |
} | |
)) | |
} else | |
i = { | |
changes: l, | |
selection: c && r.selection.replaceRange(c) | |
} | |
} | |
var v = "input.type"; | |
(e.composing || e.inputState.compositionPendingChange && e.inputState.compositionEndedAt > Date.now() - 50) && (e.inputState.compositionPendingChange = !1, | |
v += ".compose", | |
e.inputState.compositionFirstChange && (v += ".start", | |
e.inputState.compositionFirstChange = !1)); | |
return r.update(i, { | |
userEvent: v, | |
scrollIntoView: !0 | |
}) | |
}(e, t, n)) | |
}; | |
return e.state.facet(Ei).some((function(n) { | |
return n(e, t.from, t.to, a, s) | |
} | |
)) || e.dispatch(s()), | |
!0 | |
} | |
var kr = function() { | |
function e(e) { | |
this.view = e, | |
this.lastKeyCode = 0, | |
this.lastKeyTime = 0, | |
this.lastTouchTime = 0, | |
this.lastFocusTime = 0, | |
this.lastScrollTop = 0, | |
this.lastScrollLeft = 0, | |
this.pendingIOSKey = void 0, | |
this.tabFocusMode = -1, | |
this.lastSelectionOrigin = null, | |
this.lastSelectionTime = 0, | |
this.lastContextMenu = 0, | |
this.scrollHandlers = [], | |
this.handlers = Object.create(null), | |
this.composing = -1, | |
this.compositionFirstChange = null, | |
this.compositionEndedAt = 0, | |
this.compositionPendingKey = !1, | |
this.compositionPendingChange = !1, | |
this.mouseSelection = null, | |
this.draggedContent = null, | |
this.handleEvent = this.handleEvent.bind(this), | |
this.notifiedFocused = e.hasFocus, | |
kn.safari && e.contentDOM.addEventListener("input", (function() { | |
return null | |
} | |
)), | |
kn.gecko && function(e) { | |
Yr.has(e) || (Yr.add(e), | |
e.addEventListener("copy", (function() {} | |
)), | |
e.addEventListener("cut", (function() {} | |
))) | |
}(e.contentDOM.ownerDocument) | |
} | |
return e.prototype.setSelectionOrigin = function(e) { | |
this.lastSelectionOrigin = e, | |
this.lastSelectionTime = Date.now() | |
} | |
, | |
e.prototype.handleEvent = function(e) { | |
(function(e, t) { | |
if (!t.bubbles) | |
return !0; | |
if (t.defaultPrevented) | |
return !1; | |
for (var n = t.target, i = void 0; n != e.contentDOM; n = n.parentNode) | |
if (!n || 11 == n.nodeType || (i = on.get(n)) && i.ignoreEvent(t)) | |
return !1; | |
return !0 | |
} | |
)(this.view, e) && !this.ignoreDuringComposition(e) && ("keydown" == e.type && this.keydown(e) || this.runHandlers(e.type, e)) | |
} | |
, | |
e.prototype.runHandlers = function(e, t) { | |
var n = this.handlers[e]; | |
if (n) { | |
for (var i = 0, r = n.observers; i < r.length; i++) { | |
(0, | |
r[i])(this.view, t) | |
} | |
for (var o = 0, a = n.handlers; o < a.length; o++) { | |
var s = a[o]; | |
if (t.defaultPrevented) | |
break; | |
if (s(this.view, t)) { | |
t.preventDefault(); | |
break | |
} | |
} | |
} | |
} | |
, | |
e.prototype.ensureHandlers = function(e) { | |
var t = Mr(e) | |
, n = this.handlers | |
, i = this.view.contentDOM; | |
for (var r in t) | |
if ("scroll" != r) { | |
var o = !t[r].handlers.length | |
, a = n[r]; | |
a && o != !a.handlers.length && (i.removeEventListener(r, this.handleEvent), | |
a = null), | |
a || i.addEventListener(r, this.handleEvent, { | |
passive: o | |
}) | |
} | |
for (var r in n) | |
"scroll" == r || t[r] || i.removeEventListener(r, this.handleEvent); | |
this.handlers = t | |
} | |
, | |
e.prototype.keydown = function(e) { | |
var t, n = this; | |
return this.lastKeyCode = e.keyCode, | |
this.lastKeyTime = Date.now(), | |
9 == e.keyCode && this.tabFocusMode > -1 && (!this.tabFocusMode || Date.now() <= this.tabFocusMode) || (this.tabFocusMode > 0 && 27 != e.keyCode && xr.indexOf(e.keyCode) < 0 && (this.tabFocusMode = -1), | |
!kn.android || !kn.chrome || e.synthetic || 13 != e.keyCode && 8 != e.keyCode ? !kn.ios || e.synthetic || e.altKey || e.metaKey || !((t = Er.find((function(t) { | |
return t.keyCode == e.keyCode | |
} | |
))) && !e.ctrlKey || Sr.indexOf(e.key) > -1 && e.ctrlKey && !e.shiftKey) ? (229 != e.keyCode && this.view.observer.forceFlush(), | |
!1) : (this.pendingIOSKey = t || e, | |
setTimeout((function() { | |
return n.flushIOSKey() | |
} | |
), 250), | |
!0) : (this.view.observer.delayAndroidKey(e.key, e.keyCode), | |
!0)) | |
} | |
, | |
e.prototype.flushIOSKey = function(e) { | |
var t = this.pendingIOSKey; | |
return !!t && (!("Enter" == t.key && e && e.from < e.to && /^\S+$/.test(e.insert.toString())) && (this.pendingIOSKey = void 0, | |
$t(this.view.contentDOM, t.key, t.keyCode, t instanceof KeyboardEvent ? t : void 0))) | |
} | |
, | |
e.prototype.ignoreDuringComposition = function(e) { | |
return !!/^key/.test(e.type) && (this.composing > 0 || !!(kn.safari && !kn.ios && this.compositionPendingKey && Date.now() - this.compositionEndedAt < 100) && (this.compositionPendingKey = !1, | |
!0)) | |
} | |
, | |
e.prototype.startMouseSelection = function(e) { | |
this.mouseSelection && this.mouseSelection.destroy(), | |
this.mouseSelection = e | |
} | |
, | |
e.prototype.update = function(e) { | |
this.view.observer.update(e), | |
this.mouseSelection && this.mouseSelection.update(e), | |
this.draggedContent && e.docChanged && (this.draggedContent = this.draggedContent.map(e.changes)), | |
e.transactions.length && (this.lastKeyCode = this.lastSelectionTime = 0) | |
} | |
, | |
e.prototype.destroy = function() { | |
this.mouseSelection && this.mouseSelection.destroy() | |
} | |
, | |
e | |
}(); | |
function Cr(e, t) { | |
return function(n, i) { | |
try { | |
return t.call(e, i, n) | |
} catch (e) { | |
Oi(n.state, e) | |
} | |
} | |
} | |
function Mr(e) { | |
var t = Object.create(null); | |
function n(e) { | |
return t[e] || (t[e] = { | |
observers: [], | |
handlers: [] | |
}) | |
} | |
for (var i = 0, r = e; i < r.length; i++) { | |
var o = r[i] | |
, a = o.spec; | |
if (a && a.domEventHandlers) | |
for (var s in a.domEventHandlers) { | |
(l = a.domEventHandlers[s]) && n(s).handlers.push(Cr(o.value, l)) | |
} | |
if (a && a.domEventObservers) | |
for (var s in a.domEventObservers) { | |
var l; | |
(l = a.domEventObservers[s]) && n(s).observers.push(Cr(o.value, l)) | |
} | |
} | |
for (var s in Ar) | |
n(s).handlers.push(Ar[s]); | |
for (var s in Lr) | |
n(s).observers.push(Lr[s]); | |
return t | |
} | |
var Er = [{ | |
key: "Backspace", | |
keyCode: 8, | |
inputType: "deleteContentBackward" | |
}, { | |
key: "Enter", | |
keyCode: 13, | |
inputType: "insertParagraph" | |
}, { | |
key: "Enter", | |
keyCode: 13, | |
inputType: "insertLineBreak" | |
}, { | |
key: "Delete", | |
keyCode: 46, | |
inputType: "deleteContentForward" | |
}] | |
, Sr = "dthko" | |
, xr = [16, 17, 18, 20, 91, 92, 224, 225]; | |
function Tr(e) { | |
return .7 * Math.max(0, e) + 8 | |
} | |
var Dr = function() { | |
function e(e, t, n, i) { | |
this.view = e, | |
this.startEvent = t, | |
this.style = n, | |
this.mustSelect = i, | |
this.scrollSpeed = { | |
x: 0, | |
y: 0 | |
}, | |
this.scrolling = -1, | |
this.lastEvent = t, | |
this.scrollParents = function(e) { | |
for (var t, n, i = e.ownerDocument, r = e.parentNode; r && !(r == i.body || t && n); ) | |
if (1 == r.nodeType) | |
!n && r.scrollHeight > r.clientHeight && (n = r), | |
!t && r.scrollWidth > r.clientWidth && (t = r), | |
r = r.assignedSlot || r.parentNode; | |
else { | |
if (11 != r.nodeType) | |
break; | |
r = r.host | |
} | |
return { | |
x: t, | |
y: n | |
} | |
}(e.contentDOM), | |
this.atoms = e.state.facet(Wi).map((function(t) { | |
return t(e) | |
} | |
)); | |
var r = e.contentDOM.ownerDocument; | |
r.addEventListener("mousemove", this.move = this.move.bind(this)), | |
r.addEventListener("mouseup", this.up = this.up.bind(this)), | |
this.extend = t.shiftKey, | |
this.multiple = e.state.facet(nt.allowMultipleSelections) && function(e, t) { | |
var n = e.state.facet(bi); | |
return n.length ? n[0](t) : kn.mac ? t.metaKey : t.ctrlKey | |
}(e, t), | |
this.dragging = !(!function(e, t) { | |
var n = e.state.selection.main; | |
if (n.empty) | |
return !1; | |
var i = Ot(e.root); | |
if (!i || 0 == i.rangeCount) | |
return !0; | |
for (var r = i.getRangeAt(0).getClientRects(), o = 0; o < r.length; o++) { | |
var a = r[o]; | |
if (a.left <= t.clientX && a.right >= t.clientX && a.top <= t.clientY && a.bottom >= t.clientY) | |
return !0 | |
} | |
return !1 | |
}(e, t) || 1 != Ur(t)) && null | |
} | |
return e.prototype.start = function(e) { | |
!1 === this.dragging && this.select(e) | |
} | |
, | |
e.prototype.move = function(e) { | |
var t, n; | |
if (0 == e.buttons) | |
return this.destroy(); | |
if (!(this.dragging || null == this.dragging && (i = this.startEvent, | |
r = e, | |
Math.max(Math.abs(i.clientX - r.clientX), Math.abs(i.clientY - r.clientY)) < 10))) { | |
var i, r; | |
this.select(this.lastEvent = e); | |
var o = 0 | |
, a = 0 | |
, s = 0 | |
, l = 0 | |
, c = this.view.win.innerWidth | |
, u = this.view.win.innerHeight; | |
this.scrollParents.x && (s = (t = this.scrollParents.x.getBoundingClientRect()).left, | |
c = t.right), | |
this.scrollParents.y && (l = (n = this.scrollParents.y.getBoundingClientRect()).top, | |
u = n.bottom); | |
var h = Yi(this.view); | |
e.clientX - h.left <= s + 6 ? o = -Tr(s - e.clientX) : e.clientX + h.right >= c - 6 && (o = Tr(e.clientX - c)), | |
e.clientY - h.top <= l + 6 ? a = -Tr(l - e.clientY) : e.clientY + h.bottom >= u - 6 && (a = Tr(e.clientY - u)), | |
this.setScrollSpeed(o, a) | |
} | |
} | |
, | |
e.prototype.up = function(e) { | |
null == this.dragging && this.select(this.lastEvent), | |
this.dragging || e.preventDefault(), | |
this.destroy() | |
} | |
, | |
e.prototype.destroy = function() { | |
this.setScrollSpeed(0, 0); | |
var e = this.view.contentDOM.ownerDocument; | |
e.removeEventListener("mousemove", this.move), | |
e.removeEventListener("mouseup", this.up), | |
this.view.inputState.mouseSelection = this.view.inputState.draggedContent = null | |
} | |
, | |
e.prototype.setScrollSpeed = function(e, t) { | |
var n = this; | |
this.scrollSpeed = { | |
x: e, | |
y: t | |
}, | |
e || t ? this.scrolling < 0 && (this.scrolling = setInterval((function() { | |
return n.scroll() | |
} | |
), 50)) : this.scrolling > -1 && (clearInterval(this.scrolling), | |
this.scrolling = -1) | |
} | |
, | |
e.prototype.scroll = function() { | |
var e = this.scrollSpeed | |
, t = e.x | |
, n = e.y; | |
t && this.scrollParents.x && (this.scrollParents.x.scrollLeft += t, | |
t = 0), | |
n && this.scrollParents.y && (this.scrollParents.y.scrollTop += n, | |
n = 0), | |
(t || n) && this.view.win.scrollBy(t, n), | |
!1 === this.dragging && this.select(this.lastEvent) | |
} | |
, | |
e.prototype.skipAtoms = function(e) { | |
for (var t = null, n = 0; n < e.ranges.length; n++) { | |
var i = e.ranges[n] | |
, r = null; | |
if (i.empty) { | |
var o = dr(this.atoms, i.from, 0); | |
o != i.from && (r = de.cursor(o, -1)) | |
} else { | |
var a = dr(this.atoms, i.from, -1) | |
, s = dr(this.atoms, i.to, 1); | |
a == i.from && s == i.to || (r = de.range(i.from == i.anchor ? a : s, i.from == i.head ? a : s)) | |
} | |
r && (t || (t = e.ranges.slice()), | |
t[n] = r) | |
} | |
return t ? de.create(t, e.mainIndex) : e | |
} | |
, | |
e.prototype.select = function(e) { | |
var t = this.view | |
, n = this.skipAtoms(this.style.get(e, this.extend, this.multiple)); | |
!this.mustSelect && n.eq(t.state.selection, !1 === this.dragging) || this.view.dispatch({ | |
selection: n, | |
userEvent: "select.pointer" | |
}), | |
this.mustSelect = !1 | |
} | |
, | |
e.prototype.update = function(e) { | |
var t = this; | |
e.transactions.some((function(e) { | |
return e.isUserEvent("input.type") | |
} | |
)) ? this.destroy() : this.style.update(e) && setTimeout((function() { | |
return t.select(t.lastEvent) | |
} | |
), 20) | |
} | |
, | |
e | |
}(); | |
var Ar = Object.create(null) | |
, Lr = Object.create(null) | |
, Pr = kn.ie && kn.ie_version < 15 || kn.ios && kn.webkit_version < 604; | |
function Ir(e, t, n) { | |
for (var i = 0, r = e.facet(t); i < r.length; i++) { | |
n = (0, | |
r[i])(n, e) | |
} | |
return n | |
} | |
function Fr(e, t) { | |
t = Ir(e.state, xi, t); | |
var n, i = e.state, r = 1, o = i.toText(t), a = o.lines == i.selection.ranges.length, s = null != Wr && i.selection.ranges.every((function(e) { | |
return e.empty | |
} | |
)) && Wr == o.toString(); | |
if (s) { | |
var l = -1; | |
n = i.changeByRange((function(e) { | |
var n = i.doc.lineAt(e.from); | |
if (n.from == l) | |
return { | |
range: e | |
}; | |
l = n.from; | |
var s = i.toText((a ? o.line(r++).text : t) + i.lineBreak); | |
return { | |
changes: { | |
from: n.from, | |
insert: s | |
}, | |
range: de.cursor(e.from + s.length) | |
} | |
} | |
)) | |
} else | |
n = a ? i.changeByRange((function(e) { | |
var t = o.line(r++); | |
return { | |
changes: { | |
from: e.from, | |
to: e.to, | |
insert: t.text | |
}, | |
range: de.cursor(e.from + t.length) | |
} | |
} | |
)) : i.replaceSelection(o); | |
e.dispatch(n, { | |
userEvent: "input.paste", | |
scrollIntoView: !0 | |
}) | |
} | |
function Or(e, t, n, i) { | |
if (1 == i) | |
return de.cursor(t, n); | |
if (2 == i) | |
return function(e, t, n) { | |
void 0 === n && (n = 1); | |
var i = e.charCategorizer(t) | |
, r = e.doc.lineAt(t) | |
, o = t - r.from; | |
if (0 == r.length) | |
return de.cursor(t); | |
0 == o ? n = 1 : o == r.length && (n = -1); | |
var a = o | |
, s = o; | |
n < 0 ? a = $(r.text, o, !1) : s = $(r.text, o); | |
for (var l = i(r.text.slice(a, s)); a > 0; ) { | |
var c = $(r.text, a, !1); | |
if (i(r.text.slice(c, a)) != l) | |
break; | |
a = c | |
} | |
for (; s < r.length; ) { | |
var u = $(r.text, s); | |
if (i(r.text.slice(s, u)) != l) | |
break; | |
s = u | |
} | |
return de.range(a + r.from, s + r.from) | |
}(e.state, t, n); | |
var r = Un.find(e.docView, t) | |
, o = e.state.doc.lineAt(r ? r.posAtEnd : t) | |
, a = r ? r.posAtStart : o.from | |
, s = r ? r.posAtEnd : o.to; | |
return s < e.state.doc.length && s == o.to && s++, | |
de.range(a, s) | |
} | |
Lr.scroll = function(e) { | |
e.inputState.lastScrollTop = e.scrollDOM.scrollTop, | |
e.inputState.lastScrollLeft = e.scrollDOM.scrollLeft | |
} | |
, | |
Ar.keydown = function(e, t) { | |
return e.inputState.setSelectionOrigin("select"), | |
27 == t.keyCode && 0 != e.inputState.tabFocusMode && (e.inputState.tabFocusMode = Date.now() + 2e3), | |
!1 | |
} | |
, | |
Lr.touchstart = function(e, t) { | |
e.inputState.lastTouchTime = Date.now(), | |
e.inputState.setSelectionOrigin("select.pointer") | |
} | |
, | |
Lr.touchmove = function(e) { | |
e.inputState.setSelectionOrigin("select.pointer") | |
} | |
, | |
Ar.mousedown = function(e, t) { | |
if (e.observer.flush(), | |
e.inputState.lastTouchTime > Date.now() - 2e3) | |
return !1; | |
for (var n = null, i = 0, r = e.state.facet(ki); i < r.length; i++) { | |
if (n = (0, | |
r[i])(e, t)) | |
break | |
} | |
if (n || 0 != t.button || (n = function(e, t) { | |
var n = Rr(e, t) | |
, i = Ur(t) | |
, r = e.state.selection; | |
return { | |
update: function(e) { | |
e.docChanged && (n.pos = e.changes.mapPos(n.pos), | |
r = r.map(e.changes)) | |
}, | |
get: function(t, o, a) { | |
var s, l = Rr(e, t), c = Or(e, l.pos, l.bias, i); | |
if (n.pos != l.pos && !o) { | |
var u = Or(e, n.pos, n.bias, i) | |
, h = Math.min(u.from, c.from) | |
, d = Math.max(u.to, c.to); | |
c = h < c.from ? de.range(h, d) : de.range(d, h) | |
} | |
return o ? r.replaceRange(r.main.extend(c.from, c.to)) : a && 1 == i && r.ranges.length > 1 && (s = function(e, t) { | |
for (var n = 0; n < e.ranges.length; n++) { | |
var i = e.ranges[n] | |
, r = i.from | |
, o = i.to; | |
if (r <= t && o >= t) | |
return de.create(e.ranges.slice(0, n).concat(e.ranges.slice(n + 1)), e.mainIndex == n ? 0 : e.mainIndex - (e.mainIndex > n ? 1 : 0)) | |
} | |
return null | |
}(r, l.pos)) ? s : a ? r.addRange(c) : de.create([c]) | |
} | |
} | |
}(e, t)), | |
n) { | |
var o = !e.hasFocus; | |
e.inputState.startMouseSelection(new Dr(e,t,n,o)), | |
o && e.observer.ignore((function() { | |
Zt(e.contentDOM); | |
var t = e.root.activeElement; | |
t && !t.contains(e.contentDOM) && t.blur() | |
} | |
)); | |
var a = e.inputState.mouseSelection; | |
if (a) | |
return a.start(t), | |
!1 === a.dragging | |
} | |
return !1 | |
} | |
; | |
var Br = function(e, t, n) { | |
return t >= n.top && t <= n.bottom && e >= n.left && e <= n.right | |
}; | |
function Nr(e, t, n, i) { | |
var r = Un.find(e.docView, t); | |
if (!r) | |
return 1; | |
var o = t - r.posAtStart; | |
if (0 == o) | |
return 1; | |
if (o == r.length) | |
return -1; | |
var a = r.coordsAt(o, -1); | |
if (a && Br(n, i, a)) | |
return -1; | |
var s = r.coordsAt(o, 1); | |
return s && Br(n, i, s) ? 1 : a && a.bottom >= i ? -1 : 1 | |
} | |
function Rr(e, t) { | |
var n = e.posAtCoords({ | |
x: t.clientX, | |
y: t.clientY | |
}, !1); | |
return { | |
pos: n, | |
bias: Nr(e, n, t.clientX, t.clientY) | |
} | |
} | |
var Hr = kn.ie && kn.ie_version <= 11 | |
, Vr = null | |
, zr = 0 | |
, qr = 0; | |
function Ur(e) { | |
if (!Hr) | |
return e.detail; | |
var t = Vr | |
, n = qr; | |
return Vr = e, | |
qr = Date.now(), | |
zr = !t || n > Date.now() - 400 && Math.abs(t.clientX - e.clientX) < 2 && Math.abs(t.clientY - e.clientY) < 2 ? (zr + 1) % 3 : 1 | |
} | |
function _r(e, t, n, i) { | |
if (n = Ir(e.state, xi, n)) { | |
var r = e.posAtCoords({ | |
x: t.clientX, | |
y: t.clientY | |
}, !1) | |
, o = e.inputState.draggedContent | |
, a = i && o && function(e, t) { | |
var n = e.state.facet(wi); | |
return n.length ? n[0](t) : kn.mac ? !t.altKey : !t.ctrlKey | |
}(e, t) ? { | |
from: o.from, | |
to: o.to | |
} : null | |
, s = { | |
from: r, | |
insert: n | |
} | |
, l = e.state.changes(a ? [a, s] : s); | |
e.focus(), | |
e.dispatch({ | |
changes: l, | |
selection: { | |
anchor: l.mapPos(r, -1), | |
head: l.mapPos(r, 1) | |
}, | |
userEvent: a ? "move.drop" : "input.drop" | |
}), | |
e.inputState.draggedContent = null | |
} | |
} | |
Ar.dragstart = function(e, t) { | |
var n = e.state.selection.main; | |
if (t.target.draggable) { | |
var i = e.docView.nearest(t.target); | |
if (i && i.isWidget) { | |
var r = i.posAtStart | |
, o = r + i.length; | |
(r >= n.to || o <= n.from) && (n = de.range(r, o)) | |
} | |
} | |
var a = e.inputState; | |
return a.mouseSelection && (a.mouseSelection.dragging = !0), | |
a.draggedContent = n, | |
t.dataTransfer && (t.dataTransfer.setData("Text", Ir(e.state, Ti, e.state.sliceDoc(n.from, n.to))), | |
t.dataTransfer.effectAllowed = "copyMove"), | |
!1 | |
} | |
, | |
Ar.dragend = function(e) { | |
return e.inputState.draggedContent = null, | |
!1 | |
} | |
, | |
Ar.drop = function(e, t) { | |
if (!t.dataTransfer) | |
return !1; | |
if (e.state.readOnly) | |
return !0; | |
var n = t.dataTransfer.files; | |
if (n && n.length) { | |
for (var i = Array(n.length), r = 0, o = function() { | |
++r == n.length && _r(e, t, i.filter((function(e) { | |
return null != e | |
} | |
)).join(e.state.lineBreak), !1) | |
}, a = function(e) { | |
var t = new FileReader; | |
t.onerror = o, | |
t.onload = function() { | |
/[\x00-\x08\x0e-\x1f]{2}/.test(t.result) || (i[e] = t.result), | |
o() | |
} | |
, | |
t.readAsText(n[e]) | |
}, s = 0; s < n.length; s++) | |
a(s); | |
return !0 | |
} | |
var l = t.dataTransfer.getData("Text"); | |
return !!l && (_r(e, t, l, !0), | |
!0) | |
} | |
, | |
Ar.paste = function(e, t) { | |
if (e.state.readOnly) | |
return !0; | |
e.observer.flush(); | |
var n = Pr ? null : t.clipboardData; | |
return n ? (Fr(e, n.getData("text/plain") || n.getData("text/uri-list")), | |
!0) : (function(e) { | |
var t = e.dom.parentNode; | |
if (t) { | |
var n = t.appendChild(document.createElement("textarea")); | |
n.style.cssText = "position: fixed; left: -10000px; top: 10px", | |
n.focus(), | |
setTimeout((function() { | |
e.focus(), | |
n.remove(), | |
Fr(e, n.value) | |
} | |
), 50) | |
} | |
}(e), | |
!1) | |
} | |
; | |
var Wr = null; | |
Ar.copy = Ar.cut = function(e, t) { | |
var n = function(e) { | |
for (var t = [], n = [], i = !1, r = 0, o = e.selection.ranges; r < o.length; r++) { | |
var a = o[r]; | |
a.empty || (t.push(e.sliceDoc(a.from, a.to)), | |
n.push(a)) | |
} | |
if (!t.length) { | |
for (var s = -1, l = 0, c = e.selection.ranges; l < c.length; l++) { | |
var u = c[l].from | |
, h = e.doc.lineAt(u); | |
h.number > s && (t.push(h.text), | |
n.push({ | |
from: h.from, | |
to: Math.min(e.doc.length, h.to + 1) | |
})), | |
s = h.number | |
} | |
i = !0 | |
} | |
return { | |
text: Ir(e, Ti, t.join(e.lineBreak)), | |
ranges: n, | |
linewise: i | |
} | |
}(e.state) | |
, i = n.text | |
, r = n.ranges | |
, o = n.linewise; | |
if (!i && !o) | |
return !1; | |
Wr = o ? i : null, | |
"cut" != t.type || e.state.readOnly || e.dispatch({ | |
changes: r, | |
scrollIntoView: !0, | |
userEvent: "delete.cut" | |
}); | |
var a = Pr ? null : t.clipboardData; | |
return a ? (a.clearData(), | |
a.setData("text/plain", i), | |
!0) : (function(e, t) { | |
var n = e.dom.parentNode; | |
if (n) { | |
var i = n.appendChild(document.createElement("textarea")); | |
i.style.cssText = "position: fixed; left: -10000px; top: 10px", | |
i.value = t, | |
i.focus(), | |
i.selectionEnd = t.length, | |
i.selectionStart = 0, | |
setTimeout((function() { | |
i.remove(), | |
e.focus() | |
} | |
), 50) | |
} | |
}(e, i), | |
!1) | |
} | |
; | |
var jr = qe.define(); | |
function Gr(e, t) { | |
for (var n = [], i = 0, r = e.facet(Si); i < r.length; i++) { | |
var o = (0, | |
r[i])(e, t); | |
o && n.push(o) | |
} | |
return n ? e.update({ | |
effects: n, | |
annotations: jr.of(!0) | |
}) : null | |
} | |
function Kr(e) { | |
setTimeout((function() { | |
var t = e.hasFocus; | |
if (t != e.inputState.notifiedFocused) { | |
var n = Gr(e.state, t); | |
n ? e.dispatch(n) : e.update([]) | |
} | |
} | |
), 10) | |
} | |
Lr.focus = function(e) { | |
e.inputState.lastFocusTime = Date.now(), | |
e.scrollDOM.scrollTop || !e.inputState.lastScrollTop && !e.inputState.lastScrollLeft || (e.scrollDOM.scrollTop = e.inputState.lastScrollTop, | |
e.scrollDOM.scrollLeft = e.inputState.lastScrollLeft), | |
Kr(e) | |
} | |
, | |
Lr.blur = function(e) { | |
e.observer.clearSelectionRange(), | |
Kr(e) | |
} | |
, | |
Lr.compositionstart = Lr.compositionupdate = function(e) { | |
e.observer.editContext || (null == e.inputState.compositionFirstChange && (e.inputState.compositionFirstChange = !0), | |
e.inputState.composing < 0 && (e.inputState.composing = 0)) | |
} | |
, | |
Lr.compositionend = function(e) { | |
e.observer.editContext || (e.inputState.composing = -1, | |
e.inputState.compositionEndedAt = Date.now(), | |
e.inputState.compositionPendingKey = !0, | |
e.inputState.compositionPendingChange = e.observer.pendingRecords().length > 0, | |
e.inputState.compositionFirstChange = null, | |
kn.ios || kn.android ? kn.chrome && kn.android ? e.observer.flushSoon() : e.inputState.compositionPendingChange ? Promise.resolve().then((function() { | |
return e.observer.flush() | |
} | |
)) : setTimeout((function() { | |
e.inputState.composing < 0 && e.docView.hasComposition && e.update([]) | |
} | |
), 50) : e.observer.forceFlush()) | |
} | |
, | |
Lr.contextmenu = function(e) { | |
e.inputState.lastContextMenu = Date.now() | |
} | |
, | |
Ar.beforeinput = function(e, t) { | |
var n, i, r; | |
if ("insertReplacementText" == t.inputType && e.observer.editContext) { | |
var o = null === (n = t.dataTransfer) || void 0 === n ? void 0 : n.getData("text/plain") | |
, a = t.getTargetRanges(); | |
if (o && a.length) { | |
var s = a[0] | |
, l = e.posAtDOM(s.startContainer, s.startOffset) | |
, c = e.posAtDOM(s.endContainer, s.endOffset); | |
return wr(e, { | |
from: l, | |
to: c, | |
insert: e.state.toText(o) | |
}, null), | |
!0 | |
} | |
} | |
if (kn.chrome && kn.android && (r = Er.find((function(e) { | |
return e.inputType == t.inputType | |
} | |
))) && (e.observer.delayAndroidKey(r.key, r.keyCode), | |
"Backspace" == r.key || "Delete" == r.key)) { | |
var u = (null === (i = window.visualViewport) || void 0 === i ? void 0 : i.height) || 0; | |
setTimeout((function() { | |
var t; | |
((null === (t = window.visualViewport) || void 0 === t ? void 0 : t.height) || 0) > u + 10 && e.hasFocus && (e.contentDOM.blur(), | |
e.focus()) | |
} | |
), 100) | |
} | |
return kn.ios && "deleteContentForward" == t.inputType && e.observer.flushSoon(), | |
kn.safari && "insertText" == t.inputType && e.inputState.composing >= 0 && setTimeout((function() { | |
return Lr.compositionend(e, t) | |
} | |
), 20), | |
!1 | |
} | |
; | |
var Yr = new Set; | |
var Zr = ["pre-wrap", "normal", "pre-line", "break-spaces"] | |
, Xr = !1; | |
function $r() { | |
Xr = !1 | |
} | |
var Qr = function() { | |
function e(e) { | |
this.lineWrapping = e, | |
this.doc = q.empty, | |
this.heightSamples = {}, | |
this.lineHeight = 14, | |
this.charWidth = 7, | |
this.textHeight = 14, | |
this.lineLength = 30 | |
} | |
return e.prototype.heightForGap = function(e, t) { | |
var n = this.doc.lineAt(t).number - this.doc.lineAt(e).number + 1; | |
return this.lineWrapping && (n += Math.max(0, Math.ceil((t - e - n * this.lineLength * .5) / this.lineLength))), | |
this.lineHeight * n | |
} | |
, | |
e.prototype.heightForLine = function(e) { | |
return this.lineWrapping ? (1 + Math.max(0, Math.ceil((e - this.lineLength) / (this.lineLength - 5)))) * this.lineHeight : this.lineHeight | |
} | |
, | |
e.prototype.setDoc = function(e) { | |
return this.doc = e, | |
this | |
} | |
, | |
e.prototype.mustRefreshForWrapping = function(e) { | |
return Zr.indexOf(e) > -1 != this.lineWrapping | |
} | |
, | |
e.prototype.mustRefreshForHeights = function(e) { | |
for (var t = !1, n = 0; n < e.length; n++) { | |
var i = e[n]; | |
i < 0 ? n++ : this.heightSamples[Math.floor(10 * i)] || (t = !0, | |
this.heightSamples[Math.floor(10 * i)] = !0) | |
} | |
return t | |
} | |
, | |
e.prototype.refresh = function(e, t, n, i, r, o) { | |
var a = Zr.indexOf(e) > -1 | |
, s = Math.round(t) != Math.round(this.lineHeight) || this.lineWrapping != a; | |
if (this.lineWrapping = a, | |
this.lineHeight = t, | |
this.charWidth = n, | |
this.textHeight = i, | |
this.lineLength = r, | |
s) { | |
this.heightSamples = {}; | |
for (var l = 0; l < o.length; l++) { | |
var c = o[l]; | |
c < 0 ? l++ : this.heightSamples[Math.floor(10 * c)] = !0 | |
} | |
} | |
return s | |
} | |
, | |
e | |
}() | |
, Jr = function() { | |
function e(e, t) { | |
this.from = e, | |
this.heights = t, | |
this.index = 0 | |
} | |
return Object.defineProperty(e.prototype, "more", { | |
get: function() { | |
return this.index < this.heights.length | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
e | |
}() | |
, eo = function() { | |
function e(e, t, n, i, r) { | |
this.from = e, | |
this.length = t, | |
this.top = n, | |
this.height = i, | |
this._content = r | |
} | |
return Object.defineProperty(e.prototype, "type", { | |
get: function() { | |
return "number" == typeof this._content ? Bn.Text : Array.isArray(this._content) ? this._content : this._content.type | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
Object.defineProperty(e.prototype, "to", { | |
get: function() { | |
return this.from + this.length | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
Object.defineProperty(e.prototype, "bottom", { | |
get: function() { | |
return this.top + this.height | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
Object.defineProperty(e.prototype, "widget", { | |
get: function() { | |
return this._content instanceof Vn ? this._content.widget : null | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
Object.defineProperty(e.prototype, "widgetLineBreaks", { | |
get: function() { | |
return "number" == typeof this._content ? this._content : 0 | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
e.prototype.join = function(t) { | |
var n = (Array.isArray(this._content) ? this._content : [this]).concat(Array.isArray(t._content) ? t._content : [t]); | |
return new e(this.from,this.length + t.length,this.top,this.height + t.height,n) | |
} | |
, | |
e | |
}() | |
, to = function(e) { | |
return e[e.ByPos = 0] = "ByPos", | |
e[e.ByHeight = 1] = "ByHeight", | |
e[e.ByPosNoHeight = 2] = "ByPosNoHeight", | |
e | |
}(to || (to = {})) | |
, no = .001 | |
, io = function() { | |
function e(e, t, n) { | |
void 0 === n && (n = 2), | |
this.length = e, | |
this.height = t, | |
this.flags = n | |
} | |
return Object.defineProperty(e.prototype, "outdated", { | |
get: function() { | |
return (2 & this.flags) > 0 | |
}, | |
set: function(e) { | |
this.flags = (e ? 2 : 0) | -3 & this.flags | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
e.prototype.setHeight = function(e) { | |
this.height != e && (Math.abs(this.height - e) > no && (Xr = !0), | |
this.height = e) | |
} | |
, | |
e.prototype.replace = function(t, n, i) { | |
return e.of(i) | |
} | |
, | |
e.prototype.decomposeLeft = function(e, t) { | |
t.push(this) | |
} | |
, | |
e.prototype.decomposeRight = function(e, t) { | |
t.push(this) | |
} | |
, | |
e.prototype.applyChanges = function(e, t, n, i) { | |
for (var r = this, o = n.doc, a = i.length - 1; a >= 0; a--) { | |
var s = i[a] | |
, l = s.fromA | |
, c = s.toA | |
, u = s.fromB | |
, h = s.toB | |
, d = r.lineAt(l, to.ByPosNoHeight, n.setDoc(t), 0, 0) | |
, p = d.to >= c ? d : r.lineAt(c, to.ByPosNoHeight, n, 0, 0); | |
for (h += p.to - c, | |
c = p.to; a > 0 && d.from <= i[a - 1].toA; ) | |
l = i[a - 1].fromA, | |
u = i[a - 1].fromB, | |
a--, | |
l < d.from && (d = r.lineAt(l, to.ByPosNoHeight, n, 0, 0)); | |
u += d.from - l, | |
l = d.from; | |
var f = uo.build(n.setDoc(o), e, u, h); | |
r = ro(r, r.replace(l, c, f)) | |
} | |
return r.updateHeight(n, 0) | |
} | |
, | |
e.empty = function() { | |
return new ao(0,0) | |
} | |
, | |
e.of = function(t) { | |
if (1 == t.length) | |
return t[0]; | |
for (var n = 0, i = t.length, r = 0, o = 0; ; ) | |
if (n == i) | |
if (r > 2 * o) { | |
(a = t[n - 1]).break ? t.splice(--n, 1, a.left, null, a.right) : t.splice(--n, 1, a.left, a.right), | |
i += 1 + a.break, | |
r -= a.size | |
} else { | |
if (!(o > 2 * r)) | |
break; | |
var a; | |
(a = t[i]).break ? t.splice(i, 1, a.left, null, a.right) : t.splice(i, 1, a.left, a.right), | |
i += 2 + a.break, | |
o -= a.size | |
} | |
else if (r < o) { | |
(s = t[n++]) && (r += s.size) | |
} else { | |
var s; | |
(s = t[--i]) && (o += s.size) | |
} | |
var l = 0; | |
return null == t[n - 1] ? (l = 1, | |
n--) : null == t[n] && (l = 1, | |
i++), | |
new lo(e.of(t.slice(0, n)),l,e.of(t.slice(i))) | |
} | |
, | |
e | |
}(); | |
function ro(e, t) { | |
return e == t ? e : (e.constructor != t.constructor && (Xr = !0), | |
t) | |
} | |
io.prototype.size = 1; | |
var oo = function(e) { | |
function t(t, n, i) { | |
var r = e.call(this, t, n) || this; | |
return r.deco = i, | |
r | |
} | |
return f(t, e), | |
t.prototype.blockAt = function(e, t, n, i) { | |
return new eo(i,this.length,n,this.height,this.deco || 0) | |
} | |
, | |
t.prototype.lineAt = function(e, t, n, i, r) { | |
return this.blockAt(0, n, i, r) | |
} | |
, | |
t.prototype.forEachLine = function(e, t, n, i, r, o) { | |
e <= r + this.length && t >= r && o(this.blockAt(0, n, i, r)) | |
} | |
, | |
t.prototype.updateHeight = function(e, t, n, i) { | |
return void 0 === t && (t = 0), | |
void 0 === n && (n = !1), | |
i && i.from <= t && i.more && this.setHeight(i.heights[i.index++]), | |
this.outdated = !1, | |
this | |
} | |
, | |
t.prototype.toString = function() { | |
return "block(".concat(this.length, ")") | |
} | |
, | |
t | |
}(io) | |
, ao = function(e) { | |
function t(t, n) { | |
var i = e.call(this, t, n, null) || this; | |
return i.collapsed = 0, | |
i.widgetHeight = 0, | |
i.breaks = 0, | |
i | |
} | |
return f(t, e), | |
t.prototype.blockAt = function(e, t, n, i) { | |
return new eo(i,this.length,n,this.height,this.breaks) | |
} | |
, | |
t.prototype.replace = function(e, n, i) { | |
var r = i[0]; | |
return 1 == i.length && (r instanceof t || r instanceof so && 4 & r.flags) && Math.abs(this.length - r.length) < 10 ? (r instanceof so ? r = new t(r.length,this.height) : r.height = this.height, | |
this.outdated || (r.outdated = !1), | |
r) : io.of(i) | |
} | |
, | |
t.prototype.updateHeight = function(e, t, n, i) { | |
return void 0 === t && (t = 0), | |
void 0 === n && (n = !1), | |
i && i.from <= t && i.more ? this.setHeight(i.heights[i.index++]) : (n || this.outdated) && this.setHeight(Math.max(this.widgetHeight, e.heightForLine(this.length - this.collapsed)) + this.breaks * e.lineHeight), | |
this.outdated = !1, | |
this | |
} | |
, | |
t.prototype.toString = function() { | |
return "line(".concat(this.length).concat(this.collapsed ? -this.collapsed : "").concat(this.widgetHeight ? ":" + this.widgetHeight : "", ")") | |
} | |
, | |
t | |
}(oo) | |
, so = function(e) { | |
function t(t) { | |
return e.call(this, t, 0) || this | |
} | |
return f(t, e), | |
t.prototype.heightMetrics = function(e, t) { | |
var n, i = e.doc.lineAt(t).number, r = e.doc.lineAt(t + this.length).number, o = r - i + 1, a = 0; | |
if (e.lineWrapping) { | |
var s = Math.min(this.height, e.lineHeight * o); | |
n = s / o, | |
this.length > o + 1 && (a = (this.height - s) / (this.length - o - 1)) | |
} else | |
n = this.height / o; | |
return { | |
firstLine: i, | |
lastLine: r, | |
perLine: n, | |
perChar: a | |
} | |
} | |
, | |
t.prototype.blockAt = function(e, t, n, i) { | |
var r = this.heightMetrics(t, i) | |
, o = r.firstLine | |
, a = r.lastLine | |
, s = r.perLine | |
, l = r.perChar; | |
if (t.lineWrapping) { | |
var c = i + (e < t.lineHeight ? 0 : Math.round(Math.max(0, Math.min(1, (e - n) / this.height)) * this.length)) | |
, u = s + (d = t.doc.lineAt(c)).length * l | |
, h = Math.max(n, e - u / 2); | |
return new eo(d.from,d.length,h,u,0) | |
} | |
var d = Math.max(0, Math.min(a - o, Math.floor((e - n) / s))) | |
, p = t.doc.line(o + d) | |
, f = p.from | |
, m = p.length; | |
return new eo(f,m,n + s * d,s,0) | |
} | |
, | |
t.prototype.lineAt = function(e, t, n, i, r) { | |
if (t == to.ByHeight) | |
return this.blockAt(e, n, i, r); | |
if (t == to.ByPosNoHeight) { | |
var o = n.doc.lineAt(e) | |
, a = o.from | |
, s = o.to; | |
return new eo(a,s - a,0,0,0) | |
} | |
var l = this.heightMetrics(n, r) | |
, c = l.firstLine | |
, u = l.perLine | |
, h = l.perChar | |
, d = n.doc.lineAt(e) | |
, p = u + d.length * h | |
, f = d.number - c | |
, m = i + u * f + h * (d.from - r - f); | |
return new eo(d.from,d.length,Math.max(i, Math.min(m, i + this.height - p)),p,0) | |
} | |
, | |
t.prototype.forEachLine = function(e, t, n, i, r, o) { | |
e = Math.max(e, r), | |
t = Math.min(t, r + this.length); | |
for (var a = this.heightMetrics(n, r), s = a.firstLine, l = a.perLine, c = a.perChar, u = e, h = i; u <= t; ) { | |
var d = n.doc.lineAt(u); | |
if (u == e) { | |
var p = d.number - s; | |
h += l * p + c * (e - r - p) | |
} | |
var f = l + c * d.length; | |
o(new eo(d.from,d.length,h,f,0)), | |
h += f, | |
u = d.to + 1 | |
} | |
} | |
, | |
t.prototype.replace = function(e, n, i) { | |
var r = this.length - n; | |
if (r > 0) { | |
var o = i[i.length - 1]; | |
o instanceof t ? i[i.length - 1] = new t(o.length + r) : i.push(null, new t(r - 1)) | |
} | |
if (e > 0) { | |
var a = i[0]; | |
a instanceof t ? i[0] = new t(e + a.length) : i.unshift(new t(e - 1), null) | |
} | |
return io.of(i) | |
} | |
, | |
t.prototype.decomposeLeft = function(e, n) { | |
n.push(new t(e - 1), null) | |
} | |
, | |
t.prototype.decomposeRight = function(e, n) { | |
n.push(null, new t(this.length - e - 1)) | |
} | |
, | |
t.prototype.updateHeight = function(e, n, i, r) { | |
void 0 === n && (n = 0), | |
void 0 === i && (i = !1); | |
var o = n + this.length; | |
if (r && r.from <= n + this.length && r.more) { | |
var a = [] | |
, s = Math.max(n, r.from) | |
, l = -1; | |
for (r.from > n && a.push(new t(r.from - n - 1).updateHeight(e, n)); s <= o && r.more; ) { | |
var c = e.doc.lineAt(s).length; | |
a.length && a.push(null); | |
var u = r.heights[r.index++]; | |
-1 == l ? l = u : Math.abs(u - l) >= no && (l = -2); | |
var h = new ao(c,u); | |
h.outdated = !1, | |
a.push(h), | |
s += c + 1 | |
} | |
s <= o && a.push(null, new t(o - s).updateHeight(e, s)); | |
var d = io.of(a); | |
return (l < 0 || Math.abs(d.height - this.height) >= no || Math.abs(l - this.heightMetrics(e, n).perLine) >= no) && (Xr = !0), | |
ro(this, d) | |
} | |
return (i || this.outdated) && (this.setHeight(e.heightForGap(n, n + this.length)), | |
this.outdated = !1), | |
this | |
} | |
, | |
t.prototype.toString = function() { | |
return "gap(".concat(this.length, ")") | |
} | |
, | |
t | |
}(io) | |
, lo = function(e) { | |
function t(t, n, i) { | |
var r = e.call(this, t.length + n + i.length, t.height + i.height, n | (t.outdated || i.outdated ? 2 : 0)) || this; | |
return r.left = t, | |
r.right = i, | |
r.size = t.size + i.size, | |
r | |
} | |
return f(t, e), | |
Object.defineProperty(t.prototype, "break", { | |
get: function() { | |
return 1 & this.flags | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
t.prototype.blockAt = function(e, t, n, i) { | |
var r = n + this.left.height; | |
return e < r ? this.left.blockAt(e, t, n, i) : this.right.blockAt(e, t, r, i + this.left.length + this.break) | |
} | |
, | |
t.prototype.lineAt = function(e, t, n, i, r) { | |
var o = i + this.left.height | |
, a = r + this.left.length + this.break | |
, s = t == to.ByHeight ? e < o : e < a | |
, l = s ? this.left.lineAt(e, t, n, i, r) : this.right.lineAt(e, t, n, o, a); | |
if (this.break || (s ? l.to < a : l.from > a)) | |
return l; | |
var c = t == to.ByPosNoHeight ? to.ByPosNoHeight : to.ByPos; | |
return s ? l.join(this.right.lineAt(a, c, n, o, a)) : this.left.lineAt(a, c, n, i, r).join(l) | |
} | |
, | |
t.prototype.forEachLine = function(e, t, n, i, r, o) { | |
var a = i + this.left.height | |
, s = r + this.left.length + this.break; | |
if (this.break) | |
e < s && this.left.forEachLine(e, t, n, i, r, o), | |
t >= s && this.right.forEachLine(e, t, n, a, s, o); | |
else { | |
var l = this.lineAt(s, to.ByPos, n, i, r); | |
e < l.from && this.left.forEachLine(e, l.from - 1, n, i, r, o), | |
l.to >= e && l.from <= t && o(l), | |
t > l.to && this.right.forEachLine(l.to + 1, t, n, a, s, o) | |
} | |
} | |
, | |
t.prototype.replace = function(e, t, n) { | |
var i = this.left.length + this.break; | |
if (t < i) | |
return this.balanced(this.left.replace(e, t, n), this.right); | |
if (e > this.left.length) | |
return this.balanced(this.left, this.right.replace(e - i, t - i, n)); | |
var r = []; | |
e > 0 && this.decomposeLeft(e, r); | |
for (var o = r.length, a = 0, s = n; a < s.length; a++) { | |
var l = s[a]; | |
r.push(l) | |
} | |
if (e > 0 && co(r, o - 1), | |
t < this.length) { | |
var c = r.length; | |
this.decomposeRight(t, r), | |
co(r, c) | |
} | |
return io.of(r) | |
} | |
, | |
t.prototype.decomposeLeft = function(e, t) { | |
var n = this.left.length; | |
if (e <= n) | |
return this.left.decomposeLeft(e, t); | |
t.push(this.left), | |
this.break && e >= ++n && t.push(null), | |
e > n && this.right.decomposeLeft(e - n, t) | |
} | |
, | |
t.prototype.decomposeRight = function(e, t) { | |
var n = this.left.length | |
, i = n + this.break; | |
if (e >= i) | |
return this.right.decomposeRight(e - i, t); | |
e < n && this.left.decomposeRight(e, t), | |
this.break && e < i && t.push(null), | |
t.push(this.right) | |
} | |
, | |
t.prototype.balanced = function(e, t) { | |
return e.size > 2 * t.size || t.size > 2 * e.size ? io.of(this.break ? [e, null, t] : [e, t]) : (this.left = ro(this.left, e), | |
this.right = ro(this.right, t), | |
this.setHeight(e.height + t.height), | |
this.outdated = e.outdated || t.outdated, | |
this.size = e.size + t.size, | |
this.length = e.length + this.break + t.length, | |
this) | |
} | |
, | |
t.prototype.updateHeight = function(e, t, n, i) { | |
void 0 === t && (t = 0), | |
void 0 === n && (n = !1); | |
var r = this.left | |
, o = this.right | |
, a = t + r.length + this.break | |
, s = null; | |
return i && i.from <= t + r.length && i.more ? s = r = r.updateHeight(e, t, n, i) : r.updateHeight(e, t, n), | |
i && i.from <= a + o.length && i.more ? s = o = o.updateHeight(e, a, n, i) : o.updateHeight(e, a, n), | |
s ? this.balanced(r, o) : (this.height = this.left.height + this.right.height, | |
this.outdated = !1, | |
this) | |
} | |
, | |
t.prototype.toString = function() { | |
return this.left + (this.break ? " " : "-") + this.right | |
} | |
, | |
t | |
}(io); | |
function co(e, t) { | |
var n, i; | |
null == e[t] && (n = e[t - 1])instanceof so && (i = e[t + 1])instanceof so && e.splice(t - 1, 3, new so(n.length + 1 + i.length)) | |
} | |
var uo = function() { | |
function e(e, t) { | |
this.pos = e, | |
this.oracle = t, | |
this.nodes = [], | |
this.lineStart = -1, | |
this.lineEnd = -1, | |
this.covering = null, | |
this.writtenTo = e | |
} | |
return Object.defineProperty(e.prototype, "isCovered", { | |
get: function() { | |
return this.covering && this.nodes[this.nodes.length - 1] == this.covering | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
e.prototype.span = function(e, t) { | |
if (this.lineStart > -1) { | |
var n = Math.min(t, this.lineEnd) | |
, i = this.nodes[this.nodes.length - 1]; | |
i instanceof ao ? i.length += n - this.pos : (n > this.pos || !this.isCovered) && this.nodes.push(new ao(n - this.pos,-1)), | |
this.writtenTo = n, | |
t > n && (this.nodes.push(null), | |
this.writtenTo++, | |
this.lineStart = -1) | |
} | |
this.pos = t | |
} | |
, | |
e.prototype.point = function(e, t, n) { | |
if (e < t || n.heightRelevant) { | |
var i = n.widget ? n.widget.estimatedHeight : 0 | |
, r = n.widget ? n.widget.lineBreaks : 0; | |
i < 0 && (i = this.oracle.lineHeight); | |
var o = t - e; | |
n.block ? this.addBlock(new oo(o,i,n)) : (o || r || i >= 5) && this.addLineDeco(i, r, o) | |
} else | |
t > e && this.span(e, t); | |
this.lineEnd > -1 && this.lineEnd < this.pos && (this.lineEnd = this.oracle.doc.lineAt(this.pos).to) | |
} | |
, | |
e.prototype.enterLine = function() { | |
if (!(this.lineStart > -1)) { | |
var e = this.oracle.doc.lineAt(this.pos) | |
, t = e.from | |
, n = e.to; | |
this.lineStart = t, | |
this.lineEnd = n, | |
this.writtenTo < t && ((this.writtenTo < t - 1 || null == this.nodes[this.nodes.length - 1]) && this.nodes.push(this.blankContent(this.writtenTo, t - 1)), | |
this.nodes.push(null)), | |
this.pos > t && this.nodes.push(new ao(this.pos - t,-1)), | |
this.writtenTo = this.pos | |
} | |
} | |
, | |
e.prototype.blankContent = function(e, t) { | |
var n = new so(t - e); | |
return this.oracle.doc.lineAt(e).to == t && (n.flags |= 4), | |
n | |
} | |
, | |
e.prototype.ensureLine = function() { | |
this.enterLine(); | |
var e = this.nodes.length ? this.nodes[this.nodes.length - 1] : null; | |
if (e instanceof ao) | |
return e; | |
var t = new ao(0,-1); | |
return this.nodes.push(t), | |
t | |
} | |
, | |
e.prototype.addBlock = function(e) { | |
this.enterLine(); | |
var t = e.deco; | |
t && t.startSide > 0 && !this.isCovered && this.ensureLine(), | |
this.nodes.push(e), | |
this.writtenTo = this.pos = this.pos + e.length, | |
t && t.endSide > 0 && (this.covering = e) | |
} | |
, | |
e.prototype.addLineDeco = function(e, t, n) { | |
var i = this.ensureLine(); | |
i.length += n, | |
i.collapsed += n, | |
i.widgetHeight = Math.max(i.widgetHeight, e), | |
i.breaks += t, | |
this.writtenTo = this.pos = this.pos + n | |
} | |
, | |
e.prototype.finish = function(e) { | |
var t = 0 == this.nodes.length ? null : this.nodes[this.nodes.length - 1]; | |
!(this.lineStart > -1) || t instanceof ao || this.isCovered ? (this.writtenTo < this.pos || null == t) && this.nodes.push(this.blankContent(this.writtenTo, this.pos)) : this.nodes.push(new ao(0,-1)); | |
for (var n = e, i = 0, r = this.nodes; i < r.length; i++) { | |
var o = r[i]; | |
o instanceof ao && o.updateHeight(this.oracle, n), | |
n += o ? o.length : 1 | |
} | |
return this.nodes | |
} | |
, | |
e.build = function(t, n, i, r) { | |
var o = new e(i,t); | |
return lt.spans(n, i, r, o, 0), | |
o.finish(i) | |
} | |
, | |
e | |
}(); | |
var ho = function() { | |
function e() { | |
this.changes = [] | |
} | |
return e.prototype.compareRange = function() {} | |
, | |
e.prototype.comparePoint = function(e, t, n, i) { | |
(e < t || n && n.heightRelevant || i && i.heightRelevant) && qn(e, t, this.changes, 5) | |
} | |
, | |
e | |
}(); | |
function po(e, t) { | |
for (var n = e.getBoundingClientRect(), i = e.ownerDocument, r = i.defaultView || window, o = Math.max(0, n.left), a = Math.min(r.innerWidth, n.right), s = Math.max(0, n.top), l = Math.min(r.innerHeight, n.bottom), c = e.parentNode; c && c != i.body; ) | |
if (1 == c.nodeType) { | |
var u = c | |
, h = window.getComputedStyle(u); | |
if ((u.scrollHeight > u.clientHeight || u.scrollWidth > u.clientWidth) && "visible" != h.overflow) { | |
var d = u.getBoundingClientRect(); | |
o = Math.max(o, d.left), | |
a = Math.min(a, d.right), | |
s = Math.max(s, d.top), | |
l = Math.min(c == e.parentNode ? r.innerHeight : l, d.bottom) | |
} | |
c = "absolute" == h.position || "fixed" == h.position ? u.offsetParent : u.parentNode | |
} else { | |
if (11 != c.nodeType) | |
break; | |
c = c.host | |
} | |
return { | |
left: o - n.left, | |
right: Math.max(o, a) - n.left, | |
top: s - (n.top + t), | |
bottom: Math.max(s, l) - (n.top + t) | |
} | |
} | |
function fo(e, t) { | |
var n = e.getBoundingClientRect(); | |
return { | |
left: 0, | |
right: n.right - n.left, | |
top: t, | |
bottom: n.bottom - (n.top + t) | |
} | |
} | |
var mo = function() { | |
function e(e, t, n, i) { | |
this.from = e, | |
this.to = t, | |
this.size = n, | |
this.displaySize = i | |
} | |
return e.same = function(e, t) { | |
if (e.length != t.length) | |
return !1; | |
for (var n = 0; n < e.length; n++) { | |
var i = e[n] | |
, r = t[n]; | |
if (i.from != r.from || i.to != r.to || i.size != r.size) | |
return !1 | |
} | |
return !0 | |
} | |
, | |
e.prototype.draw = function(e, t) { | |
return Nn.replace({ | |
widget: new vo(this.displaySize * (t ? e.scaleY : e.scaleX),t) | |
}).range(this.from, this.to) | |
} | |
, | |
e | |
}() | |
, vo = function(e) { | |
function t(t, n) { | |
var i = e.call(this) || this; | |
return i.size = t, | |
i.vertical = n, | |
i | |
} | |
return f(t, e), | |
t.prototype.eq = function(e) { | |
return e.size == this.size && e.vertical == this.vertical | |
} | |
, | |
t.prototype.toDOM = function() { | |
var e = document.createElement("div"); | |
return this.vertical ? e.style.height = this.size + "px" : (e.style.width = this.size + "px", | |
e.style.height = "2px", | |
e.style.display = "inline-block"), | |
e | |
} | |
, | |
Object.defineProperty(t.prototype, "estimatedHeight", { | |
get: function() { | |
return this.vertical ? this.size : -1 | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
t | |
}(On) | |
, go = function() { | |
function e(e) { | |
var t = this; | |
this.state = e, | |
this.pixelViewport = { | |
left: 0, | |
right: window.innerWidth, | |
top: 0, | |
bottom: 0 | |
}, | |
this.inView = !0, | |
this.paddingTop = 0, | |
this.paddingBottom = 0, | |
this.contentDOMWidth = 0, | |
this.contentDOMHeight = 0, | |
this.editorHeight = 0, | |
this.editorWidth = 0, | |
this.scrollTop = 0, | |
this.scrolledToBottom = !1, | |
this.scaleX = 1, | |
this.scaleY = 1, | |
this.scrollAnchorPos = 0, | |
this.scrollAnchorHeight = -1, | |
this.scaler = ko, | |
this.scrollTarget = null, | |
this.printing = !1, | |
this.mustMeasureContent = !0, | |
this.defaultTextDirection = Yn.LTR, | |
this.visibleRanges = [], | |
this.mustEnforceCursorAssoc = !1; | |
var n = e.facet(qi).some((function(e) { | |
return "function" != typeof e && "cm-lineWrapping" == e.class | |
} | |
)); | |
this.heightOracle = new Qr(n), | |
this.stateDeco = e.facet(Ui).filter((function(e) { | |
return "function" != typeof e | |
} | |
)), | |
this.heightMap = io.empty().applyChanges(this.stateDeco, q.empty, this.heightOracle.setDoc(e.doc), [new Xi(0,0,0,e.doc.length)]); | |
for (var i = 0; i < 2 && (this.viewport = this.getViewport(0, null), | |
this.updateForViewport()); i++) | |
; | |
this.updateViewportLines(), | |
this.lineGaps = this.ensureLineGaps([]), | |
this.lineGapDeco = Nn.set(this.lineGaps.map((function(e) { | |
return e.draw(t, !1) | |
} | |
))), | |
this.computeVisibleRanges() | |
} | |
return e.prototype.updateForViewport = function() { | |
for (var e = [this.viewport], t = this.state.selection.main, n = function(n) { | |
var r = n ? t.head : t.anchor; | |
if (!e.some((function(e) { | |
var t = e.from | |
, n = e.to; | |
return r >= t && r <= n | |
} | |
))) { | |
var o = i.lineBlockAt(r) | |
, a = o.from | |
, s = o.to; | |
e.push(new yo(a,s)) | |
} | |
}, i = this, r = 0; r <= 1; r++) | |
n(r); | |
return this.viewports = e.sort((function(e, t) { | |
return e.from - t.from | |
} | |
)), | |
this.updateScaler() | |
} | |
, | |
e.prototype.updateScaler = function() { | |
var e = this.scaler; | |
return this.scaler = this.heightMap.height <= 7e6 ? ko : new Co(this.heightOracle,this.heightMap,this.viewports), | |
e.eq(this.scaler) ? 0 : 2 | |
} | |
, | |
e.prototype.updateViewportLines = function() { | |
var e = this; | |
this.viewportLines = [], | |
this.heightMap.forEachLine(this.viewport.from, this.viewport.to, this.heightOracle.setDoc(this.state.doc), 0, 0, (function(t) { | |
e.viewportLines.push(Mo(t, e.scaler)) | |
} | |
)) | |
} | |
, | |
e.prototype.update = function(e, t) { | |
void 0 === t && (t = null), | |
this.state = e.state; | |
var n = this.stateDeco; | |
this.stateDeco = this.state.facet(Ui).filter((function(e) { | |
return "function" != typeof e | |
} | |
)); | |
var i, r, o, a, s = e.changedRanges, l = Xi.extendWithRanges(s, (i = n, | |
r = this.stateDeco, | |
o = e ? e.changes : re.empty(this.state.doc.length), | |
a = new ho, | |
lt.compare(i, r, o, a, 0), | |
a.changes)), c = this.heightMap.height, u = this.scrolledToBottom ? null : this.scrollAnchorAt(this.scrollTop); | |
$r(), | |
this.heightMap = this.heightMap.applyChanges(this.stateDeco, e.startState.doc, this.heightOracle.setDoc(this.state.doc), l), | |
(this.heightMap.height != c || Xr) && (e.flags |= 2), | |
u ? (this.scrollAnchorPos = e.changes.mapPos(u.from, -1), | |
this.scrollAnchorHeight = u.top) : (this.scrollAnchorPos = -1, | |
this.scrollAnchorHeight = this.heightMap.height); | |
var h = l.length ? this.mapViewport(this.viewport, e.changes) : this.viewport; | |
(t && (t.range.head < h.from || t.range.head > h.to) || !this.viewportIsAppropriate(h)) && (h = this.getViewport(0, t)); | |
var d = h.from != this.viewport.from || h.to != this.viewport.to; | |
this.viewport = h, | |
e.flags |= this.updateForViewport(), | |
(d || !e.changes.empty || 2 & e.flags) && this.updateViewportLines(), | |
(this.lineGaps.length || this.viewport.to - this.viewport.from > 4e3) && this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps, e.changes))), | |
e.flags |= this.computeVisibleRanges(e.changes), | |
t && (this.scrollTarget = t), | |
!this.mustEnforceCursorAssoc && e.selectionSet && e.view.lineWrapping && e.state.selection.main.empty && e.state.selection.main.assoc && !e.state.facet(Ai) && (this.mustEnforceCursorAssoc = !0) | |
} | |
, | |
e.prototype.measure = function(e) { | |
var t = e.contentDOM | |
, n = window.getComputedStyle(t) | |
, i = this.heightOracle | |
, r = n.whiteSpace; | |
this.defaultTextDirection = "rtl" == n.direction ? Yn.RTL : Yn.LTR; | |
var o = this.heightOracle.mustRefreshForWrapping(r) | |
, a = t.getBoundingClientRect() | |
, s = o || this.mustMeasureContent || this.contentDOMHeight != a.height; | |
this.contentDOMHeight = a.height, | |
this.mustMeasureContent = !1; | |
var l = 0 | |
, c = 0; | |
if (a.width && a.height) { | |
var u = jt(t, a) | |
, h = u.scaleX | |
, d = u.scaleY; | |
(h > .005 && Math.abs(this.scaleX - h) > .005 || d > .005 && Math.abs(this.scaleY - d) > .005) && (this.scaleX = h, | |
this.scaleY = d, | |
l |= 16, | |
o = s = !0) | |
} | |
var p = (parseInt(n.paddingTop) || 0) * this.scaleY | |
, f = (parseInt(n.paddingBottom) || 0) * this.scaleY; | |
this.paddingTop == p && this.paddingBottom == f || (this.paddingTop = p, | |
this.paddingBottom = f, | |
l |= 18), | |
this.editorWidth != e.scrollDOM.clientWidth && (i.lineWrapping && (s = !0), | |
this.editorWidth = e.scrollDOM.clientWidth, | |
l |= 16); | |
var m = e.scrollDOM.scrollTop * this.scaleY; | |
this.scrollTop != m && (this.scrollAnchorHeight = -1, | |
this.scrollTop = m), | |
this.scrolledToBottom = Jt(e.scrollDOM); | |
var v = (this.printing ? fo : po)(t, this.paddingTop) | |
, g = v.top - this.pixelViewport.top | |
, y = v.bottom - this.pixelViewport.bottom; | |
this.pixelViewport = v; | |
var b = this.pixelViewport.bottom > this.pixelViewport.top && this.pixelViewport.right > this.pixelViewport.left; | |
if (b != this.inView && (this.inView = b, | |
b && (s = !0)), | |
!this.inView) | |
return 0; | |
var w = a.width; | |
if (this.contentDOMWidth == w && this.editorHeight == e.scrollDOM.clientHeight || (this.contentDOMWidth = a.width, | |
this.editorHeight = e.scrollDOM.clientHeight, | |
l |= 16), | |
s) { | |
var k = e.docView.measureVisibleLineHeights(this.viewport); | |
if (i.mustRefreshForHeights(k) && (o = !0), | |
o || i.lineWrapping && Math.abs(w - this.contentDOMWidth) > i.charWidth) { | |
var C = e.docView.measureTextSize() | |
, M = C.lineHeight | |
, E = C.charWidth | |
, S = C.textHeight; | |
(o = M > 0 && i.refresh(r, M, E, S, w / E, k)) && (e.docView.minWidth = 0, | |
l |= 16) | |
} | |
g > 0 && y > 0 ? c = Math.max(g, y) : g < 0 && y < 0 && (c = Math.min(g, y)), | |
$r(); | |
for (var x = 0, T = this.viewports; x < T.length; x++) { | |
var D = T[x] | |
, A = D.from == this.viewport.from ? k : e.docView.measureVisibleLineHeights(D); | |
this.heightMap = (o ? io.empty().applyChanges(this.stateDeco, q.empty, this.heightOracle, [new Xi(0,0,0,e.state.doc.length)]) : this.heightMap).updateHeight(i, 0, o, new Jr(D.from,A)) | |
} | |
Xr && (l |= 2) | |
} | |
var L = !this.viewportIsAppropriate(this.viewport, c) || this.scrollTarget && (this.scrollTarget.range.head < this.viewport.from || this.scrollTarget.range.head > this.viewport.to); | |
return L && (2 & l && (l |= this.updateScaler()), | |
this.viewport = this.getViewport(c, this.scrollTarget), | |
l |= this.updateForViewport()), | |
(2 & l || L) && this.updateViewportLines(), | |
(this.lineGaps.length || this.viewport.to - this.viewport.from > 4e3) && this.updateLineGaps(this.ensureLineGaps(o ? [] : this.lineGaps, e)), | |
l |= this.computeVisibleRanges(), | |
this.mustEnforceCursorAssoc && (this.mustEnforceCursorAssoc = !1, | |
e.docView.enforceCursorAssoc()), | |
l | |
} | |
, | |
Object.defineProperty(e.prototype, "visibleTop", { | |
get: function() { | |
return this.scaler.fromDOM(this.pixelViewport.top) | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
Object.defineProperty(e.prototype, "visibleBottom", { | |
get: function() { | |
return this.scaler.fromDOM(this.pixelViewport.bottom) | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
e.prototype.getViewport = function(e, t) { | |
var n = .5 - Math.max(-.5, Math.min(.5, e / 1e3 / 2)) | |
, i = this.heightMap | |
, r = this.heightOracle | |
, o = this.visibleTop | |
, a = this.visibleBottom | |
, s = new yo(i.lineAt(o - 1e3 * n, to.ByHeight, r, 0, 0).from,i.lineAt(a + 1e3 * (1 - n), to.ByHeight, r, 0, 0).to); | |
if (t) { | |
var l = t.range.head; | |
if (l < s.from || l > s.to) { | |
var c = Math.min(this.editorHeight, this.pixelViewport.bottom - this.pixelViewport.top) | |
, u = i.lineAt(l, to.ByPos, r, 0, 0) | |
, h = void 0; | |
h = "center" == t.y ? (u.top + u.bottom) / 2 - c / 2 : "start" == t.y || "nearest" == t.y && l < s.from ? u.top : u.bottom - c, | |
s = new yo(i.lineAt(h - 500, to.ByHeight, r, 0, 0).from,i.lineAt(h + c + 500, to.ByHeight, r, 0, 0).to) | |
} | |
} | |
return s | |
} | |
, | |
e.prototype.mapViewport = function(e, t) { | |
var n = t.mapPos(e.from, -1) | |
, i = t.mapPos(e.to, 1); | |
return new yo(this.heightMap.lineAt(n, to.ByPos, this.heightOracle, 0, 0).from,this.heightMap.lineAt(i, to.ByPos, this.heightOracle, 0, 0).to) | |
} | |
, | |
e.prototype.viewportIsAppropriate = function(e, t) { | |
var n = e.from | |
, i = e.to; | |
if (void 0 === t && (t = 0), | |
!this.inView) | |
return !0; | |
var r = this.heightMap.lineAt(n, to.ByPos, this.heightOracle, 0, 0).top | |
, o = this.heightMap.lineAt(i, to.ByPos, this.heightOracle, 0, 0).bottom | |
, a = this.visibleTop | |
, s = this.visibleBottom; | |
return (0 == n || r <= a - Math.max(10, Math.min(-t, 250))) && (i == this.state.doc.length || o >= s + Math.max(10, Math.min(t, 250))) && r > a - 2e3 && o < s + 2e3 | |
} | |
, | |
e.prototype.mapLineGaps = function(e, t) { | |
if (!e.length || t.empty) | |
return e; | |
for (var n = [], i = 0, r = e; i < r.length; i++) { | |
var o = r[i]; | |
t.touchesRange(o.from, o.to) || n.push(new mo(t.mapPos(o.from),t.mapPos(o.to),o.size,o.displaySize)) | |
} | |
return n | |
} | |
, | |
e.prototype.ensureLineGaps = function(e, t) { | |
var n = this | |
, i = this.heightOracle.lineWrapping | |
, r = i ? 1e4 : 2e3 | |
, o = r >> 1 | |
, a = r << 1; | |
if (this.defaultTextDirection != Yn.LTR && !i) | |
return []; | |
for (var s = [], l = function(r, a, c, u) { | |
if (!(a - r < o)) { | |
var h = n.state.selection.main | |
, d = [h.from]; | |
h.empty || d.push(h.to); | |
for (var p = 0, f = d; p < f.length; p++) { | |
var m = f[p]; | |
if (m > r && m < a) | |
return l(r, m - 10, c, u), | |
void l(m + 10, a, c, u) | |
} | |
var v = function(e, t) { | |
for (var n = 0, i = e; n < i.length; n++) { | |
var r = i[n]; | |
if (t(r)) | |
return r | |
} | |
return | |
}(e, (function(e) { | |
return e.from >= c.from && e.to <= c.to && Math.abs(e.from - r) < o && Math.abs(e.to - a) < o && !d.some((function(t) { | |
return e.from < t && e.to > t | |
} | |
)) | |
} | |
)); | |
if (!v) { | |
if (a < c.to && t && i && t.visibleRanges.some((function(e) { | |
return e.from <= a && e.to >= a | |
} | |
))) { | |
var g = t.moveToLineBoundary(de.cursor(a), !1, !0).head; | |
g > r && (a = g) | |
} | |
var y = n.gapSize(c, r, a, u); | |
v = new mo(r,a,y,i || y < 2e6 ? y : 2e6) | |
} | |
s.push(v) | |
} | |
}, c = function(t) { | |
if (!(t.length < a || t.type != Bn.Text)) { | |
var o = function(e, t, n) { | |
var i = [] | |
, r = e | |
, o = 0; | |
lt.spans(n, e, t, { | |
span: function() {}, | |
point: function(e, t) { | |
e > r && (i.push({ | |
from: r, | |
to: e | |
}), | |
o += e - r), | |
r = t | |
} | |
}, 20), | |
r < t && (i.push({ | |
from: r, | |
to: t | |
}), | |
o += t - r); | |
return { | |
total: o, | |
ranges: i | |
} | |
}(t.from, t.to, n.stateDeco); | |
if (!(o.total < a)) { | |
var s, c, u = n.scrollTarget ? n.scrollTarget.range.head : null; | |
if (i) { | |
var h = r / n.heightOracle.lineLength * n.heightOracle.lineHeight | |
, d = void 0 | |
, p = void 0; | |
if (null != u) | |
d = (w = wo(o, u)) - (k = ((n.visibleBottom - n.visibleTop) / 2 + h) / t.height), | |
p = w + k; | |
else | |
d = (n.visibleTop - t.top - h) / t.height, | |
p = (n.visibleBottom - t.top + h) / t.height; | |
s = bo(o, d), | |
c = bo(o, p) | |
} else { | |
var f = o.total * n.heightOracle.charWidth | |
, m = r * n.heightOracle.charWidth | |
, v = 0; | |
if (f > 2e6) | |
for (var g = 0, y = e; g < y.length; g++) { | |
var b = y[g]; | |
b.from >= t.from && b.from < t.to && b.size != b.displaySize && b.from * n.heightOracle.charWidth + v < n.pixelViewport.left && (v = b.size - b.displaySize) | |
} | |
var w, k, C = n.pixelViewport.left + v, M = n.pixelViewport.right + v, E = void 0, S = void 0; | |
if (null != u) | |
E = (w = wo(o, u)) - (k = ((M - C) / 2 + m) / f), | |
S = w + k; | |
else | |
E = (C - m) / f, | |
S = (M + m) / f; | |
s = bo(o, E), | |
c = bo(o, S) | |
} | |
s > t.from && l(t.from, s, t, o), | |
c < t.to && l(c, t.to, t, o) | |
} | |
} | |
}, u = 0, h = this.viewportLines; u < h.length; u++) { | |
var d = h[u]; | |
Array.isArray(d.type) ? d.type.forEach(c) : c(d) | |
} | |
return s | |
} | |
, | |
e.prototype.gapSize = function(e, t, n, i) { | |
var r = wo(i, n) - wo(i, t); | |
return this.heightOracle.lineWrapping ? e.height * r : i.total * this.heightOracle.charWidth * r | |
} | |
, | |
e.prototype.updateLineGaps = function(e) { | |
var t = this; | |
mo.same(e, this.lineGaps) || (this.lineGaps = e, | |
this.lineGapDeco = Nn.set(e.map((function(e) { | |
return e.draw(t, t.heightOracle.lineWrapping) | |
} | |
)))) | |
} | |
, | |
e.prototype.computeVisibleRanges = function(e) { | |
var t = this.stateDeco; | |
this.lineGaps.length && (t = t.concat(this.lineGapDeco)); | |
var n = []; | |
lt.spans(t, this.viewport.from, this.viewport.to, { | |
span: function(e, t) { | |
n.push({ | |
from: e, | |
to: t | |
}) | |
}, | |
point: function() {} | |
}, 20); | |
var i = 0; | |
if (n.length != this.visibleRanges.length) | |
i = 12; | |
else | |
for (var r = 0; r < n.length && !(8 & i); r++) { | |
var o = this.visibleRanges[r] | |
, a = n[r]; | |
o.from == a.from && o.to == a.to || (i |= 4, | |
e && e.mapPos(o.from, -1) == a.from && e.mapPos(o.to, 1) == a.to || (i |= 8)) | |
} | |
return this.visibleRanges = n, | |
i | |
} | |
, | |
e.prototype.lineBlockAt = function(e) { | |
return e >= this.viewport.from && e <= this.viewport.to && this.viewportLines.find((function(t) { | |
return t.from <= e && t.to >= e | |
} | |
)) || Mo(this.heightMap.lineAt(e, to.ByPos, this.heightOracle, 0, 0), this.scaler) | |
} | |
, | |
e.prototype.lineBlockAtHeight = function(e) { | |
return e >= this.viewportLines[0].top && e <= this.viewportLines[this.viewportLines.length - 1].bottom && this.viewportLines.find((function(t) { | |
return t.top <= e && t.bottom >= e | |
} | |
)) || Mo(this.heightMap.lineAt(this.scaler.fromDOM(e), to.ByHeight, this.heightOracle, 0, 0), this.scaler) | |
} | |
, | |
e.prototype.scrollAnchorAt = function(e) { | |
var t = this.lineBlockAtHeight(e + 8); | |
return t.from >= this.viewport.from || this.viewportLines[0].top - e > 200 ? t : this.viewportLines[0] | |
} | |
, | |
e.prototype.elementAtHeight = function(e) { | |
return Mo(this.heightMap.blockAt(this.scaler.fromDOM(e), this.heightOracle, 0, 0), this.scaler) | |
} | |
, | |
Object.defineProperty(e.prototype, "docHeight", { | |
get: function() { | |
return this.scaler.toDOM(this.heightMap.height) | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
Object.defineProperty(e.prototype, "contentHeight", { | |
get: function() { | |
return this.docHeight + this.paddingTop + this.paddingBottom | |
}, | |
enumerable: !1, | |
configurable: !0 | |
}), | |
e | |
}() | |
, yo = function(e, t) { | |
this.from = e, | |
this.to = t | |
}; | |
function bo(e, t) { | |
var n = e.total | |
, i = e.ranges; | |
if (t <= 0) | |
return i[0].from; | |
if (t >= 1) | |
return i[i.length - 1].to; | |
for (var r = Math.floor(n * t), o = 0; ; o++) { | |
var a = i[o] | |
, s = a.from | |
, l = a.to - s; | |
if (r <= l) | |
return s + r; | |
r -= l | |
} | |
} | |
function wo(e, t) { | |
for (var n = 0, i = 0, r = e.ranges; i < r.length; i++) { | |
var o = r[i] | |
, a = o.from | |
, s = o.to; | |
if (t <= s) { | |
n += t - a; | |
break | |
} | |
n += s - a | |
} | |
return n / e.total | |
} | |
var ko = { | |
toDOM: function(e) { | |
return e | |
}, | |
fromDOM: function(e) { | |
return e | |
}, | |
scale: 1, | |
eq: function(e) { | |
return e == this | |
} | |
} | |
, Co = function() { | |
function e(e, t, n) { | |
var i = 0 | |
, r = 0 | |
, o = 0; | |
this.viewports = n.map((function(n) { | |
var r = n.from | |
, o = n.to | |
, a = t.lineAt(r, to.ByPos, e, 0, 0).top | |
, s = t.lineAt(o, to.ByPos, e, 0, 0).bottom; | |
return i += s - a, | |
{ | |
from: r, | |
to: o, | |
top: a, | |
bottom: s, | |
domTop: 0, | |
domBottom: 0 | |
} | |
} | |
)), | |
this.scale = (7e6 - i) / (t.height - i); | |
for (var a = 0, s = this.viewports; a < s.length; a++) { | |
var l = s[a]; | |
l.domTop = o + (l.top - r) * this.scale, | |
o = l.domBottom = l.domTop + (l.bottom - l.top), | |
r = l.bottom | |
} | |
} | |
return e.prototype.toDOM = function(e) { | |
for (var t = 0, n = 0, i = 0; ; t++) { | |
var r = t < this.viewports.length ? this.viewports[t] : null; | |
if (!r || e < r.top) | |
return i + (e - n) * this.scale; | |
if (e <= r.bottom) | |
return r.domTop + (e - r.top); | |
n = r.bottom, | |
i = r.domBottom | |
} | |
} | |
, | |
e.prototype.fromDOM = function(e) { | |
for (var t = 0, n = 0, i = 0; ; t++) { | |
var r = t < this.viewports.length ? this.viewports[t] : null; | |
if (!r || e < r.domTop) | |
return n + (e - i) / this.scale; | |
if (e <= r.domBottom) | |
return r.top + (e - r.domTop); | |
n = r.bottom, | |
i = r.domBottom | |
} | |
} | |
, | |
e.prototype.eq = function(t) { | |
return t instanceof e && (this.scale == t.scale && this.viewports.length == t.viewports.length && this.viewports.every((function(e, n) { | |
return e.from == t.viewports[n].from && e.to == t.viewports[n].to | |
} | |
))) | |
} | |
, | |
e | |
}(); | |
function Mo(e, t) { | |
if (1 == t.scale) | |
return e; | |
var n = t.toDOM(e.top) | |
, i = t.toDOM(e.bottom); | |
return new eo(e.from,e.length,n,i - n,Array.isArray(e._content) ? e._content.map((function(e) { | |
return Mo(e, t) | |
} | |
)) : e._content) | |
} | |
var Eo = me.define({ | |
combine: function(e) { | |
return e.join(" ") | |
} | |
}) | |
, So = me.define({ | |
combine: function(e) { | |
return e.indexOf(!0) > -1 | |
} | |
}) | |
, xo = St.newName() | |
, To = St.newName() | |
, Do = St.newName() | |
, Ao = { | |
"&light": "." + To, | |
"&dark": "." + Do | |
}; | |
function Lo(e, t, n) { | |
return new St(t,{ | |
finish: function(t) { | |
return /&/.test(t) ? t.replace(/&\w*/, (function(t) { | |
if ("&" == t) | |
return e; | |
if (!n || !n[t]) | |
throw new RangeError("Unsupported selector: ".concat(t)); | |
return n[t] | |
} | |
)) : e + " " + t | |
} | |
}) | |
} | |
var Po = Lo("." + xo, { | |
"&": { | |
position: "relative !important", | |
boxSizing: "border-box", | |
"&.cm-focused": { | |
outline: "1px dotted #212121" | |
}, | |
display: "flex !important", | |
flexDirection: "column" | |
}, | |
".cm-scroller": { | |
display: "flex !important", | |
alignItems: "flex-start !important", | |
fontFamily: "monospace", | |
lineHeight: 1.4, | |
height: "100%", | |
overflowX: "auto", | |
position: "relative", | |
zIndex: 0, | |
overflowAnchor: "none" | |
}, | |
".cm-content": { | |
margin: 0, | |
flexGrow: 2, | |
flexShrink: 0, | |
display: "block", | |
whiteSpace: "pre", | |
wordWrap: "normal", | |
boxSizing: "border-box", | |
minHeight: "100%", | |
padding: "4px 0", | |
outline: "none", | |
"&[contenteditable=true]": { | |
WebkitUserModify: "read-write-plaintext-only" | |
} | |
}, | |
".cm-lineWrapping": { | |
whiteSpace_fallback: "pre-wrap", | |
whiteSpace: "break-spaces", | |
wordBreak: "break-word", | |
overflowWrap: "anywhere", | |
flexShrink: 1 | |
}, | |
"&light .cm-content": { | |
caretColor: "black" | |
}, | |
"&dark .cm-content": { | |
caretColor: "white" | |
}, | |
".cm-line": { | |
display: "block", | |
padding: "0 2px 0 6px" | |
}, | |
".cm-layer": { | |
position: "absolute", | |
left: 0, | |
top: 0, | |
contain: "size style", | |
"& > *": { | |
position: "absolute" | |
} | |
}, | |
"&light .cm-selectionBackground": { | |
background: "#d9d9d9" | |
}, | |
"&dark .cm-selectionBackground": { | |
background: "#222" | |
}, | |
"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground": { | |
background: "#d7d4f0" | |
}, | |
"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground": { | |
background: "#233" | |
}, | |
".cm-cursorLayer": { | |
pointerEvents: "none" | |
}, | |
"&.cm-focused > .cm-scroller > .cm-cursorLayer": { | |
animation: "steps(1) cm-blink 1.2s infinite" | |
}, | |
"@keyframes cm-blink": { | |
"0%": {}, | |
"50%": { | |
opacity: 0 | |
}, | |
"100%": {} | |
}, | |
"@keyframes cm-blink2": { | |
"0%": {}, | |
"50%": { | |
opacity: 0 | |
}, | |
"100%": {} | |
}, | |
".cm-cursor, .cm-dropCursor": { | |
borderLeft: "1.2px solid black", | |
marginLeft: "-0.6px", | |
pointerEvents: "none" | |
}, | |
".cm-cursor": { | |
display: "none" | |
}, | |
"&dark .cm-cursor": { | |
borderLeftColor: "#ddd" | |
}, | |
".cm-dropCursor": { | |
position: "absolute" | |
}, | |
"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor": { | |
display: "block" | |
}, | |
".cm-iso": { | |
unicodeBidi: "isolate" | |
}, | |
".cm-announced": { | |
position: "fixed", | |
top: "-10000px" | |
}, | |
"@media print": { | |
".cm-announced": { | |
display: "none" | |
} | |
}, | |
"&light .cm-activeLine": { | |
backgroundColor: "#cceeff44" | |
}, | |
"&dark .cm-activeLine": { | |
backgroundColor: "#99eeff33" | |
}, | |
"&light .cm-specialChar": { | |
color: "red" | |
}, | |
"&dark .cm-specialChar": { | |
color: "#f78" | |
}, | |
".cm-gutters": { | |
flexShrink: 0, | |
display: "flex", | |
height: "100%", | |
boxSizing: "border-box", | |
insetInlineStart: 0, | |
zIndex: 200 | |
}, | |
"&light .cm-gutters": { | |
backgroundColor: "#f5f5f5", | |
color: "#6c6c6c", | |
borderRight: "1px solid #ddd" | |
}, | |
"&dark .cm-gutters": { | |
backgroundColor: "#333338", | |
color: "#ccc" | |
}, | |
".cm-gutter": { | |
display: "flex !important", | |
flexDirection: "column", | |
flexShrink: 0, | |
boxSizing: "border-box", | |
minHeight: "100%", | |
overflow: "hidden" | |
}, | |
".cm-gutterElement": { | |
boxSizing: "border-box" | |
}, | |
".cm-lineNumbers .cm-gutterElement": { | |
padding: "0 3px 0 5px", | |
minWidth: "20px", | |
textAlign: "right", | |
whiteSpace: "nowrap" | |
}, | |
"&light .cm-activeLineGutter": { | |
backgroundColor: "#e2f2ff" | |
}, | |
"&dark .cm-activeLineGutter": { | |
backgroundColor: "#222227" | |
}, | |
".cm-panels": { | |
boxSizing: "border-box", | |
position: "sticky", | |
left: 0, | |
right: 0, | |
zIndex: 300 | |
}, | |
"&light .cm-panels": { | |
backgroundColor: "#f5f5f5", | |
color: "black" | |
}, | |
"&light .cm-panels-top": { | |
borderBottom: "1px solid #ddd" | |
}, | |
"&light .cm-panels-bottom": { | |
borderTop: "1px solid #ddd" | |
}, | |
"&dark .cm-panels": { | |
backgroundColor: "#333338", | |
color: "white" | |
}, | |
".cm-tab": { | |
display: "inline-block", | |
overflow: "hidden", | |
verticalAlign: "bottom" | |
}, | |
".cm-widgetBuffer": { | |
verticalAlign: "text-top", | |
height: "1em", | |
width: 0, | |
display: "inline" | |
}, | |
".cm-placeholder": { | |
color: "#888", | |
display: "inline-block", | |
verticalAlign: "top" | |
}, | |
".cm-highlightSpace": { | |
backgroundImage: "radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)", | |
backgroundPosition: "center" | |
}, | |
".cm-highlightTab": { | |
backgroundImage: 'url(\'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>\')', | |
backgroundSize: "auto 100%", | |
backgroundPosition: "right 90%", | |
backgroundRepeat: "no-repeat" | |
}, | |
".cm-trailingSpace": { | |
backgroundColor: "#ff332255" | |
}, | |
".cm-button": { | |
verticalAlign: "middle", | |
color: "inherit", | |
fontSize: "70%", | |
padding: ".2em 1em", | |
borderRadius: "1px" | |
}, | |
"&light .cm-button": { | |
backgroundImage: "linear-gradient(#eff1f5, #d9d9df)", | |
border: "1px solid #888", | |
"&:active": { | |
backgroundImage: "linear-gradient(#b4b4b4, #d0d3d6)" | |
} | |
}, | |
"&dark .cm-button": { | |
backgroundImage: "linear-gradient(#393939, #111)", | |
border: "1px solid #888", | |
"&:active": { | |
backgroundImage: "linear-gradient(#111, #333)" | |
} | |
}, | |
".cm-textfield": { | |
verticalAlign: "middle", | |
color: "inherit", | |
fontSize: "70%", | |
border: "1px solid silver", | |
padding: ".2em .5em" | |
}, | |
"&light .cm-textfield": { | |
backgroundColor: "white" | |
}, | |
"&dark .cm-textfield": { | |
border: "1px solid #555", | |
backgroundColor: "inherit" | |
} | |
}, Ao) | |
, Io = { | |
childList: !0, | |
characterData: !0, | |
subtree: !0, | |
attributes: !0, | |
characterDataOldValue: !0 | |
} | |
, Fo = kn.ie && kn.ie_version <= 11 | |
, Oo = function() { | |
function e(e) { | |
var t = this; | |
this.view = e, | |
this.active = !1, | |
this.editContext = null, | |
this.selectionRange = new Kt, | |
this.selectionChanged = !1, | |
this.delayedFlush = -1, | |
this.resizeTimeout = -1, | |
this.queue = [], | |
this.delayedAndroidKey = null, | |
this.flushingAndroidKey = -1, | |
this.lastChange = 0, | |
this.scrollTargets = [], | |
this.intersection = null, | |
this.resizeScroll = null, | |
this.intersecting = !1, | |
this.gapIntersection = null, | |
this.gaps = [], | |
this.printQuery = null, | |
this.parentCheck = -1, | |
this.dom = e.contentDOM, | |
this.observer = new MutationObserver((function(n) { | |
for (var i = 0, r = n; i < r.length; i++) { | |
var o = r[i]; | |
t.queue.push(o) | |
} | |
(kn.ie && kn.ie_version <= 11 || kn.ios && e.compositionStarted || kn.windows && kn.chrome && e.compositionStarted && !e.composing) && n.some((function(e) { | |
return "childList" == e.type && e.removedNodes.length || "characterData" == e.type | |
} | |
)) ? t.flushSoon() : t.flush() | |
} | |
)), | |
!window.EditContext || !1 === e.constructor.EDIT_CONTEXT || kn.chrome && kn.chrome_version < 126 || (this.editContext = new Ro(e), | |
e.state.facet(Bi) && (e.contentDOM.editContext = this.editContext.editContext)), | |
Fo && (this.onCharData = function(e) { | |
t.queue.push({ | |
target: e.target, | |
type: "characterData", | |
oldValue: e.prevValue | |
}), | |
t.flushSoon() | |
} | |
), | |
this.onSelectionChange = this.onSelectionChange.bind(this), | |
this.onResize = this.onResize.bind(this), | |
this.onPrint = this.onPrint.bind(this), | |
this.onScroll = this.onScroll.bind(this), | |
window.matchMedia && (this.printQuery = window.matchMedia("print")), | |
"function" == typeof ResizeObserver && (this.resizeScroll = new ResizeObserver((function() { | |
var e; | |
(null === (e = t.view.docView) || void 0 === e ? void 0 : e.lastUpdate) < Date.now() - 75 && t.onResize() | |
} | |
)), | |
this.resizeScroll.observe(e.scrollDOM)), | |
this.addWindowListeners(this.win = e.win), | |
this.start(), | |
"function" == typeof IntersectionObserver && (this.intersection = new IntersectionObserver((function(e) { | |
t.parentCheck < 0 && (t.parentCheck = setTimeout(t.listenForScroll.bind(t), 1e3)), | |
e.length > 0 && e[e.length - 1].intersectionRatio > 0 != t.intersecting && (t.intersecting = !t.intersecting, | |
t.intersecting != t.view.inView && t.onScrollChanged(document.createEvent("Event"))) | |
} | |
),{ | |
threshold: [0, .001] | |
}), | |
this.intersection.observe(this.dom), | |
this.gapIntersection = new IntersectionObserver((function(e) { | |
e.length > 0 && e[e.length - 1].intersectionRatio > 0 && t.onScrollChanged(document.createEvent("Event")) | |
} | |
),{})), | |
this.listenForScroll(), | |
this.readSelectionRange() | |
} | |
return e.prototype.onScrollChanged = function(e) { | |
this.view.inputState.runHandlers("scroll", e), | |
this.intersecting && this.view.measure() | |
} | |
, | |
e.prototype.onScroll = function(e) { | |
this.intersecting && this.flush(!1), | |
this.editContext && this.view.requestMeasure(this.editContext.measureReq), | |
this.onScrollChanged(e) | |
} | |
, | |
e.prototype.onResize = function() { | |
var e = this; | |
this.resizeTimeout < 0 && (this.resizeTimeout = setTimeout((function() { | |
e.resizeTimeout = -1, | |
e.view.requestMeasure() | |
} | |
), 50)) | |
} | |
, | |
e.prototype.onPrint = function(e) { | |
var t = this; | |
("change" != e.type && e.type || e.matches) && (this.view.viewState.printing = !0, | |
this.view.measure(), | |
setTimeout((function() { | |
t.view.viewState.printing = !1, | |
t.view.requestMeasure() | |
} | |
), 500)) | |
} | |
, | |
e.prototype.updateGaps = function(e) { | |
if (this.gapIntersection && (e.length != this.gaps.length || this.gaps.some((function(t, n) { | |
return t != e[n] | |
} | |
)))) { | |
this.gapIntersection.disconnect(); | |
for (var t = 0, n = e; t < n.length; t++) { | |
var i = n[t]; | |
this.gapIntersection.observe(i) | |
} | |
this.gaps = e | |
} | |
} | |
, | |
e.prototype.onSelectionChange = function(e) { | |
var t = this.selectionChanged; | |
if (this.readSelectionRange() && !this.delayedAndroidKey) { | |
var n = this.view | |
, i = this.selectionRange; | |
if (n.state.facet(Bi) ? n.root.activeElement == this.dom : Nt(this.dom, i)) { | |
var r = i.anchorNode && n.docView.nearest(i.anchorNode); | |
r && r.ignoreEvent(e) ? t || (this.selectionChanged = !1) : (kn.ie && kn.ie_version <= 11 || kn.android && kn.chrome) && !n.state.selection.main.empty && i.focusNode && Ht(i.focusNode, i.focusOffset, i.anchorNode, i.anchorOffset) ? this.flushSoon() : this.flush(!1) | |
} | |
} | |
} | |
, | |
e.prototype.readSelectionRange = function() { | |
var e = this.view | |
, t = Ot(e.root); | |
if (!t) | |
return !1; | |
var n = kn.safari && 11 == e.root.nodeType && e.root.activeElement == this.dom && function(e, t) { | |
if (t.getComposedRanges) { | |
var n = t.getComposedRanges(e.root)[0]; | |
if (n) | |
return No(e, n) | |
} | |
var i = null; | |
function r(e) { | |
e.preventDefault(), | |
e.stopImmediatePropagation(), | |
i = e.getTargetRanges()[0] | |
} | |
return e.contentDOM.addEventListener("beforeinput", r, !0), | |
e.dom.ownerDocument.execCommand("indent"), | |
e.contentDOM.removeEventListener("beforeinput", r, !0), | |
i ? No(e, i) : null | |
}(this.view, t) || t; | |
if (!n || this.selectionRange.eq(n)) | |
return !1; | |
var i = Nt(this.dom, n); | |
return i && !this.selectionChanged && e.inputState.lastFocusTime > Date.now() - 200 && e.inputState.lastTouchTime < Date.now() - 300 && function(e, t) { | |
var n = t.focusNode | |
, i = t.focusOffset; | |
if (!n || t.anchorNode != n || t.anchorOffset != i) | |
return !1; | |
for (i = Math.min(i, Ut(n)); ; ) | |
if (i) { | |
if (1 != n.nodeType) | |
return !1; | |
var r = n.childNodes[i - 1]; | |
"false" == r.contentEditable ? i-- : i = Ut(n = r) | |
} else { | |
if (n == e) | |
return !0; | |
i = Vt(n), | |
n = n.parentNode | |
} | |
}(this.dom, n) ? (this.view.inputState.lastFocusTime = 0, | |
e.docView.updateSelection(), | |
!1) : (this.selectionRange.setRange(n), | |
i && (this.selectionChanged = !0), | |
!0) | |
} | |
, | |
e.prototype.setSelectionRange = function(e, t) { | |
this.selectionRange.set(e.node, e.offset, t.node, t.offset), | |
this.selectionChanged = !1 | |
} | |
, | |
e.prototype.clearSelectionRange = function() { | |
this.selectionRange.set(null, 0, null, 0) | |
} | |
, | |
e.prototype.listenForScroll = function() { | |
this.parentCheck = -1; | |
for (var e = 0, t = null, n = this.dom; n; ) | |
if (1 == n.nodeType) | |
!t && e < this.scrollTargets.length && this.scrollTargets[e] == n ? e++ : t || (t = this.scrollTargets.slice(0, e)), | |
t && t.push(n), | |
n = n.assignedSlot || n.parentNode; | |
else { | |
if (11 != n.nodeType) | |
break; | |
n = n.host | |
} | |
if (e < this.scrollTargets.length && !t && (t = this.scrollTargets.slice(0, e)), | |
t) { | |
for (var i = 0, r = this.scrollTargets; i < r.length; i++) { | |
(n = r[i]).removeEventListener("scroll", this.onScroll) | |
} | |
for (var o = 0, a = this.scrollTargets = t; o < a.length; o++) { | |
(n = a[o]).addEventListener("scroll", this.onScroll) | |
} | |
} | |
} | |
, | |
e.prototype.ignore = function(e) { | |
if (!this.active) | |
return e(); | |
try { | |
return this.stop(), | |
e() | |
} finally { | |
this.start(), | |
this.clear() | |
} | |
} | |
, | |
e.prototype.start = function() { | |
this.active || (this.observer.observe(this.dom, Io), | |
Fo && this.dom.addEventListener("DOMCharacterDataModified", this.onCharData), | |
this.active = !0) | |
} | |
, | |
e.prototype.stop = function() { | |
this.active && (this.active = !1, | |
this.observer.disconnect(), | |
Fo && this.dom.removeEventListener("DOMCharacterDataModified", this.onCharData)) | |
} | |
, | |
e.prototype.clear = function() { | |
this.processRecords(), | |
this.queue.length = 0, | |
this.selectionChanged = !1 | |
} | |
, | |
e.prototype.delayAndroidKey = function(e, t) { | |
var n, i = this; | |
if (!this.delayedAndroidKey) { | |
this.flushingAndroidKey = this.view.win.requestAnimationFrame((function() { | |
var e = i.delayedAndroidKey; | |
e && (i.clearDelayedAndroidKey(), | |
i.view.inputState.lastKeyCode = e.keyCode, | |
i.view.inputState.lastKeyTime = Date.now(), | |
!i.flush() && e.force && $t(i.dom, e.key, e.keyCode)) | |
} | |
)) | |
} | |
this.delayedAndroidKey && "Enter" != e || (this.delayedAndroidKey = { | |
key: e, | |
keyCode: t, | |
force: this.lastChange < Date.now() - 50 || !!(null === (n = this.delayedAndroidKey) || void 0 === n ? void 0 : n.force) | |
}) | |
} | |
, | |
e.prototype.clearDelayedAndroidKey = function() { | |
this.win.cancelAnimationFrame(this.flushingAndroidKey), | |
this.delayedAndroidKey = null, | |
this.flushingAndroidKey = -1 | |
} | |
, | |
e.prototype.flushSoon = function() { | |
var e = this; | |
this.delayedFlush < 0 && (this.delayedFlush = this.view.win.requestAnimationFrame((function() { | |
e.delayedFlush = -1, | |
e.flush() | |
} | |
))) | |
} | |
, | |
e.prototype.forceFlush = function() { | |
this.delayedFlush >= 0 && (this.view.win.cancelAnimationFrame(this.delayedFlush), | |
this.delayedFlush = -1), | |
this.flush() | |
} | |
, | |
e.prototype.pendingRecords = function() { | |
for (var e = 0, t = this.observer.takeRecords(); e < t.length; e++) { | |
var n = t[e]; | |
this.queue.push(n) | |
} | |
return this.queue | |
} | |
, | |
e.prototype.processRecords = function() |
View raw
(Sorry about that, but we can’t show files that are this big right now.)
View raw
(Sorry about that, but we can’t show files that are this big right now.)
View raw
(Sorry about that, but we can’t show files that are this big right now.)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment