@rytass/bpm-core-react 0.14.0 → 0.16.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.
Files changed (247) hide show
  1. package/CHANGELOG.md +83 -0
  2. package/dist/chunks/{FormBuilderView-BYLN6W-P.js → FormBuilderView-BYL42M0d.js} +499 -476
  3. package/dist/chunks/FormBuilderView-BYL42M0d.js.map +1 -0
  4. package/dist/chunks/FormBuilderView-aBcA-_tt.cjs +3 -0
  5. package/dist/chunks/FormBuilderView-aBcA-_tt.cjs.map +1 -0
  6. package/dist/chunks/FormRendererView-DRFi_IH7.cjs +4 -0
  7. package/dist/chunks/FormRendererView-DRFi_IH7.cjs.map +1 -0
  8. package/dist/chunks/FormRendererView-cZGOOjU5.js +986 -0
  9. package/dist/chunks/FormRendererView-cZGOOjU5.js.map +1 -0
  10. package/dist/chunks/{admin-pickers-DLlG_1du.js → admin-pickers-DxhzECkD.js} +52 -51
  11. package/dist/chunks/admin-pickers-DxhzECkD.js.map +1 -0
  12. package/dist/chunks/admin-pickers-qe3j--gX.cjs +2 -0
  13. package/dist/chunks/admin-pickers-qe3j--gX.cjs.map +1 -0
  14. package/dist/chunks/approval-instance-list-page-CPXMP3PL.js.map +1 -1
  15. package/dist/chunks/approval-instance-list-page-ax0pm8bt.cjs.map +1 -1
  16. package/dist/chunks/auth-provider-4BeCw7cI.cjs.map +1 -1
  17. package/dist/chunks/auth-provider-B5oPmvk2.js.map +1 -1
  18. package/dist/chunks/bpm-form-field-Bc6k4ZEO.cjs.map +1 -1
  19. package/dist/chunks/bpm-form-field-Cao0rMol.js.map +1 -1
  20. package/dist/chunks/{categories-DGlxuC6X.js → categories-1gKxeEqw.js} +4 -10
  21. package/dist/chunks/categories-1gKxeEqw.js.map +1 -0
  22. package/dist/chunks/{categories-Yid05WAX.cjs → categories-DjENouRm.cjs} +2 -2
  23. package/dist/chunks/categories-DjENouRm.cjs.map +1 -0
  24. package/dist/chunks/{compose-CSWbRgJJ.js → compose-DO6n0NJi.js} +5 -5
  25. package/dist/chunks/compose-DO6n0NJi.js.map +1 -0
  26. package/dist/chunks/compose-DUH9cQ-L.cjs +2 -0
  27. package/dist/chunks/compose-DUH9cQ-L.cjs.map +1 -0
  28. package/dist/chunks/dashboard-page-BWQBSGDq.cjs +2 -0
  29. package/dist/chunks/dashboard-page-BWQBSGDq.cjs.map +1 -0
  30. package/dist/chunks/{dashboard-page-CeCLV1tp.js → dashboard-page-DdBvV6YI.js} +15 -16
  31. package/dist/chunks/dashboard-page-DdBvV6YI.js.map +1 -0
  32. package/dist/chunks/delegations-BLzYnOae.cjs +2 -0
  33. package/dist/chunks/delegations-BLzYnOae.cjs.map +1 -0
  34. package/dist/chunks/delegations-Ckf03icM.cjs +2 -0
  35. package/dist/chunks/delegations-Ckf03icM.cjs.map +1 -0
  36. package/dist/chunks/{delegations-DRupxJ4_.js → delegations-MxF3uJGW.js} +205 -215
  37. package/dist/chunks/delegations-MxF3uJGW.js.map +1 -0
  38. package/dist/chunks/{delegations-B8gLSt0i.js → delegations-_b4_xBit.js} +167 -173
  39. package/dist/chunks/delegations-_b4_xBit.js.map +1 -0
  40. package/dist/chunks/designer-2YvjP_GU.cjs +65 -0
  41. package/dist/chunks/designer-2YvjP_GU.cjs.map +1 -0
  42. package/dist/chunks/{designer-BtsIL0BB.js → designer-B-cfiob9.js} +1334 -1254
  43. package/dist/chunks/designer-B-cfiob9.js.map +1 -0
  44. package/dist/chunks/{detail-C8NOqY0p.js → detail-C6NdVijG.js} +852 -841
  45. package/dist/chunks/detail-C6NdVijG.js.map +1 -0
  46. package/dist/chunks/detail-DKobK4Cg.cjs +2 -0
  47. package/dist/chunks/detail-DKobK4Cg.cjs.map +1 -0
  48. package/dist/chunks/format-date-time-CB-LxzqT.js.map +1 -1
  49. package/dist/chunks/format-date-time-D-cx5M8z.cjs.map +1 -1
  50. package/dist/chunks/format-member-label-DudVI55w.js +13 -0
  51. package/dist/chunks/format-member-label-DudVI55w.js.map +1 -0
  52. package/dist/chunks/format-member-label-t7ANTF62.cjs +2 -0
  53. package/dist/chunks/format-member-label-t7ANTF62.cjs.map +1 -0
  54. package/dist/chunks/login-AtVxZBsC.cjs.map +1 -1
  55. package/dist/chunks/login-C6qlTC6F.js.map +1 -1
  56. package/dist/chunks/notifications-Bc4mgSds.cjs.map +1 -1
  57. package/dist/chunks/notifications-DJ5wzCye.js.map +1 -1
  58. package/dist/chunks/{orgs-BpqVu5ka.js → orgs-Bpp1U60k.js} +538 -557
  59. package/dist/chunks/orgs-Bpp1U60k.js.map +1 -0
  60. package/dist/chunks/orgs-ywaE1_02.cjs +2 -0
  61. package/dist/chunks/orgs-ywaE1_02.cjs.map +1 -0
  62. package/dist/chunks/providers-DHtDZFNA.cjs.map +1 -1
  63. package/dist/chunks/providers-J5eyByQj.js.map +1 -1
  64. package/dist/chunks/router-adapter--gYs13E8.cjs.map +1 -1
  65. package/dist/chunks/router-adapter-DftlFTOd.js.map +1 -1
  66. package/dist/chunks/routes-config-C1j_vFKo.cjs.map +1 -1
  67. package/dist/chunks/routes-config-yZbESPlw.js.map +1 -1
  68. package/dist/chunks/task-node-label-BF6UllxP.cjs +2 -0
  69. package/dist/chunks/task-node-label-BF6UllxP.cjs.map +1 -0
  70. package/dist/chunks/task-node-label-CWZgOBj0.js +9 -0
  71. package/dist/chunks/task-node-label-CWZgOBj0.js.map +1 -0
  72. package/dist/chunks/use-bpm-member-D57LKe_u.js.map +1 -1
  73. package/dist/chunks/use-bpm-member-DpNAQtNC.cjs.map +1 -1
  74. package/dist/chunks/users-BSVo_eNe.js +215 -0
  75. package/dist/chunks/users-BSVo_eNe.js.map +1 -0
  76. package/dist/chunks/users-DFSBTDMy.cjs +2 -0
  77. package/dist/chunks/users-DFSBTDMy.cjs.map +1 -0
  78. package/dist/index.cjs +1 -1
  79. package/dist/index.cjs.map +1 -1
  80. package/dist/index.js +2 -2
  81. package/dist/index.js.map +1 -1
  82. package/dist/lib/format-member-label.d.ts +12 -0
  83. package/dist/lib/member-profile-resolution.d.ts +48 -0
  84. package/dist/lib/routes-config.d.ts +1 -1
  85. package/dist/lib/task-node-label.d.ts +10 -0
  86. package/dist/next/index.cjs.map +1 -1
  87. package/dist/next/index.js.map +1 -1
  88. package/dist/next/workflow-chat-route.cjs.map +1 -1
  89. package/dist/next/workflow-chat-route.js.map +1 -1
  90. package/dist/pages/admin/delegations/index.cjs +1 -1
  91. package/dist/pages/admin/delegations/index.cjs.map +1 -1
  92. package/dist/pages/admin/delegations/index.js +1 -1
  93. package/dist/pages/admin/delegations/index.js.map +1 -1
  94. package/dist/pages/admin/orgs/index.cjs +1 -1
  95. package/dist/pages/admin/orgs/index.cjs.map +1 -1
  96. package/dist/pages/admin/orgs/index.js +1 -1
  97. package/dist/pages/admin/orgs/index.js.map +1 -1
  98. package/dist/pages/admin/users/index.cjs +1 -1
  99. package/dist/pages/admin/users/index.cjs.map +1 -1
  100. package/dist/pages/admin/users/index.js +1 -1
  101. package/dist/pages/admin/users/index.js.map +1 -1
  102. package/dist/pages/admin/webhook-endpoints/index.cjs.map +1 -1
  103. package/dist/pages/admin/webhook-endpoints/index.js.map +1 -1
  104. package/dist/pages/cc/index.cjs.map +1 -1
  105. package/dist/pages/cc/index.js.map +1 -1
  106. package/dist/pages/dashboard/index.cjs.map +1 -1
  107. package/dist/pages/dashboard/index.js.map +1 -1
  108. package/dist/pages/delegations/index.cjs +1 -1
  109. package/dist/pages/delegations/index.cjs.map +1 -1
  110. package/dist/pages/delegations/index.js +1 -1
  111. package/dist/pages/delegations/index.js.map +1 -1
  112. package/dist/pages/inbox/index.cjs.map +1 -1
  113. package/dist/pages/inbox/index.js.map +1 -1
  114. package/dist/pages/instances/detail/index.cjs +1 -1
  115. package/dist/pages/instances/detail/index.cjs.map +1 -1
  116. package/dist/pages/instances/detail/index.js +1 -1
  117. package/dist/pages/instances/detail/index.js.map +1 -1
  118. package/dist/pages/instances/new/index.cjs.map +1 -1
  119. package/dist/pages/instances/new/index.js.map +1 -1
  120. package/dist/pages/login/index.cjs.map +1 -1
  121. package/dist/pages/login/index.js.map +1 -1
  122. package/dist/pages/root/index.cjs.map +1 -1
  123. package/dist/pages/root/index.js.map +1 -1
  124. package/dist/pages/search/index.cjs.map +1 -1
  125. package/dist/pages/search/index.js.map +1 -1
  126. package/dist/pages/sent/index.cjs.map +1 -1
  127. package/dist/pages/sent/index.js.map +1 -1
  128. package/dist/pages/settings/notifications/index.cjs.map +1 -1
  129. package/dist/pages/settings/notifications/index.js.map +1 -1
  130. package/dist/pages/templates/categories/index.cjs +1 -1
  131. package/dist/pages/templates/categories/index.cjs.map +1 -1
  132. package/dist/pages/templates/categories/index.js +1 -1
  133. package/dist/pages/templates/categories/index.js.map +1 -1
  134. package/dist/pages/templates/compose/index.cjs +1 -1
  135. package/dist/pages/templates/compose/index.cjs.map +1 -1
  136. package/dist/pages/templates/compose/index.js +1 -1
  137. package/dist/pages/templates/compose/index.js.map +1 -1
  138. package/dist/pages/templates/designer/index.cjs +1 -1
  139. package/dist/pages/templates/designer/index.cjs.map +1 -1
  140. package/dist/pages/templates/designer/index.js +1 -1
  141. package/dist/pages/templates/designer/index.js.map +1 -1
  142. package/dist/pages/templates/index.cjs.map +1 -1
  143. package/dist/pages/templates/index.js.map +1 -1
  144. package/dist/pages/templates/versions/index.cjs.map +1 -1
  145. package/dist/pages/templates/versions/index.js.map +1 -1
  146. package/dist/views/admin/delegations/index.cjs +1 -1
  147. package/dist/views/admin/delegations/index.js +1 -2
  148. package/dist/views/admin/index.cjs +1 -1
  149. package/dist/views/admin/index.js +3 -3
  150. package/dist/views/admin/orgs/index.cjs +1 -1
  151. package/dist/views/admin/orgs/index.js +1 -2
  152. package/dist/views/admin/users/index.cjs +1 -1
  153. package/dist/views/admin/users/index.js +1 -2
  154. package/dist/views/admin/webhook-endpoints/index.cjs.map +1 -1
  155. package/dist/views/admin/webhook-endpoints/index.js.map +1 -1
  156. package/dist/views/cc/index.cjs.map +1 -1
  157. package/dist/views/cc/index.js.map +1 -1
  158. package/dist/views/dashboard/index.cjs +1 -1
  159. package/dist/views/dashboard/index.cjs.map +1 -1
  160. package/dist/views/dashboard/index.js +1 -1
  161. package/dist/views/dashboard/index.js.map +1 -1
  162. package/dist/views/delegations/index.cjs +1 -1
  163. package/dist/views/delegations/index.js +1 -2
  164. package/dist/views/forms/builder/index.cjs +1 -1
  165. package/dist/views/forms/builder/index.js +1 -2
  166. package/dist/views/forms/renderer/form-field-link.d.ts +16 -0
  167. package/dist/views/forms/renderer/index.cjs +1 -1
  168. package/dist/views/forms/renderer/index.js +1 -2
  169. package/dist/views/forms/renderer/member-field-options.d.ts +39 -0
  170. package/dist/views/forms/renderer/member-field.d.ts +21 -0
  171. package/dist/views/inbox/index.cjs +1 -1
  172. package/dist/views/inbox/index.cjs.map +1 -1
  173. package/dist/views/inbox/index.js +101 -102
  174. package/dist/views/inbox/index.js.map +1 -1
  175. package/dist/views/instances/detail/index.cjs +1 -1
  176. package/dist/views/instances/detail/index.js +1 -2
  177. package/dist/views/instances/detail/sections/container-helpers.d.ts +3 -2
  178. package/dist/views/instances/detail/submitted-by.d.ts +23 -0
  179. package/dist/views/instances/index.js +1 -2
  180. package/dist/views/instances/new/index.cjs +1 -1
  181. package/dist/views/instances/new/index.cjs.map +1 -1
  182. package/dist/views/instances/new/index.js +4 -11
  183. package/dist/views/instances/new/index.js.map +1 -1
  184. package/dist/views/login/index.js +1 -2
  185. package/dist/views/search/index.cjs.map +1 -1
  186. package/dist/views/search/index.js.map +1 -1
  187. package/dist/views/sent/SentView.d.ts +1 -1
  188. package/dist/views/sent/index.cjs +1 -1
  189. package/dist/views/sent/index.cjs.map +1 -1
  190. package/dist/views/sent/index.js +2 -2
  191. package/dist/views/sent/index.js.map +1 -1
  192. package/dist/views/settings/index.js +1 -2
  193. package/dist/views/settings/notifications/index.js +1 -2
  194. package/dist/views/templates/categories/index.cjs +1 -1
  195. package/dist/views/templates/categories/index.js +1 -2
  196. package/dist/views/templates/compose/index.cjs +1 -1
  197. package/dist/views/templates/compose/index.js +1 -2
  198. package/dist/views/templates/designer/designer-version-labels.d.ts +12 -0
  199. package/dist/views/templates/designer/dry-run-assignee-label.d.ts +28 -0
  200. package/dist/views/templates/designer/dry-run-sample-data.d.ts +9 -0
  201. package/dist/views/templates/designer/dynamic-form-resolver-options.d.ts +35 -0
  202. package/dist/views/templates/designer/index.cjs +1 -1
  203. package/dist/views/templates/designer/index.js +1 -2
  204. package/dist/views/templates/index.cjs +1 -1
  205. package/dist/views/templates/index.cjs.map +1 -1
  206. package/dist/views/templates/index.js +1 -1
  207. package/dist/views/templates/index.js.map +1 -1
  208. package/dist/views/templates/versions/index.cjs.map +1 -1
  209. package/dist/views/templates/versions/index.js.map +1 -1
  210. package/package.json +5 -5
  211. package/dist/chunks/FormBuilderView-BYLN6W-P.js.map +0 -1
  212. package/dist/chunks/FormBuilderView-VmdPVbg7.cjs +0 -3
  213. package/dist/chunks/FormBuilderView-VmdPVbg7.cjs.map +0 -1
  214. package/dist/chunks/FormRendererView-Bs8lTb4k.cjs +0 -2
  215. package/dist/chunks/FormRendererView-Bs8lTb4k.cjs.map +0 -1
  216. package/dist/chunks/FormRendererView-UPowZZgw.js +0 -798
  217. package/dist/chunks/FormRendererView-UPowZZgw.js.map +0 -1
  218. package/dist/chunks/admin-pickers-Btvij1at.cjs +0 -2
  219. package/dist/chunks/admin-pickers-Btvij1at.cjs.map +0 -1
  220. package/dist/chunks/admin-pickers-DLlG_1du.js.map +0 -1
  221. package/dist/chunks/categories-DGlxuC6X.js.map +0 -1
  222. package/dist/chunks/categories-Yid05WAX.cjs.map +0 -1
  223. package/dist/chunks/compose-CHZoX-H0.cjs +0 -2
  224. package/dist/chunks/compose-CHZoX-H0.cjs.map +0 -1
  225. package/dist/chunks/compose-CSWbRgJJ.js.map +0 -1
  226. package/dist/chunks/dashboard-page-CeCLV1tp.js.map +0 -1
  227. package/dist/chunks/dashboard-page-DooFJsxM.cjs +0 -2
  228. package/dist/chunks/dashboard-page-DooFJsxM.cjs.map +0 -1
  229. package/dist/chunks/delegations-8LsxcQM4.cjs +0 -2
  230. package/dist/chunks/delegations-8LsxcQM4.cjs.map +0 -1
  231. package/dist/chunks/delegations-B8gLSt0i.js.map +0 -1
  232. package/dist/chunks/delegations-DRupxJ4_.js.map +0 -1
  233. package/dist/chunks/delegations-DlYwMiAW.cjs +0 -2
  234. package/dist/chunks/delegations-DlYwMiAW.cjs.map +0 -1
  235. package/dist/chunks/designer-BtsIL0BB.js.map +0 -1
  236. package/dist/chunks/designer-Dm6cX2kZ.cjs +0 -65
  237. package/dist/chunks/designer-Dm6cX2kZ.cjs.map +0 -1
  238. package/dist/chunks/detail-C8NOqY0p.js.map +0 -1
  239. package/dist/chunks/detail-CX-3hZoL.cjs +0 -2
  240. package/dist/chunks/detail-CX-3hZoL.cjs.map +0 -1
  241. package/dist/chunks/orgs-BpqVu5ka.js.map +0 -1
  242. package/dist/chunks/orgs-D0-5BaHT.cjs +0 -2
  243. package/dist/chunks/orgs-D0-5BaHT.cjs.map +0 -1
  244. package/dist/chunks/users-C9LA-Rd7.cjs +0 -2
  245. package/dist/chunks/users-C9LA-Rd7.cjs.map +0 -1
  246. package/dist/chunks/users-FWrb3ehW.js +0 -214
  247. package/dist/chunks/users-FWrb3ehW.js.map +0 -1
@@ -3,18 +3,20 @@ import { n as e } from "./auth-provider-B5oPmvk2.js";
3
3
  import { t } from "./format-date-time-CB-LxzqT.js";
4
4
  import { t as n } from "./bpm-form-field-Cao0rMol.js";
5
5
  import { t as r } from "./use-bpm-member-D57LKe_u.js";
6
- import { i, t as a } from "./FormRendererView-UPowZZgw.js";
6
+ import { t as i } from "./format-member-label-DudVI55w.js";
7
+ import { t as a } from "./task-node-label-CWZgOBj0.js";
8
+ import { o, t as s } from "./FormRendererView-cZGOOjU5.js";
7
9
  import '../style.css';import '../detail.css';/* empty css */
