@inpageedit/core 0.13.1 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/LICENSE +20 -20
  2. package/dist/{BasePlugin-Bf2UuIHF.js → BasePlugin-CU8beLYu.js} +17 -26
  3. package/dist/BasePlugin-CU8beLYu.js.map +1 -0
  4. package/dist/IconQuickEdit-CMCQncyj.js.map +1 -1
  5. package/dist/InputBox-nQKtiWtZ.js.map +1 -1
  6. package/dist/{PluginPrefSync-Dn1Xsiqz.js → PluginPrefSync-B-gPsC2n.js} +124 -128
  7. package/dist/PluginPrefSync-B-gPsC2n.js.map +1 -0
  8. package/dist/PluginStoreApp-CDteVCBG.js +453 -0
  9. package/dist/PluginStoreApp-CDteVCBG.js.map +1 -0
  10. package/dist/{endpoints-DgyuoRZd.js → Preferences-85Q9FAmb.js} +589 -565
  11. package/dist/Preferences-85Q9FAmb.js.map +1 -0
  12. package/dist/WatchlistAction-BbNAyryN.js.map +1 -1
  13. package/dist/components/index.js.map +1 -1
  14. package/dist/{index-DqA6EAM6.js → index-19CgGBI0.js} +1419 -921
  15. package/dist/index-19CgGBI0.js.map +1 -0
  16. package/dist/{index-B7c6jL9x.js → index-BKIf3i0I.js} +146 -137
  17. package/dist/index-BKIf3i0I.js.map +1 -0
  18. package/dist/{index-CCRMmnwk.js → index-BrtFJ-M0.js} +67 -66
  19. package/dist/index-BrtFJ-M0.js.map +1 -0
  20. package/dist/index-CG38LlAh.js.map +1 -1
  21. package/dist/index-CM_6yF2v.js.map +1 -1
  22. package/dist/index-CQr1DJ8n.js +173 -0
  23. package/dist/index-CQr1DJ8n.js.map +1 -0
  24. package/dist/{index-BQ-cHWkJ.js → index-CVTBg5O9.js} +66 -48
  25. package/dist/index-CVTBg5O9.js.map +1 -0
  26. package/dist/index-Ci82vLXg.js +179 -0
  27. package/dist/index-Ci82vLXg.js.map +1 -0
  28. package/dist/{index-BwdWyHLe.js → index-D3iZhRMJ.js} +93 -93
  29. package/dist/index-D3iZhRMJ.js.map +1 -0
  30. package/dist/index-DD5CVCfD.js.map +1 -1
  31. package/dist/{index-BJ7_Q1mB.js → index-DGtq21uW.js} +17 -16
  32. package/dist/index-DGtq21uW.js.map +1 -0
  33. package/dist/index-DXL7teb0.js +394 -0
  34. package/dist/index-DXL7teb0.js.map +1 -0
  35. package/dist/index-DjPpAyfE.js +116 -0
  36. package/dist/index-DjPpAyfE.js.map +1 -0
  37. package/dist/{index-eSlbrNqF.js → index-rpiO9fpc.js} +4 -5
  38. package/dist/{index-eSlbrNqF.js.map → index-rpiO9fpc.js.map} +1 -1
  39. package/dist/index.d.ts +318 -25
  40. package/dist/index.js +32 -26
  41. package/dist/index.js.map +1 -1
  42. package/dist/makeCallable-LDU0xZMJ.js.map +1 -1
  43. package/dist/models/index.js +174 -154
  44. package/dist/models/index.js.map +1 -1
  45. package/dist/noop-ClDc6zv4.js.map +1 -1
  46. package/dist/plugins/index.js +10 -10
  47. package/dist/services/index.js +1 -1
  48. package/dist/style.css +1 -1
  49. package/dist/vueHooks-l04s8cIl.js.map +1 -1
  50. package/lib/index.umd.js +20 -12
  51. package/lib/index.umd.js.map +1 -1
  52. package/lib/style.css +1 -1
  53. package/package.json +4 -4
  54. package/dist/BasePlugin-Bf2UuIHF.js.map +0 -1
  55. package/dist/PluginPrefSync-Dn1Xsiqz.js.map +0 -1
  56. package/dist/PluginStoreApp-CpOLArL7.js +0 -452
  57. package/dist/PluginStoreApp-CpOLArL7.js.map +0 -1
  58. package/dist/Preferences-DS4-CFWe.js +0 -9
  59. package/dist/Preferences-DS4-CFWe.js.map +0 -1
  60. package/dist/endpoints-DgyuoRZd.js.map +0 -1
  61. package/dist/index-2RfILgXm.js +0 -180
  62. package/dist/index-2RfILgXm.js.map +0 -1
  63. package/dist/index-B7c6jL9x.js.map +0 -1
  64. package/dist/index-BJ7_Q1mB.js.map +0 -1
  65. package/dist/index-BNh95-x2.js +0 -115
  66. package/dist/index-BNh95-x2.js.map +0 -1
  67. package/dist/index-BQ-cHWkJ.js.map +0 -1
  68. package/dist/index-BwdWyHLe.js.map +0 -1
  69. package/dist/index-CCRMmnwk.js.map +0 -1
  70. package/dist/index-CnIpUF9x.js +0 -173
  71. package/dist/index-CnIpUF9x.js.map +0 -1
  72. package/dist/index-CyG7_IYz.js +0 -394
  73. package/dist/index-CyG7_IYz.js.map +0 -1
  74. package/dist/index-DqA6EAM6.js.map +0 -1
@@ -1,11 +1,10 @@
1
- import { j as _, P as Ae, F as Le } from "./index-CM_6yF2v.js";
2
- import { a as re, m as te, u as ae, b as oe, e as D, o as Ie, f as le, g as Me, w as J, n as U, h as M, i as Pe, j as Fe, t as je, k as De, s as Te, r as H, l as z, p as Re, q as O, v as G, F as He, x as Oe, y as qe, z as ne, A as Ue, B as se, c as Be } from "./vueHooks-l04s8cIl.js";
3
- import { S as Ve, I as ze } from "./endpoints-DgyuoRZd.js";
1
+ import { j as _, P as Ae, F as Ie } from "./index-CM_6yF2v.js";
2
+ import { a as re, m as te, u as ae, b as oe, e as T, o as Le, f as le, g as Fe, w as J, n as U, h as F, i as Me, j as Pe, t as je, k as Te, s as De, r as O, l as z, p as Re, q, v as G, F as Oe, x as qe, y as He, z as se, A as Ue, B as ne, c as Be } from "./vueHooks-l04s8cIl.js";
3
+ import { S as Ve, I as ze } from "./Preferences-85Q9FAmb.js";
4
4
  import { n as Ge } from "./noop-ClDc6zv4.js";
