@m3ui-vue/m3ui-vue 1.5.1 → 1.6.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 (270) hide show
  1. package/dist/API.md +43 -32
  2. package/dist/{MButton-D_uxtJa-.js → MButton-CPghlKb0.js} +8 -9
  3. package/dist/MButton-CPghlKb0.js.map +1 -0
  4. package/dist/{MDialog-DT4KAPmn.js → MDialog-X50At1Gk.js} +38 -44
  5. package/dist/MDialog-X50At1Gk.js.map +1 -0
  6. package/dist/{MIcon-Bxh9j135.js → MIcon-DpajuUTJ.js} +2 -3
  7. package/dist/MIcon-DpajuUTJ.js.map +1 -0
  8. package/dist/{MIconButton-DoNotQ9v.js → MIconButton-BBggVwBV.js} +5 -6
  9. package/dist/MIconButton-BBggVwBV.js.map +1 -0
  10. package/dist/{MListItem-CwYrxpPZ.js → MListItem-DVi1j1QI.js} +8 -14
  11. package/dist/MListItem-DVi1j1QI.js.map +1 -0
  12. package/dist/{MLoadingIndicator-DhzECYRI.js → MLoadingIndicator-vooA3110.js} +3 -4
  13. package/dist/MLoadingIndicator-vooA3110.js.map +1 -0
  14. package/dist/{MMenuItem-Bih0h4-n.js → MMenuItem-CRNZkVVr.js} +13 -25
  15. package/dist/MMenuItem-CRNZkVVr.js.map +1 -0
  16. package/dist/{MProgressBar-BCoruxA-.js → MProgressBar-BWly1UKN.js} +3 -8
  17. package/dist/MProgressBar-BWly1UKN.js.map +1 -0
  18. package/dist/{MSeekBar-DQPF5FTp.js → MSeekBar-BL2W5_rD.js} +4 -5
  19. package/dist/MSeekBar-BL2W5_rD.js.map +1 -0
  20. package/dist/{MSegmentedButton-DL9JtJFX.js → MSegmentedButton-BEB4gXLA.js} +3 -4
  21. package/dist/MSegmentedButton-BEB4gXLA.js.map +1 -0
  22. package/dist/{MSlider-BvoMZTy9.js → MSlider-B9NcKTmZ.js} +22 -23
  23. package/dist/MSlider-B9NcKTmZ.js.map +1 -0
  24. package/dist/{MSpinner-CgcCQhS9.js → MSpinner-_XpTRkAg.js} +3 -4
  25. package/dist/MSpinner-_XpTRkAg.js.map +1 -0
  26. package/dist/{MTextField-BRntFeNR.js → MTextField-DpcPmR5B.js} +12 -16
  27. package/dist/MTextField-DpcPmR5B.js.map +1 -0
  28. package/dist/{MTooltip-YyF1CO75.js → MTooltip-BL3jPYPT.js} +10 -12
  29. package/dist/MTooltip-BL3jPYPT.js.map +1 -0
  30. package/dist/THIRD_PARTY_LICENSES.md +2 -2
  31. package/dist/{_plugin-vue_export-helper-B3ysoDQm.js → _plugin-vue_export-helper-Djzt4Yr7.js} +1 -2
  32. package/dist/{_storageKeys-CYXsUBwK.js → _storageKeys-C4W_4xK4.js} +2 -3
  33. package/dist/_storageKeys-C4W_4xK4.js.map +1 -0
  34. package/dist/{_useEscapeStack-CjndQhqg.js → _useEscapeStack-C5-BYr8y.js} +2 -3
  35. package/dist/_useEscapeStack-C5-BYr8y.js.map +1 -0
  36. package/dist/api.json +1 -1
  37. package/dist/barcode.js +1 -2
  38. package/dist/barcode.js.map +1 -1
  39. package/dist/chart.js +2 -4
  40. package/dist/chart.js.map +1 -1
  41. package/dist/code-editor.js +22 -23
  42. package/dist/code-editor.js.map +1 -1
  43. package/dist/{common-0dgrgaPL.js → common-kIb6A2Qu.js} +8 -37
  44. package/dist/common-kIb6A2Qu.js.map +1 -0
  45. package/dist/components/MAbsolute.vue.d.ts +5 -3
  46. package/dist/components/MAlert.vue.d.ts +8 -6
  47. package/dist/components/MAppBar.vue.d.ts +9 -7
  48. package/dist/components/MAppBarWithSearch.vue.d.ts +15 -13
  49. package/dist/components/MAppLayout.vue.d.ts +13 -11
  50. package/dist/components/MAspectRatio.vue.d.ts +5 -3
  51. package/dist/components/MAudioPlayer.vue.d.ts +22 -20
  52. package/dist/components/MAutocomplete.vue.d.ts +1 -1
  53. package/dist/components/MAvailabilityCalendar.vue.d.ts +19 -17
  54. package/dist/components/MBadge.vue.d.ts +6 -4
  55. package/dist/components/MBar.vue.d.ts +14 -12
  56. package/dist/components/MBarcode.vue.d.ts +5 -3
  57. package/dist/components/MBeforeAfter.vue.d.ts +12 -10
  58. package/dist/components/MBodyMap.vue.d.ts +1 -1
  59. package/dist/components/MBottomAppBar.vue.d.ts +10 -8
  60. package/dist/components/MBottomSheet.vue.d.ts +8 -6
  61. package/dist/components/MBottomSheetScaffold.vue.d.ts +9 -7
  62. package/dist/components/MBox.vue.d.ts +6 -4
  63. package/dist/components/MButton.vue.d.ts +7 -5
  64. package/dist/components/MCard.vue.d.ts +12 -10
  65. package/dist/components/MCenter.vue.d.ts +5 -3
  66. package/dist/components/MChatBubble.vue.d.ts +6 -4
  67. package/dist/components/MCheckbox.vue.d.ts +5 -3
  68. package/dist/components/MChip.vue.d.ts +9 -7
  69. package/dist/components/MCircleProgressBar.vue.d.ts +6 -4
  70. package/dist/components/MCodeEditor.vue.d.ts +5 -3
  71. package/dist/components/MContainer.vue.d.ts +6 -4
  72. package/dist/components/MContextMenu.vue.d.ts +8 -6
  73. package/dist/components/MCopyButton.vue.d.ts +1 -1
  74. package/dist/components/MDataTable.vue.d.ts +21 -19
  75. package/dist/components/MDialog.vue.d.ts +21 -19
  76. package/dist/components/MDragHandle.vue.d.ts +1 -1
  77. package/dist/components/MDrawCanvas.vue.d.ts +5 -3
  78. package/dist/components/MDrawToolbar.vue.d.ts +7 -5
  79. package/dist/components/MEmptyState.vue.d.ts +5 -3
  80. package/dist/components/MExpansionPanel.vue.d.ts +6 -4
  81. package/dist/components/MExportButton.vue.d.ts +7 -5
  82. package/dist/components/MFab.vue.d.ts +11 -9
  83. package/dist/components/MFabMenu.vue.d.ts +3 -3
  84. package/dist/components/MFixed.vue.d.ts +5 -3
  85. package/dist/components/MFlex.vue.d.ts +7 -5
  86. package/dist/components/MFloorPlan.vue.d.ts +3 -3
  87. package/dist/components/MFloorPlanInspector.vue.d.ts +32 -30
  88. package/dist/components/MFloorPlanToolbar.vue.d.ts +2 -2
  89. package/dist/components/MFlow.vue.d.ts +4 -4
  90. package/dist/components/MFlowControls.vue.d.ts +6 -4
  91. package/dist/components/MFlowHandle.vue.d.ts +1 -1
  92. package/dist/components/MFlowNode.vue.d.ts +11 -9
  93. package/dist/components/MFooter.vue.d.ts +12 -10
  94. package/dist/components/MFullscreen.vue.d.ts +5 -3
  95. package/dist/components/MGantt.vue.d.ts +33 -31
  96. package/dist/components/MGanttControls.vue.d.ts +8 -6
  97. package/dist/components/MGrid.vue.d.ts +6 -4
  98. package/dist/components/MIcon.vue.d.ts +5 -0
  99. package/dist/components/MIconButton.vue.d.ts +1 -1
  100. package/dist/components/MImageCropper.vue.d.ts +14 -12
  101. package/dist/components/MInfiniteScroll.vue.d.ts +11 -9
  102. package/dist/components/MList.vue.d.ts +5 -3
  103. package/dist/components/MListGroup.vue.d.ts +7 -5
  104. package/dist/components/MListItem.vue.d.ts +21 -19
  105. package/dist/components/MListSubheader.vue.d.ts +5 -3
  106. package/dist/components/MLoadingOverlay.vue.d.ts +10 -8
  107. package/dist/components/MMap.vue.d.ts +14 -6
  108. package/dist/components/MMapControl.vue.d.ts +12 -10
  109. package/dist/components/MMapFeatureInfo.vue.d.ts +11 -9
  110. package/dist/components/MMapIdentify.vue.d.ts +9 -7
  111. package/dist/components/MMapLayers.vue.d.ts +13 -11
  112. package/dist/components/MMapMarker.vue.d.ts +7 -5
  113. package/dist/components/MMapPopup.vue.d.ts +5 -3
  114. package/dist/components/MMasonry.vue.d.ts +5 -3
  115. package/dist/components/MMenu.vue.d.ts +12 -10
  116. package/dist/components/MMenuItem.vue.d.ts +11 -9
  117. package/dist/components/MMultiAutocomplete.vue.d.ts +1 -1
  118. package/dist/components/MMultiSelect.vue.d.ts +6 -4
  119. package/dist/components/MNavigationDrawer.vue.d.ts +14 -12
  120. package/dist/components/MNavigationRail.vue.d.ts +7 -5
  121. package/dist/components/MOdontogram.vue.d.ts +1 -1
  122. package/dist/components/MOrderBook.vue.d.ts +1 -1
  123. package/dist/components/MOverlay.vue.d.ts +5 -3
  124. package/dist/components/MPdfViewer.vue.d.ts +4 -4
  125. package/dist/components/MPhoneInput.vue.d.ts +11 -9
  126. package/dist/components/MPosKeypad.vue.d.ts +18 -16
  127. package/dist/components/MProgressBar.vue.d.ts +1 -1
  128. package/dist/components/MPullToRefresh.vue.d.ts +5 -3
  129. package/dist/components/MQRCode.vue.d.ts +7 -5
  130. package/dist/components/MRadioGroup.vue.d.ts +1 -1
  131. package/dist/components/MReceipt.vue.d.ts +2 -2
  132. package/dist/components/MRelative.vue.d.ts +5 -3
  133. package/dist/components/MResourceTimeline.vue.d.ts +31 -29
  134. package/dist/components/MResponsive.vue.d.ts +5 -3
  135. package/dist/components/MResult.vue.d.ts +7 -5
  136. package/dist/components/MScrollable.vue.d.ts +7 -5
  137. package/dist/components/MSearchBar.vue.d.ts +13 -11
  138. package/dist/components/MSearchField.vue.d.ts +7 -5
  139. package/dist/components/MSection.vue.d.ts +11 -9
  140. package/dist/components/MSeekBar.vue.d.ts +3 -3
  141. package/dist/components/MSelect.vue.d.ts +1 -1
  142. package/dist/components/MShader.vue.d.ts +11 -9
  143. package/dist/components/MShortNavigationBar.vue.d.ts +1 -1
  144. package/dist/components/MSideSheet.vue.d.ts +9 -7
  145. package/dist/components/MSimpleCarousel.vue.d.ts +1 -1
  146. package/dist/components/MSkeleton.vue.d.ts +2 -2
  147. package/dist/components/MSlider.vue.d.ts +3 -3
  148. package/dist/components/MSparkline.vue.d.ts +1 -1
  149. package/dist/components/MSplitButton.vue.d.ts +7 -5
  150. package/dist/components/MSplitter.vue.d.ts +9 -7
  151. package/dist/components/MSpotlightSearch.vue.d.ts +1 -1
  152. package/dist/components/MStack.vue.d.ts +8 -6
  153. package/dist/components/MStatCard.vue.d.ts +5 -3
  154. package/dist/components/MStepper.vue.d.ts +5 -3
  155. package/dist/components/MSticky.vue.d.ts +5 -3
  156. package/dist/components/MSubtitle.vue.d.ts +6 -4
  157. package/dist/components/MSwipeToDismiss.vue.d.ts +11 -9
  158. package/dist/components/MTable.vue.d.ts +17 -15
  159. package/dist/components/MText.vue.d.ts +5 -3
  160. package/dist/components/MTextField.vue.d.ts +6 -4
  161. package/dist/components/MTimePickerModal.vue.d.ts +1 -1
  162. package/dist/components/MTitle.vue.d.ts +6 -4
  163. package/dist/components/MToggleButton.vue.d.ts +5 -3
  164. package/dist/components/MToolbar.vue.d.ts +24 -22
  165. package/dist/components/MTooltip.vue.d.ts +10 -8
  166. package/dist/components/MTopAppBar.vue.d.ts +22 -20
  167. package/dist/components/MTour.vue.d.ts +28 -26
  168. package/dist/components/MTransition.vue.d.ts +5 -3
  169. package/dist/components/MTree.vue.d.ts +6 -4
  170. package/dist/components/MTreeTable.vue.d.ts +21 -19
  171. package/dist/components/MTypewriter.vue.d.ts +6 -4
  172. package/dist/components/MVirtualTable.vue.d.ts +8 -6
  173. package/dist/components/_MMapLayerItem.vue.d.ts +8 -6
  174. package/dist/components/_MPdfPage.vue.d.ts +2 -2
  175. package/dist/components/_MToolbarFab.vue.d.ts +5 -3
  176. package/dist/components/_MTreeNode.vue.d.ts +13 -11
  177. package/dist/composables/useMap.d.ts +8 -0
  178. package/dist/{dist-CrjSW5DN.js → dist-Bj5kEq8G.js} +4 -6
  179. package/dist/dist-Bj5kEq8G.js.map +1 -0
  180. package/dist/draw.js +62 -82
  181. package/dist/draw.js.map +1 -1
  182. package/dist/{emoji-names-de-BphO5XpV.js → emoji-names-de-Cu3OSpp6.js} +2 -3
  183. package/dist/emoji-names-de-Cu3OSpp6.js.map +1 -0
  184. package/dist/{emoji-names-en-9ZvMRvzi.js → emoji-names-en-BNX1pM9h.js} +2 -3
  185. package/dist/emoji-names-en-BNX1pM9h.js.map +1 -0
  186. package/dist/{emoji-names-es-DvfWU3Pj.js → emoji-names-es-C_Dafg4D.js} +2 -3
  187. package/dist/emoji-names-es-C_Dafg4D.js.map +1 -0
  188. package/dist/{emoji-names-fr-B-jhUlsP.js → emoji-names-fr-D4HTMFuM.js} +2 -3
  189. package/dist/emoji-names-fr-D4HTMFuM.js.map +1 -0
  190. package/dist/{emoji-names-ja-l8cMFJo1.js → emoji-names-ja-BCql-Sj6.js} +2 -3
  191. package/dist/emoji-names-ja-BCql-Sj6.js.map +1 -0
  192. package/dist/{emoji-names-ko-YP-o9G0c.js → emoji-names-ko-CT8L52nn.js} +2 -3
  193. package/dist/emoji-names-ko-CT8L52nn.js.map +1 -0
  194. package/dist/{emoji-names-pt-DGj_Js4M.js → emoji-names-pt-DHiwPiL-.js} +2 -3
  195. package/dist/emoji-names-pt-DHiwPiL-.js.map +1 -0
  196. package/dist/{emoji-names-zh-Dzecwtw_.js → emoji-names-zh-L3FXVief.js} +2 -3
  197. package/dist/emoji-names-zh-L3FXVief.js.map +1 -0
  198. package/dist/flow.js +351 -374
  199. package/dist/flow.js.map +1 -1
  200. package/dist/{flowPaths-CcWOKY4Z.js → flowPaths-BaH7yaUM.js} +3 -8
  201. package/dist/flowPaths-BaH7yaUM.js.map +1 -0
  202. package/dist/gantt.js +272 -333
  203. package/dist/gantt.js.map +1 -1
  204. package/dist/locales/index.js +1 -2
  205. package/dist/locales/index.js.map +1 -1
  206. package/dist/m3ui.js +168 -343
  207. package/dist/m3ui.js.map +1 -1
  208. package/dist/map.d.ts +1 -1
  209. package/dist/map.js +521 -520
  210. package/dist/map.js.map +1 -1
  211. package/dist/markdown.js +3 -4
  212. package/dist/markdown.js.map +1 -1
  213. package/dist/{material-color-utilities-C_iikgRm.js → material-color-utilities-CEFytLsr.js} +15 -32
  214. package/dist/material-color-utilities-CEFytLsr.js.map +1 -0
  215. package/dist/media.js +80 -94
  216. package/dist/media.js.map +1 -1
  217. package/dist/{motion-DZiXG09o.js → motion-BcejVTeX.js} +2 -3
  218. package/dist/motion-BcejVTeX.js.map +1 -0
  219. package/dist/pdf.js +103 -115
  220. package/dist/pdf.js.map +1 -1
  221. package/dist/qrcode.js +1 -2
  222. package/dist/qrcode.js.map +1 -1
  223. package/dist/rich-text-editor.js +33 -34
  224. package/dist/rich-text-editor.js.map +1 -1
  225. package/dist/terminal.js +2 -3
  226. package/dist/terminal.js.map +1 -1
  227. package/dist/{useLocale-DLcG3qPC.js → useLocale-COav9m8C.js} +2 -3
  228. package/dist/useLocale-COav9m8C.js.map +1 -0
  229. package/dist/{useThemeTokens-DQQcaWbE.js → useThemeTokens-DyAdPQB0.js} +6 -10
  230. package/dist/useThemeTokens-DyAdPQB0.js.map +1 -0
  231. package/package.json +32 -32
  232. package/src/__tests__/MFab.test.ts +10 -1
  233. package/src/__tests__/MMap.test.ts +16 -1
  234. package/src/__tests__/_fakeMaplibre.ts +2 -0
  235. package/src/components/MMap.vue +12 -3
  236. package/src/components/MMapMeasure.vue +3 -1
  237. package/src/composables/useMap.ts +17 -0
  238. package/src/composables/useMapLayers.ts +4 -1
  239. package/src/map.ts +1 -1
  240. package/dist/MButton-D_uxtJa-.js.map +0 -1
  241. package/dist/MDialog-DT4KAPmn.js.map +0 -1
  242. package/dist/MIcon-Bxh9j135.js.map +0 -1
  243. package/dist/MIconButton-DoNotQ9v.js.map +0 -1
  244. package/dist/MListItem-CwYrxpPZ.js.map +0 -1
  245. package/dist/MLoadingIndicator-DhzECYRI.js.map +0 -1
  246. package/dist/MMenuItem-Bih0h4-n.js.map +0 -1
  247. package/dist/MProgressBar-BCoruxA-.js.map +0 -1
  248. package/dist/MSeekBar-DQPF5FTp.js.map +0 -1
  249. package/dist/MSegmentedButton-DL9JtJFX.js.map +0 -1
  250. package/dist/MSlider-BvoMZTy9.js.map +0 -1
  251. package/dist/MSpinner-CgcCQhS9.js.map +0 -1
  252. package/dist/MTextField-BRntFeNR.js.map +0 -1
  253. package/dist/MTooltip-YyF1CO75.js.map +0 -1
  254. package/dist/_storageKeys-CYXsUBwK.js.map +0 -1
  255. package/dist/_useEscapeStack-CjndQhqg.js.map +0 -1
  256. package/dist/common-0dgrgaPL.js.map +0 -1
  257. package/dist/dist-CrjSW5DN.js.map +0 -1
  258. package/dist/emoji-names-de-BphO5XpV.js.map +0 -1
  259. package/dist/emoji-names-en-9ZvMRvzi.js.map +0 -1
  260. package/dist/emoji-names-es-DvfWU3Pj.js.map +0 -1
  261. package/dist/emoji-names-fr-B-jhUlsP.js.map +0 -1
  262. package/dist/emoji-names-ja-l8cMFJo1.js.map +0 -1
  263. package/dist/emoji-names-ko-YP-o9G0c.js.map +0 -1
  264. package/dist/emoji-names-pt-DGj_Js4M.js.map +0 -1
  265. package/dist/emoji-names-zh-Dzecwtw_.js.map +0 -1
  266. package/dist/flowPaths-CcWOKY4Z.js.map +0 -1
  267. package/dist/material-color-utilities-C_iikgRm.js.map +0 -1
  268. package/dist/motion-DZiXG09o.js.map +0 -1
  269. package/dist/useLocale-DLcG3qPC.js.map +0 -1
  270. package/dist/useThemeTokens-DQQcaWbE.js.map +0 -1
