pptx-vue-viewer 4.26.0 → 4.29.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 (121) hide show
  1. package/CHANGELOG.md +83 -0
  2. package/README.md +3 -0
  3. package/dist/{AiChatPanel-CDIEUbsh.cjs → AiChatPanel-C_WfcpVB.cjs} +187 -187
  4. package/dist/AiChatPanel-C_WfcpVB.cjs.br +0 -0
  5. package/dist/AiChatPanel-C_WfcpVB.cjs.gz +0 -0
  6. package/dist/AiChatPanel-N4Acx4A4.js +621 -0
  7. package/dist/AiChatPanel-N4Acx4A4.js.br +0 -0
  8. package/dist/AiChatPanel-N4Acx4A4.js.gz +0 -0
  9. package/dist/gif-encoder-3CbwLFoo.cjs +7 -0
  10. package/dist/gif-encoder-3CbwLFoo.cjs.br +0 -0
  11. package/dist/gif-encoder-3CbwLFoo.cjs.gz +0 -0
  12. package/dist/gif-encoder-BavNpjL0.js +2 -0
  13. package/dist/gif-encoder-BavNpjL0.js.br +0 -0
  14. package/dist/gif-encoder-BavNpjL0.js.gz +0 -0
  15. package/dist/i18n.cjs +4 -4
  16. package/dist/i18n.cjs.br +0 -0
  17. package/dist/i18n.cjs.gz +0 -0
  18. package/dist/i18n.d.ts +9 -40
  19. package/dist/i18n.js +7 -7
  20. package/dist/i18n.js.br +0 -0
  21. package/dist/i18n.js.gz +0 -0
  22. package/dist/index.cjs +218 -2
  23. package/dist/index.cjs.br +0 -0
  24. package/dist/index.cjs.gz +0 -0
  25. package/dist/index.d.ts +215 -2124
  26. package/dist/index.js +4 -3
  27. package/dist/index.js.br +0 -0
  28. package/dist/index.js.gz +0 -0
  29. package/dist/internals.cjs +118 -2
  30. package/dist/internals.cjs.br +0 -0
  31. package/dist/internals.cjs.gz +0 -0
  32. package/dist/internals.d.ts +201 -2860
  33. package/dist/internals.js +2 -2
  34. package/dist/internals.js.br +0 -0
  35. package/dist/internals.js.gz +0 -0
  36. package/dist/pptx-vue-viewer.css +232 -232
  37. package/dist/pptx-vue-viewer.css.br +0 -0
  38. package/dist/pptx-vue-viewer.css.gz +0 -0
  39. package/dist/useViewerSettingsDialog-B0seUJf5.cjs +12237 -0
  40. package/dist/useViewerSettingsDialog-B0seUJf5.cjs.br +0 -0
  41. package/dist/useViewerSettingsDialog-B0seUJf5.cjs.gz +0 -0
  42. package/dist/useViewerSettingsDialog-Bu1FF4kK.js +11428 -0
  43. package/dist/useViewerSettingsDialog-Bu1FF4kK.js.br +0 -0
  44. package/dist/useViewerSettingsDialog-Bu1FF4kK.js.gz +0 -0
  45. package/dist/viewer/index.cjs +63 -2
  46. package/dist/viewer/index.cjs.br +0 -0
  47. package/dist/viewer/index.cjs.gz +0 -0
  48. package/dist/viewer/index.d.ts +127 -2647
  49. package/dist/viewer/index.js +3 -3
  50. package/dist/viewer/index.js.br +0 -0
  51. package/dist/viewer/index.js.gz +0 -0
  52. package/dist/viewer-BhpqAiFD.cjs +28785 -0
  53. package/dist/viewer-BhpqAiFD.cjs.br +0 -0
  54. package/dist/viewer-BhpqAiFD.cjs.gz +0 -0
  55. package/dist/viewer-Kzl-S1XT.js +28682 -0
  56. package/dist/viewer-Kzl-S1XT.js.br +0 -0
  57. package/dist/viewer-Kzl-S1XT.js.gz +0 -0
  58. package/dist/{y-webrtc-CvaRgVqo.js → y-webrtc-AnFXd3eU.js} +74 -74
  59. package/dist/y-webrtc-AnFXd3eU.js.br +0 -0
  60. package/dist/y-webrtc-AnFXd3eU.js.gz +0 -0
  61. package/dist/{y-webrtc-DZr1yac3.cjs → y-webrtc-Cc_szc_0.cjs} +1 -1
  62. package/dist/y-webrtc-Cc_szc_0.cjs.br +0 -0
  63. package/dist/y-webrtc-Cc_szc_0.cjs.gz +0 -0
  64. package/package.json +4 -4
  65. package/dist/AiChatPanel-CDIEUbsh.cjs.br +0 -0
  66. package/dist/AiChatPanel-CDIEUbsh.cjs.gz +0 -0
  67. package/dist/AiChatPanel-UeqiPKWq.js +0 -620
  68. package/dist/AiChatPanel-UeqiPKWq.js.br +0 -0
  69. package/dist/AiChatPanel-UeqiPKWq.js.gz +0 -0
  70. package/dist/UTIF-BsobMsK7.cjs +0 -2846
  71. package/dist/UTIF-BsobMsK7.cjs.br +0 -0
  72. package/dist/UTIF-BsobMsK7.cjs.gz +0 -0
  73. package/dist/UTIF-DoM-DtxQ.js +0 -2841
  74. package/dist/UTIF-DoM-DtxQ.js.br +0 -0
  75. package/dist/UTIF-DoM-DtxQ.js.gz +0 -0
  76. package/dist/dist-CSvqnTq9.js +0 -143575
  77. package/dist/dist-CSvqnTq9.js.br +0 -0
  78. package/dist/dist-CSvqnTq9.js.gz +0 -0
  79. package/dist/dist-jneR9I0T.cjs +0 -144470
  80. package/dist/dist-jneR9I0T.cjs.br +0 -0
  81. package/dist/dist-jneR9I0T.cjs.gz +0 -0
  82. package/dist/gif-encoder-9UAE48U3.js +0 -2
  83. package/dist/gif-encoder-9UAE48U3.js.br +0 -0
  84. package/dist/gif-encoder-9UAE48U3.js.gz +0 -0
  85. package/dist/gif-encoder-CmFNfm5Y.cjs +0 -2
  86. package/dist/gif-encoder-CmFNfm5Y.cjs.br +0 -0
  87. package/dist/gif-encoder-CmFNfm5Y.cjs.gz +0 -0
  88. package/dist/i18n-BKGmZO2Y.cjs +0 -4039
  89. package/dist/i18n-BKGmZO2Y.cjs.br +0 -0
  90. package/dist/i18n-BKGmZO2Y.cjs.gz +0 -0
  91. package/dist/i18n-IRftxHkg.js +0 -4024
  92. package/dist/i18n-IRftxHkg.js.br +0 -0
  93. package/dist/i18n-IRftxHkg.js.gz +0 -0
  94. package/dist/rolldown-runtime-C7a0RdOx.cjs +0 -33
  95. package/dist/rolldown-runtime-C7a0RdOx.cjs.br +0 -0
  96. package/dist/rolldown-runtime-C7a0RdOx.cjs.gz +0 -0
  97. package/dist/rolldown-runtime-wq6uunTs.js +0 -21
  98. package/dist/rolldown-runtime-wq6uunTs.js.br +0 -0
  99. package/dist/rolldown-runtime-wq6uunTs.js.gz +0 -0
  100. package/dist/smartart-layouts-BiyCXXBh.cjs +0 -2048
  101. package/dist/smartart-layouts-BiyCXXBh.cjs.br +0 -0
  102. package/dist/smartart-layouts-BiyCXXBh.cjs.gz +0 -0
  103. package/dist/smartart-layouts-COMGf6fP.js +0 -2051
  104. package/dist/smartart-layouts-COMGf6fP.js.br +0 -0
  105. package/dist/smartart-layouts-COMGf6fP.js.gz +0 -0
  106. package/dist/useViewerSettingsDialog-DoU2taNQ.cjs +0 -106819
  107. package/dist/useViewerSettingsDialog-DoU2taNQ.cjs.br +0 -0
  108. package/dist/useViewerSettingsDialog-DoU2taNQ.cjs.gz +0 -0
  109. package/dist/useViewerSettingsDialog-hznF98U1.js +0 -102400
  110. package/dist/useViewerSettingsDialog-hznF98U1.js.br +0 -0
  111. package/dist/useViewerSettingsDialog-hznF98U1.js.gz +0 -0
  112. package/dist/viewer-C_C76xq_.js +0 -137682
  113. package/dist/viewer-C_C76xq_.js.br +0 -0
  114. package/dist/viewer-C_C76xq_.js.gz +0 -0
  115. package/dist/viewer-DTHDsf2m.cjs +0 -137853
  116. package/dist/viewer-DTHDsf2m.cjs.br +0 -0
  117. package/dist/viewer-DTHDsf2m.cjs.gz +0 -0
  118. package/dist/y-webrtc-CvaRgVqo.js.br +0 -0
  119. package/dist/y-webrtc-CvaRgVqo.js.gz +0 -0
  120. package/dist/y-webrtc-DZr1yac3.cjs.br +0 -0
  121. package/dist/y-webrtc-DZr1yac3.cjs.gz +0 -0
