hzzt-kfb-slide 0.0.8 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) hide show
  1. package/dist/components/{annotateFlT59Ud8.js → annotateBCPPxCOM.js} +1 -1
  2. package/dist/components/{annotateR7c0LCw2.js → annotateBe1iGjLm.js} +1 -1
  3. package/dist/components/annotateBjK38kC5.js +132 -0
  4. package/dist/components/annotateDswEmgoP.js +1 -0
  5. package/dist/components/arrowB_iF_C7o.js +1 -0
  6. package/dist/components/arrowBsGolew1.js +23 -0
  7. package/dist/components/{arrowDHcko1dw.js → arrowCircleCwh64ps_.js} +1 -1
  8. package/dist/components/{arrowDRio3eqx.js → arrowCircleDcEhXBbb.js} +9 -9
  9. package/dist/components/{arrowDownByED8CSr.js → arrowDownBO1BfpJc.js} +1 -1
  10. package/dist/components/{arrowDownDRpTqVDK.js → arrowDownGBYuSng0.js} +1 -1
  11. package/dist/components/{arrowLeftCl2XVnFB.js → arrowLeftC5fR0o6a.js} +1 -1
  12. package/dist/components/{arrowLeftDjcuA_pb.js → arrowLeftD5sInyYk.js} +1 -1
  13. package/dist/components/{arrowRightClSGs6Mb.js → arrowRightD8w_2T2p.js} +1 -1
  14. package/dist/components/{arrowRightDSkHKM4y.js → arrowRightDZ5B3UGP.js} +1 -1
  15. package/dist/components/{arrowUpQVIPK_NQ.js → arrowUpBc9Kyfxz.js} +1 -1
  16. package/dist/components/{arrowUpCgzq2L8A.js → arrowUpBeusa4Lo.js} +1 -1
  17. package/dist/components/bilateralCZQNj8IO.js +1 -0
  18. package/dist/components/bilateraliBpUezXT.js +27 -0
  19. package/dist/components/{channelCTQgwZV_.js → channelCex9iiR2.js} +1 -1
  20. package/dist/components/{channelD-dojSaC.js → channelD-i4fzni.js} +1 -1
  21. package/dist/components/{checkCBxyasVc.js → checkCt32HIH2.js} +1 -1
  22. package/dist/components/{checkCqCYDYr4.js → checkDdnX-C4X.js} +1 -1
  23. package/dist/components/{configGeQGhW9C.js → configBFvCGNtv.js} +1 -1
  24. package/dist/components/{configP_8ZVyfi.js → configBwkv57gw.js} +1 -1
  25. package/dist/components/customCGjGRDJm.js +1 -0
  26. package/dist/components/{customBr26z068.js → customCjYE_yPK.js} +3 -2
  27. package/dist/components/{deleteuibq0KAI.js → deleteB9iRvKYT.js} +1 -1
  28. package/dist/components/{deleteBNIxfTCo.js → deleteBpbziZfN.js} +1 -1
  29. package/dist/components/dotBlqZNkl0.js +1 -0
  30. package/dist/components/dotCF84g70n.js +25 -0
  31. package/dist/components/{dotBucEP5Z8.js → dotD_biewxL.js} +10 -9
  32. package/dist/components/{dotBJ-lSESE.js → dotDcO8K7mJ.js} +1 -1
  33. package/dist/components/dotDeJyIiYJ.js +1 -0
  34. package/dist/components/{dotDhjymv7s.js → dotDvq6YQgW.js} +1 -1
  35. package/dist/components/{downloadBrpaJY3x.js → downloadBnieQIP8.js} +1 -1
  36. package/dist/components/downloadBwUL0Ea7.js +1 -0
  37. package/dist/components/{downloadDnWeuVMn.js → downloadC8nKUjq6.js} +11 -10
  38. package/dist/components/{downloadB5STpOaR.js → downloadDy93WSTG.js} +1 -1
  39. package/dist/components/ellipseBxnZw_Wq.js +1 -0
  40. package/dist/components/ellipseCp5zAGAh.js +23 -0
  41. package/dist/components/expandLeft0jc4WZXg.js +21 -0
  42. package/dist/components/expandLeftC1Ta5tGY.js +1 -0
  43. package/dist/components/expandRightBH8iguKS.js +21 -0
  44. package/dist/components/expandRightDb0-tlNj.js +1 -0
  45. package/dist/components/flagBEcBfVBz.js +1 -0
  46. package/dist/components/flagDbfaF80Z.js +29 -0
  47. package/dist/components/{flipD7XBmACU.js → flipBIarRte4.js} +1 -1
  48. package/dist/components/{flipDlTFW9pO.js → flipChZNTRna.js} +1 -1
  49. package/dist/components/fontBuHpTztq.js +23 -0
  50. package/dist/components/fontU7S814K8.js +1 -0
  51. package/dist/components/{fullscreenCxtySrDu.js → fullscreenBQ1YkrN_.js} +1 -1
  52. package/dist/components/{fullscreenBGej63GA.js → fullscreenBiMgHdq_.js} +4 -3
  53. package/dist/components/{fullscreenoNyXD8h3.js → fullscreenBpAk7wDb.js} +1 -1
  54. package/dist/components/fullscreenuBLuHv03.js +1 -0
  55. package/dist/components/indexCFzrAiFg.js +4 -0
  56. package/dist/components/indexCiVL4LuE.js +3009 -0
  57. package/dist/components/{infoCA6EWNF3.js → infoC4hGYJaF.js} +1 -1
  58. package/dist/components/{infoBjk0dOPE.js → infoCp7ve5DR.js} +1 -1
  59. package/dist/components/{levelbRjS_tcK.js → levelCeI--h7X.js} +1 -1
  60. package/dist/components/{levelCG93ncZs.js → levelKqcfU9Ld.js} +1 -1
  61. package/dist/components/lineC3B9m1Ug.js +1 -0
  62. package/dist/components/lineOSorc3WE.js +23 -0
  63. package/dist/components/{microscopeD-EjOdf2.js → microscopeBFEz_lq4.js} +1 -1
  64. package/dist/components/{microscopeD-FrVKRB.js → microscopeD9DoPiHa.js} +1 -1
  65. package/dist/components/{microscopey8VfYeuX.js → microscopeD9m8Vj5p.js} +5 -4
  66. package/dist/components/microscopemifUUWdo.js +1 -0
  67. package/dist/components/{moveDYmvf7k8.js → move0dbwvgpp.js} +1 -1
  68. package/dist/components/{moveCCkgUb-0.js → move67AZY9GV.js} +11 -10
  69. package/dist/components/{movebJvf1oPR.js → moveCoqqrHrF.js} +1 -1
  70. package/dist/components/moveP1udjvew.js +1 -0
  71. package/dist/components/{nextDdiDIgB2.js → next949tlxwI.js} +1 -1
  72. package/dist/components/{nextC6ATDCIW.js → nextF-0K-c0T.js} +1 -1
  73. package/dist/components/polygonCVRu0jGg.js +23 -0
  74. package/dist/components/polygonCY1umCDA.js +1 -0
  75. package/dist/components/{prevC43MjkJW.js → prevBoMShTVJ.js} +1 -1
  76. package/dist/components/{prevD3zqAMQc.js → prevZJi0HBQa.js} +1 -1
  77. package/dist/components/{processCDMD34sa.js → process3Kd9iKAC.js} +1 -1
  78. package/dist/components/{processDR1VlciH.js → processBtDhC5cN.js} +5 -4
  79. package/dist/components/{processDq-wdwXj.js → processDFHVq7yX.js} +1 -1
  80. package/dist/components/processX0dS45XF.js +1 -0
  81. package/dist/components/rectangleBRcZJKiG.js +1 -0
  82. package/dist/components/rectangleD42v1SqR.js +23 -0
  83. package/dist/components/{rotateCVpCm-tK.js → rotate5_xJfsZ2.js} +1 -1
  84. package/dist/components/rotate7jt-EuDp.js +1 -0
  85. package/dist/components/{rotateD_vW_yY0.js → rotateDu_mkWYc.js} +10 -9
  86. package/dist/components/{rotateB2TKrdOd.js → rotateHyLr1dia.js} +1 -1
  87. package/dist/components/{settingDgfjjrts.js → setting3Ugpfl6Q.js} +1 -1
  88. package/dist/components/settingBdsG5NNP.js +1 -0
  89. package/dist/components/{settingB6ugQHJp.js → settingCutO8H2U.js} +1 -1
  90. package/dist/components/{settingCqgEfv1i.js → settingonwvagGo.js} +5 -4
  91. package/dist/components/starB6lZrSR_.js +25 -0
  92. package/dist/components/starBuk9Zpe8.js +1 -0
  93. package/dist/components/{tailorCBjKU02K.js → tailorC1nOu9Zx.js} +1 -1
  94. package/dist/components/{tailorDzvy19FE.js → tailorCxS09ZPn.js} +1 -1
  95. package/dist/components/{useCommonBD-xKHu3.js → useCommonDvVbDPSe.js} +1 -1
  96. package/dist/components/{useCommonBD90FQd0.js → useCommon_E1byFLe.js} +1 -1
  97. package/dist/components/voiceCifc7IPf.js +25 -0
  98. package/dist/components/voiceDFacjiIM.js +1 -0
  99. package/dist/components/{zoomBcO2XFbA.js → zoomB7VyAZrz.js} +1 -1
  100. package/dist/components/{zoomB5HF8Hai.js → zoomBFx-vjsG.js} +1 -1
  101. package/dist/components/{zoomInBrNwgimx.js → zoomInCf25h6Us.js} +1 -1
  102. package/dist/components/{zoomInC3EAqFg-.js → zoomInRDq1eDLi.js} +1 -1
  103. package/dist/components/{zoomOutDafuMDlQ.js → zoomOutDdDapD_E.js} +1 -1
  104. package/dist/components/{zoomOutGi1JWbc1.js → zoomOutjIFNPuhT.js} +1 -1
  105. package/dist/index.cjs.js +1 -1
  106. package/dist/index.css +1 -1
  107. package/dist/index.es.js +5 -5
  108. package/package.json +2 -2
  109. package/types/components/KfbView/KfbAnnotation.vue.d.ts +17 -0
  110. package/types/components/KfbView/index.d.ts +2 -0
  111. package/types/components/KfbView/index.vue.d.ts +6 -2
  112. package/types/components/KfbView/useLabel.d.ts +81 -0
  113. package/types/components/icon/expandLeft.vue.d.ts +2 -0
  114. package/types/components/icon/expandRight.vue.d.ts +2 -0
  115. package/types/components/icon/mark/arrow.vue.d.ts +2 -0
  116. package/types/components/icon/mark/bilateral.vue.d.ts +2 -0
  117. package/types/components/icon/mark/dot.vue.d.ts +2 -0
  118. package/types/components/icon/mark/ellipse.vue.d.ts +2 -0
  119. package/types/components/icon/mark/flag.vue.d.ts +2 -0
  120. package/types/components/icon/mark/font.vue.d.ts +2 -0
  121. package/types/components/icon/mark/line.vue.d.ts +2 -0
  122. package/types/components/icon/mark/polygon.vue.d.ts +2 -0
  123. package/types/components/icon/mark/rectangle.vue.d.ts +2 -0
  124. package/types/components/icon/mark/star.vue.d.ts +2 -0
  125. package/types/components/icon/mark/voice.vue.d.ts +2 -0
  126. package/types/components/toolbox/instances.d.ts +1 -0
  127. package/types/index.d.ts +12 -0
  128. package/dist/components/annotateJzE3toJV.js +0 -1
  129. package/dist/components/annotatemJxZMVPO.js +0 -123
  130. package/dist/components/customB1-3lgH0.js +0 -1
  131. package/dist/components/dotDc-QmqaE.js +0 -1
  132. package/dist/components/downloadDh6wiado.js +0 -1
  133. package/dist/components/fullscreenOKvUhCk1.js +0 -1
  134. package/dist/components/indexB0v3MpmE.js +0 -2937
  135. package/dist/components/indexBkFttmTs.js +0 -4
  136. package/dist/components/microscopeDd_Bl9hM.js +0 -1
  137. package/dist/components/moveQ5bEeY1C.js +0 -1
  138. package/dist/components/processD1w3RPEQ.js +0 -1
  139. package/dist/components/rotateDEPrY9R8.js +0 -1
  140. package/dist/components/settingDCqhAo43.js +0 -1
  141. /package/types/components/icon/{arrow.vue.d.ts → arrowCircle.vue.d.ts} +0 -0