8
- import { Fragment as o, forwardRef as s, useCallback as c, useEffect as l, useImperativeHandle as u, useMemo as d, useRef as f, useState as p } from "react";
9
- import { AutoComplete as m, Badge as h, Button as g, Input as ee, Modal as _, PageHeader as v, Section as y, SectionGroup as te, Select as ne, Stepper as b, Table as x, Textarea as re, Tooltip as ie, Typography as S } from "@mezzanine-ui/react";
10
- import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
11
- import { cancelAdhocDirective as ae, cancelApprovalInstance as oe, configureAdhocCompletionNotification as E, configureAdhocStageNotification as se, decideTask as ce, listAdhocDirectives as le, listAttachments as ue, listTaskDecisions as de, listWorkflowWebhookDeliveries as fe, readApprovalInstance as pe, readAttachmentDownloadUrl as me, readAttachmentPreviewUrl as he, readInstanceSignatures as ge, requestAdhocCountersign as _e, requestAdhocPreApproval as ve, resolveMemberProfiles as ye, resubmitApprovalInstance as be, retryWorkflowWebhookDelivery as xe, searchMembers as Se, uploadAttachment as Ce } from "@rytass/bpm-core-client/workflow";
12
- import we from "@mezzanine-ui/react/ContentHeader";
13
- import { CheckedIcon as Te, ChevronLeftIcon as D, ChevronRightIcon as Ee, DangerousOutlineIcon as De, DownloadIcon as Oe, FileSearchIcon as ke, NotificationUnreadIcon as Ae, PlusIcon as je, RefreshCcwIcon as Me, ResetIcon as O, ShareIcon as Ne, UserIcon as Pe, ZoomInIcon as Fe, ZoomOutIcon as Ie } from "@mezzanine-ui/icons";
14
- import { buildFormRendererValues as Le, focusFormRendererField as Re, readFormDataSourceErrorMessage as ze, validateFormRendererValues as Be } from "@rytass/bpm-core-client/form";
15
- import { Background as k, Controls as Ve, Handle as He, Position as Ue, ReactFlow as We } from "@xyflow/react";
16
- import * as Ge from "dagre";
17
- import { Document as A, Page as Ke } from "react-pdf";
10
+ import { Fragment as c, forwardRef as l, useCallback as u, useEffect as d, useImperativeHandle as f, useMemo as p, useRef as m, useState as h } from "react";
11
+ import { AutoComplete as ee, Badge as g, Button as _, Input as v, Modal as y, PageHeader as te, Section as b, SectionGroup as ne, Select as x, Stepper as re, Table as ie, Textarea as ae, Tooltip as S, Typography as C } from "@mezzanine-ui/react";
12
+ import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
13
+ import { cancelAdhocDirective as oe, cancelApprovalInstance as se, configureAdhocCompletionNotification as ce, configureAdhocStageNotification as le, decideTask as ue, listAdhocDirectives as de, listAttachments as fe, listTaskDecisions as pe, listWorkflowWebhookDeliveries as me, readApprovalInstance as he, readAttachmentDownloadUrl as ge, readAttachmentPreviewUrl as _e, readInstanceSignatures as ve, requestAdhocCountersign as ye, requestAdhocPreApproval as be, resolveMemberProfiles as xe, resubmitApprovalInstance as Se, retryWorkflowWebhookDelivery as Ce, searchMembers as we, uploadAttachment as Te } from "@rytass/bpm-core-client/workflow";
14
+ import Ee from "@mezzanine-ui/react/ContentHeader";
15
+ import { CheckedIcon as De, ChevronLeftIcon as Oe, ChevronRightIcon as ke, DangerousOutlineIcon as Ae, DownloadIcon as D, FileSearchIcon as je, NotificationUnreadIcon as Me, PlusIcon as Ne, RefreshCcwIcon as Pe, ResetIcon as O, ShareIcon as Fe, UserIcon as Ie, ZoomInIcon as Le, ZoomOutIcon as Re } from "@mezzanine-ui/icons";
16
+ import { buildFormRendererValues as ze, focusFormRendererField as Be, readFormDataSourceErrorMessage as Ve, validateFormRendererValues as k } from "@rytass/bpm-core-client/form";
17
+ import { Background as He, Controls as Ue, Handle as We, Position as A, ReactFlow as Ge } from "@xyflow/react";
18
+ import * as Ke from "dagre";
19
+ import { Document as qe, Page as Je } from "react-pdf";
18
20
  import { stepClasses as j } from "@mezzanine-ui/core/stepper";