@@ -1,10 +1,10 @@
1
- const e = require("./useViewerSettingsDialog-DoU2taNQ.cjs"), t = require("./viewer-DTHDsf2m.cjs");
2
- let r = require("vue"), a = require("lucide-vue-next");
3
- var n = { class: "border-t border-border p-2" }, o = { class: "flex items-end gap-1.5 rounded-md border border-input bg-background px-2 py-1.5 focus-within:border-ring" }, l = ["placeholder", "aria-label"], s = ["title", "aria-label"], i = [
1
+ const e = require("./useViewerSettingsDialog-B0seUJf5.cjs"), t = require("./viewer-BhpqAiFD.cjs");
2
+ let r = require("vue"), a = require("lucide-vue-next"), n = require("ooxml-ui/pptx/ai");
3
+ var o = { class: "border-t border-border p-2" }, l = { class: "flex items-end gap-1.5 rounded-md border border-input bg-background px-2 py-1.5 focus-within:border-ring" }, s = ["placeholder", "aria-label"], i = ["title", "aria-label"], c = [
4
4
  "disabled",
5
5
  "title",
6
6
  "aria-label"
7
- ], c = (0, r.defineComponent)({
7
+ ], p = (0, r.defineComponent)({
8
8
  __name: "AiComposer",
9
9
  props: {
10
10
  isStreaming: { type: Boolean },
@@ -12,8 +12,8 @@ var n = { class: "border-t border-border p-2" }, o = { class: "flex items-end ga
12
12
  prefillNonce: {}
13
13
  },
14
14
  emits: ["send", "stop"],
15
- setup(c, { emit: p }) {
16
- const d = c, u = p, { t: m } = e.useI18n(), x = (0, r.ref)(""), f = (0, r.ref)(null), g = (0, r.computed)(() => x.value.trim().length > 0);
15
+ setup(n, { emit: p }) {
16
+ const d = n, u = p, { t: m } = e.useI18n(), x = (0, r.ref)(""), f = (0, r.ref)(null), g = (0, r.computed)(() => x.value.trim().length > 0);
17
17
  function k() {
18
18
  const e = x.value.trim();
19
19
  0 === e.length || d.isStreaming || (u("send", e), x.value = "");
@@ -23,23 +23,23 @@ var n = { class: "border-t border-border p-2" }, o = { class: "flex items-end ga
23
23
  }
24
24
  return (0, r.watch)(() => d.prefillNonce, (e) => {
25
25
  void 0 !== e && 0 !== e && (d.prefillText && (x.value = d.prefillText), (0, r.nextTick)(() => f.value?.focus()));
26
- }), (e, c) => ((0, r.openBlock)(), (0, r.createElementBlock)("div", n, [(0, r.createElementVNode)("div", o, [(0, r.withDirectives)((0, r.createElementVNode)("textarea", {
26
+ }), (e, n) => ((0, r.openBlock)(), (0, r.createElementBlock)("div", o, [(0, r.createElementVNode)("div", l, [(0, r.withDirectives)((0, r.createElementVNode)("textarea", {
27
27
  ref_key: "textareaRef",
28
28
  ref: f,
29
- "onUpdate:modelValue": c[0] || (c[0] = (e) => x.value = e),
29
+ "onUpdate:modelValue": n[0] || (n[0] = (e) => x.value = e),
30
30
  rows: 1,
31
31
  placeholder: (0, r.unref)(m)("pptx.ai.placeholder"),
32
32
  "aria-label": (0, r.unref)(m)("pptx.ai.placeholder"),
33
33
  class: "max-h-32 min-h-[1.5rem] flex-1 resize-none bg-transparent text-[13px] text-foreground outline-none placeholder:text-muted-foreground",
34
34
  onKeydown: y
35
- }, null, 40, l), [[r.vModelText, x.value]]), d.isStreaming ? ((0, r.openBlock)(), (0, r.createElementBlock)("button", {
35
+ }, null, 40, s), [[r.vModelText, x.value]]), d.isStreaming ? ((0, r.openBlock)(), (0, r.createElementBlock)("button", {
36
36
  key: 0,
37
37
  type: "button",
38
38
  title: (0, r.unref)(m)("pptx.ai.stop"),
39
39
  "aria-label": (0, r.unref)(m)("pptx.ai.stop"),
40
40
  class: "shrink-0 rounded-sm p-1.5 text-muted-foreground transition-colors hover:bg-accent",
41
- onClick: c[1] || (c[1] = (e) => u("stop"))
42
- }, [(0, r.createVNode)((0, r.unref)(a.Square), { class: "w-4 h-4" })], 8, s)) : ((0, r.openBlock)(), (0, r.createElementBlock)("button", {
41
+ onClick: n[1] || (n[1] = (e) => u("stop"))
42
+ }, [(0, r.createVNode)((0, r.unref)(a.Square), { class: "w-4 h-4" })], 8, i)) : ((0, r.openBlock)(), (0, r.createElementBlock)("button", {
43
43
  key: 1,
44
44
  type: "button",
45
45
  disabled: !g.value,
@@ -47,19 +47,19 @@ var n = { class: "border-t border-border p-2" }, o = { class: "flex items-end ga
47
47
  "aria-label": (0, r.unref)(m)("pptx.ai.send"),
48
48
  class: (0, r.normalizeClass)((0, r.unref)(t.cn)("shrink-0 rounded-sm p-1.5 transition-colors", g.value ? "bg-primary text-primary-foreground hover:bg-primary/90" : "text-muted-foreground/50")),
49
49
  onClick: k
50
- }, [(0, r.createVNode)((0, r.unref)(a.Send), { class: "w-4 h-4" })], 10, i))])]));
50
+ }, [(0, r.createVNode)((0, r.unref)(a.Send), { class: "w-4 h-4" })], 10, c))])]));
51
51
  }
52
- }), p = { class: "border-b border-border bg-secondary/30" }, d = { class: "flex flex-wrap items-center gap-1 px-2.5 py-1.5" }, u = { class: "text-[10px] font-semibold uppercase tracking-wide text-muted-foreground" }, m = ["title"], x = { class: "truncate" }, f = {
52
+ }), d = { class: "border-b border-border bg-secondary/30" }, u = { class: "flex flex-wrap items-center gap-1 px-2.5 py-1.5" }, m = { class: "text-[10px] font-semibold uppercase tracking-wide text-muted-foreground" }, x = ["title"], f = { class: "truncate" }, g = {
53
53
  key: 0,
54
54
  class: "rounded-full bg-primary/15 px-1.5 py-0.5 text-[10px] font-medium text-primary"
55
- }, g = { class: "ml-auto flex items-center gap-0.5" }, k = [
55
+ }, k = { class: "ml-auto flex items-center gap-0.5" }, y = [
56
56
  "title",
57
57
  "aria-label",
58
58
  "aria-pressed"
59
- ], y = ["title", "aria-label"], b = ["title", "aria-label"], h = {
59
+ ], b = ["title", "aria-label"], h = ["title", "aria-label"], v = {
60
60
  key: 0,
61
61
  class: "flex items-center gap-2 border-t border-primary/20 bg-primary/5 px-2.5 py-1"
62
- }, v = { class: "text-[11px] font-medium text-primary" }, C = (0, r.defineComponent)({
62
+ }, C = { class: "text-[11px] font-medium text-primary" }, B = (0, r.defineComponent)({
63
63
  __name: "AiFocusBar",
64
64
  props: {
65
65
  targets: {},
@@ -76,78 +76,78 @@ var n = { class: "border-t border-border p-2" }, o = { class: "flex items-end ga
76
76
  "clear-picks",
77
77
  "send-directive"
78
78
  ],
79
- setup(n, { emit: o }) {
80
- const l = n, s = o, { t: i } = e.useI18n(), c = (0, r.computed)(() => t.focusTargetChips(l.targets, l.slides)), C = (0, r.computed)(() => t.isTwoTableFocus(l.targets, l.slides));
81
- function B() {
82
- const e = C.value;
83
- e && s("send-directive", t.mergeTablesDirective(e.slideIndex, e.elementIdA, e.elementIdB));
79
+ setup(o, { emit: l }) {
80
+ const s = o, i = l, { t: c } = e.useI18n(), p = (0, r.computed)(() => (0, n.focusTargetChips)(s.targets, s.slides)), B = (0, r.computed)(() => (0, n.isTwoTableFocus)(s.targets, s.slides));
81
+ function E() {
82
+ const e = B.value;
83
+ e && i("send-directive", (0, n.mergeTablesDirective)(e.slideIndex, e.elementIdA, e.elementIdB));
84
84
  }
85
- return (e, o) => ((0, r.openBlock)(), (0, r.createElementBlock)("div", p, [(0, r.createElementVNode)("div", d, [
86
- (0, r.createElementVNode)("span", u, (0, r.toDisplayString)((0, r.unref)(i)("pptx.ai.focusScope")), 1),
87
- ((0, r.openBlock)(!0), (0, r.createElementBlock)(r.Fragment, null, (0, r.renderList)(c.value, (e) => ((0, r.openBlock)(), (0, r.createElementBlock)("span", {
85
+ return (e, n) => ((0, r.openBlock)(), (0, r.createElementBlock)("div", d, [(0, r.createElementVNode)("div", u, [
86
+ (0, r.createElementVNode)("span", m, (0, r.toDisplayString)((0, r.unref)(c)("pptx.ai.focusScope")), 1),
87
+ ((0, r.openBlock)(!0), (0, r.createElementBlock)(r.Fragment, null, (0, r.renderList)(p.value, (e) => ((0, r.openBlock)(), (0, r.createElementBlock)("span", {
88
88
  key: e.key,
89
- class: (0, r.normalizeClass)((0, r.unref)(t.cn)("inline-flex max-w-[10rem] items-center rounded-full px-2 py-0.5 text-[11px]", n.hasPicks || n.isPinned ? "bg-primary/15 text-primary" : "bg-muted text-muted-foreground")),
89
+ class: (0, r.normalizeClass)((0, r.unref)(t.cn)("inline-flex max-w-[10rem] items-center rounded-full px-2 py-0.5 text-[11px]", o.hasPicks || o.isPinned ? "bg-primary/15 text-primary" : "bg-muted text-muted-foreground")),
90
90
  title: e.title
91
- }, [(0, r.createElementVNode)("span", x, (0, r.toDisplayString)(e.label), 1)], 10, m))), 128)),
92
- n.isPinned ? ((0, r.openBlock)(), (0, r.createElementBlock)("span", f, (0, r.toDisplayString)((0, r.unref)(i)("pptx.ai.pinnedFocus")), 1)) : (0, r.createCommentVNode)("", !0),
93
- (0, r.createElementVNode)("div", g, [
94
- C.value ? ((0, r.openBlock)(), (0, r.createElementBlock)("button", {
91
+ }, [(0, r.createElementVNode)("span", f, (0, r.toDisplayString)(e.label), 1)], 10, x))), 128)),
92
+ o.isPinned ? ((0, r.openBlock)(), (0, r.createElementBlock)("span", g, (0, r.toDisplayString)((0, r.unref)(c)("pptx.ai.pinnedFocus")), 1)) : (0, r.createCommentVNode)("", !0),
93
+ (0, r.createElementVNode)("div", k, [
94
+ B.value ? ((0, r.openBlock)(), (0, r.createElementBlock)("button", {
95
95
  key: 0,
96
96
  type: "button",
97
97
  class: "inline-flex items-center gap-1 rounded-sm bg-primary/90 px-1.5 py-0.5 text-[11px] font-medium text-primary-foreground hover:bg-primary",
98
- onClick: B
99
- }, [(0, r.createVNode)((0, r.unref)(a.GitMerge), { class: "w-3 h-3" }), (0, r.createTextVNode)(" " + (0, r.toDisplayString)((0, r.unref)(i)("pptx.ai.mergeSelectedTables")), 1)])) : (0, r.createCommentVNode)("", !0),
98
+ onClick: E
99
+ }, [(0, r.createVNode)((0, r.unref)(a.GitMerge), { class: "w-3 h-3" }), (0, r.createTextVNode)(" " + (0, r.toDisplayString)((0, r.unref)(c)("pptx.ai.mergeSelectedTables")), 1)])) : (0, r.createCommentVNode)("", !0),
100
100
  (0, r.createElementVNode)("button", {
101
101
  type: "button",
102
- title: (0, r.unref)(i)("pptx.ai.pickElement"),
103
- "aria-label": (0, r.unref)(i)("pptx.ai.pickAria"),
104
- "aria-pressed": n.pickMode,
105
- class: (0, r.normalizeClass)((0, r.unref)(t.cn)("rounded-sm p-1 flex items-center justify-center max-md:min-w-[44px]! max-md:min-h-[44px]!", n.pickMode ? "bg-primary text-primary-foreground" : "text-muted-foreground hover:bg-accent")),
106
- onClick: o[0] || (o[0] = (e) => n.pickMode ? s("stop-pick") : s("start-pick"))
107
- }, [(0, r.createVNode)((0, r.unref)(a.Crosshair), { class: "w-3.5 h-3.5" })], 10, k),
108
- n.hasPicks ? ((0, r.openBlock)(), (0, r.createElementBlock)("button", {
102
+ title: (0, r.unref)(c)("pptx.ai.pickElement"),
103
+ "aria-label": (0, r.unref)(c)("pptx.ai.pickAria"),
104
+ "aria-pressed": o.pickMode,
105
+ class: (0, r.normalizeClass)((0, r.unref)(t.cn)("rounded-sm p-1 flex items-center justify-center max-md:min-w-[44px]! max-md:min-h-[44px]!", o.pickMode ? "bg-primary text-primary-foreground" : "text-muted-foreground hover:bg-accent")),
106
+ onClick: n[0] || (n[0] = (e) => o.pickMode ? i("stop-pick") : i("start-pick"))
107
+ }, [(0, r.createVNode)((0, r.unref)(a.Crosshair), { class: "w-3.5 h-3.5" })], 10, y),
108
+ o.hasPicks ? ((0, r.openBlock)(), (0, r.createElementBlock)("button", {
109
109
  key: 1,
110
110
  type: "button",
111
- title: (0, r.unref)(i)("pptx.ai.pickClear"),
112
- "aria-label": (0, r.unref)(i)("pptx.ai.pickClear"),
111
+ title: (0, r.unref)(c)("pptx.ai.pickClear"),
112
+ "aria-label": (0, r.unref)(c)("pptx.ai.pickClear"),
113
113
  class: "rounded-sm p-1 text-muted-foreground hover:bg-accent flex items-center justify-center max-md:min-w-[44px]! max-md:min-h-[44px]!",
114
- onClick: o[1] || (o[1] = (e) => s("clear-picks"))
115
- }, [(0, r.createVNode)((0, r.unref)(a.X), { class: "w-3.5 h-3.5" })], 8, y)) : ((0, r.openBlock)(), (0, r.createElementBlock)("button", {
114
+ onClick: n[1] || (n[1] = (e) => i("clear-picks"))
115
+ }, [(0, r.createVNode)((0, r.unref)(a.X), { class: "w-3.5 h-3.5" })], 8, b)) : ((0, r.openBlock)(), (0, r.createElementBlock)("button", {
116
116
  key: 2,
117
117
  type: "button",
118
- title: n.isPinned ? (0, r.unref)(i)("pptx.ai.clearFocus") : (0, r.unref)(i)("pptx.ai.pinFocus"),
119
- "aria-label": n.isPinned ? (0, r.unref)(i)("pptx.ai.clearFocus") : (0, r.unref)(i)("pptx.ai.pinFocus"),
118
+ title: o.isPinned ? (0, r.unref)(c)("pptx.ai.clearFocus") : (0, r.unref)(c)("pptx.ai.pinFocus"),
119
+ "aria-label": o.isPinned ? (0, r.unref)(c)("pptx.ai.clearFocus") : (0, r.unref)(c)("pptx.ai.pinFocus"),
120
120
  class: "rounded-sm p-1 text-muted-foreground hover:bg-accent flex items-center justify-center max-md:min-w-[44px]! max-md:min-h-[44px]!",
121
- onClick: o[2] || (o[2] = (e) => n.isPinned ? s("clear-pin") : s("pin"))
122
- }, [n.isPinned ? ((0, r.openBlock)(), (0, r.createBlock)((0, r.unref)(a.PinOff), {
121
+ onClick: n[2] || (n[2] = (e) => o.isPinned ? i("clear-pin") : i("pin"))
122
+ }, [o.isPinned ? ((0, r.openBlock)(), (0, r.createBlock)((0, r.unref)(a.PinOff), {
123
123
  key: 0,
124
124
  class: "w-3.5 h-3.5"
125
125
  })) : ((0, r.openBlock)(), (0, r.createBlock)((0, r.unref)(a.Pin), {
126
126
  key: 1,
127
127
  class: "w-3.5 h-3.5"
128
- }))], 8, b))
128
+ }))], 8, h))
129
129
  ])
130
- ]), n.pickMode ? ((0, r.openBlock)(), (0, r.createElementBlock)("div", h, [
130
+ ]), o.pickMode ? ((0, r.openBlock)(), (0, r.createElementBlock)("div", v, [
131
131
  (0, r.createVNode)((0, r.unref)(a.Crosshair), { class: "w-3.5 h-3.5 shrink-0 animate-pulse text-primary" }),
132
- (0, r.createElementVNode)("span", v, (0, r.toDisplayString)((0, r.unref)(i)("pptx.ai.pickElementHint")), 1),
132
+ (0, r.createElementVNode)("span", C, (0, r.toDisplayString)((0, r.unref)(c)("pptx.ai.pickElementHint")), 1),
133
133
  (0, r.createElementVNode)("button", {
134
134
  type: "button",
135
135
  class: "ml-auto rounded-sm bg-primary px-2 py-0.5 text-[11px] font-medium text-primary-foreground hover:bg-primary/90",
136
- onClick: o[3] || (o[3] = (e) => s("stop-pick"))
137
- }, (0, r.toDisplayString)((0, r.unref)(i)("pptx.ai.pickDone")), 1)
136
+ onClick: n[3] || (n[3] = (e) => i("stop-pick"))
137
+ }, (0, r.toDisplayString)((0, r.unref)(c)("pptx.ai.pickDone")), 1)
138
138
  ])) : (0, r.createCommentVNode)("", !0)]));
139
139
  }
140
- }), B = { class: "flex items-center justify-between border-b border-border px-2.5 py-1.5" }, E = { class: "text-[11px] font-semibold uppercase tracking-wide text-muted-foreground" }, w = {
140
+ }), E = { class: "flex items-center justify-between border-b border-border px-2.5 py-1.5" }, w = { class: "text-[11px] font-semibold uppercase tracking-wide text-muted-foreground" }, N = {
141
141
  key: 0,
142
142
  class: "px-3 py-4 text-center text-[12px] text-muted-foreground"
143
- }, N = {
143
+ }, V = {
144
144
  key: 1,
145
145
  class: "max-h-64 overflow-y-auto py-1"
146
- }, V = ["onClick"], S = { class: "min-w-0 flex-1" }, P = { class: "block truncate text-[12px] font-medium text-foreground" }, T = { class: "block text-[10px] text-muted-foreground" }, D = [
146
+ }, S = ["onClick"], P = { class: "min-w-0 flex-1" }, T = { class: "block truncate text-[12px] font-medium text-foreground" }, D = { class: "block text-[10px] text-muted-foreground" }, I = [
147
147
  "title",
148
148
  "aria-label",
149
149
  "onClick"
150
- ], I = { class: "border-t border-border px-2.5 py-1.5 text-[10px] text-muted-foreground" }, A = (0, r.defineComponent)({
150
+ ], A = { class: "border-t border-border px-2.5 py-1.5 text-[10px] text-muted-foreground" }, F = (0, r.defineComponent)({
151
151
  __name: "AiHistoryMenu",
152
152
  props: {
153
153
  chats: {},
@@ -169,14 +169,14 @@ var n = { class: "border-t border-border p-2" }, o = { class: "flex items-end ga
169
169
  ref: i,
170
170
  class: "absolute right-2 top-10 z-40 w-64 rounded-md border border-border bg-popover shadow-xl"
171
171
  }, [
172
- (0, r.createElementVNode)("div", B, [(0, r.createElementVNode)("span", E, (0, r.toDisplayString)((0, r.unref)(s)("pptx.ai.historyTitle")), 1), (0, r.createElementVNode)("button", {
172
+ (0, r.createElementVNode)("div", E, [(0, r.createElementVNode)("span", w, (0, r.toDisplayString)((0, r.unref)(s)("pptx.ai.historyTitle")), 1), (0, r.createElementVNode)("button", {
173
173
  type: "button",
174
174
  class: "inline-flex items-center gap-1 rounded-sm bg-primary/90 px-1.5 py-0.5 text-[11px] font-medium text-primary-foreground hover:bg-primary",
175
175
  onClick: t[0] || (t[0] = (e) => {
176
176
  l("new-chat"), l("close");
177
177
  })
178
178
  }, [(0, r.createVNode)((0, r.unref)(a.Plus), { class: "w-3 h-3" }), (0, r.createTextVNode)(" " + (0, r.toDisplayString)((0, r.unref)(s)("pptx.ai.newChat")), 1)])]),
179
- 0 === o.chats.length ? ((0, r.openBlock)(), (0, r.createElementBlock)("p", w, (0, r.toDisplayString)((0, r.unref)(s)("pptx.ai.historyEmpty")), 1)) : ((0, r.openBlock)(), (0, r.createElementBlock)("ul", N, [((0, r.openBlock)(!0), (0, r.createElementBlock)(r.Fragment, null, (0, r.renderList)(o.chats, (e) => ((0, r.openBlock)(), (0, r.createElementBlock)("li", {
179
+ 0 === o.chats.length ? ((0, r.openBlock)(), (0, r.createElementBlock)("p", N, (0, r.toDisplayString)((0, r.unref)(s)("pptx.ai.historyEmpty")), 1)) : ((0, r.openBlock)(), (0, r.createElementBlock)("ul", V, [((0, r.openBlock)(!0), (0, r.createElementBlock)(r.Fragment, null, (0, r.renderList)(o.chats, (e) => ((0, r.openBlock)(), (0, r.createElementBlock)("li", {
180
180
  key: e.id,
181
181
  class: "group flex items-center gap-1 px-1"
182
182
  }, [(0, r.createElementVNode)("button", {
@@ -185,27 +185,27 @@ var n = { class: "border-t border-border p-2" }, o = { class: "flex items-end ga
185
185
  onClick: (t) => {
186
186
  l("resume", e.id), l("close");
187
187
  }
188
- }, [(0, r.createVNode)((0, r.unref)(a.MessageSquare), { class: "mt-0.5 w-3.5 h-3.5 shrink-0 text-muted-foreground" }), (0, r.createElementVNode)("span", S, [(0, r.createElementVNode)("span", P, (0, r.toDisplayString)(e.title || (0, r.unref)(s)("pptx.ai.untitledChat")), 1), (0, r.createElementVNode)("span", T, (0, r.toDisplayString)((0, r.unref)(s)("pptx.ai.messageCount", { count: e.messageCount })), 1)])], 10, V), (0, r.createElementVNode)("button", {
188
+ }, [(0, r.createVNode)((0, r.unref)(a.MessageSquare), { class: "mt-0.5 w-3.5 h-3.5 shrink-0 text-muted-foreground" }), (0, r.createElementVNode)("span", P, [(0, r.createElementVNode)("span", T, (0, r.toDisplayString)(e.title || (0, r.unref)(s)("pptx.ai.untitledChat")), 1), (0, r.createElementVNode)("span", D, (0, r.toDisplayString)((0, r.unref)(s)("pptx.ai.messageCount", { count: e.messageCount })), 1)])], 10, S), (0, r.createElementVNode)("button", {
189
189
  type: "button",
190
190
  title: (0, r.unref)(s)("pptx.ai.deleteChat"),
191
191
  "aria-label": (0, r.unref)(s)("pptx.ai.deleteChat"),
192
192
  class: "shrink-0 rounded-sm p-1 text-muted-foreground hover:bg-destructive/10 hover:text-destructive",
193
193
  onClick: (t) => l("delete", e.id)
194
- }, [(0, r.createVNode)((0, r.unref)(a.Trash2), { class: "w-3.5 h-3.5" })], 8, D)]))), 128))])),
195
- (0, r.createElementVNode)("p", I, (0, r.toDisplayString)((0, r.unref)(s)("pptx.ai.historyHint")), 1)
194
+ }, [(0, r.createVNode)((0, r.unref)(a.Trash2), { class: "w-3.5 h-3.5" })], 8, I)]))), 128))])),
195
+ (0, r.createElementVNode)("p", A, (0, r.toDisplayString)((0, r.unref)(s)("pptx.ai.historyHint")), 1)
196
196
  ], 512));
197
197
  }
198
- }), F = { class: "text-[12px]" }, j = { class: "flex items-center gap-1.5" }, M = {
198
+ }), j = { class: "text-[12px]" }, M = { class: "flex items-center gap-1.5" }, _ = {
199
199
  key: 0,
200
200
  class: "mt-1 pl-5 text-[11px] text-destructive"
201
- }, _ = {
201
+ }, L = {
202
202
  key: 1,
203
203
  class: "group mt-0.5 pl-5"
204
- }, L = { class: "cursor-pointer list-none text-[10px] text-muted-foreground/70 hover:text-muted-foreground" }, z = { class: "mt-0.5 break-words font-mono text-[10px] text-muted-foreground/80" }, R = (0, r.defineComponent)({
204
+ }, z = { class: "cursor-pointer list-none text-[10px] text-muted-foreground/70 hover:text-muted-foreground" }, R = { class: "mt-0.5 break-words font-mono text-[10px] text-muted-foreground/80" }, q = (0, r.defineComponent)({
205
205
  __name: "AiToolCallCard",
206
206
  props: { part: {} },
207
- setup(n) {
208
- const o = n, { t: l } = e.useI18n(), s = {
207
+ setup(o) {
208
+ const l = o, { t: s } = e.useI18n(), i = {
209
209
  view: a.Eye,
210
210
  text: a.Type,
211
211
  shape: a.Shapes,
@@ -220,97 +220,97 @@ var n = { class: "border-t border-border p-2" }, o = { class: "flex items-end ga
220
220
  animation: a.Film,
221
221
  notes: a.StickyNote,
222
222
  tool: a.Wrench
223
- }, i = (0, r.computed)(() => "output-error" === o.part.state), c = (0, r.computed)(() => "output-available" === o.part.state), p = (0, r.computed)(() => !i.value && !c.value), d = (0, r.computed)(() => t.describeToolActivity(o.part.toolName, o.part.input, p.value ? "present" : "past")), u = (0, r.computed)(() => s[d.value.icon] ?? a.Wrench), m = (0, r.computed)(() => t.summarizeToolArgs(o.part.input)), x = (0, r.computed)(() => i.value ? l("pptx.ai.toolFailed") : c.value ? l("pptx.ai.toolDone") : l("pptx.ai.toolRunning"));
224
- return (e, n) => ((0, r.openBlock)(), (0, r.createElementBlock)("div", F, [
225
- (0, r.createElementVNode)("div", j, [
226
- ((0, r.openBlock)(), (0, r.createBlock)((0, r.resolveDynamicComponent)(u.value), { class: (0, r.normalizeClass)((0, r.unref)(t.cn)("w-3.5 h-3.5 shrink-0", i.value ? "text-destructive" : "text-muted-foreground")) }, null, 8, ["class"])),
227
- (0, r.createElementVNode)("span", { class: (0, r.normalizeClass)((0, r.unref)(t.cn)("truncate", i.value ? "text-destructive" : "text-foreground")) }, (0, r.toDisplayString)(d.value.label), 3),
228
- (0, r.createElementVNode)("span", { class: (0, r.normalizeClass)((0, r.unref)(t.cn)("ml-auto inline-flex items-center gap-1 rounded-sm px-1.5 py-0.5 text-[10px]", i.value ? "bg-destructive/15 text-destructive" : c.value ? "bg-primary/10 text-primary" : "bg-muted text-muted-foreground")) }, [p.value ? ((0, r.openBlock)(), (0, r.createBlock)((0, r.unref)(a.LoaderCircle), {
223
+ }, c = (0, r.computed)(() => "output-error" === l.part.state), p = (0, r.computed)(() => "output-available" === l.part.state), d = (0, r.computed)(() => !c.value && !p.value), u = (0, r.computed)(() => (0, n.describeToolActivity)(l.part.toolName, l.part.input, d.value ? "present" : "past")), m = (0, r.computed)(() => i[u.value.icon] ?? a.Wrench), x = (0, r.computed)(() => (0, n.summarizeToolArgs)(l.part.input)), f = (0, r.computed)(() => c.value ? s("pptx.ai.toolFailed") : p.value ? s("pptx.ai.toolDone") : s("pptx.ai.toolRunning"));
224
+ return (e, o) => ((0, r.openBlock)(), (0, r.createElementBlock)("div", j, [
225
+ (0, r.createElementVNode)("div", M, [
226
+ ((0, r.openBlock)(), (0, r.createBlock)((0, r.resolveDynamicComponent)(m.value), { class: (0, r.normalizeClass)((0, r.unref)(t.cn)("w-3.5 h-3.5 shrink-0", c.value ? "text-destructive" : "text-muted-foreground")) }, null, 8, ["class"])),
227
+ (0, r.createElementVNode)("span", { class: (0, r.normalizeClass)((0, r.unref)(t.cn)("truncate", c.value ? "text-destructive" : "text-foreground")) }, (0, r.toDisplayString)(u.value.label), 3),
228
+ (0, r.createElementVNode)("span", { class: (0, r.normalizeClass)((0, r.unref)(t.cn)("ml-auto inline-flex items-center gap-1 rounded-sm px-1.5 py-0.5 text-[10px]", c.value ? "bg-destructive/15 text-destructive" : p.value ? "bg-primary/10 text-primary" : "bg-muted text-muted-foreground")) }, [d.value ? ((0, r.openBlock)(), (0, r.createBlock)((0, r.unref)(a.LoaderCircle), {
229
229
  key: 0,
230
230
  class: "w-3 h-3 animate-spin"
231
- })) : c.value ? ((0, r.openBlock)(), (0, r.createBlock)((0, r.unref)(a.Check), {
231
+ })) : p.value ? ((0, r.openBlock)(), (0, r.createBlock)((0, r.unref)(a.Check), {
232
232
  key: 1,
233
233
  class: "w-3 h-3"
234
234
  })) : ((0, r.openBlock)(), (0, r.createBlock)((0, r.unref)(a.TriangleAlert), {
235
235
  key: 2,
236
236
  class: "w-3 h-3"
237
- })), (0, r.createTextVNode)(" " + (0, r.toDisplayString)(x.value), 1)], 2)
237
+ })), (0, r.createTextVNode)(" " + (0, r.toDisplayString)(f.value), 1)], 2)
238
238
  ]),
239
- i.value && o.part.errorText ? ((0, r.openBlock)(), (0, r.createElementBlock)("div", M, (0, r.toDisplayString)(o.part.errorText), 1)) : (0, r.createCommentVNode)("", !0),
240
- m.value ? ((0, r.openBlock)(), (0, r.createElementBlock)("details", _, [(0, r.createElementVNode)("summary", L, (0, r.toDisplayString)((0, r.unref)(l)("pptx.ai.toolDetails")), 1), (0, r.createElementVNode)("div", z, (0, r.toDisplayString)((0, r.unref)(t.toolLabel)(o.part.toolName)) + ": " + (0, r.toDisplayString)(m.value), 1)])) : (0, r.createCommentVNode)("", !0)
239
+ c.value && l.part.errorText ? ((0, r.openBlock)(), (0, r.createElementBlock)("div", _, (0, r.toDisplayString)(l.part.errorText), 1)) : (0, r.createCommentVNode)("", !0),
240
+ x.value ? ((0, r.openBlock)(), (0, r.createElementBlock)("details", L, [(0, r.createElementVNode)("summary", z, (0, r.toDisplayString)((0, r.unref)(s)("pptx.ai.toolDetails")), 1), (0, r.createElementVNode)("div", R, (0, r.toDisplayString)((0, r.unref)(n.toolLabel)(l.part.toolName)) + ": " + (0, r.toDisplayString)(x.value), 1)])) : (0, r.createCommentVNode)("", !0)
241
241
  ]));
242
242
  }
243
- }), q = {
243
+ }), H = {
244
244
  key: 0,
245
245
  class: "flex flex-1 flex-col items-center justify-center gap-2 px-6 text-center"
246
- }, H = { class: "text-sm font-medium text-foreground" }, W = { class: "text-[12px] text-muted-foreground" }, U = {
246
+ }, W = { class: "text-sm font-medium text-foreground" }, U = { class: "text-[12px] text-muted-foreground" }, X = {
247
247
  key: 1,
248
248
  class: "flex-1 space-y-3 overflow-y-auto px-3 py-3"
249
- }, X = {
249
+ }, K = {
250
250
  key: 0,
251
251
  class: "flex gap-2"
252
- }, K = ["aria-label"], O = { class: "min-w-0 flex-1 space-y-1.5" }, G = {
252
+ }, O = ["aria-label"], G = { class: "min-w-0 flex-1 space-y-1.5" }, $ = {
253
253
  key: 0,
254
254
  class: "whitespace-pre-wrap break-words text-[13px] leading-relaxed text-foreground"
255
- }, $ = {
255
+ }, J = {
256
256
  key: 0,
257
257
  class: "flex items-center gap-2 pl-8 text-[12px] text-muted-foreground"
258
- }, J = (0, r.defineComponent)({
258
+ }, Q = (0, r.defineComponent)({
259
259
  __name: "AiMessageList",
260
260
  props: {
261
261
  messages: {},
262
262
  isStreaming: { type: Boolean }
263
263
  },
264
- setup(n) {
265
- const o = n, { t: l } = e.useI18n(), s = (0, r.ref)(null);
266
- return (0, r.watch)(() => [o.messages, o.isStreaming], () => {
267
- (0, r.nextTick)(() => s.value?.scrollIntoView({ block: "end" }));
268
- }, { deep: !0 }), (e, n) => 0 === o.messages.length ? ((0, r.openBlock)(), (0, r.createElementBlock)("div", q, [
264
+ setup(o) {
265
+ const l = o, { t: s } = e.useI18n(), i = (0, r.ref)(null);
266
+ return (0, r.watch)(() => [l.messages, l.isStreaming], () => {
267
+ (0, r.nextTick)(() => i.value?.scrollIntoView({ block: "end" }));
268
+ }, { deep: !0 }), (e, o) => 0 === l.messages.length ? ((0, r.openBlock)(), (0, r.createElementBlock)("div", H, [
269
269
  (0, r.createVNode)((0, r.unref)(a.Sparkles), { class: "w-7 h-7 text-primary/70" }),
270
- (0, r.createElementVNode)("p", H, (0, r.toDisplayString)((0, r.unref)(l)("pptx.ai.emptyTitle")), 1),
271
- (0, r.createElementVNode)("p", W, (0, r.toDisplayString)((0, r.unref)(l)("pptx.ai.emptyHint")), 1)
272
- ])) : ((0, r.openBlock)(), (0, r.createElementBlock)("div", U, [
273
- ((0, r.openBlock)(!0), (0, r.createElementBlock)(r.Fragment, null, (0, r.renderList)(o.messages, (e) => ((0, r.openBlock)(), (0, r.createElementBlock)(r.Fragment, { key: e.id }, ["user" === e.role || (0, r.unref)(t.toRenderableParts)(e).length > 0 ? ((0, r.openBlock)(), (0, r.createElementBlock)("div", X, [(0, r.createElementVNode)("div", {
270
+ (0, r.createElementVNode)("p", W, (0, r.toDisplayString)((0, r.unref)(s)("pptx.ai.emptyTitle")), 1),
271
+ (0, r.createElementVNode)("p", U, (0, r.toDisplayString)((0, r.unref)(s)("pptx.ai.emptyHint")), 1)
272
+ ])) : ((0, r.openBlock)(), (0, r.createElementBlock)("div", X, [
273
+ ((0, r.openBlock)(!0), (0, r.createElementBlock)(r.Fragment, null, (0, r.renderList)(l.messages, (e) => ((0, r.openBlock)(), (0, r.createElementBlock)(r.Fragment, { key: e.id }, ["user" === e.role || (0, r.unref)(n.toRenderableParts)(e).length > 0 ? ((0, r.openBlock)(), (0, r.createElementBlock)("div", K, [(0, r.createElementVNode)("div", {
274
274
  class: (0, r.normalizeClass)((0, r.unref)(t.cn)("mt-0.5 flex h-6 w-6 shrink-0 items-center justify-center rounded-full", "user" === e.role ? "bg-secondary text-muted-foreground" : "bg-primary/15 text-primary")),
275
- "aria-label": "user" === e.role ? (0, r.unref)(l)("pptx.ai.you") : (0, r.unref)(l)("pptx.ai.assistant")
275
+ "aria-label": "user" === e.role ? (0, r.unref)(s)("pptx.ai.you") : (0, r.unref)(s)("pptx.ai.assistant")
276
276
  }, ["user" === e.role ? ((0, r.openBlock)(), (0, r.createBlock)((0, r.unref)(a.User), {
277
277
  key: 0,
278
278
  class: "w-3.5 h-3.5"
279
279
  })) : ((0, r.openBlock)(), (0, r.createBlock)((0, r.unref)(a.Bot), {
280
280
  key: 1,
281
281
  class: "w-3.5 h-3.5"
282
- }))], 10, K), (0, r.createElementVNode)("div", O, [((0, r.openBlock)(!0), (0, r.createElementBlock)(r.Fragment, null, (0, r.renderList)((0, r.unref)(t.toRenderableParts)(e), (e, t) => ((0, r.openBlock)(), (0, r.createElementBlock)(r.Fragment, { key: "tool" === e.kind && e.toolCallId || t }, ["text" === e.kind ? ((0, r.openBlock)(), (0, r.createElementBlock)("p", G, (0, r.toDisplayString)(e.text), 1)) : ((0, r.openBlock)(), (0, r.createBlock)(R, {
282
+ }))], 10, O), (0, r.createElementVNode)("div", G, [((0, r.openBlock)(!0), (0, r.createElementBlock)(r.Fragment, null, (0, r.renderList)((0, r.unref)(n.toRenderableParts)(e), (e, t) => ((0, r.openBlock)(), (0, r.createElementBlock)(r.Fragment, { key: "tool" === e.kind && e.toolCallId || t }, ["text" === e.kind ? ((0, r.openBlock)(), (0, r.createElementBlock)("p", $, (0, r.toDisplayString)(e.text), 1)) : ((0, r.openBlock)(), (0, r.createBlock)(q, {
283
283
  key: 1,
284
284
  part: e
285
285
  }, null, 8, ["part"]))], 64))), 128))])])) : (0, r.createCommentVNode)("", !0)], 64))), 128)),
286
- o.isStreaming ? ((0, r.openBlock)(), (0, r.createElementBlock)("div", $, [n[0] || (n[0] = (0, r.createElementVNode)("span", { class: "inline-flex gap-1" }, [
286
+ l.isStreaming ? ((0, r.openBlock)(), (0, r.createElementBlock)("div", J, [o[0] || (o[0] = (0, r.createElementVNode)("span", { class: "inline-flex gap-1" }, [
287
287
  (0, r.createElementVNode)("span", { class: "h-1.5 w-1.5 animate-bounce rounded-full bg-muted-foreground [animation-delay:-0.2s]" }),
288
288
  (0, r.createElementVNode)("span", { class: "h-1.5 w-1.5 animate-bounce rounded-full bg-muted-foreground [animation-delay:-0.1s]" }),
289
289
  (0, r.createElementVNode)("span", { class: "h-1.5 w-1.5 animate-bounce rounded-full bg-muted-foreground" })
290
- ], -1)), (0, r.createTextVNode)(" " + (0, r.toDisplayString)((0, r.unref)(l)("pptx.ai.thinking")), 1)])) : (0, r.createCommentVNode)("", !0),
290
+ ], -1)), (0, r.createTextVNode)(" " + (0, r.toDisplayString)((0, r.unref)(s)("pptx.ai.thinking")), 1)])) : (0, r.createCommentVNode)("", !0),
291
291
  (0, r.createElementVNode)("div", {
292
292
  ref_key: "endRef",
293
- ref: s
293
+ ref: i
294
294
  }, null, 512)
295
295
  ]));
296
296
  }
297
- }), Q = { class: "rounded-md border border-primary/40 bg-primary/5 p-2.5" }, Y = { class: "mb-1.5 text-[11px] font-semibold uppercase tracking-wide text-primary" }, Z = { class: "text-[12px] font-medium text-foreground" }, ee = {
297
+ }), Y = { class: "rounded-md border border-primary/40 bg-primary/5 p-2.5" }, Z = { class: "mb-1.5 text-[11px] font-semibold uppercase tracking-wide text-primary" }, ee = { class: "text-[12px] font-medium text-foreground" }, te = {
298
298
  key: 0,
299
299
  class: "mt-1 max-h-40 space-y-0.5 overflow-y-auto text-[11px] text-muted-foreground"
300
- }, te = { class: "mt-2 flex items-center gap-2" }, re = (0, r.defineComponent)({
300
+ }, re = { class: "mt-2 flex items-center gap-2" }, ae = (0, r.defineComponent)({
301
301
  __name: "AiProposalCard",
302
302
  props: { proposal: {} },
303
303
  emits: ["accept", "reject"],
304
- setup(n, { emit: o }) {
305
- const l = n, s = o, { t: i } = e.useI18n(), c = (0, r.computed)(() => l.proposal.summary.map(t.humanizeDiffLine));
306
- return (e, t) => ((0, r.openBlock)(), (0, r.createElementBlock)("div", Q, [
307
- (0, r.createElementVNode)("div", Y, (0, r.toDisplayString)((0, r.unref)(i)("pptx.ai.proposedChange")), 1),
308
- (0, r.createElementVNode)("div", Z, (0, r.toDisplayString)(l.proposal.label), 1),
309
- c.value.length > 0 ? ((0, r.openBlock)(), (0, r.createElementBlock)("ul", ee, [((0, r.openBlock)(!0), (0, r.createElementBlock)(r.Fragment, null, (0, r.renderList)(c.value, (e, t) => ((0, r.openBlock)(), (0, r.createElementBlock)("li", {
304
+ setup(t, { emit: o }) {
305
+ const l = t, s = o, { t: i } = e.useI18n(), c = (0, r.computed)(() => l.proposal.summary.map(n.humanizeDiffLine));
306
+ return (e, t) => ((0, r.openBlock)(), (0, r.createElementBlock)("div", Y, [
307
+ (0, r.createElementVNode)("div", Z, (0, r.toDisplayString)((0, r.unref)(i)("pptx.ai.proposedChange")), 1),
308
+ (0, r.createElementVNode)("div", ee, (0, r.toDisplayString)(l.proposal.label), 1),
309
+ c.value.length > 0 ? ((0, r.openBlock)(), (0, r.createElementBlock)("ul", te, [((0, r.openBlock)(!0), (0, r.createElementBlock)(r.Fragment, null, (0, r.renderList)(c.value, (e, t) => ((0, r.openBlock)(), (0, r.createElementBlock)("li", {
310
310
  key: t,
311
311
  class: "break-words"
312
312
  }, (0, r.toDisplayString)(e), 1))), 128))])) : (0, r.createCommentVNode)("", !0),
313
- (0, r.createElementVNode)("div", te, [(0, r.createElementVNode)("button", {
313
+ (0, r.createElementVNode)("div", re, [(0, r.createElementVNode)("button", {
314
314
  type: "button",
315
315
  class: "inline-flex items-center gap-1 rounded-sm bg-primary px-2 py-1 text-[11px] font-medium text-primary-foreground transition-colors hover:bg-primary/90",
316
316
  onClick: t[0] || (t[0] = (e) => s("accept", l.proposal.id))
@@ -321,17 +321,17 @@ var n = { class: "border-t border-border p-2" }, o = { class: "flex items-end ga
321
321
  }, [(0, r.createVNode)((0, r.unref)(a.X), { class: "w-3.5 h-3.5" }), (0, r.createTextVNode)(" " + (0, r.toDisplayString)((0, r.unref)(i)("pptx.ai.reject")), 1)])])
322
322
  ]));
323
323
  }
324
- }), ae = { class: "relative flex min-h-0 flex-1 flex-col" }, ne = { class: "flex items-center gap-1 border-b border-border px-2 py-1" }, oe = { class: "ml-auto flex items-center gap-0.5" }, le = ["title", "aria-label"], se = [
324
+ }), ne = { class: "relative flex min-h-0 flex-1 flex-col" }, oe = { class: "flex items-center gap-1 border-b border-border px-2 py-1" }, le = { class: "ml-auto flex items-center gap-0.5" }, se = ["title", "aria-label"], ie = [
325
325
  "title",
326
326
  "aria-label",
327
327
  "disabled"
328
- ], ie = {
328
+ ], ce = {
329
329
  key: 1,
330
330
  class: "mx-3 mb-2 flex items-start gap-2 rounded-md border border-destructive/40 bg-destructive/5 px-2.5 py-1.5 text-[12px] text-destructive"
331
- }, ce = { class: "min-w-0 flex-1" }, pe = { class: "font-medium" }, de = { class: "max-h-24 overflow-y-auto break-words text-[11px] opacity-80" }, ue = {
331
+ }, pe = { class: "min-w-0 flex-1" }, de = { class: "font-medium" }, ue = { class: "max-h-24 overflow-y-auto break-words text-[11px] opacity-80" }, me = {
332
332
  key: 2,
333
333
  class: "max-h-[38%] space-y-2 overflow-y-auto border-t border-border bg-background px-3 py-2"
334
- }, me = { class: "flex items-center justify-between" }, xe = { class: "text-[11px] font-semibold uppercase tracking-wide text-muted-foreground" }, fe = (0, r.defineComponent)({
334
+ }, xe = { class: "flex items-center justify-between" }, fe = { class: "text-[11px] font-semibold uppercase tracking-wide text-muted-foreground" }, ge = (0, r.defineComponent)({
335
335
  __name: "AiConversation",
336
336
  props: {
337
337
  session: {},
@@ -339,27 +339,27 @@ var n = { class: "border-t border-border p-2" }, o = { class: "flex items-end ga
339
339
  bridge: {},
340
340
  aiPanel: {}
341
341
  },
342
- async setup(n) {
342
+ async setup(t) {
343
343
  let o, l;
344
- const s = n, { t: i } = e.useI18n(), { useChat: p } = ([o, l] = (0, r.withAsyncContext)(() => import("@ai-sdk/vue")), o = await o, l(), o), { messages: d, error: u, isStreaming: m, proposals: x, send: f, stop: g, clearError: k, applyProposal: y, rejectProposal: b, acceptAllProposals: h } = function(e, a, n, o = {}) {
345
- const l = (0, r.ref)(a.proposals.list()), s = () => {
346
- l.value = a.proposals.list();
344
+ const s = t, { t: i } = e.useI18n(), { useChat: c } = ([o, l] = (0, r.withAsyncContext)(() => import("@ai-sdk/vue")), o = await o, l(), o), { messages: d, error: u, isStreaming: m, proposals: x, send: f, stop: g, clearError: k, applyProposal: y, rejectProposal: b, acceptAllProposals: h } = function(e, t, a, o = {}) {
345
+ const l = (0, r.ref)(t.proposals.list()), s = () => {
346
+ l.value = t.proposals.list();
347
347
  }, i = e({
348
- transport: a.transport,
349
- sendAutomaticallyWhen: a.sendAutomaticallyWhen,
350
- onError: (e) => n.onError?.(e),
348
+ transport: t.transport,
349
+ sendAutomaticallyWhen: t.sendAutomaticallyWhen,
350
+ onError: (e) => a.onError?.(e),
351
351
  onToolCall: async ({ toolCall: e }) => {
352
- const { toolName: t, toolCallId: r, input: n } = e, o = i.addToolOutput;
352
+ const { toolName: r, toolCallId: a, input: n } = e, o = i.addToolOutput;
353
353
  try {
354
354
  o({
355
- tool: t,
356
- toolCallId: r,
357
- output: await a.executeToolCall(t, n)
355
+ tool: r,
356
+ toolCallId: a,
357
+ output: await t.executeToolCall(r, n)
358
358
  });
359
359
  } catch (e) {
360
360
  o({
361
- tool: t,
362
- toolCallId: r,
361
+ tool: r,
362
+ toolCallId: a,
363
363
  state: "output-error",
364
364
  errorText: e instanceof Error ? e.message : String(e)
365
365
  });
@@ -368,7 +368,7 @@ var n = { class: "border-t border-border p-2" }, o = { class: "flex items-end ga
368
368
  }
369
369
  }), c = (0, r.computed)(() => "submitted" === i.status.value || "streaming" === i.status.value), p = /* @__PURE__ */ new Set();
370
370
  return (0, r.watch)(i.messages, (e) => {
371
- for (const r of t.extractReadyToolCalls(e)) p.has(r.toolCallId) || (p.add(r.toolCallId), o.onToolTarget?.(t.toolCanvasTarget(r.toolName, r.input)));
371
+ for (const t of (0, n.extractReadyToolCalls)(e)) p.has(t.toolCallId) || (p.add(t.toolCallId), o.onToolTarget?.((0, n.toolCanvasTarget)(t.toolName, t.input)));
372
372
  }, { deep: !0 }), {
373
373
  messages: i.messages,
374
374
  status: i.status,
@@ -384,53 +384,53 @@ var n = { class: "border-t border-border p-2" }, o = { class: "flex items-end ga
384
384
  },
385
385
  clearError: () => i.clearError(),
386
386
  applyProposal: (e) => {
387
- a.proposals.apply(e), s();
387
+ t.proposals.apply(e), s();
388
388
  },
389
389
  rejectProposal: (e) => {
390
- a.proposals.revert(e), s();
390
+ t.proposals.revert(e), s();
391
391
  },
392
392
  acceptAllProposals: () => {
393
- a.proposals.acceptAll(), s();
393
+ t.proposals.acceptAll(), s();
394
394
  }
395
395
  };
396
- }(p, s.session, s.config, { onToolTarget: (e) => {
396
+ }(c, s.session, s.config, { onToolTarget: (e) => {
397
397
  e && void 0 !== e.slideIndex && s.bridge.goToSlide(e.slideIndex), s.aiPanel.flashToolTarget(e);
398
398
  } }), v = function(e) {
399
- const a = (0, r.ref)([]), n = t.createAiChatHistoryController({
399
+ const t = (0, r.ref)([]), a = (0, n.createAiChatHistoryController)({
400
400
  deckId: e.deckId,
401
401
  store: e.store,
402
402
  getMessages: () => e.messages.value,
403
403
  setMessages: e.setMessages,
404
404
  untitledLabel: e.untitledLabel,
405
405
  onChatsChanged: (e) => {
406
- a.value = e;
406
+ t.value = e;
407
407
  }
408
- }), o = (0, r.ref)(n.activeChatId()), l = () => {
409
- o.value = n.activeChatId();
408
+ }), o = (0, r.ref)(a.activeChatId()), l = () => {
409
+ o.value = a.activeChatId();
410
410
  };
411
- return (0, r.watch)(e.messages, () => n.notifyMessagesChanged(), { deep: !0 }), (0, r.onBeforeUnmount)(() => n.dispose()), {
412
- chats: a,
411
+ return (0, r.watch)(e.messages, () => a.notifyMessagesChanged(), { deep: !0 }), (0, r.onBeforeUnmount)(() => a.dispose()), {
412
+ chats: t,
413
413
  activeChatId: o,
414
- refresh: () => n.refresh(),
414
+ refresh: () => a.refresh(),
415
415
  newChat: () => {
416
- n.newChat(), l();
416
+ a.newChat(), l();
417
417
  },
418
418
  resumeChat: async (e) => {
419
- await n.resumeChat(e), l();
419
+ await a.resumeChat(e), l();
420
420
  },
421
421
  deleteChat: async (e) => {
422
- await n.deleteChat(e), l();
422
+ await a.deleteChat(e), l();
423
423
  },
424
- clearCurrent: () => n.clearCurrent()
424
+ clearCurrent: () => a.clearCurrent()
425
425
  };
426
426
  }({
427
- deckId: t.deckIdFromBridge(s.bridge),
427
+ deckId: (0, n.deckIdFromBridge)(s.bridge),
428
428
  messages: d,
429
429
  setMessages: (e) => {
430
430
  d.value = e;
431
431
  },
432
432
  untitledLabel: i("pptx.ai.untitledChat")
433
- }), B = (0, r.ref)(!1), E = s.session.changeAnimator.subscribe((e) => {
433
+ }), C = (0, r.ref)(!1), E = s.session.changeAnimator.subscribe((e) => {
434
434
  e && s.bridge.goToSlide(e.slideIndex), s.aiPanel.showChangeBatch(e);
435
435
  });
436
436
  (0, r.onBeforeUnmount)(() => E());
@@ -441,26 +441,26 @@ var n = { class: "border-t border-border p-2" }, o = { class: "flex items-end ga
441
441
  function P() {
442
442
  s.aiPanel.flashToolTarget(null), h();
443
443
  }
444
- return (e, t) => ((0, r.openBlock)(), (0, r.createElementBlock)("div", ae, [
445
- (0, r.createElementVNode)("div", ne, [(0, r.createElementVNode)("button", {
444
+ return (e, t) => ((0, r.openBlock)(), (0, r.createElementBlock)("div", ne, [
445
+ (0, r.createElementVNode)("div", oe, [(0, r.createElementVNode)("button", {
446
446
  type: "button",
447
447
  class: "inline-flex items-center gap-1 rounded-sm px-1.5 py-1 text-[12px] text-muted-foreground hover:bg-accent max-md:min-h-[44px]!",
448
- onClick: t[0] || (t[0] = (e) => B.value = !B.value)
449
- }, [(0, r.createVNode)((0, r.unref)(a.History), { class: "w-3.5 h-3.5" }), (0, r.createTextVNode)(" " + (0, r.toDisplayString)((0, r.unref)(i)("pptx.ai.chats")), 1)]), (0, r.createElementVNode)("div", oe, [(0, r.createElementVNode)("button", {
448
+ onClick: t[0] || (t[0] = (e) => C.value = !C.value)
449
+ }, [(0, r.createVNode)((0, r.unref)(a.History), { class: "w-3.5 h-3.5" }), (0, r.createTextVNode)(" " + (0, r.toDisplayString)((0, r.unref)(i)("pptx.ai.chats")), 1)]), (0, r.createElementVNode)("div", le, [(0, r.createElementVNode)("button", {
450
450
  type: "button",
451
451
  title: (0, r.unref)(i)("pptx.ai.newChat"),
452
452
  "aria-label": (0, r.unref)(i)("pptx.ai.newChat"),
453
453
  class: "rounded-sm p-1 text-muted-foreground hover:bg-accent flex items-center justify-center max-md:min-w-[44px]! max-md:min-h-[44px]!",
454
454
  onClick: t[1] || (t[1] = (e) => (0, r.unref)(v).newChat())
455
- }, [(0, r.createVNode)((0, r.unref)(a.MessageSquarePlus), { class: "w-3.5 h-3.5" })], 8, le), (0, r.createElementVNode)("button", {
455
+ }, [(0, r.createVNode)((0, r.unref)(a.MessageSquarePlus), { class: "w-3.5 h-3.5" })], 8, se), (0, r.createElementVNode)("button", {
456
456
  type: "button",
457
457
  title: (0, r.unref)(i)("pptx.ai.clearChat"),
458
458
  "aria-label": (0, r.unref)(i)("pptx.ai.clearChat"),
459
459
  disabled: 0 === (0, r.unref)(d).length,
460
460
  class: "rounded-sm p-1 text-muted-foreground hover:bg-accent disabled:opacity-40 flex items-center justify-center max-md:min-w-[44px]! max-md:min-h-[44px]!",
461
461
  onClick: t[2] || (t[2] = (e) => (0, r.unref)(v).clearCurrent())
462
- }, [(0, r.createVNode)((0, r.unref)(a.Trash2), { class: "w-3.5 h-3.5" })], 8, se)])]),
463
- B.value ? ((0, r.openBlock)(), (0, r.createBlock)(A, {
462
+ }, [(0, r.createVNode)((0, r.unref)(a.Trash2), { class: "w-3.5 h-3.5" })], 8, ie)])]),
463
+ C.value ? ((0, r.openBlock)(), (0, r.createBlock)(F, {
464
464
  key: 0,
465
465
  chats: (0, r.unref)(v).chats.value,
466
466
  "active-chat-id": (0, r.unref)(v).activeChatId.value,
@@ -471,9 +471,9 @@ var n = { class: "border-t border-border p-2" }, o = { class: "flex items-end ga
471
471
  (0, r.unref)(v).deleteChat(e);
472
472
  }),
473
473
  onNewChat: t[5] || (t[5] = (e) => (0, r.unref)(v).newChat()),
474
- onClose: t[6] || (t[6] = (e) => B.value = !1)
474
+ onClose: t[6] || (t[6] = (e) => C.value = !1)
475
475
  }, null, 8, ["chats", "active-chat-id"])) : (0, r.createCommentVNode)("", !0),
476
- (0, r.createVNode)(C, {
476
+ (0, r.createVNode)(B, {
477
477
  targets: N.value,
478
478
  slides: s.bridge.getSlides(),
479
479
  "is-pinned": V.value,
@@ -498,31 +498,31 @@ var n = { class: "border-t border-border p-2" }, o = { class: "flex items-end ga
498
498
  "onClearPicks",
499
499
  "onSendDirective"
500
500
  ]),
501
- (0, r.createVNode)(J, {
501
+ (0, r.createVNode)(Q, {
502
502
  messages: (0, r.unref)(d),
503
503
  "is-streaming": (0, r.unref)(m)
504
504
  }, null, 8, ["messages", "is-streaming"]),
505
- (0, r.unref)(u) ? ((0, r.openBlock)(), (0, r.createElementBlock)("div", ie, [
505
+ (0, r.unref)(u) ? ((0, r.openBlock)(), (0, r.createElementBlock)("div", ce, [
506
506
  (0, r.createVNode)((0, r.unref)(a.TriangleAlert), { class: "mt-0.5 w-3.5 h-3.5 shrink-0" }),
507
- (0, r.createElementVNode)("div", ce, [(0, r.createElementVNode)("div", pe, (0, r.toDisplayString)((0, r.unref)(i)("pptx.ai.errorPrefix")), 1), (0, r.createElementVNode)("div", de, (0, r.toDisplayString)((0, r.unref)(u).message), 1)]),
507
+ (0, r.createElementVNode)("div", pe, [(0, r.createElementVNode)("div", de, (0, r.toDisplayString)((0, r.unref)(i)("pptx.ai.errorPrefix")), 1), (0, r.createElementVNode)("div", ue, (0, r.toDisplayString)((0, r.unref)(u).message), 1)]),
508
508
  (0, r.createElementVNode)("button", {
509
509
  type: "button",
510
510
  class: "shrink-0 rounded-sm px-1.5 py-0.5 text-[11px] underline-offset-2 hover:underline",
511
511
  onClick: t[7] || (t[7] = (...e) => (0, r.unref)(k) && (0, r.unref)(k)(...e))
512
512
  }, (0, r.toDisplayString)((0, r.unref)(i)("pptx.ai.retry")), 1)
513
513
  ])) : (0, r.createCommentVNode)("", !0),
514
- (0, r.unref)(x).length > 0 ? ((0, r.openBlock)(), (0, r.createElementBlock)("div", ue, [(0, r.createElementVNode)("div", me, [(0, r.createElementVNode)("span", xe, (0, r.toDisplayString)((0, r.unref)(i)("pptx.ai.pendingChanges", { count: (0, r.unref)(x).length })), 1), (0, r.unref)(x).length > 1 ? ((0, r.openBlock)(), (0, r.createElementBlock)("button", {
514
+ (0, r.unref)(x).length > 0 ? ((0, r.openBlock)(), (0, r.createElementBlock)("div", me, [(0, r.createElementVNode)("div", xe, [(0, r.createElementVNode)("span", fe, (0, r.toDisplayString)((0, r.unref)(i)("pptx.ai.pendingChanges", { count: (0, r.unref)(x).length })), 1), (0, r.unref)(x).length > 1 ? ((0, r.openBlock)(), (0, r.createElementBlock)("button", {
515
515
  key: 0,
516
516
  type: "button",
517
517
  class: "rounded-sm bg-primary/90 px-2 py-0.5 text-[11px] font-medium text-primary-foreground hover:bg-primary",
518
518
  onClick: P
519
- }, (0, r.toDisplayString)((0, r.unref)(i)("pptx.ai.acceptAll")), 1)) : (0, r.createCommentVNode)("", !0)]), ((0, r.openBlock)(!0), (0, r.createElementBlock)(r.Fragment, null, (0, r.renderList)((0, r.unref)(x), (e) => ((0, r.openBlock)(), (0, r.createBlock)(re, {
519
+ }, (0, r.toDisplayString)((0, r.unref)(i)("pptx.ai.acceptAll")), 1)) : (0, r.createCommentVNode)("", !0)]), ((0, r.openBlock)(!0), (0, r.createElementBlock)(r.Fragment, null, (0, r.renderList)((0, r.unref)(x), (e) => ((0, r.openBlock)(), (0, r.createBlock)(ae, {
520
520
  key: e.id,
521
521
  proposal: e,
522
522
  onAccept: S,
523
523
  onReject: (0, r.unref)(b)
524
524
  }, null, 8, ["proposal", "onReject"]))), 128))])) : (0, r.createCommentVNode)("", !0),
525
- (0, r.createVNode)(c, {
525
+ (0, r.createVNode)(p, {
526
526
  "is-streaming": (0, r.unref)(m),
527
527
  "prefill-text": s.aiPanel.prefill.value.text,
528
528
  "prefill-nonce": s.aiPanel.prefill.value.nonce,
@@ -537,13 +537,13 @@ var n = { class: "border-t border-border p-2" }, o = { class: "flex items-end ga
537
537
  ])
538
538
  ]));
539
539
  }
540
- }), ge = { class: "flex items-center gap-2 border-b border-border px-3 py-2" }, ke = { class: "text-sm font-semibold text-foreground" }, ye = ["title", "aria-label"], be = {
540
+ }), ke = { class: "flex items-center gap-2 border-b border-border px-3 py-2" }, ye = { class: "text-sm font-semibold text-foreground" }, be = ["title", "aria-label"], he = {
541
541
  key: 0,
542
542
  class: "flex flex-1 flex-col items-center justify-center gap-2 text-muted-foreground"
543
- }, he = {
543
+ }, ve = {
544
544
  key: 1,
545
545
  class: "flex flex-1 flex-col items-center justify-center gap-2 px-6 text-center"
546
- }, ve = { class: "text-sm font-medium text-foreground" }, Ce = { class: "text-[12px] text-muted-foreground" }, Be = { class: "flex flex-1 flex-col items-center justify-center gap-2 text-muted-foreground" }, Ee = (0, r.defineComponent)({
546
+ }, Ce = { class: "text-sm font-medium text-foreground" }, Be = { class: "text-[12px] text-muted-foreground" }, Ee = { class: "flex flex-1 flex-col items-center justify-center gap-2 text-muted-foreground" }, we = (0, r.defineComponent)({
547
547
  __name: "AiChatPanel",
548
548
  props: {
549
549
  bridge: {},
@@ -552,59 +552,59 @@ var n = { class: "border-t border-border p-2" }, o = { class: "flex items-end ga
552
552
  aiPanel: {}
553
553
  },
554
554
  emits: ["close"],
555
- setup(n, { emit: o }) {
556
- const l = n, s = o, { t: i } = e.useI18n(), { state: c, session: p, initError: d } = function(e, a) {
557
- const n = (0, r.ref)("checking"), o = (0, r.shallowRef)(null), l = (0, r.shallowRef)(void 0);
555
+ setup(o, { emit: l }) {
556
+ const s = o, i = l, { t: c } = e.useI18n(), { state: p, session: d, initError: u } = function(e, t) {
557
+ const a = (0, r.ref)("checking"), o = (0, r.shallowRef)(null), l = (0, r.shallowRef)(void 0);
558
558
  let s = 0;
559
559
  return (async () => {
560
560
  const r = ++s;
561
- n.value = "checking", o.value = null, l.value = void 0;
561
+ a.value = "checking", o.value = null, l.value = void 0;
562
562
  try {
563
- const l = await t.isAiAvailable();
563
+ const l = await (0, n.isAiAvailable)();
564
564
  if (r !== s) return;
565
- if (!l) return void (n.value = "unavailable");
566
- const i = await t.createAiChatSession(e, a);
565
+ if (!l) return void (a.value = "unavailable");
566
+ const i = await (0, n.createAiChatSession)(e, t);
567
567
  if (r !== s) return;
568
- o.value = i, n.value = "ready";
568
+ o.value = i, a.value = "ready";
569
569
  } catch (e) {
570
570
  if (r !== s) return;
571
- l.value = e instanceof Error ? e : new Error(String(e)), n.value = "error";
571
+ l.value = e instanceof Error ? e : new Error(String(e)), a.value = "error";
572
572
  }
573
573
  })(), {
574
- state: n,
574
+ state: a,
575
575
  session: o,
576
576
  initError: l
577
577
  };
578
- }(l.bridge, l.config), u = (0, r.computed)(() => l.panelWidth ? { width: `${l.panelWidth}px` } : void 0), m = t.useAiPanelController({
578
+ }(s.bridge, s.config), m = (0, r.computed)(() => s.panelWidth ? { width: `${s.panelWidth}px` } : void 0), x = t.useAiPanelController({
579
579
  activeSlideIndex: (0, r.ref)(0),
580
580
  selectedElementIds: (0, r.ref)([]),
581
581
  selectedElement: () => null
582
- }), x = (0, r.computed)(() => l.aiPanel ?? m);
582
+ }), f = (0, r.computed)(() => s.aiPanel ?? x);
583
583
  return (e, t) => ((0, r.openBlock)(), (0, r.createElementBlock)("div", {
584
584
  "data-pptx-ai-panel": "",
585
585
  class: "absolute right-0 top-0 z-30 flex h-full w-80 flex-col border-l border-border bg-card shadow-xl max-md:inset-x-0 max-md:top-auto max-md:bottom-0 max-md:h-[75dvh] max-md:w-full max-md:rounded-t-2xl max-md:border-l-0 max-md:border-t max-md:shadow-2xl",
586
- style: (0, r.normalizeStyle)(u.value)
587
- }, [(0, r.createElementVNode)("div", ge, [
586
+ style: (0, r.normalizeStyle)(m.value)
587
+ }, [(0, r.createElementVNode)("div", ke, [
588
588
  (0, r.createVNode)((0, r.unref)(a.Sparkles), { class: "w-4 h-4 text-primary" }),
589
- (0, r.createElementVNode)("span", ke, (0, r.toDisplayString)((0, r.unref)(i)("pptx.ai.title")), 1),
589
+ (0, r.createElementVNode)("span", ye, (0, r.toDisplayString)((0, r.unref)(c)("pptx.ai.title")), 1),
590
590
  (0, r.createElementVNode)("button", {
591
591
  type: "button",
592
- title: (0, r.unref)(i)("pptx.ai.close"),
593
- "aria-label": (0, r.unref)(i)("pptx.ai.close"),
592
+ title: (0, r.unref)(c)("pptx.ai.close"),
593
+ "aria-label": (0, r.unref)(c)("pptx.ai.close"),
594
594
  class: "ml-auto flex items-center justify-center rounded-sm p-1 text-muted-foreground transition-colors hover:bg-accent max-md:min-w-[44px]! max-md:min-h-[44px]!",
595
- onClick: t[0] || (t[0] = (e) => s("close"))
596
- }, [(0, r.createVNode)((0, r.unref)(a.X), { class: "w-4 h-4" })], 8, ye)
597
- ]), "checking" === (0, r.unref)(c) ? ((0, r.openBlock)(), (0, r.createElementBlock)("div", be, [(0, r.createVNode)((0, r.unref)(a.LoaderCircle), { class: "w-5 h-5 animate-spin" })])) : "unavailable" === (0, r.unref)(c) || "error" === (0, r.unref)(c) ? ((0, r.openBlock)(), (0, r.createElementBlock)("div", he, [
595
+ onClick: t[0] || (t[0] = (e) => i("close"))
596
+ }, [(0, r.createVNode)((0, r.unref)(a.X), { class: "w-4 h-4" })], 8, be)
597
+ ]), "checking" === (0, r.unref)(p) ? ((0, r.openBlock)(), (0, r.createElementBlock)("div", he, [(0, r.createVNode)((0, r.unref)(a.LoaderCircle), { class: "w-5 h-5 animate-spin" })])) : "unavailable" === (0, r.unref)(p) || "error" === (0, r.unref)(p) ? ((0, r.openBlock)(), (0, r.createElementBlock)("div", ve, [
598
598
  (0, r.createVNode)((0, r.unref)(a.TriangleAlert), { class: "w-6 h-6 text-muted-foreground" }),
599
- (0, r.createElementVNode)("p", ve, (0, r.toDisplayString)((0, r.unref)(i)("pptx.ai.unavailableTitle")), 1),
600
- (0, r.createElementVNode)("p", Ce, (0, r.toDisplayString)((0, r.unref)(d)?.message ?? (0, r.unref)(i)("pptx.ai.unavailableHint")), 1)
601
- ])) : "ready" === (0, r.unref)(c) && (0, r.unref)(p) ? ((0, r.openBlock)(), (0, r.createBlock)(r.Suspense, { key: 2 }, {
602
- fallback: (0, r.withCtx)(() => [(0, r.createElementVNode)("div", Be, [(0, r.createVNode)((0, r.unref)(a.LoaderCircle), { class: "w-5 h-5 animate-spin" })])]),
603
- default: (0, r.withCtx)(() => [(0, r.createVNode)(fe, {
604
- session: (0, r.unref)(p),
605
- config: l.config,
606
- bridge: l.bridge,
607
- "ai-panel": x.value
599
+ (0, r.createElementVNode)("p", Ce, (0, r.toDisplayString)((0, r.unref)(c)("pptx.ai.unavailableTitle")), 1),
600
+ (0, r.createElementVNode)("p", Be, (0, r.toDisplayString)((0, r.unref)(u)?.message ?? (0, r.unref)(c)("pptx.ai.unavailableHint")), 1)
601
+ ])) : "ready" === (0, r.unref)(p) && (0, r.unref)(d) ? ((0, r.openBlock)(), (0, r.createBlock)(r.Suspense, { key: 2 }, {
602
+ fallback: (0, r.withCtx)(() => [(0, r.createElementVNode)("div", Ee, [(0, r.createVNode)((0, r.unref)(a.LoaderCircle), { class: "w-5 h-5 animate-spin" })])]),
603
+ default: (0, r.withCtx)(() => [(0, r.createVNode)(ge, {
604
+ session: (0, r.unref)(d),
605
+ config: s.config,
606
+ bridge: s.bridge,
607
+ "ai-panel": f.value
608
608
  }, null, 8, [
609
609
  "session",
610
610
  "config",
@@ -615,4 +615,4 @@ var n = { class: "border-t border-border p-2" }, o = { class: "flex items-end ga
615
615
  })) : (0, r.createCommentVNode)("", !0)], 4));
616
616
  }
617
617
  });
618
- exports.default = Ee;
618
+ exports.default = we;