@sme.up/ketchup 11.0.3 → 11.0.5

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 (205) hide show
  1. package/dist/cjs/{f-cell-88ea3c2a.js → f-cell-d7ac8d4e.js} +4 -4
  2. package/dist/cjs/{f-chip-507253cb.js → f-chip-e8b709c3.js} +1 -1
  3. package/dist/cjs/{f-object-field-7ade850e.js → f-object-field-3ab19cc3.js} +2 -2
  4. package/dist/cjs/{f-paginator-utils-7bf669ba.js → f-paginator-utils-f9c65479.js} +1 -1
  5. package/dist/cjs/{f-text-field-207cb958.js → f-text-field-e8ac044b.js} +1 -1
  6. package/dist/cjs/index.cjs.js +2 -2
  7. package/dist/cjs/kup-accordion.cjs.entry.js +2 -2
  8. package/dist/cjs/kup-activity-timeline.cjs.entry.js +3 -3
  9. package/dist/cjs/kup-autocomplete_30.cjs.entry.js +33 -23
  10. package/dist/cjs/kup-box.cjs.entry.js +8 -8
  11. package/dist/cjs/kup-calendar.cjs.entry.js +3 -3
  12. package/dist/cjs/kup-card-list.cjs.entry.js +2 -2
  13. package/dist/cjs/kup-cell.cjs.entry.js +6 -6
  14. package/dist/cjs/kup-custom-task-list-header_4.cjs.entry.js +1 -1
  15. package/dist/cjs/kup-dashboard.cjs.entry.js +3 -3
  16. package/dist/cjs/{kup-data-table-helper-850b5723.js → kup-data-table-helper-02b0fb46.js} +2 -2
  17. package/dist/cjs/{kup-dates-2ff08e4f.js → kup-dates-84f0bc78.js} +2 -1
  18. package/dist/cjs/kup-drawer.cjs.entry.js +2 -2
  19. package/dist/cjs/kup-echart.cjs.entry.js +2 -2
  20. package/dist/cjs/kup-editor.cjs.entry.js +2 -2
  21. package/dist/cjs/kup-family-tree.cjs.entry.js +2 -2
  22. package/dist/cjs/kup-gantt_10.cjs.entry.js +2 -2
  23. package/dist/cjs/kup-grid.cjs.entry.js +2 -2
  24. package/dist/cjs/kup-htm.cjs.entry.js +2 -2
  25. package/dist/cjs/kup-iframe.cjs.entry.js +2 -2
  26. package/dist/cjs/kup-input-panel.cjs.entry.js +17 -20
  27. package/dist/cjs/kup-lazy.cjs.entry.js +2 -2
  28. package/dist/cjs/kup-magic-box.cjs.entry.js +2 -2
  29. package/dist/cjs/{kup-manager-00e29452.js → kup-manager-518e11f4.js} +8 -7
  30. package/dist/cjs/kup-nav-bar.cjs.entry.js +2 -2
  31. package/dist/cjs/kup-numeric-picker.cjs.entry.js +3 -3
  32. package/dist/cjs/kup-object-field.cjs.entry.js +4 -4
  33. package/dist/cjs/{kup-planner-renderer-helper-7dfe474d.js → kup-planner-renderer-helper-7123c277.js} +1 -1
  34. package/dist/cjs/kup-planner-renderer.cjs.entry.js +2 -2
  35. package/dist/cjs/kup-planner.cjs.entry.js +3 -3
  36. package/dist/cjs/kup-probe.cjs.entry.js +2 -2
  37. package/dist/cjs/kup-qlik.cjs.entry.js +2 -2
  38. package/dist/cjs/kup-snackbar.cjs.entry.js +2 -2
  39. package/dist/cjs/kup-txt.cjs.entry.js +2 -2
  40. package/dist/cjs/kup-typography-list.cjs.entry.js +2 -2
  41. package/dist/cjs/kup-typography.cjs.entry.js +2 -2
  42. package/dist/collection/components/kup-data-table/kup-data-table.css +7 -4
  43. package/dist/collection/components/kup-data-table/kup-data-table.js +24 -14
  44. package/dist/collection/components/kup-input-panel/kup-input-panel.js +11 -14
  45. package/dist/collection/managers/kup-dates/kup-dates.js +2 -1
  46. package/dist/collection/utils/cell-utils.js +6 -5
  47. package/dist/components/index.js +1 -1
  48. package/dist/components/kup-accordion.js +2 -2
  49. package/dist/components/kup-activity-timeline.js +2 -2
  50. package/dist/components/kup-autocomplete.js +1 -1
  51. package/dist/components/kup-badge.js +1 -1
  52. package/dist/components/kup-box.js +1 -1
  53. package/dist/components/kup-button-list.js +1 -1
  54. package/dist/components/kup-button.js +1 -1
  55. package/dist/components/kup-calendar.js +3 -3
  56. package/dist/components/kup-card-list.js +3 -3
  57. package/dist/components/kup-card.js +1 -1
  58. package/dist/components/kup-cell.js +2 -2
  59. package/dist/components/kup-chart.js +1 -1
  60. package/dist/components/kup-checkbox.js +1 -1
  61. package/dist/components/kup-chip.js +1 -1
  62. package/dist/components/kup-color-picker.js +1 -1
  63. package/dist/components/kup-combobox.js +1 -1
  64. package/dist/components/kup-custom-task-list-table.js +1 -1
  65. package/dist/components/kup-dashboard.js +2 -2
  66. package/dist/components/kup-data-table.js +1 -1
  67. package/dist/components/kup-date-picker.js +1 -1
  68. package/dist/components/kup-dialog.js +1 -1
  69. package/dist/components/kup-drawer.js +2 -2
  70. package/dist/components/kup-dropdown-button.js +1 -1
  71. package/dist/components/kup-echart.js +1 -1
  72. package/dist/components/kup-editor.js +1 -1
  73. package/dist/components/kup-family-tree.js +3 -3
  74. package/dist/components/kup-file-upload.js +1 -1
  75. package/dist/components/kup-form.js +1 -1
  76. package/dist/components/kup-gantt.js +1 -1
  77. package/dist/components/kup-gauge.js +1 -1
  78. package/dist/components/kup-grid.js +1 -1
  79. package/dist/components/kup-htm.js +2 -2
  80. package/dist/components/kup-iframe.js +2 -2
  81. package/dist/components/kup-image-list.js +1 -1
  82. package/dist/components/kup-image.js +1 -1
  83. package/dist/components/kup-input-panel.js +14 -17
  84. package/dist/components/kup-lazy.js +2 -2
  85. package/dist/components/kup-list.js +1 -1
  86. package/dist/components/kup-magic-box.js +4 -4
  87. package/dist/components/kup-nav-bar.js +2 -2
  88. package/dist/components/kup-numeric-picker.js +2 -2
  89. package/dist/components/kup-object-field.js +2 -2
  90. package/dist/components/kup-planner-renderer.js +1 -1
  91. package/dist/components/kup-planner.js +6 -6
  92. package/dist/components/kup-probe.js +2 -2
  93. package/dist/components/kup-progress-bar.js +1 -1
  94. package/dist/components/kup-qlik.js +2 -2
  95. package/dist/components/kup-radio.js +1 -1
  96. package/dist/components/kup-rating.js +1 -1
  97. package/dist/components/kup-snackbar.js +2 -2
  98. package/dist/components/kup-spinner.js +1 -1
  99. package/dist/components/kup-switch.js +1 -1
  100. package/dist/components/kup-tab-bar.js +1 -1
  101. package/dist/components/kup-task-list.js +1 -1
  102. package/dist/components/kup-text-field.js +1 -1
  103. package/dist/components/kup-time-picker.js +1 -1
  104. package/dist/components/kup-toolbar.js +1 -1
  105. package/dist/components/kup-tree.js +1 -1
  106. package/dist/components/kup-txt.js +2 -2
  107. package/dist/components/kup-typography-list.js +2 -2
  108. package/dist/components/kup-typography.js +2 -2
  109. package/dist/components/{p-9c67c242.js → p-253bbc27.js} +4 -4
  110. package/dist/components/{p-e7a113c6.js → p-2ae1b3af.js} +2 -2
  111. package/dist/components/{p-00cf9dd2.js → p-3a2aa794.js} +2 -2
  112. package/dist/components/{p-2d3187f1.js → p-3c28a421.js} +27 -17
  113. package/dist/components/{p-2d2e8390.js → p-3cae4730.js} +2 -2
  114. package/dist/components/{p-d56d09a2.js → p-4e14ce99.js} +8 -7
  115. package/dist/components/{p-2f618e95.js → p-571ebd17.js} +2 -2
  116. package/dist/components/{p-cf2c9c0d.js → p-7b004e12.js} +2 -2
  117. package/dist/components/{p-d7365aa4.js → p-b23df37b.js} +2 -1
  118. package/dist/components/{p-873d5549.js → p-bc63c612.js} +1 -1
  119. package/dist/components/{p-d2c21bde.js → p-d2c85296.js} +2 -2
  120. package/dist/esm/{f-cell-0a405bc3.js → f-cell-ef478d3f.js} +4 -4
  121. package/dist/esm/{f-chip-9df5d2c6.js → f-chip-25b200ab.js} +1 -1
  122. package/dist/esm/{f-object-field-aac161d2.js → f-object-field-8306fe8f.js} +2 -2
  123. package/dist/esm/{f-paginator-utils-968b5af6.js → f-paginator-utils-53de6f1c.js} +1 -1
  124. package/dist/esm/{f-text-field-416d425c.js → f-text-field-465cc102.js} +1 -1
  125. package/dist/esm/index.js +2 -2
  126. package/dist/esm/kup-accordion.entry.js +2 -2
  127. package/dist/esm/kup-activity-timeline.entry.js +3 -3
  128. package/dist/esm/kup-autocomplete_30.entry.js +33 -23
  129. package/dist/esm/kup-box.entry.js +8 -8
  130. package/dist/esm/kup-calendar.entry.js +3 -3
  131. package/dist/esm/kup-card-list.entry.js +2 -2
  132. package/dist/esm/kup-cell.entry.js +6 -6
  133. package/dist/esm/kup-custom-task-list-header_4.entry.js +1 -1
  134. package/dist/esm/kup-dashboard.entry.js +3 -3
  135. package/dist/esm/{kup-data-table-helper-050584ae.js → kup-data-table-helper-399ccea6.js} +2 -2
  136. package/dist/esm/{kup-dates-bf500166.js → kup-dates-992086f1.js} +2 -1
  137. package/dist/esm/kup-drawer.entry.js +2 -2
  138. package/dist/esm/kup-echart.entry.js +2 -2
  139. package/dist/esm/kup-editor.entry.js +2 -2
  140. package/dist/esm/kup-family-tree.entry.js +2 -2
  141. package/dist/esm/kup-gantt_10.entry.js +2 -2
  142. package/dist/esm/kup-grid.entry.js +2 -2
  143. package/dist/esm/kup-htm.entry.js +2 -2
  144. package/dist/esm/kup-iframe.entry.js +2 -2
  145. package/dist/esm/kup-input-panel.entry.js +17 -20
  146. package/dist/esm/kup-lazy.entry.js +2 -2
  147. package/dist/esm/kup-magic-box.entry.js +2 -2
  148. package/dist/esm/{kup-manager-a47748da.js → kup-manager-bc57ec34.js} +8 -7
  149. package/dist/esm/kup-nav-bar.entry.js +2 -2
  150. package/dist/esm/kup-numeric-picker.entry.js +3 -3
  151. package/dist/esm/kup-object-field.entry.js +4 -4
  152. package/dist/esm/{kup-planner-renderer-helper-b328ea3f.js → kup-planner-renderer-helper-9db7a491.js} +1 -1
  153. package/dist/esm/kup-planner-renderer.entry.js +2 -2
  154. package/dist/esm/kup-planner.entry.js +3 -3
  155. package/dist/esm/kup-probe.entry.js +2 -2
  156. package/dist/esm/kup-qlik.entry.js +2 -2
  157. package/dist/esm/kup-snackbar.entry.js +2 -2
  158. package/dist/esm/kup-txt.entry.js +2 -2
  159. package/dist/esm/kup-typography-list.entry.js +2 -2
  160. package/dist/esm/kup-typography.entry.js +2 -2
  161. package/dist/ketchup/index.esm.js +1 -1
  162. package/dist/ketchup/ketchup.esm.js +1 -1
  163. package/dist/ketchup/{p-c47a69dc.js → p-070a0dac.js} +1 -1
  164. package/dist/ketchup/{p-9854a470.entry.js → p-0b5f3245.entry.js} +1 -1
  165. package/dist/ketchup/{p-ecf0eb17.js → p-10a3d9cb.js} +1 -1
  166. package/dist/ketchup/{p-df7f1752.entry.js → p-1f5b1df4.entry.js} +1 -1
  167. package/dist/ketchup/{p-76868077.entry.js → p-2018e835.entry.js} +1 -1
  168. package/dist/ketchup/{p-72724296.entry.js → p-211d8935.entry.js} +1 -1
  169. package/dist/ketchup/{p-2ca5047c.js → p-26e0046e.js} +1 -1
  170. package/dist/ketchup/{p-d09cf0b3.entry.js → p-2847ac2b.entry.js} +1 -1
  171. package/dist/ketchup/{p-41d4dd10.entry.js → p-2e6e1479.entry.js} +1 -1
  172. package/dist/ketchup/{p-c5e5fbb2.entry.js → p-301fafb0.entry.js} +1 -1
  173. package/dist/ketchup/{p-06ceea6f.entry.js → p-302502d4.entry.js} +1 -1
  174. package/dist/ketchup/{p-aebeb30c.entry.js → p-31a050c6.entry.js} +1 -1
  175. package/dist/ketchup/{p-3923312c.entry.js → p-35d6f606.entry.js} +1 -1
  176. package/dist/ketchup/{p-3f71f711.entry.js → p-48b91894.entry.js} +1 -1
  177. package/dist/ketchup/{p-839b289d.entry.js → p-50a341fc.entry.js} +1 -1
  178. package/dist/ketchup/{p-34a92fec.entry.js → p-5183215e.entry.js} +1 -1
  179. package/dist/ketchup/{p-4ccac10f.entry.js → p-552622f5.entry.js} +1 -1
  180. package/dist/ketchup/{p-1e546759.entry.js → p-56180822.entry.js} +1 -1
  181. package/dist/ketchup/{p-6b9430ff.entry.js → p-5fa26942.entry.js} +1 -1
  182. package/dist/ketchup/{p-613d82ed.entry.js → p-6bc44966.entry.js} +1 -1
  183. package/dist/ketchup/{p-e4a9100b.entry.js → p-80d8f092.entry.js} +1 -1
  184. package/dist/ketchup/{p-65f31377.entry.js → p-8213526b.entry.js} +1 -1
  185. package/dist/ketchup/{p-32c0cc6c.entry.js → p-8222d46d.entry.js} +1 -1
  186. package/dist/ketchup/{p-060ec8ef.js → p-85a956cd.js} +1 -1
  187. package/dist/ketchup/{p-71410c8c.entry.js → p-90f5363e.entry.js} +1 -1
  188. package/dist/ketchup/{p-adadf8b5.js → p-a78c9d39.js} +1 -1
  189. package/dist/ketchup/p-bbf06c90.entry.js +1 -0
  190. package/dist/ketchup/{p-65509faf.js → p-bdbbfb48.js} +1 -1
  191. package/dist/ketchup/p-c24e94cb.js +1 -0
  192. package/dist/ketchup/{p-5a24cdc1.entry.js → p-c907474c.entry.js} +1 -1
  193. package/dist/ketchup/{p-895a22ef.entry.js → p-cbea5a29.entry.js} +1 -1
  194. package/dist/ketchup/{p-235f2751.entry.js → p-daacc004.entry.js} +1 -1
  195. package/dist/ketchup/{p-bea1f185.js → p-e77460f4.js} +1 -1
  196. package/dist/ketchup/{p-42e63e2e.entry.js → p-e7ccceeb.entry.js} +1 -1
  197. package/dist/ketchup/{p-e618deeb.entry.js → p-e85f1e78.entry.js} +1 -1
  198. package/dist/ketchup/{p-7f7a9ebc.js → p-ebcf1f74.js} +1 -1
  199. package/dist/ketchup/{p-3478ab68.entry.js → p-ebe27d32.entry.js} +1 -1
  200. package/dist/ketchup/{p-62e118bc.entry.js → p-ef780739.entry.js} +2 -2
  201. package/dist/ketchup/{p-763fd00d.entry.js → p-f96390e2.entry.js} +1 -1
  202. package/dist/ketchup/{p-f9a6acb8.entry.js → p-f9767f0a.entry.js} +1 -1
  203. package/package.json +1 -1
  204. package/dist/ketchup/p-46a89edc.js +0 -1
  205. package/dist/ketchup/p-4f97da3e.entry.js +0 -1
