oiocns-editer
Version:
About oiocns of a component package.
1,376 lines (1,372 loc) • 4.69 MB
JavaScript
import Zl, { useState as Hs, useEffect as ra, useRef as k1 } from "react";
import { DocxViewer as fZ, SheetViewer as mZ } from "react-office-viewer";
import iV from "axios";
import { Spin as pZ, Popover as _Z, Slider as bZ, Dropdown as vZ, Progress as CZ, Image as m8 } from "antd";
import wZ from "@bytemd/plugin-gfm";
import { Editor as SZ, Viewer as yZ } from "@bytemd/react";
import xZ from "@bytemd/plugin-breaks";
import LZ from "@bytemd/plugin-gemoji";
import DZ from "@bytemd/plugin-highlight";
import kZ from "@bytemd/plugin-math-ssr";
import EZ from "@bytemd/plugin-medium-zoom";
import IZ from "@bytemd/plugin-mermaid";
import TZ from "@bytemd/plugin-frontmatter";
import "monaco-editor";
import { Draggable as NZ } from "devextreme-react";
import { JolPlayer as p8 } from "jol-player";
import Wm from "cornerstone-core";
import * as bO from "cornerstone-wado-image-loader";
import MZ from "dicom-parser-edit";
var uT = { exports: {} }, D0 = {};
/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var _8;
function RZ() {
if (_8) return D0;
_8 = 1;
var o = Zl, e = Symbol.for("react.element"), t = Symbol.for("react.fragment"), i = Object.prototype.hasOwnProperty, n = o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
function r(a, l, c) {
var d, h = {}, u = null, g = null;
c !== void 0 && (u = "" + c), l.key !== void 0 && (u = "" + l.key), l.ref !== void 0 && (g = l.ref);
for (d in l) i.call(l, d) && !s.hasOwnProperty(d) && (h[d] = l[d]);
if (a && a.defaultProps) for (d in l = a.defaultProps, l) h[d] === void 0 && (h[d] = l[d]);
return { $$typeof: e, type: a, key: u, ref: g, props: h, _owner: n.current };
}
return D0.Fragment = t, D0.jsx = r, D0.jsxs = r, D0;
}
var k0 = {};
/**
* @license React
* react-jsx-runtime.development.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var b8;
function AZ() {
return b8 || (b8 = 1, process.env.NODE_ENV !== "production" && function() {
var o = Zl, e = Symbol.for("react.element"), t = Symbol.for("react.portal"), i = Symbol.for("react.fragment"), n = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), r = Symbol.for("react.provider"), a = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), c = Symbol.for("react.suspense"), d = Symbol.for("react.suspense_list"), h = Symbol.for("react.memo"), u = Symbol.for("react.lazy"), g = Symbol.for("react.offscreen"), f = Symbol.iterator, m = "@@iterator";
function _(j) {
if (j === null || typeof j != "object")
return null;
var Ae = f && j[f] || j[m];
return typeof Ae == "function" ? Ae : null;
}
var b = o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
function v(j) {
{
for (var Ae = arguments.length, ze = new Array(Ae > 1 ? Ae - 1 : 0), _t = 1; _t < Ae; _t++)
ze[_t - 1] = arguments[_t];
C("error", j, ze);
}
}
function C(j, Ae, ze) {
{
var _t = b.ReactDebugCurrentFrame, Oe = _t.getStackAddendum();
Oe !== "" && (Ae += "%s", ze = ze.concat([Oe]));
var Z = ze.map(function(xe) {
return String(xe);
});
Z.unshift("Warning: " + Ae), Function.prototype.apply.call(console[j], console, Z);
}
}
var w = !1, S = !1, x = !1, y = !1, L = !1, k;
k = Symbol.for("react.module.reference");
function T(j) {
return !!(typeof j == "string" || typeof j == "function" || j === i || j === s || L || j === n || j === c || j === d || y || j === g || w || S || x || typeof j == "object" && j !== null && (j.$$typeof === u || j.$$typeof === h || j.$$typeof === r || j.$$typeof === a || j.$$typeof === l || // This needs to include all possible module reference object
// types supported by any Flight configuration anywhere since
// we don't know which Flight build this will end up being used
// with.
j.$$typeof === k || j.getModuleId !== void 0));
}
function I(j, Ae, ze) {
var _t = j.displayName;
if (_t)
return _t;
var Oe = Ae.displayName || Ae.name || "";
return Oe !== "" ? ze + "(" + Oe + ")" : ze;
}
function R(j) {
return j.displayName || "Context";
}
function O(j) {
if (j == null)
return null;
if (typeof j.tag == "number" && v("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof j == "function")
return j.displayName || j.name || null;
if (typeof j == "string")
return j;
switch (j) {
case i:
return "Fragment";
case t:
return "Portal";
case s:
return "Profiler";
case n:
return "StrictMode";
case c:
return "Suspense";
case d:
return "SuspenseList";
}
if (typeof j == "object")
switch (j.$$typeof) {
case a:
var Ae = j;
return R(Ae) + ".Consumer";
case r:
var ze = j;
return R(ze._context) + ".Provider";
case l:
return I(j, j.render, "ForwardRef");
case h:
var _t = j.displayName || null;
return _t !== null ? _t : O(j.type) || "Memo";
case u: {
var Oe = j, Z = Oe._payload, xe = Oe._init;
try {
return O(xe(Z));
} catch {
return null;
}
}
}
return null;
}
var W = Object.assign, G = 0, X, ie, he, ae, Ce, Ne, J;
function F() {
}
F.__reactDisabledLog = !0;
function $() {
{
if (G === 0) {
X = console.log, ie = console.info, he = console.warn, ae = console.error, Ce = console.group, Ne = console.groupCollapsed, J = console.groupEnd;
var j = {
configurable: !0,
enumerable: !0,
value: F,
writable: !0
};
Object.defineProperties(console, {
info: j,
log: j,
warn: j,
error: j,
group: j,
groupCollapsed: j,
groupEnd: j
});
}
G++;
}
}
function q() {
{
if (G--, G === 0) {
var j = {
configurable: !0,
enumerable: !0,
writable: !0
};
Object.defineProperties(console, {
log: W({}, j, {
value: X
}),
info: W({}, j, {
value: ie
}),
warn: W({}, j, {
value: he
}),
error: W({}, j, {
value: ae
}),
group: W({}, j, {
value: Ce
}),
groupCollapsed: W({}, j, {
value: Ne
}),
groupEnd: W({}, j, {
value: J
})
});
}
G < 0 && v("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
}
}
var Be = b.ReactCurrentDispatcher, Fe;
function at(j, Ae, ze) {
{
if (Fe === void 0)
try {
throw Error();
} catch (Oe) {
var _t = Oe.stack.trim().match(/\n( *(at )?)/);
Fe = _t && _t[1] || "";
}
return `
` + Fe + j;
}
}
var ht = !1, Rt;
{
var Ke = typeof WeakMap == "function" ? WeakMap : Map;
Rt = new Ke();
}
function Bt(j, Ae) {
if (!j || ht)
return "";
{
var ze = Rt.get(j);
if (ze !== void 0)
return ze;
}
var _t;
ht = !0;
var Oe = Error.prepareStackTrace;
Error.prepareStackTrace = void 0;
var Z;
Z = Be.current, Be.current = null, $();
try {
if (Ae) {
var xe = function() {
throw Error();
};
if (Object.defineProperty(xe.prototype, "props", {
set: function() {
throw Error();
}
}), typeof Reflect == "object" && Reflect.construct) {
try {
Reflect.construct(xe, []);
} catch (Yn) {
_t = Yn;
}
Reflect.construct(j, [], xe);
} else {
try {
xe.call();
} catch (Yn) {
_t = Yn;
}
j.call(xe.prototype);
}
} else {
try {
throw Error();
} catch (Yn) {
_t = Yn;
}
j();
}
} catch (Yn) {
if (Yn && _t && typeof Yn.stack == "string") {
for (var De = Yn.stack.split(`
`), Ut = _t.stack.split(`
`), jt = De.length - 1, _i = Ut.length - 1; jt >= 1 && _i >= 0 && De[jt] !== Ut[_i]; )
_i--;
for (; jt >= 1 && _i >= 0; jt--, _i--)
if (De[jt] !== Ut[_i]) {
if (jt !== 1 || _i !== 1)
do
if (jt--, _i--, _i < 0 || De[jt] !== Ut[_i]) {
var ci = `
` + De[jt].replace(" at new ", " at ");
return j.displayName && ci.includes("<anonymous>") && (ci = ci.replace("<anonymous>", j.displayName)), typeof j == "function" && Rt.set(j, ci), ci;
}
while (jt >= 1 && _i >= 0);
break;
}
}
} finally {
ht = !1, Be.current = Z, q(), Error.prepareStackTrace = Oe;
}
var ls = j ? j.displayName || j.name : "", cs = ls ? at(ls) : "";
return typeof j == "function" && Rt.set(j, cs), cs;
}
function Xt(j, Ae, ze) {
return Bt(j, !1);
}
function Oi(j) {
var Ae = j.prototype;
return !!(Ae && Ae.isReactComponent);
}
function ws(j, Ae, ze) {
if (j == null)
return "";
if (typeof j == "function")
return Bt(j, Oi(j));
if (typeof j == "string")
return at(j);
switch (j) {
case c:
return at("Suspense");
case d:
return at("SuspenseList");
}
if (typeof j == "object")
switch (j.$$typeof) {
case l:
return Xt(j.render);
case h:
return ws(j.type, Ae, ze);
case u: {
var _t = j, Oe = _t._payload, Z = _t._init;
try {
return ws(Z(Oe), Ae, ze);
} catch {
}
}
}
return "";
}
var Zn = Object.prototype.hasOwnProperty, bo = {}, vo = b.ReactDebugCurrentFrame;
function Ko(j) {
if (j) {
var Ae = j._owner, ze = ws(j.type, j._source, Ae ? Ae.type : null);
vo.setExtraStackFrame(ze);
} else
vo.setExtraStackFrame(null);
}
function ue(j, Ae, ze, _t, Oe) {
{
var Z = Function.call.bind(Zn);
for (var xe in j)
if (Z(j, xe)) {
var De = void 0;
try {
if (typeof j[xe] != "function") {
var Ut = Error((_t || "React class") + ": " + ze + " type `" + xe + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof j[xe] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
throw Ut.name = "Invariant Violation", Ut;
}
De = j[xe](Ae, xe, _t, ze, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
} catch (jt) {
De = jt;
}
De && !(De instanceof Error) && (Ko(Oe), v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", _t || "React class", ze, xe, typeof De), Ko(null)), De instanceof Error && !(De.message in bo) && (bo[De.message] = !0, Ko(Oe), v("Failed %s type: %s", ze, De.message), Ko(null));
}
}
}
var te = Array.isArray;
function ee(j) {
return te(j);
}
function P(j) {
{
var Ae = typeof Symbol == "function" && Symbol.toStringTag, ze = Ae && j[Symbol.toStringTag] || j.constructor.name || "Object";
return ze;
}
}
function B(j) {
try {
return K(j), !1;
} catch {
return !0;
}
}
function K(j) {
return "" + j;
}
function z(j) {
if (B(j))
return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", P(j)), K(j);
}
var de = b.ReactCurrentOwner, Ie = {
key: !0,
ref: !0,
__self: !0,
__source: !0
}, Q, ne, le;
le = {};
function fe(j) {
if (Zn.call(j, "ref")) {
var Ae = Object.getOwnPropertyDescriptor(j, "ref").get;
if (Ae && Ae.isReactWarning)
return !1;
}
return j.ref !== void 0;
}
function Ee(j) {
if (Zn.call(j, "key")) {
var Ae = Object.getOwnPropertyDescriptor(j, "key").get;
if (Ae && Ae.isReactWarning)
return !1;
}
return j.key !== void 0;
}
function Ve(j, Ae) {
if (typeof j.ref == "string" && de.current && Ae && de.current.stateNode !== Ae) {
var ze = O(de.current.type);
le[ze] || (v('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', O(de.current.type), j.ref), le[ze] = !0);
}
}
function ve(j, Ae) {
{
var ze = function() {
Q || (Q = !0, v("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", Ae));
};
ze.isReactWarning = !0, Object.defineProperty(j, "key", {
get: ze,
configurable: !0
});
}
}
function Qe(j, Ae) {
{
var ze = function() {
ne || (ne = !0, v("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", Ae));
};
ze.isReactWarning = !0, Object.defineProperty(j, "ref", {
get: ze,
configurable: !0
});
}
}
var Ze = function(j, Ae, ze, _t, Oe, Z, xe) {
var De = {
// This tag allows us to uniquely identify this as a React Element
$$typeof: e,
// Built-in properties that belong on the element
type: j,
key: Ae,
ref: ze,
props: xe,
// Record the component responsible for creating this element.
_owner: Z
};
return De._store = {}, Object.defineProperty(De._store, "validated", {
configurable: !1,
enumerable: !1,
writable: !0,
value: !1
}), Object.defineProperty(De, "_self", {
configurable: !1,
enumerable: !1,
writable: !1,
value: _t
}), Object.defineProperty(De, "_source", {
configurable: !1,
enumerable: !1,
writable: !1,
value: Oe
}), Object.freeze && (Object.freeze(De.props), Object.freeze(De)), De;
};
function Xe(j, Ae, ze, _t, Oe) {
{
var Z, xe = {}, De = null, Ut = null;
ze !== void 0 && (z(ze), De = "" + ze), Ee(Ae) && (z(Ae.key), De = "" + Ae.key), fe(Ae) && (Ut = Ae.ref, Ve(Ae, Oe));
for (Z in Ae)
Zn.call(Ae, Z) && !Ie.hasOwnProperty(Z) && (xe[Z] = Ae[Z]);
if (j && j.defaultProps) {
var jt = j.defaultProps;
for (Z in jt)
xe[Z] === void 0 && (xe[Z] = jt[Z]);
}
if (De || Ut) {
var _i = typeof j == "function" ? j.displayName || j.name || "Unknown" : j;
De && ve(xe, _i), Ut && Qe(xe, _i);
}
return Ze(j, De, Ut, Oe, _t, de.current, xe);
}
}
var Le = b.ReactCurrentOwner, it = b.ReactDebugCurrentFrame;
function Ot(j) {
if (j) {
var Ae = j._owner, ze = ws(j.type, j._source, Ae ? Ae.type : null);
it.setExtraStackFrame(ze);
} else
it.setExtraStackFrame(null);
}
var Ct;
Ct = !1;
function dt(j) {
return typeof j == "object" && j !== null && j.$$typeof === e;
}
function ri() {
{
if (Le.current) {
var j = O(Le.current.type);
if (j)
return `
Check the render method of \`` + j + "`.";
}
return "";
}
}
function ti(j) {
return "";
}
var Ui = {};
function Ei(j) {
{
var Ae = ri();
if (!Ae) {
var ze = typeof j == "string" ? j : j.displayName || j.name;
ze && (Ae = `
Check the top-level render call using <` + ze + ">.");
}
return Ae;
}
}
function Ft(j, Ae) {
{
if (!j._store || j._store.validated || j.key != null)
return;
j._store.validated = !0;
var ze = Ei(Ae);
if (Ui[ze])
return;
Ui[ze] = !0;
var _t = "";
j && j._owner && j._owner !== Le.current && (_t = " It was passed a child from " + O(j._owner.type) + "."), Ot(j), v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', ze, _t), Ot(null);
}
}
function ii(j, Ae) {
{
if (typeof j != "object")
return;
if (ee(j))
for (var ze = 0; ze < j.length; ze++) {
var _t = j[ze];
dt(_t) && Ft(_t, Ae);
}
else if (dt(j))
j._store && (j._store.validated = !0);
else if (j) {
var Oe = _(j);
if (typeof Oe == "function" && Oe !== j.entries)
for (var Z = Oe.call(j), xe; !(xe = Z.next()).done; )
dt(xe.value) && Ft(xe.value, Ae);
}
}
}
function qe(j) {
{
var Ae = j.type;
if (Ae == null || typeof Ae == "string")
return;
var ze;
if (typeof Ae == "function")
ze = Ae.propTypes;
else if (typeof Ae == "object" && (Ae.$$typeof === l || // Note: Memo only checks outer props here.
// Inner props are checked in the reconciler.
Ae.$$typeof === h))
ze = Ae.propTypes;
else
return;
if (ze) {
var _t = O(Ae);
ue(ze, j.props, "prop", _t, j);
} else if (Ae.PropTypes !== void 0 && !Ct) {
Ct = !0;
var Oe = O(Ae);
v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", Oe || "Unknown");
}
typeof Ae.getDefaultProps == "function" && !Ae.getDefaultProps.isReactClassApproved && v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
}
}
function ft(j) {
{
for (var Ae = Object.keys(j.props), ze = 0; ze < Ae.length; ze++) {
var _t = Ae[ze];
if (_t !== "children" && _t !== "key") {
Ot(j), v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", _t), Ot(null);
break;
}
}
j.ref !== null && (Ot(j), v("Invalid attribute `ref` supplied to `React.Fragment`."), Ot(null));
}
}
var gi = {};
function fn(j, Ae, ze, _t, Oe, Z) {
{
var xe = T(j);
if (!xe) {
var De = "";
(j === void 0 || typeof j == "object" && j !== null && Object.keys(j).length === 0) && (De += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
var Ut = ti();
Ut ? De += Ut : De += ri();
var jt;
j === null ? jt = "null" : ee(j) ? jt = "array" : j !== void 0 && j.$$typeof === e ? (jt = "<" + (O(j.type) || "Unknown") + " />", De = " Did you accidentally export a JSX literal instead of a component?") : jt = typeof j, v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", jt, De);
}
var _i = Xe(j, Ae, ze, Oe, Z);
if (_i == null)
return _i;
if (xe) {
var ci = Ae.children;
if (ci !== void 0)
if (_t)
if (ee(ci)) {
for (var ls = 0; ls < ci.length; ls++)
ii(ci[ls], j);
Object.freeze && Object.freeze(ci);
} else
v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
else
ii(ci, j);
}
if (Zn.call(Ae, "key")) {
var cs = O(j), Yn = Object.keys(Ae).filter(function(_m) {
return _m !== "key";
}), ml = Yn.length > 0 ? "{key: someKey, " + Yn.join(": ..., ") + ": ...}" : "{key: someKey}";
if (!gi[cs + ml]) {
var zC = Yn.length > 0 ? "{" + Yn.join(": ..., ") + ": ...}" : "{}";
v(`A props object containing a "key" prop is being spread into JSX:
let props = %s;
<%s {...props} />
React keys must be passed directly to JSX without using spread:
let props = %s;
<%s key={someKey} {...props} />`, ml, cs, zC, cs), gi[cs + ml] = !0;
}
}
return j === i ? ft(_i) : qe(_i), _i;
}
}
function si(j, Ae, ze) {
return fn(j, Ae, ze, !0);
}
function Yi(j, Ae, ze) {
return fn(j, Ae, ze, !1);
}
var Ci = Yi, mn = si;
k0.Fragment = i, k0.jsx = Ci, k0.jsxs = mn;
}()), k0;
}
process.env.NODE_ENV === "production" ? uT.exports = RZ() : uT.exports = AZ();
var ot = uT.exports;
const PZ = "粗体", OZ = "粗体文本", FZ = "Markdown 语法", BZ = "关闭帮助", WZ = "关闭目录", HZ = "代码", VZ = "代码块", zZ = "编程语言", UZ = "代码", $Z = "退出全屏", GZ = "恢复默认", jZ = "恢复默认", KZ = "全屏", qZ = "一级标题", ZZ = "二级标题", YZ = "三级标题", XZ = "四级标题", QZ = "五级标题", JZ = "六级标题", eY = "标题", tY = "帮助", iY = "分割线", nY = "图片", sY = "alt", oY = "图片描述", rY = "斜体", aY = "斜体文本", lY = "已达最大字符数限制", cY = "行数", dY = "链接", hY = "链接描述", uY = "有序列表", gY = "项目", fY = "预览", mY = "仅预览区", pY = "引用", _Y = "引用文本", bY = "快捷键", vY = "源代码", CY = "同步滚动", wY = "目录", SY = "回到顶部", yY = "无序列表", xY = "项目", LY = "字数", DY = "编辑", kY = "仅编辑区", EY = {
bold: PZ,
boldText: OZ,
cheatsheet: FZ,
closeHelp: BZ,
closeToc: WZ,
code: HZ,
codeBlock: VZ,
codeLang: zZ,
codeText: UZ,
exitFullscreen: $Z,
exitPreviewOnly: GZ,
exitWriteOnly: jZ,
fullscreen: KZ,
h1: qZ,
h2: ZZ,
h3: YZ,
h4: XZ,
h5: QZ,
h6: JZ,
headingText: eY,
help: tY,
hr: iY,
image: nY,
imageAlt: sY,
imageTitle: oY,
italic: rY,
italicText: aY,
limited: lY,
lines: cY,
link: dY,
linkText: hY,
ol: uY,
olItem: gY,
preview: fY,
previewOnly: mY,
quote: pY,
quotedText: _Y,
shortcuts: bY,
source: vY,
sync: CY,
toc: wY,
top: SY,
ul: yY,
ulItem: xY,
words: LY,
write: DY,
writeOnly: kY
}, IY = [
wZ({
locale: {
strike: "删除线",
strikeText: "文本",
task: "任务列表",
taskText: "待办事项",
table: "表格",
tableHeading: "标题"
}
}),
LZ(),
DZ(),
EZ(),
IZ({
locale: {
class: "类图",
er: "关系图",
flowchart: "流程图",
gantt: "甘特图",
mermaid: "Mermaid图表",
mindmap: "思维导图",
pie: "饼状图",
sequence: "时序图",
state: "状态图",
timeline: "时间轴",
uj: "旅程图"
}
}),
kZ({
locale: {
inline: "行内公式",
inlineText: "公式",
block: "块级公式",
blockText: "公式"
}
}),
xZ(),
TZ()
], TY = ({ link: o, getHtml: e }) => {
const [t, i] = Hs(!1), [n, s] = Hs("<p></p>");
return e(n), ra(() => {
iV.get(o).then((r) => {
i(!0), r.status === 200 && s(r.data);
});
}, []), t ? /* @__PURE__ */ ot.jsx(ot.Fragment, { children: /* @__PURE__ */ ot.jsxs("div", { style: { border: "1px solid #ccc", zIndex: 100, marginTop: "15px" }, children: [
/* @__PURE__ */ ot.jsx(
SZ,
{
value: n,
locale: EY,
plugins: IY,
onChange: (r) => {
s(r);
}
}
),
/* @__PURE__ */ ot.jsx("div", { id: "preview-content", style: { display: "none" }, children: /* @__PURE__ */ ot.jsx(yZ, { value: n }) })
] }) }) : /* @__PURE__ */ ot.jsx(
pZ,
{
tip: "加载中,请稍后...",
size: "large",
style: { marginTop: "calc(50vh - 50px)", marginLeft: "50vw" }
}
);
};
function NY() {
return globalThis._VSCODE_NLS_MESSAGES;
}
function nV() {
return globalThis._VSCODE_NLS_LANGUAGE;
}
const MY = nV() === "pseudo" || typeof document < "u" && document.location && document.location.hash.indexOf("pseudo=true") >= 0;
function $S(o, e) {
let t;
return e.length === 0 ? t = o : t = o.replace(/\{(\d+)\}/g, (i, n) => {
const s = n[0], r = e[s];
let a = i;
return typeof r == "string" ? a = r : (typeof r == "number" || typeof r == "boolean" || r === void 0 || r === null) && (a = String(r)), a;
}), MY && (t = "[" + t.replace(/[aouei]/g, "$&$&") + "]"), t;
}
function p(o, e, ...t) {
return $S(typeof o == "number" ? sV(o, e) : e, t);
}
function sV(o, e) {
var i;
const t = (i = NY()) == null ? void 0 : i[o];
if (typeof t != "string") {
if (typeof e == "string")
return e;
throw new Error(`!!! NLS MISSING: ${o} !!!`);
}
return t;
}
function tt(o, e, ...t) {
let i;
typeof o == "number" ? i = sV(o, e) : i = e;
const n = $S(i, t);
return {
value: n,
original: e === i ? n : $S(e, t)
};
}
function RY(o, e) {
const t = o;
typeof t.vscodeWindowId != "number" && Object.defineProperty(t, "vscodeWindowId", {
get: () => e
});
}
const di = window, YL = class YL {
constructor() {
this.mapWindowIdToZoomFactor = /* @__PURE__ */ new Map();
}
getZoomFactor(e) {
return this.mapWindowIdToZoomFactor.get(this.getWindowId(e)) ?? 1;
}
getWindowId(e) {
return e.vscodeWindowId;
}
};
YL.INSTANCE = new YL();
let gT = YL;
function oV(o, e, t) {
typeof e == "string" && (e = o.matchMedia(e)), e.addEventListener("change", t);
}
function AY(o) {
return gT.INSTANCE.getZoomFactor(o);
}
const t0 = navigator.userAgent, Hr = t0.indexOf("Firefox") >= 0, Lg = t0.indexOf("AppleWebKit") >= 0, nC = t0.indexOf("Chrome") >= 0, fd = !nC && t0.indexOf("Safari") >= 0, rV = !nC && !fd && Lg;
t0.indexOf("Electron/") >= 0;
const v8 = t0.indexOf("Android") >= 0;
let nS = !1;
if (typeof di.matchMedia == "function") {
const o = di.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"), e = di.matchMedia("(display-mode: fullscreen)");
nS = o.matches, oV(di, o, ({ matches: t }) => {
nS && e.matches || (nS = t);
});
}
function PY() {
return nS;
}
function lo(o) {
return typeof o == "string";
}
function Fn(o) {
return typeof o == "object" && o !== null && !Array.isArray(o) && !(o instanceof RegExp) && !(o instanceof Date);
}
function OY(o) {
const e = Object.getPrototypeOf(Uint8Array);
return typeof o == "object" && o instanceof e;
}
function Xh(o) {
return typeof o == "number" && !isNaN(o);
}
function C8(o) {
return !!o && typeof o[Symbol.iterator] == "function";
}
function aV(o) {
return o === !0 || o === !1;
}
function Ts(o) {
return typeof o > "u";
}
function Yl(o) {
return !nr(o);
}
function nr(o) {
return Ts(o) || o === null;
}
function Vt(o, e) {
if (!o)
throw new Error(e ? `Unexpected type, expected '${e}'` : "Unexpected type");
}
function dh(o) {
if (nr(o))
throw new Error("Assertion Failed: argument is undefined or null");
return o;
}
function GS(o) {
return typeof o == "function";
}
function FY(o, e) {
const t = Math.min(o.length, e.length);
for (let i = 0; i < t; i++)
BY(o[i], e[i]);
}
function BY(o, e) {
if (lo(e)) {
if (typeof o !== e)
throw new Error(`argument does not match constraint: typeof ${e}`);
} else if (GS(e)) {
try {
if (o instanceof e)
return;
} catch {
}
if (!nr(o) && o.constructor === e || e.length === 1 && e.call(void 0, o) === !0)
return;
throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true");
}
}
const Km = "en";
let jS = !1, KS = !1, sS = !1, lV = !1, vO = !1, CO = !1, cV = !1, UC, oS = Km, w8 = Km, WY, Da;
const rd = globalThis;
let Ps;
var JH;
typeof rd.vscode < "u" && typeof rd.vscode.process < "u" ? Ps = rd.vscode.process : typeof process < "u" && typeof ((JH = process == null ? void 0 : process.versions) == null ? void 0 : JH.node) == "string" && (Ps = process);
var eV;
const HY = typeof ((eV = Ps == null ? void 0 : Ps.versions) == null ? void 0 : eV.electron) == "string", VY = HY && (Ps == null ? void 0 : Ps.type) === "renderer";
var tV;
if (typeof Ps == "object") {
jS = Ps.platform === "win32", KS = Ps.platform === "darwin", sS = Ps.platform === "linux", sS && Ps.env.SNAP && Ps.env.SNAP_REVISION, Ps.env.CI || Ps.env.BUILD_ARTIFACTSTAGINGDIRECTORY, UC = Km, oS = Km;
const o = Ps.env.VSCODE_NLS_CONFIG;
if (o)
try {
const e = JSON.parse(o);
UC = e.userLocale, w8 = e.osLocale, oS = e.resolvedLanguage || Km, WY = (tV = e.languagePack) == null ? void 0 : tV.translationsConfigFile;
} catch {
}
lV = !0;
} else typeof navigator == "object" && !VY ? (Da = navigator.userAgent, jS = Da.indexOf("Windows") >= 0, KS = Da.indexOf("Macintosh") >= 0, CO = (Da.indexOf("Macintosh") >= 0 || Da.indexOf("iPad") >= 0 || Da.indexOf("iPhone") >= 0) && !!navigator.maxTouchPoints && navigator.maxTouchPoints > 0, sS = Da.indexOf("Linux") >= 0, cV = (Da == null ? void 0 : Da.indexOf("Mobi")) >= 0, vO = !0, oS = nV() || Km, UC = navigator.language.toLowerCase(), w8 = UC) : console.error("Unable to resolve platform.");
const ps = jS, Dt = KS, qs = sS, Ka = lV, vu = vO, zY = vO && typeof rd.importScripts == "function", UY = zY ? rd.origin : void 0, ic = CO, dV = cV, nc = Da, $Y = oS, GY = typeof rd.postMessage == "function" && !rd.importScripts, hV = (() => {
if (GY) {
const o = [];
rd.addEventListener("message", (t) => {
if (t.data && t.data.vscodeScheduleAsyncWork)
for (let i = 0, n = o.length; i < n; i++) {
const s = o[i];
if (s.id === t.data.vscodeScheduleAsyncWork) {
o.splice(i, 1), s.callback();
return;
}
}
});
let e = 0;
return (t) => {
const i = ++e;
o.push({
id: i,
callback: t
}), rd.postMessage({ vscodeScheduleAsyncWork: i }, "*");
};
}
return (o) => setTimeout(o);
})(), No = KS || CO ? 2 : jS ? 1 : 3;
let S8 = !0, y8 = !1;
function uV() {
if (!y8) {
y8 = !0;
const o = new Uint8Array(2);
o[0] = 1, o[1] = 2, S8 = new Uint16Array(o.buffer)[0] === 513;
}
return S8;
}
const gV = !!(nc && nc.indexOf("Chrome") >= 0), jY = !!(nc && nc.indexOf("Firefox") >= 0), KY = !!(!gV && nc && nc.indexOf("Safari") >= 0), qY = !!(nc && nc.indexOf("Edg/") >= 0), ZY = !!(nc && nc.indexOf("Android") >= 0), wO = {
clipboard: {
writeText: Ka || document.queryCommandSupported && document.queryCommandSupported("copy") || !!(navigator && navigator.clipboard && navigator.clipboard.writeText),
readText: Ka || !!(navigator && navigator.clipboard && navigator.clipboard.readText)
},
keyboard: Ka || PY() ? 0 : navigator.keyboard || fd ? 1 : 2,
// 'ontouchstart' in window always evaluates to true with typescript's modern typings. This causes `window` to be
// `never` later in `window.navigator`. That's why we need the explicit `window as Window` cast
touch: "ontouchstart" in di || navigator.maxTouchPoints > 0,
pointerEvents: di.PointerEvent && ("ontouchstart" in di || navigator.maxTouchPoints > 0)
};
class SO {
constructor() {
this._keyCodeToStr = [], this._strToKeyCode = /* @__PURE__ */ Object.create(null);
}
define(e, t) {
this._keyCodeToStr[e] = t, this._strToKeyCode[t.toLowerCase()] = e;
}
keyCodeToStr(e) {
return this._keyCodeToStr[e];
}
strToKeyCode(e) {
return this._strToKeyCode[e.toLowerCase()] || 0;
}
}
const rS = new SO(), fT = new SO(), mT = new SO(), fV = new Array(230), YY = /* @__PURE__ */ Object.create(null), XY = /* @__PURE__ */ Object.create(null), yO = [];
for (let o = 0; o <= 193; o++)
yO[o] = -1;
(function() {
const o = "", e = [
// immutable, scanCode, scanCodeStr, keyCode, keyCodeStr, eventKeyCode, vkey, usUserSettingsLabel, generalUserSettingsLabel
[1, 0, "None", 0, "unknown", 0, "VK_UNKNOWN", o, o],
[1, 1, "Hyper", 0, o, 0, o, o, o],
[1, 2, "Super", 0, o, 0, o, o, o],
[1, 3, "Fn", 0, o, 0, o, o, o],
[1, 4, "FnLock", 0, o, 0, o, o, o],
[1, 5, "Suspend", 0, o, 0, o, o, o],
[1, 6, "Resume", 0, o, 0, o, o, o],
[1, 7, "Turbo", 0, o, 0, o, o, o],
[1, 8, "Sleep", 0, o, 0, "VK_SLEEP", o, o],
[1, 9, "WakeUp", 0, o, 0, o, o, o],
[0, 10, "KeyA", 31, "A", 65, "VK_A", o, o],
[0, 11, "KeyB", 32, "B", 66, "VK_B", o, o],
[0, 12, "KeyC", 33, "C", 67, "VK_C", o, o],
[0, 13, "KeyD", 34, "D", 68, "VK_D", o, o],
[0, 14, "KeyE", 35, "E", 69, "VK_E", o, o],
[0, 15, "KeyF", 36, "F", 70, "VK_F", o, o],
[0, 16, "KeyG", 37, "G", 71, "VK_G", o, o],
[0, 17, "KeyH", 38, "H", 72, "VK_H", o, o],
[0, 18, "KeyI", 39, "I", 73, "VK_I", o, o],
[0, 19, "KeyJ", 40, "J", 74, "VK_J", o, o],
[0, 20, "KeyK", 41, "K", 75, "VK_K", o, o],
[0, 21, "KeyL", 42, "L", 76, "VK_L", o, o],
[0, 22, "KeyM", 43, "M", 77, "VK_M", o, o],
[0, 23, "KeyN", 44, "N", 78, "VK_N", o, o],
[0, 24, "KeyO", 45, "O", 79, "VK_O", o, o],
[0, 25, "KeyP", 46, "P", 80, "VK_P", o, o],
[0, 26, "KeyQ", 47, "Q", 81, "VK_Q", o, o],
[0, 27, "KeyR", 48, "R", 82, "VK_R", o, o],
[0, 28, "KeyS", 49, "S", 83, "VK_S", o, o],
[0, 29, "KeyT", 50, "T", 84, "VK_T", o, o],
[0, 30, "KeyU", 51, "U", 85, "VK_U", o, o],
[0, 31, "KeyV", 52, "V", 86, "VK_V", o, o],
[0, 32, "KeyW", 53, "W", 87, "VK_W", o, o],
[0, 33, "KeyX", 54, "X", 88, "VK_X", o, o],
[0, 34, "KeyY", 55, "Y", 89, "VK_Y", o, o],
[0, 35, "KeyZ", 56, "Z", 90, "VK_Z", o, o],
[0, 36, "Digit1", 22, "1", 49, "VK_1", o, o],
[0, 37, "Digit2", 23, "2", 50, "VK_2", o, o],
[0, 38, "Digit3", 24, "3", 51, "VK_3", o, o],
[0, 39, "Digit4", 25, "4", 52, "VK_4", o, o],
[0, 40, "Digit5", 26, "5", 53, "VK_5", o, o],
[0, 41, "Digit6", 27, "6", 54, "VK_6", o, o],
[0, 42, "Digit7", 28, "7", 55, "VK_7", o, o],
[0, 43, "Digit8", 29, "8", 56, "VK_8", o, o],
[0, 44, "Digit9", 30, "9", 57, "VK_9", o, o],
[0, 45, "Digit0", 21, "0", 48, "VK_0", o, o],
[1, 46, "Enter", 3, "Enter", 13, "VK_RETURN", o, o],
[1, 47, "Escape", 9, "Escape", 27, "VK_ESCAPE", o, o],
[1, 48, "Backspace", 1, "Backspace", 8, "VK_BACK", o, o],
[1, 49, "Tab", 2, "Tab", 9, "VK_TAB", o, o],
[1, 50, "Space", 10, "Space", 32, "VK_SPACE", o, o],
[0, 51, "Minus", 88, "-", 189, "VK_OEM_MINUS", "-", "OEM_MINUS"],
[0, 52, "Equal", 86, "=", 187, "VK_OEM_PLUS", "=", "OEM_PLUS"],
[0, 53, "BracketLeft", 92, "[", 219, "VK_OEM_4", "[", "OEM_4"],
[0, 54, "BracketRight", 94, "]", 221, "VK_OEM_6", "]", "OEM_6"],
[0, 55, "Backslash", 93, "\\", 220, "VK_OEM_5", "\\", "OEM_5"],
[0, 56, "IntlHash", 0, o, 0, o, o, o],
// has been dropped from the w3c spec
[0, 57, "Semicolon", 85, ";", 186, "VK_OEM_1", ";", "OEM_1"],
[0, 58, "Quote", 95, "'", 222, "VK_OEM_7", "'", "OEM_7"],
[0, 59, "Backquote", 91, "`", 192, "VK_OEM_3", "`", "OEM_3"],
[0, 60, "Comma", 87, ",", 188, "VK_OEM_COMMA", ",", "OEM_COMMA"],
[0, 61, "Period", 89, ".", 190, "VK_OEM_PERIOD", ".", "OEM_PERIOD"],
[0, 62, "Slash", 90, "/", 191, "VK_OEM_2", "/", "OEM_2"],
[1, 63, "CapsLock", 8, "CapsLock", 20, "VK_CAPITAL", o, o],
[1, 64, "F1", 59, "F1", 112, "VK_F1", o, o],
[1, 65, "F2", 60, "F2", 113, "VK_F2", o, o],
[1, 66, "F3", 61, "F3", 114, "VK_F3", o, o],
[1, 67, "F4", 62, "F4", 115, "VK_F4", o, o],
[1, 68, "F5", 63, "F5", 116, "VK_F5", o, o],
[1, 69, "F6", 64, "F6", 117, "VK_F6", o, o],
[1, 70, "F7", 65, "F7", 118, "VK_F7", o, o],
[1, 71, "F8", 66, "F8", 119, "VK_F8", o, o],
[1, 72, "F9", 67, "F9", 120, "VK_F9", o, o],
[1, 73, "F10", 68, "F10", 121, "VK_F10", o, o],
[1, 74, "F11", 69, "F11", 122, "VK_F11", o, o],
[1, 75, "F12", 70, "F12", 123, "VK_F12", o, o],
[1, 76, "PrintScreen", 0, o, 0, o, o, o],
[1, 77, "ScrollLock", 84, "ScrollLock", 145, "VK_SCROLL", o, o],
[1, 78, "Pause", 7, "PauseBreak", 19, "VK_PAUSE", o, o],
[1, 79, "Insert", 19, "Insert", 45, "VK_INSERT", o, o],
[1, 80, "Home", 14, "Home", 36, "VK_HOME", o, o],
[1, 81, "PageUp", 11, "PageUp", 33, "VK_PRIOR", o, o],
[1, 82, "Delete", 20, "Delete", 46, "VK_DELETE", o, o],
[1, 83, "End", 13, "End", 35, "VK_END", o, o],
[1, 84, "PageDown", 12, "PageDown", 34, "VK_NEXT", o, o],
[1, 85, "ArrowRight", 17, "RightArrow", 39, "VK_RIGHT", "Right", o],
[1, 86, "ArrowLeft", 15, "LeftArrow", 37, "VK_LEFT", "Left", o],
[1, 87, "ArrowDown", 18, "DownArrow", 40, "VK_DOWN", "Down", o],
[1, 88, "ArrowUp", 16, "UpArrow", 38, "VK_UP", "Up", o],
[1, 89, "NumLock", 83, "NumLock", 144, "VK_NUMLOCK", o, o],
[1, 90, "NumpadDivide", 113, "NumPad_Divide", 111, "VK_DIVIDE", o, o],
[1, 91, "NumpadMultiply", 108, "NumPad_Multiply", 106, "VK_MULTIPLY", o, o],
[1, 92, "NumpadSubtract", 111, "NumPad_Subtract", 109, "VK_SUBTRACT", o, o],
[1, 93, "NumpadAdd", 109, "NumPad_Add", 107, "VK_ADD", o, o],
[1, 94, "NumpadEnter", 3, o, 0, o, o, o],
[1, 95, "Numpad1", 99, "NumPad1", 97, "VK_NUMPAD1", o, o],
[1, 96, "Numpad2", 100, "NumPad2", 98, "VK_NUMPAD2", o, o],
[1, 97, "Numpad3", 101, "NumPad3", 99, "VK_NUMPAD3", o, o],
[1, 98, "Numpad4", 102, "NumPad4", 100, "VK_NUMPAD4", o, o],
[1, 99, "Numpad5", 103, "NumPad5", 101, "VK_NUMPAD5", o, o],
[1, 100, "Numpad6", 104, "NumPad6", 102, "VK_NUMPAD6", o, o],
[1, 101, "Numpad7", 105, "NumPad7", 103, "VK_NUMPAD7", o, o],
[1, 102, "Numpad8", 106, "NumPad8", 104, "VK_NUMPAD8", o, o],
[1, 103, "Numpad9", 107, "NumPad9", 105, "VK_NUMPAD9", o, o],
[1, 104, "Numpad0", 98, "NumPad0", 96, "VK_NUMPAD0", o, o],
[1, 105, "NumpadDecimal", 112, "NumPad_Decimal", 110, "VK_DECIMAL", o, o],
[0, 106, "IntlBackslash", 97, "OEM_102", 226, "VK_OEM_102", o, o],
[1, 107, "ContextMenu", 58, "ContextMenu", 93, o, o, o],
[1, 108, "Power", 0, o, 0, o, o, o],
[1, 109, "NumpadEqual", 0, o, 0, o, o, o],
[1, 110, "F13", 71, "F13", 124, "VK_F13", o, o],
[1, 111, "F14", 72, "F14", 125, "VK_F14", o, o],
[1, 112, "F15", 73, "F15", 126, "VK_F15", o, o],
[1, 113, "F16", 74, "F16", 127, "VK_F16", o, o],
[1, 114, "F17", 75, "F17", 128, "VK_F17", o, o],
[1, 115, "F18", 76, "F18", 129, "VK_F18", o, o],
[1, 116, "F19", 77, "F19", 130, "VK_F19", o, o],
[1, 117, "F20", 78, "F20", 131, "VK_F20", o, o],
[1, 118, "F21", 79, "F21", 132, "VK_F21", o, o],
[1, 119, "F22", 80, "F22", 133, "VK_F22", o, o],
[1, 120, "F23", 81, "F23", 134, "VK_F23", o, o],
[1, 121, "F24", 82, "F24", 135, "VK_F24", o, o],
[1, 122, "Open", 0, o, 0, o, o, o],
[1, 123, "Help", 0, o, 0, o, o, o],
[1, 124, "Select", 0, o, 0, o, o, o],
[1, 125, "Again", 0, o, 0, o, o, o],
[1, 126, "Undo", 0, o, 0, o, o, o],
[1, 127, "Cut", 0, o, 0, o, o, o],
[1, 128, "Copy", 0, o, 0, o, o, o],
[1, 129, "Paste", 0, o, 0, o, o, o],
[1, 130, "Find", 0, o, 0, o, o, o],
[1, 131, "AudioVolumeMute", 117, "AudioVolumeMute", 173, "VK_VOLUME_MUTE", o, o],
[1, 132, "AudioVolumeUp", 118, "AudioVolumeUp", 175, "VK_VOLUME_UP", o, o],
[1, 133, "AudioVolumeDown", 119, "AudioVolumeDown", 174, "VK_VOLUME_DOWN", o, o],
[1, 134, "NumpadComma", 110, "NumPad_Separator", 108, "VK_SEPARATOR", o, o],
[0, 135, "IntlRo", 115, "ABNT_C1", 193, "VK_ABNT_C1", o, o],
[1, 136, "KanaMode", 0, o, 0, o, o, o],
[0, 137, "IntlYen", 0, o, 0, o, o, o],
[1, 138, "Convert", 0, o, 0, o, o, o],
[1, 139, "NonConvert", 0, o, 0, o, o, o],
[1, 140, "Lang1", 0, o, 0, o, o, o],
[1, 141, "Lang2", 0, o, 0, o, o, o],
[1, 142, "Lang3", 0, o, 0, o, o, o],
[1, 143, "Lang4", 0, o, 0, o, o, o],
[1, 144, "Lang5", 0, o, 0, o, o, o],
[1, 145, "Abort", 0, o, 0, o, o, o],
[1, 146, "Props", 0, o, 0, o, o, o],
[1, 147, "NumpadParenLeft", 0, o, 0, o, o, o],
[1, 148, "NumpadParenRight", 0, o, 0, o, o, o],
[1, 149, "NumpadBackspace", 0, o, 0, o, o, o],
[1, 150, "NumpadMemoryStore", 0, o, 0, o, o, o],
[1, 151, "NumpadMemoryRecall", 0, o, 0, o, o, o],
[1, 152, "NumpadMemoryClear", 0, o, 0, o, o, o],
[1, 153, "NumpadMemoryAdd", 0, o, 0, o, o, o],
[1, 154, "NumpadMemorySubtract", 0, o, 0, o, o, o],
[1, 155, "NumpadClear", 131, "Clear", 12, "VK_CLEAR", o, o],
[1, 156, "NumpadClearEntry", 0, o, 0, o, o, o],
[1, 0, o, 5, "Ctrl", 17, "VK_CONTROL", o, o],
[1, 0, o, 4, "Shift", 16, "VK_SHIFT", o, o],
[1, 0, o, 6, "Alt", 18, "VK_MENU", o, o],
[1, 0, o, 57, "Meta", 91, "VK_COMMAND", o, o],
[1, 157, "ControlLeft", 5, o, 0, "VK_LCONTROL", o, o],
[1, 158, "ShiftLeft", 4, o, 0, "VK_LSHIFT", o, o],
[1, 159, "AltLeft", 6, o, 0, "VK_LMENU", o, o],
[1, 160, "MetaLeft", 57, o, 0, "VK_LWIN", o, o],
[1, 161, "ControlRight", 5, o, 0, "VK_RCONTROL", o, o],
[1, 162, "ShiftRight", 4, o, 0, "VK_RSHIFT", o, o],
[1, 163, "AltRight", 6, o, 0, "VK_RMENU", o, o],
[1, 164, "MetaRight", 57, o, 0, "VK_RWIN", o, o],
[1, 165, "BrightnessUp", 0, o, 0, o, o, o],
[1, 166, "BrightnessDown", 0, o, 0, o, o, o],
[1, 167, "MediaPlay", 0, o, 0, o, o, o],
[1, 168, "MediaRecord", 0, o, 0, o, o, o],
[1, 169, "MediaFastForward", 0, o, 0, o, o, o],
[1, 170, "MediaRewind", 0, o, 0, o, o, o],
[1, 171, "MediaTrackNext", 124, "MediaTrackNext", 176, "VK_MEDIA_NEXT_TRACK", o, o],
[1, 172, "MediaTrackPrevious", 125, "MediaTrackPrevious", 177, "VK_MEDIA_PREV_TRACK", o, o],
[1, 173, "MediaStop", 126, "MediaStop", 178, "VK_MEDIA_STOP", o, o],
[1, 174, "Eject", 0, o, 0, o, o, o],
[1, 175, "MediaPlayPause", 127, "MediaPlayPause", 179, "VK_MEDIA_PLAY_PAUSE", o, o],
[1, 176, "MediaSelect", 128, "LaunchMediaPlayer", 181, "VK_MEDIA_LAUNCH_MEDIA_SELECT", o, o],
[1, 177, "LaunchMail", 129, "LaunchMail", 180, "VK_MEDIA_LAUNCH_MAIL", o, o],
[1, 178, "LaunchApp2", 130, "LaunchApp2", 183, "VK_MEDIA_LAUNCH_APP2", o, o],
[1, 179, "LaunchApp1", 0, o, 0, "VK_MEDIA_LAUNCH_APP1", o, o],
[1, 180, "SelectTask", 0, o, 0, o, o, o],
[1, 181, "LaunchScreenSaver", 0, o, 0, o, o, o],
[1, 182, "BrowserSearch", 120, "BrowserSearch", 170, "VK_BROWSER_SEARCH", o, o],
[1, 183, "BrowserHome", 121, "BrowserHome", 172, "VK_BROWSER_HOME", o, o],
[1, 184, "BrowserBack", 122, "BrowserBack", 166, "VK_BROWSER_BACK", o, o],
[1, 185, "BrowserForward", 123, "BrowserForward", 167, "VK_BROWSER_FORWARD", o, o],
[1, 186, "BrowserStop", 0, o, 0, "VK_BROWSER_STOP", o, o],
[1, 187, "BrowserRefresh", 0, o, 0, "VK_BROWSER_REFRESH", o, o],
[1, 188, "BrowserFavorites", 0, o, 0, "VK_BROWSER_FAVORITES", o, o],
[1, 189, "ZoomToggle", 0, o, 0, o, o, o],
[1, 190, "MailReply", 0, o, 0, o, o, o],
[1, 191, "MailForward", 0, o, 0, o, o, o],
[1, 192, "MailSend", 0, o, 0, o, o, o],
// See https://lists.w3.org/Archives/Public/www-dom/2010JulSep/att-0182/keyCode-spec.html
// If an Input Method Editor is processing key input and the event is keydown, return 229.
[1, 0, o, 114, "KeyInComposition", 229, o, o, o],
[1, 0, o, 116, "ABNT_C2", 194, "VK_ABNT_C2", o, o],
[1, 0, o, 96, "OEM_8", 223, "VK_OEM_8", o, o],
[1, 0, o, 0, o, 0, "VK_KANA", o, o],
[1, 0, o, 0, o, 0, "VK_HANGUL", o, o],
[1, 0, o, 0, o, 0, "VK_JUNJA", o, o],
[1, 0, o, 0, o, 0, "VK_FINAL", o, o],
[1, 0, o, 0, o, 0, "VK_HANJA", o, o],
[1, 0, o, 0, o, 0, "VK_KANJI", o, o],
[1, 0, o, 0, o, 0, "VK_CONVERT", o, o],
[1, 0, o, 0, o, 0, "VK_NONCONVERT", o, o],
[1, 0, o, 0, o, 0, "VK_ACCEPT", o, o],
[1, 0, o, 0, o, 0, "VK_MODECHANGE", o, o],
[1, 0, o, 0, o, 0, "VK_SELECT", o, o],
[1, 0, o, 0, o, 0, "VK_PRINT", o, o],
[1, 0, o, 0, o, 0, "VK_EXECUTE", o, o],
[1, 0, o, 0, o, 0, "VK_SNAPSHOT", o, o],
[1, 0, o, 0, o, 0, "VK_HELP", o, o],
[1, 0, o, 0, o, 0, "VK_APPS", o, o],
[1, 0, o, 0, o, 0, "VK_PROCESSKEY", o, o],
[1, 0, o, 0, o, 0, "VK_PACKET", o, o],
[1, 0, o, 0, o, 0, "VK_DBE_SBCSCHAR", o, o],
[1, 0, o, 0, o, 0, "VK_DBE_DBCSCHAR", o, o],
[1, 0, o, 0, o, 0, "VK_ATTN", o, o],
[1, 0, o, 0, o, 0, "VK_CRSEL", o, o],
[1, 0, o, 0, o, 0, "VK_EXSEL", o, o],
[1, 0, o, 0, o, 0, "VK_EREOF", o, o],
[1, 0, o, 0, o, 0, "VK_PLAY", o, o],
[1, 0, o, 0, o, 0, "VK_ZOOM", o, o],
[1, 0, o, 0, o, 0, "VK_NONAME", o, o],
[1, 0, o, 0, o, 0, "VK_PA1", o, o],
[1, 0, o, 0, o, 0, "VK_OEM_CLEAR", o, o]
], t = [], i = [];
for (const n of e) {
const [s, r, a, l, c, d, h, u, g] = n;
if (i[r] || (i[r] = !0, YY[a] = r, XY[a.toLowerCase()] = r, s && (yO[r] = l)), !t[l]) {
if (t[l] = !0, !c)
throw new Error(`String representation missing for key code ${l} around scan code ${a}`);
rS.define(l, c), fT.define(l, u || c), mT.define(l, g || u || c);
}
d && (fV[d] = l);
}
})();
var Uc;
(function(o) {
function e(a) {
return rS.keyCodeToStr(a);
}
o.toString = e;
function t(a) {
return rS.strToKeyCode(a);
}
o.fromString = t;
function i(a) {
return fT.keyCodeToStr(a);
}
o.toUserSettingsUS = i;
function n(a) {
return mT.keyCodeToStr(a);
}
o.toUserSettingsGeneral = n;
function s(a) {
return fT.strToKeyCode(a) || mT.strToKeyCode(a);
}
o.fromUserSettings = s;
function r(a) {
if (a >= 98 && a <= 113)
return null;
switch (a) {
case 16:
return "Up";
case 18:
return "Down";
case 15:
return "Left";
case 17:
return "Right";
}
return rS.keyCodeToStr(a);
}
o.toElectronAccelerator = r;
})(Uc || (Uc = {}));
function vn(o, e) {
const t = (e & 65535) << 16 >>> 0;
return (o | t) >>> 0;
}
class QY {
constructor() {
this.listeners = [], this.unexpectedErrorHandler = function(e) {
setTimeout(() => {
throw e.stack ? m_.isErrorNoTelemetry(e) ? new m_(e.message + `
` + e.stack) : new Error(e.message + `
` + e.stack) : e;
}, 0);
};
}
emit(e) {
this.listeners.forEach((t) => {
t(e);
});
}
onUnexpectedError(e) {
this.unexpectedErrorHandler(e), this.emit(e);
}
// For external errors, we don't want the listeners to be called
onUnexpectedExternalError(e) {
this.unexpectedErrorHandler(e);
}
}
const mV = new QY();
function lt(o) {
va(o) || mV.onUnexpectedError(o);
}
function nn(o) {
va(o) || mV.onUnexpectedExternalError(o);
}
function x8(o) {
if (o instanceof Error) {
const { name: e, message: t } = o, i = o.stacktrace || o.stack;
return {
$isError: !0,
name: e,
message: t,
stack: i,
noTelemetry: m_.isErrorNoTelemetry(o)
};
}
return o;
}
const qS = "Canceled";
function va(o) {
return o instanceof ua ? !0 : o instanceof Error && o.name === qS && o.message === qS;
}
class ua extends Error {
constructor() {
super(qS), this.name = this.message;
}
}
function JY() {
const o = new Error(qS);
return o.name = o.message, o;
}
function Or(o) {
return o ? new Error(`Illegal argument: ${o}`) : new Error("Illegal argument");
}
function xO(o) {
return o ? new Error(`Illegal state: ${o}`) : new Error("Illegal state");
}
class eX extends Error {
constructor(e) {
super("NotSupported"), e && (this.message = e);
}
}
class m_ extends Error {
constructor(e) {
super(e), this.name = "CodeExpectedError";
}
static fromError(e) {
if (e instanceof m_)
return e;
const t = new m_();
return t.message = e.message, t.stack = e.stack, t;
}
static isErrorNoTelemetry(e) {
return e.name === "CodeExpectedError";
}
}
class Gt extends Error {
constructor(e) {
super(e || "An unexpected bug occurred."), Object.setPrototypeOf(this, Gt.prototype);
}
}
function pT(o, e) {
if (typeof o == "number") {
if (o === 0)
return null;
const t = (o & 65535) >>> 0, i = (o & 4294901760) >>> 16;
return i !== 0 ? new oI([
$C(t, e),
$C(i, e)
]) : new oI([$C(t, e)]);
} else {
const t = [];
for (let i = 0; i < o.length; i++)
t.push($C(o[i], e));
return new oI(t);
}
}
function $C(o, e) {
const t = !!(o & 2048), i = !!(o & 256), n = e === 2 ? i : t, s = !!(o & 1024), r = !!(o & 512), a = e === 2 ? t : i, l = o & 255;
return new md(n, s, r, a, l);