hzzt-kfb-slide 0.1.9 → 1.0.1

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 (114) hide show
  1. package/dist/components/{annotateBGxN4SH2.js → annotateD7dWi1FB.js} +1 -1
  2. package/dist/components/{annotateo3vZHfGB.js → annotateVov2YxBu.js} +1 -1
  3. package/dist/components/{annotateCAq6sZAH.js → annotatelukjit1G.js} +3 -3
  4. package/dist/components/{annotateWs8dAunq.js → annotatezQSQm_m5.js} +1 -1
  5. package/dist/components/{arrowDfFmbAvl.js → arrowCWKPERF0.js} +1 -1
  6. package/dist/components/{arrowCircleDqHqb97q.js → arrowCircleBlOatQTw.js} +1 -1
  7. package/dist/components/{arrowCircleO5YzneBS.js → arrowCircleCVyo0kip.js} +1 -1
  8. package/dist/components/{arrowDo5jlJvX.js → arrowDOM9W6NQ.js} +1 -1
  9. package/dist/components/{arrowDown5YaRWzG-.js → arrowDownC6_jSXHK.js} +1 -1
  10. package/dist/components/{arrowDownDFK8VvKS.js → arrowDownk9aOufU8.js} +1 -1
  11. package/dist/components/{arrowLeftiM7Gm_rj.js → arrowLeftCTy9Qktd.js} +1 -1
  12. package/dist/components/{arrowLefthUAyhKf8.js → arrowLeftDLmH0pXC.js} +1 -1
  13. package/dist/components/{arrowRightBm5GCHqI.js → arrowRightBkTqafEZ.js} +1 -1
  14. package/dist/components/{arrowRightDhUaOSZq.js → arrowRightdIGqHIiX.js} +1 -1
  15. package/dist/components/{arrowUpbzQHVqNd.js → arrowUpDOgb5oFJ.js} +1 -1
  16. package/dist/components/{arrowUpIgBDuTvB.js → arrowUpDldgH68L.js} +1 -1
  17. package/dist/components/{bilateralD3fQa6t8.js → bilateralBpS2RHKx.js} +1 -1
  18. package/dist/components/{bilateralCi9iFh5d.js → bilateralDlKnYRS8.js} +1 -1
  19. package/dist/components/{channelDHD-3vZX.js → channelDSRUa3_Z.js} +1 -1
  20. package/dist/components/{channelB0HuZp-h.js → channelc9ywFXtM.js} +1 -1
  21. package/dist/components/{checkBPnPy-Ub.js → checkBqtRjNfN.js} +1 -1
  22. package/dist/components/{checkBo9QGrvm.js → checkDbaQ4MtI.js} +1 -1
  23. package/dist/components/{configCvkvpev9.js → configBajbEZ2E.js} +1 -1
  24. package/dist/components/{config4I5abOF8.js → configTguxX3sM.js} +1 -1
  25. package/dist/components/{customvm73Z9ln.js → customCBfU-2jU.js} +1 -1
  26. package/dist/components/{customDSBh6zAg.js → customrJhgsKZ6.js} +1 -1
  27. package/dist/components/{deleteBNgk9ZOA.js → deleteCWbut_si.js} +1 -1
  28. package/dist/components/{deleteD2YJkDdt.js → deletewtY8meT_.js} +1 -1
  29. package/dist/components/{dotDnPxb7fB.js → dotBUfszbQS.js} +4 -4
  30. package/dist/components/{dot3377DPYD.js → dotBa_CxlZg.js} +1 -1
  31. package/dist/components/{dot0WHIzbhi.js → dotBdW7vfr4.js} +1 -1
  32. package/dist/components/{dotCaGq1n2I.js → dotCJ2bKzEs.js} +1 -1
  33. package/dist/components/{dotBWZcPJ3c.js → dotDLtvDHII.js} +1 -1
  34. package/dist/components/{dotBHF3nRpB.js → dot_yJNkdt4.js} +1 -1
  35. package/dist/components/{downloaddJdK3M2V.js → downloadC53ZSW1Y.js} +1 -1
  36. package/dist/components/{downloadCFpPM1dg.js → downloadCC8VSgAu.js} +3 -3
  37. package/dist/components/{downloadBXzUqH2X.js → downloadCoPXt-5r.js} +1 -1
  38. package/dist/components/{downloadCTNSr5vw.js → downloadQFyOKD4P.js} +1 -1
  39. package/dist/components/{ellipsexXhrXwMO.js → ellipseCAelx2gK.js} +1 -1
  40. package/dist/components/{ellipseDW2x8zyV.js → ellipseD77J-bct.js} +1 -1
  41. package/dist/components/{expandLeftDlPM5C4_.js → expandLeftCI49nScM.js} +1 -1
  42. package/dist/components/{expandLeftC8zJC3sF.js → expandLeftkmM5Ythh.js} +1 -1
  43. package/dist/components/{expandRightD4t5eAC8.js → expandRightBeGpnt0Z.js} +1 -1
  44. package/dist/components/{expandRightB4fr3osn.js → expandRightZqcbL_32.js} +1 -1
  45. package/dist/components/{flagaIA3XdbR.js → flagDPzo3Cu7.js} +1 -1
  46. package/dist/components/{flagCAYFx-Kg.js → flagr8Nh24lE.js} +1 -1
  47. package/dist/components/{flipctjVjVop.js → flipCjfZSgxg.js} +1 -1
  48. package/dist/components/{flipBnog7THW.js → flipDDLkqofk.js} +1 -1
  49. package/dist/components/{fontBlQIMQka.js → fontB0VPgGy_.js} +1 -1
  50. package/dist/components/{fontC8vEFiT8.js → fontCgY0yNcc.js} +1 -1
  51. package/dist/components/{fullscreenCFzLlJwu.js → fullscreen83hUOqOl.js} +1 -1
  52. package/dist/components/{fullscreenD9VUP9_N.js → fullscreenBOOMgudl.js} +1 -1
  53. package/dist/components/{fullscreenBGYoQBVj.js → fullscreenBlBkycp2.js} +2 -2
  54. package/dist/components/{fullscreenPoizImKu.js → fullscreenBqKXQxn5.js} +1 -1
  55. package/dist/components/indexBpatO5y8.js +4 -0
  56. package/dist/components/indexF91KX9_v.js +3148 -0
  57. package/dist/components/{infoBgFtKURA.js → infoCYmzRV3N.js} +1 -1
  58. package/dist/components/{infoGk6YrcsI.js → infoCoGMo2cz.js} +1 -1
  59. package/dist/components/{levelDPHVNGDq.js → levelBs_8o0Cn.js} +1 -1
  60. package/dist/components/{levelM1Zwhfh0.js → levelD0ItnsdU.js} +1 -1
  61. package/dist/components/{lineY2y1VH5T.js → lineCh8hikaf.js} +1 -1
  62. package/dist/components/{lineCACajIda.js → lineGuDrf61V.js} +1 -1
  63. package/dist/components/{microscopeCYzWML7r.js → microscopeBALmxHP4.js} +1 -1
  64. package/dist/components/{microscopeNl42JU1P.js → microscopeCHxhoGwQ.js} +3 -3
  65. package/dist/components/{microscopeBXo7gg6w.js → microscopeCqKPXqCW.js} +1 -1
  66. package/dist/components/{microscopeCni5LwyW.js → microscopeDXv8n9ip.js} +1 -1
  67. package/dist/components/{moveB9NAKOsw.js → moveB9m7dZU4.js} +3 -3
  68. package/dist/components/{movest96iRgd.js → moveCnwaiSQn.js} +1 -1
  69. package/dist/components/{moveCz6A4Ez1.js → moveDhB2N5L3.js} +1 -1
  70. package/dist/components/{moveBVyDEKnl.js → movex-OAOiV5.js} +1 -1
  71. package/dist/components/{nextqhNB-SFW.js → nextBDtU6djG.js} +1 -1
  72. package/dist/components/{nextCwoUsy6E.js → nextsfvoONH_.js} +1 -1
  73. package/dist/components/{polygonDKyvELbA.js → polygonBAOJcIjz.js} +1 -1
  74. package/dist/components/{polygonBT3dOW65.js → polygonU53YjTVm.js} +1 -1
  75. package/dist/components/{prevBpUUYZ6O.js → prevCLz6h8pH.js} +1 -1
  76. package/dist/components/{prevCKEi4Puv.js → prevDsmv_dwB.js} +1 -1
  77. package/dist/components/{processCLMa81uw.js → processBf-a8h50.js} +1 -1
  78. package/dist/components/{processC-WPdB6z.js → processD5R39n4C.js} +3 -3
  79. package/dist/components/{processCH8V7XuS.js → processDlmzK_X6.js} +1 -1
  80. package/dist/components/{processCb2-EpwX.js → processDs967nMh.js} +1 -1
  81. package/dist/components/{rectangleCbnLFNUp.js → rectangleBq0D0Ieo.js} +1 -1
  82. package/dist/components/{rectangleCEz3jlaN.js → rectanglev7ZZIuMq.js} +1 -1
  83. package/dist/components/{rotateCd3NfTn3.js → rotate0ExHfutV.js} +4 -4
  84. package/dist/components/{rotateTx_jA6Tj.js → rotate4CB3LeRI.js} +1 -1
  85. package/dist/components/{rotateCUmCozCI.js → rotateC4fB8W79.js} +1 -1
  86. package/dist/components/{rotateCp0eUC9w.js → rotatemkp7yXAo.js} +1 -1
  87. package/dist/components/{settingL9wi7-is.js → settingBwnMKEQK.js} +1 -1
  88. package/dist/components/{setting7qHA2k3V.js → settingC9ssGpPJ.js} +1 -1
  89. package/dist/components/{settingCjLFtIFq.js → settingCKOYI0nh.js} +1 -1
  90. package/dist/components/{setting4lZ-C5Ee.js → settingDdb14B4b.js} +3 -3
  91. package/dist/components/{starCmSx2RRp.js → starD3fJLs8P.js} +1 -1
  92. package/dist/components/{starD45B3mMF.js → starD8V2H8yu.js} +1 -1
  93. package/dist/components/{tailorDHHY7I25.js → tailorCjaHDLzO.js} +1 -1
  94. package/dist/components/{tailorDPhAvXTy.js → tailorvzc7YCyV.js} +1 -1
  95. package/dist/components/{useCommonCfZYfi5_.js → useCommonCOUqxgFA.js} +1 -1
  96. package/dist/components/{useCommonD1xLsDFm.js → useCommonkgnc9sYb.js} +1 -1
  97. package/dist/components/{voicedPtSHu3-.js → voiceBbW9AGig.js} +1 -1
  98. package/dist/components/{voicejDSvtJQ0.js → voiceDot4Ny7i.js} +1 -1
  99. package/dist/components/{zoomByPWFzTS.js → zoomD4yF6clm.js} +1 -1
  100. package/dist/components/{zoomNFFxBQlY.js → zoomDxM6kUOV.js} +1 -1
  101. package/dist/components/{zoomInEzPaqdhp.js → zoomInC1rAQNbj.js} +1 -1
  102. package/dist/components/{zoomInByzL1beZ.js → zoomInWo9D4be_.js} +1 -1
  103. package/dist/components/{zoomOutCJK4IL-h.js → zoomOutBgFMZ1Iq.js} +1 -1
  104. package/dist/components/{zoomOuthCZGs44j.js → zoomOutPKjlrYTj.js} +1 -1
  105. package/dist/index.cjs.js +1 -1
  106. package/dist/index.css +1 -1
  107. package/dist/index.es.js +1 -1
  108. package/package.json +5 -7
  109. package/types/components/HzztKfbSlide.vue.d.ts +12 -6
  110. package/types/components/KfbSlideList.vue.d.ts +3 -1
  111. package/types/components/ai/list.vue.d.ts +13 -1
  112. package/web-types.json +4 -1
  113. package/dist/components/indexDt4Wwt6a.js +0 -4
  114. package/dist/components/indexYStA35ll.js +0 -3372