@@ -1 +1 @@
1
- import{r as e,f as t,h as s,H as a,d as o}from"./p-710d0a7d.js";import{F as i}from"./p-46a89edc.js";import{k as r,g as c}from"./p-ecf0eb17.js";import{c as n}from"./p-635bb4b3.js";import"./p-14c6efce.js";import"./p-e3062c19.js";import"./p-cce08de3.js";import"./p-c47a69dc.js";import"./p-adadf8b5.js";var f;!function(e){e.customStyle="Custom style of the component.",e.data="Actual data of the component."}(f||(f={}));var d,h=function(e,t,s,a){if("a"===s&&!a)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!a:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===s?a:"a"===s?a.call(e):a?a.value:t.get(e)};const p=class{constructor(t){e(this,t),d.set(this,r()),this.inputValue="",this.customStyle="",this.data={}}async getValue(){return this.inputValue}async getProps(e){return c(this,f,e)}async refresh(){t(this)}async setValue(e){this.inputValue=e}componentWillLoad(){h(this,d,"f").debug.logLoad(this,!1),h(this,d,"f").theme.register(this)}componentDidLoad(){h(this,d,"f").debug.logLoad(this,!0)}componentWillRender(){h(this,d,"f").debug.logRender(this,!1)}componentDidRender(){h(this,d,"f").debug.logRender(this,!0)}render(){var e;const t={data:null!==(e=this.data)&&void 0!==e?e:{},inputValue:this.inputValue,onChange:null};return s(a,{key:"5eaf6b26539f0d6301e19077a29419bb91e11629"},s("style",{key:"03944bfc8cd00d94e11aef6ccfc55e7ffe73f741"},h(this,d,"f").theme.setKupStyle(this.rootElement)),s("div",{key:"e0336a46ae9b6b0cce2dbf83498508560414ecca",id:n},s(i,Object.assign({key:"1f82d5ee84dedcf85d67536a2e4667bf51a70485"},t))))}disconnectedCallback(){h(this,d,"f").theme.unregister(this)}get rootElement(){return o(this)}};d=new WeakMap,p.style="";export{p as kup_object_field}
1
+ import{r as e,f as t,h as s,H as a,d as o}from"./p-710d0a7d.js";import{F as i}from"./p-c24e94cb.js";import{k as r,g as c}from"./p-10a3d9cb.js";import{c as n}from"./p-635bb4b3.js";import"./p-14c6efce.js";import"./p-e3062c19.js";import"./p-cce08de3.js";import"./p-070a0dac.js";import"./p-a78c9d39.js";var f;!function(e){e.customStyle="Custom style of the component.",e.data="Actual data of the component."}(f||(f={}));var d,h=function(e,t,s,a){if("a"===s&&!a)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!a:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===s?a:"a"===s?a.call(e):a?a.value:t.get(e)};const p=class{constructor(t){e(this,t),d.set(this,r()),this.inputValue="",this.customStyle="",this.data={}}async getValue(){return this.inputValue}async getProps(e){return c(this,f,e)}async refresh(){t(this)}async setValue(e){this.inputValue=e}componentWillLoad(){h(this,d,"f").debug.logLoad(this,!1),h(this,d,"f").theme.register(this)}componentDidLoad(){h(this,d,"f").debug.logLoad(this,!0)}componentWillRender(){h(this,d,"f").debug.logRender(this,!1)}componentDidRender(){h(this,d,"f").debug.logRender(this,!0)}render(){var e;const t={data:null!==(e=this.data)&&void 0!==e?e:{},inputValue:this.inputValue,onChange:null};return s(a,{key:"5eaf6b26539f0d6301e19077a29419bb91e11629"},s("style",{key:"03944bfc8cd00d94e11aef6ccfc55e7ffe73f741"},h(this,d,"f").theme.setKupStyle(this.rootElement)),s("div",{key:"e0336a46ae9b6b0cce2dbf83498508560414ecca",id:n},s(i,Object.assign({key:"1f82d5ee84dedcf85d67536a2e4667bf51a70485"},t))))}disconnectedCallback(){h(this,d,"f").theme.unregister(this)}get rootElement(){return o(this)}};d=new WeakMap,p.style="";export{p as kup_object_field}
@@ -1 +1 @@
1
- import{r as t,c as n,f as i,h as e,H as a,d as p}from"./p-710d0a7d.js";import{k as o,h as s,g as h,s as f}from"./p-ecf0eb17.js";import{a as l,F as r}from"./p-cec0955d.js";import{c}from"./p-635bb4b3.js";import"./p-adadf8b5.js";var u;!function(t){t.data="prop of the sub compoennt",t.Style="it is the style of the text",t.Border="when true it will appear a border",t.BorderWidth="it is the width of the border",t.Align="text alignment",t.FontBold="when true it will display the bold font",t.FontItalic="when true it will display the italic ( cursive )",t.FontName="it is the name of the font",t.FontSize="it is the size of the font of the text",t.FontULine="when true it will show the underline",t.FontColor="it is the color of the font of the text",t.BackColor="it is the background color of the text",t.Type="it is the type of the font. It is an enum that can take from different variant such as body, heading1, caption and so on"}(u||(u={}));const g=class{constructor(i){t(this,i),this.kupIconClick=n(this,"kup-typographylist-icon-click",6),this.KupClick=n(this,"kup-typographylist-click",6),this.kupManager=o(),this.customStyle="",this.data=[],this.type=l.BODY_COMPACT,this.toolbar=!1}onKupClick(t,n){this.KupClick.emit({comp:this,id:this.rootElement.id,index:t,subIndex:n,obj:this.getObjForEvent(t,n)})}onKupIconClick(t,n){this.kupIconClick.emit({comp:this,id:this.rootElement.id,index:t,node:n})}checkDataset(t){t||(t=[]),t.columns&&(this.kupManager.debug.logMessage(this,"Detected KupDataDataset: converting rows to nodes.",s.WARNING),this.data=this.kupManager.data.row.toNode(this.data))}async getProps(t){return h(this,u,t)}async refresh(){i(this)}async setProps(t){f(this,u,t)}renderTypography(t,n){if(null===t)return this.kupManager.debug.logMessage(this,"Empty data text.",s.WARNING),null;const i=this.prepareDataFromTreeNode(t,n);return i.value?e(r,Object.assign({},{value:i.value,type:i.type,toolbar:i.toolbar})):(this.kupManager.debug.logMessage(this,"Empty text.",s.WARNING),null)}prepareDataFromTreeNode(t,n){const i=null!=t.data?Object.assign({},t.data):{};return null!=this.customStyle&&""!=this.customStyle.trim()&&(i.customStyle=this.customStyle),null==i.value&&(i.value=t.value),i.wrapperClass||(i.wrapperClass=""),null!=this.type&&(i.type=this.type),null!=this.toolbar&&(i.toolbar=this.toolbar),i.id=n.toString(),i}renderTypographys(){if(null==this.data||this.data.length<1)return null;const t=[];for(let n=0;n<this.data.length;n++){let i=null;i=this.renderTypography(this.data[n],n),i&&t.push(i)}return t}getObjForEvent(t,n){let i=Number(t),e=-1;null!=n&&""!=n.trim()&&(e=Number(n));let a=this.data[i];return-1!=e?a.children[e].obj:a.obj}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),this.checkDataset(this.data),this.kupManager.theme.register(this)}componentDidLoad(){this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.kupManager.debug.logRender(this,!0)}render(){const t=this.renderTypographys();return e(a,{key:"fe46fa2e9c4b087812bbc31953125b891a980887"},e("style",{key:"b962671bbaf0632c1f153a13d1aefec4f01a19b5"},this.kupManager.theme.setKupStyle(this.rootElement)),e("div",{key:"087aa8e59f12ffd537f9204a417a3edb650355cb",id:c},e("div",{key:"8d939397c90ae7f1801853833097f2c0d78848cd",class:"typographies-wrapper"},t)))}disconnectedCallback(){this.kupManager.theme.unregister(this)}get rootElement(){return p(this)}static get watchers(){return{data:["checkDataset"]}}};g.style=".kup-body-compact-01 {\n font-family: var(--kup-font-family);\n font-size: var(--kup-body-compact-01-font-size, 14px);\n line-height: 18px;\n font-weight: 400;\n letter-spacing: 0.16px;\n}\n\n.kup-body-01 {\n font-family: var(--kup-font-family);\n font-size: var(--kup-body-01-font-size, 14px);\n line-height: 20px;\n font-weight: 400;\n letter-spacing: 0.16px;\n}\n\n.kup-code-01 {\n font-family: var(--kup-font-family-monospace);\n font-size: 12px;\n line-height: 16px;\n font-weight: 400;\n letter-spacing: 0.32px;\n}\n\n.kup-label-01 {\n font-family: var(--kup-font-family);\n font-size: var(--kup-label-01-font-size, 12px);\n line-height: 16px;\n font-weight: 400;\n letter-spacing: 0.32px;\n}\n\n.kup-caption-02 {\n font-family: var(--kup-font-family);\n font-size: 12px;\n line-height: 15px;\n font-weight: 500;\n letter-spacing: 1px;\n}\n\n.kup-caption-01 {\n font-family: var(--kup-font-family);\n font-size: 10px;\n line-height: 13px;\n font-weight: 400;\n letter-spacing: 1px;\n}\n\n.kup-small-label-01 {\n font-family: var(--kup-font-family);\n font-size: 6px;\n line-height: 9px;\n font-weight: 400;\n letter-spacing: 1px;\n}\n\n.kup-heading-compact-01 {\n font-family: var(--kup-font-family);\n font-size: var(--kup-heading-compact-01-font-size, 14px);\n line-height: 18px;\n font-weight: 600;\n letter-spacing: 0.16px;\n}\n\n.kup-heading-01 {\n font-family: var(--kup-font-family);\n font-size: var(--kup-heading-01-font-size, 14px);\n line-height: 20px;\n font-weight: 600;\n letter-spacing: 0.16px;\n}\n\n.kup-heading-02 {\n font-family: var(--kup-font-family);\n font-size: 16px;\n line-height: 24px;\n font-weight: 500;\n letter-spacing: 0;\n}\n\n.kup-heading-03 {\n font-family: var(--kup-font-family);\n font-size: 20px;\n line-height: 28px;\n font-weight: 400;\n letter-spacing: 0;\n}\n\n.kup-heading-04 {\n font-family: var(--kup-font-family);\n font-size: 28px;\n line-height: 36px;\n font-weight: 400;\n letter-spacing: 0;\n}\n\n.kup-heading-05 {\n font-family: var(--kup-font-family);\n font-size: 32px;\n line-height: 40px;\n font-weight: 300;\n letter-spacing: 0;\n}\n\n.kup-heading-06 {\n font-family: var(--kup-font-family);\n font-size: 42px;\n line-height: 50px;\n font-weight: 300;\n letter-spacing: 0;\n}\n\n.kup-heading-07 {\n font-family: var(--kup-font-family);\n font-size: 54px;\n line-height: 64px;\n font-weight: 300;\n letter-spacing: 0;\n}\n\n.kup-heading-08 {\n font-family: var(--kup-font-family);\n font-size: 54px;\n line-height: 64px;\n font-weight: 600;\n letter-spacing: 0;\n}\n\n:host {\n --kup_typographylist_wrapper_gap: var(\n --kup-typographylist-wrapper-gap,\n var(--kup-space-00) ;\n );\n}\n\n.typographies-wrapper {\n display: flex;\n flex-direction: column;\n gap: var(--kup_typographylist_wrapper_gap);\n}\n\n:host {\n display: block;\n}";export{g as kup_typography_list}
1
+ import{r as t,c as n,f as i,h as e,H as a,d as p}from"./p-710d0a7d.js";import{k as o,h as s,g as h,s as l}from"./p-10a3d9cb.js";import{a as f,F as r}from"./p-cec0955d.js";import{c}from"./p-635bb4b3.js";import"./p-a78c9d39.js";var u;!function(t){t.data="prop of the sub compoennt",t.Style="it is the style of the text",t.Border="when true it will appear a border",t.BorderWidth="it is the width of the border",t.Align="text alignment",t.FontBold="when true it will display the bold font",t.FontItalic="when true it will display the italic ( cursive )",t.FontName="it is the name of the font",t.FontSize="it is the size of the font of the text",t.FontULine="when true it will show the underline",t.FontColor="it is the color of the font of the text",t.BackColor="it is the background color of the text",t.Type="it is the type of the font. It is an enum that can take from different variant such as body, heading1, caption and so on"}(u||(u={}));const g=class{constructor(i){t(this,i),this.kupIconClick=n(this,"kup-typographylist-icon-click",6),this.KupClick=n(this,"kup-typographylist-click",6),this.kupManager=o(),this.customStyle="",this.data=[],this.type=f.BODY_COMPACT,this.toolbar=!1}onKupClick(t,n){this.KupClick.emit({comp:this,id:this.rootElement.id,index:t,subIndex:n,obj:this.getObjForEvent(t,n)})}onKupIconClick(t,n){this.kupIconClick.emit({comp:this,id:this.rootElement.id,index:t,node:n})}checkDataset(t){t||(t=[]),t.columns&&(this.kupManager.debug.logMessage(this,"Detected KupDataDataset: converting rows to nodes.",s.WARNING),this.data=this.kupManager.data.row.toNode(this.data))}async getProps(t){return h(this,u,t)}async refresh(){i(this)}async setProps(t){l(this,u,t)}renderTypography(t,n){if(null===t)return this.kupManager.debug.logMessage(this,"Empty data text.",s.WARNING),null;const i=this.prepareDataFromTreeNode(t,n);return i.value?e(r,Object.assign({},{value:i.value,type:i.type,toolbar:i.toolbar})):(this.kupManager.debug.logMessage(this,"Empty text.",s.WARNING),null)}prepareDataFromTreeNode(t,n){const i=null!=t.data?Object.assign({},t.data):{};return null!=this.customStyle&&""!=this.customStyle.trim()&&(i.customStyle=this.customStyle),null==i.value&&(i.value=t.value),i.wrapperClass||(i.wrapperClass=""),null!=this.type&&(i.type=this.type),null!=this.toolbar&&(i.toolbar=this.toolbar),i.id=n.toString(),i}renderTypographys(){if(null==this.data||this.data.length<1)return null;const t=[];for(let n=0;n<this.data.length;n++){let i=null;i=this.renderTypography(this.data[n],n),i&&t.push(i)}return t}getObjForEvent(t,n){let i=Number(t),e=-1;null!=n&&""!=n.trim()&&(e=Number(n));let a=this.data[i];return-1!=e?a.children[e].obj:a.obj}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),this.checkDataset(this.data),this.kupManager.theme.register(this)}componentDidLoad(){this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.kupManager.debug.logRender(this,!0)}render(){const t=this.renderTypographys();return e(a,{key:"fe46fa2e9c4b087812bbc31953125b891a980887"},e("style",{key:"b962671bbaf0632c1f153a13d1aefec4f01a19b5"},this.kupManager.theme.setKupStyle(this.rootElement)),e("div",{key:"087aa8e59f12ffd537f9204a417a3edb650355cb",id:c},e("div",{key:"8d939397c90ae7f1801853833097f2c0d78848cd",class:"typographies-wrapper"},t)))}disconnectedCallback(){this.kupManager.theme.unregister(this)}get rootElement(){return p(this)}static get watchers(){return{data:["checkDataset"]}}};g.style=".kup-body-compact-01 {\n font-family: var(--kup-font-family);\n font-size: var(--kup-body-compact-01-font-size, 14px);\n line-height: 18px;\n font-weight: 400;\n letter-spacing: 0.16px;\n}\n\n.kup-body-01 {\n font-family: var(--kup-font-family);\n font-size: var(--kup-body-01-font-size, 14px);\n line-height: 20px;\n font-weight: 400;\n letter-spacing: 0.16px;\n}\n\n.kup-code-01 {\n font-family: var(--kup-font-family-monospace);\n font-size: 12px;\n line-height: 16px;\n font-weight: 400;\n letter-spacing: 0.32px;\n}\n\n.kup-label-01 {\n font-family: var(--kup-font-family);\n font-size: var(--kup-label-01-font-size, 12px);\n line-height: 16px;\n font-weight: 400;\n letter-spacing: 0.32px;\n}\n\n.kup-caption-02 {\n font-family: var(--kup-font-family);\n font-size: 12px;\n line-height: 15px;\n font-weight: 500;\n letter-spacing: 1px;\n}\n\n.kup-caption-01 {\n font-family: var(--kup-font-family);\n font-size: 10px;\n line-height: 13px;\n font-weight: 400;\n letter-spacing: 1px;\n}\n\n.kup-small-label-01 {\n font-family: var(--kup-font-family);\n font-size: 6px;\n line-height: 9px;\n font-weight: 400;\n letter-spacing: 1px;\n}\n\n.kup-heading-compact-01 {\n font-family: var(--kup-font-family);\n font-size: var(--kup-heading-compact-01-font-size, 14px);\n line-height: 18px;\n font-weight: 600;\n letter-spacing: 0.16px;\n}\n\n.kup-heading-01 {\n font-family: var(--kup-font-family);\n font-size: var(--kup-heading-01-font-size, 14px);\n line-height: 20px;\n font-weight: 600;\n letter-spacing: 0.16px;\n}\n\n.kup-heading-02 {\n font-family: var(--kup-font-family);\n font-size: 16px;\n line-height: 24px;\n font-weight: 500;\n letter-spacing: 0;\n}\n\n.kup-heading-03 {\n font-family: var(--kup-font-family);\n font-size: 20px;\n line-height: 28px;\n font-weight: 400;\n letter-spacing: 0;\n}\n\n.kup-heading-04 {\n font-family: var(--kup-font-family);\n font-size: 28px;\n line-height: 36px;\n font-weight: 400;\n letter-spacing: 0;\n}\n\n.kup-heading-05 {\n font-family: var(--kup-font-family);\n font-size: 32px;\n line-height: 40px;\n font-weight: 300;\n letter-spacing: 0;\n}\n\n.kup-heading-06 {\n font-family: var(--kup-font-family);\n font-size: 42px;\n line-height: 50px;\n font-weight: 300;\n letter-spacing: 0;\n}\n\n.kup-heading-07 {\n font-family: var(--kup-font-family);\n font-size: 54px;\n line-height: 64px;\n font-weight: 300;\n letter-spacing: 0;\n}\n\n.kup-heading-08 {\n font-family: var(--kup-font-family);\n font-size: 54px;\n line-height: 64px;\n font-weight: 600;\n letter-spacing: 0;\n}\n\n:host {\n --kup_typographylist_wrapper_gap: var(\n --kup-typographylist-wrapper-gap,\n var(--kup-space-00) ;\n );\n}\n\n.typographies-wrapper {\n display: flex;\n flex-direction: column;\n gap: var(--kup_typographylist_wrapper_gap);\n}\n\n:host {\n display: block;\n}";export{g as kup_typography_list}
@@ -1 +1 @@
1
- import{r as t,c as i,f as e,h as s,H as h,d as n}from"./p-710d0a7d.js";import{k as o,g as a,e as l,v as p}from"./p-ecf0eb17.js";import{c as r}from"./p-635bb4b3.js";import{F as u}from"./p-c47a69dc.js";import{F as c}from"./p-7db300e0.js";import"./p-adadf8b5.js";import"./p-cce08de3.js";import"./p-c56195a0.js";var f;!function(t){t.customStyle="Custom style of the component.",t.data="Props of the sub-components.",t.decimals="Defaults at false. When set to true, the component has decimals.",t.disabled="Defaults at false. When set to true, the component is disabled.",t.initialValue="Sets the initial value of the component",t.maxDecimals="when set, the component allows you to enter decimals with a maximum of characters.",t.maxIntegers="When set, the component allows you to enter integer numbers with a maximum of characters.",t.maxLength="When set, the component allows you to enter numbers with a maximum of characters, including decimals.",t.negative="Defaults at false. When set to true, the component has negative number."}(f||(f={}));const m=class{constructor(e){t(this,e),this.kupBlur=i(this,"kup-numericpicker-blur",6),this.kupChange=i(this,"kup-numericpicker-change",6),this.kupClick=i(this,"kup-numericpicker-click",6),this.kupFocus=i(this,"kup-numericpicker-focus",6),this.kupInput=i(this,"kup-numericpicker-input",6),this.kupIconClick=i(this,"kup-numericpicker-iconclick",6),this.kupItemClick=i(this,"kup-numericpicker-itemclick",6),this.kupTextFieldSubmit=i(this,"kup-numericpicker-textfieldsubmit",6),this.kupClearIconClick=i(this,"kup-numericpicker-cleariconclick",6),this.kupManager=o(),this.textfieldEl=null,this.pickerContainerEl=null,this.pickerEl={value:(new Date).toISOString(),date:new Date},this.clickCb=null,this.stateSwitcher=!1,this.value="",this.customStyle="",this.data=null,this.decimals=!1,this.disabled=!1,this.initialValue="",this.maxDecimals=null,this.maxIntegers=null,this.maxLength=null,this.negative=!1}onKupPickerItemClick(t){this.setPickerValueSelected(t),this.kupChange.emit({comp:this,id:this.rootElement.id,value:this.value}),this.kupItemClick.emit({comp:this,id:this.rootElement.id,value:this.value}),this.setFocus()}onKupClearIconClick(){this.setPickerValueSelected(""),this.kupChange.emit({comp:this,id:this.rootElement.id,value:this.value}),this.kupClearIconClick.emit({comp:this,id:this.rootElement.id})}onKupBlur(){this.kupBlur.emit({id:this.rootElement.id,value:this.value,comp:this})}onKupChange(t){this.refreshPickerValue(t.target.value,this.kupChange)}onKupClick(){this.kupClick.emit({comp:this,id:this.rootElement.id,value:this.value})}onKupFocus(){this.kupFocus.emit({comp:this,id:this.rootElement.id,value:this.value})}onKupInput(t){this.refreshPickerValue(t.target.value,this.kupInput,!0)}onkupTextFieldSubmit(t){"Enter"===t.key&&this.refreshPickerValue(t.target.value,this.kupTextFieldSubmit)}onKupIconClick(){this.isPickerOpened()?this.closePicker():this.openPicker(),this.kupIconClick.emit({comp:this,id:this.rootElement.id,value:this.value})}listenKeyup(t){this.isPickerOpened()&&("Escape"===t.key&&this.closePicker(),"Enter"===t.key&&this.setPickerValueSelected())}async getValue(){return this.value}async getProps(t){return a(this,f,t)}async refresh(){e(this)}async setFocus(){null!=this.textfieldEl&&this.textfieldEl.focus()}async setValue(t){this.value=t}refreshPickerValue(t,i,e){let s=this.kupManager.math.numberify(t,!0);if(s){let t=s.toString();const h=t.indexOf(".");let n=h>-1?t.substring(0,h):t,o=h>-1?t.substring(h+1):"";for(this.maxIntegers&&n.length>this.maxIntegers&&(n=n.substring(n.length-this.maxIntegers)),this.maxDecimals&&o.length>this.maxDecimals&&(o=o.substring(0,this.maxDecimals));this.maxLength&&n.length+o.length>this.maxLength;)o.length>1?o=o.substring(0,o.length-1):n.length>1&&(n=n.substring(1));t=h>-1?`${n}.${o}`:n,1!=e&&this.setValue(t),null!=i&&i.emit({id:this.rootElement.id,value:t})}}setPickerValueSelected(t){1!=this.disabled&&(null==t&&(t=this.getPickerValueSelected()),this.closePicker(),null!=t&&this.setValue(t))}getPickerValueSelected(){return this.pickerEl.value}getValueForPickerComponent(){return this.value}openPicker(){const t=this.textfieldEl;this.pickerContainerEl.menuVisible=!0;const i=this.pickerContainerEl.style;i.height="auto",i.minWidth=this.textfieldEl.parentElement.clientWidth+"px",null!=t&&t.classList.add("toggled"),this.kupManager.dynamicPosition.isRegistered(this.pickerContainerEl)?this.kupManager.dynamicPosition.changeAnchor(this.pickerContainerEl,this.textfieldEl.parentElement):this.kupManager.dynamicPosition.register(this.pickerContainerEl,this.textfieldEl.parentElement,0,l.AUTO,!0),this.kupManager.dynamicPosition.start(this.pickerContainerEl),this.clickCb||(this.clickCb={cb:()=>{this.closePicker()},el:this.pickerContainerEl}),this.kupManager.addClickCallback(this.clickCb,!0)}closePicker(){if(this.kupManager.removeClickCallback(this.clickCb),!this.isPickerOpened())return;let t=this.textfieldEl;null!=t&&t.classList.remove("toggled"),this.pickerContainerEl.menuVisible=!1,this.kupManager.dynamicPosition.stop(this.pickerContainerEl)}isPickerOpened(){return 1==this.pickerContainerEl.menuVisible}getTextFieldId(){return this.textfieldEl.id}prepTextfield(){this.decimals||this.maxIntegers||(this.maxIntegers=17),!this.decimals||this.maxIntegers||this.maxDecimals||(this.maxIntegers=15,this.maxDecimals=2);const t=this.rootElement.classList.contains("kup-full-height"),i=this.rootElement.classList.contains("kup-full-width"),e=Object.assign({},this.data["kup-text-field"]);return e.icon||(e.icon="calculator"),e.icon&&(e.trailingIcon=!0),s(u,Object.assign({},e,{disabled:this.disabled,fullHeight:t,fullWidth:i,id:this.rootElement.id+"_text-field",value:this.kupManager.math.numbers.toLocaleString(this.value),onBlur:()=>this.onKupBlur(),onChange:t=>this.onKupChange(t),onClearIconClick:()=>this.onKupClearIconClick(),onClick:()=>this.onKupClick(),onFocus:()=>this.onKupFocus(),onIconClick:()=>this.onKupIconClick(),onKeyDown:t=>this.onkupTextFieldSubmit(t),onInput:t=>this.onKupInput(t)}),this.prepPicker())}prepPicker(){return s("kup-card",{ref:t=>this.pickerContainerEl=t,data:{options:{decimals:this.decimals,initialValue:this.value,maxDecimals:this.maxDecimals,maxIntegers:this.maxIntegers,maxLength:this.maxLength,negative:this.negative,resetStatus:!0}},layoutFamily:p.BUILT_IN,layoutNumber:5,sizeX:"300px",sizeY:"auto",isMenu:!0,"onkup-card-click":t=>{null!=t.detail.value&&this.onKupPickerItemClick(t.detail.value)}})}componentWillLoad(){this.kupManager.dates.register(this),this.kupManager.debug.logLoad(this,!1),this.kupManager.theme.register(this),this.value=this.initialValue,this.data||(this.data={"kup-text-field":{}})}componentDidLoad(){this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){const t=this.rootElement.shadowRoot;if(t){const i=t.querySelector(".f-text-field");i&&(this.textfieldEl=i.querySelector("input"),c(i))}this.kupManager.debug.logRender(this,!0)}render(){return s(h,{key:"22a6ef8139d04934008071cfa9f9d395144cf82c"},s("style",{key:"3631b7dedacb5a4732a78a36ab6a4ddd772ae632"},this.kupManager.theme.setKupStyle(this.rootElement)),s("div",{key:"9496502390810c10eb60f5fad738d99ee2cbaef5",id:r},this.prepTextfield()))}disconnectedCallback(){this.kupManager.dates.unregister(this),this.kupManager.theme.unregister(this),this.pickerContainerEl&&this.pickerContainerEl.remove()}get rootElement(){return n(this)}};m.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:var(--kup-label-01-font-size, 12px);line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-compact-01-font-size, 14px);line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-01-font-size, 14px);line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{display:block;font-size:var(--kup-font-size)}.f-text-field{position:relative}:host(.kup-full-height){height:100%}:host(.kup-full-height) #kup-component{height:100%}:host(.kup-full-width){width:100%}:host(.kup-full-width) #kup-component{width:100%}:host(.kup-danger){--kup-textfield-primary-color:var(--kup-danger-color-60);--kup-textfield-primary-color-rgb:var(--kup-danger-color-rgb)}:host(.kup-info){--kup-textfield-primary-color:var(--kup-info-color);--kup-textfield-primary-color-rgb:var(--kup-info-color-rgb)}:host(.kup-secondary){--kup-textfield-primary-color:var(--kup-secondary-color);--kup-textfield-primary-color-rgb:var(--kup-secondary-color-rgb)}:host(.kup-success){--kup-textfield-primary-color:var(--kup-success-color);--kup-textfield-primary-color-rgb:var(--kup-success-color-rgb)}:host(.kup-warning){--kup-textfield-primary-color:var(--kup-warning-color-50);--kup-textfield-primary-color-rgb:var(--kup-warning-color-rgb)}";export{m as kup_numeric_picker}
1
+ import{r as t,c as i,f as e,h as s,H as h,d as n}from"./p-710d0a7d.js";import{k as o,g as a,e as l,v as p}from"./p-10a3d9cb.js";import{c as r}from"./p-635bb4b3.js";import{F as u}from"./p-070a0dac.js";import{F as c}from"./p-7db300e0.js";import"./p-a78c9d39.js";import"./p-cce08de3.js";import"./p-c56195a0.js";var f;!function(t){t.customStyle="Custom style of the component.",t.data="Props of the sub-components.",t.decimals="Defaults at false. When set to true, the component has decimals.",t.disabled="Defaults at false. When set to true, the component is disabled.",t.initialValue="Sets the initial value of the component",t.maxDecimals="when set, the component allows you to enter decimals with a maximum of characters.",t.maxIntegers="When set, the component allows you to enter integer numbers with a maximum of characters.",t.maxLength="When set, the component allows you to enter numbers with a maximum of characters, including decimals.",t.negative="Defaults at false. When set to true, the component has negative number."}(f||(f={}));const m=class{constructor(e){t(this,e),this.kupBlur=i(this,"kup-numericpicker-blur",6),this.kupChange=i(this,"kup-numericpicker-change",6),this.kupClick=i(this,"kup-numericpicker-click",6),this.kupFocus=i(this,"kup-numericpicker-focus",6),this.kupInput=i(this,"kup-numericpicker-input",6),this.kupIconClick=i(this,"kup-numericpicker-iconclick",6),this.kupItemClick=i(this,"kup-numericpicker-itemclick",6),this.kupTextFieldSubmit=i(this,"kup-numericpicker-textfieldsubmit",6),this.kupClearIconClick=i(this,"kup-numericpicker-cleariconclick",6),this.kupManager=o(),this.textfieldEl=null,this.pickerContainerEl=null,this.pickerEl={value:(new Date).toISOString(),date:new Date},this.clickCb=null,this.stateSwitcher=!1,this.value="",this.customStyle="",this.data=null,this.decimals=!1,this.disabled=!1,this.initialValue="",this.maxDecimals=null,this.maxIntegers=null,this.maxLength=null,this.negative=!1}onKupPickerItemClick(t){this.setPickerValueSelected(t),this.kupChange.emit({comp:this,id:this.rootElement.id,value:this.value}),this.kupItemClick.emit({comp:this,id:this.rootElement.id,value:this.value}),this.setFocus()}onKupClearIconClick(){this.setPickerValueSelected(""),this.kupChange.emit({comp:this,id:this.rootElement.id,value:this.value}),this.kupClearIconClick.emit({comp:this,id:this.rootElement.id})}onKupBlur(){this.kupBlur.emit({id:this.rootElement.id,value:this.value,comp:this})}onKupChange(t){this.refreshPickerValue(t.target.value,this.kupChange)}onKupClick(){this.kupClick.emit({comp:this,id:this.rootElement.id,value:this.value})}onKupFocus(){this.kupFocus.emit({comp:this,id:this.rootElement.id,value:this.value})}onKupInput(t){this.refreshPickerValue(t.target.value,this.kupInput,!0)}onkupTextFieldSubmit(t){"Enter"===t.key&&this.refreshPickerValue(t.target.value,this.kupTextFieldSubmit)}onKupIconClick(){this.isPickerOpened()?this.closePicker():this.openPicker(),this.kupIconClick.emit({comp:this,id:this.rootElement.id,value:this.value})}listenKeyup(t){this.isPickerOpened()&&("Escape"===t.key&&this.closePicker(),"Enter"===t.key&&this.setPickerValueSelected())}async getValue(){return this.value}async getProps(t){return a(this,f,t)}async refresh(){e(this)}async setFocus(){null!=this.textfieldEl&&this.textfieldEl.focus()}async setValue(t){this.value=t}refreshPickerValue(t,i,e){let s=this.kupManager.math.numberify(t,!0);if(s){let t=s.toString();const h=t.indexOf(".");let n=h>-1?t.substring(0,h):t,o=h>-1?t.substring(h+1):"";for(this.maxIntegers&&n.length>this.maxIntegers&&(n=n.substring(n.length-this.maxIntegers)),this.maxDecimals&&o.length>this.maxDecimals&&(o=o.substring(0,this.maxDecimals));this.maxLength&&n.length+o.length>this.maxLength;)o.length>1?o=o.substring(0,o.length-1):n.length>1&&(n=n.substring(1));t=h>-1?`${n}.${o}`:n,1!=e&&this.setValue(t),null!=i&&i.emit({id:this.rootElement.id,value:t})}}setPickerValueSelected(t){1!=this.disabled&&(null==t&&(t=this.getPickerValueSelected()),this.closePicker(),null!=t&&this.setValue(t))}getPickerValueSelected(){return this.pickerEl.value}getValueForPickerComponent(){return this.value}openPicker(){const t=this.textfieldEl;this.pickerContainerEl.menuVisible=!0;const i=this.pickerContainerEl.style;i.height="auto",i.minWidth=this.textfieldEl.parentElement.clientWidth+"px",null!=t&&t.classList.add("toggled"),this.kupManager.dynamicPosition.isRegistered(this.pickerContainerEl)?this.kupManager.dynamicPosition.changeAnchor(this.pickerContainerEl,this.textfieldEl.parentElement):this.kupManager.dynamicPosition.register(this.pickerContainerEl,this.textfieldEl.parentElement,0,l.AUTO,!0),this.kupManager.dynamicPosition.start(this.pickerContainerEl),this.clickCb||(this.clickCb={cb:()=>{this.closePicker()},el:this.pickerContainerEl}),this.kupManager.addClickCallback(this.clickCb,!0)}closePicker(){if(this.kupManager.removeClickCallback(this.clickCb),!this.isPickerOpened())return;let t=this.textfieldEl;null!=t&&t.classList.remove("toggled"),this.pickerContainerEl.menuVisible=!1,this.kupManager.dynamicPosition.stop(this.pickerContainerEl)}isPickerOpened(){return 1==this.pickerContainerEl.menuVisible}getTextFieldId(){return this.textfieldEl.id}prepTextfield(){this.decimals||this.maxIntegers||(this.maxIntegers=17),!this.decimals||this.maxIntegers||this.maxDecimals||(this.maxIntegers=15,this.maxDecimals=2);const t=this.rootElement.classList.contains("kup-full-height"),i=this.rootElement.classList.contains("kup-full-width"),e=Object.assign({},this.data["kup-text-field"]);return e.icon||(e.icon="calculator"),e.icon&&(e.trailingIcon=!0),s(u,Object.assign({},e,{disabled:this.disabled,fullHeight:t,fullWidth:i,id:this.rootElement.id+"_text-field",value:this.kupManager.math.numbers.toLocaleString(this.value),onBlur:()=>this.onKupBlur(),onChange:t=>this.onKupChange(t),onClearIconClick:()=>this.onKupClearIconClick(),onClick:()=>this.onKupClick(),onFocus:()=>this.onKupFocus(),onIconClick:()=>this.onKupIconClick(),onKeyDown:t=>this.onkupTextFieldSubmit(t),onInput:t=>this.onKupInput(t)}),this.prepPicker())}prepPicker(){return s("kup-card",{ref:t=>this.pickerContainerEl=t,data:{options:{decimals:this.decimals,initialValue:this.value,maxDecimals:this.maxDecimals,maxIntegers:this.maxIntegers,maxLength:this.maxLength,negative:this.negative,resetStatus:!0}},layoutFamily:p.BUILT_IN,layoutNumber:5,sizeX:"300px",sizeY:"auto",isMenu:!0,"onkup-card-click":t=>{null!=t.detail.value&&this.onKupPickerItemClick(t.detail.value)}})}componentWillLoad(){this.kupManager.dates.register(this),this.kupManager.debug.logLoad(this,!1),this.kupManager.theme.register(this),this.value=this.initialValue,this.data||(this.data={"kup-text-field":{}})}componentDidLoad(){this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){const t=this.rootElement.shadowRoot;if(t){const i=t.querySelector(".f-text-field");i&&(this.textfieldEl=i.querySelector("input"),c(i))}this.kupManager.debug.logRender(this,!0)}render(){return s(h,{key:"22a6ef8139d04934008071cfa9f9d395144cf82c"},s("style",{key:"3631b7dedacb5a4732a78a36ab6a4ddd772ae632"},this.kupManager.theme.setKupStyle(this.rootElement)),s("div",{key:"9496502390810c10eb60f5fad738d99ee2cbaef5",id:r},this.prepTextfield()))}disconnectedCallback(){this.kupManager.dates.unregister(this),this.kupManager.theme.unregister(this),this.pickerContainerEl&&this.pickerContainerEl.remove()}get rootElement(){return n(this)}};m.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:var(--kup-label-01-font-size, 12px);line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-compact-01-font-size, 14px);line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-01-font-size, 14px);line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{display:block;font-size:var(--kup-font-size)}.f-text-field{position:relative}:host(.kup-full-height){height:100%}:host(.kup-full-height) #kup-component{height:100%}:host(.kup-full-width){width:100%}:host(.kup-full-width) #kup-component{width:100%}:host(.kup-danger){--kup-textfield-primary-color:var(--kup-danger-color-60);--kup-textfield-primary-color-rgb:var(--kup-danger-color-rgb)}:host(.kup-info){--kup-textfield-primary-color:var(--kup-info-color);--kup-textfield-primary-color-rgb:var(--kup-info-color-rgb)}:host(.kup-secondary){--kup-textfield-primary-color:var(--kup-secondary-color);--kup-textfield-primary-color-rgb:var(--kup-secondary-color-rgb)}:host(.kup-success){--kup-textfield-primary-color:var(--kup-success-color);--kup-textfield-primary-color-rgb:var(--kup-success-color-rgb)}:host(.kup-warning){--kup-textfield-primary-color:var(--kup-warning-color-50);--kup-textfield-primary-color-rgb:var(--kup-warning-color-rgb)}";export{m as kup_numeric_picker}
@@ -1 +1 @@
1
- import{E as e,H as t,D as n,aj as l,x as o,z as r,ak as i,al as s,O as a,Q as u,F as c,am as f,an as d,ao as h,ap as b,aq as m,a9 as p}from"./p-ecf0eb17.js";import{K as v}from"./p-adadf8b5.js";class w extends e{getTextFilterValue(e={},t){return this._getTextFilterValue(e,t,!1)}getTextFilterValueTmp(e={},t){return this._getTextFilterValue(e,t,!0)}_getTextFilterValue(e={},t,n){let l="";if(null==e)return l;let o=e[t];return null==o||(l=n?o.textFieldTmp:o.textField),l}hasFiltersForColumn(e={},t){return this._hasFiltersForColumn(e,t,!1)}hasFiltersForColumnTmp(e={},t){return this._hasFiltersForColumn(e,t,!0)}_hasFiltersForColumn(e={},t,n){if(!t)return!1;let l=this._getTextFilterValue(e,t.name,n);if(null!=l&&""!=l.trim())return!0;let o=this.getCheckBoxFilterValues(e,t.name);return!(null==o||o.length<1)}getCheckBoxFilterValues(e={},t){let n=[];if(null==e)return n;let l=e[t];return null==l||null==l.checkBoxes||(n=l.checkBoxes),n}addCheckboxFilter(t={},n,l){if(null==t)return;let o=Object.assign({textField:"",textFieldTmp:"",checkBoxes:[]},t[n]);null==o.checkBoxes&&(o.checkBoxes=[]),null==l||null==l.value?o.checkBoxes=[]:e.valuesArrayContainsValue(o.checkBoxes,l.value)||(o.checkBoxes=[...o.checkBoxes,l]),t[n]=o}removeCheckboxFilter(e={},t,n){var l;if(!e||null==n||!e[t])return;let o=Object.assign({textField:"",textFieldTmp:"",checkBoxes:[]},e[t]);o.checkBoxes=null!==(l=o.checkBoxes)&&void 0!==l?l:[],o.checkBoxes=o.checkBoxes.filter((e=>e.value!==n)),0===o.checkBoxes.length?delete e[t]:e[t]=o}isColumnNumeric(e){return this.isObjNumeric(e.obj)}setTextFieldFilterValue(e={},t,n){this._setTextFieldFilterValue(e,t,n,!0)}_setTextFieldFilterValue(e={},t,n,l){if(null==e)return;let o=Object.assign({textField:"",textFieldTmp:"",checkBoxes:[]},e[t]);l?o.textFieldTmp=null!=n?n.trim():n:o.textField=null!=n?n.trim():n,e[t]=o}saveTextualFilters(e={},t){this._setTextFieldFilterValue(e,t,this.getTextFilterValueTmp(e,t),!1)}resetTextualFilters(e={},t){this._setTextFieldFilterValue(e,t,this.getTextFilterValue(e,t),!0)}getFilterValueForTooltip(e={},l){let o=this.getTextFilterValue(e,l.name),r=this.getCheckBoxFilterValues(e,l.name),i="",s=t(o,l.obj,l.decimals);""!=o&&(i=" AND "),i="";let a="";return r.forEach((e=>{a+=i+n(e,l),i=" OR "})),""!=a&&(a="("+a+")",""!=s&&(a=" AND "+a)),a=s+a,a}removeFilter(e={},t){delete e[t]}}var F;!function(e){e.asAccordion="When enabled, the first level of depth will give an accordion look to nodes.",e.columns="The columns of the tree when tree visualization is active.",e.customStyle="Custom style of the component.",e.data="The json data used to populate the tree view: the basic, always visible tree nodes.",e.density="The density of the rows, defaults at 'medium' and can also be set to 'dense' or 'wide'.",e.dynamicExpansionCallback="Function that gets invoked when a new set of nodes must be loaded as children of a node. When useDynamicExpansion is set, the tree component will have two different behaviors depending on the value of this prop. If this prop is set to null, no callback to download data is available: the component will emit an event requiring the parent to load the children of the given node. If this prop is set to have a callback, then the component will automatically make requests to load children of a given node. After the load has been completed, a different event will be fired to alert the parent of the change.",e.enableExtraColumns="Enables adding extra columns.",e.expanded="Flag: the nodes of the whole tree must be already expanded upon loading. Disabled nodes do NOT get expanded.",e.expansionMode="Behavior of nodes' expansion: it can be chosen between expanding a node by clicking on the dropdown icon, or by clicking on the whole node.",e.filters="List of filters set by the user.",e.globalFilter="When set to true it activates the global filter.",e.globalFilterValue="The value of the global filter.",e.globalFilterMode="The mode of the global filter.",e.preventXScroll="Experimental feature: when active, the tree will try to prevent horizontal overflowing elements by setting a width on the content of the table cells. It works only on cells of the main column.",e.removableColumns="Sets the possibility to remove the selected column.",e.ripple="When enabled displays Material's ripple effect on nodes (only when no columns are displayed).",e.scrollOnHover="Activates the scroll on hover function.",e.showColumns="Shows the tree data as a table.",e.showFilters="When set to true enables the column filters.",e.showFooter="When set to true shows the footer.",e.showHeader="Flag: shows the header of the tree when the tree is displayed as a table.",e.showIcons="Shows the icons of the nodes.",e.stateId="",e.store="",e.totals="Defines the current totals options.",e.useDynamicExpansion="When the component must use the dynamic expansion feature to open its nodes, it means that not all the nodes of the tree have been passed inside the data property. Therefore, when expanding a node, the tree must emit an event (or run a given callback) and wait for the child nodes to be downloaded from the server."}(F||(F={}));const x="TREE_COLUMN";var g;!function(e){e.DROPDOWN="dropdown",e.NODE="node"}(g||(g={}));const j=document.documentElement,O=j.ketchup?j.ketchup.objects:new r,k=j.ketchup?j.ketchup.data:new i;class y extends e{isFilterCompliantForCell(e,t,n){var l;return!!e&&this.isFilterCompliantForSimpleValue(null!==(l=e.decode)&&void 0!==l?l:e.value,e.obj,t,n)}isFilterCompliantForCellObj(e,t,n){var l;return!!e&&!!e.obj&&this.isFilterCompliantForSimpleValue(null!==(l=e.decode)&&void 0!==l?l:e.value,e.obj,t,n)}isRowCompliant(e,t={},n="",l=!1,o=[],r,i){return this.areCellsCompliant(e.cells,t,n,l,o,r,i)}areCellsCompliant(e,t={},n="",r=!1,i=[],s,a){var u,c;if(r){let t=!0;if(i&&null!=i&&i.length>0){t=!1;let o=this.filterIsNegative(n);for(let s=0;s<i.length;s++){if(!1===i[s].visible&&!a||(null==a?void 0:a.length)>0&&!a.includes(i[s].name))continue;const f=e[i[s].name];if(null==f)continue;t=this.isFilterCompliantForValue(null!==(u=f.decode)&&void 0!==u?u:f.value,n,r);let d=l(i[s],f);if(d!=(null!==(c=f.decode)&&void 0!==c?c:f.value)&&(t=t||this.isFilterCompliantForValue(d,n,r)),1==t&&!o)break;if(0==t&&o)break}}if(!t)return!1}return null==s&&(s=new w),!this.hasFilters(t,i,s)||Object.keys(t).every((n=>{const l=e[n],r=o(i,n);if(!l)return!1;let a=s.getTextFilterValue(t,n),u=s.getCheckBoxFilterValues(t,n);const c=this.filterIsNegative(a);let f=""!==a&&this.isFilterCompliantForCell(l,a,!0)||u.some((e=>this.isFilterCompliantForCell(l,e.value)))||u.some((e=>this.isFilterCompliantForCell(l,e.displayedValue)))||!s.hasFiltersForColumn(t,r),d=c;return O.isNumber(l.obj)||O.isDate(l.obj)||O.isTime(l.obj)||O.isTimestamp(l.obj)||(d=""!==a&&this.isFilterCompliantForCellObj(l,a,!0)||u.some((e=>this.isFilterCompliantForCellObj(l,e.value)))||!s.hasFiltersForColumn(t,r)),c?f&&d:f||d}))}hasFilters(e={},t,n){if(null==e)return!1;let l=Object.keys(e);if(null==l||l.length<1)return!1;null==n&&(n=new w);for(let r=0;r<l.length;r++){let i=l[r],s=null;if(s=i===x?{name:x,title:""}:o(t,i),n.hasFiltersForColumn(e,s))return!0}return!1}filterRows(e=[],t={},n="",l=[],o,r){if(!e||null==e)return[];let i=[];const s=!(!n||!l);if(this.hasFilters(t,l,o)||s)for(let a=0;a<e.length;a++){let u=e[a];(u.id&&u.id.indexOf("insert_")>-1||this.isRowCompliant(u,t,n,s,l,o,r))&&(i[i.length]=u)}else i=[...e];return i}getColumnValues(n,l,o,r){let i=new Array;null==r&&(r=new w);let s=r.getTextFilterValueTmp(n.filters,l.name),a=r.getCheckBoxFilterValues(n.filters,l.name);if(null!=l.valuesForFilter&&l.valuesForFilter.length>0)return l.valuesForFilter.forEach((n=>{let o=n;(e.valuesArrayContainsValue(a,o)||""==s||r.isFilterCompliantForSimpleValue(o,l.obj,s))&&i.push({value:o,displayedValue:t(o,l.obj,l.decimals)})})),i;let u=Object.assign({},n.filters);u[l.name]={textField:s,textFieldTmp:s,checkBoxes:[]};let c=this.filterRows(n.getRows(),u,o,n.getVisibleColumns(),r);for(let e=0;e<a.length;e++)i.push(a[e]);return k.cell.getUnivocalValue({rows:c},l,!0)}}const T=document.documentElement;function C(e=[],t=[]){if(!e||0===e.length)return[];if(e[0].group)return function(e=[],t=[]){if(!e||0===e.length)return[];const n=e[0].group.column;let l=function(e="",t=[]){if(!e||!t||0===t.length)return null;for(let n of t)if(n.column===e)return n;return null}(n,t);return l||(l={column:n,sortMode:p.A}),e.sort(((e,t)=>s({obj:e.group.obj,value:e.group.id,decode:e.group.label},{obj:t.group.obj,value:t.group.id,decode:t.group.label},l.sortMode))),e.forEach((e=>{e.group.children=C(e.group.children,t)})),e}(e,t);if(!t||0===t.length)return e;const n=t.length>1;return e.slice(0).sort(((e,l)=>{if(n){for(let n=0;n<t.length;n++){const o=V(e,l,t[n]);if(0!==o)return o}return 0}return V(e,l,t[0])}))}function V(e,t,n){const l=e.cells[n.column],o=t.cells[n.column];return l||o?l?o?s(l,o,n.sortMode):-1:1:0}function M(e=[],t={},n="",l=[],o,r,i){return null==r&&(r=new y),r.filterRows(e,t,n,l,o,i)}function N(e=[],t=[],n=[],r={}){if(!t)return[];if(!n||0===n.length||!e||0===e.length)return t;const i={},s=n.filter((({column:t})=>{for(let{name:n,title:l}of e)if(n===t)return i[n]=l,!0;return!1}));if(0===s.length)return t;const u=[];let c={};return t.forEach((t=>{const n=s[0].column,f=t.cells[n];if(f){const d=o(e,n),h=l(d,f),b=f.value;let m=null;for(let e of u)if(e.group.label===h){m=e;break}null===m&&(m={group:{id:b,parent:null,column:n,columnLabel:i[n],expanded:!1,label:h,children:[],obj:f.obj,totals:{}},cells:{}},u.push(m));for(let n=1;n<s.length;n++){const r=s[n],a=t.cells[r.column];if(a){const t=o(e,r.column),n=l(t,a),s=a.value;let u=null;for(let e=0;e<m.group.children.length;e++){const t=m.group.children[e];if(t.group.label===n){u=t;break}}u||(u={cells:{},group:{id:s,parent:m,column:r.column,columnLabel:i[r.column],children:[],expanded:!1,label:n,totals:{},obj:a.obj}},L(u),m.group.children.push(u)),m=u}}m.group.children.push(t),function(e,t,n,l){if(!e||!t)return;const o=Object.keys(t);0!==o.length&&o.forEach((o=>{const r=n.cells[o];if(r){const n=T.ketchup.objects.isNumber(r.obj),i=t[o];switch(i){case a.COUNT:let t=e.group.totals[o]||0;e.group.totals[o]=++t;let s=e.group.parent;for(;null!=s;){let e=s.group.totals[o]||0;s.group.totals[o]=++e,s=s.group.parent}break;case a.DISTINCT:let u;if(u=n?T.ketchup.math.numberify(T.ketchup.math.numberifySafe(r.value)):r.value,l[e.group.id]){let t=l[e.group.id][o];t?t.push(u):(l[e.group.id][o]=[],l[e.group.id][o].push(u))}else l[e.group.id]={},l[e.group.id][o]=[],l[e.group.id][o].push(u);let c=e.group.parent;for(;null!=c;){if(l[c.group.id]){let e=l[c.group.id][o];e?e.push(u):(l[c.group.id][o]=[],l[c.group.id][o].push(u))}else l[c.group.id]={},l[c.group.id][o]=[],l[c.group.id][o].push(u);c=c.group.parent}break;case a.SUM:case a.AVERAGE:if(n&&r.value){const t=T.ketchup.math.numberify(T.ketchup.math.numberifySafe(r.value));e.group.totals[o]=t+(e.group.totals[o]||0);let n=e.group.parent;for(;null!=n;){const e=T.ketchup.math.numberify(n.group.totals[o]||0);n.group.totals[o]=t+e,n=n.group.parent}}break;case a.MIN:if(n&&r.value){const t=e.group.totals[o],n=T.ketchup.math.numberify(T.ketchup.math.numberifySafe(r.value));e.group.totals[o]=t?Math.min(t,n):n;let l=e.group.parent;for(;null!=l;){const e=l.group.totals[o];l.group.totals[o]=e?Math.min(e,n):n,l=l.group.parent}}else if(r.value&&T.ketchup.objects.isDate(r.obj)&&T.ketchup.dates.isValidFormattedStringDate(r.value)){const t=e.group.totals[o];if(t){let n=[];n.push(u),n.push(T.ketchup.dates.toDayjs(t)),e.group.totals[o]=T.ketchup.dates.format(T.ketchup.dates.min(n),v.ISO_DATE)}else e.group.totals[o]=T.ketchup.dates.format(u,v.ISO_DATE);let n=e.group.parent;for(;null!=n;){const e=n.group.totals[o];if(e){let t=[];t.push(u),t.push(T.ketchup.dates.toDayjs(e)),n.group.totals[o]=T.ketchup.dates.format(T.ketchup.dates.min(t),v.ISO_DATE)}else n.group.totals[o]=T.ketchup.dates.format(u,v.ISO_DATE);n=n.group.parent}}break;case a.MAX:if(n&&r.value){const t=e.group.totals[o],n=T.ketchup.math.numberify(T.ketchup.math.numberifySafe(r.value));e.group.totals[o]=t?Math.max(t,n):n;let l=e.group.parent;for(;null!=l;){const e=l.group.totals[o];l.group.totals[o]=e?Math.max(e,n):n,l=l.group.parent}}else if(r.value&&T.ketchup.objects.isDate(r.obj)&&T.ketchup.dates.isValidFormattedStringDate(r.value)){const t=e.group.totals[o];if(t){let n=[];n.push(u),n.push(T.ketchup.dates.toDayjs(t)),e.group.totals[o]=T.ketchup.dates.format(T.ketchup.dates.max(n),v.ISO_DATE)}else e.group.totals[o]=T.ketchup.dates.format(u,v.ISO_DATE);let n=e.group.parent;for(;null!=n;){const e=n.group.totals[o];if(e){let t=[];t.push(u),t.push(T.ketchup.dates.toDayjs(e)),n.group.totals[o]=T.ketchup.dates.format(T.ketchup.dates.max(t),v.ISO_DATE)}else n.group.totals[o]=T.ketchup.dates.format(u,v.ISO_DATE);n=n.group.parent}}break;default:0!=i.indexOf(a.MATH)&&console.warn(`invalid total mode: ${i}`)}}}))}(m,r,t,c)}})),function(e,t,n){if(!e||!t)return;const l=Object.keys(t);if(0===e.length||!e[0].group||0===l.length)return;let o=l.filter((e=>a.DISTINCT===t[e]));o.length>0&&e.filter((e=>e.group.children.length>0)).forEach((e=>B(e,o,n)))}(u,r,c),W(u,a.AVERAGE,r),W(u,a.MATH,r),u}function W(e,t,n){if(!e||!n)return;const l=Object.keys(n);if(0===e.length||!e[0].group||0===l.length)return;let o;t==a.AVERAGE&&(o=l.filter((e=>a.AVERAGE===n[e]))),t==a.MATH&&(o=l.filter((e=>0==n[e].indexOf(a.MATH)))),o.length>0&&e.filter((e=>e.group.children.length>0)).forEach((e=>D(e,t,o,n)))}function B(e,t,n){const l=e.group.children;0!==l.length&&(l[0].group&&l.forEach((e=>{B(e,t,n)})),t.forEach((t=>{e.group.totals[t]=new Set(n[e.group.id][t]).size})))}function D(e,t,n,l){const o=e.group.children;if(0===o.length)return 0;let r=0;return o[0].group?o.forEach((e=>{r+=D(e,t,n,l)})):r=o.length,n.forEach((n=>{if(t==a.AVERAGE&&(e.group.totals[n]=e.group.totals[n]/r),t==a.MATH){let t=l[n].substring(a.MATH.length);e.group.totals[n]=T.ketchup.math.formulas.custom(t,e.group.totals)}})),r}function E(e,t){if(t){const n=Object.assign(t);return t.forEach((t=>{e.forEach((e=>{if(t.cells){const n=t.cells[e.name];n&&e.obj&&!n.obj&&(n.obj={t:e.obj.t,p:e.obj.p})}}))})),n}}function A(e,t,n){if(T.ketchup.objects.isEmptyJsObject(n)||T.ketchup.objects.isEmptyJsObject(e))return{};const l={},o=[],r=t.reduce(((t,r)=>{if(!e[r.name])return t;const i=e[r.name];return i===a.COUNT?(l[r.name]=n.length.toString(),t):0===i.indexOf(a.MATH)?(o.push([r.name,i]),t):(t.push({totalOperation:i,totalColumn:r,columnValues:n.map((e=>e.cells[r.name].value))}),t)}),[]);return r||o?(null==r||r.forEach((({totalOperation:e,totalColumn:t,columnValues:o})=>{if(T.ketchup.objects.isNumber(t.obj)){if(e===a.SUM)return void(l[t.name]=o.reduce(((e,t)=>e+T.ketchup.math.numberifySafe(t)),0).toString());if(e===a.AVERAGE)return void(l[t.name]=(o.reduce(((e,t)=>e+T.ketchup.math.numberifySafe(t)),0)/n.length).toString());if(e===a.MIN)return void(l[t.name]=Math.min(...o.map((e=>T.ketchup.math.numberifySafe(e)))).toString());if(e===a.MAX)return void(l[t.name]=Math.max(...o.map((e=>T.ketchup.math.numberifySafe(e)))).toString())}if(T.ketchup.objects.isDate(t.obj)){const n=o.filter((e=>T.ketchup.dates.isIsoDate(e))).map((e=>T.ketchup.dates.toDate(e,v.ISO_DATE)));if(!n)return;if(e===a.MIN)return void(l[t.name]=T.ketchup.dates.format(T.ketchup.dates.min(n),v.ISO_DATE));if(e===a.MAX)return void(l[t.name]=T.ketchup.dates.format(T.ketchup.dates.max(n),v.ISO_DATE))}e===a.DISTINCT&&(l[t.name]=new Set(o).size.toString())})),null==o||o.forEach((([e,t])=>{const n=null==t?void 0:t.replace(u(a.MATH,"g"),"");l[e]=T.ketchup.math.formulas.custom(n,function(e){var t;return Object.fromEntries(null===(t=Object.entries(e))||void 0===t?void 0:t.reduce(((e,[t,n])=>(T.ketchup.math.isNumber(n)&&e.push([t,Number(n)]),e)),[]))}(l)).toString()})),l):l}function L(e){if(!e.group)return;let t=e.group.id,n=e.group.parent;for(;null!==n;)t=`${n.group.id};${t}`,n=n.group.parent;e.group.id=t}function S(e,t,n,l){const o=t*n-n,r=o+Number(n);if(0==l)return e.slice(o,r);let i=[];return _(e,i,o,Number(n),0),i}function _(e,t,n,l,o){let r=!1;for(let i=0;i<e.length;i++){let s=e[i],a=R(e[i]);if(null!=s.group&&null!=s.group.children&&s.group.children.length>0){a.group.children=[];let e=_(s.group.children,a.group.children,n,l,o);o=e.ci,r=e.added,1==r&&(t[t.length]=a)}else o>=n&&(t[t.length]=a,r=!0),o++;if(o>=n+l)break}return{ci:o,added:r}}function R(e){return null==e?null:{id:e.id,cells:Object.assign({},e.cells),actions:e.actions?[...e.actions]:null,group:z(e.group),clonedFrom:e,readOnly:e.readOnly,cssClass:e.cssClass}}function q(e){if(null==e)return null;let t=[];for(let n=0;n<e.length;n++)t[t.length]=R(e[n]);return t}function z(e){return null==e?null:{id:e.id,parent:Object.assign({},e.parent),column:e.column,columnLabel:e.columnLabel,expanded:e.expanded,label:e.label,children:q(e.children),obj:Object.assign({},e.obj),totals:Object.assign({},e.totals)}}function I(e,t,n=!1,l=[]){const o={columns:t.columns.filter((e=>e.visible)),rows:[]};for(const r of t.rows){if(l.includes(r.id)){o.rows.push(r);continue}const t={cells:{},id:r.id};for(const n of o.columns){const l=n.name,o=r.cells[l],i=e.rows.find((e=>e.id===r.id)),s=i?i.cells[l]:null;(!s&&o.value||s&&o.value!==s.value)&&(t.cells[l]=o)}(Object.keys(t.cells).length>0||n)&&o.rows.push(t)}return o}function $(e){var t;null===(t=e.rows)||void 0===t||t.forEach((e=>{Object.keys(e.cells).forEach((t=>{var n;let l=e.cells[t];const o=l.value,r=l.decode,i=l.options;l.isEditable=null!==(n=l.isEditable)&&void 0!==n?n:l.editable;const s={[c.AUTOCOMPLETE]:()=>f(o,"",i,l.data),[c.COMBOBOX]:()=>f(o,"",i,l.data),[c.RADIO]:()=>d(o,i),[c.CHECKBOX]:()=>h(o,""),[c.CHIP]:()=>b(o,r),[c.SWITCH]:()=>m(o,""),[c.MULTI_AUTOCOMPLETE]:()=>b(o,r),[c.MULTI_COMBOBOX]:()=>b(o,r)}[l.shape];s&&(l.data=Object.assign(Object.assign({},s()),l.data))}))}))}export{w as F,g as K,y as a,N as b,A as c,$ as d,F as e,M as f,I as g,E as n,S as p,C as s,x as t}
1
+ import{E as e,H as t,D as n,aj as l,x as o,z as r,ak as i,al as s,O as a,Q as u,F as c,am as f,an as d,ao as h,ap as b,aq as m,a9 as p}from"./p-10a3d9cb.js";import{K as v}from"./p-a78c9d39.js";class w extends e{getTextFilterValue(e={},t){return this._getTextFilterValue(e,t,!1)}getTextFilterValueTmp(e={},t){return this._getTextFilterValue(e,t,!0)}_getTextFilterValue(e={},t,n){let l="";if(null==e)return l;let o=e[t];return null==o||(l=n?o.textFieldTmp:o.textField),l}hasFiltersForColumn(e={},t){return this._hasFiltersForColumn(e,t,!1)}hasFiltersForColumnTmp(e={},t){return this._hasFiltersForColumn(e,t,!0)}_hasFiltersForColumn(e={},t,n){if(!t)return!1;let l=this._getTextFilterValue(e,t.name,n);if(null!=l&&""!=l.trim())return!0;let o=this.getCheckBoxFilterValues(e,t.name);return!(null==o||o.length<1)}getCheckBoxFilterValues(e={},t){let n=[];if(null==e)return n;let l=e[t];return null==l||null==l.checkBoxes||(n=l.checkBoxes),n}addCheckboxFilter(t={},n,l){if(null==t)return;let o=Object.assign({textField:"",textFieldTmp:"",checkBoxes:[]},t[n]);null==o.checkBoxes&&(o.checkBoxes=[]),null==l||null==l.value?o.checkBoxes=[]:e.valuesArrayContainsValue(o.checkBoxes,l.value)||(o.checkBoxes=[...o.checkBoxes,l]),t[n]=o}removeCheckboxFilter(e={},t,n){var l;if(!e||null==n||!e[t])return;let o=Object.assign({textField:"",textFieldTmp:"",checkBoxes:[]},e[t]);o.checkBoxes=null!==(l=o.checkBoxes)&&void 0!==l?l:[],o.checkBoxes=o.checkBoxes.filter((e=>e.value!==n)),0===o.checkBoxes.length?delete e[t]:e[t]=o}isColumnNumeric(e){return this.isObjNumeric(e.obj)}setTextFieldFilterValue(e={},t,n){this._setTextFieldFilterValue(e,t,n,!0)}_setTextFieldFilterValue(e={},t,n,l){if(null==e)return;let o=Object.assign({textField:"",textFieldTmp:"",checkBoxes:[]},e[t]);l?o.textFieldTmp=null!=n?n.trim():n:o.textField=null!=n?n.trim():n,e[t]=o}saveTextualFilters(e={},t){this._setTextFieldFilterValue(e,t,this.getTextFilterValueTmp(e,t),!1)}resetTextualFilters(e={},t){this._setTextFieldFilterValue(e,t,this.getTextFilterValue(e,t),!0)}getFilterValueForTooltip(e={},l){let o=this.getTextFilterValue(e,l.name),r=this.getCheckBoxFilterValues(e,l.name),i="",s=t(o,l.obj,l.decimals);""!=o&&(i=" AND "),i="";let a="";return r.forEach((e=>{a+=i+n(e,l),i=" OR "})),""!=a&&(a="("+a+")",""!=s&&(a=" AND "+a)),a=s+a,a}removeFilter(e={},t){delete e[t]}}var F;!function(e){e.asAccordion="When enabled, the first level of depth will give an accordion look to nodes.",e.columns="The columns of the tree when tree visualization is active.",e.customStyle="Custom style of the component.",e.data="The json data used to populate the tree view: the basic, always visible tree nodes.",e.density="The density of the rows, defaults at 'medium' and can also be set to 'dense' or 'wide'.",e.dynamicExpansionCallback="Function that gets invoked when a new set of nodes must be loaded as children of a node. When useDynamicExpansion is set, the tree component will have two different behaviors depending on the value of this prop. If this prop is set to null, no callback to download data is available: the component will emit an event requiring the parent to load the children of the given node. If this prop is set to have a callback, then the component will automatically make requests to load children of a given node. After the load has been completed, a different event will be fired to alert the parent of the change.",e.enableExtraColumns="Enables adding extra columns.",e.expanded="Flag: the nodes of the whole tree must be already expanded upon loading. Disabled nodes do NOT get expanded.",e.expansionMode="Behavior of nodes' expansion: it can be chosen between expanding a node by clicking on the dropdown icon, or by clicking on the whole node.",e.filters="List of filters set by the user.",e.globalFilter="When set to true it activates the global filter.",e.globalFilterValue="The value of the global filter.",e.globalFilterMode="The mode of the global filter.",e.preventXScroll="Experimental feature: when active, the tree will try to prevent horizontal overflowing elements by setting a width on the content of the table cells. It works only on cells of the main column.",e.removableColumns="Sets the possibility to remove the selected column.",e.ripple="When enabled displays Material's ripple effect on nodes (only when no columns are displayed).",e.scrollOnHover="Activates the scroll on hover function.",e.showColumns="Shows the tree data as a table.",e.showFilters="When set to true enables the column filters.",e.showFooter="When set to true shows the footer.",e.showHeader="Flag: shows the header of the tree when the tree is displayed as a table.",e.showIcons="Shows the icons of the nodes.",e.stateId="",e.store="",e.totals="Defines the current totals options.",e.useDynamicExpansion="When the component must use the dynamic expansion feature to open its nodes, it means that not all the nodes of the tree have been passed inside the data property. Therefore, when expanding a node, the tree must emit an event (or run a given callback) and wait for the child nodes to be downloaded from the server."}(F||(F={}));const x="TREE_COLUMN";var g;!function(e){e.DROPDOWN="dropdown",e.NODE="node"}(g||(g={}));const j=document.documentElement,O=j.ketchup?j.ketchup.objects:new r,k=j.ketchup?j.ketchup.data:new i;class y extends e{isFilterCompliantForCell(e,t,n){var l;return!!e&&this.isFilterCompliantForSimpleValue(null!==(l=e.decode)&&void 0!==l?l:e.value,e.obj,t,n)}isFilterCompliantForCellObj(e,t,n){var l;return!!e&&!!e.obj&&this.isFilterCompliantForSimpleValue(null!==(l=e.decode)&&void 0!==l?l:e.value,e.obj,t,n)}isRowCompliant(e,t={},n="",l=!1,o=[],r,i){return this.areCellsCompliant(e.cells,t,n,l,o,r,i)}areCellsCompliant(e,t={},n="",r=!1,i=[],s,a){var u,c;if(r){let t=!0;if(i&&null!=i&&i.length>0){t=!1;let o=this.filterIsNegative(n);for(let s=0;s<i.length;s++){if(!1===i[s].visible&&!a||(null==a?void 0:a.length)>0&&!a.includes(i[s].name))continue;const f=e[i[s].name];if(null==f)continue;t=this.isFilterCompliantForValue(null!==(u=f.decode)&&void 0!==u?u:f.value,n,r);let d=l(i[s],f);if(d!=(null!==(c=f.decode)&&void 0!==c?c:f.value)&&(t=t||this.isFilterCompliantForValue(d,n,r)),1==t&&!o)break;if(0==t&&o)break}}if(!t)return!1}return null==s&&(s=new w),!this.hasFilters(t,i,s)||Object.keys(t).every((n=>{const l=e[n],r=o(i,n);if(!l)return!1;let a=s.getTextFilterValue(t,n),u=s.getCheckBoxFilterValues(t,n);const c=this.filterIsNegative(a);let f=""!==a&&this.isFilterCompliantForCell(l,a,!0)||u.some((e=>this.isFilterCompliantForCell(l,e.value)))||u.some((e=>this.isFilterCompliantForCell(l,e.displayedValue)))||!s.hasFiltersForColumn(t,r),d=c;return O.isNumber(l.obj)||O.isDate(l.obj)||O.isTime(l.obj)||O.isTimestamp(l.obj)||(d=""!==a&&this.isFilterCompliantForCellObj(l,a,!0)||u.some((e=>this.isFilterCompliantForCellObj(l,e.value)))||!s.hasFiltersForColumn(t,r)),c?f&&d:f||d}))}hasFilters(e={},t,n){if(null==e)return!1;let l=Object.keys(e);if(null==l||l.length<1)return!1;null==n&&(n=new w);for(let r=0;r<l.length;r++){let i=l[r],s=null;if(s=i===x?{name:x,title:""}:o(t,i),n.hasFiltersForColumn(e,s))return!0}return!1}filterRows(e=[],t={},n="",l=[],o,r){if(!e||null==e)return[];let i=[];const s=!(!n||!l);if(this.hasFilters(t,l,o)||s)for(let a=0;a<e.length;a++){let u=e[a];(u.id&&u.id.indexOf("insert_")>-1||this.isRowCompliant(u,t,n,s,l,o,r))&&(i[i.length]=u)}else i=[...e];return i}getColumnValues(n,l,o,r){let i=new Array;null==r&&(r=new w);let s=r.getTextFilterValueTmp(n.filters,l.name),a=r.getCheckBoxFilterValues(n.filters,l.name);if(null!=l.valuesForFilter&&l.valuesForFilter.length>0)return l.valuesForFilter.forEach((n=>{let o=n;(e.valuesArrayContainsValue(a,o)||""==s||r.isFilterCompliantForSimpleValue(o,l.obj,s))&&i.push({value:o,displayedValue:t(o,l.obj,l.decimals)})})),i;let u=Object.assign({},n.filters);u[l.name]={textField:s,textFieldTmp:s,checkBoxes:[]};let c=this.filterRows(n.getRows(),u,o,n.getVisibleColumns(),r);for(let e=0;e<a.length;e++)i.push(a[e]);return k.cell.getUnivocalValue({rows:c},l,!0)}}const T=document.documentElement;function C(e=[],t=[]){if(!e||0===e.length)return[];if(e[0].group)return function(e=[],t=[]){if(!e||0===e.length)return[];const n=e[0].group.column;let l=function(e="",t=[]){if(!e||!t||0===t.length)return null;for(let n of t)if(n.column===e)return n;return null}(n,t);return l||(l={column:n,sortMode:p.A}),e.sort(((e,t)=>s({obj:e.group.obj,value:e.group.id,decode:e.group.label},{obj:t.group.obj,value:t.group.id,decode:t.group.label},l.sortMode))),e.forEach((e=>{e.group.children=C(e.group.children,t)})),e}(e,t);if(!t||0===t.length)return e;const n=t.length>1;return e.slice(0).sort(((e,l)=>{if(n){for(let n=0;n<t.length;n++){const o=V(e,l,t[n]);if(0!==o)return o}return 0}return V(e,l,t[0])}))}function V(e,t,n){const l=e.cells[n.column],o=t.cells[n.column];return l||o?l?o?s(l,o,n.sortMode):-1:1:0}function M(e=[],t={},n="",l=[],o,r,i){return null==r&&(r=new y),r.filterRows(e,t,n,l,o,i)}function N(e=[],t=[],n=[],r={}){if(!t)return[];if(!n||0===n.length||!e||0===e.length)return t;const i={},s=n.filter((({column:t})=>{for(let{name:n,title:l}of e)if(n===t)return i[n]=l,!0;return!1}));if(0===s.length)return t;const u=[];let c={};return t.forEach((t=>{const n=s[0].column,f=t.cells[n];if(f){const d=o(e,n),h=l(d,f),b=f.value;let m=null;for(let e of u)if(e.group.label===h){m=e;break}null===m&&(m={group:{id:b,parent:null,column:n,columnLabel:i[n],expanded:!1,label:h,children:[],obj:f.obj,totals:{}},cells:{}},u.push(m));for(let n=1;n<s.length;n++){const r=s[n],a=t.cells[r.column];if(a){const t=o(e,r.column),n=l(t,a),s=a.value;let u=null;for(let e=0;e<m.group.children.length;e++){const t=m.group.children[e];if(t.group.label===n){u=t;break}}u||(u={cells:{},group:{id:s,parent:m,column:r.column,columnLabel:i[r.column],children:[],expanded:!1,label:n,totals:{},obj:a.obj}},L(u),m.group.children.push(u)),m=u}}m.group.children.push(t),function(e,t,n,l){if(!e||!t)return;const o=Object.keys(t);0!==o.length&&o.forEach((o=>{const r=n.cells[o];if(r){const n=T.ketchup.objects.isNumber(r.obj),i=t[o];switch(i){case a.COUNT:let t=e.group.totals[o]||0;e.group.totals[o]=++t;let s=e.group.parent;for(;null!=s;){let e=s.group.totals[o]||0;s.group.totals[o]=++e,s=s.group.parent}break;case a.DISTINCT:let u;if(u=n?T.ketchup.math.numberify(T.ketchup.math.numberifySafe(r.value)):r.value,l[e.group.id]){let t=l[e.group.id][o];t?t.push(u):(l[e.group.id][o]=[],l[e.group.id][o].push(u))}else l[e.group.id]={},l[e.group.id][o]=[],l[e.group.id][o].push(u);let c=e.group.parent;for(;null!=c;){if(l[c.group.id]){let e=l[c.group.id][o];e?e.push(u):(l[c.group.id][o]=[],l[c.group.id][o].push(u))}else l[c.group.id]={},l[c.group.id][o]=[],l[c.group.id][o].push(u);c=c.group.parent}break;case a.SUM:case a.AVERAGE:if(n&&r.value){const t=T.ketchup.math.numberify(T.ketchup.math.numberifySafe(r.value));e.group.totals[o]=t+(e.group.totals[o]||0);let n=e.group.parent;for(;null!=n;){const e=T.ketchup.math.numberify(n.group.totals[o]||0);n.group.totals[o]=t+e,n=n.group.parent}}break;case a.MIN:if(n&&r.value){const t=e.group.totals[o],n=T.ketchup.math.numberify(T.ketchup.math.numberifySafe(r.value));e.group.totals[o]=t?Math.min(t,n):n;let l=e.group.parent;for(;null!=l;){const e=l.group.totals[o];l.group.totals[o]=e?Math.min(e,n):n,l=l.group.parent}}else if(r.value&&T.ketchup.objects.isDate(r.obj)&&T.ketchup.dates.isValidFormattedStringDate(r.value)){const t=e.group.totals[o];if(t){let n=[];n.push(u),n.push(T.ketchup.dates.toDayjs(t)),e.group.totals[o]=T.ketchup.dates.format(T.ketchup.dates.min(n),v.ISO_DATE)}else e.group.totals[o]=T.ketchup.dates.format(u,v.ISO_DATE);let n=e.group.parent;for(;null!=n;){const e=n.group.totals[o];if(e){let t=[];t.push(u),t.push(T.ketchup.dates.toDayjs(e)),n.group.totals[o]=T.ketchup.dates.format(T.ketchup.dates.min(t),v.ISO_DATE)}else n.group.totals[o]=T.ketchup.dates.format(u,v.ISO_DATE);n=n.group.parent}}break;case a.MAX:if(n&&r.value){const t=e.group.totals[o],n=T.ketchup.math.numberify(T.ketchup.math.numberifySafe(r.value));e.group.totals[o]=t?Math.max(t,n):n;let l=e.group.parent;for(;null!=l;){const e=l.group.totals[o];l.group.totals[o]=e?Math.max(e,n):n,l=l.group.parent}}else if(r.value&&T.ketchup.objects.isDate(r.obj)&&T.ketchup.dates.isValidFormattedStringDate(r.value)){const t=e.group.totals[o];if(t){let n=[];n.push(u),n.push(T.ketchup.dates.toDayjs(t)),e.group.totals[o]=T.ketchup.dates.format(T.ketchup.dates.max(n),v.ISO_DATE)}else e.group.totals[o]=T.ketchup.dates.format(u,v.ISO_DATE);let n=e.group.parent;for(;null!=n;){const e=n.group.totals[o];if(e){let t=[];t.push(u),t.push(T.ketchup.dates.toDayjs(e)),n.group.totals[o]=T.ketchup.dates.format(T.ketchup.dates.max(t),v.ISO_DATE)}else n.group.totals[o]=T.ketchup.dates.format(u,v.ISO_DATE);n=n.group.parent}}break;default:0!=i.indexOf(a.MATH)&&console.warn(`invalid total mode: ${i}`)}}}))}(m,r,t,c)}})),function(e,t,n){if(!e||!t)return;const l=Object.keys(t);if(0===e.length||!e[0].group||0===l.length)return;let o=l.filter((e=>a.DISTINCT===t[e]));o.length>0&&e.filter((e=>e.group.children.length>0)).forEach((e=>B(e,o,n)))}(u,r,c),W(u,a.AVERAGE,r),W(u,a.MATH,r),u}function W(e,t,n){if(!e||!n)return;const l=Object.keys(n);if(0===e.length||!e[0].group||0===l.length)return;let o;t==a.AVERAGE&&(o=l.filter((e=>a.AVERAGE===n[e]))),t==a.MATH&&(o=l.filter((e=>0==n[e].indexOf(a.MATH)))),o.length>0&&e.filter((e=>e.group.children.length>0)).forEach((e=>D(e,t,o,n)))}function B(e,t,n){const l=e.group.children;0!==l.length&&(l[0].group&&l.forEach((e=>{B(e,t,n)})),t.forEach((t=>{e.group.totals[t]=new Set(n[e.group.id][t]).size})))}function D(e,t,n,l){const o=e.group.children;if(0===o.length)return 0;let r=0;return o[0].group?o.forEach((e=>{r+=D(e,t,n,l)})):r=o.length,n.forEach((n=>{if(t==a.AVERAGE&&(e.group.totals[n]=e.group.totals[n]/r),t==a.MATH){let t=l[n].substring(a.MATH.length);e.group.totals[n]=T.ketchup.math.formulas.custom(t,e.group.totals)}})),r}function E(e,t){if(t){const n=Object.assign(t);return t.forEach((t=>{e.forEach((e=>{if(t.cells){const n=t.cells[e.name];n&&e.obj&&!n.obj&&(n.obj={t:e.obj.t,p:e.obj.p})}}))})),n}}function A(e,t,n){if(T.ketchup.objects.isEmptyJsObject(n)||T.ketchup.objects.isEmptyJsObject(e))return{};const l={},o=[],r=t.reduce(((t,r)=>{if(!e[r.name])return t;const i=e[r.name];return i===a.COUNT?(l[r.name]=n.length.toString(),t):0===i.indexOf(a.MATH)?(o.push([r.name,i]),t):(t.push({totalOperation:i,totalColumn:r,columnValues:n.map((e=>e.cells[r.name].value))}),t)}),[]);return r||o?(null==r||r.forEach((({totalOperation:e,totalColumn:t,columnValues:o})=>{if(T.ketchup.objects.isNumber(t.obj)){if(e===a.SUM)return void(l[t.name]=o.reduce(((e,t)=>e+T.ketchup.math.numberifySafe(t)),0).toString());if(e===a.AVERAGE)return void(l[t.name]=(o.reduce(((e,t)=>e+T.ketchup.math.numberifySafe(t)),0)/n.length).toString());if(e===a.MIN)return void(l[t.name]=Math.min(...o.map((e=>T.ketchup.math.numberifySafe(e)))).toString());if(e===a.MAX)return void(l[t.name]=Math.max(...o.map((e=>T.ketchup.math.numberifySafe(e)))).toString())}if(T.ketchup.objects.isDate(t.obj)){const n=o.filter((e=>T.ketchup.dates.isIsoDate(e))).map((e=>T.ketchup.dates.toDate(e,v.ISO_DATE)));if(!n)return;if(e===a.MIN)return void(l[t.name]=T.ketchup.dates.format(T.ketchup.dates.min(n),v.ISO_DATE));if(e===a.MAX)return void(l[t.name]=T.ketchup.dates.format(T.ketchup.dates.max(n),v.ISO_DATE))}e===a.DISTINCT&&(l[t.name]=new Set(o).size.toString())})),null==o||o.forEach((([e,t])=>{const n=null==t?void 0:t.replace(u(a.MATH,"g"),"");l[e]=T.ketchup.math.formulas.custom(n,function(e){var t;return Object.fromEntries(null===(t=Object.entries(e))||void 0===t?void 0:t.reduce(((e,[t,n])=>(T.ketchup.math.isNumber(n)&&e.push([t,Number(n)]),e)),[]))}(l)).toString()})),l):l}function L(e){if(!e.group)return;let t=e.group.id,n=e.group.parent;for(;null!==n;)t=`${n.group.id};${t}`,n=n.group.parent;e.group.id=t}function S(e,t,n,l){const o=t*n-n,r=o+Number(n);if(0==l)return e.slice(o,r);let i=[];return _(e,i,o,Number(n),0),i}function _(e,t,n,l,o){let r=!1;for(let i=0;i<e.length;i++){let s=e[i],a=R(e[i]);if(null!=s.group&&null!=s.group.children&&s.group.children.length>0){a.group.children=[];let e=_(s.group.children,a.group.children,n,l,o);o=e.ci,r=e.added,1==r&&(t[t.length]=a)}else o>=n&&(t[t.length]=a,r=!0),o++;if(o>=n+l)break}return{ci:o,added:r}}function R(e){return null==e?null:{id:e.id,cells:Object.assign({},e.cells),actions:e.actions?[...e.actions]:null,group:z(e.group),clonedFrom:e,readOnly:e.readOnly,cssClass:e.cssClass}}function q(e){if(null==e)return null;let t=[];for(let n=0;n<e.length;n++)t[t.length]=R(e[n]);return t}function z(e){return null==e?null:{id:e.id,parent:Object.assign({},e.parent),column:e.column,columnLabel:e.columnLabel,expanded:e.expanded,label:e.label,children:q(e.children),obj:Object.assign({},e.obj),totals:Object.assign({},e.totals)}}function I(e,t,n=!1,l=[]){const o={columns:t.columns.filter((e=>e.visible)),rows:[]};for(const r of t.rows){if(l.includes(r.id)){o.rows.push(r);continue}const t={cells:{},id:r.id};for(const n of o.columns){const l=n.name,o=r.cells[l],i=e.rows.find((e=>e.id===r.id)),s=i?i.cells[l]:null;(!s&&o.value||s&&o.value!==s.value)&&(t.cells[l]=o)}(Object.keys(t.cells).length>0||n)&&o.rows.push(t)}return o}function $(e){var t;null===(t=e.rows)||void 0===t||t.forEach((e=>{Object.keys(e.cells).forEach((t=>{var n;let l=e.cells[t];const o=l.value,r=l.decode,i=l.options;l.isEditable=null!==(n=l.isEditable)&&void 0!==n?n:l.editable;const s={[c.AUTOCOMPLETE]:()=>f(o,"",i,l.data),[c.COMBOBOX]:()=>f(o,"",i,l.data),[c.RADIO]:()=>d(o,i),[c.CHECKBOX]:()=>h(o,""),[c.CHIP]:()=>b(o,r),[c.SWITCH]:()=>m(o,""),[c.MULTI_AUTOCOMPLETE]:()=>b(o,r),[c.MULTI_COMBOBOX]:()=>b(o,r)}[l.shape];s&&(l.data=Object.assign(Object.assign({},s()),l.data))}))}))}export{w as F,g as K,y as a,N as b,A as c,$ as d,F as e,M as f,I as g,E as n,S as p,C as s,x as t}
@@ -1 +1 @@
1
- import{r as t,c as i,f as e,h as n,F as a,H as o,d as r}from"./p-710d0a7d.js";import{k as s,g as l,s as p,h as m,aj as c}from"./p-ecf0eb17.js";import{c as h}from"./p-635bb4b3.js";import{F as f}from"./p-cce08de3.js";import{s as d}from"./p-060ec8ef.js";import"./p-adadf8b5.js";var u,g;!function(t){t.data="Dataset containing the activities list",t.dateColumn="Column containing dates",t.timeColumn="Column containing times",t.sort="Order for sorting"}(u||(u={})),function(t){t.onClick="onClick",t.onRightClick="onRightClick"}(g||(g={}));var x,v,y,k=function(t,i,e,n){if("a"===e&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof i?t!==i||!n:!i.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===e?n:"a"===e?n.call(t):n?n.value:i.get(t)};const w=class{constructor(e){t(this,e),this.kupClick=i(this,"kup-activitytimeline-click",6),this.kupContextMenu=i(this,"kup-activitytimeline-contextmenu",6),this.kupReady=i(this,"kup-activitytimeline-ready",6),x.add(this),v.set(this,s()),this.timeline=[],this.data=void 0,this.dateColumn=void 0,this.sort=[],this.timeColumn=void 0}async getProps(t){return l(this,u,t)}async refresh(){e(this)}async setProps(t){p(this,u,t)}getActivity(t){return{column:this.data.columns.find((i=>i.name===t.columnName)),row:this.data.rows.find((i=>i.id===t.rowId))}}onActivityClick(t,i){this.kupClick.emit({comp:this,id:this.rootElement.id,details:Object.assign(Object.assign({},this.getActivity(i)),{originalEvent:t,type:g.onClick})})}onActivityContextMenu(t,i){this.kupContextMenu.emit({comp:this,id:this.rootElement.id,details:Object.assign(Object.assign({},this.getActivity(i)),{originalEvent:t,type:g.onRightClick})})}activityItem(t){return n("div",{class:"atm-row"},t.cells.map((t=>{var i;return n("div",{class:"atm-col"},n("div",{class:"atm-inner-col"},n("h3",null,t.title,":")),n("div",{class:"atm-inner-col",onClick:i=>{i.stopPropagation(),this.onActivityClick(i,t)},onContextMenu:i=>{this.onActivityContextMenu(i,t)}},n("p",null,null!==(i=t.decode)&&void 0!==i?i:t.value)))})))}calendarIcon(){return n(f,{color:"white",resource:"calendar",wrapperClass:"activity-timeline-item__icon",sizeX:"20px",sizeY:"32px"})}componentWillLoad(){k(this,v,"f").debug.logLoad(this,!1),k(this,v,"f").theme.register(this)}componentDidLoad(){this.kupReady.emit({comp:this,id:this.rootElement.id}),k(this,v,"f").debug.logLoad(this,!0)}componentWillRender(){k(this,v,"f").debug.logRender(this,!1)}componentDidRender(){k(this,v,"f").debug.logRender(this,!0)}render(){var t,i;if(!Boolean(!(null===(t=this.data)||void 0===t?void 0:t.columns)||!(null===(i=this.data)||void 0===i?void 0:i.rows)))return this.timeline=k(this,x,"m",y).call(this,this.data),n(o,null,n("style",null,k(this,v,"f").theme.setKupStyle(this.rootElement)),n("div",{id:h},n("div",{key:this.rootElement.id,class:"kup-activity-timeline",onContextMenu:t=>{t.preventDefault()}},this.timeline.map((t=>n("div",{class:"atm-container",key:t.date},n("div",{class:"atm-event"},n("div",{class:"atm-icon-wrapper"},n("div",{class:"atm-thumb"},this.calendarIcon())),n("div",{class:"atm-content"},n("div",null,n("h3",null,n("span",null,t.date))),t.activities.map((t=>n(a,null,this.activityItem(t))))))))))));k(this,v,"f").debug.logMessage(this,"Empty data.",m.WARNING)}disconnectedCallback(){k(this,v,"f").theme.unregister(this)}get rootElement(){return r(this)}};v=new WeakMap,x=new WeakSet,y=function(t){const{columns:i,rows:e}=t;if(!e)return k(this,v,"f").debug.logMessage(this,"Empty rows",m.ERROR),[];const n=i.find((t=>k(this,v,"f").objects.isDate(t.obj)&&t.name===this.dateColumn)),a=i.find((t=>k(this,v,"f").objects.isTime(t.obj)&&t.name===this.timeColumn));if(!n&&!a)return k(this,v,"f").debug.logMessage(this,'At least one of "dateColumn" or "timeColumn" must be set and exist in the dataset',m.ERROR),[];const o=this.sort.filter((({column:t})=>i.some((i=>i.name===t)))),r=d(e,o).reduce(((t,e)=>(t[`${n?c(n,e.cells[n.name]):""} ${a?c(a,e.cells[a.name]):""}`.trim()].push({cells:i.filter((t=>t.visible)).map((t=>({title:t.title,value:c(t,e.cells[t.name]),columnName:t.name,rowId:e.id})))}),t)),new Proxy({},{get:(t,i)=>{var e;return null!==(e=t[i])&&void 0!==e?e:t[i]=[]}}));return Object.entries(r).map((([t,i])=>({date:t,activities:i})))},w.style='.kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:var(--kup-label-01-font-size, 12px);line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-compact-01-font-size, 14px);line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-01-font-size, 14px);line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}.atm-container{color:var(--kup-gray-color-70)}.atm-container.clickable{cursor:pointer}.atm-container .atm-event{margin-bottom:10px;padding-bottom:25px;display:flex;position:relative;width:100%}.atm-container .atm-event:after{content:"";display:inline-block;width:1px;left:15px;position:absolute;top:0;bottom:0;z-index:1;background:var(--kup-primary-color)}.atm-container .atm-event .atm-icon-wrapper{margin-top:10px}.atm-container .atm-event .atm-thumb{background:var(--kup-primary-color);display:inline-block;vertical-align:top;width:32px;height:32px;border:none;border-radius:var(--kup-radius-00);text-align:center;z-index:10;position:relative;border-bottom-width:2px}.atm-container .atm-event .atm-thumb>span.-atm-icon{vertical-align:middle;line-height:32px;color:white;font-size:20px}.atm-container .atm-event .atm-content{display:inline-block;padding:0 6px 0 10px;vertical-align:top;width:calc(100% - 45px)}.atm-container .atm-event .atm-content .atm-content-header h3.atm-title{margin:0;font-size:15px;line-height:16px;float:left;width:calc(100% - 100px)}.atm-container .atm-event .atm-content .atm-content-header .atm-datetime{font-style:italic;font-size:11px;line-height:16px;float:right;width:100px;text-align:right}.atm-container .atm-event .atm-content .atm-row{max-width:calc(100% - 30px);width:100%;display:grid;grid-template-columns:repeat(8, 1fr);grid-gap:0px 0px;padding-bottom:10px}.atm-container .atm-event .atm-content .atm-row .atm-col{display:flex;align-items:baseline;justify-content:center;gap:3px;width:100%}.atm-container .atm-event .atm-content .atm-row .atm-col .atm-inner-col{width:50%}.atm-container .atm-event .atm-content .atm-row .atm-col .atm-inner-col h3{margin-bottom:7px;font-size:12px;word-break:break-word;padding-right:6px;font-weight:400}.atm-container .atm-event .atm-content .atm-row .atm-col .atm-inner-col p{font-size:12px;word-break:break-word;text-decoration:underline;color:var(--kup-primary-color);cursor:pointer}@media (max-width: 1799px){.atm-container .atm-event .atm-content .atm-row{grid-template-columns:repeat(4, 1fr)}.atm-container .atm-event .atm-content .atm-row .atm-col{justify-content:start}}@media (max-width: 1365px){.atm-container .atm-event .atm-content .atm-row{grid-template-columns:repeat(3, 1fr)}}@media (max-width: 991px){.atm-container .atm-event .atm-content .atm-row{grid-template-columns:repeat(2, 1fr)}}@media (max-width: 575px){.atm-container .atm-event .atm-content .atm-row{grid-template-columns:repeat(1, 1fr)}}';export{w as kup_activity_timeline}
1
+ import{r as t,c as i,f as e,h as n,F as a,H as o,d as r}from"./p-710d0a7d.js";import{k as s,g as l,s as p,h as m,aj as c}from"./p-10a3d9cb.js";import{c as h}from"./p-635bb4b3.js";import{F as f}from"./p-cce08de3.js";import{s as d}from"./p-85a956cd.js";import"./p-a78c9d39.js";var u,g;!function(t){t.data="Dataset containing the activities list",t.dateColumn="Column containing dates",t.timeColumn="Column containing times",t.sort="Order for sorting"}(u||(u={})),function(t){t.onClick="onClick",t.onRightClick="onRightClick"}(g||(g={}));var x,v,y,k=function(t,i,e,n){if("a"===e&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof i?t!==i||!n:!i.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===e?n:"a"===e?n.call(t):n?n.value:i.get(t)};const w=class{constructor(e){t(this,e),this.kupClick=i(this,"kup-activitytimeline-click",6),this.kupContextMenu=i(this,"kup-activitytimeline-contextmenu",6),this.kupReady=i(this,"kup-activitytimeline-ready",6),x.add(this),v.set(this,s()),this.timeline=[],this.data=void 0,this.dateColumn=void 0,this.sort=[],this.timeColumn=void 0}async getProps(t){return l(this,u,t)}async refresh(){e(this)}async setProps(t){p(this,u,t)}getActivity(t){return{column:this.data.columns.find((i=>i.name===t.columnName)),row:this.data.rows.find((i=>i.id===t.rowId))}}onActivityClick(t,i){this.kupClick.emit({comp:this,id:this.rootElement.id,details:Object.assign(Object.assign({},this.getActivity(i)),{originalEvent:t,type:g.onClick})})}onActivityContextMenu(t,i){this.kupContextMenu.emit({comp:this,id:this.rootElement.id,details:Object.assign(Object.assign({},this.getActivity(i)),{originalEvent:t,type:g.onRightClick})})}activityItem(t){return n("div",{class:"atm-row"},t.cells.map((t=>{var i;return n("div",{class:"atm-col"},n("div",{class:"atm-inner-col"},n("h3",null,t.title,":")),n("div",{class:"atm-inner-col",onClick:i=>{i.stopPropagation(),this.onActivityClick(i,t)},onContextMenu:i=>{this.onActivityContextMenu(i,t)}},n("p",null,null!==(i=t.decode)&&void 0!==i?i:t.value)))})))}calendarIcon(){return n(f,{color:"white",resource:"calendar",wrapperClass:"activity-timeline-item__icon",sizeX:"20px",sizeY:"32px"})}componentWillLoad(){k(this,v,"f").debug.logLoad(this,!1),k(this,v,"f").theme.register(this)}componentDidLoad(){this.kupReady.emit({comp:this,id:this.rootElement.id}),k(this,v,"f").debug.logLoad(this,!0)}componentWillRender(){k(this,v,"f").debug.logRender(this,!1)}componentDidRender(){k(this,v,"f").debug.logRender(this,!0)}render(){var t,i;if(!Boolean(!(null===(t=this.data)||void 0===t?void 0:t.columns)||!(null===(i=this.data)||void 0===i?void 0:i.rows)))return this.timeline=k(this,x,"m",y).call(this,this.data),n(o,null,n("style",null,k(this,v,"f").theme.setKupStyle(this.rootElement)),n("div",{id:h},n("div",{key:this.rootElement.id,class:"kup-activity-timeline",onContextMenu:t=>{t.preventDefault()}},this.timeline.map((t=>n("div",{class:"atm-container",key:t.date},n("div",{class:"atm-event"},n("div",{class:"atm-icon-wrapper"},n("div",{class:"atm-thumb"},this.calendarIcon())),n("div",{class:"atm-content"},n("div",null,n("h3",null,n("span",null,t.date))),t.activities.map((t=>n(a,null,this.activityItem(t))))))))))));k(this,v,"f").debug.logMessage(this,"Empty data.",m.WARNING)}disconnectedCallback(){k(this,v,"f").theme.unregister(this)}get rootElement(){return r(this)}};v=new WeakMap,x=new WeakSet,y=function(t){const{columns:i,rows:e}=t;if(!e)return k(this,v,"f").debug.logMessage(this,"Empty rows",m.ERROR),[];const n=i.find((t=>k(this,v,"f").objects.isDate(t.obj)&&t.name===this.dateColumn)),a=i.find((t=>k(this,v,"f").objects.isTime(t.obj)&&t.name===this.timeColumn));if(!n&&!a)return k(this,v,"f").debug.logMessage(this,'At least one of "dateColumn" or "timeColumn" must be set and exist in the dataset',m.ERROR),[];const o=this.sort.filter((({column:t})=>i.some((i=>i.name===t)))),r=d(e,o).reduce(((t,e)=>(t[`${n?c(n,e.cells[n.name]):""} ${a?c(a,e.cells[a.name]):""}`.trim()].push({cells:i.filter((t=>t.visible)).map((t=>({title:t.title,value:c(t,e.cells[t.name]),columnName:t.name,rowId:e.id})))}),t)),new Proxy({},{get:(t,i)=>{var e;return null!==(e=t[i])&&void 0!==e?e:t[i]=[]}}));return Object.entries(r).map((([t,i])=>({date:t,activities:i})))},w.style='.kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:var(--kup-label-01-font-size, 12px);line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-compact-01-font-size, 14px);line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-01-font-size, 14px);line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}.atm-container{color:var(--kup-gray-color-70)}.atm-container.clickable{cursor:pointer}.atm-container .atm-event{margin-bottom:10px;padding-bottom:25px;display:flex;position:relative;width:100%}.atm-container .atm-event:after{content:"";display:inline-block;width:1px;left:15px;position:absolute;top:0;bottom:0;z-index:1;background:var(--kup-primary-color)}.atm-container .atm-event .atm-icon-wrapper{margin-top:10px}.atm-container .atm-event .atm-thumb{background:var(--kup-primary-color);display:inline-block;vertical-align:top;width:32px;height:32px;border:none;border-radius:var(--kup-radius-00);text-align:center;z-index:10;position:relative;border-bottom-width:2px}.atm-container .atm-event .atm-thumb>span.-atm-icon{vertical-align:middle;line-height:32px;color:white;font-size:20px}.atm-container .atm-event .atm-content{display:inline-block;padding:0 6px 0 10px;vertical-align:top;width:calc(100% - 45px)}.atm-container .atm-event .atm-content .atm-content-header h3.atm-title{margin:0;font-size:15px;line-height:16px;float:left;width:calc(100% - 100px)}.atm-container .atm-event .atm-content .atm-content-header .atm-datetime{font-style:italic;font-size:11px;line-height:16px;float:right;width:100px;text-align:right}.atm-container .atm-event .atm-content .atm-row{max-width:calc(100% - 30px);width:100%;display:grid;grid-template-columns:repeat(8, 1fr);grid-gap:0px 0px;padding-bottom:10px}.atm-container .atm-event .atm-content .atm-row .atm-col{display:flex;align-items:baseline;justify-content:center;gap:3px;width:100%}.atm-container .atm-event .atm-content .atm-row .atm-col .atm-inner-col{width:50%}.atm-container .atm-event .atm-content .atm-row .atm-col .atm-inner-col h3{margin-bottom:7px;font-size:12px;word-break:break-word;padding-right:6px;font-weight:400}.atm-container .atm-event .atm-content .atm-row .atm-col .atm-inner-col p{font-size:12px;word-break:break-word;text-decoration:underline;color:var(--kup-primary-color);cursor:pointer}@media (max-width: 1799px){.atm-container .atm-event .atm-content .atm-row{grid-template-columns:repeat(4, 1fr)}.atm-container .atm-event .atm-content .atm-row .atm-col{justify-content:start}}@media (max-width: 1365px){.atm-container .atm-event .atm-content .atm-row{grid-template-columns:repeat(3, 1fr)}}@media (max-width: 991px){.atm-container .atm-event .atm-content .atm-row{grid-template-columns:repeat(2, 1fr)}}@media (max-width: 575px){.atm-container .atm-event .atm-content .atm-row{grid-template-columns:repeat(1, 1fr)}}';export{w as kup_activity_timeline}
@@ -1 +1 @@
1
- var t,e,n,r,i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function s(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}!function(t){t.CHINESE="cn",t.ENGLISH="en",t.FRENCH="fr",t.ITALIAN="it",t.POLISH="pl",t.RUSSIAN="ru",t.SPANISH="es"}(t||(t={})),function(t){t.NUMERIC="numeric",t.DIGIT2="2-digit",t.LONG="long",t.SHORT="short",t.NARROW="narrow"}(e||(e={})),function(t){t.ISO_DATE="YYYY-MM-DD",t.ISO_DATE_TIME="YYYY-MM-DD HH:mm:ss",t.ISO_TIME="HH:mm:ss",t.ISO_TIME_WITHOUT_SECONDS="HH:mm"}(n||(n={})),function(t){t.ASC="asc",t.DESC="desc"}(r||(r={}));var a={exports:{}};a.exports=function(){var t=6e4,e=36e5,n="millisecond",r="second",i="minute",s="hour",a="day",u="week",o="month",c="quarter",h="year",_="date",d="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return"["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},Y=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},l={s:Y,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?"+":"-")+Y(r,2,"0")+":"+Y(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,o),s=n-i<0,a=e.clone().add(r+(s?-1:1),o);return+(-(r+(n-i)/(s?i-a:a-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:o,y:h,w:u,d:a,D:_,h:s,m:i,s:r,ms:n,Q:c}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},v="en",D={};D[v]=M;var g="$isDayjsObject",y=function(t){return t instanceof S||!(!t||!t[g])},w=function t(e,n,r){var i;if(!e)return v;if("string"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var a=e.split("-");if(!i&&a.length>1)return t(a[0])}else{var u=e.name;D[u]=e,i=u}return!r&&i&&(v=i),i||!r&&v},L=function(t,e){if(y(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new S(n)},p=l;p.l=w,p.i=y,p.w=function(t,e){return L(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var S=function(){function M(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[g]=!0}var Y=M.prototype;return Y.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(p.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(f);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init()},Y.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},Y.$utils=function(){return p},Y.isValid=function(){return!(this.$d.toString()===d)},Y.isSame=function(t,e){var n=L(t);return this.startOf(e)<=n&&n<=this.endOf(e)},Y.isAfter=function(t,e){return L(t)<this.startOf(e)},Y.isBefore=function(t,e){return this.endOf(e)<L(t)},Y.$g=function(t,e,n){return p.u(t)?this[e]:this.set(n,t)},Y.unix=function(){return Math.floor(this.valueOf()/1e3)},Y.valueOf=function(){return this.$d.getTime()},Y.startOf=function(t,e){var n=this,c=!!p.u(e)||e,d=p.p(t),f=function(t,e){var r=p.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return c?r:r.endOf(a)},m=function(t,e){return p.w(n.toDate()[t].apply(n.toDate("s"),(c?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},M=this.$W,Y=this.$M,l=this.$D,v="set"+(this.$u?"UTC":"");switch(d){case h:return c?f(1,0):f(31,11);case o:return c?f(1,Y):f(0,Y+1);case u:var D=this.$locale().weekStart||0,g=(M<D?M+7:M)-D;return f(c?l-g:l+(6-g),Y);case a:case _:return m(v+"Hours",0);case s:return m(v+"Minutes",1);case i:return m(v+"Seconds",2);case r:return m(v+"Milliseconds",3);default:return this.clone()}},Y.endOf=function(t){return this.startOf(t,!1)},Y.$set=function(t,e){var u,c=p.p(t),d="set"+(this.$u?"UTC":""),f=(u={},u[a]=d+"Date",u[_]=d+"Date",u[o]=d+"Month",u[h]=d+"FullYear",u[s]=d+"Hours",u[i]=d+"Minutes",u[r]=d+"Seconds",u[n]=d+"Milliseconds",u)[c],m=c===a?this.$D+(e-this.$W):e;if(c===o||c===h){var M=this.clone().set(_,1);M.$d[f](m),M.init(),this.$d=M.set(_,Math.min(this.$D,M.daysInMonth())).$d}else f&&this.$d[f](m);return this.init(),this},Y.set=function(t,e){return this.clone().$set(t,e)},Y.get=function(t){return this[p.p(t)]()},Y.add=function(n,c){var _,d=this;n=Number(n);var f=p.p(c),m=function(t){var e=L(d);return p.w(e.date(e.date()+Math.round(t*n)),d)};if(f===o)return this.set(o,this.$M+n);if(f===h)return this.set(h,this.$y+n);if(f===a)return m(1);if(f===u)return m(7);var M=(_={},_[i]=t,_[s]=e,_[r]=1e3,_)[f]||1,Y=this.$d.getTime()+n*M;return p.w(Y,this)},Y.subtract=function(t,e){return this.add(-1*t,e)},Y.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||d;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=p.z(this),s=this.$H,a=this.$m,u=this.$M,o=n.weekdays,c=n.months,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},_=function(t){return p.s(s%12||12,t,"0")},f=n.meridiem||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(m,(function(t,r){return r||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return p.s(e.$y,4,"0");case"M":return u+1;case"MM":return p.s(u+1,2,"0");case"MMM":return h(n.monthsShort,u,c,3);case"MMMM":return h(c,u);case"D":return e.$D;case"DD":return p.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return h(n.weekdaysMin,e.$W,o,2);case"ddd":return h(n.weekdaysShort,e.$W,o,3);case"dddd":return o[e.$W];case"H":return String(s);case"HH":return p.s(s,2,"0");case"h":return _(1);case"hh":return _(2);case"a":return f(s,a,!0);case"A":return f(s,a,!1);case"m":return String(a);case"mm":return p.s(a,2,"0");case"s":return String(e.$s);case"ss":return p.s(e.$s,2,"0");case"SSS":return p.s(e.$ms,3,"0");case"Z":return i}return null}(t)||i.replace(":","")}))},Y.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},Y.diff=function(n,_,d){var f,m=this,M=p.p(_),Y=L(n),l=(Y.utcOffset()-this.utcOffset())*t,v=this-Y,D=function(){return p.m(m,Y)};switch(M){case h:f=D()/12;break;case o:f=D();break;case c:f=D()/3;break;case u:f=(v-l)/6048e5;break;case a:f=(v-l)/864e5;break;case s:f=v/e;break;case i:f=v/t;break;case r:f=v/1e3;break;default:f=v}return d?f:p.a(f)},Y.daysInMonth=function(){return this.endOf(o).$D},Y.$locale=function(){return D[this.$L]},Y.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=w(t,e,!0);return r&&(n.$L=r),n},Y.clone=function(){return p.w(this.$d,this)},Y.toDate=function(){return new Date(this.valueOf())},Y.toJSON=function(){return this.isValid()?this.toISOString():null},Y.toISOString=function(){return this.$d.toISOString()},Y.toString=function(){return this.$d.toUTCString()},M}(),b=S.prototype;return L.prototype=b,[["$ms",n],["$s",r],["$m",i],["$H",s],["$W",a],["$M",o],["$y",h],["$D",_]].forEach((function(t){b[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),L.extend=function(t,e){return t.$i||(t(e,S,L),t.$i=!0),L},L.locale=w,L.isDayjs=y,L.unix=function(t){return L(1e3*t)},L.en=D[v],L.Ls=D,L.p={},L}();const u=a.exports;var o,c,h;const _={exports:{}}.exports=(o="minute",c=/[+-]\d\d(?::?\d\d)?/g,h=/([+-]|\d\d)/g,function(t,e,n){var r=e.prototype;n.utc=function(t){return new e({date:t,utc:!0,args:arguments})},r.utc=function(t){var e=n(this.toDate(),{locale:this.$L,utc:!0});return t?e.add(this.utcOffset(),o):e},r.local=function(){return n(this.toDate(),{locale:this.$L,utc:!1})};var i=r.parse;r.parse=function(t){t.utc&&(this.$u=!0),this.$utils().u(t.$offset)||(this.$offset=t.$offset),i.call(this,t)};var s=r.init;r.init=function(){if(this.$u){var t=this.$d;this.$y=t.getUTCFullYear(),this.$M=t.getUTCMonth(),this.$D=t.getUTCDate(),this.$W=t.getUTCDay(),this.$H=t.getUTCHours(),this.$m=t.getUTCMinutes(),this.$s=t.getUTCSeconds(),this.$ms=t.getUTCMilliseconds()}else s.call(this)};var a=r.utcOffset;r.utcOffset=function(t,e){var n=this.$utils().u;if(n(t))return this.$u?0:n(this.$offset)?a.call(this):this.$offset;if("string"==typeof t&&(t=function(t){void 0===t&&(t="");var e=t.match(c);if(!e)return null;var n=(""+e[0]).match(h)||["-",0,0],r=60*+n[1]+ +n[2];return 0===r?0:"+"===n[0]?r:-r}(t),null===t))return this;var r=Math.abs(t)<=16?60*t:t;if(0===r)return this.utc(e);var i=this.clone();if(e)return i.$offset=r,i.$u=!1,i;var s=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(i=this.local().add(r+s,o)).$offset=r,i.$x.$localOffset=s,i};var u=r.format;r.format=function(t){return u.call(this,t||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":""))},r.valueOf=function(){var t=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*t},r.isUTC=function(){return!!this.$u},r.toISOString=function(){return this.toDate().toISOString()},r.toString=function(){return this.toDate().toUTCString()};var _=r.toDate;r.toDate=function(t){return"s"===t&&this.$offset?n(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():_.call(this)};var d=r.diff;r.diff=function(t,e,r){if(t&&this.$u===t.$u)return d.call(this,t,e,r);var i=this.local(),s=n(t).local();return d.call(i,s,e,r)}});var d={exports:{}};d.exports=function(){var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},e=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,i=/\d\d?/,s=/\d*[^-_:/,()\s\d]+/,a={},u=function(t){return(t=+t)+(t>68?1900:2e3)},o=function(t){return function(e){this[t]=+e}},c=[/[+-]\d\d:?(\d\d)?|Z/,function(t){(this.zone||(this.zone={})).offset=function(t){if(!t)return 0;if("Z"===t)return 0;var e=t.match(/([+-]|\d\d)/g),n=60*e[1]+(+e[2]||0);return 0===n?0:"+"===e[0]?-n:n}(t)}],h=function(t){var e=a[t];return e&&(e.indexOf?e:e.s.concat(e.f))},_=function(t,e){var n,r=a.meridiem;if(r){for(var i=1;i<=24;i+=1)if(t.indexOf(r(i,0,e))>-1){n=i>12;break}}else n=t===(e?"pm":"PM");return n},d={A:[s,function(t){this.afternoon=_(t,!1)}],a:[s,function(t){this.afternoon=_(t,!0)}],Q:[n,function(t){this.month=3*(t-1)+1}],S:[n,function(t){this.milliseconds=100*+t}],SS:[r,function(t){this.milliseconds=10*+t}],SSS:[/\d{3}/,function(t){this.milliseconds=+t}],s:[i,o("seconds")],ss:[i,o("seconds")],m:[i,o("minutes")],mm:[i,o("minutes")],H:[i,o("hours")],h:[i,o("hours")],HH:[i,o("hours")],hh:[i,o("hours")],D:[i,o("day")],DD:[r,o("day")],Do:[s,function(t){var e=a.ordinal,n=t.match(/\d+/);if(this.day=n[0],e)for(var r=1;r<=31;r+=1)e(r).replace(/\[|\]/g,"")===t&&(this.day=r)}],w:[i,o("week")],ww:[r,o("week")],M:[i,o("month")],MM:[r,o("month")],MMM:[s,function(t){var e=h("months"),n=(h("monthsShort")||e.map((function(t){return t.slice(0,3)}))).indexOf(t)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[s,function(t){var e=h("months").indexOf(t)+1;if(e<1)throw new Error;this.month=e%12||e}],Y:[/[+-]?\d+/,o("year")],YY:[r,function(t){this.year=u(t)}],YYYY:[/\d{4}/,o("year")],Z:c,ZZ:c};function f(n){var r;r=a&&a.formats;for(var i=(n=n.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(e,n,i){var s=i&&i.toUpperCase();return n||r[i]||t[i]||r[s].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(t,e,n){return e||n.slice(1)}))}))).match(e),s=i.length,u=0;u<s;u+=1){var o=i[u],c=d[o],h=c&&c[1];i[u]=h?{regex:c&&c[0],parser:h}:o.replace(/^\[|\]$/g,"")}return function(t){for(var e={},n=0,r=0;n<s;n+=1){var a=i[n];if("string"==typeof a)r+=a.length;else{var u=a.regex,o=a.parser,c=t.slice(r),h=u.exec(c)[0];o.call(e,h),t=t.replace(h,"")}}return function(t){var e=t.afternoon;if(void 0!==e){var n=t.hours;e?n<12&&(t.hours+=12):12===n&&(t.hours=0),delete t.afternoon}}(e),e}}return function(t,e,n){n.p.customParseFormat=!0,t&&t.parseTwoDigitYear&&(u=t.parseTwoDigitYear);var r=e.prototype,i=r.parse;r.parse=function(t){var e=t.date,r=t.utc,s=t.args;this.$u=r;var u=s[1];if("string"==typeof u){var o=!0===s[2],c=!0===s[3],h=o||c,_=s[2];c&&(_=s[2]),a=this.$locale(),!o&&_&&(a=n.Ls[_]),this.$d=function(t,e,n,r){try{if(["x","X"].indexOf(e)>-1)return new Date(("X"===e?1e3:1)*t);var i=f(e)(t),s=i.year,a=i.month,u=i.day,o=i.hours,c=i.minutes,h=i.seconds,_=i.milliseconds,d=i.zone,m=i.week,M=new Date,Y=u||(s||a?1:M.getDate()),l=s||M.getFullYear(),v=0;s&&!a||(v=a>0?a-1:M.getMonth());var D,g=o||0,y=c||0,w=h||0,L=_||0;return d?new Date(Date.UTC(l,v,Y,g,y,w,L+60*d.offset*1e3)):n?new Date(Date.UTC(l,v,Y,g,y,w,L)):(D=new Date(l,v,Y,g,y,w,L),m&&(D=r(D).week(m).toDate()),D)}catch(t){return new Date("")}}(e,u,r,n),this.init(),_&&!0!==_&&(this.$L=this.locale(_).$L),h&&e!=this.format(u)&&(this.$d=new Date("")),a={}}else if(u instanceof Array)for(var d=u.length,m=1;m<=d;m+=1){s[1]=u[m-1];var M=n.apply(this,s);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}m===d&&(this.$d=new Date(""))}else i.call(this,t)}}}();const f=d.exports;var m={exports:{}};m.exports=function(){var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(e,n,r){var i=n.prototype,s=i.format;r.en.formats=t,i.format=function(e){void 0===e&&(e="YYYY-MM-DDTHH:mm:ssZ");var n=this.$locale().formats,r=function(e,n){return e.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(e,r,i){var s=i&&i.toUpperCase();return r||n[i]||t[i]||n[s].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(t,e,n){return e||n.slice(1)}))}))}(e,void 0===n?{}:n);return s.call(this,r)}}}();const M=m.exports;var Y={exports:function(t,e,n){var r=function(t,e){if(!e||!e.length||1===e.length&&!e[0]||1===e.length&&Array.isArray(e[0])&&!e[0].length)return null;var n;1===e.length&&e[0].length>0&&(e=e[0]),n=(e=e.filter((function(t){return t})))[0];for(var r=1;r<e.length;r+=1)e[r].isValid()&&!e[r][t](n)||(n=e[r]);return n};n.max=function(){var t=[].slice.call(arguments,0);return r("isAfter",t)},n.min=function(){var t=[].slice.call(arguments,0);return r("isBefore",t)}}};const l=Y.exports;var v,D;v=function(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}(a.exports),D={name:"es",monthsShort:"ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),weekStart:1,formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},ordinal:function(t){return t+"º"}},v.default.locale(D,null,!0),function(){var t=function(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}(a.exports),e={name:"fr",weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},ordinal:function(t){return t+(1===t?"er":"")}};t.default.locale(e,null,!0)}(),function(){var t=function(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}(a.exports),e={name:"it",weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),weekStart:1,monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"tra %s",past:"%s fa",s:"qualche secondo",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},ordinal:function(t){return t+"º"}};t.default.locale(e,null,!0)}(),function(){var t=function(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}(a.exports);function e(t){return t%10<5&&t%10>1&&~~(t/10)%10!=1}function n(t,n,r){var i=t+" ";switch(r){case"m":return n?"minuta":"minutę";case"mm":return i+(e(t)?"minuty":"minut");case"h":return n?"godzina":"godzinę";case"hh":return i+(e(t)?"godziny":"godzin");case"MM":return i+(e(t)?"miesiące":"miesięcy");case"yy":return i+(e(t)?"lata":"lat")}}var r="stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia".split("_"),i="styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"),s=/D MMMM/,u=function(t,e){return s.test(e)?r[t.month()]:i[t.month()]};u.s=i,u.f=r;var o={name:"pl",weekdays:"niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),weekdaysShort:"ndz_pon_wt_śr_czw_pt_sob".split("_"),weekdaysMin:"Nd_Pn_Wt_Śr_Cz_Pt_So".split("_"),months:u,monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),ordinal:function(t){return t+"."},weekStart:1,yearStart:4,relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",m:n,mm:n,h:n,hh:n,d:"1 dzień",dd:"%d dni",M:"miesiąc",MM:n,y:"rok",yy:n},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"}};t.default.locale(o,null,!0)}(),function(){var t=function(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}(a.exports),e="января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_"),n="январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),r="янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.".split("_"),i="янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.".split("_"),s=/D[oD]?(\[[^[\]]*\]|\s)+MMMM?/;function u(t,e,n){var r,i;return"m"===n?e?"минута":"минуту":t+" "+(r=+t,i={mm:e?"минута_минуты_минут":"минуту_минуты_минут",hh:"час_часа_часов",dd:"день_дня_дней",MM:"месяц_месяца_месяцев",yy:"год_года_лет"}[n].split("_"),r%10==1&&r%100!=11?i[0]:r%10>=2&&r%10<=4&&(r%100<10||r%100>=20)?i[1]:i[2])}var o=function(t,r){return s.test(r)?e[t.month()]:n[t.month()]};o.s=n,o.f=e;var c=function(t,e){return s.test(e)?r[t.month()]:i[t.month()]};c.s=i,c.f=r;var h={name:"ru",weekdays:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),weekdaysShort:"вск_пнд_втр_срд_чтв_птн_сбт".split("_"),weekdaysMin:"вс_пн_вт_ср_чт_пт_сб".split("_"),months:o,monthsShort:c,weekStart:1,yearStart:4,formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., H:mm",LLLL:"dddd, D MMMM YYYY г., H:mm"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",m:u,mm:u,h:"час",hh:u,d:"день",dd:u,M:"месяц",MM:u,y:"год",yy:u},ordinal:function(t){return t},meridiem:function(t){return t<4?"ночи":t<12?"утра":t<17?"дня":"вечера"}};t.default.locale(h,null,!0)}(),function(){var t=function(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}(a.exports),e={name:"zh",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(t,e){return"W"===e?t+"周":t+"日"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s后",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(t,e){var n=100*t+e;return n<600?"凌晨":n<900?"早上":n<1100?"上午":n<1300?"中午":n<1800?"下午":"晚上"}};t.default.locale(e,null,!0)}();class g{constructor(t){this.formatToIsoDate=t=>{var e;return null!==(e=u(t).toISOString())&&void 0!==e?e:void 0},this.parseToDayStart=t=>u(t).toDate(),this.parseToDayEnd=t=>u(t).set("hour",23).set("minute",59).set("second",59).toDate(),this.validDates=(t,e)=>{let n=this.parseToDayStart(t);const r=this.parseToDayEnd(e);return(null==n?void 0:n.getTime())>(null==r?void 0:r.getTime())&&(n=this.parseToDayStart(e)),{start:n,end:r}},this.formatToLocaleSimple=t=>u(t).format("DD/MM/YYYY"),this.sortDates=(t,e,n=r.ASC)=>"asc"===n?u(t).diff(u(e)):u(e).diff(u(t)),this.sortTimes=(t,e,n=r.ASC,i="HH:mm:ss")=>{const s=u(t,i),a=u(e,i);return"asc"===n?s.diff(a):a.diff(s)},this.managedComponents=new Set,this.setLocale(t),this.dayjs=u,u.extend(_),u.extend(f),u.extend(M),u.extend(l)}setLocale(e){if(e)this.locale=e;else{const e=navigator.languages||!!navigator.language&&[navigator.language];if(!e||!e.length)return"en";this.locale=e[0].split("-")[0].toLowerCase();let n=!1;for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&t[e]==this.locale){n=!0;break}n||(console.log("set forced locale: en"),this.locale=t.ENGLISH)}u.locale(this.locale),this.managedComponents.forEach((function(t){t.isConnected&&t.refresh()})),document.dispatchEvent(new CustomEvent("kup-dates-localechange"))}getLocale(){return this.locale}getLocales(){return Object.keys(t).map((e=>t[e])).filter((t=>"string"==typeof t))}getDateFormat(){return new Intl.DateTimeFormat(this.getLocale()).formatToParts(new Date).map((t=>{switch(t.type){case"day":return"DD";case"month":return"MM";case"year":return"YYYY";default:return t.value}})).join("")}getTimeFormat(t){const e={hour:"2-digit",minute:"2-digit",hour12:!1};return 1==t&&(e.second="2-digit"),new Intl.DateTimeFormat(this.getLocale()+"-u-hc-h23",e).formatToParts(new Date).map((t=>{switch(t.type){case"hour":return"HH";case"minute":return"mm";case"second":return"ss";default:return t.value}})).join("")}format(t,e){if(e||(e="L"),"string"==typeof t&&/^0\d{3}-/.test(t)){const r=t.substring(0,4),i=Number(r);if(i>=1&&i<=999){const r=new Date(t);if(!isNaN(r.getTime()))return"YYYY-MM-DD"===e||e===n.ISO_DATE?r.toISOString().substring(0,10):"YYYY-MM-DD HH:mm:ss"===e||e===n.ISO_DATE_TIME?r.toISOString().substring(0,19).replace("T"," "):u.utc(r).format(e)}}return u.utc(t).format(e)}formatTime(t,e){const n={hour:"2-digit",minute:"2-digit",hour12:!1};return 1==e&&(n.second="2-digit"),t.toLocaleTimeString(this.getLocale()+"-u-hc-h23",n)}isIsoDate(t){if(!t||"string"!=typeof t)return!1;if(t.length<10)return!1;const e=t.substring(0,4),r=Number(e);if(0===r||isNaN(r))return!1;if(r>=1&&r<=999)try{const e=new Date(t);if(isNaN(e.getTime()))return!1;const n=e.toISOString();return Number(n.substring(0,4))==r&&Number(t.substring(5,7))==e.getUTCMonth()+1&&Number(t.substring(8,10))==e.getUTCDate()}catch(t){return!1}const i=u(t,[n.ISO_DATE,n.ISO_DATE_TIME,"YYYY-MM-DDTHH:mm:ss.SSSZ"]);return!!i.isValid()&&Number(t.substring(0,4))==i.year()&&Number(t.substring(5,7))==i.month()+1&&Number(t.substring(8,10))==i.date()}isValidFormattedStringDate(t,e,r,i=!1,s=!1){let a=!1,o=null;if(e){const n=r?t:this.normalize(t,e);if(o=u(n,e,r),a=o.isValid(),!a&&i&&!r){const t=e.replace(/:/g,"");o=u(n,t,r),a=o.isValid()}}else o=this.normalize(t),a=o.isValid();if(!a)return!1;let c=null;const h=this.cleanInputDateString(t);if(e)c=u(o).format(e);else{const t={};e!=n.ISO_TIME&&e!=n.ISO_TIME_WITHOUT_SECONDS&&e!=n.ISO_DATE_TIME||(t.hour="2-digit",t.minute="2-digit",t.hour12=!1,1==s&&(t.second="2-digit")),e!=n.ISO_TIME&&e!=n.ISO_TIME_WITHOUT_SECONDS&&(t.year="numeric",t.month="2-digit",t.day="2-digit"),c=new Intl.DateTimeFormat(this.getLocale()+"-u-hc-h23",t).format(o.toDate())}const _=this.cleanInputDateString(c);let d=h;if(!i&&6===h.length&&/^\d{6}$/.test(h)){const t=h.substring(0,2),e=h.substring(2,4),n=h.substring(4,6);d=t+e+(parseInt(n)>50?"19"+n:"20"+n)}return a=_==d,a}isValidFormattedStringTime(t,e,n=!0){let r=this.getTimeFormat(e);return this.isValidFormattedStringDate(t,r,n,!0,e)}toDate(t,e){if("string"==typeof t&&/^0\d{3}-/.test(t)){const e=t.substring(0,4),n=Number(e);if(n>=1&&n<=999){const e=new Date(t);if(!isNaN(e.getTime()))return e}}const n=e?u.utc(t,e):u.utc(t);return n.isValid()?n.toDate():null}toDayjs(t,e){if("string"==typeof t&&/^0\d{3}-/.test(t)){const e=t.substring(0,4),n=Number(e);if(n>=1&&n<=999){const e=new Date(t);if(!isNaN(e.getTime()))return u(e)}}const n=e?u(t,e):u(t);return n.isValid()?n:null}cleanInputDateString(t){if(!t)return"";if(this.isIsoDate(t))return t;const e=this.getDateFormat(),n=/[\/\-\.]/;if(n.test(t)){const r=t.split(n);if(r.length>=2){let t=["","",""];const n=[{type:"day",index:e.indexOf("DD"),pos:0},{type:"month",index:e.indexOf("MM"),pos:1},{type:"year",index:e.indexOf("YYYY"),pos:2}].sort(((t,e)=>t.index-e.index));for(let e=0;e<Math.min(r.length,3);e++)t[n[e].pos]=r[e].replace(/[^0-9]/g,"");let[i,s,a]=t;i&&1===i.length&&(i="0"+i),s&&1===s.length&&(s="0"+s),a&&2===a.length&&(a=parseInt(a)>50?"19"+a:"20"+a);let u="";const o={day:i||"",month:s||"",year:a||""};for(let t=0;t<n.length;t++){const e=o[n[t].type];e&&(u+=e)}return u}}const r=t.replace(/[^0-9]/g,"").trim();return r.length>=3&&r.length<=8?this.padUnseparatedDate(r):r}padUnseparatedDate(t){switch(t.length){case 3:case 5:case 7:return"0"+t;case 6:const e=t.substring(2),n=parseInt(e);return n>=1900&&n<=2099?"0"+t:t;default:return t}}normalize(t,e){const r=null!=e?e:u.Ls[this.locale].formats.L;switch(t=this.cleanInputDateString(t),e){case n.ISO_TIME:case n.ISO_TIME_WITHOUT_SECONDS:const e=function(){const e=new Date;let n=0,r=0,i=0,s=0;switch(t.length){case 1:case 2:n=parseInt(t),e.setHours(n,0,0,0);break;case 3:case 4:n=parseInt(t.substring(0,2)),r=parseInt(t.substring(2,4)),e.setHours(n,r,0,0);break;case 5:case 6:n=parseInt(t.substring(0,2)),r=parseInt(t.substring(2,4)),i=parseInt(t.substring(4,6)),e.setHours(n,r,i,0);break;case 7:case 8:n=parseInt(t.substring(0,2)),r=parseInt(t.substring(2,4)),i=parseInt(t.substring(4,6)),s=parseInt(t.substring(6,8)),e.setHours(n,r,i,s)}return e}();return u(e);case n.ISO_DATE_TIME:return u(t);default:const i=function(){const e=new Date,n=r.indexOf("DD"),i=r.indexOf("MM");let s=0,a=0,u="";switch(t.length){case 1:case 2:s=parseInt(t),e.setDate(s);break;case 3:case 4:s=parseInt(t.substring(0,2)),a=parseInt(t.substring(2,4)),0===i?(e.setDate(a),e.setMonth(s-1)):0===n&&(e.setDate(s),e.setMonth(a-1));break;case 5:case 6:s=parseInt(t.substring(0,2)),a=parseInt(t.substring(2,4)),u=Number(t.substring(4))>50?"19"+t.substring(4):"20"+t.substring(4),0===i?e.setFullYear(parseInt(u),s-1,a):0===n&&e.setFullYear(parseInt(u),a-1,s);break;case 7:case 8:s=parseInt(t.substring(0,2)),a=parseInt(t.substring(2,4)),u=t.substring(4),0===i?e.setFullYear(parseInt(u),s-1,a):0===n&&e.setFullYear(parseInt(u),a-1,s)}return e}();return u(i)}}min(t){const e=[];for(let n=0;n<t.length;n++)e.push(u(t[n]));return u.min(e)}max(t){const e=[];for(let n=0;n<t.length;n++)e.push(u(t[n]));return u.max(e)}add(t,e,n){return u(t).add(e,n)}subtract(t,e,n){return u(t).subtract(e,n)}getMonthAsString(t,e){if(null==t)return"";const n=new Date;n.setDate(1),n.setMonth(t-1);const r={month:e};return new Intl.DateTimeFormat(this.getLocale(),r).format(n)}getMonthsAsString(t){null!=t&&""!=t.trim()||(t=e.LONG);for(var n=[],r=0;r<12;r++)n[r]=this.getMonthAsString(r+1,t);return n}getDayAsString(t){return null==t?"":new Intl.DateTimeFormat(this.getLocale(),{weekday:"narrow"}).format(t)}firstDayThisWeek(t){var e=new Date;const n=e.getDay();return e.setDate(e.getDate()-n),e.setDate(e.getDate()+t),e}thisWeek(t){const e=this.firstDayThisWeek(t);return{startDate:e,endDate:function(t){const e=new Date(t);return e.setDate(t.getDate()+6),e}(e)}}getDaysOfWeekAsString(t){for(var e=this.thisWeek(t).startDate,n=[],r=0;r<7;r++){var i=new Date(e.toISOString());i.setDate(i.getDate()+r),n[r]=this.getDayAsString(i)}return n}timestampStringToFormattedString(t){return this.toDate(this.normalize(t,n.ISO_DATE_TIME)).toLocaleString(this.getLocale()+"-u-hc-h23",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})}formattedStringToTimestampString(t){return this.formattedStringToCustomDateTime(t,n.ISO_DATE_TIME,!0)}formattedStringToCustomDateTime(t,e,r){return this.isValidFormattedStringTime(t,r,!1)?this.format(this.normalize(t,n.ISO_TIME),e):""}timeStringToFormattedString(t,e,r){const i={hour:"2-digit",minute:"2-digit",hour12:!1};return 1==e&&(i.second="2-digit"),function(t,e,n,r,i){if(null==r)return e.toLocaleTimeString(i.getLocale()+"-u-hc-h23",n);switch(r){case"I13":case"I12":break;case"I11":case"I14":case"I1H":case"I1M":case"I21":case"I22":case"I23":case"I24":case"I2H":case"I2D":case"I2M":return t}return e.toLocaleTimeString(i.getLocale()+"-u-hc-h23",n)}(t,this.toDate(this.normalize(t,n.ISO_TIME)),i,r,this)}register(t){this.managedComponents.add(t.rootElement?t.rootElement:t)}unregister(t){this.managedComponents&&this.managedComponents.delete(t.rootElement?t.rootElement:t)}}export{n as K,g as a,t as b,i as c,e as d,s as g}
1
+ var t,e,n,r,i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function s(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}!function(t){t.CHINESE="cn",t.ENGLISH="en",t.FRENCH="fr",t.ITALIAN="it",t.POLISH="pl",t.RUSSIAN="ru",t.SPANISH="es"}(t||(t={})),function(t){t.NUMERIC="numeric",t.DIGIT2="2-digit",t.LONG="long",t.SHORT="short",t.NARROW="narrow"}(e||(e={})),function(t){t.ISO_DATE="YYYY-MM-DD",t.ISO_DATE_TIME="YYYY-MM-DD HH:mm:ss",t.ISO_TIME="HH:mm:ss",t.ISO_TIME_WITHOUT_SECONDS="HH:mm"}(n||(n={})),function(t){t.ASC="asc",t.DESC="desc"}(r||(r={}));var a={exports:{}};a.exports=function(){var t=6e4,e=36e5,n="millisecond",r="second",i="minute",s="hour",a="day",u="week",o="month",c="quarter",h="year",_="date",d="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return"["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},Y=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},l={s:Y,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?"+":"-")+Y(r,2,"0")+":"+Y(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,o),s=n-i<0,a=e.clone().add(r+(s?-1:1),o);return+(-(r+(n-i)/(s?i-a:a-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:o,y:h,w:u,d:a,D:_,h:s,m:i,s:r,ms:n,Q:c}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},v="en",D={};D[v]=M;var g="$isDayjsObject",y=function(t){return t instanceof S||!(!t||!t[g])},w=function t(e,n,r){var i;if(!e)return v;if("string"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var a=e.split("-");if(!i&&a.length>1)return t(a[0])}else{var u=e.name;D[u]=e,i=u}return!r&&i&&(v=i),i||!r&&v},L=function(t,e){if(y(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new S(n)},p=l;p.l=w,p.i=y,p.w=function(t,e){return L(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var S=function(){function M(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[g]=!0}var Y=M.prototype;return Y.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(p.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(f);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init()},Y.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},Y.$utils=function(){return p},Y.isValid=function(){return!(this.$d.toString()===d)},Y.isSame=function(t,e){var n=L(t);return this.startOf(e)<=n&&n<=this.endOf(e)},Y.isAfter=function(t,e){return L(t)<this.startOf(e)},Y.isBefore=function(t,e){return this.endOf(e)<L(t)},Y.$g=function(t,e,n){return p.u(t)?this[e]:this.set(n,t)},Y.unix=function(){return Math.floor(this.valueOf()/1e3)},Y.valueOf=function(){return this.$d.getTime()},Y.startOf=function(t,e){var n=this,c=!!p.u(e)||e,d=p.p(t),f=function(t,e){var r=p.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return c?r:r.endOf(a)},m=function(t,e){return p.w(n.toDate()[t].apply(n.toDate("s"),(c?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},M=this.$W,Y=this.$M,l=this.$D,v="set"+(this.$u?"UTC":"");switch(d){case h:return c?f(1,0):f(31,11);case o:return c?f(1,Y):f(0,Y+1);case u:var D=this.$locale().weekStart||0,g=(M<D?M+7:M)-D;return f(c?l-g:l+(6-g),Y);case a:case _:return m(v+"Hours",0);case s:return m(v+"Minutes",1);case i:return m(v+"Seconds",2);case r:return m(v+"Milliseconds",3);default:return this.clone()}},Y.endOf=function(t){return this.startOf(t,!1)},Y.$set=function(t,e){var u,c=p.p(t),d="set"+(this.$u?"UTC":""),f=(u={},u[a]=d+"Date",u[_]=d+"Date",u[o]=d+"Month",u[h]=d+"FullYear",u[s]=d+"Hours",u[i]=d+"Minutes",u[r]=d+"Seconds",u[n]=d+"Milliseconds",u)[c],m=c===a?this.$D+(e-this.$W):e;if(c===o||c===h){var M=this.clone().set(_,1);M.$d[f](m),M.init(),this.$d=M.set(_,Math.min(this.$D,M.daysInMonth())).$d}else f&&this.$d[f](m);return this.init(),this},Y.set=function(t,e){return this.clone().$set(t,e)},Y.get=function(t){return this[p.p(t)]()},Y.add=function(n,c){var _,d=this;n=Number(n);var f=p.p(c),m=function(t){var e=L(d);return p.w(e.date(e.date()+Math.round(t*n)),d)};if(f===o)return this.set(o,this.$M+n);if(f===h)return this.set(h,this.$y+n);if(f===a)return m(1);if(f===u)return m(7);var M=(_={},_[i]=t,_[s]=e,_[r]=1e3,_)[f]||1,Y=this.$d.getTime()+n*M;return p.w(Y,this)},Y.subtract=function(t,e){return this.add(-1*t,e)},Y.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||d;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=p.z(this),s=this.$H,a=this.$m,u=this.$M,o=n.weekdays,c=n.months,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},_=function(t){return p.s(s%12||12,t,"0")},f=n.meridiem||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(m,(function(t,r){return r||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return p.s(e.$y,4,"0");case"M":return u+1;case"MM":return p.s(u+1,2,"0");case"MMM":return h(n.monthsShort,u,c,3);case"MMMM":return h(c,u);case"D":return e.$D;case"DD":return p.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return h(n.weekdaysMin,e.$W,o,2);case"ddd":return h(n.weekdaysShort,e.$W,o,3);case"dddd":return o[e.$W];case"H":return String(s);case"HH":return p.s(s,2,"0");case"h":return _(1);case"hh":return _(2);case"a":return f(s,a,!0);case"A":return f(s,a,!1);case"m":return String(a);case"mm":return p.s(a,2,"0");case"s":return String(e.$s);case"ss":return p.s(e.$s,2,"0");case"SSS":return p.s(e.$ms,3,"0");case"Z":return i}return null}(t)||i.replace(":","")}))},Y.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},Y.diff=function(n,_,d){var f,m=this,M=p.p(_),Y=L(n),l=(Y.utcOffset()-this.utcOffset())*t,v=this-Y,D=function(){return p.m(m,Y)};switch(M){case h:f=D()/12;break;case o:f=D();break;case c:f=D()/3;break;case u:f=(v-l)/6048e5;break;case a:f=(v-l)/864e5;break;case s:f=v/e;break;case i:f=v/t;break;case r:f=v/1e3;break;default:f=v}return d?f:p.a(f)},Y.daysInMonth=function(){return this.endOf(o).$D},Y.$locale=function(){return D[this.$L]},Y.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=w(t,e,!0);return r&&(n.$L=r),n},Y.clone=function(){return p.w(this.$d,this)},Y.toDate=function(){return new Date(this.valueOf())},Y.toJSON=function(){return this.isValid()?this.toISOString():null},Y.toISOString=function(){return this.$d.toISOString()},Y.toString=function(){return this.$d.toUTCString()},M}(),b=S.prototype;return L.prototype=b,[["$ms",n],["$s",r],["$m",i],["$H",s],["$W",a],["$M",o],["$y",h],["$D",_]].forEach((function(t){b[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),L.extend=function(t,e){return t.$i||(t(e,S,L),t.$i=!0),L},L.locale=w,L.isDayjs=y,L.unix=function(t){return L(1e3*t)},L.en=D[v],L.Ls=D,L.p={},L}();const u=a.exports;var o,c,h;const _={exports:{}}.exports=(o="minute",c=/[+-]\d\d(?::?\d\d)?/g,h=/([+-]|\d\d)/g,function(t,e,n){var r=e.prototype;n.utc=function(t){return new e({date:t,utc:!0,args:arguments})},r.utc=function(t){var e=n(this.toDate(),{locale:this.$L,utc:!0});return t?e.add(this.utcOffset(),o):e},r.local=function(){return n(this.toDate(),{locale:this.$L,utc:!1})};var i=r.parse;r.parse=function(t){t.utc&&(this.$u=!0),this.$utils().u(t.$offset)||(this.$offset=t.$offset),i.call(this,t)};var s=r.init;r.init=function(){if(this.$u){var t=this.$d;this.$y=t.getUTCFullYear(),this.$M=t.getUTCMonth(),this.$D=t.getUTCDate(),this.$W=t.getUTCDay(),this.$H=t.getUTCHours(),this.$m=t.getUTCMinutes(),this.$s=t.getUTCSeconds(),this.$ms=t.getUTCMilliseconds()}else s.call(this)};var a=r.utcOffset;r.utcOffset=function(t,e){var n=this.$utils().u;if(n(t))return this.$u?0:n(this.$offset)?a.call(this):this.$offset;if("string"==typeof t&&(t=function(t){void 0===t&&(t="");var e=t.match(c);if(!e)return null;var n=(""+e[0]).match(h)||["-",0,0],r=60*+n[1]+ +n[2];return 0===r?0:"+"===n[0]?r:-r}(t),null===t))return this;var r=Math.abs(t)<=16?60*t:t;if(0===r)return this.utc(e);var i=this.clone();if(e)return i.$offset=r,i.$u=!1,i;var s=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(i=this.local().add(r+s,o)).$offset=r,i.$x.$localOffset=s,i};var u=r.format;r.format=function(t){return u.call(this,t||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":""))},r.valueOf=function(){var t=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*t},r.isUTC=function(){return!!this.$u},r.toISOString=function(){return this.toDate().toISOString()},r.toString=function(){return this.toDate().toUTCString()};var _=r.toDate;r.toDate=function(t){return"s"===t&&this.$offset?n(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():_.call(this)};var d=r.diff;r.diff=function(t,e,r){if(t&&this.$u===t.$u)return d.call(this,t,e,r);var i=this.local(),s=n(t).local();return d.call(i,s,e,r)}});var d={exports:{}};d.exports=function(){var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},e=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,i=/\d\d?/,s=/\d*[^-_:/,()\s\d]+/,a={},u=function(t){return(t=+t)+(t>68?1900:2e3)},o=function(t){return function(e){this[t]=+e}},c=[/[+-]\d\d:?(\d\d)?|Z/,function(t){(this.zone||(this.zone={})).offset=function(t){if(!t)return 0;if("Z"===t)return 0;var e=t.match(/([+-]|\d\d)/g),n=60*e[1]+(+e[2]||0);return 0===n?0:"+"===e[0]?-n:n}(t)}],h=function(t){var e=a[t];return e&&(e.indexOf?e:e.s.concat(e.f))},_=function(t,e){var n,r=a.meridiem;if(r){for(var i=1;i<=24;i+=1)if(t.indexOf(r(i,0,e))>-1){n=i>12;break}}else n=t===(e?"pm":"PM");return n},d={A:[s,function(t){this.afternoon=_(t,!1)}],a:[s,function(t){this.afternoon=_(t,!0)}],Q:[n,function(t){this.month=3*(t-1)+1}],S:[n,function(t){this.milliseconds=100*+t}],SS:[r,function(t){this.milliseconds=10*+t}],SSS:[/\d{3}/,function(t){this.milliseconds=+t}],s:[i,o("seconds")],ss:[i,o("seconds")],m:[i,o("minutes")],mm:[i,o("minutes")],H:[i,o("hours")],h:[i,o("hours")],HH:[i,o("hours")],hh:[i,o("hours")],D:[i,o("day")],DD:[r,o("day")],Do:[s,function(t){var e=a.ordinal,n=t.match(/\d+/);if(this.day=n[0],e)for(var r=1;r<=31;r+=1)e(r).replace(/\[|\]/g,"")===t&&(this.day=r)}],w:[i,o("week")],ww:[r,o("week")],M:[i,o("month")],MM:[r,o("month")],MMM:[s,function(t){var e=h("months"),n=(h("monthsShort")||e.map((function(t){return t.slice(0,3)}))).indexOf(t)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[s,function(t){var e=h("months").indexOf(t)+1;if(e<1)throw new Error;this.month=e%12||e}],Y:[/[+-]?\d+/,o("year")],YY:[r,function(t){this.year=u(t)}],YYYY:[/\d{4}/,o("year")],Z:c,ZZ:c};function f(n){var r;r=a&&a.formats;for(var i=(n=n.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(e,n,i){var s=i&&i.toUpperCase();return n||r[i]||t[i]||r[s].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(t,e,n){return e||n.slice(1)}))}))).match(e),s=i.length,u=0;u<s;u+=1){var o=i[u],c=d[o],h=c&&c[1];i[u]=h?{regex:c&&c[0],parser:h}:o.replace(/^\[|\]$/g,"")}return function(t){for(var e={},n=0,r=0;n<s;n+=1){var a=i[n];if("string"==typeof a)r+=a.length;else{var u=a.regex,o=a.parser,c=t.slice(r),h=u.exec(c)[0];o.call(e,h),t=t.replace(h,"")}}return function(t){var e=t.afternoon;if(void 0!==e){var n=t.hours;e?n<12&&(t.hours+=12):12===n&&(t.hours=0),delete t.afternoon}}(e),e}}return function(t,e,n){n.p.customParseFormat=!0,t&&t.parseTwoDigitYear&&(u=t.parseTwoDigitYear);var r=e.prototype,i=r.parse;r.parse=function(t){var e=t.date,r=t.utc,s=t.args;this.$u=r;var u=s[1];if("string"==typeof u){var o=!0===s[2],c=!0===s[3],h=o||c,_=s[2];c&&(_=s[2]),a=this.$locale(),!o&&_&&(a=n.Ls[_]),this.$d=function(t,e,n,r){try{if(["x","X"].indexOf(e)>-1)return new Date(("X"===e?1e3:1)*t);var i=f(e)(t),s=i.year,a=i.month,u=i.day,o=i.hours,c=i.minutes,h=i.seconds,_=i.milliseconds,d=i.zone,m=i.week,M=new Date,Y=u||(s||a?1:M.getDate()),l=s||M.getFullYear(),v=0;s&&!a||(v=a>0?a-1:M.getMonth());var D,g=o||0,y=c||0,w=h||0,L=_||0;return d?new Date(Date.UTC(l,v,Y,g,y,w,L+60*d.offset*1e3)):n?new Date(Date.UTC(l,v,Y,g,y,w,L)):(D=new Date(l,v,Y,g,y,w,L),m&&(D=r(D).week(m).toDate()),D)}catch(t){return new Date("")}}(e,u,r,n),this.init(),_&&!0!==_&&(this.$L=this.locale(_).$L),h&&e!=this.format(u)&&(this.$d=new Date("")),a={}}else if(u instanceof Array)for(var d=u.length,m=1;m<=d;m+=1){s[1]=u[m-1];var M=n.apply(this,s);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}m===d&&(this.$d=new Date(""))}else i.call(this,t)}}}();const f=d.exports;var m={exports:{}};m.exports=function(){var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(e,n,r){var i=n.prototype,s=i.format;r.en.formats=t,i.format=function(e){void 0===e&&(e="YYYY-MM-DDTHH:mm:ssZ");var n=this.$locale().formats,r=function(e,n){return e.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(e,r,i){var s=i&&i.toUpperCase();return r||n[i]||t[i]||n[s].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(t,e,n){return e||n.slice(1)}))}))}(e,void 0===n?{}:n);return s.call(this,r)}}}();const M=m.exports;var Y={exports:function(t,e,n){var r=function(t,e){if(!e||!e.length||1===e.length&&!e[0]||1===e.length&&Array.isArray(e[0])&&!e[0].length)return null;var n;1===e.length&&e[0].length>0&&(e=e[0]),n=(e=e.filter((function(t){return t})))[0];for(var r=1;r<e.length;r+=1)e[r].isValid()&&!e[r][t](n)||(n=e[r]);return n};n.max=function(){var t=[].slice.call(arguments,0);return r("isAfter",t)},n.min=function(){var t=[].slice.call(arguments,0);return r("isBefore",t)}}};const l=Y.exports;var v,D;v=function(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}(a.exports),D={name:"es",monthsShort:"ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),weekStart:1,formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},ordinal:function(t){return t+"º"}},v.default.locale(D,null,!0),function(){var t=function(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}(a.exports),e={name:"fr",weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},ordinal:function(t){return t+(1===t?"er":"")}};t.default.locale(e,null,!0)}(),function(){var t=function(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}(a.exports),e={name:"it",weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),weekStart:1,monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"tra %s",past:"%s fa",s:"qualche secondo",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},ordinal:function(t){return t+"º"}};t.default.locale(e,null,!0)}(),function(){var t=function(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}(a.exports);function e(t){return t%10<5&&t%10>1&&~~(t/10)%10!=1}function n(t,n,r){var i=t+" ";switch(r){case"m":return n?"minuta":"minutę";case"mm":return i+(e(t)?"minuty":"minut");case"h":return n?"godzina":"godzinę";case"hh":return i+(e(t)?"godziny":"godzin");case"MM":return i+(e(t)?"miesiące":"miesięcy");case"yy":return i+(e(t)?"lata":"lat")}}var r="stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia".split("_"),i="styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"),s=/D MMMM/,u=function(t,e){return s.test(e)?r[t.month()]:i[t.month()]};u.s=i,u.f=r;var o={name:"pl",weekdays:"niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),weekdaysShort:"ndz_pon_wt_śr_czw_pt_sob".split("_"),weekdaysMin:"Nd_Pn_Wt_Śr_Cz_Pt_So".split("_"),months:u,monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),ordinal:function(t){return t+"."},weekStart:1,yearStart:4,relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",m:n,mm:n,h:n,hh:n,d:"1 dzień",dd:"%d dni",M:"miesiąc",MM:n,y:"rok",yy:n},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"}};t.default.locale(o,null,!0)}(),function(){var t=function(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}(a.exports),e="января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_"),n="январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),r="янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.".split("_"),i="янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.".split("_"),s=/D[oD]?(\[[^[\]]*\]|\s)+MMMM?/;function u(t,e,n){var r,i;return"m"===n?e?"минута":"минуту":t+" "+(r=+t,i={mm:e?"минута_минуты_минут":"минуту_минуты_минут",hh:"час_часа_часов",dd:"день_дня_дней",MM:"месяц_месяца_месяцев",yy:"год_года_лет"}[n].split("_"),r%10==1&&r%100!=11?i[0]:r%10>=2&&r%10<=4&&(r%100<10||r%100>=20)?i[1]:i[2])}var o=function(t,r){return s.test(r)?e[t.month()]:n[t.month()]};o.s=n,o.f=e;var c=function(t,e){return s.test(e)?r[t.month()]:i[t.month()]};c.s=i,c.f=r;var h={name:"ru",weekdays:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),weekdaysShort:"вск_пнд_втр_срд_чтв_птн_сбт".split("_"),weekdaysMin:"вс_пн_вт_ср_чт_пт_сб".split("_"),months:o,monthsShort:c,weekStart:1,yearStart:4,formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., H:mm",LLLL:"dddd, D MMMM YYYY г., H:mm"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",m:u,mm:u,h:"час",hh:u,d:"день",dd:u,M:"месяц",MM:u,y:"год",yy:u},ordinal:function(t){return t},meridiem:function(t){return t<4?"ночи":t<12?"утра":t<17?"дня":"вечера"}};t.default.locale(h,null,!0)}(),function(){var t=function(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}(a.exports),e={name:"zh",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(t,e){return"W"===e?t+"周":t+"日"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s后",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(t,e){var n=100*t+e;return n<600?"凌晨":n<900?"早上":n<1100?"上午":n<1300?"中午":n<1800?"下午":"晚上"}};t.default.locale(e,null,!0)}();class g{constructor(t){this.formatToIsoDate=t=>{var e;return null!==(e=u(t).toISOString())&&void 0!==e?e:void 0},this.parseToDayStart=t=>u(t).toDate(),this.parseToDayEnd=t=>u(t).set("hour",23).set("minute",59).set("second",59).toDate(),this.validDates=(t,e)=>{let n=this.parseToDayStart(t);const r=this.parseToDayEnd(e);return(null==n?void 0:n.getTime())>(null==r?void 0:r.getTime())&&(n=this.parseToDayStart(e)),{start:n,end:r}},this.formatToLocaleSimple=t=>u(t).format("DD/MM/YYYY"),this.sortDates=(t,e,n=r.ASC)=>"asc"===n?u(t).diff(u(e)):u(e).diff(u(t)),this.sortTimes=(t,e,n=r.ASC,i="HH:mm:ss")=>{const s=u(t,i),a=u(e,i);return"asc"===n?s.diff(a):a.diff(s)},this.managedComponents=new Set,this.setLocale(t),this.dayjs=u,u.extend(_),u.extend(f),u.extend(M),u.extend(l)}setLocale(e){if(e)this.locale=e;else{const e=navigator.languages||!!navigator.language&&[navigator.language];if(!e||!e.length)return"en";this.locale=e[0].split("-")[0].toLowerCase();let n=!1;for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&t[e]==this.locale){n=!0;break}n||(console.log("set forced locale: en"),this.locale=t.ENGLISH)}u.locale(this.locale),this.managedComponents.forEach((function(t){t.isConnected&&t.refresh()})),document.dispatchEvent(new CustomEvent("kup-dates-localechange"))}getLocale(){return this.locale}getLocales(){return Object.keys(t).map((e=>t[e])).filter((t=>"string"==typeof t))}getDateFormat(){return new Intl.DateTimeFormat(this.getLocale()).formatToParts(new Date).map((t=>{switch(t.type){case"day":return"DD";case"month":return"MM";case"year":return"YYYY";default:return t.value}})).join("")}getTimeFormat(t){const e={hour:"2-digit",minute:"2-digit",hour12:!1};return 1==t&&(e.second="2-digit"),new Intl.DateTimeFormat(this.getLocale()+"-u-hc-h23",e).formatToParts(new Date).map((t=>{switch(t.type){case"hour":return"HH";case"minute":return"mm";case"second":return"ss";default:return t.value}})).join("")}format(t,e){if(e||(e="L"),"string"==typeof t&&/^0\d{3}-/.test(t)){const r=t.substring(0,4),i=Number(r);if(i>=1&&i<=999){const r=new Date(t);if(!isNaN(r.getTime()))return"YYYY-MM-DD"===e||e===n.ISO_DATE?r.toISOString().substring(0,10):"YYYY-MM-DD HH:mm:ss"===e||e===n.ISO_DATE_TIME?r.toISOString().substring(0,19).replace("T"," "):u.utc(r).format(e)}}return u.utc(t).format(e)}formatTime(t,e){const n={hour:"2-digit",minute:"2-digit",hour12:!1};return 1==e&&(n.second="2-digit"),t.toLocaleTimeString(this.getLocale()+"-u-hc-h23",n)}isIsoDate(t){if(!t||"string"!=typeof t)return!1;if(t.length<10)return!1;const e=t.substring(0,4),r=Number(e);if(0===r||isNaN(r))return!1;if(r>=1&&r<=999)try{const e=new Date(t);if(isNaN(e.getTime()))return!1;const n=e.toISOString();return Number(n.substring(0,4))==r&&Number(t.substring(5,7))==e.getUTCMonth()+1&&Number(t.substring(8,10))==e.getUTCDate()}catch(t){return!1}const i=u(t,[n.ISO_DATE,n.ISO_DATE_TIME,"YYYY-MM-DDTHH:mm:ss.SSSZ"]);return!!i.isValid()&&Number(t.substring(0,4))==i.year()&&Number(t.substring(5,7))==i.month()+1&&Number(t.substring(8,10))==i.date()}isValidFormattedStringDate(t,e,r,i=!1,s=!1){let a=!1,o=null;if(e){const n=r?t:this.normalize(t,e);if(o=u(n,e,r),a=o.isValid(),!a&&i&&!r){const t=e.replace(/:/g,"");o=u(n,t,r),a=o.isValid()}}else o=this.normalize(t),a=o.isValid();if(!a)return!1;let c=null;const h=this.cleanInputDateString(t);if(e)c=u(o).format(e);else{const t={};e!=n.ISO_TIME&&e!=n.ISO_TIME_WITHOUT_SECONDS&&e!=n.ISO_DATE_TIME||(t.hour="2-digit",t.minute="2-digit",t.hour12=!1,1==s&&(t.second="2-digit")),e!=n.ISO_TIME&&e!=n.ISO_TIME_WITHOUT_SECONDS&&(t.year="numeric",t.month="2-digit",t.day="2-digit"),c=new Intl.DateTimeFormat(this.getLocale()+"-u-hc-h23",t).format(o.toDate())}const _=this.cleanInputDateString(c);let d=h;if(!i&&6===h.length&&/^\d{6}$/.test(h)){const t=h.substring(0,2),e=h.substring(2,4),n=h.substring(4,6);d=t+e+(parseInt(n)>50?"19"+n:"20"+n)}return a=_==d,a}isValidFormattedStringTime(t,e,n=!0){let r=this.getTimeFormat(e);return this.isValidFormattedStringDate(t,r,n,!0,e)}toDate(t,e){if("string"==typeof t&&/^0\d{3}-/.test(t)){const e=t.substring(0,4),n=Number(e);if(n>=1&&n<=999){const e=new Date(t);if(!isNaN(e.getTime()))return e}}const n=e?u.utc(t,e):u.utc(t);return n.isValid()?n.toDate():null}toDayjs(t,e){if("string"==typeof t&&/^0\d{3}-/.test(t)){const e=t.substring(0,4),n=Number(e);if(n>=1&&n<=999){const e=new Date(t);if(!isNaN(e.getTime()))return u(e)}}const n=e?u(t,e):u(t);return n.isValid()?n:null}cleanInputDateString(t){if(!t)return"";if(this.isIsoDate(t))return t;const e=this.getDateFormat(),n=/[\/\-\.]/;if(n.test(t)){const r=t.split(n);if(r.length>=2){let t=["","",""];const n=[{type:"day",index:e.indexOf("DD"),pos:0},{type:"month",index:e.indexOf("MM"),pos:1},{type:"year",index:e.indexOf("YYYY"),pos:2}].sort(((t,e)=>t.index-e.index));for(let e=0;e<Math.min(r.length,3);e++)t[n[e].pos]=r[e].replace(/[^0-9]/g,"");let[i,s,a]=t;i&&1===i.length&&(i="0"+i),s&&1===s.length&&(s="0"+s),a&&2===a.length&&(a=parseInt(a)>50?"19"+a:"20"+a);let u="";const o={day:i||"",month:s||"",year:a||""};for(let t=0;t<n.length;t++){const e=o[n[t].type];e&&(u+=e)}return u}}const r=t.replace(/[^0-9]/g,"").trim();return r.length>=3&&r.length<=8?this.padUnseparatedDate(r):r}padUnseparatedDate(t){switch(t.length){case 3:case 5:case 7:return"0"+t;case 6:const e=t.substring(2),n=parseInt(e);return n>=1900&&n<=2099?"0"+t:t;default:return t}}normalize(t,e){const r=null!=e?e:u.Ls[this.locale].formats.L;switch(t=this.cleanInputDateString(t),e){case n.ISO_TIME:case n.ISO_TIME_WITHOUT_SECONDS:const e=function(){const e=new Date;let n=0,r=0,i=0,s=0;switch(t.length){case 1:case 2:n=parseInt(t),e.setHours(n,0,0,0);break;case 3:case 4:n=parseInt(t.substring(0,2)),r=parseInt(t.substring(2,4)),e.setHours(n,r,0,0);break;case 5:case 6:n=parseInt(t.substring(0,2)),r=parseInt(t.substring(2,4)),i=parseInt(t.substring(4,6)),e.setHours(n,r,i,0);break;case 7:case 8:n=parseInt(t.substring(0,2)),r=parseInt(t.substring(2,4)),i=parseInt(t.substring(4,6)),s=parseInt(t.substring(6,8)),e.setHours(n,r,i,s)}return e}();return u(e);case n.ISO_DATE_TIME:return u(t);default:const i=function(){const e=new Date,n=r.indexOf("DD"),i=r.indexOf("MM");let s=0,a=0,u="";switch(t.length){case 1:case 2:s=parseInt(t),e.setDate(s);break;case 3:case 4:s=parseInt(t.substring(0,2)),a=parseInt(t.substring(2,4)),0===i?(e.setDate(a),e.setMonth(s-1)):0===n&&(e.setDate(s),e.setMonth(a-1));break;case 5:case 6:s=parseInt(t.substring(0,2)),a=parseInt(t.substring(2,4)),u=Number(t.substring(4))>50?"19"+t.substring(4):"20"+t.substring(4),0===i?e.setFullYear(parseInt(u),s-1,a):0===n&&e.setFullYear(parseInt(u),a-1,s);break;case 7:case 8:s=parseInt(t.substring(0,2)),a=parseInt(t.substring(2,4)),u=t.substring(4),0===i?e.setFullYear(parseInt(u),s-1,a):0===n&&e.setFullYear(parseInt(u),a-1,s)}return e}();return u(i)}}min(t){const e=[];for(let n=0;n<t.length;n++)e.push(u(t[n]));return u.min(e)}max(t){const e=[];for(let n=0;n<t.length;n++)e.push(u(t[n]));return u.max(e)}add(t,e,n){return u(t).add(e,n)}subtract(t,e,n){return u(t).subtract(e,n)}getMonthAsString(t,e){if(null==t)return"";const n=new Date;n.setDate(1),n.setMonth(t-1);const r={month:e};return new Intl.DateTimeFormat(this.getLocale(),r).format(n)}getMonthsAsString(t){null!=t&&""!=t.trim()||(t=e.LONG);for(var n=[],r=0;r<12;r++)n[r]=this.getMonthAsString(r+1,t);return n}getDayAsString(t){return null==t?"":new Intl.DateTimeFormat(this.getLocale(),{weekday:"narrow"}).format(t)}firstDayThisWeek(t){var e=new Date;const n=e.getDay();return e.setDate(e.getDate()-n),e.setDate(e.getDate()+t),e}thisWeek(t){const e=this.firstDayThisWeek(t);return{startDate:e,endDate:function(t){const e=new Date(t);return e.setDate(t.getDate()+6),e}(e)}}getDaysOfWeekAsString(t){for(var e=this.thisWeek(t).startDate,n=[],r=0;r<7;r++){var i=new Date(e.toISOString());i.setDate(i.getDate()+r),n[r]=this.getDayAsString(i)}return n}timestampStringToFormattedString(t){var e;let r=this.toDate(this.normalize(t,n.ISO_DATE_TIME));return null!==(e=null==r?void 0:r.toLocaleString(this.getLocale()+"-u-hc-h23",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}))&&void 0!==e?e:`cannot format date time: ${t}`}formattedStringToTimestampString(t){return this.formattedStringToCustomDateTime(t,n.ISO_DATE_TIME,!0)}formattedStringToCustomDateTime(t,e,r){return this.isValidFormattedStringTime(t,r,!1)?this.format(this.normalize(t,n.ISO_TIME),e):""}timeStringToFormattedString(t,e,r){const i={hour:"2-digit",minute:"2-digit",hour12:!1};return 1==e&&(i.second="2-digit"),function(t,e,n,r,i){if(null==r)return e.toLocaleTimeString(i.getLocale()+"-u-hc-h23",n);switch(r){case"I13":case"I12":break;case"I11":case"I14":case"I1H":case"I1M":case"I21":case"I22":case"I23":case"I24":case"I2H":case"I2D":case"I2M":return t}return e.toLocaleTimeString(i.getLocale()+"-u-hc-h23",n)}(t,this.toDate(this.normalize(t,n.ISO_TIME)),i,r,this)}register(t){this.managedComponents.add(t.rootElement?t.rootElement:t)}unregister(t){this.managedComponents&&this.managedComponents.delete(t.rootElement?t.rootElement:t)}}export{n as K,g as a,t as b,i as c,e as d,s as g}
@@ -0,0 +1 @@
1
+ import{r as t,c as i,f as n,h as e,H as l,d as o}from"./p-710d0a7d.js";import{F as s}from"./p-14c6efce.js";import{F as a,e as u}from"./p-26e0046e.js";import{F as h,k as r,ae as c,g as p,s as f,b as d,aj as m,a8 as v,ap as b,am as _,ao as k,an as x,aq as g,h as y,W as w}from"./p-10a3d9cb.js";import{F as j}from"./p-7db300e0.js";import{F as O,a as $}from"./p-cec0955d.js";import{c as M}from"./p-635bb4b3.js";import"./p-e3062c19.js";import"./p-cce08de3.js";import"./p-31ae78d1.js";import"./p-ebcf1f74.js";import"./p-c24e94cb.js";import"./p-070a0dac.js";import"./p-a78c9d39.js";import"./p-c56195a0.js";var z,T,E,S,C;!function(t){t.TAB="tab"}(z||(z={})),function(t){t.customStyle="Custom style of the component.",t.data="Actual data of the input panel.",t.hiddenSubmitButton="Creates a hidden submit button in order to submit the form with enter.",t.commandBarPosition="Manage the position of the command bar (submit button and other commands).",t.submitCb="Sets the callback function on submit form",t.optionsHandler="Sets the callback function to recieve options",t.buttonPosition="Manage the position of the buttons related to the input panel content. It is an enumeration",t.inputPanelPosition="Manage the global layout of the input panel fields. The default is COLUMNS.",t.autoSkip="Sets the auto skip between input text fields when the value reaches the max length.",t.autoFocus="Sets whether the first input should receive focus.",t.fieldReset="Create e Reset button for the form"}(T||(T={})),function(t){t.COLUMNS="COLUMNS",t.INLINE="INLINE",t.STRETCHED="STRETCHED",t.UPINLINE="UPINLINE",t.UPCOLUMNS="UPCOLUMNS",t.PLACEHOLDER="PLACEHOLDER"}(E||(E={})),function(t){t.CENTER="CENTER",t.LEFT="LEFT",t.BOTTOM="BOTTOM",t.RIGHT="RIGHT",t.TOP="TOP"}(S||(S={})),function(t){t.BLUR="blur",t.ITEMCLICK="itemclick"}(C||(C={}));const W={blur:t=>t===h.CHECKBOX||t===h.SWITCH||t===h.COMBOBOX||t===h.AUTOCOMPLETE,itemclick:t=>t!==h.COMBOBOX&&t!==h.AUTOCOMPLETE},K=12/1.4,L=(t,i)=>0==t?K/2:t?1===t?1.5*K+(i?18:0):t*K+(i?18:0)+4:null,D=t=>t?20*t:null,I=(t,i)=>t?t>(null==i?void 0:i.absoluteRow)?20*((null==i?void 0:i.absoluteRow)-1)+2*((null==i?void 0:i.absoluteRow)-1)+D(i.absoluteHeight)+20*(t-((null==i?void 0:i.absoluteRow)+(null==i?void 0:i.absoluteHeight)-1)-1):20*(t-1)+2*(t-1):null,R=t=>t?10*(t-1)*1.15:null;var F,N,P,H,A,J,U,V,B,G,q,X,Y,Q,Z,tt,it,nt,et,lt,ot,st,at,ut,ht,rt,ct,pt,ft,dt,mt,vt,bt,_t,kt,xt,gt,yt,wt,jt,Ot,$t,Mt,zt,Tt,Et,St,Ct,Wt,Kt,Lt,Dt,It,Rt,Ft,Nt,Pt,Ht,At,Jt,Ut,Vt,Bt,Gt,qt,Xt,Yt,Qt,Zt,ti,ii,ni,ei,li,oi,si,ai,ui=function(t,i,n,e){if("a"===n&&!e)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof i?t!==i||!e:!i.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?e:"a"===n?e.call(t):e?e.value:i.get(t)},hi=function(t,i,n,e,l){if("m"===e)throw new TypeError("Private method is not writable");if("a"===e&&!l)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof i?t!==i||!l:!i.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===e?l.call(t,n):l?l.value=n:i.set(t,n),n};const ri=document.documentElement,ci=class{constructor(n){t(this,n),this.kupReady=i(this,"kup-input-panel-ready",6),this.kupDataTableContextMenu=i(this,"kup-inputpanel-contextmenu",6),this.kupInputPanelObjectFieldSearchPayload=i(this,"kup-inputpanel-objectfield-searchpayload",6),this.kupInputPanelObjectFieldOpenSearchMenu=i(this,"kup-inputpanel-objectfield-opensearchmenu",6),this.kupInputPanelObjectFieldSelectedMenuItem=i(this,"kup-inputpanel-objectfield-selectedmenuitem",6),this.kupCellUpload=i(this,"kup-inputpanel-upload",6),F.add(this),N.set(this,r()),P.set(this,void 0),H.set(this,new Map([["SmeupDataTree",ui(this,F,"m",Jt).bind(this)],["SmeupDataTable",ui(this,F,"m",Ut).bind(this)]])),A.set(this,null),J.set(this,[]),U.set(this,new Map([[c.DATE,"kup-date-picker"],[c.TIME,"kup-time-picker"]])),V.set(this,new Map([[c.COMBOBOX,"kup-combobox"],[c.AUTOCOMPLETE,"kup-autocomplete"]])),B.set(this,new Map([[h.BUTTON_LIST,ui(this,F,"m",et).bind(this)],[h.LABEL,ui(this,F,"m",st).bind(this)],[h.TABLE,ui(this,F,"m",ot).bind(this)]])),G.set(this,new Map([[z.TAB,ui(this,F,"m",ft).bind(this)]])),q.set(this,void 0),X.set(this,void 0),Y.set(this,null),it.set(this,(()=>{ui(this,Y,"f")&&(ui(this,Y,"f").remove(),hi(this,Y,null,"f"))})),nt.set(this,((t,i)=>{ui(this,Y,"f")?(ui(this,Y,"f").style.left=`${t.clientX+10}px`,ui(this,Y,"f").style.top=`${t.clientY+10}px`,ui(this,Y,"f").innerText=i):(hi(this,Y,document.createElement("div"),"f"),ui(this,Y,"f").className="input-panel__helper-tooltip",ui(this,Y,"f").innerText=i,ui(this,Y,"f").style.left=`${t.clientX+10}px`,ui(this,Y,"f").style.top=`${t.clientY+10}px`,document.body.appendChild(ui(this,Y,"f")))})),this.buttonPosition=S.BOTTOM,this.customStyle="",this.dashboardMode=!1,this.data=null,this.hiddenSubmitButton=!1,this.commandBarPosition=void 0,this.inputPanelPosition=E.COLUMNS,this.submitCb=null,this.optionsHandler=null,this.customButtonClickHandler=null,this.checkValidObjCallback=null,this.checkValidValueCallback=null,this.autoFocus=!1,this.autoSkip=!1,this.updateOnClick=!1,this.fieldReset=!1,this.inputPanelCells=[],this.inputPanelCommands=[],this.tabSelected=null}onDataChanged(){hi(this,A,structuredClone(this.data),"f"),ui(this,J,"f").length&&(ui(this,J,"f").map((({event:t,handler:i})=>{this.rootElement.removeEventListener(t,i)})),hi(this,J,[],"f")),this.data&&this.data.columns&&this.data.rows&&ui(this,F,"m",_t).call(this,this.data)}listenKeydown(t){if("Enter"===t.key){t.preventDefault(),t.stopPropagation();const i=this.rootElement.shadowRoot.activeElement;"enter"===t.key.toLowerCase()&&i&&(null==i||i.blur(),this.submitCb({value:{before:Object.assign({},ui(this,A,"f")),after:ui(this,F,"m",gt).call(this)}}))}}async waitForReady(){return ui(this,q,"f")}async getProps(t){return p(this,T,t)}async refresh(){n(this)}async setProps(t){f(this,T,t)}async update(t){ui(this,F,"m",ti).call(this,ui(this,F,"m",Q).call(this,t),t)}onFormReset(){var t;for(const i of this.data.columns){const n=ui(this,F,"m",Q).call(this,i.name);n.shape!==h.MULTI_AUTOCOMPLETE&&n.shape!==h.MULTI_COMBOBOX||!(null===(t=n.data)||void 0===t?void 0:t.data)||(n.data.data=[]),n.value="",n.decode="",n.data.initialValue&&(n.data.initialValue="")}this.refresh()}connectedCallback(){hi(this,q,new Promise((t=>{hi(this,X,t,"f")})),"f")}componentWillLoad(){ui(this,N,"f").debug.logLoad(this,!1),ui(this,N,"f").language.register(this),ui(this,N,"f").theme.register(this),this.onDataChanged()}componentDidLoad(){ui(this,F,"m",ei).call(this),this.kupReady.emit({comp:this,id:this.rootElement.id}),ui(this,F,"m",li).call(this),ui(this,N,"f").debug.logLoad(this,!0)}componentWillRender(){ui(this,N,"f").debug.logRender(this,!1)}componentDidRender(){if(ui(this,P,"f")){const t=ui(this,P,"f").querySelectorAll(".f-text-field");for(let i=0;i<t.length;i++)j(t[i])}requestAnimationFrame((async()=>{ui(this,P,"f")&&ui(this,X,"f")&&(ui(this,X,"f").call(this),hi(this,X,null,"f"))})),ui(this,N,"f").debug.logRender(this,!0)}render(){const t=Boolean(!this.inputPanelCells.length)?[e("p",null,ui(this,N,"f").language.translate(d.EMPTY_DATA))]:this.inputPanelCells.map((t=>ui(this,F,"m",Z).call(this,t)));return e(l,{key:"fc3ef78246aa009565b2090da6f8247e585af7b2","onKup-cell-blur":t=>ui(this,F,"m",Xt).call(this,t,C.BLUR),"onKup-cell-update":ui(this,F,"m",Yt).bind(this),"onKup-tabbar-click":t=>{this.tabSelected=t.detail.node.id},"onKup-autocomplete-input":ui(this,F,"m",zt).bind(this),"onKup-autocomplete-iconclick":ui(this,F,"m",zt).bind(this),"onKup-combobox-iconclick":t=>ui(this,F,"m",zt).call(this,t,!0),"onKup-cell-itemclick":t=>{ui(this,F,"m",Xt).call(this,t,C.ITEMCLICK)},"onKup-objectfield-searchpayload":t=>{this.kupInputPanelObjectFieldSearchPayload.emit(t.detail)},"onKup-objectfield-opensearchmenu":t=>{this.kupInputPanelObjectFieldOpenSearchMenu.emit(t.detail)},"onKup-objectfield-selectedmenuitem":t=>{this.kupInputPanelObjectFieldSelectedMenuItem.emit(t.detail)},"onKup-file-upload-upload":ui(this,F,"m",ai).bind(this)},e("style",{key:"d8f6037fcd40ab16a45bad9af2f860ccf96ac2ea"},ui(this,N,"f").theme.setKupStyle(this.rootElement)),e("div",{key:"938d54844c4b36baf9403cdceb0e5ab10ad5475e",id:M},t))}disconnectedCallback(){ui(this,N,"f").language.unregister(this),ui(this,N,"f").theme.unregister(this)}get rootElement(){return o(this)}static get watchers(){return{data:["onDataChanged"]}}};N=new WeakMap,P=new WeakMap,H=new WeakMap,A=new WeakMap,J=new WeakMap,U=new WeakMap,V=new WeakMap,B=new WeakMap,G=new WeakMap,q=new WeakMap,X=new WeakMap,Y=new WeakMap,it=new WeakMap,nt=new WeakMap,F=new WeakSet,Q=function(t){return t?this.inputPanelCells.reduce(((i,{cells:n})=>{if(!i){const i=n.find((({column:i})=>i.name===t));return i?i.cell:null}return i}),null):null},Z=function(t){var i,n,l;const o=t.row.layout,a=(null==o?void 0:o.horizontal)||!1,u={};let r;if(null===(i=null==o?void 0:o.sections)||void 0===i?void 0:i.length)if(o.absolute)r=ui(this,F,"m",ht).call(this,t,o),u.height=`${(t=>{var i,n;if(!t)return 0;const e=null!==(n=null===(i=t.sections.flatMap((t=>t.content)).find((t=>t.shape===h.TABLE)))||void 0===i?void 0:i.absoluteHeight)&&void 0!==n?n:null,l=Math.max(0,...t.sections.flatMap((t=>t.content.map((t=>t.absoluteRow+(t.absoluteHeight-1))))));return e?22*(l-e)+20*e:22*l})(o)}px`;else{if(!o.sectionsType){const i=o.sections.some((t=>t.dim));u.display="grid",this.inputPanelPosition!==E.INLINE&&this.inputPanelPosition!==E.UPINLINE||(u.display=""),o.horizontal?u.gridTemplateColumns=i?o.sections.map((t=>t.dim||"auto")).join(" "):`repeat(${t.cells.length}, 1fr)`:this.dashboardMode&&(u.gridTemplateRows=i?o.sections.map((t=>t.dim||"auto")).join(" "):`repeat(${o.sections.length}, 1fr)`)}r=ui(this,F,"m",ut).call(this,t,o)}else r=t.cells.filter((({column:t})=>!1!==t.visible)).map((i=>ui(this,F,"m",tt).call(this,i.cell,t.row,i.column)));const c={"input-panel-form":!0,"input-panel-form--inline":this.buttonPosition==S.RIGHT},p={"input-panel":!0,"input-panel--column":!a,"input-panel--absolute":null==o?void 0:o.absolute,"input-panel--inline":this.inputPanelPosition===E.INLINE||this.inputPanelPosition===E.UPINLINE},f={"input-panel__commands":!0,[`input-panel__commands--${this.buttonPosition}`]:!0};return e("div",null,e("form",{name:this.rootElement.id,id:this.rootElement.id,class:c,ref:t=>hi(this,P,t,"f"),onSubmit:t=>{t.preventDefault(),this.submitCb({value:{before:Object.assign({},ui(this,A,"f")),after:ui(this,F,"m",gt).call(this)}})},onReset:t=>{t.preventDefault(),this.onFormReset()},onContextMenu:t=>{null!=ui(this,F,"m",ii).call(this,t)&&t.preventDefault()}},1==(null===(n=null==o?void 0:o.sections)||void 0===n?void 0:n.length)&&(null===(l=null==o?void 0:o.sections[0])||void 0===l?void 0:l.title)&&e("div",{class:"input-panel__typography"},e(O,{value:o.sections[0].title,type:$.HEADING1})),e("div",{class:p,style:u},r),e("div",{class:f},e(s,{buttonType:"submit",label:ui(this,N,"f").language.translate(d.CONFIRM),wrapperClass:"form__submit",invisible:this.hiddenSubmitButton}),this.fieldReset&&e(s,{buttonType:"reset",label:"Reset",wrapperClass:"form__submit",icon:"broom"}),this.inputPanelCommands)))},tt=function(t,i,n){var l,o;if(!t)return;const s=ui(this,B,"f").get(t.shape);if(void 0!==s)return s(t,n,null===(l=i.layout)||void 0===l?void 0:l.absolute);t.data=Object.assign(Object.assign({},t.data),{sizing:"extra-small",labelHelper:n.helper});const u=null===(o=t.data)||void 0===o?void 0:o.data;u&&(Object.keys(u).includes("kup-text-field")?u["kup-text-field"].labelHelper=n.helper:u["kup-text-field"]={labelHelper:n.helper});const h={cell:t,column:n,row:i,editable:!0,component:this,renderKup:!0,setSizes:!0},r=ui(this,F,"m",at).call(this,t,n.title),c=e(a,Object.assign({},h));return r?e("div",{class:{"input-panel__label_container":!0}},r,c):c},et=function(t,{name:i}){return e(s,Object.assign({icon:t.icon,placeholderIcon:t.placeholderIcon,id:i},t.data,{wrapperClass:"form__submit"}))},lt=function(t,i){return e("kup-dropdown-button",Object.assign({},t.data,{label:t.value,data:i,"onkup-dropdownbutton-itemclick":t=>{ui(this,F,"m",ti).call(this,t.detail.node,t.detail.node.id)}}))},ot=function(t,{name:i}){for(const i of t.data.data.rows)for(const t of Object.keys(i.cells)){const n=i.cells[t];n.shape===h.AUTOCOMPLETE&&(n.data.DescrMode="CodeOnly",n.data.selectMode="CodeOnly")}return e("kup-data-table",Object.assign({id:i,editableData:!0,showGroups:!0,showFilters:!0},t.data,{"onKup-autocomplete-iconclick":t=>{t.preventDefault(),t.stopPropagation()},"onKup-autocomplete-input":t=>{t.preventDefault(),t.stopPropagation()},"onKup-datatable-cell-iconclick":t=>{ui(this,F,"m",zt).call(this,t),t.preventDefault(),t.stopPropagation()},"onKup-datatable-cell-input":t=>{"autocomplete"===t.detail.type&&ui(this,F,"m",zt).call(this,t),t.preventDefault(),t.stopPropagation()},"onKup-cell-itemclick":t=>{ui(this,F,"m",qt).call(this,t),t.preventDefault(),t.stopPropagation()}}))},st=function(t,i,n){const l=ri.ketchup.objects.isNumber(t.obj),o=l||ri.ketchup.objects.isDate(t.obj)||ri.ketchup.objects.isTime(t.obj)||ri.ketchup.objects.isTimestamp(t.obj),s=["input-panel-label"];n&&s.push("input-panel-label--legacy-look"),l&&s.push("input-panel-label-number");const a=o?m(i,t):t.decode?t.decode:t.value;return e("span",{class:s.join(" "),id:i.name},e(u,{style:t.style,text:a}))},at=function(t,i){return i&&ri.ketchup.data.cell.getType(t,t.shape)===c.RADIO?e("span",null,i):null},ut=function(t,i){const n=ui(this,G,"f").get(i.sectionsType);return n?n(t,i.sections):i.sections.map((i=>ui(this,F,"m",rt).call(this,t,i,!1)))},ht=function(t,i){return i.sections.map((i=>ui(this,F,"m",ct).call(this,t,i)))},rt=function t(i,n,l=!1,o={}){var s,a;const u={"input-panel__section":!n.horizontal,"input-panel__horizontal-section":n.horizontal,"input-panel__section-inline":this.inputPanelPosition===E.INLINE||this.inputPanelPosition===E.UPINLINE};o.gap=+n.gap>0?`${n.gap}rem`:"1rem";let h=[];if(null===(s=n.sections)||void 0===s?void 0:s.length){h=n.sections.map((n=>ui(this,F,"m",t).call(this,i,n))).filter(Boolean);const e=n.sections.some((t=>t.dim));!n.gridCols&&n.horizontal&&(o.gridTemplateColumns=e?n.sections.map((t=>t.dim||"auto")).join(" "):`repeat(${n.sections.length}, 1fr)`),n.gridRows||n.horizontal||!this.dashboardMode||(o.gridTemplateRows=e?n.sections.map((t=>t.dim||"auto")).join(" "):`repeat(${n.sections.length}, 1fr)`)}else(null===(a=n.content)||void 0===a?void 0:a.length)&&(h=n.content.map((t=>ui(this,F,"m",mt).call(this,i,t))).filter(Boolean),o.gridTemplateColumns=+n.gridCols>0?`repeat(${n.gridCols}, 1fr)`:"",this.dashboardMode&&(o.gridTemplateRows=+n.gridRows>0?`repeat(${n.gridRows}, 1fr)`:""));const r=h.length?e("div",{class:u,style:o},h):void 0;return n.title&&!l?e("div",{class:{"input-panel__section_label_container":!0}},e(O,{type:$.HEADING1,value:n.title}),r):r},ct=function t(i,n){var l,o;let s=[];if(null===(l=n.sections)||void 0===l?void 0:l.length)s=n.sections.map((n=>ui(this,F,"m",t).call(this,i,n)));else if(null===(o=n.content)||void 0===o?void 0:o.length){const t=n.content.find((t=>t.shape===h.TABLE)),e=t?{absoluteRow:t.absoluteRow,absoluteHeight:t.absoluteHeight}:{};s=n.content.map((t=>ui(this,F,"m",vt).call(this,i,t,e)))}if(null==L(n.absoluteWidth))return s;const a=null!=L(n.absoluteWidth)?`${L(n.absoluteWidth)}px`:"100%",u=null!=D(n.absoluteHeight)?`${D(n.absoluteHeight)}px`:"100%",r=`${I(n.absoluteRow)}px`,c=`${R(n.absoluteColumn)}px`;return e("div",{style:{position:"relative",width:a,"min-width":a,"max-width":a,height:u,"min-height":u,"max-height":u,top:r,left:c,overflow:"auto"}},s)},pt=function t(i){var n,e;let l=[];return(null===(n=i.content)||void 0===n?void 0:n.length)&&i.content.forEach((t=>{t.id&&l.push(t.id)})),(null===(e=i.sections)||void 0===e?void 0:e.length)&&i.sections.forEach((i=>{l=l.concat(ui(this,F,"m",t).call(this,i))})),l},ft=function(t,i){this.tabSelected||(this.tabSelected=i[0].id||"0");const n=i.map(((i,n)=>{const e=ui(this,F,"m",pt).call(this,i),l=t.cells.some((t=>{var i;const n=t.cell;return e.includes(t.column.name)&&!!(null===(i=n.data)||void 0===i?void 0:i.error)}));return{active:(i.id||`${n}`)===this.tabSelected,value:i.title,icon:l?"error":i.icon,id:i.id||`${n}`,danger:l}})),l=i.map(((i,n)=>{const e=i.id||`${n}`;return ui(this,F,"m",rt).call(this,t,i,!0,{display:this.tabSelected!==e?"none":"grid"})}));return e("div",{class:{"input-panel__tabs_container":!0}},e("kup-tab-bar",{data:n,customStyle:".tab-bar .tab-scroller .tab .tab__content { justify-content: flex-start; }"}),l)},dt=function(t){return!t||!t.cell||!1===t.column.visible},mt=function(t,i){const n=t.cells.find((t=>t.column.name===i.id));if(ui(this,F,"m",dt).call(this,n))return;const l=+i.colSpan>0?i.colSpan:+i.colSpan>0||+i.colStart>0?null:1,o=+i.rowSpan>0?i.rowSpan:+i.rowSpan>0||+i.rowStart>0?null:1;return e("div",{style:{"min-width":"0","grid-column-start":l?`span ${l}`:`${i.colStart}`,"grid-column-end":+i.colEnd>0?`${i.colEnd}`:"","grid-row-start":o?`span ${o}`:`${i.rowStart}`,"grid-row-end":+i.rowEnd>0?`${i.rowEnd}`:""}},ui(this,F,"m",tt).call(this,n.cell,t.row,n.column))},vt=function(t,i,n){const l=t.cells.find((t=>t.column.name===i.id));if(ui(this,F,"m",dt).call(this,l))return;let o;o=l.cell.shape==h.DATE?l.cell.value?l.cell.value.length:i.absoluteLength>8?i.absoluteLength:8:i.absoluteLength,i.absoluteHeight||(i.absoluteHeight=1);const s=l.cell.shape===h.LABEL?(t=>0==t?K/2:t?1===t?1.5*K:t*K:null)(o):l.cell.shape===h.CHECKBOX?15:L(o,(a=l.cell.shape)===h.AUTOCOMPLETE||a===h.COMBOBOX||a===h.DATE);var a;const u=D(i.absoluteHeight),r=I(i.absoluteRow,n),c=R(i.absoluteColumn),p={position:"absolute",width:null!=s?`${s}px`:null,"min-width":null!=s?`${s}px`:null,"max-width":null!=s?`${s}px`:null,height:null!=u?`${u}px`:null,"min-height":null!=u?`${u}px`:null,"max-height":null!=u?`${u}px`:null,top:null!=r?`${r}px`:null,left:null!=c?`${c}px`:null,overflow:"hidden"};return l.cell.data=Object.assign(Object.assign(Object.assign({},l.cell.data),{customStyle:(l.cell.data.customStyle||"")+".mdc-text-field {height: unset !important;}",legacyLook:!0,helperEnabled:!1}),l.cell.shape===h.TABLE&&{rowsPerPage:l.cell.data.data.rows.length,showPaginator:!1,showFooter:!1,tableHeight:`${u}px`}),e("div",{style:p},ui(this,F,"m",tt).call(this,l.cell,t.row,l.column))},bt=function(){this.inputPanelCommands=this.data.setup.commands.map((t=>{if((null==t?void 0:t.children)&&(null==t?void 0:t.children.length)>0){const i={"kup-list":{showIcons:!0,data:t.children.map((t=>ui(this,F,"m",Vt).call(this,t)))}};return ui(this,F,"m",lt).call(this,t,i)}{const i=ui(this,F,"m",Vt).call(this,t);return ui(this,F,"m",et).call(this,i,{name:t.value,title:t.value})}})).flat()},_t=function(t){var i,n,e,l;const o=null===(i=null==t?void 0:t.rows[0])||void 0===i?void 0:i.layout,s=(null===(n=null==t?void 0:t.rows)||void 0===n?void 0:n.length)?t.rows.reduce(((i,n)=>[...i,{cells:t.columns.map((t=>{const i=structuredClone(n.cells[t.name]);return{column:t,cell:i?Object.assign(Object.assign({},i),{data:ui(this,F,"m",kt).call(this,i,t,o),slotData:ui(this,F,"m",wt).call(this,i,t),isEditable:!0}):null}})),row:n}]),[]):[];s.map((({cells:t})=>t.map((({cell:t,column:i})=>{var n;const e=ri.ketchup.data.cell.getType(t,t.shape),l=ui(this,U,"f").get(e),o=ui(this,V,"f").get(e);if(!l&&!o)return;const s=(null!=l?l:o)+`[id='${i.name.replace(/\//g,"\\$1")}']`,a=this.rootElement.shadowRoot.querySelector(s);o?null==a||a.reset():null===(n=null==a?void 0:a.setValue)||void 0===n||n.call(a,t.value)})))),this.inputPanelCells=s,(null===(l=null===(e=t.setup)||void 0===e?void 0:e.commands)||void 0===l?void 0:l.length)&&ui(this,F,"m",bt).call(this)},kt=function(t,i,n){const e=Object.assign(Object.assign({},ui(this,F,"m",yt).call(this,t,i,n)),{disabled:!t.isEditable||i.useAs===v.KEY,id:i.name}),l=ri.ketchup.data.cell.getType(t,t.shape),o=function(t,i){var n={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&i.indexOf(e)<0&&(n[e]=t[e]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var l=0;for(e=Object.getOwnPropertySymbols(t);l<e.length;l++)i.indexOf(e[l])<0&&Object.prototype.propertyIsEnumerable.call(t,e[l])&&(n[e[l]]=t[e[l]])}return n}(t.data||{},["data"]);return l!==c.MULTI_AUTOCOMPLETE&&l!==c.MULTI_COMBOBOX?ui(this,F,"m",xt).call(this,e,Object.assign({},t.data)):Object.assign(Object.assign({},e),o)},xt=function t(i,n){for(const e in n)i[e]=n[e]instanceof Object&&!Array.isArray(n[e])&&e in i?ui(this,F,"m",t).call(this,i[e],n[e]):n[e];return i},gt=function(){return this.inputPanelCells.reduce(((t,i)=>{const n=Object.keys(i.row.cells).reduce(((t,n)=>{var e;const l=null===(e=i.cells.find((t=>t.column.name===n)))||void 0===e?void 0:e.cell;let o=null==l?void 0:l.value;return(null==l?void 0:l.shape)===h.TABLE&&(o=JSON.stringify(ui(this,F,"m",Ht).call(this,l.data.data,n))),Object.assign(Object.assign({},t),{[n]:Object.assign(Object.assign({},i.row.cells[n]),{value:o,obj:null==l?void 0:l.obj})})}),{});return{columns:[...t.columns,...i.cells.map((t=>t.column))],rows:[...t.rows,{cells:n,layout:i.row.layout}]}}),{columns:[],rows:[]})},yt=function(t,i,n){if(!t)return null;const e=t.options;let l;l=(null==n?void 0:n.absolute)?null:i.title;const o=t.value,s=ri.ketchup.data.cell.getType(t,t.shape),a=new Map([[c.AUTOCOMPLETE,ui(this,F,"m",Mt).bind(this)],[c.BUTTON_LIST,ui(this,F,"m",$t).bind(this)],[c.CHART,ui(this,F,"m",Ot).bind(this)],[c.CHIP,ui(this,F,"m",jt).bind(this)],[c.CHECKBOX,ui(this,F,"m",Et).bind(this)],[c.COLOR_PICKER,ui(this,F,"m",St).bind(this)],[c.COMBOBOX,ui(this,F,"m",Mt).bind(this)],[c.EDITOR,ui(this,F,"m",Ct).bind(this)],[c.MULTI_AUTOCOMPLETE,ui(this,F,"m",jt).bind(this)],[c.MULTI_COMBOBOX,ui(this,F,"m",jt).bind(this)],[c.NUMBER,ui(this,F,"m",Nt).bind(this)],[c.DATE,ui(this,F,"m",Dt).bind(this)],[c.OBJECT,ui(this,F,"m",It).bind(this)],[c.RADIO,ui(this,F,"m",Kt).bind(this)],[c.STRING,ui(this,F,"m",Wt).bind(this)],[c.SWITCH,ui(this,F,"m",Lt).bind(this)],[c.TABLE,ui(this,F,"m",Pt).bind(this)],[c.TIME,ui(this,F,"m",Ft).bind(this)],[c.IMAGE_LIST,ui(this,F,"m",Rt).bind(this)]]).get(s);return a?a(e,l,o,t,i.name,n):null},wt=function(t,i){var n;const e=ri.ketchup.data.cell.getType(t,t.shape);if(e===c.CHIP)return{trailingIcon:!0,label:i.title,disabled:!t.isEditable,id:i.name,fullWidth:!1};if(e===c.MULTI_AUTOCOMPLETE||e===c.MULTI_COMBOBOX){const e=Object.assign(Object.assign({},ui(this,F,"m",Mt).call(this,t.options,i.title,null,t)),{showDropDownIcon:!0,class:"",style:{width:"100%"},disabled:!t.isEditable,id:i.name});return(null===(n=null==e?void 0:e.data)||void 0===n?void 0:n["kup-text-field"])&&(e.data["kup-text-field"].labelHelper=i.helper),e}return null},jt=function(t,i,n,e){return b(n,e.decode)},Ot=function(){return{data:{sizeX:"50px",offlineMode:{value:"8;4;5"},id:"i1012_GREF_0",cellId:"i1012_GREF_0",sizeY:"50px"}}},$t=function(t,i,n,e,l){var o,s,a,u;return e.data=e.data||{},e.data.onClick=()=>{ui(this,F,"m",ti).call(this,e,l)},e.data.mappedCommandId&&(e.isEditable=!0,e.data.onClick=()=>{ui(this,F,"m",ti).call(this,e,e.data.mappedCommandId)},this.data.setup.commands=null===(a=null===(s=null===(o=this.data)||void 0===o?void 0:o.setup)||void 0===s?void 0:s.commands)||void 0===a?void 0:a.filter((t=>t.value!==e.data.mappedCommandId))),Object.assign({label:null!==(u=e.decode)&&void 0!==u?u:e.value,fun:e.fun},e.data)},Mt=function(t,i,n,e){const l=_(n,i,[],e.data);return t&&(l.data["kup-list"].data=ui(this,F,"m",At).call(this,t,n)),l},zt=function({detail:t},i=!1){if(ui(this,F,"m",Tt).call(this,t))ui(this,F,"m",Gt).call(this,t);else{const n=ui(this,F,"m",Q).call(this,t.id);let e=!0;i&&(e=!t.comp.data["kup-list"].data.length),e&&!n.options&&ui(this,F,"m",Bt).call(this,t,n)}},Tt=function(t){return!!t.cell},Et=function(t,i,n){return k(n,i)},St=function(t,i,n,e){return{data:{"kup-text-field":{label:i,error:e.data.error}}}},Ct=function(t,i,n){return{initialValue:n}},Wt=function(t,i,n,e,l){var o;const s=Object.assign({label:i},e.data);return this.autoSkip&&e.isEditable&&(null===(o=e.data)||void 0===o?void 0:o.maxLength)&&(s.onInput=t=>{ui(this,F,"m",si).call(this,l,t)}),s},Kt=function(t,i,n,e){const l=(()=>{var t;if(e.data.data)return null===(t=e.data.data.rows)||void 0===t?void 0:t.map((t=>{const i=t.fields||t.cells,[e,l]=Object.keys(i);return{id:i[e].value,label:l?i[l].value:i[e].value,selected:n===i[e].value}}))})(),o=x(n,l);return l?o:e.data},Lt=function(t,i,n){return g(n,i)},Dt=function(t,i,n){return{data:{"kup-text-field":{label:i}},initialValue:null!=n?n:""}},It=function(t,i,n){return{initialValue:n||"",label:i||" ",value:n||""}},Rt=function(t,i,n){return{initialValue:n||"",leadingLabel:i||"",value:n||""}},Ft=function(t,i,n){return{data:{"kup-text-field":{label:i}},initialValue:n}},Nt=function(t,i){return{label:i}},Pt=function(t,i,n,e,l,o){try{let t=JSON.parse(e.value);return t?"SmeupDataTable"!==t.type?(ui(this,N,"f").debug.logMessage(this,`Wrong data table type for ${l} cell. Type \`SmeupDataTable\` in value expected`,y.ERROR),null):{data:{columns:t.columns.map((i=>{var n;if(t.rows.length>0){const e=null===(n=t.rows[0].cells[i.name])||void 0===n?void 0:n.obj;return!i.obj&&e?Object.assign(Object.assign({},i),{obj:{t:e.t,p:e.p}}):i}return i})),rows:t.rows.map((i=>Object.assign(Object.assign({},i),{cells:Object.keys(i.cells).reduce(((n,e)=>{const l=t.columns.find((t=>t.name===e));return Object.assign(Object.assign({},n),{[e]:Object.assign(Object.assign({},i.cells[e]),{data:Object.assign(Object.assign(Object.assign({},ui(this,F,"m",yt).call(this,i.cells[e],l,o)),{disabled:!1===i.cells[e].editable,id:l.id}),i.cells[e].data)})})}),{})})))}}:(ui(this,N,"f").debug.logMessage(this,`Empty value for ${l} cell.`,y.WARNING),null)}catch(t){return ui(this,N,"f").debug.logMessage(this,`Invalid value for ${l} cell. Type \`SmeupDataTable\` expected`,y.ERROR),null}},Ht=function(t,i){const n=Object.assign(Object.assign({},t),{rows:t.rows.map((t=>Object.assign(Object.assign({},t),{cells:{}})))}),e=t.columns.filter((t=>t.isEditable)).map((t=>t.name));if(!e.length)return n;try{const l=JSON.parse(ui(this,A,"f").rows[0].cells[i].value);return n.rows=t.rows.map(((t,i)=>e.reduce(((n,e)=>{const o=l.rows[i].cells[e]&&t.cells[e].value!==l.rows[i].cells[e].value;return Object.assign(Object.assign({},l.rows[i]),o?{cells:Object.assign(Object.assign({},n.cells),{[e]:Object.assign(Object.assign({},l.rows[i].cells[e]),{value:t.cells[e].value})})}:{cells:n.cells})}),Object.assign(Object.assign({},l.rows[i]),{cells:{}})))),n}catch(t){return n}},At=function(t,i){const n=ui(this,H,"f").get(t.type);return n?n(t,i):t.map((t=>({value:t.value,id:t.value,decode:t.decode,selected:i===t.value})))},Jt=function t(i,n){return i.children.map((i=>{var e;return{id:i.value,value:i.value,decode:i.decode,selected:n===i.value,children:(null===(e=i.children)||void 0===e?void 0:e.length)?ui(this,F,"m",t).call(this,i,n):[]}}))},Ut=function(t,i){return t.rows.map((t=>{const n=t.fields||t.cells,[e,l]=Object.keys(n);return{id:n[e].value,value:n[e].value,decode:l?n[l].decode?n[l].decode:n[l].value:n[e].value,selected:i===n[e].value}}))},Vt=function(t){return Object.assign(Object.assign({},t),{data:ui(this,F,"m",$t).call(this,null,null,t.decode,t,t.value),id:t.value})},Bt=function(t,i){this.optionsHandler(i.fun,t.inputValue,ui(this,F,"m",gt).call(this),t.id).then((n=>{var e,l,o,s,a,u;const r=(null===(e=null==n?void 0:n.columns)||void 0===e?void 0:e.filter((t=>!1!==(null==t?void 0:t.visible))).map((t=>t.name)))||[],c=null===(l=null==n?void 0:n.rows)||void 0===l?void 0:l.map((t=>{const{cells:i}=t,n=r.reduce(((n,e)=>(t.cells.hasOwnProperty(e)&&(n[e]=i[e]),n)),{});return Object.assign(Object.assign({},t),{cells:n})})),p=Object.assign(Object.assign({},n),{rows:c}),f=i.shape===h.MULTI_AUTOCOMPLETE?i.slotData.data["kup-list"]:null===(s=null===(o=i.data)||void 0===o?void 0:o.data)||void 0===s?void 0:s["kup-list"];f?(f.data=(null==c?void 0:c.length)&&null!==(a=ui(this,F,"m",At).call(this,p,i.value))&&void 0!==a?a:[],f.options=null!==(u=null==n?void 0:n.columns)&&void 0!==u?u:[]):ui(this,N,"f").debug.logMessage(this,'getAutocompleteEventCallback() - "kup-list" not found in cell.data.data',y.WARNING),t.comp.refresh()}))},Gt=function(t){const{cell:i,row:n,column:e,comp:l,id:o,event:s}=t,a=null==i?void 0:i.value,u=t.event.detail;try{this.optionsHandler(i.fun,u.inputValue,{columns:l.data.columns,rows:[n]},e.name).then((t=>{var i,u,h,r,c,p,f;if(t){const d=(null!==(i=null==t?void 0:t.columns)&&void 0!==i?i:[]).filter((t=>!1!==(null==t?void 0:t.visible))).map((t=>t.name)),m=null!==(h=null===(u=null==t?void 0:t.rows)||void 0===u?void 0:u.map((t=>{const i=d.reduce(((i,n)=>(t.cells[n]&&(i[n]=t.cells[n]),i)),{});return Object.assign(Object.assign({},t),{cells:i})})))&&void 0!==h?h:[],v=Object.assign(Object.assign({},t),{rows:m}),b=l.data,_=b.rows[n.id].cells[e.name];(null===(c=null===(r=_.data)||void 0===r?void 0:r.data)||void 0===c?void 0:c["kup-list"])||(_.data={data:{"kup-list":{},"kup-text-field":Object.assign({},_.data)}});const k=_.data.data["kup-list"];k.data=m.length&&null!==(p=ui(this,F,"m",At).call(this,v,a))&&void 0!==p?p:[],k.options=null!==(f=t.columns)&&void 0!==f?f:[],l.data=b,this.data.rows[0].cells[o].value=JSON.stringify(b),s.detail.comp.refresh(),l.refresh()}}))}catch(t){console.error("Error in autocomplete callback:",t)}},qt=function(t){const{cell:i,row:n,column:e,id:l,comp:o}=t.detail,s=o.data;s.rows[n.id].cells[e.name]=i,o.data=s,this.data.rows[0].cells[l].value=JSON.stringify(s),t.detail.event.detail.comp.refresh(),o.refresh()},Xt=async function(t,i){var n,e,l,o,s;const{detail:{column:a,cell:u}}=t;if(W[i](null==u?void 0:u.shape))return;const h=ui(this,F,"m",Q).call(this,a.name),r=ui(this,A,"f").rows[0].cells[a.name];if(h){if(u.mandatory){if(ui(this,F,"m",Qt).call(this,a.name,h.value?(null===(n=r.data)||void 0===n?void 0:n.error)||null:ui(this,N,"f").language.translate(d.REQUIRED_VALUE)),!u.value)return}else ui(this,F,"m",Qt).call(this,a.name,(null===(e=r.data)||void 0===e?void 0:e.error)||null);if(null===(l=u.inputSettings)||void 0===l?void 0:l.checkObject){const{valid:t}=await this.checkValidObjCallback({obj:u.obj,value:u.value,currentState:ui(this,F,"m",gt).call(this),fun:u.fun});if(!t)return void ui(this,F,"m",Qt).call(this,a.name,ui(this,N,"f").language.translate(d.INVALID_VALUE));ui(this,F,"m",Qt).call(this,a.name,(null===(o=r.data)||void 0===o?void 0:o.error)||null)}(null===(s=u.inputSettings)||void 0===s?void 0:s.checkValueOnExit)&&ui(this,F,"m",Zt).call(this)&&this.checkValidValueCallback({before:Object.assign({},ui(this,A,"f")),after:ui(this,F,"m",gt).call(this)},a.name)}},Yt=function({detail:{cell:t,column:i}}){var n;t.shape!==h.CHECKBOX&&t.shape!==h.SWITCH||(this.updateOnClick?this.submitCb({value:{before:Object.assign({},ui(this,A,"f")),after:ui(this,F,"m",gt).call(this)},cell:i.name}):(null===(n=t.inputSettings)||void 0===n?void 0:n.checkValueOnExit)&&this.checkValidValueCallback({before:Object.assign({},ui(this,A,"f")),after:ui(this,F,"m",gt).call(this)},i.name))},Qt=function(t,i){this.inputPanelCells=this.inputPanelCells.map((n=>Object.assign(Object.assign({},n),{cells:n.cells.map((({cell:n,column:e})=>{const l=e.name===t?Object.assign(Object.assign({},n.data),{error:i}):n.data;return{column:e,cell:Object.assign(Object.assign({},n),{data:l})}}))})))},Zt=function(){return this.inputPanelCells.some((({cells:t,row:i})=>t.some((({cell:t,column:{name:n}})=>t.value!==i.cells[n].value))))},ti=function(t,i){(null==t?void 0:t.fun)?this.customButtonClickHandler({fun:t.fun,cellId:i,currentState:ui(this,F,"m",gt).call(this)}):this.submitCb({value:{before:Object.assign({},ui(this,A,"f")),after:ui(this,F,"m",gt).call(this)},cell:i})},ii=function(t){return ui(this,N,"f").getEventPath(t.target,this.rootElement).find((t=>{var i;return null===(i=t.classList)||void 0===i?void 0:i.contains("f-cell")}))},ni=function(t){const i=ui(this,F,"m",ii).call(this,t);if(null==i)return;const n=ui(this,F,"m",gt).call(this),e=i["kup-get-cell-props"]().column.name;return{anchor:i,cell:n.rows[0].cells[e],column:n.columns.find((t=>t.name==e)),row:n.rows[0],originalEvent:t}},ei=function(){ui(this,P,"f")&&(ui(this,N,"f").interact.managedElements.add(ui(this,P,"f")),ui(this,N,"f").interact.on(ui(this,P,"f"),w.TAP,(t=>{if(2==t.button){const i=ui(this,F,"m",ni).call(this,t);i&&this.kupDataTableContextMenu.emit({comp:this,id:this.rootElement.id,details:i})}})))},li=function(){if(!ui(this,P,"f"))return;const t=Array.from(ui(this,P,"f").querySelectorAll(".f-cell__content"));for(const i of t){const t=ui(this,F,"m",oi).call(this,i,!0);if(t)return void setTimeout((()=>t.focus()),300)}if(!this.autoFocus||0===t.length)return;const i=ui(this,F,"m",oi).call(this,t[0]);i&&setTimeout((()=>i.focus()),300)},oi=function(t,i=!1){if(!(t&&t instanceof HTMLElement))return;const n=".mdc-text-field__input",e=i?`.mdc-text-field--error ${n}`:n,l=t.querySelector(e);if(l)return l;const o=Array.from(t.querySelectorAll("*")).filter((t=>t.shadowRoot));for(const t of o){const i=t.shadowRoot.querySelector(e);if(i)return i}},si=function(t,i){var n,e;const l=null==i?void 0:i.target;if(!(l&&l instanceof HTMLInputElement))return;const{maxLength:o,value:s}=l;if(!o||o<0||(null==s?void 0:s.length)<o)return;const a=Array.from(null===(n=ui(this,P,"f"))||void 0===n?void 0:n.querySelectorAll(".f-text-field")).reduce(((t,i)=>{const n=i.querySelector("input");return n?(t.push({id:(null==i?void 0:i.id)||"",HTMLInputElement:n}),t):t}),[]);if(!a.length)return;const u=a.findIndex((i=>i.id===t));u<0||u===a.length-1||null===(e=a[u+1].HTMLInputElement)||void 0===e||e.focus()},ai=function(t){t.stopPropagation(),this.kupCellUpload.emit(t.detail)},ci.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:var(--kup-label-01-font-size, 12px);line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-compact-01-font-size, 14px);line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-01-font-size, 14px);line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{--kup-fcell-width:fit-content;--kup_input_panel_background_color:var(\n --kup-input-panel-background-color,\n var(--kup-layer-0)\n );--kup_input_panel_color:var(\n --kup-input-panel-color,\n var(--kup-text-secondary)\n );--kup_input_panel_font_family:var(\n --kup-input-panel-font-family,\n var(--kup-font-family)\n );--kup_input_panel_font_size:var(\n --kup-input-panel-font-size,\n var(--kup-font-size)\n );--kup_textfield_textarea_height_input_panel:var(\n --kup-textfield-textarea-height-input_panel,\n 200px\n );--kup_textfield_textarea_width_input_panel:var(\n --kup-textfield-textarea-width-input_panel,\n 300px\n );--kup_input_panel_label_alignment:var(--kup-input-panel-label-alignment);--kup_input_panel_label_width:var(--kup-input-panel-label-width);--kup_input_panel_padding:var(--kup-input-panel-padding, 1em 0);--kup_input_panel_padding--inline:var(\n --kup-input-panel-padding--inline,\n 1em 0\n );--kup_input_panel_absolute_max_height:var(\n --kup-input-panel-absolute-max-height,\n \n 716px\n )}:host .input-panel{background:var(--kup_input_panel_background_color);color:var(--kup_input_panel_color);display:flex;flex-grow:1;overflow:auto;padding:var(--kup_input_panel_padding);position:relative;gap:8px}:host .input-panel__commands{display:flex;gap:1rem}:host .input-panel__commands.input-panel__commands--right{flex-shrink:0;overflow:hidden}:host .input-panel--inline{flex:1;overflow-x:auto;white-space:nowrap;padding:var(--kup_input_panel_padding--inline);display:inline-flex;align-items:flex-end}:host .input-panel--column{flex-direction:column}:host .input-panel__section_label_container{display:flex;flex-direction:column;gap:1rem}:host .input-panel__section{display:grid;min-width:0}:host .input-panel__section .f-cell__content>*{width:100%}:host .input-panel .f-text-field .mdc-text-field.mdc-text-field--textarea{min-height:var(--kup_textfield_textarea_height_input_panel) !important;min-width:var(--kup_textfield_textarea_width_input_panel) !important}:host .input-panel__horizontal-section{display:inline-grid}:host .input-panel__section-inline{display:inline-block;width:max-content}:host .input-panel__label_container{display:flex;flex-direction:column;justify-content:center}:host .input-panel__label_container>.f-cell{flex:1}:host .input-panel__tabs_container{display:flex;flex-direction:column;justify-content:center;gap:2rem}:host .input-panel .f-cell.number-cell .f-cell__content{--kup-textfield-font-family:var(--kup_cell_font_family);font-family:var(--kup_cell_font_family)}:host .input-panel .input-panel-label{display:flex;width:100%;height:100%;align-items:center;justify-content:center}:host .input-panel .input-panel-label--legacy-look{font-size:12px;font-family:var(--kup-font-family-monospace);white-space:pre;overflow:hidden}:host .input-panel--absolute{justify-content:flex-end;padding:var(--kup-space-02);max-height:var(--kup_input_panel_absolute_max_height);--kup-textfield-extrasmall-height:20px;--kup-textfield-extrasmall-padding:0 var(--kup-space-01)}:host .input-panel--absolute .input-panel-label{justify-content:start}:host .input-panel--absolute .input-panel-label.input-panel-label-number{justify-content:end}:host .input-panel--absolute .mdc-text-field{height:unset !important}:host .input-panel-form--inline{display:flex;align-items:end;gap:1rem}:host .input-panel__helper-icon{cursor:help;height:16px;opacity:0.375;position:absolute;right:-18px;top:-2px;width:16px}";export{ci as kup_input_panel}
@@ -1 +1 @@
1
- import{a as e}from"./p-adadf8b5.js";const r=e=>"year"===e?120:60,t=(e,r)=>{for(let t=0;t<r.length;t++)if(r[t].id===e)return r[t]},n=(e,r)=>{for(let t=0;t<r.length;t++){if(o(r[t]))continue;const n=r[t];if(n.phases)for(let r=0;r<n.phases.length;r++)if(n.phases[r].id===e)return n.phases[r]}},o=e=>e&&e.schedule&&0!==e.schedule.length,a=(e,{id:r,start:t,end:n,startHour:o,endHour:a})=>e.map((e=>e.id===r?y(e,t,n,o,a):e)),s=(e,{id:r,start:t,end:n,startHour:o,endHour:a})=>{if(e)return e.map((e=>e.id===r?y(e,t,n,o,a):e))},d=(r,t,n)=>{var a;if(o(r))return[Object.assign({},u(r,t,n))];{const t=new e,n=r,{start:o,end:s}=t.validDates(n.startDate,n.endDate,n.name),{start:d,end:u}=t.validDates(n.secondaryStartDate,n.secondaryEndDate,n.name);return[{start:o,end:s,id:n.id,name:n.name,type:n.type,valuesToShow:n.valuesToShow,secondaryStart:d,secondaryEnd:u,progress:100,isDisabled:!1,hideChildren:!1,icon:n.icon,startHour:r.startHour,endHour:r.endHour,secondaryStartHour:r.secondaryStartHour,secondaryEndHour:r.secondaryEndHour},...(null!==(a=n.phases)&&void 0!==a?a:[]).map(c)]}},c=r=>(({startDate:t,endDate:n,secondaryStartDate:o,secondaryEndDate:a,name:s,id:d,color:c,selectedColor:u,dependencies:y,icon:l,startHour:i,endHour:H,secondaryStartHour:m,secondaryEndHour:h})=>{const f=new e,{start:S,end:b}=f.validDates(t,n,s),{start:w,end:k}=f.validDates(o,a,s);return{start:S,end:b,secondaryStart:w,secondaryEnd:k,name:s,valuesToShow:r.valuesToShow,id:d,type:"task",progress:100,dependencies:y,styles:c?{backgroundColor:c,progressColor:c,backgroundSelectedColor:u,progressSelectedColor:u}:{},icon:l,startHour:i,endHour:H,secondaryStartHour:m,secondaryEndHour:h}})(r),u=(r,t,n)=>{const o=new e,{id:a,name:s,schedule:d}=r,{start:c,end:u}=(e=>{let r=null!=t?t:"",a=null!=n?n:"";for(let t=0;t<e.schedule.length;t++){const n=e.schedule[t].startDate,o=e.schedule[t].endDate;(!r||n.localeCompare(r)<0)&&(r=n),(!a||o.localeCompare(a)>0)&&(a=o)}return o.validDates(r,a,"detail item")})(r),y="#595959";return{id:a,type:"timeline",timeline:d.map((e=>{const{startDate:r,endDate:t,color:n,selectedColor:a,icon:s}=e,{start:d,end:c}=o.validDates(r,t,"time frame");return{start:d,end:c,backgroundColor:null!=n?n:"0xffffff",backgroundSelectedColor:null!=a?a:n,icon:s}})),name:s,valuesToShow:r.valuesToShow,start:c,end:u,progress:100,styles:{backgroundColor:y,progressColor:y,backgroundSelectedColor:y,progressSelectedColor:y}}},y=(r,t,n,o,a)=>{const s=new e,d={startDate:s.formatToIsoDate(t),endDate:s.formatToIsoDate(n),startHour:o,endHour:a};return Object.assign(Object.assign({},r),d)},l=(e,r,t,n,o)=>{const a=i(e,r,null!=o?o:1,t);if(n){const e=m(n,r,null!=o?o:1,t);e[0]<a[0]&&(a[0]=e[0]),e[1]>a[1]&&(a[1]=e[1])}return{displayedStartDate:a[0],displayedEndDate:a[1]}},i=(r,t,n,o)=>{const a=[],s=new e;return r.forEach((e=>{var r;a.push({start:s.parseToDayStart(e.startDate),end:s.parseToDayEnd(e.endDate),secondaryStart:s.parseToDayStart(e.secondaryStartDate),secondaryEnd:s.parseToDayEnd(e.secondaryEndDate),startHour:e.startHour,endHour:e.endHour,secondaryStartHour:e.secondaryStartHour,secondaryEndHour:e.secondaryEndHour}),null===(r=e.phases)||void 0===r||r.forEach((r=>{a.push({start:s.parseToDayStart(r.startDate),end:s.parseToDayEnd(r.endDate),secondaryStart:s.parseToDayStart(r.secondaryStartDate),secondaryEnd:s.parseToDayEnd(r.secondaryEndDate),startHour:e.startHour,endHour:e.endHour,secondaryStartHour:e.secondaryStartHour,secondaryEndHour:e.secondaryEndHour})}))})),H(a,t,n,o,!0)},H=(e,r,t,n,o)=>{let a=e.length>0?e[0].start:new Date,s=e.length>0?e[0].end:new Date;for(const r of e)r.start<a&&(a=r.start),r.end>s&&(s=r.end),n&&(r.secondaryStart&&r.secondaryStart<a&&(a=r.secondaryStart),r.secondaryEnd&&r.secondaryEnd>s&&(s=r.secondaryEnd));if(o)return[a,s];switch(r){case"year":a=h(a,-1,"year"),a=f(a,"year"),s=h(s,1,"year"),s=f(s,"year");break;case"month":a=h(a,-1*t,"month"),a=f(a,"month"),s=h(s,1,"month"),s=f(s,"month");break;case"week":a=f(a,"day"),a=h(S(a),-7*t,"day"),s=f(s,"day"),s=h(s,1.5,"month");break;case"day":a=f(a,"day"),a=h(a,-1*t,"day"),s=f(s,"day"),s=h(s,19,"day");break;case"hour":a=f(a,"hour"),a=h(a,-1*t,"hour"),s=f(s,"day"),s=h(s,1,"day")}return[a,s]},m=(r,t,n,o)=>{const a=[],s=new e;return r.forEach((e=>{const r=e.schedule;r&&r.forEach((e=>{a.push({start:s.parseToDayStart(e.startDate),end:s.parseToDayEnd(e.endDate),secondaryStart:void 0,secondaryEnd:void 0})}))})),H(a,t,n,o,!0)},h=(e,r,t)=>new Date(e.getFullYear()+("year"===t?r:0),e.getMonth()+("month"===t?r:0),e.getDate()+("day"===t?r:0),e.getHours()+("hour"===t?r:0),e.getMinutes()+("minute"===t?r:0),e.getSeconds()+("second"===t?r:0),e.getMilliseconds()+("millisecond"===t?r:0)),f=(e,r)=>{const t=["millisecond","second","minute","hour","day","month","year"],n=e=>{const n=t.indexOf(r);return t.indexOf(e)<=n};return new Date(e.getFullYear(),n("year")?0:e.getMonth(),n("month")?1:e.getDate(),n("day")?0:e.getHours(),n("hour")?0:e.getMinutes(),n("minute")?0:e.getSeconds(),n("second")?0:e.getMilliseconds())},S=e=>{const r=e.getDay(),t=e.getDate()-r+(0===r?-6:1);return new Date(e.setDate(t))},b=(e,r,t,n,o,a)=>{const s=[];return e.forEach((e=>{s.push({start:e.start,end:e.end,secondaryStart:e.secondaryStart,secondaryEnd:e.secondaryEnd,startHour:e.startHour,endHour:e.endHour,secondaryStartHour:e.secondaryStartHour,secondaryEndHour:e.secondaryEndHour})})),o&&a&&s.push({start:o,end:a,secondaryStart:void 0,secondaryEnd:void 0}),H(s,r,t,n)},w=(e,r,t)=>{let n=new Date(e);const o=[n];for(;n<r;){switch(t){case"year":n=h(n,1,"year");break;case"month":n=h(n,1,"month");break;case"week":n=h(n,7,"day");break;case"day":n=h(n,1,"day");break;case"hour":n=h(n,1,"hour")}o.push(n)}return o};export{d as a,t as b,l as c,s as d,r as e,b as f,n as g,a as m,w as s}
1
+ import{a as e}from"./p-a78c9d39.js";const r=e=>"year"===e?120:60,t=(e,r)=>{for(let t=0;t<r.length;t++)if(r[t].id===e)return r[t]},n=(e,r)=>{for(let t=0;t<r.length;t++){if(o(r[t]))continue;const n=r[t];if(n.phases)for(let r=0;r<n.phases.length;r++)if(n.phases[r].id===e)return n.phases[r]}},o=e=>e&&e.schedule&&0!==e.schedule.length,a=(e,{id:r,start:t,end:n,startHour:o,endHour:a})=>e.map((e=>e.id===r?y(e,t,n,o,a):e)),s=(e,{id:r,start:t,end:n,startHour:o,endHour:a})=>{if(e)return e.map((e=>e.id===r?y(e,t,n,o,a):e))},d=(r,t,n)=>{var a;if(o(r))return[Object.assign({},u(r,t,n))];{const t=new e,n=r,{start:o,end:s}=t.validDates(n.startDate,n.endDate,n.name),{start:d,end:u}=t.validDates(n.secondaryStartDate,n.secondaryEndDate,n.name);return[{start:o,end:s,id:n.id,name:n.name,type:n.type,valuesToShow:n.valuesToShow,secondaryStart:d,secondaryEnd:u,progress:100,isDisabled:!1,hideChildren:!1,icon:n.icon,startHour:r.startHour,endHour:r.endHour,secondaryStartHour:r.secondaryStartHour,secondaryEndHour:r.secondaryEndHour},...(null!==(a=n.phases)&&void 0!==a?a:[]).map(c)]}},c=r=>(({startDate:t,endDate:n,secondaryStartDate:o,secondaryEndDate:a,name:s,id:d,color:c,selectedColor:u,dependencies:y,icon:l,startHour:i,endHour:H,secondaryStartHour:m,secondaryEndHour:h})=>{const f=new e,{start:S,end:b}=f.validDates(t,n,s),{start:w,end:k}=f.validDates(o,a,s);return{start:S,end:b,secondaryStart:w,secondaryEnd:k,name:s,valuesToShow:r.valuesToShow,id:d,type:"task",progress:100,dependencies:y,styles:c?{backgroundColor:c,progressColor:c,backgroundSelectedColor:u,progressSelectedColor:u}:{},icon:l,startHour:i,endHour:H,secondaryStartHour:m,secondaryEndHour:h}})(r),u=(r,t,n)=>{const o=new e,{id:a,name:s,schedule:d}=r,{start:c,end:u}=(e=>{let r=null!=t?t:"",a=null!=n?n:"";for(let t=0;t<e.schedule.length;t++){const n=e.schedule[t].startDate,o=e.schedule[t].endDate;(!r||n.localeCompare(r)<0)&&(r=n),(!a||o.localeCompare(a)>0)&&(a=o)}return o.validDates(r,a,"detail item")})(r),y="#595959";return{id:a,type:"timeline",timeline:d.map((e=>{const{startDate:r,endDate:t,color:n,selectedColor:a,icon:s}=e,{start:d,end:c}=o.validDates(r,t,"time frame");return{start:d,end:c,backgroundColor:null!=n?n:"0xffffff",backgroundSelectedColor:null!=a?a:n,icon:s}})),name:s,valuesToShow:r.valuesToShow,start:c,end:u,progress:100,styles:{backgroundColor:y,progressColor:y,backgroundSelectedColor:y,progressSelectedColor:y}}},y=(r,t,n,o,a)=>{const s=new e,d={startDate:s.formatToIsoDate(t),endDate:s.formatToIsoDate(n),startHour:o,endHour:a};return Object.assign(Object.assign({},r),d)},l=(e,r,t,n,o)=>{const a=i(e,r,null!=o?o:1,t);if(n){const e=m(n,r,null!=o?o:1,t);e[0]<a[0]&&(a[0]=e[0]),e[1]>a[1]&&(a[1]=e[1])}return{displayedStartDate:a[0],displayedEndDate:a[1]}},i=(r,t,n,o)=>{const a=[],s=new e;return r.forEach((e=>{var r;a.push({start:s.parseToDayStart(e.startDate),end:s.parseToDayEnd(e.endDate),secondaryStart:s.parseToDayStart(e.secondaryStartDate),secondaryEnd:s.parseToDayEnd(e.secondaryEndDate),startHour:e.startHour,endHour:e.endHour,secondaryStartHour:e.secondaryStartHour,secondaryEndHour:e.secondaryEndHour}),null===(r=e.phases)||void 0===r||r.forEach((r=>{a.push({start:s.parseToDayStart(r.startDate),end:s.parseToDayEnd(r.endDate),secondaryStart:s.parseToDayStart(r.secondaryStartDate),secondaryEnd:s.parseToDayEnd(r.secondaryEndDate),startHour:e.startHour,endHour:e.endHour,secondaryStartHour:e.secondaryStartHour,secondaryEndHour:e.secondaryEndHour})}))})),H(a,t,n,o,!0)},H=(e,r,t,n,o)=>{let a=e.length>0?e[0].start:new Date,s=e.length>0?e[0].end:new Date;for(const r of e)r.start<a&&(a=r.start),r.end>s&&(s=r.end),n&&(r.secondaryStart&&r.secondaryStart<a&&(a=r.secondaryStart),r.secondaryEnd&&r.secondaryEnd>s&&(s=r.secondaryEnd));if(o)return[a,s];switch(r){case"year":a=h(a,-1,"year"),a=f(a,"year"),s=h(s,1,"year"),s=f(s,"year");break;case"month":a=h(a,-1*t,"month"),a=f(a,"month"),s=h(s,1,"month"),s=f(s,"month");break;case"week":a=f(a,"day"),a=h(S(a),-7*t,"day"),s=f(s,"day"),s=h(s,1.5,"month");break;case"day":a=f(a,"day"),a=h(a,-1*t,"day"),s=f(s,"day"),s=h(s,19,"day");break;case"hour":a=f(a,"hour"),a=h(a,-1*t,"hour"),s=f(s,"day"),s=h(s,1,"day")}return[a,s]},m=(r,t,n,o)=>{const a=[],s=new e;return r.forEach((e=>{const r=e.schedule;r&&r.forEach((e=>{a.push({start:s.parseToDayStart(e.startDate),end:s.parseToDayEnd(e.endDate),secondaryStart:void 0,secondaryEnd:void 0})}))})),H(a,t,n,o,!0)},h=(e,r,t)=>new Date(e.getFullYear()+("year"===t?r:0),e.getMonth()+("month"===t?r:0),e.getDate()+("day"===t?r:0),e.getHours()+("hour"===t?r:0),e.getMinutes()+("minute"===t?r:0),e.getSeconds()+("second"===t?r:0),e.getMilliseconds()+("millisecond"===t?r:0)),f=(e,r)=>{const t=["millisecond","second","minute","hour","day","month","year"],n=e=>{const n=t.indexOf(r);return t.indexOf(e)<=n};return new Date(e.getFullYear(),n("year")?0:e.getMonth(),n("month")?1:e.getDate(),n("day")?0:e.getHours(),n("hour")?0:e.getMinutes(),n("minute")?0:e.getSeconds(),n("second")?0:e.getMilliseconds())},S=e=>{const r=e.getDay(),t=e.getDate()-r+(0===r?-6:1);return new Date(e.setDate(t))},b=(e,r,t,n,o,a)=>{const s=[];return e.forEach((e=>{s.push({start:e.start,end:e.end,secondaryStart:e.secondaryStart,secondaryEnd:e.secondaryEnd,startHour:e.startHour,endHour:e.endHour,secondaryStartHour:e.secondaryStartHour,secondaryEndHour:e.secondaryEndHour})})),o&&a&&s.push({start:o,end:a,secondaryStart:void 0,secondaryEnd:void 0}),H(s,r,t,n)},w=(e,r,t)=>{let n=new Date(e);const o=[n];for(;n<r;){switch(t){case"year":n=h(n,1,"year");break;case"month":n=h(n,1,"month");break;case"week":n=h(n,7,"day");break;case"day":n=h(n,1,"day");break;case"hour":n=h(n,1,"hour")}o.push(n)}return o};export{d as a,t as b,l as c,s as d,r as e,b as f,n as g,a as m,w as s}
@@ -0,0 +1 @@
1
+ import{h as o}from"./p-710d0a7d.js";import{a as t,k as e,e as n}from"./p-10a3d9cb.js";import{F as c}from"./p-14c6efce.js";import{a as i}from"./p-e3062c19.js";import{F as l}from"./p-070a0dac.js";const s=new WeakMap,a=e=>{var n;let s;return o("div",{class:`f-object-field ${e.wrapperClass?e.wrapperClass:""}`,ref:async o=>{o&&(e.root=o,p(e))}},o("div",{class:"fields-wrapper"},o(l,Object.assign({icon:"search",trailingIcon:!0,disabled:!1},null===(n=e.cell)||void 0===n?void 0:n.data,{attachHelperSection:o=>(s=o,!1),value:e.inputValue,onChange:e.onChange,onIconClick:d.icon.bind(e),onInput:d.input.bind(e),onKeyDown:d.keydown.bind(e)})),o(c,{icon:"menu",onClick:d.button.bind(e),sizing:t.SMALL,styling:i.FLAT,wrapperClass:"obj-field-extra-btn"})),s,o("kup-toolbar",{"onKup-toolbar-click":d.toolbar.bind(e)}))};function r(o){const{cell:t}=o,n=s.get(t),{clickCb:c}=n,{toolbar:i}=u(n),l=e();l.dynamicPosition.stop(i),l.removeClickCallback(c),i.style.display="none",n.isListOpened=!1}const u=o=>{const{children:t,clickCb:e,root:n}=o;return Object.keys(o.children).length||(t.button=n.querySelector(".f-button"),t.textfield=n.querySelector(".f-text-field"),t.toolbar=n.querySelector("kup-toolbar"),e.el=t.toolbar),t},p=o=>{const{cell:t,root:e}=o,n=s.get(t);s.set(t,n?Object.assign(Object.assign({},n),{root:e,children:u(n)}):{children:{},clickCb:{cb:r.bind(r,o)},inputValue:o.inputValue,isListOpened:!1,root:e})},b=(o,t,e)=>{const{cell:n,column:c,row:i,root:l}=o,{children:a,inputValue:r}=s.get(n),u=new CustomEvent(t,{bubbles:!0,cancelable:!0,composed:!0,detail:{cell:n,children:a,column:c,inputValue:r,originalEvent:e,row:i}});l.dispatchEvent(u)},d={button:function(o){(function(o){const{cell:t}=o,c=s.get(t),{isListOpened:i}=c;i?r(o):function(o){const{cell:t}=o,c=s.get(t),{isListOpened:i,clickCb:l}=c,{button:a,toolbar:r}=u(c);if(i)return;const p=e();p.dynamicPosition.isRegistered(r)?p.dynamicPosition.changeAnchor(r,a):p.dynamicPosition.register(r,a,0,n.AUTO,!1),p.dynamicPosition.start(r),p.addClickCallback(l,!0),r.style.display="block",c.isListOpened=!0}(o)})(this),b(this,"kup-objectfield-opensearchmenu",o)},icon:function(o){b(this,"kup-objectfield-searchpayload",o)},input:function(o){const{cell:t}=this;s.get(t).inputValue=o.target.value},keydown:function(o){"F4"===o.code&&(o.preventDefault(),o.stopPropagation(),b(this,"kup-objectfield-searchpayload",o))},toolbar:function(o){r(this),b(this,"kup-objectfield-selectedmenuitem",o)}};export{a as F}