@m3ui-vue/m3ui-vue 1.10.2 → 1.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (292) hide show
  1. package/README.md +19 -4
  2. package/dist/API.md +195 -56
  3. package/dist/MButton-gWoOzFWf.js +284 -0
  4. package/dist/MButton-gWoOzFWf.js.map +1 -0
  5. package/dist/MColorPickerModal-CJYMvlgK.js +466 -0
  6. package/dist/MColorPickerModal-CJYMvlgK.js.map +1 -0
  7. package/dist/MDialog-CU8EYgCC.js +226 -0
  8. package/dist/MDialog-CU8EYgCC.js.map +1 -0
  9. package/dist/{MIcon-BSsJZhK7.js → MIcon-CkUc9kuQ.js} +10 -4
  10. package/dist/MIcon-CkUc9kuQ.js.map +1 -0
  11. package/dist/MIconButton-DTFOfsTy.js +317 -0
  12. package/dist/MIconButton-DTFOfsTy.js.map +1 -0
  13. package/dist/MListItem-Cdw2FqCT.js +1306 -0
  14. package/dist/MListItem-Cdw2FqCT.js.map +1 -0
  15. package/dist/MLoadingIndicator-BxAy2x7P.js +115 -0
  16. package/dist/MLoadingIndicator-BxAy2x7P.js.map +1 -0
  17. package/dist/{MMenuItem-US0Zbglq.js → MMenuItem-CEIKYvaX.js} +216 -214
  18. package/dist/MMenuItem-CEIKYvaX.js.map +1 -0
  19. package/dist/{MPdfViewer-DL9mRsd2.js → MPdfViewer-CEfyXGq2.js} +674 -671
  20. package/dist/MPdfViewer-CEfyXGq2.js.map +1 -0
  21. package/dist/MProgressBar-BzZMxq7M.js.map +1 -1
  22. package/dist/MSeekBar-B3_D-PwH.js +435 -0
  23. package/dist/MSeekBar-B3_D-PwH.js.map +1 -0
  24. package/dist/{MSegmentedButton-DMou-8sG.js → MSegmentedButton-Dg07j-4r.js} +4 -4
  25. package/dist/{MSegmentedButton-DMou-8sG.js.map → MSegmentedButton-Dg07j-4r.js.map} +1 -1
  26. package/dist/{MSignaturePad-WuvE_Cyl.js → MSignaturePad-3nddtLKI.js} +2 -2
  27. package/dist/{MSignaturePad-WuvE_Cyl.js.map → MSignaturePad-3nddtLKI.js.map} +1 -1
  28. package/dist/{MSlider-7TzhFHKS.js → MSlider-BrpLbqwt.js} +4 -4
  29. package/dist/{MSlider-7TzhFHKS.js.map → MSlider-BrpLbqwt.js.map} +1 -1
  30. package/dist/{MSpinner-CkIVBuGE.js → MSpinner-CLwzDH33.js} +2 -2
  31. package/dist/{MSpinner-CkIVBuGE.js.map → MSpinner-CLwzDH33.js.map} +1 -1
  32. package/dist/{MTextField-B6_iOczK.js → MTextField-CZRizAwA.js} +136 -134
  33. package/dist/MTextField-CZRizAwA.js.map +1 -0
  34. package/dist/{_useFieldValidation-COBJ1tWr.js → _useFieldValidation-DVcqyy9g.js} +2 -2
  35. package/dist/{_useFieldValidation-COBJ1tWr.js.map → _useFieldValidation-DVcqyy9g.js.map} +1 -1
  36. package/dist/api.json +1 -1
  37. package/dist/chart.js +1 -1
  38. package/dist/code-editor.js +3 -3
  39. package/dist/code-editor.js.map +1 -1
  40. package/dist/components/MAlert.vue.d.ts +1 -1
  41. package/dist/components/MAudioPlayer.vue.d.ts +3 -3
  42. package/dist/components/MAvatar.vue.d.ts +19 -1
  43. package/dist/components/MButton.vue.d.ts +2 -1
  44. package/dist/components/MChatBubble.vue.d.ts +2 -0
  45. package/dist/components/MCheckbox.vue.d.ts +2 -0
  46. package/dist/components/MDataTable.vue.d.ts +31 -3
  47. package/dist/components/MFlow.vue.d.ts +1 -1
  48. package/dist/components/MHotkeys.vue.d.ts +1 -0
  49. package/dist/components/MIcon.vue.d.ts +6 -0
  50. package/dist/components/MIconButton.vue.d.ts +5 -0
  51. package/dist/components/MKanban.vue.d.ts +1 -1
  52. package/dist/components/MLink.vue.d.ts +59 -0
  53. package/dist/components/MListItem.vue.d.ts +3 -1
  54. package/dist/components/MMapControl.vue.d.ts +1 -1
  55. package/dist/components/MNotificationCenter.vue.d.ts +1 -1
  56. package/dist/components/MNumberField.vue.d.ts +1 -1
  57. package/dist/components/MPagination.vue.d.ts +14 -1
  58. package/dist/components/MPdfSigner.vue.d.ts +2 -2
  59. package/dist/components/MRadio.vue.d.ts +2 -0
  60. package/dist/components/MRadioGroup.vue.d.ts +2 -0
  61. package/dist/components/MStatCard.vue.d.ts +2 -2
  62. package/dist/components/MSwitch.vue.d.ts +2 -0
  63. package/dist/components/MText.vue.d.ts +4 -2
  64. package/dist/components/MTextField.vue.d.ts +2 -0
  65. package/dist/components/_MDrawerItemList.vue.d.ts +6 -0
  66. package/dist/composables/_menuGroups.d.ts +10 -1
  67. package/dist/composables/_splitAttrs.d.ts +6 -0
  68. package/dist/composables/_springAnimation.d.ts +2 -2
  69. package/dist/composables/_useFocusTrap.d.ts +15 -0
  70. package/dist/composables/_usePaneResize.d.ts +1 -1
  71. package/dist/composables/_useSpring.d.ts +4 -4
  72. package/dist/composables/dynamicColor.d.ts +9 -1
  73. package/dist/composables/motion.d.ts +63 -0
  74. package/dist/composables/useConfirm.d.ts +28 -0
  75. package/dist/composables/useDevice.d.ts +8 -1
  76. package/dist/composables/useLocale.d.ts +14 -0
  77. package/dist/composables/useScrollReveal.d.ts +1 -1
  78. package/dist/composables/useTheme.d.ts +1 -0
  79. package/dist/composables/useToast.d.ts +7 -0
  80. package/dist/draw.js +556 -556
  81. package/dist/draw.js.map +1 -1
  82. package/dist/flow.js +854 -851
  83. package/dist/flow.js.map +1 -1
  84. package/dist/gantt.js +1118 -1096
  85. package/dist/gantt.js.map +1 -1
  86. package/dist/index.d.ts +8 -5
  87. package/dist/locales/index.d.ts +1 -0
  88. package/dist/locales/index.js +833 -1
  89. package/dist/locales/index.js.map +1 -1
  90. package/dist/locales/pl.d.ts +2 -0
  91. package/dist/m3ui-vue.css +1 -1
  92. package/dist/m3ui.js +10327 -9796
  93. package/dist/m3ui.js.map +1 -1
  94. package/dist/map.js +860 -860
  95. package/dist/map.js.map +1 -1
  96. package/dist/{material-color-utilities-CEFytLsr.js → material-color-utilities-BZsBNIhi.js} +276 -217
  97. package/dist/material-color-utilities-BZsBNIhi.js.map +1 -0
  98. package/dist/media.js +7 -7
  99. package/dist/{motion-BcejVTeX.js → motion-BqYcqcim.js} +15 -5
  100. package/dist/motion-BqYcqcim.js.map +1 -0
  101. package/dist/pdf-sign.js +140 -137
  102. package/dist/pdf-sign.js.map +1 -1
  103. package/dist/pdf.js +1 -1
  104. package/dist/plugin.d.ts +11 -0
  105. package/dist/rich-text-editor.js +7 -7
  106. package/dist/styles/theme.css +40 -0
  107. package/dist/styles.css +1 -1
  108. package/dist/terminal.js +1 -1
  109. package/dist/{useLocale-YRaOT12S.js → useLocale-BjcYauXr.js} +60 -4
  110. package/dist/useLocale-BjcYauXr.js.map +1 -0
  111. package/dist/{useThemeTokens-DyAdPQB0.js → useThemeTokens-D5nr5KHf.js} +28 -27
  112. package/dist/useThemeTokens-D5nr5KHf.js.map +1 -0
  113. package/package.json +17 -2
  114. package/src/__tests__/MAvatarImage.test.ts +37 -0
  115. package/src/__tests__/MDataTableControlled.test.ts +68 -0
  116. package/src/__tests__/MHotkeysSequence.test.ts +53 -0
  117. package/src/__tests__/MIconAxes.test.ts +16 -0
  118. package/src/__tests__/MIconButtonWidth.test.ts +22 -0
  119. package/src/__tests__/MLink.test.ts +46 -0
  120. package/src/__tests__/MPaginationPages.test.ts +43 -0
  121. package/src/__tests__/MTextEmphasized.test.ts +14 -0
  122. package/src/__tests__/controlDescription.test.ts +34 -0
  123. package/src/__tests__/customColor.test.ts +27 -0
  124. package/src/__tests__/dynamicColor.test.ts +3 -2
  125. package/src/__tests__/focusTrap.test.ts +124 -0
  126. package/src/__tests__/formatMessage.test.ts +20 -0
  127. package/src/__tests__/inputAttrs.test.ts +103 -0
  128. package/src/__tests__/localePresets.test.ts +2 -0
  129. package/src/__tests__/menuGroupsRemount.test.ts +40 -0
  130. package/src/__tests__/menuHydration.test.ts +41 -0
  131. package/src/__tests__/motionPrefs.test.ts +28 -0
  132. package/src/__tests__/ssr.test.ts +11 -0
  133. package/src/__tests__/ssrToast.test.ts +20 -0
  134. package/src/__tests__/toastDetails.test.ts +39 -0
  135. package/src/__tests__/useConfirm.test.ts +47 -0
  136. package/src/__tests__/useTheme.test.ts +14 -0
  137. package/src/__tests__/warningRole.test.ts +22 -0
  138. package/src/components/MAlert.vue +2 -2
  139. package/src/components/MAnimatedNumber.vue +9 -3
  140. package/src/components/MAutocomplete.vue +16 -4
  141. package/src/components/MAvailabilityCalendar.vue +3 -3
  142. package/src/components/MAvatar.vue +32 -5
  143. package/src/components/MAvatarGroup.vue +7 -2
  144. package/src/components/MBottomSheet.vue +18 -2
  145. package/src/components/MButton.vue +18 -5
  146. package/src/components/MCarousel.vue +3 -3
  147. package/src/components/MChatBubble.vue +14 -1
  148. package/src/components/MCheckbox.vue +21 -4
  149. package/src/components/MChip.vue +4 -2
  150. package/src/components/MCollapse.vue +7 -1
  151. package/src/components/MCommandPalette.vue +6 -2
  152. package/src/components/MContextMenu.vue +4 -4
  153. package/src/components/MCreditCardInput.vue +5 -0
  154. package/src/components/MDashboardGrid.vue +2 -1
  155. package/src/components/MDataTable.vue +63 -16
  156. package/src/components/MDialog.vue +21 -3
  157. package/src/components/MDiffViewer.vue +3 -3
  158. package/src/components/MDrawLayers.vue +3 -3
  159. package/src/components/MFabMenu.vue +7 -0
  160. package/src/components/MFloorPlan.vue +3 -3
  161. package/src/components/MFloorPlanInspector.vue +3 -3
  162. package/src/components/MFlow.vue +9 -5
  163. package/src/components/MFlowControls.vue +6 -0
  164. package/src/components/MFormBuilder.vue +1 -1
  165. package/src/components/MGantt.vue +10 -10
  166. package/src/components/MHotkeys.vue +61 -16
  167. package/src/components/MIcon.vue +17 -1
  168. package/src/components/MIconButton.vue +29 -6
  169. package/src/components/MImageCropper.vue +1 -1
  170. package/src/components/MKanban.vue +2 -1
  171. package/src/components/MLightbox.vue +5 -4
  172. package/src/components/MLink.vue +136 -0
  173. package/src/components/MListDetail.vue +7 -0
  174. package/src/components/MListItem.vue +7 -4
  175. package/src/components/MLoadingIndicator.vue +2 -1
  176. package/src/components/MMap.vue +3 -0
  177. package/src/components/MMapCluster.vue +2 -2
  178. package/src/components/MMapControl.vue +2 -2
  179. package/src/components/MMapMeasure.vue +1 -1
  180. package/src/components/MMaskField.vue +16 -3
  181. package/src/components/MMenu.vue +4 -4
  182. package/src/components/MMenuItem.vue +2 -2
  183. package/src/components/MMeterGroup.vue +3 -2
  184. package/src/components/MMortgageCalculator.vue +3 -3
  185. package/src/components/MMultiAutocomplete.vue +19 -7
  186. package/src/components/MMultiSelect.vue +19 -7
  187. package/src/components/MNavigationDrawer.vue +10 -3
  188. package/src/components/MNavigationRail.vue +5 -1
  189. package/src/components/MNotificationCenter.vue +2 -1
  190. package/src/components/MNotificationHost.vue +3 -3
  191. package/src/components/MNumberField.vue +23 -6
  192. package/src/components/MOdontogram.vue +4 -4
  193. package/src/components/MOrderBook.vue +4 -0
  194. package/src/components/MPagination.vue +91 -12
  195. package/src/components/MPdfSigner.vue +3 -3
  196. package/src/components/MPdfViewer.vue +7 -7
  197. package/src/components/MPhoneInput.vue +17 -4
  198. package/src/components/MProductConfigurator.vue +4 -4
  199. package/src/components/MProgressBar.vue +5 -0
  200. package/src/components/MQuiz.vue +8 -5
  201. package/src/components/MRadio.vue +24 -5
  202. package/src/components/MRadioGroup.vue +3 -0
  203. package/src/components/MReactions.vue +2 -2
  204. package/src/components/MResourceTimeline.vue +3 -3
  205. package/src/components/MResult.vue +1 -1
  206. package/src/components/MScrollField.vue +1 -1
  207. package/src/components/MSearchField.vue +6 -5
  208. package/src/components/MSeatMap.vue +5 -0
  209. package/src/components/MSeekBar.vue +3 -2
  210. package/src/components/MSelect.vue +16 -4
  211. package/src/components/MSideSheet.vue +25 -3
  212. package/src/components/MSimpleCarousel.vue +2 -2
  213. package/src/components/MSnackbar.vue +16 -13
  214. package/src/components/MSparkline.vue +2 -1
  215. package/src/components/MSpinner.vue +8 -0
  216. package/src/components/MSplitter.vue +1 -1
  217. package/src/components/MSpotlightSearch.vue +6 -2
  218. package/src/components/MSpreadsheet.vue +1 -1
  219. package/src/components/MStatCard.vue +2 -1
  220. package/src/components/MSwitch.vue +21 -4
  221. package/src/components/MTabs.vue +2 -1
  222. package/src/components/MTagInput.vue +19 -6
  223. package/src/components/MText.vue +23 -4
  224. package/src/components/MTextField.vue +25 -6
  225. package/src/components/MTimeline.vue +5 -5
  226. package/src/components/MToolbar.vue +2 -2
  227. package/src/components/MTour.vue +3 -0
  228. package/src/components/MTrackingTimeline.vue +6 -0
  229. package/src/components/MTypewriter.vue +7 -1
  230. package/src/components/MWindow.vue +10 -1
  231. package/src/components/_MColorPanel.vue +4 -4
  232. package/src/components/_MComment.vue +3 -2
  233. package/src/components/_MFlowNodeShell.vue +1 -1
  234. package/src/components/_MPdfPage.vue +1 -1
  235. package/src/components/_MTransferPane.vue +10 -0
  236. package/src/composables/_effectCanvas.ts +2 -1
  237. package/src/composables/_menuGroups.ts +10 -1
  238. package/src/composables/_splitAttrs.ts +29 -0
  239. package/src/composables/_springAnimation.ts +3 -3
  240. package/src/composables/_themeTransition.ts +3 -2
  241. package/src/composables/_useFocusTrap.ts +142 -0
  242. package/src/composables/_useMenuNav.ts +3 -3
  243. package/src/composables/_usePaneResize.ts +2 -1
  244. package/src/composables/_useSheetMotion.ts +3 -4
  245. package/src/composables/_useSpring.ts +16 -10
  246. package/src/composables/cron.ts +7 -6
  247. package/src/composables/dynamicColor.ts +21 -2
  248. package/src/composables/motion.ts +27 -0
  249. package/src/composables/useConfirm.ts +116 -0
  250. package/src/composables/useDevice.ts +23 -3
  251. package/src/composables/useFieldBg.ts +4 -0
  252. package/src/composables/useLocale.ts +74 -0
  253. package/src/composables/useNotification.ts +3 -0
  254. package/src/composables/useScrollReveal.ts +3 -3
  255. package/src/composables/useTheme.ts +8 -2
  256. package/src/composables/useToast.ts +27 -4
  257. package/src/directives/vSparkle.ts +2 -1
  258. package/src/index.ts +8 -5
  259. package/src/locales/ar.ts +7 -0
  260. package/src/locales/de.ts +7 -0
  261. package/src/locales/es.ts +7 -0
  262. package/src/locales/fr.ts +7 -0
  263. package/src/locales/index.ts +1 -0
  264. package/src/locales/ja.ts +7 -0
  265. package/src/locales/ko.ts +7 -0
  266. package/src/locales/pl.ts +807 -0
  267. package/src/locales/pt.ts +7 -0
  268. package/src/locales/zh.ts +7 -0
  269. package/src/plugin.ts +16 -0
  270. package/src/styles/theme.css +40 -0
  271. package/dist/MButton-B9RCM06i.js +0 -171
  272. package/dist/MButton-B9RCM06i.js.map +0 -1
  273. package/dist/MColorPickerModal-ChRtcZOo.js +0 -577
  274. package/dist/MColorPickerModal-ChRtcZOo.js.map +0 -1
  275. package/dist/MDialog-dk07tify.js +0 -167
  276. package/dist/MDialog-dk07tify.js.map +0 -1
  277. package/dist/MIcon-BSsJZhK7.js.map +0 -1
  278. package/dist/MIconButton-CrBPZidd.js +0 -288
  279. package/dist/MIconButton-CrBPZidd.js.map +0 -1
  280. package/dist/MListItem-h9H223vx.js +0 -1239
  281. package/dist/MListItem-h9H223vx.js.map +0 -1
  282. package/dist/MLoadingIndicator-YTV1Ov5w.js +0 -114
  283. package/dist/MLoadingIndicator-YTV1Ov5w.js.map +0 -1
  284. package/dist/MMenuItem-US0Zbglq.js.map +0 -1
  285. package/dist/MPdfViewer-DL9mRsd2.js.map +0 -1
  286. package/dist/MSeekBar-JFZcoJ8y.js +0 -434
  287. package/dist/MSeekBar-JFZcoJ8y.js.map +0 -1
  288. package/dist/MTextField-B6_iOczK.js.map +0 -1
  289. package/dist/material-color-utilities-CEFytLsr.js.map +0 -1
  290. package/dist/motion-BcejVTeX.js.map +0 -1
  291. package/dist/useLocale-YRaOT12S.js.map +0 -1
  292. package/dist/useThemeTokens-DyAdPQB0.js.map +0 -1