@@ -0,0 +1,3148 @@
1
+ var Qt = Object.defineProperty, Jt = Object.defineProperties;
2
+ var el = Object.getOwnPropertyDescriptors;
3
+ var Tt = Object.getOwnPropertySymbols;
4
+ var tl = Object.prototype.hasOwnProperty, ll = Object.prototype.propertyIsEnumerable;
5
+ var Lt = (c, e, o) => e in c ? Qt(c, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : c[e] = o, q = (c, e) => {
6
+ for (var o in e || (e = {}))
7
+ tl.call(e, o) && Lt(c, o, e[o]);
8
+ if (Tt)
9
+ for (var o of Tt(e))
10
+ ll.call(e, o) && Lt(c, o, e[o]);
11
+ return c;
12
+ }, _e = (c, e) => Jt(c, el(e));
13
+ var Te = (c, e, o) => new Promise((l, y) => {
14
+ var v = (m) => {
15
+ try {
16
+ r(o.next(m));
17
+ } catch (h) {
18
+ y(h);
19
+ }
20
+ }, i = (m) => {
21
+ try {
22
+ r(o.throw(m));
23
+ } catch (h) {
24
+ y(h);
25
+ }
26
+ }, r = (m) => m.done ? l(m.value) : Promise.resolve(m.value).then(v, i);
27
+ r((o = o.apply(c, e)).next());
28
+ });
29
+ import { inject as Y, ref as L, markRaw as S, defineAsyncComponent as I, defineComponent as te, createBlock as P, openBlock as _, unref as t, normalizeProps as ol, guardReactiveProps as al, withCtx as T, resolveDynamicComponent as Ie, useModel as De, computed as B, createElementBlock as x, createElementVNode as k, createVNode as C, toDisplayString as E, Fragment as ne, renderList as se, isRef as me, createTextVNode as j, watch as ae, h as nl, renderSlot as le, mergeProps as We, createCommentVNode as R, reactive as ut, onMounted as ge, onBeforeUnmount as Me, normalizeStyle as Z, mergeDefaults as sl, withDirectives as Ee, vShow as Ne, getCurrentInstance as il, mergeModels as ke, normalizeClass as ze, useCssVars as rl, provide as ve, Teleport as Ge, withModifiers as Ke } from "vue";
30
+ import { ElIcon as Ce, ElRow as ul, ElCol as cl, ElSwitch as Ve, ElRadioGroup as je, ElRadio as he, ElDialog as qe, ElForm as st, ElFormItem as re, ElInput as nt, ElButton as be, ElMessage as xt, ElLoading as Vt, ElSlider as dl, ElTag as It, ElCheckbox as Ze, ElTooltip as Et, ElPopover as vl, ElCheckboxGroup as fl, ElPagination as ml } from "element-plus";
31
+ import { useStorage as Le } from "@vueuse/core";
32
+ import { KfbView as fe, OpenSeadragon as xe } from "kfb-view";
33
+ import pl from "v-lazy-image";
34
+ const Mt = Symbol("I18N_INJECT_KEY");
35
+ function ce() {
36
+ const c = Y(Mt), e = (o) => o;
37
+ return {
38
+ locale: c == null ? void 0 : c.locale,
39
+ t: (c == null ? void 0 : c.t) || e
40
+ };
41
+ }
42
+ const hl = {
43
+ install(c, e) {
44
+ c.provide(Mt, e == null ? void 0 : e.global);
45
+ }
46
+ }, W = L({
47
+ annotate: S(I(() => import("./annotateD7dWi1FB.js"))),
48
+ arrowCircle: S(I(() => import("./arrowCircleCVyo0kip.js"))),
49
+ check: S(I(() => import("./checkBqtRjNfN.js"))),
50
+ dot: S(I(() => import("./dot_yJNkdt4.js"))),
51
+ flip: S(I(() => import("./flipCjfZSgxg.js"))),
52
+ info: S(I(() => import("./infoCoGMo2cz.js"))),
53
+ microscope: S(I(() => import("./microscopeCqKPXqCW.js"))),
54
+ move: S(I(() => import("./moveDhB2N5L3.js"))),
55
+ next: S(I(() => import("./nextBDtU6djG.js"))),
56
+ prev: S(I(() => import("./prevCLz6h8pH.js"))),
57
+ process: S(I(() => import("./processBf-a8h50.js"))),
58
+ rotate: S(I(() => import("./rotatemkp7yXAo.js"))),
59
+ fullscreen: S(I(() => import("./fullscreenBOOMgudl.js"))),
60
+ setting: S(I(() => import("./settingCKOYI0nh.js"))),
61
+ tailor: S(I(() => import("./tailorvzc7YCyV.js"))),
62
+ download: S(I(() => import("./downloadCoPXt-5r.js"))),
63
+ config: S(I(() => import("./configBajbEZ2E.js"))),
64
+ arrowDown: S(I(() => import("./arrowDownk9aOufU8.js"))),
65
+ arrowUp: S(I(() => import("./arrowUpDOgb5oFJ.js"))),
66
+ arrowLeft: S(I(() => import("./arrowLeftDLmH0pXC.js"))),
67
+ arrowRight: S(I(() => import("./arrowRightBkTqafEZ.js"))),
68
+ zoomIn: S(I(() => import("./zoomInWo9D4be_.js"))),
69
+ zoomOut: S(I(() => import("./zoomOutBgFMZ1Iq.js"))),
70
+ level: S(I(() => import("./levelD0ItnsdU.js"))),
71
+ channel: S(I(() => import("./channelDSRUa3_Z.js"))),
72
+ delete: S(I(() => import("./deletewtY8meT_.js"))),
73
+ expandLeft: S(I(() => import("./expandLeftCI49nScM.js"))),
74
+ expandRight: S(I(() => import("./expandRightBeGpnt0Z.js"))),
75
+ markLine: S(I(() => import("./lineCh8hikaf.js"))),
76
+ markArrow: S(I(() => import("./arrowDOM9W6NQ.js"))),
77
+ markBilateral: S(I(() => import("./bilateralDlKnYRS8.js"))),
78
+ markRectangle: S(I(() => import("./rectangleBq0D0Ieo.js"))),
79
+ markEllipse: S(I(() => import("./ellipseCAelx2gK.js"))),
80
+ markPolygon: S(I(() => import("./polygonBAOJcIjz.js"))),
81
+ markFlag: S(I(() => import("./flagr8Nh24lE.js"))),
82
+ markStar: S(I(() => import("./starD3fJLs8P.js"))),
83
+ markDot: S(I(() => import("./dotCJ2bKzEs.js"))),
84
+ markFont: S(I(() => import("./fontB0VPgGy_.js"))),
85
+ markVoice: S(I(() => import("./voiceBbW9AGig.js")))
86
+ }), ee = /* @__PURE__ */ te({
87
+ __name: "KfbIcon",
88
+ props: {
89
+ name: {
90
+ type: [String, Number],
91
+ required: !0
92
+ }
93
+ },
94
+ setup(c) {
95
+ return (e, o) => (_(), P(t(Ce), ol(al(e.$attrs)), {
96
+ default: T(() => [
97
+ (_(), P(Ie(t(W)[c.name])))
98
+ ]),
99
+ _: 1
100
+ }, 16));
101
+ }
102
+ }), gl = { class: "hzzt-kfb-tool-config" }, yl = { class: "hzzt-kfb-tool-config__title margin-b-2" }, wl = { class: "hzzt-kfb-tool-config__block flex align-items-center" }, _l = { class: "hzzt-kfb-tool-config__icon flex align-items-center justify-content-center" }, bl = { class: "margin-l-4 flex-1" }, kl = { class: "hzzt-kfb-tool-config__title" }, zl = { class: "flex align-items-center" }, Cl = {
103
+ class: "margin-t-2 margin-b-2",
104
+ style: { width: "160px" }
105
+ }, $l = { class: "flex align-items-center" }, Tl = {
106
+ class: "margin-t-2 margin-b-2",
107
+ style: { width: "160px" }
108
+ }, Ll = { class: "flex align-items-center" }, xl = {
109
+ class: "margin-t-2 margin-b-2",
110
+ style: { width: "160px" }
111
+ }, El = { class: "flex align-items-center" }, Vl = {
112
+ class: "margin-t-2 margin-b-2",
113
+ style: { width: "160px" }
114
+ }, Il = /* @__PURE__ */ te({
115
+ name: "KfbToolConfig",
116
+ __name: "KfbToolConfig",
117
+ props: {
118
+ menus: {
119
+ default: () => []
120
+ },
121
+ menusModifiers: {}
122
+ },
123
+ emits: ["update:menus"],
124
+ setup(c) {
125
+ const e = De(c, "menus"), { t: o } = ce(), l = B(() => e.value.filter((n) => n.name !== "line" && n.name !== "config" && n.name !== "zoom")), y = {
126
+ fullscreen: o("全屏"),
127
+ next: o("上一张"),
128
+ prev: o("上一张"),
129
+ flip: o("镜像翻转"),
130
+ setting: o("工具"),
131
+ rotate: o("旋转"),
132
+ dot: o("打点"),
133
+ annotate: o("标注"),
134
+ tailor: o("截图"),
135
+ process: o("图像处理"),
136
+ microscope: o("镜下"),
137
+ move: o("快速移动"),
138
+ info: o("信息"),
139
+ download: o("下载")
140
+ }, v = Y("show-keyboard", L(!1)), i = Y("show-watermark", L(!1)), r = Y("show-menu-text", L(!0)), m = Le("default-open-ai", !1);
141
+ function h(n) {
142
+ return n in y;
143
+ }
144
+ function w(n) {
145
+ var d;
146
+ return ((d = n.props) == null ? void 0 : d.text) || (h(n.name) ? y[n.name] : "");
147
+ }
148
+ return (n, d) => (_(), x("div", gl, [
149
+ k("h3", yl, E(t(o)("显示管理")), 1),
150
+ C(t(ul), { gutter: 10 }, {
151
+ default: T(() => [
152
+ (_(!0), x(ne, null, se(l.value, (s) => (_(), P(t(cl), {
153
+ key: s.name,
154
+ span: 8
155
+ }, {
156
+ default: T(() => {
157
+ var a, f;
158
+ return [
159
+ k("div", wl, [
160
+ k("div", _l, [
161
+ (a = s.props) != null && a.component ? (_(), P(Ie((f = s.props) == null ? void 0 : f.component), {
162
+ key: 1,
163
+ size: 24
164
+ })) : (_(), P(ee, {
165
+ key: 0,
166
+ size: 24,
167
+ name: s.name
168
+ }, null, 8, ["name"]))
169
+ ]),
170
+ k("p", bl, E(w(s)), 1),
171
+ C(t(Ve), {
172
+ modelValue: s.show,
173
+ "onUpdate:modelValue": (b) => s.show = b,
174
+ "active-text": "",
175
+ "inactive-text": ""
176
+ }, null, 8, ["modelValue", "onUpdate:modelValue"])
177
+ ])
178
+ ];
179
+ }),
180
+ _: 2
181
+ }, 1024))), 128))
182
+ ]),
183
+ _: 1
184
+ }),
185
+ k("div", null, [
186
+ k("h3", kl, E(t(o)("其他设置")), 1),
187
+ k("div", zl, [
188
+ k("p", Cl, E(t(o)("工具列表显示切换")), 1),
189
+ C(t(je), {
190
+ modelValue: t(r),
191
+ "onUpdate:modelValue": d[0] || (d[0] = (s) => me(r) ? r.value = s : null)
192
+ }, {
193
+ default: T(() => [
194
+ C(t(he), { value: !0 }, {
195
+ default: T(() => [
196
+ j(E(t(o)("显示工具名称")), 1)
197
+ ]),
198
+ _: 1
199
+ }),
200
+ C(t(he), { value: !1 }, {
201
+ default: T(() => [
202
+ j(E(t(o)("隐藏工具名称")), 1)
203
+ ]),
204
+ _: 1
205
+ })
206
+ ]),
207
+ _: 1
208
+ }, 8, ["modelValue"])
209
+ ]),
210
+ k("div", $l, [
211
+ k("p", Tl, E(t(o)("小键盘显示切换")), 1),
212
+ C(t(je), {
213
+ modelValue: t(v),
214
+ "onUpdate:modelValue": d[1] || (d[1] = (s) => me(v) ? v.value = s : null)
215
+ }, {
216
+ default: T(() => [
217
+ C(t(he), { value: !0 }, {
218
+ default: T(() => [
219
+ j(E(t(o)("显示小键盘")), 1)
220
+ ]),
221
+ _: 1
222
+ }),
223
+ C(t(he), { value: !1 }, {
224
+ default: T(() => [
225
+ j(E(t(o)("隐藏小键盘")), 1)
226
+ ]),
227
+ _: 1
228
+ })
229
+ ]),
230
+ _: 1
231
+ }, 8, ["modelValue"])
232
+ ]),
233
+ k("div", Ll, [
234
+ k("p", xl, E(t(o)("水印文字")), 1),
235
+ C(t(je), {
236
+ modelValue: t(i),
237
+ "onUpdate:modelValue": d[2] || (d[2] = (s) => me(i) ? i.value = s : null)
238
+ }, {
239
+ default: T(() => [
240
+ C(t(he), { value: !0 }, {
241
+ default: T(() => [
242
+ j(E(t(o)("启用")), 1)
243
+ ]),
244
+ _: 1
245
+ }),
246
+ C(t(he), { value: !1 }, {
247
+ default: T(() => [
248
+ j(E(t(o)("禁用")), 1)
249
+ ]),
250
+ _: 1
251
+ })
252
+ ]),
253
+ _: 1
254
+ }, 8, ["modelValue"])
255
+ ]),
256
+ k("div", El, [
257
+ k("p", Vl, E(t(o)("默认开启AI分析")), 1),
258
+ C(t(je), {
259
+ modelValue: t(m),
260
+ "onUpdate:modelValue": d[3] || (d[3] = (s) => me(m) ? m.value = s : null)
261
+ }, {
262
+ default: T(() => [
263
+ C(t(he), { value: !0 }, {
264
+ default: T(() => [
265
+ j(E(t(o)("开")), 1)
266
+ ]),
267
+ _: 1
268
+ }),
269
+ C(t(he), { value: !1 }, {
270
+ default: T(() => [
271
+ j(E(t(o)("关")), 1)
272
+ ]),
273
+ _: 1
274
+ })
275
+ ]),
276
+ _: 1
277
+ }, 8, ["modelValue"])
278
+ ])
279
+ ])
280
+ ]));
281
+ }
282
+ }), Ml = { class: "hzzt-kfb-toolbox" }, Sl = { class: "hzzt-kfb-toolbox__component" }, Ye = /* @__PURE__ */ te({
283
+ name: "KfbToolbox",
284
+ __name: "KfbToolbox",
285
+ props: {
286
+ menu: {},
287
+ process: {},
288
+ microscope: {}
289
+ },
290
+ emits: ["tool"],
291
+ setup(c, { emit: e }) {
292
+ const o = c, l = e, { t: y } = ce(), v = {
293
+ prev: y("上一张"),
294
+ next: y("下一张"),
295
+ config: y("配置"),
296
+ info: y("信息"),
297
+ flip: y("镜像"),
298
+ tailor: y("截图")
299
+ }, i = Y("kfbViewRef"), r = L(!1), m = L(n(o.menu)), h = {
300
+ fullscreen: I(() => import("./fullscreenBlBkycp2.js")),
301
+ line: I(() => import("./lineBNwqZbqu.js")),
302
+ setting: I(() => import("./settingDdb14B4b.js")),
303
+ rotate: I(() => import("./rotate0ExHfutV.js")),
304
+ dot: I(() => import("./dotBUfszbQS.js")),
305
+ annotate: I(() => import("./annotatelukjit1G.js")),
306
+ process: I(() => import("./processD5R39n4C.js")),
307
+ microscope: I(() => import("./microscopeCHxhoGwQ.js")),
308
+ move: I(() => import("./moveB9m7dZU4.js")),
309
+ custom: I(() => import("./customrJhgsKZ6.js")),
310
+ zoom: I(() => import("./zoomD4yF6clm.js")),
311
+ download: I(() => import("./downloadCC8VSgAu.js"))
312
+ }, w = B(() => m.value.filter((s) => s.show !== !1).map((s) => ({
313
+ component: h[s.name],
314
+ props: s.props,
315
+ slots: s.slots
316
+ })));
317
+ ae(() => o.menu, (s) => {
318
+ m.value = n(s);
319
+ });
320
+ function n(s) {
321
+ return s.map((a) => {
322
+ const f = typeof a == "string" ? a : a.name;
323
+ return v[f] ? {
324
+ name: "custom",
325
+ show: typeof a == "string" ? !0 : a.show !== !1,
326
+ props: _e(q({
327
+ text: v[f],
328
+ component: nl(ee, {
329
+ name: f
330
+ })
331
+ }, typeof a == "string" ? {} : a.props), {
332
+ name: f
333
+ })
334
+ } : f === "process" ? {
335
+ name: f,
336
+ props: typeof a == "string" ? {
337
+ process: o.process
338
+ } : q({
339
+ process: o.process
340
+ }, a.props),
341
+ slots: typeof a == "string" ? void 0 : a.slots,
342
+ show: typeof a == "string" ? !0 : a.show !== !1
343
+ } : f === "microscope" ? {
344
+ name: f,
345
+ props: typeof a == "string" ? {
346
+ process: o.process
347
+ } : q({
348
+ microscope: o.microscope
349
+ }, a.props),
350
+ slots: typeof a == "string" ? void 0 : a.slots,
351
+ show: typeof a == "string" ? !0 : a.show !== !1
352
+ } : {
353
+ name: f,
354
+ props: typeof a == "string" ? {} : a.props,
355
+ slots: typeof a == "string" ? void 0 : a.slots,
356
+ show: typeof a == "string" ? !0 : a.show !== !1
357
+ };
358
+ });
359
+ }
360
+ function d(s, a) {
361
+ const f = {
362
+ annotate: () => i.value.startDraw(a),
363
+ tailor: () => i.value.shotScreen(a),
364
+ process: () => i.value.forceRedraw(a),
365
+ microscope: () => i.value.scopeChange(a),
366
+ move: () => i.value.fastMove(a),
367
+ endDraw: () => i.value.endDraw(),
368
+ info: () => i.value.info(),
369
+ zoom: () => i.value.zoomTo(a),
370
+ flip: () => i.value.toggleFlip(a),
371
+ config: () => r.value = !0,
372
+ grid: () => i.value.updateGrid(a),
373
+ ruler: () => i.value.updateGrid(a),
374
+ graduation: () => i.value.updateGraduation(a),
375
+ navigator: () => i.value.updateNavigator(a),
376
+ tool: () => {
377
+ i.value.updateGrid({
378
+ show: a
379
+ }), i.value.updateGraduation({
380
+ show: a
381
+ }), i.value.updateGrid({
382
+ ruler: a
383
+ }), i.value.updateNavigator(a);
384
+ }
385
+ };
386
+ f[s] ? f[s]() : l("tool", s, a);
387
+ }
388
+ return (s, a) => (_(), x("div", Ml, [
389
+ le(s.$slots, "left"),
390
+ k("div", Sl, [
391
+ (_(!0), x(ne, null, se(w.value, (f, b) => (_(), P(Ie(f.component), We({ ref_for: !0 }, f.props, {
392
+ key: b,
393
+ onTool: d
394
+ }), {
395
+ default: T(() => [
396
+ f.slots ? (_(!0), x(ne, { key: 0 }, se(f.slots, (g) => (_(), P(Ie(g)))), 256)) : R("", !0)
397
+ ]),
398
+ _: 2
399
+ }, 1040))), 128))
400
+ ]),
401
+ le(s.$slots, "right"),
402
+ C(t(qe), {
403
+ modelValue: r.value,
404
+ "onUpdate:modelValue": a[1] || (a[1] = (f) => r.value = f),
405
+ width: "800px",
406
+ title: t(y)("阅片工具设置中心")
407
+ }, {
408
+ default: T(() => [
409
+ C(Il, {
410
+ menus: m.value,
411
+ "onUpdate:menus": a[0] || (a[0] = (f) => m.value = f)
412
+ }, null, 8, ["menus"])
413
+ ]),
414
+ _: 1
415
+ }, 8, ["modelValue", "title"])
416
+ ]));
417
+ }
418
+ }), Xe = "data:image/svg+xml,%3csvg%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20width='32'%20height='32'%3e%3cpath%20d='M556.45%20126.8H904.7c31.31%200%2056.26%2025.47%2057.3%2056.78v656.85c-0.68%2031.26-26.03%2056.35-57.3%2056.72H617.28l74.32-291.24-77.38-56.14%2032.3-27.32c8.28-6.66%2015.51-11.46%2025.7-11.46%209.96%200.24%2019.33%204.77%2025.7%2012.45h-0.06l198.87%20214.09-0.58-522.46c-0.75-13.7-12.21-24.35-25.93-24.08H542.45l14-64.19z%20m-118.47%200l-14.01%2064.24H152.41c-13.6%200-24.31%209.84-26.22%2023.44v522.63l242.33-292.28-13.08%2060.14%20204.6%20148.46-62.22%20243.77H118.15a56.398%2056.398%200%200%201-39.86-16.73A56.35%2056.35%200%200%201%2062%20840.43V183.57c0-31.25%2024.89-56.72%2056.14-56.72h319.83v-0.05z%20m203.67%20224.68c-0.86-34.98%2017.31-67.68%2047.47-85.42%2030.16-17.74%2067.56-17.74%2097.73%200%2030.16%2017.74%2048.33%2050.44%2047.47%2085.42%200%2053.22-43.15%2096.37-96.37%2096.37-53.22%200-96.37-43.14-96.37-96.37h0.07z%20m0%200'%20fill='%23ffffff'%3e%3c/path%3e%3c/svg%3e", it = {
419
+ shape: "50%",
420
+ width: 0.3,
421
+ color: "#FA0404",
422
+ borderWidth: 5
423
+ }, St = {
424
+ r: 0,
425
+ g: 0,
426
+ b: 0,
427
+ c: 0,
428
+ s: 0,
429
+ l: 0,
430
+ ga: 1
431
+ };
432
+ function Hl(c) {
433
+ const e = ut(q(q({}, St), c.process));
434
+ ae(() => c.process, (v) => {
435
+ y(v);
436
+ });
437
+ const o = B(() => {
438
+ const v = [
439
+ 1 + e.r + e.l + 0.5 * e.c,
440
+ 0,
441
+ 0,
442
+ 0,
443
+ -0.25 * e.c
444
+ ], i = [
445
+ 0,
446
+ 1 + e.g + e.l + 0.5 * e.c,
447
+ 0,
448
+ 0,
449
+ -0.25 * e.c
450
+ ], r = [
451
+ 0,
452
+ 0,
453
+ 1 + e.b + e.l + 0.5 * e.c,
454
+ 0,
455
+ -0.25 * e.c
456
+ ], m = [0, 0, 0, 1, 0];
457
+ return `${v.join(" ")}
458
+ ${i.join(" ")}
459
+ ${r.join(" ")}
460
+ ${m.join(" ")}`;
461
+ }), l = B(() => String(1 + e.s));
462
+ function y(v) {
463
+ v && Object.assign(e, v);
464
+ }
465
+ return {
466
+ imageProcess: e,
467
+ matrixValues: o,
468
+ saturateValues: l,
469
+ forceRedraw: y
470
+ };
471
+ }
472
+ function Pl(c, e) {
473
+ function o() {
474
+ e.value.$on(fe.events.EVENT_TAILORING_SCREENSHOT, l);
475
+ }
476
+ function l({ base64: i, region: r, custom: m }) {
477
+ if (window.ClipboardItem && (navigator != null && navigator.clipboard)) {
478
+ const h = y(i, "image/png");
479
+ navigator.clipboard.write([
480
+ new window.ClipboardItem({
481
+ [h.type]: h
482
+ })
483
+ ]);
484
+ }
485
+ c("tool", "screen-shot", { base64: i, region: r, custom: m });
486
+ }
487
+ function y(i, r) {
488
+ var d, s;
489
+ const m = i.split(",");
490
+ (s = (d = m[0]) == null ? void 0 : d.match(/:(.*?);/)) == null || s[1];
491
+ const h = atob(m == null ? void 0 : m[1]);
492
+ let w = h.length;
493
+ const n = new Uint8Array(w);
494
+ for (; w--; )
495
+ n[w] = h.charCodeAt(w);
496
+ return new Blob([n], { type: r });
497
+ }
498
+ function v(i, r) {
499
+ const { width: m, height: h } = e.value.$options;
500
+ i ? m > h ? e.value.tailoring.init(
501
+ {
502
+ left: (m - h) / 2,
503
+ top: 0,
504
+ height: h,
505
+ width: h,
506
+ now: !0
507
+ },
508
+ r
509
+ ) : e.value.tailoring.init(
510
+ {
511
+ left: 0,
512
+ top: (h - m) / 2,
513
+ height: m,
514
+ width: m,
515
+ now: !0
516
+ },
517
+ r
518
+ ) : e.value.tailoring.init(
519
+ {
520
+ left: m / 2 - 100,
521
+ top: h / 2 - 100,
522
+ height: 200,
523
+ width: 200,
524
+ color: "#ff0000"
525
+ },
526
+ r
527
+ );
528
+ }
529
+ return {
530
+ tailorEvent: o,
531
+ shotScreen: v
532
+ };
533
+ }
534
+ const Rl = ["onClick"], Al = ["src"], Nl = {
535
+ key: 2,
536
+ style: { width: "18px" },
537
+ class: "margin-r-3"
538
+ }, Bl = {
539
+ key: 1,
540
+ class: "hzzt-kfb-sub-menu"
541
+ }, Dl = ["onClick"], Ul = { class: "flex align-items-center" }, Fl = ["src"], Kl = {
542
+ key: 2,
543
+ style: { width: "18px" },
544
+ class: "margin-r-2"
545
+ }, jl = /* @__PURE__ */ te({
546
+ __name: "KfbMenu",
547
+ props: {
548
+ menus: {}
549
+ },
550
+ emits: ["tool"],
551
+ setup(c, { emit: e }) {
552
+ const o = L({
553
+ top: "0",
554
+ left: "0",
555
+ display: "none"
556
+ }), l = Y("kfbView", L({})), y = Y("currentLabel"), v = c, i = e, { t: r } = ce(), m = [
557
+ {
558
+ label: r("直线"),
559
+ value: "line",
560
+ icon: W.value.markLine
561
+ },
562
+ {
563
+ label: r("箭头"),
564
+ value: "arrow",
565
+ icon: W.value.markArrow
566
+ },
567
+ {
568
+ label: r("双箭头"),
569
+ value: "bilateral",
570
+ icon: W.value.markBilateral
571
+ },
572
+ {
573
+ label: r("矩形"),
574
+ value: "rectangle",
575
+ icon: W.value.markRectangle
576
+ },
577
+ {
578
+ label: r("圆形"),
579
+ value: "ellipse",
580
+ icon: W.value.markEllipse
581
+ },
582
+ {
583
+ label: r("曲线"),
584
+ value: "polygon",
585
+ icon: W.value.markPolygon
586
+ },
587
+ {
588
+ label: r("星星"),
589
+ value: "star",
590
+ icon: W.value.markStar
591
+ },
592
+ {
593
+ label: r("旗帜"),
594
+ value: "flag",
595
+ icon: W.value.markFlag
596
+ },
597
+ {
598
+ label: r("点"),
599
+ value: "dot",
600
+ icon: W.value.markDot
601
+ },
602
+ {
603
+ label: r("文字"),
604
+ value: "font",
605
+ icon: W.value.markFont
606
+ },
607
+ {
608
+ label: r("语音"),
609
+ value: "voice",
610
+ icon: W.value.markVoice
611
+ }
612
+ ], h = B(() => {
613
+ var a;
614
+ return y != null && y.value ? [{
615
+ label: r("删除"),
616
+ value: "delete",
617
+ icon: W.value.delete
618
+ }] : (a = v.menus) != null && a.length ? v.menus.map((f) => f.value === "annotate" ? _e(q({}, f), {
619
+ children: m
620
+ }) : _e(q({}, f), {
621
+ icon: f.icon || W.value[f.value]
622
+ })) : [
623
+ {
624
+ label: r("上一张"),
625
+ value: "prev"
626
+ },
627
+ {
628
+ label: r("下一张"),
629
+ value: "next"
630
+ },
631
+ {
632
+ label: r("标注"),
633
+ value: "annotate",
634
+ icon: W.value.annotate,
635
+ children: m
636
+ },
637
+ {
638
+ label: r("一键截图"),
639
+ value: "tailor_now",
640
+ icon: W.value.tailor
641
+ },
642
+ {
643
+ label: r("区域截图"),
644
+ value: "tailor"
645
+ },
646
+ {
647
+ label: r("镜像翻转"),
648
+ value: "flip",
649
+ icon: W.value.flip
650
+ },
651
+ {
652
+ label: r("切片信息"),
653
+ value: "info",
654
+ icon: W.value.info
655
+ }
656
+ ];
657
+ });
658
+ ae(() => l.value, (a, f) => {
659
+ f != null && f.viewer && (f.viewer.removeHandler("canvas-contextmenu", w), f.viewer.removeHandler("canvas-click", n)), a != null && a.viewer && (a.viewer.addHandler("canvas-contextmenu", w), a.viewer.addHandler("canvas-click", n));
660
+ }), ge(() => {
661
+ var a;
662
+ (a = l.value) != null && a.viewer && (l.value.viewer.addHandler("canvas-contextmenu", w), l.value.viewer.addHandler("canvas-click", n)), document.body.addEventListener("click", n);
663
+ }), Me(() => {
664
+ var a;
665
+ (a = l.value) != null && a.viewer && (l.value.viewer.removeHandler("canvas-contextmenu", w), l.value.viewer.removeHandler("canvas-click", n)), document.body.removeEventListener("click", n);
666
+ });
667
+ function w(a) {
668
+ a.preventDefault = !0, o.value.top = `${a.position.y}px`, o.value.left = `${a.position.x}px`, o.value.display === "block" ? o.value.display = "none" : o.value.display = "block";
669
+ }
670
+ function n() {
671
+ o.value.display = "none";
672
+ }
673
+ function d(a, f) {
674
+ a.children || ((f == null ? void 0 : f.value) === "annotate" ? i("tool", "annotate", {
675
+ tool: a.value.substring(0, 1).toLocaleUpperCase() + a.value.substring(1),
676
+ once: !0
677
+ }) : a.value === "tailor_now" ? i("tool", "tailor", !0) : i("tool", a.value), n());
678
+ }
679
+ function s(a) {
680
+ return a == null || typeof a != "object" && typeof a != "function" ? !1 : (
681
+ // 函数式组件
682
+ typeof a == "function" || // 对象式组件
683
+ "render" in a || "setup" in a
684
+ );
685
+ }
686
+ return (a, f) => (_(), x("div", {
687
+ class: "hzzt-kfb-menu",
688
+ style: Z(o.value)
689
+ }, [
690
+ (_(!0), x(ne, null, se(h.value, (b, g) => (_(), x("div", {
691
+ key: g,
692
+ class: "hzzt-kfb-menu-item"
693
+ }, [
694
+ k("div", {
695
+ class: "flex align-items-center",
696
+ onClick: (p) => d(b)
697
+ }, [
698
+ s(b.icon) ? (_(), P(t(Ce), {
699
+ key: 0,
700
+ class: "margin-r-3",
701
+ size: 18
702
+ }, {
703
+ default: T(() => [
704
+ (_(), P(Ie(b.icon)))
705
+ ]),
706
+ _: 2
707
+ }, 1024)) : b.icon ? (_(), x("img", {
708
+ key: 1,
709
+ style: { width: "18px" },
710
+ class: "margin-r-2",
711
+ src: b.icon
712
+ }, null, 8, Al)) : (_(), x("div", Nl)),
713
+ k("span", null, E(b.label), 1)
714
+ ], 8, Rl),
715
+ b.children ? (_(), P(ee, {
716
+ key: 0,
717
+ name: "arrowRight",
718
+ class: "margin-r-2",
719
+ size: 14
720
+ })) : R("", !0),
721
+ b.children ? (_(), x("div", Bl, [
722
+ (_(!0), x(ne, null, se(b.children, (p, u) => (_(), x("div", {
723
+ key: u,
724
+ class: "hzzt-kfb-menu-item",
725
+ onClick: (H) => d(p, b)
726
+ }, [
727
+ k("div", Ul, [
728
+ s(p.icon) ? (_(), P(t(Ce), {
729
+ key: 0,
730
+ class: "margin-r-2",
731
+ size: 18
732
+ }, {
733
+ default: T(() => [
734
+ (_(), P(Ie(p.icon)))
735
+ ]),
736
+ _: 2
737
+ }, 1024)) : p.icon ? (_(), x("img", {
738
+ key: 1,
739
+ style: { width: "18px" },
740
+ class: "margin-r-2",
741
+ src: p.icon
742
+ }, null, 8, Fl)) : (_(), x("div", Kl)),
743
+ k("span", null, E(p.label), 1)
744
+ ])
745
+ ], 8, Dl))), 128))
746
+ ])) : R("", !0)
747
+ ]))), 128))
748
+ ], 4));
749
+ }
750
+ }), ye = (c, e) => {
751
+ const o = c.__vccOpts || c;
752
+ for (const [l, y] of e)
753
+ o[l] = y;
754
+ return o;
755
+ }, Ol = /* @__PURE__ */ ye(jl, [["__scopeId", "data-v-414722d0"]]), Gl = {
756
+ key: 0,
757
+ class: "hzzt-kfb-microscope"
758
+ }, Wl = /* @__PURE__ */ te({
759
+ __name: "KfbMicroscope",
760
+ props: /* @__PURE__ */ sl({
761
+ shape: {},
762
+ width: {},
763
+ color: {},
764
+ borderWidth: {}
765
+ }, q({}, it)),
766
+ setup(c, { expose: e }) {
767
+ const o = c, l = ut(q(q({}, it), o));
768
+ ae(() => o, (n) => {
769
+ w({ name: "change", value: n });
770
+ });
771
+ const y = L("200px"), v = L(!1), i = B(() => ({
772
+ borderRadius: l.shape,
773
+ borderColor: l.color,
774
+ borderWidth: l.borderWidth + "px",
775
+ width: y.value,
776
+ height: y.value
777
+ })), r = Y("kfbView", L({}));
778
+ ae(() => r.value, (n, d) => {
779
+ d != null && d.viewer && d.viewer.removeHandler("zoom", m), n != null && n.viewer && n.viewer.addHandler("zoom", m);
780
+ }), ge(() => {
781
+ var n;
782
+ (n = r.value) != null && n.viewer && r.value.viewer.addHandler("zoom", m);
783
+ }), Me(() => {
784
+ var n;
785
+ (n = r.value) != null && n.viewer && r.value.viewer.removeHandler("zoom", m);
786
+ });
787
+ function m() {
788
+ setTimeout(() => {
789
+ w({ name: "change", value: l });
790
+ }, 100);
791
+ }
792
+ function h(n) {
793
+ let { x: d, y: s } = r.value.viewer.viewport.getCenter(!0);
794
+ n === "top" ? s -= 6e-3 : n === "bottom" ? s += 6e-3 : n === "left" ? d -= 6e-3 : n === "right" && (d += 6e-3), r.value.area.moveToLabel({ x: d, y: s });
795
+ }
796
+ function w({ name: n, value: d }) {
797
+ var a, f;
798
+ const s = (f = (a = r.value.$options) == null ? void 0 : a.pxConversion) == null ? void 0 : f.imageCapRes;
799
+ if (n === "visible") {
800
+ if (v.value = d, d) {
801
+ const b = r.value.area.imageToViewerElementRectangle(
802
+ {
803
+ x: 0,
804
+ y: 0,
805
+ width: l.width * 1e3 / s,
806
+ height: l.width * 1e3 / s
807
+ }
808
+ );
809
+ y.value = b.width + "px";
810
+ }
811
+ } else if (n === "change") {
812
+ Object.assign(l, d);
813
+ const b = r.value.area.imageToViewerElementRectangle(
814
+ {
815
+ x: 0,
816
+ y: 0,
817
+ width: l.width * 1e3 / s,
818
+ height: l.width * 1e3 / s
819
+ }
820
+ );
821
+ y.value = b.width + "px";
822
+ }
823
+ }
824
+ return e({
825
+ scopeChange: w
826
+ }), (n, d) => v.value ? (_(), x("div", Gl, [
827
+ k("div", {
828
+ class: "hzzt-kfb-microscope__container",
829
+ style: Z(i.value)
830
+ }, null, 4),
831
+ k("div", {
832
+ class: "hzzt-kfb-microscope__top",
833
+ onClick: d[0] || (d[0] = (s) => h("top"))
834
+ }, [
835
+ C(ee, {
836
+ size: "24",
837
+ name: "arrowUp"
838
+ })
839
+ ]),
840
+ k("div", {
841
+ class: "hzzt-kfb-microscope__bottom",
842
+ onClick: d[1] || (d[1] = (s) => h("bottom"))
843
+ }, [
844
+ C(ee, {
845
+ size: "24",
846
+ name: "arrowDown"
847
+ })
848
+ ]),
849
+ k("div", {
850
+ class: "hzzt-kfb-microscope__left",
851
+ onClick: d[2] || (d[2] = (s) => h("left"))
852
+ }, [
853
+ C(ee, {
854
+ size: "24",
855
+ name: "arrowLeft"
856
+ })
857
+ ]),
858
+ k("div", {
859
+ class: "hzzt-kfb-microscope__right",
860
+ onClick: d[3] || (d[3] = (s) => h("right"))
861
+ }, [
862
+ C(ee, {
863
+ size: "24",
864
+ name: "arrowRight"
865
+ })
866
+ ])
867
+ ])) : R("", !0);
868
+ }
869
+ }), ql = /* @__PURE__ */ ye(Wl, [["__scopeId", "data-v-cf5949b8"]]), Zl = { class: "hzzt-kfb-label flex column" }, Yl = { class: "hzzt-kfb-label__img flex justify-content-center" }, Xl = ["src"], Ql = { class: "ellipsis flex-1" }, Jl = {
870
+ class: "flex margin-b-4",
871
+ style: { width: "100%" }
872
+ }, eo = {
873
+ class: "flex margin overflow-hidden",
874
+ style: { height: "132px" }
875
+ }, to = ["src"], lo = ["src"], oo = /* @__PURE__ */ te({
876
+ __name: "KfbLabel",
877
+ props: {
878
+ visible: { type: Boolean },
879
+ info: {},
880
+ slide: {},
881
+ pathologyHandle: { type: Function }
882
+ },
883
+ emits: ["tool"],
884
+ setup(c, { emit: e }) {
885
+ var n;
886
+ const { t: o } = ce(), l = c, y = e, v = L((n = l.visible) != null ? n : !0), i = L(!1), r = B(() => l.slide.pathology_id ? o("修改病理号") : o("绑定病理号"));
887
+ function m() {
888
+ l.slide.angle || (l.slide.angle = 0), l.slide.angle += 90, l.slide.angle > 360 && (l.slide.angle = l.slide.angle % 360), y("tool", "rotate", l.slide.angle);
889
+ }
890
+ function h() {
891
+ i.value = !0;
892
+ }
893
+ function w() {
894
+ l.pathologyHandle && l.pathologyHandle(l.slide).then(() => {
895
+ i.value = !1;
896
+ });
897
+ }
898
+ return (d, s) => (_(), x("div", Zl, [
899
+ Ee(k("div", { class: "hzzt-kfb-label__title" }, E(t(o)(`点击标签旋转${d.pathologyHandle ? ",点击病理号重绑" : ""}`)), 513), [
900
+ [Ne, v.value]
901
+ ]),
902
+ Ee(k("div", Yl, [
903
+ k("img", {
904
+ src: d.info.labelImg,
905
+ style: Z({ transform: `rotate(${d.slide.angle}deg)` }),
906
+ onClick: m
907
+ }, null, 12, Xl)
908
+ ], 512), [
909
+ [Ne, v.value]
910
+ ]),
911
+ d.pathologyHandle ? Ee((_(), x("div", {
912
+ key: 0,
913
+ class: "hzzt-kfb-label__pathology flex align-items-center justify-content-between",
914
+ onClick: h
915
+ }, [
916
+ k("span", Ql, E(d.slide.pathology_number), 1),
917
+ C(ee, {
918
+ size: "14",
919
+ name: "annotate"
920
+ })
921
+ ], 512)), [
922
+ [Ne, v.value]
923
+ ]) : R("", !0),
924
+ k("span", {
925
+ onClick: s[0] || (s[0] = (a) => v.value = !v.value),
926
+ style: Z({
927
+ transform: `translateY(${v.value ? "-50%" : 0})`
928
+ }),
929
+ class: "hzzt-kfb-label__expend flex align-items-center justify-content-center"
930
+ }, [
931
+ v.value ? (_(), P(ee, {
932
+ key: 0,
933
+ size: "10",
934
+ name: "arrowLeft"
935
+ })) : (_(), P(ee, {
936
+ key: 1,
937
+ size: "10",
938
+ name: "arrowRight"
939
+ }))
940
+ ], 4),
941
+ C(t(qe), {
942
+ modelValue: i.value,
943
+ "onUpdate:modelValue": s[5] || (s[5] = (a) => i.value = a),
944
+ "append-to-body": !0,
945
+ title: r.value,
946
+ width: "450px"
947
+ }, {
948
+ footer: T(() => [
949
+ C(t(be), {
950
+ onClick: s[4] || (s[4] = (a) => i.value = !1)
951
+ }, {
952
+ default: T(() => [
953
+ j(E(t(o)("取消")), 1)
954
+ ]),
955
+ _: 1
956
+ }),
957
+ C(t(be), {
958
+ type: "primary",
959
+ onClick: w
960
+ }, {
961
+ default: T(() => [
962
+ j(E(t(o)("确认")), 1)
963
+ ]),
964
+ _: 1
965
+ })
966
+ ]),
967
+ default: T(() => [
968
+ k("div", Jl, [
969
+ k("div", eo, [
970
+ k("img", {
971
+ src: d.slide.labelImg
972
+ }, null, 8, to),
973
+ k("img", {
974
+ src: d.slide.previewImg
975
+ }, null, 8, lo)
976
+ ])
977
+ ]),
978
+ C(t(st), { class: "margin-t-2" }, {
979
+ default: T(() => [
980
+ C(t(re), {
981
+ label: t(o)("病理号")
982
+ }, {
983
+ default: T(() => [
984
+ C(t(nt), {
985
+ modelValue: d.slide.pathology_number,
986
+ "onUpdate:modelValue": s[1] || (s[1] = (a) => d.slide.pathology_number = a),
987
+ placeholder: t(o)("输入病理号"),
988
+ clearable: ""
989
+ }, null, 8, ["modelValue", "placeholder"])
990
+ ]),
991
+ _: 1
992
+ }, 8, ["label"]),
993
+ C(t(re), {
994
+ label: t(o)("蜡块号")
995
+ }, {
996
+ default: T(() => [
997
+ C(t(nt), {
998
+ modelValue: d.slide.paraffin_block_number,
999
+ "onUpdate:modelValue": s[2] || (s[2] = (a) => d.slide.paraffin_block_number = a),
1000
+ placeholder: t(o)("输入蜡块号"),
1001
+ clearable: ""
1002
+ }, null, 8, ["modelValue", "placeholder"])
1003
+ ]),
1004
+ _: 1
1005
+ }, 8, ["label"]),
1006
+ d.slide.slide_id ? R("", !0) : (_(), P(t(re), {
1007
+ key: 0,
1008
+ label: t(o)("试剂")
1009
+ }, {
1010
+ default: T(() => [
1011
+ C(t(nt), {
1012
+ modelValue: d.slide.reagent,
1013
+ "onUpdate:modelValue": s[3] || (s[3] = (a) => d.slide.reagent = a),
1014
+ placeholder: t(o)("输入试剂"),
1015
+ clearable: ""
1016
+ }, null, 8, ["modelValue", "placeholder"])
1017
+ ]),
1018
+ _: 1
1019
+ }, 8, ["label"]))
1020
+ ]),
1021
+ _: 1
1022
+ })
1023
+ ]),
1024
+ _: 1
1025
+ }, 8, ["modelValue", "title"])
1026
+ ]));
1027
+ }
1028
+ }), ao = /* @__PURE__ */ ye(oo, [["__scopeId", "data-v-e1475ef3"]]);
1029
+ function no(c, e) {
1030
+ const o = L(1), l = L(null), y = L(null);
1031
+ function v() {
1032
+ c.value.viewer.addHandler("canvas-drag", (r) => {
1033
+ l.value || (l.value = r.position);
1034
+ }), c.value.viewer.addHandler("canvas-drag-end", (r) => {
1035
+ if (o.value !== 1) {
1036
+ y.value = r.position;
1037
+ const m = c.value.viewer.viewport.containerSize.x, h = c.value.viewer.viewport.containerSize.y, w = (y.value.x - l.value.x) / (m * e.value) * (o.value - 1), n = (y.value.y - l.value.y) / (h * e.value) * (o.value - 1), d = c.value.viewer.viewport.getCenter(), s = new xe.Point(d.x - w, d.y - n);
1038
+ c.value.viewer.viewport.panTo(s), l.value = null;
1039
+ }
1040
+ });
1041
+ }
1042
+ function i({ name: r, value: m }) {
1043
+ r === "ratio" && (o.value = m / 1);
1044
+ }
1045
+ return {
1046
+ moveEvent: v,
1047
+ fastMove: i
1048
+ };
1049
+ }
1050
+ function so(c, e, o, l, y) {
1051
+ const v = L(void 0), i = L([]);
1052
+ ae(() => c.aiLabelList, w);
1053
+ function r() {
1054
+ o.value.$on(fe.events.EVENT_END_PAINTING, m("add")), o.value.$on(fe.events.EVENT_AREA_MOVE_END, m("move")), o.value.$on(fe.events.EVENT_ADD_POLYGON_POINT, m("add-point")), o.value.$on(fe.events.EVENT_DELETE_POLYGON_POINT, m("delete-point")), o.value.$on(fe.events.EVENT_DELETE_LABEL, m("delete")), o.value.$on(fe.events.EVENT_SELECT_LABEL, (a) => {
1055
+ v.value = a, s(), e("tool", "select-label", v.value);
1056
+ }), o.value.$on(fe.events.EVENT_CANCEL_SELECT_LABEL, () => {
1057
+ v.value = void 0, e("tool", "cancel-select-label", v.value);
1058
+ }), m("list")();
1059
+ }
1060
+ function m(a) {
1061
+ return (f) => h(a, f);
1062
+ }
1063
+ function h(a, f) {
1064
+ var b;
1065
+ if (a === "add" && f && ((f == null ? void 0 : f.subType) || ((b = f == null ? void 0 : f.__data__) == null ? void 0 : b.subType)) === "voice")
1066
+ l(f);
1067
+ else
1068
+ return c.labelHandle(a, c.slide, f, i.value).then((g) => {
1069
+ i.value = g, w();
1070
+ }).catch(() => {
1071
+ w();
1072
+ });
1073
+ }
1074
+ function w() {
1075
+ var a;
1076
+ if ((a = o.value) != null && a.initLabelList) {
1077
+ const f = [...i.value, ...c.aiLabelList || []];
1078
+ f.find(({ id: b }) => {
1079
+ var g;
1080
+ return b === ((g = v.value) == null ? void 0 : g.id);
1081
+ }) || (v.value = void 0), o.value.initLabelList(f);
1082
+ }
1083
+ }
1084
+ function n(a, f) {
1085
+ var g, p;
1086
+ v.value && (v.value.select = !1, v.value = void 0);
1087
+ const b = (o.value.labelList || []).findIndex((u) => u.id === a.id);
1088
+ if (b > -1) {
1089
+ v.value = (g = o.value.labelList) == null ? void 0 : g[b], v.value.select = !0;
1090
+ const u = o.value.area.getCenterPoint(a.region);
1091
+ o.value.area.moveToLabel(u), (p = o.value.viewer) != null && p.canvas && o.value.viewer.canvas.focus(), s();
1092
+ }
1093
+ f && y(f);
1094
+ }
1095
+ function d(a) {
1096
+ return c.labelHandle("add", c.slide, a, i.value).then((f) => {
1097
+ i.value = f, w();
1098
+ }).catch(() => {
1099
+ w();
1100
+ });
1101
+ }
1102
+ function s() {
1103
+ var f, b, g, p;
1104
+ (((f = v.value) == null ? void 0 : f.subType) || ((g = (b = v.value) == null ? void 0 : b.__data__) == null ? void 0 : g.subType)) === "voice" && ((p = v.value) != null && p.src) && new Audio(v.value.src).play();
1105
+ }
1106
+ return {
1107
+ currentLabel: v,
1108
+ localLabelList: i,
1109
+ initLabel: r,
1110
+ jumpToLabel: n,
1111
+ reloadLabelList: w,
1112
+ eventHandel: m,
1113
+ addHandle: d
1114
+ };
1115
+ }
1116
+ function io() {
1117
+ function c(e, o) {
1118
+ e.save(), e.strokeStyle = "rgba(0,0,0,0)", e.miterLimit = 4, e.font = "15px", e.fillStyle = o, e.font = "15px", e.scale(0.02734375, 0.02734375), e.save(), e.font = "15px", e.beginPath(), e.moveTo(512, 427.023), e.moveTo(422, 427.023), e.translate(512, 427.023), e.rotate(0), e.arc(0, 0, 90, 3.141592653589793, 6.283185307179586, !0), e.rotate(0), e.translate(-512, -427.023), e.translate(512, 427.023), e.rotate(0), e.arc(0, 0, 90, 0, 3.141592653589793, !0), e.rotate(0), e.translate(-512, -427.023), e.fill(), e.stroke(), e.restore(), e.save(), e.font = "15px", e.beginPath(), e.moveTo(512, 910.402), e.bezierCurveTo(492.86, 910.402, 474.51800000000003, 904.548, 458.95799999999997, 893.4730000000001), e.bezierCurveTo(444.895, 883.4630000000001, 434.032, 869.8770000000001, 427.36899999999997, 854.013), e.lineTo(255.043, 585.177), e.lineTo(254.889, 584.927), e.bezierCurveTo(225.522, 537.209, 210, 482.605, 210, 427.021), e.bezierCurveTo(210, 346.35400000000004, 241.414, 270.515, 298.454, 213.47500000000002), e.bezierCurveTo(355.494, 156.43500000000006, 431.333, 125.021, 512, 125.021), e.bezierCurveTo(592.6669999999999, 125.021, 668.506, 156.435, 725.546, 213.475), e.bezierCurveTo(782.587, 270.515, 814, 346.354, 814, 427.021), e.bezierCurveTo(814, 482.87, 798.345, 537.692, 768.726, 585.56), e.lineTo(768.462, 585.9789999999999), e.lineTo(596.381, 854.6949999999999), e.bezierCurveTo(589.626, 870.4209999999999, 578.721, 883.871, 564.677, 893.7499999999999), e.bezierCurveTo(549.192, 904.6449999999999, 530.977, 910.4019999999999, 512, 910.4019999999999), e.closePath(), e.moveTo(309.246, 551.141), e.lineTo(484.74, 824.9209999999999), e.lineTo(485.934, 828.1179999999999), e.bezierCurveTo(490.083, 839.2249999999999, 500.31500000000005, 846.4019999999999, 512, 846.4019999999999), e.bezierCurveTo(523.584, 846.4019999999999, 533.791, 839.3309999999999, 538.004, 828.387), e.lineTo(539.169, 825.3589999999999), e.lineTo(714.43, 551.678), e.bezierCurveTo(737.701, 513.983, 750, 470.884, 750, 427.021), e.bezierCurveTo(750, 363.449, 725.244, 303.682, 680.2909999999999, 258.72900000000004), e.bezierCurveTo(635.3389999999999, 213.77800000000005, 575.5719999999999, 189.02100000000004, 511.99999999999994, 189.02100000000004), e.bezierCurveTo(448.428, 189.02100000000004, 388.66099999999994, 213.77700000000004, 343.70799999999997, 258.72900000000004), e.bezierCurveTo(298.755, 303.68100000000004, 274, 363.449, 274, 427.021), e.bezierCurveTo(274, 470.661, 286.186, 513.573, 309.246, 551.1410000000001), e.closePath(), e.fill(), e.stroke(), e.restore(), e.restore();
1119
+ }
1120
+ return {
1121
+ drawDot: c
1122
+ };
1123
+ }
1124
+ function ro(c, e) {
1125
+ const { t: o } = ce(), l = L(!1), y = L();
1126
+ let v = null;
1127
+ const i = L(!1), r = L(0);
1128
+ let m = 0;
1129
+ const h = L([]), w = L(void 0);
1130
+ let n = !1;
1131
+ function d(u, H) {
1132
+ u.save(), u.strokeStyle = "rgba(0,0,0,0)", u.miterLimit = 4, u.font = "15px ''", u.fillStyle = H, u.font = " 15px ''", u.scale(0.03125, 0.03125), u.save(), u.font = " 15px ''", u.beginPath(), u.moveTo(515.041727, 670.617766), u.bezierCurveTo(606.625894, 670.617766, 681.137374, 596.113511, 681.137374, 504.52212), u.lineTo(681.137374, 229.350568), u.bezierCurveTo(681.137374, 137.76640100000003, 606.625894, 63.254920999999996, 515.041727, 63.254920999999996), u.bezierCurveTo(423.44311000000005, 63.254920999999996, 348.93885500000005, 137.766401, 348.93885600000004, 229.350568), u.lineTo(348.93885600000004, 504.52212), u.bezierCurveTo(348.93885600000004, 596.113512, 423.44311100000004, 670.617767, 515.041727, 670.617766), u.closePath(), u.fill(), u.stroke(), u.restore(), u.save(), u.font = " 15px ''", u.beginPath(), u.moveTo(801.643237, 874.001665), u.lineTo(558.391759, 874.001665), u.lineTo(558.391759, 828.578057), u.bezierCurveTo(719.899527, 807.264291, 844.993269, 668.7898399999999, 844.993269, 501.55986699999994), u.translate(801.643237, 501.55986699999994), u.rotate(0), u.arc(0, 0, 43.350032, 0, 3.141592653589793, !0), u.rotate(0), u.translate(-801.643237, -501.55986699999994), u.bezierCurveTo(758.2932050000001, 635.684865, 649.166725, 744.811345, 515.0345020000001, 744.811346), u.bezierCurveTo(380.9095040000001, 744.811346, 271.79024900000013, 635.6848659999999, 271.79024900000013, 501.55986699999994), u.translate(228.44021750000013, 501.5664510740879), u.rotate(0), u.arc(0, 0, 43.350032, -15188164315591997e-20, -3.1414407719461273, !0), u.rotate(0), u.translate(-228.44021750000013, -501.5664510740879), u.bezierCurveTo(185.09018600000013, 668.7898389999999, 310.1911530000001, 807.271516, 471.69169500000015, 828.578057), u.lineTo(471.69169500000015, 874.001665), u.lineTo(228.440217, 874.001665), u.translate(228.440217, 917.3516970000001), u.rotate(0), u.arc(0, 0, 43.350032, -1.5707963267948966, 1.5707963267948966, !0), u.rotate(0), u.translate(-228.440217, -917.3516970000001), u.lineTo(801.643237, 960.701729), u.translate(801.643237, 917.3516970000001), u.rotate(0), u.arc(0, 0, 43.350032, 1.5707963267948966, 4.71238898038469, !0), u.rotate(0), u.translate(-801.643237, -917.3516970000001), u.closePath(), u.fill(), u.stroke(), u.restore(), u.restore();
1133
+ }
1134
+ function s() {
1135
+ return Te(this, null, function* () {
1136
+ try {
1137
+ y.value = yield navigator.mediaDevices.getUserMedia({ audio: !0 }), v = new MediaRecorder(y.value), h.value = [], v.addEventListener("dataavailable", (u) => {
1138
+ h.value.push(u.data);
1139
+ }), v.addEventListener("stop", () => Te(this, null, function* () {
1140
+ if (w.value) {
1141
+ const u = new Blob(h.value, { type: c.audioType || "audio/wav" });
1142
+ w.value.src = URL.createObjectURL(u);
1143
+ }
1144
+ i.value = !1, n && (yield p());
1145
+ })), v.start(), i.value = !0, m = window.setInterval(() => {
1146
+ r.value++;
1147
+ }, 1e3);
1148
+ } catch (u) {
1149
+ xt.error(o("麦克风启用失败,请确认是否开启麦克风权限"));
1150
+ }
1151
+ });
1152
+ }
1153
+ function a() {
1154
+ y.value && v ? (v.stop(), y.value.getTracks().forEach((u) => u.stop()), v = null, y.value = void 0) : (v = null, y.value = void 0), i.value = !1, m && (clearInterval(m), m = 0), r.value = 0;
1155
+ }
1156
+ function f(u) {
1157
+ l.value = !0, w.value = u, h.value = [], n = !1;
1158
+ }
1159
+ function b() {
1160
+ i.value && a(), l.value = !1, i.value = !1, n = !1;
1161
+ }
1162
+ function g() {
1163
+ return Te(this, null, function* () {
1164
+ if (!i.value && !h.value.length) {
1165
+ xt.error(o("请先录音"));
1166
+ return;
1167
+ }
1168
+ i.value && a(), i.value = !1, n = !0, h.value.length && (yield p()), l.value = !1;
1169
+ });
1170
+ }
1171
+ function p() {
1172
+ return Te(this, null, function* () {
1173
+ if (c.uploadHandle && w.value) {
1174
+ const u = Vt.service({
1175
+ text: o("录音上传中")
1176
+ }), H = new Blob(h.value, { type: c.audioType || "audio/wav" });
1177
+ h.value = [];
1178
+ try {
1179
+ yield c.uploadHandle(c.slide, w.value, H).then((A) => {
1180
+ w.value.src = A;
1181
+ }), u.close(), e(w.value);
1182
+ } catch (A) {
1183
+ u.close();
1184
+ }
1185
+ }
1186
+ });
1187
+ }
1188
+ return {
1189
+ voiceVisible: l,
1190
+ voiceForm: w,
1191
+ recordTime: r,
1192
+ isRecording: i,
1193
+ drawVoice: d,
1194
+ startRecording: s,
1195
+ stopRecording: a,
1196
+ initVoice: f,
1197
+ cancelRecord: b,
1198
+ confirmRecord: g
1199
+ };
1200
+ }
1201
+ function uo(c, e, o) {
1202
+ const l = L([]), y = L(0), v = L(!1);
1203
+ let i = null;
1204
+ ae(() => {
1205
+ var s;
1206
+ return (s = c.analysis) == null ? void 0 : s.hotmap_path;
1207
+ }, (s) => {
1208
+ var a, f, b;
1209
+ if ((f = (a = e.value) == null ? void 0 : a.viewer) != null && f.world) {
1210
+ y.value = 0;
1211
+ const g = e.value.viewer.world.getItemAt(0);
1212
+ g && (g.tilesMatrix = {}, g.draw());
1213
+ }
1214
+ s && ((b = c.analysis) != null && b.zoom_roi) && o({
1215
+ x: c.analysis.zoom_roi.x,
1216
+ y: c.analysis.zoom_roi.y,
1217
+ width: c.analysis.zoom_roi.w,
1218
+ height: c.analysis.zoom_roi.h
1219
+ }, 5);
1220
+ }), ge(() => {
1221
+ window.addEventListener("mousemove", h), window.addEventListener("mouseup", n);
1222
+ }), Me(() => {
1223
+ window.removeEventListener("mousemove", h), window.removeEventListener("mouseup", n);
1224
+ });
1225
+ function r(s, a, f) {
1226
+ var g, p, u, H;
1227
+ const b = _e(q({}, a), {
1228
+ file: (g = c.analysis) == null ? void 0 : g.hotmap_path
1229
+ });
1230
+ if ((p = c.analysis) != null && p.hotmap_info) {
1231
+ if (f[a.x + "_" + a.y + "_" + Number(a.scale)])
1232
+ if (((u = c.analysis) == null ? void 0 : u.hotmap_type) === "drag")
1233
+ m(s, b);
1234
+ else
1235
+ return c.tileHandle(b);
1236
+ } else if (((H = c.analysis) == null ? void 0 : H.hotmap_type) === "drag")
1237
+ m(s, b);
1238
+ else
1239
+ return c.tileHandle(b);
1240
+ return s;
1241
+ }
1242
+ function m(s, a) {
1243
+ const f = l.value.find((b) => b.url === s) || {
1244
+ url: s,
1245
+ x: a.x,
1246
+ y: a.y,
1247
+ img: void 0,
1248
+ load: ""
1249
+ };
1250
+ if (!(f != null && f.img) && (l.value.push(f), f.load !== "success")) {
1251
+ const b = new Image();
1252
+ b.src = c.tileHandle(a), b.onload = () => {
1253
+ f.load = "success";
1254
+ }, f.img = b;
1255
+ }
1256
+ }
1257
+ function h(s) {
1258
+ v.value && i && (y.value += s.x - i.x, y.value < 0 ? y.value = 0 : y.value > e.value.$options.width && (y.value = e.value.$options.width, v.value = !1), e.value.viewer.forceRedraw()), i = { x: s.x, y: s.y };
1259
+ }
1260
+ function w(s) {
1261
+ const { x: a, y: f } = s;
1262
+ v.value = !0, i = { x: a, y: f };
1263
+ }
1264
+ function n() {
1265
+ v.value = !1, i = null;
1266
+ }
1267
+ function d(s) {
1268
+ const {
1269
+ context: a,
1270
+ sourceWidth: f,
1271
+ sourceHeight: b,
1272
+ position: g,
1273
+ size: p,
1274
+ initRendered: u,
1275
+ tile: H,
1276
+ pixelDensityRatio: A
1277
+ } = s, U = H.getUrl(), M = y.value * A, X = g.original.x;
1278
+ if (X < M && X + p.x > M) {
1279
+ const O = M - X, ue = p.x - O, oe = l.value.find((He) => He.url === U), Se = (oe == null ? void 0 : oe.load) === "success" ? oe.img : u.canvas;
1280
+ a.drawImage(
1281
+ Se,
1282
+ 0,
1283
+ 0,
1284
+ f * O / p.x,
1285
+ b,
1286
+ g.x,
1287
+ g.y,
1288
+ O,
1289
+ p.y
1290
+ ), a.drawImage(
1291
+ u.canvas,
1292
+ f * O / p.x,
1293
+ 0,
1294
+ f * ue / p.x,
1295
+ b,
1296
+ g.x + O,
1297
+ g.y,
1298
+ ue,
1299
+ p.y
1300
+ );
1301
+ } else if (X + p.x <= M) {
1302
+ const O = l.value.find((oe) => oe.url === U), ue = (O == null ? void 0 : O.load) === "success" ? O.img : u.canvas;
1303
+ a.drawImage(
1304
+ ue,
1305
+ 0,
1306
+ 0,
1307
+ f,
1308
+ b,
1309
+ g.x,
1310
+ g.y,
1311
+ p.x,
1312
+ p.y
1313
+ );
1314
+ } else X >= M && a.drawImage(
1315
+ u.canvas,
1316
+ 0,
1317
+ 0,
1318
+ f,
1319
+ b,
1320
+ g.x,
1321
+ g.y,
1322
+ p.x,
1323
+ p.y
1324
+ );
1325
+ }
1326
+ return {
1327
+ getHotmapUrl: r,
1328
+ hotmapImgs: l,
1329
+ handlerImage: d,
1330
+ hotmapLine: y,
1331
+ lineMouseDown: w
1332
+ };
1333
+ }
1334
+ function co(c, e, o) {
1335
+ const l = il(), y = L(!1), v = new BroadcastChannel("sync_kfb_view");
1336
+ v.onmessage = (n) => {
1337
+ const d = n.data;
1338
+ h(d);
1339
+ }, ge(() => {
1340
+ var n, d, s;
1341
+ (n = o.value) == null || n.addEventListener("mouseenter", i), (d = o.value) == null || d.addEventListener("mousemove", i), (s = o.value) == null || s.addEventListener("mouseleave", r);
1342
+ }), Me(() => {
1343
+ var n, d, s;
1344
+ (n = o.value) == null || n.removeEventListener("mouseenter", i), (d = o.value) == null || d.removeEventListener("mousemove", i), (s = o.value) == null || s.removeEventListener("mouseleave", r), v.close();
1345
+ });
1346
+ function i() {
1347
+ y.value = !0;
1348
+ }
1349
+ function r() {
1350
+ y.value = !1;
1351
+ }
1352
+ function m() {
1353
+ let n;
1354
+ e.value.viewer.addHandler("pan", (d) => {
1355
+ var f, b, g, p;
1356
+ if (!n) {
1357
+ n = (b = (f = d.center) == null ? void 0 : f.clone) == null ? void 0 : b.call(f);
1358
+ return;
1359
+ }
1360
+ const s = d.center, a = (g = s == null ? void 0 : s.minus) == null ? void 0 : g.call(s, n);
1361
+ n = (p = s == null ? void 0 : s.clone) == null ? void 0 : p.call(s), c.syncPosition && w({
1362
+ position: a,
1363
+ type: "sync_position"
1364
+ });
1365
+ }), e.value.viewer.addHandler("zoom", (d) => {
1366
+ c.syncZoom && w({
1367
+ zoom: d.zoom,
1368
+ type: "sync_zoom"
1369
+ });
1370
+ }), e.value.viewer.addHandler("animation-finish", () => {
1371
+ var a;
1372
+ if (c.syncZoom && w({
1373
+ zoom: e.value.viewer.viewport.getZoom(!0),
1374
+ type: "sync_zoom"
1375
+ }), !n)
1376
+ return;
1377
+ const d = e.value.viewer.viewport.getCenter(!0), s = (a = d == null ? void 0 : d.minus) == null ? void 0 : a.call(d, n);
1378
+ n = void 0, c.syncPosition && w({
1379
+ position: s,
1380
+ type: "sync_position"
1381
+ });
1382
+ });
1383
+ }
1384
+ function h(n) {
1385
+ n.uuid && n.type === "sync_position" && n.uuid !== (l == null ? void 0 : l.uid) ? e.value && e.value.viewer.viewport.panBy(n.position, !0) : n.uuid && n.type === "sync_zoom" && n.uuid !== (l == null ? void 0 : l.uid) && e.value && e.value.viewer.viewport.zoomTo(n.zoom);
1386
+ }
1387
+ function w(n) {
1388
+ var d;
1389
+ y.value && v.postMessage(_e(q({}, n), {
1390
+ uuid: l == null ? void 0 : l.uid,
1391
+ fileName: (d = c.slide) == null ? void 0 : d.file
1392
+ }));
1393
+ }
1394
+ return {
1395
+ initSync: m
1396
+ };
1397
+ }
1398
+ const vo = { class: "hzzt-kfb-keyword flex wrap" }, fo = ["onMouseenter"], mo = /* @__PURE__ */ te({
1399
+ __name: "KfbKeyword",
1400
+ setup(c) {
1401
+ const e = L([
1402
+ { code: "Q", icon: "zoomIn" },
1403
+ { code: "W", icon: "arrowUp" },
1404
+ { code: "E", icon: "zoomOut" },
1405
+ { code: "A", icon: "arrowLeft" },
1406
+ { code: "S", icon: "arrowDown" },
1407
+ { code: "D", icon: "arrowRight" }
1408
+ ]), o = Y("kfbView", L({}));
1409
+ let l = null;
1410
+ function y(i, r) {
1411
+ i.preventDefault(), l && clearTimeout(l), l = setInterval(() => {
1412
+ r === "E" && (o.value.viewer.viewport.zoomBy(1.1), o.value.viewer.viewport.applyConstraints()), r === "Q" && (o.value.viewer.viewport.zoomBy(0.9), o.value.viewer.viewport.applyConstraints()), r === "W" && (o.value.viewer.viewport.panBy(o.value.viewer.viewport.deltaPointsFromPixels(new xe.Point(0, -40))), o.value.viewer.viewport.applyConstraints()), r === "S" && (o.value.viewer.viewport.panBy(o.value.viewer.viewport.deltaPointsFromPixels(new xe.Point(0, 40))), o.value.viewer.viewport.applyConstraints()), r === "A" && (o.value.viewer.viewport.panBy(o.value.viewer.viewport.deltaPointsFromPixels(new xe.Point(-40, 0))), o.value.viewer.viewport.applyConstraints()), r === "D" && (o.value.viewer.viewport.panBy(o.value.viewer.viewport.deltaPointsFromPixels(new xe.Point(40, 0))), o.value.viewer.viewport.applyConstraints());
1413
+ }, 120);
1414
+ }
1415
+ function v() {
1416
+ l && (clearInterval(l), l = null);
1417
+ }
1418
+ return Me(() => {
1419
+ clearTimeout(l);
1420
+ }), (i, r) => (_(), x("div", vo, [
1421
+ (_(!0), x(ne, null, se(e.value, (m) => (_(), x("div", {
1422
+ key: m.code,
1423
+ class: "hzzt-kfb-keyword__code flex column align-items-center justify-content-center",
1424
+ onMouseenter: (h) => y(h, m.code),
1425
+ onMouseleave: v
1426
+ }, [
1427
+ k("p", null, E(m.code), 1),
1428
+ C(ee, {
1429
+ size: "14",
1430
+ name: m.icon
1431
+ }, null, 8, ["name"])
1432
+ ], 40, fo))), 128))
1433
+ ]));
1434
+ }
1435
+ }), po = /* @__PURE__ */ ye(mo, [["__scopeId", "data-v-c8d940f0"]]);
1436
+ function ho(c, e, o = {}) {
1437
+ const {
1438
+ panSensitivity: l = 0.2,
1439
+ // 值越大,鼠标移动时图像移动越快
1440
+ zoomSensitivity: y = 1.1,
1441
+ // 值越大,滚轮缩放幅度越大
1442
+ damping: v = 0.6,
1443
+ // 值越大,惯性滑动时间越长
1444
+ minThreshold: i = 0.05
1445
+ // 值越小,停止移动时的精度越高
1446
+ } = o;
1447
+ let r = !1, m = null, h = 0, w = 0, n = !1;
1448
+ const d = () => {
1449
+ r = document.pointerLockElement === e.value, r || s();
1450
+ }, s = () => {
1451
+ h = 0, w = 0, m && (cancelAnimationFrame(m), m = null), n = !1;
1452
+ }, a = (u) => Te(this, null, function* () {
1453
+ try {
1454
+ u.key === "l" && e.value && (document.pointerLockElement ? (document.exitPointerLock(), console.log("鼠标已解锁!")) : (yield e.value.requestPointerLock(), console.log("鼠标已锁定!")));
1455
+ } catch (H) {
1456
+ console.error("无法锁定鼠标:", H);
1457
+ }
1458
+ }), f = (u) => {
1459
+ if (r) {
1460
+ u.preventDefault();
1461
+ const H = Math.pow(y, Math.sign(u.deltaY) * -1);
1462
+ c.value.viewer.viewport.zoomBy(H), c.value.viewer.viewport.applyConstraints();
1463
+ }
1464
+ }, b = (u) => {
1465
+ r && (h += u.movementX * l, w += u.movementY * l, !n && (Math.abs(h) > 1 || Math.abs(w) > 1) && (n = !0, m = requestAnimationFrame(g)));
1466
+ }, g = () => {
1467
+ const u = c.value.viewer.viewport;
1468
+ if (Math.abs(h) > i || Math.abs(w) > i) {
1469
+ const H = u.deltaPointsFromPixels(
1470
+ new xe.Point(h, w)
1471
+ );
1472
+ u.panBy(H), u.applyConstraints();
1473
+ }
1474
+ h *= v, w *= v, Math.abs(h) > i || Math.abs(w) > i ? m = requestAnimationFrame(g) : s();
1475
+ }, p = () => {
1476
+ r && document.exitPointerLock();
1477
+ };
1478
+ return ge(() => {
1479
+ var u;
1480
+ (u = e.value) == null || u.addEventListener("keydown", a), document.addEventListener("wheel", f, { passive: !1 }), document.addEventListener("click", p), document.addEventListener("mousemove", b), document.addEventListener("pointerlockchange", d);
1481
+ }), Me(() => {
1482
+ var u;
1483
+ (u = e.value) == null || u.removeEventListener("keydown", a), document.removeEventListener("click", p), document.removeEventListener("wheel", f), document.removeEventListener("mousemove", b), document.removeEventListener("pointerlockchange", d), s();
1484
+ }), {
1485
+ setConfig: (u) => {
1486
+ Object.assign(o, u);
1487
+ }
1488
+ };
1489
+ }
1490
+ const go = /* @__PURE__ */ te({
1491
+ __name: "KfbLevel",
1492
+ props: /* @__PURE__ */ ke({
1493
+ slides: { default: () => [] }
1494
+ }, {
1495
+ "model-value": {
1496
+ default: 0
1497
+ },
1498
+ "model-valueModifiers": {}
1499
+ }),
1500
+ emits: ["update:model-value"],
1501
+ setup(c) {
1502
+ const e = c, o = De(c, "model-value"), l = Y("kfbView", L({})), y = B(() => Array.from(new Array(e.slides.length + 1)).map((i, r) => r));
1503
+ function v() {
1504
+ const i = l.value.viewer.world.getItemAt(0), r = Object.keys(i.tilesMatrix);
1505
+ r.forEach((m, h) => {
1506
+ h > r.length - 4 && (i.tilesMatrix[m] = {});
1507
+ }), i.draw();
1508
+ }
1509
+ return (i, r) => (_(), x("div", {
1510
+ class: ze(["hzzt-kfb-level flex column align-items-center", i.slides.length > 5 ? "hzzt-kfb-level--large" : ""])
1511
+ }, [
1512
+ C(ee, {
1513
+ name: "level",
1514
+ size: "24",
1515
+ class: "margin-b-4 margin-t-2"
1516
+ }),
1517
+ C(t(dl), {
1518
+ modelValue: o.value,
1519
+ "onUpdate:modelValue": r[0] || (r[0] = (m) => o.value = m),
1520
+ vertical: "",
1521
+ min: y.value[0],
1522
+ step: 1,
1523
+ max: y.value[y.value.length - 1],
1524
+ "show-stops": "",
1525
+ "show-tooltip": !0,
1526
+ placement: "left",
1527
+ height: i.slides.length > 5 ? "180px" : "130px",
1528
+ onInput: v
1529
+ }, null, 8, ["modelValue", "min", "max", "height"])
1530
+ ], 2));
1531
+ }
1532
+ }), yo = {
1533
+ key: 0,
1534
+ class: "flex hzzt-kfb-channel"
1535
+ }, wo = ["onClick"], _o = /* @__PURE__ */ te({
1536
+ __name: "KfbChannel",
1537
+ props: /* @__PURE__ */ ke({
1538
+ info: {}
1539
+ }, {
1540
+ "model-value": {
1541
+ default: () => []
1542
+ },
1543
+ "model-valueModifiers": {}
1544
+ }),
1545
+ emits: /* @__PURE__ */ ke(["load"], ["update:model-value"]),
1546
+ setup(c, { emit: e }) {
1547
+ const o = c, l = e, y = De(c, "model-value"), v = [
1548
+ { key: "DAPI", color: "#4A6CF7" },
1549
+ { key: "480", color: "#00BFFF" },
1550
+ { key: "520", color: "#32CD32" },
1551
+ { key: "570", color: "#FFAA33" },
1552
+ { key: "620", color: "#FF6347" },
1553
+ { key: "670", color: "#DC143C" },
1554
+ { key: "780", color: "#4B0082" }
1555
+ ], i = B(() => {
1556
+ var m;
1557
+ return (((m = o.info) == null ? void 0 : m.channel) || []).map((h) => {
1558
+ const w = v.find((n) => n.key === h.eqt_num);
1559
+ return {
1560
+ label: h.eqt_num,
1561
+ color: h.r ? `rgb(${h.r}, ${h.g}, ${h.b})` : w == null ? void 0 : w.color
1562
+ };
1563
+ });
1564
+ });
1565
+ function r(m) {
1566
+ y.value.includes(m) ? y.value = y.value.filter((h) => h !== m) : y.value.push(m), l("load");
1567
+ }
1568
+ return (m, h) => i.value.length > 0 ? (_(), x("div", yo, [
1569
+ C(ee, {
1570
+ name: "channel",
1571
+ size: "32"
1572
+ }),
1573
+ (_(!0), x(ne, null, se(i.value, (w) => (_(), x("div", {
1574
+ key: w.label,
1575
+ style: Z({ background: w.color }),
1576
+ class: ze(["hzzt-kfb-channel__box", y.value.includes(w.label) ? "" : "hzzt-kfb-channel__box--unactive"]),
1577
+ onClick: (n) => r(w.label)
1578
+ }, E(w.label), 15, wo))), 128))
1579
+ ])) : R("", !0);
1580
+ }
1581
+ }), bo = { class: "flex align-items-center justify-content-between" }, ko = { class: "hzzt-kfb-title" }, zo = { class: "hzzt-kfb-annotation__container flex-1" }, Co = ["onClick"], $o = /* @__PURE__ */ te({
1582
+ __name: "KfbAnnotation",
1583
+ props: /* @__PURE__ */ ke({
1584
+ annotation: {},
1585
+ annotations: {}
1586
+ }, {
1587
+ expand: { type: Boolean },
1588
+ expandModifiers: {}
1589
+ }),
1590
+ emits: /* @__PURE__ */ ke(["select"], ["update:expand"]),
1591
+ setup(c, { emit: e }) {
1592
+ const o = De(c, "expand"), l = e, { t: y } = ce();
1593
+ function v(r) {
1594
+ const m = r.subType || r.tool || "";
1595
+ return `mark${m.substring(0, 1).toLocaleUpperCase()}${m.substring(1)}`;
1596
+ }
1597
+ function i(r) {
1598
+ l("select", r);
1599
+ }
1600
+ return (r, m) => (_(), x("div", {
1601
+ class: ze(["hzzt-kfb-annotation flex column", o.value ? "hzzt-kfb-annotation--expand" : ""])
1602
+ }, [
1603
+ k("div", bo, [
1604
+ Ee(k("div", ko, [
1605
+ k("span", null, E(t(y)("标注列表")), 1)
1606
+ ], 512), [
1607
+ [Ne, o.value]
1608
+ ]),
1609
+ C(ee, {
1610
+ class: "hzzt-kfb-annotation__icon",
1611
+ name: o.value ? "expandLeft" : "expandRight",
1612
+ onClick: m[0] || (m[0] = (h) => o.value = !o.value)
1613
+ }, null, 8, ["name"])
1614
+ ]),
1615
+ Ee(k("div", zo, [
1616
+ (_(!0), x(ne, null, se(r.annotations, (h, w) => {
1617
+ var n;
1618
+ return _(), x("div", {
1619
+ class: ze(["hzzt-kfb-annotation__item", ((n = r.annotation) == null ? void 0 : n.id) === h.id ? "hzzt-kfb-annotation__item--active" : ""]),
1620
+ key: w,
1621
+ onClick: (d) => i(h)
1622
+ }, [
1623
+ C(ee, {
1624
+ size: "16",
1625
+ name: v(h)
1626
+ }, null, 8, ["name"]),
1627
+ k("span", null, E(t(y)("标注")) + E(w + 1), 1)
1628
+ ], 10, Co);
1629
+ }), 128))
1630
+ ], 512), [
1631
+ [Ne, o.value]
1632
+ ])
1633
+ ], 2));
1634
+ }
1635
+ }), To = /* @__PURE__ */ ye($o, [["__scopeId", "data-v-bfc56a3e"]]);
1636
+ function Ht(c) {
1637
+ const { t: e } = ce();
1638
+ return B(() => {
1639
+ var y;
1640
+ const l = ((y = c == null ? void 0 : c.analysis) == null ? void 0 : y.result) || "";
1641
+ return l.indexOf("疑似阳性") > -1 ? {
1642
+ type: "warning",
1643
+ name: l
1644
+ } : l.indexOf("阳性") > -1 ? {
1645
+ type: "danger",
1646
+ name: l
1647
+ } : l.indexOf("阴性") > -1 ? {
1648
+ type: "success",
1649
+ name: l
1650
+ } : l.indexOf("不合格") > -1 ? {
1651
+ type: "danger",
1652
+ name: l
1653
+ } : l.indexOf("合格") > -1 ? {
1654
+ type: "success",
1655
+ name: l
1656
+ } : {
1657
+ type: "info",
1658
+ name: l || e("未知")
1659
+ };
1660
+ });
1661
+ }
1662
+ const Lo = ["element-loading-text"], xo = {
1663
+ key: 1,
1664
+ class: "hzzt-kfb-view__main flex align-items-center justify-content-center"
1665
+ }, Eo = {
1666
+ class: "hzzt-kfb-view__filter",
1667
+ height: "0",
1668
+ width: "0"
1669
+ }, Vo = { id: "colorMatrixFilter" }, Io = ["values"], Mo = ["values"], So = ["exponent"], Ho = ["exponent"], Po = ["exponent"], Ro = { class: "flex nowrap justify-content-center overflow-hidden" }, Ao = ["src"], No = ["src"], Bo = { class: "flex-1" }, Do = { class: "flex-1" }, Uo = { class: "flex-1" }, Fo = { class: "flex-1" }, Ko = { class: "flex-1" }, jo = { class: "flex-1" }, Oo = ["src"], Go = {
1670
+ key: 2,
1671
+ class: "margin-l-2"
1672
+ }, Wo = {
1673
+ key: 9,
1674
+ class: "hzzt-kfb-view__watermark"
1675
+ }, Be = /* @__PURE__ */ te({
1676
+ name: "HzztKfbView",
1677
+ __name: "index",
1678
+ props: {
1679
+ slide: {},
1680
+ fileHandle: {},
1681
+ labelHandle: {},
1682
+ tileHandle: {},
1683
+ navigatorHandle: {},
1684
+ pathologyHandle: {},
1685
+ uploadHandle: {},
1686
+ options: {},
1687
+ labelDrawing: {},
1688
+ process: { default: () => q({}, St) },
1689
+ microscope: { default: () => q({}, it) },
1690
+ menus: {},
1691
+ syncPosition: { type: Boolean },
1692
+ syncZoom: { type: Boolean },
1693
+ audioType: {},
1694
+ watermark: {},
1695
+ analysis: {},
1696
+ aiLabelList: {},
1697
+ showLabel: { type: Boolean }
1698
+ },
1699
+ emits: ["tool"],
1700
+ setup(c, { expose: e, emit: o }) {
1701
+ rl((z) => ({
1702
+ e3fd940a: X.value
1703
+ }));
1704
+ const l = c, y = o, { t: v, locale: i } = ce(), r = L(), m = L(), h = L(), w = L(!1), n = L({}), d = L(!1), s = L(0), a = L(0), f = L(0), b = L([]), g = L({
1705
+ width: 0,
1706
+ height: 0,
1707
+ fileNum: 0,
1708
+ scanScale: 1,
1709
+ fileName: "",
1710
+ ratiomap: {}
1711
+ }), p = Y("show-kfb-label", L(!0)), u = Y("show-keyboard", L(!1)), H = Y("show-watermark", L(!1)), A = L(!1), U = Vt.directive;
1712
+ ae(() => {
1713
+ var z;
1714
+ return (z = l.slide) == null ? void 0 : z.file;
1715
+ }, () => {
1716
+ qt(), setTimeout(() => {
1717
+ mt();
1718
+ }, 100);
1719
+ }), ge(() => {
1720
+ mt();
1721
+ });
1722
+ const M = Ht(l), X = B(() => {
1723
+ var z, V;
1724
+ return `url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='150' height='100'><text x='30' y='80' font-family='Arial' font-size='16' fill='${((z = l.watermark) == null ? void 0 : z.color) || "rgba(0,0,0,0.2)"}' transform='rotate(-30)' text-anchor='middle'>${((V = l.watermark) == null ? void 0 : V.text) || "水印文字"}</text></svg>")`;
1725
+ }), {
1726
+ imageProcess: O,
1727
+ matrixValues: ue,
1728
+ saturateValues: oe,
1729
+ forceRedraw: Se
1730
+ } = Hl(l), {
1731
+ tailorEvent: He,
1732
+ shotScreen: we
1733
+ } = Pl(y, n), {
1734
+ moveEvent: Ue,
1735
+ fastMove: Qe
1736
+ } = no(n, a), { initSync: Je } = co(l, n, r);
1737
+ ho(n, r);
1738
+ const { drawDot: et } = io(), {
1739
+ voiceVisible: Pe,
1740
+ voiceForm: Re,
1741
+ drawVoice: tt,
1742
+ recordTime: $,
1743
+ isRecording: N,
1744
+ startRecording: K,
1745
+ stopRecording: de,
1746
+ initVoice: ct,
1747
+ cancelRecord: Pt,
1748
+ confirmRecord: Rt
1749
+ } = ro(l, Ut), {
1750
+ currentLabel: lt,
1751
+ localLabelList: dt,
1752
+ initLabel: At,
1753
+ jumpToLabel: vt,
1754
+ reloadLabelList: Nt,
1755
+ eventHandel: Bt,
1756
+ addHandle: Dt
1757
+ } = so(l, y, n, ct, ot);
1758
+ function Ut(z) {
1759
+ Dt(z);
1760
+ }
1761
+ const {
1762
+ getHotmapUrl: Ft,
1763
+ handlerImage: Kt,
1764
+ hotmapLine: jt,
1765
+ lineMouseDown: ft,
1766
+ hotmapImgs: Ot
1767
+ } = uo(l, n, at);
1768
+ function mt() {
1769
+ var z;
1770
+ (z = l.slide) != null && z.file && l.fileHandle && (d.value || (d.value = !0, l.fileHandle(l.slide).then((V) => {
1771
+ var Q, ie, pe, G;
1772
+ g.value = V, b.value = (((Q = g.value) == null ? void 0 : Q.channel) || []).map((F) => F.eqt_num), n.value = new fe(q({
1773
+ el: m.value,
1774
+ fileName: (ie = l.slide) == null ? void 0 : ie.file,
1775
+ scale: g.value.scanScale,
1776
+ lang: (i == null ? void 0 : i.value) === "en-US" ? "en" : i == null ? void 0 : i.value,
1777
+ navigator: {
1778
+ style: "left: 0;bottom: 0",
1779
+ thumbnail: g.value.thumbnailImg,
1780
+ width: 200,
1781
+ height: 180
1782
+ },
1783
+ grid: {
1784
+ show: !1,
1785
+ ruler: !1,
1786
+ pxConversion: !0
1787
+ },
1788
+ thumb: {
1789
+ bgColor: "rgba(0,0,0,0)"
1790
+ },
1791
+ graduation: {
1792
+ show: !0,
1793
+ right: 120,
1794
+ bottom: (G = (pe = g.value) == null ? void 0 : pe.channel) != null && G.length ? 120 : 30,
1795
+ tick: {
1796
+ number: 3,
1797
+ height: 8
1798
+ }
1799
+ },
1800
+ pxConversion: {
1801
+ units: ["um", "mm"],
1802
+ binary: 1e3,
1803
+ imageCapRes: g.value.imageCapRes || g.value.scanResolution || 1
1804
+ },
1805
+ openSeadragonOptions: {
1806
+ maxZoomLevel: g.value.scanScale * 20,
1807
+ pixelsPerArrowPress: 200,
1808
+ animationTime: 0,
1809
+ tileSources: pt()
1810
+ },
1811
+ tileDrawing: Kt,
1812
+ label: {
1813
+ drawing: (F, D, $e) => {
1814
+ var Fe;
1815
+ if (D != null && D.custom) {
1816
+ const J = F.getContext("2d");
1817
+ J.save(), J.beginPath();
1818
+ const Ae = (D == null ? void 0 : D.subType) || ((Fe = D == null ? void 0 : D.__data__) == null ? void 0 : Fe.subType);
1819
+ Ae === "count" ? (J.translate($e.x - 14, $e.y - 22), et(J, (D == null ? void 0 : D.strokeStyle) || "")) : Ae === "voice" ? (J.translate($e.x - 16, $e.y - 18), tt(J, (D == null ? void 0 : D.strokeStyle) || "")) : l.labelDrawing && l.labelDrawing(J, D), J.restore();
1820
+ }
1821
+ }
1822
+ }
1823
+ }, l.options || {})), n.value.viewer.drawer.canvas.style.filter = "url(#colorMatrixFilter)", At(), Wt(), Je(), setTimeout(() => {
1824
+ var F, D;
1825
+ (F = l.analysis) != null && F.hotmap_path && ((D = l.analysis) != null && D.zoom_roi) && at({
1826
+ x: l.analysis.zoom_roi.x,
1827
+ y: l.analysis.zoom_roi.y,
1828
+ width: l.analysis.zoom_roi.w,
1829
+ height: l.analysis.zoom_roi.h
1830
+ }, 5);
1831
+ }, 200);
1832
+ }).finally(() => {
1833
+ d.value = !1, p.value || (wt({
1834
+ show: !1,
1835
+ ruler: !1
1836
+ }), _t({
1837
+ show: !1
1838
+ }), setTimeout(() => {
1839
+ bt(!1);
1840
+ }, 100));
1841
+ })));
1842
+ }
1843
+ function Gt() {
1844
+ const z = n.value.viewer;
1845
+ if (z.world) {
1846
+ const V = z.world.getItemAt(0), Q = z.viewport.getZoom(), ie = z.viewport.getCenter();
1847
+ z.world.removeItem(V), z.addTiledImage({
1848
+ tileSource: pt(),
1849
+ success: function() {
1850
+ z.viewport.zoomTo(Q), z.viewport.panTo(ie);
1851
+ }
1852
+ });
1853
+ }
1854
+ }
1855
+ function pt() {
1856
+ var pe, G;
1857
+ const z = g.value.tileWidth || g.value.imageBlockLen || 256, V = g.value.tileHeight || g.value.imageBlockLen || 256, Q = {};
1858
+ (pe = l.analysis) != null && pe.hotmap_path && (((G = l.analysis) == null ? void 0 : G.hotmap_info) || []).forEach((F) => {
1859
+ Q[F[0] / z + "_" + F[1] / V + "_" + F[2]] = !0;
1860
+ });
1861
+ let ie = 10;
1862
+ return Object.keys(g.value.ratiomap).forEach((F) => {
1863
+ const D = g.value.fileNum - Math.sqrt(g.value.scanScale / Number(F));
1864
+ D > 0 && (ie = ie ? Math.min(ie, D) : D);
1865
+ }), {
1866
+ height: g.value.height,
1867
+ width: g.value.width,
1868
+ tileWidth: z,
1869
+ tileHeight: V,
1870
+ minLevel: Math.floor(ie || 8),
1871
+ getTileUrl: (F, D, $e) => {
1872
+ var kt, zt, Ct, $t;
1873
+ const Fe = F, J = {
1874
+ file: ((kt = l.slide) == null ? void 0 : kt.file) || "",
1875
+ x: D,
1876
+ y: $e,
1877
+ scale: "0",
1878
+ level: F,
1879
+ channel: JSON.stringify(b.value)
1880
+ };
1881
+ g.value.fileNum === F ? (F = g.value.scanScale, J.scale = F.toFixed(6)) : (F = g.value.scanScale / Math.pow(2, g.value.fileNum - F), J.scale = F.toFixed(6)), J.level = Fe, J.file = f.value === 0 ? J.file : ((Ct = (zt = l.slide) == null ? void 0 : zt.children) == null ? void 0 : Ct[f.value - 1]) || "";
1882
+ const Ae = l.tileHandle(J);
1883
+ return ($t = l.analysis) != null && $t.hotmap_path ? Ft(Ae, J, Q) : Ae;
1884
+ }
1885
+ };
1886
+ }
1887
+ function Wt() {
1888
+ n.value.viewer.addHandler("rotate", (z) => {
1889
+ s.value = z.degrees || 0;
1890
+ }), n.value.viewer.addHandler("zoom", (z) => {
1891
+ const V = n.value.viewer.viewport.viewportToImageZoom(
1892
+ z.zoom || 0
1893
+ ) * Number(n.value.$options.scale);
1894
+ a.value = Number(V.toFixed(2));
1895
+ }), n.value.$on(fe.events.EVENT_NAVIGATOR_VESTIGE, (z) => {
1896
+ l.navigatorHandle && l.navigatorHandle("add", l.slide, z);
1897
+ }), l.navigatorHandle && l.navigatorHandle("list", l.slide).then((z) => {
1898
+ var V, Q;
1899
+ (Q = (V = n.value.navigator) == null ? void 0 : V.drawPointList) == null || Q.call(V, z);
1900
+ }), He(), Ue();
1901
+ }
1902
+ function qt() {
1903
+ var z;
1904
+ (z = n.value) != null && z.destroy && (n.value.destroy(), n.value = {}, g.value = {
1905
+ width: 0,
1906
+ height: 0,
1907
+ fileNum: 0,
1908
+ scanScale: 1,
1909
+ fileName: "",
1910
+ ratiomap: {}
1911
+ }, Ot.value = [], b.value = [], a.value = 0, s.value = 0, f.value = 0);
1912
+ }
1913
+ function ht(z, V) {
1914
+ z === "annotate" ? gt(V) : z === "tailor" ? we(V) : z === "info" ? w.value = !0 : z === "flip" ? yt() : z === "delete" ? Bt("delete")(lt.value) : y("tool", z, V);
1915
+ }
1916
+ function gt(z) {
1917
+ z.tool === "Voice" && (z.subType = "voice", z.tool = "Dot", z.custom = !0), n.value.board.startDraw(z);
1918
+ }
1919
+ function Zt() {
1920
+ n.value.board.endDraw();
1921
+ }
1922
+ function yt() {
1923
+ n.value.viewer.viewport.toggleFlip();
1924
+ }
1925
+ function Yt(z) {
1926
+ var V, Q;
1927
+ (Q = (V = h.value) == null ? void 0 : V.scopeChange) == null || Q.call(V, z);
1928
+ }
1929
+ function Xt() {
1930
+ w.value = !0;
1931
+ }
1932
+ function wt(z) {
1933
+ var V;
1934
+ (V = n.value) != null && V.grid && n.value.grid.updated(z);
1935
+ }
1936
+ function _t(z) {
1937
+ var V;
1938
+ (V = n.value) != null && V.graduation && n.value.graduation.updated(z);
1939
+ }
1940
+ function bt(z) {
1941
+ var V;
1942
+ (V = n.value) != null && V.navigator && (n.value.navigator.element.style.display = z ? "flex" : "none");
1943
+ }
1944
+ function ot(z) {
1945
+ const V = n.value.viewer.viewport.imageToViewportZoom(Number(z / n.value.$options.scale));
1946
+ n.value.viewer.viewport.zoomTo(V);
1947
+ }
1948
+ function at(z, V) {
1949
+ n.value.area && (n.value.area.moveToLabel(n.value.viewer.viewport.imageToViewportCoordinates(
1950
+ z.x + z.width / 2,
1951
+ z.y + z.height / 2
1952
+ )), ot(V));
1953
+ }
1954
+ return ve("kfbView", n), ve("currentLabel", lt), e({
1955
+ kfbView: n,
1956
+ degrees: s,
1957
+ zoom: a,
1958
+ forceRedraw: Se,
1959
+ toggleFlip: yt,
1960
+ startDraw: gt,
1961
+ endDraw: Zt,
1962
+ shotScreen: we,
1963
+ info: Xt,
1964
+ scopeChange: Yt,
1965
+ updateGrid: wt,
1966
+ updateGraduation: _t,
1967
+ updateNavigator: bt,
1968
+ fastMove: Qe,
1969
+ zoomTo: ot,
1970
+ jumpToLabel: vt,
1971
+ jumpToPosition: at,
1972
+ reloadLabelList: Nt
1973
+ }), (z, V) => {
1974
+ var Q, ie, pe;
1975
+ return _(), x("div", {
1976
+ ref_key: "mainKfbViewRef",
1977
+ ref: r,
1978
+ class: "hzzt-kfb-view"
1979
+ }, [
1980
+ z.slide.file ? Ee((_(), x("div", {
1981
+ key: 0,
1982
+ ref_key: "kfbViewMainRef",
1983
+ ref: m,
1984
+ class: "hzzt-kfb-view__main",
1985
+ "element-loading-text": t(v)("加载中"),
1986
+ "element-loading-background": "rgba(0, 0, 0, 0.8)"
1987
+ }, null, 8, Lo)), [
1988
+ [t(U), d.value]
1989
+ ]) : (_(), x("div", xo, V[5] || (V[5] = [
1990
+ k("img", {
1991
+ style: { width: "50%" },
1992
+ src: Xe
1993
+ }, null, -1)
1994
+ ]))),
1995
+ z.analysis && z.analysis.result ? (_(), P(t(It), {
1996
+ key: 2,
1997
+ class: "hzzt-kfb-view__tag",
1998
+ type: t(M).type
1999
+ }, {
2000
+ default: T(() => [
2001
+ j(E(t(M).name), 1)
2002
+ ]),
2003
+ _: 1
2004
+ }, 8, ["type"])) : R("", !0),
2005
+ (_(), x("svg", Eo, [
2006
+ k("filter", Vo, [
2007
+ k("feColorMatrix", {
2008
+ values: t(ue),
2009
+ type: "matrix"
2010
+ }, null, 8, Io),
2011
+ k("feColorMatrix", {
2012
+ values: t(oe),
2013
+ type: "saturate"
2014
+ }, null, 8, Mo),
2015
+ k("feComponentTransfer", null, [
2016
+ k("feFuncR", {
2017
+ id: "feFuncR",
2018
+ type: "gamma",
2019
+ exponent: t(O).ga,
2020
+ amplitude: "1",
2021
+ offset: "0"
2022
+ }, null, 8, So),
2023
+ k("feFuncG", {
2024
+ id: "feFuncG",
2025
+ type: "gamma",
2026
+ exponent: t(O).ga,
2027
+ amplitude: "1",
2028
+ offset: "0"
2029
+ }, null, 8, Ho),
2030
+ k("feFuncB", {
2031
+ id: "feFuncB",
2032
+ type: "gamma",
2033
+ exponent: t(O).ga,
2034
+ amplitude: "1",
2035
+ offset: "0"
2036
+ }, null, 8, Po)
2037
+ ])
2038
+ ])
2039
+ ])),
2040
+ C(Ol, {
2041
+ menus: z.menus,
2042
+ onTool: ht
2043
+ }, null, 8, ["menus"]),
2044
+ C(ql, We(z.microscope, {
2045
+ ref_key: "microscopeRef",
2046
+ ref: h
2047
+ }), null, 16),
2048
+ t(p) && z.slide.file && g.value.labelImg ? (_(), P(ao, {
2049
+ key: 3,
2050
+ visible: z.showLabel,
2051
+ info: g.value,
2052
+ slide: z.slide,
2053
+ pathologyHandle: z.pathologyHandle,
2054
+ onTool: ht
2055
+ }, null, 8, ["visible", "info", "slide", "pathologyHandle"])) : R("", !0),
2056
+ t(u) ? (_(), P(po, { key: 4 })) : R("", !0),
2057
+ (Q = z.slide.children) != null && Q.length ? (_(), P(go, {
2058
+ key: 5,
2059
+ modelValue: f.value,
2060
+ "onUpdate:modelValue": V[0] || (V[0] = (G) => f.value = G),
2061
+ slides: z.slide.children
2062
+ }, null, 8, ["modelValue", "slides"])) : R("", !0),
2063
+ (pe = (ie = g.value) == null ? void 0 : ie.channel) != null && pe.length ? (_(), P(_o, {
2064
+ key: 6,
2065
+ modelValue: b.value,
2066
+ "onUpdate:modelValue": V[1] || (V[1] = (G) => b.value = G),
2067
+ info: g.value,
2068
+ onLoad: Gt
2069
+ }, null, 8, ["modelValue", "info"])) : R("", !0),
2070
+ t(dt).length ? (_(), P(To, {
2071
+ key: 7,
2072
+ expand: A.value,
2073
+ "onUpdate:expand": V[2] || (V[2] = (G) => A.value = G),
2074
+ style: Z({
2075
+ top: z.analysis && z.analysis.result ? "24px" : "4px"
2076
+ }),
2077
+ annotation: t(lt),
2078
+ annotations: t(dt),
2079
+ onSelect: t(vt)
2080
+ }, null, 8, ["expand", "style", "annotation", "annotations", "onSelect"])) : R("", !0),
2081
+ C(t(qe), {
2082
+ modelValue: w.value,
2083
+ "onUpdate:modelValue": V[3] || (V[3] = (G) => w.value = G),
2084
+ "append-to-body": !0,
2085
+ title: t(v)("图像信息"),
2086
+ width: "700px",
2087
+ top: "5vh"
2088
+ }, {
2089
+ default: T(() => [
2090
+ C(t(st), { "label-position": "left" }, {
2091
+ default: T(() => [
2092
+ C(t(re), {
2093
+ class: "flex",
2094
+ "label-width": "0px"
2095
+ }, {
2096
+ default: T(() => [
2097
+ k("div", Ro, [
2098
+ k("img", {
2099
+ src: g.value.labelImg,
2100
+ style: { height: "180px" }
2101
+ }, null, 8, Ao),
2102
+ k("img", {
2103
+ src: g.value.previewImg,
2104
+ style: { height: "180px" },
2105
+ class: "flex-1"
2106
+ }, null, 8, No)
2107
+ ])
2108
+ ]),
2109
+ _: 1
2110
+ }),
2111
+ C(t(re), {
2112
+ label: t(v)("文件名")
2113
+ }, {
2114
+ default: T(() => [
2115
+ k("span", Bo, E(g.value.fileName), 1)
2116
+ ]),
2117
+ _: 1
2118
+ }, 8, ["label"]),
2119
+ C(t(re), {
2120
+ label: t(v)("图像像素")
2121
+ }, {
2122
+ default: T(() => [
2123
+ k("span", Do, E(g.value.width) + "Pixel - " + E(g.value.height) + "Pixel", 1)
2124
+ ]),
2125
+ _: 1
2126
+ }, 8, ["label"]),
2127
+ C(t(re), {
2128
+ label: t(v)("扫描倍率")
2129
+ }, {
2130
+ default: T(() => [
2131
+ k("span", Uo, E(g.value.scanScale), 1)
2132
+ ]),
2133
+ _: 1
2134
+ }, 8, ["label"]),
2135
+ C(t(re), {
2136
+ label: t(v)("扫描时刻")
2137
+ }, {
2138
+ default: T(() => [
2139
+ k("span", Fo, E(g.value.scanTime), 1)
2140
+ ]),
2141
+ _: 1
2142
+ }, 8, ["label"]),
2143
+ C(t(re), {
2144
+ label: t(v)("扫描时间")
2145
+ }, {
2146
+ default: T(() => [
2147
+ k("span", Ko, E(g.value.scanDuration || 0) + "s", 1)
2148
+ ]),
2149
+ _: 1
2150
+ }, 8, ["label"]),
2151
+ g.value.ext ? (_(), P(t(re), {
2152
+ key: 0,
2153
+ label: t(v)("扫描设备")
2154
+ }, {
2155
+ default: T(() => [
2156
+ k("span", jo, E(g.value.ext.machineNum || ""), 1)
2157
+ ]),
2158
+ _: 1
2159
+ }, 8, ["label"])) : R("", !0)
2160
+ ]),
2161
+ _: 1
2162
+ })
2163
+ ]),
2164
+ _: 1
2165
+ }, 8, ["modelValue", "title"]),
2166
+ C(t(qe), {
2167
+ modelValue: t(Pe),
2168
+ "onUpdate:modelValue": V[4] || (V[4] = (G) => me(Pe) ? Pe.value = G : null),
2169
+ "append-to-body": !0,
2170
+ title: t(v)("语音输入"),
2171
+ width: "500px",
2172
+ top: "5vh"
2173
+ }, {
2174
+ footer: T(() => [
2175
+ C(t(be), { onClick: t(Pt) }, {
2176
+ default: T(() => [
2177
+ j(E(t(v)("取消")), 1)
2178
+ ]),
2179
+ _: 1
2180
+ }, 8, ["onClick"]),
2181
+ C(t(be), {
2182
+ type: "primary",
2183
+ onClick: t(Rt)
2184
+ }, {
2185
+ default: T(() => [
2186
+ j(E(t(v)("确定")), 1)
2187
+ ]),
2188
+ _: 1
2189
+ }, 8, ["onClick"])
2190
+ ]),
2191
+ default: T(() => [
2192
+ C(t(st), { "label-position": "left" }, {
2193
+ default: T(() => {
2194
+ var G;
2195
+ return [
2196
+ C(t(re), null, {
2197
+ default: T(() => {
2198
+ var F;
2199
+ return [
2200
+ (F = t(Re)) != null && F.src ? (_(), x("audio", {
2201
+ key: 0,
2202
+ class: "width-100%",
2203
+ src: t(Re).src,
2204
+ controls: "",
2205
+ preload: "auto"
2206
+ }, null, 8, Oo)) : R("", !0)
2207
+ ];
2208
+ }),
2209
+ _: 1
2210
+ }),
2211
+ (G = t(Re)) != null && G.src ? R("", !0) : (_(), P(t(re), { key: 0 }, {
2212
+ default: T(() => [
2213
+ t(N) ? (_(), P(t(be), {
2214
+ key: 1,
2215
+ type: "danger",
2216
+ onClick: t(de)
2217
+ }, {
2218
+ default: T(() => [
2219
+ j(E(t(v)("结束录音")), 1)
2220
+ ]),
2221
+ _: 1
2222
+ }, 8, ["onClick"])) : (_(), P(t(be), {
2223
+ key: 0,
2224
+ type: "primary",
2225
+ onClick: t(K)
2226
+ }, {
2227
+ default: T(() => [
2228
+ j(E(t(v)("开始录音")), 1)
2229
+ ]),
2230
+ _: 1
2231
+ }, 8, ["onClick"])),
2232
+ t(N) ? (_(), x("span", Go, E(t(v)("录音时长")) + ":" + E(t($)) + "s", 1)) : R("", !0)
2233
+ ]),
2234
+ _: 1
2235
+ }))
2236
+ ];
2237
+ }),
2238
+ _: 1
2239
+ })
2240
+ ]),
2241
+ _: 1
2242
+ }, 8, ["modelValue", "title"]),
2243
+ z.analysis && z.analysis.hotmap_path && z.analysis.hotmap_type !== "switch" ? (_(), x("div", {
2244
+ key: 8,
2245
+ class: "hzzt-kfb-view__hotmap",
2246
+ style: Z({ left: t(jt) + "px" })
2247
+ }, [
2248
+ C(t(Ce), {
2249
+ class: "icon-caret-left",
2250
+ size: "30",
2251
+ onMousedown: t(ft)
2252
+ }, {
2253
+ default: T(() => V[6] || (V[6] = [
2254
+ k("svg", {
2255
+ xmlns: "http://www.w3.org/2000/svg",
2256
+ viewBox: "0 0 1024 1024"
2257
+ }, [
2258
+ k("path", {
2259
+ fill: "currentColor",
2260
+ d: "M672 192 288 511.936 672 832z"
2261
+ })
2262
+ ], -1)
2263
+ ])),
2264
+ _: 1,
2265
+ __: [6]
2266
+ }, 8, ["onMousedown"]),
2267
+ C(t(Ce), {
2268
+ class: "icon-caret-right",
2269
+ size: "30",
2270
+ onMousedown: t(ft)
2271
+ }, {
2272
+ default: T(() => V[7] || (V[7] = [
2273
+ k("svg", {
2274
+ xmlns: "http://www.w3.org/2000/svg",
2275
+ viewBox: "0 0 1024 1024"
2276
+ }, [
2277
+ k("path", {
2278
+ fill: "currentColor",
2279
+ d: "M384 192v640l384-320.064z"
2280
+ })
2281
+ ], -1)
2282
+ ])),
2283
+ _: 1,
2284
+ __: [7]
2285
+ }, 8, ["onMousedown"])
2286
+ ], 4)) : R("", !0),
2287
+ t(H) ? (_(), x("div", Wo)) : R("", !0),
2288
+ le(z.$slots, "default")
2289
+ ], 512);
2290
+ };
2291
+ }
2292
+ });
2293
+ function qo(c, e) {
2294
+ var g;
2295
+ const o = Le("default-open-ai", !!((g = c.ai) != null && g.default)), l = L(o.value), y = L(o.value), v = L([]), i = B(
2296
+ () => {
2297
+ var p, u, H, A;
2298
+ return (p = e.value) != null && p.analysis ? Object.prototype.toString.call((u = e.value) == null ? void 0 : u.analysis) === "[object Array]" ? (H = e.value) == null ? void 0 : H.analysis : [(A = e.value) == null ? void 0 : A.analysis] : [];
2299
+ }
2300
+ ), r = B(() => i.value.find((p) => (p == null ? void 0 : p.class) === "IQC")), m = B(() => !!r.value), h = B(() => i.value.find((p) => (p == null ? void 0 : p.class) !== "IQC")), w = B(() => !!h.value), n = B(() => l.value ? h.value : y.value ? r.value : void 0);
2301
+ ae(() => {
2302
+ var p;
2303
+ return (p = e == null ? void 0 : e.value) == null ? void 0 : p.id;
2304
+ }, () => {
2305
+ d(), s();
2306
+ }), ge(() => {
2307
+ d(), s();
2308
+ });
2309
+ function d() {
2310
+ w.value && l.value && (y.value = !1), m.value && y.value && (l.value = !1);
2311
+ }
2312
+ function s() {
2313
+ var p;
2314
+ (p = e.value) != null && p.id && i.value.length ? w.value && l.value || m.value && y.value ? a() : v.value = [] : v.value = [];
2315
+ }
2316
+ function a() {
2317
+ c.ai.handle(e.value, n.value).then((p) => {
2318
+ v.value = p;
2319
+ }).catch(() => {
2320
+ v.value = [];
2321
+ });
2322
+ }
2323
+ function f() {
2324
+ y.value = !1, s();
2325
+ }
2326
+ function b() {
2327
+ l.value = !1, s();
2328
+ }
2329
+ return {
2330
+ hasAi: w,
2331
+ hasIqc: m,
2332
+ currentAnalysis: n,
2333
+ aiLabelList: v,
2334
+ enableAi: l,
2335
+ enableIqc: y,
2336
+ toggleIqc: b,
2337
+ toggleAi: f
2338
+ };
2339
+ }
2340
+ const Zo = ["src", "fit"], Yo = ["src", "fit"], Oe = /* @__PURE__ */ te({
2341
+ name: "KfbImage",
2342
+ __name: "KfbImage",
2343
+ props: {
2344
+ src: {
2345
+ type: String,
2346
+ required: !0,
2347
+ default: ""
2348
+ },
2349
+ fit: {
2350
+ type: String,
2351
+ validator: (c) => ["", "contain", "cover", "fill", "none", "scale-down"].includes(c),
2352
+ default: ""
2353
+ },
2354
+ retryTimes: {
2355
+ type: Number,
2356
+ default: 0
2357
+ },
2358
+ load: {
2359
+ type: Function,
2360
+ default: () => ({})
2361
+ },
2362
+ hover: {
2363
+ type: Boolean,
2364
+ default: !1
2365
+ }
2366
+ },
2367
+ setup(c) {
2368
+ const e = c;
2369
+ let o = 0;
2370
+ const l = L(!1), y = ut({
2371
+ x: 0,
2372
+ y: 0
2373
+ }), v = B(() => ({
2374
+ top: `${y.y + 10}px`,
2375
+ left: `${y.x}px`,
2376
+ transform: "translateY(-50%)",
2377
+ width: `${4 * 300 / 3}px`,
2378
+ height: "300px",
2379
+ background: "rgba(0,0,0,0.8)",
2380
+ zIndex: "10000"
2381
+ }));
2382
+ function i(w) {
2383
+ const n = w.target;
2384
+ o < e.retryTimes ? (n.src = e.src, o++) : n.src = Xe;
2385
+ }
2386
+ function r(w) {
2387
+ if (!e.hover) return;
2388
+ if (w.target) {
2389
+ const f = w.target, b = f.tagName;
2390
+ let g = "";
2391
+ if (f.tagName === "IMG" ? g = f.src || "" : b === "DIV" && (g = f.children[0].src || ""), g.indexOf(Xe) > -1)
2392
+ return;
2393
+ }
2394
+ const { x: n, y: d } = m(w), s = 4 * 300 / 3, a = 300;
2395
+ y.x = Math.min(Math.max(n, s / 2), window.innerWidth - s / 2), y.y = Math.min(Math.max(d, a / 2), window.innerHeight - a / 2), l.value = !0;
2396
+ }
2397
+ function m(w) {
2398
+ const n = w.target, d = w.offsetX, s = w.offsetY, a = n.clientWidth, f = n.clientHeight;
2399
+ return {
2400
+ x: w.clientX + a - d,
2401
+ y: w.clientY - s + f / 2
2402
+ };
2403
+ }
2404
+ function h() {
2405
+ l.value = !1;
2406
+ }
2407
+ return (w, n) => (_(), x("div", {
2408
+ class: "relative",
2409
+ onMouseenter: r,
2410
+ onMouseleave: h
2411
+ }, [
2412
+ k("img", {
2413
+ src: c.src,
2414
+ fit: c.fit,
2415
+ onError: i,
2416
+ style: {
2417
+ height: "100%",
2418
+ width: "100%"
2419
+ }
2420
+ }, null, 40, Zo),
2421
+ (_(), P(Ge, { to: "body" }, [
2422
+ l.value ? (_(), x("div", {
2423
+ key: 0,
2424
+ class: "fixed hzzt-kfb-img-triangle-left",
2425
+ style: Z(v.value)
2426
+ }, [
2427
+ k("img", {
2428
+ src: c.src,
2429
+ fit: c.fit,
2430
+ style: {
2431
+ objectFit: "contain",
2432
+ height: "100%",
2433
+ width: "100%"
2434
+ },
2435
+ onMouseenter: n[0] || (n[0] = () => {
2436
+ l.value = !0;
2437
+ }),
2438
+ onMouseleave: h
2439
+ }, null, 40, Yo)
2440
+ ], 4)) : R("", !0)
2441
+ ]))
2442
+ ], 32));
2443
+ }
2444
+ }), Xo = {}, Qo = {
2445
+ xmlns: "http://www.w3.org/2000/svg",
2446
+ viewBox: "0 0 1024 1024"
2447
+ };
2448
+ function Jo(c, e) {
2449
+ return _(), x("svg", Qo, e[0] || (e[0] = [
2450
+ k("path", {
2451
+ fill: "currentColor",
2452
+ d: "M160 448a32 32 0 0 1-32-32V160.064a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V416a32 32 0 0 1-32 32zm448 0a32 32 0 0 1-32-32V160.064a32 32 0 0 1 32-32h255.936a32 32 0 0 1 32 32V416a32 32 0 0 1-32 32zM160 896a32 32 0 0 1-32-32V608a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32zm448 0a32 32 0 0 1-32-32V608a32 32 0 0 1 32-32h255.936a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32z"
2453
+ }, null, -1)
2454
+ ]));
2455
+ }
2456
+ const ea = /* @__PURE__ */ ye(Xo, [["render", Jo]]), ta = {}, la = {
2457
+ width: "16",
2458
+ height: "16",
2459
+ viewBox: "0 0 16 16",
2460
+ fill: "none",
2461
+ xmlns: "http://www.w3.org/2000/svg"
2462
+ };
2463
+ function oa(c, e) {
2464
+ return _(), x("svg", la, e[0] || (e[0] = [
2465
+ k("g", { id: "Frame" }, [
2466
+ k("path", {
2467
+ id: "Vector",
2468
+ d: "M5.33333 2.66659H14V3.99992H5.33333V2.66659ZM2 2.33325H4V4.33325H2V2.33325ZM2 6.99992H4V8.99992H2V6.99992ZM2 11.6666H4V13.6666H2V11.6666ZM5.33333 7.33325H14V8.66659H5.33333V7.33325ZM5.33333 11.9999H14V13.3333H5.33333V11.9999Z",
2469
+ fill: "currentColor",
2470
+ "fill-opacity": "0.9"
2471
+ })
2472
+ ], -1)
2473
+ ]));
2474
+ }
2475
+ const aa = /* @__PURE__ */ ye(ta, [["render", oa]]), na = { class: "hzzt-kfb-slides" }, sa = { class: "hzzt-kfb-slides__row" }, ia = { class: "hzzt-kfb-slides__top" }, ra = { class: "text-primary" }, ua = { class: "flex align-items-center" }, ca = { key: 0 }, da = ["data-index", "onClick"], va = { class: "hzzt-kfb-slides__gallery" }, fa = ["onClick"], ma = {
2476
+ key: 0,
2477
+ class: "hzzt-kfb-slides__read"
2478
+ }, pa = ["onClick"], ha = {
2479
+ key: 1,
2480
+ class: "flex column"
2481
+ }, ga = { class: "hzzt-kfb-slides__header" }, ya = { class: "w-30%" }, wa = { class: "w-40%" }, _a = { class: "w-20%" }, ba = ["data-index", "onClick"], ka = { class: "w-30% flex" }, za = { class: "hzzt-kfb-slides__gallery" }, Ca = {
2482
+ key: 0,
2483
+ class: "hzzt-kfb-slides__read"
2484
+ }, $a = { class: "w-40% flex" }, Ta = ["onClick"], La = ["onClick"], xa = {
2485
+ key: 0,
2486
+ class: "flex column py-2"
2487
+ }, Ea = { class: "flex align-items-center justify-content-center" }, Va = { class: "margin-r-1" }, Ia = {
2488
+ key: 0,
2489
+ class: "margin-r-1 margin-l-2"
2490
+ }, Ma = /* @__PURE__ */ te({
2491
+ __name: "KfbSlideList",
2492
+ props: {
2493
+ slides: {}
2494
+ },
2495
+ emits: ["select", "tool"],
2496
+ setup(c, { expose: e, emit: o }) {
2497
+ const l = c, y = o, v = Y("file-index", {
2498
+ value: 0
2499
+ }), i = Y("divide", {
2500
+ value: !1
2501
+ }), r = Y("sync", {
2502
+ value: !1
2503
+ }), m = L(!1), h = L(), w = B(() => l.slides.filter(({ read: b }) => b)), n = B(() => l.slides.filter(({ check: b }) => b)), { t: d } = ce();
2504
+ function s(b) {
2505
+ v.value = b, y("select", b);
2506
+ }
2507
+ function a(b) {
2508
+ b.check = !b.check;
2509
+ }
2510
+ function f(b) {
2511
+ var p, u, H;
2512
+ const g = ((H = (u = (p = h.value.querySelector('[data-index="0"]')) == null ? void 0 : p.getBoundingClientRect) == null ? void 0 : u.call(p)) == null ? void 0 : H.y) || 0;
2513
+ h.value.scrollTop = h.value.querySelector(`[data-index="${b}"]`).getBoundingClientRect().y - g;
2514
+ }
2515
+ return e({
2516
+ jumpToSlide: f
2517
+ }), (b, g) => (_(), x("div", na, [
2518
+ k("div", sa, [
2519
+ k("div", ia, [
2520
+ k("span", null, [
2521
+ g[4] || (g[4] = j("已读:")),
2522
+ k("span", ra, E(w.value.length), 1),
2523
+ j("/" + E(b.slides.length), 1)
2524
+ ]),
2525
+ k("div", ua, [
2526
+ C(t(Ce), {
2527
+ class: "margin-r-2 pointer",
2528
+ size: "16",
2529
+ color: m.value ? "#999" : "#000",
2530
+ onClick: g[0] || (g[0] = (p) => m.value = !m.value)
2531
+ }, {
2532
+ default: T(() => [
2533
+ C(ea)
2534
+ ]),
2535
+ _: 1
2536
+ }, 8, ["color"]),
2537
+ C(t(Ce), {
2538
+ class: "pointer",
2539
+ name: "cus-list",
2540
+ size: "16",
2541
+ color: m.value ? "#000" : "#999",
2542
+ onClick: g[1] || (g[1] = (p) => m.value = !m.value)
2543
+ }, {
2544
+ default: T(() => [
2545
+ C(aa)
2546
+ ]),
2547
+ _: 1
2548
+ }, 8, ["color"])
2549
+ ])
2550
+ ]),
2551
+ k("div", {
2552
+ class: "flex-1 overflow-auto",
2553
+ style: { width: "100%" },
2554
+ ref_key: "slidesRef",
2555
+ ref: h
2556
+ }, [
2557
+ m.value ? (_(), x("ul", ha, [
2558
+ k("li", ga, [
2559
+ g[5] || (g[5] = k("div", { class: "w-10%" }, null, -1)),
2560
+ k("div", ya, E(t(d)("缩略图")), 1),
2561
+ k("div", wa, E(t(d)("切片名")), 1),
2562
+ k("div", _a, E(t(d)("评分")), 1)
2563
+ ]),
2564
+ (_(!0), x(ne, null, se(b.slides, (p, u) => (_(), x("li", {
2565
+ key: u,
2566
+ "data-index": u,
2567
+ class: "flex align-items-center overflow-hidden",
2568
+ style: Z({
2569
+ backgroundColor: t(v) === u ? "rgba(6, 85, 195, 0.1)" : "#fff"
2570
+ }),
2571
+ onClick: (H) => s(u)
2572
+ }, [
2573
+ k("div", {
2574
+ class: "w-10% text-center",
2575
+ onClick: Ke(() => {
2576
+ }, ["stop"])
2577
+ }, [
2578
+ C(t(Ze), {
2579
+ modelValue: p.check,
2580
+ "onUpdate:modelValue": (H) => p.check = H,
2581
+ style: { width: "14px", height: "16px" }
2582
+ }, null, 8, ["modelValue", "onUpdate:modelValue"])
2583
+ ]),
2584
+ k("div", ka, [
2585
+ k("div", za, [
2586
+ C(Oe, {
2587
+ style: Z([{ transform: `rotate(${p.angle}deg)` }, { height: "45px" }]),
2588
+ "retry-times": 1,
2589
+ src: p.labelImg,
2590
+ fit: "cover",
2591
+ class: "flex-1"
2592
+ }, null, 8, ["style", "src"]),
2593
+ C(Oe, {
2594
+ "retry-times": 1,
2595
+ fit: "cover",
2596
+ src: p.previewImg,
2597
+ style: { height: "45px" },
2598
+ class: "flex-1"
2599
+ }, null, 8, ["src"]),
2600
+ p.read ? R("", !0) : (_(), x("div", Ca, E(t(d)("未读")), 1))
2601
+ ])
2602
+ ]),
2603
+ k("div", $a, [
2604
+ C(t(Et), {
2605
+ effect: "dark",
2606
+ placement: "bottom",
2607
+ content: `${p.name}`
2608
+ }, {
2609
+ default: T(() => [
2610
+ k("span", {
2611
+ style: { "line-height": "16px" },
2612
+ class: "margin-l-1 ellipsis hzzt-kfb-slides__text",
2613
+ dir: "rtl",
2614
+ onClick: Ke((H) => a(p), ["stop"])
2615
+ }, E(p.name), 9, Ta)
2616
+ ]),
2617
+ _: 2
2618
+ }, 1032, ["content"])
2619
+ ]),
2620
+ k("div", {
2621
+ class: "w-20% flex text-center pointer",
2622
+ style: Z({
2623
+ color: p.gradeColor
2624
+ }),
2625
+ onClick: (H) => y("tool", "grade", p)
2626
+ }, E(p.grade), 13, La)
2627
+ ], 12, ba))), 128))
2628
+ ])) : (_(), x("div", ca, [
2629
+ (_(!0), x(ne, null, se(b.slides, (p, u) => (_(), x("div", {
2630
+ key: u,
2631
+ class: ze(["hzzt-kfb-slides__box", t(v) === u ? "hzzt-kfb-slides__box--active" : ""]),
2632
+ "data-index": u,
2633
+ onClick: (H) => s(u)
2634
+ }, [
2635
+ k("div", va, [
2636
+ C(Oe, {
2637
+ style: Z({ transform: `rotate(${p.angle}deg)` }),
2638
+ "retry-times": 1,
2639
+ src: p.labelImg,
2640
+ class: "hzzt-kfb-slides__img",
2641
+ fit: "cover",
2642
+ hover: ""
2643
+ }, null, 8, ["style", "src"]),
2644
+ C(Oe, {
2645
+ "retry-times": 1,
2646
+ src: p.previewImg,
2647
+ class: "flex-1 hzzt-kfb-slides__img1",
2648
+ fit: "cover"
2649
+ }, null, 8, ["src"])
2650
+ ]),
2651
+ k("div", {
2652
+ class: "flex justify-content-between align-items-center",
2653
+ onClick: Ke(() => {
2654
+ }, ["stop"])
2655
+ }, [
2656
+ C(t(Ze), {
2657
+ modelValue: p.check,
2658
+ "onUpdate:modelValue": (H) => p.check = H,
2659
+ style: { width: "14px", height: "16px" }
2660
+ }, null, 8, ["modelValue", "onUpdate:modelValue"]),
2661
+ C(t(Et), {
2662
+ effect: "dark",
2663
+ placement: "bottom",
2664
+ content: `${p.name}`
2665
+ }, {
2666
+ default: T(() => [
2667
+ k("span", {
2668
+ style: { "line-height": "16px", "text-align": "center", width: "calc(100% - 14px)" },
2669
+ class: "margin-l-1 ellipsis",
2670
+ onClick: Ke((H) => a(p), ["stop"])
2671
+ }, E(p.name), 9, fa)
2672
+ ]),
2673
+ _: 2
2674
+ }, 1032, ["content"])
2675
+ ]),
2676
+ p.read ? R("", !0) : (_(), x("div", ma, E(t(d)("未读")), 1)),
2677
+ p.grade ? (_(), x("div", {
2678
+ key: 1,
2679
+ class: "hzzt-kfb-slides__grade",
2680
+ style: Z({
2681
+ background: p.gradeColor
2682
+ }),
2683
+ onClick: (H) => y("tool", "grade", p)
2684
+ }, E(p.grade), 13, pa)) : R("", !0),
2685
+ le(b.$slots, "slide", { slide: p }, void 0, !0)
2686
+ ], 10, da))), 128))
2687
+ ]))
2688
+ ], 512),
2689
+ le(b.$slots, "footer", {}, void 0, !0),
2690
+ n.value.length > 1 ? (_(), x("div", xa, [
2691
+ k("div", Ea, [
2692
+ k("span", Va, E(t(d)("分屏")), 1),
2693
+ C(t(Ve), {
2694
+ modelValue: t(i),
2695
+ "onUpdate:modelValue": g[2] || (g[2] = (p) => me(i) ? i.value = p : null)
2696
+ }, null, 8, ["modelValue"]),
2697
+ t(i) ? (_(), x("span", Ia, E(t(d)("同步")), 1)) : R("", !0),
2698
+ t(i) ? (_(), P(t(Ve), {
2699
+ key: 1,
2700
+ modelValue: t(r),
2701
+ "onUpdate:modelValue": g[3] || (g[3] = (p) => me(r) ? r.value = p : null)
2702
+ }, null, 8, ["modelValue"])) : R("", !0)
2703
+ ])
2704
+ ])) : R("", !0)
2705
+ ])
2706
+ ]));
2707
+ }
2708
+ }), Sa = /* @__PURE__ */ ye(Ma, [["__scopeId", "data-v-83d1f685"]]), Ha = { class: "hzzt-kfb-ai overflow-hidden" }, Pa = { class: "flex align-items-center margin-t-1" }, Ra = ["onClick"], Aa = { style: { color: "var(--el-color-success)" } }, Na = { class: "flex-1 flex overflow-auto wrap margin-t-1" }, Ba = ["onClick"], Da = {
2709
+ key: 0,
2710
+ style: { "margin-left": "2px" }
2711
+ }, Ua = /* @__PURE__ */ te({
2712
+ name: "KfbAiList",
2713
+ __name: "list",
2714
+ props: {
2715
+ data: { default: () => [] },
2716
+ analysis: {}
2717
+ },
2718
+ setup(c, { expose: e }) {
2719
+ const o = c, { t: l } = ce(), y = Y("kfbViewRef"), v = L(-1), i = L(1), r = L(100), m = L(!0), h = L([]), w = B(() => o.data.filter((A) => h.value.includes(A.cls || ""))), n = B(() => w.value.slice((i.value - 1) * r.value, i.value * r.value)), d = B(() => {
2720
+ const A = /* @__PURE__ */ new Set();
2721
+ return o.data.forEach((U) => {
2722
+ const M = U.cls || "";
2723
+ M && !A.has(M) && A.add(M);
2724
+ }), Array.from(A);
2725
+ }), s = B(() => h.value.length !== 0 && h.value.length !== d.value.length), a = Ht(o);
2726
+ ae(() => d.value, (A) => {
2727
+ f(), h.value = [...A];
2728
+ }), ge(() => {
2729
+ h.value = [...d.value];
2730
+ });
2731
+ function f() {
2732
+ v.value = -1, i.value = 1, r.value = 100, m.value = !0;
2733
+ }
2734
+ function b(A) {
2735
+ const U = w.value.findIndex((M) => M.id === A.id);
2736
+ v.value = U, y.value.jumpToLabel(A, 5);
2737
+ }
2738
+ function g(A) {
2739
+ const U = o.data.filter((M) => M.cls === A);
2740
+ return U.length ? `(${U.length})` : "";
2741
+ }
2742
+ function p() {
2743
+ v.value = -1, m.value = h.value.length == d.value.length;
2744
+ }
2745
+ function u(A) {
2746
+ h.value = A ? [...d.value] : [], v.value = -1;
2747
+ }
2748
+ function H(A, U) {
2749
+ A.stopPropagation(), A.preventDefault(), h.value = [U], p();
2750
+ }
2751
+ return e({
2752
+ labelList: w
2753
+ }), (A, U) => (_(), x("div", Ha, [
2754
+ k("div", Pa, [
2755
+ C(t(vl), {
2756
+ placement: "bottom",
2757
+ trigger: "click",
2758
+ width: "160"
2759
+ }, {
2760
+ reference: T(() => [
2761
+ C(t(be), {
2762
+ class: "margin-r-1",
2763
+ type: "primary"
2764
+ }, {
2765
+ default: T(() => [
2766
+ j(E(t(l)("分类")) + " ", 1),
2767
+ C(ee, { name: "arrowDown" })
2768
+ ]),
2769
+ _: 1
2770
+ })
2771
+ ]),
2772
+ default: T(() => [
2773
+ k("div", null, [
2774
+ C(t(Ze), {
2775
+ modelValue: m.value,
2776
+ "onUpdate:modelValue": U[0] || (U[0] = (M) => m.value = M),
2777
+ indeterminate: s.value,
2778
+ onChange: u
2779
+ }, {
2780
+ default: T(() => [
2781
+ j(E(t(l)("全选")), 1)
2782
+ ]),
2783
+ _: 1
2784
+ }, 8, ["modelValue", "indeterminate"]),
2785
+ C(t(fl), {
2786
+ modelValue: h.value,
2787
+ "onUpdate:modelValue": U[1] || (U[1] = (M) => h.value = M),
2788
+ class: "flex column",
2789
+ onChange: p
2790
+ }, {
2791
+ default: T(() => [
2792
+ (_(!0), x(ne, null, se(d.value, (M) => (_(), P(t(Ze), {
2793
+ key: M,
2794
+ value: M
2795
+ }, {
2796
+ default: T(() => [
2797
+ k("p", {
2798
+ onClick: (X) => H(X, M)
2799
+ }, [
2800
+ j(E(M), 1),
2801
+ k("span", Aa, E(g(M)), 1)
2802
+ ], 8, Ra)
2803
+ ]),
2804
+ _: 2
2805
+ }, 1032, ["value"]))), 128))
2806
+ ]),
2807
+ _: 1
2808
+ }, 8, ["modelValue"])
2809
+ ])
2810
+ ]),
2811
+ _: 1
2812
+ }),
2813
+ C(t(It), {
2814
+ type: t(a).type,
2815
+ class: "margin-l-1"
2816
+ }, {
2817
+ default: T(() => [
2818
+ j(E(t(a).name), 1)
2819
+ ]),
2820
+ _: 1
2821
+ }, 8, ["type"])
2822
+ ]),
2823
+ le(A.$slots, "default", { analysis: A.analysis }),
2824
+ k("div", Na, [
2825
+ (_(!0), x(ne, null, se(n.value, (M, X) => (_(), x("div", {
2826
+ key: X + (i.value - 1) * r.value,
2827
+ class: ze(`hzzt-kfb-ai__img ${v.value === X + (i.value - 1) * r.value ? "hzzt-kfb-ai__img--active" : ""}`),
2828
+ onClick: (O) => b(M)
2829
+ }, [
2830
+ C(t(pl), {
2831
+ "retry-times": 1,
2832
+ src: M.imageUrl,
2833
+ "error-src": t(Xe)
2834
+ }, null, 8, ["src", "error-src"]),
2835
+ k("div", {
2836
+ style: Z({ color: M.strokeStyle }),
2837
+ class: "ellipsis"
2838
+ }, [
2839
+ j(E(M.cls) + " ", 1),
2840
+ M.score ? (_(), x("span", Da, E(M.score), 1)) : R("", !0)
2841
+ ], 4)
2842
+ ], 10, Ba))), 128))
2843
+ ]),
2844
+ C(t(ml), {
2845
+ class: "wrap",
2846
+ "current-page": i.value,
2847
+ "onUpdate:currentPage": U[2] || (U[2] = (M) => i.value = M),
2848
+ "page-size": r.value,
2849
+ "onUpdate:pageSize": U[3] || (U[3] = (M) => r.value = M),
2850
+ "page-sizes": [100, 200, 300, 400],
2851
+ layout: "total, sizes, prev, pager, next",
2852
+ total: w.value.length
2853
+ }, null, 8, ["current-page", "page-size", "total"])
2854
+ ]));
2855
+ }
2856
+ }), Fa = { class: "hzzt-kfb-slide" }, Ka = { class: "flex flex-1 overflow-hidden" }, ja = { class: "flex flex-1" }, Oa = {
2857
+ key: 0,
2858
+ style: { height: "100%", width: "100%" },
2859
+ class: "flex wrap"
2860
+ }, Ga = ["onClick"], rt = /* @__PURE__ */ te({
2861
+ name: "HzztKfbSlide",
2862
+ __name: "HzztKfbSlide",
2863
+ props: /* @__PURE__ */ ke({
2864
+ menus: { default: () => [] },
2865
+ kfb: {},
2866
+ slides: { default: () => [] },
2867
+ ai: {},
2868
+ teleport: { type: Boolean, default: !1 },
2869
+ watermark: {},
2870
+ process: {},
2871
+ microscope: {},
2872
+ showList: { type: Boolean, default: !0 },
2873
+ showKfbLabel: { type: Boolean, default: !0 },
2874
+ showKeyboard: { type: Boolean, default: !1 },
2875
+ showMenuText: { type: Boolean, default: !0 },
2876
+ showWatermark: { type: Boolean, default: !1 }
2877
+ }, {
2878
+ index: {
2879
+ default: 0
2880
+ },
2881
+ indexModifiers: {}
2882
+ }),
2883
+ emits: /* @__PURE__ */ ke(["tool"], ["update:index"]),
2884
+ setup(c, { expose: e, emit: o }) {
2885
+ const l = c, y = o, v = De(c, "index"), i = B(() => l.slides[v.value]), r = B(() => l.slides.filter(({ check: $ }) => $)), m = L(), h = L(), w = L(), n = L(), d = Le("kfb-showKeyboard", l.showKeyboard), s = Le("kfb-showKfbLabel", l.showKfbLabel), a = Le("kfb-showWatermark", l.showWatermark), f = Le("kfb-showMenuText", l.showMenuText), b = L(!1), g = L(!1), { t: p } = ce(), u = B(() => {
2886
+ var $;
2887
+ if (b.value) {
2888
+ const N = r.value.findIndex(({ id: K }) => {
2889
+ var de;
2890
+ return K === ((de = i.value) == null ? void 0 : de.id);
2891
+ });
2892
+ return (($ = w.value) == null ? void 0 : $[N]) || h.value;
2893
+ } else
2894
+ return h.value;
2895
+ }), H = B(() => r.value.length <= 1 ? {
2896
+ height: "100%",
2897
+ width: "100%"
2898
+ } : r.value.length <= 2 ? {
2899
+ height: "100%",
2900
+ width: "calc((100% - 4px) / 2)"
2901
+ } : r.value.length <= 4 ? {
2902
+ height: "calc((100% - 4px) / 2)",
2903
+ width: "calc((100% - 4px) / 2)"
2904
+ } : r.value.length <= 6 ? {
2905
+ height: "calc((100% - 4px) / 2)",
2906
+ width: "calc((100% - 4px * 2) / 3)"
2907
+ } : r.value.length <= 9 ? {
2908
+ height: "calc((100% - 4px * 2) / 3)",
2909
+ width: "calc((100% - 4px * 2) / 3)"
2910
+ } : {
2911
+ height: "100%",
2912
+ width: "100%"
2913
+ });
2914
+ ae(() => r.value, ($) => {
2915
+ b.value && $.length <= 1 && (b.value = !1);
2916
+ }), ae(() => i.value, ($) => {
2917
+ if ($) {
2918
+ const N = $.read;
2919
+ $.read = !0, y("tool", "choose", {
2920
+ slide: $,
2921
+ read: N
2922
+ });
2923
+ }
2924
+ }), Object.entries({
2925
+ keyboard: d,
2926
+ kfbLabel: s,
2927
+ watermark: a,
2928
+ menuText: f
2929
+ }).forEach(([$, N]) => {
2930
+ ae(() => N.value, (K) => {
2931
+ y("tool", $, K);
2932
+ });
2933
+ });
2934
+ const {
2935
+ hasAi: U,
2936
+ hasIqc: M,
2937
+ currentAnalysis: X,
2938
+ aiLabelList: O,
2939
+ enableAi: ue,
2940
+ enableIqc: oe,
2941
+ toggleIqc: Se,
2942
+ toggleAi: He
2943
+ } = qo(l, i);
2944
+ function we($, N) {
2945
+ $ === "next" && l.slides[v.value + 1] && v.value++, $ === "prev" && l.slides[v.value - 1] && v.value--, ($ === "label" || $ === "tool") && (s.value = N), y("tool", $, N);
2946
+ }
2947
+ function Ue($) {
2948
+ var K, de;
2949
+ const N = _e(q({}, l.kfb), {
2950
+ watermark: l.watermark,
2951
+ process: l.process,
2952
+ microscope: l.microscope,
2953
+ slide: $,
2954
+ aiLabelList: i.value.id === $.id ? ((K = n.value) == null ? void 0 : K.labelList) || [] : [],
2955
+ syncPosition: g.value,
2956
+ syncZoom: g.value,
2957
+ handle: void 0,
2958
+ analysis: i.value.id === $.id ? X.value : void 0
2959
+ });
2960
+ return (de = l.kfb) != null && de.handle ? l.kfb.handle($, N) : N;
2961
+ }
2962
+ function Qe($) {
2963
+ v.value = l.slides.findIndex((N) => N.id === $.id);
2964
+ }
2965
+ function Je($) {
2966
+ b.value && (l.slides[$].check = !0);
2967
+ }
2968
+ function et() {
2969
+ var $;
2970
+ ($ = b.value ? w.value : [h.value]) == null || $.forEach((N) => {
2971
+ s.value || (N.updateGrid({
2972
+ show: s.value,
2973
+ ruler: s.value
2974
+ }), d.value = s.value), N.updateGraduation({
2975
+ show: s.value
2976
+ }), N.updateNavigator(s.value);
2977
+ });
2978
+ }
2979
+ function Pe($) {
2980
+ v.value = $, m.value && m.value.jumpToSlide($);
2981
+ }
2982
+ function Re($, N) {
2983
+ u.value && u.value.jumpToLabel($, N);
2984
+ }
2985
+ function tt($, N) {
2986
+ u.value && u.value.jumpToPosition($, N);
2987
+ }
2988
+ return ve("kfbViewRef", u), ve("show-keyboard", d), ve("show-kfb-label", s), ve("show-menu-text", f), ve("show-watermark", a), ve("file-index", v), ve("divide", b), ve("sync", g), e({
2989
+ divide: b,
2990
+ slide: i,
2991
+ kfbViewRef: u,
2992
+ jumpToSlide: Pe,
2993
+ jumpToLabel: Re,
2994
+ jumpToPosition: tt,
2995
+ analysis: X,
2996
+ enableAi: ue,
2997
+ enableIqc: oe,
2998
+ showAiList: B(() => {
2999
+ var $;
3000
+ return !!(($ = l.ai) != null && $.enable) && O.value.length;
3001
+ })
3002
+ }), ($, N) => (_(), x("div", Fa, [
3003
+ $.menus.length ? (_(), P(Ye, {
3004
+ key: 0,
3005
+ menu: $.menus,
3006
+ process: $.process,
3007
+ microscope: $.microscope,
3008
+ onTool: we
3009
+ }, {
3010
+ left: T(() => [
3011
+ le($.$slots, "left")
3012
+ ]),
3013
+ right: T(() => [
3014
+ C(t(Ve), {
3015
+ modelValue: t(s),
3016
+ "onUpdate:modelValue": N[0] || (N[0] = (K) => me(s) ? s.value = K : null),
3017
+ "active-text": t(p)("隐藏标签"),
3018
+ "active-value": !1,
3019
+ "inactive-value": !0,
3020
+ class: "margin-r-2",
3021
+ onChange: et
3022
+ }, null, 8, ["modelValue", "active-text"]),
3023
+ $.ai && $.ai.enable && t(M) ? (_(), P(t(Ve), {
3024
+ key: 0,
3025
+ modelValue: t(oe),
3026
+ "onUpdate:modelValue": N[1] || (N[1] = (K) => me(oe) ? oe.value = K : null),
3027
+ "active-text": t(p)("AI质控"),
3028
+ class: "margin-r-2",
3029
+ onChange: t(Se)
3030
+ }, null, 8, ["modelValue", "active-text", "onChange"])) : R("", !0),
3031
+ $.ai && $.ai.enable && t(U) ? (_(), P(t(Ve), {
3032
+ key: 1,
3033
+ modelValue: t(ue),
3034
+ "onUpdate:modelValue": N[2] || (N[2] = (K) => me(ue) ? ue.value = K : null),
3035
+ "active-text": t(p)("AI分析"),
3036
+ class: "margin-r-2",
3037
+ onChange: t(He)
3038
+ }, null, 8, ["modelValue", "active-text", "onChange"])) : R("", !0),
3039
+ le($.$slots, "right")
3040
+ ]),
3041
+ _: 3
3042
+ }, 8, ["menu", "process", "microscope"])) : R("", !0),
3043
+ k("div", Ka, [
3044
+ $.showList ? (_(), P(Ge, {
3045
+ key: 0,
3046
+ defer: "",
3047
+ to: "#kfb-slide-list",
3048
+ disabled: !$.teleport
3049
+ }, [
3050
+ C(Sa, {
3051
+ ref_key: "slidesRef",
3052
+ ref: m,
3053
+ style: Z($.teleport ? "" : "width: 250px"),
3054
+ slides: $.slides,
3055
+ onSelect: Je,
3056
+ onTool: we
3057
+ }, {
3058
+ slide: T(({ slide: K }) => [
3059
+ le($.$slots, "list", { slide: K })
3060
+ ]),
3061
+ footer: T(() => [
3062
+ le($.$slots, "listFooter")
3063
+ ]),
3064
+ _: 3
3065
+ }, 8, ["style", "slides"])
3066
+ ], 8, ["disabled"])) : R("", !0),
3067
+ (_(), P(Ge, {
3068
+ defer: "",
3069
+ to: "#kfb-slide-view",
3070
+ disabled: !$.teleport
3071
+ }, [
3072
+ k("div", ja, [
3073
+ r.value.length && b.value ? (_(), x("ul", Oa, [
3074
+ (_(!0), x(ne, null, se(r.value, (K, de) => (_(), x("li", {
3075
+ key: de,
3076
+ style: Z(H.value),
3077
+ class: ze(i.value.id === K.id ? "hzzt-kfb-view-screen-active" : ""),
3078
+ onClick: (ct) => Qe(K)
3079
+ }, [
3080
+ (_(), P(Be, We({
3081
+ ref_for: !0,
3082
+ ref_key: "kfbViewRefs",
3083
+ ref: w,
3084
+ key: `kfb-${de}`
3085
+ }, { ref_for: !0 }, Ue(K), { onTool: we }), {
3086
+ default: T(() => [
3087
+ le($.$slots, "kfb", { slide: K })
3088
+ ]),
3089
+ _: 2
3090
+ }, 1040))
3091
+ ], 14, Ga))), 128))
3092
+ ])) : i.value ? (_(), P(Be, We({
3093
+ key: 1,
3094
+ ref_key: "kfbViewRef",
3095
+ ref: h
3096
+ }, Ue(i.value), { onTool: we }), {
3097
+ default: T(() => [
3098
+ le($.$slots, "kfb", { slide: i.value })
3099
+ ]),
3100
+ _: 3
3101
+ }, 16)) : R("", !0)
3102
+ ])
3103
+ ], 8, ["disabled"])),
3104
+ $.ai && $.ai.enable && t(O).length ? (_(), P(Ge, {
3105
+ key: 1,
3106
+ defer: "",
3107
+ to: "#kfb-slide-ai",
3108
+ disabled: !$.teleport
3109
+ }, [
3110
+ C(Ua, {
3111
+ style: Z($.teleport ? "" : "width: 350px"),
3112
+ ref_key: "kfbAiRef",
3113
+ ref: n,
3114
+ data: t(O),
3115
+ slide: i.value,
3116
+ analysis: t(X)
3117
+ }, {
3118
+ default: T(({ analysis: K }) => [
3119
+ le($.$slots, "analysis", { analysis: K })
3120
+ ]),
3121
+ _: 3
3122
+ }, 8, ["style", "data", "slide", "analysis"])
3123
+ ], 8, ["disabled"])) : R("", !0),
3124
+ le($.$slots, "default")
3125
+ ])
3126
+ ]));
3127
+ }
3128
+ });
3129
+ rt.name = "HzztKfbSlide";
3130
+ Be.name = "HzztKfbView";
3131
+ Ye.name = "HzztKfbToolbox";
3132
+ const Wa = (c, e) => {
3133
+ c.use(hl, e == null ? void 0 : e.i18n), c.component(rt.name, rt), c.component(Be.name, Be), c.component(Ye.name, Ye);
3134
+ }, en = {
3135
+ install: Wa
3136
+ };
3137
+ export {
3138
+ St as D,
3139
+ Mt as I,
3140
+ ye as _,
3141
+ ee as a,
3142
+ it as b,
3143
+ rt as c,
3144
+ Be as d,
3145
+ Ye as e,
3146
+ en as i,
3147
+ ce as u
3148
+ };