5
5
  import { _ as Je } from "./_plugin-vue_export-helper-CHgC5LLL.js";
6
- import { B as We } from "./BasePlugin-Bf2UuIHF.js";
7
- const k = '@charset "UTF-8";:host{display:block;font-family:var(--schema-font-family, ui-sans-serif, system-ui, -apple-system);color:var(--schema-color-fg, #111827)}*,*:before,*:after{box-sizing:border-box}.wrapper{display:block;background:var(--schema-color-bg, #ffffff)}.form{display:grid;gap:12px}.field{display:grid;gap:6px;padding:8px 10px;border:1px solid var(--schema-color-muted, #e5e7eb);border-radius:var(--schema-radius, 10px);background:var(--schema-surface, #fff)}.label{font-size:12px;color:var(--schema-color-muted-text, #6b7280)}.input,select,textarea{width:100%;padding:8px 10px;border-radius:8px;border:1px solid var(--schema-color-muted, #e5e7eb);background:var(--schema-input-bg, #fff);color:inherit}.checkbox{display:inline-flex;align-items:center;gap:8px}.helper{font-size:12px;color:var(--schema-color-muted-text, #6b7280)}.row{display:grid;gap:8px}.actions{display:flex;gap:8px}.btn{padding:6px 10px;border:1px solid var(--schema-color-muted, #e5e7eb);background:var(--schema-btn-bg, #f8fafc);border-radius:8px;cursor:pointer}.btn.primary{background:var(--schema-color-primary, #2563eb);color:#fff;border-color:transparent}.btn:disabled{opacity:.5;cursor:not-allowed}.btn.danger{background:var(--schema-color-danger, #dc2626);color:#fff;border-color:transparent}.group{display:grid;gap:10px}.kv{display:grid;grid-template-columns:1fr 1fr auto;gap:8px;align-items:center}.badge{display:inline-flex;padding:2px 6px;border-radius:999px;font-size:11px;background:var(--schema-badge-bg, #eef2ff);color:var(--schema-badge-fg, #4f46e5)}.hidden{display:none!important}.toolbar{display:flex;gap:6px}.schema-collection-row{position:relative;transition:transform var(--schema-collection-transition-duration, .25s) var(--schema-collection-transition-ease, ease),opacity var(--schema-collection-transition-duration, .25s) var(--schema-collection-transition-ease, ease)}.schema-collection-row.enter{opacity:0}.schema-collection-row.enter.enter-active{opacity:1}.schema-collection-row.leaving{opacity:0}.field.schema-type-array .group,.field.schema-type-array .group .row{position:relative}';
8
- const ce = {
6
+ import { B as We } from "./BasePlugin-CU8beLYu.js";
7
+ const k = '@charset "UTF-8";:host{display:block;font-family:var(--schema-font-family, ui-sans-serif, system-ui, -apple-system);color:var(--schema-color-fg, #111827)}*,*:before,*:after{box-sizing:border-box}.wrapper{display:block;background:var(--schema-color-bg, #ffffff)}.form{display:grid;gap:12px}.field{display:grid;gap:6px;padding:8px 10px;border:1px solid var(--schema-color-muted, #e5e7eb);border-radius:var(--schema-radius, 10px);background:var(--schema-surface, #fff)}.label{font-size:12px;color:var(--schema-color-muted-text, #6b7280)}.input,select,textarea{width:100%;padding:8px 10px;border-radius:8px;border:1px solid var(--schema-color-muted, #e5e7eb);background:var(--schema-input-bg, #fff);color:inherit}.checkbox{display:inline-flex;align-items:center;gap:8px}.helper{font-size:12px;color:var(--schema-color-muted-text, #6b7280)}.row{display:grid;gap:8px}.actions{display:flex;gap:8px}.btn{padding:6px 10px;border:1px solid var(--schema-color-muted, #e5e7eb);background:var(--schema-btn-bg, #f8fafc);border-radius:8px;cursor:pointer}.btn.primary{background:var(--schema-color-primary, #2563eb);color:#fff;border-color:transparent}.btn:disabled{opacity:.5;cursor:not-allowed}.btn.danger{background:var(--schema-color-danger, #dc2626);color:#fff;border-color:transparent}.group{display:grid;gap:10px}.kv{display:grid;grid-template-columns:1fr 1fr auto;gap:8px;align-items:center}.badge{display:inline-flex;padding:2px 6px;border-radius:999px;font-size:11px;background:var(--schema-badge-bg, #eef2ff);color:var(--schema-badge-fg, #4f46e5)}.hidden{display:none!important}.toolbar{display:flex;gap:6px}.schema-collection-row{position:relative;transition:transform var(--schema-collection-transition-duration, .25s) var(--schema-collection-transition-ease, ease),opacity var(--schema-collection-transition-duration, .25s) var(--schema-collection-transition-ease, ease)}.schema-collection-row.enter{opacity:0}.schema-collection-row.enter.enter-active{opacity:1}.schema-collection-row.leaving{opacity:0}.field.schema-type-array .group,.field.schema-type-array .group .row{position:relative}', ce = {
9
8
  arrayAdd: "+",
10
9
  arrayMoveUp: "↑",
11
10
  arrayMoveDown: "↓",
@@ -40,7 +39,7 @@ const ce = {
40
39
  } catch {
41
40
  }
42
41
  }
43
- }, R = (n) => n.map(String).join("."), Xe = (n) => n.replace(/[^a-zA-Z0-9_-]/g, "_"), L = (n) => `schema_${Xe(R(n) || "root")}`, F = (n) => R(n), p = (n, ...e) => {
42
+ }, R = (n) => n.map(String).join("."), Xe = (n) => n.replace(/[^a-zA-Z0-9_-]/g, "_"), I = (n) => `schema_${Xe(R(n) || "root")}`, P = (n) => R(n), p = (n, ...e) => {
44
43
  const s = new Set(e);
45
44
  s.size && n.setAttribute("part", Array.from(s).join(" "));
46
45
  }, Ye = [
@@ -255,7 +254,7 @@ class ue extends S {
255
254
  }
256
255
  this.$root.innerHTML = `<style>${k}</style>`;
257
256
  const e = N(this._schema), s = this.makeFieldContainer("string", e.description), a = document.createElement("input");
258
- this.$input = a, a.className = "input", p(a, "field-input", "field-input-text"), a.type = "text", a.name = F(this._path), a.id = L(this._path), e?.pattern?.source && (a.pattern = e.pattern.source), e?.max != null && (a.maxLength = e.max), a.value = this._value ?? "", a.oninput = () => this.emitChange(X("string", a.value));
257
+ this.$input = a, a.className = "input", p(a, "field-input", "field-input-text"), a.type = "text", a.name = P(this._path), a.id = I(this._path), e?.pattern?.source && (a.pattern = e.pattern.source), e?.max != null && (a.maxLength = e.max), a.value = this._value ?? "", a.oninput = () => this.emitChange(X("string", a.value));
259
258
  const t = s.querySelector("label.label");
260
259
  t && (t.htmlFor = a.id), s.appendChild(a), this.$root.appendChild(s);
261
260
  }
