overview-components 1.0.79 → 1.0.80

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 (211) hide show
  1. package/dist/assets/generated/locales/de.js +70 -72
  2. package/dist/assets/generated/locales/de.js.map +1 -0
  3. package/dist/assets/generated/locales/en.js +70 -72
  4. package/dist/assets/generated/locales/en.js.map +1 -0
  5. package/dist/assets/generated/locales/fr.js +70 -72
  6. package/dist/assets/generated/locales/fr.js.map +1 -0
  7. package/dist/assets/generated/locales/hr.js +70 -72
  8. package/dist/assets/generated/locales/hr.js.map +1 -0
  9. package/dist/assets/generated/locales/it.js +70 -72
  10. package/dist/assets/generated/locales/it.js.map +1 -0
  11. package/dist/assets/generated/locales/pl.js +70 -72
  12. package/dist/assets/generated/locales/pl.js.map +1 -0
  13. package/dist/assets/generated/locales/ro.js +70 -72
  14. package/dist/assets/generated/locales/ro.js.map +1 -0
  15. package/dist/assets/generated/locales/sk.js +70 -72
  16. package/dist/assets/generated/locales/sk.js.map +1 -0
  17. package/dist/assets/generated/locales/sr.js +70 -72
  18. package/dist/assets/generated/locales/sr.js.map +1 -0
  19. package/dist/assets/icons/iconGlyphs.js +678 -679
  20. package/dist/assets/icons/iconGlyphs.js.map +1 -0
  21. package/dist/assets/illustration/delete-illustration.js +96 -0
  22. package/dist/assets/illustration/delete-illustration.js.map +1 -0
  23. package/dist/assets/illustration/no-content.js +167 -0
  24. package/dist/assets/illustration/no-content.js.map +1 -0
  25. package/dist/assets/illustration/no-preview.js +133 -0
  26. package/dist/assets/illustration/no-preview.js.map +1 -0
  27. package/dist/assets/illustration/not-found.js +106 -0
  28. package/dist/assets/illustration/not-found.js.map +1 -0
  29. package/dist/assets/illustration/settings-illustration.js +176 -0
  30. package/dist/assets/illustration/settings-illustration.js.map +1 -0
  31. package/dist/components/components-settings/attachments-tab-settings.js +226 -0
  32. package/dist/components/components-settings/attachments-tab-settings.js.map +1 -0
  33. package/dist/components/components-settings/data-grid-settings.js +318 -0
  34. package/dist/components/components-settings/data-grid-settings.js.map +1 -0
  35. package/dist/components/components-settings/section-tab-settings.js +269 -0
  36. package/dist/components/components-settings/section-tab-settings.js.map +1 -0
  37. package/dist/components/components-settings/tabs-overview-settings.js +439 -0
  38. package/dist/components/components-settings/tabs-overview-settings.js.map +1 -0
  39. package/dist/components/lit-attachments-tab.js +432 -271
  40. package/dist/components/lit-attachments-tab.js.map +1 -0
  41. package/dist/components/lit-badge.js +40 -40
  42. package/dist/components/lit-badge.js.map +1 -0
  43. package/dist/components/lit-case-variables-tab.js +497 -382
  44. package/dist/components/lit-case-variables-tab.js.map +1 -0
  45. package/dist/components/lit-chart.js +406 -378
  46. package/dist/components/lit-chart.js.map +1 -0
  47. package/dist/components/lit-data-grid-tanstack.js +1663 -1150
  48. package/dist/components/lit-data-grid-tanstack.js.map +1 -0
  49. package/dist/components/lit-filter-modal.js +230 -198
  50. package/dist/components/lit-filter-modal.js.map +1 -0
  51. package/dist/components/lit-multiselect-item.js +477 -301
  52. package/dist/components/lit-multiselect-item.js.map +1 -0
  53. package/dist/components/lit-section-tab.js +85 -73
  54. package/dist/components/lit-section-tab.js.map +1 -0
  55. package/dist/components/lit-tabs-overview.js +232 -191
  56. package/dist/components/lit-tabs-overview.js.map +1 -0
  57. package/dist/components/modals/lit-confirm-modal.js +120 -0
  58. package/dist/components/modals/lit-confirm-modal.js.map +1 -0
  59. package/dist/components/modals/lit-delete-modal.js +128 -0
  60. package/dist/components/modals/lit-delete-modal.js.map +1 -0
  61. package/dist/components/react-wrappers/attachments-tab.js +8 -13
  62. package/dist/components/react-wrappers/attachments-tab.js.map +1 -0
  63. package/dist/components/react-wrappers/badge.js +8 -13
  64. package/dist/components/react-wrappers/badge.js.map +1 -0
  65. package/dist/components/react-wrappers/button.js +8 -13
  66. package/dist/components/react-wrappers/button.js.map +1 -0
  67. package/dist/components/react-wrappers/case-variables-tab.js +8 -13
  68. package/dist/components/react-wrappers/case-variables-tab.js.map +1 -0
  69. package/dist/components/react-wrappers/chart.js +8 -13
  70. package/dist/components/react-wrappers/chart.js.map +1 -0
  71. package/dist/components/react-wrappers/data-grid-tanstack.js +8 -13
  72. package/dist/components/react-wrappers/data-grid-tanstack.js.map +1 -0
  73. package/dist/components/react-wrappers/filter-modal.js +8 -13
  74. package/dist/components/react-wrappers/filter-modal.js.map +1 -0
  75. package/dist/components/react-wrappers/progress-bar.js +8 -13
  76. package/dist/components/react-wrappers/progress-bar.js.map +1 -0
  77. package/dist/components/react-wrappers/section-tab.js +8 -13
  78. package/dist/components/react-wrappers/section-tab.js.map +1 -0
  79. package/dist/components/react-wrappers/tabs-overview.js +8 -13
  80. package/dist/components/react-wrappers/tabs-overview.js.map +1 -0
  81. package/dist/data/translations.js +2763 -0
  82. package/dist/data/translations.js.map +1 -0
  83. package/dist/index.js +107 -113
  84. package/dist/index.js.map +1 -0
  85. package/dist/schemas/index.js +17 -0
  86. package/dist/schemas/index.js.map +1 -0
  87. package/dist/schemas/lit-attachments-tab-document.schema.js +20 -0
  88. package/dist/schemas/lit-attachments-tab-document.schema.js.map +1 -0
  89. package/dist/schemas/lit-attachments-tab-settings-value.schema.js +15 -0
  90. package/dist/schemas/lit-attachments-tab-settings-value.schema.js.map +1 -0
  91. package/dist/schemas/lit-attachments-tab.schema.js +32 -0
  92. package/dist/schemas/lit-attachments-tab.schema.js.map +1 -0
  93. package/dist/schemas/lit-case-variables-tab-cell.schema.js +43 -0
  94. package/dist/schemas/lit-case-variables-tab-cell.schema.js.map +1 -0
  95. package/dist/schemas/lit-case-variables-tab-rows.schema.js +6 -0
  96. package/dist/schemas/lit-case-variables-tab-rows.schema.js.map +1 -0
  97. package/dist/schemas/lit-case-variables-tab.schema.js +24 -0
  98. package/dist/schemas/lit-case-variables-tab.schema.js.map +1 -0
  99. package/dist/schemas/lit-data-grid-tanstack-column-array.schema.js +6 -0
  100. package/dist/schemas/lit-data-grid-tanstack-column-array.schema.js.map +1 -0
  101. package/dist/schemas/lit-data-grid-tanstack-column-custom-filter-array.schema.js +6 -0
  102. package/dist/schemas/lit-data-grid-tanstack-column-custom-filter-array.schema.js.map +1 -0
  103. package/dist/schemas/lit-data-grid-tanstack-column-custom-filter.schema.js +11 -0
  104. package/dist/schemas/lit-data-grid-tanstack-column-custom-filter.schema.js.map +1 -0
  105. package/dist/schemas/lit-data-grid-tanstack-column.schema.js +55 -0
  106. package/dist/schemas/lit-data-grid-tanstack-column.schema.js.map +1 -0
  107. package/dist/schemas/lit-data-grid-tanstack.schema.js +99 -0
  108. package/dist/schemas/lit-data-grid-tanstack.schema.js.map +1 -0
  109. package/dist/schemas/lit-section-tab-schema.js +24 -0
  110. package/dist/schemas/lit-section-tab-schema.js.map +1 -0
  111. package/dist/schemas/lit-tabs-overview-tab-array.schema.js +6 -0
  112. package/dist/schemas/lit-tabs-overview-tab-array.schema.js.map +1 -0
  113. package/dist/schemas/lit-tabs-overview-tab.schema.js +32 -0
  114. package/dist/schemas/lit-tabs-overview-tab.schema.js.map +1 -0
  115. package/dist/schemas/lit-tabs-overview.schema.js +29 -0
  116. package/dist/schemas/lit-tabs-overview.schema.js.map +1 -0
  117. package/dist/scripts/translate-locales.js +69 -0
  118. package/dist/scripts/translate-locales.js.map +1 -0
  119. package/dist/shared/filter-inputs.js +335 -234
  120. package/dist/shared/filter-inputs.js.map +1 -0
  121. package/dist/shared/lit-button.js +80 -66
  122. package/dist/shared/lit-button.js.map +1 -0
  123. package/dist/shared/lit-case-variables-tab-cell.js +127 -108
  124. package/dist/shared/lit-case-variables-tab-cell.js.map +1 -0
  125. package/dist/shared/lit-checkbox.js +94 -78
  126. package/dist/shared/lit-checkbox.js.map +1 -0
  127. package/dist/shared/lit-custom-popper.js +84 -66
  128. package/dist/shared/lit-custom-popper.js.map +1 -0
  129. package/dist/shared/lit-data-grid-action-buttons-popover.js +178 -141
  130. package/dist/shared/lit-data-grid-action-buttons-popover.js.map +1 -0
  131. package/dist/shared/lit-data-grid-density-popover.js +54 -49
  132. package/dist/shared/lit-data-grid-density-popover.js.map +1 -0
  133. package/dist/shared/lit-data-grid-export-popover.js +43 -41
  134. package/dist/shared/lit-data-grid-export-popover.js.map +1 -0
  135. package/dist/shared/lit-data-grid-operators-popover.js +90 -70
  136. package/dist/shared/lit-data-grid-operators-popover.js.map +1 -0
  137. package/dist/shared/lit-data-grid-row-actions.js +54 -51
  138. package/dist/shared/lit-data-grid-row-actions.js.map +1 -0
  139. package/dist/shared/lit-date-picker.js +451 -370
  140. package/dist/shared/lit-date-picker.js.map +1 -0
  141. package/dist/shared/lit-icon-button.js +66 -52
  142. package/dist/shared/lit-icon-button.js.map +1 -0
  143. package/dist/shared/lit-icon.js +261 -259
  144. package/dist/shared/lit-icon.js.map +1 -0
  145. package/dist/shared/lit-input.js +143 -115
  146. package/dist/shared/lit-input.js.map +1 -0
  147. package/dist/shared/lit-label.js +63 -55
  148. package/dist/shared/lit-label.js.map +1 -0
  149. package/dist/shared/lit-loader.js +26 -27
  150. package/dist/shared/lit-loader.js.map +1 -0
  151. package/dist/shared/lit-loading-bar.js +57 -24
  152. package/dist/shared/lit-loading-bar.js.map +1 -0
  153. package/dist/shared/lit-menu-item.js +56 -51
  154. package/dist/shared/lit-menu-item.js.map +1 -0
  155. package/dist/shared/lit-menu.js +22 -20
  156. package/dist/shared/lit-menu.js.map +1 -0
  157. package/dist/shared/lit-modal-body.js +9 -15
  158. package/dist/shared/lit-modal-body.js.map +1 -0
  159. package/dist/shared/lit-modal-footer.js +17 -20
  160. package/dist/shared/lit-modal-footer.js.map +1 -0
  161. package/dist/shared/lit-modal-header.js +24 -27
  162. package/dist/shared/lit-modal-header.js.map +1 -0
  163. package/dist/shared/lit-modal.js +112 -71
  164. package/dist/shared/lit-modal.js.map +1 -0
  165. package/dist/shared/lit-overflow-tooltip.js +86 -68
  166. package/dist/shared/lit-overflow-tooltip.js.map +1 -0
  167. package/dist/shared/lit-pill.js +39 -37
  168. package/dist/shared/lit-pill.js.map +1 -0
  169. package/dist/shared/lit-progress-bar.js +33 -35
  170. package/dist/shared/lit-progress-bar.js.map +1 -0
  171. package/dist/shared/lit-responsive-button.js +74 -64
  172. package/dist/shared/lit-responsive-button.js.map +1 -0
  173. package/dist/shared/lit-select-field.js +266 -183
  174. package/dist/shared/lit-select-field.js.map +1 -0
  175. package/dist/shared/lit-select.js +276 -202
  176. package/dist/shared/lit-select.js.map +1 -0
  177. package/dist/shared/lit-settings.js +68 -51
  178. package/dist/shared/lit-settings.js.map +1 -0
  179. package/dist/shared/lit-text-field.js +99 -82
  180. package/dist/shared/lit-text-field.js.map +1 -0
  181. package/dist/shared/lit-toggle.js +74 -65
  182. package/dist/shared/lit-toggle.js.map +1 -0
  183. package/dist/shared/lit-tooltip.js +113 -84
  184. package/dist/shared/lit-tooltip.js.map +1 -0
  185. package/dist/shared/simple-popper.js +229 -149
  186. package/dist/shared/simple-popper.js.map +1 -0
  187. package/dist/shared/simple-tooltip.js +198 -124
  188. package/dist/shared/simple-tooltip.js.map +1 -0
  189. package/dist/shared/styles/button-shared-styles.js +4 -8
  190. package/dist/shared/styles/button-shared-styles.js.map +1 -0
  191. package/dist/styles.js +3 -8
  192. package/dist/styles.js.map +1 -0
  193. package/dist/utils/currency.js +15 -12
  194. package/dist/utils/currency.js.map +1 -0
  195. package/dist/utils/custom-filters.js +80 -46
  196. package/dist/utils/custom-filters.js.map +1 -0
  197. package/dist/utils/date.js +21 -14
  198. package/dist/utils/date.js.map +1 -0
  199. package/dist/utils/getOperatorByType.js +65 -51
  200. package/dist/utils/getOperatorByType.js.map +1 -0
  201. package/dist/utils/getOverviewValue.js +177 -0
  202. package/dist/utils/getOverviewValue.js.map +1 -0
  203. package/dist/utils/localization.js +429 -412
  204. package/dist/utils/localization.js.map +1 -0
  205. package/dist/utils/utils.js +12 -10
  206. package/dist/utils/utils.js.map +1 -0
  207. package/dist/utils/validate-json-schema.js +8 -0
  208. package/dist/utils/validate-json-schema.js.map +1 -0
  209. package/dist/validators/validator.js +7 -0
  210. package/dist/validators/validator.js.map +1 -0
  211. package/package.json +2 -2