package/dist/gantt.js CHANGED
@@ -1,17 +1,16 @@
1
- import { i as e } from "./useLocale-DLcG3qPC.js";
2
- import { f as t, l as n, t as r, u as i } from "./MIconButton-DoNotQ9v.js";
3
- import { t as a } from "./MSegmentedButton-DL9JtJFX.js";
4
- import { t as o } from "./flowPaths-CcWOKY4Z.js";
1
+ import { t as e } from "./flowPaths-BaH7yaUM.js";
2
+ import { f as t, l as n, t as r, u as i } from "./MIconButton-BBggVwBV.js";
3
+ import { i as a } from "./useLocale-COav9m8C.js";
4
+ import { t as o } from "./MSegmentedButton-BEB4gXLA.js";
5
5
  import { Fragment as s, Teleport as c, computed as l, createBlock as u, createCommentVNode as d, createElementBlock as f, createElementVNode as p, createTextVNode as m, createVNode as h, defineComponent as g, inject as _, nextTick as v, normalizeClass as y, normalizeStyle as b, onBeforeUnmount as ee, onBeforeUpdate as te, onMounted as ne, onUpdated as re, openBlock as x, provide as ie, ref as S, renderList as C, renderSlot as ae, shallowRef as oe, toDisplayString as w, toRaw as se, unref as T, useSlots as ce, vModelText as le, watch as E, withDirectives as ue, withKeys as de, withModifiers as fe } from "vue";