@@ -273,7 +272,7 @@ class he extends S {
273
272
  }
274
273
  this.$root.innerHTML = `<style>${k}</style>`;
275
274
  const e = this._schema?.type ?? "number", s = N(this._schema), a = this.makeFieldContainer("number", s.description), t = document.createElement("input");
276
- this.$input = t, t.className = "input", p(t, "field-input", "field-input-number"), t.name = F(this._path), t.id = L(this._path), s?.min != null && (t.min = String(s.min)), s?.max != null && (t.max = String(s.max)), s?.step != null && (t.step = String(s.step)), e === "percent" && !t.step && (t.step = "0.01"), t.value = this._value ?? "", t.oninput = () => this.emitChange(X(e, t.value));
275
+ this.$input = t, t.className = "input", p(t, "field-input", "field-input-number"), t.name = P(this._path), t.id = I(this._path), s?.min != null && (t.min = String(s.min)), s?.max != null && (t.max = String(s.max)), s?.step != null && (t.step = String(s.step)), e === "percent" && !t.step && (t.step = "0.01"), t.value = this._value ?? "", t.oninput = () => this.emitChange(X(e, t.value));
277
276
  const r = a.querySelector("label.label");
278
277
  r && (r.htmlFor = t.id), s.role === "slider" ? t.type = "range" : t.type = "number", a.appendChild(t), this.$root.appendChild(a);
279
278
  }