@@ -1,91 +1,135 @@
1
- import "../node_modules/@lit/reactive-element/reactive-element.js";
2
- import { html as d, render as p } from "../node_modules/lit-html/lit-html.js";
3
- import { LitElement as f } from "../node_modules/lit-element/lit-element.js";
4
- import { customElement as u } from "../node_modules/@lit/reactive-element/decorators/custom-element.js";
5
- import { property as h } from "../node_modules/@lit/reactive-element/decorators/property.js";
6
- import { directive as g, Directive as v } from "../node_modules/lit-html/directive.js";
7
- import { computePosition as w, offset as y, flip as E, shift as b, size as x, arrow as T } from "../node_modules/@floating-ui/dom/dist/floating-ui.dom.js";
8
- import { css as _ } from "../node_modules/@lit/reactive-element/css-tag.js";
9
- var k = Object.defineProperty, L = Object.getOwnPropertyDescriptor, a = (i, t, n, r) => {
10
- for (var o = r > 1 ? void 0 : r ? L(t, n) : t, e = i.length - 1, s; e >= 0; e--)
11
- (s = i[e]) && (o = (r ? s(t, n, o) : s(o)) || o);
12
- return r && o && k(t, n, o), o;
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
13
6
  };
14
- const m = ["pointerenter", "mouseenter"], c = ["pointerleave", "mouseleave", "blur", "keydown", "click", "scroll"];
15
- let l = class extends f {
16
- constructor() {
17
- super(...arguments), this.showing = !1, this.placement = "top", this.offset = 8, this.openDelayMs = 300, this._target = null, this.openTimeout = null, this.isHoveringTarget = !1, this.scheduleShow = () => {
18
- this.clearOpenTimeout(), this.openTimeout = window.setTimeout(() => {
19
- this._target && this.isHoveringTarget && this.showTooltipNow();
20
- }, this.openDelayMs);
21
- }, this.showTooltipNow = () => {
22
- this.style.removeProperty("display"), this.style.zIndex = "100000", this.showing = !0, !(!this.target || !this.arrowElement) && w(this.target, this, {
23
- placement: this.placement,
24
- strategy: "absolute",
25
- middleware: [
26
- y(this.offset),
27
- E(),
28
- b({ padding: 8 }),
29
- x({ padding: 8 }),
30
- T({ element: this.arrowElement })
31
- ]
32
- }).then(({ x: i, y: t, placement: n, middlewareData: r }) => {
33
- r.hide && Object.assign(this.style, {
34
- display: r.hide.referenceHidden || !this.showing ? "none" : "block"
35
- }), Object.assign(this.style, {
36
- left: `${i}px`,
37
- top: `${t}px`
38
- });
39
- const o = {
40
- top: "bottom",
41
- bottom: "top",
42
- left: "right",
43
- right: "left"
44
- }[n.split("-")[0]], { x: e, y: s } = r.arrow || {};
45
- Object.assign(this.arrowElement.style, {
46
- left: e != null ? `${e}px` : "",
47
- top: s != null ? `${s}px` : "",
48
- right: "",
49
- bottom: "",
50
- [o]: "-4px"
51
- });
52
- });
53
- }, this.clearOpenTimeout = () => {
54
- this.openTimeout !== null && (clearTimeout(this.openTimeout), this.openTimeout = null);
55
- }, this.markHovering = () => {
56
- this.isHoveringTarget = !0;
57
- }, this.markNotHovering = () => {
58
- this.isHoveringTarget = !1, this.clearOpenTimeout();
59
- }, this.hide = () => {
60
- this.showing = !1, this.style.display = "none";
61
- };
62
- }
63
- get target() {
64
- return this._target;
65
- }
66
- set target(i) {
67
- this._target && (m.forEach((t) => {
68
- this._target.removeEventListener(t, this.scheduleShow), this._target.removeEventListener(t, this.markHovering);
69
- }), c.forEach((t) => this._target.removeEventListener(t, this.hide))), i && (m.forEach((t) => {
70
- i.addEventListener(t, this.scheduleShow), i.addEventListener(t, this.markHovering);
71
- }), c.forEach((t) => {
72
- i.addEventListener(t, this.markNotHovering), i.addEventListener(t, this.hide);
73
- })), this._target = i;
74
- }
75
- connectedCallback() {
76
- super.connectedCallback(), this.style.display = "none";
77
- }
78
- firstUpdated() {
79
- this.arrowElement = this.shadowRoot.getElementById("arrow");
80
- }
81
- render() {
82
- return d`
7
+ import { html, css, LitElement } from 'lit';
8
+ import { customElement, property } from 'lit/decorators.js';
9
+ import { directive, Directive } from 'lit/directive.js';
10
+ import { render } from 'lit/html.js';
11
+ import { computePosition, offset, shift, flip, size, arrow } from '@floating-ui/dom';
12
+ const ENTER_EVENTS = ['pointerenter', 'mouseenter'];
13
+ const LEAVE_EVENTS = ['pointerleave', 'mouseleave', 'blur', 'keydown', 'click', 'scroll'];
14
+ let SimpleTooltip = class SimpleTooltip extends LitElement {
15
+ constructor() {
16
+ super(...arguments);
17
+ this.showing = false;
18
+ this.placement = 'top';
19
+ this.offset = 8;
20
+ this.openDelayMs = 300;
21
+ this._target = null;
22
+ this.openTimeout = null;
23
+ this.isHoveringTarget = false;
24
+ this.scheduleShow = () => {
25
+ this.clearOpenTimeout();
26
+ this.openTimeout = window.setTimeout(() => {
27
+ if (this._target && this.isHoveringTarget) {
28
+ this.showTooltipNow();
29
+ }
30
+ }, this.openDelayMs);
31
+ };
32
+ this.showTooltipNow = () => {
33
+ this.style.removeProperty('display');
34
+ this.style.zIndex = '100000';
35
+ this.showing = true;
36
+ // if (!document.body.contains(this)) {
37
+ // document.body.appendChild(this);
38
+ // }
39
+ if (!this.target || !this.arrowElement)
40
+ return;
41
+ computePosition(this.target, this, {
42
+ placement: this.placement,
43
+ strategy: 'absolute',
44
+ middleware: [
45
+ offset(this.offset),
46
+ flip(),
47
+ shift({ padding: 8 }),
48
+ size({ padding: 8 }),
49
+ arrow({ element: this.arrowElement }),
50
+ ],
51
+ }).then(({ x, y, placement, middlewareData }) => {
52
+ if (middlewareData.hide) {
53
+ Object.assign(this.style, {
54
+ display: middlewareData.hide.referenceHidden || !this.showing ? 'none' : 'block',
55
+ });
56
+ }
57
+ Object.assign(this.style, {
58
+ left: `${x}px`,
59
+ top: `${y}px`,
60
+ });
61
+ const staticSide = {
62
+ top: 'bottom',
63
+ bottom: 'top',
64
+ left: 'right',
65
+ right: 'left',
66
+ }[placement.split('-')[0]];
67
+ const { x: arrowX, y: arrowY } = middlewareData.arrow || {};
68
+ Object.assign(this.arrowElement.style, {
69
+ left: arrowX != null ? `${arrowX}px` : '',
70
+ top: arrowY != null ? `${arrowY}px` : '',
71
+ right: '',
72
+ bottom: '',
73
+ [staticSide]: '-4px',
74
+ });
75
+ });
76
+ };
77
+ this.clearOpenTimeout = () => {
78
+ if (this.openTimeout !== null) {
79
+ clearTimeout(this.openTimeout);
80
+ this.openTimeout = null;
81
+ }
82
+ };
83
+ this.markHovering = () => {
84
+ this.isHoveringTarget = true;
85
+ };
86
+ this.markNotHovering = () => {
87
+ this.isHoveringTarget = false;
88
+ this.clearOpenTimeout();
89
+ };
90
+ this.hide = () => {
91
+ this.showing = false;
92
+ this.style.display = 'none';
93
+ };
94
+ }
95
+ get target() {
96
+ return this._target;
97
+ }
98
+ set target(el) {
99
+ if (this._target) {
100
+ ENTER_EVENTS.forEach((evt) => {
101
+ this._target.removeEventListener(evt, this.scheduleShow);
102
+ this._target.removeEventListener(evt, this.markHovering);
103
+ });
104
+ LEAVE_EVENTS.forEach((evt) => this._target.removeEventListener(evt, this.hide));
105
+ }
106
+ if (el) {
107
+ ENTER_EVENTS.forEach((evt) => {
108
+ el.addEventListener(evt, this.scheduleShow);
109
+ el.addEventListener(evt, this.markHovering);
110
+ });
111
+ LEAVE_EVENTS.forEach((evt) => {
112
+ el.addEventListener(evt, this.markNotHovering);
113
+ el.addEventListener(evt, this.hide);
114
+ });
115
+ }
116
+ this._target = el;
117
+ }
118
+ connectedCallback() {
119
+ super.connectedCallback();
120
+ this.style.display = 'none';
121
+ }
122
+ firstUpdated() {
123
+ this.arrowElement = this.shadowRoot.getElementById('arrow');
124
+ }
125
+ render() {
126
+ return html `
83
127
  <div id="arrow"></div>
84
128
  <slot></slot>
85
129
  `;
86
- }
130
+ }
87
131
  };
88
- l.styles = _`
132
+ SimpleTooltip.styles = css `
89
133
  :host {
90
134
  position: absolute;
91
135
  display: inline-block;
@@ -129,46 +173,76 @@ l.styles = _`
129
173
  max-height: 70vh;
130
174
  }
131
175
  `;
132
- a([
133
- h({ type: Boolean, reflect: !0 })
134
- ], l.prototype, "showing", 2);
135
- a([
136
- h({ type: String, reflect: !0 })
137
- ], l.prototype, "placement", 2);
138
- a([
139
- h({ type: Number })
140
- ], l.prototype, "offset", 2);
141
- a([
142
- h({ type: Number })
143
- ], l.prototype, "openDelayMs", 2);
144
- l = a([
145
- u("simple-tooltip")
146
- ], l);
147
- class H extends v {
148
- constructor() {
149
- super(...arguments), this.initialized = !1;
150
- }
151
- disconnect() {
152
- this.tooltip && (this.tooltip.hide(), this.tooltip.parentElement && this.tooltip.parentElement.removeChild(this.tooltip), this.tooltip = void 0, this.initialized = !1);
153
- }
154
- render() {
155
- }
156
- // required override
157
- update(t, [n, r = "top", o = 200]) {
158
- this.part = t, this.content = n, this.placement = r, this.delay = o;
159
- const e = this.part.element;
160
- if (!this.initialized) {
161
- this.initialized = !0;
162
- const s = () => {
163
- this.tooltip || (this.tooltip = document.createElement("simple-tooltip"), this.tooltip.placement = this.placement, this.tooltip.openDelayMs = this.delay, document.body.appendChild(this.tooltip), p(this.content, this.tooltip, this.part.options)), this.tooltip.target = e, this.tooltip.openDelayMs = this.delay, this.tooltip.placement = this.placement, this.tooltip.scheduleShow(), e.removeEventListener("mouseenter", s), e.removeEventListener("pointerenter", s);
164
- };
165
- e.addEventListener("mouseenter", s), e.addEventListener("pointerenter", s);
176
+ __decorate([
177
+ property({ type: Boolean, reflect: true })
178
+ ], SimpleTooltip.prototype, "showing", void 0);
179
+ __decorate([
180
+ property({ type: String, reflect: true })
181
+ ], SimpleTooltip.prototype, "placement", void 0);
182
+ __decorate([
183
+ property({ type: Number })
184
+ ], SimpleTooltip.prototype, "offset", void 0);
185
+ __decorate([
186
+ property({ type: Number })
187
+ ], SimpleTooltip.prototype, "openDelayMs", void 0);
188
+ SimpleTooltip = __decorate([
189
+ customElement('simple-tooltip')
190
+ ], SimpleTooltip);
191
+ export { SimpleTooltip };
192
+ class TooltipDirective extends Directive {
193
+ constructor() {
194
+ super(...arguments);
195
+ this.initialized = false;
196
+ }
197
+ disconnect() {
198
+ if (this.tooltip) {
199
+ this.tooltip.hide();
200
+ // Remove from DOM to avoid leaks if desired
201
+ if (this.tooltip.parentElement) {
202
+ this.tooltip.parentElement.removeChild(this.tooltip);
203
+ }
204
+ this.tooltip = undefined;
205
+ this.initialized = false;
206
+ }
207
+ }
208
+ render() { } // required override
209
+ update(part, [content, placement = 'top', delay = 200]) {
210
+ this.part = part;
211
+ this.content = content;
212
+ this.placement = placement;
213
+ this.delay = delay;
214
+ const target = this.part.element;
215
+ if (!this.initialized) {
216
+ this.initialized = true;
217
+ const onEnter = () => {
218
+ if (!this.tooltip) {
219
+ this.tooltip = document.createElement('simple-tooltip');
220
+ this.tooltip.placement = this.placement;
221
+ this.tooltip.openDelayMs = this.delay;
222
+ document.body.appendChild(this.tooltip);
223
+ render(this.content, this.tooltip, this.part.options);
224
+ }
225
+ this.tooltip.target = target;
226
+ this.tooltip.openDelayMs = this.delay;
227
+ this.tooltip.placement = this.placement;
228
+ this.tooltip.scheduleShow();
229
+ // Lazy mounting done — clean up listener
230
+ target.removeEventListener('mouseenter', onEnter);
231
+ target.removeEventListener('pointerenter', onEnter);
232
+ };
233
+ target.addEventListener('mouseenter', onEnter);
234
+ target.addEventListener('pointerenter', onEnter);
235
+ }
236
+ if (this.tooltip) {
237
+ this.tooltip.openDelayMs = this.delay;
238
+ this.tooltip.placement = this.placement;
239
+ render(this.content, this.tooltip, this.part.options);
240
+ // Hide tooltip if target is not in DOM
241
+ if (!document.body.contains(target)) {
242
+ this.tooltip.hide();
243
+ }
244
+ }
166
245
  }
167
- this.tooltip && (this.tooltip.openDelayMs = this.delay, this.tooltip.placement = this.placement, p(this.content, this.tooltip, this.part.options), document.body.contains(e) || this.tooltip.hide());
168
- }
169
246
  }
170
- const j = g(H);
171
- export {
172
- l as SimpleTooltip,
173
- j as tooltip
174
- };
247
+ export const tooltip = directive(TooltipDirective);
248
+ //# sourceMappingURL=simple-tooltip.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"simple-tooltip.js","sourceRoot":"","sources":["../../src/shared/simple-tooltip.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,SAAS,EAAuB,MAAM,kBAAkB,CAAC;AAC7E,OAAO,EAAe,MAAM,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAa,MAAM,kBAAkB,CAAC;AAgBhG,MAAM,YAAY,GAAG,CAAC,cAAc,EAAE,YAAY,CAAC,CAAC;AACpD,MAAM,YAAY,GAAG,CAAC,cAAc,EAAE,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;AAGnF,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,UAAU;IAAtC;;QA8CyC,YAAO,GAAG,KAAK,CAAC;QACjB,cAAS,GAAqB,KAAK,CAAC;QACnD,WAAM,GAAG,CAAC,CAAC;QACX,gBAAW,GAAG,GAAG,CAAC;QAGtC,YAAO,GAAmB,IAAI,CAAC;QAC/B,gBAAW,GAAkB,IAAI,CAAC;QAClC,qBAAgB,GAAG,KAAK,CAAC;QAsC1B,iBAAY,GAAG,GAAG,EAAE;YACvB,IAAI,CAAC,gBAAgB,EAAE,CAAC;YAExB,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE;gBACtC,IAAI,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,gBAAgB,EAAE,CAAC;oBACxC,IAAI,CAAC,cAAc,EA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EAAE,CAAC;gBAE5B,yCAAyC;gBACzC,MAAM,CAAC,mBAAmB,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;gBAClD,MAAM,CAAC,mBAAmB,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;YACxD,CAAC,CAAC;YAEF,MAAM,CAAC,gBAAgB,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;YAC/C,MAAM,CAAC,gBAAgB,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;QACrD,CAAC;QAED,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YACf,IAAI,CAAC,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,KAAM,CAAC;YACvC,IAAI,CAAC,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,SAAU,CAAC;YACzC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,IAAK,CAAC,OAAO,CAAC,CAAC;YAEvD,uCAAuC;YACvC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;gBAClC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;YACxB,CAAC;QACL,CAAC;IACL,CAAC;CACJ;AAED,MAAM,CAAC,MAAM,OAAO,GAChB,SAAS,CAAC,gBAAgB,CAAC,CAAC"}
@@ -1,8 +1,5 @@
1
- import "../../node_modules/@lit/reactive-element/reactive-element.js";
2
- import "../../node_modules/lit-html/lit-html.js";
3
- import "../../node_modules/lit-element/lit-element.js";
4
- import { css as o } from "../../node_modules/@lit/reactive-element/css-tag.js";
5
- const e = o`
1
+ import { css } from 'lit';
2
+ const buttonStyles = css `
6
3
  button {
7
4
  font-family: inherit;
8
5
  border-radius: var(--border-radius-small, 0.5rem);
@@ -200,6 +197,5 @@ const e = o`
200
197
  border: none;
201
198
  }
