iobroker.vis2-materialdesign 1.1.0 → 1.1.1

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 (119) hide show
  1. package/README.md +4 -24
  2. package/io-package.json +14 -14
  3. package/package.json +1 -1
  4. package/widgets/vis2-materialdesign/assets/MaterialDesignAdvancedView-DNpwXGf3.js +1 -0
  5. package/widgets/vis2-materialdesign/assets/{MaterialDesignAdvancedViewInWidget-BUzZLx-h.js → MaterialDesignAdvancedViewInWidget-BqIOwDG0.js} +1 -1
  6. package/widgets/vis2-materialdesign/assets/{MaterialDesignAdvancedViewInWidget8-CKBrbQyd.js → MaterialDesignAdvancedViewInWidget8-CcEAi-H5.js} +1 -1
  7. package/widgets/vis2-materialdesign/assets/MaterialDesignAlerts-CpqpikhB.js +1 -0
  8. package/widgets/vis2-materialdesign/assets/{MaterialDesignAutocomplete-wpBEPvFi.js → MaterialDesignAutocomplete-Cdpxn7be.js} +1 -1
  9. package/widgets/vis2-materialdesign/assets/{MaterialDesignButtonAdition-D8xpt2LJ.js → MaterialDesignButtonAdition-Bgc7gPFe.js} +1 -1
  10. package/widgets/vis2-materialdesign/assets/{MaterialDesignButtonAditionVertical-CiOKXZPQ.js → MaterialDesignButtonAditionVertical-ByTo3FdC.js} +1 -1
  11. package/widgets/vis2-materialdesign/assets/{MaterialDesignButtonLink-DNlBjUZM.js → MaterialDesignButtonLink-COrsaaez.js} +1 -1
  12. package/widgets/vis2-materialdesign/assets/{MaterialDesignButtonLinkVertical-DN8VrTXp.js → MaterialDesignButtonLinkVertical-DyHiQbIR.js} +1 -1
  13. package/widgets/vis2-materialdesign/assets/{MaterialDesignButtonNavigation-2mH9x-h7.js → MaterialDesignButtonNavigation-Cl2eqfMq.js} +1 -1
  14. package/widgets/vis2-materialdesign/assets/{MaterialDesignButtonNavigationVertical-IP6Et6Mq.js → MaterialDesignButtonNavigationVertical-rvms2y3n.js} +1 -1
  15. package/widgets/vis2-materialdesign/assets/{MaterialDesignButtonState-Csjy8-sI.js → MaterialDesignButtonState-B50D0CXn.js} +1 -1
  16. package/widgets/vis2-materialdesign/assets/{MaterialDesignButtonStateMulti-CfxTMLhc.js → MaterialDesignButtonStateMulti-D2WS_YRy.js} +1 -1
  17. package/widgets/vis2-materialdesign/assets/{MaterialDesignButtonStateMultiVertical-BClK02Hf.js → MaterialDesignButtonStateMultiVertical-C9tq56lZ.js} +1 -1
  18. package/widgets/vis2-materialdesign/assets/{MaterialDesignButtonStateVertical-CwmO_FrT.js → MaterialDesignButtonStateVertical-DRzBNZUv.js} +1 -1
  19. package/widgets/vis2-materialdesign/assets/{MaterialDesignButtonToggle-DDGB4qWZ.js → MaterialDesignButtonToggle-BHMG0xj4.js} +1 -1
  20. package/widgets/vis2-materialdesign/assets/{MaterialDesignButtonToggleVertical-BnP_WJyr.js → MaterialDesignButtonToggleVertical-D21TSrRB.js} +1 -1
  21. package/widgets/vis2-materialdesign/assets/MaterialDesignButtons-DbnYsixT.js +1 -0
  22. package/widgets/vis2-materialdesign/assets/MaterialDesignCalendar-BBTpuZEJ.js +1 -0
  23. package/widgets/vis2-materialdesign/assets/MaterialDesignCard-D5QHrTE5.js +1 -0
  24. package/widgets/vis2-materialdesign/assets/MaterialDesignChartBar-DLzaF9i4.js +1 -0
  25. package/widgets/vis2-materialdesign/assets/MaterialDesignChartCanvas-gz-vMWmY.js +4 -0
  26. package/widgets/vis2-materialdesign/assets/MaterialDesignChartJson-kmYovbTL.js +1 -0
  27. package/widgets/vis2-materialdesign/assets/MaterialDesignChartLineHistory-CJg77dZx.js +1 -0
  28. package/widgets/vis2-materialdesign/assets/MaterialDesignChartPie-D-BI3uRL.js +1 -0
  29. package/widgets/vis2-materialdesign/assets/MaterialDesignCheckbox-9qjC6KVK.js +1 -0
  30. package/widgets/vis2-materialdesign/assets/MaterialDesignColorScheme-MqgF3Vim.js +1 -0
  31. package/widgets/vis2-materialdesign/assets/MaterialDesignDialog-BA4Ar8X3.js +1 -0
  32. package/widgets/vis2-materialdesign/assets/{MaterialDesignDialogIFrame-DENl-b2q.js → MaterialDesignDialogIFrame-DImNbpSz.js} +1 -1
  33. package/widgets/vis2-materialdesign/assets/{MaterialDesignDialogView-C56p8m8L.js → MaterialDesignDialogView-H3CA-6bc.js} +1 -1
  34. package/widgets/vis2-materialdesign/assets/{MaterialDesignGridViews-Dx-zbXRM.js → MaterialDesignGridViews-BB-86zzJ.js} +1 -1
  35. package/widgets/vis2-materialdesign/assets/MaterialDesignIcon-DBfauUxE.js +1 -0
  36. package/widgets/vis2-materialdesign/assets/{MaterialDesignIconButtonAdition-C5EjDD2G.js → MaterialDesignIconButtonAdition-QNzJTMOo.js} +1 -1
  37. package/widgets/vis2-materialdesign/assets/{MaterialDesignIconButtonLink-BI2iJybD.js → MaterialDesignIconButtonLink-DLMu9Tgx.js} +1 -1
  38. package/widgets/vis2-materialdesign/assets/{MaterialDesignIconButtonNavigation-DwHn0h0Y.js → MaterialDesignIconButtonNavigation-DbiaKG_K.js} +1 -1
  39. package/widgets/vis2-materialdesign/assets/{MaterialDesignIconButtonSlider-z6U2cIAT.js → MaterialDesignIconButtonSlider-GAtiVx8q.js} +1 -1
  40. package/widgets/vis2-materialdesign/assets/{MaterialDesignIconButtonState-Bpc6iTaH.js → MaterialDesignIconButtonState-BxILR27L.js} +1 -1
  41. package/widgets/vis2-materialdesign/assets/{MaterialDesignIconButtonStateMulti-D5uvMzX8.js → MaterialDesignIconButtonStateMulti-BOChs6Vx.js} +1 -1
  42. package/widgets/vis2-materialdesign/assets/{MaterialDesignIconButtonToggle-CH0_t2at.js → MaterialDesignIconButtonToggle-DfGBFOyb.js} +1 -1
  43. package/widgets/vis2-materialdesign/assets/MaterialDesignIconList-CijiMI4e.js +17 -0
  44. package/widgets/vis2-materialdesign/assets/MaterialDesignInput-B-hYH-GN.js +1 -0
  45. package/widgets/vis2-materialdesign/assets/MaterialDesignInstalledVersion-DNLFXPx9.js +1 -0
  46. package/widgets/vis2-materialdesign/assets/MaterialDesignList-BropDGTE.js +2 -0
  47. package/widgets/vis2-materialdesign/assets/{MaterialDesignMasonryViews-DvFJas02.js → MaterialDesignMasonryViews-KvrRV8Gp.js} +1 -1
  48. package/widgets/vis2-materialdesign/assets/{MaterialDesignProgress-IOvQKUka.js → MaterialDesignProgress-B6fnI_tv.js} +1 -1
  49. package/widgets/vis2-materialdesign/assets/MaterialDesignProgress-BTAuElrn.js +1 -0
  50. package/widgets/vis2-materialdesign/assets/MaterialDesignProgressCircular-B6g81YLC.js +1 -0
  51. package/widgets/vis2-materialdesign/assets/MaterialDesignRoundSlider-BjZ2zUZA.js +1 -0
  52. package/widgets/vis2-materialdesign/assets/MaterialDesignSelect-Ct03oufQ.js +1 -0
  53. package/widgets/vis2-materialdesign/assets/{MaterialDesignSlider-WNRDx7ar.js → MaterialDesignSlider-KTMGBscY.js} +2 -2
  54. package/widgets/vis2-materialdesign/assets/MaterialDesignSwitch-WJ4Th4Wj.js +1 -0
  55. package/widgets/vis2-materialdesign/assets/MaterialDesignTable-DRgfDAdz.js +1 -0
  56. package/widgets/vis2-materialdesign/assets/MaterialDesignToggleControls-D2j50uST.js +1 -0
  57. package/widgets/vis2-materialdesign/assets/MaterialDesignTopAppBar-DaucZVX7.js +1 -0
  58. package/widgets/vis2-materialdesign/assets/MaterialDesignValue-u7dp1y9a.js +1 -0
  59. package/widgets/vis2-materialdesign/assets/MaterialDesignViews-Cd6K7833.js +1 -0
  60. package/widgets/vis2-materialdesign/assets/_virtual_mf-localSharedImportMap___mfe_internal__vis2Materia-Bche1mFr.js +1 -0
  61. package/widgets/vis2-materialdesign/assets/_virtual_mf___mfe_internal__vis2MaterialDesignWidgets__mf_ow-BxGSFGb1.js +1 -0
  62. package/widgets/vis2-materialdesign/assets/_virtual_mf___mfe_internal__vis2MaterialDesignWidgets__mf_ow-CLMQFICb.js +8 -0
  63. package/widgets/vis2-materialdesign/assets/_virtual_mf___mfe_internal__vis2MaterialDesignWidgets__mf_ow-CLzQTKDT.js +2 -0
  64. package/widgets/vis2-materialdesign/assets/_virtual_mf___mfe_internal__vis2MaterialDesignWidgets__mf_ow-lSqMp4qp.js +1 -0
  65. package/widgets/vis2-materialdesign/assets/deviceFill-CwQqeyeG.js +1 -0
  66. package/widgets/vis2-materialdesign/assets/dist-CJNzW53D.js +1 -0
  67. package/widgets/vis2-materialdesign/assets/helpers-Bgb-zicA.js +1 -0
  68. package/widgets/vis2-materialdesign/assets/hostInit-BBZWdXSD.js +1 -0
  69. package/widgets/vis2-materialdesign/assets/index-Dezn_h7o.js +1 -0
  70. package/widgets/vis2-materialdesign/assets/{mf-entry-bootstrap-0-090e9c92.js → mf-entry-bootstrap-0-20253b2f.js} +19 -2
  71. package/widgets/vis2-materialdesign/assets/pendingShares-C2ssYt7N.js +2 -0
  72. package/widgets/vis2-materialdesign/assets/react-DlU9tEAh.js +1 -0
  73. package/widgets/vis2-materialdesign/assets/utils-txftJW4v.js +4 -0
  74. package/widgets/vis2-materialdesign/assets/widgetUtils-D9S_f9Bd.js +1 -0
  75. package/widgets/vis2-materialdesign/customWidgets.js +13 -1
  76. package/widgets/vis2-materialdesign/mf-stats.json +1 -1
  77. package/widgets/vis2-materialdesign/assets/MaterialDesignAdvancedView-HetkEw4s.js +0 -1
  78. package/widgets/vis2-materialdesign/assets/MaterialDesignAlerts-DeeCUFqe.js +0 -1
  79. package/widgets/vis2-materialdesign/assets/MaterialDesignButtons-C5G4zxp4.js +0 -1
  80. package/widgets/vis2-materialdesign/assets/MaterialDesignCalendar-D7MSJ2a3.js +0 -1
  81. package/widgets/vis2-materialdesign/assets/MaterialDesignCard-CQWcg9W_.js +0 -1
  82. package/widgets/vis2-materialdesign/assets/MaterialDesignChartBar-DpiygbhW.js +0 -1
  83. package/widgets/vis2-materialdesign/assets/MaterialDesignChartCanvas-hc4Zj_Gd.js +0 -4
  84. package/widgets/vis2-materialdesign/assets/MaterialDesignChartJson-D3TsmQVG.js +0 -1
  85. package/widgets/vis2-materialdesign/assets/MaterialDesignChartLineHistory-BwAYoZ0l.js +0 -1
  86. package/widgets/vis2-materialdesign/assets/MaterialDesignChartPie-BeZ0qIVj.js +0 -1
  87. package/widgets/vis2-materialdesign/assets/MaterialDesignCheckbox-CgjDdkPP.js +0 -1
  88. package/widgets/vis2-materialdesign/assets/MaterialDesignColorScheme-BT04IlKN.js +0 -1
  89. package/widgets/vis2-materialdesign/assets/MaterialDesignDialog-DCL1sCuT.js +0 -1
  90. package/widgets/vis2-materialdesign/assets/MaterialDesignIcon-DYzBiAGo.js +0 -1
  91. package/widgets/vis2-materialdesign/assets/MaterialDesignIconList-CkAGQKzf.js +0 -17
  92. package/widgets/vis2-materialdesign/assets/MaterialDesignInput-DLzAQ5X7.js +0 -1
  93. package/widgets/vis2-materialdesign/assets/MaterialDesignInstalledVersion-D113bzz-.js +0 -1
  94. package/widgets/vis2-materialdesign/assets/MaterialDesignList-DxwaQKno.js +0 -2
  95. package/widgets/vis2-materialdesign/assets/MaterialDesignProgress-Z5M422FL.js +0 -1
  96. package/widgets/vis2-materialdesign/assets/MaterialDesignProgressCircular-CWcA-yX0.js +0 -1
  97. package/widgets/vis2-materialdesign/assets/MaterialDesignRoundSlider-BfiWNCjU.js +0 -1
  98. package/widgets/vis2-materialdesign/assets/MaterialDesignSelect-BaNP9wV-.js +0 -1
  99. package/widgets/vis2-materialdesign/assets/MaterialDesignSwitch-BjDGkiny.js +0 -1
  100. package/widgets/vis2-materialdesign/assets/MaterialDesignTable-z7yPQE8U.js +0 -1
  101. package/widgets/vis2-materialdesign/assets/MaterialDesignToggleControls-Bkn7NQHG.js +0 -1
  102. package/widgets/vis2-materialdesign/assets/MaterialDesignTopAppBar-D25jaWVE.js +0 -1
  103. package/widgets/vis2-materialdesign/assets/MaterialDesignValue-bQUtmkvi.js +0 -1
  104. package/widgets/vis2-materialdesign/assets/MaterialDesignViews-C-ZbYbxu.js +0 -1
  105. package/widgets/vis2-materialdesign/assets/_virtual_mf-localSharedImportMap___mfe_internal__vis2Materia-95HdPhKp.js +0 -1
  106. package/widgets/vis2-materialdesign/assets/_virtual_mf___mfe_internal__vis2MaterialDesignWidgets__mf_ow-BFYvhWii.js +0 -1
  107. package/widgets/vis2-materialdesign/assets/_virtual_mf___mfe_internal__vis2MaterialDesignWidgets__mf_ow-CkU-UBZZ.js +0 -8
  108. package/widgets/vis2-materialdesign/assets/_virtual_mf___mfe_internal__vis2MaterialDesignWidgets__mf_ow-DEpCIonz.js +0 -1
  109. package/widgets/vis2-materialdesign/assets/deviceFill-Y3Dvmprf.js +0 -1
  110. package/widgets/vis2-materialdesign/assets/dist-aCQrXA9Y.js +0 -4
  111. package/widgets/vis2-materialdesign/assets/hostInit-C7AUEX0N.js +0 -1
  112. package/widgets/vis2-materialdesign/assets/index-DpCs7jnT.js +0 -1
  113. package/widgets/vis2-materialdesign/assets/rolldown-runtime-CNC7AqOf.js +0 -1
  114. package/widgets/vis2-materialdesign/assets/virtualExposes-Bktyajjp.js +0 -1
  115. package/widgets/vis2-materialdesign/assets/virtual_mf-REMOTE_ENTRY_ID___mfe_internal__vis2MaterialDesig-Dzxd7Jw0.js +0 -1
  116. package/widgets/vis2-materialdesign/assets/virtual_mf-exposes-ssr___mfe_internal__vis2MaterialDesignWid-B5soiMST.js +0 -2
  117. package/widgets/vis2-materialdesign/assets/virtual_mf-exposes___mfe_internal__vis2MaterialDesignWidgets-Dj0bxE5P.js +0 -2
  118. package/widgets/vis2-materialdesign/assets/widgetUtils-R3wQrTUE.js +0 -1
  119. package/widgets/vis2-materialdesign/customWidgets.ssr.js +0 -1
package/README.md CHANGED
@@ -115,6 +115,10 @@ full per-widget option and is not deprecated, so nothing you report is a reason
115
115
  to wait with an upgrade.
116
116
 
117
117
  ## Changelog