package/dist/pdf-sign.js CHANGED
@@ -1,16 +1,16 @@
1
- import { t as e } from "./MPdfViewer-DL9mRsd2.js";
2
- import { t } from "./MSignaturePad-WuvE_Cyl.js";
3
- import { t as n } from "./MDialog-dk07tify.js";
4
- import { t as r } from "./MButton-B9RCM06i.js";
5
- import { t as i } from "./MIcon-BSsJZhK7.js";
6
- import { t as a } from "./MIconButton-CrBPZidd.js";
7
- import { t as o } from "./MSegmentedButton-DMou-8sG.js";
8
- import { t as s } from "./MTextField-B6_iOczK.js";
9
- import { i as c } from "./useLocale-YRaOT12S.js";
10
- import { Fragment as l, computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createTextVNode as h, createVNode as g, defineComponent as _, mergeProps as v, nextTick as ee, normalizeClass as te, normalizeStyle as y, openBlock as b, ref as x, renderList as S, toDisplayString as C, unref as w, useId as ne, watch as T, withCtx as E, withKeys as re, withModifiers as D } from "vue";
1
+ import { t as e } from "./MPdfViewer-CEfyXGq2.js";
2
+ import { t } from "./MSignaturePad-3nddtLKI.js";
3
+ import { t as n } from "./MDialog-CU8EYgCC.js";
4
+ import { t as r } from "./MButton-gWoOzFWf.js";
5
+ import { t as i } from "./MIcon-CkUc9kuQ.js";
6
+ import { t as a } from "./MIconButton-DTFOfsTy.js";
7
+ import { t as o } from "./MSegmentedButton-Dg07j-4r.js";
8
+ import { t as s } from "./MTextField-CZRizAwA.js";
9
+ import { a as c, i as l } from "./useLocale-BjcYauXr.js";
10
+ import { Fragment as u, computed as d, createBlock as f, createCommentVNode as p, createElementBlock as m, createElementVNode as h, createTextVNode as g, createVNode as _, defineComponent as v, mergeProps as ee, nextTick as te, normalizeClass as ne, normalizeStyle as y, openBlock as b, ref as x, renderList as S, toDisplayString as C, unref as w, useId as re, watch as ie, withCtx as T, withKeys as ae, withModifiers as E } from "vue";
11
11
  // src/composables/pdfSign.ts