@@ -1,2937 +0,0 @@
1
- var Ot = Object.defineProperty, Zt = Object.defineProperties;
2
- var Gt = Object.getOwnPropertyDescriptors;
3
- var gt = Object.getOwnPropertySymbols;
4
- var Wt = Object.prototype.hasOwnProperty, qt = Object.prototype.propertyIsEnumerable;
5
- var wt = (d, e, n) => e in d ? Ot(d, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : d[e] = n, K = (d, e) => {
6
- for (var n in e || (e = {}))
7
- Wt.call(e, n) && wt(d, n, e[n]);
8
- if (gt)
9
- for (var n of gt(e))
10
- qt.call(e, n) && wt(d, n, e[n]);
11
- return d;
12
- }, fe = (d, e) => Zt(d, Gt(e));
13
- var be = (d, e, n) => new Promise((t, _) => {
14
- var f = (m) => {
15
- try {
16
- r(n.next(m));
17
- } catch (g) {
18
- _(g);
19
- }
20
- }, u = (m) => {
21
- try {
22
- r(n.throw(m));
23
- } catch (g) {
24
- _(g);
25
- }
26
- }, r = (m) => m.done ? t(m.value) : Promise.resolve(m.value).then(f, u);
27
- r((n = n.apply(d, e)).next());
28
- });
29
- import { inject as Y, ref as T, markRaw as B, defineAsyncComponent as I, defineComponent as J, createBlock as S, openBlock as y, unref as o, normalizeProps as Yt, guardReactiveProps as Xt, withCtx as $, resolveDynamicComponent as xe, useModel as Ie, computed as N, createElementBlock as V, createElementVNode as b, createVNode as C, toDisplayString as E, Fragment as ae, renderList as ne, createTextVNode as j, isRef as Ce, watch as te, h as Qt, provide as ie, renderSlot as ue, mergeProps as Ke, createCommentVNode as R, reactive as lt, onMounted as me, onBeforeUnmount as $e, normalizeStyle as W, mergeDefaults as Jt, withDirectives as Ue, vShow as Qe, getCurrentInstance as el, mergeModels as Se, normalizeClass as Re, Teleport as Fe, withModifiers as Be } from "vue";
30
- import { ElIcon as we, ElRow as tl, ElCol as ll, ElSwitch as ze, ElRadioGroup as yt, ElRadio as Ne, ElDialog as je, ElForm as et, ElFormItem as oe, ElInput as Je, ElButton as ge, ElMessage as _t, ElLoading as kt, ElSlider as ol, ElTag as zt, ElCheckbox as Oe, ElTooltip as bt, ElPopover as al, ElCheckboxGroup as nl, ElPagination as sl } from "element-plus";
31
- import { KfbView as re, OpenSeadragon as ke } from "kfb-view";
32
- import il from "v-lazy-image";
33
- function ce() {
34
- const d = Y("i18n"), e = (n) => n;
35
- return {
36
- locale: d == null ? void 0 : d.locale,
37
- t: (d == null ? void 0 : d.t) || e
38
- };
39
- }
40
- const rl = {
41
- install(d, e) {
42
- d.provide("i18n", e == null ? void 0 : e.global);
43
- }
44
- }, he = T({
45
- annotate: B(I(() => import("./annotateFlT59Ud8.js"))),
46
- arrow: B(I(() => import("./arrowDRio3eqx.js"))),
47
- check: B(I(() => import("./checkCqCYDYr4.js"))),
48
- dot: B(I(() => import("./dotBJ-lSESE.js"))),
49
- flip: B(I(() => import("./flipD7XBmACU.js"))),
50
- info: B(I(() => import("./infoBjk0dOPE.js"))),
51
- microscope: B(I(() => import("./microscopeD-FrVKRB.js"))),
52
- move: B(I(() => import("./movebJvf1oPR.js"))),
53
- next: B(I(() => import("./nextDdiDIgB2.js"))),
54
- prev: B(I(() => import("./prevC43MjkJW.js"))),
55
- process: B(I(() => import("./processCDMD34sa.js"))),
56
- rotate: B(I(() => import("./rotateB2TKrdOd.js"))),
57
- fullscreen: B(I(() => import("./fullscreenCxtySrDu.js"))),
58
- setting: B(I(() => import("./settingB6ugQHJp.js"))),
59
- tailor: B(I(() => import("./tailorDzvy19FE.js"))),
60
- download: B(I(() => import("./downloadB5STpOaR.js"))),
61
- config: B(I(() => import("./configGeQGhW9C.js"))),
62
- arrowDown: B(I(() => import("./arrowDownDRpTqVDK.js"))),
63
- arrowUp: B(I(() => import("./arrowUpCgzq2L8A.js"))),
64
- arrowLeft: B(I(() => import("./arrowLeftDjcuA_pb.js"))),
65
- arrowRight: B(I(() => import("./arrowRightDSkHKM4y.js"))),
66
- zoomIn: B(I(() => import("./zoomInC3EAqFg-.js"))),
67
- zoomOut: B(I(() => import("./zoomOutGi1JWbc1.js"))),
68
- level: B(I(() => import("./levelCG93ncZs.js"))),
69
- channel: B(I(() => import("./channelCTQgwZV_.js"))),
70
- delete: B(I(() => import("./deleteBNIxfTCo.js")))
71
- }), Q = /* @__PURE__ */ J({
72
- __name: "KfbIcon",
73
- props: {
74
- name: {
75
- type: [String, Number],
76
- required: !0
77
- }
78
- },
79
- setup(d) {
80
- return (e, n) => (y(), S(o(we), Yt(Xt(e.$attrs)), {
81
- default: $(() => [
82
- (y(), S(xe(o(he)[d.name])))
83
- ]),
84
- _: 1
85
- }, 16));
86
- }
87
- }), ul = { class: "hzzt-kfb-tool-config" }, cl = { class: "hzzt-kfb-tool-config__title margin-b-2" }, dl = { class: "hzzt-kfb-tool-config__block flex align-items-center" }, vl = { class: "hzzt-kfb-tool-config__icon flex align-items-center justify-content-center" }, fl = { class: "margin-l-4 flex-1" }, ml = { class: "hzzt-kfb-tool-config__title" }, pl = { class: "flex align-items-center" }, hl = {
88
- class: "margin-t-2 margin-b-2",
89
- style: { width: "160px" }
90
- }, gl = { class: "flex align-items-center" }, wl = {
91
- class: "margin-t-2 margin-b-2",
92
- style: { width: "160px" }
93
- }, yl = /* @__PURE__ */ J({
94
- name: "KfbToolConfig",
95
- __name: "KfbToolConfig",
96
- props: {
97
- menus: {
98
- default: () => []
99
- },
100
- menusModifiers: {},
101
- showText: { type: Boolean },
102
- showTextModifiers: {}
103
- },
104
- emits: ["update:menus", "update:showText"],
105
- setup(d) {
106
- const e = Ie(d, "menus"), n = Ie(d, "showText"), { t } = ce(), _ = N(() => e.value.filter((g) => g.name !== "line" && g.name !== "config" && g.name !== "zoom")), f = {
107
- fullscreen: t("全屏"),
108
- next: t("上一张"),
109
- prev: t("上一张"),
110
- flip: t("镜像翻转"),
111
- setting: t("工具"),
112
- rotate: t("旋转"),
113
- dot: t("打点"),
114
- annotate: t("标注"),
115
- tailor: t("截图"),
116
- process: t("图像处理"),
117
- microscope: t("镜下"),
118
- move: t("快速移动"),
119
- info: t("信息"),
120
- download: t("下载")
121
- }, u = Y("show-keyboard", T(!1));
122
- function r(g) {
123
- return g in f;
124
- }
125
- function m(g) {
126
- var h;
127
- return ((h = g.props) == null ? void 0 : h.text) || (r(g.name) ? f[g.name] : "");
128
- }
129
- return (g, h) => (y(), V("div", ul, [
130
- b("h3", cl, E(o(t)("显示管理")), 1),
131
- C(o(tl), { gutter: 10 }, {
132
- default: $(() => [
133
- (y(!0), V(ae, null, ne(_.value, (l) => (y(), S(o(ll), {
134
- key: l.name,
135
- span: 8
136
- }, {
137
- default: $(() => {
138
- var a, c;
139
- return [
140
- b("div", dl, [
141
- b("div", vl, [
142
- (a = l.props) != null && a.component ? (y(), S(xe((c = l.props) == null ? void 0 : c.component), {
143
- key: 1,
144
- size: 24
145
- })) : (y(), S(Q, {
146
- key: 0,
147
- size: 24,
148
- name: l.name
149
- }, null, 8, ["name"]))
150
- ]),
151
- b("p", fl, E(m(l)), 1),
152
- C(o(ze), {
153
- modelValue: l.show,
154
- "onUpdate:modelValue": (s) => l.show = s,
155
- "active-text": "",
156
- "inactive-text": ""
157
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
158
- ])
159
- ];
160
- }),
161
- _: 2
162
- }, 1024))), 128))
163
- ]),
164
- _: 1
165
- }),
166
- b("div", null, [
167
- b("h3", ml, E(o(t)("其他设置")), 1),
168
- b("div", pl, [
169
- b("p", hl, E(o(t)("工具列表显示切换")), 1),
170
- C(o(yt), {
171
- modelValue: n.value,
172
- "onUpdate:modelValue": h[0] || (h[0] = (l) => n.value = l)
173
- }, {
174
- default: $(() => [
175
- C(o(Ne), { value: !0 }, {
176
- default: $(() => [
177
- j(E(o(t)("显示工具名称")), 1)
178
- ]),
179
- _: 1
180
- }),
181
- C(o(Ne), { value: !1 }, {
182
- default: $(() => [
183
- j(E(o(t)("隐藏工具名称")), 1)
184
- ]),
185
- _: 1
186
- })
187
- ]),
188
- _: 1
189
- }, 8, ["modelValue"])
190
- ]),
191
- b("div", gl, [
192
- b("p", wl, E(o(t)("小键盘显示切换")), 1),
193
- C(o(yt), {
194
- modelValue: o(u),
195
- "onUpdate:modelValue": h[1] || (h[1] = (l) => Ce(u) ? u.value = l : null)
196
- }, {
197
- default: $(() => [
198
- C(o(Ne), { value: !0 }, {
199
- default: $(() => [
200
- j(E(o(t)("显示小键盘")), 1)
201
- ]),
202
- _: 1
203
- }),
204
- C(o(Ne), { value: !1 }, {
205
- default: $(() => [
206
- j(E(o(t)("隐藏小键盘")), 1)
207
- ]),
208
- _: 1
209
- })
210
- ]),
211
- _: 1
212
- }, 8, ["modelValue"])
213
- ])
214
- ])
215
- ]));
216
- }
217
- }), _l = { class: "hzzt-kfb-toolbox" }, bl = { class: "hzzt-kfb-toolbox__component" }, Pe = /* @__PURE__ */ J({
218
- name: "KfbToolbox",
219
- __name: "KfbToolbox",
220
- props: {
221
- menu: {},
222
- process: {},
223
- microscope: {},
224
- showMenuText: { type: Boolean }
225
- },
226
- emits: ["tool"],
227
- setup(d, { emit: e }) {
228
- const n = d, t = e, { t: _ } = ce(), f = {
229
- prev: _("上一张"),
230
- next: _("下一张"),
231
- config: _("配置"),
232
- info: _("信息"),
233
- flip: _("镜像"),
234
- tailor: _("截图")
235
- }, u = Y("kfbViewRef"), r = T(!1), m = T(n.showMenuText), g = T(a(n.menu)), h = {
236
- fullscreen: I(() => import("./fullscreenBGej63GA.js")),
237
- line: I(() => import("./lineBIoJpzbf.js")),
238
- setting: I(() => import("./settingCqgEfv1i.js")),
239
- rotate: I(() => import("./rotateD_vW_yY0.js")),
240
- dot: I(() => import("./dotBucEP5Z8.js")),
241
- annotate: I(() => import("./annotatemJxZMVPO.js")),
242
- process: I(() => import("./processDR1VlciH.js")),
243
- microscope: I(() => import("./microscopey8VfYeuX.js")),
244
- move: I(() => import("./moveCCkgUb-0.js")),
245
- custom: I(() => import("./customBr26z068.js")),
246
- zoom: I(() => import("./zoomB5HF8Hai.js")),
247
- download: I(() => import("./downloadDnWeuVMn.js"))
248
- }, l = N(() => g.value.filter((s) => s.show !== !1).map((s) => ({
249
- component: h[s.name],
250
- props: s.props,
251
- slots: s.slots
252
- })));
253
- te(() => n.menu, (s) => {
254
- g.value = a(s);
255
- });
256
- function a(s) {
257
- return s.map((i) => {
258
- const p = typeof i == "string" ? i : i.name;
259
- return f[p] ? {
260
- name: "custom",
261
- show: typeof i == "string" ? !0 : i.show !== !1,
262
- props: fe(K({
263
- text: f[p]
264
- }, typeof i == "string" ? {} : i.props), {
265
- name: p,
266
- component: Qt(Q, {
267
- name: p
268
- })
269
- })
270
- } : p === "process" ? {
271
- name: p,
272
- props: typeof i == "string" ? {
273
- process: n.process
274
- } : K({
275
- process: n.process
276
- }, i.props),
277
- slots: typeof i == "string" ? void 0 : i.slots,
278
- show: typeof i == "string" ? !0 : i.show !== !1
279
- } : p === "microscope" ? {
280
- name: p,
281
- props: typeof i == "string" ? {
282
- process: n.process
283
- } : K({
284
- microscope: n.microscope
285
- }, i.props),
286
- slots: typeof i == "string" ? void 0 : i.slots,
287
- show: typeof i == "string" ? !0 : i.show !== !1
288
- } : {
289
- name: p,
290
- props: typeof i == "string" ? {} : i.props,
291
- slots: typeof i == "string" ? void 0 : i.slots,
292
- show: typeof i == "string" ? !0 : i.show !== !1
293
- };
294
- });
295
- }
296
- function c(s, i) {
297
- const p = {
298
- annotate: () => u.value.startDraw(i),
299
- tailor: () => u.value.shotScreen(i),
300
- process: () => u.value.forceRedraw(i),
301
- microscope: () => u.value.scopeChange(i),
302
- move: () => u.value.fastMove(i),
303
- endDraw: () => u.value.endDraw(),
304
- info: () => u.value.info(),
305
- zoom: () => u.value.zoomTo(i),
306
- flip: () => u.value.toggleFlip(i),
307
- config: () => r.value = !0,
308
- grid: () => u.value.updateGrid(i),
309
- ruler: () => u.value.updateGrid(i),
310
- graduation: () => u.value.updateGraduation(i),
311
- navigator: () => u.value.updateNavigator(i),
312
- tool: () => {
313
- u.value.updateGrid({
314
- show: i
315
- }), u.value.updateGraduation({
316
- show: i
317
- }), u.value.updateGrid({
318
- ruler: i
319
- }), u.value.updateNavigator(i);
320
- }
321
- };
322
- p[s] ? p[s]() : t("tool", s, i);
323
- }
324
- return ie("show-text", m), (s, i) => (y(), V("div", _l, [
325
- ue(s.$slots, "left"),
326
- b("div", bl, [
327
- (y(!0), V(ae, null, ne(l.value, (p, w) => (y(), S(xe(p.component), Ke({ ref_for: !0 }, p.props, {
328
- key: w,
329
- onTool: c
330
- }), {
331
- default: $(() => [
332
- p.slots ? (y(!0), V(ae, { key: 0 }, ne(p.slots, (k) => (y(), S(xe(k)))), 256)) : R("", !0)
333
- ]),
334
- _: 2
335
- }, 1040))), 128))
336
- ]),
337
- ue(s.$slots, "right"),
338
- C(o(je), {
339
- modelValue: r.value,
340
- "onUpdate:modelValue": i[2] || (i[2] = (p) => r.value = p),
341
- width: "800px",
342
- title: o(_)("阅片工具设置中心")
343
- }, {
344
- default: $(() => [
345
- C(yl, {
346
- menus: g.value,
347
- "onUpdate:menus": i[0] || (i[0] = (p) => g.value = p),
348
- showText: m.value,
349
- "onUpdate:showText": i[1] || (i[1] = (p) => m.value = p)
350
- }, null, 8, ["menus", "showText"])
351
- ]),
352
- _: 1
353
- }, 8, ["modelValue", "title"])
354
- ]));
355
- }
356
- }), Ze = "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", tt = {
357
- shape: "50%",
358
- width: 0.3,
359
- color: "#FA0404",
360
- borderWidth: 5
361
- }, xt = {
362
- r: 0,
363
- g: 0,
364
- b: 0,
365
- c: 0,
366
- s: 0,
367
- l: 0,
368
- ga: 1
369
- };
370
- function kl(d) {
371
- const e = lt(K(K({}, xt), d.process));
372
- te(() => d.process, (f) => {
373
- _(f);
374
- });
375
- const n = N(() => {
376
- const f = [
377
- 1 + e.r + e.l + 0.5 * e.c,
378
- 0,
379
- 0,
380
- 0,
381
- -0.25 * e.c
382
- ], u = [
383
- 0,
384
- 1 + e.g + e.l + 0.5 * e.c,
385
- 0,
386
- 0,
387
- -0.25 * e.c
388
- ], r = [
389
- 0,
390
- 0,
391
- 1 + e.b + e.l + 0.5 * e.c,
392
- 0,
393
- -0.25 * e.c
394
- ], m = [0, 0, 0, 1, 0];
395
- return `${f.join(" ")}
396
- ${u.join(" ")}
397
- ${r.join(" ")}
398
- ${m.join(" ")}`;
399
- }), t = N(() => String(1 + e.s));
400
- function _(f) {
401
- f && Object.assign(e, f);
402
- }
403
- return {
404
- imageProcess: e,
405
- matrixValues: n,
406
- saturateValues: t,
407
- forceRedraw: _
408
- };
409
- }
410
- function zl(d, e) {
411
- function n() {
412
- e.value.$on(re.events.EVENT_TAILORING_SCREENSHOT, t);
413
- }
414
- function t({ base64: u, region: r }) {
415
- if (window.ClipboardItem && (navigator != null && navigator.clipboard)) {
416
- const m = _(u, "image/png");
417
- navigator.clipboard.write([
418
- new window.ClipboardItem({
419
- [m.type]: m
420
- })
421
- ]);
422
- }
423
- d("tool", "screen-shot", { base64: u, region: r });
424
- }
425
- function _(u, r) {
426
- var a, c;
427
- const m = u.split(",");
428
- (c = (a = m[0]) == null ? void 0 : a.match(/:(.*?);/)) == null || c[1];
429
- const g = atob(m == null ? void 0 : m[1]);
430
- let h = g.length;
431
- const l = new Uint8Array(h);
432
- for (; h--; )
433
- l[h] = g.charCodeAt(h);
434
- return new Blob([l], { type: r });
435
- }
436
- function f(u) {
437
- const { width: r, height: m } = e.value.$options;
438
- u ? r > m ? e.value.tailoring.init(
439
- {
440
- left: (r - m) / 2,
441
- top: 0,
442
- height: m,
443
- width: m,
444
- now: !0
445
- }
446
- ) : e.value.tailoring.init(
447
- {
448
- left: 0,
449
- top: (m - r) / 2,
450
- height: r,
451
- width: r,
452
- now: !0
453
- }
454
- ) : e.value.tailoring.init(
455
- {
456
- left: r / 2 - 100,
457
- top: m / 2 - 100,
458
- height: 200,
459
- width: 200,
460
- color: "#ff0000"
461
- }
462
- );
463
- }
464
- return {
465
- tailorEvent: n,
466
- shotScreen: f
467
- };
468
- }
469
- const xl = "data:image/svg+xml,%3csvg%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cdefs%3e%3cstyle%20type='text/css'%3e@font-face%20{%20font-family:%20feedback-iconfont;%20src:%20url('//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff2?t=1630033759944')%20format('woff2'),%20url('//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff?t=1630033759944')%20format('woff'),%20url('//at.alicdn.com/t/font_1031158_u69w8yhxdu.ttf?t=1630033759944')%20format('truetype');%20}%20%3c/style%3e%3c/defs%3e%3cpath%20fill='currentColor'%20d='M848%20432a80.064%2080.064%200%200%200-73.216%2048H217.216A80.096%2080.096%200%200%200%20144%20432%2080.096%2080.096%200%200%200%2064%20512c0%2044.128%2035.904%2080%2080%2080A80%2080%200%200%200%20217.216%20544h557.536a80%2080%200%200%200%2073.216%2048c44.128%200%2080-35.872%2080-80a80.032%2080.032%200%200%200-79.968-80z'%20%3e%3c/path%3e%3c/svg%3e", Cl = "data:image/svg+xml,%3csvg%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cdefs%3e%3cstyle%20type='text/css'%3e@font-face%20{%20font-family:%20feedback-iconfont;%20src:%20url('//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff2?t=1630033759944')%20format('woff2'),%20url('//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff?t=1630033759944')%20format('woff'),%20url('//at.alicdn.com/t/font_1031158_u69w8yhxdu.ttf?t=1630033759944')%20format('truetype');%20}%20%3c/style%3e%3c/defs%3e%3cpath%20fill='currentColor'%20d='M462%20881V81c0-27.6%2022.4-50%2050-50s50%2022.4%2050%2050v800c0%2027.6-22.4%2050-50%2050s-50-22.4-50-50z'%3e%3c/path%3e%3cpath%20fill='currentColor'%20d='M483.3%20907.6l212.1-212.1c19.5-19.5%2051.2-19.5%2070.7%200s19.5%2051.2%200%2070.7L554%20978.4c-19.5%2019.5-51.2%2019.5-70.7%200-19.6-19.6-19.6-51.2%200-70.8z'%20%3e%3c/path%3e%3cpath%20fill='currentColor'%20d='M328.6%20695.5l212.1%20212.1c19.5%2019.5%2019.5%2051.2%200%2070.7s-51.2%2019.5-70.7%200L257.9%20766.2c-19.5-19.5-19.5-51.2%200-70.7s51.2-19.5%2070.7%200z'%20%3e%3c/path%3e%3c/svg%3e", Tl = "data:image/svg+xml,%3csvg%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cdefs%3e%3cstyle%20type='text/css'%3e@font-face%20{%20font-family:%20feedback-iconfont;%20src:%20url('//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff2?t=1630033759944')%20format('woff2'),%20url('//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff?t=1630033759944')%20format('woff'),%20url('//at.alicdn.com/t/font_1031158_u69w8yhxdu.ttf?t=1630033759944')%20format('truetype');%20}%20%3c/style%3e%3c/defs%3e%3cpath%20fill='currentColor'%20d='M474.3%20480.7L113.9%20836.6c-20.2%2019-21.2%2050.7-2.3%2071%200.7%200.8%201.5%201.5%202.3%202.3%209.5%2010.4%2023%2016.1%2037.1%2015.7%2014.1%200.4%2027.6-5.3%2037.1-15.7l323.3-319.1%20323.3%20319.1c9.5%2010.4%2023.1%2016.1%2037.1%2015.7%2014.1%200.4%2027.6-5.3%2037.1-15.7%2020.2-19%2021.2-50.7%202.3-71-0.7-0.8-1.5-1.5-2.3-2.3L548.5%20480.7c-19.9-20.5-52.6-21-73.1-1.1-0.4%200.3-0.8%200.7-1.1%201.1z%20m0-366.3L113.9%20470.2c-20.2%2019-21.2%2050.7-2.3%2071%200.7%200.8%201.5%201.5%202.3%202.3%209.5%2010.4%2023%2016.1%2037.1%2015.7%2014.1%200.4%2027.6-5.3%2037.1-15.6l323.3-319.2%20323.3%20319.2c9.5%2010.4%2023.1%2016.1%2037.1%2015.6%2014%200.4%2027.6-5.3%2037.1-15.6%2020.2-19%2021.2-50.7%202.3-71-0.7-0.8-1.5-1.5-2.3-2.3L548.5%20114.4c-19.9-20.5-52.6-21-73.1-1.1l-1.1%201.1z'%3e%3c/path%3e%3c/svg%3e", $l = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='333.426'%20height='331.939'%20viewBox='0%200%20333.426%20331.939'%3e%3cg%20id='_10矩形'%20transform='translate(-63.7%20-66.2)'%3e%3cpath%20fill='currentColor'%20id='路径_2'%20d='M205.976,168.3H378.8v13.786H205.976Zm0,242.015H378.8V424.1H205.976ZM165.812,381.07V208.245H179.6V381.07Zm243.5,0V208.244H423.1V381.07Z'%20transform='translate(-64.168%20-64.161)'/%3e%3cpath%20fill='currentColor'%20id='路径_3'%20d='M108.662,66.2a44.962,44.962,0,1,0,44.962,44.962A44.975,44.975,0,0,0,108.662,66.2Zm-.037,75.618a30.73,30.73,0,1,1,30.73-30.73A30.718,30.718,0,0,1,108.625,141.818Zm.037,166.4a44.962,44.962,0,1,0,44.962,44.962,44.975,44.975,0,0,0-44.962-44.962Zm-.037,75.655a30.73,30.73,0,1,1,30.73-30.73A30.718,30.718,0,0,1,108.625,383.87Zm243.539-75.655a44.962,44.962,0,1,0,44.962,44.962A44.975,44.975,0,0,0,352.164,308.215Zm-.037,75.655a30.73,30.73,0,1,1,30.73-30.73A30.718,30.718,0,0,1,352.126,383.87Zm.037-317.67a44.962,44.962,0,1,0,44.962,44.962A44.975,44.975,0,0,0,352.164,66.2Zm-.037,75.618a30.73,30.73,0,1,1,30.73-30.73A30.718,30.718,0,0,1,352.126,141.818Z'/%3e%3c/g%3e%3c/svg%3e", Ll = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='333'%20height='332'%20viewBox='0%200%20333%20332'%3e%3cg%20id='椭圆_1'%20fill='none'%20stroke='currentColor'%20stroke-width='30'%3e%3cellipse%20cx='166.5'%20cy='166'%20rx='156.5'%20ry='156'%20stroke='none'/%3e%3cellipse%20cx='166.5'%20cy='166'%20rx='149'%20ry='148.5'%20fill='none'/%3e%3c/g%3e%3c/svg%3e", Vl = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='322.663'%20height='322.663'%20viewBox='0%200%20322.663%20144.368'%3e%3cg%20id='组_1'%20transform='translate(-17.337%20-208.632)'%3e%3cpath%20id='路径_1'%20d='M21,254.606s69.664-74.994,139.621-8.395'%20fill='none'%20stroke='currentColor'%20stroke-width='20'/%3e%3cg%20id='椭圆_2'%20transform='translate(153%20233)'%20fill='%23fff'%20stroke='currentColor'%20stroke-width='20'%3e%3ccircle%20cx='22.5'%20cy='22.5'%20r='25.5'%20stroke='none'/%3e%3ccircle%20cx='22.5'%20cy='22.5'%20r='22.5'%20fill='none'/%3e%3c/g%3e%3cpath%20id='路径_2'%20d='M187.5,274.23s15.48,96.483,113.05,65.285'%20transform='translate(-4.814%20-5.239)'%20fill='none'%20stroke='currentColor'%20stroke-width='20'/%3e%3cg%20id='椭圆_3'%20transform='translate(295%20308)'%20fill='%23fff'%20stroke='currentColor'%20stroke-width='20'%3e%3ccircle%20cx='12.5'%20cy='12.5'%20r='22.5'%20stroke='none'/%3e%3ccircle%20cx='12.5'%20cy='12.5'%20r='22.5'%20fill='none'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e", El = "data:image/svg+xml,%3csvg%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cdefs%3e%3cstyle%20type='text/css'%3e@font-face%20{%20font-family:%20feedback-iconfont;%20src:%20url('//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff2?t=1630033759944')%20format('woff2'),%20url('//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff?t=1630033759944')%20format('woff'),%20url('//at.alicdn.com/t/font_1031158_u69w8yhxdu.ttf?t=1630033759944')%20format('truetype');%20}%20%3c/style%3e%3c/defs%3e%3cpath%20fill='currentColor'%20d='M575.852903%20115.426402L661.092435%20288.054362c10.130509%2020.465674%2029.675227%2034.689317%2052.289797%2037.963825l190.433097%2027.62866c56.996902%208.288598%2079.7138%2078.281203%2038.475467%20118.496253l-137.836314%20134.35715c-16.372539%2015.963226-23.84251%2038.987109-19.954032%2061.49935l32.540421%20189.716799c9.721195%2056.792245-49.833916%20100.077146-100.793444%2073.267113L545.870691%20841.446188a69.491196%2069.491196%200%200%200-64.67153%200l-170.376737%2089.537324c-50.959528%2026.810033-110.51464-16.474868-100.793444-73.267113L242.569401%20667.9996c3.888478-22.512241-3.581493-45.536125-19.954032-61.49935L84.779055%20472.245428c-41.238333-40.215049-18.521435-110.207655%2038.475467-118.496252l190.433097-27.62866c22.61457-3.274508%2042.159288-17.498151%2052.289797-37.963826L451.319277%20115.426402c25.479764-51.675827%2099.053862-51.675827%20124.533626%200z'%20%3e%3c/path%3e%3c/svg%3e", Ml = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='320.756'%20height='350.074'%20viewBox='0%200%20320.756%20350.074'%3e%3cpath%20fill='currentColor'%20id='排除_1'%20d='M21.624,350.074a22.1,22.1,0,0,1-7.779-1.492A24.658,24.658,0,0,1,6.9,344.519,20.489,20.489,0,0,1,1.912,338.5,15.465,15.465,0,0,1,0,331.144V18.933a15.279,15.279,0,0,1,1.952-7.376A20.6,20.6,0,0,1,7.032,5.54,25.191,25.191,0,0,1,14.07,1.486,22.529,22.529,0,0,1,21.9,0a22.226,22.226,0,0,1,7.777,1.488,24.613,24.613,0,0,1,6.944,4.054,20.429,20.429,0,0,1,4.989,6.017,15.515,15.515,0,0,1,1.912,7.376v312.2a15.216,15.216,0,0,1-1.956,7.358,20.7,20.7,0,0,1-5.085,6.019,25.282,25.282,0,0,1-7.039,4.064A22.421,22.421,0,0,1,21.624,350.074ZM320.756,205.783H60.764L61.02,17.351l259.736,1.585v.728l-63.48,96.82,63.48,88.425v.873h0Z'%20transform='translate(0)'/%3e%3c/svg%3e", Hl = "data:image/svg+xml,%3csvg%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cdefs%3e%3cstyle%20type='text/css'%3e@font-face%20{%20font-family:%20feedback-iconfont;%20src:%20url('//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff2?t=1630033759944')%20format('woff2'),%20url('//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff?t=1630033759944')%20format('woff'),%20url('//at.alicdn.com/t/font_1031158_u69w8yhxdu.ttf?t=1630033759944')%20format('truetype');%20}%20%3c/style%3e%3c/defs%3e%3cpath%20fill='currentColor'%20d='M512%20690a112%20112%200%201%200%200-350%20112%20112%200%200%200%200%20350z'%3e%3c/path%3e%3c/svg%3e", Il = "data:image/svg+xml,%3csvg%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cdefs%3e%3cstyle%20type='text/css'%3e@font-face%20{%20font-family:%20feedback-iconfont;%20src:%20url('//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff2?t=1630033759944')%20format('woff2'),%20url('//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff?t=1630033759944')%20format('woff'),%20url('//at.alicdn.com/t/font_1031158_u69w8yhxdu.ttf?t=1630033759944')%20format('truetype');%20}%20%3c/style%3e%3c/defs%3e%3cpath%20d='M563.2%20281.6V870.4a51.2%2051.2%200%200%201-102.4%200V281.6H179.2a51.2%2051.2%200%201%201%200-102.4h665.6a51.2%2051.2%200%200%201%200%20102.4H563.2z'%20fill='currentColor'%3e%3c/path%3e%3c/svg%3e", Sl = "data:image/svg+xml,%3csvg%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20width='200'%20height='200'%3e%3cpath%20d='M515.041727%20670.617766c91.584167%200%20166.095647-74.504255%20166.095647-166.095646V229.350568c0-91.584167-74.51148-166.095647-166.095647-166.095647-91.598617%200-166.102872%2074.51148-166.102871%20166.095647V504.52212c0%2091.591392%2074.504255%20166.095647%20166.102871%20166.095646z'%20fill='currentColor'%3e%3c/path%3e%3cpath%20d='M801.643237%20874.001665H558.391759v-45.423608c161.507768-21.313766%20286.60151-159.788217%20286.60151-327.01819a43.350032%2043.350032%200%200%200-86.700064%200c0%20134.124998-109.12648%20243.251478-243.258703%20243.251479-134.124998%200-243.244253-109.12648-243.244253-243.251479a43.350032%2043.350032%200%200%200-86.700063%200c0%20167.229972%20125.100967%20305.711649%20286.601509%20327.01819v45.423608H228.440217a43.350032%2043.350032%200%200%200%200%2086.700064h573.20302a43.350032%2043.350032%200%200%200%200-86.700064z'%20fill='currentColor'%3e%3c/path%3e%3c/svg%3e", Pl = ["onClick"], Rl = ["src"], Al = {
470
- key: 2,
471
- style: { width: "18px" },
472
- class: "margin-r-3"
473
- }, Bl = {
474
- key: 1,
475
- class: "hzzt-kfb-sub-menu"
476
- }, Nl = ["onClick"], Dl = { class: "flex align-items-center" }, Ul = ["src"], Fl = {
477
- key: 2,
478
- style: { width: "18px" },
479
- class: "margin-r-2"
480
- }, Kl = /* @__PURE__ */ J({
481
- __name: "KfbMenu",
482
- props: {
483
- menus: {}
484
- },
485
- emits: ["tool"],
486
- setup(d, { emit: e }) {
487
- const n = T({
488
- top: "0",
489
- left: "0",
490
- display: "none"
491
- }), t = Y("kfbView", T({})), _ = Y("currentLabel"), f = d, u = e, { t: r } = ce(), m = [
492
- {
493
- label: r("直线"),
494
- value: "line",
495
- icon: xl
496
- },
497
- {
498
- label: r("箭头"),
499
- value: "arrow",
500
- icon: Cl
501
- },
502
- {
503
- label: r("双箭头"),
504
- value: "bilateral",
505
- icon: Tl
506
- },
507
- {
508
- label: r("矩形"),
509
- value: "rectangle",
510
- icon: $l
511
- },
512
- {
513
- label: r("圆形"),
514
- value: "ellipse",
515
- icon: Ll
516
- },
517
- {
518
- label: r("曲线"),
519
- value: "polygon",
520
- icon: Vl
521
- },
522
- {
523
- label: r("星星"),
524
- value: "star",
525
- icon: El
526
- },
527
- {
528
- label: r("旗帜"),
529
- value: "flag",
530
- icon: Ml
531
- },
532
- {
533
- label: r("点"),
534
- value: "dot",
535
- icon: Hl
536
- },
537
- {
538
- label: r("文字"),
539
- value: "font",
540
- icon: Il
541
- },
542
- {
543
- label: r("语音"),
544
- value: "voice",
545
- icon: Sl
546
- }
547
- ], g = N(() => {
548
- var s;
549
- return _ != null && _.value ? [{
550
- label: r("删除"),
551
- value: "delete",
552
- icon: he.value.delete
553
- }] : (s = f.menus) != null && s.length ? f.menus.map((i) => i.value === "annotate" ? fe(K({}, i), {
554
- children: m
555
- }) : fe(K({}, i), {
556
- icon: i.icon || he.value[i.value]
557
- })) : [
558
- {
559
- label: r("上一张"),
560
- value: "prev"
561
- },
562
- {
563
- label: r("下一张"),
564
- value: "next"
565
- },
566
- {
567
- label: r("标注"),
568
- value: "annotate",
569
- icon: he.value.annotate,
570
- children: m
571
- },
572
- {
573
- label: r("一键截图"),
574
- value: "tailor_now",
575
- icon: he.value.tailor
576
- },
577
- {
578
- label: r("区域截图"),
579
- value: "tailor"
580
- },
581
- {
582
- label: r("镜像翻转"),
583
- value: "flip",
584
- icon: he.value.flip
585
- },
586
- {
587
- label: r("切片信息"),
588
- value: "info",
589
- icon: he.value.info
590
- }
591
- ];
592
- });
593
- te(() => t.value, (s, i) => {
594
- i != null && i.viewer && (i.viewer.removeHandler("canvas-contextmenu", h), i.viewer.removeHandler("canvas-click", l)), s != null && s.viewer && (s.viewer.addHandler("canvas-contextmenu", h), s.viewer.addHandler("canvas-click", l));
595
- }), me(() => {
596
- var s;
597
- (s = t.value) != null && s.viewer && (t.value.viewer.addHandler("canvas-contextmenu", h), t.value.viewer.addHandler("canvas-click", l)), document.body.addEventListener("click", l);
598
- }), $e(() => {
599
- var s;
600
- (s = t.value) != null && s.viewer && (t.value.viewer.removeHandler("canvas-contextmenu", h), t.value.viewer.removeHandler("canvas-click", l)), document.body.removeEventListener("click", l);
601
- });
602
- function h(s) {
603
- s.preventDefault = !0, n.value.top = `${s.position.y}px`, n.value.left = `${s.position.x}px`, n.value.display === "block" ? n.value.display = "none" : n.value.display = "block";
604
- }
605
- function l() {
606
- n.value.display = "none";
607
- }
608
- function a(s, i) {
609
- s.children || ((i == null ? void 0 : i.value) === "annotate" ? u("tool", "annotate", {
610
- tool: s.value.substring(0, 1).toLocaleUpperCase() + s.value.substring(1),
611
- once: !0
612
- }) : s.value === "tailor_now" ? u("tool", "tailor", !0) : u("tool", s.value), l());
613
- }
614
- function c(s) {
615
- return s == null || typeof s != "object" && typeof s != "function" ? !1 : (
616
- // 函数式组件
617
- typeof s == "function" || // 对象式组件
618
- "render" in s || "setup" in s
619
- );
620
- }
621
- return (s, i) => (y(), V("div", {
622
- class: "hzzt-kfb-menu",
623
- style: W(n.value)
624
- }, [
625
- (y(!0), V(ae, null, ne(g.value, (p, w) => (y(), V("div", {
626
- key: w,
627
- class: "hzzt-kfb-menu-item"
628
- }, [
629
- b("div", {
630
- class: "flex align-items-center",
631
- onClick: (k) => a(p)
632
- }, [
633
- c(p.icon) ? (y(), S(o(we), {
634
- key: 0,
635
- class: "margin-r-3",
636
- size: 18
637
- }, {
638
- default: $(() => [
639
- (y(), S(xe(p.icon)))
640
- ]),
641
- _: 2
642
- }, 1024)) : p.icon ? (y(), V("img", {
643
- key: 1,
644
- style: { width: "18px" },
645
- class: "margin-r-2",
646
- src: p.icon
647
- }, null, 8, Rl)) : (y(), V("div", Al)),
648
- b("span", null, E(p.label), 1)
649
- ], 8, Pl),
650
- p.children ? (y(), S(Q, {
651
- key: 0,
652
- name: "arrowRight",
653
- class: "margin-r-2",
654
- size: 14
655
- })) : R("", !0),
656
- p.children ? (y(), V("div", Bl, [
657
- (y(!0), V(ae, null, ne(p.children, (k, v) => (y(), V("div", {
658
- key: v,
659
- class: "hzzt-kfb-menu-item",
660
- onClick: (L) => a(k, p)
661
- }, [
662
- b("div", Dl, [
663
- c(k.icon) ? (y(), S(o(we), {
664
- key: 0,
665
- class: "margin-r-2",
666
- size: 18
667
- }, {
668
- default: $(() => [
669
- (y(), S(xe(k.icon)))
670
- ]),
671
- _: 2
672
- }, 1024)) : k.icon ? (y(), V("img", {
673
- key: 1,
674
- style: { width: "18px" },
675
- class: "margin-r-2",
676
- src: k.icon
677
- }, null, 8, Ul)) : (y(), V("div", Fl)),
678
- b("span", null, E(k.label), 1)
679
- ])
680
- ], 8, Nl))), 128))
681
- ])) : R("", !0)
682
- ]))), 128))
683
- ], 4));
684
- }
685
- }), ye = (d, e) => {
686
- const n = d.__vccOpts || d;
687
- for (const [t, _] of e)
688
- n[t] = _;
689
- return n;
690
- }, jl = /* @__PURE__ */ ye(Kl, [["__scopeId", "data-v-739aad62"]]), Ol = {
691
- key: 0,
692
- class: "hzzt-kfb-microscope"
693
- }, Zl = /* @__PURE__ */ J({
694
- __name: "KfbMicroscope",
695
- props: /* @__PURE__ */ Jt({
696
- shape: {},
697
- width: {},
698
- color: {},
699
- borderWidth: {}
700
- }, K({}, tt)),
701
- setup(d, { expose: e }) {
702
- const n = d, t = lt(K(K({}, tt), n));
703
- te(() => n, (l) => {
704
- h({ name: "change", value: l });
705
- });
706
- const _ = T("200px"), f = T(!1), u = N(() => ({
707
- borderRadius: t.shape,
708
- borderColor: t.color,
709
- borderWidth: t.borderWidth + "px",
710
- width: _.value,
711
- height: _.value
712
- })), r = Y("kfbView", T({}));
713
- te(() => r.value, (l, a) => {
714
- a != null && a.viewer && a.viewer.removeHandler("zoom", m), l != null && l.viewer && l.viewer.addHandler("zoom", m);
715
- }), me(() => {
716
- var l;
717
- (l = r.value) != null && l.viewer && r.value.viewer.addHandler("zoom", m);
718
- }), $e(() => {
719
- var l;
720
- (l = r.value) != null && l.viewer && r.value.viewer.removeHandler("zoom", m);
721
- });
722
- function m() {
723
- setTimeout(() => {
724
- h({ name: "change", value: t });
725
- }, 100);
726
- }
727
- function g(l) {
728
- let { x: a, y: c } = r.value.viewer.viewport.getCenter(!0);
729
- l === "top" ? c -= 6e-3 : l === "bottom" ? c += 6e-3 : l === "left" ? a -= 6e-3 : l === "right" && (a += 6e-3), r.value.area.moveToLabel({ x: a, y: c });
730
- }
731
- function h({ name: l, value: a }) {
732
- var s, i;
733
- const c = (i = (s = r.value.$options) == null ? void 0 : s.pxConversion) == null ? void 0 : i.imageCapRes;
734
- if (l === "visible") {
735
- if (f.value = a, a) {
736
- const p = r.value.area.imageToViewerElementRectangle(
737
- {
738
- x: 0,
739
- y: 0,
740
- width: t.width * 1e3 / c,
741
- height: t.width * 1e3 / c
742
- }
743
- );
744
- _.value = p.width + "px";
745
- }
746
- } else if (l === "change") {
747
- Object.assign(t, a);
748
- const p = r.value.area.imageToViewerElementRectangle(
749
- {
750
- x: 0,
751
- y: 0,
752
- width: t.width * 1e3 / c,
753
- height: t.width * 1e3 / c
754
- }
755
- );
756
- _.value = p.width + "px";
757
- }
758
- }
759
- return e({
760
- scopeChange: h
761
- }), (l, a) => f.value ? (y(), V("div", Ol, [
762
- b("div", {
763
- class: "hzzt-kfb-microscope__container",
764
- style: W(u.value)
765
- }, null, 4),
766
- b("div", {
767
- class: "hzzt-kfb-microscope__top",
768
- onClick: a[0] || (a[0] = (c) => g("top"))
769
- }, [
770
- C(Q, {
771
- size: "24",
772
- name: "arrowUp"
773
- })
774
- ]),
775
- b("div", {
776
- class: "hzzt-kfb-microscope__bottom",
777
- onClick: a[1] || (a[1] = (c) => g("bottom"))
778
- }, [
779
- C(Q, {
780
- size: "24",
781
- name: "arrowDown"
782
- })
783
- ]),
784
- b("div", {
785
- class: "hzzt-kfb-microscope__left",
786
- onClick: a[2] || (a[2] = (c) => g("left"))
787
- }, [
788
- C(Q, {
789
- size: "24",
790
- name: "arrowLeft"
791
- })
792
- ]),
793
- b("div", {
794
- class: "hzzt-kfb-microscope__right",
795
- onClick: a[3] || (a[3] = (c) => g("right"))
796
- }, [
797
- C(Q, {
798
- size: "24",
799
- name: "arrowRight"
800
- })
801
- ])
802
- ])) : R("", !0);
803
- }
804
- }), Gl = /* @__PURE__ */ ye(Zl, [["__scopeId", "data-v-e8b36101"]]), Wl = { class: "hzzt-kfb-label flex column" }, ql = { class: "hzzt-kfb-label__img flex justify-content-center" }, Yl = ["src"], Xl = { class: "ellipsis flex-1" }, Ql = {
805
- class: "flex margin-b-4",
806
- style: { width: "100%" }
807
- }, Jl = {
808
- class: "flex margin overflow-hidden",
809
- style: { height: "132px" }
810
- }, eo = ["src"], to = ["src"], lo = /* @__PURE__ */ J({
811
- __name: "KfbLabel",
812
- props: {
813
- info: {},
814
- slide: {},
815
- pathologyHandle: { type: Function }
816
- },
817
- emits: ["tool"],
818
- setup(d, { emit: e }) {
819
- const { t: n } = ce(), t = d, _ = e, f = T(!0), u = T(!1), r = N(() => t.slide.pathology_id ? n("修改病理号") : n("绑定病理号"));
820
- function m() {
821
- t.slide.angle || (t.slide.angle = 0), t.slide.angle += 90, t.slide.angle > 360 && (t.slide.angle = t.slide.angle % 360), _("tool", "rotate", t.slide.angle);
822
- }
823
- function g() {
824
- u.value = !0;
825
- }
826
- function h() {
827
- t.pathologyHandle && t.pathologyHandle(t.slide).then(() => {
828
- u.value = !1;
829
- });
830
- }
831
- return (l, a) => (y(), V("div", Wl, [
832
- Ue(b("div", { class: "hzzt-kfb-label__title" }, E(o(n)(`点击标签旋转${l.pathologyHandle ? ",点击病理号重绑" : ""}`)), 513), [
833
- [Qe, f.value]
834
- ]),
835
- Ue(b("div", ql, [
836
- b("img", {
837
- src: l.info.labelImg,
838
- style: W({ transform: `rotate(${l.slide.angle}deg)` }),
839
- onClick: m
840
- }, null, 12, Yl)
841
- ], 512), [
842
- [Qe, f.value]
843
- ]),
844
- l.pathologyHandle ? Ue((y(), V("div", {
845
- key: 0,
846
- class: "hzzt-kfb-label__pathology flex align-items-center justify-content-between",
847
- onClick: g
848
- }, [
849
- b("span", Xl, E(l.slide.pathology_number), 1),
850
- C(Q, {
851
- size: "14",
852
- name: "annotate"
853
- })
854
- ], 512)), [
855
- [Qe, f.value]
856
- ]) : R("", !0),
857
- b("span", {
858
- onClick: a[0] || (a[0] = (c) => f.value = !f.value),
859
- style: W({
860
- transform: `translateY(${f.value ? "-50%" : 0})`
861
- }),
862
- class: "hzzt-kfb-label__expend flex align-items-center justify-content-center"
863
- }, [
864
- f.value ? (y(), S(Q, {
865
- key: 0,
866
- size: "10",
867
- name: "arrowLeft"
868
- })) : (y(), S(Q, {
869
- key: 1,
870
- size: "10",
871
- name: "arrowRight"
872
- }))
873
- ], 4),
874
- C(o(je), {
875
- modelValue: u.value,
876
- "onUpdate:modelValue": a[5] || (a[5] = (c) => u.value = c),
877
- "append-to-body": !0,
878
- title: r.value,
879
- width: "450px"
880
- }, {
881
- footer: $(() => [
882
- C(o(ge), {
883
- onClick: a[4] || (a[4] = (c) => u.value = !1)
884
- }, {
885
- default: $(() => [
886
- j(E(o(n)("取消")), 1)
887
- ]),
888
- _: 1
889
- }),
890
- C(o(ge), {
891
- type: "primary",
892
- onClick: h
893
- }, {
894
- default: $(() => [
895
- j(E(o(n)("确认")), 1)
896
- ]),
897
- _: 1
898
- })
899
- ]),
900
- default: $(() => [
901
- b("div", Ql, [
902
- b("div", Jl, [
903
- b("img", {
904
- src: l.slide.labelImg
905
- }, null, 8, eo),
906
- b("img", {
907
- src: l.slide.previewImg
908
- }, null, 8, to)
909
- ])
910
- ]),
911
- C(o(et), { class: "margin-t-2" }, {
912
- default: $(() => [
913
- C(o(oe), {
914
- label: o(n)("病理号")
915
- }, {
916
- default: $(() => [
917
- C(o(Je), {
918
- modelValue: l.slide.pathology_number,
919
- "onUpdate:modelValue": a[1] || (a[1] = (c) => l.slide.pathology_number = c),
920
- placeholder: o(n)("输入病理号"),
921
- clearable: ""
922
- }, null, 8, ["modelValue", "placeholder"])
923
- ]),
924
- _: 1
925
- }, 8, ["label"]),
926
- C(o(oe), {
927
- label: o(n)("蜡块号")
928
- }, {
929
- default: $(() => [
930
- C(o(Je), {
931
- modelValue: l.slide.paraffin_block_number,
932
- "onUpdate:modelValue": a[2] || (a[2] = (c) => l.slide.paraffin_block_number = c),
933
- placeholder: o(n)("输入蜡块号"),
934
- clearable: ""
935
- }, null, 8, ["modelValue", "placeholder"])
936
- ]),
937
- _: 1
938
- }, 8, ["label"]),
939
- l.slide.slide_id ? R("", !0) : (y(), S(o(oe), {
940
- key: 0,
941
- label: o(n)("试剂")
942
- }, {
943
- default: $(() => [
944
- C(o(Je), {
945
- modelValue: l.slide.reagent,
946
- "onUpdate:modelValue": a[3] || (a[3] = (c) => l.slide.reagent = c),
947
- placeholder: o(n)("输入试剂"),
948
- clearable: ""
949
- }, null, 8, ["modelValue", "placeholder"])
950
- ]),
951
- _: 1
952
- }, 8, ["label"]))
953
- ]),
954
- _: 1
955
- })
956
- ]),
957
- _: 1
958
- }, 8, ["modelValue", "title"])
959
- ]));
960
- }
961
- }), oo = /* @__PURE__ */ ye(lo, [["__scopeId", "data-v-7397de48"]]);
962
- function ao(d, e) {
963
- const n = T(1), t = T(null), _ = T(null);
964
- function f() {
965
- d.value.viewer.addHandler("canvas-drag", (r) => {
966
- t.value || (t.value = r.position);
967
- }), d.value.viewer.addHandler("canvas-drag-end", (r) => {
968
- if (n.value !== 1) {
969
- _.value = r.position;
970
- const m = d.value.viewer.viewport.containerSize.x, g = d.value.viewer.viewport.containerSize.y, h = (_.value.x - t.value.x) / (m * e.value) * (n.value - 1), l = (_.value.y - t.value.y) / (g * e.value) * (n.value - 1), a = d.value.viewer.viewport.getCenter(), c = new ke.Point(a.x - h, a.y - l);
971
- d.value.viewer.viewport.panTo(c), t.value = null;
972
- }
973
- });
974
- }
975
- function u({ name: r, value: m }) {
976
- r === "ratio" && (n.value = m / 1);
977
- }
978
- return {
979
- moveEvent: f,
980
- fastMove: u
981
- };
982
- }
983
- function no(d, e, n, t, _) {
984
- const f = T(void 0), u = T([]);
985
- te(() => d.aiLabelList, h);
986
- function r() {
987
- n.value.$on(re.events.EVENT_END_PAINTING, m("add")), n.value.$on(re.events.EVENT_AREA_MOVE_END, m("move")), n.value.$on(re.events.EVENT_ADD_POLYGON_POINT, m("add-point")), n.value.$on(re.events.EVENT_DELETE_POLYGON_POINT, m("delete-point")), n.value.$on(re.events.EVENT_DELETE_LABEL, m("delete")), n.value.$on(re.events.EVENT_SELECT_LABEL, (c) => {
988
- var i, p, w, k;
989
- f.value = c, (((i = f.value) == null ? void 0 : i.subType) || ((w = (p = f.value) == null ? void 0 : p.__data__) == null ? void 0 : w.subType)) === "voice" && ((k = f.value) != null && k.src) && new Audio(f.value.src).play(), e("tool", "select-label", f.value);
990
- }), n.value.$on(re.events.EVENT_CANCEL_SELECT_LABEL, () => {
991
- f.value = void 0, e("tool", "cancel-select-label", f.value);
992
- }), m("list")();
993
- }
994
- function m(c) {
995
- return (s) => g(c, s);
996
- }
997
- function g(c, s) {
998
- var i;
999
- if (c === "add" && s && ((s == null ? void 0 : s.subType) || ((i = s == null ? void 0 : s.__data__) == null ? void 0 : i.subType)) === "voice")
1000
- t(s);
1001
- else
1002
- return d.labelHandle(c, d.slide, s).then((p) => {
1003
- u.value = p, h();
1004
- }).catch(() => {
1005
- h();
1006
- });
1007
- }
1008
- function h() {
1009
- var c;
1010
- if ((c = n.value) != null && c.initLabelList) {
1011
- const s = [...u.value, ...d.aiLabelList || []];
1012
- s.find(({ id: i }) => {
1013
- var p;
1014
- return i === ((p = f.value) == null ? void 0 : p.id);
1015
- }) || (f.value = void 0), n.value.initLabelList(s);
1016
- }
1017
- }
1018
- function l(c, s) {
1019
- var p;
1020
- f.value && (f.value.select = !1);
1021
- const i = (n.value.labelList || []).findIndex((w) => w.id === c.id);
1022
- if (i > -1) {
1023
- f.value = (p = n.value.labelList) == null ? void 0 : p[i], f.value.select = !0;
1024
- const w = n.value.area.getCenterPoint(c.region);
1025
- n.value.area.moveToLabel(w);
1026
- }
1027
- s && _(s);
1028
- }
1029
- function a(c) {
1030
- return d.labelHandle("add", d.slide, c).then((s) => {
1031
- u.value = s, h();
1032
- }).catch(() => {
1033
- h();
1034
- });
1035
- }
1036
- return {
1037
- currentLabel: f,
1038
- initLabel: r,
1039
- jumpToLabel: l,
1040
- reloadLabelList: h,
1041
- eventHandel: m,
1042
- addHandle: a
1043
- };
1044
- }
1045
- function so() {
1046
- function d(e, n) {
1047
- e.save(), e.strokeStyle = "rgba(0,0,0,0)", e.miterLimit = 4, e.font = "15px", e.fillStyle = n, 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();
1048
- }
1049
- return {
1050
- drawDot: d
1051
- };
1052
- }
1053
- function io(d, e) {
1054
- const { t: n } = ce(), t = T(!1), _ = T();
1055
- let f = null;
1056
- const u = T(!1), r = T(0);
1057
- let m = 0;
1058
- const g = T([]), h = T(void 0);
1059
- let l = !1;
1060
- function a(v, L) {
1061
- v.save(), v.strokeStyle = "rgba(0,0,0,0)", v.miterLimit = 4, v.font = "15px ''", v.fillStyle = L, v.font = " 15px ''", v.scale(0.03125, 0.03125), v.save(), v.font = " 15px ''", v.beginPath(), v.moveTo(515.041727, 670.617766), v.bezierCurveTo(606.625894, 670.617766, 681.137374, 596.113511, 681.137374, 504.52212), v.lineTo(681.137374, 229.350568), v.bezierCurveTo(681.137374, 137.76640100000003, 606.625894, 63.254920999999996, 515.041727, 63.254920999999996), v.bezierCurveTo(423.44311000000005, 63.254920999999996, 348.93885500000005, 137.766401, 348.93885600000004, 229.350568), v.lineTo(348.93885600000004, 504.52212), v.bezierCurveTo(348.93885600000004, 596.113512, 423.44311100000004, 670.617767, 515.041727, 670.617766), v.closePath(), v.fill(), v.stroke(), v.restore(), v.save(), v.font = " 15px ''", v.beginPath(), v.moveTo(801.643237, 874.001665), v.lineTo(558.391759, 874.001665), v.lineTo(558.391759, 828.578057), v.bezierCurveTo(719.899527, 807.264291, 844.993269, 668.7898399999999, 844.993269, 501.55986699999994), v.translate(801.643237, 501.55986699999994), v.rotate(0), v.arc(0, 0, 43.350032, 0, 3.141592653589793, !0), v.rotate(0), v.translate(-801.643237, -501.55986699999994), v.bezierCurveTo(758.2932050000001, 635.684865, 649.166725, 744.811345, 515.0345020000001, 744.811346), v.bezierCurveTo(380.9095040000001, 744.811346, 271.79024900000013, 635.6848659999999, 271.79024900000013, 501.55986699999994), v.translate(228.44021750000013, 501.5664510740879), v.rotate(0), v.arc(0, 0, 43.350032, -15188164315591997e-20, -3.1414407719461273, !0), v.rotate(0), v.translate(-228.44021750000013, -501.5664510740879), v.bezierCurveTo(185.09018600000013, 668.7898389999999, 310.1911530000001, 807.271516, 471.69169500000015, 828.578057), v.lineTo(471.69169500000015, 874.001665), v.lineTo(228.440217, 874.001665), v.translate(228.440217, 917.3516970000001), v.rotate(0), v.arc(0, 0, 43.350032, -1.5707963267948966, 1.5707963267948966, !0), v.rotate(0), v.translate(-228.440217, -917.3516970000001), v.lineTo(801.643237, 960.701729), v.translate(801.643237, 917.3516970000001), v.rotate(0), v.arc(0, 0, 43.350032, 1.5707963267948966, 4.71238898038469, !0), v.rotate(0), v.translate(-801.643237, -917.3516970000001), v.closePath(), v.fill(), v.stroke(), v.restore(), v.restore();
1062
- }
1063
- function c() {
1064
- return be(this, null, function* () {
1065
- try {
1066
- _.value = yield navigator.mediaDevices.getUserMedia({ audio: !0 }), f = new MediaRecorder(_.value), g.value = [], f.addEventListener("dataavailable", (v) => {
1067
- g.value.push(v.data);
1068
- }), f.addEventListener("stop", () => be(this, null, function* () {
1069
- if (h.value) {
1070
- const v = new Blob(g.value, { type: d.audioType || "audio/wav" });
1071
- h.value.src = URL.createObjectURL(v);
1072
- }
1073
- u.value = !1, l && (yield k());
1074
- })), f.start(), u.value = !0, m = window.setInterval(() => {
1075
- r.value++;
1076
- }, 1e3);
1077
- } catch (v) {
1078
- _t.error(n("麦克风启用失败,请确认是否开启麦克风权限"));
1079
- }
1080
- });
1081
- }
1082
- function s() {
1083
- _.value && f ? (f.stop(), _.value.getTracks().forEach((v) => v.stop()), f = null, _.value = void 0) : (f = null, _.value = void 0), u.value = !1, m && (clearInterval(m), m = 0), r.value = 0;
1084
- }
1085
- function i(v) {
1086
- t.value = !0, h.value = v, g.value = [], l = !1;
1087
- }
1088
- function p() {
1089
- u.value && s(), t.value = !1, u.value = !1, l = !1;
1090
- }
1091
- function w() {
1092
- return be(this, null, function* () {
1093
- if (!u.value && !g.value.length) {
1094
- _t.error(n("请先录音"));
1095
- return;
1096
- }
1097
- u.value && s(), u.value = !1, l = !0, g.value.length && (yield k()), t.value = !1;
1098
- });
1099
- }
1100
- function k() {
1101
- return be(this, null, function* () {
1102
- if (d.uploadHandle && h.value) {
1103
- const v = kt.service({
1104
- text: n("录音上传中")
1105
- }), L = new Blob(g.value, { type: d.audioType || "audio/wav" });
1106
- g.value = [];
1107
- try {
1108
- yield d.uploadHandle(d.slide, h.value, L).then((P) => {
1109
- h.value.src = P;
1110
- }), v.close(), e(h.value);
1111
- } catch (P) {
1112
- v.close();
1113
- }
1114
- }
1115
- });
1116
- }
1117
- return {
1118
- voiceVisible: t,
1119
- voiceForm: h,
1120
- recordTime: r,
1121
- isRecording: u,
1122
- drawVoice: a,
1123
- startRecording: c,
1124
- stopRecording: s,
1125
- initVoice: i,
1126
- cancelRecord: p,
1127
- confirmRecord: w
1128
- };
1129
- }
1130
- function ro(d, e) {
1131
- const n = T([]), t = T(0), _ = T(!1);
1132
- let f = null;
1133
- te(() => {
1134
- var a;
1135
- return (a = d.hotmap) == null ? void 0 : a.enable;
1136
- }, () => {
1137
- var a, c;
1138
- if ((c = (a = e.value) == null ? void 0 : a.viewer) != null && c.world) {
1139
- t.value = 0;
1140
- const s = e.value.viewer.world.getItemAt(0);
1141
- s && (s.tilesMatrix = {}, s.draw());
1142
- }
1143
- }), me(() => {
1144
- window.addEventListener("mousemove", m), window.addEventListener("mouseup", h);
1145
- }), $e(() => {
1146
- window.removeEventListener("mousemove", m), window.removeEventListener("mouseup", h);
1147
- });
1148
- function u(a, c, s) {
1149
- var p, w, k, v, L, P;
1150
- const i = fe(K({}, c), {
1151
- file: (p = d.hotmap) == null ? void 0 : p.file
1152
- });
1153
- if ((w = d.hotmap) != null && w.info) {
1154
- if (s[c.x + "_" + c.y + "_" + Number(c.scale)]) {
1155
- if (((k = d.hotmap) == null ? void 0 : k.type) === "switch")
1156
- return d.tileHandle(i);
1157
- if (((v = d.hotmap) == null ? void 0 : v.type) === "drag")
1158
- return r(a, i), a;
1159
- }
1160
- } else return ((L = d.hotmap) == null ? void 0 : L.type) === "switch" ? d.tileHandle(i) : (((P = d.hotmap) == null ? void 0 : P.type) === "drag" && r(a, i), a);
1161
- }
1162
- function r(a, c) {
1163
- const s = n.value.find((i) => i.url === a) || {
1164
- url: a,
1165
- x: c.x,
1166
- y: c.y,
1167
- img: void 0,
1168
- load: ""
1169
- };
1170
- if (!(s != null && s.img) && (n.value.push(s), s.load !== "success")) {
1171
- const i = new Image();
1172
- i.src = d.tileHandle(c), i.onload = () => {
1173
- s.load = "success";
1174
- }, s.img = i;
1175
- }
1176
- }
1177
- function m(a) {
1178
- _.value && f && (t.value += a.x - f.x, t.value < 0 ? t.value = 0 : t.value > e.value.$options.width && (t.value = e.value.$options.width, _.value = !1), e.value.viewer.forceRedraw()), f = { x: a.x, y: a.y };
1179
- }
1180
- function g(a) {
1181
- const { x: c, y: s } = a;
1182
- _.value = !0, f = { x: c, y: s };
1183
- }
1184
- function h() {
1185
- _.value = !1, f = null;
1186
- }
1187
- function l(a) {
1188
- const {
1189
- context: c,
1190
- sourceWidth: s,
1191
- sourceHeight: i,
1192
- position: p,
1193
- size: w,
1194
- initRendered: k,
1195
- tile: v,
1196
- pixelDensityRatio: L
1197
- } = a, P = v.getUrl(), M = t.value * L, X = p.original.x;
1198
- if (X < M && X + w.x > M) {
1199
- const q = M - X, de = w.x - q, ee = n.value.find((Le) => Le.url === P), pe = (ee == null ? void 0 : ee.load) === "success" ? ee.img : k.canvas;
1200
- c.drawImage(
1201
- pe,
1202
- 0,
1203
- 0,
1204
- s * q / w.x,
1205
- i,
1206
- p.x,
1207
- p.y,
1208
- q,
1209
- w.y
1210
- ), c.drawImage(
1211
- k.canvas,
1212
- s * q / w.x,
1213
- 0,
1214
- s * de / w.x,
1215
- i,
1216
- p.x + q,
1217
- p.y,
1218
- de,
1219
- w.y
1220
- );
1221
- } else if (X + w.x <= M) {
1222
- const q = n.value.find((ee) => ee.url === P), de = (q == null ? void 0 : q.load) === "success" ? q.img : k.canvas;
1223
- c.drawImage(
1224
- de,
1225
- 0,
1226
- 0,
1227
- s,
1228
- i,
1229
- p.x,
1230
- p.y,
1231
- w.x,
1232
- w.y
1233
- );
1234
- } else X >= M && c.drawImage(
1235
- k.canvas,
1236
- 0,
1237
- 0,
1238
- s,
1239
- i,
1240
- p.x,
1241
- p.y,
1242
- w.x,
1243
- w.y
1244
- );
1245
- }
1246
- return {
1247
- getHotmapUrl: u,
1248
- hotmapImgs: n,
1249
- handlerImage: l,
1250
- hotmapLine: t,
1251
- lineMouseDown: g
1252
- };
1253
- }
1254
- function uo(d, e, n) {
1255
- const t = el(), _ = T(!1), f = new BroadcastChannel("sync_kfb_view");
1256
- f.onmessage = (l) => {
1257
- const a = l.data;
1258
- g(a);
1259
- }, me(() => {
1260
- var l, a, c;
1261
- (l = n.value) == null || l.addEventListener("mouseenter", u), (a = n.value) == null || a.addEventListener("mousemove", u), (c = n.value) == null || c.addEventListener("mouseleave", r);
1262
- }), $e(() => {
1263
- var l, a, c;
1264
- (l = n.value) == null || l.removeEventListener("mouseenter", u), (a = n.value) == null || a.removeEventListener("mousemove", u), (c = n.value) == null || c.removeEventListener("mouseleave", r), f.close();
1265
- });
1266
- function u() {
1267
- _.value = !0;
1268
- }
1269
- function r() {
1270
- _.value = !1;
1271
- }
1272
- function m() {
1273
- let l;
1274
- e.value.viewer.addHandler("pan", (a) => {
1275
- var i, p, w, k;
1276
- if (!l) {
1277
- l = (p = (i = a.center) == null ? void 0 : i.clone) == null ? void 0 : p.call(i);
1278
- return;
1279
- }
1280
- const c = a.center, s = (w = c == null ? void 0 : c.minus) == null ? void 0 : w.call(c, l);
1281
- l = (k = c == null ? void 0 : c.clone) == null ? void 0 : k.call(c), d.syncPosition && h({
1282
- position: s,
1283
- type: "sync_position"
1284
- });
1285
- }), e.value.viewer.addHandler("zoom", (a) => {
1286
- d.syncZoom && h({
1287
- zoom: a.zoom,
1288
- type: "sync_zoom"
1289
- });
1290
- }), e.value.viewer.addHandler("animation-finish", () => {
1291
- var s;
1292
- if (d.syncZoom && h({
1293
- zoom: e.value.viewer.viewport.getZoom(!0),
1294
- type: "sync_zoom"
1295
- }), !l)
1296
- return;
1297
- const a = e.value.viewer.viewport.getCenter(!0), c = (s = a == null ? void 0 : a.minus) == null ? void 0 : s.call(a, l);
1298
- l = void 0, d.syncPosition && h({
1299
- position: c,
1300
- type: "sync_position"
1301
- });
1302
- });
1303
- }
1304
- function g(l) {
1305
- l.uuid && l.type === "sync_position" && l.uuid !== (t == null ? void 0 : t.uid) ? e.value && e.value.viewer.viewport.panBy(l.position, !0) : l.uuid && l.type === "sync_zoom" && l.uuid !== (t == null ? void 0 : t.uid) && e.value && e.value.viewer.viewport.zoomTo(l.zoom);
1306
- }
1307
- function h(l) {
1308
- var a;
1309
- _.value && f.postMessage(fe(K({}, l), {
1310
- uuid: t == null ? void 0 : t.uid,
1311
- fileName: (a = d.slide) == null ? void 0 : a.file
1312
- }));
1313
- }
1314
- return {
1315
- initSync: m
1316
- };
1317
- }
1318
- const co = { class: "hzzt-kfb-keyword flex wrap" }, vo = ["onMouseenter"], fo = /* @__PURE__ */ J({
1319
- __name: "KfbKeyword",
1320
- setup(d) {
1321
- const e = T([
1322
- { code: "Q", icon: "zoomIn" },
1323
- { code: "W", icon: "arrowUp" },
1324
- { code: "E", icon: "zoomOut" },
1325
- { code: "A", icon: "arrowLeft" },
1326
- { code: "S", icon: "arrowDown" },
1327
- { code: "D", icon: "arrowRight" }
1328
- ]), n = Y("kfbView", T({}));
1329
- let t = null;
1330
- function _(u, r) {
1331
- u.preventDefault(), t && clearTimeout(t), t = setInterval(() => {
1332
- r === "E" && (n.value.viewer.viewport.zoomBy(1.1), n.value.viewer.viewport.applyConstraints()), r === "Q" && (n.value.viewer.viewport.zoomBy(0.9), n.value.viewer.viewport.applyConstraints()), r === "W" && (n.value.viewer.viewport.panBy(n.value.viewer.viewport.deltaPointsFromPixels(new ke.Point(0, -40))), n.value.viewer.viewport.applyConstraints()), r === "S" && (n.value.viewer.viewport.panBy(n.value.viewer.viewport.deltaPointsFromPixels(new ke.Point(0, 40))), n.value.viewer.viewport.applyConstraints()), r === "A" && (n.value.viewer.viewport.panBy(n.value.viewer.viewport.deltaPointsFromPixels(new ke.Point(-40, 0))), n.value.viewer.viewport.applyConstraints()), r === "D" && (n.value.viewer.viewport.panBy(n.value.viewer.viewport.deltaPointsFromPixels(new ke.Point(40, 0))), n.value.viewer.viewport.applyConstraints());
1333
- }, 120);
1334
- }
1335
- function f() {
1336
- t && (clearInterval(t), t = null);
1337
- }
1338
- return $e(() => {
1339
- clearTimeout(t);
1340
- }), (u, r) => (y(), V("div", co, [
1341
- (y(!0), V(ae, null, ne(e.value, (m) => (y(), V("div", {
1342
- key: m.code,
1343
- class: "hzzt-kfb-keyword__code flex column align-items-center justify-content-center",
1344
- onMouseenter: (g) => _(g, m.code),
1345
- onMouseleave: f
1346
- }, [
1347
- b("p", null, E(m.code), 1),
1348
- C(Q, {
1349
- size: "14",
1350
- name: m.icon
1351
- }, null, 8, ["name"])
1352
- ], 40, vo))), 128))
1353
- ]));
1354
- }
1355
- }), mo = /* @__PURE__ */ ye(fo, [["__scopeId", "data-v-c8d940f0"]]);
1356
- function po(d, e, n = {}) {
1357
- const {
1358
- panSensitivity: t = 0.2,
1359
- // 值越大,鼠标移动时图像移动越快
1360
- zoomSensitivity: _ = 1.1,
1361
- // 值越大,滚轮缩放幅度越大
1362
- damping: f = 0.6,
1363
- // 值越大,惯性滑动时间越长
1364
- minThreshold: u = 0.05
1365
- // 值越小,停止移动时的精度越高
1366
- } = n;
1367
- let r = !1, m = null, g = 0, h = 0, l = !1;
1368
- const a = () => {
1369
- r = document.pointerLockElement === e.value, r || c();
1370
- }, c = () => {
1371
- g = 0, h = 0, m && (cancelAnimationFrame(m), m = null), l = !1;
1372
- }, s = (v) => be(this, null, function* () {
1373
- try {
1374
- v.key === "l" && e.value && (document.pointerLockElement ? (document.exitPointerLock(), console.log("鼠标已解锁!")) : (yield e.value.requestPointerLock(), console.log("鼠标已锁定!")));
1375
- } catch (L) {
1376
- console.error("无法锁定鼠标:", L);
1377
- }
1378
- }), i = (v) => {
1379
- if (r) {
1380
- v.preventDefault();
1381
- const L = Math.pow(_, Math.sign(v.deltaY) * -1);
1382
- d.value.viewer.viewport.zoomBy(L), d.value.viewer.viewport.applyConstraints();
1383
- }
1384
- }, p = (v) => {
1385
- r && (g += v.movementX * t, h += v.movementY * t, !l && (Math.abs(g) > 1 || Math.abs(h) > 1) && (l = !0, m = requestAnimationFrame(w)));
1386
- }, w = () => {
1387
- const v = d.value.viewer.viewport;
1388
- if (Math.abs(g) > u || Math.abs(h) > u) {
1389
- const L = v.deltaPointsFromPixels(
1390
- new ke.Point(g, h)
1391
- );
1392
- v.panBy(L), v.applyConstraints();
1393
- }
1394
- g *= f, h *= f, Math.abs(g) > u || Math.abs(h) > u ? m = requestAnimationFrame(w) : c();
1395
- }, k = () => {
1396
- r && document.exitPointerLock();
1397
- };
1398
- return me(() => {
1399
- var v;
1400
- (v = e.value) == null || v.addEventListener("keydown", s), document.addEventListener("wheel", i, { passive: !1 }), document.addEventListener("click", k), document.addEventListener("mousemove", p), document.addEventListener("pointerlockchange", a);
1401
- }), $e(() => {
1402
- var v;
1403
- (v = e.value) == null || v.removeEventListener("keydown", s), document.removeEventListener("click", k), document.removeEventListener("wheel", i), document.removeEventListener("mousemove", p), document.removeEventListener("pointerlockchange", a), c();
1404
- }), {
1405
- setConfig: (v) => {
1406
- Object.assign(n, v);
1407
- }
1408
- };
1409
- }
1410
- const ho = /* @__PURE__ */ J({
1411
- __name: "KfbLevel",
1412
- props: /* @__PURE__ */ Se({
1413
- slides: { default: () => [] }
1414
- }, {
1415
- "model-value": {
1416
- default: 0
1417
- },
1418
- "model-valueModifiers": {}
1419
- }),
1420
- emits: ["update:model-value"],
1421
- setup(d) {
1422
- const e = d, n = Ie(d, "model-value"), t = Y("kfbView", T({})), _ = N(() => Array.from(new Array(e.slides.length + 1)).map((u, r) => r));
1423
- function f() {
1424
- const u = t.value.viewer.world.getItemAt(0), r = Object.keys(u.tilesMatrix);
1425
- r.forEach((m, g) => {
1426
- g > r.length - 4 && (u.tilesMatrix[m] = {});
1427
- }), u.draw();
1428
- }
1429
- return (u, r) => (y(), V("div", {
1430
- class: Re(["hzzt-kfb-level flex column align-items-center", u.slides.length > 5 ? "hzzt-kfb-level--large" : ""])
1431
- }, [
1432
- C(Q, {
1433
- name: "level",
1434
- size: "24",
1435
- class: "margin-b-4 margin-t-2"
1436
- }),
1437
- C(o(ol), {
1438
- modelValue: n.value,
1439
- "onUpdate:modelValue": r[0] || (r[0] = (m) => n.value = m),
1440
- vertical: "",
1441
- min: _.value[0],
1442
- step: 1,
1443
- max: _.value[_.value.length - 1],
1444
- "show-stops": "",
1445
- "show-tooltip": !0,
1446
- placement: "left",
1447
- height: u.slides.length > 5 ? "180px" : "130px",
1448
- onInput: f
1449
- }, null, 8, ["modelValue", "min", "max", "height"])
1450
- ], 2));
1451
- }
1452
- }), go = {
1453
- key: 0,
1454
- class: "flex hzzt-kfb-channel"
1455
- }, wo = ["onClick"], yo = /* @__PURE__ */ J({
1456
- __name: "KfbChannel",
1457
- props: /* @__PURE__ */ Se({
1458
- info: {}
1459
- }, {
1460
- "model-value": {
1461
- default: () => []
1462
- },
1463
- "model-valueModifiers": {}
1464
- }),
1465
- emits: /* @__PURE__ */ Se(["load"], ["update:model-value"]),
1466
- setup(d, { emit: e }) {
1467
- const n = d, t = e, _ = Ie(d, "model-value"), f = [
1468
- { key: "DAPI", color: "#4A6CF7" },
1469
- { key: "480", color: "#00BFFF" },
1470
- { key: "520", color: "#32CD32" },
1471
- { key: "570", color: "#FFAA33" },
1472
- { key: "620", color: "#FF6347" },
1473
- { key: "670", color: "#DC143C" },
1474
- { key: "780", color: "#4B0082" }
1475
- ], u = N(() => {
1476
- var m;
1477
- return (((m = n.info) == null ? void 0 : m.channel) || []).map((g) => {
1478
- const h = f.find((l) => l.key === g.eqt_num);
1479
- return {
1480
- label: g.eqt_num,
1481
- color: g.r ? `rgb(${g.r}, ${g.g}, ${g.b})` : h == null ? void 0 : h.color
1482
- };
1483
- });
1484
- });
1485
- function r(m) {
1486
- _.value.includes(m) ? _.value = _.value.filter((g) => g !== m) : _.value.push(m), t("load");
1487
- }
1488
- return (m, g) => u.value.length > 0 ? (y(), V("div", go, [
1489
- C(Q, {
1490
- name: "channel",
1491
- size: "32"
1492
- }),
1493
- (y(!0), V(ae, null, ne(u.value, (h) => (y(), V("div", {
1494
- key: h.label,
1495
- style: W({ background: h.color }),
1496
- class: Re(["hzzt-kfb-channel__box", _.value.includes(h.label) ? "" : "hzzt-kfb-channel__box--unactive"]),
1497
- onClick: (l) => r(h.label)
1498
- }, E(h.label), 15, wo))), 128))
1499
- ])) : R("", !0);
1500
- }
1501
- }), _o = ["element-loading-text"], bo = {
1502
- key: 1,
1503
- class: "hzzt-kfb-view__main flex align-items-center justify-content-center"
1504
- }, ko = {
1505
- class: "hzzt-kfb-view__filter",
1506
- height: "0",
1507
- width: "0"
1508
- }, zo = { id: "colorMatrixFilter" }, xo = ["values"], Co = ["values"], To = ["exponent"], $o = ["exponent"], Lo = ["exponent"], Vo = { class: "flex nowrap justify-content-center overflow-hidden" }, Eo = ["src"], Mo = ["src"], Ho = { class: "flex-1" }, Io = { class: "flex-1" }, So = { class: "flex-1" }, Po = { class: "flex-1" }, Ro = { class: "flex-1" }, Ao = { class: "flex-1" }, Bo = ["src"], No = {
1509
- key: 2,
1510
- class: "margin-l-2"
1511
- }, Te = /* @__PURE__ */ J({
1512
- name: "HzztKfbView",
1513
- __name: "index",
1514
- props: {
1515
- slide: {},
1516
- fileHandle: {},
1517
- labelHandle: {},
1518
- tileHandle: {},
1519
- navigatorHandle: {},
1520
- pathologyHandle: {},
1521
- uploadHandle: {},
1522
- options: {},
1523
- labelDrawing: {},
1524
- process: { default: () => K({}, xt) },
1525
- microscope: { default: () => K({}, tt) },
1526
- menus: {},
1527
- aiLabelList: {},
1528
- hotmap: {},
1529
- syncPosition: { type: Boolean },
1530
- syncZoom: { type: Boolean },
1531
- audioType: {}
1532
- },
1533
- emits: ["tool"],
1534
- setup(d, { expose: e, emit: n }) {
1535
- const t = d, _ = n, { t: f, locale: u } = ce(), r = T(), m = T(), g = T(), h = T(!1), l = T({}), a = T(!1), c = T(0), s = T(0), i = T(0), p = T([]), w = T({
1536
- width: 0,
1537
- height: 0,
1538
- fileNum: 0,
1539
- scanScale: 1,
1540
- fileName: "",
1541
- ratiomap: {}
1542
- }), k = Y("show-kfb-label", T(!0)), v = Y("show-keyboard", T(!1)), L = Y("hidden-all-label", T(!1)), P = kt.directive;
1543
- te(() => {
1544
- var z;
1545
- return (z = t.slide) == null ? void 0 : z.file;
1546
- }, () => {
1547
- Dt(), setTimeout(() => {
1548
- nt();
1549
- }, 100);
1550
- }), me(() => {
1551
- nt();
1552
- });
1553
- const {
1554
- imageProcess: M,
1555
- matrixValues: X,
1556
- saturateValues: q,
1557
- forceRedraw: de
1558
- } = kl(t), {
1559
- tailorEvent: ee,
1560
- shotScreen: pe
1561
- } = zl(_, l), {
1562
- moveEvent: Le,
1563
- fastMove: We
1564
- } = ao(l, s), { initSync: qe } = uo(t, l, r);
1565
- po(l, r);
1566
- const { drawDot: Ye } = so(), {
1567
- voiceVisible: Ve,
1568
- voiceForm: Ee,
1569
- drawVoice: x,
1570
- recordTime: A,
1571
- isRecording: F,
1572
- startRecording: se,
1573
- stopRecording: Me,
1574
- initVoice: Ct,
1575
- cancelRecord: Tt,
1576
- confirmRecord: $t
1577
- } = io(t, It), {
1578
- currentLabel: ot,
1579
- initLabel: Lt,
1580
- jumpToLabel: Vt,
1581
- reloadLabelList: Et,
1582
- eventHandel: Mt,
1583
- addHandle: Ht
1584
- } = no(t, _, l, Ct, Xe);
1585
- function It(z) {
1586
- Ht(z);
1587
- }
1588
- const {
1589
- getHotmapUrl: St,
1590
- handlerImage: Pt,
1591
- hotmapLine: Rt,
1592
- lineMouseDown: at,
1593
- hotmapImgs: At
1594
- } = ro(t, l);
1595
- function nt() {
1596
- var z;
1597
- (z = t.slide) != null && z.file && t.fileHandle && (a.value || (a.value = !0, t.fileHandle(t.slide).then((H) => {
1598
- var O, le, ve, Z;
1599
- w.value = H, p.value = (((O = w.value) == null ? void 0 : O.channel) || []).map((U) => U.eqt_num), l.value = new re(K({
1600
- el: m.value,
1601
- fileName: (le = t.slide) == null ? void 0 : le.file,
1602
- scale: w.value.scanScale,
1603
- lang: (u == null ? void 0 : u.value) === "en-US" ? "en" : u == null ? void 0 : u.value,
1604
- navigator: {
1605
- style: "left: 0;bottom: 0",
1606
- thumbnail: w.value.thumbnailImg,
1607
- width: 200,
1608
- height: 180
1609
- },
1610
- grid: {
1611
- show: !1,
1612
- ruler: !1,
1613
- pxConversion: !0
1614
- },
1615
- thumb: {
1616
- bgColor: "rgba(0,0,0,0)"
1617
- },
1618
- graduation: {
1619
- show: !0,
1620
- right: 120,
1621
- bottom: (Z = (ve = w.value) == null ? void 0 : ve.channel) != null && Z.length ? 120 : 30,
1622
- tick: {
1623
- number: 3,
1624
- height: 8
1625
- }
1626
- },
1627
- pxConversion: {
1628
- units: ["um", "mm"],
1629
- binary: 1e3,
1630
- imageCapRes: w.value.imageCapRes || w.value.scanResolution || 1
1631
- },
1632
- openSeadragonOptions: {
1633
- maxZoomLevel: w.value.scanScale * 20,
1634
- pixelsPerArrowPress: 200,
1635
- animationTime: 0,
1636
- tileSources: st()
1637
- },
1638
- tileDrawing: Pt,
1639
- label: {
1640
- drawing: (U, D, _e) => {
1641
- var Ae;
1642
- if (D != null && D.custom) {
1643
- const G = U.getContext("2d");
1644
- G.save(), G.beginPath();
1645
- const He = (D == null ? void 0 : D.subType) || ((Ae = D == null ? void 0 : D.__data__) == null ? void 0 : Ae.subType);
1646
- He === "count" ? (G.translate(_e.x - 14, _e.y - 22), Ye(G, (D == null ? void 0 : D.strokeStyle) || "")) : He === "voice" ? (G.translate(_e.x - 16, _e.y - 18), x(G, (D == null ? void 0 : D.strokeStyle) || "")) : t.labelDrawing && t.labelDrawing(G, D), G.restore();
1647
- }
1648
- }
1649
- }
1650
- }, t.options || {})), l.value.viewer.drawer.canvas.style.filter = "url(#colorMatrixFilter)", Lt(), Nt(), qe();
1651
- }).finally(() => {
1652
- a.value = !1, L.value && (ct({
1653
- show: !1,
1654
- ruler: !1
1655
- }), dt({
1656
- show: !1
1657
- }), setTimeout(() => {
1658
- vt(!1);
1659
- }, 100));
1660
- })));
1661
- }
1662
- function Bt() {
1663
- const z = l.value.viewer;
1664
- if (z.world) {
1665
- const H = z.world.getItemAt(0), O = z.viewport.getZoom(), le = z.viewport.getCenter();
1666
- z.world.removeItem(H), z.addTiledImage({
1667
- tileSource: st(),
1668
- success: function() {
1669
- z.viewport.zoomTo(O), z.viewport.panTo(le);
1670
- }
1671
- });
1672
- }
1673
- }
1674
- function st() {
1675
- var ve, Z;
1676
- const z = w.value.tileWidth || w.value.imageBlockLen || 256, H = w.value.tileHeight || w.value.imageBlockLen || 256, O = {};
1677
- (ve = t.hotmap) != null && ve.enable && (((Z = t.hotmap) == null ? void 0 : Z.info) || []).forEach((U) => {
1678
- O[U[0] / z + "_" + U[1] / H + "_" + U[2]] = !0;
1679
- });
1680
- let le = 10;
1681
- return Object.keys(w.value.ratiomap).forEach((U) => {
1682
- const D = w.value.fileNum - Math.sqrt(w.value.scanScale / Number(U));
1683
- D > 0 && (le = le ? Math.min(le, D) : D);
1684
- }), {
1685
- height: w.value.height,
1686
- width: w.value.width,
1687
- tileWidth: z,
1688
- tileHeight: H,
1689
- minLevel: Math.floor(le || 8),
1690
- getTileUrl: (U, D, _e) => {
1691
- var ft, mt, pt, ht;
1692
- const Ae = U, G = {
1693
- file: ((ft = t.slide) == null ? void 0 : ft.file) || "",
1694
- x: D,
1695
- y: _e,
1696
- scale: "0",
1697
- level: U,
1698
- channel: JSON.stringify(p.value)
1699
- };
1700
- w.value.fileNum === U ? (U = w.value.scanScale, G.scale = U.toFixed(6)) : (U = w.value.scanScale / Math.pow(2, w.value.fileNum - U), G.scale = U.toFixed(6)), G.level = Ae, G.file = i.value === 0 ? G.file : ((pt = (mt = t.slide) == null ? void 0 : mt.children) == null ? void 0 : pt[i.value - 1]) || "";
1701
- const He = t.tileHandle(G);
1702
- return (ht = t.hotmap) != null && ht.enable ? St(He, G, O) : He;
1703
- }
1704
- };
1705
- }
1706
- function Nt() {
1707
- l.value.viewer.addHandler("rotate", (z) => {
1708
- c.value = z.degrees || 0;
1709
- }), l.value.viewer.addHandler("zoom", (z) => {
1710
- const H = l.value.viewer.viewport.viewportToImageZoom(
1711
- z.zoom || 0
1712
- ) * Number(l.value.$options.scale);
1713
- s.value = Number(H.toFixed(2));
1714
- }), l.value.$on(re.events.EVENT_NAVIGATOR_VESTIGE, (z) => {
1715
- t.navigatorHandle && t.navigatorHandle("add", t.slide, z);
1716
- }), t.navigatorHandle && t.navigatorHandle("list", t.slide).then((z) => {
1717
- var H, O;
1718
- (O = (H = l.value.navigator) == null ? void 0 : H.drawPointList) == null || O.call(H, z);
1719
- }), ee(), Le();
1720
- }
1721
- function Dt() {
1722
- var z;
1723
- (z = l.value) != null && z.destroy && (l.value.destroy(), l.value = {}, w.value = {
1724
- width: 0,
1725
- height: 0,
1726
- fileNum: 0,
1727
- scanScale: 1,
1728
- fileName: "",
1729
- ratiomap: {}
1730
- }, At.value = [], p.value = [], s.value = 0, c.value = 0, i.value = 0);
1731
- }
1732
- function it(z, H) {
1733
- z === "annotate" ? rt(H) : z === "tailor" ? pe(H) : z === "info" ? h.value = !0 : z === "flip" ? ut() : z === "delete" ? Mt("delete")(ot.value) : _("tool", z, H);
1734
- }
1735
- function rt(z) {
1736
- z.tool === "Voice" && (z.subType = "voice", z.tool = "Dot", z.custom = !0), l.value.board.startDraw(z);
1737
- }
1738
- function Ut() {
1739
- l.value.board.endDraw();
1740
- }
1741
- function ut() {
1742
- l.value.viewer.viewport.toggleFlip();
1743
- }
1744
- function Ft(z) {
1745
- var H, O;
1746
- (O = (H = g.value) == null ? void 0 : H.scopeChange) == null || O.call(H, z);
1747
- }
1748
- function Kt() {
1749
- h.value = !0;
1750
- }
1751
- function ct(z) {
1752
- l.value.grid.updated(z);
1753
- }
1754
- function dt(z) {
1755
- l.value.graduation.updated(z);
1756
- }
1757
- function vt(z) {
1758
- l.value.navigator.element.style.display = z ? "flex" : "none";
1759
- }
1760
- function Xe(z) {
1761
- const H = l.value.viewer.viewport.imageToViewportZoom(Number(z / l.value.$options.scale));
1762
- l.value.viewer.viewport.zoomTo(H);
1763
- }
1764
- function jt(z, H) {
1765
- l.value.area && (l.value.area.moveToLabel(l.value.viewer.viewport.imageToViewportCoordinates(
1766
- z.x + z.width / 2,
1767
- z.y + z.height / 2
1768
- )), Xe(H));
1769
- }
1770
- return ie("kfbView", l), ie("currentLabel", ot), e({
1771
- kfbView: l,
1772
- degrees: c,
1773
- zoom: s,
1774
- forceRedraw: de,
1775
- toggleFlip: ut,
1776
- startDraw: rt,
1777
- endDraw: Ut,
1778
- shotScreen: pe,
1779
- info: Kt,
1780
- scopeChange: Ft,
1781
- updateGrid: ct,
1782
- updateGraduation: dt,
1783
- updateNavigator: vt,
1784
- fastMove: We,
1785
- zoomTo: Xe,
1786
- jumpToLabel: Vt,
1787
- jumpToPosition: jt,
1788
- reloadLabelList: Et
1789
- }), (z, H) => {
1790
- var O, le, ve;
1791
- return y(), V("div", {
1792
- ref_key: "mainKfbViewRef",
1793
- ref: r,
1794
- class: "hzzt-kfb-view"
1795
- }, [
1796
- z.slide.file ? Ue((y(), V("div", {
1797
- key: 0,
1798
- ref_key: "kfbViewMainRef",
1799
- ref: m,
1800
- class: "hzzt-kfb-view__main",
1801
- "element-loading-text": o(f)("加载中"),
1802
- "element-loading-background": "rgba(0, 0, 0, 0.8)"
1803
- }, null, 8, _o)), [
1804
- [o(P), a.value]
1805
- ]) : (y(), V("div", bo, H[4] || (H[4] = [
1806
- b("img", {
1807
- style: { width: "50%" },
1808
- src: Ze
1809
- }, null, -1)
1810
- ]))),
1811
- z.slide.analysis && z.slide.analysis.result ? (y(), S(o(zt), {
1812
- key: 2,
1813
- class: "hzzt-kfb-view__tag"
1814
- }, {
1815
- default: $(() => [
1816
- j(E(z.slide.analysis.result), 1)
1817
- ]),
1818
- _: 1
1819
- })) : R("", !0),
1820
- (y(), V("svg", ko, [
1821
- b("filter", zo, [
1822
- b("feColorMatrix", {
1823
- values: o(X),
1824
- type: "matrix"
1825
- }, null, 8, xo),
1826
- b("feColorMatrix", {
1827
- values: o(q),
1828
- type: "saturate"
1829
- }, null, 8, Co),
1830
- b("feComponentTransfer", null, [
1831
- b("feFuncR", {
1832
- id: "feFuncR",
1833
- type: "gamma",
1834
- exponent: o(M).ga,
1835
- amplitude: "1",
1836
- offset: "0"
1837
- }, null, 8, To),
1838
- b("feFuncG", {
1839
- id: "feFuncG",
1840
- type: "gamma",
1841
- exponent: o(M).ga,
1842
- amplitude: "1",
1843
- offset: "0"
1844
- }, null, 8, $o),
1845
- b("feFuncB", {
1846
- id: "feFuncB",
1847
- type: "gamma",
1848
- exponent: o(M).ga,
1849
- amplitude: "1",
1850
- offset: "0"
1851
- }, null, 8, Lo)
1852
- ])
1853
- ])
1854
- ])),
1855
- C(jl, {
1856
- menus: z.menus,
1857
- onTool: it
1858
- }, null, 8, ["menus"]),
1859
- C(Gl, Ke(z.microscope, {
1860
- ref_key: "microscopeRef",
1861
- ref: g
1862
- }), null, 16),
1863
- o(k) && z.slide.file ? (y(), S(oo, {
1864
- key: 3,
1865
- info: w.value,
1866
- slide: z.slide,
1867
- pathologyHandle: z.pathologyHandle,
1868
- onTool: it
1869
- }, null, 8, ["info", "slide", "pathologyHandle"])) : R("", !0),
1870
- o(v) ? (y(), S(mo, { key: 4 })) : R("", !0),
1871
- (O = z.slide.children) != null && O.length ? (y(), S(ho, {
1872
- key: 5,
1873
- modelValue: i.value,
1874
- "onUpdate:modelValue": H[0] || (H[0] = (Z) => i.value = Z),
1875
- slides: z.slide.children
1876
- }, null, 8, ["modelValue", "slides"])) : R("", !0),
1877
- (ve = (le = w.value) == null ? void 0 : le.channel) != null && ve.length ? (y(), S(yo, {
1878
- key: 6,
1879
- modelValue: p.value,
1880
- "onUpdate:modelValue": H[1] || (H[1] = (Z) => p.value = Z),
1881
- info: w.value,
1882
- onLoad: Bt
1883
- }, null, 8, ["modelValue", "info"])) : R("", !0),
1884
- C(o(je), {
1885
- modelValue: h.value,
1886
- "onUpdate:modelValue": H[2] || (H[2] = (Z) => h.value = Z),
1887
- "append-to-body": !0,
1888
- title: o(f)("图像信息"),
1889
- width: "700px",
1890
- top: "5vh"
1891
- }, {
1892
- default: $(() => [
1893
- C(o(et), { "label-position": "left" }, {
1894
- default: $(() => [
1895
- C(o(oe), {
1896
- class: "flex",
1897
- "label-width": "0px"
1898
- }, {
1899
- default: $(() => [
1900
- b("div", Vo, [
1901
- b("img", {
1902
- src: w.value.labelImg,
1903
- style: { height: "180px" }
1904
- }, null, 8, Eo),
1905
- b("img", {
1906
- src: w.value.previewImg,
1907
- style: { height: "180px" },
1908
- class: "flex-1"
1909
- }, null, 8, Mo)
1910
- ])
1911
- ]),
1912
- _: 1
1913
- }),
1914
- C(o(oe), {
1915
- label: o(f)("文件名")
1916
- }, {
1917
- default: $(() => [
1918
- b("span", Ho, E(w.value.fileName), 1)
1919
- ]),
1920
- _: 1
1921
- }, 8, ["label"]),
1922
- C(o(oe), {
1923
- label: o(f)("图像像素")
1924
- }, {
1925
- default: $(() => [
1926
- b("span", Io, E(w.value.width) + "Pixel - " + E(w.value.height) + "Pixel", 1)
1927
- ]),
1928
- _: 1
1929
- }, 8, ["label"]),
1930
- C(o(oe), {
1931
- label: o(f)("扫描倍率")
1932
- }, {
1933
- default: $(() => [
1934
- b("span", So, E(w.value.scanScale), 1)
1935
- ]),
1936
- _: 1
1937
- }, 8, ["label"]),
1938
- C(o(oe), {
1939
- label: o(f)("扫描时刻")
1940
- }, {
1941
- default: $(() => [
1942
- b("span", Po, E(w.value.scanTime), 1)
1943
- ]),
1944
- _: 1
1945
- }, 8, ["label"]),
1946
- C(o(oe), {
1947
- label: o(f)("扫描时间")
1948
- }, {
1949
- default: $(() => [
1950
- b("span", Ro, E(w.value.scanDuration || 0) + "s", 1)
1951
- ]),
1952
- _: 1
1953
- }, 8, ["label"]),
1954
- w.value.ext ? (y(), S(o(oe), {
1955
- key: 0,
1956
- label: o(f)("扫描设备")
1957
- }, {
1958
- default: $(() => [
1959
- b("span", Ao, E(w.value.ext.machineNum || ""), 1)
1960
- ]),
1961
- _: 1
1962
- }, 8, ["label"])) : R("", !0)
1963
- ]),
1964
- _: 1
1965
- })
1966
- ]),
1967
- _: 1
1968
- }, 8, ["modelValue", "title"]),
1969
- C(o(je), {
1970
- modelValue: o(Ve),
1971
- "onUpdate:modelValue": H[3] || (H[3] = (Z) => Ce(Ve) ? Ve.value = Z : null),
1972
- "append-to-body": !0,
1973
- title: o(f)("语音输入"),
1974
- width: "500px",
1975
- top: "5vh"
1976
- }, {
1977
- footer: $(() => [
1978
- C(o(ge), { onClick: o(Tt) }, {
1979
- default: $(() => [
1980
- j(E(o(f)("取消")), 1)
1981
- ]),
1982
- _: 1
1983
- }, 8, ["onClick"]),
1984
- C(o(ge), {
1985
- type: "primary",
1986
- onClick: o($t)
1987
- }, {
1988
- default: $(() => [
1989
- j(E(o(f)("确定")), 1)
1990
- ]),
1991
- _: 1
1992
- }, 8, ["onClick"])
1993
- ]),
1994
- default: $(() => [
1995
- C(o(et), { "label-position": "left" }, {
1996
- default: $(() => {
1997
- var Z;
1998
- return [
1999
- C(o(oe), null, {
2000
- default: $(() => {
2001
- var U;
2002
- return [
2003
- (U = o(Ee)) != null && U.src ? (y(), V("audio", {
2004
- key: 0,
2005
- class: "width-100%",
2006
- src: o(Ee).src,
2007
- controls: "",
2008
- preload: "auto"
2009
- }, null, 8, Bo)) : R("", !0)
2010
- ];
2011
- }),
2012
- _: 1
2013
- }),
2014
- (Z = o(Ee)) != null && Z.src ? R("", !0) : (y(), S(o(oe), { key: 0 }, {
2015
- default: $(() => [
2016
- o(F) ? (y(), S(o(ge), {
2017
- key: 1,
2018
- type: "danger",
2019
- onClick: o(Me)
2020
- }, {
2021
- default: $(() => [
2022
- j(E(o(f)("结束录音")), 1)
2023
- ]),
2024
- _: 1
2025
- }, 8, ["onClick"])) : (y(), S(o(ge), {
2026
- key: 0,
2027
- type: "primary",
2028
- onClick: o(se)
2029
- }, {
2030
- default: $(() => [
2031
- j(E(o(f)("开始录音")), 1)
2032
- ]),
2033
- _: 1
2034
- }, 8, ["onClick"])),
2035
- o(F) ? (y(), V("span", No, E(o(f)("录音时长")) + ":" + E(o(A)) + "s", 1)) : R("", !0)
2036
- ]),
2037
- _: 1
2038
- }))
2039
- ];
2040
- }),
2041
- _: 1
2042
- })
2043
- ]),
2044
- _: 1
2045
- }, 8, ["modelValue", "title"]),
2046
- z.hotmap && z.hotmap.enable && z.hotmap.type !== "switch" ? (y(), V("div", {
2047
- key: 7,
2048
- class: "hzzt-kfb-view__hotmap",
2049
- style: W({ left: o(Rt) + "px" })
2050
- }, [
2051
- C(o(we), {
2052
- class: "icon-caret-left",
2053
- size: "30",
2054
- onMousedown: o(at)
2055
- }, {
2056
- default: $(() => H[5] || (H[5] = [
2057
- b("svg", {
2058
- xmlns: "http://www.w3.org/2000/svg",
2059
- viewBox: "0 0 1024 1024"
2060
- }, [
2061
- b("path", {
2062
- fill: "currentColor",
2063
- d: "M672 192 288 511.936 672 832z"
2064
- })
2065
- ], -1)
2066
- ])),
2067
- _: 1,
2068
- __: [5]
2069
- }, 8, ["onMousedown"]),
2070
- C(o(we), {
2071
- class: "icon-caret-right",
2072
- size: "30",
2073
- onMousedown: o(at)
2074
- }, {
2075
- default: $(() => H[6] || (H[6] = [
2076
- b("svg", {
2077
- xmlns: "http://www.w3.org/2000/svg",
2078
- viewBox: "0 0 1024 1024"
2079
- }, [
2080
- b("path", {
2081
- fill: "currentColor",
2082
- d: "M384 192v640l384-320.064z"
2083
- })
2084
- ], -1)
2085
- ])),
2086
- _: 1,
2087
- __: [6]
2088
- }, 8, ["onMousedown"])
2089
- ], 4)) : R("", !0),
2090
- ue(z.$slots, "default")
2091
- ], 512);
2092
- };
2093
- }
2094
- });
2095
- function Do(d, e) {
2096
- var h, l;
2097
- const n = T(!!((h = d.ai) != null && h.default)), t = T(!!((l = d.ai) != null && l.default)), _ = T([]), f = N(
2098
- () => {
2099
- var a, c, s, i;
2100
- return (c = (a = e.value) == null ? void 0 : a.analysis) != null && c.id ? ((i = (s = e.value) == null ? void 0 : s.analysis) == null ? void 0 : i.class) || "auto" : "";
2101
- }
2102
- );
2103
- te(() => {
2104
- var a;
2105
- return (a = d.ai) == null ? void 0 : a.default;
2106
- }, (a) => {
2107
- n.value = !!a, t.value = !!a;
2108
- }), te(() => {
2109
- var a;
2110
- return (a = e == null ? void 0 : e.value) == null ? void 0 : a.id;
2111
- }, u), me(() => {
2112
- var a, c;
2113
- n.value = !!((a = d.ai) != null && a.default), t.value = !!((c = d.ai) != null && c.default), u();
2114
- });
2115
- function u() {
2116
- var a;
2117
- (a = e.value) != null && a.id && f.value ? n.value || t.value ? r() : _.value = [] : _.value = [];
2118
- }
2119
- function r() {
2120
- d.ai.handle(f.value, e.value).then((a) => {
2121
- _.value = a;
2122
- }).catch(() => {
2123
- _.value = [], f.value === "IQC" ? t.value = !1 : n.value = !1;
2124
- });
2125
- }
2126
- function m() {
2127
- t.value = !1, u();
2128
- }
2129
- function g() {
2130
- n.value = !1, u();
2131
- }
2132
- return {
2133
- analysisClass: f,
2134
- aiLabelList: _,
2135
- enableAi: n,
2136
- enableIqc: t,
2137
- toggleIqc: g,
2138
- toggleAi: m
2139
- };
2140
- }
2141
- const Uo = ["src", "fit"], Fo = ["src", "fit"], De = /* @__PURE__ */ J({
2142
- name: "KfbImage",
2143
- __name: "KfbImage",
2144
- props: {
2145
- src: {
2146
- type: String,
2147
- required: !0,
2148
- default: ""
2149
- },
2150
- fit: {
2151
- type: String,
2152
- validator: (d) => ["", "contain", "cover", "fill", "none", "scale-down"].includes(d),
2153
- default: ""
2154
- },
2155
- retryTimes: {
2156
- type: Number,
2157
- default: 0
2158
- },
2159
- load: {
2160
- type: Function,
2161
- default: () => ({})
2162
- }
2163
- },
2164
- setup(d) {
2165
- const e = d;
2166
- let n = 0;
2167
- const t = T(!1), _ = lt({
2168
- x: 0,
2169
- y: 0
2170
- }), f = N(() => ({
2171
- top: `${_.y + 10}px`,
2172
- left: `${_.x}px`,
2173
- transform: "translateY(-50%)",
2174
- width: `${4 * 300 / 3}px`,
2175
- height: "300px",
2176
- background: "rgba(0,0,0,0.8)",
2177
- zIndex: "10000"
2178
- }));
2179
- function u(h) {
2180
- const l = h.target;
2181
- n < e.retryTimes ? (l.src = e.src, n++) : l.src = Ze;
2182
- }
2183
- function r(h) {
2184
- if (h.target) {
2185
- const i = h.target, p = i.tagName;
2186
- let w = "";
2187
- if (i.tagName === "IMG" ? w = i.src || "" : p === "DIV" && (w = i.children[0].src || ""), w.indexOf(Ze) > -1)
2188
- return;
2189
- }
2190
- const { x: l, y: a } = m(h), c = 4 * 300 / 3, s = 300;
2191
- _.x = Math.min(Math.max(l, c / 2), window.innerWidth - c / 2), _.y = Math.min(Math.max(a, s / 2), window.innerHeight - s / 2), t.value = !0;
2192
- }
2193
- function m(h) {
2194
- const l = h.target, a = h.offsetX, c = h.offsetY, s = l.clientWidth, i = l.clientHeight;
2195
- return {
2196
- x: h.clientX + s - a,
2197
- y: h.clientY - c + i / 2
2198
- };
2199
- }
2200
- function g() {
2201
- t.value = !1;
2202
- }
2203
- return (h, l) => (y(), V("div", {
2204
- class: "relative",
2205
- onMouseenter: r,
2206
- onMouseleave: g
2207
- }, [
2208
- b("img", {
2209
- src: d.src,
2210
- fit: d.fit,
2211
- onError: u,
2212
- style: {
2213
- height: "100%",
2214
- width: "100%"
2215
- }
2216
- }, null, 40, Uo),
2217
- (y(), S(Fe, { to: "body" }, [
2218
- t.value ? (y(), V("div", {
2219
- key: 0,
2220
- class: "fixed hzzt-kfb-img-triangle-left",
2221
- style: W(f.value)
2222
- }, [
2223
- b("img", {
2224
- src: d.src,
2225
- fit: d.fit,
2226
- style: {
2227
- objectFit: "contain",
2228
- height: "100%",
2229
- width: "100%"
2230
- },
2231
- onMouseenter: l[0] || (l[0] = () => {
2232
- t.value = !0;
2233
- }),
2234
- onMouseleave: g
2235
- }, null, 40, Fo)
2236
- ], 4)) : R("", !0)
2237
- ]))
2238
- ], 32));
2239
- }
2240
- }), Ko = {}, jo = {
2241
- xmlns: "http://www.w3.org/2000/svg",
2242
- viewBox: "0 0 1024 1024"
2243
- };
2244
- function Oo(d, e) {
2245
- return y(), V("svg", jo, e[0] || (e[0] = [
2246
- b("path", {
2247
- fill: "currentColor",
2248
- 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"
2249
- }, null, -1)
2250
- ]));
2251
- }
2252
- const Zo = /* @__PURE__ */ ye(Ko, [["render", Oo]]), Go = {}, Wo = {
2253
- width: "16",
2254
- height: "16",
2255
- viewBox: "0 0 16 16",
2256
- fill: "none",
2257
- xmlns: "http://www.w3.org/2000/svg"
2258
- };
2259
- function qo(d, e) {
2260
- return y(), V("svg", Wo, e[0] || (e[0] = [
2261
- b("g", { id: "Frame" }, [
2262
- b("path", {
2263
- id: "Vector",
2264
- 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",
2265
- fill: "currentColor",
2266
- "fill-opacity": "0.9"
2267
- })
2268
- ], -1)
2269
- ]));
2270
- }
2271
- const Yo = /* @__PURE__ */ ye(Go, [["render", qo]]), Xo = { class: "hzzt-kfb-slides" }, Qo = { class: "hzzt-kfb-slides__row" }, Jo = { class: "hzzt-kfb-slides__top" }, ea = { class: "text-primary" }, ta = { class: "flex align-items-center" }, la = { key: 0 }, oa = ["data-index", "onClick"], aa = { class: "hzzt-kfb-slides__gallery" }, na = ["onClick"], sa = {
2272
- key: 0,
2273
- class: "hzzt-kfb-slides__read"
2274
- }, ia = ["onClick"], ra = {
2275
- key: 1,
2276
- class: "flex column"
2277
- }, ua = { class: "hzzt-kfb-slides__header" }, ca = { class: "w-30%" }, da = { class: "w-40%" }, va = { class: "w-20%" }, fa = ["data-index", "onClick"], ma = { class: "w-30% flex" }, pa = { class: "hzzt-kfb-slides__gallery" }, ha = {
2278
- key: 0,
2279
- class: "hzzt-kfb-slides__read"
2280
- }, ga = { class: "w-40% flex" }, wa = ["onClick"], ya = ["onClick"], _a = {
2281
- key: 0,
2282
- class: "flex column py-2"
2283
- }, ba = { class: "flex align-items-center justify-content-center" }, ka = { class: "margin-r-1" }, za = {
2284
- key: 0,
2285
- class: "margin-r-1 margin-l-2"
2286
- }, xa = /* @__PURE__ */ J({
2287
- __name: "KfbSlideList",
2288
- props: {
2289
- slides: {}
2290
- },
2291
- emits: ["select", "tool"],
2292
- setup(d, { expose: e, emit: n }) {
2293
- const t = d, _ = n, f = Y("file-index", {
2294
- value: 0
2295
- }), u = Y("divide", {
2296
- value: !1
2297
- }), r = Y("sync", {
2298
- value: !1
2299
- }), m = T(!1), g = T(), h = N(() => t.slides.filter(({ read: p }) => p)), l = N(() => t.slides.filter(({ check: p }) => p)), { t: a } = ce();
2300
- function c(p) {
2301
- f.value = p, _("select", p);
2302
- }
2303
- function s(p) {
2304
- p.check = !p.check;
2305
- }
2306
- function i(p) {
2307
- var k, v, L;
2308
- const w = ((L = (v = (k = g.value.querySelector('[data-index="0"]')) == null ? void 0 : k.getBoundingClientRect) == null ? void 0 : v.call(k)) == null ? void 0 : L.y) || 0;
2309
- g.value.scrollTop = g.value.querySelector(`[data-index="${p}"]`).getBoundingClientRect().y - w;
2310
- }
2311
- return e({
2312
- jumpToSlide: i
2313
- }), (p, w) => (y(), V("div", Xo, [
2314
- b("div", Qo, [
2315
- b("div", Jo, [
2316
- b("span", null, [
2317
- w[4] || (w[4] = j("已读:")),
2318
- b("span", ea, E(h.value.length), 1),
2319
- j("/" + E(p.slides.length), 1)
2320
- ]),
2321
- b("div", ta, [
2322
- C(o(we), {
2323
- class: "margin-r-2 pointer",
2324
- size: "16",
2325
- color: m.value ? "#999" : "#000",
2326
- onClick: w[0] || (w[0] = (k) => m.value = !m.value)
2327
- }, {
2328
- default: $(() => [
2329
- C(Zo)
2330
- ]),
2331
- _: 1
2332
- }, 8, ["color"]),
2333
- C(o(we), {
2334
- class: "pointer",
2335
- name: "cus-list",
2336
- size: "16",
2337
- color: m.value ? "#000" : "#999",
2338
- onClick: w[1] || (w[1] = (k) => m.value = !m.value)
2339
- }, {
2340
- default: $(() => [
2341
- C(Yo)
2342
- ]),
2343
- _: 1
2344
- }, 8, ["color"])
2345
- ])
2346
- ]),
2347
- b("div", {
2348
- class: "flex-1 overflow-auto",
2349
- style: { width: "100%" },
2350
- ref_key: "slidesRef",
2351
- ref: g
2352
- }, [
2353
- m.value ? (y(), V("ul", ra, [
2354
- b("li", ua, [
2355
- w[5] || (w[5] = b("div", { class: "w-10%" }, null, -1)),
2356
- b("div", ca, E(o(a)("缩略图")), 1),
2357
- b("div", da, E(o(a)("切片名")), 1),
2358
- b("div", va, E(o(a)("评分")), 1)
2359
- ]),
2360
- (y(!0), V(ae, null, ne(p.slides, (k, v) => (y(), V("li", {
2361
- key: v,
2362
- "data-index": v,
2363
- class: "flex align-items-center overflow-hidden",
2364
- style: W({
2365
- backgroundColor: o(f) === v ? "rgba(6, 85, 195, 0.1)" : "#fff"
2366
- }),
2367
- onClick: (L) => c(v)
2368
- }, [
2369
- b("div", {
2370
- class: "w-10% text-center",
2371
- onClick: Be(() => {
2372
- }, ["stop"])
2373
- }, [
2374
- C(o(Oe), {
2375
- modelValue: k.check,
2376
- "onUpdate:modelValue": (L) => k.check = L,
2377
- style: { width: "14px", height: "16px" }
2378
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
2379
- ]),
2380
- b("div", ma, [
2381
- b("div", pa, [
2382
- C(De, {
2383
- style: W([{ transform: `rotate(${k.angle}deg)` }, { height: "45px" }]),
2384
- "retry-times": 1,
2385
- src: k.labelImg,
2386
- fit: "cover",
2387
- class: "flex-1"
2388
- }, null, 8, ["style", "src"]),
2389
- C(De, {
2390
- "retry-times": 1,
2391
- fit: "cover",
2392
- src: k.previewImg,
2393
- style: { height: "45px" },
2394
- class: "flex-1"
2395
- }, null, 8, ["src"]),
2396
- k.read ? R("", !0) : (y(), V("div", ha, E(o(a)("未读")), 1))
2397
- ])
2398
- ]),
2399
- b("div", ga, [
2400
- C(o(bt), {
2401
- effect: "dark",
2402
- placement: "bottom",
2403
- content: `${k.name}`
2404
- }, {
2405
- default: $(() => [
2406
- b("span", {
2407
- style: { "line-height": "16px" },
2408
- class: "margin-l-1 ellipsis hzzt-kfb-slides__text",
2409
- dir: "rtl",
2410
- onClick: Be((L) => s(k), ["stop"])
2411
- }, E(k.name), 9, wa)
2412
- ]),
2413
- _: 2
2414
- }, 1032, ["content"])
2415
- ]),
2416
- b("div", {
2417
- class: "w-20% flex text-center pointer",
2418
- style: W({
2419
- color: k.gradeColor
2420
- }),
2421
- onClick: (L) => _("tool", "grade", k)
2422
- }, E(k.grade), 13, ya)
2423
- ], 12, fa))), 128))
2424
- ])) : (y(), V("div", la, [
2425
- (y(!0), V(ae, null, ne(p.slides, (k, v) => (y(), V("div", {
2426
- key: v,
2427
- class: Re(["hzzt-kfb-slides__box", o(f) === v ? "hzzt-kfb-slides__box--active" : ""]),
2428
- "data-index": v,
2429
- onClick: (L) => c(v)
2430
- }, [
2431
- b("div", aa, [
2432
- C(De, {
2433
- style: W({ transform: `rotate(${k.angle}deg)` }),
2434
- "retry-times": 1,
2435
- src: k.labelImg,
2436
- class: "hzzt-kfb-slides__img",
2437
- fit: "cover"
2438
- }, null, 8, ["style", "src"]),
2439
- C(De, {
2440
- "retry-times": 1,
2441
- src: k.previewImg,
2442
- class: "flex-1 hzzt-kfb-slides__img1",
2443
- fit: "cover"
2444
- }, null, 8, ["src"])
2445
- ]),
2446
- b("div", {
2447
- class: "flex justify-content-between align-items-center",
2448
- onClick: Be(() => {
2449
- }, ["stop"])
2450
- }, [
2451
- C(o(Oe), {
2452
- modelValue: k.check,
2453
- "onUpdate:modelValue": (L) => k.check = L,
2454
- style: { width: "14px", height: "16px" }
2455
- }, null, 8, ["modelValue", "onUpdate:modelValue"]),
2456
- C(o(bt), {
2457
- effect: "dark",
2458
- placement: "bottom",
2459
- content: `${k.name}`
2460
- }, {
2461
- default: $(() => [
2462
- b("span", {
2463
- style: { "line-height": "16px", "text-align": "center", width: "calc(100% - 14px)" },
2464
- class: "margin-l-1 ellipsis",
2465
- dir: "rtl",
2466
- onClick: Be((L) => s(k), ["stop"])
2467
- }, E(k.name), 9, na)
2468
- ]),
2469
- _: 2
2470
- }, 1032, ["content"])
2471
- ]),
2472
- k.read ? R("", !0) : (y(), V("div", sa, E(o(a)("未读")), 1)),
2473
- k.grade ? (y(), V("div", {
2474
- key: 1,
2475
- class: "hzzt-kfb-slides__grade",
2476
- style: W({
2477
- background: k.gradeColor
2478
- }),
2479
- onClick: (L) => _("tool", "grade", k)
2480
- }, E(k.grade), 13, ia)) : R("", !0),
2481
- ue(p.$slots, "slide", { slide: k }, void 0, !0)
2482
- ], 10, oa))), 128))
2483
- ]))
2484
- ], 512),
2485
- l.value.length > 1 ? (y(), V("div", _a, [
2486
- b("div", ba, [
2487
- b("span", ka, E(o(a)("分屏")), 1),
2488
- C(o(ze), {
2489
- modelValue: o(u),
2490
- "onUpdate:modelValue": w[2] || (w[2] = (k) => Ce(u) ? u.value = k : null)
2491
- }, null, 8, ["modelValue"]),
2492
- o(u) ? (y(), V("span", za, E(o(a)("同步")), 1)) : R("", !0),
2493
- o(u) ? (y(), S(o(ze), {
2494
- key: 1,
2495
- modelValue: o(r),
2496
- "onUpdate:modelValue": w[3] || (w[3] = (k) => Ce(r) ? r.value = k : null)
2497
- }, null, 8, ["modelValue"])) : R("", !0)
2498
- ])
2499
- ])) : R("", !0)
2500
- ])
2501
- ]));
2502
- }
2503
- }), Ca = /* @__PURE__ */ ye(xa, [["__scopeId", "data-v-25dae76d"]]), Ta = { class: "hzzt-kfb-ai overflow-hidden" }, $a = { class: "flex align-items-center margin-t-1" }, La = { style: { color: "var(--el-color-success)" } }, Va = { class: "flex-1 flex overflow-auto wrap margin-t-1" }, Ea = ["onClick"], Ma = {
2504
- key: 0,
2505
- style: { "margin-left": "2px" }
2506
- }, Ha = /* @__PURE__ */ J({
2507
- name: "KfbAiList",
2508
- __name: "list",
2509
- props: {
2510
- data: { default: () => [] },
2511
- slide: { default: () => ({}) }
2512
- },
2513
- setup(d, { expose: e }) {
2514
- const n = d, { t } = ce(), _ = Y("kfbViewRef"), f = T(-1), u = T(1), r = T(100), m = T(!0), g = T([]), h = N(() => n.data.filter((L) => g.value.includes(L.cls || ""))), l = N(() => h.value.slice((u.value - 1) * r.value, u.value * r.value)), a = N(() => {
2515
- var P, M;
2516
- const L = ((M = (P = n.slide) == null ? void 0 : P.analysis) == null ? void 0 : M.result) || "";
2517
- return L.indexOf("疑似阳性") > -1 ? {
2518
- type: "warning",
2519
- name: L
2520
- } : L.indexOf("阳性") > -1 ? {
2521
- type: "danger",
2522
- name: L
2523
- } : L.indexOf("阴性") > -1 ? {
2524
- type: "success",
2525
- name: L
2526
- } : {
2527
- type: "info",
2528
- name: L || t("未知")
2529
- };
2530
- }), c = N(() => {
2531
- const L = /* @__PURE__ */ new Set();
2532
- return n.data.forEach((P) => {
2533
- const M = P.cls || "";
2534
- M && !L.has(M) && L.add(M);
2535
- }), Array.from(L);
2536
- }), s = N(() => g.value.length !== 0 && g.value.length !== c.value.length);
2537
- te(() => c.value, (L) => {
2538
- i(), g.value = [...L];
2539
- }), me(() => {
2540
- g.value = [...c.value];
2541
- });
2542
- function i() {
2543
- f.value = -1, u.value = 1, r.value = 100, m.value = !0;
2544
- }
2545
- function p(L) {
2546
- const P = h.value.findIndex((M) => M.id === L.id);
2547
- f.value = P, _.value.jumpToLabel(L, 5);
2548
- }
2549
- function w(L) {
2550
- const P = n.data.filter((M) => M.cls === L);
2551
- return P.length ? `(${P.length})` : "";
2552
- }
2553
- function k() {
2554
- f.value = -1, m.value = g.value.length == c.value.length;
2555
- }
2556
- function v(L) {
2557
- g.value = L ? [...c.value] : [], f.value = -1;
2558
- }
2559
- return e({
2560
- labelList: h
2561
- }), (L, P) => (y(), V("div", Ta, [
2562
- b("div", $a, [
2563
- C(o(al), {
2564
- placement: "bottom",
2565
- trigger: "click",
2566
- width: "160"
2567
- }, {
2568
- reference: $(() => [
2569
- C(o(ge), {
2570
- class: "margin-r-1",
2571
- type: "primary"
2572
- }, {
2573
- default: $(() => [
2574
- j(E(o(t)("分类")) + " ", 1),
2575
- C(Q, { name: "arrowDown" })
2576
- ]),
2577
- _: 1
2578
- })
2579
- ]),
2580
- default: $(() => [
2581
- b("div", null, [
2582
- C(o(Oe), {
2583
- modelValue: m.value,
2584
- "onUpdate:modelValue": P[0] || (P[0] = (M) => m.value = M),
2585
- indeterminate: s.value,
2586
- onChange: v
2587
- }, {
2588
- default: $(() => [
2589
- j(E(o(t)("全选")), 1)
2590
- ]),
2591
- _: 1
2592
- }, 8, ["modelValue", "indeterminate"]),
2593
- C(o(nl), {
2594
- modelValue: g.value,
2595
- "onUpdate:modelValue": P[1] || (P[1] = (M) => g.value = M),
2596
- class: "flex column",
2597
- onChange: k
2598
- }, {
2599
- default: $(() => [
2600
- (y(!0), V(ae, null, ne(c.value, (M) => (y(), S(o(Oe), {
2601
- key: M,
2602
- value: M
2603
- }, {
2604
- default: $(() => [
2605
- j(E(M) + " ", 1),
2606
- b("span", La, E(w(M)), 1)
2607
- ]),
2608
- _: 2
2609
- }, 1032, ["value"]))), 128))
2610
- ]),
2611
- _: 1
2612
- }, 8, ["modelValue"])
2613
- ])
2614
- ]),
2615
- _: 1
2616
- }),
2617
- C(o(zt), {
2618
- type: a.value.type,
2619
- class: "margin-l-1"
2620
- }, {
2621
- default: $(() => [
2622
- j(E(a.value.name), 1)
2623
- ]),
2624
- _: 1
2625
- }, 8, ["type"])
2626
- ]),
2627
- b("div", Va, [
2628
- (y(!0), V(ae, null, ne(l.value, (M, X) => (y(), V("div", {
2629
- key: X + (u.value - 1) * r.value,
2630
- class: Re(`hzzt-kfb-ai__img ${f.value === X + (u.value - 1) * r.value ? "hzzt-kfb-ai__img--active" : ""}`),
2631
- onClick: (q) => p(M)
2632
- }, [
2633
- C(o(il), {
2634
- "retry-times": 1,
2635
- src: M.imageUrl,
2636
- "error-src": o(Ze)
2637
- }, null, 8, ["src", "error-src"]),
2638
- b("div", {
2639
- style: W({ color: M.strokeStyle }),
2640
- class: "ellipsis"
2641
- }, [
2642
- j(E(M.cls) + " ", 1),
2643
- M.score ? (y(), V("span", Ma, E(M.score), 1)) : R("", !0)
2644
- ], 4)
2645
- ], 10, Ea))), 128))
2646
- ]),
2647
- C(o(sl), {
2648
- class: "wrap",
2649
- "current-page": u.value,
2650
- "onUpdate:currentPage": P[2] || (P[2] = (M) => u.value = M),
2651
- "page-size": r.value,
2652
- "onUpdate:pageSize": P[3] || (P[3] = (M) => r.value = M),
2653
- "page-sizes": [100, 200, 300, 400],
2654
- layout: "total, sizes, prev, pager, next",
2655
- total: h.value.length
2656
- }, null, 8, ["current-page", "page-size", "total"])
2657
- ]));
2658
- }
2659
- }), Ia = { class: "hzzt-kfb-slide" }, Sa = { class: "flex flex-1 overflow-hidden" }, Pa = { class: "flex flex-1" }, Ra = {
2660
- key: 0,
2661
- style: { height: "100%", width: "100%" },
2662
- class: "flex wrap"
2663
- }, Aa = ["onClick"], Ge = /* @__PURE__ */ J({
2664
- name: "HzztKfbSlide",
2665
- __name: "index",
2666
- props: /* @__PURE__ */ Se({
2667
- menus: { default: () => [] },
2668
- kfb: {},
2669
- slides: { default: () => [] },
2670
- ai: {},
2671
- teleport: { type: Boolean, default: !1 },
2672
- process: {},
2673
- microscope: {},
2674
- showList: { type: Boolean, default: !0 },
2675
- showKfbLabel: { type: Boolean, default: !0 },
2676
- showKeyboard: { type: Boolean, default: !1 },
2677
- showMenuText: { type: Boolean, default: !0 }
2678
- }, {
2679
- index: {
2680
- default: 0
2681
- },
2682
- indexModifiers: {}
2683
- }),
2684
- emits: /* @__PURE__ */ Se(["tool"], ["update:index"]),
2685
- setup(d, { expose: e, emit: n }) {
2686
- const t = d, _ = n, f = Ie(d, "index"), u = N(() => t.slides[f.value]), r = N(() => t.slides.filter(({ check: x }) => x)), m = T(), g = T(), h = T(), l = T(), a = T(t.showKeyboard), c = T(t.showKfbLabel), s = T(!1), i = T(!1), p = T(!1), { t: w } = ce(), k = N(() => {
2687
- var x;
2688
- if (s.value) {
2689
- const A = r.value.findIndex(({ id: F }) => {
2690
- var se;
2691
- return F === ((se = u.value) == null ? void 0 : se.id);
2692
- });
2693
- return ((x = h.value) == null ? void 0 : x[A]) || g.value;
2694
- } else
2695
- return g.value;
2696
- }), v = N(() => r.value.length <= 1 ? {
2697
- height: "100%",
2698
- width: "100%"
2699
- } : r.value.length <= 2 ? {
2700
- height: "100%",
2701
- width: "calc((100% - 4px) / 2)"
2702
- } : r.value.length <= 4 ? {
2703
- height: "calc((100% - 4px) / 2)",
2704
- width: "calc((100% - 4px) / 2)"
2705
- } : r.value.length <= 6 ? {
2706
- height: "calc((100% - 4px) / 2)",
2707
- width: "calc((100% - 4px * 2) / 3)"
2708
- } : r.value.length <= 9 ? {
2709
- height: "calc((100% - 4px * 2) / 3)",
2710
- width: "calc((100% - 4px * 2) / 3)"
2711
- } : {
2712
- height: "100%",
2713
- width: "100%"
2714
- });
2715
- te(() => r.value, (x) => {
2716
- s.value && x.length <= 1 && (s.value = !1);
2717
- }), te(() => u.value, (x) => {
2718
- if (x) {
2719
- const A = x.read;
2720
- x.read = !0, _("tool", "choose", {
2721
- slide: x,
2722
- read: A
2723
- });
2724
- }
2725
- });
2726
- const {
2727
- analysisClass: L,
2728
- aiLabelList: P,
2729
- enableAi: M,
2730
- enableIqc: X,
2731
- toggleIqc: q,
2732
- toggleAi: de
2733
- } = Do(t, u);
2734
- function ee(x, A) {
2735
- x === "next" && t.slides[f.value + 1] && f.value++, x === "prev" && t.slides[f.value - 1] && f.value--, (x === "label" || x === "tool") && (c.value = A), _("tool", x, A);
2736
- }
2737
- function pe(x) {
2738
- var F, se, Me;
2739
- const A = fe(K({}, t.kfb), {
2740
- process: t.process,
2741
- microscope: t.microscope,
2742
- slide: x,
2743
- aiLabelList: u.value.id === x.id ? ((F = l.value) == null ? void 0 : F.labelList) || [] : [],
2744
- hotmap: (se = x == null ? void 0 : x.hotmap) != null && se.file ? fe(K({}, (x == null ? void 0 : x.hotmap) || {}), {
2745
- enable: M.value
2746
- }) : void 0,
2747
- syncPosition: i.value,
2748
- syncZoom: i.value,
2749
- handle: void 0
2750
- });
2751
- return (Me = t.kfb) != null && Me.handle ? t.kfb.handle(x, A) : A;
2752
- }
2753
- function Le(x) {
2754
- f.value = t.slides.findIndex((A) => A.id === x.id);
2755
- }
2756
- function We(x) {
2757
- s.value && (t.slides[x].check = !0);
2758
- }
2759
- function qe() {
2760
- var x;
2761
- c.value = !p.value, (x = s.value ? h.value : [g.value]) == null || x.forEach((A) => {
2762
- p.value && (A.updateGrid({
2763
- show: !p.value,
2764
- ruler: !p.value
2765
- }), a.value = !p.value), A.updateGraduation({
2766
- show: !p.value
2767
- }), A.updateNavigator(!p.value);
2768
- });
2769
- }
2770
- function Ye(x) {
2771
- f.value = x, m.value && m.value.jumpToSlide(x);
2772
- }
2773
- function Ve(x, A) {
2774
- k.value && k.value.jumpToLabel(x, A);
2775
- }
2776
- function Ee(x, A) {
2777
- k.value && k.value.jumpToPosition(x, A);
2778
- }
2779
- return ie("kfbViewRef", k), ie("show-keyboard", a), ie("show-kfb-label", c), ie("hidden-all-label", p), ie("file-index", f), ie("divide", s), ie("sync", i), e({
2780
- divide: s,
2781
- slide: u,
2782
- kfbViewRef: k,
2783
- jumpToSlide: Ye,
2784
- jumpToLabel: Ve,
2785
- jumpToPosition: Ee,
2786
- enableAI: N(() => {
2787
- var x;
2788
- return ((x = t.ai) == null ? void 0 : x.enable) && P.value.length;
2789
- })
2790
- }), (x, A) => (y(), V("div", Ia, [
2791
- x.menus.length ? (y(), S(Pe, {
2792
- key: 0,
2793
- menu: x.menus,
2794
- "show-menu-text": x.showMenuText,
2795
- process: x.process,
2796
- microscope: x.microscope,
2797
- onTool: ee
2798
- }, {
2799
- left: $(() => [
2800
- ue(x.$slots, "left")
2801
- ]),
2802
- right: $(() => [
2803
- C(o(ze), {
2804
- modelValue: p.value,
2805
- "onUpdate:modelValue": A[0] || (A[0] = (F) => p.value = F),
2806
- "active-text": o(w)("隐藏标签"),
2807
- class: "margin-r-2",
2808
- onChange: qe
2809
- }, null, 8, ["modelValue", "active-text"]),
2810
- x.ai && x.ai.enable && o(L) === "IQC" ? (y(), S(o(ze), {
2811
- key: 0,
2812
- modelValue: o(X),
2813
- "onUpdate:modelValue": A[1] || (A[1] = (F) => Ce(X) ? X.value = F : null),
2814
- "active-text": o(w)("AI质控"),
2815
- class: "margin-r-2",
2816
- onChange: o(q)
2817
- }, null, 8, ["modelValue", "active-text", "onChange"])) : x.ai && x.ai.enable && o(L) ? (y(), S(o(ze), {
2818
- key: 1,
2819
- modelValue: o(M),
2820
- "onUpdate:modelValue": A[2] || (A[2] = (F) => Ce(M) ? M.value = F : null),
2821
- "active-text": o(w)("AI分析"),
2822
- class: "margin-r-2",
2823
- onChange: o(de)
2824
- }, null, 8, ["modelValue", "active-text", "onChange"])) : R("", !0),
2825
- ue(x.$slots, "right")
2826
- ]),
2827
- _: 3
2828
- }, 8, ["menu", "show-menu-text", "process", "microscope"])) : R("", !0),
2829
- b("div", Sa, [
2830
- x.showList ? (y(), S(Fe, {
2831
- key: 0,
2832
- defer: "",
2833
- to: "#kfb-slide-list",
2834
- disabled: !x.teleport
2835
- }, [
2836
- C(Ca, {
2837
- ref_key: "slidesRef",
2838
- ref: m,
2839
- style: W(x.teleport ? "" : "width: 250px"),
2840
- slides: x.slides,
2841
- onSelect: We,
2842
- onTool: ee
2843
- }, {
2844
- slide: $(({ slide: F }) => [
2845
- ue(x.$slots, "list", { slide: F })
2846
- ]),
2847
- _: 3
2848
- }, 8, ["style", "slides"])
2849
- ], 8, ["disabled"])) : R("", !0),
2850
- (y(), S(Fe, {
2851
- defer: "",
2852
- to: "#kfb-slide-view",
2853
- disabled: !x.teleport
2854
- }, [
2855
- b("div", Pa, [
2856
- r.value.length && s.value ? (y(), V("ul", Ra, [
2857
- (y(!0), V(ae, null, ne(r.value, (F, se) => (y(), V("li", {
2858
- key: se,
2859
- style: W(v.value),
2860
- class: Re(u.value.id === F.id ? "hzzt-kfb-view-screen-active" : ""),
2861
- onClick: (Me) => Le(F)
2862
- }, [
2863
- (y(), S(Te, Ke({
2864
- ref_for: !0,
2865
- ref_key: "kfbViewRefs",
2866
- ref: h,
2867
- key: `kfb-${se}`
2868
- }, { ref_for: !0 }, pe(F), { onTool: ee }), {
2869
- default: $(() => [
2870
- ue(x.$slots, "kfb", { slide: F })
2871
- ]),
2872
- _: 2
2873
- }, 1040))
2874
- ], 14, Aa))), 128))
2875
- ])) : u.value ? (y(), S(Te, Ke({
2876
- key: 1,
2877
- ref_key: "kfbViewRef",
2878
- ref: g
2879
- }, pe(u.value), { onTool: ee }), {
2880
- default: $(() => [
2881
- ue(x.$slots, "kfb", { slide: u.value })
2882
- ]),
2883
- _: 3
2884
- }, 16)) : R("", !0)
2885
- ])
2886
- ], 8, ["disabled"])),
2887
- x.ai && x.ai.enable && o(P).length ? (y(), S(Fe, {
2888
- key: 1,
2889
- defer: "",
2890
- to: "#kfb-slide-ai",
2891
- disabled: !x.teleport
2892
- }, [
2893
- C(Ha, {
2894
- style: W(x.teleport ? "" : "width: 350px"),
2895
- ref_key: "kfbAiRef",
2896
- ref: l,
2897
- data: o(P),
2898
- slide: u.value
2899
- }, null, 8, ["style", "data", "slide"])
2900
- ], 8, ["disabled"])) : R("", !0),
2901
- ue(x.$slots, "default")
2902
- ])
2903
- ]));
2904
- }
2905
- });
2906
- Ge.name = "HzztKfbSlide";
2907
- Te.name = "HzztKfbView";
2908
- Pe.name = "HzztKfbToolbox";
2909
- const Ba = (d, e) => {
2910
- d.use(rl, e == null ? void 0 : e.i18n), d.component(Ge.name, Ge), d.component(Te.name, Te), d.component(Pe.name, Pe);
2911
- }, ja = {
2912
- install: Ba,
2913
- HzztKfbSlide: Ge,
2914
- HzztKfbView: Te,
2915
- HzztKfbToolbox: Pe
2916
- };
2917
- export {
2918
- xt as D,
2919
- ye as _,
2920
- Ml as a,
2921
- Tl as b,
2922
- Cl as c,
2923
- Hl as d,
2924
- Ll as e,
2925
- Il as f,
2926
- tt as g,
2927
- Ge as h,
2928
- Te as i,
2929
- Pe as j,
2930
- ja as k,
2931
- xl as l,
2932
- Vl as p,
2933
- $l as r,
2934
- El as s,
2935
- ce as u,
2936
- Sl as v
2937
- };