118
+ ### 1.1.1 (2026-10-13)
119
+
120
+ - (typhosj) Fixed the widget set failing to load in the upcoming vis-2 release that runs on React 19: the editor dropped the whole set with "Cannot read properties of undefined (reading 'ReactCurrentOwner')" and every placed widget showed as an unknown widget type. The bundle evaluated its own React 18 copy of the JSX runtime before asking vis-2 for the shared one, and that copy cannot run next to React 19. It is now only loaded when vis-2 does not provide the runtime itself, so the same build keeps working on the current vis-2 releases as well (ioBroker/ioBroker.vis-2#689)
121
+
118
122
  ### 1.1.0 (2026-10-03)
119
123
 
120
124
  - (typhosj) Fixed the JSON Chart flashing its red "Error in JSON string" for the first moments of every page load: an empty datapoint — which is what the widget sees until the first value of its subscription arrives — was read as a broken JSON string. Only content that really is malformed reports the error now. The Top App Bar showed the same error on a drawer whose JSON string had not been filled in yet
@@ -217,30 +221,6 @@ to wait with an upgrade.
217
221
  - (typhosj) Fixed the month view of the **Calendar** dropping the start time of an appointment that has one; it shows the time in front of the name again, like VIS 1 (reported in the forum)
218
222
  - (typhosj) Fixed the Calendar option **font color for past days** doing nothing: past days are dimmed with it again, in the month grid and in the day header of the week and day view (reported in the forum)
219
223
 
220
- ### 0.3.4 (2026-08-16)
221
-
222
- - (typhosj) Fixed the **Min/Max** limit of the Addition buttons: a single bound was always read as the minimum, so a maximum like `50` lifted the state up to 50 on the first press and then counted on without any limit. A single bound is now the end the step runs into — a step up stops at a maximum, a step down at a minimum — while `0;100` keeps bounding both ends. An empty field, and an empty half in `50;`, also stopped acting as a bound of 0, so a button without a limit can count into negative values again (issue #12)
223
- - (typhosj) Fixed every **active** option of the Navigation buttons doing nothing: the variant reads no object, so "active" was always false and label true, active label color, active background, active image and active image color never showed. Active now means the target view is the one on screen, which is what highlights the current page in a navigation bar (issue #11)
224
- - (typhosj) Fixed the button styles `raised` and `unelevated` looking identical: no shadow was drawn at all, and the shadow is the whole difference between them. `raised` now carries the Material elevation and gives up 4 px of its box for it, because VIS 2 clips a widget at its edge — the opening button of the Dialog widgets got the same room, its shadow was drawn but clipped away (issue #11)
225
- - (typhosj) Fixed the chart area background, the card's section background and every tooltip option except "show tooltip" being editor fields the four chart widgets never read: mode, position, colors and fonts now reach chart.js, the Line History tooltip formats its value with the configured decimals and unit, and its points take the line color instead of the translucent fill (issue #10)
226
- - (typhosj) Fixed the fade of the Advanced View widgets never running — the jQuery easing name went straight into CSS and the views were switched through `display`, which cannot animate — and made the `persistent`, `notIfInvisible` and `debug` options of the `8` variant do what they say. The dropped `slowConnection` option only delayed a VIS 1 network path that VIS 2 does not have (issue #9)
227
- - (typhosj) Fixed multi-color SVG icons being flattened to one blue in the Icon List and List widgets: the default item color was applied before the "did the user pick a color?" check, so every SVG was masked. An SVG keeps its own colors now unless a color is chosen explicitly (issue #8)
228
- - (typhosj) Fixed the push button writing its off value on a release the button never saw the press for: a view loading under the pointer, a widget taking focus while a key is down, or a hover followed by a mouse-leave wrote the state with nobody touching the button
229
- - (typhosj) Fixed the Theme Editor's config dialog closing before the runtime state sync finished, which could leave the object tree half migrated; the dialog now waits for the sync to complete before closing, and shows a toast when it finishes without closing
230
- - (typhosj) Fixed the Top App Bar swallowing every click in the empty part of its widget box: the box has to be as tall as the drawer it opens, and the transparent area below the bar blocked the widgets underneath. Only the bar, the drawer and its scrim take clicks now
231
- - (typhosj) Fixed the drawer of the Top App Bar and the Dialog overlay staying behind other widgets whose CSS-general **z-index** was set: their own z-index option could only sort them inside the widget itself. Both now lift the widget while the drawer or the dialog is open
232
- - (typhosj) Fixed the **button style** of the Dialog and Dialog iFrame widgets doing nothing: the opening button was always drawn filled, so `text`, `outlined` and `icon` looked exactly like `raised`. The flat styles now drop the fill and carry the primary color in border and label, `raised` gets its shadow back, and `icon` is round (issue #6)
233
- - (typhosj) Fixed the `text` and `outlined` styles of the button widgets painting their label in the on-primary color (white by default) on a transparent background, which left it invisible; label and border now use the button color
234
- - (typhosj) Fixed every repeating editor group not letting a single entry be added: VIS 2 puts the add, clone and delete buttons on the last of these groups, and all of them hid exactly that one — while typing a number into the matching count field does not rebuild the groups either. That group now shows as an add bar carrying only the buttons and a line naming it, so the count keeps meaning the number of entries. Affected the menu entries of Select, Autocomplete and Top App Bar, the data sets of all four charts, the columns of the Table, the views of Advanced View, Advanced View in Widget and Responsive Layout, and the object list of the multi-state buttons (issue #7)
235
- - (typhosj) Fixed the **+** button of the List and Icon List rows adding a row the runtime never drew: the button counted up a second, hidden index while the widget kept reading "count of list items". Both now use one number, and the hidden index is gone (rows added past the count through that button have to be added once more)
236
- - (typhosj) Fixed the Select and Autocomplete widgets dropping every menu entry that was given a label but no value — which is what the editor stores for a freshly added entry. Such an entry now uses its label as the value written to the object (issue #7)
237
- - (typhosj) Fixed the Select and Autocomplete data method "states of the object" never showing a single entry: the widget read the states from an object cache that VIS 2 does not hand to widgets, so it always saw nothing (issue #7)
238
- - (typhosj) Changed every **count** option to mean what it says: 3 now gives three entries. VIS 1 stored the last index there, so 3 produced four — this affects the data sets of the Bar, Pie and Line History charts, the menu entries of the Top App Bar, the table columns, the select and autocomplete values, the object ids of the multi-state buttons, and the views of Advanced View in Widget and of the responsive layouts. Check the value once when you rebuild such a widget from a VIS 1 project, otherwise its last entry disappears
239
- - (typhosj) Fixed the Select and Autocomplete widgets offering only the first list entry in the editor: the item group carried the fields of entry 0 instead of repeating per entry, so a "number of select values" above 1 had nowhere to be filled in
240
- - (typhosj) Fixed the per-data-set options of the Bar, Pie and Line History charts being editable only for the first data set: bar color, label, value text, tooltip text — and the per-series line and y-axis settings of the Line History chart — appeared once instead of once per data set, so a chart with several data sets could not be styled per series like in VIS 1. Each data set now has one group holding its object id and all of its options; existing charts keep every saved value (reported in the forum)
241
- - (typhosj) Fixed the icon picker showing only the first 400 of the 6809 icons with no way to reach the rest — the grid ends there and neither scrolling nor paging went further, so an icon whose name you did not know was unreachable. The grid now keeps loading while you scroll (issue #4)
242
- - (typhosj) Documented how the Top App Bar switches views — it writes the selected menu index into its object id, and an [Advanced View in Widget 8](doc/en/widgets/html-widgets.md) with the same object id shows the matching view (reported in the forum)
243
-
244
224
  [Older changelog entries](CHANGELOG_OLD.md)
245
225
 
246
226
  ## License
package/io-package.json CHANGED
@@ -1,8 +1,21 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "vis2-materialdesign",
4
- "version": "1.1.0",
4
+ "version": "1.1.1",
5
5
  "news": {
6
+ "1.1.1": {
7
+ "en": "Fixed the widget set failing to load in the upcoming vis-2 release that runs on React 19: the editor dropped the whole set with \"Cannot read properties of undefined (reading 'ReactCurrentOwner')\" and every placed widget showed as an unknown widget type. The bundle evaluated its own React 18 copy of the JSX runtime before asking vis-2 for the shared one, and that copy cannot run next to React 19. It is now only loaded when vis-2 does not provide the runtime itself, so the same build keeps working on the current vis-2 releases as well (ioBroker/ioBroker.vis-2#689)",
8
+ "de": "Fehler beim Laden des Widget-Sets in der kommenden Version von Vis-2 auf React 19 behoben: Der Editor verwarf das ganze Set mit „Cannot read properties of undefined (reading 'ReactCurrentOwner')“ und jedes platzierte Widget wurde als unbekannter Widget-Typ angezeigt. Das Paket testete seine eigene React 18-Kopie der JSX-Runtime, bevor es Vis-2 um die geteilte bat. Es wird jetzt nur geladen, wenn Vis-2 die Runtime selbst nicht liefert, also läuft derselbe Build auch auf Version 2 weiter (ioBroker/ioBroker.vis-2 #689)",
9
+ "ru": "Исправлена ошибка, из-за которой набор виджетов не загружался в следующей версии vis-2, работающей на React 19: редактор удалил весь набор виджетов с надписью «Невозможно прочитать свойства неопределенного (чтение 'ReactCurrentOwner')», и каждый размещенный виджет отображался как виджет неизвестного типа. Пакет оценил собственную копию среды выполнения JSX для React 18, прежде чем запросить у vis-2 общую версию. Эта копия не может работать рядом с React 19. Теперь она загружается только тогда, когда vis-2 не предоставляет саму среду выполнения, поэтому та же сборка продолжает работать и в текущих версиях vis-2 (IOBroker/IOBroker.vis-2 #689)",
10
+ "pt": "Corrigido o erro de carregamento do conjunto de widgets na próxima versão vis-2 do React 19: o editor removeu todo o conjunto com “Cannot read properties of undefined (reading 'ReactCurrentOwner')” e cada widget colocado era um tipo desconhecido. O pacote avaliou sua própria cópia do React 18 do JSX antes de pedir a cópia compartilhada ao vis-2, e essa cópia não pode ser executada junto ao React 19. Agora ele só é carregado quando o vis-2 não fornece o tempo de execução em si, então o mesmo build funciona nas versões atuais (IOBroker/IOBroker.vis-2 #689)",
11
+ "nl": "De widgetset kon niet worden geladen in de komende vis-2-release die draait op React 19: de editor heeft de hele set verwijderd met „Kan eigenschappen van undefined niet lezen (lees 'ReactCurrenTowner')” en elke geplaatste widget werd weergegeven als een onbekend widgettype. De bundel evalueerde zijn eigen React 18-kopie van de JSX-runtime voordat vis-2 om de gedeelde versie werd gevraagd, en die kopie kan niet naast React 19 worden uitgevoerd. Het wordt nu alleen geladen als vis-2 zelf niet voor de runtime zorgt, dus dezelfde build blijft ook werken op de huidige versies van vis-2 (IOBroker/IOBroker.Vis-2 #689)",
12
+ "fr": "Correction de l'échec du chargement du jeu de widgets dans la prochaine version de Vis-2 qui tourne sur React 19 : l'éditeur l'a supprimé avec « Cannot read properties of undefined (reading 'ReactCurrentOwner') » et chaque widget placé était affiché comme un type de widget inconnu. Le bundle a évalué sa propre copie React 18 du runtime JSX avant de demander à vis-2 la copie partagée, mais cette copie ne peut pas être exécutée à côté de React 19. Il n'est chargé que lorsque vis-2 ne fournit pas le runtime lui-même. La même version fonctionne donc sur les versions actuelles de Vis-2 (IOBroker/IOBroker.vis-2 #689)",
13
+ "it": "Risolto il problema del caricamento del set di widget nella prossima versione di vis-2 su React 19: l'editor ha eliminato l'intero set con «Cannot read properties of undefined (reading 'ReactCurrentOwner')» e ogni widget inserito era sconosciuto. Il bundle ha valutato la propria copia React 18 del runtime JSX prima di chiedere a vis-2 quella condivisa. Ora è caricato solo quando vis-2 non fornisce il runtime stesso, quindi la stessa build funziona anche sulle versioni attuali (IOBroker/IOBroker.vis-2 #689)",
14
+ "es": "Se ha corregido que el conjunto de widgets no se cargara en la próxima versión de la vis-2 que funciona en React 19: el editor quitó todo el conjunto con «No se pueden leer las propiedades de undefined (es decir, ReactCurrentOwner»)» y cada widget colocado aparecía de un tipo de widget desconocido. El paquete evaluó su propia copia de React 18 del JSX antes de pedir a vis-2 la compartida, y esa copia no puede ejecutarse junto a React 19. Ahora solo se carga cuando vis-2 no proporciona el tiempo de ejecución en sí, por lo que la misma versión funciona en las versiones actuales de vis-2 (IOBroker/IOBroker.vis-2 #689)",
15
+ "pl": "Naprawiono brak ładowania zestawu widżetów w nadchodzącej wersji vis-2, która działa na React 19: edytor upuścił cały zestaw z „Nie można odczytać właściwości nieokreślonego (odczytuje 'ReactCurrentOwner')”, a każdy umieszczony widżet był pokazywany jako nieznany typ widżetu. Pakiet ocenił własną kopię środowiska wykonawczego JSX React 18, zanim poprosił vis-2 o udostępnioną kopię, a kopia ta nie może działać obok React 19. Jest teraz ładowany tylko wtedy, gdy vis-2 nie zapewnia samego środowiska wykonawczego, więc ta sama kompilacja działa również na bieżących wersjach vis-2 (iOBroker/iOBroker.vis-2 #689)",
16
+ "uk": "Виправлено помилку завантаження набору віджетів у наступному випуску vis-2, який працює на React 19: редактор скинув весь набір з «Не можна прочитати властивості undefined (читання 'ReactCurrentOwner')», і кожен розміщений віджет відображається як невідомий тип віджету. Пакет оцінив власну копію виконання JSX React 18, перш ніж запитати у vis-2 спільну копію, і ця копія не може запускатися поруч з React 19. Тепер він завантажується лише тоді, коли vis-2 не забезпечує самого виконання, тому та сама збірка продовжує працювати і на поточних випусках vis-2 (IObroker/ioBroker.vis-2 #689)",
17
+ "zh-cn": "修复了在即将发布的在 React 19 上运行的 vis-2 版本中加载控件集失败的问题:编辑器以 “无法读取未定义的属性(读取'ReactCurrentOwner')” 删除了整个集合,并且每个放置的控件都显示为未知的控件类型。该软件包评估了自己的 JSX 运行时的 React 18 副本,然后向 vis-2 索要共享副本,该副本无法在 React 19 旁边运行。现在,它仅在 vis-2 本身不提供运行时时才会加载,因此相同的版本也可以在当前的 vis-2 版本中继续运行 (iobroker/iobroker.vis-2 #689)"
18
+ },
6
19
  "1.1.0": {
7
20
  "en": "Fixed the JSON Chart flashing its red \"Error in JSON string\" for the first moments of every page load: an empty datapoint — which is what the widget sees until the first value of its subscription arrives — was read as a broken JSON string. Only content that really is malformed reports the error now. The Top App Bar showed the same error on a drawer whose JSON string had not been filled in yet\nFixed a short appointment showing no name at all in the Calendar's week and day view: an appointment box is as tall as the appointment is long, so a 15-minute entry got about 14 px while the stacked time and name lines needed 44 px. Time and name share one line with an ellipsis now, an appointment long enough to have the room wraps instead of being cut, and hovering an entry — which is the first tap on a touch device — opens it to its full text. Every entry carries its full text as a tooltip as well, and the month view opens the same way\nFixed the Calendar ignoring **event height** outside the month view: the option sits in the editor for every view but only the month grid ever applied it. In the week and day view it now sets the minimum height of an appointment box, which is the second way to make short appointments readable\nFixed a read-only Slider looking exactly like one you can move: with **readOnly** set, or while its **working** datapoint is active, the track and knob are now dimmed the way a disabled Material 3 button is. The label and the value stay fully readable\nFixed **use theme** applying only the dark-mode colors: in light mode the theme colors never reached the widget, and the theme fonts and font sizes never did in either mode, because vis-2 did not subscribe the theme states behind them. The widgets subscribe those states themselves now. Widgets that already use the theme pick up the values without any change\nFixed **use theme** turning the Bar, Pie, Line History and JSON charts black: the charts are drawn on a canvas, which cannot read the theme's CSS variables, so every themed color came out black and every themed font fell back to a small default. The charts now take the theme values directly\nFixed the time axis of a Line History Chart from a vis-materialdesign project showing a garbled text instead of times: the old adapter stored one time format per unit (second, minute, hour …) in **xAxisTimeFormats**, and the whole list was used as a single format. The format of the unit that fits the spacing of the axis labels is used now; a single format still works as before\nNew **Migration** tab in the adapter settings: converts vis-2 projects built with the widgets of Scrounger's vis-materialdesign adapter to these widgets, so the old adapter can be uninstalled and the views keep working. Each project is backed up first and can be restored; the theme of the old adapter can be taken over as well. Anything that cannot be converted automatically — own CSS for the old widget structure, the old JavaScript helpers, icons that no longer exist — is listed for checking by hand",
8
21
  "de": "JSON-Diagramm behoben, das bei jedem Laden der Seite kurz rot „Error in JSON string“ zeigte: Ein leerer Datenpunkt — und den sieht das Widget, bis der erste Wert seines Abonnements eintrifft — wurde als fehlerhafter JSON-String gelesen. Der Fehler erscheint jetzt nur noch bei wirklich fehlerhaftem Inhalt. Die Top App Bar zeigte denselben Fehler bei einer Navigationsleiste, deren JSON-String noch nicht ausgefüllt war\nKurze Termine ohne sichtbaren Namen in der Wochen- und Tagesansicht des Kalenders behoben: Ein Terminfeld ist so hoch, wie der Termin lang ist, ein 15-Minuten-Termin bekam also etwa 14 px, während Uhrzeit und Name untereinander 44 px brauchten. Uhrzeit und Name stehen jetzt in einer Zeile mit Auslassungspunkten, ein Termin mit genug Platz bricht um statt abgeschnitten zu werden, und beim Überfahren mit der Maus — auf einem Touchgerät beim ersten Antippen — klappt ein Eintrag auf seinen vollen Text auf. Jeder Eintrag zeigt den vollen Text außerdem als Tooltip, und die Monatsansicht klappt genauso auf\nBehoben, dass der Kalender die Option **event height** außerhalb der Monatsansicht ignorierte: Die Option steht im Editor für jede Ansicht, wirkte aber nur im Monatsraster. In der Wochen- und Tagesansicht legt sie jetzt die Mindesthöhe eines Terminfelds fest — der zweite Weg, kurze Termine lesbar zu machen\nEin schreibgeschützter Slider sah genauso aus wie ein bedienbarer: Mit **Nur lesen** oder solange sein Datenpunkt **working** aktiv ist, sind Schiene und Regler jetzt abgeblendet wie ein deaktivierter Material-3-Button. Beschriftung und Wert bleiben voll lesbar\n**Thema verwenden** wirkte nur mit den Farben des Dunkelmodus: Im hellen Modus kamen die Theme-Farben nie beim Widget an, die Theme-Schriften und -Schriftgrößen in keinem der beiden Modi, weil vis-2 die zugehörigen Theme-Datenpunkte nicht abonnierte. Die Widgets abonnieren diese Datenpunkte jetzt selbst. Widgets, die das Theme schon nutzen, übernehmen die Werte ohne Änderung\nBehoben, dass **Thema verwenden** das Balken-, Kreis-, Verlaufs- und JSON-Diagramm schwarz färbte: Die Diagramme werden auf ein Canvas gezeichnet, das die CSS-Variablen des Themes nicht lesen kann, also wurde jede Theme-Farbe schwarz und jede Theme-Schrift fiel auf eine kleine Standardschrift zurück. Die Diagramme übernehmen die Theme-Werte jetzt direkt\nDie Zeitachse eines Verlaufsdiagramms aus einem vis-materialdesign-Projekt zeigte verstümmelten Text statt Uhrzeiten: Der alte Adapter speicherte in **Zeitformate der x-Achse** ein Format je Einheit (Sekunde, Minute, Stunde …), und die ganze Liste wurde als ein einziges Format benutzt. Jetzt gilt das Format der Einheit, die zum Abstand der Achsenbeschriftungen passt; ein einzelnes Format funktioniert wie bisher\nNeuer Tab **Migration** in den Adaptereinstellungen: Wandelt vis-2-Projekte, die mit den Widgets von Scroungers Adapter vis-materialdesign gebaut wurden, in diese Widgets um, sodass sich der alte Adapter deinstallieren lässt und die Views weiter funktionieren. Jedes Projekt wird vorher gesichert und lässt sich wiederherstellen; das Theme des alten Adapters lässt sich ebenfalls übernehmen. Was sich nicht automatisch umwandeln lässt — eigenes CSS für die alte Widget-Struktur, die alten JavaScript-Helfer, nicht mehr vorhandene Icons — wird zur Prüfung von Hand aufgelistet",
@@ -80,19 +93,6 @@
80
93
  "pl": "Naprawiono synchronizację obiektów edytora motywów w czasie działania: brakujące pośrednie obiekty kanałów, rolę tylko liczbową użytą dla wartości tekstowych i nieaktualną niezgodność typu w stanach rozmiaru czcionki.",
81
94
  "zh-cn": "修复了主题编辑器的运行时对象同步:缺失的中间通道对象、用于字符串值的仅数字角色,以及字体大小状态上过时的类型不匹配。",
82
95
  "uk": "Виправлено синхронізацію об'єктів редактора тем під час виконання: відсутні проміжні об'єкти-канали, числову роль для рядкових значень і застарілу невідповідність типу для станів розміру шрифту."
83
- },
84
- "0.3.2": {
85
- "en": "Fixed the \"npm run test:package\" CI check to run the standard package-file validation again, and removed the unused axios devDependency.",
86
- "de": "Die \"npm run test:package\"-CI-Prüfung wurde repariert, damit sie wieder die Standard-Paketdateiprüfung ausführt, und die unbenutzte axios-devDependency wurde entfernt.",
87
- "ru": "Проверка CI «npm run test:package» снова выполняет стандартную проверку файлов пакета, неиспользуемая зависимость axios удалена.",
88
- "pt": "A verificação de CI \"npm run test:package\" volta a executar a validação padrão dos ficheiros do pacote e a devDependency axios não utilizada foi removida.",
89
- "nl": "De CI-controle \"npm run test:package\" voert weer de standaard pakketbestandsvalidatie uit en de ongebruikte axios-devDependency is verwijderd.",
90
- "fr": "La vérification CI « npm run test:package » exécute de nouveau la validation standard des fichiers du paquet et la devDependency axios inutilisée a été supprimée.",
91
- "it": "Il controllo CI \"npm run test:package\" esegue di nuovo la validazione standard dei file del pacchetto ed è stata rimossa la devDependency axios inutilizzata.",
92
- "es": "La comprobación de CI \"npm run test:package\" vuelve a ejecutar la validación estándar de los archivos del paquete y se eliminó la devDependency axios no utilizada.",
93
- "pl": "Kontrola CI „npm run test:package” ponownie wykonuje standardową walidację plików pakietu, a nieużywana zależność deweloperska axios została usunięta.",
94
- "zh-cn": "修复了 \"npm run test:package\" CI 检查,使其重新运行标准的包文件校验,并移除了未使用的 axios 开发依赖。",
95
- "uk": "Перевірка CI «npm run test:package» знову виконує стандартну перевірку файлів пакета, а невикористану залежність axios вилучено."
96
96
  }
97
97
  },
98
98
  "titleLang": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.vis2-materialdesign",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "Native VIS 2 Material Design widgets based on the original work by Scrounger",
5
5
  "author": {
6
6
  "name": "typhosj",
@@ -0,0 +1 @@
1
+ import{n as e,r as t}from"./_virtual_mf___mfe_internal__vis2MaterialDesignWidgets__mf_ow-CLzQTKDT.js";import{C as n,I as r,M as i,P as a,a as o,i as s,j as c,m as l,n as u,o as d,p as f}from"./widgetUtils-D9S_f9Bd.js";function p(e){let t=e===`state8`;return{...d(`tplVis2-materialdesign-view-in-widget${t?`8`:``}`,t?`Advanced View in Widget 8`:`Advanced View in Widget`,t?[{name:`common`,fields:[{name:`oid`,label:`oid`,type:`id`},{name:`persistent`,label:`persistent`,type:`checkbox`},{name:`notIfInvisible`,label:`notIfInvisible`,type:`checkbox`},{name:`fadeInDuration`,label:`fadeInDuration`,type:`number`,default:50},{name:`fadeOutDuration`,label:`fadeOutDuration`,type:`number`,default:50},{name:`count`,label:`count`,type:`number`,default:1}]},{name:`views`,label:`group_views`,indexFrom:0,indexTo:`count`,fields:f([{name:`contains_view_`,label:`contains_view_`,type:`views`}],e=>l(e.count))}]:[{name:`common`,fields:[{name:`oid`,label:`oid`,type:`id`},{name:`fadeInDuration`,label:`fadeInDuration`,type:`number`,default:50},{name:`fadeOutDuration`,label:`fadeOutDuration`,type:`number`,default:50},{name:`fadeEffect`,label:`fadeEffect`,type:`select`,options:[`linear`,`swing`],default:`swing`},{name:`renderAlways`,label:`renderAlways`,type:`checkbox`},{name:`countRenderViewsOnLoad`,label:`countRenderViewsOnLoad`,type:`number`},{name:`hideErrorMessage`,label:`hideErrorMessage`,type:`checkbox`}]},{name:`renderViewsOnLoad`,label:`group_renderViewsOnLoad`,indexFrom:0,indexTo:`countRenderViewsOnLoad`,fields:f([{name:`View`,label:`View`,type:`views`}],e=>o(e.countRenderViewsOnLoad,0,100))}]),visPrev:c(`F056A`),visDefaultStyle:{width:400,height:270}}}var m=`@keyframes mdw-view-fade-in{from{opacity:0}to{opacity:1}}@keyframes mdw-view-fade-out{from{opacity:1}to{opacity:0}}`,h={linear:`linear`,swing:`ease-in-out`},g=class extends u{constructor(e,t){super(e),r(this,`kind`,void 0),r(this,`widgetId`,`materialdesign-advanced-view`),r(this,`shown`,``),r(this,`outgoing`,``),r(this,`fadeTimer`,void 0),this.kind=t}getWidgetInfo(){return p(this.kind)}componentWillUnmount(){this.fadeTimer&&window.clearTimeout(this.fadeTimer),super.componentWillUnmount()}embed(e){return this.getWidgetView(e,{style:{width:`100%`,height:`100%`}})}selected(e){let t=i(this.state,a(e.oid)),r=t===!0||t===`true`?1:t===!1||t===`false`?0:Math.max(0,Math.floor(n(t)));return this.kind===`state8`?a(e[`contains_view_${r}`]):a(t)}candidates(e){return this.kind===`state8`?s(e.persistent)?Array.from(new Set(Array.from({length:l(e.count)},(t,n)=>a(e[`contains_view_${n}`])).filter(Boolean))):[this.selected(e)].filter(Boolean):s(e.renderAlways)?Array.from(new Set([this.selected(e),...Array.from({length:o(e.countRenderViewsOnLoad,0,100)},(t,n)=>a(e[`View${n}`]))].filter(Boolean))):[this.selected(e)].filter(Boolean)}renderWidgetBody(r){super.renderWidgetBody(r),this.widgetId=r.id;let i=this.state.rxData;if(s(i.notIfInvisible)&&!this.state.visible)return this.shown=``,this.outgoing=``,e(`div`,{style:{height:`100%`,width:`100%`}});let o=this.selected(i),c=Math.max(0,n(i.fadeInDuration,50)),l=Math.max(0,n(i.fadeOutDuration,50)),u=h[a(i.fadeEffect,`swing`)]||`ease-in-out`;o!==this.shown&&(this.outgoing=this.shown,this.shown=o,this.fadeTimer&&window.clearTimeout(this.fadeTimer),this.fadeTimer=this.outgoing?window.setTimeout(()=>{this.fadeTimer=void 0,this.outgoing=``,this.forceUpdate()},l):void 0);let d=this.candidates(i),f=this.outgoing&&!d.includes(this.outgoing)?[...d,this.outgoing]:d;return t(`div`,{style:{height:`100%`,position:`relative`,width:`100%`,overflow:`hidden`},children:[e(`style`,{children:m}),f.length?f.map((t,n)=>e(`div`,{id:`${this.widgetId}-${n}`,style:{animation:t===o?`mdw-view-fade-in ${c}ms ${u} both`:t===this.outgoing?`mdw-view-fade-out ${l}ms ${u} both`:void 0,height:`100%`,inset:0,opacity:t===o||t===this.outgoing?void 0:0,pointerEvents:t===o?void 0:`none`,position:`absolute`,visibility:t===o||t===this.outgoing?void 0:`hidden`},children:this.embed(t)},t)):s(i.hideErrorMessage)?null:e(`span`,{className:`container-error`,children:`error: view not found.`})]})}};export{p as n,g as t};
@@ -1 +1 @@
1
- import{n as e,t}from"./MaterialDesignAdvancedView-HetkEw4s.js";var n=class n extends t{constructor(e){super(e,`state`)}static getWidgetInfo(){return e(`state`)}getWidgetInfo(){return n.getWidgetInfo()}};export{n as default};
1
+ import{n as e,t}from"./MaterialDesignAdvancedView-DNpwXGf3.js";var n=class n extends t{constructor(e){super(e,`state`)}static getWidgetInfo(){return e(`state`)}getWidgetInfo(){return n.getWidgetInfo()}};export{n as default};
@@ -1 +1 @@
1
- import{n as e,t}from"./MaterialDesignAdvancedView-HetkEw4s.js";var n=class n extends t{constructor(e){super(e,`state8`)}static getWidgetInfo(){return e(`state8`)}getWidgetInfo(){return n.getWidgetInfo()}};export{n as default};
1
+ import{n as e,t}from"./MaterialDesignAdvancedView-DNpwXGf3.js";var n=class n extends t{constructor(e){super(e,`state8`)}static getWidgetInfo(){return e(`state8`)}getWidgetInfo(){return n.getWidgetInfo()}};export{n as default};
@@ -0,0 +1 @@
1
+ import{n as e,r as t}from"./_virtual_mf___mfe_internal__vis2MaterialDesignWidgets__mf_ow-CLzQTKDT.js";import{C as n,D as r,I as i,M as a,O as o,P as s,a as c,c as l,f as u,i as d,j as f,k as p,n as m,o as h,s as g}from"./widgetUtils-D9S_f9Bd.js";import{r as _}from"./MaterialDesignButtons-DbnYsixT.js";function v(e){try{let t=JSON.parse(s(e));return Array.isArray(t)?t:null}catch{return null}}var y=`rgba(0,0,0,.2)`,b=`rgba(0,0,0,.14)`,x=`rgba(0,0,0,.12)`,S=[`none`,`0 2px 1px -1px ${y},0 1px 1px 0 ${b},0 1px 3px 0 ${x}`,`0 3px 1px -2px ${y},0 2px 2px 0 ${b},0 1px 5px 0 ${x}`,`0 3px 3px -2px ${y},0 3px 4px 0 ${b},0 1px 8px 0 ${x}`,`0 2px 4px -1px ${y},0 4px 5px 0 ${b},0 1px 10px 0 ${x}`,`0 3px 5px -1px ${y},0 5px 8px 0 ${b},0 1px 14px 0 ${x}`,`0 3px 5px -1px ${y},0 6px 10px 0 ${b},0 1px 18px 0 ${x}`,`0 4px 5px -2px ${y},0 7px 10px 1px ${b},0 2px 16px 1px ${x}`,`0 5px 5px -3px ${y},0 8px 10px 1px ${b},0 3px 14px 2px ${x}`,`0 5px 6px -3px ${y},0 9px 12px 1px ${b},0 3px 16px 2px ${x}`,`0 6px 6px -3px ${y},0 10px 14px 1px ${b},0 4px 18px 3px ${x}`,`0 6px 7px -4px ${y},0 11px 15px 1px ${b},0 4px 20px 3px ${x}`,`0 7px 8px -4px ${y},0 12px 17px 2px ${b},0 5px 22px 4px ${x}`,`0 7px 8px -4px ${y},0 13px 19px 2px ${b},0 5px 24px 4px ${x}`,`0 7px 9px -4px ${y},0 14px 21px 2px ${b},0 5px 26px 4px ${x}`,`0 8px 9px -5px ${y},0 15px 22px 2px ${b},0 6px 28px 5px ${x}`,`0 8px 10px -5px ${y},0 16px 24px 2px ${b},0 6px 30px 5px ${x}`,`0 8px 11px -5px ${y},0 17px 26px 2px ${b},0 6px 32px 5px ${x}`,`0 9px 11px -5px ${y},0 18px 28px 2px ${b},0 7px 34px 6px ${x}`,`0 9px 12px -6px ${y},0 19px 29px 2px ${b},0 7px 36px 6px ${x}`,`0 10px 13px -6px ${y},0 20px 31px 3px ${b},0 8px 38px 7px ${x}`,`0 10px 13px -6px ${y},0 21px 33px 3px ${b},0 8px 40px 7px ${x}`,`0 10px 14px -6px ${y},0 22px 35px 3px ${b},0 8px 42px 7px ${x}`,`0 11px 14px -7px ${y},0 23px 36px 3px ${b},0 9px 44px 8px ${x}`,`0 11px 15px -7px ${y},0 24px 38px 3px ${b},0 9px 46px 8px ${x}`],C=e=>{let t=Math.max(0,Math.min(24,Math.round(Number(e)||0)));return t?S[t]:void 0},w=[{name:`common`,fields:[{name:`oid`,label:`oid`,type:`id`},{name:`showMaxAlerts`,label:`showMaxAlerts`,type:`number`,default:3},{name:`minScreenResolution`,label:`minScreenResolution`,type:`number`}]},{name:`alertLayout`,label:`group_alertLayout`,fields:[{name:`alertLayouts`,label:`alertLayouts`,type:`select`,options:[`normal`,`outlined`,`tile`],default:`normal`},{name:`alertDense`,label:`alertDense`,type:`checkbox`,default:!0},{name:`alertElevation`,label:`alertElevation`,type:`slider`,min:0,max:24,step:1,default:1},{name:`alertMarginBottom`,label:`alertMarginBottom`,type:`number`,default:16},{name:`alertBorderLayout`,label:`alertBorderLayout`,type:`select`,options:[`none`,`top`,`right`,`left`,`bottom`],default:`none`},{name:`alertFontSize`,label:`alertFontSize`,type:`number`},{name:`alertFontFamily`,label:`alertFontFamily`,type:`fontname`},{name:`alertIconSize`,label:`alertIconSize`,type:`number`},u(`closeIcon`,`closeIcon`,`close-circle-outline`),{name:`closeIconColor`,label:`closeIconColor`,type:`color`},{name:`closeIconPressColor`,label:`closeIconPressColor`,type:`color`}]}],T=class u extends m{constructor(...e){super(...e),i(this,`pressedIndex`,-1)}static getWidgetInfo(){return{...h(`tplVis2-materialdesign-Alerts`,`Alerts`,w,[`alertLayout`]),visPrev:f(`F0026`),visDefaultStyle:{width:150,height:38}}}getWidgetInfo(){return u.getWidgetInfo()}renderWidgetBody(i){super.renderWidgetBody(i);let u=this.state.rxData,f=a(this.state,s(u.oid)),h=v(f),y=g(u)===`material3`,b=y?`var(--md-sys-color-error)`:`red`,x=(h??(f==null||f===``?[]:[{text:`Error in JSON string`,borderColor:b,icon:`alert-box`,iconColor:b}])).slice(0,c(u.showMaxAlerts,3)||100),S=e=>{h&&(h.splice(e,1),o(this.props,s(u.oid),JSON.stringify(h)))},w=s(u.alertBorderLayout),T=d(u.alertDense,!0),E=T?8:16,D=n(u.minScreenResolution),O=`mdw-alerts-${String(this.props.id||`x`).replace(/[^\w-]/g,``)}`,k=s(u.alertLayouts)===`outlined`;return t(`div`,{className:`materialdesign-widget materialdesign-alerts ${O}${y?` ${l(u,this.isDarkTheme())}`:``}`,style:{height:`100%`,overflow:`visible`,pointerEvents:`none`,width:`100%`},children:[D>0?e(`style`,{children:`@media (max-width:${D-1}px){.${O}{display:none!important}}`}):null,e(`div`,{className:`materialdesign-vuetify-alerts`,role:`status`,"aria-live":`polite`,style:{pointerEvents:`auto`,width:`100%`},children:x.map((i,a)=>t(`div`,{className:`v-alert ${s(u.alertLayouts,`normal`)===`outlined`?`v-alert--outlined`:``} ${s(u.alertLayouts)===`tile`?`v-alert--tile`:``}`,style:{alignItems:`center`,background:s(i.backgroundColor,y?`var(--md-sys-color-surface-container)`:``),border:y&&k?`1px solid var(--md-sys-color-outline-variant)`:void 0,borderRadius:s(u.alertLayouts)===`tile`?0:4,borderBottom:w===`bottom`?`6px solid ${s(i.borderColor)}`:void 0,borderLeft:w===`left`?`6px solid ${s(i.borderColor)}`:void 0,borderRight:w===`right`?`6px solid ${s(i.borderColor)}`:void 0,borderTop:w===`top`?`6px solid ${s(i.borderColor)}`:void 0,boxShadow:C(u.alertElevation),display:`flex`,fontFamily:s(u.alertFontFamily,`inherit`),fontSize:p(u.alertFontSize,16),marginBottom:n(u.alertMarginBottom,16),minHeight:T?void 0:48,paddingBottom:E-(w===`bottom`?6:0),paddingLeft:16-(w===`left`?6:0),paddingRight:16-(w===`right`?6:0),paddingTop:E-(w===`top`?6:0)},children:[e(`span`,{className:`materialdesign-v-alerts-prepend`,style:{display:`inline-flex`,marginRight:12},children:i.icon?_(i.icon,s(i.iconColor,y?`var(--md-sys-color-on-surface-variant)`:``),n(u.alertIconSize,24),!!i.iconColor):null}),e(`label`,{className:`materialdesign-v-alert-text`,style:{color:s(i.fontColor,y?`var(--md-sys-color-on-surface)`:``),flex:1},dangerouslySetInnerHTML:{__html:r(s(i.text))}}),e(`button`,{"aria-label":m.t(`ariaCloseAlert`),className:`materialdesign-icon-button v-alert-materialdesign-icon-button`,onClick:()=>S(a),onPointerCancel:()=>{this.pressedIndex=-1,this.forceUpdate()},onPointerDown:()=>{this.pressedIndex=a,this.forceUpdate()},onPointerLeave:()=>{this.pressedIndex===a&&(this.pressedIndex=-1,this.forceUpdate())},onPointerUp:()=>{this.pressedIndex=-1,this.forceUpdate()},style:{background:`transparent`,border:0,cursor:`pointer`,height:30,width:30},type:`button`,children:_(s(u.closeIcon,`close-circle-outline`),this.pressedIndex===a&&s(u.closeIconPressColor)||s(u.closeIconColor,y?`var(--md-sys-color-on-surface-variant)`:`#44739e`),20,!0)})]},a))})]})}};export{T as default};
@@ -1 +1 @@
1
- import{I as e,j as t}from"./widgetUtils-R3wQrTUE.js";import n from"./MaterialDesignSelect-BaNP9wV-.js";var r=class r extends n{constructor(...t){super(...t),e(this,`isAutocomplete`,!0)}static getWidgetInfo(){var e;let r=n.getWidgetInfo(),i=[{name:`inputMode`,label:`inputMode`,type:`select`,options:[`write`,`select`],default:`write`},{name:`inputType`,label:`inputType`,type:`select`,options:[`text`,`date`,`time`],default:`text`}],a=(e=r.visAttrs)==null?void 0:e.map(e=>e.name===`common`?{...e,fields:[...i,...e.fields]}:e);return{...r,id:`tplVis2-materialdesign-Autocomplete`,visName:`Autocomplete`,visAttrs:a,visPrev:t(`F13B8`)}}getWidgetInfo(){return r.getWidgetInfo()}};export{r as default};
1
+ import{I as e,j as t}from"./widgetUtils-D9S_f9Bd.js";import n from"./MaterialDesignSelect-Ct03oufQ.js";var r=class r extends n{constructor(...t){super(...t),e(this,`isAutocomplete`,!0)}static getWidgetInfo(){var e;let r=n.getWidgetInfo(),i=[{name:`inputMode`,label:`inputMode`,type:`select`,options:[`write`,`select`],default:`write`},{name:`inputType`,label:`inputType`,type:`select`,options:[`text`,`date`,`time`],default:`text`}],a=(e=r.visAttrs)==null?void 0:e.map(e=>e.name===`common`?{...e,fields:[...i,...e.fields]}:e);return{...r,id:`tplVis2-materialdesign-Autocomplete`,visName:`Autocomplete`,visAttrs:a,visPrev:t(`F13B8`)}}getWidgetInfo(){return r.getWidgetInfo()}};export{r as default};
@@ -1 +1 @@
1
- import{t as e}from"./MaterialDesignButtons-C5G4zxp4.js";var t=e({id:`tplVis2-materialdesign-Button-Adition`,name:`Button Addition`,kind:`addition`,layout:`default`,label:` Addition`,icon:`plus`});export{t as default};
1
+ import{t as e}from"./MaterialDesignButtons-DbnYsixT.js";var t=e({id:`tplVis2-materialdesign-Button-Adition`,name:`Button Addition`,kind:`addition`,layout:`default`,label:` Addition`,icon:`plus`});export{t as default};
@@ -1 +1 @@
1
- import{t as e}from"./MaterialDesignButtons-C5G4zxp4.js";var t=e({id:`tplVis2-materialdesign-Button-Adition-vertical`,name:`Button Addition vertical`,kind:`addition`,layout:`vertical`,label:`Addition`,icon:`plus`});export{t as default};
1
+ import{t as e}from"./MaterialDesignButtons-DbnYsixT.js";var t=e({id:`tplVis2-materialdesign-Button-Adition-vertical`,name:`Button Addition vertical`,kind:`addition`,layout:`vertical`,label:`Addition`,icon:`plus`});export{t as default};
@@ -1 +1 @@
1
- import{t as e}from"./MaterialDesignButtons-C5G4zxp4.js";var t=e({id:`tplVis2-materialdesign-Button-Link`,name:`Button Link`,kind:`link`,layout:`default`,label:` Link`,icon:`link`});export{t as default};
1
+ import{t as e}from"./MaterialDesignButtons-DbnYsixT.js";var t=e({id:`tplVis2-materialdesign-Button-Link`,name:`Button Link`,kind:`link`,layout:`default`,label:` Link`,icon:`link`});export{t as default};
@@ -1 +1 @@
1
- import{t as e}from"./MaterialDesignButtons-C5G4zxp4.js";var t=e({id:`tplVis2-materialdesign-Button-Link-vertical`,name:`Button Link vertical`,kind:`link`,layout:`vertical`,label:`Link`,icon:`link`});export{t as default};
1
+ import{t as e}from"./MaterialDesignButtons-DbnYsixT.js";var t=e({id:`tplVis2-materialdesign-Button-Link-vertical`,name:`Button Link vertical`,kind:`link`,layout:`vertical`,label:`Link`,icon:`link`});export{t as default};
@@ -1 +1 @@
1
- import{t as e}from"./MaterialDesignButtons-C5G4zxp4.js";var t=e({id:`tplVis2-materialdesign-Button-Navigation`,name:`Button Navigation`,kind:`navigation`,layout:`default`,label:` Navigation`,icon:`navigation`});export{t as default};
1
+ import{t as e}from"./MaterialDesignButtons-DbnYsixT.js";var t=e({id:`tplVis2-materialdesign-Button-Navigation`,name:`Button Navigation`,kind:`navigation`,layout:`default`,label:` Navigation`,icon:`navigation`});export{t as default};
@@ -1 +1 @@
1
- import{t as e}from"./MaterialDesignButtons-C5G4zxp4.js";var t=e({id:`tplVis2-materialdesign-Button-Navigation-vertical`,name:`Button Navigation vertical`,kind:`navigation`,layout:`vertical`,label:`Navigation`,icon:`navigation`});export{t as default};
1
+ import{t as e}from"./MaterialDesignButtons-DbnYsixT.js";var t=e({id:`tplVis2-materialdesign-Button-Navigation-vertical`,name:`Button Navigation vertical`,kind:`navigation`,layout:`vertical`,label:`Navigation`,icon:`navigation`});export{t as default};
@@ -1 +1 @@
1
- import{t as e}from"./MaterialDesignButtons-C5G4zxp4.js";var t=e({id:`tplVis2-materialdesign-Button-State`,name:`Button State`,kind:`state`,layout:`default`,label:` State`,icon:`pencil`});export{t as default};
1
+ import{t as e}from"./MaterialDesignButtons-DbnYsixT.js";var t=e({id:`tplVis2-materialdesign-Button-State`,name:`Button State`,kind:`state`,layout:`default`,label:` State`,icon:`pencil`});export{t as default};
@@ -1 +1 @@
1
- import{t as e}from"./MaterialDesignButtons-C5G4zxp4.js";var t=e({id:`tplVis2-materialdesign-Button-State-Multi`,name:`Button State Multi`,kind:`multiState`,layout:`default`,label:` Multi State`,icon:`pencil-box-multiple`});export{t as default};
1
+ import{t as e}from"./MaterialDesignButtons-DbnYsixT.js";var t=e({id:`tplVis2-materialdesign-Button-State-Multi`,name:`Button State Multi`,kind:`multiState`,layout:`default`,label:` Multi State`,icon:`pencil-box-multiple`});export{t as default};
@@ -1 +1 @@
1
- import{t as e}from"./MaterialDesignButtons-C5G4zxp4.js";var t=e({id:`tplVis2-materialdesign-Button-State-Multi-vertical`,name:`Button State Multi vertical`,kind:`multiState`,layout:`vertical`,label:`Multi State`,icon:`pencil-box-multiple`});export{t as default};
1
+ import{t as e}from"./MaterialDesignButtons-DbnYsixT.js";var t=e({id:`tplVis2-materialdesign-Button-State-Multi-vertical`,name:`Button State Multi vertical`,kind:`multiState`,layout:`vertical`,label:`Multi State`,icon:`pencil-box-multiple`});export{t as default};
@@ -1 +1 @@
1
- import{t as e}from"./MaterialDesignButtons-C5G4zxp4.js";var t=e({id:`tplVis2-materialdesign-Button-State-vertical`,name:`Button State vertical`,kind:`state`,layout:`vertical`,label:`State`,icon:`pencil`});export{t as default};
1
+ import{t as e}from"./MaterialDesignButtons-DbnYsixT.js";var t=e({id:`tplVis2-materialdesign-Button-State-vertical`,name:`Button State vertical`,kind:`state`,layout:`vertical`,label:`State`,icon:`pencil`});export{t as default};
@@ -1 +1 @@
1
- import{t as e}from"./MaterialDesignButtons-C5G4zxp4.js";var t=e({id:`tplVis2-materialdesign-Button-Toggle`,name:`Button Toggle`,kind:`toggle`,layout:`default`,label:` Toggle`,icon:`checkbox-marked`});export{t as default};
1
+ import{t as e}from"./MaterialDesignButtons-DbnYsixT.js";var t=e({id:`tplVis2-materialdesign-Button-Toggle`,name:`Button Toggle`,kind:`toggle`,layout:`default`,label:` Toggle`,icon:`checkbox-marked`});export{t as default};
@@ -1 +1 @@
1
- import{t as e}from"./MaterialDesignButtons-C5G4zxp4.js";var t=e({id:`tplVis2-materialdesign-Button-Toggle-vertical`,name:`Button Toggle vertical`,kind:`toggle`,layout:`vertical`,label:`Toggle`,icon:`checkbox-marked`});export{t as default};
1
+ import{t as e}from"./MaterialDesignButtons-DbnYsixT.js";var t=e({id:`tplVis2-materialdesign-Button-Toggle-vertical`,name:`Button Toggle vertical`,kind:`toggle`,layout:`vertical`,label:`Toggle`,icon:`checkbox-marked`});export{t as default};
@@ -0,0 +1 @@
1
+ import{n as e,r as t,s as n,t as r}from"./_virtual_mf___mfe_internal__vis2MaterialDesignWidgets__mf_ow-CLzQTKDT.js";import{C as i,D as a,E as o,I as s,L as c,M as l,N as u,O as d,T as f,c as ee,f as p,j as m,k as te,m as h,n as ne,o as g,p as _,s as v,t as y}from"./widgetUtils-D9S_f9Bd.js";import{n as b,t as x}from"./deviceFill-CwQqeyeG.js";var S={"checkbox-marked":`F0132`,link:`F0337`,navigation:`F0390`,pencil:`F03EB`,"pencil-box-multiple":`F1144`,plus:`F0415`},C={toggle:`F0521`,slider:`F1543`},w=(e,t)=>p(e,e,t),T=[{name:`buttonStyle`,label:`buttonStyle`,type:`select`,options:[`text`,`raised`,`unelevated`,`outlined`],default:`raised`,hidden:e=>v(e)===`material3`},{name:`md3ButtonVariant`,label:`md3ButtonVariant`,type:`select`,options:[`filled`,`tonal`,`elevated`,`outlined`,`text`],default:`filled`,hidden:e=>v(e)!==`material3`}],E=[{name:`md3IconButtonVariant`,label:`md3IconButtonVariant`,type:`select`,options:[`standard`,`filled`,`tonal`,`outlined`],default:`standard`,hidden:e=>v(e)!==`material3`}],D=[{name:`vibrateOnMobilDevices`,label:`vibrateOnMobilDevices`,type:`number`},{name:`clickSoundPlay`,label:`clickSoundPlay`,type:`checkbox`},{name:`clickSoundVolume`,label:`clickSoundVolume`,type:`slider`,min:0,max:1,step:.05,default:.5}],O={navigation:[{name:`nav_view`,label:`nav_view`,type:`views`}],link:[{name:`href`,label:`href`,type:`text`},{name:`openNewWindow`,label:`openNewWindow`,type:`checkbox`}],state:[{name:`oid`,label:`oid`,type:`id`},{name:`value`,label:`value`,type:`text`}],multiState:[{name:`countOids`,label:`countOids`,type:`number`,default:1}],addition:[{name:`oid`,label:`oid`,type:`id`},{name:`value`,label:`value`,type:`number`},{name:`minmax`,label:`minmax`,type:`text`}],toggle:[{name:`oid`,label:`oid`,type:`id`},{name:`readOnly`,label:`readOnly`,type:`checkbox`},{name:`toggleType`,label:`toggleType`,type:`select`,options:[`boolean`,`value`],default:`boolean`},{name:`pushButton`,label:`pushButton`,type:`checkbox`},{name:`valueOff`,label:`valueOff`,type:`text`},{name:`valueOn`,label:`valueOn`,type:`text`},{name:`stateIfNotTrueValue`,label:`stateIfNotTrueValue`,type:`select`,options:[`on`,`off`],default:`on`}],slider:[{name:`oid`,label:`oid`,type:`id`},{name:`readOnly`,label:`readOnly`,type:`checkbox`},{name:`sliderOnly`,label:`sliderOnly`,type:`checkbox`},{name:`sendValueOnRelease`,label:`sendValueOnRelease`,type:`checkbox`},{name:`valueOff`,label:`valueOff`,type:`number`},{name:`valueOn`,label:`valueOn`,type:`number`},{name:`sliderWidth`,label:`sliderDiameter`,type:`number`,default:20},{name:`sliderThikness`,label:`sliderThikness`,type:`number`},{name:`showInFront`,label:`showInFront`,type:`checkbox`},{name:`showAlways`,label:`showAlways`,type:`checkbox`},{name:`foregroundColor`,label:`foregroundColor`,type:`color`},{name:`backgroundColor`,label:`backgroundColor`,type:`color`},{name:`colorize`,label:`colorize`,type:`checkbox`},{name:`colorizeFactor`,label:`colorizeFactor`,type:`number`,default:.5},{name:`angleOffset`,label:`angleOffset`,type:`number`},{name:`angleArc`,label:`angleArc`,type:`number`,default:360}]};function k(e){let t=e.layout===`icon`?[]:[x.name(`buttontext`)],n=x.icon(`image`);return e.kind===`state`?{oid:[...t,n,x.firstState(`value`)]}:e.kind===`toggle`?{oid:[...t,n,x.toggleType(`toggleType`),x.toggleValue(`valueOn`,!0),x.toggleValue(`valueOff`,!1),x.readOnly(`readOnly`)]}:{}}function A(e){let t=e.layout===`icon`,n=e.layout===`vertical`,r=t?[]:[{name:`buttontext`,label:`buttontext`,type:`html`,default:e.label},{name:`labelTrue`,label:`labelTrue`,type:`html`},{name:`labelColorFalse`,label:`labelColorFalse`,type:`color`},{name:`labelColorTrue`,label:`labelColorTrue`,type:`color`},{name:`textFontFamily`,label:`textFontFamily`,type:`fontname`},{name:`textFontSize`,label:`textFontSize`,type:`number`},n?{name:`alignment`,label:`alignment`,type:`select`,options:[`flex-start`,`center`,`flex-end`],default:`center`}:{name:`labelWidth`,label:`labelWidth`,type:`slider`,min:0,max:100,step:1},n?{name:`distanceBetweenTextAndImage`,label:`distanceBetweenTextAndImage`,type:`slider`,min:0,max:100,step:1}:null].filter(Boolean),i=e.kind===`multiState`?[{name:`buttonOids`,label:`group_buttonOids`,indexFrom:0,indexTo:`countOids`,fields:_([{name:`oid`,label:`oid`,type:`id`},{name:`value`,label:`value`,type:`text`},{name:`delayInMs`,label:`delayInMs`,type:`number`,default:0}],e=>h(e.countOids))}]:[];return[{name:`common`,fields:[...t?E:T,...O[e.kind],...D]},...i,...r.length?[{name:`label`,fields:r}]:[],{name:`color`,fields:[{name:`mdwButtonPrimaryColor`,label:`mdwButtonPrimaryColor`,type:`color`},{name:`mdwButtonSecondaryColor`,label:`mdwButtonSecondaryColor`,type:`color`},{name:`mdwButtonColorPress`,label:`mdwButtonColorPress`,type:`color`},{name:`colorBgFalse`,label:`colorBgFalse`,type:`color`},{name:`colorBgTrue`,label:`colorBgTrue`,type:`color`},{name:`colorPress`,label:`colorPress`,type:`color`}]},{name:`icon`,fields:[w(`image`,e.icon),{name:`imageColor`,label:`imageColor`,type:`color`},w(`imageTrue`),{name:`imageTrueColor`,label:`imageTrueColor`,type:`color`},{name:`iconPosition`,label:`iconPosition`,type:`select`,options:n?[`top`,`bottom`]:[`left`,`right`],default:n?`top`:`left`},{name:`iconHeight`,label:`iconHeight`,type:`slider`,min:0,max:200,step:1,default:n?26:void 0}]},{name:`lock`,fields:[{name:`lockEnabled`,label:`lockEnabled`,type:`checkbox`},{name:`autoLockAfter`,label:`autoLockAfter`,type:`number`,default:10},w(`lockIcon`),{name:`lockIconTop`,label:`lockIconTop`,type:`slider`,min:0,max:100,step:1,default:t?45:5},{name:`lockIconLeft`,label:`lockIconLeft`,type:`slider`,min:0,max:100,step:1,default:t?55:5},{name:`lockIconSize`,label:`lockIconSize`,type:`number`},{name:`lockIconColor`,label:`lockIconColor`,type:`color`},{name:`lockIconBackground`,label:`lockIconBackground`,type:`color`},{name:`lockBackgroundSizeFactor`,label:`lockBackgroundSizeFactor`,type:`number`,default:1},{name:`lockFilterGrayscale`,label:`lockFilterGrayscale`,type:`slider`,min:0,max:100,step:1,default:30}]}]}function j(e){return typeof e==`string`&&!!e&&!e.startsWith(`#mdwTheme:`)}function M(e,t){return typeof e==`string`&&e&&!e.startsWith(`#mdwTheme:`)?e:t}var N=i;function P(e){let t=e.toLowerCase();return[`.gif`,`.png`,`.bmp`,`.jpg`,`.jpeg`,`.tif`,`.svg`,`http://`,`https://`,`;base64,`,`data:image/`].some(e=>t.includes(e))}function F(e){let t=e.toLowerCase();return t.includes(`.svg`)||t.includes(`image/svg+xml`)}function I(t,n,r,i=!0){if(!t)return null;let a={color:n,fontSize:r||void 0,height:r||void 0,lineHeight:1,width:r||void 0};if(P(t))return F(t)&&i?e(`span`,{style:{...a,backgroundColor:n,display:`inline-block`,maskImage:`url("${t}")`,maskPosition:`center`,maskRepeat:`no-repeat`,maskSize:`contain`,WebkitMaskImage:`url("${t}")`,WebkitMaskPosition:`center`,WebkitMaskRepeat:`no-repeat`,WebkitMaskSize:`contain`}}):e(`img`,{alt:``,src:t,style:{...a,objectFit:`contain`}});let o=c(t);return o?e(`span`,{className:`mdw-symbol`,style:a,children:o}):e(`span`,{className:`mdi ${t.startsWith(`mdi-`)?t:`mdi-${t}`}`,style:a})}function L(e,t){if(t.toggleType===`value`){let n=f(String(t.valueOn??!0)),r=f(String(t.valueOff??!1)),i=Number(e),a=Number(n),o=Number(r);return(Number.isFinite(i)&&Number.isFinite(a)?i===a:e===n)||!(Number.isFinite(i)&&Number.isFinite(o)?i===o:e===r)&&t.stateIfNotTrueValue===`on`}return e===!0||e===`true`||e===1||e===`1`}function re(e,t,n,r){return e.kind===`navigation`?!!n.nav_view&&n.nav_view===r:e.kind===`state`?t===f(String(n.value??``)):L(t,n)}function R(e,t,n){if(typeof t!=`string`||!t.trim())return e;let r=t.split(`;`).map(e=>e.trim()?Number(e.trim()):NaN),[i,a]=r.length>1?r:n<0?[r[0],NaN]:[NaN,r[0]];return Number.isFinite(i)&&e<i?i:Number.isFinite(a)&&e>a?a:e}function z(e,t,n){let r=e[`${t}${n}`];if(r!==void 0)return r;let i=e[t];if(Array.isArray(i))return i[n];if(i&&typeof i==`object`)return i[String(n)]}function B(e,t,n){let r=h(t.countOids);for(let i=0;i<r;i++){let r=u(z(t,`oid`,i)),a=f(u(z(t,`value`,i))),o=Math.min(2147483647,Math.max(0,N(z(t,`delayInMs`,i),0)));r&&(o?n(()=>d(e,r,a),o):d(e,r,a))}}function V(e){let t=N(e.vibrateOnMobilDevices,0);if(t>0&&navigator.vibrate&&navigator.vibrate(t),e.clickSoundPlay){let t=new Audio(`widgets/vis2-materialdesign/materialdesign-widgets-click-sound.mp3`);t.volume=Math.max(0,Math.min(1,N(e.clickSoundVolume,.5))),t.play().catch(()=>void 0)}}function H(e){return e.name}function U(e){return m(C[e.kind]??S[e.icon]??S.plus)}function W(e,t,n,r,i){if(e.kind===`navigation`&&n.nav_view)t.context.changeView(n.nav_view);else if(e.kind===`link`&&n.href){let e=o(n.href);if(!e)return;n.openNewWindow?window.open(e,`_blank`,`noopener,noreferrer`):window.location.href=e}else if(e.kind===`state`)d(t,n.oid||``,f(String(n.value??``)));else if(e.kind===`multiState`)B(t,n,i);else if(e.kind===`addition`){let e=N(n.value,0);d(t,n.oid||``,R(N(r,0)+e,n.minmax,e))}else if((e.kind===`toggle`||e.kind===`slider`)&&!n.readOnly){let a=e.kind===`slider`?N(n.valueOn,100):n.toggleType!==`value`||f(String(n.valueOn??!0)),o=e.kind===`slider`?N(n.valueOff,0):n.toggleType===`value`&&f(String(n.valueOff??!1));d(t,n.oid||``,L(r,n)?o:a),n.pushButton&&i(()=>d(t,n.oid||``,o),250)}}function G(i){return class o extends ne{constructor(e){super(e),s(this,`lockTimer`,void 0),s(this,`actionTimers`,new Set),s(this,`lastTouchAt`,0),s(this,`lastSliderAt`,0),s(this,`sliderWriter`,new y),s(this,`sliderPending`,void 0),s(this,`pressed`,!1),s(this,`schedule`,(e,t)=>{let n=0;n=window.setTimeout(()=>{this.actionTimers.delete(n),e()},t),this.actionTimers.add(n)})}static getWidgetInfo(){return{...g(i.id,i.name,b(A(i),k(i)),[`color`,`lock`]),visWidgetLabel:H(i),visPrev:U(i),visDefaultStyle:{width:i.layout===`icon`?48:100,height:i.layout===`vertical`?60:i.layout===`icon`?48:30},visResizeLocked:i.layout===`icon`}}getWidgetInfo(){return o.getWidgetInfo()}componentWillUnmount(){var e;this.lockTimer&&window.clearTimeout(this.lockTimer),this.actionTimers.forEach(e=>window.clearTimeout(e)),this.actionTimers.clear(),this.sliderWriter.cancel(),(e=super.componentWillUnmount)==null||e.call(this)}isLocked(e){return!!e.lockEnabled&&!this.state.unlocked}unlock(e){this.setState({unlocked:!0}),this.lockTimer&&window.clearTimeout(this.lockTimer),this.lockTimer=window.setTimeout(()=>{this.lockTimer=void 0,this.setState({unlocked:!1})},Math.min(86400,Math.max(1,N(e.autoLockAfter,10)))*1e3)}activate(e,t){let n=this.isLocked(e);if(!(e.readOnly&&!n)){if(V(e),n){this.unlock(e);return}i.kind===`slider`&&e.sliderOnly||W(i,this.props,e,t,this.schedule)}}press(e){this.pressed||(this.pressed=!0,this.pushDown(e))}release(e,t){this.takePress()&&(e.pushButton?this.pushUp(e):this.activate(e,t))}cancelPress(e){this.takePress()&&e.pushButton&&this.pushUp(e)}takePress(){let e=this.pressed;return this.pressed=!1,e}pushDown(e){if(i.kind!==`toggle`||e.readOnly||!e.pushButton)return;if(V(e),this.isLocked(e)){this.unlock(e),this.pressed=!1;return}let t=e.toggleType!==`value`||f(String(e.valueOn??!0));d(this.props,e.oid||``,t)}pushUp(e){if(this.isLocked(e)||i.kind!==`toggle`||e.readOnly||!e.pushButton)return;let t=e.toggleType===`value`&&f(String(e.valueOff??!1));d(this.props,e.oid||``,t)}setSliderFromPointer(e,t){if(t.readOnly||this.isLocked(t))return;this.lastSliderAt=Date.now();let n=e.currentTarget.getBoundingClientRect(),r=e.clientX-n.left-n.width/2,i=e.clientY-n.top-n.height/2,a=N(t.valueOff,0),o=N(t.valueOn,100),s=Math.max(1,Math.min(360,N(t.angleArc,360))),c=N(t.angleOffset,0),l=((Math.atan2(i,r)*180/Math.PI+90-c)%360+360)%360,u=Math.max(0,Math.min(1,l/s)),d=Math.round(a+(o-a)*u);this.sliderPending=d,t.sendValueOnRelease||this.sliderWriter.write(this.props,t.oid||``,d)}releaseSlider(e){if(e.sendValueOnRelease){this.sliderPending!==void 0&&d(this.props,e.oid||``,this.sliderPending);return}this.sliderWriter.flush(this.props)}renderWidgetBody(o){var s;super.renderWidgetBody(o);let c=this.state.rxData,d=this.state,f=l(this.state,c.oid||``),p=re(i,f,c,(s=this.props.context)==null?void 0:s.activeView),m=this.isLocked(c),h=M(p?c.colorBgTrue:c.mdwButtonPrimaryColor||c.colorBgFalse,i.layout===`icon`?`transparent`:`#44739e`),ne=c.buttonStyle===`outlined`||c.buttonStyle===`text`,g=M(p?c.imageTrueColor||c.mdwButtonSecondaryColor:c.mdwButtonSecondaryColor||c.imageColor,i.layout===`icon`||ne?`#44739e`:`#fff`),_=M(p?c.labelColorTrue:c.labelColorFalse,g),y=M(c.mdwButtonColorPress||c.colorPress,`#1565c0`),b=i.layout===`vertical`,x=i.layout===`icon`,S=x&&i.kind===`slider`,C=c.buttonStyle===`text`||c.buttonStyle===`outlined`,w=!S&&(d.active||d.hovered)?y:h,T=p&&c.imageTrue?c.imageTrue:c.image||i.icon,E=!!(p&&c.imageTrue?c.imageTrueColor:c.imageColor),D=(p&&c.labelTrue?c.labelTrue:c.buttontext)||i.label,O=b?c.iconPosition!==`bottom`:c.iconPosition!==`right`,k=N(c.iconHeight,b||x?26:18),A=N(c.lockIconSize,x?16:18),P=A*Math.max(1,N(c.lockBackgroundSizeFactor,1)),F=b?`column`:`row`,L=N(c.distanceBetweenTextAndImage,b?2:4),R=N(c.valueOff,0),z=N(c.valueOn,100),B=Math.min(z,Math.max(R,N(f,R))),H=i.kind===`slider`&&(c.showAlways||d.hovered||d.active),U=v(c)===`material3`,W=U&&!j(c.foregroundColor)?`var(--md-sys-color-primary)`:M(c.foregroundColor,`#44739e`),G=U&&!j(c.backgroundColor)?`var(--md-sys-color-surface-container-high)`:M(c.backgroundColor,`#eeeeee`),K=z===R?0:Math.max(0,Math.min(1,(B-R)/(z-R))),q=Math.max(32,Math.min(160,Math.max(48,N(c.sliderWidth,54)))),J=Math.max(2,N(c.sliderThikness,4)),Y=2*Math.PI*22,X=Y*(Math.max(1,Math.min(360,N(c.angleArc,360)))/360),ie=`${X*K} ${Y}`,ae=`${X} ${Y}`,oe=N(c.angleOffset,0)-90,se=U&&!x,ce=!U&&!x&&(c.buttonStyle??`raised`)===`raised`,Z=u(c.md3ButtonVariant)||`filled`,Q=u(c.md3IconButtonVariant)||`standard`,le=U&&(x?Q===`outlined`:Z===`outlined`),ue=p?j(c.colorBgTrue):j(c.mdwButtonPrimaryColor)||j(c.colorBgFalse),$=p?j(c.imageTrueColor)||j(c.mdwButtonSecondaryColor):j(c.mdwButtonSecondaryColor)||j(c.imageColor),de=j(p?c.labelColorTrue:c.labelColorFalse),fe=U&&!$?`currentColor`:g,pe=Math.max(0,Math.min(1,N(c.colorizeFactor,.5))),me=t(r,{children:[c.colorize&&i.kind===`slider`?e(`span`,{style:{display:`inline-flex`,filter:`brightness(${1-pe+pe*K})`},children:I(T,fe,k,E)}):I(T,fe,k,E),x?null:e(`span`,{style:{color:se&&!de&&!$?void 0:_,fontFamily:c.textFontFamily||void 0,fontSize:c.textFontSize?te(c.textFontSize,14):void 0,width:!b&&N(c.labelWidth,0)>0?`${N(c.labelWidth)}%`:void 0},dangerouslySetInnerHTML:{__html:a(D)}})]});return e(`div`,{className:U?`materialdesign-widget ${ee(c,this.isDarkTheme())}`:void 0,style:{boxSizing:`border-box`,width:`100%`,height:`100%`,padding:se&&Z===`elevated`||ce?4:0},children:t(`button`,{type:`button`,"aria-pressed":p,"aria-disabled":c.readOnly?!0:void 0,className:U?x?`mdw-md3-icon-button mdw-md3-icon-button--${Q} mdw-state-layer`:`mdw-md3-button mdw-md3-button--${Z} mdw-state-layer`:void 0,style:{width:`100%`,height:`100%`,border:U?le&&$?`1px solid ${g}`:void 0:c.buttonStyle===`outlined`&&!x?`1px solid ${h}`:0,borderRadius:x?`50%`:U?void 0:4,background:U?ue?h:void 0:C?`transparent`:w,boxShadow:ce?d.active?`0 5px 5px -3px rgba(0,0,0,.2), 0 8px 10px 1px rgba(0,0,0,.14), 0 3px 14px 2px rgba(0,0,0,.12)`:`0 3px 1px -2px rgba(0,0,0,.2), 0 2px 2px 0 rgba(0,0,0,.14), 0 1px 5px 0 rgba(0,0,0,.12)`:void 0,color:U?$?g:void 0:C&&!x?h:g,cursor:c.readOnly?`default`:`pointer`,padding:x?0:`0 8px`,display:`flex`,flexDirection:F,alignItems:b&&c.alignment||`center`,justifyContent:`center`,gap:L,transform:U?void 0:d.active?`translateY(1px)`:`none`,transition:U?void 0:`background 120ms ease, box-shadow 120ms ease, transform 80ms ease`,position:`relative`},onMouseEnter:()=>this.setState({hovered:!0}),onMouseLeave:()=>{this.cancelPress(c),this.setState({active:!1,hovered:!1})},onMouseDown:()=>{Date.now()-this.lastTouchAt<700||Date.now()-this.lastSliderAt<700||(this.setState({active:!0}),this.press(c))},onMouseUp:()=>{Date.now()-this.lastTouchAt<700||Date.now()-this.lastSliderAt<700||(this.setState({active:!1}),this.release(c,f))},onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),this.setState({active:!0}),this.press(c))},onKeyUp:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),this.setState({active:!1}),this.release(c,f))},onTouchStart:()=>{this.lastTouchAt=Date.now(),this.setState({active:!0}),this.press(c)},onTouchEnd:()=>{this.lastTouchAt=Date.now(),this.setState({active:!1}),this.release(c,f)},onTouchCancel:()=>{this.lastTouchAt=Date.now(),this.cancelPress(c),this.setState({active:!1})},children:[e(`span`,{style:{alignItems:b&&c.alignment||`center`,display:`flex`,flexDirection:F,filter:m?`grayscale(${N(c.lockFilterGrayscale,30)}%)`:void 0,gap:L,justifyContent:`center`,width:`100%`,height:`100%`},children:O?me:n.Children.toArray(me.props.children).reverse()}),m?e(`span`,{style:{position:`absolute`,left:`${N(c.lockIconLeft,x?55:5)}%`,top:`${N(c.lockIconTop,x?45:5)}%`,width:P||void 0,height:P||void 0,lineHeight:P?`${P}px`:void 0,fontSize:A||void 0,color:M(c.lockIconColor,`#B22222`),background:M(c.lockIconBackground,`transparent`),borderRadius:P||void 0,textAlign:`center`},children:I(c.lockIcon||`lock-outline`,M(c.lockIconColor,`#B22222`),A,!!c.lockIconColor)}):null,i.kind===`slider`?e(r,{children:t(`svg`,{"aria-label":i.name,role:`slider`,"aria-valuemax":z,"aria-valuemin":R,"aria-valuenow":B,height:q,onClick:e=>e.stopPropagation(),onPointerDown:e=>{e.stopPropagation(),e.currentTarget.setPointerCapture(e.pointerId),V(c),this.setSliderFromPointer(e,c)},onPointerMove:e=>{e.currentTarget.hasPointerCapture(e.pointerId)&&(e.stopPropagation(),this.setSliderFromPointer(e,c))},onPointerUp:e=>{e.stopPropagation(),e.currentTarget.hasPointerCapture(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId),this.releaseSlider(c)},onPointerCancel:e=>{e.currentTarget.hasPointerCapture(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId)},style:{cursor:c.readOnly||m?`default`:`pointer`,display:H?`block`:`none`,left:`50%`,overflow:`visible`,pointerEvents:c.readOnly||m?`none`:`auto`,position:`absolute`,top:`50%`,touchAction:`none`,transform:`translate(-50%, -50%)`,width:q,zIndex:c.showInFront?2:0},viewBox:`0 0 48 48`,width:q,children:[e(`circle`,{cx:`24`,cy:`24`,fill:`none`,r:22,stroke:G,strokeDasharray:ae,strokeLinecap:`round`,strokeWidth:J,transform:`rotate(${oe} 24 24)`}),e(`circle`,{cx:`24`,cy:`24`,fill:`none`,r:22,stroke:W,strokeDasharray:ie,strokeLinecap:`round`,strokeWidth:J,transform:`rotate(${oe} 24 24)`})]})}):null]})})}}}export{j as n,I as r,G as t};
@@ -0,0 +1 @@
1
+ import{n as e,r as t,s as n,t as r}from"./_virtual_mf___mfe_internal__vis2MaterialDesignWidgets__mf_ow-CLzQTKDT.js";import{C as i,I as a,M as o,P as s,c,g as l,h as u,i as d,j as f,k as p,n as m,o as h,s as g,u as _,x as v}from"./widgetUtils-D9S_f9Bd.js";var y=(e,t=``)=>{let n=s(e,t);return n.startsWith(`var(`)&&n.endsWith(`)`)?`${n.slice(0,-1)}, ${t})`:n},b=(e,t)=>p(e,t),x=e=>`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}`,S=e=>{let t=y(e);if(!/(?:Z|[+-]\d{2}:?\d{2})$/.test(t))return t;let n=new Date(t);return Number.isNaN(n.getTime())?t:`${x(n)}T${String(n.getHours()).padStart(2,`0`)}:${String(n.getMinutes()).padStart(2,`0`)}`};function C(e){let t=e._allDay===!0,n=e=>t?S(e).slice(0,10):S(e);return{start:n(e.start??e._date),end:n(e.end??e._end),name:y(e.name??e.event),color:y(e.color??e._calColor),colorText:y(e.colorText)}}var ee=e=>{try{let t=JSON.parse(y(e));return Array.isArray(t)?t.filter(e=>e&&typeof e==`object`).map(e=>C(e)):[]}catch{return[]}},w=(e,t=0)=>{let n=y(e).match(/(?:T|\s)(\d{1,2}):(\d{2})/);return n?Math.min(1439,Number(n[1])*60+Number(n[2])):t};function te(e,t,n){let r=new Date(e);return r.setHours(0,0,0,0),t===`month`?(r.setDate(1),r.setDate(1-(r.getDay()-n+7)%7)):t===`week`&&r.setDate(r.getDate()-(r.getDay()-n+7)%7),r}function ne(e,t,n){if(t===`month`){let t=new Date(e.getFullYear(),e.getMonth()+1,0),r=(new Date(e.getFullYear(),e.getMonth(),1).getDay()-n+7)%7;return Math.ceil((t.getDate()+r)/7)*7}return t===`week`?7:1}var T=e=>/(?:T|\s)\d{1,2}:\d{2}/.test(y(e));function re(e,t,n,r,i){let a=w(e.start,n),o=T(e.start),s=o&&y(e.start).slice(0,10)<t?0:a,c=o&&y(e.end).slice(0,10)>t?r:Math.max(s+1,w(e.end,s+i));return c<=n||s>=r?null:{start:Math.max(s,n),finish:Math.min(c,r),startMinute:a}}function ie(e){let t=e.map(()=>({index:0,total:1})),n=e.map((e,t)=>({end:e.finish,id:t,start:e.start})).sort((e,t)=>e.start-t.start||e.end-t.end),r=[],i=()=>{let e=r.reduce((e,n)=>Math.max(e,t[n.id].index+1),1);r.forEach(n=>{t[n.id].total=e}),r=[]};for(let e of n){r.every(t=>t.end<=e.start)&&i();let n=new Set(r.filter(t=>t.end>e.start).map(e=>t[e.id].index)),a=0;for(;n.has(a);)a++;t[e.id].index=a,r.push(e)}return i(),t}var E=(e,t)=>{let n=y(e.start).slice(0,10),r=y(e.end),i=(r||n).slice(0,10);return!n||n>t?!1:r&&i>n&&w(r)===0?t<i:t<=i};function D(e,t=`locale`,n){let r=(Math.floor(e)%1440+1440)%1440,i=Math.floor(r/60),a=r%60;return t===`24h`?`${String(i).padStart(2,`0`)}:${String(a).padStart(2,`0`)}`:t===`12h`?`${i%12||12}:${String(a).padStart(2,`0`)} ${i<12?`AM`:`PM`}`:n&&n.toLowerCase().startsWith(`de`)?a===0?`${String(i).padStart(2,`0`)} Uhr`:`${String(i).padStart(2,`0`)}:${String(a).padStart(2,`0`)}`:new Intl.DateTimeFormat(n,{hour:`2-digit`,minute:`2-digit`}).format(new Date(2e3,0,1,i,a))}function ae(e,t=`locale`,n){let r=(Math.floor(e)%1440+1440)%1440,i=Math.floor(r/60),a=r%60;return t===`24h`?a?`${String(i).padStart(2,`0`)}:${String(a).padStart(2,`0`)}`:String(i).padStart(2,`0`):t===`12h`?`${i%12||12}${a?`:${String(a).padStart(2,`0`)}`:``} ${i<12?`AM`:`PM`}`:new Intl.DateTimeFormat(n,{hour:`numeric`,minute:a>0?`numeric`:void 0}).format(new Date(2e3,0,1,i,a))}var O=[{name:`common`,fields:[{name:`oid`,label:`oid`,type:`id`},{name:`calendarView`,label:`calendarView`,type:`select`,options:[`month`,`week`,`day`],default:`month`},{name:`vibrateOnMobilDevices`,label:`vibrateOnMobilDevices`,type:`number`,default:50},{name:`clickSoundPlay`,label:`clickSoundPlay`,type:`checkbox`},{name:`clickSoundVolume`,label:`clickSoundVolume`,type:`slider`,min:0,max:1,step:.1,default:.5}]},{name:`calendarLayout`,label:`group_calendarLayout`,fields:[{name:`calendarWeekdays`,label:`calendarWeekdays`,type:`text`,default:`1,2,3,4,5,6,0`},{name:`calendarShortWeekdays`,label:`calendarShortWeekdays`,type:`checkbox`},{name:`calendarBorderColor`,label:`calendarBorderColor`,type:`color`},{name:`calendarDayBackgroundColor`,label:`calendarDayBackgroundColor`,type:`color`},{name:`calendarDayBackgroundOutsideColor`,label:`calendarDayBackgroundOutsideColor`,type:`color`}]},{name:`calendarHeaderLayout`,label:`group_calendarHeaderLayout`,fields:[{name:`calendarHeaderBackground`,label:`calendarHeaderBackground`,type:`color`},{name:`calendarDayLabelFontSize`,label:`calendarDayLabelFontSize`,type:`number`},{name:`calendarDayLabelFontFamily`,label:`calendarDayLabelFontFamily`,type:`fontname`},{name:`calendarDayLabelFontColor`,label:`calendarDayLabelFontColor`,type:`color`},{name:`calendarDayLabelPreviousFontColor`,label:`calendarDayLabelPreviousFontColor`,type:`color`},{name:`calendarDayLabelTodayFontSize`,label:`calendarDayLabelTodayFontSize`,type:`number`},{name:`calendarDayLabelTodayFontFamily`,label:`calendarDayLabelTodayFontFamily`,type:`fontname`},{name:`calendarDayLabelTodayFontColor`,label:`calendarDayLabelTodayFontColor`,type:`color`}]},{name:`calendarWeekNumbersLayout`,label:`group_calendarWeekNumbersLayout`,fields:[{name:`calendarWeeksNumbersShow`,label:`calendarWeeksNumbersShow`,type:`checkbox`,default:!0},{name:`calendarWeeksNumbersBackground`,label:`calendarWeeksNumbersBackground`,type:`color`},{name:`calendarWeeksNumbersFontSize`,label:`calendarWeeksNumbersFontSize`,type:`number`},{name:`calendarWeeksNumbersFont`,label:`calendarWeeksNumbersFont`,type:`fontname`},{name:`calendarWeeksNumbersFontColor`,label:`calendarWeeksNumbersFontColor`,type:`color`}]},{name:`calendarButtonsLayout`,label:`group_calendarButtonsLayout`,fields:[{name:`calendarDayButtonMonthViewGoTo`,label:`calendarDayButtonMonthViewGoTo`,type:`select`,options:[`week`,`day`],default:`week`},{name:`calendarDayButtonWeekViewGoTo`,label:`calendarDayButtonWeekViewGoTo`,type:`select`,options:[`month`,`day`],default:`day`},{name:`calendarDayButtonDayViewGoTo`,label:`calendarDayButtonDayViewGoTo`,type:`select`,options:[`month`,`week`],default:`week`},{name:`calendarDayButtonRippleEffectColor`,label:`calendarDayButtonRippleEffectColor`,type:`color`},{name:`calendarDayButtonColor`,label:`calendarDayButtonColor`,type:`color`},{name:`calendarDayButtonFontSize`,label:`calendarDayButtonFontSize`,type:`number`},{name:`calendarDayButtonFontFamily`,label:`calendarDayButtonFontFamily`,type:`fontname`},{name:`calendarDayButtonFontColor`,label:`calendarDayButtonFontColor`,type:`color`},{name:`calendarDayButtonTodayColor`,label:`calendarDayButtonTodayColor`,type:`color`},{name:`calendarDayButtonTodayFontSize`,label:`calendarDayButtonTodayFontSize`,type:`number`},{name:`calendarDayButtonTodayFontFamily`,label:`calendarDayButtonTodayFontFamily`,type:`fontname`},{name:`calendarDayButtonTodayFontColor`,label:`calendarDayButtonTodayFontColor`,type:`color`}]},{name:`controlLayout`,label:`group_controlLayout`,fields:[{name:`controlShow`,label:`controlShow`,type:`checkbox`,default:!0},{name:`controlButtonLayout`,label:`controlButtonLayout`,type:`select`,options:[`text`,`raised`,`unelevated`,`outlined`],default:`text`},{name:`controlPosition`,label:`controlPosition`,type:`select`,options:[`stretch`,`left`,`right`,`center`],default:`stretch`},{name:`controlMinWidth`,label:`controlMinWidth`,type:`number`},{name:`controlShowLabel`,label:`controlShowLabel`,type:`checkbox`,default:!0},{name:`controlButtonColor`,label:`controlButtonColor`,type:`color`},{name:`controlButtonRippelEffectColor`,label:`controlButtonRippelEffectColor`,type:`color`},{name:`controlIconSize`,label:`controlIconSize`,type:`number`},{name:`controlIconColor`,label:`controlIconColor`,type:`color`},{name:`controlTextSize`,label:`controlTextSize`,type:`number`},{name:`controlTextFont`,label:`controlTextFont`,type:`fontname`},{name:`controlTextColor`,label:`controlTextColor`,type:`color`}]},{name:`calendarTimeAxisLayout`,label:`group_calendarTimeAxisLayout`,fields:[{name:`calendarTimeAxisStartTime`,label:`calendarTimeAxisStartTime`,type:`number`,min:0,max:24,step:1},{name:`calendarTimeAxisEndTime`,label:`calendarTimeAxisEndTime`,type:`number`,min:1,max:24,step:1},{name:`calendarTimeAxisIntervalMinutes`,label:`calendarTimeAxisIntervalMinutes`,type:`number`},{name:`calendarTimeFormat`,label:`calendarTimeFormat`,type:`select`,options:[`locale`,`24h`,`12h`],default:`locale`},{name:`calendarTimeAxisBackgroundColor`,label:`calendarTimeAxisBackgroundColor`,type:`color`},{name:`calendarTimeAxisWidth`,label:`calendarTimeAxisWidth`,type:`number`},{name:`calendarTimeAxisHeight`,label:`calendarTimeAxisHeight`,type:`number`},{name:`calendarTimeAxisShortIntervals`,label:`calendarTimeAxisShortIntervals`,type:`checkbox`,default:!0},{name:`calendarTimeAxisHeaderBackgroundColor`,label:`calendarTimeAxisHeaderBackgroundColor`,type:`color`},{name:`calendarTimeAxisFontSize`,label:`calendarTimeAxisFontSize`,type:`number`},{name:`calendarTimeAxisFont`,label:`calendarTimeAxisFont`,type:`fontname`},{name:`calendarTimeAxisFontColor`,label:`calendarTimeAxisFontColor`,type:`color`},{name:`calendarNowIndicatorShow`,label:`calendarNowIndicatorShow`,type:`checkbox`,default:!0},{name:`calendarNowIndicatorColor`,label:`calendarNowIndicatorColor`,type:`color`}]},{name:`calendarEventLayout`,label:`group_calendarEventLayout`,fields:[{name:`calendarEventOverlapMode`,label:`calendarEventOverlapMode`,type:`select`,options:[`column`,`stack`],default:`column`},{name:`calendarEventHeight`,label:`calendarEventHeight`,type:`number`},{name:`calendarEventFontSize`,label:`calendarEventFontSize`,type:`number`},{name:`calendarEventFont`,label:`calendarEventFont`,type:`fontname`}]},{name:`calendarCustomFormats`,label:`group_calendarCustomFormats`,fields:[{name:`calendarMonthViewHeaderFormat`,label:`calendarMonthViewHeaderFormat`,type:`text`},{name:`calendarMonthViewDayFormat`,label:`calendarMonthViewDayFormat`,type:`text`},{name:`calendarWeekViewHeaderFormat`,label:`calendarWeekViewHeaderFormat`,type:`text`},{name:`calendarWeekViewDayFormat`,label:`calendarWeekViewDayFormat`,type:`text`},{name:`calendarDayViewHeaderFormat`,label:`calendarDayViewHeaderFormat`,type:`text`},{name:`calendarDayViewDayFormat`,label:`calendarDayViewDayFormat`,type:`text`}]}];function k(e){let t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()));t.setUTCDate(t.getUTCDate()+4-(t.getUTCDay()||7));let n=new Date(Date.UTC(t.getUTCFullYear(),0,1));return Math.ceil(((t.getTime()-n.getTime())/864e5+1)/7)}var A=class s extends m{constructor(...e){super(...e),a(this,`date`,new Date),a(this,`view`,``),a(this,`touchX`,0),a(this,`clock`,0)}static getWidgetInfo(){return{...h(`tplVis2-materialdesign-Calendar`,`Calendar`,O,[`calendarHeaderLayout`,`calendarWeekNumbersLayout`,`calendarButtonsLayout`,`controlLayout`,`calendarTimeAxisLayout`,`calendarCustomFormats`]),visPrev:f(`F00ED`),visDefaultStyle:{width:500,height:300}}}getWidgetInfo(){return s.getWidgetInfo()}syncClock(e){e&&!this.clock&&(this.clock=window.setInterval(()=>this.forceUpdate(),6e4)),!e&&this.clock&&(window.clearInterval(this.clock),this.clock=0)}componentWillUnmount(){this.clock&&window.clearInterval(this.clock),super.componentWillUnmount()}feedback(e){var t,n;if(i(e.vibrateOnMobilDevices,50)>0&&((t=(n=navigator).vibrate)==null||t.call(n,i(e.vibrateOnMobilDevices,50))),d(e.clickSoundPlay)){let t=new Audio(`widgets/vis2-materialdesign/materialdesign-widgets-click-sound.mp3`);t.volume=Math.max(0,Math.min(1,i(e.clickSoundVolume,.5))),t.play().catch(()=>void 0)}}renderWidgetBody(a){var s;super.renderWidgetBody(a);let f=this.state.rxData,p=this.isDarkTheme(),h=this.view||y(f.calendarView,`month`);this.syncClock(h!==`month`&&d(f.calendarNowIndicatorShow,!0));let S=ee(o(this.state,y(f.oid))),C=y(f.calendarWeekdays,`1,2,3,4,5,6,0`).split(`,`).map(Number).filter(e=>e>=0&&e<7),O=C.length===7?C:[1,2,3,4,5,6,0],A=te(this.date,h,O[0]),j=ne(this.date,h,O[0]),M=new Date;M.setHours(0,0,0,0);let oe=typeof window<`u`?window.navigator.language:void 0,N=typeof window<`u`&&(((s=window.vis)==null?void 0:s.language)||window.systemLang)||oe,P=N,F=g(f)===`material3`,I=(e,t,n)=>y(e)||(F?t:n),L=I(f.calendarBorderColor,`var(--md-sys-color-outline-variant)`,p?`rgba(255, 255, 255, 0.24)`:`#e0e0e0`),R=I(f.calendarHeaderBackground,`var(--md-sys-color-surface-container-low)`,p?`#303030`:`#fff`),se=I(f.calendarDayBackgroundColor,`var(--md-sys-color-surface)`,p?`#303030`:`#fff`),ce=I(f.calendarDayBackgroundOutsideColor,`var(--md-sys-color-surface-container-low)`,p?`#202020`:`#f7f7f7`),le=I(f.calendarWeeksNumbersBackground,`var(--md-sys-color-surface-container)`,p?`#202020`:`#f7f7f7`),ue=I(f.calendarWeeksNumbersFontColor,`var(--md-sys-color-on-surface-variant)`,p?`#FFFFFF`:`#000`),z=I(f.calendarDayLabelFontColor,`var(--md-sys-color-on-surface-variant)`,p?`#fff`:`rgba(0,0,0,.38)`),de=I(f.calendarDayLabelTodayFontColor,`var(--md-sys-color-primary)`,u(p)),B=I(f.calendarDayButtonTodayColor,`var(--md-sys-color-primary)`,`#44739e`),fe=I(f.calendarDayButtonTodayFontColor,`var(--md-sys-color-on-primary)`,`#fff`),pe=I(f.calendarDayButtonFontColor,`var(--md-sys-color-on-surface)`,p?`#fff`:`#000`),me=F?`var(--md-sys-color-primary-container)`:`#44739e`,he=F?`var(--md-sys-color-on-primary-container)`:`#fff`,ge=e=>y(e.colorText)||F&&y(e.color)&&v(y(e.color))||he,_e=F?`var(--md-sys-shape-corner-extra-small)`:void 0,ve=I(f.controlIconColor,`var(--md-sys-color-primary)`,u(p)),ye=I(f.controlTextColor,`var(--md-sys-color-on-surface)`,l(p)),be=I(f.calendarTimeAxisFontColor,`var(--md-sys-color-on-surface-variant)`,p?`#fff`:`#000`),V=e=>{this.date=new Date(this.date),h===`month`?(this.date.setDate(1),this.date.setMonth(this.date.getMonth()+e)):this.date.setDate(this.date.getDate()+e*(h===`week`?7:1)),this.forceUpdate()},H=e=>{this.view=e,this.forceUpdate()},U=(e,t)=>y(e)?{onMouseEnter:t=>{t.currentTarget.style.background=y(e)},onMouseLeave:e=>{e.currentTarget.style.background=t}}:void 0,W=y(f.controlButtonLayout,`text`),xe=W===`raised`||W===`unelevated`,Se=y(f.controlButtonColor,xe?F?`var(--md-sys-color-secondary-container)`:p?`#424242`:`#f5f5f5`:`transparent`),Ce={background:Se,border:W===`outlined`?`1px solid ${y(f.controlIconColor)||(F?`var(--md-sys-color-outline)`:`#44739e`)}`:0,borderRadius:F?`var(--md-sys-shape-corner-full)`:4,boxShadow:W===`raised`?`0 3px 1px -2px rgba(0,0,0,.2), 0 2px 2px 0 rgba(0,0,0,.14), 0 1px 5px 0 rgba(0,0,0,.12)`:void 0,cursor:`pointer`,display:`block`,flexGrow:y(f.controlPosition,`stretch`)===`stretch`?1:void 0,height:36,minWidth:i(f.controlMinWidth)||void 0,overflow:`hidden`,padding:`0 8px`,position:`relative`},G=(n,r,i)=>e(`div`,{"aria-label":m.t(`calendarControl${n}`),className:`materialdesign-button materialdesign-vuetify-calendar-control-button${F?` mdw-state-layer`:``}`,onClick:()=>{this.feedback(f),i()},onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),this.feedback(f),i())},role:`button`,style:Ce,tabIndex:0,...U(f.controlButtonRippelEffectColor,Se),children:t(`div`,{className:`materialdesign-button-body`,style:{alignItems:`center`,color:ve,display:`flex`,height:`100%`,justifyContent:`center`},children:[e(`span`,{className:`materialdesign-vuetify-calendar-control-button-icon mdi mdi-${r}`,style:{color:ve,fontSize:b(f.controlIconSize,24),height:b(f.controlIconSize,24),lineHeight:1,width:b(f.controlIconSize,24)}}),d(f.controlShowLabel,!0)?e(`span`,{className:`materialdesign-vuetify-calendar-control-button-text`,style:{color:ye,fontFamily:y(f.controlTextFont,`inherit`),fontSize:b(f.controlTextSize,12),marginLeft:4},children:m.t(`calendarControl${n}`)}):null]})},n),K=y(f.calendarTimeFormat,`locale`),we=e=>`${T(e.start)?`${D(w(e.start),K,P)} `:``}${y(e.name)}`,Te=(e,t)=>e?fe:y(t?f.calendarDayLabelPreviousFontColor:``,pe),Ee=Array.from({length:j},(a,o)=>{let s=new Date(A);s.setDate(A.getDate()+o);let c=x(s),l=s.getMonth()!==this.date.getMonth(),u=s.getTime()===M.getTime(),p=s.getTime()<M.getTime(),m=S.filter(e=>E(e,c)),g=h===`month`?y(f.calendarDayButtonMonthViewGoTo,`week`):h===`week`?y(f.calendarDayButtonWeekViewGoTo,`day`):y(f.calendarDayButtonDayViewGoTo,`week`),v=y(f.calendarMonthViewDayFormat)?_(s,y(f.calendarMonthViewDayFormat),N):s.getDate()===1?`${s.getDate()} ${new Intl.DateTimeFormat(N,{month:`short`}).format(s).replace(`.`,``)}`:s.getDate();return t(n.Fragment,{children:[d(f.calendarWeeksNumbersShow,!0)&&h===`month`&&o%7==0?e(`div`,{style:{alignItems:`center`,background:le,border:`1px solid ${L}`,color:ue,display:`flex`,fontFamily:y(f.calendarWeeksNumbersFont,`inherit`),fontSize:b(f.calendarWeeksNumbersFontSize,12),justifyContent:`center`},children:k(s)}):null,t(`div`,{className:`materialdesign-calendar-day`,style:{background:l?ce:se,border:`1px solid ${L}`,minWidth:0,padding:4},children:[e(`button`,{"aria-current":u?`date`:void 0,type:`button`,onClick:()=>{this.feedback(f),this.date=new Date(s),H(g)},...U(f.calendarDayButtonRippleEffectColor,u?B:y(f.calendarDayButtonColor,`transparent`)),style:{background:u?B:y(f.calendarDayButtonColor,`transparent`),border:0,borderRadius:u?`50%`:0,color:Te(u,p),cursor:`pointer`,fontFamily:y(u?f.calendarDayButtonTodayFontFamily:f.calendarDayButtonFontFamily,`inherit`),fontSize:b(u?f.calendarDayButtonTodayFontSize:f.calendarDayButtonFontSize,14),minHeight:F?24:void 0,minWidth:u?28:F?24:void 0},children:v}),m.map((n,a)=>e(`div`,{className:`v-event`,title:we(n),style:{backgroundColor:y(n.color,me),borderRadius:_e,color:ge(n),fontFamily:y(f.calendarEventFont,`inherit`),fontSize:b(f.calendarEventFontSize,12),height:i(f.calendarEventHeight)||void 0,marginTop:2,padding:`0 2px`},children:t(`span`,{className:`v-event-summary`,children:[T(n.start)&&y(n.start).slice(0,10)===c?t(r,{children:[e(`strong`,{children:ae(w(n.start),K,P)}),` `]}):null,y(n.name)]})},a))]})]},c)}),De=h===`month`&&d(f.calendarWeeksNumbersShow,!0)?8:h===`day`?1:7,q=Math.max(0,Math.min(23,Math.floor(i(f.calendarTimeAxisStartTime))))*60,J=Math.max(q+60,Math.min(1440,Math.floor(i(f.calendarTimeAxisEndTime,24))*60)),Y=Math.max(1,Math.floor(i(f.calendarTimeAxisIntervalMinutes,60))),X=Math.min(288,Math.ceil((J-q)/Y)),Oe=Math.max(12,i(f.calendarTimeAxisHeight,48)),Z=Array.from({length:j},(e,t)=>{let n=new Date(A);return n.setDate(A.getDate()+t),{day:n,iso:x(n)}}),ke=new Date,Q=ke.getHours()*60+ke.getMinutes(),Ae=Z.findIndex(({day:e})=>e.getTime()===M.getTime()),$=Ae>=0&&Q>=q&&Q<J&&d(f.calendarNowIndicatorShow,!0)?{row:Math.floor((Q-q)/Y),share:(Q-q)%Y/Y}:null,je=y(f.calendarEventOverlapMode,`column`)===`stack`,Me=Math.max(32,i(f.calendarTimeAxisWidth,60)),Ne=`${Me+1}px repeat(${j}, minmax(0, 1fr))`,Pe=t(`div`,{className:`v-calendar v-calendar-daily theme--light v-calendar-events`,style:{display:`flex`,flex:1,flexDirection:`column`,minHeight:0,overflow:`hidden`},children:[t(`div`,{className:`v-calendar-daily__head`,style:{display:`grid`,flex:`0 0 auto`,gridTemplateColumns:Ne,overflow:`hidden`,scrollbarGutter:`stable`},children:[e(`div`,{className:`materialdesign-calendar-intervals-head`,style:{alignItems:`center`,background:y(f.calendarTimeAxisHeaderBackgroundColor,`transparent`),border:0,display:`flex`,justifyContent:`center`,overflow:`hidden`},children:d(f.calendarWeeksNumbersShow,!0)?e(`span`,{style:{color:ue,fontFamily:y(f.calendarWeeksNumbersFont,`inherit`),fontSize:b(f.calendarWeeksNumbersFontSize,12)},children:`${m.t(`calendarWeekShort`)} ${k(A)}`}):null}),Z.map(({day:n,iso:r})=>{let i=n.getTime()===M.getTime(),a=n.getTime()<M.getTime(),o=h===`week`?y(f.calendarDayButtonWeekViewGoTo,`day`):y(f.calendarDayButtonDayViewGoTo,`week`),s=y(h===`week`?f.calendarWeekViewHeaderFormat:f.calendarDayViewHeaderFormat),c=y(h===`week`?f.calendarWeekViewDayFormat:f.calendarDayViewDayFormat),l=s?_(n,s,N):new Intl.DateTimeFormat(N,{weekday:`long`}).format(n),u=c?_(n,c,N):n.getDate();return t(`div`,{className:`v-calendar-daily_head-day ${i?`v-present`:`v-past`}`,style:{background:R,borderBottom:`1px solid ${L}`,borderRight:`1px solid ${L}`,borderTop:`1px solid ${L}`,minWidth:0,paddingBottom:1,width:`auto`},children:[e(`div`,{className:`v-calendar-daily_head-weekday`,style:{color:i?de:y(a?f.calendarDayLabelPreviousFontColor:``,z),fontFamily:y(i?f.calendarDayLabelTodayFontFamily:f.calendarDayLabelFontFamily,`inherit`),fontSize:b(i?f.calendarDayLabelTodayFontSize:f.calendarDayLabelFontSize,13),overflow:`hidden`,padding:4,textAlign:`center`,textTransform:`uppercase`},children:l}),e(`div`,{className:`v-calendar-daily_head-day-label`,style:{overflow:`hidden`,paddingBottom:3,textAlign:`center`},children:e(`button`,{"aria-current":i?`date`:void 0,className:`v-btn--round`,type:`button`,onClick:()=>{this.feedback(f),this.date=new Date(n),H(o)},...U(f.calendarDayButtonRippleEffectColor,i?B:y(f.calendarDayButtonColor,`transparent`)),style:{alignItems:`center`,background:i?B:y(f.calendarDayButtonColor,`transparent`),border:0,borderRadius:`50%`,color:Te(i,a),cursor:`pointer`,display:`inline-flex`,fontFamily:y(i?f.calendarDayButtonTodayFontFamily:f.calendarDayButtonFontFamily,`inherit`),fontSize:b(i?f.calendarDayButtonTodayFontSize:f.calendarDayButtonFontSize,14),aspectRatio:`1 / 1`,justifyContent:`center`,maxWidth:`100%`,minWidth:0,padding:0,width:F?`min(40px, 100%)`:`min(56px, 100%)`},children:e(`span`,{children:u})})})]},`header-${r}`)})]}),t(`div`,{className:`v-calendar-daily__scroll-area`,style:{display:`grid`,flex:1,gridTemplateColumns:Ne,gridTemplateRows:`repeat(${X}, minmax(${Oe}px, 1fr))`,minHeight:0,overflow:`auto`,scrollbarGutter:`stable`},children:[Array.from({length:X},(r,i)=>{let a=q+i*Y,o=a+Y,s=i<X-1&&(d(f.calendarTimeAxisShortIntervals,!0)||o%60==0);return t(n.Fragment,{children:[e(`div`,{style:{alignItems:`flex-end`,background:y(f.calendarTimeAxisBackgroundColor,`transparent`),boxSizing:`border-box`,display:`flex`,gridColumn:1,gridRow:i+1,justifyContent:`flex-end`},children:s?e(`div`,{className:`v-calendar-daily__interval-text`,style:{boxSizing:`border-box`,color:be,fontFamily:y(f.calendarTimeAxisFont,`inherit`),fontSize:b(f.calendarTimeAxisFontSize,12),paddingRight:4,textAlign:`right`,transform:`translateY(50%)`,width:Me-8},children:D(o,K,P)}):null}),Z.map(({iso:t},n)=>e(`div`,{className:`v-calendar-daily__day-interval`,style:{background:se,borderLeft:n===0?0:void 0,borderRight:`1px solid ${L}`,borderTop:`1px solid ${L}`,gridColumn:n+2,gridRow:i+1}},`${t}-${a}`))]},`slot-${a}`)}),Z.flatMap(({iso:n},r)=>{let a=S.filter(e=>E(e,n)).map(e=>({event:e,slot:re(e,n,q,J,Y)})).filter(e=>e.slot!==null),o=ie(a.map(e=>e.slot));return a.map(({event:a,slot:s},c)=>{let{start:l,finish:u,startMinute:d}=s,{index:p,total:m}=o[c],h=je?`calc(100% - ${p*12+2}px)`:`calc(${100/m}% - 2px)`,g=X*Y,_=(l-q)/g*100,v=(u-l)/g*100;return e(`div`,{className:`v-event-column`,style:{"--mdw-event-lane":1+p,gridColumn:r+2,gridRow:`1 / span ${X}`,minHeight:0,pointerEvents:`none`,position:`relative`},children:t(`div`,{className:`v-event`,title:we(a),style:{"--mdw-event-left":je?`${p*12+1}px`:`calc(${p*100/m}% + 1px)`,"--mdw-event-min-height":i(f.calendarEventHeight)?`${i(f.calendarEventHeight)}px`:void 0,"--mdw-event-width":h,backgroundColor:y(a.color,me),borderRadius:_e,boxSizing:`border-box`,color:ge(a),fontFamily:y(f.calendarEventFont,`inherit`),fontSize:b(f.calendarEventFontSize,12),height:`calc(${v}% - 2px)`,pointerEvents:`auto`,position:`absolute`,top:`calc(${_}% + 1px)`},children:[T(a.start)?e(`div`,{className:`mdw-event-time`,children:D(d,K,P)}):null,e(`div`,{className:`mdw-event-name`,children:y(a.name)})]})},`event-${n}-${c}`)})}),$?e(`div`,{className:`v-current-time`,style:{gridColumn:Ae+2,gridRow:$.row+1,pointerEvents:`none`,position:`relative`,zIndex:2},children:e(`div`,{style:{background:y(f.calendarNowIndicatorColor,`#ea4335`),height:2,left:0,position:`absolute`,right:0,top:`${$.share*100}%`}})}):null]})]});return t(`div`,{className:`materialdesign-widget materialdesign-calendar materialdesign-vuetify-calendar${F?` ${c(f,p)}`:``}`,style:{background:F?`var(--md-sys-color-surface)`:p?`#303030`:`transparent`,color:F?`var(--md-sys-color-on-surface)`:p?`#fff`:`#000`,display:`flex`,flexDirection:`column`,height:`100%`,width:`100%`},children:[d(f.controlShow,!0)?t(`div`,{className:`materialdesign-vuetify-calendar-control-container`,style:{display:`flex`,flex:`0 0 auto`,gap:0,justifyContent:y(f.controlPosition,`stretch`)===`stretch`?`stretch`:y(f.controlPosition)===`left`?`flex-start`:y(f.controlPosition)===`right`?`flex-end`:`center`},children:[G(`Prev`,`calendar-arrow-left`,()=>V(-1)),G(`Today`,`calendar-today`,()=>{this.date=new Date,this.forceUpdate()}),G(`Month`,`calendar-month`,()=>H(`month`)),G(`Week`,`calendar-week`,()=>H(`week`)),G(`Day`,`calendar`,()=>H(`day`)),G(`Next`,`calendar-arrow-right`,()=>V(1))]}):null,h===`month`?t(`div`,{onTouchStart:e=>{var t;this.touchX=((t=e.touches[0])==null?void 0:t.clientX)||0},onTouchEnd:e=>{var t;let n=(((t=e.changedTouches[0])==null?void 0:t.clientX)||0)-this.touchX;Math.abs(n)>30&&V(n<0?1:-1)},style:{display:`grid`,flex:1,gridAutoRows:`minmax(0, 1fr)`,gridTemplateColumns:De===8?`24px repeat(7, minmax(0, 1fr))`:`repeat(${De}, minmax(0, 1fr))`,gridTemplateRows:h===`month`?`auto`:void 0,minHeight:0},children:[h===`day`?null:t(r,{children:[d(f.calendarWeeksNumbersShow,!0)&&h===`month`?e(`div`,{style:{background:R,border:`1px solid ${L}`}}):null,O.map(t=>e(`div`,{style:{background:R,border:`1px solid ${L}`,color:z,fontFamily:y(f.calendarDayLabelFontFamily,`inherit`),fontSize:b(f.calendarDayLabelFontSize,12),overflow:`hidden`,padding:4,textAlign:`center`,textTransform:`uppercase`},children:(()=>{let e=y(f.calendarMonthViewHeaderFormat),n=new Date(2024,0,t||7);return e?_(n,e,N):new Intl.DateTimeFormat(N,{weekday:d(f.calendarShortWeekdays)?`short`:`long`}).format(n)})()},t))]}),Ee]}):Pe]})}};export{ne as calendarDayCount,C as calendarEvent,T as calendarEventHasTime,ie as calendarEventLanes,E as calendarEventOccursOnDate,re as calendarEventSlot,te as calendarGridStart,A as default,w as eventMinutes,ae as formatCalendarShortTime,D as formatCalendarTime,_ as formatMoment,x as isoDate,S as localTimestamp,k as weekNumber};
@@ -0,0 +1 @@
1
+ import{n as e,r as t,s as n,t as r}from"./_virtual_mf___mfe_internal__vis2MaterialDesignWidgets__mf_ow-CLzQTKDT.js";import{C as i,D as a,E as o,I as s,M as c,O as l,P as u,T as d,_ as f,c as p,h as m,i as h,j as g,n as _,o as v,r as y,s as b,y as x}from"./widgetUtils-D9S_f9Bd.js";import{n as S}from"./MaterialDesignButtons-DbnYsixT.js";var C=[`auto`,`headline1`,`headline2`,`headline3`,`headline4`,`headline5`,`headline6`,`subtitle1`,`subtitle2`,`body1`,`body2`,`caption`,`button`,`overline`,`xx-small`,`x-small`,`small`,`medium`,`large`,`x-large`,`xx-large`,`smaller`,`larger`],w=new Set([`headline1`,`headline2`,`headline3`,`headline4`,`headline5`,`headline6`,`subtitle1`,`subtitle2`,`body1`,`body2`,`caption`,`button`,`overline`]),T=e=>{let t=u(e);return w.has(t)?{cls:`mdc-typography--${t}`,fs:void 0}:{cls:``,fs:t&&t!==`auto`?t:void 0}},E=`.materialdesign-widget .materialdesign-html-card.card-title-section{box-sizing:border-box;width:100%;padding:16px 16px 0}.materialdesign-widget .materialdesign-html-card.card-text-section{box-sizing:border-box;padding:16px}.materialdesign-widget .materialdesign-html-card-container:focus-visible{outline:2px solid #44739e;outline-offset:2px}.materialdesign-widget.mdw-style-material3 .materialdesign-html-card-container:focus-visible{outline-color:var(--md-sys-color-primary)}`,D=[{name:`common`,fields:[{name:`listItemDataMethod`,label:`listItemDataMethod`,type:`select`,options:[`inputPerEditor`,`jsonStringObject`],default:`inputPerEditor`},{name:`json_string_oid`,label:`json_string_oid`,type:`id`},{name:`cardLayout`,label:`cardLayout`,type:`select`,options:[`Basic`,`BasicHeader`,`BasicHeaderOverlay`,`Horizontal`],default:`Basic`},{name:`cardStyle`,label:`cardStyle`,type:`select`,options:[`default`,`outlined`],default:`default`},{name:`showScrollbar`,label:`showScrollbar`,type:`checkbox`,default:!0}]},{name:`title`,fields:[{name:`showTitle`,label:`showTitle`,type:`checkbox`,default:!0},{name:`title`,label:`title`,type:`html`},{name:`titleLayout`,label:`titleLayout`,type:`select`,options:C},{name:`titleFontFamily`,label:`titleFontFamily`,type:`fontname`},{name:`showSubTitle`,label:`showSubTitle`,type:`checkbox`,default:!0},{name:`subtitle`,label:`subtitle`,type:`html`},{name:`labelSubTextHeight`,label:`labelSubTextHeight`,type:`number`},{name:`subtitleLayout`,label:`subtitleLayout`,type:`select`,options:C},{name:`subTitleFontFamily`,label:`subTitleFontFamily`,type:`fontname`}]},{name:`text`,fields:[{name:`showText`,label:`showText`,type:`checkbox`,default:!0},{name:`html`,label:`html`,type:`html`},{name:`textFontSize`,label:`textFontSize`,type:`select`,options:C},{name:`textFontFamily`,label:`textFontFamily`,type:`fontname`},{name:`labelTextHeight`,label:`labelTextHeight`,type:`number`}]},{name:`image`,label:`group_image`,fields:[{name:`image`,label:`image`,type:`image`},{name:`refreshOnWakeUp`,label:`refreshOnWakeUp`,type:`checkbox`},{name:`refreshOnViewChange`,label:`refreshOnViewChange`,type:`checkbox`},{name:`refresh_oid`,label:`refresh_oid`,type:`id`},{name:`refresh_oid_delay`,label:`refresh_oid_delay`,type:`slider`,min:0,max:18e4,step:100,default:100},{name:`refresh_animation_duration`,label:`refresh_animation_duration`,type:`slider`,min:0,max:18e4,step:100,default:150}]},{name:`color`,label:`group_color`,fields:[`colorBackground`,`colorTitleSectionBackground`,`colorTextSectionBackground`,`colorTitle`,`colorSubtitle`,`colorBody`].map(e=>({name:e,label:e,type:`color`}))},{name:`controlCard`,label:`group_controlCard`,fields:[{name:`clickType`,label:`clickType`,type:`select`,options:[`none`,`card`,`image`,`text`],default:`none`},{name:`controlType`,label:`controlType`,type:`select`,options:[`link`,`state`],default:`link`},{name:`href`,label:`href`,type:`url`},{name:`state_oid`,label:`state_oid`,type:`id`},{name:`state_value`,label:`state_value`,type:`text`}]}],O=class C extends _{constructor(...e){super(...e),s(this,`seenRefresh`,void 0),s(this,`refreshReady`,!1),s(this,`refreshTs`,0),s(this,`refreshTimer`,void 0),s(this,`onVisible`,()=>{typeof document<`u`&&document.visibilityState===`visible`&&h(this.state.rxData.refreshOnWakeUp)&&this.bust()})}static getWidgetInfo(){return{...v(`tplVis2-materialdesign-Card`,`HTML Card`,D,[`color`,`controlCard`]),visPrev:g(`F0B78`),visDefaultStyle:{width:200,height:130}}}getWidgetInfo(){return C.getWidgetInfo()}bust(){this.refreshTs=Date.now(),this.forceUpdate()}componentDidMount(){super.componentDidMount(),typeof document<`u`&&document.addEventListener(`visibilitychange`,this.onVisible),h(this.state.rxData.refreshOnViewChange)&&(this.refreshTs=Date.now())}componentWillUnmount(){var e;typeof document<`u`&&document.removeEventListener(`visibilitychange`,this.onVisible),this.refreshTimer&&clearTimeout(this.refreshTimer),(e=super.componentWillUnmount)==null||e.call(this)}renderWidgetBody(s){super.renderWidgetBody(s);let g=this.state.rxData,v=b(g)===`material3`,C=u(g.cardStyle)===`outlined`,w=(e,t,n)=>v&&!S(e)?t:u(e,n),D=this.isDarkTheme(),O=g;if(g.listItemDataMethod===`jsonStringObject`)try{O=JSON.parse(u(c(this.state,u(g.json_string_oid)),`{}`))}catch{O={title:`<font color="red"><b>Error in JSON string</b></font>`}}let k=u(O.title),A=u(O.subTitle??O.subtitle),j=u(O.body??O.html),M=u(O.image);if(u(g.refresh_oid)){let e=c(this.state,u(g.refresh_oid));this.refreshReady?e!==this.seenRefresh&&(this.seenRefresh=e,this.refreshTimer&&clearTimeout(this.refreshTimer),this.refreshTimer=window.setTimeout(()=>{this.refreshTimer=void 0,this.bust()},Math.min(18e4,Math.max(0,i(g.refresh_oid_delay,100))))):(this.seenRefresh=e,this.refreshReady=!0)}let N=this.refreshTs&&M&&(M.startsWith(`http`)||M.startsWith(`/`))?`${M}${M.includes(`?`)?`&`:`?`}_refts=${this.refreshTs}`:M,P=u(g.clickType)!==`none`,F=()=>{if(P)if(u(g.controlType,`link`)===`state`)l(this.props,u(g.state_oid),d(u(g.state_value)));else{let e=o(g.href);e&&window.open(e,`_blank`,`noopener,noreferrer`)}},I=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),F())},L=T(g.titleLayout),R=T(g.subtitleLayout),z=T(g.textFontSize),B=h(g.showTitle,!0)||h(g.showSubTitle,!0)?t(`div`,{className:`materialdesign-html-card card-title-section`,style:{background:u(g.colorTitleSectionBackground)||void 0},children:[h(g.showTitle,!0)?e(`div`,{className:`materialdesign-html-card card-title ${L.cls}`,dangerouslySetInnerHTML:{__html:a(k)},style:{fontFamily:u(g.titleFontFamily),fontSize:L.fs,color:w(g.colorTitle,`var(--md-sys-color-on-surface)`,m(D))}}):null,h(g.showSubTitle,!0)?e(`div`,{className:`materialdesign-html-card card-subtitle ${R.cls}`,dangerouslySetInnerHTML:{__html:a(A)},style:{color:w(g.colorSubtitle,`var(--md-sys-color-on-surface-variant)`,f(D)),fontFamily:u(g.subTitleFontFamily),fontSize:R.fs,height:i(g.labelSubTextHeight)||void 0}}):null]}):null,V=h(g.showText,!0)?e(`div`,{className:`materialdesign-html-card card-text-section`,style:{background:u(g.colorTextSectionBackground),overflow:h(g.showScrollbar,!0)?`auto`:void 0},children:e(`div`,{className:`materialdesign-html-card card-body ${z.cls}`,dangerouslySetInnerHTML:{__html:a(j)},style:{color:w(g.colorBody,`var(--md-sys-color-on-surface)`,m(D)),fontFamily:u(g.textFontFamily),fontSize:z.fs,height:i(g.labelTextHeight)||void 0}})}):null,H=e(`div`,{className:`materialdesign-html-card mdc-card__media ${u(g.cardLayout)===`Horizontal`?`mdc-card__media--square`:`mdc-card__media--16-9`}`,style:{backgroundImage:N?`url(${N})`:void 0,display:M?void 0:`none`,transition:`opacity ${i(g.refresh_animation_duration,150)}ms`}}),U=u(g.cardLayout,`Basic`);return t(`div`,{className:`materialdesign-widget materialdesign-html-card${v?` ${p(g,this.isDarkTheme())}`:``}`,style:{height:`100%`,width:`100%`},children:[e(`style`,{children:E}),e(`div`,{"aria-label":P?y(k,_.t(`ariaCardAction`)):void 0,className:`materialdesign-html-card-container mdc-card${C?` mdc-card--outlined`:``}`,onClick:F,onKeyDown:I,role:P?`button`:void 0,tabIndex:P?0:void 0,style:{background:w(g.colorBackground,C?`var(--md-sys-color-surface)`:`var(--md-sys-color-surface-container-low)`,x(D)),border:v&&C?`1px solid var(--md-sys-color-outline-variant)`:void 0,cursor:P?`pointer`:void 0,height:`calc(100% - 6px)`,margin:3,width:`calc(100% - 6px)`},children:U===`Horizontal`?t(`div`,{className:`materialdesign-html-card horizontal-container`,children:[H,t(`div`,{children:[B,V]})]}):U===`BasicHeaderOverlay`?t(r,{children:[n.cloneElement(H,{children:e(`div`,{className:`materialdesign-html-card mdc-card__media-content`,children:B})}),V]}):t(r,{children:[U===`BasicHeader`?B:null,H,U===`Basic`?B:null,V]})})]})}};export{O as default};
@@ -0,0 +1 @@
1
+ import{n as e,r as t}from"./_virtual_mf___mfe_internal__vis2MaterialDesignWidgets__mf_ow-CLzQTKDT.js";import{C as n,D as r,F as i,M as a,P as o,c as s,i as c,j as l,m as u,n as d,o as f,p,s as m,y as h}from"./widgetUtils-D9S_f9Bd.js";import{colorSchemes as g,scheme as _}from"./MaterialDesignColorScheme-MqgF3Vim.js";import{a as v,c as y,i as b,n as x,o as S,r as C,s as w,t as T}from"./MaterialDesignChartCanvas-gz-vMWmY.js";var E=(e,t,n)=>e[`${t}${n}`];function D(e){try{let t=JSON.parse(o(e));return Array.isArray(t)?t:null}catch{return null}}function O(e,t){return t?Math.min(t.length,100):u(e.dataCount)}function k(e,t,r,a,s){return Array.from({length:r},(r,c)=>{let l=t==null?void 0:t[c],u=n(l==null?void 0:l.value,s(c)),d=Math.max(0,n(e.valuesMinDecimals)),f=Math.max(d,n(e.valuesMaxDecimals,0));return{label:o(l==null?void 0:l.label,o(E(e,`label`,c))),value:u,color:o(l==null?void 0:l.dataColor,o(E(e,`dataColor`,c),a[c]||o(e.globalColor,`#44739e`))),valueText:o(l==null?void 0:l.valueText,o(E(e,`valueText`,c),u.toLocaleString(i(),{minimumFractionDigits:d,maximumFractionDigits:f}))),valueColor:o(l==null?void 0:l.valueColor,o(E(e,`valueTextColor`,c),o(e.valuesFontColor))),appendix:o(l==null?void 0:l.valueAppendix,o(E(e,`labelValueAppend`,c),o(e.valuesAppendText))),tooltipTitle:o(l==null?void 0:l.tooltipTitle,o(E(e,`tooltipTitle`,c))),tooltipText:o(l==null?void 0:l.tooltipText,o(E(e,`tooltipText`,c)))}})}function A(e,t){let r=e=>e===``||e==null;return{min:r(e.axisValueMin)?Math.min(0,...t.map(e=>e.value)):n(e.axisValueMin),max:r(e.axisValueMax)?Math.max(1,...t.map(e=>e.value)):n(e.axisValueMax,1)}}var j=[{name:`backgroundColor`,label:`backgroundColor`,type:`color`},{name:`chartAreaBackgroundColor`,label:`chartAreaBackgroundColor`,type:`color`},{name:`disableHoverEffects`,label:`disableHoverEffects`,type:`checkbox`},...[`axisValueMin`,`axisValueMax`,`axisValueStepSize`,`axisValueMinDigits`,`axisValueMaxDigits`,`axisMaxLabel`,`animationDuration`].map(e=>({name:e,label:e,type:`number`})),{name:`axisValueAppendText`,label:`axisValueAppendText`,type:`text`},{name:`axisLabelAutoSkip`,label:`axisLabelAutoSkip`,type:`checkbox`}],M=[{name:`common`,fields:[{name:`chartDataMethod`,label:`chartDataMethod`,type:`select`,options:[`inputPerEditor`,`jsonStringObject`],default:`inputPerEditor`},{name:`dataCount`,label:`dataCount`,type:`number`,default:1},{name:`oid`,label:`oid`,type:`id`},{name:`chartType`,label:`chartType`,type:`select`,options:[`vertical`,`horizontal`],default:`vertical`},...[`chartPaddingTop`,`chartPaddingLeft`,`chartPaddingRight`,`chartPaddingBottom`].map(e=>({name:e,label:e,type:`number`}))]},{name:`chartLayout`,label:`group_chartLayout`,fields:j},{name:`card`,label:`group_listItemCardBackground`,fields:[{name:`cardUse`,label:`cardUse`,type:`checkbox`},{name:`title`,label:`title`,type:`html`},{name:`titleLayout`,label:`titleLayout`,type:`text`},{name:`borderDistance`,label:`borderDistance`,type:`number`},{name:`titleFontFamily`,label:`titleFontFamily`,type:`fontname`},...[`colorBackground`,`colorTitleSectionBackground`,`colorTextSectionBackground`,`colorTitle`].map(e=>({name:e,label:e,type:`color`}))]},{name:`oids`,label:`group_oids`,indexFrom:0,indexTo:`dataCount`,hidden:e=>o(e.chartDataMethod,`inputPerEditor`)!==`inputPerEditor`,fields:p([{name:`oid`,label:`oid`,type:`id`},{name:`dataColor`,label:`dataColor`,type:`color`},{name:`label`,label:`label`,type:`text`},{name:`valueText`,label:`valueText`,type:`text`},{name:`valueTextColor`,label:`valueTextColor`,type:`color`},{name:`labelValueAppend`,label:`labelValueAppend`,type:`text`},{name:`tooltipTitle`,label:`tooltipTitle`,type:`text`},{name:`tooltipText`,label:`tooltipText`,type:`text`}],e=>u(e.dataCount))},{name:`barLayout`,label:`group_barLayout`,fields:[{name:`colorScheme`,label:`colorScheme`,type:`select`,options:Object.keys(g)},{name:`globalColor`,label:`globalColor`,type:`color`},{name:`hoverColor`,label:`hoverColor`,type:`color`},{name:`hoverBorderColor`,label:`hoverBorderColor`,type:`color`},{name:`hoverBorderWidth`,label:`hoverBorderWidth`,type:`number`},{name:`barWidth`,label:`barWidth`,type:`slider`,min:0,max:100,step:1,default:80}]},{name:`barValuesLayout`,label:`group_barValuesLayout`,fields:[{name:`showValues`,label:`showValues`,type:`select`,options:[`showValuesOn`,`showValuesOff`,`showValuesAuto`],default:`showValuesOn`},{name:`valuesSteps`,label:`valuesSteps`,type:`number`},{name:`valuesMinDecimals`,label:`valuesMinDecimals`,type:`number`},{name:`valuesMaxDecimals`,label:`valuesMaxDecimals`,type:`number`},{name:`valuesAppendText`,label:`valuesAppendText`,type:`text`},{name:`valuesFontColor`,label:`valuesFontColor`,type:`color`},{name:`valuesFontFamily`,label:`valuesFontFamily`,type:`fontname`},{name:`valuesFontSize`,label:`valuesFontSize`,type:`number`},{name:`valuesPositionAnchor`,label:`valuesPositionAnchor`,type:`select`,options:[`center`,`start`,`end`],default:`end`},{name:`valuesPositionAlign`,label:`valuesPositionAlign`,type:`select`,options:[`center`,`start`,`end`,`right`,`bottom`,`left`,`top`],default:`top`},{name:`valuesPositionOffset`,label:`valuesPositionOffset`,type:`number`},{name:`valuesTextAlign`,label:`valuesTextAlign`,type:`select`,options:[`start`,`center`,`end`,`left`,`right`],default:`center`},{name:`valuesRotation`,label:`valuesRotation`,type:`slider`,min:0,max:360,step:1},{name:`valuesBackgroundColor`,label:`valuesBackgroundColor`,type:`color`},{name:`valuesBorderColor`,label:`valuesBorderColor`,type:`color`},{name:`valuesBorderWidth`,label:`valuesBorderWidth`,type:`number`},{name:`valuesBorderRadius`,label:`valuesBorderRadius`,type:`number`}]},...[`yAxis`,`xAxis`].map(e=>({name:`${e}Layout`,label:`group_${e}Layout`,fields:[{name:`${e}Position`,label:`${e}Position`,type:`select`,options:e===`yAxis`?[`left`,`right`]:[`top`,`bottom`]},{name:`${e}Title`,label:`${e}Title`,type:`text`},{name:`${e}TitleColor`,label:`${e}TitleColor`,type:`color`},{name:`${e}TitleFontFamily`,label:`${e}TitleFontFamily`,type:`fontname`},{name:`${e}TitleFontSize`,label:`${e}TitleFontSize`,type:`number`},{name:`${e}ValueLabelColor`,label:`${e}ValueLabelColor`,type:`color`},{name:`${e}ValueFontFamily`,label:`${e}ValueFontFamily`,type:`fontname`},{name:`${e}ValueFontSize`,label:`${e}ValueFontSize`,type:`number`},{name:`${e}ValueDistanceToAxis`,label:`${e}ValueDistanceToAxis`,type:`slider`,min:0,max:100,step:1},{name:`${e}ShowAxis`,label:`${e}ShowAxis`,type:`checkbox`,default:!0},{name:`${e}ShowAxisLabels`,label:`${e}ShowAxisLabels`,type:`checkbox`,default:!0},{name:`${e}ShowGridLines`,label:`${e}ShowGridLines`,type:`checkbox`,default:!0},{name:`${e}GridLinesColor`,label:`${e}GridLinesColor`,type:`color`},{name:`${e}GridLinesWitdh`,label:`${e}GridLinesWitdh`,type:`number`},{name:`${e}ShowTicks`,label:`${e}ShowTicks`,type:`checkbox`,default:!0},{name:`${e}TickLength`,label:`${e}TickLength`,type:`slider`,min:0,max:100,step:1},...e===`xAxis`?[{name:`xAxisOffset`,label:`xAxisOffset`,type:`checkbox`},{name:`xAxisOffsetGridLines`,label:`xAxisOffsetGridLines`,type:`checkbox`},{name:`xAxisMinRotation`,label:`xAxisMinRotation`,type:`slider`,min:0,max:360,step:1},{name:`xAxisMaxRotation`,label:`xAxisMaxRotation`,type:`slider`,min:0,max:360,step:1}]:[]]})),{name:`legendLayout`,label:`group_legendLayout`,fields:[{name:`showLegend`,label:`showLegend`,type:`checkbox`},{name:`legendPosition`,label:`legendPosition`,type:`select`,options:[`top`,`left`,`bottom`,`right`],default:`right`},{name:`legendFontColor`,label:`legendFontColor`,type:`color`},{name:`legendFontFamily`,label:`legendFontFamily`,type:`fontname`},{name:`legendFontSize`,label:`legendFontSize`,type:`number`},{name:`legendBoxWidth`,label:`legendBoxWidth`,type:`slider`,min:0,max:100,step:1},{name:`legendPointStyle`,label:`legendPointStyle`,type:`checkbox`,default:!0},{name:`legendDistanceToChart`,label:`legendDistanceToChart`,type:`number`},{name:`legendPadding`,label:`legendPadding`,type:`number`}]},{name:`tooltipLayout`,label:`group_tooltipLayout`,fields:[{name:`showTooltip`,label:`showTooltip`,type:`checkbox`,default:!0},...[`tooltipBackgroundColor`,`tooltipTitleFontColor`,`tooltipBodyFontColor`].map(e=>({name:e,label:e,type:`color`})),...[`tooltipArrowSize`,`tooltipDistanceToBar`,`tooltipBoxRadius`,`tooltipXpadding`,`tooltipYpadding`,`tooltipTitleFontSize`,`tooltipTitleMarginBottom`,`tooltipBodyFontSize`,`tooltipValueMinDecimals`,`tooltipValueMaxDecimals`].map(e=>({name:e,label:e,type:`number`})),{name:`tooltipShowColorBox`,label:`tooltipShowColorBox`,type:`checkbox`,default:!0},{name:`tooltipTitleFontFamily`,label:`tooltipTitleFontFamily`,type:`fontname`},{name:`tooltipBodyFontFamily`,label:`tooltipBodyFontFamily`,type:`fontname`},{name:`tooltipBodyAppend`,label:`tooltipBodyAppend`,type:`text`}]}],N=class u extends d{static getWidgetInfo(){return{...f(`tplVis2-materialdesign-Chart-Bar`,`Bar Chart`,M,[`card`,`barValuesLayout`,`legendLayout`,`tooltipLayout`]),visPrev:l(`F0128`),visDefaultStyle:{width:400,height:270}}}getWidgetInfo(){return u.getWidgetInfo()}renderWidgetBody(l){super.renderWidgetBody(l);let u=this.themedData(),d=m(u)===`material3`,f=y(this.isDarkTheme()),p=o(u.chartDataMethod)===`jsonStringObject`?D(a(this.state,o(u.oid))):null,g=O(u,p),j=k(u,p,g,o(u.colorScheme)?_(o(u.colorScheme),g):[],e=>n(a(this.state,o(E(u,`oid`,e))))),{min:M,max:N}=A(u,j),P=o(u.chartType,`vertical`)===`horizontal`,F=o(u.title),I=e=>e==null||e===``||!Number.isFinite(Number(e))?void 0:Number(e),L=e=>w({position:o(u[`${e}AxisPosition`]),display:c(u[`${e}AxisShowAxis`],!0),labelsDisplay:c(u[`${e}AxisShowAxisLabels`],!0),labelColor:o(u[`${e}AxisValueLabelColor`],d?f.text:``),labelFontFamily:o(u[`${e}AxisValueFontFamily`]),labelFontSize:I(u[`${e}AxisValueFontSize`]),labelPadding:I(u[`${e}AxisValueDistanceToAxis`]),title:o(u[`${e}AxisTitle`]),titleColor:o(u[`${e}AxisTitleColor`],d?f.text:``),titleFontFamily:o(u[`${e}AxisTitleFontFamily`]),titleFontSize:I(u[`${e}AxisTitleFontSize`]),gridDisplay:c(u[`${e}AxisShowGridLines`],!0),gridColor:o(u[`${e}AxisGridLinesColor`],d?f.grid:``),gridWidth:I(u[`${e}AxisGridLinesWitdh`]),drawTicks:c(u[`${e}AxisShowTicks`],!0),tickLength:I(u[`${e}AxisTickLength`]),minRotation:e===`x`?I(u.xAxisMinRotation):void 0,maxRotation:e===`x`?I(u.xAxisMaxRotation):void 0,offset:e===`x`&&u.xAxisOffset!==``&&u.xAxisOffset!==void 0?c(u.xAxisOffset):void 0,gridOffset:e===`x`&&u.xAxisOffsetGridLines!==``&&u.xAxisOffsetGridLines!==void 0?c(u.xAxisOffsetGridLines):void 0}),R={minimumFractionDigits:Math.max(0,n(u.axisValueMinDigits)),maximumFractionDigits:Math.max(Math.max(0,n(u.axisValueMinDigits)),n(u.axisValueMaxDigits))},z=o(u.axisValueAppendText),B=L(P?`x`:`y`);B.type=`linear`,B.min=M,B.max=N,B.ticks={...B.ticks||{},...I(u.axisValueStepSize)===void 0?{}:{stepSize:I(u.axisValueStepSize)},...I(u.axisMaxLabel)===void 0?{}:{maxTicksLimit:I(u.axisMaxLabel)},...(u.axisValueMinDigits===void 0||u.axisValueMinDigits===``)&&(u.axisValueMaxDigits===void 0||u.axisValueMaxDigits===``)&&!z?{}:{callback:e=>`${Number.isFinite(Number(e))?Number(e).toLocaleString(i(),R):o(e)}${z}`}};let V=L(P?`y`:`x`);u.axisLabelAutoSkip!==void 0&&u.axisLabelAutoSkip!==``&&(V.ticks={...V.ticks||{},autoSkip:c(u.axisLabelAutoSkip)});let H={[P?`x`:`y`]:B,[P?`y`:`x`]:V},U=e(x,{type:`bar`,data:{labels:j.map(e=>e.label),datasets:[{data:j.map(e=>e.value),backgroundColor:j.map(e=>d&&e.color===`#44739e`?f.primary:e.color),hoverBackgroundColor:o(u.hoverColor)||void 0,borderColor:o(u.hoverBorderColor),borderWidth:n(u.hoverBorderWidth),barPercentage:I(u.barWidth)===void 0?void 0:Math.max(0,Math.min(1,n(u.barWidth,80)/100))}]},options:{indexAxis:P?`y`:`x`,responsive:!0,maintainAspectRatio:!1,layout:b(u),hover:c(u.disableHoverEffects)?{mode:null}:void 0,animation:{duration:n(u.animationDuration,1e3)},scales:H,plugins:{datalabels:C(u,e=>{let t=j[n(e.dataIndex)];return{color:t==null?void 0:t.valueColor,text:`${o(t==null?void 0:t.valueText)}${o(t==null?void 0:t.appendix)}`}},{align:`top`,anchor:`end`}),legend:{display:!1},mdwChartArea:{color:o(u.chartAreaBackgroundColor)},tooltip:v(u,{title:e=>{var t;let r=j[n((t=e[0])==null?void 0:t.dataIndex)];return r!=null&&r.tooltipTitle?r.tooltipTitle.split(`\\n`):o(r==null?void 0:r.label)},label:e=>{let t=j[n(e.dataIndex)];return t!=null&&t.tooltipText?t.tooltipText.split(`\\n`):`${S(u,t==null?void 0:t.value)??o(t==null?void 0:t.valueText)}${o(t==null?void 0:t.appendix)}${o(u.tooltipBodyAppend)}`}})}}}),W=e(T,{data:u,entries:j.map(e=>({label:e.label,color:d&&e.color===`#44739e`?f.primary:e.color})),defaultShown:!1}),G=[`top`,`bottom`].includes(o(u.legendPosition)),K=[`top`,`left`].includes(o(u.legendPosition,`right`)),q=t(`div`,{style:{display:`flex`,flexDirection:G?`column`:`row`,height:`100%`,minHeight:0,width:`100%`},children:[K?W:null,e(`div`,{style:{flex:1,minHeight:0,minWidth:0,position:`relative`},children:U}),K?null:W]});return e(`div`,{className:`materialdesign-widget materialdesign-chart${d?` ${s(u,this.isDarkTheme())}`:``}`,style:{background:o(u.backgroundColor)||(d?`var(--md-sys-color-surface)`:void 0),height:`100%`,width:`100%`},children:c(u.cardUse)?t(`div`,{className:`materialdesign-html-card-container mdc-card`,style:{background:o(u.colorBackground)||(d?`var(--md-sys-color-surface-container-low)`:h(this.isDarkTheme())),boxSizing:`border-box`,display:`flex`,flexDirection:`column`,height:`calc(100% - 6px)`,margin:3,padding:n(u.borderDistance,8),width:`calc(100% - 6px)`},children:[e(`div`,{className:`card-title-section`,style:{background:o(u.colorTitleSectionBackground),color:o(u.colorTitle)||(d?`var(--md-sys-color-on-surface)`:void 0),fontFamily:o(u.titleFontFamily),fontSize:n(u.titleLayout)?`${n(u.titleLayout)}px`:void 0},dangerouslySetInnerHTML:{__html:r(F)}}),e(`div`,{style:{background:o(u.colorTextSectionBackground),flex:`1 1 0`,minHeight:0},children:q})]}):q})}};export{A as barAxisRange,O as barCount,k as buildBars,N as default,D as json};