hzzt-kfb-slide 1.0.1 → 1.0.2
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.
- package/dist/components/{annotatelukjit1G.js → annotateBOHyE-BS.js} +12 -11
- package/dist/components/annotateBiwRHJDN.js +1 -0
- package/dist/components/{annotateVov2YxBu.js → annotateBzzswUfv.js} +1 -1
- package/dist/components/{annotateD7dWi1FB.js → annotateCK6hezNo.js} +1 -1
- package/dist/components/{arrowCircleBlOatQTw.js → arrowCircleCWgZY2Gf.js} +1 -1
- package/dist/components/{arrowCircleCVyo0kip.js → arrowCircleDJR-9OCD.js} +1 -1
- package/dist/components/{arrowDownC6_jSXHK.js → arrowDownBvce0u9c.js} +1 -1
- package/dist/components/{arrowDownk9aOufU8.js → arrowDownWhFOaN2S.js} +1 -1
- package/dist/components/{arrowLeftDLmH0pXC.js → arrowLeftBfOo4tCy.js} +1 -1
- package/dist/components/{arrowLeftCTy9Qktd.js → arrowLeftDdScm86H.js} +1 -1
- package/dist/components/{arrowRightBkTqafEZ.js → arrowRight7DRwBLb2.js} +1 -1
- package/dist/components/{arrowRightdIGqHIiX.js → arrowRightktODfALk.js} +1 -1
- package/dist/components/{arrowUpDOgb5oFJ.js → arrowUpBFgKhHLD.js} +1 -1
- package/dist/components/{arrowUpDldgH68L.js → arrowUpDuBQjmLC.js} +1 -1
- package/dist/components/{arrowDOM9W6NQ.js → arrowcQaNYOk_.js} +1 -1
- package/dist/components/{arrowCWKPERF0.js → arrowxlJNC3Xd.js} +1 -1
- package/dist/components/{bilateralBpS2RHKx.js → bilateralBx31Pt_f.js} +1 -1
- package/dist/components/{bilateralDlKnYRS8.js → bilateralCMUeHEqO.js} +1 -1
- package/dist/components/{channelc9ywFXtM.js → channel4txfMGOK.js} +1 -1
- package/dist/components/{channelDSRUa3_Z.js → channelDykWApvs.js} +1 -1
- package/dist/components/{checkBqtRjNfN.js → checkBXocVg_N.js} +1 -1
- package/dist/components/{checkDbaQ4MtI.js → checkCip_EEpj.js} +1 -1
- package/dist/components/{configBajbEZ2E.js → configChIS6jY0.js} +1 -1
- package/dist/components/{configTguxX3sM.js → configD5z_wcFp.js} +1 -1
- package/dist/components/{customrJhgsKZ6.js → customBkwNWgIG.js} +1 -1
- package/dist/components/{customCBfU-2jU.js → customDClB-7OW.js} +1 -1
- package/dist/components/{deleteCWbut_si.js → deleteBql6MXmA.js} +1 -1
- package/dist/components/{deletewtY8meT_.js → deleteDEV1CXd_.js} +1 -1
- package/dist/components/dotBKMhhwQJ.js +1 -0
- package/dist/components/{dotDLtvDHII.js → dotCkxO2y2_.js} +1 -1
- package/dist/components/dotD7t1uU2Y.js +124 -0
- package/dist/components/{dot_yJNkdt4.js → dotDFv5ULkE.js} +1 -1
- package/dist/components/{dotCJ2bKzEs.js → dotDbRony31.js} +1 -1
- package/dist/components/{dotBdW7vfr4.js → dotDsZ1hxaO.js} +1 -1
- package/dist/components/{downloadQFyOKD4P.js → download-j1kbLvu.js} +1 -1
- package/dist/components/{downloadCC8VSgAu.js → downloadB5Rtk_Ec.js} +3 -3
- package/dist/components/{downloadC53ZSW1Y.js → downloadCE7-kbWE.js} +1 -1
- package/dist/components/{downloadCoPXt-5r.js → downloadDyg64yHi.js} +1 -1
- package/dist/components/{ellipseCAelx2gK.js → ellipseXLAly11X.js} +1 -1
- package/dist/components/{ellipseD77J-bct.js → ellipsez5glo58z.js} +1 -1
- package/dist/components/{expandLeftkmM5Ythh.js → expandLeftDZGxiOkV.js} +1 -1
- package/dist/components/{expandLeftCI49nScM.js → expandLeftDzbIVQMl.js} +1 -1
- package/dist/components/{expandRightZqcbL_32.js → expandRightBcFL2opk.js} +1 -1
- package/dist/components/{expandRightBeGpnt0Z.js → expandRightDPL4kKOR.js} +1 -1
- package/dist/components/{flagr8Nh24lE.js → flagCEblUCIq.js} +1 -1
- package/dist/components/{flagDPzo3Cu7.js → flagDp5OHCjv.js} +1 -1
- package/dist/components/{flipCjfZSgxg.js → flipBFbQcb03.js} +1 -1
- package/dist/components/{flipDDLkqofk.js → flipBQ0Xod0L.js} +1 -1
- package/dist/components/{fontB0VPgGy_.js → fontB4y8mhGP.js} +1 -1
- package/dist/components/{fontCgY0yNcc.js → fontDl6_nSTg.js} +1 -1
- package/dist/components/{fullscreenBqKXQxn5.js → fullscreenCH9ZzQyZ.js} +1 -1
- package/dist/components/{fullscreen83hUOqOl.js → fullscreenCZBMHIF7.js} +1 -1
- package/dist/components/{fullscreenBlBkycp2.js → fullscreenD_TY5Nj-.js} +2 -2
- package/dist/components/{fullscreenBOOMgudl.js → fullscreenw73vtLHZ.js} +1 -1
- package/dist/components/indexChPoAAH8.js +3558 -0
- package/dist/components/indexD0Afmk2w.js +4 -0
- package/dist/components/{infoCoGMo2cz.js → infoCGV0Ckdj.js} +1 -1
- package/dist/components/{infoCYmzRV3N.js → infoCcN2ke9s.js} +1 -1
- package/dist/components/{levelBs_8o0Cn.js → levelBoZTrlWY.js} +1 -1
- package/dist/components/{levelD0ItnsdU.js → levelSLHseJUd.js} +1 -1
- package/dist/components/{lineCh8hikaf.js → lineB4tlEhOz.js} +1 -1
- package/dist/components/{lineGuDrf61V.js → lineai7PmGoN.js} +1 -1
- package/dist/components/measureBhI4DO7U.js +25 -0
- package/dist/components/measureP6lTvt_p.js +1 -0
- package/dist/components/{microscopeCqKPXqCW.js → microscopeBMbzVPf5.js} +1 -1
- package/dist/components/{microscopeBALmxHP4.js → microscopeBMmZiutB.js} +1 -1
- package/dist/components/{microscopeDXv8n9ip.js → microscopeBuHGpte5.js} +1 -1
- package/dist/components/{microscopeCHxhoGwQ.js → microscopeDlizQREt.js} +3 -3
- package/dist/components/{movex-OAOiV5.js → moveBN48Eruo.js} +1 -1
- package/dist/components/{moveB9m7dZU4.js → moveBORYuNEh.js} +3 -3
- package/dist/components/{moveDhB2N5L3.js → moveD5fPz3_o.js} +1 -1
- package/dist/components/{moveCnwaiSQn.js → moveDMtTFV7a.js} +1 -1
- package/dist/components/{nextsfvoONH_.js → nextBH47Byfp.js} +1 -1
- package/dist/components/{nextBDtU6djG.js → nextCnqehpYc.js} +1 -1
- package/dist/components/{polygonBAOJcIjz.js → polygonCNoWnb2M.js} +1 -1
- package/dist/components/{polygonU53YjTVm.js → polygonvNsuSZr2.js} +1 -1
- package/dist/components/{prevDsmv_dwB.js → prevBX_D_1FN.js} +1 -1
- package/dist/components/{prevCLz6h8pH.js → previeYap8xB.js} +1 -1
- package/dist/components/{processDlmzK_X6.js → process7Wnp-DLW.js} +1 -1
- package/dist/components/{processD5R39n4C.js → processCN8_do68.js} +3 -3
- package/dist/components/{processDs967nMh.js → processDOlJ_YFV.js} +1 -1
- package/dist/components/{processBf-a8h50.js → processDS-q-T9u.js} +1 -1
- package/dist/components/{rectanglev7ZZIuMq.js → rectangleBZTD1YG5.js} +1 -1
- package/dist/components/{rectangleBq0D0Ieo.js → rectangleDD23CZRf.js} +1 -1
- package/dist/components/{rotatemkp7yXAo.js → rotateBGZgayTz.js} +1 -1
- package/dist/components/{rotateC4fB8W79.js → rotateBR4JOMZq.js} +1 -1
- package/dist/components/{rotate4CB3LeRI.js → rotateDQ7H7OQH.js} +1 -1
- package/dist/components/{rotate0ExHfutV.js → rotateDoqVfopB.js} +4 -4
- package/dist/components/{settingC9ssGpPJ.js → setting2e5gN6yv.js} +1 -1
- package/dist/components/{settingBwnMKEQK.js → settingB1Lh8oPl.js} +1 -1
- package/dist/components/{settingDdb14B4b.js → settingB8WACAuV.js} +3 -3
- package/dist/components/{settingCKOYI0nh.js → settingDVLfrSX6.js} +1 -1
- package/dist/components/{starD3fJLs8P.js → starB8Jj8B7G.js} +1 -1
- package/dist/components/{starD8V2H8yu.js → starBzvIjo3q.js} +1 -1
- package/dist/components/{tailorCjaHDLzO.js → tailorCg8ygNd0.js} +1 -1
- package/dist/components/{tailorvzc7YCyV.js → tailorLoKadwnW.js} +1 -1
- package/dist/components/useCommonBBvTTBdi.js +1 -0
- package/dist/components/useCommonCzBK1cvQ.js +22 -0
- package/dist/components/{voiceDot4Ny7i.js → voiceBCkA6RrA.js} +1 -1
- package/dist/components/{voiceBbW9AGig.js → voiceCKZjRzRM.js} +1 -1
- package/dist/components/zoomDImPX6s2.js +65 -0
- package/dist/components/{zoomInWo9D4be_.js → zoomInBltposUo.js} +1 -1
- package/dist/components/{zoomInC1rAQNbj.js → zoomInCy_C3q6n.js} +1 -1
- package/dist/components/{zoomOutBgFMZ1Iq.js → zoomOutBSqsR8_b.js} +1 -1
- package/dist/components/{zoomOutPKjlrYTj.js → zoomOutCRXlTIS0.js} +1 -1
- package/dist/components/zoomU5MDBf57.js +1 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.css +1 -1
- package/dist/index.es.js +1 -1
- package/package.json +3 -2
- package/types/components/HzztKfbSlide.vue.d.ts +2 -0
- package/types/components/KfbIcon.vue.d.ts +9 -0
- package/types/components/KfbSlideList.vue.d.ts +8 -6
- package/types/components/KfbToolbox.vue.d.ts +1 -0
- package/types/components/KfbView/KfbChannel.vue.d.ts +1 -1
- package/types/components/KfbView/index.d.ts +7 -2
- package/types/components/KfbView/index.vue.d.ts +87 -2
- package/types/components/KfbView/useLabel.d.ts +1 -1
- package/types/components/KfbView/useTailor.d.ts +4 -4
- package/types/components/icon/mark/measure.vue.d.ts +2 -0
- package/types/instances.d.ts +24 -2
- package/web-types.json +4 -1
- package/dist/components/annotatezQSQm_m5.js +0 -1
- package/dist/components/dotBUfszbQS.js +0 -115
- package/dist/components/dotBa_CxlZg.js +0 -1
- package/dist/components/indexBpatO5y8.js +0 -4
- package/dist/components/indexF91KX9_v.js +0 -3148
- package/dist/components/useCommonCOUqxgFA.js +0 -22
- package/dist/components/useCommonkgnc9sYb.js +0 -1
- package/dist/components/zoomD4yF6clm.js +0 -63
- package/dist/components/zoomDxM6kUOV.js +0 -1
|
@@ -115,6 +115,7 @@ declare const __VLS_component: import("vue").DefineComponent<KfbProps, {
|
|
|
115
115
|
moveToLabel: (point: import("@/components/KfbView/index.ts").Point) => void;
|
|
116
116
|
getCenterPoint: (rect: Rect) => import("@/components/KfbView/index.ts").Point;
|
|
117
117
|
imageToViewerElementRectangle: (rect: Rect) => Rect;
|
|
118
|
+
imageToViewerElementCoordinates: (a: number, b: number) => import("@/components/KfbView/index.ts").Point;
|
|
118
119
|
} | undefined;
|
|
119
120
|
navigator?: {
|
|
120
121
|
element: HTMLElement;
|
|
@@ -128,6 +129,7 @@ declare const __VLS_component: import("vue").DefineComponent<KfbProps, {
|
|
|
128
129
|
width: number;
|
|
129
130
|
now?: boolean;
|
|
130
131
|
color?: string;
|
|
132
|
+
contents?: any[];
|
|
131
133
|
}, data?: unknown) => void;
|
|
132
134
|
};
|
|
133
135
|
}, KfbViewInterface | {
|
|
@@ -230,6 +232,7 @@ declare const __VLS_component: import("vue").DefineComponent<KfbProps, {
|
|
|
230
232
|
moveToLabel: (point: import("@/components/KfbView/index.ts").Point) => void;
|
|
231
233
|
getCenterPoint: (rect: Rect) => import("@/components/KfbView/index.ts").Point;
|
|
232
234
|
imageToViewerElementRectangle: (rect: Rect) => Rect;
|
|
235
|
+
imageToViewerElementCoordinates: (a: number, b: number) => import("@/components/KfbView/index.ts").Point;
|
|
233
236
|
} | undefined;
|
|
234
237
|
navigator?: {
|
|
235
238
|
element: HTMLElement;
|
|
@@ -243,16 +246,98 @@ declare const __VLS_component: import("vue").DefineComponent<KfbProps, {
|
|
|
243
246
|
width: number;
|
|
244
247
|
now?: boolean;
|
|
245
248
|
color?: string;
|
|
249
|
+
contents?: any[];
|
|
246
250
|
}, data?: unknown) => void;
|
|
247
251
|
};
|
|
248
252
|
}>;
|
|
249
253
|
degrees: Ref<number, number>;
|
|
250
254
|
zoom: Ref<number, number>;
|
|
255
|
+
localLabelList: Ref<{
|
|
256
|
+
id?: number | undefined;
|
|
257
|
+
parent_id?: number | undefined;
|
|
258
|
+
lineWidth?: number | undefined;
|
|
259
|
+
strokeStyle?: string | undefined;
|
|
260
|
+
fillStyle?: string | undefined;
|
|
261
|
+
fontSize?: number | undefined;
|
|
262
|
+
description?: string | undefined;
|
|
263
|
+
text?: string | undefined;
|
|
264
|
+
angle?: number | undefined;
|
|
265
|
+
measure?: boolean | undefined;
|
|
266
|
+
points?: {
|
|
267
|
+
x: number;
|
|
268
|
+
y: number;
|
|
269
|
+
minus?: ((point: import("@/components/KfbView/index.ts").Point) => import("@/components/KfbView/index.ts").Point) | undefined;
|
|
270
|
+
clone?: (() => import("@/components/KfbView/index.ts").Point) | undefined;
|
|
271
|
+
}[] | undefined;
|
|
272
|
+
tool?: string | undefined;
|
|
273
|
+
subType?: string | undefined;
|
|
274
|
+
src?: string | undefined;
|
|
275
|
+
scale?: number | undefined;
|
|
276
|
+
region?: {
|
|
277
|
+
x: number;
|
|
278
|
+
y: number;
|
|
279
|
+
width: number;
|
|
280
|
+
height: number;
|
|
281
|
+
} | undefined;
|
|
282
|
+
move?: boolean | undefined;
|
|
283
|
+
resize?: boolean | undefined;
|
|
284
|
+
isROI?: boolean | undefined;
|
|
285
|
+
isClose?: boolean | undefined;
|
|
286
|
+
select?: boolean | undefined;
|
|
287
|
+
show?: boolean | undefined;
|
|
288
|
+
isAi?: boolean | undefined;
|
|
289
|
+
custom?: boolean | undefined;
|
|
290
|
+
cls?: string | undefined;
|
|
291
|
+
score?: number | undefined;
|
|
292
|
+
imageUrl?: string | undefined;
|
|
293
|
+
__other__: any;
|
|
294
|
+
__data__: any;
|
|
295
|
+
}[], Label[] | {
|
|
296
|
+
id?: number | undefined;
|
|
297
|
+
parent_id?: number | undefined;
|
|
298
|
+
lineWidth?: number | undefined;
|
|
299
|
+
strokeStyle?: string | undefined;
|
|
300
|
+
fillStyle?: string | undefined;
|
|
301
|
+
fontSize?: number | undefined;
|
|
302
|
+
description?: string | undefined;
|
|
303
|
+
text?: string | undefined;
|
|
304
|
+
angle?: number | undefined;
|
|
305
|
+
measure?: boolean | undefined;
|
|
306
|
+
points?: {
|
|
307
|
+
x: number;
|
|
308
|
+
y: number;
|
|
309
|
+
minus?: ((point: import("@/components/KfbView/index.ts").Point) => import("@/components/KfbView/index.ts").Point) | undefined;
|
|
310
|
+
clone?: (() => import("@/components/KfbView/index.ts").Point) | undefined;
|
|
311
|
+
}[] | undefined;
|
|
312
|
+
tool?: string | undefined;
|
|
313
|
+
subType?: string | undefined;
|
|
314
|
+
src?: string | undefined;
|
|
315
|
+
scale?: number | undefined;
|
|
316
|
+
region?: {
|
|
317
|
+
x: number;
|
|
318
|
+
y: number;
|
|
319
|
+
width: number;
|
|
320
|
+
height: number;
|
|
321
|
+
} | undefined;
|
|
322
|
+
move?: boolean | undefined;
|
|
323
|
+
resize?: boolean | undefined;
|
|
324
|
+
isROI?: boolean | undefined;
|
|
325
|
+
isClose?: boolean | undefined;
|
|
326
|
+
select?: boolean | undefined;
|
|
327
|
+
show?: boolean | undefined;
|
|
328
|
+
isAi?: boolean | undefined;
|
|
329
|
+
custom?: boolean | undefined;
|
|
330
|
+
cls?: string | undefined;
|
|
331
|
+
score?: number | undefined;
|
|
332
|
+
imageUrl?: string | undefined;
|
|
333
|
+
__other__: any;
|
|
334
|
+
__data__: any;
|
|
335
|
+
}[]>;
|
|
251
336
|
forceRedraw: (process?: import("@/components/KfbView/index.ts").Process) => void;
|
|
252
337
|
toggleFlip: typeof toggleFlip;
|
|
253
338
|
startDraw: typeof startDraw;
|
|
254
339
|
endDraw: typeof endDraw;
|
|
255
|
-
shotScreen: (
|
|
340
|
+
shotScreen: (name: string, kfbViewRefs: Ref<any[]>) => void;
|
|
256
341
|
info: typeof info;
|
|
257
342
|
scopeChange: typeof scopeChange;
|
|
258
343
|
updateGrid: typeof updateGrid;
|
|
@@ -265,7 +350,7 @@ declare const __VLS_component: import("vue").DefineComponent<KfbProps, {
|
|
|
265
350
|
zoomTo: typeof zoomTo;
|
|
266
351
|
jumpToLabel: (label: Label, zoom?: number) => void;
|
|
267
352
|
jumpToPosition: typeof jumpToPosition;
|
|
268
|
-
reloadLabelList: () => void;
|
|
353
|
+
reloadLabelList: (list?: Label[]) => void;
|
|
269
354
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
270
355
|
tool: (action: string, value?: any) => any;
|
|
271
356
|
}, string, import("vue").PublicProps, Readonly<KfbProps> & Readonly<{
|
|
@@ -166,7 +166,7 @@ export declare function useLabel(props: KfbProps, emit: Emits, kfbView: Ref<KfbV
|
|
|
166
166
|
}[]>;
|
|
167
167
|
initLabel: () => void;
|
|
168
168
|
jumpToLabel: (label: Label, zoom?: number) => void;
|
|
169
|
-
reloadLabelList: () => void;
|
|
169
|
+
reloadLabelList: (list?: Label[]) => void;
|
|
170
170
|
eventHandel: (type: string) => (label?: Label) => Promise<void> | undefined;
|
|
171
171
|
addHandle: (label?: Label) => Promise<void>;
|
|
172
172
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { KfbViewInterface } from "@/components/KfbView/index.ts";
|
|
2
|
-
import
|
|
1
|
+
import { FileInterface, KfbViewInterface } from "@/components/KfbView/index.ts";
|
|
2
|
+
import { Ref } from "vue";
|
|
3
3
|
import { Emits } from "@/instances.ts";
|
|
4
|
-
export declare function useTailor(emit: Emits, kfbView: Ref<KfbViewInterface>): {
|
|
4
|
+
export declare function useTailor(emit: Emits, t: Function, kfbView: Ref<KfbViewInterface>, zoom: Ref<number>, kfbInfo: Ref<FileInterface>): {
|
|
5
5
|
tailorEvent: () => void;
|
|
6
|
-
shotScreen: (
|
|
6
|
+
shotScreen: (name: string, kfbViewRefs: Ref<any[]>) => void;
|
|
7
7
|
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
package/types/instances.d.ts
CHANGED
|
@@ -2,7 +2,12 @@ import type { VNode } from "vue";
|
|
|
2
2
|
import { FileInterface, KfbProps, Label, Menu, Microscope, Process, TileParams, Watermark } from "@/components/KfbView/index.ts";
|
|
3
3
|
export type ToolboxMenu = {
|
|
4
4
|
name: string;
|
|
5
|
-
props
|
|
5
|
+
props: {
|
|
6
|
+
name?: string;
|
|
7
|
+
text?: string;
|
|
8
|
+
component?: VNode | string | null | undefined;
|
|
9
|
+
process?: Process;
|
|
10
|
+
};
|
|
6
11
|
slots?: Record<string, (...args: any[]) => VNode | string | null | undefined>;
|
|
7
12
|
show?: boolean;
|
|
8
13
|
};
|
|
@@ -44,7 +49,7 @@ export interface Kfb {
|
|
|
44
49
|
fileHandle?: (slide: DigitalSlide) => Promise<FileInterface>;
|
|
45
50
|
labelHandle?: (type: string, slide: DigitalSlide, data?: any) => Promise<Label[]>;
|
|
46
51
|
navigatorHandle?: (type: string, slide: DigitalSlide, data?: any) => Promise<Label[]>;
|
|
47
|
-
tileHandle?: (params: TileParams) => string;
|
|
52
|
+
tileHandle?: (params: TileParams, slide: DigitalSlide) => string;
|
|
48
53
|
pathologyHandle: (slide: DigitalSlide) => Promise<boolean>;
|
|
49
54
|
uploadHandle?: (slide: DigitalSlide, label: Label, blob: Blob) => Promise<string>;
|
|
50
55
|
options?: Record<string, any>;
|
|
@@ -74,7 +79,24 @@ export interface Props {
|
|
|
74
79
|
showKeyboard?: boolean;
|
|
75
80
|
showMenuText?: boolean;
|
|
76
81
|
showWatermark?: boolean;
|
|
82
|
+
showZrender?: boolean;
|
|
83
|
+
editPathology?: boolean;
|
|
84
|
+
pathologyNumber?: string;
|
|
77
85
|
}
|
|
78
86
|
export interface Emits {
|
|
79
87
|
(e: 'tool', action: string, value?: any): void;
|
|
80
88
|
}
|
|
89
|
+
export interface MenuConfigOtherSetting {
|
|
90
|
+
screenshotLocally: boolean;
|
|
91
|
+
screenshotFormat: string;
|
|
92
|
+
screenshotWatermark: {
|
|
93
|
+
time: boolean;
|
|
94
|
+
mac: boolean;
|
|
95
|
+
scale: boolean;
|
|
96
|
+
ratio: boolean;
|
|
97
|
+
};
|
|
98
|
+
screenshotSize: {
|
|
99
|
+
w: number;
|
|
100
|
+
h: number;
|
|
101
|
+
};
|
|
102
|
+
}
|
package/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"framework": "vue",
|
|
3
3
|
"name": "hzzt-kfb-slide",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.2",
|
|
5
5
|
"contributions": {
|
|
6
6
|
"html": {
|
|
7
7
|
"description-markup": "markdown",
|
|
@@ -145,6 +145,9 @@
|
|
|
145
145
|
{
|
|
146
146
|
"name": "kfb"
|
|
147
147
|
},
|
|
148
|
+
{
|
|
149
|
+
"name": "analysis"
|
|
150
|
+
},
|
|
148
151
|
{
|
|
149
152
|
"name": "default"
|
|
150
153
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var b=Object.defineProperty;var c=Object.getOwnPropertySymbols;var h=Object.prototype.hasOwnProperty,V=Object.prototype.propertyIsEnumerable;var u=(n,t,o)=>t in n?b(n,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):n[t]=o,d=(n,t)=>{for(var o in t||(t={}))h.call(t,o)&&u(n,o,t[o]);if(c)for(var o of c(t))V.call(t,o)&&u(n,o,t[o]);return n};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),f=require("./useCommonkgnc9sYb.js"),l=require("element-plus"),y=require("./annotateVov2YxBu.js"),p=require("./indexBpatO5y8.js"),E=["onClick"],N=e.defineComponent({name:"ToolAnnotate",__name:"annotate",props:e.mergeDefaults({size:{},text:{},name:{},component:{},isPrevent:{type:Boolean},callback:{type:Function},options:{}},f.defaultProps),emits:["tool"],setup(n,{emit:t}){const o=n,m=t,{t:r,textClass:g}=f.useCommon(),v={line:"Line",arrow:"Arrow",bilateral:"Bilateral",rectangle:"Rectangle",ellipse:"Ellipse",polygon:"Polygon",star:"Star",flag:"Flag",dot:"Dot",font:"Font",voice:"Voice"},i=e.ref(!1);function x(a){i.value=!1,m("tool","annotate",d({tool:a.substring(0,1).toLocaleUpperCase()+a.substring(1),once:!0},o.options||{}))}function _(){i.value=!i.value}return(a,w)=>(e.openBlock(),e.createBlock(e.unref(l.ElPopover),{visible:i.value,"popper-class":"el-popover-padding-0",placement:"bottom",width:"220px",trigger:"click",teleported:!1},{reference:e.withCtx(()=>[e.createElementVNode("div",{class:"hzzt-kfb-toolbox__icon",onClick:_},[e.createVNode(e.unref(l.ElIcon),{size:a.size},{default:e.withCtx(()=>[e.createVNode(y.default)]),_:1},8,["size"]),e.createElementVNode("div",{class:e.normalizeClass(e.unref(g))},e.toDisplayString(e.unref(r)(a.text||"标注")),3)])]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ElCard),{shadow:"never",header:e.unref(r)("标注工具"),"body-style":{padding:"8px"}},{default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createVNode(e.unref(l.ElText),{type:"danger"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("按ESC可退出标注模式")),1)]),_:1})]),e.createElementVNode("div",null,[e.createVNode(e.unref(l.ElText),{type:"danger"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("点击标注按Delete键可删除标注")),1)]),_:1})]),e.createVNode(e.unref(l.ElRow),null,{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(v,(s,C)=>e.createVNode(e.unref(l.ElCol),{key:C,class:"flex justify-content-center align-items-center",span:8},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"hzzt-kfb-toolbox-annotate-icon",onClick:z=>x(s)},[e.createVNode(p._sfc_main,{size:"32",name:`mark${s}`},null,8,["name"])],8,E)]),_:2},1024)),64))]),_:1})]),_:1},8,["header"])]),_:1},8,["visible"]))}}),k=p._export_sfc(N,[["__scopeId","data-v-72aefbbd"]]);exports.default=k;
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import { defineComponent as y, mergeDefaults as z, ref as m, inject as E, watch as F, createBlock as k, openBlock as i, unref as a, withCtx as s, createVNode as u, createElementVNode as c, toDisplayString as f, createElementBlock as b, Fragment as w, renderList as B, normalizeStyle as D, createCommentVNode as S, normalizeClass as V } from "vue";
|
|
2
|
-
import { u as A, d as L } from "./useCommonCOUqxgFA.js";
|
|
3
|
-
import N from "./dot_yJNkdt4.js";
|
|
4
|
-
import P from "./checkBqtRjNfN.js";
|
|
5
|
-
import { ElPopover as j, ElCard as I, ElIcon as h } from "element-plus";
|
|
6
|
-
import { _ as T } from "./indexF91KX9_v.js";
|
|
7
|
-
const $ = { class: "margin-b-1" }, q = { class: "flex align-items-center" }, G = ["onClick"], H = /* @__PURE__ */ y({
|
|
8
|
-
name: "ToolDot",
|
|
9
|
-
__name: "dot",
|
|
10
|
-
props: /* @__PURE__ */ z({
|
|
11
|
-
size: {},
|
|
12
|
-
text: {},
|
|
13
|
-
name: {},
|
|
14
|
-
component: {},
|
|
15
|
-
isPrevent: { type: Boolean },
|
|
16
|
-
callback: { type: Function },
|
|
17
|
-
options: {}
|
|
18
|
-
}, L),
|
|
19
|
-
emits: ["tool"],
|
|
20
|
-
setup(J, { emit: _ }) {
|
|
21
|
-
const p = _, { t: v, textClass: C } = A(), n = m(!1), r = m([
|
|
22
|
-
{ label: "#004BFF", value: 0, checked: !1 },
|
|
23
|
-
{ label: "#FF4B40", value: 0, checked: !1 },
|
|
24
|
-
{ label: "#FFAA00", value: 0, checked: !1 },
|
|
25
|
-
{ label: "#51C964", value: 0, checked: !1 },
|
|
26
|
-
{ label: "#00BEFF", value: 0, checked: !1 },
|
|
27
|
-
{ label: "#8C58CE", value: 0, checked: !1 },
|
|
28
|
-
{ label: "#F261A7", value: 0, checked: !1 }
|
|
29
|
-
]), d = E("kfbViewRef");
|
|
30
|
-
F(() => {
|
|
31
|
-
var e, l;
|
|
32
|
-
return (l = (e = d == null ? void 0 : d.value) == null ? void 0 : e.kfbView) == null ? void 0 : l.labelList;
|
|
33
|
-
}, (e) => {
|
|
34
|
-
r.value.forEach((l) => {
|
|
35
|
-
var o;
|
|
36
|
-
l.value = (o = (e || []).filter((t) => (t == null ? void 0 : t.custom) && (t == null ? void 0 : t.strokeStyle) === l.label && (t == null ? void 0 : t.tool) === "Dot")) == null ? void 0 : o.length;
|
|
37
|
-
});
|
|
38
|
-
});
|
|
39
|
-
function g(e) {
|
|
40
|
-
r.value.forEach((l) => {
|
|
41
|
-
l.checked = !1;
|
|
42
|
-
}), e.checked = !0, p("tool", "annotate", {
|
|
43
|
-
strokeStyle: e.label,
|
|
44
|
-
tool: "Dot",
|
|
45
|
-
once: !1,
|
|
46
|
-
custom: !0,
|
|
47
|
-
subType: "count"
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
function x() {
|
|
51
|
-
n.value = !n.value, n.value || r.value.forEach((e) => {
|
|
52
|
-
e.checked = !1;
|
|
53
|
-
}), p("tool", "endDraw");
|
|
54
|
-
}
|
|
55
|
-
return (e, l) => (i(), k(a(j), {
|
|
56
|
-
visible: n.value,
|
|
57
|
-
"popper-class": "el-popover-padding-0",
|
|
58
|
-
placement: "bottom",
|
|
59
|
-
width: "300px",
|
|
60
|
-
trigger: "click",
|
|
61
|
-
teleported: !1
|
|
62
|
-
}, {
|
|
63
|
-
reference: s(() => [
|
|
64
|
-
c("div", {
|
|
65
|
-
class: "hzzt-kfb-toolbox__icon",
|
|
66
|
-
onClick: l[0] || (l[0] = (o) => x())
|
|
67
|
-
}, [
|
|
68
|
-
u(a(h), { size: e.size }, {
|
|
69
|
-
default: s(() => [
|
|
70
|
-
u(N)
|
|
71
|
-
]),
|
|
72
|
-
_: 1
|
|
73
|
-
}, 8, ["size"]),
|
|
74
|
-
c("div", {
|
|
75
|
-
class: V(a(C))
|
|
76
|
-
}, f(a(v)(e.text || "打点")), 3)
|
|
77
|
-
])
|
|
78
|
-
]),
|
|
79
|
-
default: s(() => [
|
|
80
|
-
u(a(I), { shadow: "never" }, {
|
|
81
|
-
default: s(() => [
|
|
82
|
-
c("div", null, [
|
|
83
|
-
c("p", $, f(a(v)("按下ESC键结束打点操作")), 1),
|
|
84
|
-
c("div", q, [
|
|
85
|
-
(i(!0), b(w, null, B(r.value, (o) => (i(), b("div", {
|
|
86
|
-
key: o.label,
|
|
87
|
-
class: "flex column align-items-center"
|
|
88
|
-
}, [
|
|
89
|
-
c("div", {
|
|
90
|
-
style: D({ "background-color": o.label }),
|
|
91
|
-
class: "hzzt-kfb-toolbox-dot__box flex justify-content-center align-items-center",
|
|
92
|
-
onClick: (t) => g(o)
|
|
93
|
-
}, [
|
|
94
|
-
u(a(h), { size: "16" }, {
|
|
95
|
-
default: s(() => [
|
|
96
|
-
o.checked ? (i(), k(P, { key: 0 })) : S("", !0)
|
|
97
|
-
]),
|
|
98
|
-
_: 2
|
|
99
|
-
}, 1024)
|
|
100
|
-
], 12, G),
|
|
101
|
-
c("p", null, f(o.value ? o.value : " "), 1)
|
|
102
|
-
]))), 128))
|
|
103
|
-
])
|
|
104
|
-
])
|
|
105
|
-
]),
|
|
106
|
-
_: 1
|
|
107
|
-
})
|
|
108
|
-
]),
|
|
109
|
-
_: 1
|
|
110
|
-
}, 8, ["visible"]));
|
|
111
|
-
}
|
|
112
|
-
}), W = /* @__PURE__ */ T(H, [["__scopeId", "data-v-34de7854"]]);
|
|
113
|
-
export {
|
|
114
|
-
W as default
|
|
115
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),d=require("./useCommonkgnc9sYb.js"),m=require("./dotBdW7vfr4.js"),h=require("./checkDbaQ4MtI.js"),r=require("element-plus"),b=require("./indexBpatO5y8.js"),C={class:"margin-b-1"},_={class:"flex align-items-center"},E=["onClick"],g=e.defineComponent({name:"ToolDot",__name:"dot",props:e.mergeDefaults({size:{},text:{},name:{},component:{},isPrevent:{type:Boolean},callback:{type:Function},options:{}},d.defaultProps),emits:["tool"],setup(y,{emit:f}){const u=f,{t:i,textClass:v}=d.useCommon(),n=e.ref(!1),c=e.ref([{label:"#004BFF",value:0,checked:!1},{label:"#FF4B40",value:0,checked:!1},{label:"#FFAA00",value:0,checked:!1},{label:"#51C964",value:0,checked:!1},{label:"#00BEFF",value:0,checked:!1},{label:"#8C58CE",value:0,checked:!1},{label:"#F261A7",value:0,checked:!1}]),s=e.inject("kfbViewRef");e.watch(()=>{var l,t;return(t=(l=s==null?void 0:s.value)==null?void 0:l.kfbView)==null?void 0:t.labelList},l=>{c.value.forEach(t=>{var o;t.value=(o=(l||[]).filter(a=>(a==null?void 0:a.custom)&&(a==null?void 0:a.strokeStyle)===t.label&&(a==null?void 0:a.tool)==="Dot"))==null?void 0:o.length})});function p(l){c.value.forEach(t=>{t.checked=!1}),l.checked=!0,u("tool","annotate",{strokeStyle:l.label,tool:"Dot",once:!1,custom:!0,subType:"count"})}function k(){n.value=!n.value,n.value||c.value.forEach(l=>{l.checked=!1}),u("tool","endDraw")}return(l,t)=>(e.openBlock(),e.createBlock(e.unref(r.ElPopover),{visible:n.value,"popper-class":"el-popover-padding-0",placement:"bottom",width:"300px",trigger:"click",teleported:!1},{reference:e.withCtx(()=>[e.createElementVNode("div",{class:"hzzt-kfb-toolbox__icon",onClick:t[0]||(t[0]=o=>k())},[e.createVNode(e.unref(r.ElIcon),{size:l.size},{default:e.withCtx(()=>[e.createVNode(m.default)]),_:1},8,["size"]),e.createElementVNode("div",{class:e.normalizeClass(e.unref(v))},e.toDisplayString(e.unref(i)(l.text||"打点")),3)])]),default:e.withCtx(()=>[e.createVNode(e.unref(r.ElCard),{shadow:"never"},{default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createElementVNode("p",C,e.toDisplayString(e.unref(i)("按下ESC键结束打点操作")),1),e.createElementVNode("div",_,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,o=>(e.openBlock(),e.createElementBlock("div",{key:o.label,class:"flex column align-items-center"},[e.createElementVNode("div",{style:e.normalizeStyle({"background-color":o.label}),class:"hzzt-kfb-toolbox-dot__box flex justify-content-center align-items-center",onClick:a=>p(o)},[e.createVNode(e.unref(r.ElIcon),{size:"16"},{default:e.withCtx(()=>[o.checked?(e.openBlock(),e.createBlock(h.default,{key:0})):e.createCommentVNode("",!0)]),_:2},1024)],12,E),e.createElementVNode("p",null,e.toDisplayString(o.value?o.value:" "),1)]))),128))])])]),_:1})]),_:1},8,["visible"]))}}),x=b._export_sfc(g,[["__scopeId","data-v-34de7854"]]);exports.default=x;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
"use strict";var lt=Object.defineProperty,at=Object.defineProperties;var rt=Object.getOwnPropertyDescriptors;var Ae=Object.getOwnPropertySymbols;var it=Object.prototype.hasOwnProperty,st=Object.prototype.propertyIsEnumerable;var Me=(c,t,n)=>t in c?lt(c,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):c[t]=n,I=(c,t)=>{for(var n in t||(t={}))it.call(t,n)&&Me(c,n,t[n]);if(Ae)for(var n of Ae(t))st.call(t,n)&&Me(c,n,t[n]);return c},Y=(c,t)=>at(c,rt(t));var J=(c,t,n)=>new Promise((o,y)=>{var f=v=>{try{s(n.next(v))}catch(h){y(h)}},i=v=>{try{s(n.throw(v))}catch(h){y(h)}},s=v=>v.done?o(v.value):Promise.resolve(v.value).then(f,i);s((n=n.apply(c,t)).next())});const e=require("vue"),b=require("element-plus"),Q=require("@vueuse/core"),F=require("kfb-view"),ut=require("v-lazy-image"),ke=Symbol("I18N_INJECT_KEY");function K(){const c=e.inject(ke),t=n=>n;return{locale:c==null?void 0:c.locale,t:(c==null?void 0:c.t)||t}}const ct={install(c,t){c.provide(ke,t==null?void 0:t.global)}},R=e.ref({annotate:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./annotateVov2YxBu.js")))),arrowCircle:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./arrowCircleBlOatQTw.js")))),check:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./checkDbaQ4MtI.js")))),dot:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./dotBdW7vfr4.js")))),flip:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./flipDDLkqofk.js")))),info:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./infoCYmzRV3N.js")))),microscope:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./microscopeBALmxHP4.js")))),move:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./movex-OAOiV5.js")))),next:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./nextsfvoONH_.js")))),prev:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./prevDsmv_dwB.js")))),process:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./processDs967nMh.js")))),rotate:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./rotate4CB3LeRI.js")))),fullscreen:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./fullscreenBqKXQxn5.js")))),setting:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./settingBwnMKEQK.js")))),tailor:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./tailorCjaHDLzO.js")))),download:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./downloadC53ZSW1Y.js")))),config:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./configTguxX3sM.js")))),arrowDown:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./arrowDownC6_jSXHK.js")))),arrowUp:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./arrowUpDldgH68L.js")))),arrowLeft:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./arrowLeftCTy9Qktd.js")))),arrowRight:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./arrowRightdIGqHIiX.js")))),zoomIn:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./zoomInC1rAQNbj.js")))),zoomOut:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./zoomOutPKjlrYTj.js")))),level:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./levelBs_8o0Cn.js")))),channel:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./channelc9ywFXtM.js")))),delete:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./deleteCWbut_si.js")))),expandLeft:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./expandLeftkmM5Ythh.js")))),expandRight:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./expandRightZqcbL_32.js")))),markLine:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./lineGuDrf61V.js")))),markArrow:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./arrowCWKPERF0.js")))),markBilateral:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./bilateralBpS2RHKx.js")))),markRectangle:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./rectanglev7ZZIuMq.js")))),markEllipse:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./ellipseD77J-bct.js")))),markPolygon:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./polygonU53YjTVm.js")))),markFlag:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./flagDPzo3Cu7.js")))),markStar:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./starD8V2H8yu.js")))),markDot:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./dotDLtvDHII.js")))),markFont:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./fontCgY0yNcc.js")))),markVoice:e.markRaw(e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./voiceDot4Ny7i.js"))))}),D=e.defineComponent({__name:"KfbIcon",props:{name:{type:[String,Number],required:!0}},setup(c){return(t,n)=>(e.openBlock(),e.createBlock(e.unref(b.ElIcon),e.normalizeProps(e.guardReactiveProps(t.$attrs)),{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(R)[c.name])))]),_:1},16))}}),dt={class:"hzzt-kfb-tool-config"},ft={class:"hzzt-kfb-tool-config__title margin-b-2"},mt={class:"hzzt-kfb-tool-config__block flex align-items-center"},vt={class:"hzzt-kfb-tool-config__icon flex align-items-center justify-content-center"},pt={class:"margin-l-4 flex-1"},ht={class:"hzzt-kfb-tool-config__title"},gt={class:"flex align-items-center"},yt={class:"margin-t-2 margin-b-2",style:{width:"160px"}},wt={class:"flex align-items-center"},kt={class:"margin-t-2 margin-b-2",style:{width:"160px"}},_t={class:"flex align-items-center"},bt={class:"margin-t-2 margin-b-2",style:{width:"160px"}},Ct={class:"flex align-items-center"},Vt={class:"margin-t-2 margin-b-2",style:{width:"160px"}},Et=e.defineComponent({name:"KfbToolConfig",__name:"KfbToolConfig",props:{menus:{default:()=>[]},menusModifiers:{}},emits:["update:menus"],setup(c){const t=e.useModel(c,"menus"),{t:n}=K(),o=e.computed(()=>t.value.filter(a=>a.name!=="line"&&a.name!=="config"&&a.name!=="zoom")),y={fullscreen:n("全屏"),next:n("上一张"),prev:n("上一张"),flip:n("镜像翻转"),setting:n("工具"),rotate:n("旋转"),dot:n("打点"),annotate:n("标注"),tailor:n("截图"),process:n("图像处理"),microscope:n("镜下"),move:n("快速移动"),info:n("信息"),download:n("下载")},f=e.inject("show-keyboard",e.ref(!1)),i=e.inject("show-watermark",e.ref(!1)),s=e.inject("show-menu-text",e.ref(!0)),v=Q.useStorage("default-open-ai",!1);function h(a){return a in y}function w(a){var d;return((d=a.props)==null?void 0:d.text)||(h(a.name)?y[a.name]:"")}return(a,d)=>(e.openBlock(),e.createElementBlock("div",dt,[e.createElementVNode("h3",ft,e.toDisplayString(e.unref(n)("显示管理")),1),e.createVNode(e.unref(b.ElRow),{gutter:10},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,r=>(e.openBlock(),e.createBlock(e.unref(b.ElCol),{key:r.name,span:8},{default:e.withCtx(()=>{var l,m;return[e.createElementVNode("div",mt,[e.createElementVNode("div",vt,[(l=r.props)!=null&&l.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent((m=r.props)==null?void 0:m.component),{key:1,size:24})):(e.openBlock(),e.createBlock(D,{key:0,size:24,name:r.name},null,8,["name"]))]),e.createElementVNode("p",pt,e.toDisplayString(w(r)),1),e.createVNode(e.unref(b.ElSwitch),{modelValue:r.show,"onUpdate:modelValue":k=>r.show=k,"active-text":"","inactive-text":""},null,8,["modelValue","onUpdate:modelValue"])])]}),_:2},1024))),128))]),_:1}),e.createElementVNode("div",null,[e.createElementVNode("h3",ht,e.toDisplayString(e.unref(n)("其他设置")),1),e.createElementVNode("div",gt,[e.createElementVNode("p",yt,e.toDisplayString(e.unref(n)("工具列表显示切换")),1),e.createVNode(e.unref(b.ElRadioGroup),{modelValue:e.unref(s),"onUpdate:modelValue":d[0]||(d[0]=r=>e.isRef(s)?s.value=r:null)},{default:e.withCtx(()=>[e.createVNode(e.unref(b.ElRadio),{value:!0},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("显示工具名称")),1)]),_:1}),e.createVNode(e.unref(b.ElRadio),{value:!1},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("隐藏工具名称")),1)]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",wt,[e.createElementVNode("p",kt,e.toDisplayString(e.unref(n)("小键盘显示切换")),1),e.createVNode(e.unref(b.ElRadioGroup),{modelValue:e.unref(f),"onUpdate:modelValue":d[1]||(d[1]=r=>e.isRef(f)?f.value=r:null)},{default:e.withCtx(()=>[e.createVNode(e.unref(b.ElRadio),{value:!0},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("显示小键盘")),1)]),_:1}),e.createVNode(e.unref(b.ElRadio),{value:!1},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("隐藏小键盘")),1)]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",_t,[e.createElementVNode("p",bt,e.toDisplayString(e.unref(n)("水印文字")),1),e.createVNode(e.unref(b.ElRadioGroup),{modelValue:e.unref(i),"onUpdate:modelValue":d[2]||(d[2]=r=>e.isRef(i)?i.value=r:null)},{default:e.withCtx(()=>[e.createVNode(e.unref(b.ElRadio),{value:!0},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("启用")),1)]),_:1}),e.createVNode(e.unref(b.ElRadio),{value:!1},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("禁用")),1)]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",Ct,[e.createElementVNode("p",Vt,e.toDisplayString(e.unref(n)("默认开启AI分析")),1),e.createVNode(e.unref(b.ElRadioGroup),{modelValue:e.unref(v),"onUpdate:modelValue":d[3]||(d[3]=r=>e.isRef(v)?v.value=r:null)},{default:e.withCtx(()=>[e.createVNode(e.unref(b.ElRadio),{value:!0},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("开")),1)]),_:1}),e.createVNode(e.unref(b.ElRadio),{value:!1},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("关")),1)]),_:1})]),_:1},8,["modelValue"])])])]))}}),Nt={class:"hzzt-kfb-toolbox"},zt={class:"hzzt-kfb-toolbox__component"},re=e.defineComponent({name:"KfbToolbox",__name:"KfbToolbox",props:{menu:{},process:{},microscope:{}},emits:["tool"],setup(c,{emit:t}){const n=c,o=t,{t:y}=K(),f={prev:y("上一张"),next:y("下一张"),config:y("配置"),info:y("信息"),flip:y("镜像"),tailor:y("截图")},i=e.inject("kfbViewRef"),s=e.ref(!1),v=e.ref(a(n.menu)),h={fullscreen:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./fullscreen83hUOqOl.js"))),line:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./linej48TZYKp.js"))),setting:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./settingC9ssGpPJ.js"))),rotate:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./rotateC4fB8W79.js"))),dot:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./dotBa_CxlZg.js"))),annotate:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./annotatezQSQm_m5.js"))),process:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./processDlmzK_X6.js"))),microscope:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./microscopeDXv8n9ip.js"))),move:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./moveCnwaiSQn.js"))),custom:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./customCBfU-2jU.js"))),zoom:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./zoomDxM6kUOV.js"))),download:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./downloadQFyOKD4P.js")))},w=e.computed(()=>v.value.filter(r=>r.show!==!1).map(r=>({component:h[r.name],props:r.props,slots:r.slots})));e.watch(()=>n.menu,r=>{v.value=a(r)});function a(r){return r.map(l=>{const m=typeof l=="string"?l:l.name;return f[m]?{name:"custom",show:typeof l=="string"?!0:l.show!==!1,props:Y(I({text:f[m],component:e.h(D,{name:m})},typeof l=="string"?{}:l.props),{name:m})}:m==="process"?{name:m,props:typeof l=="string"?{process:n.process}:I({process:n.process},l.props),slots:typeof l=="string"?void 0:l.slots,show:typeof l=="string"?!0:l.show!==!1}:m==="microscope"?{name:m,props:typeof l=="string"?{process:n.process}:I({microscope:n.microscope},l.props),slots:typeof l=="string"?void 0:l.slots,show:typeof l=="string"?!0:l.show!==!1}:{name:m,props:typeof l=="string"?{}:l.props,slots:typeof l=="string"?void 0:l.slots,show:typeof l=="string"?!0:l.show!==!1}})}function d(r,l){const m={annotate:()=>i.value.startDraw(l),tailor:()=>i.value.shotScreen(l),process:()=>i.value.forceRedraw(l),microscope:()=>i.value.scopeChange(l),move:()=>i.value.fastMove(l),endDraw:()=>i.value.endDraw(),info:()=>i.value.info(),zoom:()=>i.value.zoomTo(l),flip:()=>i.value.toggleFlip(l),config:()=>s.value=!0,grid:()=>i.value.updateGrid(l),ruler:()=>i.value.updateGrid(l),graduation:()=>i.value.updateGraduation(l),navigator:()=>i.value.updateNavigator(l),tool:()=>{i.value.updateGrid({show:l}),i.value.updateGraduation({show:l}),i.value.updateGrid({ruler:l}),i.value.updateNavigator(l)}};m[r]?m[r]():o("tool",r,l)}return(r,l)=>(e.openBlock(),e.createElementBlock("div",Nt,[e.renderSlot(r.$slots,"left"),e.createElementVNode("div",zt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(m,k)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(m.component),e.mergeProps({ref_for:!0},m.props,{key:k,onTool:d}),{default:e.withCtx(()=>[m.slots?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(m.slots,g=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(g)))),256)):e.createCommentVNode("",!0)]),_:2},1040))),128))]),e.renderSlot(r.$slots,"right"),e.createVNode(e.unref(b.ElDialog),{modelValue:s.value,"onUpdate:modelValue":l[1]||(l[1]=m=>s.value=m),width:"800px",title:e.unref(y)("阅片工具设置中心")},{default:e.withCtx(()=>[e.createVNode(Et,{menus:v.value,"onUpdate:menus":l[0]||(l[0]=m=>v.value=m)},null,8,["menus"])]),_:1},8,["modelValue","title"])]))}}),ce="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",de={shape:"50%",width:.3,color:"#FA0404",borderWidth:5},_e={r:0,g:0,b:0,c:0,s:0,l:0,ga:1};function Bt(c){const t=e.reactive(I(I({},_e),c.process));e.watch(()=>c.process,f=>{y(f)});const n=e.computed(()=>{const f=[1+t.r+t.l+.5*t.c,0,0,0,-.25*t.c],i=[0,1+t.g+t.l+.5*t.c,0,0,-.25*t.c],s=[0,0,1+t.b+t.l+.5*t.c,0,-.25*t.c],v=[0,0,0,1,0];return`${f.join(" ")}
|
|
2
|
-
${i.join(" ")}
|
|
3
|
-
${s.join(" ")}
|
|
4
|
-
${v.join(" ")}`}),o=e.computed(()=>String(1+t.s));function y(f){f&&Object.assign(t,f)}return{imageProcess:t,matrixValues:n,saturateValues:o,forceRedraw:y}}function xt(c,t){function n(){t.value.$on(F.KfbView.events.EVENT_TAILORING_SCREENSHOT,o)}function o({base64:i,region:s,custom:v}){if(window.ClipboardItem&&(navigator!=null&&navigator.clipboard)){const h=y(i,"image/png");navigator.clipboard.write([new window.ClipboardItem({[h.type]:h})])}c("tool","screen-shot",{base64:i,region:s,custom:v})}function y(i,s){var d,r;const v=i.split(",");(r=(d=v[0])==null?void 0:d.match(/:(.*?);/))==null||r[1];const h=atob(v==null?void 0:v[1]);let w=h.length;const a=new Uint8Array(w);for(;w--;)a[w]=h.charCodeAt(w);return new Blob([a],{type:s})}function f(i,s){const{width:v,height:h}=t.value.$options;i?v>h?t.value.tailoring.init({left:(v-h)/2,top:0,height:h,width:h,now:!0},s):t.value.tailoring.init({left:0,top:(h-v)/2,height:v,width:v,now:!0},s):t.value.tailoring.init({left:v/2-100,top:h/2-100,height:200,width:200,color:"#ff0000"},s)}return{tailorEvent:n,shotScreen:f}}const St=["onClick"],Tt=["src"],Lt={key:2,style:{width:"18px"},class:"margin-r-3"},$t={key:1,class:"hzzt-kfb-sub-menu"},Pt=["onClick"],Rt={class:"flex align-items-center"},It=["src"],Dt={key:2,style:{width:"18px"},class:"margin-r-2"},At=e.defineComponent({__name:"KfbMenu",props:{menus:{}},emits:["tool"],setup(c,{emit:t}){const n=e.ref({top:"0",left:"0",display:"none"}),o=e.inject("kfbView",e.ref({})),y=e.inject("currentLabel"),f=c,i=t,{t:s}=K(),v=[{label:s("直线"),value:"line",icon:R.value.markLine},{label:s("箭头"),value:"arrow",icon:R.value.markArrow},{label:s("双箭头"),value:"bilateral",icon:R.value.markBilateral},{label:s("矩形"),value:"rectangle",icon:R.value.markRectangle},{label:s("圆形"),value:"ellipse",icon:R.value.markEllipse},{label:s("曲线"),value:"polygon",icon:R.value.markPolygon},{label:s("星星"),value:"star",icon:R.value.markStar},{label:s("旗帜"),value:"flag",icon:R.value.markFlag},{label:s("点"),value:"dot",icon:R.value.markDot},{label:s("文字"),value:"font",icon:R.value.markFont},{label:s("语音"),value:"voice",icon:R.value.markVoice}],h=e.computed(()=>{var l;return y!=null&&y.value?[{label:s("删除"),value:"delete",icon:R.value.delete}]:(l=f.menus)!=null&&l.length?f.menus.map(m=>m.value==="annotate"?Y(I({},m),{children:v}):Y(I({},m),{icon:m.icon||R.value[m.value]})):[{label:s("上一张"),value:"prev"},{label:s("下一张"),value:"next"},{label:s("标注"),value:"annotate",icon:R.value.annotate,children:v},{label:s("一键截图"),value:"tailor_now",icon:R.value.tailor},{label:s("区域截图"),value:"tailor"},{label:s("镜像翻转"),value:"flip",icon:R.value.flip},{label:s("切片信息"),value:"info",icon:R.value.info}]});e.watch(()=>o.value,(l,m)=>{m!=null&&m.viewer&&(m.viewer.removeHandler("canvas-contextmenu",w),m.viewer.removeHandler("canvas-click",a)),l!=null&&l.viewer&&(l.viewer.addHandler("canvas-contextmenu",w),l.viewer.addHandler("canvas-click",a))}),e.onMounted(()=>{var l;(l=o.value)!=null&&l.viewer&&(o.value.viewer.addHandler("canvas-contextmenu",w),o.value.viewer.addHandler("canvas-click",a)),document.body.addEventListener("click",a)}),e.onBeforeUnmount(()=>{var l;(l=o.value)!=null&&l.viewer&&(o.value.viewer.removeHandler("canvas-contextmenu",w),o.value.viewer.removeHandler("canvas-click",a)),document.body.removeEventListener("click",a)});function w(l){l.preventDefault=!0,n.value.top=`${l.position.y}px`,n.value.left=`${l.position.x}px`,n.value.display==="block"?n.value.display="none":n.value.display="block"}function a(){n.value.display="none"}function d(l,m){l.children||((m==null?void 0:m.value)==="annotate"?i("tool","annotate",{tool:l.value.substring(0,1).toLocaleUpperCase()+l.value.substring(1),once:!0}):l.value==="tailor_now"?i("tool","tailor",!0):i("tool",l.value),a())}function r(l){return l==null||typeof l!="object"&&typeof l!="function"?!1:typeof l=="function"||"render"in l||"setup"in l}return(l,m)=>(e.openBlock(),e.createElementBlock("div",{class:"hzzt-kfb-menu",style:e.normalizeStyle(n.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(k,g)=>(e.openBlock(),e.createElementBlock("div",{key:g,class:"hzzt-kfb-menu-item"},[e.createElementVNode("div",{class:"flex align-items-center",onClick:p=>d(k)},[r(k.icon)?(e.openBlock(),e.createBlock(e.unref(b.ElIcon),{key:0,class:"margin-r-3",size:18},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(k.icon)))]),_:2},1024)):k.icon?(e.openBlock(),e.createElementBlock("img",{key:1,style:{width:"18px"},class:"margin-r-2",src:k.icon},null,8,Tt)):(e.openBlock(),e.createElementBlock("div",Lt)),e.createElementVNode("span",null,e.toDisplayString(k.label),1)],8,St),k.children?(e.openBlock(),e.createBlock(D,{key:0,name:"arrowRight",class:"margin-r-2",size:14})):e.createCommentVNode("",!0),k.children?(e.openBlock(),e.createElementBlock("div",$t,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.children,(p,u)=>(e.openBlock(),e.createElementBlock("div",{key:u,class:"hzzt-kfb-menu-item",onClick:N=>d(p,k)},[e.createElementVNode("div",Rt,[r(p.icon)?(e.openBlock(),e.createBlock(e.unref(b.ElIcon),{key:0,class:"margin-r-2",size:18},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(p.icon)))]),_:2},1024)):p.icon?(e.openBlock(),e.createElementBlock("img",{key:1,style:{width:"18px"},class:"margin-r-2",src:p.icon},null,8,It)):(e.openBlock(),e.createElementBlock("div",Dt)),e.createElementVNode("span",null,e.toDisplayString(p.label),1)])],8,Pt))),128))])):e.createCommentVNode("",!0)]))),128))],4))}}),G=(c,t)=>{const n=c.__vccOpts||c;for(const[o,y]of t)n[o]=y;return n},Mt=G(At,[["__scopeId","data-v-414722d0"]]),Ht={key:0,class:"hzzt-kfb-microscope"},Ft=e.defineComponent({__name:"KfbMicroscope",props:e.mergeDefaults({shape:{},width:{},color:{},borderWidth:{}},I({},de)),setup(c,{expose:t}){const n=c,o=e.reactive(I(I({},de),n));e.watch(()=>n,a=>{w({name:"change",value:a})});const y=e.ref("200px"),f=e.ref(!1),i=e.computed(()=>({borderRadius:o.shape,borderColor:o.color,borderWidth:o.borderWidth+"px",width:y.value,height:y.value})),s=e.inject("kfbView",e.ref({}));e.watch(()=>s.value,(a,d)=>{d!=null&&d.viewer&&d.viewer.removeHandler("zoom",v),a!=null&&a.viewer&&a.viewer.addHandler("zoom",v)}),e.onMounted(()=>{var a;(a=s.value)!=null&&a.viewer&&s.value.viewer.addHandler("zoom",v)}),e.onBeforeUnmount(()=>{var a;(a=s.value)!=null&&a.viewer&&s.value.viewer.removeHandler("zoom",v)});function v(){setTimeout(()=>{w({name:"change",value:o})},100)}function h(a){let{x:d,y:r}=s.value.viewer.viewport.getCenter(!0);a==="top"?r-=.006:a==="bottom"?r+=.006:a==="left"?d-=.006:a==="right"&&(d+=.006),s.value.area.moveToLabel({x:d,y:r})}function w({name:a,value:d}){var l,m;const r=(m=(l=s.value.$options)==null?void 0:l.pxConversion)==null?void 0:m.imageCapRes;if(a==="visible"){if(f.value=d,d){const k=s.value.area.imageToViewerElementRectangle({x:0,y:0,width:o.width*1e3/r,height:o.width*1e3/r});y.value=k.width+"px"}}else if(a==="change"){Object.assign(o,d);const k=s.value.area.imageToViewerElementRectangle({x:0,y:0,width:o.width*1e3/r,height:o.width*1e3/r});y.value=k.width+"px"}}return t({scopeChange:w}),(a,d)=>f.value?(e.openBlock(),e.createElementBlock("div",Ht,[e.createElementVNode("div",{class:"hzzt-kfb-microscope__container",style:e.normalizeStyle(i.value)},null,4),e.createElementVNode("div",{class:"hzzt-kfb-microscope__top",onClick:d[0]||(d[0]=r=>h("top"))},[e.createVNode(D,{size:"24",name:"arrowUp"})]),e.createElementVNode("div",{class:"hzzt-kfb-microscope__bottom",onClick:d[1]||(d[1]=r=>h("bottom"))},[e.createVNode(D,{size:"24",name:"arrowDown"})]),e.createElementVNode("div",{class:"hzzt-kfb-microscope__left",onClick:d[2]||(d[2]=r=>h("left"))},[e.createVNode(D,{size:"24",name:"arrowLeft"})]),e.createElementVNode("div",{class:"hzzt-kfb-microscope__right",onClick:d[3]||(d[3]=r=>h("right"))},[e.createVNode(D,{size:"24",name:"arrowRight"})])])):e.createCommentVNode("",!0)}}),qt=G(Ft,[["__scopeId","data-v-cf5949b8"]]),Ut={class:"hzzt-kfb-label flex column"},Kt={class:"hzzt-kfb-label__img flex justify-content-center"},jt=["src"],Ot={class:"ellipsis flex-1"},Gt={class:"flex margin-b-4",style:{width:"100%"}},Wt={class:"flex margin overflow-hidden",style:{height:"132px"}},Zt=["src"],Yt=["src"],Xt=e.defineComponent({__name:"KfbLabel",props:{visible:{type:Boolean},info:{},slide:{},pathologyHandle:{type:Function}},emits:["tool"],setup(c,{emit:t}){var a;const{t:n}=K(),o=c,y=t,f=e.ref((a=o.visible)!=null?a:!0),i=e.ref(!1),s=e.computed(()=>o.slide.pathology_id?n("修改病理号"):n("绑定病理号"));function v(){o.slide.angle||(o.slide.angle=0),o.slide.angle+=90,o.slide.angle>360&&(o.slide.angle=o.slide.angle%360),y("tool","rotate",o.slide.angle)}function h(){i.value=!0}function w(){o.pathologyHandle&&o.pathologyHandle(o.slide).then(()=>{i.value=!1})}return(d,r)=>(e.openBlock(),e.createElementBlock("div",Ut,[e.withDirectives(e.createElementVNode("div",{class:"hzzt-kfb-label__title"},e.toDisplayString(e.unref(n)(`点击标签旋转${d.pathologyHandle?",点击病理号重绑":""}`)),513),[[e.vShow,f.value]]),e.withDirectives(e.createElementVNode("div",Kt,[e.createElementVNode("img",{src:d.info.labelImg,style:e.normalizeStyle({transform:`rotate(${d.slide.angle}deg)`}),onClick:v},null,12,jt)],512),[[e.vShow,f.value]]),d.pathologyHandle?e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:0,class:"hzzt-kfb-label__pathology flex align-items-center justify-content-between",onClick:h},[e.createElementVNode("span",Ot,e.toDisplayString(d.slide.pathology_number),1),e.createVNode(D,{size:"14",name:"annotate"})],512)),[[e.vShow,f.value]]):e.createCommentVNode("",!0),e.createElementVNode("span",{onClick:r[0]||(r[0]=l=>f.value=!f.value),style:e.normalizeStyle({transform:`translateY(${f.value?"-50%":0})`}),class:"hzzt-kfb-label__expend flex align-items-center justify-content-center"},[f.value?(e.openBlock(),e.createBlock(D,{key:0,size:"10",name:"arrowLeft"})):(e.openBlock(),e.createBlock(D,{key:1,size:"10",name:"arrowRight"}))],4),e.createVNode(e.unref(b.ElDialog),{modelValue:i.value,"onUpdate:modelValue":r[5]||(r[5]=l=>i.value=l),"append-to-body":!0,title:s.value,width:"450px"},{footer:e.withCtx(()=>[e.createVNode(e.unref(b.ElButton),{onClick:r[4]||(r[4]=l=>i.value=!1)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("取消")),1)]),_:1}),e.createVNode(e.unref(b.ElButton),{type:"primary",onClick:w},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("确认")),1)]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("div",Gt,[e.createElementVNode("div",Wt,[e.createElementVNode("img",{src:d.slide.labelImg},null,8,Zt),e.createElementVNode("img",{src:d.slide.previewImg},null,8,Yt)])]),e.createVNode(e.unref(b.ElForm),{class:"margin-t-2"},{default:e.withCtx(()=>[e.createVNode(e.unref(b.ElFormItem),{label:e.unref(n)("病理号")},{default:e.withCtx(()=>[e.createVNode(e.unref(b.ElInput),{modelValue:d.slide.pathology_number,"onUpdate:modelValue":r[1]||(r[1]=l=>d.slide.pathology_number=l),placeholder:e.unref(n)("输入病理号"),clearable:""},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(e.unref(b.ElFormItem),{label:e.unref(n)("蜡块号")},{default:e.withCtx(()=>[e.createVNode(e.unref(b.ElInput),{modelValue:d.slide.paraffin_block_number,"onUpdate:modelValue":r[2]||(r[2]=l=>d.slide.paraffin_block_number=l),placeholder:e.unref(n)("输入蜡块号"),clearable:""},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),d.slide.slide_id?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(b.ElFormItem),{key:0,label:e.unref(n)("试剂")},{default:e.withCtx(()=>[e.createVNode(e.unref(b.ElInput),{modelValue:d.slide.reagent,"onUpdate:modelValue":r[3]||(r[3]=l=>d.slide.reagent=l),placeholder:e.unref(n)("输入试剂"),clearable:""},null,8,["modelValue","placeholder"])]),_:1},8,["label"]))]),_:1})]),_:1},8,["modelValue","title"])]))}}),Jt=G(Xt,[["__scopeId","data-v-e1475ef3"]]);function Qt(c,t){const n=e.ref(1),o=e.ref(null),y=e.ref(null);function f(){c.value.viewer.addHandler("canvas-drag",s=>{o.value||(o.value=s.position)}),c.value.viewer.addHandler("canvas-drag-end",s=>{if(n.value!==1){y.value=s.position;const v=c.value.viewer.viewport.containerSize.x,h=c.value.viewer.viewport.containerSize.y,w=(y.value.x-o.value.x)/(v*t.value)*(n.value-1),a=(y.value.y-o.value.y)/(h*t.value)*(n.value-1),d=c.value.viewer.viewport.getCenter(),r=new F.OpenSeadragon.Point(d.x-w,d.y-a);c.value.viewer.viewport.panTo(r),o.value=null}})}function i({name:s,value:v}){s==="ratio"&&(n.value=v/1)}return{moveEvent:f,fastMove:i}}function eo(c,t,n,o,y){const f=e.ref(void 0),i=e.ref([]);e.watch(()=>c.aiLabelList,w);function s(){n.value.$on(F.KfbView.events.EVENT_END_PAINTING,v("add")),n.value.$on(F.KfbView.events.EVENT_AREA_MOVE_END,v("move")),n.value.$on(F.KfbView.events.EVENT_ADD_POLYGON_POINT,v("add-point")),n.value.$on(F.KfbView.events.EVENT_DELETE_POLYGON_POINT,v("delete-point")),n.value.$on(F.KfbView.events.EVENT_DELETE_LABEL,v("delete")),n.value.$on(F.KfbView.events.EVENT_SELECT_LABEL,l=>{f.value=l,r(),t("tool","select-label",f.value)}),n.value.$on(F.KfbView.events.EVENT_CANCEL_SELECT_LABEL,()=>{f.value=void 0,t("tool","cancel-select-label",f.value)}),v("list")()}function v(l){return m=>h(l,m)}function h(l,m){var k;if(l==="add"&&m&&((m==null?void 0:m.subType)||((k=m==null?void 0:m.__data__)==null?void 0:k.subType))==="voice")o(m);else return c.labelHandle(l,c.slide,m,i.value).then(g=>{i.value=g,w()}).catch(()=>{w()})}function w(){var l;if((l=n.value)!=null&&l.initLabelList){const m=[...i.value,...c.aiLabelList||[]];m.find(({id:k})=>{var g;return k===((g=f.value)==null?void 0:g.id)})||(f.value=void 0),n.value.initLabelList(m)}}function a(l,m){var g,p;f.value&&(f.value.select=!1,f.value=void 0);const k=(n.value.labelList||[]).findIndex(u=>u.id===l.id);if(k>-1){f.value=(g=n.value.labelList)==null?void 0:g[k],f.value.select=!0;const u=n.value.area.getCenterPoint(l.region);n.value.area.moveToLabel(u),(p=n.value.viewer)!=null&&p.canvas&&n.value.viewer.canvas.focus(),r()}m&&y(m)}function d(l){return c.labelHandle("add",c.slide,l,i.value).then(m=>{i.value=m,w()}).catch(()=>{w()})}function r(){var m,k,g,p;(((m=f.value)==null?void 0:m.subType)||((g=(k=f.value)==null?void 0:k.__data__)==null?void 0:g.subType))==="voice"&&((p=f.value)!=null&&p.src)&&new Audio(f.value.src).play()}return{currentLabel:f,localLabelList:i,initLabel:s,jumpToLabel:a,reloadLabelList:w,eventHandel:v,addHandle:d}}function to(){function c(t,n){t.save(),t.strokeStyle="rgba(0,0,0,0)",t.miterLimit=4,t.font="15px",t.fillStyle=n,t.font="15px",t.scale(.02734375,.02734375),t.save(),t.font="15px",t.beginPath(),t.moveTo(512,427.023),t.moveTo(422,427.023),t.translate(512,427.023),t.rotate(0),t.arc(0,0,90,3.141592653589793,6.283185307179586,!0),t.rotate(0),t.translate(-512,-427.023),t.translate(512,427.023),t.rotate(0),t.arc(0,0,90,0,3.141592653589793,!0),t.rotate(0),t.translate(-512,-427.023),t.fill(),t.stroke(),t.restore(),t.save(),t.font="15px",t.beginPath(),t.moveTo(512,910.402),t.bezierCurveTo(492.86,910.402,474.51800000000003,904.548,458.95799999999997,893.4730000000001),t.bezierCurveTo(444.895,883.4630000000001,434.032,869.8770000000001,427.36899999999997,854.013),t.lineTo(255.043,585.177),t.lineTo(254.889,584.927),t.bezierCurveTo(225.522,537.209,210,482.605,210,427.021),t.bezierCurveTo(210,346.35400000000004,241.414,270.515,298.454,213.47500000000002),t.bezierCurveTo(355.494,156.43500000000006,431.333,125.021,512,125.021),t.bezierCurveTo(592.6669999999999,125.021,668.506,156.435,725.546,213.475),t.bezierCurveTo(782.587,270.515,814,346.354,814,427.021),t.bezierCurveTo(814,482.87,798.345,537.692,768.726,585.56),t.lineTo(768.462,585.9789999999999),t.lineTo(596.381,854.6949999999999),t.bezierCurveTo(589.626,870.4209999999999,578.721,883.871,564.677,893.7499999999999),t.bezierCurveTo(549.192,904.6449999999999,530.977,910.4019999999999,512,910.4019999999999),t.closePath(),t.moveTo(309.246,551.141),t.lineTo(484.74,824.9209999999999),t.lineTo(485.934,828.1179999999999),t.bezierCurveTo(490.083,839.2249999999999,500.31500000000005,846.4019999999999,512,846.4019999999999),t.bezierCurveTo(523.584,846.4019999999999,533.791,839.3309999999999,538.004,828.387),t.lineTo(539.169,825.3589999999999),t.lineTo(714.43,551.678),t.bezierCurveTo(737.701,513.983,750,470.884,750,427.021),t.bezierCurveTo(750,363.449,725.244,303.682,680.2909999999999,258.72900000000004),t.bezierCurveTo(635.3389999999999,213.77800000000005,575.5719999999999,189.02100000000004,511.99999999999994,189.02100000000004),t.bezierCurveTo(448.428,189.02100000000004,388.66099999999994,213.77700000000004,343.70799999999997,258.72900000000004),t.bezierCurveTo(298.755,303.68100000000004,274,363.449,274,427.021),t.bezierCurveTo(274,470.661,286.186,513.573,309.246,551.1410000000001),t.closePath(),t.fill(),t.stroke(),t.restore(),t.restore()}return{drawDot:c}}function oo(c,t){const{t:n}=K(),o=e.ref(!1),y=e.ref();let f=null;const i=e.ref(!1),s=e.ref(0);let v=0;const h=e.ref([]),w=e.ref(void 0);let a=!1;function d(u,N){u.save(),u.strokeStyle="rgba(0,0,0,0)",u.miterLimit=4,u.font="15px ''",u.fillStyle=N,u.font=" 15px ''",u.scale(.03125,.03125),u.save(),u.font=" 15px ''",u.beginPath(),u.moveTo(515.041727,670.617766),u.bezierCurveTo(606.625894,670.617766,681.137374,596.113511,681.137374,504.52212),u.lineTo(681.137374,229.350568),u.bezierCurveTo(681.137374,137.76640100000003,606.625894,63.254920999999996,515.041727,63.254920999999996),u.bezierCurveTo(423.44311000000005,63.254920999999996,348.93885500000005,137.766401,348.93885600000004,229.350568),u.lineTo(348.93885600000004,504.52212),u.bezierCurveTo(348.93885600000004,596.113512,423.44311100000004,670.617767,515.041727,670.617766),u.closePath(),u.fill(),u.stroke(),u.restore(),u.save(),u.font=" 15px ''",u.beginPath(),u.moveTo(801.643237,874.001665),u.lineTo(558.391759,874.001665),u.lineTo(558.391759,828.578057),u.bezierCurveTo(719.899527,807.264291,844.993269,668.7898399999999,844.993269,501.55986699999994),u.translate(801.643237,501.55986699999994),u.rotate(0),u.arc(0,0,43.350032,0,3.141592653589793,!0),u.rotate(0),u.translate(-801.643237,-501.55986699999994),u.bezierCurveTo(758.2932050000001,635.684865,649.166725,744.811345,515.0345020000001,744.811346),u.bezierCurveTo(380.9095040000001,744.811346,271.79024900000013,635.6848659999999,271.79024900000013,501.55986699999994),u.translate(228.44021750000013,501.5664510740879),u.rotate(0),u.arc(0,0,43.350032,-.00015188164315591997,-3.1414407719461273,!0),u.rotate(0),u.translate(-228.44021750000013,-501.5664510740879),u.bezierCurveTo(185.09018600000013,668.7898389999999,310.1911530000001,807.271516,471.69169500000015,828.578057),u.lineTo(471.69169500000015,874.001665),u.lineTo(228.440217,874.001665),u.translate(228.440217,917.3516970000001),u.rotate(0),u.arc(0,0,43.350032,-1.5707963267948966,1.5707963267948966,!0),u.rotate(0),u.translate(-228.440217,-917.3516970000001),u.lineTo(801.643237,960.701729),u.translate(801.643237,917.3516970000001),u.rotate(0),u.arc(0,0,43.350032,1.5707963267948966,4.71238898038469,!0),u.rotate(0),u.translate(-801.643237,-917.3516970000001),u.closePath(),u.fill(),u.stroke(),u.restore(),u.restore()}function r(){return J(this,null,function*(){try{y.value=yield navigator.mediaDevices.getUserMedia({audio:!0}),f=new MediaRecorder(y.value),h.value=[],f.addEventListener("dataavailable",u=>{h.value.push(u.data)}),f.addEventListener("stop",()=>J(this,null,function*(){if(w.value){const u=new Blob(h.value,{type:c.audioType||"audio/wav"});w.value.src=URL.createObjectURL(u)}i.value=!1,a&&(yield p())})),f.start(),i.value=!0,v=window.setInterval(()=>{s.value++},1e3)}catch(u){b.ElMessage.error(n("麦克风启用失败,请确认是否开启麦克风权限"))}})}function l(){y.value&&f?(f.stop(),y.value.getTracks().forEach(u=>u.stop()),f=null,y.value=void 0):(f=null,y.value=void 0),i.value=!1,v&&(clearInterval(v),v=0),s.value=0}function m(u){o.value=!0,w.value=u,h.value=[],a=!1}function k(){i.value&&l(),o.value=!1,i.value=!1,a=!1}function g(){return J(this,null,function*(){if(!i.value&&!h.value.length){b.ElMessage.error(n("请先录音"));return}i.value&&l(),i.value=!1,a=!0,h.value.length&&(yield p()),o.value=!1})}function p(){return J(this,null,function*(){if(c.uploadHandle&&w.value){const u=b.ElLoading.service({text:n("录音上传中")}),N=new Blob(h.value,{type:c.audioType||"audio/wav"});h.value=[];try{yield c.uploadHandle(c.slide,w.value,N).then(z=>{w.value.src=z}),u.close(),t(w.value)}catch(z){u.close()}}})}return{voiceVisible:o,voiceForm:w,recordTime:s,isRecording:i,drawVoice:d,startRecording:r,stopRecording:l,initVoice:m,cancelRecord:k,confirmRecord:g}}function no(c,t,n){const o=e.ref([]),y=e.ref(0),f=e.ref(!1);let i=null;e.watch(()=>{var r;return(r=c.analysis)==null?void 0:r.hotmap_path},r=>{var l,m,k;if((m=(l=t.value)==null?void 0:l.viewer)!=null&&m.world){y.value=0;const g=t.value.viewer.world.getItemAt(0);g&&(g.tilesMatrix={},g.draw())}r&&((k=c.analysis)!=null&&k.zoom_roi)&&n({x:c.analysis.zoom_roi.x,y:c.analysis.zoom_roi.y,width:c.analysis.zoom_roi.w,height:c.analysis.zoom_roi.h},5)}),e.onMounted(()=>{window.addEventListener("mousemove",h),window.addEventListener("mouseup",a)}),e.onBeforeUnmount(()=>{window.removeEventListener("mousemove",h),window.removeEventListener("mouseup",a)});function s(r,l,m){var g,p,u,N;const k=Y(I({},l),{file:(g=c.analysis)==null?void 0:g.hotmap_path});if((p=c.analysis)!=null&&p.hotmap_info){if(m[l.x+"_"+l.y+"_"+Number(l.scale)])if(((u=c.analysis)==null?void 0:u.hotmap_type)==="drag")v(r,k);else return c.tileHandle(k)}else if(((N=c.analysis)==null?void 0:N.hotmap_type)==="drag")v(r,k);else return c.tileHandle(k);return r}function v(r,l){const m=o.value.find(k=>k.url===r)||{url:r,x:l.x,y:l.y,img:void 0,load:""};if(!(m!=null&&m.img)&&(o.value.push(m),m.load!=="success")){const k=new Image;k.src=c.tileHandle(l),k.onload=()=>{m.load="success"},m.img=k}}function h(r){f.value&&i&&(y.value+=r.x-i.x,y.value<0?y.value=0:y.value>t.value.$options.width&&(y.value=t.value.$options.width,f.value=!1),t.value.viewer.forceRedraw()),i={x:r.x,y:r.y}}function w(r){const{x:l,y:m}=r;f.value=!0,i={x:l,y:m}}function a(){f.value=!1,i=null}function d(r){const{context:l,sourceWidth:m,sourceHeight:k,position:g,size:p,initRendered:u,tile:N,pixelDensityRatio:z}=r,S=N.getUrl(),E=y.value*z,A=g.original.x;if(A<E&&A+p.x>E){const $=E-A,j=p.x-$,q=o.value.find(oe=>oe.url===S),te=(q==null?void 0:q.load)==="success"?q.img:u.canvas;l.drawImage(te,0,0,m*$/p.x,k,g.x,g.y,$,p.y),l.drawImage(u.canvas,m*$/p.x,0,m*j/p.x,k,g.x+$,g.y,j,p.y)}else if(A+p.x<=E){const $=o.value.find(q=>q.url===S),j=($==null?void 0:$.load)==="success"?$.img:u.canvas;l.drawImage(j,0,0,m,k,g.x,g.y,p.x,p.y)}else A>=E&&l.drawImage(u.canvas,0,0,m,k,g.x,g.y,p.x,p.y)}return{getHotmapUrl:s,hotmapImgs:o,handlerImage:d,hotmapLine:y,lineMouseDown:w}}function lo(c,t,n){const o=e.getCurrentInstance(),y=e.ref(!1),f=new BroadcastChannel("sync_kfb_view");f.onmessage=a=>{const d=a.data;h(d)},e.onMounted(()=>{var a,d,r;(a=n.value)==null||a.addEventListener("mouseenter",i),(d=n.value)==null||d.addEventListener("mousemove",i),(r=n.value)==null||r.addEventListener("mouseleave",s)}),e.onBeforeUnmount(()=>{var a,d,r;(a=n.value)==null||a.removeEventListener("mouseenter",i),(d=n.value)==null||d.removeEventListener("mousemove",i),(r=n.value)==null||r.removeEventListener("mouseleave",s),f.close()});function i(){y.value=!0}function s(){y.value=!1}function v(){let a;t.value.viewer.addHandler("pan",d=>{var m,k,g,p;if(!a){a=(k=(m=d.center)==null?void 0:m.clone)==null?void 0:k.call(m);return}const r=d.center,l=(g=r==null?void 0:r.minus)==null?void 0:g.call(r,a);a=(p=r==null?void 0:r.clone)==null?void 0:p.call(r),c.syncPosition&&w({position:l,type:"sync_position"})}),t.value.viewer.addHandler("zoom",d=>{c.syncZoom&&w({zoom:d.zoom,type:"sync_zoom"})}),t.value.viewer.addHandler("animation-finish",()=>{var l;if(c.syncZoom&&w({zoom:t.value.viewer.viewport.getZoom(!0),type:"sync_zoom"}),!a)return;const d=t.value.viewer.viewport.getCenter(!0),r=(l=d==null?void 0:d.minus)==null?void 0:l.call(d,a);a=void 0,c.syncPosition&&w({position:r,type:"sync_position"})})}function h(a){a.uuid&&a.type==="sync_position"&&a.uuid!==(o==null?void 0:o.uid)?t.value&&t.value.viewer.viewport.panBy(a.position,!0):a.uuid&&a.type==="sync_zoom"&&a.uuid!==(o==null?void 0:o.uid)&&t.value&&t.value.viewer.viewport.zoomTo(a.zoom)}function w(a){var d;y.value&&f.postMessage(Y(I({},a),{uuid:o==null?void 0:o.uid,fileName:(d=c.slide)==null?void 0:d.file}))}return{initSync:v}}const ao={class:"hzzt-kfb-keyword flex wrap"},ro=["onMouseenter"],io=e.defineComponent({__name:"KfbKeyword",setup(c){const t=e.ref([{code:"Q",icon:"zoomIn"},{code:"W",icon:"arrowUp"},{code:"E",icon:"zoomOut"},{code:"A",icon:"arrowLeft"},{code:"S",icon:"arrowDown"},{code:"D",icon:"arrowRight"}]),n=e.inject("kfbView",e.ref({}));let o=null;function y(i,s){i.preventDefault(),o&&clearTimeout(o),o=setInterval(()=>{s==="E"&&(n.value.viewer.viewport.zoomBy(1.1),n.value.viewer.viewport.applyConstraints()),s==="Q"&&(n.value.viewer.viewport.zoomBy(.9),n.value.viewer.viewport.applyConstraints()),s==="W"&&(n.value.viewer.viewport.panBy(n.value.viewer.viewport.deltaPointsFromPixels(new F.OpenSeadragon.Point(0,-40))),n.value.viewer.viewport.applyConstraints()),s==="S"&&(n.value.viewer.viewport.panBy(n.value.viewer.viewport.deltaPointsFromPixels(new F.OpenSeadragon.Point(0,40))),n.value.viewer.viewport.applyConstraints()),s==="A"&&(n.value.viewer.viewport.panBy(n.value.viewer.viewport.deltaPointsFromPixels(new F.OpenSeadragon.Point(-40,0))),n.value.viewer.viewport.applyConstraints()),s==="D"&&(n.value.viewer.viewport.panBy(n.value.viewer.viewport.deltaPointsFromPixels(new F.OpenSeadragon.Point(40,0))),n.value.viewer.viewport.applyConstraints())},120)}function f(){o&&(clearInterval(o),o=null)}return e.onBeforeUnmount(()=>{clearTimeout(o)}),(i,s)=>(e.openBlock(),e.createElementBlock("div",ao,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value,v=>(e.openBlock(),e.createElementBlock("div",{key:v.code,class:"hzzt-kfb-keyword__code flex column align-items-center justify-content-center",onMouseenter:h=>y(h,v.code),onMouseleave:f},[e.createElementVNode("p",null,e.toDisplayString(v.code),1),e.createVNode(D,{size:"14",name:v.icon},null,8,["name"])],40,ro))),128))]))}}),so=G(io,[["__scopeId","data-v-c8d940f0"]]);function uo(c,t,n={}){const{panSensitivity:o=.2,zoomSensitivity:y=1.1,damping:f=.6,minThreshold:i=.05}=n;let s=!1,v=null,h=0,w=0,a=!1;const d=()=>{s=document.pointerLockElement===t.value,s||r()},r=()=>{h=0,w=0,v&&(cancelAnimationFrame(v),v=null),a=!1},l=u=>J(this,null,function*(){try{u.key==="l"&&t.value&&(document.pointerLockElement?(document.exitPointerLock(),console.log("鼠标已解锁!")):(yield t.value.requestPointerLock(),console.log("鼠标已锁定!")))}catch(N){console.error("无法锁定鼠标:",N)}}),m=u=>{if(s){u.preventDefault();const N=Math.pow(y,Math.sign(u.deltaY)*-1);c.value.viewer.viewport.zoomBy(N),c.value.viewer.viewport.applyConstraints()}},k=u=>{s&&(h+=u.movementX*o,w+=u.movementY*o,!a&&(Math.abs(h)>1||Math.abs(w)>1)&&(a=!0,v=requestAnimationFrame(g)))},g=()=>{const u=c.value.viewer.viewport;if(Math.abs(h)>i||Math.abs(w)>i){const N=u.deltaPointsFromPixels(new F.OpenSeadragon.Point(h,w));u.panBy(N),u.applyConstraints()}h*=f,w*=f,Math.abs(h)>i||Math.abs(w)>i?v=requestAnimationFrame(g):r()},p=()=>{s&&document.exitPointerLock()};return e.onMounted(()=>{var u;(u=t.value)==null||u.addEventListener("keydown",l),document.addEventListener("wheel",m,{passive:!1}),document.addEventListener("click",p),document.addEventListener("mousemove",k),document.addEventListener("pointerlockchange",d)}),e.onBeforeUnmount(()=>{var u;(u=t.value)==null||u.removeEventListener("keydown",l),document.removeEventListener("click",p),document.removeEventListener("wheel",m),document.removeEventListener("mousemove",k),document.removeEventListener("pointerlockchange",d),r()}),{setConfig:u=>{Object.assign(n,u)}}}const co=e.defineComponent({__name:"KfbLevel",props:e.mergeModels({slides:{default:()=>[]}},{"model-value":{default:0},"model-valueModifiers":{}}),emits:["update:model-value"],setup(c){const t=c,n=e.useModel(c,"model-value"),o=e.inject("kfbView",e.ref({})),y=e.computed(()=>Array.from(new Array(t.slides.length+1)).map((i,s)=>s));function f(){const i=o.value.viewer.world.getItemAt(0),s=Object.keys(i.tilesMatrix);s.forEach((v,h)=>{h>s.length-4&&(i.tilesMatrix[v]={})}),i.draw()}return(i,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["hzzt-kfb-level flex column align-items-center",i.slides.length>5?"hzzt-kfb-level--large":""])},[e.createVNode(D,{name:"level",size:"24",class:"margin-b-4 margin-t-2"}),e.createVNode(e.unref(b.ElSlider),{modelValue:n.value,"onUpdate:modelValue":s[0]||(s[0]=v=>n.value=v),vertical:"",min:y.value[0],step:1,max:y.value[y.value.length-1],"show-stops":"","show-tooltip":!0,placement:"left",height:i.slides.length>5?"180px":"130px",onInput:f},null,8,["modelValue","min","max","height"])],2))}}),fo={key:0,class:"flex hzzt-kfb-channel"},mo=["onClick"],vo=e.defineComponent({__name:"KfbChannel",props:e.mergeModels({info:{}},{"model-value":{default:()=>[]},"model-valueModifiers":{}}),emits:e.mergeModels(["load"],["update:model-value"]),setup(c,{emit:t}){const n=c,o=t,y=e.useModel(c,"model-value"),f=[{key:"DAPI",color:"#4A6CF7"},{key:"480",color:"#00BFFF"},{key:"520",color:"#32CD32"},{key:"570",color:"#FFAA33"},{key:"620",color:"#FF6347"},{key:"670",color:"#DC143C"},{key:"780",color:"#4B0082"}],i=e.computed(()=>{var v;return(((v=n.info)==null?void 0:v.channel)||[]).map(h=>{const w=f.find(a=>a.key===h.eqt_num);return{label:h.eqt_num,color:h.r?`rgb(${h.r}, ${h.g}, ${h.b})`:w==null?void 0:w.color}})});function s(v){y.value.includes(v)?y.value=y.value.filter(h=>h!==v):y.value.push(v),o("load")}return(v,h)=>i.value.length>0?(e.openBlock(),e.createElementBlock("div",fo,[e.createVNode(D,{name:"channel",size:"32"}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,w=>(e.openBlock(),e.createElementBlock("div",{key:w.label,style:e.normalizeStyle({background:w.color}),class:e.normalizeClass(["hzzt-kfb-channel__box",y.value.includes(w.label)?"":"hzzt-kfb-channel__box--unactive"]),onClick:a=>s(w.label)},e.toDisplayString(w.label),15,mo))),128))])):e.createCommentVNode("",!0)}}),po={class:"flex align-items-center justify-content-between"},ho={class:"hzzt-kfb-title"},go={class:"hzzt-kfb-annotation__container flex-1"},yo=["onClick"],wo=e.defineComponent({__name:"KfbAnnotation",props:e.mergeModels({annotation:{},annotations:{}},{expand:{type:Boolean},expandModifiers:{}}),emits:e.mergeModels(["select"],["update:expand"]),setup(c,{emit:t}){const n=e.useModel(c,"expand"),o=t,{t:y}=K();function f(s){const v=s.subType||s.tool||"";return`mark${v.substring(0,1).toLocaleUpperCase()}${v.substring(1)}`}function i(s){o("select",s)}return(s,v)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["hzzt-kfb-annotation flex column",n.value?"hzzt-kfb-annotation--expand":""])},[e.createElementVNode("div",po,[e.withDirectives(e.createElementVNode("div",ho,[e.createElementVNode("span",null,e.toDisplayString(e.unref(y)("标注列表")),1)],512),[[e.vShow,n.value]]),e.createVNode(D,{class:"hzzt-kfb-annotation__icon",name:n.value?"expandLeft":"expandRight",onClick:v[0]||(v[0]=h=>n.value=!n.value)},null,8,["name"])]),e.withDirectives(e.createElementVNode("div",go,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.annotations,(h,w)=>{var a;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["hzzt-kfb-annotation__item",((a=s.annotation)==null?void 0:a.id)===h.id?"hzzt-kfb-annotation__item--active":""]),key:w,onClick:d=>i(h)},[e.createVNode(D,{size:"16",name:f(h)},null,8,["name"]),e.createElementVNode("span",null,e.toDisplayString(e.unref(y)("标注"))+e.toDisplayString(w+1),1)],10,yo)}),128))],512),[[e.vShow,n.value]])],2))}}),ko=G(wo,[["__scopeId","data-v-bfc56a3e"]]);function He(c){const{t}=K();return e.computed(()=>{var y;const o=((y=c==null?void 0:c.analysis)==null?void 0:y.result)||"";return o.indexOf("疑似阳性")>-1?{type:"warning",name:o}:o.indexOf("阳性")>-1?{type:"danger",name:o}:o.indexOf("阴性")>-1?{type:"success",name:o}:o.indexOf("不合格")>-1?{type:"danger",name:o}:o.indexOf("合格")>-1?{type:"success",name:o}:{type:"info",name:o||t("未知")}})}const _o=["element-loading-text"],bo={key:1,class:"hzzt-kfb-view__main flex align-items-center justify-content-center"},Co={class:"hzzt-kfb-view__filter",height:"0",width:"0"},Vo={id:"colorMatrixFilter"},Eo=["values"],No=["values"],zo=["exponent"],Bo=["exponent"],xo=["exponent"],So={class:"flex nowrap justify-content-center overflow-hidden"},To=["src"],Lo=["src"],$o={class:"flex-1"},Po={class:"flex-1"},Ro={class:"flex-1"},Io={class:"flex-1"},Do={class:"flex-1"},Ao={class:"flex-1"},Mo=["src"],Ho={key:2,class:"margin-l-2"},Fo={key:9,class:"hzzt-kfb-view__watermark"},ee=e.defineComponent({name:"HzztKfbView",__name:"index",props:{slide:{},fileHandle:{},labelHandle:{},tileHandle:{},navigatorHandle:{},pathologyHandle:{},uploadHandle:{},options:{},labelDrawing:{},process:{default:()=>I({},_e)},microscope:{default:()=>I({},de)},menus:{},syncPosition:{type:Boolean},syncZoom:{type:Boolean},audioType:{},watermark:{},analysis:{},aiLabelList:{},showLabel:{type:Boolean}},emits:["tool"],setup(c,{expose:t,emit:n}){e.useCssVars(_=>({e3fd940a:A.value}));const o=c,y=n,{t:f,locale:i}=K(),s=e.ref(),v=e.ref(),h=e.ref(),w=e.ref(!1),a=e.ref({}),d=e.ref(!1),r=e.ref(0),l=e.ref(0),m=e.ref(0),k=e.ref([]),g=e.ref({width:0,height:0,fileNum:0,scanScale:1,fileName:"",ratiomap:{}}),p=e.inject("show-kfb-label",e.ref(!0)),u=e.inject("show-keyboard",e.ref(!1)),N=e.inject("show-watermark",e.ref(!1)),z=e.ref(!1),S=b.ElLoading.directive;e.watch(()=>{var _;return(_=o.slide)==null?void 0:_.file},()=>{et(),setTimeout(()=>{Ne()},100)}),e.onMounted(()=>{Ne()});const E=He(o),A=e.computed(()=>{var _,V;return`url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='150' height='100'><text x='30' y='80' font-family='Arial' font-size='16' fill='${((_=o.watermark)==null?void 0:_.color)||"rgba(0,0,0,0.2)"}' transform='rotate(-30)' text-anchor='middle'>${((V=o.watermark)==null?void 0:V.text)||"水印文字"}</text></svg>")`}),{imageProcess:$,matrixValues:j,saturateValues:q,forceRedraw:te}=Bt(o),{tailorEvent:oe,shotScreen:Z}=xt(y,a),{moveEvent:ie,fastMove:me}=Qt(a,l),{initSync:ve}=lo(o,a,s);uo(a,s);const{drawDot:pe}=to(),{voiceVisible:ne,voiceForm:le,drawVoice:he,recordTime:C,isRecording:B,startRecording:L,stopRecording:O,initVoice:be,cancelRecord:Fe,confirmRecord:qe}=oo(o,Ge),{currentLabel:ge,localLabelList:Ce,initLabel:Ue,jumpToLabel:Ve,reloadLabelList:Ke,eventHandel:je,addHandle:Oe}=eo(o,y,a,be,ye);function Ge(_){Oe(_)}const{getHotmapUrl:We,handlerImage:Ze,hotmapLine:Ye,lineMouseDown:Ee,hotmapImgs:Xe}=no(o,a,we);function Ne(){var _;(_=o.slide)!=null&&_.file&&o.fileHandle&&(d.value||(d.value=!0,o.fileHandle(o.slide).then(V=>{var M,U,W,P;g.value=V,k.value=(((M=g.value)==null?void 0:M.channel)||[]).map(T=>T.eqt_num),a.value=new F.KfbView(I({el:v.value,fileName:(U=o.slide)==null?void 0:U.file,scale:g.value.scanScale,lang:(i==null?void 0:i.value)==="en-US"?"en":i==null?void 0:i.value,navigator:{style:"left: 0;bottom: 0",thumbnail:g.value.thumbnailImg,width:200,height:180},grid:{show:!1,ruler:!1,pxConversion:!0},thumb:{bgColor:"rgba(0,0,0,0)"},graduation:{show:!0,right:120,bottom:(P=(W=g.value)==null?void 0:W.channel)!=null&&P.length?120:30,tick:{number:3,height:8}},pxConversion:{units:["um","mm"],binary:1e3,imageCapRes:g.value.imageCapRes||g.value.scanResolution||1},openSeadragonOptions:{maxZoomLevel:g.value.scanScale*20,pixelsPerArrowPress:200,animationTime:0,tileSources:ze()},tileDrawing:Ze,label:{drawing:(T,x,X)=>{var se;if(x!=null&&x.custom){const H=T.getContext("2d");H.save(),H.beginPath();const ae=(x==null?void 0:x.subType)||((se=x==null?void 0:x.__data__)==null?void 0:se.subType);ae==="count"?(H.translate(X.x-14,X.y-22),pe(H,(x==null?void 0:x.strokeStyle)||"")):ae==="voice"?(H.translate(X.x-16,X.y-18),he(H,(x==null?void 0:x.strokeStyle)||"")):o.labelDrawing&&o.labelDrawing(H,x),H.restore()}}}},o.options||{})),a.value.viewer.drawer.canvas.style.filter="url(#colorMatrixFilter)",Ue(),Qe(),ve(),setTimeout(()=>{var T,x;(T=o.analysis)!=null&&T.hotmap_path&&((x=o.analysis)!=null&&x.zoom_roi)&&we({x:o.analysis.zoom_roi.x,y:o.analysis.zoom_roi.y,width:o.analysis.zoom_roi.w,height:o.analysis.zoom_roi.h},5)},200)}).finally(()=>{d.value=!1,p.value||(Te({show:!1,ruler:!1}),Le({show:!1}),setTimeout(()=>{$e(!1)},100))})))}function Je(){const _=a.value.viewer;if(_.world){const V=_.world.getItemAt(0),M=_.viewport.getZoom(),U=_.viewport.getCenter();_.world.removeItem(V),_.addTiledImage({tileSource:ze(),success:function(){_.viewport.zoomTo(M),_.viewport.panTo(U)}})}}function ze(){var W,P;const _=g.value.tileWidth||g.value.imageBlockLen||256,V=g.value.tileHeight||g.value.imageBlockLen||256,M={};(W=o.analysis)!=null&&W.hotmap_path&&(((P=o.analysis)==null?void 0:P.hotmap_info)||[]).forEach(T=>{M[T[0]/_+"_"+T[1]/V+"_"+T[2]]=!0});let U=10;return Object.keys(g.value.ratiomap).forEach(T=>{const x=g.value.fileNum-Math.sqrt(g.value.scanScale/Number(T));x>0&&(U=U?Math.min(U,x):x)}),{height:g.value.height,width:g.value.width,tileWidth:_,tileHeight:V,minLevel:Math.floor(U||8),getTileUrl:(T,x,X)=>{var Pe,Re,Ie,De;const se=T,H={file:((Pe=o.slide)==null?void 0:Pe.file)||"",x,y:X,scale:"0",level:T,channel:JSON.stringify(k.value)};g.value.fileNum===T?(T=g.value.scanScale,H.scale=T.toFixed(6)):(T=g.value.scanScale/Math.pow(2,g.value.fileNum-T),H.scale=T.toFixed(6)),H.level=se,H.file=m.value===0?H.file:((Ie=(Re=o.slide)==null?void 0:Re.children)==null?void 0:Ie[m.value-1])||"";const ae=o.tileHandle(H);return(De=o.analysis)!=null&&De.hotmap_path?We(ae,H,M):ae}}}function Qe(){a.value.viewer.addHandler("rotate",_=>{r.value=_.degrees||0}),a.value.viewer.addHandler("zoom",_=>{const V=a.value.viewer.viewport.viewportToImageZoom(_.zoom||0)*Number(a.value.$options.scale);l.value=Number(V.toFixed(2))}),a.value.$on(F.KfbView.events.EVENT_NAVIGATOR_VESTIGE,_=>{o.navigatorHandle&&o.navigatorHandle("add",o.slide,_)}),o.navigatorHandle&&o.navigatorHandle("list",o.slide).then(_=>{var V,M;(M=(V=a.value.navigator)==null?void 0:V.drawPointList)==null||M.call(V,_)}),oe(),ie()}function et(){var _;(_=a.value)!=null&&_.destroy&&(a.value.destroy(),a.value={},g.value={width:0,height:0,fileNum:0,scanScale:1,fileName:"",ratiomap:{}},Xe.value=[],k.value=[],l.value=0,r.value=0,m.value=0)}function Be(_,V){_==="annotate"?xe(V):_==="tailor"?Z(V):_==="info"?w.value=!0:_==="flip"?Se():_==="delete"?je("delete")(ge.value):y("tool",_,V)}function xe(_){_.tool==="Voice"&&(_.subType="voice",_.tool="Dot",_.custom=!0),a.value.board.startDraw(_)}function tt(){a.value.board.endDraw()}function Se(){a.value.viewer.viewport.toggleFlip()}function ot(_){var V,M;(M=(V=h.value)==null?void 0:V.scopeChange)==null||M.call(V,_)}function nt(){w.value=!0}function Te(_){var V;(V=a.value)!=null&&V.grid&&a.value.grid.updated(_)}function Le(_){var V;(V=a.value)!=null&&V.graduation&&a.value.graduation.updated(_)}function $e(_){var V;(V=a.value)!=null&&V.navigator&&(a.value.navigator.element.style.display=_?"flex":"none")}function ye(_){const V=a.value.viewer.viewport.imageToViewportZoom(Number(_/a.value.$options.scale));a.value.viewer.viewport.zoomTo(V)}function we(_,V){a.value.area&&(a.value.area.moveToLabel(a.value.viewer.viewport.imageToViewportCoordinates(_.x+_.width/2,_.y+_.height/2)),ye(V))}return e.provide("kfbView",a),e.provide("currentLabel",ge),t({kfbView:a,degrees:r,zoom:l,forceRedraw:te,toggleFlip:Se,startDraw:xe,endDraw:tt,shotScreen:Z,info:nt,scopeChange:ot,updateGrid:Te,updateGraduation:Le,updateNavigator:$e,fastMove:me,zoomTo:ye,jumpToLabel:Ve,jumpToPosition:we,reloadLabelList:Ke}),(_,V)=>{var M,U,W;return e.openBlock(),e.createElementBlock("div",{ref_key:"mainKfbViewRef",ref:s,class:"hzzt-kfb-view"},[_.slide.file?e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"kfbViewMainRef",ref:v,class:"hzzt-kfb-view__main","element-loading-text":e.unref(f)("加载中"),"element-loading-background":"rgba(0, 0, 0, 0.8)"},null,8,_o)),[[e.unref(S),d.value]]):(e.openBlock(),e.createElementBlock("div",bo,V[5]||(V[5]=[e.createElementVNode("img",{style:{width:"50%"},src:ce},null,-1)]))),_.analysis&&_.analysis.result?(e.openBlock(),e.createBlock(e.unref(b.ElTag),{key:2,class:"hzzt-kfb-view__tag",type:e.unref(E).type},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(E).name),1)]),_:1},8,["type"])):e.createCommentVNode("",!0),(e.openBlock(),e.createElementBlock("svg",Co,[e.createElementVNode("filter",Vo,[e.createElementVNode("feColorMatrix",{values:e.unref(j),type:"matrix"},null,8,Eo),e.createElementVNode("feColorMatrix",{values:e.unref(q),type:"saturate"},null,8,No),e.createElementVNode("feComponentTransfer",null,[e.createElementVNode("feFuncR",{id:"feFuncR",type:"gamma",exponent:e.unref($).ga,amplitude:"1",offset:"0"},null,8,zo),e.createElementVNode("feFuncG",{id:"feFuncG",type:"gamma",exponent:e.unref($).ga,amplitude:"1",offset:"0"},null,8,Bo),e.createElementVNode("feFuncB",{id:"feFuncB",type:"gamma",exponent:e.unref($).ga,amplitude:"1",offset:"0"},null,8,xo)])])])),e.createVNode(Mt,{menus:_.menus,onTool:Be},null,8,["menus"]),e.createVNode(qt,e.mergeProps(_.microscope,{ref_key:"microscopeRef",ref:h}),null,16),e.unref(p)&&_.slide.file&&g.value.labelImg?(e.openBlock(),e.createBlock(Jt,{key:3,visible:_.showLabel,info:g.value,slide:_.slide,pathologyHandle:_.pathologyHandle,onTool:Be},null,8,["visible","info","slide","pathologyHandle"])):e.createCommentVNode("",!0),e.unref(u)?(e.openBlock(),e.createBlock(so,{key:4})):e.createCommentVNode("",!0),(M=_.slide.children)!=null&&M.length?(e.openBlock(),e.createBlock(co,{key:5,modelValue:m.value,"onUpdate:modelValue":V[0]||(V[0]=P=>m.value=P),slides:_.slide.children},null,8,["modelValue","slides"])):e.createCommentVNode("",!0),(W=(U=g.value)==null?void 0:U.channel)!=null&&W.length?(e.openBlock(),e.createBlock(vo,{key:6,modelValue:k.value,"onUpdate:modelValue":V[1]||(V[1]=P=>k.value=P),info:g.value,onLoad:Je},null,8,["modelValue","info"])):e.createCommentVNode("",!0),e.unref(Ce).length?(e.openBlock(),e.createBlock(ko,{key:7,expand:z.value,"onUpdate:expand":V[2]||(V[2]=P=>z.value=P),style:e.normalizeStyle({top:_.analysis&&_.analysis.result?"24px":"4px"}),annotation:e.unref(ge),annotations:e.unref(Ce),onSelect:e.unref(Ve)},null,8,["expand","style","annotation","annotations","onSelect"])):e.createCommentVNode("",!0),e.createVNode(e.unref(b.ElDialog),{modelValue:w.value,"onUpdate:modelValue":V[3]||(V[3]=P=>w.value=P),"append-to-body":!0,title:e.unref(f)("图像信息"),width:"700px",top:"5vh"},{default:e.withCtx(()=>[e.createVNode(e.unref(b.ElForm),{"label-position":"left"},{default:e.withCtx(()=>[e.createVNode(e.unref(b.ElFormItem),{class:"flex","label-width":"0px"},{default:e.withCtx(()=>[e.createElementVNode("div",So,[e.createElementVNode("img",{src:g.value.labelImg,style:{height:"180px"}},null,8,To),e.createElementVNode("img",{src:g.value.previewImg,style:{height:"180px"},class:"flex-1"},null,8,Lo)])]),_:1}),e.createVNode(e.unref(b.ElFormItem),{label:e.unref(f)("文件名")},{default:e.withCtx(()=>[e.createElementVNode("span",$o,e.toDisplayString(g.value.fileName),1)]),_:1},8,["label"]),e.createVNode(e.unref(b.ElFormItem),{label:e.unref(f)("图像像素")},{default:e.withCtx(()=>[e.createElementVNode("span",Po,e.toDisplayString(g.value.width)+"Pixel - "+e.toDisplayString(g.value.height)+"Pixel",1)]),_:1},8,["label"]),e.createVNode(e.unref(b.ElFormItem),{label:e.unref(f)("扫描倍率")},{default:e.withCtx(()=>[e.createElementVNode("span",Ro,e.toDisplayString(g.value.scanScale),1)]),_:1},8,["label"]),e.createVNode(e.unref(b.ElFormItem),{label:e.unref(f)("扫描时刻")},{default:e.withCtx(()=>[e.createElementVNode("span",Io,e.toDisplayString(g.value.scanTime),1)]),_:1},8,["label"]),e.createVNode(e.unref(b.ElFormItem),{label:e.unref(f)("扫描时间")},{default:e.withCtx(()=>[e.createElementVNode("span",Do,e.toDisplayString(g.value.scanDuration||0)+"s",1)]),_:1},8,["label"]),g.value.ext?(e.openBlock(),e.createBlock(e.unref(b.ElFormItem),{key:0,label:e.unref(f)("扫描设备")},{default:e.withCtx(()=>[e.createElementVNode("span",Ao,e.toDisplayString(g.value.ext.machineNum||""),1)]),_:1},8,["label"])):e.createCommentVNode("",!0)]),_:1})]),_:1},8,["modelValue","title"]),e.createVNode(e.unref(b.ElDialog),{modelValue:e.unref(ne),"onUpdate:modelValue":V[4]||(V[4]=P=>e.isRef(ne)?ne.value=P:null),"append-to-body":!0,title:e.unref(f)("语音输入"),width:"500px",top:"5vh"},{footer:e.withCtx(()=>[e.createVNode(e.unref(b.ElButton),{onClick:e.unref(Fe)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)("取消")),1)]),_:1},8,["onClick"]),e.createVNode(e.unref(b.ElButton),{type:"primary",onClick:e.unref(qe)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)("确定")),1)]),_:1},8,["onClick"])]),default:e.withCtx(()=>[e.createVNode(e.unref(b.ElForm),{"label-position":"left"},{default:e.withCtx(()=>{var P;return[e.createVNode(e.unref(b.ElFormItem),null,{default:e.withCtx(()=>{var T;return[(T=e.unref(le))!=null&&T.src?(e.openBlock(),e.createElementBlock("audio",{key:0,class:"width-100%",src:e.unref(le).src,controls:"",preload:"auto"},null,8,Mo)):e.createCommentVNode("",!0)]}),_:1}),(P=e.unref(le))!=null&&P.src?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(b.ElFormItem),{key:0},{default:e.withCtx(()=>[e.unref(B)?(e.openBlock(),e.createBlock(e.unref(b.ElButton),{key:1,type:"danger",onClick:e.unref(O)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)("结束录音")),1)]),_:1},8,["onClick"])):(e.openBlock(),e.createBlock(e.unref(b.ElButton),{key:0,type:"primary",onClick:e.unref(L)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)("开始录音")),1)]),_:1},8,["onClick"])),e.unref(B)?(e.openBlock(),e.createElementBlock("span",Ho,e.toDisplayString(e.unref(f)("录音时长"))+":"+e.toDisplayString(e.unref(C))+"s",1)):e.createCommentVNode("",!0)]),_:1}))]}),_:1})]),_:1},8,["modelValue","title"]),_.analysis&&_.analysis.hotmap_path&&_.analysis.hotmap_type!=="switch"?(e.openBlock(),e.createElementBlock("div",{key:8,class:"hzzt-kfb-view__hotmap",style:e.normalizeStyle({left:e.unref(Ye)+"px"})},[e.createVNode(e.unref(b.ElIcon),{class:"icon-caret-left",size:"30",onMousedown:e.unref(Ee)},{default:e.withCtx(()=>V[6]||(V[6]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M672 192 288 511.936 672 832z"})],-1)])),_:1,__:[6]},8,["onMousedown"]),e.createVNode(e.unref(b.ElIcon),{class:"icon-caret-right",size:"30",onMousedown:e.unref(Ee)},{default:e.withCtx(()=>V[7]||(V[7]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M384 192v640l384-320.064z"})],-1)])),_:1,__:[7]},8,["onMousedown"])],4)):e.createCommentVNode("",!0),e.unref(N)?(e.openBlock(),e.createElementBlock("div",Fo)):e.createCommentVNode("",!0),e.renderSlot(_.$slots,"default")],512)}}});function qo(c,t){var g;const n=Q.useStorage("default-open-ai",!!((g=c.ai)!=null&&g.default)),o=e.ref(n.value),y=e.ref(n.value),f=e.ref([]),i=e.computed(()=>{var p,u,N,z;return(p=t.value)!=null&&p.analysis?Object.prototype.toString.call((u=t.value)==null?void 0:u.analysis)==="[object Array]"?(N=t.value)==null?void 0:N.analysis:[(z=t.value)==null?void 0:z.analysis]:[]}),s=e.computed(()=>i.value.find(p=>(p==null?void 0:p.class)==="IQC")),v=e.computed(()=>!!s.value),h=e.computed(()=>i.value.find(p=>(p==null?void 0:p.class)!=="IQC")),w=e.computed(()=>!!h.value),a=e.computed(()=>o.value?h.value:y.value?s.value:void 0);e.watch(()=>{var p;return(p=t==null?void 0:t.value)==null?void 0:p.id},()=>{d(),r()}),e.onMounted(()=>{d(),r()});function d(){w.value&&o.value&&(y.value=!1),v.value&&y.value&&(o.value=!1)}function r(){var p;(p=t.value)!=null&&p.id&&i.value.length?w.value&&o.value||v.value&&y.value?l():f.value=[]:f.value=[]}function l(){c.ai.handle(t.value,a.value).then(p=>{f.value=p}).catch(()=>{f.value=[]})}function m(){y.value=!1,r()}function k(){o.value=!1,r()}return{hasAi:w,hasIqc:v,currentAnalysis:a,aiLabelList:f,enableAi:o,enableIqc:y,toggleIqc:k,toggleAi:m}}const Uo=["src","fit"],Ko=["src","fit"],ue=e.defineComponent({name:"KfbImage",__name:"KfbImage",props:{src:{type:String,required:!0,default:""},fit:{type:String,validator:c=>["","contain","cover","fill","none","scale-down"].includes(c),default:""},retryTimes:{type:Number,default:0},load:{type:Function,default:()=>({})},hover:{type:Boolean,default:!1}},setup(c){const t=c;let n=0;const o=e.ref(!1),y=e.reactive({x:0,y:0}),f=e.computed(()=>({top:`${y.y+10}px`,left:`${y.x}px`,transform:"translateY(-50%)",width:`${4*300/3}px`,height:"300px",background:"rgba(0,0,0,0.8)",zIndex:"10000"}));function i(w){const a=w.target;n<t.retryTimes?(a.src=t.src,n++):a.src=ce}function s(w){if(!t.hover)return;if(w.target){const m=w.target,k=m.tagName;let g="";if(m.tagName==="IMG"?g=m.src||"":k==="DIV"&&(g=m.children[0].src||""),g.indexOf(ce)>-1)return}const{x:a,y:d}=v(w),r=4*300/3,l=300;y.x=Math.min(Math.max(a,r/2),window.innerWidth-r/2),y.y=Math.min(Math.max(d,l/2),window.innerHeight-l/2),o.value=!0}function v(w){const a=w.target,d=w.offsetX,r=w.offsetY,l=a.clientWidth,m=a.clientHeight;return{x:w.clientX+l-d,y:w.clientY-r+m/2}}function h(){o.value=!1}return(w,a)=>(e.openBlock(),e.createElementBlock("div",{class:"relative",onMouseenter:s,onMouseleave:h},[e.createElementVNode("img",{src:c.src,fit:c.fit,onError:i,style:{height:"100%",width:"100%"}},null,40,Uo),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[o.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"fixed hzzt-kfb-img-triangle-left",style:e.normalizeStyle(f.value)},[e.createElementVNode("img",{src:c.src,fit:c.fit,style:{objectFit:"contain",height:"100%",width:"100%"},onMouseenter:a[0]||(a[0]=()=>{o.value=!0}),onMouseleave:h},null,40,Ko)],4)):e.createCommentVNode("",!0)]))],32))}}),jo={},Oo={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"};function Go(c,t){return e.openBlock(),e.createElementBlock("svg",Oo,t[0]||(t[0]=[e.createElementVNode("path",{fill:"currentColor",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"},null,-1)]))}const Wo=G(jo,[["render",Go]]),Zo={},Yo={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Xo(c,t){return e.openBlock(),e.createElementBlock("svg",Yo,t[0]||(t[0]=[e.createElementVNode("g",{id:"Frame"},[e.createElementVNode("path",{id:"Vector",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",fill:"currentColor","fill-opacity":"0.9"})],-1)]))}const Jo=G(Zo,[["render",Xo]]),Qo={class:"hzzt-kfb-slides"},en={class:"hzzt-kfb-slides__row"},tn={class:"hzzt-kfb-slides__top"},on={class:"text-primary"},nn={class:"flex align-items-center"},ln={key:0},an=["data-index","onClick"],rn={class:"hzzt-kfb-slides__gallery"},sn=["onClick"],un={key:0,class:"hzzt-kfb-slides__read"},cn=["onClick"],dn={key:1,class:"flex column"},fn={class:"hzzt-kfb-slides__header"},mn={class:"w-30%"},vn={class:"w-40%"},pn={class:"w-20%"},hn=["data-index","onClick"],gn={class:"w-30% flex"},yn={class:"hzzt-kfb-slides__gallery"},wn={key:0,class:"hzzt-kfb-slides__read"},kn={class:"w-40% flex"},_n=["onClick"],bn=["onClick"],Cn={key:0,class:"flex column py-2"},Vn={class:"flex align-items-center justify-content-center"},En={class:"margin-r-1"},Nn={key:0,class:"margin-r-1 margin-l-2"},zn=e.defineComponent({__name:"KfbSlideList",props:{slides:{}},emits:["select","tool"],setup(c,{expose:t,emit:n}){const o=c,y=n,f=e.inject("file-index",{value:0}),i=e.inject("divide",{value:!1}),s=e.inject("sync",{value:!1}),v=e.ref(!1),h=e.ref(),w=e.computed(()=>o.slides.filter(({read:k})=>k)),a=e.computed(()=>o.slides.filter(({check:k})=>k)),{t:d}=K();function r(k){f.value=k,y("select",k)}function l(k){k.check=!k.check}function m(k){var p,u,N;const g=((N=(u=(p=h.value.querySelector('[data-index="0"]'))==null?void 0:p.getBoundingClientRect)==null?void 0:u.call(p))==null?void 0:N.y)||0;h.value.scrollTop=h.value.querySelector(`[data-index="${k}"]`).getBoundingClientRect().y-g}return t({jumpToSlide:m}),(k,g)=>(e.openBlock(),e.createElementBlock("div",Qo,[e.createElementVNode("div",en,[e.createElementVNode("div",tn,[e.createElementVNode("span",null,[g[4]||(g[4]=e.createTextVNode("已读:")),e.createElementVNode("span",on,e.toDisplayString(w.value.length),1),e.createTextVNode("/"+e.toDisplayString(k.slides.length),1)]),e.createElementVNode("div",nn,[e.createVNode(e.unref(b.ElIcon),{class:"margin-r-2 pointer",size:"16",color:v.value?"#999":"#000",onClick:g[0]||(g[0]=p=>v.value=!v.value)},{default:e.withCtx(()=>[e.createVNode(Wo)]),_:1},8,["color"]),e.createVNode(e.unref(b.ElIcon),{class:"pointer",name:"cus-list",size:"16",color:v.value?"#000":"#999",onClick:g[1]||(g[1]=p=>v.value=!v.value)},{default:e.withCtx(()=>[e.createVNode(Jo)]),_:1},8,["color"])])]),e.createElementVNode("div",{class:"flex-1 overflow-auto",style:{width:"100%"},ref_key:"slidesRef",ref:h},[v.value?(e.openBlock(),e.createElementBlock("ul",dn,[e.createElementVNode("li",fn,[g[5]||(g[5]=e.createElementVNode("div",{class:"w-10%"},null,-1)),e.createElementVNode("div",mn,e.toDisplayString(e.unref(d)("缩略图")),1),e.createElementVNode("div",vn,e.toDisplayString(e.unref(d)("切片名")),1),e.createElementVNode("div",pn,e.toDisplayString(e.unref(d)("评分")),1)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.slides,(p,u)=>(e.openBlock(),e.createElementBlock("li",{key:u,"data-index":u,class:"flex align-items-center overflow-hidden",style:e.normalizeStyle({backgroundColor:e.unref(f)===u?"rgba(6, 85, 195, 0.1)":"#fff"}),onClick:N=>r(u)},[e.createElementVNode("div",{class:"w-10% text-center",onClick:e.withModifiers(()=>{},["stop"])},[e.createVNode(e.unref(b.ElCheckbox),{modelValue:p.check,"onUpdate:modelValue":N=>p.check=N,style:{width:"14px",height:"16px"}},null,8,["modelValue","onUpdate:modelValue"])]),e.createElementVNode("div",gn,[e.createElementVNode("div",yn,[e.createVNode(ue,{style:e.normalizeStyle([{transform:`rotate(${p.angle}deg)`},{height:"45px"}]),"retry-times":1,src:p.labelImg,fit:"cover",class:"flex-1"},null,8,["style","src"]),e.createVNode(ue,{"retry-times":1,fit:"cover",src:p.previewImg,style:{height:"45px"},class:"flex-1"},null,8,["src"]),p.read?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",wn,e.toDisplayString(e.unref(d)("未读")),1))])]),e.createElementVNode("div",kn,[e.createVNode(e.unref(b.ElTooltip),{effect:"dark",placement:"bottom",content:`${p.name}`},{default:e.withCtx(()=>[e.createElementVNode("span",{style:{"line-height":"16px"},class:"margin-l-1 ellipsis hzzt-kfb-slides__text",dir:"rtl",onClick:e.withModifiers(N=>l(p),["stop"])},e.toDisplayString(p.name),9,_n)]),_:2},1032,["content"])]),e.createElementVNode("div",{class:"w-20% flex text-center pointer",style:e.normalizeStyle({color:p.gradeColor}),onClick:N=>y("tool","grade",p)},e.toDisplayString(p.grade),13,bn)],12,hn))),128))])):(e.openBlock(),e.createElementBlock("div",ln,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.slides,(p,u)=>(e.openBlock(),e.createElementBlock("div",{key:u,class:e.normalizeClass(["hzzt-kfb-slides__box",e.unref(f)===u?"hzzt-kfb-slides__box--active":""]),"data-index":u,onClick:N=>r(u)},[e.createElementVNode("div",rn,[e.createVNode(ue,{style:e.normalizeStyle({transform:`rotate(${p.angle}deg)`}),"retry-times":1,src:p.labelImg,class:"hzzt-kfb-slides__img",fit:"cover",hover:""},null,8,["style","src"]),e.createVNode(ue,{"retry-times":1,src:p.previewImg,class:"flex-1 hzzt-kfb-slides__img1",fit:"cover"},null,8,["src"])]),e.createElementVNode("div",{class:"flex justify-content-between align-items-center",onClick:e.withModifiers(()=>{},["stop"])},[e.createVNode(e.unref(b.ElCheckbox),{modelValue:p.check,"onUpdate:modelValue":N=>p.check=N,style:{width:"14px",height:"16px"}},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(e.unref(b.ElTooltip),{effect:"dark",placement:"bottom",content:`${p.name}`},{default:e.withCtx(()=>[e.createElementVNode("span",{style:{"line-height":"16px","text-align":"center",width:"calc(100% - 14px)"},class:"margin-l-1 ellipsis",onClick:e.withModifiers(N=>l(p),["stop"])},e.toDisplayString(p.name),9,sn)]),_:2},1032,["content"])]),p.read?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",un,e.toDisplayString(e.unref(d)("未读")),1)),p.grade?(e.openBlock(),e.createElementBlock("div",{key:1,class:"hzzt-kfb-slides__grade",style:e.normalizeStyle({background:p.gradeColor}),onClick:N=>y("tool","grade",p)},e.toDisplayString(p.grade),13,cn)):e.createCommentVNode("",!0),e.renderSlot(k.$slots,"slide",{slide:p},void 0,!0)],10,an))),128))]))],512),e.renderSlot(k.$slots,"footer",{},void 0,!0),a.value.length>1?(e.openBlock(),e.createElementBlock("div",Cn,[e.createElementVNode("div",Vn,[e.createElementVNode("span",En,e.toDisplayString(e.unref(d)("分屏")),1),e.createVNode(e.unref(b.ElSwitch),{modelValue:e.unref(i),"onUpdate:modelValue":g[2]||(g[2]=p=>e.isRef(i)?i.value=p:null)},null,8,["modelValue"]),e.unref(i)?(e.openBlock(),e.createElementBlock("span",Nn,e.toDisplayString(e.unref(d)("同步")),1)):e.createCommentVNode("",!0),e.unref(i)?(e.openBlock(),e.createBlock(e.unref(b.ElSwitch),{key:1,modelValue:e.unref(s),"onUpdate:modelValue":g[3]||(g[3]=p=>e.isRef(s)?s.value=p:null)},null,8,["modelValue"])):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)])]))}}),Bn=G(zn,[["__scopeId","data-v-83d1f685"]]),xn={class:"hzzt-kfb-ai overflow-hidden"},Sn={class:"flex align-items-center margin-t-1"},Tn=["onClick"],Ln={style:{color:"var(--el-color-success)"}},$n={class:"flex-1 flex overflow-auto wrap margin-t-1"},Pn=["onClick"],Rn={key:0,style:{"margin-left":"2px"}},In=e.defineComponent({name:"KfbAiList",__name:"list",props:{data:{default:()=>[]},analysis:{}},setup(c,{expose:t}){const n=c,{t:o}=K(),y=e.inject("kfbViewRef"),f=e.ref(-1),i=e.ref(1),s=e.ref(100),v=e.ref(!0),h=e.ref([]),w=e.computed(()=>n.data.filter(z=>h.value.includes(z.cls||""))),a=e.computed(()=>w.value.slice((i.value-1)*s.value,i.value*s.value)),d=e.computed(()=>{const z=new Set;return n.data.forEach(S=>{const E=S.cls||"";E&&!z.has(E)&&z.add(E)}),Array.from(z)}),r=e.computed(()=>h.value.length!==0&&h.value.length!==d.value.length),l=He(n);e.watch(()=>d.value,z=>{m(),h.value=[...z]}),e.onMounted(()=>{h.value=[...d.value]});function m(){f.value=-1,i.value=1,s.value=100,v.value=!0}function k(z){const S=w.value.findIndex(E=>E.id===z.id);f.value=S,y.value.jumpToLabel(z,5)}function g(z){const S=n.data.filter(E=>E.cls===z);return S.length?`(${S.length})`:""}function p(){f.value=-1,v.value=h.value.length==d.value.length}function u(z){h.value=z?[...d.value]:[],f.value=-1}function N(z,S){z.stopPropagation(),z.preventDefault(),h.value=[S],p()}return t({labelList:w}),(z,S)=>(e.openBlock(),e.createElementBlock("div",xn,[e.createElementVNode("div",Sn,[e.createVNode(e.unref(b.ElPopover),{placement:"bottom",trigger:"click",width:"160"},{reference:e.withCtx(()=>[e.createVNode(e.unref(b.ElButton),{class:"margin-r-1",type:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("分类"))+" ",1),e.createVNode(D,{name:"arrowDown"})]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createVNode(e.unref(b.ElCheckbox),{modelValue:v.value,"onUpdate:modelValue":S[0]||(S[0]=E=>v.value=E),indeterminate:r.value,onChange:u},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("全选")),1)]),_:1},8,["modelValue","indeterminate"]),e.createVNode(e.unref(b.ElCheckboxGroup),{modelValue:h.value,"onUpdate:modelValue":S[1]||(S[1]=E=>h.value=E),class:"flex column",onChange:p},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,E=>(e.openBlock(),e.createBlock(e.unref(b.ElCheckbox),{key:E,value:E},{default:e.withCtx(()=>[e.createElementVNode("p",{onClick:A=>N(A,E)},[e.createTextVNode(e.toDisplayString(E),1),e.createElementVNode("span",Ln,e.toDisplayString(g(E)),1)],8,Tn)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])])]),_:1}),e.createVNode(e.unref(b.ElTag),{type:e.unref(l).type,class:"margin-l-1"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l).name),1)]),_:1},8,["type"])]),e.renderSlot(z.$slots,"default",{analysis:z.analysis}),e.createElementVNode("div",$n,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,(E,A)=>(e.openBlock(),e.createElementBlock("div",{key:A+(i.value-1)*s.value,class:e.normalizeClass(`hzzt-kfb-ai__img ${f.value===A+(i.value-1)*s.value?"hzzt-kfb-ai__img--active":""}`),onClick:$=>k(E)},[e.createVNode(e.unref(ut),{"retry-times":1,src:E.imageUrl,"error-src":e.unref(ce)},null,8,["src","error-src"]),e.createElementVNode("div",{style:e.normalizeStyle({color:E.strokeStyle}),class:"ellipsis"},[e.createTextVNode(e.toDisplayString(E.cls)+" ",1),E.score?(e.openBlock(),e.createElementBlock("span",Rn,e.toDisplayString(E.score),1)):e.createCommentVNode("",!0)],4)],10,Pn))),128))]),e.createVNode(e.unref(b.ElPagination),{class:"wrap","current-page":i.value,"onUpdate:currentPage":S[2]||(S[2]=E=>i.value=E),"page-size":s.value,"onUpdate:pageSize":S[3]||(S[3]=E=>s.value=E),"page-sizes":[100,200,300,400],layout:"total, sizes, prev, pager, next",total:w.value.length},null,8,["current-page","page-size","total"])]))}}),Dn={class:"hzzt-kfb-slide"},An={class:"flex flex-1 overflow-hidden"},Mn={class:"flex flex-1"},Hn={key:0,style:{height:"100%",width:"100%"},class:"flex wrap"},Fn=["onClick"],fe=e.defineComponent({name:"HzztKfbSlide",__name:"HzztKfbSlide",props:e.mergeModels({menus:{default:()=>[]},kfb:{},slides:{default:()=>[]},ai:{},teleport:{type:Boolean,default:!1},watermark:{},process:{},microscope:{},showList:{type:Boolean,default:!0},showKfbLabel:{type:Boolean,default:!0},showKeyboard:{type:Boolean,default:!1},showMenuText:{type:Boolean,default:!0},showWatermark:{type:Boolean,default:!1}},{index:{default:0},indexModifiers:{}}),emits:e.mergeModels(["tool"],["update:index"]),setup(c,{expose:t,emit:n}){const o=c,y=n,f=e.useModel(c,"index"),i=e.computed(()=>o.slides[f.value]),s=e.computed(()=>o.slides.filter(({check:C})=>C)),v=e.ref(),h=e.ref(),w=e.ref(),a=e.ref(),d=Q.useStorage("kfb-showKeyboard",o.showKeyboard),r=Q.useStorage("kfb-showKfbLabel",o.showKfbLabel),l=Q.useStorage("kfb-showWatermark",o.showWatermark),m=Q.useStorage("kfb-showMenuText",o.showMenuText),k=e.ref(!1),g=e.ref(!1),{t:p}=K(),u=e.computed(()=>{var C;if(k.value){const B=s.value.findIndex(({id:L})=>{var O;return L===((O=i.value)==null?void 0:O.id)});return((C=w.value)==null?void 0:C[B])||h.value}else return h.value}),N=e.computed(()=>s.value.length<=1?{height:"100%",width:"100%"}:s.value.length<=2?{height:"100%",width:"calc((100% - 4px) / 2)"}:s.value.length<=4?{height:"calc((100% - 4px) / 2)",width:"calc((100% - 4px) / 2)"}:s.value.length<=6?{height:"calc((100% - 4px) / 2)",width:"calc((100% - 4px * 2) / 3)"}:s.value.length<=9?{height:"calc((100% - 4px * 2) / 3)",width:"calc((100% - 4px * 2) / 3)"}:{height:"100%",width:"100%"});e.watch(()=>s.value,C=>{k.value&&C.length<=1&&(k.value=!1)}),e.watch(()=>i.value,C=>{if(C){const B=C.read;C.read=!0,y("tool","choose",{slide:C,read:B})}}),Object.entries({keyboard:d,kfbLabel:r,watermark:l,menuText:m}).forEach(([C,B])=>{e.watch(()=>B.value,L=>{y("tool",C,L)})});const{hasAi:S,hasIqc:E,currentAnalysis:A,aiLabelList:$,enableAi:j,enableIqc:q,toggleIqc:te,toggleAi:oe}=qo(o,i);function Z(C,B){C==="next"&&o.slides[f.value+1]&&f.value++,C==="prev"&&o.slides[f.value-1]&&f.value--,(C==="label"||C==="tool")&&(r.value=B),y("tool",C,B)}function ie(C){var L,O;const B=Y(I({},o.kfb),{watermark:o.watermark,process:o.process,microscope:o.microscope,slide:C,aiLabelList:i.value.id===C.id?((L=a.value)==null?void 0:L.labelList)||[]:[],syncPosition:g.value,syncZoom:g.value,handle:void 0,analysis:i.value.id===C.id?A.value:void 0});return(O=o.kfb)!=null&&O.handle?o.kfb.handle(C,B):B}function me(C){f.value=o.slides.findIndex(B=>B.id===C.id)}function ve(C){k.value&&(o.slides[C].check=!0)}function pe(){var C;(C=k.value?w.value:[h.value])==null||C.forEach(B=>{r.value||(B.updateGrid({show:r.value,ruler:r.value}),d.value=r.value),B.updateGraduation({show:r.value}),B.updateNavigator(r.value)})}function ne(C){f.value=C,v.value&&v.value.jumpToSlide(C)}function le(C,B){u.value&&u.value.jumpToLabel(C,B)}function he(C,B){u.value&&u.value.jumpToPosition(C,B)}return e.provide("kfbViewRef",u),e.provide("show-keyboard",d),e.provide("show-kfb-label",r),e.provide("show-menu-text",m),e.provide("show-watermark",l),e.provide("file-index",f),e.provide("divide",k),e.provide("sync",g),t({divide:k,slide:i,kfbViewRef:u,jumpToSlide:ne,jumpToLabel:le,jumpToPosition:he,analysis:A,enableAi:j,enableIqc:q,showAiList:e.computed(()=>{var C;return!!((C=o.ai)!=null&&C.enable)&&$.value.length})}),(C,B)=>(e.openBlock(),e.createElementBlock("div",Dn,[C.menus.length?(e.openBlock(),e.createBlock(re,{key:0,menu:C.menus,process:C.process,microscope:C.microscope,onTool:Z},{left:e.withCtx(()=>[e.renderSlot(C.$slots,"left")]),right:e.withCtx(()=>[e.createVNode(e.unref(b.ElSwitch),{modelValue:e.unref(r),"onUpdate:modelValue":B[0]||(B[0]=L=>e.isRef(r)?r.value=L:null),"active-text":e.unref(p)("隐藏标签"),"active-value":!1,"inactive-value":!0,class:"margin-r-2",onChange:pe},null,8,["modelValue","active-text"]),C.ai&&C.ai.enable&&e.unref(E)?(e.openBlock(),e.createBlock(e.unref(b.ElSwitch),{key:0,modelValue:e.unref(q),"onUpdate:modelValue":B[1]||(B[1]=L=>e.isRef(q)?q.value=L:null),"active-text":e.unref(p)("AI质控"),class:"margin-r-2",onChange:e.unref(te)},null,8,["modelValue","active-text","onChange"])):e.createCommentVNode("",!0),C.ai&&C.ai.enable&&e.unref(S)?(e.openBlock(),e.createBlock(e.unref(b.ElSwitch),{key:1,modelValue:e.unref(j),"onUpdate:modelValue":B[2]||(B[2]=L=>e.isRef(j)?j.value=L:null),"active-text":e.unref(p)("AI分析"),class:"margin-r-2",onChange:e.unref(oe)},null,8,["modelValue","active-text","onChange"])):e.createCommentVNode("",!0),e.renderSlot(C.$slots,"right")]),_:3},8,["menu","process","microscope"])):e.createCommentVNode("",!0),e.createElementVNode("div",An,[C.showList?(e.openBlock(),e.createBlock(e.Teleport,{key:0,defer:"",to:"#kfb-slide-list",disabled:!C.teleport},[e.createVNode(Bn,{ref_key:"slidesRef",ref:v,style:e.normalizeStyle(C.teleport?"":"width: 250px"),slides:C.slides,onSelect:ve,onTool:Z},{slide:e.withCtx(({slide:L})=>[e.renderSlot(C.$slots,"list",{slide:L})]),footer:e.withCtx(()=>[e.renderSlot(C.$slots,"listFooter")]),_:3},8,["style","slides"])],8,["disabled"])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.Teleport,{defer:"",to:"#kfb-slide-view",disabled:!C.teleport},[e.createElementVNode("div",Mn,[s.value.length&&k.value?(e.openBlock(),e.createElementBlock("ul",Hn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(L,O)=>(e.openBlock(),e.createElementBlock("li",{key:O,style:e.normalizeStyle(N.value),class:e.normalizeClass(i.value.id===L.id?"hzzt-kfb-view-screen-active":""),onClick:be=>me(L)},[(e.openBlock(),e.createBlock(ee,e.mergeProps({ref_for:!0,ref_key:"kfbViewRefs",ref:w,key:`kfb-${O}`},{ref_for:!0},ie(L),{onTool:Z}),{default:e.withCtx(()=>[e.renderSlot(C.$slots,"kfb",{slide:L})]),_:2},1040))],14,Fn))),128))])):i.value?(e.openBlock(),e.createBlock(ee,e.mergeProps({key:1,ref_key:"kfbViewRef",ref:h},ie(i.value),{onTool:Z}),{default:e.withCtx(()=>[e.renderSlot(C.$slots,"kfb",{slide:i.value})]),_:3},16)):e.createCommentVNode("",!0)])],8,["disabled"])),C.ai&&C.ai.enable&&e.unref($).length?(e.openBlock(),e.createBlock(e.Teleport,{key:1,defer:"",to:"#kfb-slide-ai",disabled:!C.teleport},[e.createVNode(In,{style:e.normalizeStyle(C.teleport?"":"width: 350px"),ref_key:"kfbAiRef",ref:a,data:e.unref($),slide:i.value,analysis:e.unref(A)},{default:e.withCtx(({analysis:L})=>[e.renderSlot(C.$slots,"analysis",{analysis:L})]),_:3},8,["style","data","slide","analysis"])],8,["disabled"])):e.createCommentVNode("",!0),e.renderSlot(C.$slots,"default")])]))}});fe.name="HzztKfbSlide";ee.name="HzztKfbView";re.name="HzztKfbToolbox";const qn=(c,t)=>{c.use(ct,t==null?void 0:t.i18n),c.component(fe.name,fe),c.component(ee.name,ee),c.component(re.name,re)},Un={install:qn};exports.DEFAULT_MICROSCOPE=de;exports.DEFAULT_PROCESS=_e;exports.I18N_INJECT_KEY=ke;exports._export_sfc=G;exports._sfc_main=D;exports._sfc_main$1=fe;exports._sfc_main$2=ee;exports._sfc_main$3=re;exports.index=Un;exports.useLocalI18n=K;
|