hzzt-kfb-slide 0.0.5 → 0.0.7

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