12
- var O = (e) => (e.required ?? (e.type === "signature" || e.type === "initials")) && !e.value;
13
- function k(e, t, n) {
12
+ var D = (e) => (e.required ?? (e.type === "signature" || e.type === "initials")) && !e.value;
13
+ function O(e, t, n) {
14
14
  let r = (n % 360 + 360) % 360, i = e.x, a = e.y + e.height, o, s;
15
15
  return r === 90 ? (o = a, s = i) : r === 180 ? (o = t.width - i, s = a) : r === 270 ? (o = t.width - a, s = t.height - i) : (o = i, s = t.height - a), {
16
16
  x: t.x + o,
@@ -18,7 +18,7 @@ function k(e, t, n) {
18
18
  rotate: r
19
19
  };
20
20
  }
21
- async function ie(e, t, n, r) {
21
+ async function k(e, t, n, r) {
22
22
  if (!e.value) return null;
23
23
  if ((e.type === "signature" || e.type === "initials") && e.value.startsWith("data:image/png")) return A(e.value);
24
24
  let i = document.createElement("canvas");
@@ -42,7 +42,7 @@ function A(e) {
42
42
  for (let e = 0; e < n.length; e++) r[e] = n.charCodeAt(e);
43
43
  return r;
44
44
  }
45
- async function ae(e, t, n = {}) {
45
+ async function oe(e, t, n = {}) {
46
46
  let { PDFDocument: r, degrees: i } = await import("pdf-lib"), a = await r.load(e), o = a.getPages(), s = n.font ?? "system-ui, sans-serif";
47
47
  for (let e of t) {
48
48
  let t = o[e.page - 1];
@@ -52,14 +52,14 @@ async function ae(e, t, n = {}) {
52
52
  y: e.y * u,
53
53
  width: e.width * l,
54
54
  height: e.height * u
55
- }, f = await ie(e, d.width, d.height, s);
55
+ }, f = await k(e, d.width, d.height, s);
56
56
  if (!f) continue;
57
57
  let p = await a.embedPng(f), { width: m, height: h } = d, g = 0, _ = 0;
58
58
  if (e.type === "signature" || e.type === "initials") {
59
59
  let e = Math.min(d.width / p.width, d.height / p.height);
60
60
  m = p.width * e, h = p.height * e, g = (d.width - m) / 2, _ = (d.height - h) / 2;
61
61
  }
62
- let v = k({
62
+ let v = O({
63
63
  x: d.x + g,
64
64
  y: d.y + _,
65
65
  width: m,
@@ -81,10 +81,10 @@ async function ae(e, t, n = {}) {
81
81
  return n.producer && a.setProducer(n.producer), a.setModificationDate(/* @__PURE__ */ new Date()), a.save();
82
82
  }
83
83
  // src/components/MPdfSigner.vue?vue&type=script&setup=true&lang.ts
84
- var oe = { class: "flex shrink-0 flex-wrap items-center gap-2 border-b border-outline-variant bg-surface-container px-3 py-2" }, se = {
84
+ var se = { class: "flex shrink-0 flex-wrap items-center gap-2 border-b border-outline-variant bg-surface-container px-3 py-2" }, ce = {
85
85
  class: "text-body-medium text-on-surface",
86
86
  "aria-live": "polite"
87
- }, ce = { class: "mr-1 text-label-large text-on-surface-variant" }, le = { class: "pointer-events-none absolute inset-0" }, ue = [
87
+ }, le = { class: "mr-1 text-label-large text-on-surface-variant" }, ue = { class: "pointer-events-none absolute inset-0" }, de = [
88
88
  "id",
89
89
  "data-field",
90
90
  "data-type",
@@ -93,13 +93,13 @@ var oe = { class: "flex shrink-0 flex-wrap items-center gap-2 border-b border-ou
93
93
  "onClick",
94
94
  "onPointerdown",
95
95
  "onKeydown"
96
- ], de = ["src"], fe = {
96
+ ], fe = ["src"], pe = {
97
97
  key: 3,
98
98
  class: "flex min-w-0 items-center gap-1 truncate px-1 text-label-medium"
99
- }, pe = { class: "truncate" }, me = ["onPointerdown"], he = {
99
+ }, me = { class: "truncate" }, he = ["onPointerdown"], ge = {
100
100
  key: 0,
101
101
  class: "flex flex-col gap-4"
102
- }, j = "\"Segoe Script\", \"Brush Script MT\", \"Snell Roundhand\", \"URW Chancery L\", cursive", M = /* @__PURE__ */ _({
102
+ }, j = "\"Segoe Script\", \"Brush Script MT\", \"Snell Roundhand\", \"URW Chancery L\", cursive", M = /* @__PURE__ */ v({
103
103
  inheritAttrs: !1,
104
104
  __name: "MPdfSigner",
105
105
  props: {
@@ -125,8 +125,8 @@ var oe = { class: "flex shrink-0 flex-wrap items-center gap-2 border-b border-ou
125
125
  "finish",
126
126
  "loaded"
127
127
  ],
128
- setup(_, { expose: k, emit: ie }) {
129
- let A = _, M = ie, N = c(), ge = ne(), P = x(), F = {
128
+ setup(v, { expose: O, emit: k }) {
129
+ let A = v, M = k, N = c(), _e = re(), P = x(), F = {
130
130
  signature: {
131
131
  icon: "signature",
132
132
  key: "pdfSignSignature",
@@ -163,15 +163,18 @@ var oe = { class: "flex shrink-0 flex-wrap items-center gap-2 border-b border-ou
163
163
  w: .03,
164
164
  h: .022
165
165
  }
166
- }, I = (e) => N[F[e].key], L = (e) => !A.signer || !e.signer || e.signer === A.signer, _e = u(() => {
166
+ }, I = (e) => N[F[e].key], L = (e) => !A.signer || !e.signer || e.signer === A.signer, ve = d(() => {
167
167
  let e = /* @__PURE__ */ new Map();
168
168
  for (let t of A.fields) e.set(t.page, [...e.get(t.page) ?? [], t]);
169
169
  return e;
170
- }), R = u(() => A.fields.filter((e) => L(e) && (e.required ?? (e.type === "signature" || e.type === "initials")))), z = u(() => R.value.filter((e) => !O(e)).length), B = u(() => z.value === R.value.length);
171
- T(B, (e, t) => {
170
+ }), R = d(() => A.fields.filter((e) => L(e) && (e.required ?? (e.type === "signature" || e.type === "initials")))), z = d(() => R.value.filter((e) => !D(e)).length), B = d(() => z.value === R.value.length);
171
+ ie(B, (e, t) => {
172
172
  e && !t && A.mode === "sign" && M("complete");
173
173
  });
174
- let ve = u(() => N.pdfSignProgress.replace("{done}", String(z.value)).replace("{total}", String(R.value.length)));
174
+ let ye = d(() => l(N.pdfSignProgress, {
175
+ done: String(z.value),
176
+ total: String(R.value.length)
177
+ }, N.lang));
175
178
  function V(e, t) {
176
179
  M("update:fields", A.fields.map((n) => n.id === e ? {
177
180
  ...n,
@@ -179,47 +182,47 @@ var oe = { class: "flex shrink-0 flex-wrap items-center gap-2 border-b border-ou
179
182
  } : n));
180
183
  }
181
184
  let H = x({}), U = x(null), W = x(), G = x(!0), K = x(), q = x(400);
182
- T(() => U.value?.tab, () => ee(() => {
185
+ ie(() => U.value?.tab, () => te(() => {
183
186
  K.value?.clientWidth && (q.value = K.value.clientWidth - 2);
184
187
  }));
185
- function ye() {
188
+ function be() {
186
189
  return new Intl.DateTimeFormat(void 0, A.dateFormat).format(/* @__PURE__ */ new Date());
187
190
  }
188
- function J(e, t = !1) {
191
+ function xe(e, t = !1) {
189
192
  if (A.mode !== "sign" || !L(e)) return;
190
193
  if (e.type === "checkbox") return V(e.id, { value: e.value === "true" ? void 0 : "true" });
191
- if (e.type === "date" && !e.value) return V(e.id, { value: ye() });
194
+ if (e.type === "date" && !e.value) return V(e.id, { value: be() });
192
195
  if (e.type === "name" && !e.value && A.signerName) return V(e.id, { value: A.signerName });
193
196
  if ((e.type === "signature" || e.type === "initials") && !t) {
194
197
  let t = H.value[e.type];
195
198
  if (t && !e.value) return V(e.id, { value: t });
196
199
  }
197
- let n = e.type === "initials" ? be(A.signerName ?? "") : A.signerName ?? "";
200
+ let n = e.type === "initials" ? Se(A.signerName ?? "") : A.signerName ?? "";
198
201
  U.value = {
199
202
  field: e,
200
203
  tab: e.type === "signature" || e.type === "initials" ? "draw" : "type",
201
204
  text: e.type === "signature" || e.type === "initials" ? n : e.value ?? (e.type === "name" ? n : "")
202
205
  }, G.value = !0;
203
206
  }
204
- let be = (e) => e.split(/\s+/).filter(Boolean).map((e) => e[0].toUpperCase()).join("");
205
- function xe(e) {
207
+ let Se = (e) => e.split(/\s+/).filter(Boolean).map((e) => e[0].toUpperCase()).join("");
208
+ function Ce(e) {
206
209
  let t = document.createElement("canvas"), n = t.getContext("2d");
207
210
  return n ? (n.font = `96px ${j}`, t.width = Math.ceil(n.measureText(e).width) + 40, t.height = 96 * 1.6, n.font = `96px ${j}`, n.fillStyle = "#1a237e", n.textBaseline = "middle", n.fillText(e, 20, t.height / 2), t.toDataURL("image/png")) : "";
208
211
  }
209
- let Y = u(() => U.value?.field.type === "signature" || U.value?.field.type === "initials"), Se = u(() => {
212
+ let J = d(() => U.value?.field.type === "signature" || U.value?.field.type === "initials"), we = d(() => {
210
213
  let e = U.value;
211
- return e ? Y.value && e.tab === "draw" ? !G.value : e.text.trim() !== "" : !1;
214
+ return e ? J.value && e.tab === "draw" ? !G.value : e.text.trim() !== "" : !1;
212
215
  });
213
- async function Ce() {
216
+ async function Te() {
214
217
  let e = U.value;
215
- if (!e || !Se.value) return;
218
+ if (!e || !we.value) return;
216
219
  let t;
217
- Y.value ? (t = e.tab === "draw" ? await we(W.value?.toDataURL() ?? "") : xe(e.text.trim()), H.value = {
220
+ J.value ? (t = e.tab === "draw" ? await Ee(W.value?.toDataURL() ?? "") : Ce(e.text.trim()), H.value = {
218
221
  ...H.value,
219
222
  [e.field.type]: t
220
223
  }) : t = e.text.trim(), V(e.field.id, { value: t }), U.value = null;
221
224
  }
222
- async function we(e) {
225
+ async function Ee(e) {
223
226
  if (!e || typeof document > "u") return e;
224
227
  let t = new Image();
225
228
  t.src = e;
@@ -241,18 +244,18 @@ var oe = { class: "flex shrink-0 flex-wrap items-center gap-2 border-b border-ou
241
244
  let d = document.createElement("canvas");
242
245
  return d.width = l - s + 1, d.height = u - c + 1, d.getContext("2d")?.drawImage(n, s, c, d.width, d.height, 0, 0, d.width, d.height), d.toDataURL("image/png");
243
246
  }
244
- function Te() {
245
- let e = R.value, t = e.find((e) => O(e)) ?? e[0];
247
+ function De() {
248
+ let e = R.value, t = e.find((e) => D(e)) ?? e[0];
246
249
  if (!t) return;
247
- let n = document.getElementById(Ee(t));
250
+ let n = document.getElementById(Y(t));
248
251
  n?.scrollIntoView({
249
252
  behavior: "smooth",
250
253
  block: "center"
251
254
  }), n?.focus({ preventScroll: !0 });
252
255
  }
253
- let Ee = (e) => `${ge}-f-${e.id}`, X = x(null), De = 0;
254
- function Oe(e) {
255
- let t = F[e], n = $.value, r = `${e}-${Date.now().toString(36)}-${++De}`, i = {
256
+ let Y = (e) => `${_e}-f-${e.id}`, X = x(null), Oe = 0;
257
+ function ke(e) {
258
+ let t = F[e], n = $.value, r = `${e}-${Date.now().toString(36)}-${++Oe}`, i = {
256
259
  id: r,
257
260
  type: e,
258
261
  page: n,
@@ -264,11 +267,11 @@ var oe = { class: "flex shrink-0 flex-wrap items-center gap-2 border-b border-ou
264
267
  };
265
268
  (e === "signature" || e === "initials") && (i.required = !0), M("update:fields", [...A.fields, i]), X.value = r;
266
269
  }
267
- function ke(e) {
270
+ function Ae(e) {
268
271
  M("update:fields", A.fields.filter((t) => t.id !== e)), X.value === e && (X.value = null);
269
272
  }
270
273
  let Z = null;
271
- function Ae(e, t, n, r) {
274
+ function je(e, t, n, r) {
272
275
  A.mode === "prepare" && e.button === 0 && (e.preventDefault(), e.stopPropagation(), X.value = t.id, Z = {
273
276
  id: t.id,
274
277
  kind: n,
@@ -279,7 +282,7 @@ var oe = { class: "flex shrink-0 flex-wrap items-center gap-2 border-b border-ou
279
282
  h: r.height
280
283
  }, e.currentTarget.setPointerCapture?.(e.pointerId));
281
284
  }
282
- function je(e) {
285
+ function Me(e) {
283
286
  if (!Z) return;
284
287
  let t = (e.clientX - Z.x) / Z.w, n = (e.clientY - Z.y) / Z.h, r = Z.start;
285
288
  Z.kind === "move" ? V(Z.id, {
@@ -290,13 +293,13 @@ var oe = { class: "flex shrink-0 flex-wrap items-center gap-2 border-b border-ou
290
293
  height: Q(r.height + n, .015, 1 - r.y)
291
294
  });
292
295
  }
293
- function Me() {
296
+ function Ne() {
294
297
  Z = null;
295
298
  }
296
299
  let Q = (e, t, n) => Math.min(Math.max(e, t), n);
297
- function Ne(e, t) {
300
+ function Pe(e, t) {
298
301
  if (A.mode === "sign") {
299
- (e.key === "Enter" || e.key === " ") && (e.preventDefault(), J(t));
302
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), xe(t));
300
303
  return;
301
304
  }
302
305
  let n = e.shiftKey ? .02 : .005, r = {
@@ -312,10 +315,10 @@ var oe = { class: "flex shrink-0 flex-wrap items-center gap-2 border-b border-ou
312
315
  x: Q(t.x + n, 0, 1 - t.width),
313
316
  y: Q(t.y + i, 0, 1 - t.height)
314
317
  });
315
- } else (e.key === "Delete" || e.key === "Backspace") && (e.preventDefault(), ke(t.id));
318
+ } else (e.key === "Delete" || e.key === "Backspace") && (e.preventDefault(), Ae(t.id));
316
319
  }
317
320
  let $ = x(1);
318
- function Pe(e) {
321
+ function Fe(e) {
319
322
  let t = e.rotation, n = t % 180 != 0, r = n ? e.height : e.width, i = n ? e.width : e.height, a = t === 90 ? "rotate(90deg) translateY(-100%)" : t === 180 ? "rotate(180deg) translate(-100%, -100%)" : t === 270 ? "rotate(270deg) translateX(-100%)" : void 0;
320
323
  return {
321
324
  width: `${r}px`,
@@ -324,172 +327,172 @@ var oe = { class: "flex shrink-0 flex-wrap items-center gap-2 border-b border-ou
324
327
  transformOrigin: "top left"
325
328
  };
326
329
  }
327
- let Fe = (e) => ({
330
+ let Ie = (e) => ({
328
331
  left: `${e.x * 100}%`,
329
332
  top: `${e.y * 100}%`,
330
333
  width: `${e.width * 100}%`,
331
334
  height: `${e.height * 100}%`
332
335
  });
333
- async function Ie(e) {
336
+ async function Le(e) {
334
337
  if (e instanceof Uint8Array || e instanceof ArrayBuffer) return e;
335
338
  if (typeof Blob < "u" && e instanceof Blob) return e.arrayBuffer();
336
339
  let t = await fetch(String(e));
337
340
  if (!t.ok) throw Error(`PDF ${t.status}`);
338
341
  return t.arrayBuffer();
339
342
  }
340
- async function Le(e) {
343
+ async function Re(e) {
341
344
  if (!A.src) throw Error("No PDF");
342
- return ae(await Ie(A.src), A.fields, e);
345
+ return oe(await Le(A.src), A.fields, e);
343
346
  }
344
- return k({
345
- save: Le,
346
- next: Te,
347
+ return O({
348
+ save: Re,
349
+ next: De,
347
350
  complete: B,
348
351
  viewer: P
349
- }), (c, u) => (b(), p("div", v({ class: "m3-pdf-signer" }, c.$attrs), [
350
- m("div", oe, [_.mode === "sign" ? (b(), p(l, { key: 0 }, [
351
- g(i, {
352
+ }), (c, l) => (b(), m("div", ee({ class: "m3-pdf-signer" }, c.$attrs), [
353
+ h("div", se, [v.mode === "sign" ? (b(), m(u, { key: 0 }, [
354
+ _(i, {
352
355
  name: B.value ? "task_alt" : "edit_document",
353
356
  size: 20,
354
- class: te(B.value ? "text-primary" : "text-on-surface-variant")
357
+ class: ne(B.value ? "text-primary" : "text-on-surface-variant")
355
358
  }, null, 8, ["name", "class"]),
356
- m("span", se, C(B.value ? w(N).pdfSignComplete : ve.value), 1),
357
- u[12] ||= m("span", { class: "flex-1" }, null, -1),
358
- B.value ? f("", !0) : (b(), d(r, {
359
+ h("span", ce, C(B.value ? w(N).pdfSignComplete : ye.value), 1),
360
+ l[12] ||= h("span", { class: "flex-1" }, null, -1),
361
+ B.value ? p("", !0) : (b(), f(r, {
359
362
  key: 0,
360
363
  variant: "tonal",
361
364
  icon: "arrow_downward",
362
- onClick: Te
365
+ onClick: De
363
366
  }, {
364
- default: E(() => [h(C(w(N).pdfSignNext), 1)]),
367
+ default: T(() => [g(C(w(N).pdfSignNext), 1)]),
365
368
  _: 1
366
369
  })),
367
- g(r, {
370
+ _(r, {
368
371
  disabled: !B.value,
369
372
  icon: "check",
370
- onClick: u[0] ||= (e) => M("finish")
373
+ onClick: l[0] ||= (e) => M("finish")
371
374
  }, {
372
- default: E(() => [h(C(w(N).pdfSignFinish), 1)]),
375
+ default: T(() => [g(C(w(N).pdfSignFinish), 1)]),
373
376
  _: 1
374
377
  }, 8, ["disabled"])
375
- ], 64)) : (b(), p(l, { key: 1 }, [m("span", ce, C(w(N).pdfSignAddField), 1), (b(!0), p(l, null, S(_.types, (e) => (b(), d(r, {
378
+ ], 64)) : (b(), m(u, { key: 1 }, [h("span", le, C(w(N).pdfSignAddField), 1), (b(!0), m(u, null, S(v.types, (e) => (b(), f(r, {
376
379
  key: e,
377
380
  variant: "tonal",
378
381
  size: "sm",
379
382
  icon: F[e].icon,
380
383
  "data-add": e,
381
- onClick: (t) => Oe(e)
384
+ onClick: (t) => ke(e)
382
385
  }, {
383
- default: E(() => [h(C(I(e)), 1)]),
386
+ default: T(() => [g(C(I(e)), 1)]),
384
387
  _: 2
385
388
  }, 1032, [
386
389
  "icon",
387
390
  "data-add",
388
391
  "onClick"
389
392
  ]))), 128))], 64))]),
390
- g(e, {
393
+ _(e, {
391
394
  ref_key: "viewer",
392
395
  ref: P,
393
- src: _.src,
394
- "worker-src": _.workerSrc,
396
+ src: v.src,
397
+ "worker-src": v.workerSrc,
395
398
  class: "min-h-0 flex-1",
396
- "onUpdate:page": u[2] ||= (e) => $.value = e,
397
- onLoaded: u[3] ||= (e) => M("loaded", e)
399
+ "onUpdate:page": l[2] ||= (e) => $.value = e,
400
+ onLoaded: l[3] ||= (e) => M("loaded", e)
398
401
  }, {
399
- page: E((e) => [m("div", le, [m("div", {
402
+ page: T((e) => [h("div", ue, [h("div", {
400
403
  class: "absolute left-0 top-0",
401
- style: y(Pe(e))
402
- }, [(b(!0), p(l, null, S(_e.value.get(e.page) ?? [], (t) => (b(), p("div", {
403
- id: Ee(t),
404
+ style: y(Fe(e))
405
+ }, [(b(!0), m(u, null, S(ve.value.get(e.page) ?? [], (t) => (b(), m("div", {
406
+ id: Y(t),
404
407
  key: t.id,
405
- class: te(["m3-pdf-sign-field pointer-events-auto absolute flex items-center justify-center rounded-xs outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary", [
406
- _.mode === "prepare" ? "cursor-move" : L(t) ? "cursor-pointer" : "cursor-default opacity-40",
408
+ class: ne(["m3-pdf-sign-field pointer-events-auto absolute flex items-center justify-center rounded-xs outline-none focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-secondary", [
409
+ v.mode === "prepare" ? "cursor-move" : L(t) ? "cursor-pointer" : "cursor-default opacity-40",
407
410
  t.value ? "m3-pdf-sign-filled" : "m3-pdf-sign-empty",
408
- _.mode === "sign" && L(t) && w(O)(t) ? "m3-pdf-sign-todo" : "",
409
- X.value === t.id && _.mode === "prepare" ? "m3-pdf-sign-selected" : ""
411
+ v.mode === "sign" && L(t) && w(D)(t) ? "m3-pdf-sign-todo" : "",
412
+ X.value === t.id && v.mode === "prepare" ? "m3-pdf-sign-selected" : ""
410
413
  ]]),
411
- style: y(Fe(t)),
414
+ style: y(Ie(t)),
412
415
  "data-field": t.id,
413
416
  "data-type": t.type,
414
417
  role: "button",
415
- tabindex: _.mode === "prepare" || L(t) ? 0 : -1,
418
+ tabindex: v.mode === "prepare" || L(t) ? 0 : -1,
416
419
  "aria-label": `${t.label ?? I(t.type)}${t.value ? "" : t.required ?? (t.type === "signature" || t.type === "initials") ? ` (${w(N).pdfSignRequired})` : ""}`,
417
- onClick: (e) => _.mode === "sign" ? J(t, !!t.value) : X.value = t.id,
418
- onPointerdown: (n) => Ae(n, t, "move", {
420
+ onClick: (e) => v.mode === "sign" ? xe(t, !!t.value) : X.value = t.id,
421
+ onPointerdown: (n) => je(n, t, "move", {
419
422
  width: e.rotation % 180 ? e.height : e.width,
420
423
  height: e.rotation % 180 ? e.width : e.height
421
424
  }),
422
- onPointermove: je,
423
- onPointerup: Me,
424
- onPointercancel: Me,
425
- onKeydown: (e) => Ne(e, t)
426
- }, [t.value && (t.type === "signature" || t.type === "initials") ? (b(), p("img", {
425
+ onPointermove: Me,
426
+ onPointerup: Ne,
427
+ onPointercancel: Ne,
428
+ onKeydown: (e) => Pe(e, t)
429
+ }, [t.value && (t.type === "signature" || t.type === "initials") ? (b(), m("img", {
427
430
  key: 0,
428
431
  src: t.value,
429
432
  alt: "",
430
433
  class: "h-full w-full object-contain",
431
434
  draggable: "false"
432
- }, null, 8, de)) : t.type === "checkbox" && t.value === "true" ? (b(), d(i, {
435
+ }, null, 8, fe)) : t.type === "checkbox" && t.value === "true" ? (b(), f(i, {
433
436
  key: 1,
434
437
  name: "check",
435
438
  class: "text-on-surface",
436
439
  size: Math.max(12, e.height * t.height * .9)
437
- }, null, 8, ["size"])) : t.value ? (b(), p("span", {
440
+ }, null, 8, ["size"])) : t.value ? (b(), m("span", {
438
441
  key: 2,
439
442
  class: "m3-pdf-sign-text w-full truncate px-1 text-left",
440
443
  style: y({ fontSize: `${Math.max(8, e.height * t.height * .6)}px` })
441
- }, C(t.value), 5)) : t.type === "checkbox" ? f("", !0) : (b(), p("span", fe, [g(i, {
444
+ }, C(t.value), 5)) : t.type === "checkbox" ? p("", !0) : (b(), m("span", pe, [_(i, {
442
445
  name: F[t.type].icon,
443
446
  size: 16
444
- }, null, 8, ["name"]), m("span", pe, C(t.type === "signature" && _.mode === "sign" ? w(N).pdfSignHere : t.label ?? I(t.type)), 1)])), _.mode === "prepare" && X.value === t.id ? (b(), p(l, { key: 4 }, [m("span", {
447
+ }, null, 8, ["name"]), h("span", me, C(t.type === "signature" && v.mode === "sign" ? w(N).pdfSignHere : t.label ?? I(t.type)), 1)])), v.mode === "prepare" && X.value === t.id ? (b(), m(u, { key: 4 }, [h("span", {
445
448
  class: "absolute -right-1.5 -bottom-1.5 h-3 w-3 cursor-nwse-resize rounded-full border-2 border-surface bg-primary touch-none",
446
449
  "aria-hidden": "true",
447
- onPointerdown: (n) => Ae(n, t, "resize", {
450
+ onPointerdown: (n) => je(n, t, "resize", {
448
451
  width: e.rotation % 180 ? e.height : e.width,
449
452
  height: e.rotation % 180 ? e.width : e.height
450
453
  })
451
- }, null, 40, me), m("div", {
454
+ }, null, 40, he), h("div", {
452
455
  class: "absolute -top-11 left-0 flex items-center gap-1 rounded-full bg-surface-container-high px-1 shadow-elevation-2",
453
- onPointerdown: u[1] ||= D(() => {}, ["stop"])
454
- }, [g(r, {
456
+ onPointerdown: l[1] ||= E(() => {}, ["stop"])
457
+ }, [_(r, {
455
458
  variant: t.required ?? (t.type === "signature" || t.type === "initials") ? "filled" : "text",
456
459
  size: "xs",
457
- onClick: D((e) => V(t.id, { required: !(t.required ?? (t.type === "signature" || t.type === "initials")) }), ["stop"])
460
+ onClick: E((e) => V(t.id, { required: !(t.required ?? (t.type === "signature" || t.type === "initials")) }), ["stop"])
458
461
  }, {
459
- default: E(() => [h(C(w(N).pdfSignRequired), 1)]),
462
+ default: T(() => [g(C(w(N).pdfSignRequired), 1)]),
460
463
  _: 1
461
- }, 8, ["variant", "onClick"]), g(a, {
464
+ }, 8, ["variant", "onClick"]), _(a, {
462
465
  icon: "delete",
463
466
  size: "xs",
464
467
  label: w(N).pdfSignDelete,
465
- onClick: D((e) => ke(t.id), ["stop"])
466
- }, null, 8, ["label", "onClick"])], 32)], 64)) : f("", !0)], 46, ue))), 128))], 4)])]),
468
+ onClick: E((e) => Ae(t.id), ["stop"])
469
+ }, null, 8, ["label", "onClick"])], 32)], 64)) : p("", !0)], 46, de))), 128))], 4)])]),
467
470
  _: 1
468
471
  }, 8, ["src", "worker-src"]),
469
- g(n, {
472
+ _(n, {
470
473
  "model-value": !!U.value,
471
474
  title: U.value ? U.value.field.label ?? I(U.value.field.type) : "",
472
475
  "max-width": "560px",
473
- "onUpdate:modelValue": u[11] ||= (e) => {
476
+ "onUpdate:modelValue": l[11] ||= (e) => {
474
477
  e || (U.value = null);
475
478
  }
476
479
  }, {
477
- actions: E(() => [g(r, {
480
+ actions: T(() => [_(r, {
478
481
  variant: "text",
479
- onClick: u[10] ||= (e) => U.value = null
482
+ onClick: l[10] ||= (e) => U.value = null
480
483
  }, {
481
- default: E(() => [h(C(w(N).cancel), 1)]),
484
+ default: T(() => [g(C(w(N).cancel), 1)]),
482
485
  _: 1
483
- }), g(r, {
484
- disabled: !Se.value,
485
- onClick: Ce
486
+ }), _(r, {
487
+ disabled: !we.value,
488
+ onClick: Te
486
489
  }, {
487
- default: E(() => [h(C(Y.value ? w(N).pdfSignAdopt : w(N).ok), 1)]),
490
+ default: T(() => [g(C(J.value ? w(N).pdfSignAdopt : w(N).ok), 1)]),
488
491
  _: 1
489
492
  }, 8, ["disabled"])]),
490
- default: E(() => [U.value ? (b(), p("div", he, [Y.value ? (b(), p(l, { key: 0 }, [g(o, {
493
+ default: T(() => [U.value ? (b(), m("div", ge, [J.value ? (b(), m(u, { key: 0 }, [_(o, {
491
494
  modelValue: U.value.tab,
492
- "onUpdate:modelValue": u[4] ||= (e) => U.value.tab = e,
495
+ "onUpdate:modelValue": l[4] ||= (e) => U.value.tab = e,
493
496
  options: [{
494
497
  value: "draw",
495
498
  label: w(N).pdfSignDraw,
@@ -500,49 +503,49 @@ var oe = { class: "flex shrink-0 flex-wrap items-center gap-2 border-b border-ou
500
503
  icon: "keyboard"
501
504
  }],
502
505
  density: "compact"
503
- }, null, 8, ["modelValue", "options"]), U.value.tab === "draw" ? (b(), p("div", {
506
+ }, null, 8, ["modelValue", "options"]), U.value.tab === "draw" ? (b(), m("div", {
504
507
  key: 0,
505
508
  ref_key: "padBox",
506
509
  ref: K,
507
510
  class: "flex flex-col gap-2"
508
- }, [(b(), d(t, {
511
+ }, [(b(), f(t, {
509
512
  ref_key: "pad",
510
513
  ref: W,
511
514
  key: q.value,
512
515
  width: q.value,
513
516
  height: 180,
514
- onEnd: u[5] ||= (e) => G.value = !1,
515
- onChange: u[6] ||= (e) => G.value = !!W.value?.isEmpty()
516
- }, null, 8, ["width"])), g(r, {
517
+ onEnd: l[5] ||= (e) => G.value = !1,
518
+ onChange: l[6] ||= (e) => G.value = !!W.value?.isEmpty()
519
+ }, null, 8, ["width"])), _(r, {
517
520
  variant: "text",
518
521
  icon: "ink_eraser",
519
522
  class: "self-start",
520
- onClick: u[7] ||= (e) => {
523
+ onClick: l[7] ||= (e) => {
521
524
  W.value?.clear(), G.value = !0;
522
525
  }
523
526
  }, {
524
- default: E(() => [h(C(w(N).clear), 1)]),
527
+ default: T(() => [g(C(w(N).clear), 1)]),
525
528
  _: 1
526
- })], 512)) : (b(), p(l, { key: 1 }, [g(s, {
529
+ })], 512)) : (b(), m(u, { key: 1 }, [_(s, {
527
530
  modelValue: U.value.text,
528
- "onUpdate:modelValue": u[8] ||= (e) => U.value.text = e,
531
+ "onUpdate:modelValue": l[8] ||= (e) => U.value.text = e,
529
532
  label: I(U.value.field.type),
530
533
  autocomplete: "name"
531
- }, null, 8, ["modelValue", "label"]), m("div", {
534
+ }, null, 8, ["modelValue", "label"]), h("div", {
532
535
  class: "flex h-24 items-center overflow-hidden rounded-lg bg-surface-container-highest px-4 text-[2.5rem] text-[#1a237e] dark:text-[#c5cae9]",
533
536
  style: y({ fontFamily: j })
534
- }, C(U.value.text), 5)], 64))], 64)) : (b(), d(s, {
537
+ }, C(U.value.text), 5)], 64))], 64)) : (b(), f(s, {
535
538
  key: 1,
536
539
  modelValue: U.value.text,
537
- "onUpdate:modelValue": u[9] ||= (e) => U.value.text = e,
540
+ "onUpdate:modelValue": l[9] ||= (e) => U.value.text = e,
538
541
  label: U.value.field.label ?? I(U.value.field.type),
539
- onKeydown: re(Ce, ["enter"])
540
- }, null, 8, ["modelValue", "label"]))])) : f("", !0)]),
542
+ onKeydown: ae(Te, ["enter"])
543
+ }, null, 8, ["modelValue", "label"]))])) : p("", !0)]),
541
544
  _: 1
542
545
  }, 8, ["model-value", "title"])
543
546
  ], 16));
544
547
  }
545
548
  });
546
- export { M as MPdfSigner, O as fieldMissing, k as shownToUser, ae as signPdf };
549
+ export { M as MPdfSigner, D as fieldMissing, O as shownToUser, oe as signPdf };
547
550
 
548
551
  //# sourceMappingURL=pdf-sign.js.map