202
199
  `;
203
- export {
204
- e as default
205
- };
200
+ export default buttonStyles;
201
+ //# sourceMappingURL=button-shared-styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button-shared-styles.js","sourceRoot":"","sources":["../../../src/shared/styles/button-shared-styles.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,YAAY,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqMvB,CAAC;AAEF,eAAe,YAAY,CAAC"}
package/dist/styles.js CHANGED
@@ -1,8 +1,5 @@
1
- import "./node_modules/@lit/reactive-element/reactive-element.js";
2
- import "./node_modules/lit-html/lit-html.js";
3
- import "./node_modules/lit-element/lit-element.js";
4
- import { css as o } from "./node_modules/@lit/reactive-element/css-tag.js";
5
- const n = o`
1
+ import { css } from 'lit-element';
2
+ export default css `
6
3
  :host {
7
4
  --breakpoint-sm: 600px;
8
5
  --breakpoint-md: 960px;
@@ -169,6 +166,4 @@ const n = o`
169
166
  }
170
167
  }
171
168
  `;
172
- export {
173
- n as default
174
- };
169
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.js","sourceRoot":"","sources":["../src/styles.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAElC,eAAe,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsKjB,CAAC"}
@@ -1,13 +1,16 @@
1
- const e = (r, t) => {
2
- if (r === null)
3
- return null;
4
- if (r === "")
5
- return "";
6
- const n = typeof r == "string" ? parseFloat(r) : r;
7
- return isNaN(n) ? "Invalid number" : new Intl.NumberFormat(t, {
8
- style: "decimal"
9
- }).format(n);
10
- };
11
- export {
12
- e as formatCurrency
1
+ export const formatCurrency = (value, locale) => {
2
+ if (value === null) {
3
+ return null;
4
+ }
5
+ if (value === '') {
6
+ return '';
7
+ }
8
+ const number = typeof value === 'string' ? parseFloat(value) : value;
9
+ if (isNaN(number)) {
10
+ return 'Invalid number';
11
+ }
12
+ return new Intl.NumberFormat(locale, {
13
+ style: 'decimal',
14
+ }).format(number);
13
15
  };
16
+ //# sourceMappingURL=currency.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"currency.js","sourceRoot":"","sources":["../../src/utils/currency.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAAU,EAAE,MAAc,EAAE,EAAE;IACzD,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QACjB,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,IAAI,KAAK,KAAK,EAAE,EAAE,CAAC;QACf,OAAO,EAAE,CAAC;IACd,CAAC;IAED,MAAM,MAAM,GAAG,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IAErE,IAAI,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC;QAChB,OAAO,gBAAgB,CAAC;IAC5B,CAAC;IAED,OAAO,IAAI,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE;QACjC,KAAK,EAAE,SAAS;KACnB,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AACtB,CAAC,CAAC"}
@@ -1,50 +1,84 @@
1
- import M from "../node_modules/luxon/src/datetime.js";
2
- import "../node_modules/luxon/src/duration.js";
3
- const l = (e, r, y) => {
4
- const t = e.getValue(r);
5
- if (!t) return !1;
6
- const s = a(t), d = y.startDate, n = y.endDate;
7
- return d && n ? s >= d && s <= n : d ? s >= d : n ? s <= n : !0;
1
+ // @ts-nocheck
2
+ import { DateTime } from 'luxon';
3
+ export const dateRangeFilterFn = (row, columnId, filterValue) => {
4
+ const rowValue = row.getValue(columnId);
5
+ if (!rowValue)
6
+ return false;
7
+ const rowDate = parseDate(rowValue);
8
+ const startDate = filterValue.startDate;
9
+ const endDate = filterValue.endDate;
10
+ // console.log('rowDate', rowDate);
11
+ // console.log('startDate', startDate);
12
+ // console.log('endDate', endDate);
13
+ if (startDate && endDate) {
14
+ return rowDate >= startDate && rowDate <= endDate;
15
+ }
16
+ else if (startDate) {
17
+ return rowDate >= startDate;
18
+ }
19
+ else if (endDate) {
20
+ return rowDate <= endDate;
21
+ }
22
+ return true;
8
23
  };
9
- function u(e, r, y) {
10
- const t = e.getValue(r);
11
- if (!t) return !1;
12
- const s = a(t), d = y;
13
- return !s || !d ? !1 : s === d;
24
+ export function dateFilterFn(row, columnId, filterValue) {
25
+ const rowValue = row.getValue(columnId);
26
+ if (!rowValue)
27
+ return false;
28
+ const date1 = parseDate(rowValue);
29
+ const date2 = filterValue;
30
+ // console.log('rowDate', rowValue);
31
+ // console.log('date1', date1);
32
+ // console.log('date2', date2);
33
+ // Check if both dates are valid
34
+ if (!date1 || !date2) {
35
+ return false;
36
+ }
37
+ // Compare year, month, and day directly
38
+ const isEqual = date1 === date2;
39
+ return isEqual;
14
40
  }
15
- const f = (e, r, y) => {
16
- const t = e.getValue(r);
17
- return t ? y.includes(t) : !1;
41
+ export const multiselectFilterFn = (row, columnId, filterValue) => {
42
+ const rowValue = row.getValue(columnId);
43
+ if (!rowValue)
44
+ return false;
45
+ return filterValue.includes(rowValue);
18
46
  };
19
- function a(e) {
20
- if (!e) return null;
21
- const r = [
22
- "yyyy-MM-dd",
23
- "dd-MM-yyyy",
24
- "MM-dd-yyyy",
25
- "d. M. yyyy",
26
- "d. M. yyyy.",
27
- "d.M.yyyy",
28
- "yyyy/MM/dd",
29
- "dd/MM/yyyy",
30
- "M/d/yyyy",
31
- "MM/dd/yyyy",
32
- "dd MMMM yyyy",
33
- "yyyy-MM-dd'T'HH:mm:ss",
34
- "yyyy-MM-dd'T'HH:mm:ss.SSS",
35
- "yyyy-MM-dd'T'HH:mm:ss.SSSZ",
36
- "dd.MM.yyyy",
37
- "MM.dd.yyyy",
38
- "EEE, d MMM yyyy",
39
- "EEE, d MMM yyyy HH:mm:ss Z"
40
- ];
41
- let y;
42
- for (const t of r)
43
- if (y = M.fromFormat(e, t), y.isValid) break;
44
- return (!y || !y.isValid) && (y = M.fromISO(e)), y.isValid ? y.toJSDate().toISOString() : null;
47
+ function parseDate(dateStr) {
48
+ if (!dateStr)
49
+ return null;
50
+ // Define possible date formats
51
+ const possibleFormats = [
52
+ 'yyyy-MM-dd',
53
+ 'dd-MM-yyyy',
54
+ 'MM-dd-yyyy',
55
+ 'd. M. yyyy',
56
+ 'd. M. yyyy.',
57
+ 'd.M.yyyy',
58
+ 'yyyy/MM/dd',
59
+ 'dd/MM/yyyy',
60
+ 'M/d/yyyy',
61
+ 'MM/dd/yyyy',
62
+ 'dd MMMM yyyy',
63
+ "yyyy-MM-dd'T'HH:mm:ss",
64
+ "yyyy-MM-dd'T'HH:mm:ss.SSS",
65
+ "yyyy-MM-dd'T'HH:mm:ss.SSSZ",
66
+ 'dd.MM.yyyy',
67
+ 'MM.dd.yyyy',
68
+ 'EEE, d MMM yyyy',
69
+ 'EEE, d MMM yyyy HH:mm:ss Z',
70
+ ];
71
+ let date;
72
+ // Try each format until one is valid
73
+ for (const format of possibleFormats) {
74
+ date = DateTime.fromFormat(dateStr, format);
75
+ if (date.isValid)
76
+ break; // Stop if a valid date is found
77
+ }
78
+ // If all formats fail, try as ISO string
79
+ if (!date || !date.isValid) {
80
+ date = DateTime.fromISO(dateStr);
81
+ }
82
+ return date.isValid ? date.toJSDate().toISOString() : null;
45
83
  }
46
- export {
47
- u as dateFilterFn,
48
- l as dateRangeFilterFn,
49
- f as multiselectFilterFn
50
- };
84
+ //# sourceMappingURL=custom-filters.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"custom-filters.js","sourceRoot":"","sources":["../../src/utils/custom-filters.ts"],"names":[],"mappings":"AAAA,cAAc;AACd,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,GAAG,EAAE,QAAQ,EAAE,WAAW,EAAE,EAAE;IAC5D,MAAM,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACxC,IAAI,CAAC,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC5B,MAAM,OAAO,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;IACpC,MAAM,SAAS,GAAG,WAAW,CAAC,SAAS,CAAC;IACxC,MAAM,OAAO,GAAG,WAAW,CAAC,OAAO,CAAC;IAEpC,mCAAmC;IACnC,uCAAuC;IACvC,mCAAmC;IAEnC,IAAI,SAAS,IAAI,OAAO,EAAE,CAAC;QACvB,OAAO,OAAO,IAAI,SAAS,IAAI,OAAO,IAAI,OAAO,CAAC;IACtD,CAAC;SAAM,IAAI,SAAS,EAAE,CAAC;QACnB,OAAO,OAAO,IAAI,SAAS,CAAC;IAChC,CAAC;SAAM,IAAI,OAAO,EAAE,CAAC;QACjB,OAAO,OAAO,IAAI,OAAO,CAAC;IAC9B,CAAC;IACD,OAAO,IAAI,CAAC;AAChB,CAAC,CAAC;AAEF,MAAM,UAAU,YAAY,CAAC,GAAG,EAAE,QAAQ,EAAE,WAAW;IACnD,MAAM,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACxC,IAAI,CAAC,QAAQ;QAAE,OAAO,KAAK,CAAC;IAE5B,MAAM,KAAK,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;IAClC,MAAM,KAAK,GAAG,WAAW,CAAC;IAE1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O,CAAC,OAAO,CAAC,CAAC;IACrC,CAAC;IAED,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;AAC/D,CAAC"}
@@ -1,15 +1,22 @@
1
- import t from "../node_modules/luxon/src/datetime.js";
2
- import "../node_modules/luxon/src/duration.js";
3
- const u = (r, e, n = !1, o) => {
4
- if (r === null)
5
- return null;
6
- if (r === "")
7
- return "";
8
- const i = n ? `${o} HH:mm` : `${o}`, f = new Date(r);
9
- return isNaN(f.getTime()) ? "Invalid date" : o ? t.fromISO(r).toFormat(i) : t.fromISO(r).setLocale(e).toLocaleString(
10
- n ? t.DATETIME_SHORT : void 0
11
- );
12
- };
13
- export {
14
- u as formatDate
1
+ import { DateTime } from 'luxon';
2
+ export const formatDate = (date, locale, time = false, dateFormat) => {
3
+ if (date === null) {
4
+ return null;
5
+ }
6
+ if (date === '') {
7
+ return '';
8
+ }
9
+ const format = time ? `${dateFormat} HH:mm` : `${dateFormat}`;
10
+ const dateObj = new Date(date);
11
+ // if invalid date return Invalid Date
12
+ if (isNaN(dateObj.getTime())) {
13
+ return 'Invalid date';
14
+ }
15
+ if (dateFormat) {
16
+ return DateTime.fromISO(date).toFormat(format);
17
+ }
18
+ return DateTime.fromISO(date)
19
+ .setLocale(locale)
20
+ .toLocaleString(time ? DateTime.DATETIME_SHORT : undefined);
15
21
  };
22
+ //# sourceMappingURL=date.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date.js","sourceRoot":"","sources":["../../src/utils/date.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGjC,MAAM,CAAC,MAAM,UAAU,GAAG,CACtB,IAAS,EACT,MAAc,EACd,OAAgB,KAAK,EACrB,UAAwB,EAC1B,EAAE;IACA,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QAChB,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,IAAI,IAAI,KAAK,EAAE,EAAE,CAAC;QACd,OAAO,EAAE,CAAC;IACd,CAAC;IAED,MAAM,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC,GAAG,UAAU,QAAQ,CAAC,CAAC,CAAC,GAAG,UAAU,EAAE,CAAC;IAC9D,MAAM,OAAO,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC;IAC/B,sCAAsC;IACtC,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC;QAC3B,OAAO,cAAc,CAAC;IAC1B,CAAC;IACD,IAAI,UAAU,EAAE,CAAC;QACb,OAAO,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IACnD,CAAC;IAED,OAAO,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC;SACxB,SAAS,CAAC,MAAM,CAAC;SACjB,cAAc,CACX,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC,CAAC,SAAS,CAC7C,CAAC;AACV,CAAC,CAAC"}