@@ -285,7 +284,7 @@ class me extends S {
285
284
  const e = N(this._schema), s = this.makeFieldContainer("boolean", e.description), a = document.createElement("label");
286
285
  a.className = "checkbox", p(a, "field-checkbox");
287
286
  const t = document.createElement("input");
288
- t.type = "checkbox", t.checked = !!this._value, t.name = F(this._path), t.id = L(this._path), p(t, "field-input", "field-input-checkbox");
287
+ t.type = "checkbox", t.checked = !!this._value, t.name = P(this._path), t.id = I(this._path), p(t, "field-input", "field-input-checkbox");
289
288
  const r = document.createElement("span");
290
289
  r.textContent = e.description ?? this._label ?? "", p(r, "field-checkbox-text"), t.onchange = () => this.emitChange(t.checked);
291
290
  const i = s.querySelector("label.label");
@@ -296,14 +295,14 @@ b("schema-form-boolean", me);
296
295
  function B(n) {
297
296
  return String(n).padStart(2, "0");
298
297
  }
299
- function T(n) {
298
+ function D(n) {
300
299
  return `${n.getFullYear()}-${B(n.getMonth() + 1)}-${B(n.getDate())}`;
301
300
  }
302
301
  function W(n) {
303
302
  return `${B(n.getHours())}:${B(n.getMinutes())}`;
304
303
  }
305
- function q(n) {
306
- return `${T(n)}T${W(n)}`;
304
+ function H(n) {
305
+ return `${D(n)}T${W(n)}`;
307
306
  }
308
307
  class pe extends S {
309
308
  render() {
@@ -313,10 +312,10 @@ class pe extends S {
313
312
  const o = N(this._schema).role || "date";
314
313
  if (document.activeElement !== this.$input)
315
314
  if (this._value instanceof Date)
316
- o === "date" ? this.$input.value = T(this._value) : o === "time" ? this.$input.value = W(this._value) : o === "datetime" && (this.$input.value = q(this._value));
315
+ o === "date" ? this.$input.value = D(this._value) : o === "time" ? this.$input.value = W(this._value) : o === "datetime" && (this.$input.value = H(this._value));
317
316
  else if (typeof this._value == "string" && o !== "time") {
318
317
  const c = new Date(this._value);
319
- isNaN(+c) || (o === "date" ? this.$input.value = T(c) : o === "datetime" && (this.$input.value = q(c)));
318
+ isNaN(+c) || (o === "date" ? this.$input.value = D(c) : o === "datetime" && (this.$input.value = H(c)));
320
319
  } else this._value || (this.$input.value = "");
321
320
  return;
322
321
  }
@@ -325,11 +324,11 @@ class pe extends S {
325
324
  const e = N(this._schema), s = this.makeFieldContainer("date", e.description), a = document.createElement("input");
326
325
  this.$input = a, a.className = "input", p(a, "field-input", "field-input-date");
327
326
  const t = e.role || "date";
328
- if (t === "datetime" ? a.type = "datetime-local" : t === "time" ? a.type = "time" : a.type = "date", a.name = F(this._path), a.id = L(this._path), this._value instanceof Date)
329
- t === "date" ? a.value = T(this._value) : t === "time" ? a.value = W(this._value) : t === "datetime" && (a.value = q(this._value));
327
+ if (t === "datetime" ? a.type = "datetime-local" : t === "time" ? a.type = "time" : a.type = "date", a.name = P(this._path), a.id = I(this._path), this._value instanceof Date)
328
+ t === "date" ? a.value = D(this._value) : t === "time" ? a.value = W(this._value) : t === "datetime" && (a.value = H(this._value));
330
329
  else if (typeof this._value == "string" && t !== "time") {
331
330
  const i = new Date(this._value);
332
- isNaN(+i) || (t === "date" ? a.value = T(i) : t === "datetime" && (a.value = q(i)));
331
+ isNaN(+i) || (t === "date" ? a.value = D(i) : t === "datetime" && (a.value = H(i)));
333
332
  }
334
333
  a.oninput = () => {
335
334
  e.role;
@@ -365,7 +364,7 @@ class Y extends S {
365
364
  }
366
365
  }
367
366
  const a = this.makeFieldContainer("const", e.description), t = document.createElement("section");
368
- t.className = "const content", t.textContent = String(s), t.id = L(this._path), p(t, "field-const-value");
367
+ t.className = "const content", t.textContent = String(s), t.id = I(this._path), p(t, "field-const-value");
369
368
  const r = a.querySelector("label.label");
370
369
  r && (r.htmlFor = t.id), a.appendChild(t), this.$root.appendChild(a);
371
370
  }
@@ -391,7 +390,7 @@ class fe extends S {
391
390
  if (r) {
392
391
  const o = this._value && typeof this._value == "object" ? this._value : {};
393
392
  t.forEach((c, h) => {
394
- const l = c?.meta?.description ?? "", m = I(c, this._path, o, l, this._i18n);
393
+ const l = c?.meta?.description ?? "", m = L(c, this._path, o, l, this._i18n);
395
394
  m.addEventListener("change", (u) => {
396
395
  u.stopPropagation();
397
396
  const f = i(this._value ?? {}, u.detail.value);
@@ -399,7 +398,7 @@ class fe extends S {
399
398
  }), a.appendChild(m);
400
399
  });
401
400
  } else {
402
- const o = t[t.length - 1], c = I(o, this._path, this._value, this._label, this._i18n);
401
+ const o = t[t.length - 1], c = L(o, this._path, this._value, this._label, this._i18n);
403
402
  c.addEventListener("change", (h) => {
404
403
  h.stopPropagation(), this.emitChange(h.detail.value);
405
404
  }), a.appendChild(c);
@@ -440,7 +439,7 @@ function Ke(n) {
440
439
  return "schema-form-string";
441
440
  }
442
441
  }
443
- function I(n, e, s, a, t) {
442
+ function L(n, e, s, a, t) {
444
443
  const r = Ke(n), i = document.createElement(r);
445
444
  return i.schema = n, i.path = e, i.label = a, t && (i.i18n = t), i.setValue?.(s), i.setAttribute("exportparts", Ye), i;
446
445
  }
@@ -450,7 +449,7 @@ class ve extends S {
450
449
  const e = N(this._schema), s = this.makeFieldContainer("union", e.description), a = this._schema.list || [];
451
450
  if (Ze(a)) {
452
451
  const t = document.createElement("select");
453
- t.className = "input", p(t, "field-input", "field-input-select"), t.name = F(this._path), t.id = L(this._path), a.forEach((i) => {
452
+ t.className = "input", p(t, "field-input", "field-input-select"), t.name = P(this._path), t.id = I(this._path), a.forEach((i) => {
454
453
  const o = document.createElement("option");
455
454
  o.value = String(i.value), o.textContent = String(i.meta?.description || i.value || i.type), this._value === i.value && (o.selected = !0), t.appendChild(o);
456
455
  }), t.onchange = () => this.emitChange(X("string", t.value));
@@ -460,7 +459,7 @@ class ve extends S {
460
459
  const t = document.createElement("div");
461
460
  t.className = "toolbar", p(t, "field-toolbar");
462
461
  const r = document.createElement("select");
463
- r.className = "input", p(r, "field-input", "field-input-select", "field-toolbar-select"), r.name = F(this._path) + ".__type", r.id = L(this._path) + "__type";
462
+ r.className = "input", p(r, "field-input", "field-input-select", "field-toolbar-select"), r.name = P(this._path) + ".__type", r.id = I(this._path) + "__type";
464
463
  let i = 0;
465
464
  a.forEach((l, m) => {
466
465
  const u = document.createElement("option");
@@ -476,7 +475,7 @@ class ve extends S {
476
475
  c.className = "group", p(c, "field-group");
477
476
  const h = () => {
478
477
  c.innerHTML = "";
479
- const l = a[i], m = I(l, this._path, this._value, this._label);
478
+ const l = a[i], m = L(l, this._path, this._value, this._label);
480
479
  m instanceof Y || (m.addEventListener("change", (u) => {
481
480
  u.stopPropagation(), this.emitChange(u.detail.value);
482
481
  }), c.appendChild(m));
@@ -494,7 +493,7 @@ class ge extends S {
494
493
  a.className = "group", p(a, "field-group");
495
494
  const t = Array.isArray(this._value) ? this._value : [];
496
495
  (this._schema.list || []).forEach((r, i) => {
497
- const o = I(
496
+ const o = L(
498
497
  r,
499
498
  [...this._path, i],
500
499
  t[i],
@@ -517,7 +516,7 @@ class _e extends S {
517
516
  const t = this._schema.dict || {};
518
517
  Object.keys(t).forEach((r) => {
519
518
  if (t[r]?.meta?.hidden) return;
520
- const i = (this._value ?? {})[r], o = I(t[r], [...this._path, r], i, r);
519
+ const i = (this._value ?? {})[r], o = L(t[r], [...this._path, r], i, r);
521
520
  o.addEventListener("change", (c) => {
522
521
  c.stopPropagation();
523
522
  const h = { ...this._value ?? {} };
@@ -578,33 +577,33 @@ class V extends S {
578
577
  d.className = "row schema-collection-row", p(d, "field-row", "collection-row");
579
578
  const g = this._itemIds[u];
580
579
  d.dataset.uid = g, d.setAttribute("data-path", R(f));
581
- const v = I(
580
+ const v = L(
582
581
  t,
583
582
  f,
584
583
  m,
585
584
  `${this._label ?? ""}[${u}]`
586
585
  );
587
- v.addEventListener("change", (E) => {
588
- E.stopPropagation();
586
+ v.addEventListener("change", ($) => {
587
+ $.stopPropagation();
589
588
  const x = r().slice();
590
- x[u] = E.detail.value, this._value = x, this.emitChange(x);
589
+ x[u] = $.detail.value, this._value = x, this.emitChange(x);
591
590
  });
592
591
  const C = document.createElement("div");
593
592
  C.className = "actions", p(C, "field-actions");
594
593
  const w = document.createElement("button");
595
594
  w.type = "button", w.className = "btn", p(w, "field-button", "field-button-secondary"), w.textContent = this._i18n.arrayMoveUp ?? "↑", w.onclick = () => {
596
595
  if (u <= 0) return;
597
- const E = this.capturePositions(a), x = r().slice();
596
+ const $ = this.capturePositions(a), x = r().slice();
598
597
  [x[u - 1], x[u]] = [x[u], x[u - 1]], [this._itemIds[u - 1], this._itemIds[u]] = [
599
598
  this._itemIds[u],
600
599
  this._itemIds[u - 1]
601
- ], this._value = x, i(E), this.emitChange(x);
600
+ ], this._value = x, i($), this.emitChange(x);
602
601
  };
603
- const $ = document.createElement("button");
604
- $.type = "button", $.className = "btn", p($, "field-button", "field-button-secondary"), $.textContent = this._i18n.arrayMoveDown ?? "↓", $.onclick = () => {
605
- const E = r();
606
- if (u >= E.length - 1) return;
607
- const x = this.capturePositions(a), A = E.slice();
602
+ const E = document.createElement("button");
603
+ E.type = "button", E.className = "btn", p(E, "field-button", "field-button-secondary"), E.textContent = this._i18n.arrayMoveDown ?? "↓", E.onclick = () => {
604
+ const $ = r();
605
+ if (u >= $.length - 1) return;
606
+ const x = this.capturePositions(a), A = $.slice();
608
607
  [A[u + 1], A[u]] = [A[u], A[u + 1]], [this._itemIds[u + 1], this._itemIds[u]] = [
609
608
  this._itemIds[u],
610
609
  this._itemIds[u + 1]
@@ -613,7 +612,7 @@ class V extends S {
613
612
  const y = document.createElement("button");
614
613
  y.type = "button", y.className = "btn danger", p(y, "field-button", "field-button-danger"), y.textContent = this._i18n.arrayRemove ?? "×", y.onclick = () => {
615
614
  d.classList.add("leaving");
616
- const E = 250;
615
+ const $ = 250;
617
616
  let x = !1;
618
617
  const A = () => {
619
618
  if (x) return;
@@ -624,8 +623,8 @@ class V extends S {
624
623
  this._value = ee, i(Ne), this.emitChange(ee);
625
624
  };
626
625
  d.addEventListener("transitionend", A, { once: !0 });
627
- const ke = setTimeout(A, E + 80);
628
- }, C.append(w, $, y), d.appendChild(v), d.appendChild(C), a.appendChild(d), l && l === g && (d.classList.add("enter"), requestAnimationFrame(() => {
626
+ const ke = setTimeout(A, $ + 80);
627
+ }, C.append(w, E, y), d.appendChild(v), d.appendChild(C), a.appendChild(d), l && l === g && (d.classList.add("enter"), requestAnimationFrame(() => {
629
628
  d.classList.add("enter-active");
630
629
  }), requestAnimationFrame(() => {
631
630
  d.classList.remove("enter");
@@ -672,25 +671,25 @@ class be extends S {
672
671
  const g = [...this._path, d], v = document.createElement("div");
673
672
  v.className = "kv schema-collection-row", p(v, "field-row", "collection-row"), v.dataset.uid = i(d), v.setAttribute("data-path", R(g));
674
673
  const C = document.createElement("input");
675
- C.className = "input", p(C, "field-input", "field-input-text"), C.value = d, C.name = F(g) + ".__key", C.id = L(g) + "__key";
676
- const w = I(t, g, r[d], `${this._label ?? ""}[${d}]`), $ = document.createElement("button");
677
- $.type = "button", $.className = "btn danger", p($, "field-button", "field-button-danger"), $.textContent = this._i18n.dictRemove ?? "×", $.onclick = () => {
674
+ C.className = "input", p(C, "field-input", "field-input-text"), C.value = d, C.name = P(g) + ".__key", C.id = I(g) + "__key";
675
+ const w = L(t, g, r[d], `${this._label ?? ""}[${d}]`), E = document.createElement("button");
676
+ E.type = "button", E.className = "btn danger", p(E, "field-button", "field-button-danger"), E.textContent = this._i18n.dictRemove ?? "×", E.onclick = () => {
678
677
  const y = o();
679
678
  delete r[d];
680
- const E = { ...this._value ?? {} };
681
- delete E[d], this._value = E, h(y), this.emitChange(E);
679
+ const $ = { ...this._value ?? {} };
680
+ delete $[d], this._value = $, h(y), this.emitChange($);
682
681
  }, C.onchange = () => {
683
682
  const y = C.value.trim();
684
683
  if (!y || y === d || r[y] !== void 0) return;
685
- const E = o();
684
+ const $ = o();
686
685
  r[y] = r[d], delete r[d];
687
686
  const x = { ...this._value ?? {} };
688
- x[y] = x[d], delete x[d], this._value = x, h(E), this.emitChange(x);
687
+ x[y] = x[d], delete x[d], this._value = x, h($), this.emitChange(x);
689
688
  }, w.addEventListener("change", (y) => {
690
689
  y.stopPropagation();
691
- const E = { ...this._value ?? {} };
692
- E[d] = y.detail.value, this._value = E, this.emitChange(E);
693
- }), v.append(C, w, $), a.appendChild(v), f === d && (v.classList.add("enter"), requestAnimationFrame(() => v.classList.add("enter-active")), requestAnimationFrame(() => v.classList.remove("enter")));
690
+ const $ = { ...this._value ?? {} };
691
+ $[d] = y.detail.value, this._value = $, this.emitChange($);
692
+ }), v.append(C, w, E), a.appendChild(v), f === d && (v.classList.add("enter"), requestAnimationFrame(() => v.classList.add("enter-active")), requestAnimationFrame(() => v.classList.remove("enter")));
694
693
  }), u && c(u);
695
694
  };
696
695
  h();
@@ -775,7 +774,7 @@ class ye extends HTMLElement {
775
774
  if (!this._schema) return;
776
775
  const e = this.$root.querySelector("form");
777
776
  e.innerHTML = "";
778
- const s = I(
777
+ const s = L(
779
778
  this._schema,
780
779
  [],
781
780
  this._state,
@@ -813,12 +812,12 @@ const tt = /* @__PURE__ */ re({
813
812
  o = !1;
814
813
  }), r("change", l.detail);
815
814
  };
816
- return Ie(() => {
815
+ return Le(() => {
817
816
  et();
818
817
  }), le(() => {
819
818
  const l = i.value;
820
819
  a.value && (l.schema = a.value), t.value !== void 0 && l.setData(t.value, { validate: !1, autofix: !0 }), l.addEventListener("form-change", h);
821
- }), Me(() => {
820
+ }), Fe(() => {
822
821
  i.value?.removeEventListener("form-change", h);
823
822
  }), J(
824
823
  a,
@@ -860,15 +859,15 @@ const tt = /* @__PURE__ */ re({
860
859
  },
861
860
  /** 原生元素 */
862
861
  el: i
863
- }), (l, m) => (M(), D("schema-form", Pe({
862
+ }), (l, m) => (F(), T("schema-form", Me({
864
863
  ref_key: "elRef",
865
864
  ref: i
866
865
  }, l.$attrs), null, 16));
867
866
  }
868
867
  });
869
- function P(n, e = /* @__PURE__ */ new WeakMap()) {
870
- if (Fe(n))
871
- return P(n.value, e);
868
+ function M(n, e = /* @__PURE__ */ new WeakMap()) {
869
+ if (Pe(n))
870
+ return M(n.value, e);
872
871
  if (n === null || typeof n != "object")
873
872
  return n;
874
873
  if (e.has(n))
@@ -880,40 +879,40 @@ function P(n, e = /* @__PURE__ */ new WeakMap()) {
880
879
  if (n instanceof Map) {
881
880
  const t = /* @__PURE__ */ new Map();
882
881
  return e.set(n, t), Array.from(n.entries()).forEach(([r, i]) => {
883
- t.set(r, P(i, e));
882
+ t.set(r, M(i, e));
884
883
  }), t;
885
884
  }
886
885
  if (n instanceof Set) {
887
886
  const t = /* @__PURE__ */ new Set();
888
887
  return e.set(n, t), Array.from(n).forEach((r) => {
889
- t.add(P(r, e));
888
+ t.add(M(r, e));
890
889
  }), t;
891
890
  }
892
891
  if (Array.isArray(n)) {
893
892
  const t = [];
894
893
  e.set(n, t);
895
894
  for (const r of n)
896
- t.push(P(r, e));
895
+ t.push(M(r, e));
897
896
  return t;
898
897
  }
899
898
  const s = je(n), a = {};
900
899
  e.set(n, a);
901
900
  for (const t of Object.keys(s))
902
- a[t] = P(s[t], e);
901
+ a[t] = M(s[t], e);
903
902
  for (const t of Object.getOwnPropertySymbols(s))
904
- a[t] = P(s[t], e);
903
+ a[t] = M(s[t], e);
905
904
  return a;
906
905
  }
907
- const at = { id: "preferences-ui-app" }, nt = { class: "tabbar" }, st = { class: "tabbar-tabs" }, it = ["onClick", "data-value"], rt = { class: "tabbar-content" }, ot = { key: 0 }, lt = { style: { "max-height": "20em", overflow: "auto" } }, ct = /* @__PURE__ */ re({
906
+ const at = { id: "preferences-ui-app" }, st = { class: "tabbar" }, nt = { class: "tabbar-tabs" }, it = ["onClick", "data-value"], rt = { class: "tabbar-content" }, ot = { key: 0 }, lt = { style: { "max-height": "20em", overflow: "auto" } }, ct = /* @__PURE__ */ re({
908
907
  __name: "PreferencesApp",
909
908
  setup(n, { expose: e }) {
910
- const s = De(), a = !1, t = Te([]), r = H([]), i = H(""), o = z(() => r.value.find((d) => d.name === i.value) || null), c = z(() => {
909
+ const s = Te(), a = !1, t = De([]), r = O([]), i = O(""), o = z(() => r.value.find((d) => d.name === i.value) || null), c = z(() => {
911
910
  const d = t.value.filter((g) => g.category === i.value).map((g) => g.schema);
912
911
  return d.length === 0 ? null : Ve.intersect(d);
913
- }), h = z(() => o.value && typeof o.value.autoGenerateForm == "boolean" ? o.value.autoGenerateForm : !0), l = H({});
912
+ }), h = z(() => o.value && typeof o.value.autoGenerateForm == "boolean" ? o.value.autoGenerateForm : !0), l = O({});
914
913
  e({
915
914
  getValue() {
916
- return P(l);
915
+ return M(l);
917
916
  },
918
917
  mergeValue(d) {
919
918
  l.value = {
@@ -934,7 +933,7 @@ const at = { id: "preferences-ui-app" }, nt = { class: "tabbar" }, st = { class:
934
933
  d.preventDefault(), i.value = g;
935
934
  const v = d.currentTarget;
936
935
  v && v.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "center" });
937
- }, u = oe("customRenderContainerRef"), f = H([]);
936
+ }, u = oe("customRenderContainerRef"), f = O([]);
938
937
  return Re(() => {
939
938
  f.value.forEach((d) => d()), f.value = [];
940
939
  }), J(
@@ -948,29 +947,29 @@ const at = { id: "preferences-ui-app" }, nt = { class: "tabbar" }, st = { class:
948
947
  v = y;
949
948
  }, w = (y) => {
950
949
  f.value.push(y);
951
- }, $ = await d.customRenderer({ ctx: s, onMounted: C, onUnmount: w });
952
- $ && (g.appendChild($), v?.(g));
950
+ }, E = await d.customRenderer({ ctx: s, onMounted: C, onUnmount: w });
951
+ E && (g.appendChild(E), v?.(g));
953
952
  }
954
953
  },
955
954
  { immediate: !0, deep: !1 }
956
- ), (d, g) => (M(), D("div", at, [
957
- O("div", nt, [
958
- O("div", st, [
959
- (M(!0), D(He, null, Oe(r.value, (v) => (M(), D("a", {
960
- class: qe(["tab", { active: i.value === v.name }]),
955
+ ), (d, g) => (F(), T("div", at, [
956
+ q("div", st, [
957
+ q("div", nt, [
958
+ (F(!0), T(Oe, null, qe(r.value, (v) => (F(), T("a", {
959
+ class: He(["tab", { active: i.value === v.name }]),
961
960
  key: v.name,
962
961
  onClick: (C) => m(C, v.name),
963
962
  "data-value": v.name
964
- }, ne(v.label), 11, it))), 128))
963
+ }, se(v.label), 11, it))), 128))
965
964
  ]),
966
- O("div", rt, [
967
- o.value && o.value.customRenderer ? (M(), D("div", {
965
+ q("div", rt, [
966
+ o.value && o.value.customRenderer ? (F(), T("div", {
968
967
  class: "custom-render-container",
969
968
  ref_key: "customRenderContainerRef",
970
969
  ref: u,
971
970
  key: i.value
972
971
  })) : G("", !0),
973
- h.value && c.value ? (M(), Ue(se(tt), {
972
+ h.value && c.value ? (F(), Ue(ne(tt), {
974
973
  class: "auto-schema-form",
975
974
  key: i.value,
976
975
  "data-category": i.value,
@@ -982,70 +981,79 @@ const at = { id: "preferences-ui-app" }, nt = { class: "tabbar" }, st = { class:
982
981
  }, null, 8, ["data-category", "schema", "value"])) : G("", !0)
983
982
  ])
984
983
  ]),
985
- se(a) ? (M(), D("details", ot, [
986
- O("pre", lt, ne(l.value), 1)
984
+ ne(a) ? (F(), T("details", ot, [
985
+ q("pre", lt, se(l.value), 1)
987
986
  ])) : G("", !0)
988
987
  ]));
989
988
  }
990
989
  }), dt = /* @__PURE__ */ Je(ct, [["__scopeId", "data-v-7f07706b"]]);
991
990
  var ut = Object.create, Z = Object.defineProperty, ht = Object.getOwnPropertyDescriptor, xe = (n, e) => (e = Symbol[n]) ? e : Symbol.for("Symbol." + n), Ce = (n) => {
992
991
  throw TypeError(n);
993
- }, mt = (n, e, s) => e in n ? Z(n, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : n[e] = s, pt = (n, e) => Z(n, "name", { value: e, configurable: !0 }), ft = (n) => [, , , ut(n?.[xe("metadata")] ?? null)], vt = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], Ee = (n) => n !== void 0 && typeof n != "function" ? Ce("Function expected") : n, gt = (n, e, s, a, t) => ({ kind: vt[n], name: e, metadata: a, addInitializer: (r) => s._ ? Ce("Already initialized") : t.push(Ee(r || null)) }), _t = (n, e) => mt(e, xe("metadata"), n[3]), bt = (n, e, s, a) => {
992
+ }, mt = (n, e, s) => e in n ? Z(n, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : n[e] = s, pt = (n, e) => Z(n, "name", { value: e, configurable: !0 }), ft = (n) => [, , , ut(n?.[xe("metadata")] ?? null)], vt = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], $e = (n) => n !== void 0 && typeof n != "function" ? Ce("Function expected") : n, gt = (n, e, s, a, t) => ({ kind: vt[n], name: e, metadata: a, addInitializer: (r) => s._ ? Ce("Already initialized") : t.push($e(r || null)) }), _t = (n, e) => mt(e, xe("metadata"), n[3]), bt = (n, e, s, a) => {
994
993
  for (var t = 0, r = n[e >> 1], i = r && r.length; t < i; t++) r[t].call(s);
995
994
  return a;
996
995
  }, yt = (n, e, s, a, t, r) => {
997
996
  var i, o, c, h = e & 7, l = !1, m = 0, u = n[m] || (n[m] = []), f = h && (t = t.prototype, h < 5 && (h > 3 || !l) && ht(t, s));
998
997
  pt(t, s);
999
998
  for (var d = a.length - 1; d >= 0; d--)
1000
- c = gt(h, s, o = {}, n[3], u), i = (0, a[d])(t, c), o._ = 1, Ee(i) && (t = i);
999
+ c = gt(h, s, o = {}, n[3], u), i = (0, a[d])(t, c), o._ = 1, $e(i) && (t = i);
1001
1000
  return _t(n, t), f && Z(t, s, f), l ? h ^ 4 ? r : f : t;
1002
- }, $e, K, we;
1003
- $e = [ze(["preferences", "modal"])];
1001
+ }, Ee, K, we;
1002
+ Ee = [ze(["preferences", "modal", "$", "$$"])];
1004
1003
  class Q extends (we = We) {
1005
1004
  constructor(e) {
1006
- super(e, {}, "preferences-ui"), this.ctx = e, this._modal = null, this._form = null, e.set("preferencesUI", this), e.preferences.defineCategory({
1005
+ super(e, {}, "preferences-ui"), this.ctx = e, this._modal = null, this._form = null, e.set("preferencesUI", this);
1006
+ const s = e.$, a = e.$$;
1007
+ e.preferences.defineCategory({
1008
+ name: "general",
1009
+ label: s`prefs.general.label`,
1010
+ description: s`prefs.general.description`,
1011
+ autoGenerateForm: !0
1012
+ }), e.preferences.defineCategory({
1013
+ name: "editor",
1014
+ label: s`prefs.editor.label`,
1015
+ description: s`prefs.editor.description`,
1016
+ autoGenerateForm: !0
1017
+ }), e.preferences.defineCategory({
1007
1018
  name: "about",
1008
- label: "About",
1009
- description: "About InPageEdit",
1019
+ label: a`prefs.about.label`,
1020
+ description: a`prefs.about.description`,
1010
1021
  index: 99,
1011
1022
  customRenderer: () => /* @__PURE__ */ _("section", { className: "theme-ipe-prose", children: [
1012
1023
  /* @__PURE__ */ _("h2", { children: "✏️ InPageEdit NEXT" }),
1013
- /* @__PURE__ */ _("p", { children: "🚀 Modular, Extensible Supercharged Plugin for MediaWiki." }),
1014
- /* @__PURE__ */ _("h3", { children: "Portals" }),
1024
+ /* @__PURE__ */ _("p", { children: a`prefs.about.intro` }),
1025
+ /* @__PURE__ */ _("h3", { children: a`prefs.about.portals.header` }),
1015
1026
  /* @__PURE__ */ _("ul", { children: [
1016
- /* @__PURE__ */ _("li", { children: /* @__PURE__ */ _("a", { href: this.ctx.Endpoints.HOME_URL, target: "_blank", children: "Official Website & Help Center" }) }),
1027
+ /* @__PURE__ */ _("li", { children: /* @__PURE__ */ _("a", { href: this.ctx.Endpoints.HOME_URL, target: "_blank", children: a`prefs.about.portals.officialwebsite` }) }),
1017
1028
  /* @__PURE__ */ _("li", { children: /* @__PURE__ */ _(
1018
1029
  "a",
1019
1030
  {
1020
1031
  href: `${this.ctx.Endpoints.UPDATE_LOGS_URL}#${this.ctx.version.split("-")[0]}`,
1021
1032
  target: "_blank",
1022
- children: "Update Logs"
1033
+ children: a`prefs.about.portals.updatelogs`
1023
1034
  }
1024
1035
  ) })
1025
1036
  ] }),
1026
- /* @__PURE__ */ _("h3", { children: "Join us" }),
1037
+ /* @__PURE__ */ _("h3", { children: a`prefs.about.joinus.header` }),
1027
1038
  /* @__PURE__ */ _("ul", { children: [
1028
1039
  /* @__PURE__ */ _("li", { children: [
1029
- /* @__PURE__ */ _("strong", { children: "GitHub" }),
1040
+ /* @__PURE__ */ _("strong", { children: a`prefs.about.joinus.github` }),
1030
1041
  ":",
1031
1042
  " ",
1032
- /* @__PURE__ */ _("a", { href: this.ctx.Endpoints.GITHUB_URL, target: "_blank", children: "inpageedit/inpageedit-next" })
1043
+ /* @__PURE__ */ _("a", { href: this.ctx.Endpoints.GITHUB_URL, target: "_blank", children: `${this.ctx.Endpoints.GITHUB_OWNER}/${this.ctx.Endpoints.GITHUB_REPO}` })
1033
1044
  ] }),
1034
1045
  /* @__PURE__ */ _("li", { children: [
1035
- /* @__PURE__ */ _("strong", { children: "QQ Group" }),
1036
- ": 1026023666"
1046
+ /* @__PURE__ */ _("strong", { children: a`prefs.about.joinus.qqgroup` }),
1047
+ ": ",
1048
+ this.ctx.Endpoints.QQ_GROUP_ID
1037
1049
  ] })
1038
1050
  ] }),
1039
1051
  /* @__PURE__ */ _("hr", {}),
1040
- /* @__PURE__ */ _("p", { style: { textAlign: "center" }, children: [
1041
- "InPageEdit-NEXT Copyright © 2025-",
1042
- (/* @__PURE__ */ new Date()).getFullYear(),
1043
- " dragon-fish"
1044
- ] }),
1052
+ /* @__PURE__ */ _("p", { style: { textAlign: "center" }, children: a`prefs.about.copyright` }),
1045
1053
  /* @__PURE__ */ _("hr", {})
1046
1054
  ] })
1047
- }), e.inject(["toolbox"], (s) => {
1048
- s.toolbox.addButton({
1055
+ }), e.inject(["toolbox"], (t) => {
1056
+ t.toolbox.addButton({
1049
1057
  id: "preferences",
1050
1058
  icon: /* @__PURE__ */ _(
1051
1059
  "svg",
@@ -1062,17 +1070,17 @@ class Q extends (we = We) {
1062
1070
  ]
1063
1071
  }
1064
1072
  ),
1065
- tooltip: "Configure Preferences",
1073
+ tooltip: s`Configure Preferences`,
1066
1074
  group: "group2",
1067
1075
  index: 99,
1068
1076
  onClick: () => this.showModal()
1069
- }), this.addDisposeHandler((a) => {
1070
- a.toolbox.removeButton("preferences");
1077
+ }), this.addDisposeHandler((r) => {
1078
+ r.toolbox.removeButton("preferences");
1071
1079
  });
1072
1080
  });
1073
1081
  }
1074
1082
  async start() {
1075
- import("./PluginPrefSync-Dn1Xsiqz.js").then(({ PluginPrefSync: e }) => {
1083
+ import("./PluginPrefSync-B-gPsC2n.js").then(({ PluginPrefSync: e }) => {
1076
1084
  this.ctx.plugin(e);
1077
1085
  }).catch(this.ctx.logger.warn), this.ctx.on("preferences/changed", (e) => {
1078
1086
  this._form?.mergeValue?.(e.input);
@@ -1081,64 +1089,65 @@ class Q extends (we = We) {
1081
1089
  stop() {
1082
1090
  }
1083
1091
  showModal() {
1092
+ const e = this.ctx.$;
1084
1093
  if (this._modal && !this._modal.isDestroyed)
1085
1094
  return this._modal;
1086
- const e = this.ctx.modal.show({
1095
+ const s = this.ctx.modal.show({
1087
1096
  className: "ipe-preference compact-buttons",
1088
1097
  sizeClass: "small",
1089
1098
  outSideClose: !1,
1090
1099
  center: !0,
1091
- title: `InPageEdit Preferences (${this.ctx.version})`,
1092
- content: /* @__PURE__ */ _(Le, { children: /* @__PURE__ */ _(Ae, {}) })
1100
+ title: `${e`InPageEdit Preferences`} (${this.ctx.version})`,
1101
+ content: /* @__PURE__ */ _(Ie, { children: /* @__PURE__ */ _(Ae, {}) })
1093
1102
  });
1094
- e.get$window().classList.add("dialog");
1095
- const s = /* @__PURE__ */ _(
1103
+ s.get$window().classList.add("dialog");
1104
+ const a = /* @__PURE__ */ _(
1096
1105
  "div",
1097
1106
  {
1098
1107
  id: "ipe-preferences-app",
1099
1108
  style: { minHeight: "calc(85dvh - var(--ipe-modal-spacing) * 2)" }
1100
1109
  }
1101
1110
  );
1102
- e.setContent(s), this.ctx.emit("preferences-ui/modal-shown", {
1111
+ s.setContent(a), this.ctx.emit("preferences-ui/modal-shown", {
1103
1112
  ctx: this.ctx,
1104
- modal: e
1113
+ modal: s
1105
1114
  });
1106
- const a = this.createPreferencesUIApp(), t = a.mount(s);
1107
- return this._form = t, this.ctx.emit("preferences-ui/vue-app-mounted", {
1115
+ const t = this.createPreferencesUIApp(), r = t.mount(a);
1116
+ return this._form = r, this.ctx.emit("preferences-ui/vue-app-mounted", {
1108
1117
  ctx: this.ctx,
1109
- app: a,
1110
- form: t
1111
- }), e.setButtons([
1118
+ app: t,
1119
+ form: r
1120
+ }), s.setButtons([
1112
1121
  {
1113
- label: "Close",
1122
+ label: e`Close`,
1114
1123
  className: "is-ghost",
1115
1124
  method: () => {
1116
- e.close();
1125
+ s.close();
1117
1126
  }
1118
1127
  },
1119
1128
  {
1120
- label: "Save",
1129
+ label: e`Save`,
1121
1130
  className: "is-primary is-ghost",
1122
1131
  method: async () => {
1123
- const r = t.getValue();
1132
+ const i = r.getValue();
1124
1133
  try {
1125
- const i = await this.ctx.preferences.setMany(r);
1126
- this.logger.info("preferences saved", r, i);
1127
- } catch (i) {
1128
- this.logger.error("failed to save preferences", i);
1134
+ const o = await this.ctx.preferences.setMany(i);
1135
+ this.logger.info("preferences saved", i, o);
1136
+ } catch (o) {
1137
+ this.logger.error("failed to save preferences", o);
1129
1138
  }
1130
- e.close(), this.ctx.modal.notify("success", {
1131
- title: "Preferences Saved",
1132
- content: /* @__PURE__ */ _("p", { children: "Some settings may take effect after reloading the page." })
1139
+ s.close(), this.ctx.modal.notify("success", {
1140
+ title: e`Preferences Saved`,
1141
+ content: /* @__PURE__ */ _("p", { children: e`Some settings may take effect after reloading the page.` })
1133
1142
  });
1134
1143
  }
1135
1144
  }
1136
- ]), this._modal = e, e.on(e.Event.Close, () => {
1137
- this.logger.debug("preferences modal closed, vue app unmounting"), a.unmount(), this._modal = null, this._form = null, this.ctx.emit("preferences-ui/modal-closed", {
1145
+ ]), this._modal = s, s.on(s.Event.Close, () => {
1146
+ this.logger.debug("preferences modal closed, vue app unmounting"), t.unmount(), this._modal = null, this._form = null, this.ctx.emit("preferences-ui/modal-closed", {
1138
1147
  ctx: this.ctx,
1139
- modal: e
1148
+ modal: s
1140
1149
  });
1141
- }), e;
1150
+ }), s;
1142
1151
  }
1143
1152
  getCurrentModal() {
1144
1153
  return this._modal;
@@ -1162,9 +1171,9 @@ class Q extends (we = We) {
1162
1171
  }
1163
1172
  }
1164
1173
  K = ft(we);
1165
- Q = yt(K, 0, "PluginPreferencesUI", $e, Q);
1174
+ Q = yt(K, 0, "PluginPreferencesUI", Ee, Q);
1166
1175
  bt(K, 1, Q);
1167
1176
  export {
1168
1177
  Q as PluginPreferencesUI
1169
1178
  };
1170
- //# sourceMappingURL=index-B7c6jL9x.js.map
1179
+ //# sourceMappingURL=index-BKIf3i0I.js.map