6
- //#region src/composables/useGantt.ts
6
+ // src/composables/useGantt.ts
7
7
  var pe = Symbol("m3-gantt"), me = Symbol("m3-timeline-controls");
8
8
  function D() {
9
9
  let e = _(pe, null);
10
10
  if (!e) throw Error("useGantt() must be called inside <MGantt>");
11
11
  return e;
12
12
  }
13
- //#endregion
14
- //#region src/composables/_ganttTime.ts
13
+ // src/composables/_ganttTime.ts
15
14
  var he = 36e5, O = 864e5, k = [
16
15
  "hour",
17
16
  "day",
@@ -180,8 +179,7 @@ function Oe(e) {
180
179
  function R(e, t, n) {
181
180
  return t.includes(new Date(e).getDay()) && !n.has(M(e, !0));
182
181
  }
183
- //#endregion
184
- //#region src/composables/ganttSchedule.ts
182
+ // src/composables/ganttSchedule.ts
185
183
  function ke(e) {
186
184
  return typeof e == "string" ? {
187
185
  id: e,
@@ -393,7 +391,7 @@ function Pe(e, t = {}) {
393
391
  }
394
392
  function Fe(e, t = {}) {
395
393
  let { sums: n, kids: r, leaves: i, links: a } = W(e), o = /* @__PURE__ */ new Map();
396
- for (let t of e) (!n.has(t.id) || !r.has(t.id)) && o.set(t.id, B(t));
394
+ for (let t of e) n.has(t.id) && r.has(t.id) || o.set(t.id, B(t));
397
395
  let s = [...o.keys()].filter((e) => Number.isFinite(o.get(e).start));
398
396
  if (!s.length) return {
399
397
  tasks: [],
@@ -454,8 +452,7 @@ function Fe(e, t = {}) {
454
452
  finish: M(A(b?.start) ? P(y, -1) : y, A(b?.start))
455
453
  };
456
454
  }
457
- //#endregion
458
- //#region src/composables/_useTimeAxis.ts
455
+ // src/composables/_useTimeAxis.ts
459
456
  function Ie(e) {
460
457
  let t = (t) => Math.min(e.maxPxPerDay(), Math.max(e.minPxPerDay(), t)), n = S(t(e.pxPerDay() ?? xe[e.scale()])), r = l(() => Ee(n.value)), a = r.value;
461
458
  E(r, (t) => {
@@ -509,11 +506,7 @@ function Ie(e) {
509
506
  t.v += (-700 * (t.z - t.target) - 1.8 * Math.sqrt(700) * t.v) * e, t.z += t.v * e, n -= e;
510
507
  }
511
508
  let r = Math.abs(t.z - t.target) < .001 && Math.abs(t.v) < .01;
512
- if (x(Math.exp(r ? t.target : t.z), t.anchor, t.at), r) {
513
- b = 0, te = null;
514
- return;
515
- }
516
- b = requestAnimationFrame(p);
509
+ x(Math.exp(r ? t.target : t.z), t.anchor, t.at), r ? (b = 0, te = null) : b = requestAnimationFrame(p);
517
510
  };
518
511
  b = requestAnimationFrame(p);
519
512
  }
@@ -654,8 +647,7 @@ function Ie(e) {
654
647
  readView: M
655
648
  };
656
649
  }
657
- //#endregion
658
- //#region src/composables/_dragCursor.ts
650
+ // src/composables/_dragCursor.ts
659
651
  function Le(e) {
660
652
  let t = document.body;
661
653
  t.style.cursor = e, t.style.userSelect = "none", t.classList.add("m3-drag-cursor");
@@ -664,8 +656,7 @@ function Re() {
664
656
  let e = document.body;
665
657
  e.style.cursor = "", e.style.userSelect = "", e.classList.remove("m3-drag-cursor");
666
658
  }
667
- //#endregion
668
- //#region src/components/_MTimeHeader.vue?vue&type=script&setup=true&lang.ts
659
+ // src/components/_MTimeHeader.vue?vue&type=script&setup=true&lang.ts
669
660
  var ze = { class: "absolute inset-x-0 top-0 h-7" }, K = { class: "absolute inset-x-0 bottom-0 h-7" }, Be = /* @__PURE__ */ g({
670
661
  __name: "_MTimeHeader",
671
662
  props: {
@@ -860,8 +851,8 @@ var ze = { class: "absolute inset-x-0 top-0 h-7" }, K = { class: "absolute inset
860
851
  "change",
861
852
  "delete"
862
853
  ],
863
- setup(r, { expose: a, emit: g }) {
864
- let _ = r, D = g, he = ce(), k = e(), ge = l(() => _.locale ?? (k.lang === "en" ? void 0 : k.lang)), A = oe(_.tasks);
854
+ setup(r, { expose: o, emit: g }) {
855
+ let _ = r, D = g, he = ce(), k = a(), ge = l(() => _.locale ?? (k.lang === "en" ? void 0 : k.lang)), A = oe(_.tasks);
865
856
  E(() => _.tasks, (e) => {
866
857
  A.value = e;
867
858
  });
@@ -1040,18 +1031,14 @@ var ze = { class: "absolute inset-x-0 top-0 h-7" }, K = { class: "absolute inset
1040
1031
  let n = !1;
1041
1032
  for (let [r, i] of e) {
1042
1033
  let e = cn.get(r);
1043
- if (!e || t) {
1044
- cn.set(r, {
1045
- x: i.x,
1046
- w: i.w,
1047
- vx: 0,
1048
- vw: 0,
1049
- tx: i.x,
1050
- tw: i.w
1051
- });
1052
- continue;
1053
- }
1054
- (e.tx !== i.x || e.tw !== i.w) && (e.tx = i.x, e.tw = i.w, n = !0);
1034
+ !e || t ? cn.set(r, {
1035
+ x: i.x,
1036
+ w: i.w,
1037
+ vx: 0,
1038
+ vw: 0,
1039
+ tx: i.x,
1040
+ tw: i.w
1041
+ }) : (e.tx !== i.x || e.tw !== i.w) && (e.tx = i.x, e.tw = i.w, n = !0);
1055
1042
  }
1056
1043
  for (let t of cn.keys()) e.has(t) || cn.delete(t);
1057
1044
  n ? pn() : hn();
@@ -1157,11 +1144,11 @@ var ze = { class: "absolute inset-x-0 top-0 h-7" }, K = { class: "absolute inset
1157
1144
  let [r, i] = e.at(-1);
1158
1145
  return `${n} L${r},${i}`;
1159
1146
  }
1160
- function Cn(e, t) {
1161
- let n = vn.value.find((t) => t.key === e), r = n && xn(n);
1162
- if (!r) return;
1163
- let i = Sn(r), [a, s] = r.at(-1), c = n.type === "FS" || n.type === "SS", l = t.querySelectorAll("path");
1164
- l[0]?.setAttribute("d", i), l[1]?.setAttribute("d", i), l[2]?.setAttribute("d", o(a, s, c ? 0 : Math.PI, 7, !0));
1147
+ function Cn(t, n) {
1148
+ let r = vn.value.find((e) => e.key === t), i = r && xn(r);
1149
+ if (!i) return;
1150
+ let a = Sn(i), [o, s] = i.at(-1), c = r.type === "FS" || r.type === "SS", l = n.querySelectorAll("path");
1151
+ l[0]?.setAttribute("d", a), l[1]?.setAttribute("d", a), l[2]?.setAttribute("d", e(o, s, c ? 0 : Math.PI, 7, !0));
1165
1152
  }
1166
1153
  function wn(e, t) {
1167
1154
  t instanceof SVGGElement ? (un.set(e, t), Cn(e, t)) : un.delete(e);
@@ -1298,7 +1285,7 @@ var ze = { class: "absolute inset-x-0 top-0 h-7" }, K = { class: "absolute inset
1298
1285
  }, Yn(), r && n === "body" ? Ln = setTimeout(() => Zn(e), 250) : r && Zn(e);
1299
1286
  }
1300
1287
  function Kn(e) {
1301
- mr.value = null, !(e.button !== 0 || e.pointerType === "touch" || Un(e.target)) && (Wn(e), Q = {
1288
+ mr.value = null, e.button !== 0 || e.pointerType === "touch" || Un(e.target) || (Wn(e), Q = {
1302
1289
  kind: "pan",
1303
1290
  id: e.pointerId,
1304
1291
  sx: e.clientX,
@@ -1386,35 +1373,34 @@ var ze = { class: "absolute inset-x-0 top-0 h-7" }, K = { class: "absolute inset
1386
1373
  function Qn(e) {
1387
1374
  let t = Q;
1388
1375
  if (t && t.id === e.pointerId) {
1389
- if (Vn.x = e.clientX, Vn.y = e.clientY, t.kind === "split") {
1390
- Ot(Math.round(Math.min(Math.max(120, t.w + e.clientX - t.sx), Math.max(160, X.value.width - 80))));
1391
- return;
1392
- }
1393
- if (t.kind === "pan") return $n(t, e);
1394
- if (!t.active) {
1395
- let n = Math.hypot(e.clientX - t.sx, e.clientY - t.sy);
1396
- if (t.touch) {
1397
- n > 8 && (Q = null, Xn());
1398
- return;
1399
- }
1400
- if (n < 4) return;
1401
- if (Zn(e), !t.active) {
1402
- if (t.kind === "bar" && t.part === "body") {
1403
- let n = {
1404
- kind: "pan",
1405
- id: t.id,
1406
- sx: t.sx,
1407
- sy: t.sy,
1408
- sl: t.sl,
1409
- st: t.st,
1410
- moved: !1
1411
- };
1412
- Q = n, $n(n, e);
1376
+ if (Vn.x = e.clientX, Vn.y = e.clientY, t.kind === "split") Ot(Math.round(Math.min(Math.max(120, t.w + e.clientX - t.sx), Math.max(160, X.value.width - 80))));
1377
+ else {
1378
+ if (t.kind === "pan") return $n(t, e);
1379
+ if (!t.active) {
1380
+ let n = Math.hypot(e.clientX - t.sx, e.clientY - t.sy);
1381
+ if (t.touch) {
1382
+ n > 8 && (Q = null, Xn());
1383
+ return;
1384
+ }
1385
+ if (n < 4) return;
1386
+ if (Zn(e), !t.active) {
1387
+ if (t.kind === "bar" && t.part === "body") {
1388
+ let n = {
1389
+ kind: "pan",
1390
+ id: t.id,
1391
+ sx: t.sx,
1392
+ sy: t.sy,
1393
+ sl: t.sl,
1394
+ st: t.st,
1395
+ moved: !1
1396
+ };
1397
+ Q = n, $n(n, e);
1398
+ }
1399
+ return;
1413
1400
  }
1414
- return;
1415
1401
  }
1402
+ tr(e.clientX, e.clientY);
1416
1403
  }
1417
- tr(e.clientX, e.clientY);
1418
1404
  }
1419
1405
  }
1420
1406
  function $n(e, t) {
@@ -1779,17 +1765,12 @@ var ze = { class: "absolute inset-x-0 top-0 h-7" }, K = { class: "absolute inset
1779
1765
  let n = J.value[Math.max(0, Math.min(J.value.length - 1, t))];
1780
1766
  n && (zr(n.task.id), e.shiftKey ? G([.../* @__PURE__ */ new Set([...U.value, n.task.id])]) : G([n.task.id]), Xt(n.task.id));
1781
1767
  }, a = !_.readonly;
1782
- if (e.altKey && a && (e.key === "ArrowLeft" || e.key === "ArrowRight")) {
1783
- e.preventDefault(), t.draggable !== !1 && Br(t, e.key === "ArrowLeft" ? -1 : 1, e.shiftKey);
1784
- return;
1785
- }
1786
- if (e.altKey && a && (e.key === "ArrowUp" || e.key === "ArrowDown")) {
1768
+ if (e.altKey && a && (e.key === "ArrowLeft" || e.key === "ArrowRight")) e.preventDefault(), t.draggable !== !1 && Br(t, e.key === "ArrowLeft" ? -1 : 1, e.shiftKey);
1769
+ else if (e.altKey && a && (e.key === "ArrowUp" || e.key === "ArrowDown")) {
1787
1770
  e.preventDefault();
1788
1771
  let n = H.value.get(t.parentId && L.value.has(t.parentId) ? t.parentId : void 0) ?? [], r = n[n.findIndex((e) => e.id === t.id) + (e.key === "ArrowUp" ? -1 : 1)];
1789
1772
  r && ir(t.id, r.id, e.key === "ArrowUp" ? "before" : "after"), zr(t.id);
1790
- return;
1791
- }
1792
- if (r && a && (e.key === "]" || e.key === "[")) {
1773
+ } else if (r && a && (e.key === "]" || e.key === "[")) {
1793
1774
  if (e.preventDefault(), e.key === "]") {
1794
1775
  let e = H.value.get(t.parentId && L.value.has(t.parentId) ? t.parentId : void 0) ?? [], n = e[e.findIndex((e) => e.id === t.id) - 1];
1795
1776
  if (n) {
@@ -1798,21 +1779,10 @@ var ze = { class: "absolute inset-x-0 top-0 h-7" }, K = { class: "absolute inset
1798
1779
  }
1799
1780
  } else t.parentId && L.value.has(t.parentId) && ir(t.id, t.parentId, "after");
1800
1781
  zr(t.id);
1801
- return;
1802
- }
1803
- if (r && e.key.toLowerCase() === "z") {
1804
- e.preventDefault(), e.shiftKey ? Te() : we();
1805
- return;
1806
- }
1807
- if (r && e.key.toLowerCase() === "y") {
1808
- e.preventDefault(), Te();
1809
- return;
1810
- }
1811
- if (r && e.key.toLowerCase() === "a") {
1812
- e.preventDefault(), G(J.value.map((e) => e.task.id));
1813
- return;
1814
- }
1815
- switch (e.key) {
1782
+ } else if (r && e.key.toLowerCase() === "z") e.preventDefault(), e.shiftKey ? Te() : we();
1783
+ else if (r && e.key.toLowerCase() === "y") e.preventDefault(), Te();
1784
+ else if (r && e.key.toLowerCase() === "a") e.preventDefault(), G(J.value.map((e) => e.task.id));
1785
+ else switch (e.key) {
1816
1786
  case "ArrowDown":
1817
1787
  e.preventDefault(), i(n + 1);
1818
1788
  break;
@@ -1917,7 +1887,7 @@ var ze = { class: "absolute inset-x-0 top-0 h-7" }, K = { class: "absolute inset
1917
1887
  });
1918
1888
  }), ee(() => {
1919
1889
  Y.value?.removeEventListener("touchmove", dr), Xn(), ur(), cancelAnimationFrame(dn), clearTimeout(hr);
1920
- }), a(Wr), (e, t) => (x(), f("div", {
1890
+ }), o(Wr), (e, t) => (x(), f("div", {
1921
1891
  class: "m3-gantt flex flex-col overflow-hidden rounded-md bg-surface text-on-surface",
1922
1892
  onKeydown: Hr
1923
1893
  }, [
@@ -2310,10 +2280,10 @@ var ze = { class: "absolute inset-x-0 top-0 h-7" }, K = { class: "absolute inset
2310
2280
  default: !0
2311
2281
  }
2312
2282
  },
2313
- setup(t) {
2314
- let n = t, i = _(me, null);
2315
- if (!i) throw Error("MGanttControls must be inside <MGantt> or <MResourceTimeline>");
2316
- let o = i, c = e(), m = {
2283
+ setup(e) {
2284
+ let t = e, n = _(me, null);
2285
+ if (!n) throw Error("MGanttControls must be inside <MGantt> or <MResourceTimeline>");
2286
+ let i = n, c = a(), m = {
2317
2287
  hour: "ganttScaleHour",
2318
2288
  day: "ganttScaleDay",
2319
2289
  week: "ganttScaleWeek",
@@ -2326,73 +2296,73 @@ var ze = { class: "absolute inset-x-0 top-0 h-7" }, K = { class: "absolute inset
2326
2296
  ne(() => {
2327
2297
  v = window.matchMedia?.("(pointer: coarse)"), y(), v?.addEventListener?.("change", y);
2328
2298
  }), ee(() => v?.removeEventListener?.("change", y));
2329
- let b = l(() => g.value ? 48 : "sm"), te = l(() => n.list && !!o.hasList?.value && !!o.setGridCollapsed), re = l(() => n.scales.map((e) => ({
2299
+ let b = l(() => g.value ? 48 : "sm"), te = l(() => t.list && !!i.hasList?.value && !!i.setGridCollapsed), re = l(() => t.scales.map((e) => ({
2330
2300
  value: e,
2331
2301
  label: c[m[e]]
2332
2302
  })));
2333
- return (e, n) => (x(), f("div", bt, [
2303
+ return (t, n) => (x(), f("div", bt, [
2334
2304
  te.value ? (x(), u(r, {
2335
2305
  key: 0,
2336
2306
  size: b.value,
2337
- icon: T(o).gridCollapsed.value ? "left_panel_open" : "left_panel_close",
2338
- label: T(o).gridCollapsed.value ? T(c).ganttShowList : T(c).ganttHideList,
2339
- onClick: n[0] ||= (e) => T(o).setGridCollapsed(!T(o).gridCollapsed.value)
2307
+ icon: T(i).gridCollapsed.value ? "left_panel_open" : "left_panel_close",
2308
+ label: T(i).gridCollapsed.value ? T(c).ganttShowList : T(c).ganttHideList,
2309
+ onClick: n[0] ||= (e) => T(i).setGridCollapsed(!T(i).gridCollapsed.value)
2340
2310
  }, null, 8, [
2341
2311
  "size",
2342
2312
  "icon",
2343
2313
  "label"
2344
2314
  ])) : d("", !0),
2345
- ae(e.$slots, "default"),
2346
- re.value.length ? (x(), u(a, {
2315
+ ae(t.$slots, "default"),
2316
+ re.value.length ? (x(), u(o, {
2347
2317
  key: 1,
2348
- "model-value": T(o).scale.value,
2318
+ "model-value": T(i).scale.value,
2349
2319
  options: re.value,
2350
2320
  density: "compact",
2351
- "onUpdate:modelValue": n[1] ||= (e) => T(o).setScale(e)
2321
+ "onUpdate:modelValue": n[1] ||= (e) => T(i).setScale(e)
2352
2322
  }, null, 8, ["model-value", "options"])) : d("", !0),
2353
2323
  p("div", Y, [
2354
- t.zoom ? (x(), f(s, { key: 0 }, [h(r, {
2324
+ e.zoom ? (x(), f(s, { key: 0 }, [h(r, {
2355
2325
  size: b.value,
2356
2326
  icon: "zoom_out",
2357
2327
  label: T(c).ganttZoomOut,
2358
- onClick: n[2] ||= (e) => T(o).zoomOut()
2328
+ onClick: n[2] ||= (e) => T(i).zoomOut()
2359
2329
  }, null, 8, ["size", "label"]), h(r, {
2360
2330
  size: b.value,
2361
2331
  icon: "zoom_in",
2362
2332
  label: T(c).ganttZoomIn,
2363
- onClick: n[3] ||= (e) => T(o).zoomIn()
2333
+ onClick: n[3] ||= (e) => T(i).zoomIn()
2364
2334
  }, null, 8, ["size", "label"])], 64)) : d("", !0),
2365
- t.fit ? (x(), u(r, {
2335
+ e.fit ? (x(), u(r, {
2366
2336
  key: 1,
2367
2337
  size: b.value,
2368
2338
  icon: "fit_width",
2369
2339
  label: T(c).ganttFit,
2370
- onClick: n[4] ||= (e) => T(o).fit()
2340
+ onClick: n[4] ||= (e) => T(i).fit()
2371
2341
  }, null, 8, ["size", "label"])) : d("", !0),
2372
- t.today ? (x(), u(r, {
2342
+ e.today ? (x(), u(r, {
2373
2343
  key: 2,
2374
2344
  size: b.value,
2375
2345
  icon: "today",
2376
2346
  label: T(c).ganttToday,
2377
- onClick: n[5] ||= (e) => T(o).scrollToDate()
2347
+ onClick: n[5] ||= (e) => T(i).scrollToDate()
2378
2348
  }, null, 8, ["size", "label"])) : d("", !0),
2379
- t.fold && T(o).foldable.value ? (x(), u(r, {
2349
+ e.fold && T(i).foldable.value ? (x(), u(r, {
2380
2350
  key: 3,
2381
2351
  size: b.value,
2382
- icon: T(o).folded.value ? "unfold_more" : "unfold_less",
2383
- label: T(o).folded.value ? T(c).ganttExpandAll : T(c).ganttCollapseAll,
2384
- onClick: n[6] ||= (e) => T(o).folded.value ? T(o).expandAll() : T(o).collapseAll()
2352
+ icon: T(i).folded.value ? "unfold_more" : "unfold_less",
2353
+ label: T(i).folded.value ? T(c).ganttExpandAll : T(c).ganttCollapseAll,
2354
+ onClick: n[6] ||= (e) => T(i).folded.value ? T(i).expandAll() : T(i).collapseAll()
2385
2355
  }, null, 8, [
2386
2356
  "size",
2387
2357
  "icon",
2388
2358
  "label"
2389
2359
  ])) : d("", !0),
2390
- t.history && !T(o).readonly.value ? (x(), f(s, { key: 4 }, [h(r, {
2360
+ e.history && !T(i).readonly.value ? (x(), f(s, { key: 4 }, [h(r, {
2391
2361
  size: b.value,
2392
2362
  icon: "undo",
2393
2363
  label: T(c).ganttUndo,
2394
- disabled: !T(o).canUndo.value,
2395
- onClick: n[7] ||= (e) => T(o).undo()
2364
+ disabled: !T(i).canUndo.value,
2365
+ onClick: n[7] ||= (e) => T(i).undo()
2396
2366
  }, null, 8, [
2397
2367
  "size",
2398
2368
  "label",
@@ -2401,8 +2371,8 @@ var ze = { class: "absolute inset-x-0 top-0 h-7" }, K = { class: "absolute inset
2401
2371
  size: b.value,
2402
2372
  icon: "redo",
2403
2373
  label: T(c).ganttRedo,
2404
- disabled: !T(o).canRedo.value,
2405
- onClick: n[8] ||= (e) => T(o).redo()
2374
+ disabled: !T(i).canRedo.value,
2375
+ onClick: n[8] ||= (e) => T(i).redo()
2406
2376
  }, null, 8, [
2407
2377
  "size",
2408
2378
  "label",
@@ -2410,12 +2380,11 @@ var ze = { class: "absolute inset-x-0 top-0 h-7" }, K = { class: "absolute inset
2410
2380
  ])], 64)) : d("", !0)
2411
2381
  ]),
2412
2382
  n[9] ||= p("div", { class: "flex-1" }, null, -1),
2413
- ae(e.$slots, "end")
2383
+ ae(t.$slots, "end")
2414
2384
  ]));
2415
2385
  }
2416
2386
  });
2417
- //#endregion
2418
- //#region src/composables/ganttFormats.ts
2387
+ // src/composables/ganttFormats.ts
2419
2388
  function St(e) {
2420
2389
  let t = ke(e);
2421
2390
  return `${t.id}${t.type !== "FS" || t.lag ? ` ${t.type}` : ""}${t.lag ? t.lag > 0 ? `+${t.lag}` : String(t.lag) : ""}`;
@@ -2734,16 +2703,14 @@ function Vt(e, t = {}) {
2734
2703
  tasks: l
2735
2704
  };
2736
2705
  }
2737
- //#endregion
2738
- //#region src/composables/useResourceTimeline.ts
2706
+ // src/composables/useResourceTimeline.ts
2739
2707
  var Ht = Symbol("m3-resource-timeline");
2740
2708
  function Ut() {
2741
2709
  let e = _(Ht, null);
2742
2710
  if (!e) throw Error("useResourceTimeline() must be called inside <MResourceTimeline>");
2743
2711
  return e;
2744
2712
  }
2745
- //#endregion
2746
- //#region src/components/MResourceTimeline.vue?vue&type=script&setup=true&lang.ts
2713
+ // src/components/MResourceTimeline.vue?vue&type=script&setup=true&lang.ts
2747
2714
  var Wt = ["aria-label"], Gt = ["aria-expanded", "onClick"], Kt = { class: "truncate" }, qt = { class: "ml-auto pr-2 text-label-medium text-on-surface-variant" }, Jt = ["src"], Yt = {
2748
2715
  key: 0,
2749
2716
  class: "material-symbols-outlined text-[20px]"
@@ -2811,9 +2778,9 @@ var Wt = ["aria-label"], Gt = ["aria-expanded", "onClick"], Kt = { class: "trunc
2811
2778
  "conflict",
2812
2779
  "delete"
2813
2780
  ],
2814
- setup(t, { expose: n, emit: r }) {
2815
- let a = t, o = r, c = e(), u = l(() => a.locale ?? (c.lang === "en" ? void 0 : c.lang)), g = oe(a.events);
2816
- E(() => a.events, (e) => {
2781
+ setup(e, { expose: t, emit: n }) {
2782
+ let r = e, o = n, c = a(), u = l(() => r.locale ?? (c.lang === "en" ? void 0 : c.lang)), g = oe(r.events);
2783
+ E(() => r.events, (e) => {
2817
2784
  g.value = e;
2818
2785
  });
2819
2786
  let _ = oe(null), te = l(() => _.value ?? g.value), re = [], ce = [], le = S(0);
@@ -2831,8 +2798,8 @@ var Wt = ["aria-label"], Gt = ["aria-expanded", "onClick"], Kt = { class: "trunc
2831
2798
  let e = ce.pop();
2832
2799
  e && (re.push(se(g.value)), le.value++, ue(e));
2833
2800
  }
2834
- let ge = l(() => (le.value, re.length > 0)), A = l(() => (le.value, ce.length > 0)), _e = l(() => new Map(te.value.map((e) => [e.id, e]))), N = l(() => new Map(a.resources.map((e) => [e.id, e]))), P = S(a.selection ?? []);
2835
- E(() => a.selection, (e) => {
2801
+ let ge = l(() => (le.value, re.length > 0)), A = l(() => (le.value, ce.length > 0)), _e = l(() => new Map(te.value.map((e) => [e.id, e]))), N = l(() => new Map(r.resources.map((e) => [e.id, e]))), P = S(r.selection ?? []);
2802
+ E(() => r.selection, (e) => {
2836
2803
  e && (P.value = e);
2837
2804
  });
2838
2805
  let ve = l(() => new Set(P.value));
@@ -2840,8 +2807,8 @@ var Wt = ["aria-label"], Gt = ["aria-expanded", "onClick"], Kt = { class: "trunc
2840
2807
  let t = e.filter((e) => _e.value.get(e)?.selectable !== !1);
2841
2808
  P.value = t, o("update:selection", t);
2842
2809
  }
2843
- let ye = S(a.collapsed ?? []);
2844
- E(() => a.collapsed, (e) => {
2810
+ let ye = S(r.collapsed ?? []);
2811
+ E(() => r.collapsed, (e) => {
2845
2812
  e && (ye.value = e);
2846
2813
  });
2847
2814
  let xe = l(() => new Set(ye.value));
@@ -2893,37 +2860,31 @@ var Wt = ["aria-label"], Gt = ["aria-expanded", "onClick"], Kt = { class: "trunc
2893
2860
  return e;
2894
2861
  }), L = l(() => new Set(De.value.keys())), R = l(() => {
2895
2862
  let e = [], t = /* @__PURE__ */ new Map(), n = [];
2896
- for (let e of a.resources) {
2897
- if (!e.group) {
2898
- n.push(e);
2899
- continue;
2900
- }
2901
- t.has(e.group) || (t.set(e.group, []), n.push(e.group)), t.get(e.group).push(e);
2902
- }
2903
- let r = 0, i = (t) => {
2904
- let n = Math.max(a.rowHeight, (Te.value.count.get(t.id) ?? 1) * a.laneHeight + 8);
2863
+ for (let e of r.resources) e.group ? (t.has(e.group) || (t.set(e.group, []), n.push(e.group)), t.get(e.group).push(e)) : n.push(e);
2864
+ let i = 0, a = (t) => {
2865
+ let n = Math.max(r.rowHeight, (Te.value.count.get(t.id) ?? 1) * r.laneHeight + 8);
2905
2866
  e.push({
2906
2867
  kind: "resource",
2907
2868
  key: t.id,
2908
2869
  resource: t,
2909
- top: r,
2870
+ top: i,
2910
2871
  height: n
2911
- }), r += n;
2872
+ }), i += n;
2912
2873
  };
2913
- for (let a of n) {
2914
- if (typeof a != "string") {
2915
- i(a);
2874
+ for (let r of n) {
2875
+ if (typeof r != "string") {
2876
+ a(r);
2916
2877
  continue;
2917
2878
  }
2918
- let n = t.get(a);
2879
+ let n = t.get(r);
2919
2880
  e.push({
2920
2881
  kind: "group",
2921
- key: `group:${a}`,
2922
- group: a,
2923
- top: r,
2882
+ key: `group:${r}`,
2883
+ group: r,
2884
+ top: i,
2924
2885
  height: ln,
2925
2886
  resources: n
2926
- }), r += ln, xe.value.has(a) || n.forEach(i);
2887
+ }), i += ln, xe.value.has(r) || n.forEach(a);
2927
2888
  }
2928
2889
  return e;
2929
2890
  }), ke = l(() => {
@@ -2933,14 +2894,14 @@ var Wt = ["aria-label"], Gt = ["aria-expanded", "onClick"], Kt = { class: "trunc
2933
2894
  }), Ae = l(() => {
2934
2895
  let e = R.value.at(-1);
2935
2896
  return e ? e.top + e.height : 0;
2936
- }), z = (e) => N.value.get(e)?.group, V = S(), Me = S(a.listWidth ?? 220);
2937
- E(() => a.listWidth, (e) => {
2897
+ }), z = (e) => N.value.get(e)?.group, V = S(), Me = S(r.listWidth ?? 220);
2898
+ E(() => r.listWidth, (e) => {
2938
2899
  e !== void 0 && (Me.value = e);
2939
2900
  });
2940
2901
  let H = l(() => Me.value), Ne = l(() => {
2941
2902
  let e = Infinity, t = -Infinity;
2942
2903
  for (let n of I.value.values()) e = Math.min(e, n.start), t = Math.max(t, n.end);
2943
- let n = a.start ? j(a.start) : a.now ? j(a.now) : Date.now();
2904
+ let n = r.start ? j(r.start) : r.now ? j(r.now) : Date.now();
2944
2905
  return Number.isFinite(e) || (e = n, t = n + O), {
2945
2906
  min: Math.min(e, n),
2946
2907
  max: Math.max(t, n + O)
@@ -2950,15 +2911,15 @@ var Wt = ["aria-label"], Gt = ["aria-expanded", "onClick"], Kt = { class: "trunc
2950
2911
  listWidth: H,
2951
2912
  headerHeight: un,
2952
2913
  extent: Ne,
2953
- scale: () => a.scale,
2954
- pxPerDay: () => a.pxPerDay,
2955
- minPxPerDay: () => a.minPxPerDay,
2956
- maxPxPerDay: () => a.maxPxPerDay,
2957
- weekStartsOn: () => a.weekStartsOn,
2914
+ scale: () => r.scale,
2915
+ pxPerDay: () => r.pxPerDay,
2916
+ minPxPerDay: () => r.minPxPerDay,
2917
+ maxPxPerDay: () => r.maxPxPerDay,
2918
+ weekStartsOn: () => r.weekStartsOn,
2958
2919
  lang: u,
2959
2920
  quarterLabel: () => c.ganttQuarter,
2960
- today: () => a.now,
2961
- calendar: () => a.calendar ?? { workingDays: [
2921
+ today: () => r.now,
2922
+ calendar: () => r.calendar ?? { workingDays: [
2962
2923
  0,
2963
2924
  1,
2964
2925
  2,
@@ -2967,7 +2928,7 @@ var Wt = ["aria-label"], Gt = ["aria-expanded", "onClick"], Kt = { class: "trunc
2967
2928
  5,
2968
2929
  6
2969
2930
  ] },
2970
- workHours: () => a.workHours,
2931
+ workHours: () => r.workHours,
2971
2932
  onScale: (e) => o("update:scale", e),
2972
2933
  onPinch: () => {
2973
2934
  q && X({ pointerId: q.id });
@@ -2985,12 +2946,12 @@ var Wt = ["aria-label"], Gt = ["aria-expanded", "onClick"], Kt = { class: "trunc
2985
2946
  });
2986
2947
  }
2987
2948
  return e;
2988
- }), tt = l(() => a.laneHeight - 8), nt = l(() => {
2949
+ }), tt = l(() => r.laneHeight - 8), nt = l(() => {
2989
2950
  let e = /* @__PURE__ */ new Map();
2990
2951
  for (let t of te.value) {
2991
- let n = I.value.get(t.id), r = ke.value.get(t.resourceId);
2992
- if (!n || !r) continue;
2993
- let i = (Te.value.count.get(t.resourceId) ?? 1) * a.laneHeight, o = r.top + (r.height - i) / 2 + (Te.value.lane.get(t.id) ?? 0) * a.laneHeight + 4;
2952
+ let n = I.value.get(t.id), i = ke.value.get(t.resourceId);
2953
+ if (!n || !i) continue;
2954
+ let a = (Te.value.count.get(t.resourceId) ?? 1) * r.laneHeight, o = i.top + (i.height - a) / 2 + (Te.value.lane.get(t.id) ?? 0) * r.laneHeight + 4;
2994
2955
  e.set(t.id, {
2995
2956
  x: K(n.start),
2996
2957
  y: o,
@@ -3011,33 +2972,25 @@ var Wt = ["aria-label"], Gt = ["aria-expanded", "onClick"], Kt = { class: "trunc
3011
2972
  let n = !1;
3012
2973
  for (let [r, i] of e) {
3013
2974
  let e = rt.get(r);
3014
- if (!e || t) {
3015
- rt.set(r, {
3016
- ...i,
3017
- vx: 0,
3018
- vy: 0,
3019
- vw: 0,
3020
- tx: i.x,
3021
- ty: i.y,
3022
- tw: i.w
3023
- });
3024
- continue;
3025
- }
3026
- if (ft.value?.id === r && ft.value.part === "body") {
3027
- Object.assign(e, {
3028
- x: i.x,
3029
- y: i.y,
3030
- w: i.w,
3031
- tx: i.x,
3032
- ty: i.y,
3033
- tw: i.w,
3034
- vx: 0,
3035
- vy: 0,
3036
- vw: 0
3037
- });
3038
- continue;
3039
- }
3040
- (e.tx !== i.x || e.ty !== i.y || e.tw !== i.w) && (e.tx = i.x, e.ty = i.y, e.tw = i.w, n = !0);
2975
+ !e || t ? rt.set(r, {
2976
+ ...i,
2977
+ vx: 0,
2978
+ vy: 0,
2979
+ vw: 0,
2980
+ tx: i.x,
2981
+ ty: i.y,
2982
+ tw: i.w
2983
+ }) : ft.value?.id === r && ft.value.part === "body" ? Object.assign(e, {
2984
+ x: i.x,
2985
+ y: i.y,
2986
+ w: i.w,
2987
+ tx: i.x,
2988
+ ty: i.y,
2989
+ tw: i.w,
2990
+ vx: 0,
2991
+ vy: 0,
2992
+ vw: 0
2993
+ }) : (e.tx !== i.x || e.ty !== i.y || e.tw !== i.w) && (e.tx = i.x, e.ty = i.y, e.tw = i.w, n = !0);
3041
2994
  }
3042
2995
  for (let t of rt.keys()) e.has(t) || rt.delete(t);
3043
2996
  n ? st() : lt();
@@ -3077,8 +3030,8 @@ var Wt = ["aria-label"], Gt = ["aria-expanded", "onClick"], Kt = { class: "trunc
3077
3030
  function ut(e, t) {
3078
3031
  t instanceof HTMLElement ? (it.set(e, t), ct(e, t)) : it.delete(e);
3079
3032
  }
3080
- let q = null, dt, ft = S(null), pt = S(!1), mt = S(a.listWidth ?? 220);
3081
- E(() => a.listWidth, (e) => {
3033
+ let q = null, dt, ft = S(null), pt = S(!1), mt = S(r.listWidth ?? 220);
3034
+ E(() => r.listWidth, (e) => {
3082
3035
  e !== void 0 && (mt.value = e);
3083
3036
  });
3084
3037
  function ht(e) {
@@ -3103,7 +3056,7 @@ var Wt = ["aria-label"], Gt = ["aria-expanded", "onClick"], Kt = { class: "trunc
3103
3056
  return t?.kind === "resource" ? t.resource : void 0;
3104
3057
  }
3105
3058
  function xt(e) {
3106
- return e ? 1440 : a.snap ?? (W.value >= 192 ? 15 : Oe(W.value));
3059
+ return e ? 1440 : r.snap ?? (W.value >= 192 ? 15 : Oe(W.value));
3107
3060
  }
3108
3061
  function St(e, t, n) {
3109
3062
  if (e.button !== 0 || yt(e.target)) return;
@@ -3129,34 +3082,26 @@ var Wt = ["aria-label"], Gt = ["aria-expanded", "onClick"], Kt = { class: "trunc
3129
3082
  function Ct(e) {
3130
3083
  if (e.button !== 0 || yt(e.target)) return;
3131
3084
  J(e);
3132
- let t = bt(e.clientX, e.clientY), n = Y(t.y), r = e.pointerType === "touch";
3133
- if (n && a.creatable && !a.readonly) {
3134
- q = {
3135
- kind: "empty",
3136
- id: e.pointerId,
3137
- resourceId: n.id,
3138
- sx: e.clientX,
3139
- sy: e.clientY,
3140
- t0: Ve(t.x),
3141
- touch: r,
3142
- active: !1
3143
- }, Tt(), r && (dt = setTimeout(() => Dt(), 350));
3144
- return;
3145
- }
3146
- if (r) {
3147
- n && (q = {
3148
- kind: "empty",
3149
- id: e.pointerId,
3150
- resourceId: n.id,
3151
- sx: e.clientX,
3152
- sy: e.clientY,
3153
- t0: Ve(t.x),
3154
- touch: r,
3155
- active: !1
3156
- }, Tt());
3157
- return;
3158
- }
3159
- q = {
3085
+ let t = bt(e.clientX, e.clientY), n = Y(t.y), i = e.pointerType === "touch";
3086
+ n && r.creatable && !r.readonly ? (q = {
3087
+ kind: "empty",
3088
+ id: e.pointerId,
3089
+ resourceId: n.id,
3090
+ sx: e.clientX,
3091
+ sy: e.clientY,
3092
+ t0: Ve(t.x),
3093
+ touch: i,
3094
+ active: !1
3095
+ }, Tt(), i && (dt = setTimeout(() => Dt(), 350))) : i ? n && (q = {
3096
+ kind: "empty",
3097
+ id: e.pointerId,
3098
+ resourceId: n.id,
3099
+ sx: e.clientX,
3100
+ sy: e.clientY,
3101
+ t0: Ve(t.x),
3102
+ touch: i,
3103
+ active: !1
3104
+ }, Tt()) : (q = {
3160
3105
  kind: "pan",
3161
3106
  id: e.pointerId,
3162
3107
  sx: e.clientX,
@@ -3165,7 +3110,7 @@ var Wt = ["aria-label"], Gt = ["aria-expanded", "onClick"], Kt = { class: "trunc
3165
3110
  st: V.value.scrollTop,
3166
3111
  moved: !1,
3167
3112
  resourceId: n?.id
3168
- }, Tt();
3113
+ }, Tt());
3169
3114
  }
3170
3115
  function wt(e) {
3171
3116
  e.button === 0 && (e.preventDefault(), q = {
@@ -3186,13 +3131,13 @@ var Wt = ["aria-label"], Gt = ["aria-expanded", "onClick"], Kt = { class: "trunc
3186
3131
  if (!(!e || e.kind !== "event" && e.kind !== "empty" || e.active)) {
3187
3132
  if (e.kind === "event") {
3188
3133
  let t = _e.value.get(e.eventId);
3189
- if (!t || a.readonly || e.part === "body" && t.draggable === !1 || e.part !== "body" && t.resizable === !1) return;
3134
+ if (!t || r.readonly || e.part === "body" && t.draggable === !1 || e.part !== "body" && t.resizable === !1) return;
3190
3135
  e.active = !0, ve.value.has(t.id) || F([t.id]), ft.value = {
3191
3136
  id: t.id,
3192
3137
  part: e.part
3193
3138
  };
3194
3139
  } else {
3195
- if (!a.creatable || a.readonly) return;
3140
+ if (!r.creatable || r.readonly) return;
3196
3141
  e.active = !0;
3197
3142
  let t = xt(!1) * 6e4, n = be(e.t0, xt(!1));
3198
3143
  gt.value = {
@@ -3207,35 +3152,34 @@ var Wt = ["aria-label"], Gt = ["aria-expanded", "onClick"], Kt = { class: "trunc
3207
3152
  function Ot(e) {
3208
3153
  let t = q;
3209
3154
  if (t && t.id === e.pointerId) {
3210
- if (vt.x = e.clientX, vt.y = e.clientY, t.kind === "split") {
3211
- ht(Math.round(Math.min(Math.max(0, t.w + e.clientX - t.sx), Math.max(160, G.value.width - 80))));
3212
- return;
3213
- }
3214
- if (t.kind === "pan") return kt(t, e);
3215
- if (!t.active) {
3216
- let n = Math.hypot(e.clientX - t.sx, e.clientY - t.sy);
3217
- if (t.touch) {
3218
- n > 8 && (q = null, Et());
3219
- return;
3220
- }
3221
- if (n < 4) return;
3222
- if (Dt(), !t.active) {
3223
- if (t.kind === "event" && t.part === "body") {
3224
- let n = {
3225
- kind: "pan",
3226
- id: t.id,
3227
- sx: t.sx,
3228
- sy: t.sy,
3229
- sl: t.sl,
3230
- st: t.st,
3231
- moved: !0
3232
- };
3233
- q = n, Le("grabbing"), kt(n, e);
3155
+ if (vt.x = e.clientX, vt.y = e.clientY, t.kind === "split") ht(Math.round(Math.min(Math.max(0, t.w + e.clientX - t.sx), Math.max(160, G.value.width - 80))));
3156
+ else {
3157
+ if (t.kind === "pan") return kt(t, e);
3158
+ if (!t.active) {
3159
+ let n = Math.hypot(e.clientX - t.sx, e.clientY - t.sy);
3160
+ if (t.touch) {
3161
+ n > 8 && (q = null, Et());
3162
+ return;
3163
+ }
3164
+ if (n < 4) return;
3165
+ if (Dt(), !t.active) {
3166
+ if (t.kind === "event" && t.part === "body") {
3167
+ let n = {
3168
+ kind: "pan",
3169
+ id: t.id,
3170
+ sx: t.sx,
3171
+ sy: t.sy,
3172
+ sl: t.sl,
3173
+ st: t.st,
3174
+ moved: !0
3175
+ };
3176
+ q = n, Le("grabbing"), kt(n, e);
3177
+ }
3178
+ return;
3234
3179
  }
3235
- return;
3236
3180
  }
3181
+ At(e.clientX, e.clientY);
3237
3182
  }
3238
- At(e.clientX, e.clientY);
3239
3183
  }
3240
3184
  }
3241
3185
  function kt(e, t) {
@@ -3245,50 +3189,50 @@ var Wt = ["aria-label"], Gt = ["aria-expanded", "onClick"], Kt = { class: "trunc
3245
3189
  function At(e, t) {
3246
3190
  let n = q;
3247
3191
  if (!n || n.kind !== "event" && n.kind !== "empty" || !n.active) return;
3248
- let r = bt(e, t);
3192
+ let i = bt(e, t);
3249
3193
  if (n.kind === "empty") {
3250
- let e = xt(!1), t = be(n.t0, e), i = be(Ve(r.x), e), a = Math.max(e * 6e4, 9e5);
3194
+ let e = xt(!1), t = be(n.t0, e), r = be(Ve(i.x), e), a = Math.max(e * 6e4, 9e5);
3251
3195
  gt.value = {
3252
3196
  resourceId: n.resourceId,
3253
- start: Math.min(t, i),
3254
- end: Math.max(Math.max(t, i), Math.min(t, i) + a)
3197
+ start: Math.min(t, r),
3198
+ end: Math.max(Math.max(t, r), Math.min(t, r) + a)
3255
3199
  };
3256
3200
  return;
3257
3201
  }
3258
- let i = g.value.find((e) => e.id === n.eventId);
3259
- if (!i) return;
3202
+ let a = g.value.find((e) => e.id === n.eventId);
3203
+ if (!a) return;
3260
3204
  let o = n.span, s = (e - n.sx + (V.value.scrollLeft - n.sl)) / W.value * O, c = xt(o.dateOnly), l = o.dateOnly ? O : c * 6e4, u;
3261
3205
  if (n.part === "body") {
3262
- let e = be(o.start + s, c), t = Y(r.y), n = t && !a.readonly ? t.id : i.resourceId;
3206
+ let e = be(o.start + s, c), t = Y(i.y), n = t && !r.readonly ? t.id : a.resourceId;
3263
3207
  u = {
3264
- ...i,
3208
+ ...a,
3265
3209
  ...je({
3266
- start: i.start,
3267
- end: i.end
3210
+ start: a.start,
3211
+ end: a.end
3268
3212
  }, e, e + (o.end - o.start)),
3269
3213
  resourceId: n
3270
3214
  };
3271
3215
  } else if (n.part === "start") {
3272
3216
  let e = Math.min(be(o.start + s, c), o.end - l);
3273
3217
  u = {
3274
- ...i,
3218
+ ...a,
3275
3219
  ...je({
3276
- start: i.start,
3277
- end: i.end
3220
+ start: a.start,
3221
+ end: a.end
3278
3222
  }, e, o.end)
3279
3223
  };
3280
3224
  } else {
3281
3225
  let e = Math.max(be(o.end + s, c), o.start + l);
3282
3226
  u = {
3283
- ...i,
3227
+ ...a,
3284
3228
  ...je({
3285
- start: i.start,
3286
- end: i.end
3229
+ start: a.start,
3230
+ end: a.end
3287
3231
  }, o.start, e)
3288
3232
  };
3289
3233
  }
3290
- let d = g.value.map((e) => e.id === i.id ? u : e);
3291
- _.value = d, _t.value = a.overlap === "prevent" && jt(u, d).length > 0;
3234
+ let d = g.value.map((e) => e.id === a.id ? u : e);
3235
+ _.value = d, _t.value = r.overlap === "prevent" && jt(u, d).length > 0;
3292
3236
  }
3293
3237
  function jt(e, t) {
3294
3238
  let n = /* @__PURE__ */ new Map(), r = t.filter((t) => t.resourceId === e.resourceId);
@@ -3329,24 +3273,24 @@ var Wt = ["aria-label"], Gt = ["aria-expanded", "onClick"], Kt = { class: "trunc
3329
3273
  n.selectable !== !1 && (e.shiftKey || e.ctrlKey || e.metaKey ? F(ve.value.has(n.id) ? P.value.filter((e) => e !== n.id) : [...P.value, n.id]) : F([n.id])), o("event-click", n, e);
3330
3274
  return;
3331
3275
  }
3332
- let r = _.value;
3276
+ let i = _.value;
3333
3277
  _.value = null;
3334
- let i = r?.find((e) => e.id === t.eventId), s = g.value.find((e) => e.id === t.eventId);
3335
- if (_t.value = !1, r && i && s && (i.start !== s.start || i.end !== s.end || i.resourceId !== s.resourceId)) {
3336
- if (a.overlap === "prevent") {
3337
- let e = jt(i, r);
3278
+ let a = i?.find((e) => e.id === t.eventId), s = g.value.find((e) => e.id === t.eventId);
3279
+ if (_t.value = !1, i && a && s && (a.start !== s.start || a.end !== s.end || a.resourceId !== s.resourceId)) {
3280
+ if (r.overlap === "prevent") {
3281
+ let e = jt(a, i);
3338
3282
  if (e.length) {
3339
3283
  o("conflict", {
3340
- event: i,
3284
+ event: a,
3341
3285
  with: e
3342
3286
  }), Lt(c.timelineConflict);
3343
3287
  return;
3344
3288
  }
3345
3289
  }
3346
- pe(r), o("change", {
3347
- events: [i],
3290
+ pe(i), o("change", {
3291
+ events: [a],
3348
3292
  kind: t.part === "body" ? "move" : "resize"
3349
- }), Bt(i);
3293
+ }), Bt(a);
3350
3294
  }
3351
3295
  }
3352
3296
  function X(e) {
@@ -3410,7 +3354,7 @@ var Wt = ["aria-label"], Gt = ["aria-expanded", "onClick"], Kt = { class: "trunc
3410
3354
  }
3411
3355
  async function fn(e) {
3412
3356
  let t = g.value.filter((t) => e.includes(t.id) && t.deletable !== !1);
3413
- if (!t.length || a.beforeDelete && !await a.beforeDelete(t)) return;
3357
+ if (!t.length || r.beforeDelete && !await r.beforeDelete(t)) return;
3414
3358
  let n = new Set(t.map((e) => e.id));
3415
3359
  pe(g.value.filter((e) => !n.has(e.id))), F(P.value.filter((e) => !n.has(e))), o("delete", { events: t }), Lt(c.ganttDeleted.replace("{count}", String(t.length)));
3416
3360
  }
@@ -3431,16 +3375,16 @@ var Wt = ["aria-label"], Gt = ["aria-expanded", "onClick"], Kt = { class: "trunc
3431
3375
  e.preventDefault(), o("event-dblclick", t, e);
3432
3376
  return;
3433
3377
  }
3434
- if (a.readonly) return;
3378
+ if (r.readonly) return;
3435
3379
  if (e.key === "Delete" || e.key === "Backspace") {
3436
3380
  e.preventDefault(), fn(ve.value.has(t.id) ? P.value : [t.id]);
3437
3381
  return;
3438
3382
  }
3439
- let r = I.value.get(t.id);
3440
- if (!r) return;
3441
- let i = r.dateOnly ? O : xt(!1) * 6e4, s = null;
3383
+ let i = I.value.get(t.id);
3384
+ if (!i) return;
3385
+ let a = i.dateOnly ? O : xt(!1) * 6e4, s = null;
3442
3386
  if ((e.key === "ArrowLeft" || e.key === "ArrowRight") && t.draggable !== !1) {
3443
- let n = e.key === "ArrowLeft" ? -i : i;
3387
+ let n = e.key === "ArrowLeft" ? -a : a;
3444
3388
  if (e.shiftKey) {
3445
3389
  if (t.resizable === !1) return;
3446
3390
  s = {
@@ -3448,14 +3392,14 @@ var Wt = ["aria-label"], Gt = ["aria-expanded", "onClick"], Kt = { class: "trunc
3448
3392
  ...je({
3449
3393
  start: t.start,
3450
3394
  end: t.end
3451
- }, r.start, Math.max(r.start + i, r.end + n))
3395
+ }, i.start, Math.max(i.start + a, i.end + n))
3452
3396
  };
3453
3397
  } else s = {
3454
3398
  ...t,
3455
3399
  ...je({
3456
3400
  start: t.start,
3457
3401
  end: t.end
3458
- }, r.start + n, r.end + n)
3402
+ }, i.start + n, i.end + n)
3459
3403
  };
3460
3404
  } else if ((e.key === "ArrowUp" || e.key === "ArrowDown") && t.draggable !== !1) {
3461
3405
  let n = pn(), r = n[n.findIndex((e) => e.resource.id === t.resourceId) + (e.key === "ArrowUp" ? -1 : 1)];
@@ -3467,17 +3411,13 @@ var Wt = ["aria-label"], Gt = ["aria-expanded", "onClick"], Kt = { class: "trunc
3467
3411
  if (!s) return;
3468
3412
  e.preventDefault();
3469
3413
  let l = g.value.map((e) => e.id === t.id ? s : e);
3470
- if (a.overlap === "prevent" && jt(s, l).length) {
3471
- o("conflict", {
3472
- event: s,
3473
- with: jt(s, l)
3474
- }), Lt(c.timelineConflict);
3475
- return;
3476
- }
3477
- pe(l), o("change", {
3414
+ r.overlap === "prevent" && jt(s, l).length ? (o("conflict", {
3415
+ event: s,
3416
+ with: jt(s, l)
3417
+ }), Lt(c.timelineConflict)) : (pe(l), o("change", {
3478
3418
  events: [s],
3479
3419
  kind: e.shiftKey ? "resize" : "move"
3480
- }), Bt(s), v(() => it.get(t.id)?.querySelector("[data-timeline-event]")?.focus({ preventScroll: !0 }));
3420
+ }), Bt(s), v(() => it.get(t.id)?.querySelector("[data-timeline-event]")?.focus({ preventScroll: !0 })));
3481
3421
  }
3482
3422
  function hn(e) {
3483
3423
  let t = _e.value.get(e);
@@ -3550,10 +3490,10 @@ var Wt = ["aria-label"], Gt = ["aria-expanded", "onClick"], Kt = { class: "trunc
3550
3490
  };
3551
3491
  return ie(Ht, Sn), ie(me, {
3552
3492
  scale: U.scaleNow,
3553
- readonly: l(() => a.readonly),
3493
+ readonly: l(() => r.readonly),
3554
3494
  canUndo: ge,
3555
3495
  canRedo: A,
3556
- foldable: l(() => a.resources.some((e) => e.group)),
3496
+ foldable: l(() => r.resources.some((e) => e.group)),
3557
3497
  folded: l(() => ye.value.length > 0),
3558
3498
  undo: D,
3559
3499
  redo: k,
@@ -3565,20 +3505,20 @@ var Wt = ["aria-label"], Gt = ["aria-expanded", "onClick"], Kt = { class: "trunc
3565
3505
  I.value.size && U.fit(Ne.value);
3566
3506
  },
3567
3507
  expandAll: () => Se([]),
3568
- collapseAll: () => Se([...new Set(a.resources.map((e) => e.group).filter((e) => !!e))])
3508
+ collapseAll: () => Se([...new Set(r.resources.map((e) => e.group).filter((e) => !!e))])
3569
3509
  }), ne(() => {
3570
3510
  let e = V.value;
3571
3511
  e.addEventListener("touchmove", Ft, { passive: !1 }), v(() => {
3572
- let t = a.start ? j(a.start) : ze.value ?? Ne.value.min;
3512
+ let t = r.start ? j(r.start) : ze.value ?? Ne.value.min;
3573
3513
  e.scrollLeft = Math.max(0, K(t) - Math.min(48, Pe.value / 4)), G.value.left = e.scrollLeft;
3574
3514
  });
3575
3515
  }), ee(() => {
3576
3516
  V.value?.removeEventListener("touchmove", Ft), Et(), Z(), cancelAnimationFrame(at);
3577
- }), n(Sn), (e, n) => (x(), f("div", {
3517
+ }), t(Sn), (t, n) => (x(), f("div", {
3578
3518
  class: "m3-resource-timeline flex flex-col overflow-hidden rounded-md bg-surface text-on-surface",
3579
3519
  onKeydown: gn
3580
3520
  }, [
3581
- ae(e.$slots, "default", { timeline: Sn }),
3521
+ ae(t.$slots, "default", { timeline: Sn }),
3582
3522
  p("div", {
3583
3523
  ref_key: "scroller",
3584
3524
  ref: V,
@@ -3621,42 +3561,42 @@ var Wt = ["aria-label"], Gt = ["aria-expanded", "onClick"], Kt = { class: "trunc
3621
3561
  class: "sticky left-0 z-10 shrink-0 border-r border-outline-variant bg-surface",
3622
3562
  style: b({ width: `${H.value}px` }),
3623
3563
  role: "list",
3624
- "aria-label": t.label
3625
- }, [(x(!0), f(s, null, C(Ze.value, (t) => (x(), f(s, { key: t.key }, [t.kind === "group" ? (x(), f("button", {
3564
+ "aria-label": e.label
3565
+ }, [(x(!0), f(s, null, C(Ze.value, (e) => (x(), f(s, { key: e.key }, [e.kind === "group" ? (x(), f("button", {
3626
3566
  key: 0,
3627
3567
  type: "button",
3628
3568
  class: "absolute inset-x-0 flex items-center gap-1 border-b border-outline-variant/60 bg-surface-container-low px-2 text-left text-title-small text-on-surface outline-none hover:bg-on-surface/8 focus-visible:ring-2 focus-visible:ring-secondary focus-visible:ring-inset",
3629
3569
  style: b({
3630
- top: `${t.top}px`,
3631
- height: `${t.height}px`
3570
+ top: `${e.top}px`,
3571
+ height: `${e.height}px`
3632
3572
  }),
3633
- "aria-expanded": !xe.value.has(t.group),
3634
- onClick: (e) => Ce(t.group)
3635
- }, [p("span", { class: y(["material-symbols-outlined text-[20px] text-on-surface-variant transition-transform duration-200", xe.value.has(t.group) ? "-rotate-90" : ""]) }, "expand_more", 2), ae(e.$slots, "group", {
3636
- group: t.group,
3637
- resources: t.resources,
3638
- collapsed: xe.value.has(t.group)
3639
- }, () => [p("span", Kt, w(t.group), 1), p("span", qt, w(t.resources.length), 1)])], 12, Gt)) : (x(), f("div", {
3573
+ "aria-expanded": !xe.value.has(e.group),
3574
+ onClick: (t) => Ce(e.group)
3575
+ }, [p("span", { class: y(["material-symbols-outlined text-[20px] text-on-surface-variant transition-transform duration-200", xe.value.has(e.group) ? "-rotate-90" : ""]) }, "expand_more", 2), ae(t.$slots, "group", {
3576
+ group: e.group,
3577
+ resources: e.resources,
3578
+ collapsed: xe.value.has(e.group)
3579
+ }, () => [p("span", Kt, w(e.group), 1), p("span", qt, w(e.resources.length), 1)])], 12, Gt)) : (x(), f("div", {
3640
3580
  key: 1,
3641
3581
  role: "listitem",
3642
3582
  class: "absolute inset-x-0 flex items-center gap-3 border-b border-outline-variant/60 px-4",
3643
3583
  style: b({
3644
- top: `${t.top}px`,
3645
- height: `${t.height}px`
3584
+ top: `${e.top}px`,
3585
+ height: `${e.height}px`
3646
3586
  })
3647
- }, [ae(e.$slots, "resource", {
3648
- resource: t.resource,
3649
- events: we.value.get(t.resource.id) ?? [],
3650
- hours: Math.round((xn.value.get(t.resource.id) ?? 0) * 10) / 10
3651
- }, () => [t.resource.avatar ? (x(), f("img", {
3587
+ }, [ae(t.$slots, "resource", {
3588
+ resource: e.resource,
3589
+ events: we.value.get(e.resource.id) ?? [],
3590
+ hours: Math.round((xn.value.get(e.resource.id) ?? 0) * 10) / 10
3591
+ }, () => [e.resource.avatar ? (x(), f("img", {
3652
3592
  key: 0,
3653
- src: t.resource.avatar,
3593
+ src: e.resource.avatar,
3654
3594
  alt: "",
3655
3595
  class: "size-9 shrink-0 rounded-full object-cover"
3656
3596
  }, null, 8, Jt)) : (x(), f("span", {
3657
3597
  key: 1,
3658
- class: y(["flex size-9 shrink-0 items-center justify-center rounded-full text-label-large", _n[t.resource.color ?? "neutral"]])
3659
- }, [t.resource.icon ? (x(), f("span", Yt, w(t.resource.icon), 1)) : (x(), f(s, { key: 1 }, [m(w(bn(t.resource.name)), 1)], 64))], 2)), p("span", Xt, [p("span", Zt, w(t.resource.name), 1), t.resource.subtitle ? (x(), f("span", Qt, w(t.resource.subtitle), 1)) : d("", !0)])])], 4))], 64))), 128)), h(We, {
3598
+ class: y(["flex size-9 shrink-0 items-center justify-center rounded-full text-label-large", _n[e.resource.color ?? "neutral"]])
3599
+ }, [e.resource.icon ? (x(), f("span", Yt, w(e.resource.icon), 1)) : (x(), f(s, { key: 1 }, [m(w(bn(e.resource.name)), 1)], 64))], 2)), p("span", Xt, [p("span", Zt, w(e.resource.name), 1), e.resource.subtitle ? (x(), f("span", Qt, w(e.resource.subtitle), 1)) : d("", !0)])])], 4))], 64))), 128)), h(We, {
3660
3600
  label: T(c).ganttResize,
3661
3601
  value: H.value,
3662
3602
  active: pt.value,
@@ -3670,7 +3610,7 @@ var Wt = ["aria-label"], Gt = ["aria-expanded", "onClick"], Kt = { class: "trunc
3670
3610
  "active",
3671
3611
  "grip-top"
3672
3612
  ])], 12, Wt)) : d("", !0), p("div", {
3673
- class: y(["relative shrink-0 select-none [-webkit-user-drag:none]", t.creatable && !t.readonly ? "" : "cursor-grab active:cursor-grabbing"]),
3613
+ class: y(["relative shrink-0 select-none [-webkit-user-drag:none]", e.creatable && !e.readonly ? "" : "cursor-grab active:cursor-grabbing"]),
3674
3614
  style: b({ width: `${T(Fe)}px` }),
3675
3615
  onPointerdown: Ct,
3676
3616
  onDragstart: n[3] ||= fe(() => {}, ["prevent"])
@@ -3719,13 +3659,13 @@ var Wt = ["aria-label"], Gt = ["aria-expanded", "onClick"], Kt = { class: "trunc
3719
3659
  ve.value.has(n.id) ? "ring-2 ring-on-surface ring-offset-1 ring-offset-surface" : "",
3720
3660
  L.value.has(n.id) || ft.value?.id === n.id && _t.value ? "outline-2 outline-offset-1 outline-error" : "",
3721
3661
  ft.value?.id === n.id ? "shadow-elevation-3" : "hover:shadow-elevation-1",
3722
- t.readonly || n.draggable === !1 ? "" : "cursor-grab active:cursor-grabbing"
3662
+ e.readonly || n.draggable === !1 ? "" : "cursor-grab active:cursor-grabbing"
3723
3663
  ]]),
3724
3664
  onPointerdown: (e) => St(e, n, "body"),
3725
3665
  onDblclick: (e) => o("event-dblclick", n, e),
3726
3666
  onContextmenu: (e) => o("event-contextmenu", n, e),
3727
3667
  onKeydown: (e) => mn(e, n)
3728
- }, [p("span", { class: y(["w-1 shrink-0", vn[yn(n)]]) }, null, 2), p("span", en, [ae(e.$slots, "event", {
3668
+ }, [p("span", { class: y(["w-1 shrink-0", vn[yn(n)]]) }, null, 2), p("span", en, [ae(t.$slots, "event", {
3729
3669
  event: n,
3730
3670
  resource: N.value.get(n.resourceId),
3731
3671
  selected: ve.value.has(n.id),
@@ -3734,13 +3674,13 @@ var Wt = ["aria-label"], Gt = ["aria-expanded", "onClick"], Kt = { class: "trunc
3734
3674
  key: 0,
3735
3675
  class: "material-symbols-outlined shrink-0 text-[18px] text-error",
3736
3676
  title: T(c).timelineConflict
3737
- }, "warning", 8, an)) : d("", !0)])])], 42, $t), !t.readonly && n.resizable !== !1 ? (x(), f(s, { key: 0 }, C(["start", "end"], (e) => p("span", {
3677
+ }, "warning", 8, an)) : d("", !0)])])], 42, $t), !e.readonly && n.resizable !== !1 ? (x(), f(s, { key: 0 }, C(["start", "end"], (e) => p("span", {
3738
3678
  key: e,
3739
3679
  "data-timeline-resize": e,
3740
3680
  class: y(["absolute inset-y-0 z-[1] flex w-3 cursor-ew-resize items-center justify-center pointer-coarse:w-7", e === "start" ? "-left-1 pointer-coarse:-left-3.5" : "-right-1 pointer-coarse:-right-3.5"]),
3741
3681
  onPointerdown: (t) => St(t, n, e)
3742
3682
  }, [p("span", { class: y(["hidden h-3/5 w-1 rounded-full bg-on-surface pointer-coarse:block", ve.value.has(n.id) ? "opacity-100" : "opacity-0"]) }, null, 2)], 42, on)), 64)) : d("", !0)], 6))), 128)),
3743
- t.resources.length ? d("", !0) : (x(), f("div", {
3683
+ e.resources.length ? d("", !0) : (x(), f("div", {
3744
3684
  key: 1,
3745
3685
  class: "absolute flex items-center justify-center p-6",
3746
3686
  style: b({
@@ -3749,13 +3689,12 @@ var Wt = ["aria-label"], Gt = ["aria-expanded", "onClick"], Kt = { class: "trunc
3749
3689
  top: 0,
3750
3690
  height: `${Math.max(120, T(G).height - un)}px`
3751
3691
  })
3752
- }, [ae(e.$slots, "empty", {}, () => [p("span", sn, w(T(c).timelineEmpty), 1)])], 4))
3692
+ }, [ae(t.$slots, "empty", {}, () => [p("span", sn, w(T(c).timelineEmpty), 1)])], 4))
3753
3693
  ], 38)], 4)], 4)], 544),
3754
3694
  p("div", cn, w(It.value), 1)
3755
3695
  ], 32));
3756
3696
  }
3757
3697
  });
3758
- //#endregion
3759
3698
  export { J as MGantt, xt as MGanttControls, fn as MResourceTimeline, U as addWorkingDays, Fe as criticalPath, At as parseGanttCsv, Mt as parseGanttJson, Vt as parseMsProjectXml, Me as rollupSummaries, Pe as scheduleTasks, B as taskSpan, Et as toGanttCsv, jt as toGanttJson, Bt as toMsProjectXml, D as useGantt, Ut as useResourceTimeline, Ne as workingDays };
3760
3699
 
3761
3700
  //# sourceMappingURL=gantt.js.map