19
21
  var M = {
20
22
  root: "bpm_root_ehm7w",
@@ -25,10 +27,10 @@ var M = {
25
27
  viewport: "bpm_viewport_DQXms",
26
28
  page: "bpm_page_Cv5Rg",
27
29
  state: "bpm_state_bpgp3"
28
- }, N = 760, qe = 920, Je = 320, P = 32, F = .75, Ye = 1.75, I = .25;
29
- function Xe({ filename: e, fileUrl: t, onDownload: n }) {
30
- let r = f(null), [i, a] = p(null), [o, s] = p(1), [u, m] = p(1), [h, ee] = p(N);
31
- l(() => {
30
+ }, Ye = 760, Xe = 920, N = 320, P = 32, F = .75, Ze = 1.75, I = .25;
31
+ function Qe({ filename: e, fileUrl: t, onDownload: n }) {
32
+ let r = m(null), [i, a] = h(null), [o, s] = h(1), [c, l] = h(1), [f, ee] = h(Ye);
33
+ d(() => {
32
34
  let e = r.current;
33
35
  if (!e || typeof ResizeObserver > "u") return;
34
36
  let t = new ResizeObserver((e) => {
@@ -36,45 +38,45 @@ function Xe({ filename: e, fileUrl: t, onDownload: n }) {
36
38
  t && ee(t);
37
39
  });
38
40
  return t.observe(e), () => t.disconnect();
39
- }, []), l(() => {
40
- a(null), s(1), m(1);
41
+ }, []), d(() => {
42
+ a(null), s(1), l(1);
41
43
  }, [t]);
42
- let _ = d(() => {
43
- let e = Math.max(Je, h - P);
44
- return Math.round(Math.min(qe, e) * u);
45
- }, [u, h]), v = c((e) => {
44
+ let g = p(() => {
45
+ let e = Math.max(N, f - P);
46
+ return Math.round(Math.min(Xe, e) * c);
47
+ }, [c, f]), v = u((e) => {
46
48
  a(e.numPages), s(1);
47
- }, []), y = o > 1, te = i !== null && o < i, ne = u > F, b = u < Ye, x = i === null ? `第 ${o} 頁` : `第 ${o} / ${i} 頁`, re = `${Math.round(u * 100)}%`;
48
- return /* @__PURE__ */ T("section", {
49
+ }, []), y = o > 1, te = i !== null && o < i, b = c > F, ne = c < Ze, x = i === null ? `第 ${o} 頁` : `第 ${o} / ${i} 頁`, re = `${Math.round(c * 100)}%`;
50
+ return /* @__PURE__ */ E("section", {
49
51
  "aria-label": `${e} PDF 預覽`,
50
52
  className: M.root,
51
- children: [/* @__PURE__ */ T("div", {
53
+ children: [/* @__PURE__ */ E("div", {
52
54
  className: M.toolbar,
53
55
  children: [
54
- /* @__PURE__ */ T("div", {
56
+ /* @__PURE__ */ E("div", {
55
57
  className: M.pageControls,
56
58
  "aria-label": "頁面切換",
57
59
  children: [
58
- /* @__PURE__ */ w(g, {
60
+ /* @__PURE__ */ T(_, {
59
61
  "aria-label": "上一頁",
60
62
  disabled: !y,
61
- icon: D,
63
+ icon: Oe,
62
64
  onClick: () => {
63
65
  s((e) => Math.max(1, e - 1));
64
66
  },
65
67
  size: "minor",
66
68
  variant: "base-secondary"
67
69
  }),
68
- /* @__PURE__ */ w(S, {
70
+ /* @__PURE__ */ T(C, {
69
71
  className: M.counter,
70
72
  component: "span",
71
73
  variant: "body",
72
74
  children: x
73
75
  }),
74
- /* @__PURE__ */ w(g, {
76
+ /* @__PURE__ */ T(_, {
75
77
  "aria-label": "下一頁",
76
78
  disabled: !te,
77
- icon: Ee,
79
+ icon: ke,
78
80
  onClick: () => {
79
81
  s((e) => i === null ? e : Math.min(i, e + 1));
80
82
  },
@@ -83,40 +85,40 @@ function Xe({ filename: e, fileUrl: t, onDownload: n }) {
83
85
  })
84
86
  ]
85
87
  }),
86
- /* @__PURE__ */ T("div", {
88
+ /* @__PURE__ */ E("div", {
87
89
  className: M.zoomControls,
88
90
  "aria-label": "縮放",
89
91
  children: [
90
- /* @__PURE__ */ w(g, {
92
+ /* @__PURE__ */ T(_, {
91
93
  "aria-label": "縮小",
92
- disabled: !ne,
93
- icon: Ie,
94
+ disabled: !b,
95
+ icon: Re,
94
96
  onClick: () => {
95
- m((e) => Math.max(F, e - I));
97
+ l((e) => Math.max(F, e - I));
96
98
  },
97
99
  size: "minor",
98
100
  variant: "base-secondary"
99
101
  }),
100
- /* @__PURE__ */ w(S, {
102
+ /* @__PURE__ */ T(C, {
101
103
  className: M.counter,
102
104
  component: "span",
103
105
  variant: "body",
104
106
  children: re
105
107
  }),
106
- /* @__PURE__ */ w(g, {
108
+ /* @__PURE__ */ T(_, {
107
109
  "aria-label": "放大",
108
- disabled: !b,
109
- icon: Fe,
110
+ disabled: !ne,
111
+ icon: Le,
110
112
  onClick: () => {
111
- m((e) => Math.min(Ye, e + I));
113
+ l((e) => Math.min(Ze, e + I));
112
114
  },
113
115
  size: "minor",
114
116
  variant: "base-secondary"
115
117
  })
116
118
  ]
117
119
  }),
118
- n ? /* @__PURE__ */ w(g, {
119
- icon: Oe,
120
+ n ? /* @__PURE__ */ T(_, {
121
+ icon: D,
120
122
  iconType: "leading",
121
123
  onClick: n,
122
124
  size: "minor",
@@ -124,31 +126,32 @@ function Xe({ filename: e, fileUrl: t, onDownload: n }) {
124
126
  children: "下載"
125
127
  }) : null
126
128
  ]
127
- }), /* @__PURE__ */ w("div", {
129
+ }), /* @__PURE__ */ T("div", {
128
130
  className: M.viewport,
129
131
  ref: r,
130
- children: /* @__PURE__ */ w(A, {
131
- error: /* @__PURE__ */ w(L, { message: "PDF 無法載入。" }),
132
+ children: /* @__PURE__ */ T(qe, {
133
+ error: /* @__PURE__ */ T(L, { message: "PDF 無法載入。" }),
132
134
  file: t,
133
- loading: /* @__PURE__ */ w(L, { message: "正在載入 PDF..." }),
134
- noData: /* @__PURE__ */ w(L, { message: "沒有可預覽的 PDF。" }),
135
+ loading: /* @__PURE__ */ T(L, { message: "正在載入 PDF..." }),
136
+ noData: /* @__PURE__ */ T(L, { message: "沒有可預覽的 PDF。" }),
135
137
  onLoadSuccess: v,
136
- children: /* @__PURE__ */ w(Ke, {
138
+ suspense: !1,
139
+ children: /* @__PURE__ */ T(Je, {
137
140
  className: M.page,
138
- loading: /* @__PURE__ */ w(L, { message: "正在載入頁面..." }),
141
+ loading: /* @__PURE__ */ T(L, { message: "正在載入頁面..." }),
139
142
  pageNumber: o,
140
143
  renderAnnotationLayer: !0,
141
144
  renderTextLayer: !0,
142
- width: _
145
+ width: g
143
146
  })
144
147
  })
145
148
  })]
146
149
  });
147
150
  }
148
151
  function L({ message: e }) {
149
- return /* @__PURE__ */ w("div", {
152
+ return /* @__PURE__ */ T("div", {
150
153
  className: M.state,
151
- children: /* @__PURE__ */ w(S, {
154
+ children: /* @__PURE__ */ T(C, {
152
155
  color: "text-neutral",
153
156
  variant: "body",
154
157
  children: e
@@ -156,103 +159,114 @@ function L({ message: e }) {
156
159
  });
157
160
  }
158
161
  //#endregion
162
+ //#region src/views/instances/detail/submitted-by.ts
163
+ function $e({ initiatorMemberId: e, submittedByMemberId: t }) {
164
+ return t && t !== e ? t : null;
165
+ }
166
+ function et(e, t) {
167
+ let n = $e(e);
168
+ if (!n || !e.initiatorMemberId) return null;
169
+ let r = (e) => t.get(e)?.name ?? e;
170
+ return `由 ${r(n)} 代 ${r(e.initiatorMemberId)} 送出`;
171
+ }
172
+ //#endregion
159
173
  //#region src/views/instances/detail/sections/shared.ts
160
- function R(e) {
161
- let t = z(e, "from"), n = z(e, "to"), r = z(e, "reason");
174
+ function tt(e) {
175
+ let t = R(e, "from"), n = R(e, "to"), r = R(e, "reason");
162
176
  return !t || !n || !r ? null : {
163
177
  from: t,
164
178
  reason: r,
165
- ruleId: z(e, "ruleId"),
179
+ ruleId: R(e, "ruleId"),
166
180
  to: n
167
181
  };
168
182
  }
169
- function Ze(e) {
183
+ function nt(e) {
170
184
  try {
171
185
  let t = JSON.parse(e);
172
- return Array.isArray(t) ? t.map((e) => $e(e) ? R(e) : null).filter((e) => e !== null) : [];
186
+ return Array.isArray(t) ? t.map((e) => at(e) ? tt(e) : null).filter((e) => e !== null) : [];
173
187
  } catch {
174
188
  return [];
175
189
  }
176
190
  }
177
- function z(e, t) {
191
+ function R(e, t) {
178
192
  let n = e[t];
179
193
  return typeof n == "string" ? n : null;
180
194
  }
181
- function B(e, t) {
195
+ function rt(e, t) {
182
196
  let n = e[t];
183
197
  return Array.isArray(n) ? n.filter((e) => typeof e == "string") : [];
184
198
  }
185
- function Qe(e, t) {
199
+ function it(e, t) {
186
200
  let n = e[t];
187
201
  return typeof n == "number" ? n : null;
188
202
  }
189
- function V(e) {
203
+ function z(e) {
190
204
  return typeof e == "string" && e.trim().length > 0;
191
205
  }
192
- function $e(e) {
206
+ function at(e) {
193
207
  return typeof e == "object" && !!e;
194
208
  }
195
- function et(e) {
209
+ function ot(e) {
196
210
  return e.status === "PENDING" || e.status === "IN_PROGRESS";
197
211
  }
198
- function H(e) {
199
- return ze(e) || (e instanceof Error ? e.message : "發生未知錯誤");
212
+ function B(e) {
213
+ return Ve(e) || (e instanceof Error ? e.message : "發生未知錯誤");
200
214
  }
201
- function U(e) {
215
+ function st(e) {
202
216
  return !Number.isFinite(e) || e <= 0 ? "-" : e < 1024 ? `${e} B` : e < 1048576 ? `${(e / 1024).toFixed(1)} KB` : `${(e / 1024 / 1024).toFixed(1)} MB`;
203
217
  }
204
- function tt(e) {
218
+ function ct(e) {
205
219
  return e.length > 16 ? `${e.slice(0, 12)}...` : e;
206
220
  }
207
- function nt(e) {
221
+ function lt(e) {
208
222
  return e === "APPROVED" ? "已同意" : e === "CANCELLED" ? "已取消" : e === "DRAFT" ? "草稿" : e === "EXPIRED" ? "已逾期" : e === "REJECTED" ? "已拒絕" : e === "RETURNED" ? "已退回" : e === "RUNNING" ? "進行中" : e;
209
223
  }
210
- function rt(e) {
224
+ function V(e) {
211
225
  return e === "PENDING" ? "待處理" : e === "IN_PROGRESS" ? "處理中" : e === "COMPLETED" ? "已完成" : e === "CANCELLED" ? "已取消" : e === "TRANSFERRED" ? "已轉派" : e;
212
226
  }
213
- function it(e) {
227
+ function ut(e) {
214
228
  return e === "APPROVED" ? "同意" : e === "REJECTED" ? "拒絕" : e === "RETURNED" ? "退回" : e === "TRANSFERRED" ? "轉派" : e;
215
229
  }
216
- function W(e) {
230
+ function H(e) {
217
231
  return e === "startEvent" ? "開始" : e === "endEvent" ? "完成" : e === "userTask" ? "簽核節點" : e === "serviceTask" ? "知會節點" : e === "exclusiveGateway" ? "條件分流" : "平行處理";
218
232
  }
219
- function at(e, t) {
233
+ function dt(e, t) {
220
234
  return t?.nodes.find((t) => t.id === e)?.data.label ?? e;
221
235
  }
222
- function G(e, t) {
236
+ function U(e, t) {
223
237
  if (!e) return "-";
224
238
  let n = t.get(e);
225
- return n ? `${n.name}(${n.email})` : e;
239
+ return n ? i(n.name, n.email, "fullwidth") : e;
226
240
  }
227
- function ot(e, t = /* @__PURE__ */ new Map()) {
228
- let n = Ze(e.delegationChainJson);
229
- if (!e.assigneeMemberId) return e.candidateMemberIds.length ? `候選 ${e.candidateMemberIds.map((e) => G(e, t)).join("、")}` : "未指定";
230
- let r = G(e.assigneeMemberId, t), i = G(e.originalAssigneeMemberId, t);
241
+ function W(e, t = /* @__PURE__ */ new Map()) {
242
+ let n = nt(e.delegationChainJson);
243
+ if (!e.assigneeMemberId) return e.candidateMemberIds.length ? `候選 ${e.candidateMemberIds.map((e) => U(e, t)).join("、")}` : "未指定";
244
+ let r = U(e.assigneeMemberId, t), i = U(e.originalAssigneeMemberId, t);
231
245
  return n.length === 0 || e.originalAssigneeMemberId === e.assigneeMemberId ? r : `${r}(原:${i})`;
232
246
  }
233
- function st(e, t) {
247
+ function ft(e, t) {
234
248
  return t ? e.assigneeMemberId === t || (e.openCandidateMemberIds ?? e.candidateMemberIds).includes(t) : !1;
235
249
  }
236
- function ct(e, t) {
250
+ function G(e, t) {
237
251
  if (t.type !== "userTask" || !t.data.returnBehavior.allowReturn) return [];
238
252
  if (t.data.returnBehavior.allowedTargets === "ANY") return e.nodes.filter((e) => e.id !== t.id).map((e) => ({
239
253
  id: e.id,
240
- name: `${e.data.label}(${W(e.type)})`
254
+ name: `${e.data.label}(${H(e.type)})`
241
255
  }));
242
256
  let n = t.data.returnBehavior.allowedTargets === "INITIATOR" ? e.nodes.find((e) => e.type === "startEvent")?.id : e.edges.find((e) => e.target === t.id)?.source, r = e.nodes.find((e) => e.id === n);
243
257
  return r ? [{
244
258
  id: r.id,
245
- name: `${r.data.label}(${W(r.type)})`
259
+ name: `${r.data.label}(${H(r.type)})`
246
260
  }] : [];
247
261
  }
248
- function lt(e) {
262
+ function pt(e) {
249
263
  return {
250
264
  email: e.email,
251
265
  id: e.memberId,
252
- name: `${e.name} · ${e.email}`
266
+ name: i(e.name, e.email, "dot")
253
267
  };
254
268
  }
255
- function K({ memberIds: e, useWebhookTarget: t, webhookUrl: n }) {
269
+ function mt({ memberIds: e, useWebhookTarget: t, webhookUrl: n }) {
256
270
  if (t) {
257
271
  let e = n.trim();
258
272
  return e ? {
@@ -277,11 +291,11 @@ function K({ memberIds: e, useWebhookTarget: t, webhookUrl: n }) {
277
291
  valid: !1
278
292
  };
279
293
  }
280
- function ut(e) {
294
+ function ht(e) {
281
295
  return !!e;
282
296
  }
283
- function dt(e) {
284
- if (!$e(e)) return null;
297
+ function gt(e) {
298
+ if (!at(e)) return null;
285
299
  let t = e.email, n = e.id, r = e.name;
286
300
  return typeof n == "string" && typeof r == "string" ? {
287
301
  email: typeof t == "string" ? t : null,
@@ -289,7 +303,7 @@ function dt(e) {
289
303
  name: r
290
304
  } : null;
291
305
  }
292
- function ft(e, t) {
306
+ function _t(e, t) {
293
307
  let n = e.trim().toLocaleLowerCase();
294
308
  if (!n) return null;
295
309
  let r = t.filter((e) => [
@@ -299,21 +313,21 @@ function ft(e, t) {
299
313
  ].some((e) => e.toLocaleLowerCase().includes(n)));
300
314
  return r.length === 1 ? r[0] ?? null : null;
301
315
  }
302
- function q(e) {
303
- return V(e) ? {
316
+ function K(e) {
317
+ return z(e) ? {
304
318
  text: e,
305
319
  type: "text"
306
320
  } : null;
307
321
  }
308
- function pt(e, t, n = "neutral") {
309
- return V(t) ? {
322
+ function q(e, t, n = "neutral") {
323
+ return z(t) ? {
310
324
  label: e,
311
325
  text: t,
312
326
  tone: n,
313
327
  type: "comment"
314
328
  } : null;
315
329
  }
316
- function mt(e, t, n, r) {
330
+ function vt(e, t, n, r) {
317
331
  let i = t ? n.get(t) : null;
318
332
  return {
319
333
  email: i?.email ?? null,
@@ -326,197 +340,201 @@ function mt(e, t, n, r) {
326
340
  function J(e) {
327
341
  return !!e;
328
342
  }
329
- function ht(e) {
343
+ function Y(e) {
330
344
  let t = e.findIndex((e) => e.id.startsWith("pending-task-") || e.id.startsWith("future-node-"));
331
345
  return t === -1 ? e.length : t;
332
346
  }
333
- function gt(e) {
334
- return e.eventType === "INSTANCE_STARTED" || e.eventType === "TASK_DECIDED" || e.eventType === "SLA_TRIGGERED" || e.eventType === "TASK_CANDIDATE_ACTIVATED" || Y(e) || X(e.eventType, xt(e));
347
+ function yt(e) {
348
+ return e.eventType === "INSTANCE_STARTED" || e.eventType === "TASK_DECIDED" || e.eventType === "SLA_TRIGGERED" || e.eventType === "TASK_CANDIDATE_ACTIVATED" || bt(e) || Z(e.eventType, wt(e));
335
349
  }
336
- function Y(e) {
337
- return e.eventType === "TASK_CREATED" && B(xt(e), "sequentialCandidateMemberIds").length > 0;
350
+ function bt(e) {
351
+ return e.eventType === "TASK_CREATED" && rt(wt(e), "sequentialCandidateMemberIds").length > 0;
338
352
  }
339
- function _t(e) {
353
+ function xt(e) {
340
354
  if (e.eventType !== "TASK_CANDIDATE_ACTIVATED" && e.eventType !== "TASK_CREATED") return [];
341
- let t = xt(e);
355
+ let t = wt(e);
342
356
  return [
343
- ...B(t, "sequentialCandidateMemberIds"),
344
- z(t, "candidateMemberId"),
345
- z(t, "previousMemberId")
346
- ].filter(V);
357
+ ...rt(t, "sequentialCandidateMemberIds"),
358
+ R(t, "candidateMemberId"),
359
+ R(t, "previousMemberId")
360
+ ].filter(z);
347
361
  }
348
- var vt = /* @__PURE__ */ new Set([
362
+ var X = /* @__PURE__ */ new Set([
349
363
  "SERVICE_TASK_EXECUTED",
350
364
  "SERVICE_TASK_FAILED",
351
365
  "WEBHOOK_DELIVERY_RETRIED"
352
366
  ]);
353
- function X(e, t) {
354
- return vt.has(e) && z(t, "action") === "NOTIFY_WEBHOOK";
367
+ function Z(e, t) {
368
+ return X.has(e) && R(t, "action") === "NOTIFY_WEBHOOK";
355
369
  }
356
- function Z(e) {
357
- return z(e, "endpointLabel") ?? z(e, "endpointKey") ?? "外部系統";
370
+ function St(e) {
371
+ return R(e, "endpointLabel") ?? R(e, "endpointKey") ?? "外部系統";
358
372
  }
359
- function yt(e) {
373
+ function Ct(e) {
360
374
  return e === "APPROVED" ? "已同意" : e === "REJECTED" ? "已拒絕" : e === "RETURNED" ? "已退回" : e === "TRANSFERRED" ? "已轉派" : "簽核已決議";
361
375
  }
362
- function bt(e, t) {
376
+ function Q(e, t) {
363
377
  if (e === "INSTANCE_STARTED") return "案件已發起";
364
378
  if (e === "TOKEN_CREATED") return "流程路徑已建立";
365
379
  if (e === "ENGINE_PROCESS_REQUESTED") return "流程引擎已處理";
366
380
  if (e === "TOKEN_ADVANCED") return "流程已前進";
367
381
  if (e === "TASK_CREATED") return "待簽任務已建立";
368
382
  if (e === "TASK_CANDIDATE_ACTIVATED") return "輪到下一位簽核";
369
- if (e === "TASK_DECIDED") return yt(z(t, "action"));
383
+ if (e === "TASK_DECIDED") return Ct(R(t, "action"));
370
384
  if (e === "SLA_TRIGGERED") return "時限提醒已觸發";
371
- if (X(e, t)) {
372
- let n = Z(t);
385
+ if (Z(e, t)) {
386
+ let n = St(t);
373
387
  return e === "SERVICE_TASK_EXECUTED" ? `已通知外部系統:${n}` : e === "SERVICE_TASK_FAILED" ? `通知外部系統失敗:${n}` : `管理者重新傳送外部系統通知:${n}`;
374
388
  }
375
389
  return e;
376
390
  }
377
- function xt(e) {
391
+ function wt(e) {
378
392
  try {
379
393
  let t = JSON.parse(e.payloadJson);
380
- return $e(t) ? t : {};
394
+ return at(t) ? t : {};
381
395
  } catch {
382
396
  return {};
383
397
  }
384
398
  }
385
- function St(e, t) {
386
- return e.eventType === "SLA_TRIGGERED" || e.eventType === "SERVICE_TASK_FAILED" && X(e.eventType, t) || z(t, "action") === "REJECTED" || z(t, "instanceState") === "REJECTED";
399
+ function Tt(e, t) {
400
+ return e.eventType === "SLA_TRIGGERED" || e.eventType === "SERVICE_TASK_FAILED" && Z(e.eventType, t) || R(t, "action") === "REJECTED" || R(t, "instanceState") === "REJECTED";
387
401
  }
388
- function Q(e) {
402
+ function Et(e) {
389
403
  return t(e);
390
404
  }
391
- function Ct(e, t, n, r) {
405
+ function Dt(e, t, n, r) {
406
+ if (e.eventType === "INSTANCE_STARTED") return et({
407
+ initiatorMemberId: e.actorMemberId,
408
+ submittedByMemberId: R(t, "submittedByMemberId")
409
+ }, r);
392
410
  if (e.eventType === "TASK_CANDIDATE_ACTIVATED") {
393
- let e = z(t, "candidateMemberId"), n = z(t, "previousMemberId");
411
+ let e = R(t, "candidateMemberId"), n = R(t, "previousMemberId");
394
412
  if (!e) return null;
395
- let i = G(e, r);
396
- return n ? `輪到:${i}(前一位:${G(n, r)})` : `輪到:${i}`;
413
+ let i = U(e, r);
414
+ return n ? `輪到:${i}(前一位:${U(n, r)})` : `輪到:${i}`;
397
415
  }
398
416
  if (e.eventType === "TASK_CREATED") {
399
- let e = B(t, "sequentialCandidateMemberIds");
400
- if (e.length) return `簽核順序:${e.map((e) => G(e, r)).join(" → ")}`;
401
- let n = z(t, "assigneeMemberId"), i = z(t, "originalAssigneeMemberId");
417
+ let e = rt(t, "sequentialCandidateMemberIds");
418
+ if (e.length) return `簽核順序:${e.map((e) => U(e, r)).join(" → ")}`;
419
+ let n = R(t, "assigneeMemberId"), i = R(t, "originalAssigneeMemberId");
402
420
  if (!n) {
403
- let e = B(t, "candidateMemberIds");
404
- return e.length ? `候選簽核人:${e.map((e) => G(e, r)).join("、")}` : null;
421
+ let e = rt(t, "candidateMemberIds");
422
+ return e.length ? `候選簽核人:${e.map((e) => U(e, r)).join("、")}` : null;
405
423
  }
406
- let a = G(n, r), o = G(i, r);
424
+ let a = U(n, r), o = U(i, r);
407
425
  return i && i !== n ? `待簽人:${a}(原簽核人:${o})` : `待簽人:${a}`;
408
426
  }
409
427
  if (e.eventType === "TASK_DECIDED") {
410
- let e = z(t, "action"), n = z(t, "comment"), i = e ? `決議:${it(e)}` : null, a = z(t, "transferToMemberId");
411
- return e === "REJECTED" && n ? [i, `拒絕原因:${n}`].filter(V).join(" · ") : e === "APPROVED" && n ? [i, `同意說明:${n}`].filter(V).join(" · ") : e === "TRANSFERRED" ? [i, `轉派給:${G(a, r)}`].filter(V).join(" · ") : i;
428
+ let e = R(t, "action"), n = R(t, "comment"), i = e ? `決議:${ut(e)}` : null, a = R(t, "transferToMemberId");
429
+ return e === "REJECTED" && n ? [i, `拒絕原因:${n}`].filter(z).join(" · ") : e === "APPROVED" && n ? [i, `同意說明:${n}`].filter(z).join(" · ") : e === "TRANSFERRED" ? [i, `轉派給:${U(a, r)}`].filter(z).join(" · ") : i;
412
430
  }
413
431
  if (e.eventType === "TOKEN_ADVANCED") {
414
- let e = z(t, "action");
415
- if (e) return `流程結果:${it(e)}`;
416
- let r = Qe(t, "arrivedCount"), i = Qe(t, "requiredCount");
432
+ let e = R(t, "action");
433
+ if (e) return `流程結果:${ut(e)}`;
434
+ let r = it(t, "arrivedCount"), i = it(t, "requiredCount");
417
435
  if (r !== null && i !== null) return `等待匯合:${r}/${i}`;
418
- let a = z(t, "fromNodeId"), o = z(t, "toNodeId");
419
- if (a && o) return `由 ${at(a, n)} 前進至 ${at(o, n)}`;
436
+ let a = R(t, "fromNodeId"), o = R(t, "toNodeId");
437
+ if (a && o) return `由 ${dt(a, n)} 前進至 ${dt(o, n)}`;
420
438
  }
421
439
  if (e.eventType === "ENGINE_PROCESS_REQUESTED") {
422
- let e = z(t, "state");
423
- return e ? `案件狀態:${nt(e)}` : null;
440
+ let e = R(t, "state");
441
+ return e ? `案件狀態:${lt(e)}` : null;
424
442
  }
425
443
  return null;
426
444
  }
427
- function wt(e, t, n, r, i, a, o) {
428
- if (e.eventType !== "TASK_DECIDED") return [q(Ct(e, t, n, o))].filter(J);
429
- let s = e.taskId ? r.get(e.taskId) : null, c = z(t, "action") ?? s?.action ?? null, l = z(t, "comment") ?? s?.comment ?? null, u = z(t, "transferToMemberId") ?? s?.transferToMemberId ?? null, d = z(t, "signatureId") ?? s?.signatureId ?? null, f = d ? i.get(d) : null;
445
+ function Ot(e, t, n, r, i, a, o) {
446
+ if (e.eventType !== "TASK_DECIDED") return [K(Dt(e, t, n, o))].filter(J);
447
+ let s = e.taskId ? r.get(e.taskId) : null, c = R(t, "action") ?? s?.action ?? null, l = R(t, "comment") ?? s?.comment ?? null, u = R(t, "transferToMemberId") ?? s?.transferToMemberId ?? null, d = R(t, "signatureId") ?? s?.signatureId ?? null, f = d ? i.get(d) : null;
430
448
  return [
431
- q(c ? `決議:${it(c)}` : null),
432
- c === "REJECTED" ? pt("拒絕原因", l ?? "-", "danger") : null,
433
- c === "APPROVED" ? pt("同意說明", l) : null,
434
- c === "RETURNED" ? pt("退回說明", l ?? "-") : null,
435
- c === "TRANSFERRED" ? q(`轉派給:${G(u, o)}`) : null,
436
- c === "TRANSFERRED" ? pt("轉派說明", l ?? "-") : null,
437
- f ? q(a?.valid ? `簽章:已驗證(${tt(f.signedPayloadHash)})` : `簽章:待檢查(${tt(f.signedPayloadHash)})`) : null
449
+ K(c ? `決議:${ut(c)}` : null),
450
+ c === "REJECTED" ? q("拒絕原因", l ?? "-", "danger") : null,
451
+ c === "APPROVED" ? q("同意說明", l) : null,
452
+ c === "RETURNED" ? q("退回說明", l ?? "-") : null,
453
+ c === "TRANSFERRED" ? K(`轉派給:${U(u, o)}`) : null,
454
+ c === "TRANSFERRED" ? q("轉派說明", l ?? "-") : null,
455
+ f ? K(a?.valid ? `簽章:已驗證(${ct(f.signedPayloadHash)})` : `簽章:待檢查(${ct(f.signedPayloadHash)})`) : null
438
456
  ].filter(J);
439
457
  }
440
- function Tt(e, t, n, r, i) {
458
+ function $(e, t, n, r, i) {
441
459
  if (e.type === "startEvent" || i.has(e.id)) return !1;
442
460
  if (r === "REJECTED") return !0;
443
- let a = Nt(e, t, n, r);
461
+ let a = Lt(e, t, n, r);
444
462
  return a.tone === "neutral" || a.tone === "waiting";
445
463
  }
446
- function Et(e, t, n, r, i) {
464
+ function kt(e, t, n, r, i) {
447
465
  if (r !== "RUNNING" && r !== "REJECTED") return [];
448
- let a = e.nodes.filter((e) => Tt(e, t, n, r, i)), o = $(e, a, t, n, i), s = new Map(e.nodes.map((e, t) => [e.id, t]));
466
+ let a = e.nodes.filter((e) => $(e, t, n, r, i)), o = At(e, a, t, n, i), s = new Map(e.nodes.map((e, t) => [e.id, t]));
449
467
  return a.filter((e) => o.has(e.id)).sort((e, t) => {
450
468
  let n = o.get(e.id) ?? 0, r = o.get(t.id) ?? 0;
451
469
  return n === r ? e.position.x === t.position.x ? e.position.y === t.position.y ? (s.get(e.id) ?? 0) - (s.get(t.id) ?? 0) : e.position.y - t.position.y : e.position.x - t.position.x : n - r;
452
470
  });
453
471
  }
454
- function $(e, t, n, r, i) {
472
+ function At(e, t, n, r, i) {
455
473
  let a = new Set(t.map((e) => e.id)), o = e.edges.reduce((e, t) => {
456
474
  let n = [...e.get(t.source) ?? [], t.target];
457
475
  return new Map(e).set(t.source, n);
458
476
  }, /* @__PURE__ */ new Map());
459
- return Dt(e, n, r, i).reduce((e, t) => At(e, Ot(t, o, a)), /* @__PURE__ */ new Map());
477
+ return jt(e, n, r, i).reduce((e, t) => Pt(e, Mt(t, o, a)), /* @__PURE__ */ new Map());
460
478
  }
461
- function Dt(e, t, n, r) {
462
- let i = n.filter((e) => e.status === "ACTIVE" || e.status === "WAITING").map((e) => e.currentNodeId), a = t.filter(et).map((e) => e.nodeId), o = e.nodes.filter((e) => r.has(e.id)).map((e) => e.id), s = [.../* @__PURE__ */ new Set([
479
+ function jt(e, t, n, r) {
480
+ let i = n.filter((e) => e.status === "ACTIVE" || e.status === "WAITING").map((e) => e.currentNodeId), a = t.filter(ot).map((e) => e.nodeId), o = e.nodes.filter((e) => r.has(e.id)).map((e) => e.id), s = [.../* @__PURE__ */ new Set([
463
481
  ...i,
464
482
  ...a,
465
483
  ...o
466
484
  ])], c = e.nodes.filter((e) => e.type === "startEvent").map((e) => e.id);
467
485
  return s.length > 0 ? s : c;
468
486
  }
469
- function Ot(e, t, n) {
470
- return kt([{
487
+ function Mt(e, t, n) {
488
+ return Nt([{
471
489
  distance: 0,
472
490
  nodeId: e
473
491
  }], t, n);
474
492
  }
475
- function kt(e, t, n, r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Map()) {
493
+ function Nt(e, t, n, r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Map()) {
476
494
  let [a, ...o] = e;
477
495
  if (!a) return i;
478
- if (r.has(a.nodeId)) return kt(o, t, n, r, i);
496
+ if (r.has(a.nodeId)) return Nt(o, t, n, r, i);
479
497
  let s = new Set(r).add(a.nodeId), c = n.has(a.nodeId) ? new Map(i).set(a.nodeId, Math.min(i.get(a.nodeId) ?? a.distance, a.distance)) : i;
480
- return kt([...o, ...(t.get(a.nodeId) ?? []).map((e) => ({
498
+ return Nt([...o, ...(t.get(a.nodeId) ?? []).map((e) => ({
481
499
  distance: a.distance + 1,
482
500
  nodeId: e
483
501
  }))], t, n, s, c);
484
502
  }
485
- function At(e, t) {
503
+ function Pt(e, t) {
486
504
  return [...t.entries()].reduce((e, [t, n]) => new Map(e).set(t, Math.min(e.get(t) ?? n, n)), e);
487
505
  }
488
- function jt(e) {
506
+ function Ft(e) {
489
507
  return e.type === "userTask" ? `未來簽核:${e.data.label}` : e.type === "serviceTask" ? `未來知會:${e.data.label}` : e.type === "exclusiveGateway" ? `未來分流:${e.data.label}` : e.type === "parallelGateway" ? `未來匯合:${e.data.label}` : e.type === "endEvent" ? `流程完成:${e.data.label}` : `未來節點:${e.data.label}`;
490
508
  }
491
- function Mt(e, t, n, r, i, a, o, s, c) {
492
- let l = e.filter(gt).map((e) => {
493
- let t = xt(e), n = e.nodeId ? at(e.nodeId, r) : null;
509
+ function It(e, t, n, r, i, a, o, s, c) {
510
+ let l = e.filter(yt).map((e) => {
511
+ let t = wt(e), n = e.nodeId ? dt(e.nodeId, r) : null;
494
512
  return {
495
513
  descriptionParts: [
496
- q(n ? `節點:${n}` : "節點:全流程"),
497
- mt("操作者", e.actorMemberId, a, "系統"),
498
- q(`時間:${Q(e.createdAt)}`),
499
- ...wt(e, t, r, o, s, c, a)
514
+ K(n ? `節點:${n}` : "節點:全流程"),
515
+ vt("操作者", e.actorMemberId, a, "系統"),
516
+ K(`時間:${Et(e.createdAt)}`),
517
+ ...Ot(e, t, r, o, s, c, a)
500
518
  ].filter(J),
501
- error: St(e, t),
519
+ error: Tt(e, t),
502
520
  id: e.id,
503
- title: bt(e.eventType, t)
521
+ title: Q(e.eventType, t)
504
522
  };
505
- }), u = t.filter(et).map((e) => ({
523
+ }), u = t.filter(ot).map((e) => ({
506
524
  descriptionParts: [
507
- q(`節點:${at(e.nodeId, r)}`),
508
- mt("處理者", e.assigneeMemberId, a, "未指定"),
509
- q(`建立時間:${Q(e.createdAt)}`)
525
+ K(`節點:${dt(e.nodeId, r)}`),
526
+ vt("處理者", e.assigneeMemberId, a, "未指定"),
527
+ K(`建立時間:${Et(e.createdAt)}`)
510
528
  ].filter(J),
511
529
  error: !1,
512
530
  id: `pending-task-${e.id}`,
513
531
  title: e.status === "IN_PROGRESS" ? "簽核處理中" : "等待簽核處理"
514
- })), d = new Set([...e.filter(gt).map((e) => e.nodeId), ...t.map((e) => e.nodeId)].filter(V)), f = r ? Et(r, t, n, i, d).map((e) => ({
515
- descriptionParts: [q(`${W(e.type)} · 尚未抵達`)].filter(J),
532
+ })), d = new Set([...e.filter(yt).map((e) => e.nodeId), ...t.map((e) => e.nodeId)].filter(z)), f = r ? kt(r, t, n, i, d).map((e) => ({
533
+ descriptionParts: [K(`${H(e.type)} · 尚未抵達`)].filter(J),
516
534
  error: !1,
517
535
  forcePending: !0,
518
536
  id: `future-node-${e.id}`,
519
- title: jt(e)
537
+ title: Ft(e)
520
538
  })) : [];
521
539
  return [
522
540
  ...l,
@@ -524,18 +542,18 @@ function Mt(e, t, n, r, i, a, o, s, c) {
524
542
  ...f
525
543
  ];
526
544
  }
527
- function Nt(e, t, n, r) {
545
+ function Lt(e, t, n, r) {
528
546
  let i = t.filter((t) => t.nodeId === e.id), a = i.find((e) => e.status === "PENDING" || e.status === "IN_PROGRESS"), o = i.find((e) => e.status === "CANCELLED"), s = i.find((e) => e.status === "COMPLETED"), c = n.filter((t) => t.currentNodeId === e.id), l = c.find((e) => e.status === "ACTIVE"), u = c.find((e) => e.status === "WAITING");
529
547
  return a ? {
530
- secondaryLabel: `處理者 ${ot(a)}`,
548
+ secondaryLabel: `處理者 ${W(a)}`,
531
549
  statusLabel: "待處理",
532
550
  tone: "current"
533
551
  } : o ? {
534
- secondaryLabel: `已取消 ${ot(o)}`,
552
+ secondaryLabel: `已取消 ${W(o)}`,
535
553
  statusLabel: "已取消",
536
554
  tone: "cancelled"
537
555
  } : s ? {
538
- secondaryLabel: `已完成 ${ot(s)}`,
556
+ secondaryLabel: `已完成 ${W(s)}`,
539
557
  statusLabel: "已完成",
540
558
  tone: "completed"
541
559
  } : l ? {
@@ -555,40 +573,42 @@ function Nt(e, t, n, r) {
555
573
  statusLabel: r === "REJECTED" ? "已拒絕" : "已完成",
556
574
  tone: r === "REJECTED" ? "cancelled" : "completed"
557
575
  } : {
558
- secondaryLabel: W(e.type),
576
+ secondaryLabel: H(e.type),
559
577
  statusLabel: "未抵達",
560
578
  tone: "neutral"
561
579
  };
562
580
  }
563
581
  //#endregion
564
582
  //#region src/views/instances/detail/sections/container-helpers.ts
565
- async function Pt({ activityLogs: e, adhocDirectives: t = [], tasks: n }) {
566
- let r = [...new Set([
583
+ async function Rt({ activityLogs: e, adhocDirectives: t = [], instance: n, tasks: r }) {
584
+ let i = [...new Set([
585
+ n?.initiatorMemberId ?? null,
586
+ n?.submittedByMemberId ?? null,
567
587
  ...e.map((e) => e.actorMemberId),
568
- ...e.flatMap(_t),
569
- ...n.map((e) => e.assigneeMemberId),
570
- ...n.map((e) => e.originalAssigneeMemberId),
571
- ...n.flatMap((e) => e.candidateMemberIds),
572
- ...n.flatMap((e) => Ze(e.delegationChainJson).flatMap((e) => [e.from, e.to])),
573
- ...t.flatMap((e) => [e.createdByMemberId, ...Ft(e.targetValueJson)])
574
- ].filter(V))];
588
+ ...e.flatMap(xt),
589
+ ...r.map((e) => e.assigneeMemberId),
590
+ ...r.map((e) => e.originalAssigneeMemberId),
591
+ ...r.flatMap((e) => e.candidateMemberIds),
592
+ ...r.flatMap((e) => nt(e.delegationChainJson).flatMap((e) => [e.from, e.to])),
593
+ ...t.flatMap((e) => [e.createdByMemberId, ...zt(e.targetValueJson)])
594
+ ].filter(z))];
575
595
  try {
576
- return await ye(r);
596
+ return await xe(i);
577
597
  } catch {
578
598
  return [];
579
599
  }
580
600
  }
581
- function Ft(e) {
601
+ function zt(e) {
582
602
  try {
583
603
  return (JSON.parse(e).memberIds ?? []).filter((e) => typeof e == "string");
584
604
  } catch {
585
605
  return [];
586
606
  }
587
607
  }
588
- async function It(e) {
589
- return (await Promise.all(e.map((e) => de(e.id)))).flat();
608
+ async function Bt(e) {
609
+ return (await Promise.all(e.map((e) => pe(e.id)))).flat();
590
610
  }
591
- function Lt(e) {
611
+ function Vt(e) {
592
612
  return e.reduce((e, t) => {
593
613
  let n = e.get(t.taskId), r = !n || new Date(t.decidedAt).getTime() > new Date(n.decidedAt).getTime() ? t : n;
594
614
  return new Map(e).set(t.taskId, r);
@@ -596,29 +616,29 @@ function Lt(e) {
596
616
  }
597
617
  //#endregion
598
618
  //#region src/views/instances/detail/sections/InstanceFormSection.tsx
599
- var Rt = {
619
+ var Ht = {
600
620
  display: "grid",
601
621
  gap: 16
602
- }, zt = {
622
+ }, Ut = {
603
623
  display: "flex",
604
624
  flexWrap: "wrap",
605
625
  gap: 8
606
626
  };
607
- function Bt({ canResubmitInstance: e, deciding: t, error: n, instance: r, loading: i, onDataSourceStateChange: o, onResubmitFormChange: s, onResubmitInstance: c, onUploadAttachment: l, resubmitFormData: u, resubmitFormErrors: d }) {
608
- return /* @__PURE__ */ T("div", {
609
- style: Rt,
627
+ function Wt({ canResubmitInstance: e, deciding: t, error: n, instance: r, loading: i, onDataSourceStateChange: a, onResubmitFormChange: o, onResubmitInstance: c, onUploadAttachment: l, resubmitFormData: u, resubmitFormErrors: d }) {
628
+ return /* @__PURE__ */ E("div", {
629
+ style: Ht,
610
630
  children: [
611
- n ? /* @__PURE__ */ w(S, {
631
+ n ? /* @__PURE__ */ T(C, {
612
632
  color: "text-error",
613
633
  variant: "body",
614
634
  children: n
615
635
  }) : null,
616
- i ? /* @__PURE__ */ w(S, {
636
+ i ? /* @__PURE__ */ T(C, {
617
637
  color: "text-neutral",
618
638
  variant: "body",
619
639
  children: "載入中..."
620
640
  }) : null,
621
- r?.formDefinitionSnapshot.schema && r.formDefinitionSnapshot.uiSchema ? /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(a, {
641
+ r?.formDefinitionSnapshot.schema && r.formDefinitionSnapshot.uiSchema ? /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T(s, {
622
642
  dataSourceContext: e ? {
623
643
  instanceId: r.id,
624
644
  kind: "runtime"
@@ -626,26 +646,26 @@ function Bt({ canResubmitInstance: e, deciding: t, error: n, instance: r, loadin
626
646
  dataSourceInitialValues: r.formData,
627
647
  errors: d,
628
648
  onChange: (e) => {
629
- s(e);
649
+ o(e);
630
650
  },
631
- onDataSourceStateChange: o,
651
+ onDataSourceStateChange: a,
632
652
  onUploadAttachment: e ? l : void 0,
633
653
  optionSnapshots: r.formDataOptionSnapshot,
634
654
  readonly: !e,
635
655
  schema: r.formDefinitionSnapshot.schema,
636
656
  uiSchema: r.formDefinitionSnapshot.uiSchema,
637
657
  value: e ? u : r.formData
638
- }), e ? /* @__PURE__ */ w("div", {
639
- style: zt,
640
- children: /* @__PURE__ */ w(g, {
658
+ }), e ? /* @__PURE__ */ T("div", {
659
+ style: Ut,
660
+ children: /* @__PURE__ */ T(_, {
641
661
  disabled: t,
642
- icon: Me,
662
+ icon: Pe,
643
663
  iconType: "leading",
644
664
  onClick: c,
645
665
  variant: "base-primary",
646
666
  children: "重新送出"
647
667
  })
648
- }) : null] }) : /* @__PURE__ */ w(S, {
668
+ }) : null] }) : /* @__PURE__ */ T(C, {
649
669
  color: "text-neutral",
650
670
  variant: "body",
651
671
  children: "此案件沒有可顯示的表單快照。"
@@ -655,20 +675,20 @@ function Bt({ canResubmitInstance: e, deciding: t, error: n, instance: r, loadin
655
675
  }
656
676
  //#endregion
657
677
  //#region src/views/instances/detail/sections/InstanceAttachmentsSection.tsx
658
- var Vt = {
678
+ var Gt = {
659
679
  display: "grid",
660
680
  gap: 16
661
681
  };
662
- function Ht({ attachments: e, onDownload: n, onPreview: r }) {
663
- let i = d(() => e.map((e) => ({
682
+ function Kt({ attachments: e, onDownload: n, onPreview: r }) {
683
+ let i = p(() => e.map((e) => ({
664
684
  attachment: e,
665
685
  createdAt: e.createdAt,
666
686
  filename: e.filename,
667
687
  id: e.id,
668
688
  key: e.id,
669
689
  mimeType: e.mimeType,
670
- sizeLabel: U(Number(e.sizeBytes))
671
- })), [e]), a = d(() => [
690
+ sizeLabel: st(Number(e.sizeBytes))
691
+ })), [e]), a = p(() => [
672
692
  {
673
693
  dataIndex: "filename",
674
694
  key: "filename",
@@ -689,7 +709,7 @@ function Ht({ attachments: e, onDownload: n, onPreview: r }) {
689
709
  },
690
710
  {
691
711
  key: "createdAt",
692
- render: (e) => /* @__PURE__ */ w(S, {
712
+ render: (e) => /* @__PURE__ */ T(C, {
693
713
  component: "span",
694
714
  variant: "body",
695
715
  children: t(e.createdAt)
@@ -697,16 +717,16 @@ function Ht({ attachments: e, onDownload: n, onPreview: r }) {
697
717
  title: "上傳時間",
698
718
  width: 220
699
719
  }
700
- ], []), o = d(() => ({
720
+ ], []), o = p(() => ({
701
721
  render: (e) => [...e.mimeType === "application/pdf" ? [{
702
- icon: ke,
722
+ icon: je,
703
723
  iconType: "leading",
704
724
  name: "預覽",
705
725
  onClick: () => {
706
726
  r(e.attachment);
707
727
  }
708
728
  }] : [], {
709
- icon: Oe,
729
+ icon: D,
710
730
  iconType: "leading",
711
731
  name: "下載",
712
732
  onClick: () => {
@@ -716,18 +736,18 @@ function Ht({ attachments: e, onDownload: n, onPreview: r }) {
716
736
  variant: "base-secondary",
717
737
  width: 160
718
738
  }), [n, r]);
719
- return /* @__PURE__ */ T("div", {
720
- style: Vt,
721
- children: [/* @__PURE__ */ w(S, {
739
+ return /* @__PURE__ */ E("div", {
740
+ style: Gt,
741
+ children: [/* @__PURE__ */ T(C, {
722
742
  component: "h2",
723
743
  variant: "h3",
724
744
  children: "附件"
725
- }), i.length > 0 ? /* @__PURE__ */ w(x, {
745
+ }), i.length > 0 ? /* @__PURE__ */ T(ie, {
726
746
  actions: o,
727
747
  columns: a,
728
748
  dataSource: i,
729
749
  fullWidth: !0
730
- }) : /* @__PURE__ */ w(S, {
750
+ }) : /* @__PURE__ */ T(C, {
731
751
  color: "text-neutral",
732
752
  variant: "body",
733
753
  children: "此案件沒有附件。"
@@ -736,55 +756,58 @@ function Ht({ attachments: e, onDownload: n, onPreview: r }) {
736
756
  }
737
757
  //#endregion
738
758
  //#region src/views/instances/detail/sections/InstanceTasksSection.tsx
739
- var Ut = {
759
+ var qt = {
740
760
  display: "grid",
741
761
  gap: 12,
742
762
  width: "100%"
743
- }, Wt = {
763
+ }, Jt = {
744
764
  minWidth: "100%",
745
765
  width: "100%"
746
- }, Gt = {
766
+ }, Yt = {
747
767
  display: "grid",
748
768
  gap: 12,
749
769
  width: "100%"
750
- }, Kt = { marginTop: 12 }, qt = { marginTop: 24 };
751
- function Jt(e) {
770
+ }, Xt = { marginTop: 12 }, Zt = { marginTop: 24 };
771
+ function Qt(e) {
752
772
  e && (e.style.width = "100%");
753
773
  }
754
- var Yt = {
774
+ var $t = {
755
775
  COMPLETION_NOTIFY: "結案通知",
756
776
  COUNTERSIGN: "臨時會簽",
757
777
  PRE_APPROVAL: "臨時加簽",
758
778
  STAGE_NOTIFY: "階段完成通知"
759
- }, Xt = {
779
+ }, en = {
760
780
  COMPLETION_NOTIFY: "本張單到達結案狀態(核准 / 拒絕 / 取消)後,通知指定對象。",
761
781
  COUNTERSIGN: "指定對象會併入下一層簽核,下一層需所有人都完成才會繼續。",
762
782
  PRE_APPROVAL: "指定對象需先完成加簽,本階段才會往下一層繼續。",
763
783
  STAGE_NOTIFY: "本階段完成後(不論通過與否)通知指定對象。"
764
- }, Zt = [{
784
+ }, tn = [{
765
785
  id: "REJECT_INSTANCE",
766
786
  name: "加簽拒絕時整單駁回"
767
787
  }, {
768
788
  id: "RETURN_TO_ORIGIN",
769
789
  name: "加簽拒絕時退回給我重新處理"
770
- }], Qt = [{
790
+ }], nn = [{
771
791
  id: "MEMBER",
772
792
  name: "指定成員"
773
793
  }, {
774
794
  id: "WEBHOOK",
775
795
  name: "Webhook"
776
- }], $t = s(function({ adhocDirectives: e, currentMemberId: r, instance: i, memberProfilesById: a, onChanged: o, tasks: s }, c) {
777
- let [l, f] = p(!1), [h, v] = p(null), [y, te] = p(""), [b, ie] = p(!1), [oe, le] = p(""), [ue, de] = p(null), [fe, pe] = p(!1), [me, he] = p(""), [ge, ye] = p(!1), [be, xe] = p(null), [Ce, we] = p(""), [Te, D] = p(null), [Ee, De] = p(!1), [Oe, ke] = p([]), [Ae, je] = p(!1), [Me, O] = p(""), [Ne, Pe] = p([]), [Fe, Ie] = p(!1), [Le, Re] = p([]), [ze, Be] = p(!1), [k, Ve] = p("COUNTERSIGN"), [He, Ue] = p("REJECT_INSTANCE"), [We, Ge] = p(!1), [A, Ke] = p("MEMBER"), [j, M] = p(""), N = oe.trim(), qe = me.trim(), Je = Ce.trim(), P = d(() => s.find((e) => st(e, r) && (e.status === "PENDING" || e.status === "IN_PROGRESS")) ?? null, [r, s]), F = d(() => P && i ? i.workflowSnapshot.nodes.find((e) => e.id === P.nodeId) ?? null : null, [P, i]), Ye = d(() => F && i ? ct(i.workflowSnapshot, F) : [], [F, i]), I = F?.type === "userTask" && F.data.returnBehavior.allowReturn, Xe = F?.type === "userTask" && F.data.allowReject !== !1, L = F?.type === "userTask" && F.data.allowTransfer !== !1, R = F?.type === "userTask" && F.data.returnBehavior.requireComment === !0, Ze = F?.type === "userTask" && F.data.allowAddSigner, z = d(() => e.filter((e) => e.status === "PENDING"), [e]), B = Ye.find((e) => e.id === be) ?? Ye[0] ?? null, Qe = d(() => s.map((e) => ({
796
+ }], rn = l(function({ adhocDirectives: e, currentMemberId: r, instance: i, memberProfilesById: o, onChanged: s, tasks: c }, l) {
797
+ let [u, d] = h(!1), [m, g] = h(null), [te, b] = h(""), [ne, re] = h(!1), [S, se] = h(""), [de, fe] = h(null), [pe, me] = h(!1), [he, ge] = h(""), [_e, ve] = h(!1), [xe, Se] = h(null), [Ce, Te] = h(""), [Ee, De] = h(null), [Oe, ke] = h(!1), [Ae, D] = h([]), [je, Me] = h(!1), [Ne, Pe] = h(""), [O, Fe] = h([]), [Ie, Le] = h(!1), [Re, ze] = h([]), [Be, Ve] = h(!1), [k, He] = h("COUNTERSIGN"), [Ue, We] = h("REJECT_INSTANCE"), [A, Ge] = h(!1), [Ke, qe] = h("MEMBER"), [Je, j] = h(""), M = S.trim(), Ye = he.trim(), Xe = Ce.trim(), N = p(() => c.find((e) => ft(e, r) && (e.status === "PENDING" || e.status === "IN_PROGRESS")) ?? null, [r, c]), P = p(() => N && i ? i.workflowSnapshot.nodes.find((e) => e.id === N.nodeId) ?? null : null, [N, i]), F = p(() => P && i ? G(i.workflowSnapshot, P) : [], [P, i]), Ze = P?.type === "userTask" && P.data.returnBehavior.allowReturn, I = P?.type === "userTask" && P.data.allowReject !== !1, Qe = P?.type === "userTask" && P.data.allowTransfer !== !1, L = P?.type === "userTask" && P.data.returnBehavior.requireComment === !0, $e = P?.type === "userTask" && P.data.allowAddSigner, et = p(() => e.filter((e) => e.status === "PENDING"), [e]), tt = F.find((e) => e.id === xe) ?? F[0] ?? null, nt = p(() => c.map((e) => ({
778
798
  ...e,
779
- assigneeLabel: ot(e, a),
799
+ assigneeLabel: W(e, o),
780
800
  key: e.id,
781
- nodeLabel: `${at(e.nodeId, i?.workflowSnapshot ?? null)}${e.isAdhoc ? e.adhocType === "COUNTERSIGN" ? "(臨時會簽)" : "(臨時加簽)" : ""}`,
782
- statusLabel: rt(e.status)
801
+ nodeLabel: a({
802
+ ...e,
803
+ nodeLabel: dt(e.nodeId, i?.workflowSnapshot ?? null)
804
+ }),
805
+ statusLabel: V(e.status)
783
806
  })), [
784
807
  i,
785
- a,
786
- s
787
- ]), V = d(() => [
808
+ o,
809
+ c
810
+ ]), R = p(() => [
788
811
  {
789
812
  dataIndex: "nodeLabel",
790
813
  key: "nodeLabel",
@@ -794,7 +817,7 @@ var Yt = {
794
817
  {
795
818
  key: "assigneeMemberId",
796
819
  title: "處理者",
797
- render: (e) => /* @__PURE__ */ w(S, {
820
+ render: (e) => /* @__PURE__ */ T(C, {
798
821
  component: "span",
799
822
  variant: "body",
800
823
  children: e.assigneeLabel
@@ -809,7 +832,7 @@ var Yt = {
809
832
  },
810
833
  {
811
834
  key: "createdAt",
812
- render: (e) => /* @__PURE__ */ w(S, {
835
+ render: (e) => /* @__PURE__ */ T(C, {
813
836
  component: "span",
814
837
  variant: "body",
815
838
  children: t(e.createdAt)
@@ -817,13 +840,13 @@ var Yt = {
817
840
  title: "建立時間",
818
841
  width: 220
819
842
  }
820
- ], []), $e = d(() => z.map((e) => ({
843
+ ], []), rt = p(() => et.map((e) => ({
821
844
  ...e,
822
- createdByLabel: G(e.createdByMemberId, a),
845
+ createdByLabel: U(e.createdByMemberId, o),
823
846
  key: e.id,
824
- targetLabel: en(e, a),
825
- typeLabel: Yt[e.type]
826
- })), [a, z]), et = d(() => [
847
+ targetLabel: an(e, o),
848
+ typeLabel: $t[e.type]
849
+ })), [o, et]), it = p(() => [
827
850
  {
828
851
  dataIndex: "typeLabel",
829
852
  key: "typeLabel",
@@ -832,7 +855,7 @@ var Yt = {
832
855
  },
833
856
  {
834
857
  key: "targetLabel",
835
- render: (e) => /* @__PURE__ */ w(S, {
858
+ render: (e) => /* @__PURE__ */ T(C, {
836
859
  component: "span",
837
860
  variant: "body",
838
861
  children: e.targetLabel
@@ -842,7 +865,7 @@ var Yt = {
842
865
  },
843
866
  {
844
867
  key: "createdByLabel",
845
- render: (e) => /* @__PURE__ */ w(S, {
868
+ render: (e) => /* @__PURE__ */ T(C, {
846
869
  component: "span",
847
870
  variant: "body",
848
871
  children: e.createdByLabel
@@ -852,7 +875,7 @@ var Yt = {
852
875
  },
853
876
  {
854
877
  key: "createdAt",
855
- render: (e) => /* @__PURE__ */ w(S, {
878
+ render: (e) => /* @__PURE__ */ T(C, {
856
879
  component: "span",
857
880
  variant: "body",
858
881
  children: t(e.createdAt)
@@ -862,336 +885,324 @@ var Yt = {
862
885
  },
863
886
  {
864
887
  key: "actions",
865
- render: (e) => e.createdByMemberId === r ? /* @__PURE__ */ w(g, {
866
- disabled: We,
867
- onClick: () => void St(e.id),
888
+ render: (e) => e.createdByMemberId === r ? /* @__PURE__ */ T(_, {
889
+ disabled: A,
890
+ onClick: () => void Ct(e.id),
868
891
  size: "minor",
869
892
  variant: "destructive-secondary",
870
893
  children: "撤回"
871
- }) : /* @__PURE__ */ w(C, {}),
894
+ }) : /* @__PURE__ */ T(w, {}),
872
895
  title: "操作",
873
896
  width: 100
874
897
  }
875
- ], [We, r]);
876
- async function U({ action: e, comment: t, returnToNodeId: n = null, transferToMemberId: i = null }) {
877
- if (!r || !P || e === "REJECTED" && !Xe || e === "TRANSFERRED" && !L) return !1;
878
- f(!0), v(null);
898
+ ], [A, r]);
899
+ async function z({ action: e, comment: t, returnToNodeId: n = null, transferToMemberId: i = null }) {
900
+ if (!r || !N || e === "REJECTED" && !I || e === "TRANSFERRED" && !Qe) return !1;
901
+ d(!0), g(null);
879
902
  try {
880
- await ce({
903
+ await ue({
881
904
  action: e,
882
905
  comment: t,
883
906
  decidedByMemberId: r,
884
907
  returnToNodeId: n,
885
- taskId: P.id,
908
+ taskId: N.id,
886
909
  transferToMemberId: i
887
- }), pe(!1), ye(!1), je(!1), le(""), he(""), we(""), D(null), xe(null), de(null);
910
+ }), me(!1), ve(!1), Me(!1), se(""), ge(""), Te(""), De(null), Se(null), fe(null);
888
911
  } catch (e) {
889
- return v(H(e)), f(!1), !1;
912
+ return g(B(e)), d(!1), !1;
890
913
  }
891
914
  try {
892
- await o();
915
+ await s();
893
916
  } catch (e) {
894
- v(H(e));
917
+ g(B(e));
895
918
  } finally {
896
- f(!1);
919
+ d(!1);
897
920
  }
898
921
  return !0;
899
922
  }
900
- function tt() {
901
- r && P && (v(null), te(""), ie(!0));
923
+ function at() {
924
+ r && N && (g(null), b(""), re(!0));
902
925
  }
903
- function nt() {
904
- l || (ie(!1), te(""));
926
+ function ot() {
927
+ u || (re(!1), b(""));
905
928
  }
906
- async function it() {
907
- l || await U({
929
+ async function st() {
930
+ u || await z({
908
931
  action: "APPROVED",
909
- comment: y.trim() || null
910
- }) && (ie(!1), te(""));
932
+ comment: te.trim() || null
933
+ }) && (re(!1), b(""));
911
934
  }
912
- function W() {
913
- Xe && (le(""), de(null), pe(!0));
935
+ function ct() {
936
+ I && (se(""), fe(null), me(!0));
914
937
  }
915
- function q() {
916
- l || (pe(!1), le(""), de(null));
938
+ function lt() {
939
+ u || (me(!1), se(""), fe(null));
917
940
  }
918
- function pt() {
919
- he(""), xe(Ye[0]?.id ?? null), ye(!0);
941
+ function ut() {
942
+ ge(""), Se(F[0]?.id ?? null), ve(!0);
920
943
  }
921
- function mt() {
922
- l || (ye(!1), he(""), xe(null));
944
+ function H() {
945
+ u || (ve(!1), ge(""), Se(null));
923
946
  }
924
- function J() {
925
- L && (we(""), D(null), je(!0), gt(""));
947
+ function K() {
948
+ Qe && (Te(""), De(null), Me(!0), vt(""));
926
949
  }
927
- function ht() {
928
- l || (je(!1), we(""), D(null));
950
+ function q() {
951
+ u || (Me(!1), Te(""), De(null));
929
952
  }
930
- async function gt(e) {
931
- De(!0);
953
+ async function vt(e) {
954
+ ke(!0);
932
955
  try {
933
- ke((await Se(e)).filter((e) => e.memberId !== r).map(lt));
956
+ D((await we(e)).filter((e) => e.memberId !== r).map(pt));
934
957
  } catch (e) {
935
- v(H(e));
958
+ g(B(e));
936
959
  } finally {
937
- De(!1);
960
+ ke(!1);
938
961
  }
939
962
  }
940
- async function Y() {
941
- if (Xe) {
942
- if (!N) {
943
- de("請輸入拒絕原因");
944
- return;
945
- }
946
- await U({
947
- action: "REJECTED",
948
- comment: N
949
- });
950
- }
963
+ async function J() {
964
+ I && (M ? await z({
965
+ action: "REJECTED",
966
+ comment: M
967
+ }) : fe("請輸入拒絕原因"));
951
968
  }
952
- async function _t() {
953
- if (L) {
954
- if (!Te) {
955
- v("請選擇轉派對象");
956
- return;
957
- }
958
- await U({
959
- action: "TRANSFERRED",
960
- comment: Je || null,
961
- transferToMemberId: Te.id
962
- });
963
- }
969
+ async function Y() {
970
+ Qe && (Ee ? await z({
971
+ action: "TRANSFERRED",
972
+ comment: Xe || null,
973
+ transferToMemberId: Ee.id
974
+ }) : g("請選擇轉派對象"));
964
975
  }
965
- async function vt() {
966
- await U({
976
+ async function yt() {
977
+ await z({
967
978
  action: "RETURNED",
968
- comment: qe || null,
969
- returnToNodeId: B?.id ?? null
979
+ comment: Ye || null,
980
+ returnToNodeId: tt?.id ?? null
970
981
  });
971
982
  }
972
- function X() {
973
- O(""), Pe([]), Ue("REJECT_INSTANCE"), Ke("MEMBER"), M("");
983
+ function bt() {
984
+ Pe(""), Fe([]), We("REJECT_INSTANCE"), qe("MEMBER"), j("");
974
985
  }
975
- function Z(e) {
976
- Ve(e), X(), Be(!0), bt("");
986
+ function xt(e) {
987
+ He(e), bt(), Ve(!0), Z("");
977
988
  }
978
- function yt() {
979
- We || (Be(!1), X());
989
+ function X() {
990
+ A || (Ve(!1), bt());
980
991
  }
981
- async function bt(e) {
982
- Ie(!0);
992
+ async function Z(e) {
993
+ Le(!0);
983
994
  try {
984
- Re((await Se(e)).map(lt));
995
+ ze((await we(e)).map(pt));
985
996
  } catch (e) {
986
- v(H(e));
997
+ g(B(e));
987
998
  } finally {
988
- Ie(!1);
999
+ Le(!1);
989
1000
  }
990
1001
  }
991
- async function xt() {
992
- if (!P) return;
993
- let e = (k === "STAGE_NOTIFY" || k === "COMPLETION_NOTIFY") && A === "WEBHOOK", t = K({
994
- memberIds: Ne.map((e) => e.id),
1002
+ async function St() {
1003
+ if (!N) return;
1004
+ let e = (k === "STAGE_NOTIFY" || k === "COMPLETION_NOTIFY") && Ke === "WEBHOOK", t = mt({
1005
+ memberIds: O.map((e) => e.id),
995
1006
  useWebhookTarget: e,
996
- webhookUrl: j
1007
+ webhookUrl: Je
997
1008
  });
998
1009
  if (!t.valid) {
999
- v(t.error);
1010
+ g(t.error);
1000
1011
  return;
1001
1012
  }
1002
- let { target: n } = t, r = Me.trim() || null;
1003
- Ge(!0), v(null);
1013
+ let { target: n } = t, r = Ne.trim() || null;
1014
+ Ge(!0), g(null);
1004
1015
  try {
1005
- k === "COUNTERSIGN" ? await _e({
1016
+ k === "COUNTERSIGN" ? await ye({
1006
1017
  comment: r,
1007
1018
  target: n,
1008
- taskId: P.id
1009
- }) : k === "PRE_APPROVAL" ? await ve({
1019
+ taskId: N.id
1020
+ }) : k === "PRE_APPROVAL" ? await be({
1010
1021
  comment: r,
1011
- onReject: He,
1022
+ onReject: Ue,
1012
1023
  target: n,
1013
- taskId: P.id
1014
- }) : k === "STAGE_NOTIFY" ? await se({
1024
+ taskId: N.id
1025
+ }) : k === "STAGE_NOTIFY" ? await le({
1015
1026
  target: n,
1016
- taskId: P.id
1017
- }) : await E({
1027
+ taskId: N.id
1028
+ }) : await ce({
1018
1029
  target: n,
1019
- taskId: P.id
1020
- }), Be(!1), X(), await o();
1030
+ taskId: N.id
1031
+ }), Ve(!1), bt(), await s();
1021
1032
  } catch (e) {
1022
- v(H(e));
1033
+ g(B(e));
1023
1034
  } finally {
1024
1035
  Ge(!1);
1025
1036
  }
1026
1037
  }
1027
- async function St(e) {
1028
- Ge(!0), v(null);
1038
+ async function Ct(e) {
1039
+ Ge(!0), g(null);
1029
1040
  try {
1030
- await ae(e), await o();
1041
+ await oe(e), await s();
1031
1042
  } catch (e) {
1032
- v(H(e));
1043
+ g(B(e));
1033
1044
  } finally {
1034
1045
  Ge(!1);
1035
1046
  }
1036
1047
  }
1037
- u(c, () => ({
1038
- canAddSignerCurrentTask: Ze,
1039
- canRejectCurrentTask: Xe,
1040
- canReturnCurrentTask: I,
1041
- canTransferCurrentTask: L,
1042
- deciding: l,
1043
- handleApprove: tt,
1044
- hasCurrentTask: P !== null,
1045
- openAdhocModal: Z,
1046
- openRejectModal: W,
1047
- openReturnModal: pt,
1048
- openTransferModal: J
1048
+ f(l, () => ({
1049
+ canAddSignerCurrentTask: $e,
1050
+ canRejectCurrentTask: I,
1051
+ canReturnCurrentTask: Ze,
1052
+ canTransferCurrentTask: Qe,
1053
+ deciding: u,
1054
+ handleApprove: at,
1055
+ hasCurrentTask: N !== null,
1056
+ openAdhocModal: xt,
1057
+ openRejectModal: ct,
1058
+ openReturnModal: ut,
1059
+ openTransferModal: K
1049
1060
  }), [
1050
- Ze,
1051
- Xe,
1061
+ $e,
1052
1062
  I,
1053
- L,
1063
+ Ze,
1064
+ Qe,
1054
1065
  r,
1055
- P,
1056
- l
1066
+ N,
1067
+ u
1057
1068
  ]);
1058
- let Q = k === "STAGE_NOTIFY" || k === "COMPLETION_NOTIFY", Ct = Q && A === "WEBHOOK" ? !j.trim() : Ne.length === 0, wt = Zt.find((e) => e.id === He) ?? Zt[0], Tt = Qt.find((e) => e.id === A) ?? Qt[0];
1059
- return /* @__PURE__ */ T(C, { children: [
1060
- /* @__PURE__ */ w(S, {
1069
+ let Q = k === "STAGE_NOTIFY" || k === "COMPLETION_NOTIFY", wt = Q && Ke === "WEBHOOK" ? !Je.trim() : O.length === 0, Tt = tn.find((e) => e.id === Ue) ?? tn[0], Et = nn.find((e) => e.id === Ke) ?? nn[0];
1070
+ return /* @__PURE__ */ E(w, { children: [
1071
+ /* @__PURE__ */ T(C, {
1061
1072
  component: "h2",
1062
1073
  variant: "h3",
1063
1074
  children: "任務"
1064
1075
  }),
1065
- h ? /* @__PURE__ */ w(S, {
1076
+ m ? /* @__PURE__ */ T(C, {
1066
1077
  color: "text-error",
1067
1078
  variant: "body",
1068
- children: h
1079
+ children: m
1069
1080
  }) : null,
1070
- /* @__PURE__ */ w("div", {
1071
- style: Kt,
1072
- children: /* @__PURE__ */ w(x, {
1073
- columns: V,
1074
- dataSource: Qe,
1081
+ /* @__PURE__ */ T("div", {
1082
+ style: Xt,
1083
+ children: /* @__PURE__ */ T(ie, {
1084
+ columns: R,
1085
+ dataSource: nt,
1075
1086
  fullWidth: !0
1076
1087
  })
1077
1088
  }),
1078
- z.length > 0 ? /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(S, {
1089
+ et.length > 0 ? /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T(C, {
1079
1090
  component: "h3",
1080
- style: qt,
1091
+ style: Zt,
1081
1092
  variant: "h3",
1082
1093
  children: "待生效的臨時設定"
1083
- }), /* @__PURE__ */ w("div", {
1084
- style: Kt,
1085
- children: /* @__PURE__ */ w(x, {
1086
- columns: et,
1087
- dataSource: $e,
1094
+ }), /* @__PURE__ */ T("div", {
1095
+ style: Xt,
1096
+ children: /* @__PURE__ */ T(ie, {
1097
+ columns: it,
1098
+ dataSource: rt,
1088
1099
  fullWidth: !0
1089
1100
  })
1090
1101
  })] }) : null,
1091
- /* @__PURE__ */ T(_, {
1102
+ /* @__PURE__ */ E(y, {
1092
1103
  cancelText: "取消",
1093
1104
  confirmText: "送出同意",
1094
- loading: l,
1105
+ loading: u,
1095
1106
  modalType: "standard",
1096
- onCancel: nt,
1097
- onClose: nt,
1098
- onConfirm: () => void it(),
1099
- open: b,
1107
+ onCancel: ot,
1108
+ onClose: ot,
1109
+ onConfirm: () => void st(),
1110
+ open: ne,
1100
1111
  showModalFooter: !0,
1101
1112
  showModalHeader: !0,
1102
1113
  size: "regular",
1103
1114
  supportingText: "可以留下同意的說明,內容會記錄在簽核歷程;不填也可以直接送出。",
1104
1115
  title: "簽核意見",
1105
- children: [h ? /* @__PURE__ */ w(S, {
1116
+ children: [m ? /* @__PURE__ */ T(C, {
1106
1117
  color: "text-error",
1107
1118
  role: "alert",
1108
1119
  variant: "body",
1109
- children: h
1110
- }) : null, /* @__PURE__ */ w("div", {
1111
- style: Ut,
1112
- children: /* @__PURE__ */ w(n, {
1120
+ children: m
1121
+ }) : null, /* @__PURE__ */ T("div", {
1122
+ style: qt,
1123
+ children: /* @__PURE__ */ T(n, {
1113
1124
  label: "簽核意見",
1114
1125
  name: "approveComment",
1115
- children: /* @__PURE__ */ w(re, {
1126
+ children: /* @__PURE__ */ T(ae, {
1116
1127
  autoFocus: !0,
1117
- onChange: (e) => te(e.target.value),
1128
+ onChange: (e) => b(e.target.value),
1118
1129
  placeholder: "選填,例如補充核准的條件或提醒事項",
1119
- ref: Jt,
1130
+ ref: Qt,
1120
1131
  resize: "vertical",
1121
1132
  rows: 4,
1122
- style: Wt,
1123
- value: y
1133
+ style: Jt,
1134
+ value: te
1124
1135
  })
1125
1136
  })
1126
1137
  })]
1127
1138
  }),
1128
- /* @__PURE__ */ w(_, {
1139
+ /* @__PURE__ */ T(y, {
1129
1140
  cancelText: "取消",
1130
1141
  confirmButtonProps: {
1131
- disabled: !N,
1142
+ disabled: !M,
1132
1143
  variant: "destructive-primary"
1133
1144
  },
1134
1145
  confirmText: "送出拒絕",
1135
- loading: l,
1146
+ loading: u,
1136
1147
  modalStatusType: "error",
1137
1148
  modalType: "standard",
1138
- onCancel: q,
1139
- onClose: q,
1140
- onConfirm: () => void Y(),
1141
- open: fe,
1149
+ onCancel: lt,
1150
+ onClose: lt,
1151
+ onConfirm: () => void J(),
1152
+ open: pe,
1142
1153
  showModalFooter: !0,
1143
1154
  showModalHeader: !0,
1144
1155
  size: "regular",
1145
1156
  supportingText: "拒絕案件時必須留下原因,供發起人與後續追蹤查看。",
1146
1157
  title: "拒絕原因",
1147
- children: /* @__PURE__ */ T("div", {
1148
- style: Ut,
1149
- children: [/* @__PURE__ */ w(n, {
1158
+ children: /* @__PURE__ */ E("div", {
1159
+ style: qt,
1160
+ children: [/* @__PURE__ */ T(n, {
1150
1161
  label: "拒絕原因",
1151
1162
  name: "rejectReason",
1152
1163
  required: !0,
1153
- children: /* @__PURE__ */ w(re, {
1164
+ children: /* @__PURE__ */ T(ae, {
1154
1165
  autoFocus: !0,
1155
1166
  onChange: (e) => {
1156
- le(e.target.value), de(null);
1167
+ se(e.target.value), fe(null);
1157
1168
  },
1158
1169
  placeholder: "請說明拒絕原因",
1159
- ref: Jt,
1170
+ ref: Qt,
1160
1171
  resize: "vertical",
1161
1172
  rows: 4,
1162
- style: Wt,
1163
- type: ue ? "error" : "default",
1164
- value: oe
1173
+ style: Jt,
1174
+ type: de ? "error" : "default",
1175
+ value: S
1165
1176
  })
1166
- }), ue ? /* @__PURE__ */ w(S, {
1177
+ }), de ? /* @__PURE__ */ T(C, {
1167
1178
  color: "text-error",
1168
1179
  variant: "body",
1169
- children: ue
1180
+ children: de
1170
1181
  }) : null]
1171
1182
  })
1172
1183
  }),
1173
- /* @__PURE__ */ w(_, {
1184
+ /* @__PURE__ */ T(y, {
1174
1185
  cancelText: "取消",
1175
- confirmButtonProps: { disabled: !Te },
1186
+ confirmButtonProps: { disabled: !Ee },
1176
1187
  confirmText: "送出轉派",
1177
- loading: l,
1188
+ loading: u,
1178
1189
  modalType: "standard",
1179
- onCancel: ht,
1180
- onClose: ht,
1181
- onConfirm: () => void _t(),
1182
- open: Ae,
1190
+ onCancel: q,
1191
+ onClose: q,
1192
+ onConfirm: () => void Y(),
1193
+ open: je,
1183
1194
  showModalFooter: !0,
1184
1195
  showModalHeader: !0,
1185
1196
  size: "regular",
1186
1197
  supportingText: "轉派後,原任務會保留轉派紀錄,新的待簽任務會指派給指定成員。",
1187
1198
  title: "轉派簽核",
1188
- children: /* @__PURE__ */ T("div", {
1189
- style: Gt,
1190
- children: [/* @__PURE__ */ w(n, {
1199
+ children: /* @__PURE__ */ E("div", {
1200
+ style: Yt,
1201
+ children: [/* @__PURE__ */ T(n, {
1191
1202
  label: "轉派對象",
1192
1203
  name: "transferToMemberId",
1193
1204
  required: !0,
1194
- children: /* @__PURE__ */ w(m, {
1205
+ children: /* @__PURE__ */ T(ee, {
1195
1206
  asyncData: !0,
1196
1207
  disabledOptionsFilter: !0,
1197
1208
  emptyText: "沒有符合的成員",
@@ -1201,147 +1212,147 @@ var Yt = {
1201
1212
  name: "transfer-member-search",
1202
1213
  spellCheck: !1
1203
1214
  },
1204
- loading: Ee,
1215
+ loading: Oe,
1205
1216
  loadingText: "搜尋成員中...",
1206
1217
  mode: "single",
1207
- onChange: (e) => D(dt(e)),
1208
- onSearch: gt,
1209
- onSearchTextChange: (e) => D(ft(e, Oe)),
1218
+ onChange: (e) => De(gt(e)),
1219
+ onSearch: vt,
1220
+ onSearchTextChange: (e) => De(_t(e, Ae)),
1210
1221
  onVisibilityChange: (e) => {
1211
- e && gt("");
1222
+ e && vt("");
1212
1223
  },
1213
- options: [...Oe],
1224
+ options: [...Ae],
1214
1225
  placeholder: "搜尋姓名或信箱",
1215
1226
  searchDebounceTime: 300,
1216
- value: Te
1227
+ value: Ee
1217
1228
  })
1218
- }), /* @__PURE__ */ w(n, {
1229
+ }), /* @__PURE__ */ T(n, {
1219
1230
  label: "轉派說明",
1220
1231
  name: "transferComment",
1221
- children: /* @__PURE__ */ w(re, {
1222
- onChange: (e) => we(e.target.value),
1232
+ children: /* @__PURE__ */ T(ae, {
1233
+ onChange: (e) => Te(e.target.value),
1223
1234
  placeholder: "可補充轉派原因",
1224
- ref: Jt,
1235
+ ref: Qt,
1225
1236
  resize: "vertical",
1226
1237
  rows: 4,
1227
- style: Wt,
1238
+ style: Jt,
1228
1239
  value: Ce
1229
1240
  })
1230
1241
  })]
1231
1242
  })
1232
1243
  }),
1233
- /* @__PURE__ */ w(_, {
1244
+ /* @__PURE__ */ T(y, {
1234
1245
  cancelText: "取消",
1235
- confirmButtonProps: { disabled: !B || R && !qe },
1246
+ confirmButtonProps: { disabled: !tt || L && !Ye },
1236
1247
  confirmText: "送出退回",
1237
- loading: l,
1248
+ loading: u,
1238
1249
  modalType: "standard",
1239
- onCancel: mt,
1240
- onClose: mt,
1241
- onConfirm: () => void vt(),
1242
- open: ge,
1250
+ onCancel: H,
1251
+ onClose: H,
1252
+ onConfirm: () => void yt(),
1253
+ open: _e,
1243
1254
  showModalFooter: !0,
1244
1255
  showModalHeader: !0,
1245
1256
  size: "regular",
1246
1257
  supportingText: "退回後,流程會回到指定節點並等待重新處理。",
1247
1258
  title: "退回簽核",
1248
- children: /* @__PURE__ */ T("div", {
1249
- style: Gt,
1250
- children: [/* @__PURE__ */ w(n, {
1259
+ children: /* @__PURE__ */ E("div", {
1260
+ style: Yt,
1261
+ children: [/* @__PURE__ */ T(n, {
1251
1262
  label: "退回節點",
1252
1263
  name: "returnTargetNodeId",
1253
1264
  required: !0,
1254
- children: /* @__PURE__ */ w(ne, {
1265
+ children: /* @__PURE__ */ T(x, {
1255
1266
  clearable: !1,
1256
1267
  fullWidth: !0,
1257
- onChange: (e) => xe(e?.id ?? null),
1258
- options: [...Ye],
1268
+ onChange: (e) => Se(e?.id ?? null),
1269
+ options: [...F],
1259
1270
  placeholder: "選擇退回節點",
1260
- value: B
1271
+ value: tt
1261
1272
  })
1262
- }), /* @__PURE__ */ w(n, {
1263
- hintText: R ? "此關卡設定退回時必須填寫意見。" : void 0,
1273
+ }), /* @__PURE__ */ T(n, {
1274
+ hintText: L ? "此關卡設定退回時必須填寫意見。" : void 0,
1264
1275
  label: "退回說明",
1265
1276
  name: "returnComment",
1266
- required: R,
1267
- children: /* @__PURE__ */ w(re, {
1268
- onChange: (e) => he(e.target.value),
1269
- placeholder: R ? "請說明退回原因" : "可補充需要修改的內容",
1270
- ref: Jt,
1277
+ required: L,
1278
+ children: /* @__PURE__ */ T(ae, {
1279
+ onChange: (e) => ge(e.target.value),
1280
+ placeholder: L ? "請說明退回原因" : "可補充需要修改的內容",
1281
+ ref: Qt,
1271
1282
  resize: "vertical",
1272
1283
  rows: 4,
1273
- style: Wt,
1274
- value: me
1284
+ style: Jt,
1285
+ value: he
1275
1286
  })
1276
1287
  })]
1277
1288
  })
1278
1289
  }),
1279
- /* @__PURE__ */ w(_, {
1290
+ /* @__PURE__ */ T(y, {
1280
1291
  cancelText: "取消",
1281
- confirmButtonProps: { disabled: Ct },
1292
+ confirmButtonProps: { disabled: wt },
1282
1293
  confirmText: "送出",
1283
- loading: We,
1294
+ loading: A,
1284
1295
  modalType: "standard",
1285
- onCancel: yt,
1286
- onClose: yt,
1287
- onConfirm: () => void xt(),
1288
- open: ze,
1296
+ onCancel: X,
1297
+ onClose: X,
1298
+ onConfirm: () => void St(),
1299
+ open: Be,
1289
1300
  showModalFooter: !0,
1290
1301
  showModalHeader: !0,
1291
1302
  size: "regular",
1292
- supportingText: Xt[k],
1293
- title: Yt[k],
1294
- children: /* @__PURE__ */ T("div", {
1295
- style: Gt,
1303
+ supportingText: en[k],
1304
+ title: $t[k],
1305
+ children: /* @__PURE__ */ E("div", {
1306
+ style: Yt,
1296
1307
  children: [
1297
- Q ? /* @__PURE__ */ w(n, {
1308
+ Q ? /* @__PURE__ */ T(n, {
1298
1309
  label: "通知時機",
1299
1310
  name: "adhocNotifyMode",
1300
1311
  required: !0,
1301
- children: /* @__PURE__ */ w(ne, {
1312
+ children: /* @__PURE__ */ T(x, {
1302
1313
  clearable: !1,
1303
1314
  fullWidth: !0,
1304
- onChange: (e) => Ve(e?.id === "COMPLETION_NOTIFY" ? "COMPLETION_NOTIFY" : "STAGE_NOTIFY"),
1315
+ onChange: (e) => He(e?.id === "COMPLETION_NOTIFY" ? "COMPLETION_NOTIFY" : "STAGE_NOTIFY"),
1305
1316
  options: [{
1306
1317
  id: "STAGE_NOTIFY",
1307
- name: Yt.STAGE_NOTIFY
1318
+ name: $t.STAGE_NOTIFY
1308
1319
  }, {
1309
1320
  id: "COMPLETION_NOTIFY",
1310
- name: Yt.COMPLETION_NOTIFY
1321
+ name: $t.COMPLETION_NOTIFY
1311
1322
  }],
1312
1323
  value: {
1313
1324
  id: k,
1314
- name: Yt[k]
1325
+ name: $t[k]
1315
1326
  }
1316
1327
  })
1317
1328
  }) : null,
1318
- Q ? /* @__PURE__ */ w(n, {
1329
+ Q ? /* @__PURE__ */ T(n, {
1319
1330
  label: "通知對象類型",
1320
1331
  name: "adhocTargetKind",
1321
1332
  required: !0,
1322
- children: /* @__PURE__ */ w(ne, {
1333
+ children: /* @__PURE__ */ T(x, {
1323
1334
  clearable: !1,
1324
1335
  fullWidth: !0,
1325
- onChange: (e) => Ke(e?.id === "WEBHOOK" ? "WEBHOOK" : "MEMBER"),
1326
- options: [...Qt],
1327
- value: Tt
1336
+ onChange: (e) => qe(e?.id === "WEBHOOK" ? "WEBHOOK" : "MEMBER"),
1337
+ options: [...nn],
1338
+ value: Et
1328
1339
  })
1329
1340
  }) : null,
1330
- Q && A === "WEBHOOK" ? /* @__PURE__ */ w(n, {
1341
+ Q && Ke === "WEBHOOK" ? /* @__PURE__ */ T(n, {
1331
1342
  label: "Webhook URL",
1332
1343
  name: "adhocWebhookUrl",
1333
1344
  required: !0,
1334
- children: /* @__PURE__ */ w(ee, {
1345
+ children: /* @__PURE__ */ T(v, {
1335
1346
  fullWidth: !0,
1336
- onChange: (e) => M(e.target.value),
1347
+ onChange: (e) => j(e.target.value),
1337
1348
  placeholder: "https://example.com/webhook",
1338
- value: j
1349
+ value: Je
1339
1350
  })
1340
- }) : /* @__PURE__ */ w(n, {
1351
+ }) : /* @__PURE__ */ T(n, {
1341
1352
  label: Q ? "通知對象" : "簽核對象",
1342
1353
  name: "adhocMemberId",
1343
1354
  required: !0,
1344
- children: /* @__PURE__ */ w(m, {
1355
+ children: /* @__PURE__ */ T(ee, {
1345
1356
  asyncData: !0,
1346
1357
  disabledOptionsFilter: !0,
1347
1358
  emptyText: "沒有符合的成員",
@@ -1351,45 +1362,45 @@ var Yt = {
1351
1362
  name: "adhoc-member-search",
1352
1363
  spellCheck: !1
1353
1364
  },
1354
- loading: Fe,
1365
+ loading: Ie,
1355
1366
  loadingText: "搜尋成員中...",
1356
1367
  menuMaxHeight: 320,
1357
1368
  mode: "multiple",
1358
- onChange: (e) => Pe(e.map(dt).filter(ut)),
1359
- onSearch: bt,
1369
+ onChange: (e) => Fe(e.map(gt).filter(ht)),
1370
+ onSearch: Z,
1360
1371
  onVisibilityChange: (e) => {
1361
- e && bt("");
1372
+ e && Z("");
1362
1373
  },
1363
- options: [...Le],
1374
+ options: [...Re],
1364
1375
  overflowStrategy: "wrap",
1365
1376
  placeholder: "搜尋姓名或信箱,可加入多位",
1366
1377
  searchDebounceTime: 300,
1367
- value: [...Ne]
1378
+ value: [...O]
1368
1379
  })
1369
1380
  }),
1370
- k === "PRE_APPROVAL" ? /* @__PURE__ */ w(n, {
1381
+ k === "PRE_APPROVAL" ? /* @__PURE__ */ T(n, {
1371
1382
  label: "拒簽處理方式",
1372
1383
  name: "adhocOnReject",
1373
1384
  required: !0,
1374
- children: /* @__PURE__ */ w(ne, {
1385
+ children: /* @__PURE__ */ T(x, {
1375
1386
  clearable: !1,
1376
1387
  fullWidth: !0,
1377
- onChange: (e) => Ue(e?.id === "RETURN_TO_ORIGIN" ? "RETURN_TO_ORIGIN" : "REJECT_INSTANCE"),
1378
- options: [...Zt],
1379
- value: wt
1388
+ onChange: (e) => We(e?.id === "RETURN_TO_ORIGIN" ? "RETURN_TO_ORIGIN" : "REJECT_INSTANCE"),
1389
+ options: [...tn],
1390
+ value: Tt
1380
1391
  })
1381
1392
  }) : null,
1382
- Q ? null : /* @__PURE__ */ w(n, {
1393
+ Q ? null : /* @__PURE__ */ T(n, {
1383
1394
  label: "說明",
1384
1395
  name: "adhocComment",
1385
- children: /* @__PURE__ */ w(re, {
1386
- onChange: (e) => O(e.target.value),
1396
+ children: /* @__PURE__ */ T(ae, {
1397
+ onChange: (e) => Pe(e.target.value),
1387
1398
  placeholder: "可補充原因",
1388
- ref: Jt,
1399
+ ref: Qt,
1389
1400
  resize: "vertical",
1390
1401
  rows: 3,
1391
- style: Wt,
1392
- value: Me
1402
+ style: Jt,
1403
+ value: Ne
1393
1404
  })
1394
1405
  })
1395
1406
  ]
@@ -1397,10 +1408,10 @@ var Yt = {
1397
1408
  })
1398
1409
  ] });
1399
1410
  });
1400
- function en(e, t) {
1411
+ function an(e, t) {
1401
1412
  try {
1402
1413
  let n = JSON.parse(e.targetValueJson);
1403
- if (n.memberIds?.length) return n.memberIds.map((e) => G(e, t)).join("、");
1414
+ if (n.memberIds?.length) return n.memberIds.map((e) => U(e, t)).join("、");
1404
1415
  if (n.webhookUrl) return n.webhookUrl;
1405
1416
  if (n.positionId) return `職位 ${n.positionId}`;
1406
1417
  if (n.orgUnitId) return `部門 ${n.orgUnitId}`;
@@ -1409,19 +1420,19 @@ function en(e, t) {
1409
1420
  }
1410
1421
  //#endregion
1411
1422
  //#region src/views/instances/detail/sections/InstanceSignaturesSection.tsx
1412
- var tn = {
1423
+ var on = {
1413
1424
  display: "grid",
1414
1425
  gap: 16
1415
1426
  };
1416
- function nn({ signatureVerification: e, signatures: n }) {
1417
- let r = d(() => n.map((e) => ({
1427
+ function sn({ signatureVerification: e, signatures: n }) {
1428
+ let r = p(() => n.map((e) => ({
1418
1429
  algorithm: e.algorithm,
1419
- hashLabel: tt(e.signedPayloadHash),
1430
+ hashLabel: ct(e.signedPayloadHash),
1420
1431
  key: e.id,
1421
1432
  keyVersion: e.keyVersion,
1422
1433
  signedAtLabel: t(e.signedAt),
1423
1434
  signerMemberId: e.signerMemberId
1424
- })), [n]), i = d(() => [
1435
+ })), [n]), i = p(() => [
1425
1436
  {
1426
1437
  dataIndex: "signerMemberId",
1427
1438
  key: "signerMemberId",
@@ -1453,20 +1464,20 @@ function nn({ signatureVerification: e, signatures: n }) {
1453
1464
  width: 220
1454
1465
  }
1455
1466
  ], []);
1456
- return /* @__PURE__ */ T("div", {
1457
- style: tn,
1467
+ return /* @__PURE__ */ E("div", {
1468
+ style: on,
1458
1469
  children: [
1459
- /* @__PURE__ */ w(S, {
1470
+ /* @__PURE__ */ T(C, {
1460
1471
  component: "h2",
1461
1472
  variant: "h3",
1462
1473
  children: "簽章"
1463
1474
  }),
1464
- /* @__PURE__ */ w(S, {
1475
+ /* @__PURE__ */ T(C, {
1465
1476
  color: e?.valid ? "text-success" : "text-error",
1466
1477
  variant: "body",
1467
1478
  children: e ? e.valid ? `簽章鏈已驗證,共 ${e.checkedCount} 筆。` : `簽章鏈驗證失敗:${e.errors.join("、")}` : "尚無簽章紀錄。"
1468
1479
  }),
1469
- r.length > 0 ? /* @__PURE__ */ w(x, {
1480
+ r.length > 0 ? /* @__PURE__ */ T(ie, {
1470
1481
  columns: i,
1471
1482
  dataSource: r,
1472
1483
  fullWidth: !0
@@ -1476,55 +1487,55 @@ function nn({ signatureVerification: e, signatures: n }) {
1476
1487
  }
1477
1488
  //#endregion
1478
1489
  //#region src/views/instances/detail/sections/InstanceHistorySection.tsx
1479
- var rn = {
1490
+ var cn = {
1480
1491
  display: "grid",
1481
1492
  gap: 16
1482
- }, an = {
1493
+ }, ln = {
1483
1494
  cursor: "help",
1484
1495
  textDecoration: "underline dotted",
1485
1496
  textUnderlineOffset: 3
1486
- }, on = {
1497
+ }, un = {
1487
1498
  borderLeftColor: "var(--mzn-color-border)",
1488
1499
  borderLeftStyle: "solid",
1489
1500
  borderLeftWidth: 2,
1490
1501
  marginTop: 4,
1491
1502
  paddingLeft: 8,
1492
1503
  whiteSpace: "pre-wrap"
1493
- }, sn = { color: "var(--mzn-color-text-secondary)" }, cn = {
1494
- ...on,
1504
+ }, dn = { color: "var(--mzn-color-text-secondary)" }, fn = {
1505
+ ...un,
1495
1506
  borderLeftColor: "var(--mzn-color-text-error)",
1496
1507
  color: "var(--mzn-color-text-error)"
1497
1508
  };
1498
- function ln(...e) {
1499
- return e.filter((e) => V(e ?? null)).join(" ");
1509
+ function pn(...e) {
1510
+ return e.filter((e) => z(e ?? null)).join(" ");
1500
1511
  }
1501
- var un = s(function({ className: e, descriptionParts: t, error: n, forcePending: r = !1, index: i = 0, orientation: a, status: s = "pending", title: c, type: l = "number", ...u }, d) {
1502
- let f = r ? "pending" : s, p = t.filter((e) => e.type !== "comment"), m = t.filter((e) => e.type === "comment");
1503
- return /* @__PURE__ */ T("div", {
1512
+ var mn = l(function({ className: e, descriptionParts: t, error: n, forcePending: r = !1, index: i = 0, orientation: a, status: o = "pending", title: s, type: l = "number", ...u }, d) {
1513
+ let f = r ? "pending" : o, p = t.filter((e) => e.type !== "comment"), m = t.filter((e) => e.type === "comment");
1514
+ return /* @__PURE__ */ E("div", {
1504
1515
  ...u,
1505
- className: ln(j.host, l === "dot" ? j.dot : null, n && f !== "processing" ? j.error : null, a === "horizontal" ? j.horizontal : null, l === "number" ? j.number : null, f === "pending" ? j.pending : null, f === "processing" ? j.processing : null, n && f === "processing" ? j.processingError : null, !n && f === "succeeded" ? j.succeeded : null, a === "vertical" ? j.vertical : null, e),
1516
+ className: pn(j.host, l === "dot" ? j.dot : null, n && f !== "processing" ? j.error : null, a === "horizontal" ? j.horizontal : null, l === "number" ? j.number : null, f === "pending" ? j.pending : null, f === "processing" ? j.processing : null, n && f === "processing" ? j.processingError : null, !n && f === "succeeded" ? j.succeeded : null, a === "vertical" ? j.vertical : null, e),
1506
1517
  ref: d,
1507
- children: [l === "dot" ? /* @__PURE__ */ w("span", { className: ln(j.statusIndicator, j.statusIndicatorDot) }) : /* @__PURE__ */ w("span", {
1518
+ children: [l === "dot" ? /* @__PURE__ */ T("span", { className: pn(j.statusIndicator, j.statusIndicatorDot) }) : /* @__PURE__ */ T("span", {
1508
1519
  className: j.statusIndicator,
1509
1520
  children: i + 1
1510
- }), /* @__PURE__ */ T("div", {
1521
+ }), /* @__PURE__ */ E("div", {
1511
1522
  className: j.textContainer,
1512
1523
  children: [
1513
- /* @__PURE__ */ T(S, {
1524
+ /* @__PURE__ */ E(C, {
1514
1525
  className: j.title,
1515
1526
  variant: "label-primary-highlight",
1516
- children: [c, /* @__PURE__ */ w("span", { className: j.titleConnectLine })]
1527
+ children: [s, /* @__PURE__ */ T("span", { className: j.titleConnectLine })]
1517
1528
  }),
1518
- p.length > 0 ? /* @__PURE__ */ w(S, {
1529
+ p.length > 0 ? /* @__PURE__ */ T(C, {
1519
1530
  className: j.description,
1520
1531
  variant: "caption",
1521
- children: p.map((e, t) => /* @__PURE__ */ T(o, { children: [t > 0 ? " · " : null, dn(e)] }, `${e.type}-${t}`))
1532
+ children: p.map((e, t) => /* @__PURE__ */ E(c, { children: [t > 0 ? " · " : null, hn(e)] }, `${e.type}-${t}`))
1522
1533
  }) : null,
1523
- m.map((e, t) => /* @__PURE__ */ T(S, {
1524
- style: e.tone === "danger" ? cn : on,
1534
+ m.map((e, t) => /* @__PURE__ */ E(C, {
1535
+ style: e.tone === "danger" ? fn : un,
1525
1536
  variant: "body",
1526
- children: [/* @__PURE__ */ T("span", {
1527
- style: e.tone === "danger" ? void 0 : sn,
1537
+ children: [/* @__PURE__ */ E("span", {
1538
+ style: e.tone === "danger" ? void 0 : dn,
1528
1539
  children: [e.label, ":"]
1529
1540
  }), e.text]
1530
1541
  }, `comment-${t}`))
@@ -1532,44 +1543,44 @@ var un = s(function({ className: e, descriptionParts: t, error: n, forcePending:
1532
1543
  })]
1533
1544
  });
1534
1545
  });
1535
- function dn(e) {
1536
- return e.type === "text" ? e.text : e.email ? /* @__PURE__ */ T(C, { children: [
1546
+ function hn(e) {
1547
+ return e.type === "text" ? e.text : e.email?.trim() ? /* @__PURE__ */ E(w, { children: [
1537
1548
  e.prefix,
1538
1549
  ":",
1539
- /* @__PURE__ */ w(ie, {
1550
+ /* @__PURE__ */ T(S, {
1540
1551
  title: e.email,
1541
- children: ({ ref: t, ...n }) => /* @__PURE__ */ w("span", {
1552
+ children: ({ ref: t, ...n }) => /* @__PURE__ */ T("span", {
1542
1553
  ...n,
1543
1554
  "data-testid": e.memberId ? `member-tooltip-${e.memberId}` : void 0,
1544
1555
  ref: t,
1545
- style: an,
1556
+ style: ln,
1546
1557
  children: e.label
1547
1558
  })
1548
1559
  })
1549
1560
  ] }) : `${e.prefix}:${e.label}`;
1550
1561
  }
1551
- function fn({ activityLogs: e, instanceState: t, memberProfilesById: n, signatureVerification: r, signaturesById: i, taskDecisionsByTaskId: a, tasks: o, workflowSnapshot: s, workflowTokens: c }) {
1552
- let l = Mt(e, o, c, s, t, n, a, i, r), u = ht(l), d = l.map((e) => ({
1562
+ function gn({ activityLogs: e, instanceState: t, memberProfilesById: n, signatureVerification: r, signaturesById: i, taskDecisionsByTaskId: a, tasks: o, workflowSnapshot: s, workflowTokens: c }) {
1563
+ let l = It(e, o, c, s, t, n, a, i, r), u = Y(l), d = l.map((e) => ({
1553
1564
  ...e,
1554
1565
  descriptionParts: e.descriptionParts.filter(J)
1555
1566
  }));
1556
- return /* @__PURE__ */ T("div", {
1557
- style: rn,
1558
- children: [/* @__PURE__ */ w(S, {
1567
+ return /* @__PURE__ */ E("div", {
1568
+ style: cn,
1569
+ children: [/* @__PURE__ */ T(C, {
1559
1570
  component: "h2",
1560
1571
  variant: "h3",
1561
1572
  children: "歷程"
1562
- }), d.length > 0 ? /* @__PURE__ */ w(b, {
1573
+ }), d.length > 0 ? /* @__PURE__ */ T(re, {
1563
1574
  currentStep: u,
1564
1575
  orientation: "vertical",
1565
1576
  type: "dot",
1566
- children: d.map((e) => /* @__PURE__ */ w(un, {
1577
+ children: d.map((e) => /* @__PURE__ */ T(mn, {
1567
1578
  descriptionParts: e.descriptionParts,
1568
1579
  error: e.error,
1569
1580
  forcePending: e.forcePending,
1570
1581
  title: e.title
1571
1582
  }, e.id))
1572
- }) : /* @__PURE__ */ w(S, {
1583
+ }) : /* @__PURE__ */ T(C, {
1573
1584
  color: "text-neutral",
1574
1585
  variant: "body",
1575
1586
  children: "尚無歷程紀錄。"
@@ -1578,30 +1589,30 @@ function fn({ activityLogs: e, instanceState: t, memberProfilesById: n, signatur
1578
1589
  }
1579
1590
  //#endregion
1580
1591
  //#region src/views/instances/detail/sections/InstanceWebhookDeliveriesSection.tsx
1581
- var pn = {
1592
+ var _n = {
1582
1593
  display: "grid",
1583
1594
  gap: 16
1584
- }, mn = {
1595
+ }, vn = {
1585
1596
  display: "grid",
1586
1597
  gap: 2
1587
- }, hn = {
1598
+ }, yn = {
1588
1599
  overflowWrap: "anywhere",
1589
1600
  whiteSpace: "pre-wrap"
1590
1601
  };
1591
- function gn({ deliveries: e, onRetry: t, readNodeLabel: n }) {
1592
- let [r, i] = p(null), [a, o] = p(!1), [s, c] = p(null), l = d(() => e.map((e) => ({
1602
+ function bn({ deliveries: e, onRetry: t, readNodeLabel: n }) {
1603
+ let [r, i] = h(null), [a, o] = h(!1), [s, c] = h(null), l = p(() => e.map((e) => ({
1593
1604
  delivery: e,
1594
1605
  key: e.id
1595
- })), [e]), u = d(() => [
1606
+ })), [e]), u = p(() => [
1596
1607
  {
1597
1608
  key: "endpoint",
1598
- render: ({ delivery: e }) => /* @__PURE__ */ T("div", {
1599
- style: mn,
1600
- children: [/* @__PURE__ */ w(S, {
1609
+ render: ({ delivery: e }) => /* @__PURE__ */ E("div", {
1610
+ style: vn,
1611
+ children: [/* @__PURE__ */ T(C, {
1601
1612
  component: "span",
1602
1613
  variant: "body",
1603
1614
  children: e.endpointLabel ?? e.endpointKey
1604
- }), /* @__PURE__ */ T(S, {
1615
+ }), /* @__PURE__ */ E(C, {
1605
1616
  color: "text-neutral",
1606
1617
  component: "span",
1607
1618
  variant: "caption",
@@ -1620,13 +1631,13 @@ function gn({ deliveries: e, onRetry: t, readNodeLabel: n }) {
1620
1631
  },
1621
1632
  {
1622
1633
  key: "status",
1623
- render: ({ delivery: e }) => /* @__PURE__ */ w(_n, { status: e.status }),
1634
+ render: ({ delivery: e }) => /* @__PURE__ */ T(xn, { status: e.status }),
1624
1635
  title: "狀態",
1625
1636
  width: 120
1626
1637
  },
1627
1638
  {
1628
1639
  key: "attemptCount",
1629
- render: ({ delivery: e }) => /* @__PURE__ */ w(S, {
1640
+ render: ({ delivery: e }) => /* @__PURE__ */ T(C, {
1630
1641
  component: "span",
1631
1642
  variant: "body",
1632
1643
  children: e.attemptCount
@@ -1636,21 +1647,21 @@ function gn({ deliveries: e, onRetry: t, readNodeLabel: n }) {
1636
1647
  },
1637
1648
  {
1638
1649
  key: "lastError",
1639
- render: ({ delivery: e }) => e.lastErrorCode && e.status !== "SENT" ? /* @__PURE__ */ T("div", {
1640
- style: mn,
1641
- children: [/* @__PURE__ */ w(S, {
1650
+ render: ({ delivery: e }) => e.lastErrorCode && e.status !== "SENT" ? /* @__PURE__ */ E("div", {
1651
+ style: vn,
1652
+ children: [/* @__PURE__ */ T(C, {
1642
1653
  color: "text-error",
1643
1654
  component: "span",
1644
1655
  variant: "body",
1645
1656
  children: e.lastErrorCode
1646
- }), e.lastErrorDetail ? /* @__PURE__ */ w(S, {
1657
+ }), e.lastErrorDetail ? /* @__PURE__ */ T(C, {
1647
1658
  color: "text-neutral",
1648
1659
  component: "span",
1649
- style: hn,
1660
+ style: yn,
1650
1661
  variant: "caption",
1651
1662
  children: e.lastErrorDetail
1652
1663
  }) : null]
1653
- }) : /* @__PURE__ */ w(S, {
1664
+ }) : /* @__PURE__ */ T(C, {
1654
1665
  color: "text-neutral",
1655
1666
  component: "span",
1656
1667
  variant: "body",
@@ -1661,15 +1672,15 @@ function gn({ deliveries: e, onRetry: t, readNodeLabel: n }) {
1661
1672
  },
1662
1673
  {
1663
1674
  key: "time",
1664
- render: ({ delivery: e }) => /* @__PURE__ */ w(S, {
1675
+ render: ({ delivery: e }) => /* @__PURE__ */ T(C, {
1665
1676
  component: "span",
1666
1677
  variant: "body",
1667
- children: vn(e)
1678
+ children: Sn(e)
1668
1679
  }),
1669
1680
  title: "時間",
1670
1681
  width: 220
1671
1682
  }
1672
- ], [n]), f = d(() => ({
1683
+ ], [n]), d = p(() => ({
1673
1684
  render: ({ delivery: e }) => e.status === "FAILED" && e.attemptCount > 0 ? [{
1674
1685
  disabled: () => a,
1675
1686
  icon: O,
@@ -1682,7 +1693,7 @@ function gn({ deliveries: e, onRetry: t, readNodeLabel: n }) {
1682
1693
  variant: "base-secondary",
1683
1694
  width: 140
1684
1695
  }), [a]);
1685
- async function m() {
1696
+ async function f() {
1686
1697
  if (r) {
1687
1698
  o(!0), c(null);
1688
1699
  try {
@@ -1694,30 +1705,30 @@ function gn({ deliveries: e, onRetry: t, readNodeLabel: n }) {
1694
1705
  }
1695
1706
  }
1696
1707
  }
1697
- return /* @__PURE__ */ T("div", {
1698
- style: pn,
1708
+ return /* @__PURE__ */ E("div", {
1709
+ style: _n,
1699
1710
  children: [
1700
- /* @__PURE__ */ w(S, {
1711
+ /* @__PURE__ */ T(C, {
1701
1712
  component: "h2",
1702
1713
  variant: "h3",
1703
1714
  children: "外部系統通知"
1704
1715
  }),
1705
- s ? /* @__PURE__ */ w(S, {
1716
+ s ? /* @__PURE__ */ T(C, {
1706
1717
  color: "text-error",
1707
1718
  variant: "body",
1708
1719
  children: s
1709
1720
  }) : null,
1710
- l.length > 0 ? /* @__PURE__ */ w(x, {
1711
- actions: f,
1721
+ l.length > 0 ? /* @__PURE__ */ T(ie, {
1722
+ actions: d,
1712
1723
  columns: u,
1713
1724
  dataSource: l,
1714
1725
  fullWidth: !0
1715
- }) : /* @__PURE__ */ w(S, {
1726
+ }) : /* @__PURE__ */ T(C, {
1716
1727
  color: "text-neutral",
1717
1728
  variant: "body",
1718
1729
  children: "此案件沒有外部系統通知。"
1719
1730
  }),
1720
- /* @__PURE__ */ w(_, {
1731
+ /* @__PURE__ */ T(y, {
1721
1732
  cancelText: "取消",
1722
1733
  confirmText: "重新傳送",
1723
1734
  loading: a,
@@ -1725,13 +1736,13 @@ function gn({ deliveries: e, onRetry: t, readNodeLabel: n }) {
1725
1736
  modalType: "standard",
1726
1737
  onCancel: () => i(null),
1727
1738
  onClose: () => i(null),
1728
- onConfirm: () => void m(),
1739
+ onConfirm: () => void f(),
1729
1740
  open: !!r,
1730
1741
  showModalFooter: !0,
1731
1742
  showModalHeader: !0,
1732
1743
  supportingText: "會以相同的投遞編號重新送出,接收端可據此避免重複處理。",
1733
1744
  title: "重新傳送通知",
1734
- children: /* @__PURE__ */ T(S, {
1745
+ children: /* @__PURE__ */ E(C, {
1735
1746
  variant: "body",
1736
1747
  children: [
1737
1748
  "確定要重新通知「",
@@ -1743,30 +1754,30 @@ function gn({ deliveries: e, onRetry: t, readNodeLabel: n }) {
1743
1754
  ]
1744
1755
  });
1745
1756
  }
1746
- function _n({ status: e }) {
1747
- return e === "SENT" ? /* @__PURE__ */ w(h, {
1757
+ function xn({ status: e }) {
1758
+ return e === "SENT" ? /* @__PURE__ */ T(g, {
1748
1759
  size: "sub",
1749
1760
  text: "已送達",
1750
1761
  variant: "dot-success"
1751
- }) : e === "FAILED" ? /* @__PURE__ */ w(h, {
1762
+ }) : e === "FAILED" ? /* @__PURE__ */ T(g, {
1752
1763
  size: "sub",
1753
1764
  text: "失敗",
1754
1765
  variant: "dot-error"
1755
- }) : /* @__PURE__ */ w(h, {
1766
+ }) : /* @__PURE__ */ T(g, {
1756
1767
  size: "sub",
1757
1768
  text: e === "PENDING" ? "等待傳送" : "傳送中",
1758
1769
  variant: "dot-info"
1759
1770
  });
1760
1771
  }
1761
- function vn(e) {
1772
+ function Sn(e) {
1762
1773
  return e.sentAt ? `送達:${t(e.sentAt)}` : e.status === "PENDING" && e.nextRetryAt ? `下次重試:${t(e.nextRetryAt)}` : e.lastAttemptAt ? `最後嘗試:${t(e.lastAttemptAt)}` : `建立:${t(e.createdAt)}`;
1763
1774
  }
1764
1775
  //#endregion
1765
1776
  //#region src/views/instances/detail/InstanceDetailView.tsx
1766
- var yn = 3e3, bn = 40, xn = 184, Sn = 96, Cn = {
1777
+ var Cn = 3e3, wn = 40, Tn = 184, En = 96, Dn = {
1767
1778
  display: "grid",
1768
1779
  gap: 16
1769
- }, wn = {
1780
+ }, On = {
1770
1781
  background: "#f8fafc",
1771
1782
  border: "1px solid #e2e8f0",
1772
1783
  borderRadius: 8,
@@ -1774,7 +1785,7 @@ var yn = 3e3, bn = 40, xn = 184, Sn = 96, Cn = {
1774
1785
  minHeight: 440,
1775
1786
  overflow: "hidden",
1776
1787
  width: "min(80vw, 1040px)"
1777
- }, Tn = {
1788
+ }, kn = {
1778
1789
  background: "#ffffff",
1779
1790
  border: "1px solid #cbd5e1",
1780
1791
  borderRadius: 8,
@@ -1784,24 +1795,24 @@ var yn = 3e3, bn = 40, xn = 184, Sn = 96, Cn = {
1784
1795
  minHeight: 82,
1785
1796
  padding: 12,
1786
1797
  width: 184
1787
- }, En = {
1798
+ }, An = {
1788
1799
  borderRadius: 999,
1789
1800
  fontSize: 12,
1790
1801
  fontWeight: 600,
1791
1802
  justifySelf: "start",
1792
1803
  lineHeight: "18px",
1793
1804
  padding: "0 8px"
1794
- }, Dn = {
1805
+ }, jn = {
1795
1806
  color: "#64748b",
1796
1807
  fontSize: 12,
1797
1808
  overflow: "hidden",
1798
1809
  textOverflow: "ellipsis",
1799
1810
  whiteSpace: "nowrap"
1800
- }, On = { opacity: 0 }, kn = {
1811
+ }, Mn = { opacity: 0 }, Nn = {
1801
1812
  display: "flex",
1802
1813
  flexWrap: "wrap",
1803
1814
  gap: 8
1804
- }, An = {
1815
+ }, Pn = {
1805
1816
  alignItems: "center",
1806
1817
  background: "#ffffff",
1807
1818
  border: "1px solid #cbd5e1",
@@ -1813,29 +1824,29 @@ var yn = 3e3, bn = 40, xn = 184, Sn = 96, Cn = {
1813
1824
  gap: 6,
1814
1825
  lineHeight: "20px",
1815
1826
  padding: "4px 8px"
1816
- }, jn = {
1827
+ }, Fn = {
1817
1828
  display: "grid",
1818
1829
  gap: 16
1819
- }, Mn = { workflowRuntime: Hn };
1820
- function Nn({ instanceId: a, showAttachments: o = !0, showForm: s = !0, showHistory: u = !0, showSignatures: m = !0, showTasks: h = !0, showWebhookDeliveries: ee = !0 }) {
1821
- let { member: ne } = e(), b = ne?.memberId ?? null, x = ee && r(ne), [ie, ae] = p([]), [E, se] = p(null), [ce, de] = p([]), [_e, ve] = p([]), [ye, Se] = p([]), [D, Ee] = p([]), [Oe, ke] = p(null), [O, Fe] = p([]), [Ie, ze] = p([]), [He, Ue] = p([]), [Ge, A] = p(null), [Ke, j] = p(!0), [M, N] = p(!1), [qe, Je] = p(!1), [P, F] = p(""), [Ye, I] = p(!1), [L, R] = p({}), [Ze, z] = p({}), [B, Qe] = p({}), [V, $e] = p(null), [et, U] = p(null), [tt, rt] = p([]), it = P.trim(), W = f(null), G = f(0), ot = D.some((e) => e.status === "PENDING" || e.status === "DELIVERY_IN_PROGRESS");
1822
- l(() => {
1823
- Z();
1824
- }, [b, a]), l(() => {
1825
- if (!x || !ot || G.current >= bn) return;
1830
+ }, In = { workflowRuntime: Kn };
1831
+ function Ln({ instanceId: i, showAttachments: a = !0, showForm: s = !0, showHistory: c = !0, showSignatures: l = !0, showTasks: f = !0, showWebhookDeliveries: ee = !0 }) {
1832
+ let { member: g } = e(), v = g?.memberId ?? null, x = ee && r(g), [re, ie] = h([]), [S, oe] = h(null), [ce, le] = h([]), [ue, pe] = h([]), [ye, be] = h([]), [xe, we] = h([]), [Oe, ke] = h(null), [D, je] = h([]), [O, Le] = h([]), [Re, Ve] = h([]), [We, A] = h(null), [Ke, qe] = h(!0), [Je, j] = h(!1), [M, Ye] = h(!1), [Xe, N] = h(""), [P, F] = h(!1), [Ze, I] = h({}), [L, $e] = h({}), [tt, nt] = h({}), [R, rt] = h(null), [it, at] = h(null), [ot, st] = h([]), ct = Xe.trim(), V = m(null), ut = m(0), H = xe.some((e) => e.status === "PENDING" || e.status === "DELIVERY_IN_PROGRESS");
1833
+ d(() => {
1834
+ X();
1835
+ }, [v, i]), d(() => {
1836
+ if (!x || !H || ut.current >= wn) return;
1826
1837
  let e = setTimeout(() => {
1827
- G.current += 1, xt();
1828
- }, yn);
1838
+ ut.current += 1, Ct();
1839
+ }, Cn);
1829
1840
  return () => clearTimeout(e);
1830
1841
  }, [
1831
1842
  x,
1832
- ot,
1833
- D
1834
- ]), l(() => {
1835
- z(E?.formData ?? {}), Qe({});
1836
- }, [E]);
1837
- let ct = c((e, t) => {
1838
- Qe((n) => {
1843
+ H,
1844
+ xe
1845
+ ]), d(() => {
1846
+ $e(S?.formData ?? {}), nt({});
1847
+ }, [S]);
1848
+ let U = u((e, t) => {
1849
+ nt((n) => {
1839
1850
  let r = n[e];
1840
1851
  return r?.hasValue === t.hasValue && r.status === t.status ? n : {
1841
1852
  ...n,
@@ -1845,356 +1856,356 @@ function Nn({ instanceId: a, showAttachments: o = !0, showForm: s = !0, showHist
1845
1856
  }
1846
1857
  };
1847
1858
  });
1848
- }, []), lt = d(() => O.find((e) => st(e, b) && (e.status === "PENDING" || e.status === "IN_PROGRESS")) ?? null, [b, O]), K = d(() => lt && E ? E.workflowSnapshot.nodes.find((e) => e.id === lt.nodeId) ?? null : null, [lt, E]), ut = K?.type === "userTask" && K.data.returnBehavior.allowReturn, dt = K?.type === "userTask" && K.data.allowReject !== !1, ft = K?.type === "userTask" && K.data.allowTransfer !== !1, q = K?.type === "userTask" && K.data.allowAddSigner, pt = !(!E || E.initiatorMemberId !== b || E.state !== "RUNNING" && E.state !== "RETURNED"), mt = !!(E && E.initiatorMemberId === b && E.state === "RETURNED"), J = d(() => new Map(He.map((e) => [e.memberId, e])), [He]), ht = d(() => Lt(ce), [ce]), gt = d(() => new Map(ye.map((e) => [e.id, e])), [ye]), Y = d(() => E ? Rn(E.workflowSnapshot) : null, [E]), _t = d(() => E && Y ? Ln(Y, O, Ie, E.state) : [], [
1849
- E,
1859
+ }, []), W = p(() => D.find((e) => ft(e, v) && (e.status === "PENDING" || e.status === "IN_PROGRESS")) ?? null, [v, D]), G = p(() => W && S ? S.workflowSnapshot.nodes.find((e) => e.id === W.nodeId) ?? null : null, [W, S]), pt = G?.type === "userTask" && G.data.returnBehavior.allowReturn, mt = G?.type === "userTask" && G.data.allowReject !== !1, ht = G?.type === "userTask" && G.data.allowTransfer !== !1, gt = G?.type === "userTask" && G.data.allowAddSigner, _t = !(!S || S.initiatorMemberId !== v || S.state !== "RUNNING" && S.state !== "RETURNED"), K = !!(S && S.initiatorMemberId === v && S.state === "RETURNED"), q = p(() => new Map(Re.map((e) => [e.memberId, e])), [Re]), vt = p(() => Vt(ce), [ce]), J = p(() => new Map(ye.map((e) => [e.id, e])), [ye]), Y = p(() => S ? Hn(S.workflowSnapshot) : null, [S]), yt = p(() => S && Y ? Vn(Y, D, O, S.state) : [], [
1860
+ S,
1850
1861
  Y,
1851
- O,
1852
- Ie
1853
- ]), vt = d(() => Y ? zn(Y) : [], [Y]), X = d(() => E ? Fn(E.workflowSnapshot) : [], [E]);
1854
- async function Z() {
1855
- j(!0), A(null);
1862
+ D,
1863
+ O
1864
+ ]), bt = p(() => Y ? Un(Y) : [], [Y]), xt = p(() => S ? zn(S.workflowSnapshot) : [], [S]);
1865
+ async function X() {
1866
+ qe(!0), A(null);
1856
1867
  try {
1857
- let e = await pe(a);
1858
- ae(e.activityLogs), se(e.instance), Fe(e.tasks), ze(e.workflowTokens);
1859
- let t = await le(e.instance.id), [n, r, i, o, s] = await Promise.all([
1860
- It(e.tasks),
1861
- Pt({
1868
+ let e = await he(i);
1869
+ ie(e.activityLogs), oe(e.instance), je(e.tasks), Le(e.workflowTokens);
1870
+ let t = await de(e.instance.id), [n, r, a, o, s] = await Promise.all([
1871
+ Bt(e.tasks),
1872
+ Rt({
1862
1873
  ...e,
1863
1874
  adhocDirectives: t
1864
1875
  }),
1865
- ue(e.instance.id),
1866
- ge(e.instance.id),
1867
- yt(e.instance.id)
1876
+ fe(e.instance.id),
1877
+ ve(e.instance.id),
1878
+ Z(e.instance.id)
1868
1879
  ]);
1869
- de(n), Ue(r), ve(i), Se(o.signatures), ke(o.verification), rt(t), Ee(s);
1880
+ le(n), Ve(r), pe(a), be(o.signatures), ke(o.verification), st(t), we(s);
1870
1881
  } catch (e) {
1871
- A(H(e));
1882
+ A(B(e));
1872
1883
  } finally {
1873
- j(!1);
1884
+ qe(!1);
1874
1885
  }
1875
1886
  }
1876
- async function yt(e) {
1877
- return x ? fe(e).catch(() => []) : [];
1887
+ async function Z(e) {
1888
+ return x ? me(e).catch(() => []) : [];
1878
1889
  }
1879
- async function bt(e) {
1880
- await xe(e.id), G.current = 0, await Z();
1890
+ async function St(e) {
1891
+ await Ce(e.id), ut.current = 0, await X();
1881
1892
  }
1882
- async function xt() {
1883
- let e = await yt(a);
1884
- if (!e.some((e) => e.status === "PENDING" || e.status === "DELIVERY_IN_PROGRESS")) {
1885
- await Z();
1886
- return;
1887
- }
1888
- Ee(e);
1893
+ async function Ct() {
1894
+ let e = await Z(i);
1895
+ e.some((e) => e.status === "PENDING" || e.status === "DELIVERY_IN_PROGRESS") ? we(e) : await X();
1889
1896
  }
1890
- async function St(e, t) {
1891
- if (!b) throw Error("尚未登入,無法上傳附件");
1892
- return { id: (await Ce({
1897
+ async function Q(e, t) {
1898
+ if (!v) throw Error("尚未登入,無法上傳附件");
1899
+ return { id: (await Te({
1893
1900
  file: t,
1894
1901
  formFieldPath: `form.${e.fieldKey}`
1895
1902
  })).id };
1896
1903
  }
1897
- async function Q(e) {
1898
- if (!b) return;
1899
- let t = await me({ id: e.id });
1904
+ async function wt(e) {
1905
+ if (!v) return;
1906
+ let t = await ge({ id: e.id });
1900
1907
  window.open(t, "_blank", "noopener,noreferrer");
1901
1908
  }
1902
- async function Ct(e) {
1903
- if (!b) return;
1904
- let t = await he({ id: e.id });
1905
- $e(e), U(t);
1909
+ async function Tt(e) {
1910
+ if (!v) return;
1911
+ let t = await _e({ id: e.id });
1912
+ rt(e), at(t);
1906
1913
  }
1907
- async function wt() {
1908
- if (b && E && pt) {
1909
- N(!0), A(null), R({});
1914
+ async function Et() {
1915
+ if (v && S && _t) {
1916
+ j(!0), A(null), I({});
1910
1917
  try {
1911
- await oe({
1912
- cancelledByMemberId: b,
1913
- comment: it || null,
1914
- instanceId: E.id
1915
- }), F(""), I(!1), await Z();
1918
+ await se({
1919
+ cancelledByMemberId: v,
1920
+ comment: ct || null,
1921
+ instanceId: S.id
1922
+ }), N(""), F(!1), await X();
1916
1923
  } catch (e) {
1917
- A(H(e));
1924
+ A(B(e));
1918
1925
  } finally {
1919
- N(!1);
1926
+ j(!1);
1920
1927
  }
1921
1928
  }
1922
1929
  }
1923
- async function Tt() {
1924
- if (!b || !E || !mt) return;
1925
- N(!0), A(null), R({});
1926
- let e = i(Object.values(B));
1930
+ async function Dt() {
1931
+ if (!v || !S || !K) return;
1932
+ j(!0), A(null), I({});
1933
+ let e = o(Object.values(tt));
1927
1934
  if (e) {
1928
- A(e), N(!1);
1935
+ A(e), j(!1);
1929
1936
  return;
1930
1937
  }
1931
- let t = E.formDefinitionSnapshot.schema ? Le(E.formDefinitionSnapshot.schema.fields, Ze) : Ze;
1932
- if (E.formDefinitionSnapshot.schema && E.formDefinitionSnapshot.uiSchema) {
1933
- let e = Be({
1934
- schema: E.formDefinitionSnapshot.schema,
1935
- uiSchema: E.formDefinitionSnapshot.uiSchema,
1938
+ let t = S.formDefinitionSnapshot.schema ? ze(S.formDefinitionSnapshot.schema.fields, L) : L;
1939
+ if (S.formDefinitionSnapshot.schema && S.formDefinitionSnapshot.uiSchema) {
1940
+ let e = k({
1941
+ schema: S.formDefinitionSnapshot.schema,
1942
+ uiSchema: S.formDefinitionSnapshot.uiSchema,
1936
1943
  values: t
1937
1944
  });
1938
1945
  if (!e.valid) {
1939
- R(e.errors), A("請先補齊必填欄位。"), e.firstInvalidFieldKey && Re(e.firstInvalidFieldKey), N(!1);
1946
+ I(e.errors), A("請先補齊必填欄位。"), e.firstInvalidFieldKey && Be(e.firstInvalidFieldKey), j(!1);
1940
1947
  return;
1941
1948
  }
1942
1949
  }
1943
1950
  try {
1944
- await be({
1951
+ await Se({
1945
1952
  formData: t,
1946
- initiatorMemberId: b,
1947
- instanceId: E.id,
1948
- title: E.title
1949
- }), await Z();
1953
+ initiatorMemberId: v,
1954
+ instanceId: S.id,
1955
+ title: S.title
1956
+ }), await X();
1950
1957
  } catch (e) {
1951
- A(H(e));
1958
+ A(B(e));
1952
1959
  } finally {
1953
- N(!1);
1960
+ j(!1);
1954
1961
  }
1955
1962
  }
1956
- let Et = W.current?.deciding ?? !1, $ = M || Et;
1957
- return /* @__PURE__ */ T(C, { children: [
1958
- /* @__PURE__ */ w(v, { children: /* @__PURE__ */ T(we, {
1959
- description: E ? `${nt(E.state)} · ${t(E.startedAt)}` : "載入案件內容。",
1960
- title: E?.title ?? "簽核案件",
1963
+ let Ot = V.current?.deciding ?? !1, $ = Je || Ot;
1964
+ return /* @__PURE__ */ E(w, { children: [
1965
+ /* @__PURE__ */ T(te, { children: /* @__PURE__ */ E(Ee, {
1966
+ description: S ? [
1967
+ lt(S.state),
1968
+ t(S.startedAt),
1969
+ et(S, q)
1970
+ ].filter(z).join(" · ") : "載入案件內容。",
1971
+ title: S?.title ?? "簽核案件",
1961
1972
  children: [
1962
- E ? /* @__PURE__ */ w(g, {
1973
+ S ? /* @__PURE__ */ T(_, {
1963
1974
  "aria-label": "查看流程圖",
1964
- icon: Ne,
1975
+ icon: Fe,
1965
1976
  iconType: "icon-only",
1966
- onClick: () => Je(!0),
1977
+ onClick: () => Ye(!0),
1967
1978
  title: "查看流程圖",
1968
1979
  variant: "base-secondary",
1969
1980
  children: "流程圖"
1970
1981
  }) : null,
1971
- pt ? /* @__PURE__ */ w(g, {
1982
+ _t ? /* @__PURE__ */ T(_, {
1972
1983
  disabled: $,
1973
- icon: De,
1984
+ icon: Ae,
1974
1985
  iconType: "leading",
1975
- onClick: () => I(!0),
1986
+ onClick: () => F(!0),
1976
1987
  variant: "destructive-secondary",
1977
1988
  children: "取消案件"
1978
1989
  }) : null,
1979
- lt ? /* @__PURE__ */ T(C, { children: [
1980
- q ? /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(g, {
1990
+ W ? /* @__PURE__ */ E(w, { children: [
1991
+ gt ? /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T(_, {
1981
1992
  disabled: $,
1982
- icon: je,
1993
+ icon: Ne,
1983
1994
  iconType: "leading",
1984
- onClick: () => W.current?.openAdhocModal("COUNTERSIGN"),
1995
+ onClick: () => V.current?.openAdhocModal("COUNTERSIGN"),
1985
1996
  variant: "base-secondary",
1986
1997
  children: "會簽"
1987
- }, "adhoc-countersign"), /* @__PURE__ */ w(g, {
1998
+ }, "adhoc-countersign"), /* @__PURE__ */ T(_, {
1988
1999
  disabled: $,
1989
- icon: je,
2000
+ icon: Ne,
1990
2001
  iconType: "leading",
1991
- onClick: () => W.current?.openAdhocModal("PRE_APPROVAL"),
2002
+ onClick: () => V.current?.openAdhocModal("PRE_APPROVAL"),
1992
2003
  variant: "base-secondary",
1993
2004
  children: "加簽"
1994
2005
  }, "adhoc-pre-approval")] }) : null,
1995
- /* @__PURE__ */ w(g, {
2006
+ /* @__PURE__ */ T(_, {
1996
2007
  disabled: $,
1997
- icon: Ae,
2008
+ icon: Me,
1998
2009
  iconType: "leading",
1999
- onClick: () => W.current?.openAdhocModal("STAGE_NOTIFY"),
2010
+ onClick: () => V.current?.openAdhocModal("STAGE_NOTIFY"),
2000
2011
  variant: "base-secondary",
2001
2012
  children: "通知設定"
2002
2013
  }, "adhoc-notify"),
2003
- ut ? /* @__PURE__ */ w(g, {
2014
+ pt ? /* @__PURE__ */ T(_, {
2004
2015
  disabled: $,
2005
- icon: Me,
2016
+ icon: Pe,
2006
2017
  iconType: "leading",
2007
- onClick: () => W.current?.openReturnModal(),
2018
+ onClick: () => V.current?.openReturnModal(),
2008
2019
  variant: "base-secondary",
2009
2020
  children: "退回"
2010
2021
  }, "task-return") : null,
2011
- ft ? /* @__PURE__ */ w(g, {
2022
+ ht ? /* @__PURE__ */ T(_, {
2012
2023
  disabled: $,
2013
- icon: Pe,
2024
+ icon: Ie,
2014
2025
  iconType: "leading",
2015
- onClick: () => W.current?.openTransferModal(),
2026
+ onClick: () => V.current?.openTransferModal(),
2016
2027
  variant: "base-secondary",
2017
2028
  children: "轉派"
2018
2029
  }, "task-transfer") : null,
2019
- dt ? /* @__PURE__ */ w(g, {
2030
+ mt ? /* @__PURE__ */ T(_, {
2020
2031
  disabled: $,
2021
- icon: De,
2032
+ icon: Ae,
2022
2033
  iconType: "leading",
2023
- onClick: () => W.current?.openRejectModal(),
2034
+ onClick: () => V.current?.openRejectModal(),
2024
2035
  variant: "destructive-secondary",
2025
2036
  children: "拒絕"
2026
2037
  }, "task-reject") : null,
2027
- /* @__PURE__ */ w(g, {
2038
+ /* @__PURE__ */ T(_, {
2028
2039
  disabled: $,
2029
- icon: Te,
2040
+ icon: De,
2030
2041
  iconType: "leading",
2031
- onClick: () => W.current?.handleApprove(),
2042
+ onClick: () => V.current?.handleApprove(),
2032
2043
  variant: "base-primary",
2033
2044
  children: "同意"
2034
2045
  }, "task-approve")
2035
2046
  ] }) : null
2036
2047
  ]
2037
2048
  }) }),
2038
- /* @__PURE__ */ T(te, { children: [
2039
- s ? /* @__PURE__ */ w(y, { children: /* @__PURE__ */ w(Bt, {
2040
- canResubmitInstance: mt,
2041
- deciding: M,
2042
- error: Ge,
2043
- instance: E,
2049
+ /* @__PURE__ */ E(ne, { children: [
2050
+ s ? /* @__PURE__ */ T(b, { children: /* @__PURE__ */ T(Wt, {
2051
+ canResubmitInstance: K,
2052
+ deciding: Je,
2053
+ error: We,
2054
+ instance: S,
2044
2055
  loading: Ke,
2045
- onDataSourceStateChange: ct,
2056
+ onDataSourceStateChange: U,
2046
2057
  onResubmitFormChange: (e) => {
2047
- z(e), R({});
2058
+ $e(e), I({});
2048
2059
  },
2049
- onResubmitInstance: () => void Tt(),
2050
- onUploadAttachment: St,
2051
- resubmitFormData: Ze,
2052
- resubmitFormErrors: L
2060
+ onResubmitInstance: () => void Dt(),
2061
+ onUploadAttachment: Q,
2062
+ resubmitFormData: L,
2063
+ resubmitFormErrors: Ze
2053
2064
  }) }) : null,
2054
- o ? /* @__PURE__ */ w(y, { children: /* @__PURE__ */ w(Ht, {
2055
- attachments: _e,
2065
+ a ? /* @__PURE__ */ T(b, { children: /* @__PURE__ */ T(Kt, {
2066
+ attachments: ue,
2056
2067
  onDownload: (e) => {
2057
- Q(e);
2068
+ wt(e);
2058
2069
  },
2059
2070
  onPreview: (e) => {
2060
- Ct(e);
2071
+ Tt(e);
2061
2072
  }
2062
2073
  }) }) : null,
2063
- h ? /* @__PURE__ */ w(y, { children: /* @__PURE__ */ w($t, {
2064
- adhocDirectives: tt,
2065
- currentMemberId: b,
2066
- instance: E,
2067
- memberProfilesById: J,
2068
- onChanged: Z,
2069
- ref: W,
2070
- tasks: O
2074
+ f ? /* @__PURE__ */ T(b, { children: /* @__PURE__ */ T(rn, {
2075
+ adhocDirectives: ot,
2076
+ currentMemberId: v,
2077
+ instance: S,
2078
+ memberProfilesById: q,
2079
+ onChanged: X,
2080
+ ref: V,
2081
+ tasks: D
2071
2082
  }) }) : null,
2072
- m ? /* @__PURE__ */ w(y, { children: /* @__PURE__ */ w(nn, {
2083
+ l ? /* @__PURE__ */ T(b, { children: /* @__PURE__ */ T(sn, {
2073
2084
  signatureVerification: Oe,
2074
2085
  signatures: ye
2075
2086
  }) }) : null,
2076
- x && D.length > 0 ? /* @__PURE__ */ w(y, { children: /* @__PURE__ */ w(gn, {
2077
- deliveries: D,
2078
- onRetry: bt,
2079
- readNodeLabel: (e) => at(e, E?.workflowSnapshot ?? null)
2087
+ x && xe.length > 0 ? /* @__PURE__ */ T(b, { children: /* @__PURE__ */ T(bn, {
2088
+ deliveries: xe,
2089
+ onRetry: St,
2090
+ readNodeLabel: (e) => dt(e, S?.workflowSnapshot ?? null)
2080
2091
  }) }) : null,
2081
- u ? /* @__PURE__ */ w(y, { children: /* @__PURE__ */ w(fn, {
2082
- activityLogs: ie,
2083
- instanceState: E?.state ?? "RUNNING",
2084
- memberProfilesById: J,
2092
+ c ? /* @__PURE__ */ T(b, { children: /* @__PURE__ */ T(gn, {
2093
+ activityLogs: re,
2094
+ instanceState: S?.state ?? "RUNNING",
2095
+ memberProfilesById: q,
2085
2096
  signatureVerification: Oe,
2086
- signaturesById: gt,
2087
- taskDecisionsByTaskId: ht,
2088
- tasks: O,
2089
- workflowSnapshot: E?.workflowSnapshot ?? null,
2090
- workflowTokens: Ie
2097
+ signaturesById: J,
2098
+ taskDecisionsByTaskId: vt,
2099
+ tasks: D,
2100
+ workflowSnapshot: S?.workflowSnapshot ?? null,
2101
+ workflowTokens: O
2091
2102
  }) }) : null
2092
2103
  ] }),
2093
- E ? /* @__PURE__ */ w(_, {
2104
+ S ? /* @__PURE__ */ T(y, {
2094
2105
  modalType: "standard",
2095
- onClose: () => Je(!1),
2096
- open: qe,
2106
+ onClose: () => Ye(!1),
2107
+ open: M,
2097
2108
  showModalHeader: !0,
2098
2109
  size: "wide",
2099
- supportingText: `${nt(E.state)} · ${t(E.startedAt)}`,
2110
+ supportingText: `${lt(S.state)} · ${t(S.startedAt)}`,
2100
2111
  title: "流程圖",
2101
- children: /* @__PURE__ */ T("div", {
2102
- style: Cn,
2103
- children: [/* @__PURE__ */ w("div", {
2104
- style: wn,
2105
- children: /* @__PURE__ */ T(We, {
2106
- edges: vt,
2112
+ children: /* @__PURE__ */ E("div", {
2113
+ style: Dn,
2114
+ children: [/* @__PURE__ */ T("div", {
2115
+ style: On,
2116
+ children: /* @__PURE__ */ E(Ge, {
2117
+ edges: bt,
2107
2118
  fitView: !0,
2108
2119
  fitViewOptions: { padding: .18 },
2109
2120
  maxZoom: 1.2,
2110
2121
  minZoom: .2,
2111
- nodes: _t,
2122
+ nodes: yt,
2112
2123
  nodesDraggable: !1,
2113
2124
  nodesFocusable: !1,
2114
- nodeTypes: Mn,
2125
+ nodeTypes: In,
2115
2126
  panOnDrag: !0,
2116
2127
  proOptions: { hideAttribution: !0 },
2117
- children: [/* @__PURE__ */ w(k, {}), /* @__PURE__ */ w(Ve, { showInteractive: !1 })]
2128
+ children: [/* @__PURE__ */ T(He, {}), /* @__PURE__ */ T(Ue, { showInteractive: !1 })]
2118
2129
  })
2119
- }), X.length > 0 ? /* @__PURE__ */ w("div", {
2120
- style: kn,
2121
- children: X.map((e) => /* @__PURE__ */ w("span", {
2122
- style: An,
2130
+ }), xt.length > 0 ? /* @__PURE__ */ T("div", {
2131
+ style: Nn,
2132
+ children: xt.map((e) => /* @__PURE__ */ T("span", {
2133
+ style: Pn,
2123
2134
  children: e
2124
2135
  }, e))
2125
2136
  }) : null]
2126
2137
  })
2127
2138
  }) : null,
2128
- /* @__PURE__ */ w(_, {
2139
+ /* @__PURE__ */ T(y, {
2129
2140
  modalType: "standard",
2130
2141
  onClose: () => {
2131
- $e(null), U(null);
2142
+ rt(null), at(null);
2132
2143
  },
2133
- open: !!(V && et),
2144
+ open: !!(R && it),
2134
2145
  showModalHeader: !0,
2135
2146
  size: "wide",
2136
- supportingText: V?.filename ?? void 0,
2147
+ supportingText: R?.filename ?? void 0,
2137
2148
  title: "PDF 預覽",
2138
- children: et ? /* @__PURE__ */ w(Xe, {
2139
- filename: V?.filename ?? "PDF 預覽",
2140
- fileUrl: et,
2141
- onDownload: V ? () => void Q(V) : void 0
2149
+ children: it ? /* @__PURE__ */ T(Qe, {
2150
+ filename: R?.filename ?? "PDF 預覽",
2151
+ fileUrl: it,
2152
+ onDownload: R ? () => void wt(R) : void 0
2142
2153
  }) : null
2143
2154
  }),
2144
- /* @__PURE__ */ w(_, {
2155
+ /* @__PURE__ */ T(y, {
2145
2156
  cancelText: "保留案件",
2146
2157
  confirmButtonProps: { variant: "destructive-primary" },
2147
2158
  confirmText: "確認取消",
2148
- loading: M,
2159
+ loading: Je,
2149
2160
  modalStatusType: "error",
2150
2161
  modalType: "standard",
2151
- onCancel: () => I(!1),
2152
- onClose: () => I(!1),
2153
- onConfirm: () => void wt(),
2154
- open: Ye,
2162
+ onCancel: () => F(!1),
2163
+ onClose: () => F(!1),
2164
+ onConfirm: () => void Et(),
2165
+ open: P,
2155
2166
  showModalFooter: !0,
2156
2167
  showModalHeader: !0,
2157
2168
  supportingText: "取消後會關閉目前待簽任務與候選簽核人。",
2158
2169
  title: "取消案件",
2159
- children: /* @__PURE__ */ T("div", {
2160
- style: jn,
2161
- children: [/* @__PURE__ */ T(S, {
2170
+ children: /* @__PURE__ */ E("div", {
2171
+ style: Fn,
2172
+ children: [/* @__PURE__ */ E(C, {
2162
2173
  variant: "body",
2163
2174
  children: [
2164
2175
  "確定要取消「",
2165
- E?.title ?? "",
2176
+ S?.title ?? "",
2166
2177
  "」嗎?"
2167
2178
  ]
2168
- }), /* @__PURE__ */ w(n, {
2179
+ }), /* @__PURE__ */ T(n, {
2169
2180
  label: "取消原因",
2170
2181
  name: "cancelComment",
2171
- children: /* @__PURE__ */ w(re, {
2172
- onChange: (e) => F(e.target.value),
2182
+ children: /* @__PURE__ */ T(ae, {
2183
+ onChange: (e) => N(e.target.value),
2173
2184
  placeholder: "可填寫取消原因",
2174
2185
  resize: "vertical",
2175
2186
  rows: 3,
2176
- value: P
2187
+ value: Xe
2177
2188
  })
2178
2189
  })]
2179
2190
  })
2180
2191
  })
2181
2192
  ] });
2182
2193
  }
2183
- function Pn(e) {
2194
+ function Rn(e) {
2184
2195
  return e.data.label ? e.data.label : e.data.isDefault ? "其他情況" : e.data.condition ?? "";
2185
2196
  }
2186
- function Fn(e) {
2187
- return e.edges.map(Pn).filter((e) => e.trim().length > 0);
2197
+ function zn(e) {
2198
+ return e.edges.map(Rn).filter((e) => e.trim().length > 0);
2188
2199
  }
2189
- function In(e) {
2200
+ function Bn(e) {
2190
2201
  return e === "startEvent" ? "開始" : e === "endEvent" ? "完成" : e === "userTask" ? "簽核節點" : e === "serviceTask" ? "知會節點" : e === "exclusiveGateway" ? "條件分流" : "平行處理";
2191
2202
  }
2192
- function Ln(e, t, n, r) {
2203
+ function Vn(e, t, n, r) {
2193
2204
  return e.nodes.map((e) => {
2194
- let i = Nt(e, t, n, r);
2205
+ let i = Lt(e, t, n, r);
2195
2206
  return {
2196
2207
  data: {
2197
- kindLabel: In(e.type),
2208
+ kindLabel: Bn(e.type),
2198
2209
  label: e.data.label,
2199
2210
  secondaryLabel: i.secondaryLabel,
2200
2211
  statusLabel: i.statusLabel,
@@ -2202,42 +2213,42 @@ function Ln(e, t, n, r) {
2202
2213
  },
2203
2214
  id: e.id,
2204
2215
  position: e.position,
2205
- sourcePosition: Ue.Right,
2206
- targetPosition: Ue.Left,
2216
+ sourcePosition: A.Right,
2217
+ targetPosition: A.Left,
2207
2218
  type: "workflowRuntime"
2208
2219
  };
2209
2220
  });
2210
2221
  }
2211
- function Rn(e) {
2212
- let t = new Ge.graphlib.Graph();
2222
+ function Hn(e) {
2223
+ let t = new Ke.graphlib.Graph();
2213
2224
  return t.setDefaultEdgeLabel(() => ({})), t.setGraph({
2214
2225
  nodesep: 56,
2215
2226
  rankdir: "LR",
2216
2227
  ranksep: 120
2217
2228
  }), e.nodes.forEach((e) => {
2218
2229
  t.setNode(e.id, {
2219
- height: Sn,
2220
- width: xn
2230
+ height: En,
2231
+ width: Tn
2221
2232
  });
2222
2233
  }), e.edges.forEach((e) => {
2223
2234
  t.setEdge(e.source, e.target);
2224
- }), Ge.layout(t), {
2235
+ }), Ke.layout(t), {
2225
2236
  ...e,
2226
2237
  nodes: e.nodes.map((e) => {
2227
2238
  let n = t.node(e.id);
2228
2239
  return n ? {
2229
2240
  ...e,
2230
2241
  position: {
2231
- x: n.x - xn / 2,
2232
- y: n.y - Sn / 2
2242
+ x: n.x - Tn / 2,
2243
+ y: n.y - En / 2
2233
2244
  }
2234
2245
  } : e;
2235
2246
  })
2236
2247
  };
2237
2248
  }
2238
- function zn(e) {
2249
+ function Un(e) {
2239
2250
  return e.edges.map((e) => {
2240
- let t = Pn(e);
2251
+ let t = Rn(e);
2241
2252
  return {
2242
2253
  animated: !1,
2243
2254
  id: e.id,
@@ -2265,25 +2276,25 @@ function zn(e) {
2265
2276
  };
2266
2277
  });
2267
2278
  }
2268
- function Bn(e) {
2279
+ function Wn(e) {
2269
2280
  return e === "current" ? {
2270
- ...Tn,
2281
+ ...kn,
2271
2282
  border: "1px solid var(--mzn-color-primary, #0057ff)",
2272
2283
  boxShadow: "0 0 0 3px rgba(0, 87, 255, 0.14)"
2273
2284
  } : e === "completed" ? {
2274
- ...Tn,
2285
+ ...kn,
2275
2286
  border: "1px solid #16a34a"
2276
2287
  } : e === "cancelled" ? {
2277
- ...Tn,
2288
+ ...kn,
2278
2289
  border: "1px solid #dc2626",
2279
2290
  opacity: .72
2280
2291
  } : e === "waiting" ? {
2281
- ...Tn,
2292
+ ...kn,
2282
2293
  border: "1px dashed #64748b"
2283
- } : Tn;
2294
+ } : kn;
2284
2295
  }
2285
- function Vn(e) {
2286
- let t = En;
2296
+ function Gn(e) {
2297
+ let t = An;
2287
2298
  return e === "current" ? {
2288
2299
  ...t,
2289
2300
  background: "#eff6ff",
@@ -2306,42 +2317,42 @@ function Vn(e) {
2306
2317
  color: "#64748b"
2307
2318
  };
2308
2319
  }
2309
- function Hn({ data: e }) {
2310
- return /* @__PURE__ */ T("div", {
2311
- style: Bn(e.tone),
2320
+ function Kn({ data: e }) {
2321
+ return /* @__PURE__ */ E("div", {
2322
+ style: Wn(e.tone),
2312
2323
  children: [
2313
- /* @__PURE__ */ w(He, {
2324
+ /* @__PURE__ */ T(We, {
2314
2325
  isConnectable: !1,
2315
- position: Ue.Left,
2316
- style: On,
2326
+ position: A.Left,
2327
+ style: Mn,
2317
2328
  type: "target"
2318
2329
  }),
2319
- /* @__PURE__ */ w(S, {
2330
+ /* @__PURE__ */ T(C, {
2320
2331
  component: "span",
2321
2332
  ellipsis: !0,
2322
2333
  title: e.label,
2323
2334
  variant: "label-primary",
2324
2335
  children: e.label
2325
2336
  }),
2326
- /* @__PURE__ */ w("span", {
2327
- style: Vn(e.tone),
2337
+ /* @__PURE__ */ T("span", {
2338
+ style: Gn(e.tone),
2328
2339
  children: e.statusLabel
2329
2340
  }),
2330
- /* @__PURE__ */ w("span", {
2341
+ /* @__PURE__ */ T("span", {
2331
2342
  title: e.secondaryLabel,
2332
- style: Dn,
2343
+ style: jn,
2333
2344
  children: e.secondaryLabel || e.kindLabel
2334
2345
  }),
2335
- /* @__PURE__ */ w(He, {
2346
+ /* @__PURE__ */ T(We, {
2336
2347
  isConnectable: !1,
2337
- position: Ue.Right,
2338
- style: On,
2348
+ position: A.Right,
2349
+ style: Mn,
2339
2350
  type: "source"
2340
2351
  })
2341
2352
  ]
2342
2353
  });
2343
2354
  }
2344
2355
  //#endregion
2345
- export { $t as a, nn as i, gn as n, Ht as o, fn as r, Bt as s, Nn as t };
2356
+ export { rn as a, sn as i, bn as n, Kt as o, gn as r, Wt as s, Ln as t };
2346
2357
 
2347
- //# sourceMappingURL=detail-C8NOqY0p.js.map
2358
+ //# sourceMappingURL=detail-C6NdVijG.js.map