@sme.up/ketchup 9.6.0 → 9.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/dist/cjs/{f-paginator-utils-67dbc14c.js → f-paginator-utils-f32382f6.js} +4 -4
  2. package/dist/cjs/ketchup.cjs.js +1 -1
  3. package/dist/cjs/kup-autocomplete_27.cjs.entry.js +1 -1
  4. package/dist/cjs/kup-box.cjs.entry.js +70 -8
  5. package/dist/cjs/kup-calendar.cjs.entry.js +4 -2
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/collection/assets/index.js +4 -0
  8. package/dist/collection/assets/planner-example-4.js +4 -4
  9. package/dist/collection/assets/planner-example-5.js +3175 -0
  10. package/dist/collection/components/kup-box/kup-box-declarations.js +11 -0
  11. package/dist/collection/components/kup-box/kup-box-state.js +2 -0
  12. package/dist/collection/components/kup-box/kup-box.js +169 -9
  13. package/dist/collection/components/kup-calendar/kup-calendar.js +4 -2
  14. package/dist/components/kup-autocomplete2.js +1 -1
  15. package/dist/components/kup-box2.js +74 -8
  16. package/dist/components/kup-button-list.js +1 -1
  17. package/dist/components/kup-button.js +1 -1
  18. package/dist/components/kup-calendar.js +5 -3
  19. package/dist/components/kup-card.js +1 -1
  20. package/dist/components/kup-chart.js +1 -1
  21. package/dist/components/kup-checkbox.js +1 -1
  22. package/dist/components/kup-chip.js +1 -1
  23. package/dist/components/kup-color-picker.js +1 -1
  24. package/dist/components/kup-combobox.js +1 -1
  25. package/dist/components/kup-dashboard.js +1 -1
  26. package/dist/components/kup-data-table.js +1 -1
  27. package/dist/components/kup-date-picker.js +1 -1
  28. package/dist/components/kup-dialog.js +1 -1
  29. package/dist/components/kup-dropdown-button.js +1 -1
  30. package/dist/components/kup-family-tree.js +1 -1
  31. package/dist/components/kup-form.js +1 -1
  32. package/dist/components/kup-gauge.js +1 -1
  33. package/dist/components/kup-image-list.js +1 -1
  34. package/dist/components/kup-image.js +1 -1
  35. package/dist/components/kup-list.js +1 -1
  36. package/dist/components/kup-magic-box.js +1 -1
  37. package/dist/components/kup-numeric-picker.js +1 -1
  38. package/dist/components/kup-planner.js +1 -1
  39. package/dist/components/kup-progress-bar.js +1 -1
  40. package/dist/components/kup-radio.js +1 -1
  41. package/dist/components/kup-rating.js +1 -1
  42. package/dist/components/kup-snackbar.js +1 -1
  43. package/dist/components/kup-spinner.js +1 -1
  44. package/dist/components/kup-switch.js +1 -1
  45. package/dist/components/kup-tab-bar.js +1 -1
  46. package/dist/components/kup-text-field.js +1 -1
  47. package/dist/components/kup-time-picker.js +1 -1
  48. package/dist/components/kup-tree.js +1 -1
  49. package/dist/esm/{f-paginator-utils-f5f4c666.js → f-paginator-utils-10fa5a7d.js} +1 -1
  50. package/dist/esm/ketchup.js +1 -1
  51. package/dist/esm/kup-autocomplete_27.entry.js +1 -1
  52. package/dist/esm/kup-box.entry.js +70 -8
  53. package/dist/esm/kup-calendar.entry.js +4 -2
  54. package/dist/esm/loader.js +1 -1
  55. package/dist/ketchup/ketchup.esm.js +1 -1
  56. package/dist/ketchup/p-060ae996.entry.js +1 -0
  57. package/dist/ketchup/{p-b086727d.entry.js → p-11d5400a.entry.js} +1 -1
  58. package/dist/ketchup/{p-6001882e.entry.js → p-b3067fd0.entry.js} +1 -1
  59. package/dist/ketchup/{p-68e9379a.js → p-dba484b8.js} +1 -1
  60. package/dist/types/components/kup-box/kup-box-declarations.d.ts +12 -0
  61. package/dist/types/components/kup-box/kup-box-state.d.ts +2 -0
  62. package/dist/types/components/kup-box/kup-box.d.ts +26 -1
  63. package/dist/types/components/kup-calendar/kup-calendar-declarations.d.ts +1 -0
  64. package/dist/types/components.d.ts +48 -6
  65. package/package.json +1 -1
  66. package/dist/ketchup/p-d1268ac7.entry.js +0 -1
@@ -1,4 +1,4 @@
1
- import{r as t,c as i,f as e,h as s,H as o,d as r,g as n}from"./p-1ad7fea0.js";import{k as a,g as l,s as h,a as c,b as u,c as d,d as p,F as f,e as b,f as m,h as k,i as g,j as v,l as y,m as w,n as x,o as _,p as z,q as C,r as j,t as W,u as O,v as D,w as M,x as T,G as S,S as P,y as I,z as R,A as E,B as L,C as F,D as N,E as K,L as A,P as V,H,T as B,I as Y,J as X,M as G,N as U,O as q,Q as J,R as Z,U as Q,V as tt,W as it,X as et,Y as st,Z as ot,_ as rt,$ as nt,a0 as at,a1 as lt,a2 as ht,a3 as ct,a4 as ut,a5 as dt}from"./p-610a03d4.js";import{F as pt}from"./p-ccc637ee.js";import{F as ft}from"./p-b3577066.js";import{I as bt,F as mt,K as kt,a as gt,b as vt,c as yt,d as wt,e as xt}from"./p-a9b06bb8.js";import{c as _t}from"./p-635bb4b3.js";import{F as zt}from"./p-102866cd.js";import{F as Ct}from"./p-e43d4ccc.js";import{F as jt}from"./p-c634eb82.js";import{e as $t,K as Wt,b as Ot,a as Dt}from"./p-de07d17e.js";import{F as Mt,a as Tt}from"./p-7bda0684.js";import{M as St}from"./p-d4a879fc.js";import{F as Pt}from"./p-dc18691c.js";import{F as It,a as Rt,c as Et,n as Lt,p as Ft,f as Nt,g as Kt,s as At,b as Vt,d as Ht,r as Bt,t as Yt,K as Xt,e as Gt}from"./p-68e9379a.js";var Ut,qt;function Jt(t,i,e){return i==bt.CODE?t.id:i==bt.DESCRIPTION?t.value:i==bt.DESCRIPTION_AND_CODE?t.id+e+t.value:t.id}function Zt(t,i,e,s,o,r){const n=!!(e&&i&&i.data);let a="",l="",h=null;null!=r&&(h=r.detail.selected),null==h&&null!=t&&n&&(h=function(t,i,e){if(t&&t.data){let s=!1,o=null;for(let r=0;r<t.data.length;r++){let n=Jt(t.data[r],e," - ");t.data[r].selected=!1,s||n.toString().toLowerCase()!=i.toString().toLowerCase()||(o=t.data[r],o.selected=!0,s=!0)}if(1==s)return o}return function(t,i){if(t&&t.data){let e=!1,s=null;for(let o=0;o<t.data.length;o++)t.data[o].selected=!1,e||t.data[o].id.toString().toLowerCase()!=i.toString().toLowerCase()||(s=t.data[o],s.selected=!0,e=!0);if(1==e)return s;for(let o=0;o<t.data.length;o++)if(t.data[o].value.toString().toLowerCase()==i.toString().toLowerCase()){s=t.data[o],s.selected=!0,e=!0;break}if(1==e)return s}return null}(t,i)}(i,t,o),e.data=[...i.data]),null==h&&null==t&&i&&(h=function(t){if(t.data)for(let i=0;i<t.data.length;i++)if(t.data[i].selected)return t.data[i];return null}(i));let c=null;null==h?(h={id:null==t?"":t,value:null==t?"":t},a=h.id,l=h.id,c=h.id):(a=Jt(h,s," - "),l=Jt(h,o," - "),c=Jt(h,bt.CODE," - "));const u=n?i.data.find((t=>t.id===c)):null;return{value:a,displayedValue:l,node:u,exists:!!u}}!function(t){t.allowInconsistentValues="When true, the autocomplete fires the change event even when the value typed isn't included in the autocomplete list.",t.customStyle="Custom style of the component.",t.data="Props of the sub-components.",t.disabled="Defaults at false. When set to true, the component is disabled.",t.displayMode='Sets how to show the selected item value. Suported values: "code", "description", "both".',t.initialValue="Sets the initial value of the component.",t.inputDelay="Input event emission delay in milliseconds.",t.minimumChars="The minimum number of chars to trigger the autocomplete.",t.selectMode='Sets how to return the selected item value. Suported values: "code", "description", "both".',t.serverHandledFilter="When true, the items filter is managed server side, otherwise items filter is done client side.",t.showDropDownIcon="When true shows the drop-down icon, for open list."}(Ut||(Ut={})),function(t){t.CODE="code",t.DESCRIPTION="description",t.DESCRIPTION_AND_CODE="both"}(qt||(qt={}));var Qt,ti,ii,ei,si,oi,ri,ni,ai,li,hi,ci,ui,di,pi=function(t,i,e,s){if("a"===e&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof i?t!==i||!s:!i.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===e?s:"a"===e?s.call(t):s?s.value:i.get(t)},fi=function(t,i,e,s,o){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof i?t!==i||!o:!i.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?o.call(t,e):o?o.value=e:i.set(t,e),e};const bi=class{constructor(e){t(this,e),this.kupBlur=i(this,"kup-autocomplete-blur",6),this.kupChange=i(this,"kup-autocomplete-change",6),this.kupClick=i(this,"kup-autocomplete-click",6),this.kupFocus=i(this,"kup-autocomplete-focus",6),this.kupInput=i(this,"kup-autocomplete-input",6),this.kupIconClick=i(this,"kup-autocomplete-iconclick",6),this.kupItemClick=i(this,"kup-autocomplete-itemclick",6),Qt.add(this),ti.set(this,!0),ii.set(this,void 0),ei.set(this,null),si.set(this,a()),oi.set(this,void 0),ri.set(this,void 0),ni.set(this,null),ai.set(this,void 0),this.displayedValue=void 0,this.value="",this.allowInconsistentValues=!1,this.customStyle="",this.data=void 0,this.disabled=!1,this.displayMode=bt.DESCRIPTION,this.initialValue="",this.inputDelay=300,this.minimumChars=1,this.selectMode=bt.CODE,this.serverHandledFilter=!1,this.showDropDownIcon=!0}onKupBlur(){this.kupBlur.emit({comp:this,id:this.rootElement.id,value:this.value,inputValue:pi(this,ri,"f").value})}onKupChange(t){fi(this,ti,!0,"f");const i=pi(this,Qt,"m",ui).call(this,t,!0);(i.exists||this.allowInconsistentValues)&&this.kupChange.emit({comp:this,id:this.rootElement.id,value:this.value,inputValue:pi(this,ri,"f").value,node:i.node})}onKupClick(){this.kupClick.emit({comp:this,id:this.rootElement.id,value:this.value,inputValue:pi(this,ri,"f").value})}onKupFocus(){this.kupFocus.emit({comp:this,id:this.rootElement.id,value:this.value,inputValue:pi(this,ri,"f").value})}onKupInput(){fi(this,ti,!0,"f");const t=pi(this,Qt,"m",ui).call(this,pi(this,ri,"f").value,!1);pi(this,Qt,"m",li).call(this,!1),pi(this,ri,"f").value.length>=this.minimumChars&&this.kupInput.emit({comp:this,id:this.rootElement.id,value:this.value,inputValue:pi(this,ri,"f").value,node:t.node})}onKupIconClick(){pi(this,oi,"f").classList.contains("toggled")?pi(this,Qt,"m",hi).call(this):this.showDropDownIcon&&pi(this,Qt,"m",li).call(this,!0),this.kupIconClick.emit({comp:this,id:this.rootElement.id,value:this.value,inputValue:pi(this,ri,"f").value,open:pi(this,oi,"f").classList.contains("toggled")})}onKupItemClick(t){this.onKupChange(t.detail.selected.id),pi(this,Qt,"m",hi).call(this),pi(this,ri,"f")&&pi(this,ri,"f").focus(),this.kupItemClick.emit({comp:this,id:this.rootElement.id,value:this.value,inputValue:pi(this,ri,"f").value,node:t.detail.selected})}listenKeydown(t){if(pi(this,Qt,"m",ci).call(this))switch(t.key){case"ArrowDown":t.preventDefault(),t.stopPropagation(),pi(this,ei,"f").focusNext();break;case"ArrowUp":t.preventDefault(),t.stopPropagation(),pi(this,ei,"f").focusPrevious();break;case"Enter":t.preventDefault(),t.stopPropagation(),pi(this,ei,"f").select().then((()=>{pi(this,Qt,"m",hi).call(this),pi(this,ri,"f").focus()}));break;case"Escape":t.preventDefault(),t.stopPropagation(),pi(this,Qt,"m",hi).call(this)}else switch(t.key){case"ArrowDown":t.preventDefault(),t.stopPropagation(),pi(this,Qt,"m",li).call(this,!1),pi(this,ei,"f").focusNext();break;case"ArrowUp":t.preventDefault(),t.stopPropagation(),pi(this,Qt,"m",li).call(this,!1),pi(this,ei,"f").focusPrevious()}}async getProps(t){return l(this,Ut,t)}async getValue(){return this.value}async refresh(){e(this)}async setFocus(){pi(this,ri,"f").focus()}async setProps(t){h(this,Ut,t)}async setValue(t){fi(this,ti,!0,"f"),pi(this,Qt,"m",ui).call(this,t,!0)}componentWillLoad(){pi(this,si,"f").debug.logLoad(this,!1),pi(this,si,"f").theme.register(this),fi(this,ti,!0,"f"),this.value=this.initialValue,this.data||(this.data={"kup-list":{},"kup-text-field":{}})}componentDidLoad(){pi(this,Qt,"m",ui).call(this,this.value,!0),pi(this,si,"f").debug.logLoad(this,!0)}componentWillRender(){pi(this,si,"f").debug.logRender(this,!1)}componentDidRender(){const t=this.rootElement.shadowRoot;if(t){const i=t.querySelector(".f-text-field");i&&(fi(this,oi,i,"f"),fi(this,ri,i.querySelector("input"),"f"),ft(i))}pi(this,si,"f").debug.logRender(this,!0)}render(){const t=this.rootElement.classList.contains("kup-full-height"),i=this.rootElement.classList.contains("kup-full-width");return s(o,{key:"88774505c1f13b133ce2be0bda250290f6de04a6",class:`${t?"kup-full-height":""} ${i?"kup-full-width":""}`,style:pi(this,ii,"f")},s("style",{key:"2f8ca0e34b61255f0820ca1c9ac36d872642e009"},pi(this,si,"f").theme.setKupStyle(this.rootElement)),s("div",{key:"0cafe0954f744146d3fdd0c8452be08ea2f2193d",id:_t,style:pi(this,ii,"f")},s(pt,Object.assign({key:"6b84b32bd60fbc96c17f88257a439a5134243df1",icon:this.showDropDownIcon?c.DROPDOWN:null,trailingIcon:!0},this.data["kup-text-field"],{disabled:this.disabled,fullHeight:t,fullWidth:i,value:this.displayedValue,onBlur:()=>this.onKupBlur(),onClick:()=>this.onKupClick(),onChange:t=>this.onKupChange(t.target.value),onFocus:()=>this.onKupFocus(),onInput:()=>{window.clearTimeout(pi(this,ai,"f")),fi(this,ai,window.setTimeout((()=>this.onKupInput()),this.inputDelay),"f")},onIconClick:()=>this.onKupIconClick()}))),pi(this,Qt,"m",di).call(this))}disconnectedCallback(){pi(this,ei,"f")&&(pi(this,si,"f").dynamicPosition.unregister([pi(this,ei,"f")]),pi(this,ei,"f").remove()),pi(this,si,"f").theme.unregister(this)}get rootElement(){return r(this)}};var mi;ti=new WeakMap,ii=new WeakMap,ei=new WeakMap,si=new WeakMap,oi=new WeakMap,ri=new WeakMap,ni=new WeakMap,ai=new WeakMap,Qt=new WeakSet,li=function(t){if(1!=t&&pi(this,ri,"f").value.length<this.minimumChars)return pi(this,Qt,"m",hi).call(this),!1;pi(this,oi,"f").classList.add("toggled"),pi(this,ei,"f").menuVisible=!0;const i=pi(this,ei,"f").style;return i.height="auto",i.minWidth=pi(this,oi,"f").clientWidth+"px",pi(this,si,"f").dynamicPosition.isRegistered(pi(this,ei,"f"))?pi(this,si,"f").dynamicPosition.changeAnchor(pi(this,ei,"f"),pi(this,oi,"f")):pi(this,si,"f").dynamicPosition.register(pi(this,ei,"f"),pi(this,oi,"f"),0,u.AUTO,!0),pi(this,si,"f").dynamicPosition.start(pi(this,ei,"f")),pi(this,ni,"f")||fi(this,ni,{cb:()=>{pi(this,Qt,"m",hi).call(this)},el:pi(this,ei,"f")},"f"),pi(this,si,"f").addClickCallback(pi(this,ni,"f"),!0),!0},hi=function(){pi(this,oi,"f").classList.remove("toggled"),pi(this,ei,"f").menuVisible=!1,pi(this,si,"f").dynamicPosition.stop(pi(this,ei,"f")),pi(this,si,"f").removeClickCallback(pi(this,ni,"f"))},ci=function(){return 1==pi(this,ei,"f").menuVisible},ui=function(t,i){if(!pi(this,ti,"f"))return;fi(this,ti,!1,"f");const e=Zt(t,this.data["kup-list"],pi(this,ei,"f"),this.selectMode,this.displayMode);return e.exists||this.allowInconsistentValues?(i&&(this.value=e.value,this.displayedValue=e.displayedValue),null==pi(this,ei,"f")||this.serverHandledFilter||(pi(this,ei,"f").filter=e.value)):(this.displayedValue=t,null==pi(this,ei,"f")||this.serverHandledFilter||(pi(this,ei,"f").filter=e.value)),e},di=function(){return s("kup-list",Object.assign({displayMode:this.displayMode},this.data["kup-list"],{isMenu:!0,"onkup-list-click":t=>this.onKupItemClick(t),ref:t=>fi(this,ei,t,"f")}))},bi.style=":host{display:block;width:max-content}.kup-icon{transition:transform 0.15s}.toggled .kup-icon.kup-dropdown-icon{transform:rotate(-180deg)}.kup-icon.kup-dropdown-icon{-webkit-mask:var(--kup-dropdown-icon);mask:var(--kup-dropdown-icon)}.f-text-field{position:relative}:host(.kup-full-height){height:100%}:host(.kup-full-height) #kup-component,:host(.kup-full-height) .f-text-field,:host(.kup-full-height) .mdc-text-field{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);--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);--kup-textfield-primary-color-rgb:var(--kup-warning-color-rgb)}",function(t){t.customStyle="Custom style of the component.",t.imageData="The data of the image displayed inside the badge.Props of the sub-components.",t.text="The text displayed inside the badge.Defaults at false. When set to true, the component is disabled."}(mi||(mi={}));const ki=class{constructor(e){t(this,e),this.kupClick=i(this,"kup-badge-click",6),this.kupManager=a(),this.customStyle="",this.imageData=null,this.text=null}onKupClick(){this.kupClick.emit({comp:this,id:this.rootElement.id})}async getProps(t){return l(this,mi,t)}async refresh(){e(this)}async setProps(t){h(this,mi,t)}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),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(){let t=null;return!this.text&&this.imageData&&(this.imageData.sizeX||(this.imageData.sizeX="1em"),this.imageData.sizeY||(this.imageData.sizeY="1em"),this.imageData.color||(this.imageData.color=`var(${d.TEXT_ON_PRIMARY})`),t=s(zt,Object.assign({key:"13d604cf44b52b9a914eaa17dd40501400476847"},this.imageData))),s(o,{key:"a88511192e2f63f9e527485ada0786df92d6aa6f"},s("style",{key:"127e5883c7a23cdb3302d8f6a2db82d1d8bedcce"},this.kupManager.theme.setKupStyle(this.rootElement)),s("div",{key:"f06c0031f262f1214426b8916bc6d81690894045",id:_t,onClick:()=>this.onKupClick()},this.text,t))}disconnectedCallback(){this.kupManager.theme.unregister(this)}get rootElement(){return r(this)}};var gi;ki.style=":host{--kup_badge_border_radius:var(--kup-badge-border-radius, 30px);--kup_badge_font_family:var(--kup-badge-font-family, var(--kup-font-family));--kup_badge_font_size:var(--kup-badge-font-size, var(--kup-font-size));--kup_badge_min_size:var(--kup-badge-min-size, 1.5em);--kup_badge_padding:var(--kup-badge-padding, 0.25em);--kup_badge_primary_color:var(\n --kup-badge-primary-color,\n var(--kup-primary-color)\n );--kup_badge_text_on_primary_color:var(\n --kup-badge-text-on-primary-color,\n var(--kup-text-on-primary-color)\n );display:block;font-family:var(--kup_badge_font_family);font-size:var(--kup_badge_font_size);position:absolute;top:0;left:0;transform:translate(-50%, -50%)}#kup-component{background-color:var(--kup_badge_primary_color);border-radius:var(--kup_badge_border_radius);color:var(--kup_badge_text_on_primary_color);font-size:0.875em;min-height:var(--kup_badge_min_size);min-width:var(--kup_badge_min_size);padding:var(--kup_badge_padding);text-align:center}#kup-component .f-image{display:block;left:50%;position:absolute;top:50%;transform:translate(-50%, -50%);height:inherit;width:inherit}:host(.kup-top-right){top:0;right:0;bottom:unset;left:unset;transform:translate(50%, -50%)}:host(.kup-bottom-right){top:unset;right:0;bottom:0;left:unset;transform:translate(50%, 50%)}:host(.kup-bottom-left){top:unset;right:unset;bottom:0;left:0;transform:translate(-50%, 50%)}:host(.kup-danger){--kup-badge-primary-color:var(--kup-danger-color);--kup-badge-text-on-primary-color:white}:host(.kup-info){--kup-badge-primary-color:var(--kup-info-color);--kup-badge-text-on-primary-color:white}:host(.kup-secondary){--kup-badge-primary-color:var(--kup-secondary-color);--kup-badge-text-on-primary-color:var(--kup-text-on-secondary-color)}:host(.kup-success){--kup-badge-primary-color:var(--kup-success-color);--kup-badge-text-on-primary-color:white}:host(.kup-warning){--kup-badge-primary-color:var(--kup-warning-color);--kup-badge-text-on-primary-color:white}",function(t){t.buttonType="Sets the type of the button.",t.checked="When set to true, the icon button state will be on.",t.customStyle="Custom style of the component.",t.disabled="Defaults at false. When set to true, the component is disabled.",t.icon="When set, the button will show this icon.",t.iconOff="When set, the icon button off state will show this icon. Otherwise, an outlined version of the icon prop will be displayed.",t.label="When set, the button will show this text.",t.styling='Defines the style of the button. Styles available: "flat", "outlined" and "raised" which is also the default.',t.showSpinner="When set to true, the button show a spinner received in slot.",t.toggable="When set to true, the icon button will be toggable on/off.",t.trailingIcon="When set, the icon will be shown after the text."}(gi||(gi={}));const vi=class{constructor(e){t(this,e),this.kupBlur=i(this,"kup-button-blur",6),this.kupClick=i(this,"kup-button-click",6),this.kupFocus=i(this,"kup-button-focus",6),this.kupManager=a(),this.value="",this.buttonType=null,this.checked=!1,this.customStyle="",this.disabled=!1,this.icon=null,this.iconOff=null,this.label=null,this.styling=jt.RAISED,this.showSpinner=!1,this.toggable=!1,this.trailingIcon=!1}onKupBlur(){this.kupBlur.emit({comp:this,id:this.rootElement.id,value:this.value})}onKupClick(){!this.label&&this.icon?this.checked?(this.checked=!1,this.value="off"):(this.checked=!0,this.value="on"):this.value="N/A",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})}async getProps(t){return l(this,gi,t)}async refresh(){e(this)}async setProps(t){h(this,gi,t)}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),this.kupManager.theme.register(this)}componentDidLoad(){this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1),this.value=!this.label&&this.icon?this.checked?"on":"off":"N/A"}componentDidRender(){this.kupManager.debug.logRender(this,!0)}render(){const t={buttonType:this.buttonType,checked:this.checked,danger:!!this.rootElement.classList.contains("kup-danger"),disabled:this.disabled,fullHeight:!!this.rootElement.classList.contains("kup-full-height"),fullWidth:!!this.rootElement.classList.contains("kup-full-width"),icon:this.icon,iconOff:this.iconOff,info:!!this.rootElement.classList.contains("kup-info"),label:this.label,large:!!this.rootElement.classList.contains("kup-large"),pulsating:!!this.rootElement.classList.contains("kup-pulsating"),secondary:!!this.rootElement.classList.contains("kup-secondary"),shaped:!!this.rootElement.classList.contains("kup-shaped"),slim:!!this.rootElement.classList.contains("kup-slim"),success:!!this.rootElement.classList.contains("kup-success"),styling:this.styling,showSpinner:this.showSpinner,title:this.rootElement.title,toggable:this.toggable,trailingIcon:this.trailingIcon,warning:!!this.rootElement.classList.contains("kup-warning"),onBlur:()=>this.onKupBlur(),onClick:()=>this.onKupClick(),onFocus:()=>this.onKupFocus()};if(this.label||this.icon)return s(o,null,s("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),s("div",{id:_t},s(Ct,Object.assign({},t))));this.kupManager.debug.logMessage(this,"Empty button.",p.WARNING)}disconnectedCallback(){this.kupManager.theme.unregister(this)}get rootElement(){return r(this)}};var yi;vi.style=":host{display:block;width:max-content}: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%}",function(t){t.columns="Number of columns.",t.customStyle="Custom style of the component.",t.data="Props of the sub-components.",t.disabled="When set to true, the sub-components are disabled.",t.showSelection="When set to true, highlights the selected button with the secondary color of KupTheme.",t.styling='Defines the style of the buttons. Available styles are "flat", "outlined" and "raised" (which is the default).'}(yi||(yi={}));const wi=class{constructor(e){t(this,e),this.kupClick=i(this,"kup-buttonlist-click",6),this.kupManager=a(),this.selected="",this.columns=0,this.customStyle="",this.data=[],this.disabled=!1,this.showSelection=!0,this.styling=jt.RAISED}onKupClick(t,i){this.selected=t,this.kupClick.emit({comp:this,id:this.rootElement.id,index:t,subIndex:i,obj:this.getObjForEvent(t,i)})}onDropDownItemClick(t,i){this.selected=i,this.onKupClick(i,t.detail.value)}checkDataset(t){t||(t=[]),t.columns&&(this.kupManager.debug.logMessage(this,"Detected KupDataDataset: converting rows to nodes.",p.WARNING),this.data=this.kupManager.data.row.toNode(this.data))}async getProps(t){let i={};if(t)i=yi;else for(const t in yi)Object.prototype.hasOwnProperty.call(yi,t)&&(i[t]=this[t]);return i}async refresh(){e(this)}async setProps(t){h(this,yi,t)}renderButton(t,i){if(null===t)return this.kupManager.debug.logMessage(this,"Empty data button.",p.WARNING),null;const e=this.prepareDataFromTreeNode(t,i);return e.label||e.icon?s(Ct,Object.assign({},{checked:e.checked,disabled:e.disabled,fullHeight:e.fullHeight,fullWidth:e.fullWidth,icon:e.icon,iconOff:e.iconOff,id:e.id,label:e.label,large:e.large,shaped:e.shaped,styling:e.styling,toggable:e.toggable,trailingIcon:e.trailingIcon,title:e.title,wrapperClass:this.rootElement.className+" "+e.wrapperClass,onClick:()=>this.onKupClick(e.id,"-1")})):(this.kupManager.debug.logMessage(this,"Empty button.",p.WARNING),null)}renderDropdownButton(t,i){if(null===t)return this.kupManager.debug.logMessage(this,"Empty data dropdown button.",p.WARNING),null;const e=this.prepareDataFromTreeNode(t,i);return e.label||e.icon||(null==t?void 0:t.data.dropdownOnly)?(e.data={"kup-list":{data:this.getKupListDataForChildren(t.children),showIcons:!0}},s("kup-dropdown-button",Object.assign({class:this.rootElement.className+" "+e.wrapperClass},e,{"onkup-dropdownbutton-click":()=>this.onKupClick(i.toString(),"-1"),"onkup-dropdownbutton-itemclick":t=>this.onDropDownItemClick(t,i.toString())}))):(this.kupManager.debug.logMessage(this,"Empty dropdown button.",p.WARNING),null)}prepareDataFromTreeNode(t,i){const e=null!=t.data?Object.assign({},t.data):{};return null!=this.customStyle&&""!=this.customStyle.trim()&&(e.customStyle=this.customStyle),1!=this.disabled&&1!=t.disabled||(e.disabled=!0),null!=this.styling&&""!=this.styling.trim()&&(e.styling=this.styling),null==e.icon&&(e.icon=t.icon),null==e.label&&(e.label=t.value),e.fullHeight=!!this.rootElement.classList.contains("kup-full-height"),e.fullWidth=!!this.rootElement.classList.contains("kup-full-width"),e.id=i.toString(),e.large=!!this.rootElement.classList.contains("kup-large"),e.pulsating=!!this.rootElement.classList.contains("kup-pulsating"),e.shaped=!!this.rootElement.classList.contains("kup-shaped"),e.slim=!!this.rootElement.classList.contains("kup-slim"),e.wrapperClass||(e.wrapperClass=""),this.selected==e.id&&(e.wrapperClass=e.wrapperClass+" selected"),e}getKupListDataForChildren(t){const i=[];for(let e=0;e<t.length;e++){const s=t[e];i.push({icon:s.icon,id:e.toString(),value:s.value})}return i}getObjForEvent(t,i){let e=Number(t),s=-1;null!=i&&""!=i.trim()&&(s=Number(i));let o=this.data[e];return-1!=s?o.children[s].obj:o.obj}renderButtons(){if(null==this.data||this.data.length<1)return null;const t=[];for(let i=0;i<this.data.length;i++){const e=this.data[i];let s=null;s=null!=e.children&&e.children.length>0?this.renderDropdownButton(e,i):this.renderButton(e,i),s&&t.push(s)}return t}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.renderButtons();let i=this.columns;null!=this.data&&this.data.length>0&&i<=0&&(i=this.data.length);const e={"button-list--container":!0,"show-selection":!(!this.showSelection||!this.selected)};return s(o,{key:"a01db9921adbf39f2d78e4dab8f36628cfa6c36b",style:{"--kup_buttonlist_grid_columns":`repeat(${i}, auto)`}},s("style",{key:"48e3bd8c16086c166b34b4ff7131257d4258e627"},this.kupManager.theme.setKupStyle(this.rootElement)),s("div",{key:"849c6b0831fce22ca8cc3c462e5889146088f214",id:_t},s("div",{key:"61423fbc92aa0f2336b54b976719e48736c22e62",class:e},t)))}disconnectedCallback(){this.kupManager.theme.unregister(this)}get rootElement(){return r(this)}static get watchers(){return{data:["checkDataset"]}}};wi.style=":host{--kup_buttonlist_grid_gap:var(--kup-buttonlist-grid-gap, 1em);--kup_buttonlist_selected_primary_color:var(\n --kup-buttonlist-selected-primary-color,\n var(--kup-secondary-color)\n );--kup_buttonlist_selected_primary_color_h:var(\n --kup-buttonlist-selected-primary-color-h,\n var(--kup-secondary-color-h)\n );--kup_buttonlist_selected_primary_color_s:var(\n --kup-buttonlist-selected-primary-color-s,\n var(--kup-secondary-color-s)\n );--kup_buttonlist_selected_primary_color_l:var(\n --kup-buttonlist-selected-primary-color-l,\n var(--kup-secondary-color-l)\n );--kup_buttonlist_selected_primary_color_rgb:var(\n --kup-buttonlist-selected-primary-color-rgb,\n var(--kup-secondary-color-rgb)\n );--kup_buttonlist_selected_text_on_primary_color:var(\n --kup-buttonlist-selected-text-on-primary-color,\n var(--kup-text-on-secondary-color)\n );display:block}.button-list--container{display:grid;grid-gap:var(--kup_buttonlist_grid_gap);grid-template-columns:var(--kup_buttonlist_grid_columns);width:max-content}.button-list--container.show-selection .selected{--kup-button-primary-color:var(--kup_buttonlist_selected_primary_color);--kup-button-primary-color-rgb:var(\n --kup_buttonlist_selected_primary_color_rgb\n );--kup-button-primary-color-h:var(\n --kup_buttonlist_selected_primary_color_h\n );--kup-button-primary-color-s:var(\n --kup_buttonlist_selected_primary_color_s\n );--kup-button-primary-color-l:var(\n --kup_buttonlist_selected_primary_color_l\n );--kup-button-text-on-primary-color:var(\n --kup_buttonlist_selected_text_on_primary_color\n )}:host(.kup-full-width){width:100%}:host(.kup-full-width) .button-list--container{width:100%}:host(.kup-danger){--kup-button-primary-color:var(--kup-danger-color);--kup-button-primary-color-h:var(--kup-danger-color-h);--kup-button-primary-color-s:var(--kup-danger-color-s);--kup-button-primary-color-l:var(--kup-danger-color-l);--kup-button-primary-color-rgb:var(--kup-danger-color-rgb);--kup-button-text-on-primary-color:white}:host(.kup-info){--kup-button-primary-color:var(--kup-info-color);--kup-button-primary-color-h:var(--kup-info-color-h);--kup-button-primary-color-s:var(--kup-info-color-s);--kup-button-primary-color-l:var(--kup-info-color-l);--kup-button-primary-color-rgb:var(--kup-info-color-rgb);--kup-button-text-on-primary-color:white}:host(.kup-secondary){--kup-button-primary-color:var(--kup-secondary-color);--kup-button-primary-color-h:var(--kup-secondary-color-h);--kup-button-primary-color-s:var(--kup-secondary-color-s);--kup-button-primary-color-l:var(--kup-secondary-color-l);--kup-button-primary-color-rgb:var(--kup-secondary-color-rgb);--kup-button-text-on-primary-color:var(--kup-text-on-secondary-color)}:host(.kup-success){--kup-button-primary-color:var(--kup-success-color);--kup-button-primary-color-h:var(--kup-success-color-h);--kup-button-primary-color-s:var(--kup-success-color-s);--kup-button-primary-color-l:var(--kup-success-color-l);--kup-button-primary-color-rgb:var(--kup-success-color-rgb);--kup-button-text-on-primary-color:white}:host(.kup-warning){--kup-button-primary-color:var(--kup-warning-color);--kup-button-primary-color-h:var(--kup-warning-color-h);--kup-button-primary-color-s:var(--kup-warning-color-s);--kup-button-primary-color-l:var(--kup-warning-color-l);--kup-button-primary-color-rgb:var(--kup-warning-color-rgb);--kup-button-text-on-primary-color:white}";const xi=document.documentElement;function _i(t){var i;const e=t.data.cell,o=t.data.columns,r=[];let n=null;for(let a=0;a<e.length;a++){const l=e[a],h=t.data.columns[a],c=xi.ketchup.objects.isImage(l.obj)||xi.ketchup.objects.isIcon(l.obj)||(null===(i=l.shape)||void 0===i?void 0:i.toUpperCase())===f.IMAGE;if(!n&&c)n={cell:e[a],column:o[a],component:t,density:b.NONE,renderKup:!0,row:{cells:{[o[a].name]:e[a]}},wrapperClass:"c-centered"},l.data||(l.data={resource:l.value});else{const i={cell:l,column:h,component:t,density:b.NONE,renderKup:!0,row:{cells:{[h.name]:l}}};r.push(s("tr",null,s("td",{class:"label"},h.title),s("td",{class:"value"},s(mt,Object.assign({},i)))))}}return s("div",{class:`box-layout-${t.layoutNumber}`},s("div",{class:"container"},n?s("div",{class:"image"},s(mt,Object.assign({},n))):null,s("div",{class:"table"},s("table",null,r))))}function zi(t){var i;const e=t.data.cell,o=t.data.columns,r=[];let n=null;for(let o=0;o<e.length;o++){const a=e[o],l=t.data.columns[o],h=xi.ketchup.objects.isImage(a.obj)||xi.ketchup.objects.isIcon(a.obj)||(null===(i=a.shape)||void 0===i?void 0:i.toUpperCase())===f.IMAGE;if(!n&&h)n=o,a.data||(a.data={resource:a.value});else{const i={cell:a,column:l,component:t,density:b.NONE,renderKup:!0,row:{cells:{[l.name]:a}}};r.push(s("tr",null,s("td",{class:"label"},l.title))),r.push(s("tr",null,s("td",{class:"value"},s(mt,Object.assign({},i)))))}}return s("div",{class:`box-layout-${t.layoutNumber}`},s("div",{class:"container"},s("div",{class:"image"},s(mt,Object.assign({},{cell:e[n],column:o[n],component:t,density:b.NONE,renderKup:!0,row:{cells:{[o[n].name]:e[n]}},wrapperClass:"c-centered"}))),s("div",{class:"table"},s("table",null,r))))}const Ci=Object.freeze({__proto__:null,create1:function(t){const i=[];for(let e=0;e<t.data.cell.length;e++){const o=t.data.cell[e],r=t.data.columns[e],n={cell:o,column:r,component:t,density:b.NONE,renderKup:!0,row:{cells:{[r.name]:o}}};i.push(s("tr",null,s("td",{class:"label"},r.title),s("td",{class:"value"},s(mt,Object.assign({},n)))))}return s("div",{class:`box-layout-${t.layoutNumber}`},s("table",null,i))},create2:function(t){const i=[];for(let e=0;e<t.data.cell.length;e++){const o=t.data.cell[e],r=t.data.columns[e],n={cell:o,column:r,component:t,density:b.NONE,renderKup:!0,row:{cells:{[r.name]:o}}};n.cell.cssClass=n.cell.cssClass?n.cell.cssClass+" c-right-aligned":"c-right-aligned",i.push(s("tr",null,s("td",{class:"label"},r.title),s("td",{class:"value"},s(mt,Object.assign({},n)))))}return s("div",{class:`box-layout-${t.layoutNumber}`},s("table",null,i))},create3:function(t){const i=[];for(let e=0;e<t.data.cell.length;e++){const o=t.data.cell[e],r=t.data.columns[e],n={cell:o,column:r,component:t,density:b.NONE,renderKup:!0,row:{cells:{[r.name]:o}}};i.push(s("div",{class:"flex-container"},s("div",{class:"label"},r.title),s("div",{class:"value"},s(mt,Object.assign({},n)))))}return s("div",{class:`box-layout-${t.layoutNumber}`},s("div",{class:"container"},i))},create4:function(t){var i;const e=t.data.cell,o=t.data.columns;let r=null,n=null;for(let t=0;t<e.length;t++){const s=e[t],o=xi.ketchup.objects.isImage(s.obj)||xi.ketchup.objects.isIcon(s.obj)||(null===(i=s.shape)||void 0===i?void 0:i.toUpperCase())===f.IMAGE;!r&&o&&(r=t,s.data||(s.data={resource:s.value})),n||o||(n=t)}const a={cell:e[n],column:o[n],component:t,density:b.NONE,renderKup:!0,row:{cells:{[o[n].name]:e[n]}},wrapperClass:"c-centered"};return s("div",{class:`box-layout-${t.layoutNumber}`},s("div",{class:"container"},s("div",{class:"image"},s(mt,Object.assign({},{cell:e[r],column:o[r],component:t,density:b.NONE,renderKup:!0,row:{cells:{[o[r].name]:e[r]}},wrapperClass:"c-centered"}))),s("div",{class:"value"},s(mt,Object.assign({},a)))))},create5:_i,create6:zi,create7:function(t){return _i(t)},create8:function(t){return zi(t)}});var ji,$i;!function(t){t.customStyle="Custom style of the component.",t.data="Props of the sub-components.",t.disabled="Defaults at false. When set to true, the component is disabled.",t.firstDayIndex="First day number (0 - sunday, 1 - monday, ...)",t.initialValue="Sets the initial value of the component"}(ji||(ji={})),function(t){t.DATE="date",t.MONTH="month",t.YEAR="year"}($i||($i={}));const Wi=document.documentElement;function Oi(t,i){i instanceof Date&&(i=new Date);const e=t.rootElement;e.kupData.value=i,e.kupData.day=e.kupData.value.getDate(),e.kupData.month=e.kupData.value.getMonth(),e.kupData.year=e.kupData.value.getFullYear()}function Di(t){const i=t.rootElement;return null!=i.kupData.day?i.kupData.day:null}function Mi(t){const i=t.rootElement;return null!=i.kupData.month?i.kupData.month:null}function Ti(t){const i=t.rootElement;return null!=i.kupData.year?i.kupData.year:null}function Si(t,i){t.rootElement.kupData.day=i}function Pi(t,i){t.rootElement.kupData.month=i}function Ii(t,i){t.rootElement.kupData.year=i}function Ri(t){const i=t.rootElement;return i.kupData.firstDayIndex?i.kupData.firstDayIndex:1}function Ei(t){const i=t.rootElement;return i.kupData.calendarView?i.kupData.calendarView:$i.DATE}function Li(t,i){t.rootElement.kupData.calendarView=i}function Fi(t){const i=t-t%10;return{initYear:i,endYear:i+16-1}}function Ni(t){t.refresh()}function Ki(t,i){let e;switch(e=Wi.ketchup.dates.isValid(i,Wt.ISO_DATE)?new Date(i):new Date,Pi(t,e.getMonth()),Ii(t,e.getFullYear()),Ei(t)){case $i.MONTH:Li(t,$i.DATE);break;case $i.YEAR:Li(t,$i.MONTH)}Ni(t)}function Ai(t,i){let e;e=Wi.ketchup.dates.isValid(i,Wt.ISO_DATE)?new Date(i):new Date,Oi(t,e),t.onKupClick(t.rootElement.id,i),Ni(t)}const Vi=document.documentElement;function Hi(t){const i=t.rootElement;return null!=i.kupData.manageSeconds&&i.kupData.manageSeconds}function Bi(t){const i=t.rootElement;return i.kupData.value?i.kupData.value:""}function Yi(t){const i=t.rootElement;return null!=i.kupData.hoursActive&&i.kupData.hoursActive}function Xi(t){const i=t.rootElement;return null!=i.kupData.minutesActive&&i.kupData.minutesActive}function Gi(t){const i=t.rootElement;return null!=i.kupData.secondsActive&&i.kupData.secondsActive}function Ui(t,i){i&&(t.rootElement.kupData[i.id]=i)}function qi(t,i){return t.rootElement.shadowRoot.getElementById(i)}function Ji(t,i,e,s){const o=t.rootElement;o.kupData.hoursActive=i,o.kupData.minutesActive=e,o.kupData.secondsActive=s}function Zi(t,i,e){qi(t,k.HOURS).classList.remove(g.VISIBLE),qi(t,k.HOURSCIRCLE).classList.remove(g.VISIBLE),qi(t,k.MINUTES).classList.remove(g.VISIBLE),qi(t,k.MINUTESCIRCLE).classList.remove(g.VISIBLE),Hi(t)&&(qi(t,k.SECONDS).classList.remove(g.VISIBLE),qi(t,k.SECONDSCIRCLE).classList.remove(g.VISIBLE)),qi(t,i).classList.add(g.VISIBLE),qi(t,e).classList.add(g.VISIBLE)}function Qi(t,i,e,o,r,n,a,l,h){let c,u;const d=[];for(let p=0;p<t;p++){let f;c=i*Math.cos(p/t*2*Math.PI),u=i*Math.sin(p/t*2*Math.PI);let b={},m={};1==a?(f=p+3>12?p+3-12+n+"":24!==p+3+n?p+3+n+"":"00",b["data-value"]=f):p%a==0?p+15>=60?(b["data-value"]=p+15-60+"",f=p+15-60+n+""):(b["data-value"]=p+15+"",f=p+15+n+""):p+15>=60?(b["data-value"]=p+15-60+"",f="⋅"):(b["data-value"]=p+15+"",f="·"),m.left=c+e+"px",m.top=u+o+"px",1===b["data-value"].length&&(b["data-value"]="0"+b["data-value"]);let k=r;b["data-value"]===l&&(k+=" selected");let g=s("div",Object.assign({class:k,style:m},b,{onClick:t=>ie(t,h)}),f);d.push(g)}return d}function te(t,i){const e=qi(i,k.HOURS),s=qi(i,k.MINUTES),o=qi(i,k.SECONDS);let r=e.innerText+":"+s.innerText;Hi(i)&&(r+=":"+o.innerText),function(t,i,e){null!=t&&null==e&&(e=t.detail.selected.id),function(t,i){null==i&&(i=Bi(t)),null!=i&&function(t,i){t.rootElement.kupData.value=i}(t,i)}(i,e),i.onKupClick(i.rootElement.id,e)}(t,i,r)}function ie(t,i){const e=qi(i,k.HOURS),s=qi(i,k.MINUTES),o=qi(i,k.HOURSCIRCLE),r=qi(i,k.MINUTESCIRCLE),n=qi(i,k.SECONDS),a=qi(i,k.SECONDSCIRCLE);let l=t.target.getAttribute("data-value");Yi(i)?(e.innerText=l,o.querySelector(".selected").classList.remove("selected"),Ji(i,!1,!0,!1),Zi(i,k.MINUTES,k.MINUTESCIRCLE)):Xi(i)?(s.innerText=l,r.querySelector(".selected").classList.remove("selected"),Hi(i)?(Ji(i,!1,!1,!0),Zi(i,k.SECONDS,k.SECONDSCIRCLE)):(te(t,i),Ji(i,!0,!1,!1),Zi(i,k.HOURS,k.HOURSCIRCLE))):(n.innerText=l,a.querySelector(".selected").classList.remove("selected"),te(t,i),Ji(i,!0,!1,!1),Zi(i,k.HOURS,k.HOURSCIRCLE)),t.target.classList.add("selected")}const ee=document.documentElement,se=[v.AVERAGE,v.DIFFERENCE,v.PRODUCT,v.SUM];function oe(t){return t.rootElement.shadowRoot.querySelector("kup-combobox")}const re=document.documentElement,ne=document.documentElement;function ae(t){return t.data.options?t.data.options:{resetStatus:!1}}function le(t,i){const e=ae(t),s=t.rootElement,o=".";let r=s.kupData.value?s.kupData.value.toString():"0";"0"==r&&i!=o&&(r=""),i==o&&r.includes(o)||e.maxLength&&r.replace(o,"").length==e.maxLength||e.maxIntegers&&i!=o&&!r.includes(o)&&r.length==e.maxIntegers||e.maxDecimals&&r.includes(o)&&r.substring(r.indexOf(o)+1).length==e.maxDecimals||r.includes(o)&&14==r.substring(r.indexOf(o)+1).length||(r+=i,s.kupData.value=r,s.kupData.localeValue=ne.ketchup.math.numbers.toLocaleString(r),t.refresh())}let he=null,ce=null,ue=null;const de=Object.freeze({__proto__:null,create1:function(t){return s("div",{class:`built-in-layout-${t.layoutNumber} ${g.BUILT_IN_CARD}`},function(t){const i=t.rootElement;if(i.kupData||(i.kupData={}),t.data&&t.data.options){const e=t.data.options;if(e.resetStatus){i.kupData={};const s=e.initialValue;e.initialValue&&Oi(t,s&&s.k?new Date(s.k):new Date(e.initialValue)),e.firstDayIndex&&(i.kupData.firstDayIndex=e.firstDayIndex),e.resetStatus=!1}}i.kupData.value||Oi(t,new Date);const e=Wi.ketchup.dates.getMonthsAsString(),o=Ti(t),r=Mi(t),n=Fi(o),a=n.initYear,l=n.endYear;let h="not-set";switch(Ei(t)){case $i.DATE:h=e[r]+", "+o.toString();break;case $i.MONTH:h=o.toString();break;case $i.YEAR:h=a.toString()+" - "+l.toString()}const c={icon:"chevron_left",wrapperClass:"prev-page",onClick:()=>function(t){let i=Mi(t),e=Ti(t);Ei(t)==$i.DATE&&(i<1?(i=11,e--):i--),Ei(t)==$i.MONTH&&e--,Ei(t)==$i.YEAR&&(e=Fi(e).initYear-1),Si(t,null),Pi(t,i),Ii(t,e),Ni(t)}(t)},u=s(Ct,Object.assign({},c)),d={icon:"chevron_right",wrapperClass:"next-page",onClick:()=>function(t){let i=Mi(t),e=Ti(t);Ei(t)==$i.DATE&&(i>10?(i=0,e++):i++),Ei(t)==$i.MONTH&&e++,Ei(t)==$i.YEAR&&(e=Fi(e).endYear+1),Si(t,null),Pi(t,i),Ii(t,e),Ni(t)}(t)},p=s(Ct,Object.assign({},d)),f={wrapperClass:"change-view-button",styling:jt.FLAT,label:h,onClick:()=>function(t){switch(Si(t,null),Ei(t)){case $i.DATE:Li(t,$i.MONTH);break;case $i.MONTH:Li(t,$i.YEAR);break;case $i.YEAR:Li(t,$i.DATE)}Ni(t)}(t),id:"change-view-button"};return s("div",{id:t.rootElement.id+"_calendar"},s("div",{class:"section-1"},s("div",{class:"sub-1 nav"},u,s(Ct,Object.assign({},f)),p)),s("div",{class:"section-2"},function(t){switch(Ei(t)){case $i.DATE:return function(t){const i=Wi.ketchup.dates.getDaysOfWeekAsString(Ri(t)),e=function(t){const i=t.rootElement;return null==i.kupData.value&&Oi(t,new Date),i.kupData.value}(t),o=Di(t),r=Mi(t),n=Ti(t),a=[],l=[];for(let t=0;t<i.length;t++)a.push(s("th",null,s("span",{class:"item-text"},i[t])));const h=new Date(n,r,1),c=new Date(n,r+1,0);let u=Ri(t);const d=h.getDay();let p=[],f=0;for(;u!=d;)p.push(s("td",{class:"item empty"})),u++,f++,u>6&&(u=0);let b=1;for(;b<=c.getDate();){for(let i=f;i<7;i++){let i="item",a={"data-index":n.toString()+"-"+m((r+1).toString(),"0",2,!0)+"-"+m(b.toString(),"0",2,!0)};if((null!=o&&b===o||b===e.getDate()&&r===e.getMonth()&&n===e.getFullYear())&&(i+=" selected"),p.push(s("td",{class:i},s("span",Object.assign({},a,{class:"item-number",onClick:()=>{Ai(t,a["data-index"])}}),b))),b++,b>c.getDate())break}p.length>0&&(l.push(s("tr",null,p)),p=[]),f=0}return s("table",{class:"calendar"},s("thead",null,a),s("tbody",null,l))}(t);case $i.MONTH:return function(t){const i=Wi.ketchup.dates.getMonthsAsString($t.SHORT);let e=Di(t);const o=Mi(t),r=Ti(t);null==e&&(e=1);const n=[];let a=[],l=0;for(;l<12;){for(let n=0;n<4;n++){let n="item";const h={"data-index":r.toString()+"-"+m((l+1).toString(),"0",2,!0)+"-"+m(e.toString(),"0",2,!0)};l===o&&(n+=" selected"),a.push(s("td",{class:n},s("span",Object.assign({},h,{class:"item-number",onClick:()=>{Ki(t,h["data-index"])}}),i[l]))),l++}a.length>0&&(n.push(s("tr",null,a)),a=[])}return s("table",{class:"calendar"},s("tbody",null,n))}(t);case $i.YEAR:return function(t){let i=Di(t);const e=Mi(t),o=Ti(t);null==i&&(i=1);const r=Fi(o),n=r.endYear,a=[];let l=[],h=r.initYear;for(;h<=n;){for(let r=0;r<4;r++){let r="item",n={"data-index":h.toString()+"-"+m((e+1).toString(),"0",2,!0)+"-"+m(i.toString(),"0",2,!0)};h===o&&(r+=" selected"),l.push(s("td",{class:r},s("span",Object.assign({},n,{class:"item-number",onClick:()=>{Ki(t,n["data-index"])}}),h))),h++}l.length>0&&(a.push(s("tr",null,l)),l=[])}return s("table",{class:"calendar"},s("tbody",null,a))}(t)}}(t)))}(t))},create2:function(t){return s("div",{class:`built-in-layout-${t.layoutNumber} ${g.BUILT_IN_CARD}`},function(t){const i=t.rootElement;if(i.kupData={},t.data&&t.data.options){const e=t.data.options,s=e.initialValue;e.initialValue&&(i.kupData.value=s&&s.k?s.k:e.initialValue),null!=e.manageSeconds&&(i.kupData.manageSeconds=e.manageSeconds),null!=e.hoursActive&&(i.kupData.hoursActive=e.hoursActive),null!=e.minutesActive&&(i.kupData.minutesActive=e.minutesActive),null!=e.secondsActive&&(i.kupData.secondsActive=e.secondsActive)}else i.kupData.hoursActive=!0;return function(t){return s("div",{id:"clock-div",onBlur:i=>{(function(t,i){if(!t.relatedTarget)return!1;let e=t.relatedTarget.id;return null!=e&&""!=e.trim()&&(e==qi(i,k.CLOCK).id||"#clock-div#confirm#".indexOf("#"+e+"#")>=0)})(i,t)||function(t){t.onKupClick(t.rootElement.id,Bi(t))}(t)}},function(t){let i;i=Bi(t)?Vi.ketchup.dates.toDate(Bi(t),Hi(t)?Wt.ISO_TIME:Wt.ISO_TIME_WITHOUT_SECONDS):new Date;let e=i.getHours().toString(),o=i.getMinutes().toString();1===e.length&&(e="0"+e),1===o.length&&(o="0"+o);let r,n="";Hi(t)&&(n=i.getSeconds().toString(),1===n.length&&(n="0"+n));let a=[s("span",{id:k.HOURS,class:`h ${Yi(t)?g.VISIBLE:""}`,ref:i=>{Ui(t,i)},onClick:()=>{Ji(t,!0,!1,!1),Zi(t,k.HOURS,k.HOURSCIRCLE)},innerHTML:e}),":",s("span",{id:k.MINUTES,class:`m ${Xi(t)?g.VISIBLE:""}`,ref:i=>{Ui(t,i)},onClick:()=>{Ji(t,!1,!0,!1),Zi(t,k.MINUTES,k.MINUTESCIRCLE)},innerHTML:o})];Hi(t)&&(r=s("div",{id:k.SECONDSCIRCLE,class:`circle seconds ${Gi(t)?g.VISIBLE:""}`,ref:i=>{Ui(t,i)}},Qi(60,101,115,115,"sec unit",0,5,n,t),s("div",{class:"mid"})),a.push(":",s("span",{id:k.SECONDS,class:`s ${Gi(t)?g.VISIBLE:""}`,ref:i=>{Ui(t,i)},onClick:()=>{Ji(t,!1,!1,!0),Zi(t,k.SECONDS,k.SECONDSCIRCLE)},innerHTML:n})));const l={label:"Ok",styling:jt.FLAT,onClick:i=>{te(i,t)}};return s("div",{class:"clock",id:k.CLOCK,ref:i=>{Ui(t,i)}},s("div",{class:"top"},a),s("div",{id:k.HOURSCIRCLE,class:`circle hours ${Yi(t)?g.VISIBLE:""}`,ref:i=>{Ui(t,i)}},Qi(12,101,105,105,"hour",0,1,e,t),Qi(12,64,110,110,"hour2",12,1,e,t),s("div",{class:"mid"})),s("div",{id:k.MINUTESCIRCLE,class:`circle minutes ${Xi(t)?g.VISIBLE:""}`,ref:i=>{Ui(t,i)}},Qi(60,101,115,115,"min unit",0,5,o,t),s("div",{class:"mid"})),r,s("div",{class:"actions"},s(Ct,Object.assign({},l))))}(t))}(t)}(t))},create3:function(t){return s("div",{class:`built-in-layout-${t.layoutNumber} ${g.BUILT_IN_CARD}`},function(t){const i=t.data.options,e=[];let o,r,n,a;for(let t=0;t<i.data.columns.length;t++){const s=i.data.columns[t];!1!==s.visible&&s.obj&&ee.ketchup.objects.isNumber(s.obj)&&e.push({obj:s.obj,value:s.name,title:s.title,id:s.name})}const l=!!(e.length>0);return(i.enableMerge||i.enableMove)&&(o=function(t){const i=[];return t.enableMerge&&i.push({icon:"library_add",id:y.MERGE,value:ee.ketchup.language.translate(y.MERGE)}),t.enableMove&&i.push({icon:"swap_horiz",id:y.MOVE,value:ee.ketchup.language.translate(y.MOVE)}),i.length>0?s("kup-list",{data:i,showIcons:!0,"onkup-list-click":i=>function(t,i){switch(t.detail.selected.id){case y.MERGE:i.mergeCb&&i.mergeCb();break;case y.MOVE:i.moveCb&&i.moveCb()}}(i,t)}):null}(i)),i.enableFormula&&(r=function(t,i){const e=[],o=ee.ketchup.objects.isNumber(t.receivingColumn.obj)&&ee.ketchup.objects.isNumber(t.starterColumn.obj);o?e.push({id:v.AVERAGE,value:ee.ketchup.language.translate(v.AVERAGE)},{id:v.DIFFERENCE,value:ee.ketchup.language.translate(v.DIFFERENCE)},{id:v.PRODUCT,value:ee.ketchup.language.translate(v.PRODUCT)},{id:v.SUM,value:ee.ketchup.language.translate(v.SUM)},{id:`([${t.starterColumn.name}]/[${t.receivingColumn.name}])*100`,value:`[${t.starterColumn.name}] / [${t.receivingColumn.name}] * 100`},{id:`([${t.receivingColumn.name}]/[${t.starterColumn.name}])*100`,value:`[${t.receivingColumn.name}] / [${t.starterColumn.name}] * 100`}):e.push({id:w.NO_FORMULA,value:ee.ketchup.language.translate(w.NO_FORMULA)});const r={"kup-list":{data:e,selectable:!!o},"kup-text-field":{helper:i?o?`i.e.: [${t.receivingColumn.name}] - [${t.starterColumn.name}] + 1`:ee.ketchup.language.translate(w.NON_NUMERICAL):ee.ketchup.language.translate(w.NON_NUMERICAL_IN_TABLE),label:ee.ketchup.language.translate(v.FORMULA),outlined:!0}};return s("kup-combobox",{data:r,disabled:!i})}(i,l),l&&(n=s("kup-button",{"onKup-button-click":()=>async function(t){const i=t.data.options,e=oe(t);if(e){const t=await e.getValue();if(se.includes(t))ee.ketchup.data.column.new(i.data,x.MATH,{columns:[i.receivingColumn.name,i.starterColumn.name],operation:t}),void 0!==i.formulaCb&&i.formulaCb();else{const s=ee.ketchup.data.column.new(i.data,x.MATH,{operation:t});"string"==typeof s||s instanceof String?(e.classList.add("kup-danger"),e.data["kup-text-field"].helper=s,e.refresh()):void 0!==i.formulaCb&&i.formulaCb()}}}(t),label:ee.ketchup.language.translate(v.CALCULATE),styling:jt.OUTLINED}),a=s("div",{class:"sub-chip"},s("kup-chip",{data:e,"onKup-chip-click":i=>function(t,i){const e=oe(i),s=t.detail.chip.value;e.getValue().then((t=>{let i=t;i+="["+s+"]",e.setValue(i)}))}(i,t)})))),[o,r,n,a]}(t))},create4:function(t){return s("div",{class:`built-in-layout-${t.layoutNumber} ${g.BUILT_IN_CARD}`})},create5:function(t){return s("div",{class:`built-in-layout-${t.layoutNumber} ${g.BUILT_IN_CARD}`},function(t){const i=t.rootElement;i.kupData||(i.kupData={value:null,localeValue:""});let e=!1,o=!1;const r=ae(t);if(r.resetStatus){i.kupData={value:null,localeValue:""};const t=r.initialValue;r.initialValue&&(i.kupData.value=t&&t.k?t.k:r.initialValue.toString(),i.kupData.localeValue=ne.ketchup.math.numbers.toLocaleString(i.kupData.value)),r.resetStatus=!1}r.negative&&(o=!0),r.decimals&&(e=!0);const n={icon:"cancel",onClick:()=>function(t){const i=t.rootElement;i.kupData.value=null,i.kupData.localeValue="",t.refresh()}(t)},a={icon:"save",onClick:()=>function(t){const i=t.rootElement;t.onKupClick(t.rootElement.id,i.kupData.value?Number(i.kupData.value).toString():"")}(t)},l=.1.toLocaleString(ne.ketchup.math.locale).substring(1,2);return s("table",null,s("tr",null,s("td",{colSpan:3},s("div",{class:"value"},i.kupData.localeValue))),s("tr",null,s("td",null,s("div",{class:"number",onClick:()=>le(t,"1")},"1")),s("td",null,s("div",{class:"number",onClick:()=>le(t,"2")},"2")),s("td",null,s("div",{class:"number",onClick:()=>le(t,"3")},"3"))),s("tr",null,s("td",null,s("div",{class:"number",onClick:()=>le(t,"4")},"4")),s("td",null,s("div",{class:"number",onClick:()=>le(t,"5")},"5")),s("td",null,s("div",{class:"number",onClick:()=>le(t,"6")},"6"))),s("tr",null,s("td",null,s("div",{class:"number",onClick:()=>le(t,"7")},"7")),s("td",null,s("div",{class:"number",onClick:()=>le(t,"8")},"8")),s("td",null,s("div",{class:"number",onClick:()=>le(t,"9")},"9"))),s("tr",null,s("td",null,o?[s("div",{class:"number",onClick:()=>function(t){const i=t.rootElement;let e=i.kupData.value?i.kupData.value:"0";e.startsWith("-")||(e="-"+e,i.kupData.value=e,i.kupData.localeValue=ne.ketchup.math.numbers.toLocaleString(e),t.refresh())}(t)},"-")]:[]),s("td",null,s("div",{class:"number",onClick:()=>le(t,"0")},"0")),s("td",null,e?[s("div",{class:"number",onClick:()=>le(t,".")},l)]:[])),s("tr",null,s("td",null),s("td",null,s(Ct,Object.assign({},n))),s("td",null,s(Ct,Object.assign({},a)))))}(t))},create6:function(t){return s("div",{class:`built-in-layout-${t.layoutNumber} ${g.BUILT_IN_CARD}`},function(t){const i=t.data.options,e=!(!i.cancelCb&&!i.confirmCb);return s("div",{class:"message-box"},i.text?s("div",{class:"text"},i.text):null,e?s("div",{class:"button-wrapper"},i.cancelCb?s(Ct,{icon:"clear",label:re.ketchup.language.translate(y.ABORT),onClick:i.cancelCb,styling:jt.FLAT}):null,i.confirmCb?s(Ct,{icon:"check",label:re.ketchup.language.translate(y.CONFIRM),onClick:i.confirmCb}):null):null)}(t))},create7:function(t){return s("div",{class:`built-in-layout-${t.layoutNumber} ${g.BUILT_IN_CARD}`},function(t){const i=t.data.options,e=t=>{ce.disabled=t,he.disabled=t,ue.showSpinner=t};return ue&&e(!1),s("div",{class:`wrapper ${i.state}`},"authentication"===i.state?[s("div",{class:"title"},"Authentication"),s("kup-text-field",{class:"password",label:"Password",icon:"key-variant",inputType:"password",helperEnabled:!0,"onKup-textfield-iconclick":i.authCb,"onKup-textfield-submit":i.authCb})]:"ready"===i.state?[s("div",{class:"query-area"},s("kup-text-field",{label:"Ask me something!",textArea:!0,ref:t=>he=t}),s("div",{class:"buttons"},s("kup-button",{icon:"clear",label:"Clear","onKup-button-click":()=>{he.setValue("")},styling:jt.FLAT,ref:t=>ce=t}),s("kup-button",{icon:"open-ai",label:"Submit","onKup-button-click":()=>(async()=>{i.submitCb&&i.submitCb(e,he)})(),ref:t=>ue=t},s("kup-spinner",{active:!0,dimensions:"0.6em",slot:"spinner"})))),s("div",{class:`chat-area ${g.AUTOSCROLL}`},(()=>{const t=[];return i.messages&&i.messages.length>0?i.messages.forEach((i=>{t.push(s("div",{class:"message-container"},s("div",{class:i.type},i.text),s(Ct,{icon:"content-copy",onClick:()=>{navigator.clipboard.writeText(i.text)},title:"Copy text to clipboard.",wrapperClass:"copy"})))})):t.push(s("div",{class:"empty"},"Your chat history is empty!")),t})())]:"connecting"===i.state?[s("div",{class:"spinner"},s("kup-spinner",{active:!0,layout:6,dimensions:"7px"})),s("div",{class:"title"},"Just a moment."),s("div",{class:"text"},"We're connecting you to your AI assistant...")]:[s(zt,{resource:"hotel",sizeX:"4em",sizeY:"4em"}),s("div",{class:"title"},"Zzz..."),s("div",{class:"text"},"Your AI assistant is currently offline!")])}(t))}});var pe;function fe(t,i){let e=[];for(let o=0;o<t.length;o++)switch("string"==typeof t[0]||t[o].id||(t[o].id=i+o),i){case"autocomplete":e.push(s("kup-autocomplete",Object.assign({},t[o])));break;case"button":e.push(s("kup-button",Object.assign({},t[o])));break;case"checkbox":e.push(s("kup-checkbox",Object.assign({},t[o])));break;case"combobox":e.push(s("kup-combobox",Object.assign({},t[o])));break;case"datepicker":e.push(s("kup-date-picker",Object.assign({},t[o])));break;case"slot":e.push(s("slot",null));break;case"text":e.push(s("div",{class:"text"}," ",t[o]));break;case"textfield":e.push(s("kup-text-field",Object.assign({},t[o])));break;case"timepicker":e.push(s("kup-time-picker",Object.assign({},t[o])))}return e}function be(t){return s("div",{id:z.DRAG_HANDLE,class:g.HEADER_BAR},t?s("div",{class:g.DIALOG_TITLE},t):null,s(zt,{color:`var(${d.TITLE})`,sizeX:"1.25em",sizeY:"100%",resource:"clear",id:z.DIALOG_CLOSE}))}function me(){return s("div",{class:"collapsible-trigger"},s("kup-button",{id:z.EXPAND_ACTION,toggable:!0,iconOff:"keyboard_arrow_down",icon:"keyboard_arrow_up"}))}!function(t){t.BUTTON_APPLY="apply",t.BUTTON_ADD_COLUMNS="add",t.BUTTON_GROUP="group",t.BUTTON_NEW="new",t.BUTTON_OPEN_IN_NEW="open-in-new",t.BUTTON_REMOVE="remove",t.BUTTON_SEARCH="search",t.CHECKBOX_GLOBAL="global-checkbox",t.SWITCH_GROUP="group",t.SWITCH_KEY="key",t.TEXTFIELD_FILTER="filter",t.TEXTFIELD_FORMULA="formula",t.TEXTFIELD_FROM="filter-from",t.TEXTFIELD_TO="filter-to"}(pe||(pe={}));const ke=Object.freeze({__proto__:null,create1:function(t){const i=t.data.chip?t.data.chip:[],e=t.data.color?t.data.color:[];let o=0;const r=t.data.text?t.data.text:[];return s("div",{class:`collapsible-layout-${t.layoutNumber} ${g.COLLAPSIBLE_CARD}`,style:{"--color-0":e[0]?e[0]:`var(${d.PRIMARY})`}},s("div",{class:"section-1"}),s("div",{class:"section-2"},s("div",{class:"sub-1"},s("div",{class:"text left"},r[o]?r[o]:""),s("div",{class:"text right"},r[++o]?r[o]:"")),s("div",{class:"sub-2"},s("div",{class:"text"},r[++o]?r[o]:"")),s("div",{class:`sub-3 ${g.COLLAPSIBLE_WRAPPER}`},i[0]?s("kup-chip",Object.assign({class:g.COLLAPSIBLE_ELEMENT,id:"chip1"},i[0])):null)),me())},create2:function(t){const i=t.data.chip?t.data.chip:[],e=t.data.color?t.data.color:[],o=t.data.image?t.data.image:[];let r=0;const n=t.data.text?t.data.text:[];return s("div",{class:`collapsible-layout-${t.layoutNumber} ${g.COLLAPSIBLE_CARD}`,style:{"--color-0":e[0]?e[0]:`var(${d.PRIMARY})`}},s("div",{class:"section-1"},s("div",{class:"sub-1"},s("div",{class:"text"},n[r]?n[r]:"")),s("div",{class:"sub-2"},s("div",{class:"text"},n[++r]?n[r]:"")),s("div",{class:"sub-3"},s("div",{class:"image"},o[0]?s(zt,Object.assign({id:"image1"},o[0],{sizeX:"24px",sizeY:"24px"})):null),s("div",{class:"text"},n[++r]?n[r]:"")),s("div",{class:`sub-4 ${g.COLLAPSIBLE_WRAPPER}`},i[0]?s("kup-chip",Object.assign({class:g.COLLAPSIBLE_ELEMENT,id:"chip1"},i[0])):null)),me())}}),ge=document.documentElement;function ve(t){for(let i=0;i<t.columns.length;i++){const e=t.columns[i];if(!isNaN(parseInt(e.name))&&e.visible)return i}return null}const ye=Object.freeze({__proto__:null,create1:function(t){const i=t.data.text?t.data.text:[],e=[];for(let t=1;t<i.length;t++)e.push(s("span",{class:"text "+(t%2==0?"":"label")},i[t]));return s("div",{class:`dialog-layout-${t.layoutNumber} dialog-element`},be(i[0]),s("div",{class:"section-1"},e))},create2:function(t){const i=t.data.text?t.data.text:[],e=[];for(let t=3;t<i.length;t++)e.push(s("span",{class:"text "+(t%2==0?"":"label")},i[t]));return s("div",{class:`dialog-layout-${t.layoutNumber} dialog-element`},be(i[0]?i[0]:""),i[1]&&i[2]?s("div",{class:"section-1"},s("div",{class:"text label"},i[1]),s("div",{class:"text "},i[2])):null,s("div",{class:"section-2"},e))},create3:function(t){const i=t.data.button?t.data.button:[],e=t.data.combobox?t.data.combobox:[],o=Array.prototype.slice.call(t.rootElement.children,0),r=t.data.textfield?t.data.textfield:[];return s("div",{class:`dialog-layout-${t.layoutNumber} ${g.DIALOG_UNRESIZABLE}`},s("div",null,i.length>0||r.length>0?s("div",{class:"section-1"},s(zt,{id:z.DRAG_HANDLE,resource:"drag_handle",sizeX:"32px",sizeY:"32px"}),fe(i,"button"),fe(r,"textfield"),fe(e,"combobox")):null,o.length>0?s("div",{class:"section-2"},fe(o,"slot")):null))},create4:function(t){const i=t.data.button?t.data.button:[],e=t.data.text?t.data.text:[],o=t.data.datatable?t.data.datatable:[];return s("div",{class:`dialog-layout-${t.layoutNumber} dialog-element`},be(e[0]?e[0]:""),o[0]&&i[0]&&i[1]?s("div",{class:"section-1"},s("kup-button",Object.assign({},i[0],{id:z.PREVIOUS_ROW,"onkup-button-click":()=>function(t){const i=t.rootElement.shadowRoot;let e=null,s=null,o=null,r=null;if(i&&(o=i.querySelector("kup-data-table"),e=i.querySelector("#"+z.NEXT_ROW),s=i.querySelector("#"+z.PREVIOUS_ROW),o&&(r=o.data)),r){let t=ve(r);if(t){const i=r.columns[t],o=r.columns[t-1],n=r.columns[t-2];isNaN(parseInt(o.name))||(i.visible=!1,o.visible=!0,isNaN(parseInt(n.name))&&(s.disabled=!0)),e.disabled=!1}o.refresh()}}(t),title:ge.ketchup.language.translate(C.PREVIOUS)})),s("kup-button",Object.assign({},i[1],{id:z.NEXT_ROW,"onkup-button-click":()=>function(t){const i=t.rootElement.shadowRoot;let e=null,s=null,o=null,r=null;if(i&&(o=i.querySelector("kup-data-table"),e=i.querySelector("#"+z.NEXT_ROW),s=i.querySelector("#"+z.PREVIOUS_ROW),o&&(r=o.data)),r){let t=ve(r);if(t){const i=r.columns[t+1],o=r.columns[t+2];i&&(r.columns[t].visible=!1,i.visible=!0,o||(e.disabled=!0)),s.disabled=!1}o.refresh()}}(t),title:ge.ketchup.language.translate(C.NEXT)}))):null,o[0]?s("div",{class:"section-2"},s("kup-data-table",Object.assign({id:"datatable1"},o[0]))):null)},create5:function(t){const i=Array.prototype.slice.call(t.rootElement.children,0),e=t.data.list?t.data.list:[],o=t.data.text?t.data.text:[];return s("div",{class:`dialog-layout-${t.layoutNumber} ${g.DIALOG_UNRESIZABLE}`},be(o[0]?o[0]:""),s("div",null,i.length>0?s("div",{class:"section-1"},fe(i,"slot")):null,e[0]?s("div",{class:"section-2"},s("kup-list",Object.assign({id:"list1"},e[0]))):null))},create6:function(t){const i=t.data.datatable?t.data.datatable:[],e=t.data.text?t.data.text:[];return s("div",{class:`dialog-layout-${t.layoutNumber}`},be(e[0]?e[0]:""),s("div",{class:"section-1"},i.length>0?s("kup-data-table",Object.assign({id:"datatable1"},i[0])):s("kup-spinner",{active:!0,dimensions:"7px",layout:14})))},create7:function(t){const i=t.data&&t.data.text?t.data.text:[],e=Array.prototype.slice.call(t.rootElement.children,0);return s("div",{class:`dialog-layout-${t.layoutNumber}`},be(i[0]?i[0]:""),e.length>0?fe(e,"slot"):null)}}),we=Object.freeze({__proto__:null,create1:function(t){const i=Array.prototype.slice.call(t.rootElement.children,0);return s("div",{class:`free-layout-${t.layoutNumber}`},i.length>0?fe(i,"slot"):null)},create2:function(t){const i=Array.prototype.slice.call(t.rootElement.children,0);return s("div",{class:`free-layout-${t.layoutNumber}`},i.length>0?fe(i,"slot"):null)}}),xe=document.documentElement,_e=Object.freeze({__proto__:null,create1:function(t){const i=t.data.color?t.data.color:[];let e=0;const o=t.data.text?t.data.text:[];return s("div",{class:`scalable-layout-${t.layoutNumber} scalable-card`},s("div",{class:"scalable-element"},s("div",{class:"descr"},s("div",{style:i[0]?{color:i[0]}:void 0},o[e]?o[e]:"")),s("div",{class:"value"},s("div",{style:i[1]?{color:i[1]}:void 0},o[++e]?o[e]:""))))},create2:function(t){const i=t.data.color?t.data.color:[],e=t.data.image?t.data.image:[],o=t.data.text?t.data.text:[];return s("div",{class:`scalable-layout-${t.layoutNumber} scalable-card`},s("div",{class:"scalable-element"},s("div",{class:"icon"},e[0]?s(zt,Object.assign({color:i[0]?i[0]:`var(${d.PRIMARY})`,id:"image1"},e[0],{sizeX:"1.25em",sizeY:"1.25em"})):null),s("div",{class:"value-int"},s("div",{style:i[1]?{color:i[1]}:void 0},o[0]?o[0]:"",o[1]?xe.ketchup.math.decimalSeparator():"")),o[1]?s("div",{class:"value-dec"},s("div",{style:i[1]?{color:i[1]}:void 0},o[1])):null,s("div",{class:"unit"},s("div",{style:i[1]?{color:i[1]}:void 0},o[2]?o[2]:""))))},create3:function(t){const i=t.data.color?t.data.color:[];let e=0;const o=t.data.text?t.data.text:[];return s("div",{class:`scalable-layout-${t.layoutNumber} scalable-card`},s("div",{class:"scalable-element"},s("div",{class:"value"},s("div",{style:i[0]?{color:i[0]}:void 0},o[e]?o[e]:"")),s("div",{class:"descr"},s("div",{style:i[1]?{color:i[1]}:void 0},o[++e]?o[e]:""))))},create4:function(t){const i=t.data.color?t.data.color:[],e=t.data.image?t.data.image:[],o=t.data.text?t.data.text:[];return s("div",{class:`scalable-layout-${t.layoutNumber} scalable-card`},s("div",{class:"scalable-element"},s("div",{class:"icon"},e[0]?s(zt,Object.assign({color:i[0]?i[0]:`var(${d.PRIMARY})`,id:"image1"},e[0],{sizeX:"1.25em",sizeY:"1.25em"})):null),s("div",{class:"value-and-unit"},s("div",{class:"value-int"},s("div",{style:i[1]?{color:i[1]}:void 0},o[0]?o[0]:"",o[1]?xe.ketchup.math.decimalSeparator():"")),o[1]?s("div",{class:"value-dec"},s("div",{style:i[1]?{color:i[1]}:void 0},o[1])):null,s("div",{class:"unit"},s("div",{style:i[1]?{color:i[1]}:void 0},o[2]?o[2]:""))),s("div",{class:"empty-placeholder"}),s("div",{class:"descr"},s("div",{style:i[2]?{color:i[2]}:void 0},o[3]?o[3]:""))))},create5:function(t){const i=t.data.color?t.data.color:[],e=t.data.image?t.data.image:[];let o=0;const r=t.data.text?t.data.text:[];return s("div",{class:`scalable-layout-${t.layoutNumber} scalable-card`},s("div",{class:"scalable-element"},s("div",{class:"text-wrapper"},s("div",{class:"descr"},s("div",{style:i[1]?{color:i[1]}:void 0},r[o]?r[o]:"")),s("div",{class:"value"},s("div",{style:i[2]?{color:i[2]}:void 0},r[++o]?r[o]:""))),s("div",{class:"icon"},e[0]?s(zt,Object.assign({color:i[0]?i[0]:`var(${d.PRIMARY})`,id:"image1"},e[0],{sizeX:"1em",sizeY:"1em"})):null)))},create6:function(t){const i=t.data.color?t.data.color:[],e=t.data.image?t.data.image:[];let o=0;const r=t.data.text?t.data.text:[];return s("div",{class:`scalable-layout-${t.layoutNumber} scalable-card`},s("div",{class:"scalable-element"},s("div",{class:"icon"},e[0]?s(zt,Object.assign({color:i[0]?i[0]:`var(${d.PRIMARY})`,id:"image1"},e[0],{sizeX:"1em",sizeY:"1em"})):null),s("div",{class:"text-wrapper"},s("div",{class:"value"},s("div",{style:i[1]?{color:i[1]}:void 0},r[o]?r[o]:"")),s("div",{class:"descr"},s("div",{style:i[2]?{color:i[2]}:void 0},r[++o]?r[o]:"")))))},create7:function(t){const i=t.data.color?t.data.color:[],e=t.data.image?t.data.image:[];let o=0;const r=t.data.text?t.data.text:[];return s("div",{class:`scalable-layout-${t.layoutNumber} scalable-card`},s("div",{class:"scalable-element"},s("div",{class:"text-wrapper"},s("div",{class:"value"},s("div",{style:i[1]?{color:i[1]}:void 0},r[o]?r[o]:"")),s("div",{class:"descr"},s("div",{style:i[2]?{color:i[2]}:void 0},r[++o]?r[o]:""))),s("div",{class:"icon"},e[0]?s(zt,Object.assign({color:i[0]?i[0]:`var(${d.PRIMARY})`,id:"image1"},e[0],{sizeX:"1em",sizeY:"1em"})):null)))},create8:function(t){const i=t.data.color?t.data.color:[],e=t.data.image?t.data.image:[];let o=0;const r=t.data.text?t.data.text:[];return s("div",{class:`scalable-layout-${t.layoutNumber} scalable-card`},s("div",{class:"scalable-element"},s("div",{class:"icon"},e[0]?s(zt,Object.assign({color:i[0]?i[0]:`var(${d.PRIMARY})`,id:"image1"},e[0],{sizeX:"1em",sizeY:"1em"})):null),s("div",{class:"value"},s("div",{style:i[1]?{color:i[1]}:void 0},r[o]?r[o]:"")),s("div",{class:"descr"},s("div",{style:i[2]?{color:i[2]}:void 0},r[++o]?r[o]:""))))},create9:function(t){const i=t.data.color&&t.data.color.length>0?t.data.color[0]:`var(${d.PRIMARY})`,e=t.data.color&&t.data.color.length>1?t.data.color[1]:`var(${d.BACKGROUND})`,o=t.data.color&&t.data.color.length>2?t.data.color[2]:`var(${d.TEXT})`,r=t.data.text&&t.data.text.length>0?t.data.text[0]:null,n=t.data.text&&t.data.text.length>1?t.data.text[1]:null,a=t.data.button&&t.data.button.length>0?JSON.parse(JSON.stringify(t.data.button)):[];return a.length>4&&a.splice(4,a.length-4),a.reverse(),s("div",{class:`scalable-layout-${t.layoutNumber}`,style:{"--color-0":i,"--color-1":e,"--color-2":o}},s("div",{class:"section-1"}),s("div",{class:"section-2"},s("div",{class:"scalable-card"},s("div",{class:"text scalable-element"},s("div",{class:"value"},r),s("div",{class:"descr"},n))),a.length>0?s("div",{class:"buttons"},a.map((i=>s(Ct,{icon:i.icon,title:i.title,styling:i.styling,wrapperClass:i.class,onClick:()=>t.onKupClick(t.rootElement.id,i.id)})))):void 0))}}),ze=document.documentElement,Ce=Object.freeze({__proto__:null,create1:function(t){const i=t.data.button?t.data.button:[],e=t.data.image?t.data.image:[];let o=0;const r=t.data.text?t.data.text:[];return s("div",{class:`standard-layout-${t.layoutNumber} ${i.length>0?g.HAS_ACTIONS:""}`},s("div",{class:"mdc-ripple-surface"},e[0]?s("div",{class:"section-1"},s(zt,Object.assign({id:"image1"},e[0],{sizeX:"100%",sizeY:"100%"}))):null,s("div",{class:"section-2"},r[o]?s("div",{class:"sub-2 title"},s("div",null,r[o])):null,r[++o]?s("div",{class:"sub-2 subtitle"},s("div",null,r[o])):null,r[++o]?s("div",{class:"sub-2 description"},s("div",null,r[o])):null)),i.length>0?s("div",{class:"section-3"},fe(i,"button")):null)},create2:function(t){const i=t.data.button?t.data.button:[],e=t.data.image?t.data.image:[];let o=0;const r=t.data.text?t.data.text:[];return s("div",{class:`standard-layout-${t.layoutNumber} ${i.length>0?g.HAS_ACTIONS:""}`},s("div",{class:"section-1"},r[o]?s("div",{class:"sub-1 title"},s("div",null,r[o])):null,r[++o]?s("div",{class:"sub-1 subtitle"},s("div",null,r[o])):null),s("div",{class:"mdc-ripple-surface"},e[0]?s("div",{class:"section-2"},s(zt,Object.assign({id:"image1"},e[0],{sizeX:"100%",sizeY:"100%"}))):null,s("div",{class:"section-3"},r[++o]?s("div",{class:"sub-3 description"},s("div",null,r[o])):null)),i.length>0?s("div",{class:"section-4"},fe(i,"button")):null)},create3:function(t){const i=t.data.button?t.data.button:[],e=t.data.image?t.data.image:[];let o=0;const r=t.data.text?t.data.text:[];return s("div",{class:`standard-layout-${t.layoutNumber} ${i?g.HAS_ACTIONS:""}`},s("div",{class:"mdc-ripple-surface"},s("div",{class:"section-1"},s("div",{class:"media"},e[0]?s(zt,Object.assign({id:"image1"},e[0],{sizeX:"100%",sizeY:"100%"})):null,s("div",{class:"text-on-media"},r[o]?s("div",{class:"sub-1 title"},s("div",null,r[o])):null,r[++o]?s("div",{class:"sub-1 subtitle"},s("div",null,r[o])):null))),s("div",{class:"section-2"},r[++o]?s("div",{class:"sub-2 description"},s("div",null,r[o])):null)),i.length>0?s("div",{class:"section-3"},fe(i,"button")):null)},create4:function(t){const i=t.data.button?t.data.button:[],e=t.data.image?t.data.image:[];let o=0;const r=t.data.text?t.data.text:[];return s("div",{class:`standard-layout-${t.layoutNumber} ${i?g.HAS_ACTIONS:""}`},s("div",{class:"mdc-ripple-surface"},s("div",{class:"section-1"},e[0]?s("div",{class:"sub-1 image"},s(zt,Object.assign({id:"image1"},e[0],{sizeX:"100%",sizeY:"100%"}))):null,s("div",{class:"text"},r[o]?s("div",{class:"sub-1 title"},s("div",null,r[o])):null,r[++o]?s("div",{class:"sub-1 subtitle"},s("div",null,r[o])):null))),s("div",{class:"section-2"},i?fe(i,"button"):""))},create5:function(t){const i=t.data.button?t.data.button:[];let e=0;const o=t.data.color?t.data.color:[];let r=0;const n=t.data.image?t.data.image:[],a=t.data.progressbar?t.data.progressbar:[];let l=0;const h=t.data.text?t.data.text:[];let c={"--color-0":o[e]?o[e]:`var(${d.PRIMARY})`,"--color-1":o[++e]?o[e]:`rgba(var(${d.PRIMARY}-rgb),0.1)`};return s("div",{class:`standard-layout-${t.layoutNumber}`,style:c},s("div",{class:"section-1"}),s("div",{class:"section-2"},s("div",{class:"sub-2 icon"},n[r]?s(zt,Object.assign({id:"image1"},n[r],{sizeX:"100%",sizeY:"100%"})):null),s("div",{class:"sub-2 text"},s("div",{class:"desc-text"},h[l]?h[l]:""),s("div",{class:"alt-text"},h[++l]?h[l]:"")),s("div",{class:"sub-2 image"},n[++r]?s(zt,Object.assign({id:"image1"},n[r],{sizeX:"100%",sizeY:"100%"})):null)),s("div",{class:"section-3"},s("div",{class:"sub-3 progress-bar"},a[0]?s("kup-progress-bar",Object.assign({id:"progressBar1","is-slim":!0},a[0])):null),s("div",{class:"sub-3 button"},i[0]?s("kup-button",Object.assign({id:"button1"},i[0])):null)),s("div",{class:"section-4"},s("div",{class:"sub-4 text"},s("div",null,h[++l]?h[l]:""),s("div",{class:"alt-text"},h[++l]?h[l]:"")),s("div",{class:"sub-4 text"},s("div",null,h[++l]?h[l]:""),s("div",{class:"alt-text"},h[++l]?h[l]:""))))},create6:function(t){const i=t.data.button?t.data.button:[],e=t.data.color?t.data.color:[],o=t.data.progressbar?t.data.progressbar:[];let r=0;const n=t.data.text?t.data.text:[];return s("div",{class:`standard-layout-${t.layoutNumber}`,style:{"--color-0":e[0]?e[0]:`var(${d.PRIMARY})`,"--kup_card_dynamic_color_0":"white"}},s("div",{class:"section-1"},s("div",{class:"alt-text"},n[r]?n[r]:"")),s("div",{class:"section-2"},s("div",{class:"sub-2"},o[0]?s("kup-progress-bar",Object.assign({id:"progressBar1","is-radial":!0},o[0])):null,s("div",null,n[++r]?n[r]:"")),i[0]?s("kup-button",Object.assign({id:"button1"},i[0])):null))},create7:function(t){const i=t.data.color?t.data.color:[],e=t.data.image?t.data.image:[];let o=0;const r=t.data.text?t.data.text:[];return s("div",{class:`standard-layout-${t.layoutNumber}`,style:{"--color-0":i[0]?i[0]:`var(${d.PRIMARY})`}},s("div",{class:"section-1"}),s("div",{class:"section-2"},s("div",{class:"sub-2 image"},e[0]?s(zt,Object.assign({id:"image1"},e[0],{sizeX:"100%",sizeY:"100%"})):null),s("div",{class:"sub-2 text"},s("div",null,r[o]?r[o]:""))),s("div",{class:"section-3"},s("div",{class:"sub-3 alt-text"},r[++o]?r[o]:""),s("div",{class:"sub-3 alt-text"},r[++o]?r[o]:"")))},create8:function(t){const i=t.data.chip?t.data.chip:[],e=t.data.color?t.data.color:[],o=t.data.image?t.data.image:[];let r=0;const n=t.data.text?t.data.text:[];return s("div",{class:`standard-layout-${t.layoutNumber}`,style:{"--color-0":e[0]?e[0]:`var(${d.PRIMARY})`}},s("div",{class:"background"}),s("div",{class:"section-1"},s("div",{class:"sub-1"},s("div",{class:"text"},n[r]?n[r]:"")),s("div",{class:"sub-2"},s("div",{class:"text"},n[++r]?n[r]:"")),s("div",{class:"sub-3"},s("div",{class:"image"},o[0]?s(zt,Object.assign({id:"image1"},o[0],{sizeX:"24px",sizeY:"24px"})):null),s("div",{class:"text"},n[++r]?n[r]:""))),s("div",{class:"section-2"},i[0]?s("kup-chip",Object.assign({id:"chip1"},i[0])):null))},create9:function(t){const i=t.data.chart?t.data.chart:[],e=t.data.color?t.data.color:[],o=t.data.image?t.data.image:[];let r=0;const n=t.data.text?t.data.text:[];return s("div",{class:`standard-layout-${t.layoutNumber}`,style:{"--color-0":e[0]?e[0]:`var(${d.PRIMARY})`}},s("div",{class:"section-1"},s("div",{class:"sub-1"},s("div",{class:"text description"},n[r]?n[r]:"")),s("div",{class:"sub-2"},s("div",{class:"icon"},o[0]?s(zt,Object.assign({color:e[0]?e[0]:`var(${d.PRIMARY})`,id:"image1"},o[0],{sizeX:"3em",sizeY:"3em"})):null),s("div",{class:"text-wrapper"},s("div",{class:"text title"},s("div",null,n[++r]?n[r]:"")),s("div",{class:"text subtitle"},s("div",null,n[++r]?n[r]:""))))),s("div",{class:"section-2"},i[0]?s("kup-chart",Object.assign({id:"chart1"},i[0])):null))},create10:function(t){const i=t.data.chart?t.data.chart:[],e=t.data.color?t.data.color:[],o=t.data.image?t.data.image:[];let r=0;const n=t.data.text?t.data.text:[];return s("div",{class:`standard-layout-${t.layoutNumber}`,style:{"--color-0":e[0]?e[0]:`var(${d.PRIMARY})`}},s("div",{class:"section-1"},i[0]?s("kup-chart",Object.assign({id:"chart1"},i[0])):null),s("div",{class:"section-2"},s("div",{class:"sub-1"},s("div",{class:"text description"},n[r]?n[r]:"")),s("div",{class:"sub-2"},s("div",{class:"icon"},o[0]?s(zt,Object.assign({color:e[0]?e[0]:`var(${d.PRIMARY})`,id:"image1"},o[0],{sizeX:"3em",sizeY:"3em"})):null),s("div",{class:"text-wrapper"},s("div",{class:"text title"},s("div",null,n[++r]?n[r]:"")),s("div",{class:"text subtitle"},s("div",null,n[++r]?n[r]:""))))))},create11:function(t){const i=t.data.chart?t.data.chart:[],e=t.data.color?t.data.color:[],o=t.data.image?t.data.image:[];let r=0;const n=t.data.text?t.data.text:[];return s("div",{class:`standard-layout-${t.layoutNumber}`,style:{"--color-0":e[0]?e[0]:`var(${d.PRIMARY})`}},s("div",{class:"section-1",onMouseEnter:t=>{let i=t.currentTarget;i.style.minWidth=i.scrollWidth+10+"px",i.style.maxWidth=i.scrollWidth+10+"px"},onMouseLeave:t=>{let i=t.currentTarget;i.style.minWidth="",i.style.maxWidth=""}},s("div",{class:"sub-1 dyn-color"},s("div",{class:"text description"},n[r]?n[r]:"")),s("div",{class:"sub-2"},s("div",{class:"icon"},o[0]?s(zt,Object.assign({color:e[0]?e[0]:`var(${d.PRIMARY})`,id:"image1"},o[0],{sizeX:"3em",sizeY:"3em"})):null),s("div",{class:"text-wrapper"},s("div",{class:"text title"},s("div",null,n[++r]?n[r]:"")),s("div",{class:"text subtitle"},s("div",null,n[++r]?n[r]:""))))),s("div",{class:"section-2"},i[0]?s("kup-chart",Object.assign({id:"chart1"},i[0])):null))},create12:function(t){const i=t.data.button?t.data.button:[],e=t.data.checkbox?t.data.checkbox:[],o=t.data.datepicker?t.data.datepicker:[],r=t.data.textfield?t.data.textfield:[],n=t.data.timepicker?t.data.timepicker:[],a=[];for(let t=0;t<i.length;t++){const e=i[t];e.id&&a.push(e.id)}return s("div",{class:`standard-layout-${t.layoutNumber} `},a.includes(pe.BUTTON_REMOVE)||a.includes(pe.BUTTON_GROUP)||a.includes(pe.BUTTON_ADD_COLUMNS)?s("div",{class:"section-1"},a.includes(pe.BUTTON_REMOVE)?s("kup-button",Object.assign({},i.find((t=>t.id===pe.BUTTON_REMOVE)))):null,a.includes(pe.BUTTON_GROUP)?s("kup-button",Object.assign({},i.find((t=>t.id===pe.BUTTON_GROUP)))):null,a.includes(pe.BUTTON_ADD_COLUMNS)?s("kup-button",Object.assign({},i.find((t=>t.id===pe.BUTTON_ADD_COLUMNS)))):null):null,s("div",{class:`section-2 ${r.length>0||o.length>0||n.length>0?g.HAS_CONTENT:""}`},o.length>0?fe(o,"datepicker"):null,r.length>0?fe(r,"textfield"):null,n.length>0?fe(n,"timepicker"):null),e.length>0?s("div",{class:"section-3"},fe(e,"checkbox")):null)},create13:function(t){const i=t.data.button?t.data.button:[],e=t.data.combobox?t.data.combobox:[],o=t.data.text?t.data.text:[],r=t.data.textfield?t.data.textfield:[];return s("div",{class:`standard-layout-${t.layoutNumber} ${i.length>0?g.HAS_ACTIONS:""}`},s("div",null,i.length>0||r.length>0?s("div",{class:"section-1"},fe(i,"button"),fe(r,"textfield"),fe(e,"combobox")):null,o.length>0?s("div",{class:"section-2"},fe(o,"text")):null))},create14:function(t){const i=t.data.autocomplete?t.data.autocomplete:[],e=t.data.button?t.data.button:[],o=t.data.checkbox?t.data.checkbox:[],r=t.data.chip?t.data.chip:[],n=t.data.datepicker?t.data.datepicker:[],a=t.data.image?t.data.image:[],l=t.data.object?t.data.object:[],h=t.data.switch?t.data.switch:[],c=t.data.tabbar?t.data.tabbar:[],u=t.data.text?t.data.text:[],d=t.data.textfield?t.data.textfield:[],p=t.data.timepicker?t.data.timepicker:[],f=t.data.tree?t.data.tree:[],b=[];let m=1,k=1;if(c[0]&&c[0].data)for(let t=0;t<c[0].data.length;t++){const i=c[0].data[t];b.push(i.id),i.active&&(k=t+1)}const v=[];for(let t=0;t<e.length;t++){const i=e[t];i.id&&v.push(i.id)}const x=[];for(let t=0;t<h.length;t++){const i=h[t];i.id&&x.push(i.id)}const _=[];for(let t=0;t<d.length;t++){const i=d[t];i.id&&_.push(i.id)}return s("div",{class:`standard-layout-${t.layoutNumber} `},l[0]?s("div",{class:"section-1"},a[0]?s(zt,Object.assign({id:"image1"},a[0],{sizeX:"84px",sizeY:"84px"})):s("div",{class:"sub-spinner"},s("kup-spinner",{active:!0,dimensions:"7px",layout:14})),s("div",{class:"sub-1"},u[0]||v.includes(pe.BUTTON_OPEN_IN_NEW)||v.includes(pe.BUTTON_SEARCH)?s("div",{class:"top"},u[0]?s("div",{class:"title"},s("span",{class:`label ${g.CLICKABLE_LINK}`,id:"title-link"},u[0])):null,v.includes(pe.BUTTON_OPEN_IN_NEW)||v.includes(pe.BUTTON_SEARCH)?s("div",{class:"buttons"},v.includes(pe.BUTTON_SEARCH)?s("kup-button",Object.assign({},e.find((t=>t.id===pe.BUTTON_OPEN_IN_NEW)))):null,v.includes(pe.BUTTON_SEARCH)?s("kup-button",Object.assign({},e.find((t=>t.id===pe.BUTTON_SEARCH)))):null):null):null,u[1]&&u[2]?s("div",{class:"info"},s("span",{class:"label"},u[1]),s("span",{class:"value"},u[2])):null,u[3]&&u[4]?s("div",{class:"info"},s("span",{class:"label"},u[3]),s("span",{class:"value"},u[4])):null)):null,s("div",{class:"section-2"},c[0]?s("kup-tab-bar",Object.assign({},c[0],{id:z.VIEW_SELECTOR})):null),s("div",{class:"section-3"},b.includes(y.FILTERS)?s("div",{class:`${g.CARD_VIEW} ${g.VIEW_PREFIX}${m} ${k===m++?g.VISIBLE:""}`},s("div",{class:`sub-field ${d.length>0||n.length>0||p.length>0?g.HAS_CONTENT:""}`},n.length>0?fe(n,"datepicker"):null,_.includes(pe.TEXTFIELD_FILTER)?s("kup-text-field",Object.assign({},d.find((t=>t.id===pe.TEXTFIELD_FILTER)))):null,_.includes(pe.TEXTFIELD_FROM)?s("kup-text-field",Object.assign({},d.find((t=>t.id===pe.TEXTFIELD_FROM)))):null,_.includes(pe.TEXTFIELD_TO)?s("kup-text-field",Object.assign({},d.find((t=>t.id===pe.TEXTFIELD_TO)))):null,p.length>0?fe(p,"timepicker"):null),o.length>0?s("div",{class:"sub-checkbox"},fe(o,"checkbox")):null):null,b.includes(w.COLUMNS)?s("div",{class:`${g.CARD_VIEW} ${g.VIEW_PREFIX}${m} ${k===m++?g.VISIBLE:""}`},s("div",{class:"sub-button"},v.includes(pe.BUTTON_REMOVE)?s("kup-button",Object.assign({},e.find((t=>t.id===pe.BUTTON_REMOVE)))):null,v.includes(pe.BUTTON_GROUP)?s("kup-button",Object.assign({},e.find((t=>t.id===pe.BUTTON_GROUP)))):null),s("div",{class:"sub-formula"},_.includes(pe.TEXTFIELD_FORMULA)?s("kup-text-field",Object.assign({},d.find((t=>t.id===pe.TEXTFIELD_FORMULA)))):null),s("div",{class:"sub-chip"},s("kup-chip",r[0]?Object.assign({},r[0],{type:Mt.INPUT,id:z.COLUMNS_LIST}):{type:Mt.INPUT,id:z.COLUMNS_LIST}),v.includes(pe.BUTTON_APPLY)?s("kup-button",Object.assign({},e.find((t=>t.id===pe.BUTTON_APPLY)))):null),l[0]?s("div",{class:"sub-tree"},f[0]?s("kup-tree",Object.assign({class:"kup-full-width",globalFilter:!0},f[0],{id:z.EXTRA_COLUMNS})):s("div",{class:"sub-spinner"},s("kup-spinner",{active:!0,dimensions:"8px",layout:2}))):null):null,b.includes(y.SETTINGS)?s("div",{class:`${g.CARD_VIEW} ${g.VIEW_PREFIX}${m} ${k===m++?g.VISIBLE:""}`},s("div",{class:"sub-autocomplete"},i.length>0?fe(i,"autocomplete"):null),s("div",{class:"sub-switch"},x.includes(pe.SWITCH_KEY)?s("kup-switch",Object.assign({},h.find((t=>t.id===pe.SWITCH_KEY)))):null)):null))},create15:function(t){const i=t.data.button?t.data.button:[],e=t.data.image?t.data.image:[],o=t.data.text?t.data.text:[],r=t.data.tree?t.data.tree:[],n=o.slice(0,5),a=o.slice(5),l=[],h=[],c=[];for(let t=0;t<a.length;t++)t%2==0?h.push(a[t]):c.push(a[t]);for(let t=0;t<h.length;t++)l.push(s("div",{class:"detail-row"},s("div",{class:"detail-row__label ellipsis"},h[t]),s("div",{class:"detail-row__value ellipsis"},c[t])));const u=[],d=[];for(let t=0;t<i.length;t++){const e=i[t];e.id&&u.push(e.id),(p=e.id)!==pe.BUTTON_OPEN_IN_NEW&&p!==pe.BUTTON_SEARCH&&d.push(e)}var p;return s("div",{class:`standard-layout-${t.layoutNumber}`},s("div",{class:"section-1"},e[0]?s(zt,Object.assign({id:"image1"},e[0],{sizeX:"84px",sizeY:"84px"})):s("div",{class:"sub-spinner"},s("kup-spinner",{active:!0,dimensions:"7px",layout:14})),s("div",{class:"sub-1"},o[0]||u.includes(pe.BUTTON_OPEN_IN_NEW)||u.includes(pe.BUTTON_SEARCH)?s("div",{class:"top"},o[0]?s("div",{class:"title"},s("span",{class:`label ${g.CLICKABLE_LINK}`,id:"title-link"},o[0])):null,u.includes(pe.BUTTON_OPEN_IN_NEW)||u.includes(pe.BUTTON_SEARCH)?s("div",{class:"buttons"},u.includes(pe.BUTTON_SEARCH)?s("kup-button",Object.assign({},i.find((t=>t.id===pe.BUTTON_OPEN_IN_NEW)))):null,u.includes(pe.BUTTON_SEARCH)?s("kup-button",Object.assign({},i.find((t=>t.id===pe.BUTTON_SEARCH)))):null):null):null,n[1]&&n[2]?s("div",{class:"info"},s("span",{class:"label"},n[1]),s("span",{class:"value"},n[2])):null,n[3]&&n[4]?s("div",{class:"info"},s("span",{class:"label"},n[3]),s("span",{class:"value"},n[4])):null)),s("div",{class:"section-2"},s("div",{class:`${g.CARD_VIEW} ${g.VIEW_PREFIX}1 ${g.VISIBLE}`},s("div",{class:"info"},l.length>0?l:null)),s("div",{class:`${g.CARD_VIEW} ${g.VIEW_PREFIX}2`},r[0]?s("kup-tree",Object.assign({class:"kup-full-width"},r[0])):null)),d.length>0?s("div",{class:"section-3"},fe(d.slice(0,5),"button"),d.length>5?(()=>{const t={data:{"kup-list":{data:[],showIcons:!0}},dropdownOnly:!0,icon:"more_vert",id:"options",styling:jt.ICON};for(let i=5;i<d.length;i++){const e=d[i];t.data["kup-list"].data.push(Object.assign(Object.assign({},e),{value:e.title}))}return s("kup-dropdown-button",Object.assign({},t,{title:ze.ketchup.language.translate(y.OPTIONS)}))})():null,r[0]?s("kup-button",{title:ze.ketchup.language.translate(y.SHOW_ROW_OPTIONS),id:"view-selector",icon:"menu"}):null):null)}});
1
+ import{r as t,c as i,f as e,h as s,H as o,d as r,g as n}from"./p-1ad7fea0.js";import{k as a,g as l,s as h,a as c,b as u,c as d,d as p,F as f,e as b,f as m,h as k,i as g,j as v,l as y,m as w,n as x,o as _,p as z,q as C,r as j,t as W,u as O,v as D,w as M,x as T,G as S,S as P,y as I,z as R,A as E,B as L,C as F,D as N,E as K,L as A,P as V,H,T as B,I as Y,J as X,M as G,N as U,O as q,Q as J,R as Z,U as Q,V as tt,W as it,X as et,Y as st,Z as ot,_ as rt,$ as nt,a0 as at,a1 as lt,a2 as ht,a3 as ct,a4 as ut,a5 as dt}from"./p-610a03d4.js";import{F as pt}from"./p-ccc637ee.js";import{F as ft}from"./p-b3577066.js";import{I as bt,F as mt,K as kt,a as gt,b as vt,c as yt,d as wt,e as xt}from"./p-a9b06bb8.js";import{c as _t}from"./p-635bb4b3.js";import{F as zt}from"./p-102866cd.js";import{F as Ct}from"./p-e43d4ccc.js";import{F as jt}from"./p-c634eb82.js";import{e as $t,K as Wt,b as Ot,a as Dt}from"./p-de07d17e.js";import{F as Mt,a as Tt}from"./p-7bda0684.js";import{M as St}from"./p-d4a879fc.js";import{F as Pt}from"./p-dc18691c.js";import{F as It,a as Rt,c as Et,n as Lt,p as Ft,f as Nt,g as Kt,s as At,b as Vt,d as Ht,r as Bt,t as Yt,K as Xt,e as Gt}from"./p-dba484b8.js";var Ut,qt;function Jt(t,i,e){return i==bt.CODE?t.id:i==bt.DESCRIPTION?t.value:i==bt.DESCRIPTION_AND_CODE?t.id+e+t.value:t.id}function Zt(t,i,e,s,o,r){const n=!!(e&&i&&i.data);let a="",l="",h=null;null!=r&&(h=r.detail.selected),null==h&&null!=t&&n&&(h=function(t,i,e){if(t&&t.data){let s=!1,o=null;for(let r=0;r<t.data.length;r++){let n=Jt(t.data[r],e," - ");t.data[r].selected=!1,s||n.toString().toLowerCase()!=i.toString().toLowerCase()||(o=t.data[r],o.selected=!0,s=!0)}if(1==s)return o}return function(t,i){if(t&&t.data){let e=!1,s=null;for(let o=0;o<t.data.length;o++)t.data[o].selected=!1,e||t.data[o].id.toString().toLowerCase()!=i.toString().toLowerCase()||(s=t.data[o],s.selected=!0,e=!0);if(1==e)return s;for(let o=0;o<t.data.length;o++)if(t.data[o].value.toString().toLowerCase()==i.toString().toLowerCase()){s=t.data[o],s.selected=!0,e=!0;break}if(1==e)return s}return null}(t,i)}(i,t,o),e.data=[...i.data]),null==h&&null==t&&i&&(h=function(t){if(t.data)for(let i=0;i<t.data.length;i++)if(t.data[i].selected)return t.data[i];return null}(i));let c=null;null==h?(h={id:null==t?"":t,value:null==t?"":t},a=h.id,l=h.id,c=h.id):(a=Jt(h,s," - "),l=Jt(h,o," - "),c=Jt(h,bt.CODE," - "));const u=n?i.data.find((t=>t.id===c)):null;return{value:a,displayedValue:l,node:u,exists:!!u}}!function(t){t.allowInconsistentValues="When true, the autocomplete fires the change event even when the value typed isn't included in the autocomplete list.",t.customStyle="Custom style of the component.",t.data="Props of the sub-components.",t.disabled="Defaults at false. When set to true, the component is disabled.",t.displayMode='Sets how to show the selected item value. Suported values: "code", "description", "both".',t.initialValue="Sets the initial value of the component.",t.inputDelay="Input event emission delay in milliseconds.",t.minimumChars="The minimum number of chars to trigger the autocomplete.",t.selectMode='Sets how to return the selected item value. Suported values: "code", "description", "both".',t.serverHandledFilter="When true, the items filter is managed server side, otherwise items filter is done client side.",t.showDropDownIcon="When true shows the drop-down icon, for open list."}(Ut||(Ut={})),function(t){t.CODE="code",t.DESCRIPTION="description",t.DESCRIPTION_AND_CODE="both"}(qt||(qt={}));var Qt,ti,ii,ei,si,oi,ri,ni,ai,li,hi,ci,ui,di,pi=function(t,i,e,s){if("a"===e&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof i?t!==i||!s:!i.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===e?s:"a"===e?s.call(t):s?s.value:i.get(t)},fi=function(t,i,e,s,o){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof i?t!==i||!o:!i.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?o.call(t,e):o?o.value=e:i.set(t,e),e};const bi=class{constructor(e){t(this,e),this.kupBlur=i(this,"kup-autocomplete-blur",6),this.kupChange=i(this,"kup-autocomplete-change",6),this.kupClick=i(this,"kup-autocomplete-click",6),this.kupFocus=i(this,"kup-autocomplete-focus",6),this.kupInput=i(this,"kup-autocomplete-input",6),this.kupIconClick=i(this,"kup-autocomplete-iconclick",6),this.kupItemClick=i(this,"kup-autocomplete-itemclick",6),Qt.add(this),ti.set(this,!0),ii.set(this,void 0),ei.set(this,null),si.set(this,a()),oi.set(this,void 0),ri.set(this,void 0),ni.set(this,null),ai.set(this,void 0),this.displayedValue=void 0,this.value="",this.allowInconsistentValues=!1,this.customStyle="",this.data=void 0,this.disabled=!1,this.displayMode=bt.DESCRIPTION,this.initialValue="",this.inputDelay=300,this.minimumChars=1,this.selectMode=bt.CODE,this.serverHandledFilter=!1,this.showDropDownIcon=!0}onKupBlur(){this.kupBlur.emit({comp:this,id:this.rootElement.id,value:this.value,inputValue:pi(this,ri,"f").value})}onKupChange(t){fi(this,ti,!0,"f");const i=pi(this,Qt,"m",ui).call(this,t,!0);(i.exists||this.allowInconsistentValues)&&this.kupChange.emit({comp:this,id:this.rootElement.id,value:this.value,inputValue:pi(this,ri,"f").value,node:i.node})}onKupClick(){this.kupClick.emit({comp:this,id:this.rootElement.id,value:this.value,inputValue:pi(this,ri,"f").value})}onKupFocus(){this.kupFocus.emit({comp:this,id:this.rootElement.id,value:this.value,inputValue:pi(this,ri,"f").value})}onKupInput(){fi(this,ti,!0,"f");const t=pi(this,Qt,"m",ui).call(this,pi(this,ri,"f").value,!1);pi(this,Qt,"m",li).call(this,!1),pi(this,ri,"f").value.length>=this.minimumChars&&this.kupInput.emit({comp:this,id:this.rootElement.id,value:this.value,inputValue:pi(this,ri,"f").value,node:t.node})}onKupIconClick(){pi(this,oi,"f").classList.contains("toggled")?pi(this,Qt,"m",hi).call(this):this.showDropDownIcon&&pi(this,Qt,"m",li).call(this,!0),this.kupIconClick.emit({comp:this,id:this.rootElement.id,value:this.value,inputValue:pi(this,ri,"f").value,open:pi(this,oi,"f").classList.contains("toggled")})}onKupItemClick(t){this.onKupChange(t.detail.selected.id),pi(this,Qt,"m",hi).call(this),pi(this,ri,"f")&&pi(this,ri,"f").focus(),this.kupItemClick.emit({comp:this,id:this.rootElement.id,value:this.value,inputValue:pi(this,ri,"f").value,node:t.detail.selected})}listenKeydown(t){if(pi(this,Qt,"m",ci).call(this))switch(t.key){case"ArrowDown":t.preventDefault(),t.stopPropagation(),pi(this,ei,"f").focusNext();break;case"ArrowUp":t.preventDefault(),t.stopPropagation(),pi(this,ei,"f").focusPrevious();break;case"Enter":t.preventDefault(),t.stopPropagation(),pi(this,ei,"f").select().then((()=>{pi(this,Qt,"m",hi).call(this),pi(this,ri,"f").focus()}));break;case"Escape":t.preventDefault(),t.stopPropagation(),pi(this,Qt,"m",hi).call(this)}else switch(t.key){case"ArrowDown":t.preventDefault(),t.stopPropagation(),pi(this,Qt,"m",li).call(this,!1),pi(this,ei,"f").focusNext();break;case"ArrowUp":t.preventDefault(),t.stopPropagation(),pi(this,Qt,"m",li).call(this,!1),pi(this,ei,"f").focusPrevious()}}async getProps(t){return l(this,Ut,t)}async getValue(){return this.value}async refresh(){e(this)}async setFocus(){pi(this,ri,"f").focus()}async setProps(t){h(this,Ut,t)}async setValue(t){fi(this,ti,!0,"f"),pi(this,Qt,"m",ui).call(this,t,!0)}componentWillLoad(){pi(this,si,"f").debug.logLoad(this,!1),pi(this,si,"f").theme.register(this),fi(this,ti,!0,"f"),this.value=this.initialValue,this.data||(this.data={"kup-list":{},"kup-text-field":{}})}componentDidLoad(){pi(this,Qt,"m",ui).call(this,this.value,!0),pi(this,si,"f").debug.logLoad(this,!0)}componentWillRender(){pi(this,si,"f").debug.logRender(this,!1)}componentDidRender(){const t=this.rootElement.shadowRoot;if(t){const i=t.querySelector(".f-text-field");i&&(fi(this,oi,i,"f"),fi(this,ri,i.querySelector("input"),"f"),ft(i))}pi(this,si,"f").debug.logRender(this,!0)}render(){const t=this.rootElement.classList.contains("kup-full-height"),i=this.rootElement.classList.contains("kup-full-width");return s(o,{key:"88774505c1f13b133ce2be0bda250290f6de04a6",class:`${t?"kup-full-height":""} ${i?"kup-full-width":""}`,style:pi(this,ii,"f")},s("style",{key:"2f8ca0e34b61255f0820ca1c9ac36d872642e009"},pi(this,si,"f").theme.setKupStyle(this.rootElement)),s("div",{key:"0cafe0954f744146d3fdd0c8452be08ea2f2193d",id:_t,style:pi(this,ii,"f")},s(pt,Object.assign({key:"6b84b32bd60fbc96c17f88257a439a5134243df1",icon:this.showDropDownIcon?c.DROPDOWN:null,trailingIcon:!0},this.data["kup-text-field"],{disabled:this.disabled,fullHeight:t,fullWidth:i,value:this.displayedValue,onBlur:()=>this.onKupBlur(),onClick:()=>this.onKupClick(),onChange:t=>this.onKupChange(t.target.value),onFocus:()=>this.onKupFocus(),onInput:()=>{window.clearTimeout(pi(this,ai,"f")),fi(this,ai,window.setTimeout((()=>this.onKupInput()),this.inputDelay),"f")},onIconClick:()=>this.onKupIconClick()}))),pi(this,Qt,"m",di).call(this))}disconnectedCallback(){pi(this,ei,"f")&&(pi(this,si,"f").dynamicPosition.unregister([pi(this,ei,"f")]),pi(this,ei,"f").remove()),pi(this,si,"f").theme.unregister(this)}get rootElement(){return r(this)}};var mi;ti=new WeakMap,ii=new WeakMap,ei=new WeakMap,si=new WeakMap,oi=new WeakMap,ri=new WeakMap,ni=new WeakMap,ai=new WeakMap,Qt=new WeakSet,li=function(t){if(1!=t&&pi(this,ri,"f").value.length<this.minimumChars)return pi(this,Qt,"m",hi).call(this),!1;pi(this,oi,"f").classList.add("toggled"),pi(this,ei,"f").menuVisible=!0;const i=pi(this,ei,"f").style;return i.height="auto",i.minWidth=pi(this,oi,"f").clientWidth+"px",pi(this,si,"f").dynamicPosition.isRegistered(pi(this,ei,"f"))?pi(this,si,"f").dynamicPosition.changeAnchor(pi(this,ei,"f"),pi(this,oi,"f")):pi(this,si,"f").dynamicPosition.register(pi(this,ei,"f"),pi(this,oi,"f"),0,u.AUTO,!0),pi(this,si,"f").dynamicPosition.start(pi(this,ei,"f")),pi(this,ni,"f")||fi(this,ni,{cb:()=>{pi(this,Qt,"m",hi).call(this)},el:pi(this,ei,"f")},"f"),pi(this,si,"f").addClickCallback(pi(this,ni,"f"),!0),!0},hi=function(){pi(this,oi,"f").classList.remove("toggled"),pi(this,ei,"f").menuVisible=!1,pi(this,si,"f").dynamicPosition.stop(pi(this,ei,"f")),pi(this,si,"f").removeClickCallback(pi(this,ni,"f"))},ci=function(){return 1==pi(this,ei,"f").menuVisible},ui=function(t,i){if(!pi(this,ti,"f"))return;fi(this,ti,!1,"f");const e=Zt(t,this.data["kup-list"],pi(this,ei,"f"),this.selectMode,this.displayMode);return e.exists||this.allowInconsistentValues?(i&&(this.value=e.value,this.displayedValue=e.displayedValue),null==pi(this,ei,"f")||this.serverHandledFilter||(pi(this,ei,"f").filter=e.value)):(this.displayedValue=t,null==pi(this,ei,"f")||this.serverHandledFilter||(pi(this,ei,"f").filter=e.value)),e},di=function(){return s("kup-list",Object.assign({displayMode:this.displayMode},this.data["kup-list"],{isMenu:!0,"onkup-list-click":t=>this.onKupItemClick(t),ref:t=>fi(this,ei,t,"f")}))},bi.style=":host{display:block;width:max-content}.kup-icon{transition:transform 0.15s}.toggled .kup-icon.kup-dropdown-icon{transform:rotate(-180deg)}.kup-icon.kup-dropdown-icon{-webkit-mask:var(--kup-dropdown-icon);mask:var(--kup-dropdown-icon)}.f-text-field{position:relative}:host(.kup-full-height){height:100%}:host(.kup-full-height) #kup-component,:host(.kup-full-height) .f-text-field,:host(.kup-full-height) .mdc-text-field{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);--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);--kup-textfield-primary-color-rgb:var(--kup-warning-color-rgb)}",function(t){t.customStyle="Custom style of the component.",t.imageData="The data of the image displayed inside the badge.Props of the sub-components.",t.text="The text displayed inside the badge.Defaults at false. When set to true, the component is disabled."}(mi||(mi={}));const ki=class{constructor(e){t(this,e),this.kupClick=i(this,"kup-badge-click",6),this.kupManager=a(),this.customStyle="",this.imageData=null,this.text=null}onKupClick(){this.kupClick.emit({comp:this,id:this.rootElement.id})}async getProps(t){return l(this,mi,t)}async refresh(){e(this)}async setProps(t){h(this,mi,t)}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),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(){let t=null;return!this.text&&this.imageData&&(this.imageData.sizeX||(this.imageData.sizeX="1em"),this.imageData.sizeY||(this.imageData.sizeY="1em"),this.imageData.color||(this.imageData.color=`var(${d.TEXT_ON_PRIMARY})`),t=s(zt,Object.assign({key:"13d604cf44b52b9a914eaa17dd40501400476847"},this.imageData))),s(o,{key:"a88511192e2f63f9e527485ada0786df92d6aa6f"},s("style",{key:"127e5883c7a23cdb3302d8f6a2db82d1d8bedcce"},this.kupManager.theme.setKupStyle(this.rootElement)),s("div",{key:"f06c0031f262f1214426b8916bc6d81690894045",id:_t,onClick:()=>this.onKupClick()},this.text,t))}disconnectedCallback(){this.kupManager.theme.unregister(this)}get rootElement(){return r(this)}};var gi;ki.style=":host{--kup_badge_border_radius:var(--kup-badge-border-radius, 30px);--kup_badge_font_family:var(--kup-badge-font-family, var(--kup-font-family));--kup_badge_font_size:var(--kup-badge-font-size, var(--kup-font-size));--kup_badge_min_size:var(--kup-badge-min-size, 1.5em);--kup_badge_padding:var(--kup-badge-padding, 0.25em);--kup_badge_primary_color:var(\n --kup-badge-primary-color,\n var(--kup-primary-color)\n );--kup_badge_text_on_primary_color:var(\n --kup-badge-text-on-primary-color,\n var(--kup-text-on-primary-color)\n );display:block;font-family:var(--kup_badge_font_family);font-size:var(--kup_badge_font_size);position:absolute;top:0;left:0;transform:translate(-50%, -50%)}#kup-component{background-color:var(--kup_badge_primary_color);border-radius:var(--kup_badge_border_radius);color:var(--kup_badge_text_on_primary_color);font-size:0.875em;min-height:var(--kup_badge_min_size);min-width:var(--kup_badge_min_size);padding:var(--kup_badge_padding);text-align:center}#kup-component .f-image{display:block;left:50%;position:absolute;top:50%;transform:translate(-50%, -50%);height:inherit;width:inherit}:host(.kup-top-right){top:0;right:0;bottom:unset;left:unset;transform:translate(50%, -50%)}:host(.kup-bottom-right){top:unset;right:0;bottom:0;left:unset;transform:translate(50%, 50%)}:host(.kup-bottom-left){top:unset;right:unset;bottom:0;left:0;transform:translate(-50%, 50%)}:host(.kup-danger){--kup-badge-primary-color:var(--kup-danger-color);--kup-badge-text-on-primary-color:white}:host(.kup-info){--kup-badge-primary-color:var(--kup-info-color);--kup-badge-text-on-primary-color:white}:host(.kup-secondary){--kup-badge-primary-color:var(--kup-secondary-color);--kup-badge-text-on-primary-color:var(--kup-text-on-secondary-color)}:host(.kup-success){--kup-badge-primary-color:var(--kup-success-color);--kup-badge-text-on-primary-color:white}:host(.kup-warning){--kup-badge-primary-color:var(--kup-warning-color);--kup-badge-text-on-primary-color:white}",function(t){t.buttonType="Sets the type of the button.",t.checked="When set to true, the icon button state will be on.",t.customStyle="Custom style of the component.",t.disabled="Defaults at false. When set to true, the component is disabled.",t.icon="When set, the button will show this icon.",t.iconOff="When set, the icon button off state will show this icon. Otherwise, an outlined version of the icon prop will be displayed.",t.label="When set, the button will show this text.",t.styling='Defines the style of the button. Styles available: "flat", "outlined" and "raised" which is also the default.',t.showSpinner="When set to true, the button show a spinner received in slot.",t.toggable="When set to true, the icon button will be toggable on/off.",t.trailingIcon="When set, the icon will be shown after the text."}(gi||(gi={}));const vi=class{constructor(e){t(this,e),this.kupBlur=i(this,"kup-button-blur",6),this.kupClick=i(this,"kup-button-click",6),this.kupFocus=i(this,"kup-button-focus",6),this.kupManager=a(),this.value="",this.buttonType=null,this.checked=!1,this.customStyle="",this.disabled=!1,this.icon=null,this.iconOff=null,this.label=null,this.styling=jt.RAISED,this.showSpinner=!1,this.toggable=!1,this.trailingIcon=!1}onKupBlur(){this.kupBlur.emit({comp:this,id:this.rootElement.id,value:this.value})}onKupClick(){!this.label&&this.icon?this.checked?(this.checked=!1,this.value="off"):(this.checked=!0,this.value="on"):this.value="N/A",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})}async getProps(t){return l(this,gi,t)}async refresh(){e(this)}async setProps(t){h(this,gi,t)}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),this.kupManager.theme.register(this)}componentDidLoad(){this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1),this.value=!this.label&&this.icon?this.checked?"on":"off":"N/A"}componentDidRender(){this.kupManager.debug.logRender(this,!0)}render(){const t={buttonType:this.buttonType,checked:this.checked,danger:!!this.rootElement.classList.contains("kup-danger"),disabled:this.disabled,fullHeight:!!this.rootElement.classList.contains("kup-full-height"),fullWidth:!!this.rootElement.classList.contains("kup-full-width"),icon:this.icon,iconOff:this.iconOff,info:!!this.rootElement.classList.contains("kup-info"),label:this.label,large:!!this.rootElement.classList.contains("kup-large"),pulsating:!!this.rootElement.classList.contains("kup-pulsating"),secondary:!!this.rootElement.classList.contains("kup-secondary"),shaped:!!this.rootElement.classList.contains("kup-shaped"),slim:!!this.rootElement.classList.contains("kup-slim"),success:!!this.rootElement.classList.contains("kup-success"),styling:this.styling,showSpinner:this.showSpinner,title:this.rootElement.title,toggable:this.toggable,trailingIcon:this.trailingIcon,warning:!!this.rootElement.classList.contains("kup-warning"),onBlur:()=>this.onKupBlur(),onClick:()=>this.onKupClick(),onFocus:()=>this.onKupFocus()};if(this.label||this.icon)return s(o,null,s("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),s("div",{id:_t},s(Ct,Object.assign({},t))));this.kupManager.debug.logMessage(this,"Empty button.",p.WARNING)}disconnectedCallback(){this.kupManager.theme.unregister(this)}get rootElement(){return r(this)}};var yi;vi.style=":host{display:block;width:max-content}: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%}",function(t){t.columns="Number of columns.",t.customStyle="Custom style of the component.",t.data="Props of the sub-components.",t.disabled="When set to true, the sub-components are disabled.",t.showSelection="When set to true, highlights the selected button with the secondary color of KupTheme.",t.styling='Defines the style of the buttons. Available styles are "flat", "outlined" and "raised" (which is the default).'}(yi||(yi={}));const wi=class{constructor(e){t(this,e),this.kupClick=i(this,"kup-buttonlist-click",6),this.kupManager=a(),this.selected="",this.columns=0,this.customStyle="",this.data=[],this.disabled=!1,this.showSelection=!0,this.styling=jt.RAISED}onKupClick(t,i){this.selected=t,this.kupClick.emit({comp:this,id:this.rootElement.id,index:t,subIndex:i,obj:this.getObjForEvent(t,i)})}onDropDownItemClick(t,i){this.selected=i,this.onKupClick(i,t.detail.value)}checkDataset(t){t||(t=[]),t.columns&&(this.kupManager.debug.logMessage(this,"Detected KupDataDataset: converting rows to nodes.",p.WARNING),this.data=this.kupManager.data.row.toNode(this.data))}async getProps(t){let i={};if(t)i=yi;else for(const t in yi)Object.prototype.hasOwnProperty.call(yi,t)&&(i[t]=this[t]);return i}async refresh(){e(this)}async setProps(t){h(this,yi,t)}renderButton(t,i){if(null===t)return this.kupManager.debug.logMessage(this,"Empty data button.",p.WARNING),null;const e=this.prepareDataFromTreeNode(t,i);return e.label||e.icon?s(Ct,Object.assign({},{checked:e.checked,disabled:e.disabled,fullHeight:e.fullHeight,fullWidth:e.fullWidth,icon:e.icon,iconOff:e.iconOff,id:e.id,label:e.label,large:e.large,shaped:e.shaped,styling:e.styling,toggable:e.toggable,trailingIcon:e.trailingIcon,title:e.title,wrapperClass:this.rootElement.className+" "+e.wrapperClass,onClick:()=>this.onKupClick(e.id,"-1")})):(this.kupManager.debug.logMessage(this,"Empty button.",p.WARNING),null)}renderDropdownButton(t,i){if(null===t)return this.kupManager.debug.logMessage(this,"Empty data dropdown button.",p.WARNING),null;const e=this.prepareDataFromTreeNode(t,i);return e.label||e.icon||(null==t?void 0:t.data.dropdownOnly)?(e.data={"kup-list":{data:this.getKupListDataForChildren(t.children),showIcons:!0}},s("kup-dropdown-button",Object.assign({class:this.rootElement.className+" "+e.wrapperClass},e,{"onkup-dropdownbutton-click":()=>this.onKupClick(i.toString(),"-1"),"onkup-dropdownbutton-itemclick":t=>this.onDropDownItemClick(t,i.toString())}))):(this.kupManager.debug.logMessage(this,"Empty dropdown button.",p.WARNING),null)}prepareDataFromTreeNode(t,i){const e=null!=t.data?Object.assign({},t.data):{};return null!=this.customStyle&&""!=this.customStyle.trim()&&(e.customStyle=this.customStyle),1!=this.disabled&&1!=t.disabled||(e.disabled=!0),null!=this.styling&&""!=this.styling.trim()&&(e.styling=this.styling),null==e.icon&&(e.icon=t.icon),null==e.label&&(e.label=t.value),e.fullHeight=!!this.rootElement.classList.contains("kup-full-height"),e.fullWidth=!!this.rootElement.classList.contains("kup-full-width"),e.id=i.toString(),e.large=!!this.rootElement.classList.contains("kup-large"),e.pulsating=!!this.rootElement.classList.contains("kup-pulsating"),e.shaped=!!this.rootElement.classList.contains("kup-shaped"),e.slim=!!this.rootElement.classList.contains("kup-slim"),e.wrapperClass||(e.wrapperClass=""),this.selected==e.id&&(e.wrapperClass=e.wrapperClass+" selected"),e}getKupListDataForChildren(t){const i=[];for(let e=0;e<t.length;e++){const s=t[e];i.push({icon:s.icon,id:e.toString(),value:s.value})}return i}getObjForEvent(t,i){let e=Number(t),s=-1;null!=i&&""!=i.trim()&&(s=Number(i));let o=this.data[e];return-1!=s?o.children[s].obj:o.obj}renderButtons(){if(null==this.data||this.data.length<1)return null;const t=[];for(let i=0;i<this.data.length;i++){const e=this.data[i];let s=null;s=null!=e.children&&e.children.length>0?this.renderDropdownButton(e,i):this.renderButton(e,i),s&&t.push(s)}return t}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.renderButtons();let i=this.columns;null!=this.data&&this.data.length>0&&i<=0&&(i=this.data.length);const e={"button-list--container":!0,"show-selection":!(!this.showSelection||!this.selected)};return s(o,{key:"a01db9921adbf39f2d78e4dab8f36628cfa6c36b",style:{"--kup_buttonlist_grid_columns":`repeat(${i}, auto)`}},s("style",{key:"48e3bd8c16086c166b34b4ff7131257d4258e627"},this.kupManager.theme.setKupStyle(this.rootElement)),s("div",{key:"849c6b0831fce22ca8cc3c462e5889146088f214",id:_t},s("div",{key:"61423fbc92aa0f2336b54b976719e48736c22e62",class:e},t)))}disconnectedCallback(){this.kupManager.theme.unregister(this)}get rootElement(){return r(this)}static get watchers(){return{data:["checkDataset"]}}};wi.style=":host{--kup_buttonlist_grid_gap:var(--kup-buttonlist-grid-gap, 1em);--kup_buttonlist_selected_primary_color:var(\n --kup-buttonlist-selected-primary-color,\n var(--kup-secondary-color)\n );--kup_buttonlist_selected_primary_color_h:var(\n --kup-buttonlist-selected-primary-color-h,\n var(--kup-secondary-color-h)\n );--kup_buttonlist_selected_primary_color_s:var(\n --kup-buttonlist-selected-primary-color-s,\n var(--kup-secondary-color-s)\n );--kup_buttonlist_selected_primary_color_l:var(\n --kup-buttonlist-selected-primary-color-l,\n var(--kup-secondary-color-l)\n );--kup_buttonlist_selected_primary_color_rgb:var(\n --kup-buttonlist-selected-primary-color-rgb,\n var(--kup-secondary-color-rgb)\n );--kup_buttonlist_selected_text_on_primary_color:var(\n --kup-buttonlist-selected-text-on-primary-color,\n var(--kup-text-on-secondary-color)\n );display:block}.button-list--container{display:grid;grid-gap:var(--kup_buttonlist_grid_gap);grid-template-columns:var(--kup_buttonlist_grid_columns);width:max-content}.button-list--container.show-selection .selected{--kup-button-primary-color:var(--kup_buttonlist_selected_primary_color);--kup-button-primary-color-rgb:var(\n --kup_buttonlist_selected_primary_color_rgb\n );--kup-button-primary-color-h:var(\n --kup_buttonlist_selected_primary_color_h\n );--kup-button-primary-color-s:var(\n --kup_buttonlist_selected_primary_color_s\n );--kup-button-primary-color-l:var(\n --kup_buttonlist_selected_primary_color_l\n );--kup-button-text-on-primary-color:var(\n --kup_buttonlist_selected_text_on_primary_color\n )}:host(.kup-full-width){width:100%}:host(.kup-full-width) .button-list--container{width:100%}:host(.kup-danger){--kup-button-primary-color:var(--kup-danger-color);--kup-button-primary-color-h:var(--kup-danger-color-h);--kup-button-primary-color-s:var(--kup-danger-color-s);--kup-button-primary-color-l:var(--kup-danger-color-l);--kup-button-primary-color-rgb:var(--kup-danger-color-rgb);--kup-button-text-on-primary-color:white}:host(.kup-info){--kup-button-primary-color:var(--kup-info-color);--kup-button-primary-color-h:var(--kup-info-color-h);--kup-button-primary-color-s:var(--kup-info-color-s);--kup-button-primary-color-l:var(--kup-info-color-l);--kup-button-primary-color-rgb:var(--kup-info-color-rgb);--kup-button-text-on-primary-color:white}:host(.kup-secondary){--kup-button-primary-color:var(--kup-secondary-color);--kup-button-primary-color-h:var(--kup-secondary-color-h);--kup-button-primary-color-s:var(--kup-secondary-color-s);--kup-button-primary-color-l:var(--kup-secondary-color-l);--kup-button-primary-color-rgb:var(--kup-secondary-color-rgb);--kup-button-text-on-primary-color:var(--kup-text-on-secondary-color)}:host(.kup-success){--kup-button-primary-color:var(--kup-success-color);--kup-button-primary-color-h:var(--kup-success-color-h);--kup-button-primary-color-s:var(--kup-success-color-s);--kup-button-primary-color-l:var(--kup-success-color-l);--kup-button-primary-color-rgb:var(--kup-success-color-rgb);--kup-button-text-on-primary-color:white}:host(.kup-warning){--kup-button-primary-color:var(--kup-warning-color);--kup-button-primary-color-h:var(--kup-warning-color-h);--kup-button-primary-color-s:var(--kup-warning-color-s);--kup-button-primary-color-l:var(--kup-warning-color-l);--kup-button-primary-color-rgb:var(--kup-warning-color-rgb);--kup-button-text-on-primary-color:white}";const xi=document.documentElement;function _i(t){var i;const e=t.data.cell,o=t.data.columns,r=[];let n=null;for(let a=0;a<e.length;a++){const l=e[a],h=t.data.columns[a],c=xi.ketchup.objects.isImage(l.obj)||xi.ketchup.objects.isIcon(l.obj)||(null===(i=l.shape)||void 0===i?void 0:i.toUpperCase())===f.IMAGE;if(!n&&c)n={cell:e[a],column:o[a],component:t,density:b.NONE,renderKup:!0,row:{cells:{[o[a].name]:e[a]}},wrapperClass:"c-centered"},l.data||(l.data={resource:l.value});else{const i={cell:l,column:h,component:t,density:b.NONE,renderKup:!0,row:{cells:{[h.name]:l}}};r.push(s("tr",null,s("td",{class:"label"},h.title),s("td",{class:"value"},s(mt,Object.assign({},i)))))}}return s("div",{class:`box-layout-${t.layoutNumber}`},s("div",{class:"container"},n?s("div",{class:"image"},s(mt,Object.assign({},n))):null,s("div",{class:"table"},s("table",null,r))))}function zi(t){var i;const e=t.data.cell,o=t.data.columns,r=[];let n=null;for(let o=0;o<e.length;o++){const a=e[o],l=t.data.columns[o],h=xi.ketchup.objects.isImage(a.obj)||xi.ketchup.objects.isIcon(a.obj)||(null===(i=a.shape)||void 0===i?void 0:i.toUpperCase())===f.IMAGE;if(!n&&h)n=o,a.data||(a.data={resource:a.value});else{const i={cell:a,column:l,component:t,density:b.NONE,renderKup:!0,row:{cells:{[l.name]:a}}};r.push(s("tr",null,s("td",{class:"label"},l.title))),r.push(s("tr",null,s("td",{class:"value"},s(mt,Object.assign({},i)))))}}return s("div",{class:`box-layout-${t.layoutNumber}`},s("div",{class:"container"},s("div",{class:"image"},s(mt,Object.assign({},{cell:e[n],column:o[n],component:t,density:b.NONE,renderKup:!0,row:{cells:{[o[n].name]:e[n]}},wrapperClass:"c-centered"}))),s("div",{class:"table"},s("table",null,r))))}const Ci=Object.freeze({__proto__:null,create1:function(t){const i=[];for(let e=0;e<t.data.cell.length;e++){const o=t.data.cell[e],r=t.data.columns[e],n={cell:o,column:r,component:t,density:b.NONE,renderKup:!0,row:{cells:{[r.name]:o}}};i.push(s("tr",null,s("td",{class:"label"},r.title),s("td",{class:"value"},s(mt,Object.assign({},n)))))}return s("div",{class:`box-layout-${t.layoutNumber}`},s("table",null,i))},create2:function(t){const i=[];for(let e=0;e<t.data.cell.length;e++){const o=t.data.cell[e],r=t.data.columns[e],n={cell:o,column:r,component:t,density:b.NONE,renderKup:!0,row:{cells:{[r.name]:o}}};n.cell.cssClass=n.cell.cssClass?n.cell.cssClass+" c-right-aligned":"c-right-aligned",i.push(s("tr",null,s("td",{class:"label"},r.title),s("td",{class:"value"},s(mt,Object.assign({},n)))))}return s("div",{class:`box-layout-${t.layoutNumber}`},s("table",null,i))},create3:function(t){const i=[];for(let e=0;e<t.data.cell.length;e++){const o=t.data.cell[e],r=t.data.columns[e],n={cell:o,column:r,component:t,density:b.NONE,renderKup:!0,row:{cells:{[r.name]:o}}};i.push(s("div",{class:"flex-container"},s("div",{class:"label"},r.title),s("div",{class:"value"},s(mt,Object.assign({},n)))))}return s("div",{class:`box-layout-${t.layoutNumber}`},s("div",{class:"container"},i))},create4:function(t){var i;const e=t.data.cell,o=t.data.columns;let r=null,n=null;for(let t=0;t<e.length;t++){const s=e[t],o=xi.ketchup.objects.isImage(s.obj)||xi.ketchup.objects.isIcon(s.obj)||(null===(i=s.shape)||void 0===i?void 0:i.toUpperCase())===f.IMAGE;!r&&o&&(r=t,s.data||(s.data={resource:s.value})),n||o||(n=t)}const a={cell:e[n],column:o[n],component:t,density:b.NONE,renderKup:!0,row:{cells:{[o[n].name]:e[n]}},wrapperClass:"c-centered"};return s("div",{class:`box-layout-${t.layoutNumber}`},s("div",{class:"container"},s("div",{class:"image"},s(mt,Object.assign({},{cell:e[r],column:o[r],component:t,density:b.NONE,renderKup:!0,row:{cells:{[o[r].name]:e[r]}},wrapperClass:"c-centered"}))),s("div",{class:"value"},s(mt,Object.assign({},a)))))},create5:_i,create6:zi,create7:function(t){return _i(t)},create8:function(t){return zi(t)}});var ji,$i;!function(t){t.customStyle="Custom style of the component.",t.data="Props of the sub-components.",t.disabled="Defaults at false. When set to true, the component is disabled.",t.firstDayIndex="First day number (0 - sunday, 1 - monday, ...)",t.initialValue="Sets the initial value of the component"}(ji||(ji={})),function(t){t.DATE="date",t.MONTH="month",t.YEAR="year"}($i||($i={}));const Wi=document.documentElement;function Oi(t,i){i instanceof Date&&(i=new Date);const e=t.rootElement;e.kupData.value=i,e.kupData.day=e.kupData.value.getDate(),e.kupData.month=e.kupData.value.getMonth(),e.kupData.year=e.kupData.value.getFullYear()}function Di(t){const i=t.rootElement;return null!=i.kupData.day?i.kupData.day:null}function Mi(t){const i=t.rootElement;return null!=i.kupData.month?i.kupData.month:null}function Ti(t){const i=t.rootElement;return null!=i.kupData.year?i.kupData.year:null}function Si(t,i){t.rootElement.kupData.day=i}function Pi(t,i){t.rootElement.kupData.month=i}function Ii(t,i){t.rootElement.kupData.year=i}function Ri(t){const i=t.rootElement;return i.kupData.firstDayIndex?i.kupData.firstDayIndex:1}function Ei(t){const i=t.rootElement;return i.kupData.calendarView?i.kupData.calendarView:$i.DATE}function Li(t,i){t.rootElement.kupData.calendarView=i}function Fi(t){const i=t-t%10;return{initYear:i,endYear:i+16-1}}function Ni(t){t.refresh()}function Ki(t,i){let e;switch(e=Wi.ketchup.dates.isValid(i,Wt.ISO_DATE)?new Date(i):new Date,Pi(t,e.getMonth()),Ii(t,e.getFullYear()),Ei(t)){case $i.MONTH:Li(t,$i.DATE);break;case $i.YEAR:Li(t,$i.MONTH)}Ni(t)}function Ai(t,i){let e;e=Wi.ketchup.dates.isValid(i,Wt.ISO_DATE)?new Date(i):new Date,Oi(t,e),t.onKupClick(t.rootElement.id,i),Ni(t)}const Vi=document.documentElement;function Hi(t){const i=t.rootElement;return null!=i.kupData.manageSeconds&&i.kupData.manageSeconds}function Bi(t){const i=t.rootElement;return i.kupData.value?i.kupData.value:""}function Yi(t){const i=t.rootElement;return null!=i.kupData.hoursActive&&i.kupData.hoursActive}function Xi(t){const i=t.rootElement;return null!=i.kupData.minutesActive&&i.kupData.minutesActive}function Gi(t){const i=t.rootElement;return null!=i.kupData.secondsActive&&i.kupData.secondsActive}function Ui(t,i){i&&(t.rootElement.kupData[i.id]=i)}function qi(t,i){return t.rootElement.shadowRoot.getElementById(i)}function Ji(t,i,e,s){const o=t.rootElement;o.kupData.hoursActive=i,o.kupData.minutesActive=e,o.kupData.secondsActive=s}function Zi(t,i,e){qi(t,k.HOURS).classList.remove(g.VISIBLE),qi(t,k.HOURSCIRCLE).classList.remove(g.VISIBLE),qi(t,k.MINUTES).classList.remove(g.VISIBLE),qi(t,k.MINUTESCIRCLE).classList.remove(g.VISIBLE),Hi(t)&&(qi(t,k.SECONDS).classList.remove(g.VISIBLE),qi(t,k.SECONDSCIRCLE).classList.remove(g.VISIBLE)),qi(t,i).classList.add(g.VISIBLE),qi(t,e).classList.add(g.VISIBLE)}function Qi(t,i,e,o,r,n,a,l,h){let c,u;const d=[];for(let p=0;p<t;p++){let f;c=i*Math.cos(p/t*2*Math.PI),u=i*Math.sin(p/t*2*Math.PI);let b={},m={};1==a?(f=p+3>12?p+3-12+n+"":24!==p+3+n?p+3+n+"":"00",b["data-value"]=f):p%a==0?p+15>=60?(b["data-value"]=p+15-60+"",f=p+15-60+n+""):(b["data-value"]=p+15+"",f=p+15+n+""):p+15>=60?(b["data-value"]=p+15-60+"",f="⋅"):(b["data-value"]=p+15+"",f="·"),m.left=c+e+"px",m.top=u+o+"px",1===b["data-value"].length&&(b["data-value"]="0"+b["data-value"]);let k=r;b["data-value"]===l&&(k+=" selected");let g=s("div",Object.assign({class:k,style:m},b,{onClick:t=>ie(t,h)}),f);d.push(g)}return d}function te(t,i){const e=qi(i,k.HOURS),s=qi(i,k.MINUTES),o=qi(i,k.SECONDS);let r=e.innerText+":"+s.innerText;Hi(i)&&(r+=":"+o.innerText),function(t,i,e){null!=t&&null==e&&(e=t.detail.selected.id),function(t,i){null==i&&(i=Bi(t)),null!=i&&function(t,i){t.rootElement.kupData.value=i}(t,i)}(i,e),i.onKupClick(i.rootElement.id,e)}(t,i,r)}function ie(t,i){const e=qi(i,k.HOURS),s=qi(i,k.MINUTES),o=qi(i,k.HOURSCIRCLE),r=qi(i,k.MINUTESCIRCLE),n=qi(i,k.SECONDS),a=qi(i,k.SECONDSCIRCLE);let l=t.target.getAttribute("data-value");Yi(i)?(e.innerText=l,o.querySelector(".selected").classList.remove("selected"),Ji(i,!1,!0,!1),Zi(i,k.MINUTES,k.MINUTESCIRCLE)):Xi(i)?(s.innerText=l,r.querySelector(".selected").classList.remove("selected"),Hi(i)?(Ji(i,!1,!1,!0),Zi(i,k.SECONDS,k.SECONDSCIRCLE)):(te(t,i),Ji(i,!0,!1,!1),Zi(i,k.HOURS,k.HOURSCIRCLE))):(n.innerText=l,a.querySelector(".selected").classList.remove("selected"),te(t,i),Ji(i,!0,!1,!1),Zi(i,k.HOURS,k.HOURSCIRCLE)),t.target.classList.add("selected")}const ee=document.documentElement,se=[v.AVERAGE,v.DIFFERENCE,v.PRODUCT,v.SUM];function oe(t){return t.rootElement.shadowRoot.querySelector("kup-combobox")}const re=document.documentElement,ne=document.documentElement;function ae(t){return t.data.options?t.data.options:{resetStatus:!1}}function le(t,i){const e=ae(t),s=t.rootElement,o=".";let r=s.kupData.value?s.kupData.value.toString():"0";"0"==r&&i!=o&&(r=""),i==o&&r.includes(o)||e.maxLength&&r.replace(o,"").length==e.maxLength||e.maxIntegers&&i!=o&&!r.includes(o)&&r.length==e.maxIntegers||e.maxDecimals&&r.includes(o)&&r.substring(r.indexOf(o)+1).length==e.maxDecimals||r.includes(o)&&14==r.substring(r.indexOf(o)+1).length||(r+=i,s.kupData.value=r,s.kupData.localeValue=ne.ketchup.math.numbers.toLocaleString(r),t.refresh())}let he=null,ce=null,ue=null;const de=Object.freeze({__proto__:null,create1:function(t){return s("div",{class:`built-in-layout-${t.layoutNumber} ${g.BUILT_IN_CARD}`},function(t){const i=t.rootElement;if(i.kupData||(i.kupData={}),t.data&&t.data.options){const e=t.data.options;if(e.resetStatus){i.kupData={};const s=e.initialValue;e.initialValue&&Oi(t,s&&s.k?new Date(s.k):new Date(e.initialValue)),e.firstDayIndex&&(i.kupData.firstDayIndex=e.firstDayIndex),e.resetStatus=!1}}i.kupData.value||Oi(t,new Date);const e=Wi.ketchup.dates.getMonthsAsString(),o=Ti(t),r=Mi(t),n=Fi(o),a=n.initYear,l=n.endYear;let h="not-set";switch(Ei(t)){case $i.DATE:h=e[r]+", "+o.toString();break;case $i.MONTH:h=o.toString();break;case $i.YEAR:h=a.toString()+" - "+l.toString()}const c={icon:"chevron_left",wrapperClass:"prev-page",onClick:()=>function(t){let i=Mi(t),e=Ti(t);Ei(t)==$i.DATE&&(i<1?(i=11,e--):i--),Ei(t)==$i.MONTH&&e--,Ei(t)==$i.YEAR&&(e=Fi(e).initYear-1),Si(t,null),Pi(t,i),Ii(t,e),Ni(t)}(t)},u=s(Ct,Object.assign({},c)),d={icon:"chevron_right",wrapperClass:"next-page",onClick:()=>function(t){let i=Mi(t),e=Ti(t);Ei(t)==$i.DATE&&(i>10?(i=0,e++):i++),Ei(t)==$i.MONTH&&e++,Ei(t)==$i.YEAR&&(e=Fi(e).endYear+1),Si(t,null),Pi(t,i),Ii(t,e),Ni(t)}(t)},p=s(Ct,Object.assign({},d)),f={wrapperClass:"change-view-button",styling:jt.FLAT,label:h,onClick:()=>function(t){switch(Si(t,null),Ei(t)){case $i.DATE:Li(t,$i.MONTH);break;case $i.MONTH:Li(t,$i.YEAR);break;case $i.YEAR:Li(t,$i.DATE)}Ni(t)}(t),id:"change-view-button"};return s("div",{id:t.rootElement.id+"_calendar"},s("div",{class:"section-1"},s("div",{class:"sub-1 nav"},u,s(Ct,Object.assign({},f)),p)),s("div",{class:"section-2"},function(t){switch(Ei(t)){case $i.DATE:return function(t){const i=Wi.ketchup.dates.getDaysOfWeekAsString(Ri(t)),e=function(t){const i=t.rootElement;return null==i.kupData.value&&Oi(t,new Date),i.kupData.value}(t),o=Di(t),r=Mi(t),n=Ti(t),a=[],l=[];for(let t=0;t<i.length;t++)a.push(s("th",null,s("span",{class:"item-text"},i[t])));const h=new Date(n,r,1),c=new Date(n,r+1,0);let u=Ri(t);const d=h.getDay();let p=[],f=0;for(;u!=d;)p.push(s("td",{class:"item empty"})),u++,f++,u>6&&(u=0);let b=1;for(;b<=c.getDate();){for(let i=f;i<7;i++){let i="item",a={"data-index":n.toString()+"-"+m((r+1).toString(),"0",2,!0)+"-"+m(b.toString(),"0",2,!0)};if((null!=o&&b===o||b===e.getDate()&&r===e.getMonth()&&n===e.getFullYear())&&(i+=" selected"),p.push(s("td",{class:i},s("span",Object.assign({},a,{class:"item-number",onClick:()=>{Ai(t,a["data-index"])}}),b))),b++,b>c.getDate())break}p.length>0&&(l.push(s("tr",null,p)),p=[]),f=0}return s("table",{class:"calendar"},s("thead",null,a),s("tbody",null,l))}(t);case $i.MONTH:return function(t){const i=Wi.ketchup.dates.getMonthsAsString($t.SHORT);let e=Di(t);const o=Mi(t),r=Ti(t);null==e&&(e=1);const n=[];let a=[],l=0;for(;l<12;){for(let n=0;n<4;n++){let n="item";const h={"data-index":r.toString()+"-"+m((l+1).toString(),"0",2,!0)+"-"+m(e.toString(),"0",2,!0)};l===o&&(n+=" selected"),a.push(s("td",{class:n},s("span",Object.assign({},h,{class:"item-number",onClick:()=>{Ki(t,h["data-index"])}}),i[l]))),l++}a.length>0&&(n.push(s("tr",null,a)),a=[])}return s("table",{class:"calendar"},s("tbody",null,n))}(t);case $i.YEAR:return function(t){let i=Di(t);const e=Mi(t),o=Ti(t);null==i&&(i=1);const r=Fi(o),n=r.endYear,a=[];let l=[],h=r.initYear;for(;h<=n;){for(let r=0;r<4;r++){let r="item",n={"data-index":h.toString()+"-"+m((e+1).toString(),"0",2,!0)+"-"+m(i.toString(),"0",2,!0)};h===o&&(r+=" selected"),l.push(s("td",{class:r},s("span",Object.assign({},n,{class:"item-number",onClick:()=>{Ki(t,n["data-index"])}}),h))),h++}l.length>0&&(a.push(s("tr",null,l)),l=[])}return s("table",{class:"calendar"},s("tbody",null,a))}(t)}}(t)))}(t))},create2:function(t){return s("div",{class:`built-in-layout-${t.layoutNumber} ${g.BUILT_IN_CARD}`},function(t){const i=t.rootElement;if(i.kupData={},t.data&&t.data.options){const e=t.data.options,s=e.initialValue;e.initialValue&&(i.kupData.value=s&&s.k?s.k:e.initialValue),null!=e.manageSeconds&&(i.kupData.manageSeconds=e.manageSeconds),null!=e.hoursActive&&(i.kupData.hoursActive=e.hoursActive),null!=e.minutesActive&&(i.kupData.minutesActive=e.minutesActive),null!=e.secondsActive&&(i.kupData.secondsActive=e.secondsActive)}else i.kupData.hoursActive=!0;return function(t){return s("div",{id:"clock-div",onBlur:i=>{(function(t,i){if(!t.relatedTarget)return!1;let e=t.relatedTarget.id;return null!=e&&""!=e.trim()&&(e==qi(i,k.CLOCK).id||"#clock-div#confirm#".indexOf("#"+e+"#")>=0)})(i,t)||function(t){t.onKupClick(t.rootElement.id,Bi(t))}(t)}},function(t){let i;i=Bi(t)?Vi.ketchup.dates.toDate(Bi(t),Hi(t)?Wt.ISO_TIME:Wt.ISO_TIME_WITHOUT_SECONDS):new Date;let e=i.getHours().toString(),o=i.getMinutes().toString();1===e.length&&(e="0"+e),1===o.length&&(o="0"+o);let r,n="";Hi(t)&&(n=i.getSeconds().toString(),1===n.length&&(n="0"+n));let a=[s("span",{id:k.HOURS,class:`h ${Yi(t)?g.VISIBLE:""}`,ref:i=>{Ui(t,i)},onClick:()=>{Ji(t,!0,!1,!1),Zi(t,k.HOURS,k.HOURSCIRCLE)},innerHTML:e}),":",s("span",{id:k.MINUTES,class:`m ${Xi(t)?g.VISIBLE:""}`,ref:i=>{Ui(t,i)},onClick:()=>{Ji(t,!1,!0,!1),Zi(t,k.MINUTES,k.MINUTESCIRCLE)},innerHTML:o})];Hi(t)&&(r=s("div",{id:k.SECONDSCIRCLE,class:`circle seconds ${Gi(t)?g.VISIBLE:""}`,ref:i=>{Ui(t,i)}},Qi(60,101,115,115,"sec unit",0,5,n,t),s("div",{class:"mid"})),a.push(":",s("span",{id:k.SECONDS,class:`s ${Gi(t)?g.VISIBLE:""}`,ref:i=>{Ui(t,i)},onClick:()=>{Ji(t,!1,!1,!0),Zi(t,k.SECONDS,k.SECONDSCIRCLE)},innerHTML:n})));const l={label:"Ok",styling:jt.FLAT,onClick:i=>{te(i,t)}};return s("div",{class:"clock",id:k.CLOCK,ref:i=>{Ui(t,i)}},s("div",{class:"top"},a),s("div",{id:k.HOURSCIRCLE,class:`circle hours ${Yi(t)?g.VISIBLE:""}`,ref:i=>{Ui(t,i)}},Qi(12,101,105,105,"hour",0,1,e,t),Qi(12,64,110,110,"hour2",12,1,e,t),s("div",{class:"mid"})),s("div",{id:k.MINUTESCIRCLE,class:`circle minutes ${Xi(t)?g.VISIBLE:""}`,ref:i=>{Ui(t,i)}},Qi(60,101,115,115,"min unit",0,5,o,t),s("div",{class:"mid"})),r,s("div",{class:"actions"},s(Ct,Object.assign({},l))))}(t))}(t)}(t))},create3:function(t){return s("div",{class:`built-in-layout-${t.layoutNumber} ${g.BUILT_IN_CARD}`},function(t){const i=t.data.options,e=[];let o,r,n,a;for(let t=0;t<i.data.columns.length;t++){const s=i.data.columns[t];!1!==s.visible&&s.obj&&ee.ketchup.objects.isNumber(s.obj)&&e.push({obj:s.obj,value:s.name,title:s.title,id:s.name})}const l=!!(e.length>0);return(i.enableMerge||i.enableMove)&&(o=function(t){const i=[];return t.enableMerge&&i.push({icon:"library_add",id:y.MERGE,value:ee.ketchup.language.translate(y.MERGE)}),t.enableMove&&i.push({icon:"swap_horiz",id:y.MOVE,value:ee.ketchup.language.translate(y.MOVE)}),i.length>0?s("kup-list",{data:i,showIcons:!0,"onkup-list-click":i=>function(t,i){switch(t.detail.selected.id){case y.MERGE:i.mergeCb&&i.mergeCb();break;case y.MOVE:i.moveCb&&i.moveCb()}}(i,t)}):null}(i)),i.enableFormula&&(r=function(t,i){const e=[],o=ee.ketchup.objects.isNumber(t.receivingColumn.obj)&&ee.ketchup.objects.isNumber(t.starterColumn.obj);o?e.push({id:v.AVERAGE,value:ee.ketchup.language.translate(v.AVERAGE)},{id:v.DIFFERENCE,value:ee.ketchup.language.translate(v.DIFFERENCE)},{id:v.PRODUCT,value:ee.ketchup.language.translate(v.PRODUCT)},{id:v.SUM,value:ee.ketchup.language.translate(v.SUM)},{id:`([${t.starterColumn.name}]/[${t.receivingColumn.name}])*100`,value:`[${t.starterColumn.name}] / [${t.receivingColumn.name}] * 100`},{id:`([${t.receivingColumn.name}]/[${t.starterColumn.name}])*100`,value:`[${t.receivingColumn.name}] / [${t.starterColumn.name}] * 100`}):e.push({id:w.NO_FORMULA,value:ee.ketchup.language.translate(w.NO_FORMULA)});const r={"kup-list":{data:e,selectable:!!o},"kup-text-field":{helper:i?o?`i.e.: [${t.receivingColumn.name}] - [${t.starterColumn.name}] + 1`:ee.ketchup.language.translate(w.NON_NUMERICAL):ee.ketchup.language.translate(w.NON_NUMERICAL_IN_TABLE),label:ee.ketchup.language.translate(v.FORMULA),outlined:!0}};return s("kup-combobox",{data:r,disabled:!i})}(i,l),l&&(n=s("kup-button",{"onKup-button-click":()=>async function(t){const i=t.data.options,e=oe(t);if(e){const t=await e.getValue();if(se.includes(t))ee.ketchup.data.column.new(i.data,x.MATH,{columns:[i.receivingColumn.name,i.starterColumn.name],operation:t}),void 0!==i.formulaCb&&i.formulaCb();else{const s=ee.ketchup.data.column.new(i.data,x.MATH,{operation:t});"string"==typeof s||s instanceof String?(e.classList.add("kup-danger"),e.data["kup-text-field"].helper=s,e.refresh()):void 0!==i.formulaCb&&i.formulaCb()}}}(t),label:ee.ketchup.language.translate(v.CALCULATE),styling:jt.OUTLINED}),a=s("div",{class:"sub-chip"},s("kup-chip",{data:e,"onKup-chip-click":i=>function(t,i){const e=oe(i),s=t.detail.chip.value;e.getValue().then((t=>{let i=t;i+="["+s+"]",e.setValue(i)}))}(i,t)})))),[o,r,n,a]}(t))},create4:function(t){return s("div",{class:`built-in-layout-${t.layoutNumber} ${g.BUILT_IN_CARD}`})},create5:function(t){return s("div",{class:`built-in-layout-${t.layoutNumber} ${g.BUILT_IN_CARD}`},function(t){const i=t.rootElement;i.kupData||(i.kupData={value:null,localeValue:""});let e=!1,o=!1;const r=ae(t);if(r.resetStatus){i.kupData={value:null,localeValue:""};const t=r.initialValue;r.initialValue&&(i.kupData.value=t&&t.k?t.k:r.initialValue.toString(),i.kupData.localeValue=ne.ketchup.math.numbers.toLocaleString(i.kupData.value)),r.resetStatus=!1}r.negative&&(o=!0),r.decimals&&(e=!0);const n={icon:"cancel",onClick:()=>function(t){const i=t.rootElement;i.kupData.value=null,i.kupData.localeValue="",t.refresh()}(t)},a={icon:"save",onClick:()=>function(t){const i=t.rootElement;t.onKupClick(t.rootElement.id,i.kupData.value?Number(i.kupData.value).toString():"")}(t)},l=.1.toLocaleString(ne.ketchup.math.locale).substring(1,2);return s("table",null,s("tr",null,s("td",{colSpan:3},s("div",{class:"value"},i.kupData.localeValue))),s("tr",null,s("td",null,s("div",{class:"number",onClick:()=>le(t,"1")},"1")),s("td",null,s("div",{class:"number",onClick:()=>le(t,"2")},"2")),s("td",null,s("div",{class:"number",onClick:()=>le(t,"3")},"3"))),s("tr",null,s("td",null,s("div",{class:"number",onClick:()=>le(t,"4")},"4")),s("td",null,s("div",{class:"number",onClick:()=>le(t,"5")},"5")),s("td",null,s("div",{class:"number",onClick:()=>le(t,"6")},"6"))),s("tr",null,s("td",null,s("div",{class:"number",onClick:()=>le(t,"7")},"7")),s("td",null,s("div",{class:"number",onClick:()=>le(t,"8")},"8")),s("td",null,s("div",{class:"number",onClick:()=>le(t,"9")},"9"))),s("tr",null,s("td",null,o?[s("div",{class:"number",onClick:()=>function(t){const i=t.rootElement;let e=i.kupData.value?i.kupData.value:"0";e.startsWith("-")||(e="-"+e,i.kupData.value=e,i.kupData.localeValue=ne.ketchup.math.numbers.toLocaleString(e),t.refresh())}(t)},"-")]:[]),s("td",null,s("div",{class:"number",onClick:()=>le(t,"0")},"0")),s("td",null,e?[s("div",{class:"number",onClick:()=>le(t,".")},l)]:[])),s("tr",null,s("td",null),s("td",null,s(Ct,Object.assign({},n))),s("td",null,s(Ct,Object.assign({},a)))))}(t))},create6:function(t){return s("div",{class:`built-in-layout-${t.layoutNumber} ${g.BUILT_IN_CARD}`},function(t){const i=t.data.options,e=!(!i.cancelCb&&!i.confirmCb);return s("div",{class:"message-box"},i.text?s("div",{class:"text"},i.text):null,e?s("div",{class:"button-wrapper"},i.cancelCb?s(Ct,{icon:"clear",label:re.ketchup.language.translate(y.ABORT),onClick:i.cancelCb,styling:jt.FLAT}):null,i.confirmCb?s(Ct,{icon:"check",label:re.ketchup.language.translate(y.CONFIRM),onClick:i.confirmCb}):null):null)}(t))},create7:function(t){return s("div",{class:`built-in-layout-${t.layoutNumber} ${g.BUILT_IN_CARD}`},function(t){const i=t.data.options,e=t=>{ce.disabled=t,he.disabled=t,ue.showSpinner=t};return ue&&e(!1),s("div",{class:`wrapper ${i.state}`},"authentication"===i.state?[s("div",{class:"title"},"Authentication"),s("kup-text-field",{class:"password",label:"Password",icon:"key-variant",inputType:"password",helperEnabled:!0,"onKup-textfield-iconclick":i.authCb,"onKup-textfield-submit":i.authCb})]:"ready"===i.state?[s("div",{class:"query-area"},s("kup-text-field",{label:"Ask me something!",textArea:!0,ref:t=>he=t}),s("div",{class:"buttons"},s("kup-button",{icon:"clear",label:"Clear","onKup-button-click":()=>{he.setValue("")},styling:jt.FLAT,ref:t=>ce=t}),s("kup-button",{icon:"open-ai",label:"Submit","onKup-button-click":()=>(async()=>{i.submitCb&&i.submitCb(e,he)})(),ref:t=>ue=t},s("kup-spinner",{active:!0,dimensions:"0.6em",slot:"spinner"})))),s("div",{class:`chat-area ${g.AUTOSCROLL}`},(()=>{const t=[];return i.messages&&i.messages.length>0?i.messages.forEach((i=>{t.push(s("div",{class:"message-container"},s("div",{class:i.type},i.text),s(Ct,{icon:"content-copy",onClick:()=>{navigator.clipboard.writeText(i.text)},title:"Copy text to clipboard.",wrapperClass:"copy"})))})):t.push(s("div",{class:"empty"},"Your chat history is empty!")),t})())]:"connecting"===i.state?[s("div",{class:"spinner"},s("kup-spinner",{active:!0,layout:6,dimensions:"7px"})),s("div",{class:"title"},"Just a moment."),s("div",{class:"text"},"We're connecting you to your AI assistant...")]:[s(zt,{resource:"hotel",sizeX:"4em",sizeY:"4em"}),s("div",{class:"title"},"Zzz..."),s("div",{class:"text"},"Your AI assistant is currently offline!")])}(t))}});var pe;function fe(t,i){let e=[];for(let o=0;o<t.length;o++)switch("string"==typeof t[0]||t[o].id||(t[o].id=i+o),i){case"autocomplete":e.push(s("kup-autocomplete",Object.assign({},t[o])));break;case"button":e.push(s("kup-button",Object.assign({},t[o])));break;case"checkbox":e.push(s("kup-checkbox",Object.assign({},t[o])));break;case"combobox":e.push(s("kup-combobox",Object.assign({},t[o])));break;case"datepicker":e.push(s("kup-date-picker",Object.assign({},t[o])));break;case"slot":e.push(s("slot",null));break;case"text":e.push(s("div",{class:"text"}," ",t[o]));break;case"textfield":e.push(s("kup-text-field",Object.assign({},t[o])));break;case"timepicker":e.push(s("kup-time-picker",Object.assign({},t[o])))}return e}function be(t){return s("div",{id:z.DRAG_HANDLE,class:g.HEADER_BAR},t?s("div",{class:g.DIALOG_TITLE},t):null,s(zt,{color:`var(${d.TITLE})`,sizeX:"1.25em",sizeY:"100%",resource:"clear",id:z.DIALOG_CLOSE}))}function me(){return s("div",{class:"collapsible-trigger"},s("kup-button",{id:z.EXPAND_ACTION,toggable:!0,iconOff:"keyboard_arrow_down",icon:"keyboard_arrow_up"}))}!function(t){t.BUTTON_APPLY="apply",t.BUTTON_ADD_COLUMNS="add",t.BUTTON_GROUP="group",t.BUTTON_NEW="new",t.BUTTON_OPEN_IN_NEW="open-in-new",t.BUTTON_REMOVE="remove",t.BUTTON_SEARCH="search",t.CHECKBOX_GLOBAL="global-checkbox",t.SWITCH_GROUP="group",t.SWITCH_KEY="key",t.TEXTFIELD_FILTER="filter",t.TEXTFIELD_FORMULA="formula",t.TEXTFIELD_FROM="filter-from",t.TEXTFIELD_TO="filter-to"}(pe||(pe={}));const ke=Object.freeze({__proto__:null,create1:function(t){const i=t.data.chip?t.data.chip:[],e=t.data.color?t.data.color:[];let o=0;const r=t.data.text?t.data.text:[];return s("div",{class:`collapsible-layout-${t.layoutNumber} ${g.COLLAPSIBLE_CARD}`,style:{"--color-0":e[0]?e[0]:`var(${d.PRIMARY})`}},s("div",{class:"section-1"}),s("div",{class:"section-2"},s("div",{class:"sub-1"},s("div",{class:"text left"},r[o]?r[o]:""),s("div",{class:"text right"},r[++o]?r[o]:"")),s("div",{class:"sub-2"},s("div",{class:"text"},r[++o]?r[o]:"")),s("div",{class:`sub-3 ${g.COLLAPSIBLE_WRAPPER}`},i[0]?s("kup-chip",Object.assign({class:g.COLLAPSIBLE_ELEMENT,id:"chip1"},i[0])):null)),me())},create2:function(t){const i=t.data.chip?t.data.chip:[],e=t.data.color?t.data.color:[],o=t.data.image?t.data.image:[];let r=0;const n=t.data.text?t.data.text:[];return s("div",{class:`collapsible-layout-${t.layoutNumber} ${g.COLLAPSIBLE_CARD}`,style:{"--color-0":e[0]?e[0]:`var(${d.PRIMARY})`}},s("div",{class:"section-1"},s("div",{class:"sub-1"},s("div",{class:"text"},n[r]?n[r]:"")),s("div",{class:"sub-2"},s("div",{class:"text"},n[++r]?n[r]:"")),s("div",{class:"sub-3"},s("div",{class:"image"},o[0]?s(zt,Object.assign({id:"image1"},o[0],{sizeX:"24px",sizeY:"24px"})):null),s("div",{class:"text"},n[++r]?n[r]:"")),s("div",{class:`sub-4 ${g.COLLAPSIBLE_WRAPPER}`},i[0]?s("kup-chip",Object.assign({class:g.COLLAPSIBLE_ELEMENT,id:"chip1"},i[0])):null)),me())}}),ge=document.documentElement;function ve(t){for(let i=0;i<t.columns.length;i++){const e=t.columns[i];if(!isNaN(parseInt(e.name))&&e.visible)return i}return null}const ye=Object.freeze({__proto__:null,create1:function(t){const i=t.data.text?t.data.text:[],e=[];for(let t=1;t<i.length;t++)e.push(s("span",{class:"text "+(t%2==0?"":"label")},i[t]));return s("div",{class:`dialog-layout-${t.layoutNumber} dialog-element`},be(i[0]),s("div",{class:"section-1"},e))},create2:function(t){const i=t.data.text?t.data.text:[],e=[];for(let t=3;t<i.length;t++)e.push(s("span",{class:"text "+(t%2==0?"":"label")},i[t]));return s("div",{class:`dialog-layout-${t.layoutNumber} dialog-element`},be(i[0]?i[0]:""),i[1]&&i[2]?s("div",{class:"section-1"},s("div",{class:"text label"},i[1]),s("div",{class:"text "},i[2])):null,s("div",{class:"section-2"},e))},create3:function(t){const i=t.data.button?t.data.button:[],e=t.data.combobox?t.data.combobox:[],o=Array.prototype.slice.call(t.rootElement.children,0),r=t.data.textfield?t.data.textfield:[];return s("div",{class:`dialog-layout-${t.layoutNumber} ${g.DIALOG_UNRESIZABLE}`},s("div",null,i.length>0||r.length>0?s("div",{class:"section-1"},s(zt,{id:z.DRAG_HANDLE,resource:"drag_handle",sizeX:"32px",sizeY:"32px"}),fe(i,"button"),fe(r,"textfield"),fe(e,"combobox")):null,o.length>0?s("div",{class:"section-2"},fe(o,"slot")):null))},create4:function(t){const i=t.data.button?t.data.button:[],e=t.data.text?t.data.text:[],o=t.data.datatable?t.data.datatable:[];return s("div",{class:`dialog-layout-${t.layoutNumber} dialog-element`},be(e[0]?e[0]:""),o[0]&&i[0]&&i[1]?s("div",{class:"section-1"},s("kup-button",Object.assign({},i[0],{id:z.PREVIOUS_ROW,"onkup-button-click":()=>function(t){const i=t.rootElement.shadowRoot;let e=null,s=null,o=null,r=null;if(i&&(o=i.querySelector("kup-data-table"),e=i.querySelector("#"+z.NEXT_ROW),s=i.querySelector("#"+z.PREVIOUS_ROW),o&&(r=o.data)),r){let t=ve(r);if(t){const i=r.columns[t],o=r.columns[t-1],n=r.columns[t-2];isNaN(parseInt(o.name))||(i.visible=!1,o.visible=!0,isNaN(parseInt(n.name))&&(s.disabled=!0)),e.disabled=!1}o.refresh()}}(t),title:ge.ketchup.language.translate(C.PREVIOUS)})),s("kup-button",Object.assign({},i[1],{id:z.NEXT_ROW,"onkup-button-click":()=>function(t){const i=t.rootElement.shadowRoot;let e=null,s=null,o=null,r=null;if(i&&(o=i.querySelector("kup-data-table"),e=i.querySelector("#"+z.NEXT_ROW),s=i.querySelector("#"+z.PREVIOUS_ROW),o&&(r=o.data)),r){let t=ve(r);if(t){const i=r.columns[t+1],o=r.columns[t+2];i&&(r.columns[t].visible=!1,i.visible=!0,o||(e.disabled=!0)),s.disabled=!1}o.refresh()}}(t),title:ge.ketchup.language.translate(C.NEXT)}))):null,o[0]?s("div",{class:"section-2"},s("kup-data-table",Object.assign({id:"datatable1"},o[0]))):null)},create5:function(t){const i=Array.prototype.slice.call(t.rootElement.children,0),e=t.data.list?t.data.list:[],o=t.data.text?t.data.text:[];return s("div",{class:`dialog-layout-${t.layoutNumber} ${g.DIALOG_UNRESIZABLE}`},be(o[0]?o[0]:""),s("div",null,i.length>0?s("div",{class:"section-1"},fe(i,"slot")):null,e[0]?s("div",{class:"section-2"},s("kup-list",Object.assign({id:"list1"},e[0]))):null))},create6:function(t){const i=t.data.datatable?t.data.datatable:[],e=t.data.text?t.data.text:[];return s("div",{class:`dialog-layout-${t.layoutNumber}`},be(e[0]?e[0]:""),s("div",{class:"section-1"},i.length>0?s("kup-data-table",Object.assign({id:"datatable1"},i[0])):s("kup-spinner",{active:!0,dimensions:"7px",layout:14})))},create7:function(t){const i=t.data&&t.data.text?t.data.text:[],e=Array.prototype.slice.call(t.rootElement.children,0);return s("div",{class:`dialog-layout-${t.layoutNumber}`},be(i[0]?i[0]:""),e.length>0?fe(e,"slot"):null)}}),we=Object.freeze({__proto__:null,create1:function(t){const i=Array.prototype.slice.call(t.rootElement.children,0);return s("div",{class:`free-layout-${t.layoutNumber}`},i.length>0?fe(i,"slot"):null)},create2:function(t){const i=Array.prototype.slice.call(t.rootElement.children,0);return s("div",{class:`free-layout-${t.layoutNumber}`},i.length>0?fe(i,"slot"):null)}}),xe=document.documentElement,_e=Object.freeze({__proto__:null,create1:function(t){const i=t.data.color?t.data.color:[];let e=0;const o=t.data.text?t.data.text:[];return s("div",{class:`scalable-layout-${t.layoutNumber} scalable-card`},s("div",{class:"scalable-element"},s("div",{class:"descr"},s("div",{style:i[0]?{color:i[0]}:void 0},o[e]?o[e]:"")),s("div",{class:"value"},s("div",{style:i[1]?{color:i[1]}:void 0},o[++e]?o[e]:""))))},create2:function(t){const i=t.data.color?t.data.color:[],e=t.data.image?t.data.image:[],o=t.data.text?t.data.text:[];return s("div",{class:`scalable-layout-${t.layoutNumber} scalable-card`},s("div",{class:"scalable-element"},s("div",{class:"icon"},e[0]?s(zt,Object.assign({color:i[0]?i[0]:`var(${d.PRIMARY})`,id:"image1"},e[0],{sizeX:"1.25em",sizeY:"1.25em"})):null),s("div",{class:"value-int"},s("div",{style:i[1]?{color:i[1]}:void 0},o[0]?o[0]:"",o[1]?xe.ketchup.math.decimalSeparator():"")),o[1]?s("div",{class:"value-dec"},s("div",{style:i[1]?{color:i[1]}:void 0},o[1])):null,s("div",{class:"unit"},s("div",{style:i[1]?{color:i[1]}:void 0},o[2]?o[2]:""))))},create3:function(t){const i=t.data.color?t.data.color:[];let e=0;const o=t.data.text?t.data.text:[];return s("div",{class:`scalable-layout-${t.layoutNumber} scalable-card`},s("div",{class:"scalable-element"},s("div",{class:"value"},s("div",{style:i[0]?{color:i[0]}:void 0},o[e]?o[e]:"")),s("div",{class:"descr"},s("div",{style:i[1]?{color:i[1]}:void 0},o[++e]?o[e]:""))))},create4:function(t){const i=t.data.color?t.data.color:[],e=t.data.image?t.data.image:[],o=t.data.text?t.data.text:[];return s("div",{class:`scalable-layout-${t.layoutNumber} scalable-card`},s("div",{class:"scalable-element"},s("div",{class:"icon"},e[0]?s(zt,Object.assign({color:i[0]?i[0]:`var(${d.PRIMARY})`,id:"image1"},e[0],{sizeX:"1.25em",sizeY:"1.25em"})):null),s("div",{class:"value-and-unit"},s("div",{class:"value-int"},s("div",{style:i[1]?{color:i[1]}:void 0},o[0]?o[0]:"",o[1]?xe.ketchup.math.decimalSeparator():"")),o[1]?s("div",{class:"value-dec"},s("div",{style:i[1]?{color:i[1]}:void 0},o[1])):null,s("div",{class:"unit"},s("div",{style:i[1]?{color:i[1]}:void 0},o[2]?o[2]:""))),s("div",{class:"empty-placeholder"}),s("div",{class:"descr"},s("div",{style:i[2]?{color:i[2]}:void 0},o[3]?o[3]:""))))},create5:function(t){const i=t.data.color?t.data.color:[],e=t.data.image?t.data.image:[];let o=0;const r=t.data.text?t.data.text:[];return s("div",{class:`scalable-layout-${t.layoutNumber} scalable-card`},s("div",{class:"scalable-element"},s("div",{class:"text-wrapper"},s("div",{class:"descr"},s("div",{style:i[1]?{color:i[1]}:void 0},r[o]?r[o]:"")),s("div",{class:"value"},s("div",{style:i[2]?{color:i[2]}:void 0},r[++o]?r[o]:""))),s("div",{class:"icon"},e[0]?s(zt,Object.assign({color:i[0]?i[0]:`var(${d.PRIMARY})`,id:"image1"},e[0],{sizeX:"1em",sizeY:"1em"})):null)))},create6:function(t){const i=t.data.color?t.data.color:[],e=t.data.image?t.data.image:[];let o=0;const r=t.data.text?t.data.text:[];return s("div",{class:`scalable-layout-${t.layoutNumber} scalable-card`},s("div",{class:"scalable-element"},s("div",{class:"icon"},e[0]?s(zt,Object.assign({color:i[0]?i[0]:`var(${d.PRIMARY})`,id:"image1"},e[0],{sizeX:"1em",sizeY:"1em"})):null),s("div",{class:"text-wrapper"},s("div",{class:"value"},s("div",{style:i[1]?{color:i[1]}:void 0},r[o]?r[o]:"")),s("div",{class:"descr"},s("div",{style:i[2]?{color:i[2]}:void 0},r[++o]?r[o]:"")))))},create7:function(t){const i=t.data.color?t.data.color:[],e=t.data.image?t.data.image:[];let o=0;const r=t.data.text?t.data.text:[];return s("div",{class:`scalable-layout-${t.layoutNumber} scalable-card`},s("div",{class:"scalable-element"},s("div",{class:"text-wrapper"},s("div",{class:"value"},s("div",{style:i[1]?{color:i[1]}:void 0},r[o]?r[o]:"")),s("div",{class:"descr"},s("div",{style:i[2]?{color:i[2]}:void 0},r[++o]?r[o]:""))),s("div",{class:"icon"},e[0]?s(zt,Object.assign({color:i[0]?i[0]:`var(${d.PRIMARY})`,id:"image1"},e[0],{sizeX:"1em",sizeY:"1em"})):null)))},create8:function(t){const i=t.data.color?t.data.color:[],e=t.data.image?t.data.image:[];let o=0;const r=t.data.text?t.data.text:[];return s("div",{class:`scalable-layout-${t.layoutNumber} scalable-card`},s("div",{class:"scalable-element"},s("div",{class:"icon"},e[0]?s(zt,Object.assign({color:i[0]?i[0]:`var(${d.PRIMARY})`,id:"image1"},e[0],{sizeX:"1em",sizeY:"1em"})):null),s("div",{class:"value"},s("div",{style:i[1]?{color:i[1]}:void 0},r[o]?r[o]:"")),s("div",{class:"descr"},s("div",{style:i[2]?{color:i[2]}:void 0},r[++o]?r[o]:""))))},create9:function(t){const i=t.data.color&&t.data.color.length>0?t.data.color[0]:`var(${d.PRIMARY})`,e=t.data.color&&t.data.color.length>1?t.data.color[1]:`var(${d.BACKGROUND})`,o=t.data.color&&t.data.color.length>2?t.data.color[2]:`var(${d.TEXT})`,r=t.data.text&&t.data.text.length>0?t.data.text[0]:null,n=t.data.text&&t.data.text.length>1?t.data.text[1]:null,a=t.data.button&&t.data.button.length>0?JSON.parse(JSON.stringify(t.data.button)):[];return a.length>4&&a.splice(4,a.length-4),a.reverse(),s("div",{class:`scalable-layout-${t.layoutNumber}`,style:{"--color-0":i,"--color-1":e,"--color-2":o}},s("div",{class:"section-1"}),s("div",{class:"section-2"},s("div",{class:"scalable-card"},s("div",{class:"text scalable-element"},s("div",{class:"value"},r),s("div",{class:"descr"},n))),a.length>0?s("div",{class:"buttons"},a.map((i=>s(Ct,{icon:i.icon,title:i.title,styling:i.styling,wrapperClass:i.class,onClick:()=>t.onKupClick(t.rootElement.id,i.id)})))):void 0))}}),ze=document.documentElement,Ce=Object.freeze({__proto__:null,create1:function(t){const i=t.data.button?t.data.button:[],e=t.data.image?t.data.image:[];let o=0;const r=t.data.text?t.data.text:[];return s("div",{class:`standard-layout-${t.layoutNumber} ${i.length>0?g.HAS_ACTIONS:""}`},s("div",{class:"mdc-ripple-surface"},e[0]?s("div",{class:"section-1"},s(zt,Object.assign({id:"image1"},e[0],{sizeX:"100%",sizeY:"100%"}))):null,s("div",{class:"section-2"},r[o]?s("div",{class:"sub-2 title"},s("div",null,r[o])):null,r[++o]?s("div",{class:"sub-2 subtitle"},s("div",null,r[o])):null,r[++o]?s("div",{class:"sub-2 description"},s("div",null,r[o])):null)),i.length>0?s("div",{class:"section-3"},fe(i,"button")):null)},create2:function(t){const i=t.data.button?t.data.button:[],e=t.data.image?t.data.image:[];let o=0;const r=t.data.text?t.data.text:[];return s("div",{class:`standard-layout-${t.layoutNumber} ${i.length>0?g.HAS_ACTIONS:""}`},s("div",{class:"section-1"},r[o]?s("div",{class:"sub-1 title"},s("div",null,r[o])):null,r[++o]?s("div",{class:"sub-1 subtitle"},s("div",null,r[o])):null),s("div",{class:"mdc-ripple-surface"},e[0]?s("div",{class:"section-2"},s(zt,Object.assign({id:"image1"},e[0],{sizeX:"100%",sizeY:"100%"}))):null,s("div",{class:"section-3"},r[++o]?s("div",{class:"sub-3 description"},s("div",null,r[o])):null)),i.length>0?s("div",{class:"section-4"},fe(i,"button")):null)},create3:function(t){const i=t.data.button?t.data.button:[],e=t.data.image?t.data.image:[];let o=0;const r=t.data.text?t.data.text:[];return s("div",{class:`standard-layout-${t.layoutNumber} ${i?g.HAS_ACTIONS:""}`},s("div",{class:"mdc-ripple-surface"},s("div",{class:"section-1"},s("div",{class:"media"},e[0]?s(zt,Object.assign({id:"image1"},e[0],{sizeX:"100%",sizeY:"100%"})):null,s("div",{class:"text-on-media"},r[o]?s("div",{class:"sub-1 title"},s("div",null,r[o])):null,r[++o]?s("div",{class:"sub-1 subtitle"},s("div",null,r[o])):null))),s("div",{class:"section-2"},r[++o]?s("div",{class:"sub-2 description"},s("div",null,r[o])):null)),i.length>0?s("div",{class:"section-3"},fe(i,"button")):null)},create4:function(t){const i=t.data.button?t.data.button:[],e=t.data.image?t.data.image:[];let o=0;const r=t.data.text?t.data.text:[];return s("div",{class:`standard-layout-${t.layoutNumber} ${i?g.HAS_ACTIONS:""}`},s("div",{class:"mdc-ripple-surface"},s("div",{class:"section-1"},e[0]?s("div",{class:"sub-1 image"},s(zt,Object.assign({id:"image1"},e[0],{sizeX:"100%",sizeY:"100%"}))):null,s("div",{class:"text"},r[o]?s("div",{class:"sub-1 title"},s("div",null,r[o])):null,r[++o]?s("div",{class:"sub-1 subtitle"},s("div",null,r[o])):null))),s("div",{class:"section-2"},i?fe(i,"button"):""))},create5:function(t){const i=t.data.button?t.data.button:[];let e=0;const o=t.data.color?t.data.color:[];let r=0;const n=t.data.image?t.data.image:[],a=t.data.progressbar?t.data.progressbar:[];let l=0;const h=t.data.text?t.data.text:[];let c={"--color-0":o[e]?o[e]:`var(${d.PRIMARY})`,"--color-1":o[++e]?o[e]:`rgba(var(${d.PRIMARY}-rgb),0.1)`};return s("div",{class:`standard-layout-${t.layoutNumber}`,style:c},s("div",{class:"section-1"}),s("div",{class:"section-2"},s("div",{class:"sub-2 icon"},n[r]?s(zt,Object.assign({id:"image1"},n[r],{sizeX:"100%",sizeY:"100%"})):null),s("div",{class:"sub-2 text"},s("div",{class:"desc-text"},h[l]?h[l]:""),s("div",{class:"alt-text"},h[++l]?h[l]:"")),s("div",{class:"sub-2 image"},n[++r]?s(zt,Object.assign({id:"image1"},n[r],{sizeX:"100%",sizeY:"100%"})):null)),s("div",{class:"section-3"},s("div",{class:"sub-3 progress-bar"},a[0]?s("kup-progress-bar",Object.assign({id:"progressBar1","is-slim":!0},a[0])):null),s("div",{class:"sub-3 button"},i[0]?s("kup-button",Object.assign({id:"button1"},i[0])):null)),s("div",{class:"section-4"},s("div",{class:"sub-4 text"},s("div",null,h[++l]?h[l]:""),s("div",{class:"alt-text"},h[++l]?h[l]:"")),s("div",{class:"sub-4 text"},s("div",null,h[++l]?h[l]:""),s("div",{class:"alt-text"},h[++l]?h[l]:""))))},create6:function(t){const i=t.data.button?t.data.button:[],e=t.data.color?t.data.color:[],o=t.data.progressbar?t.data.progressbar:[];let r=0;const n=t.data.text?t.data.text:[];return s("div",{class:`standard-layout-${t.layoutNumber}`,style:{"--color-0":e[0]?e[0]:`var(${d.PRIMARY})`,"--kup_card_dynamic_color_0":"white"}},s("div",{class:"section-1"},s("div",{class:"alt-text"},n[r]?n[r]:"")),s("div",{class:"section-2"},s("div",{class:"sub-2"},o[0]?s("kup-progress-bar",Object.assign({id:"progressBar1","is-radial":!0},o[0])):null,s("div",null,n[++r]?n[r]:"")),i[0]?s("kup-button",Object.assign({id:"button1"},i[0])):null))},create7:function(t){const i=t.data.color?t.data.color:[],e=t.data.image?t.data.image:[];let o=0;const r=t.data.text?t.data.text:[];return s("div",{class:`standard-layout-${t.layoutNumber}`,style:{"--color-0":i[0]?i[0]:`var(${d.PRIMARY})`}},s("div",{class:"section-1"}),s("div",{class:"section-2"},s("div",{class:"sub-2 image"},e[0]?s(zt,Object.assign({id:"image1"},e[0],{sizeX:"100%",sizeY:"100%"})):null),s("div",{class:"sub-2 text"},s("div",null,r[o]?r[o]:""))),s("div",{class:"section-3"},s("div",{class:"sub-3 alt-text"},r[++o]?r[o]:""),s("div",{class:"sub-3 alt-text"},r[++o]?r[o]:"")))},create8:function(t){const i=t.data.chip?t.data.chip:[],e=t.data.color?t.data.color:[],o=t.data.image?t.data.image:[];let r=0;const n=t.data.text?t.data.text:[];return s("div",{class:`standard-layout-${t.layoutNumber}`,style:{"--color-0":e[0]?e[0]:`var(${d.PRIMARY})`}},s("div",{class:"background"}),s("div",{class:"section-1"},s("div",{class:"sub-1"},s("div",{class:"text"},n[r]?n[r]:"")),s("div",{class:"sub-2"},s("div",{class:"text"},n[++r]?n[r]:"")),s("div",{class:"sub-3"},s("div",{class:"image"},o[0]?s(zt,Object.assign({id:"image1"},o[0],{sizeX:"24px",sizeY:"24px"})):null),s("div",{class:"text"},n[++r]?n[r]:""))),s("div",{class:"section-2"},i[0]?s("kup-chip",Object.assign({id:"chip1"},i[0])):null))},create9:function(t){const i=t.data.chart?t.data.chart:[],e=t.data.color?t.data.color:[],o=t.data.image?t.data.image:[];let r=0;const n=t.data.text?t.data.text:[];return s("div",{class:`standard-layout-${t.layoutNumber}`,style:{"--color-0":e[0]?e[0]:`var(${d.PRIMARY})`}},s("div",{class:"section-1"},s("div",{class:"sub-1"},s("div",{class:"text description"},n[r]?n[r]:"")),s("div",{class:"sub-2"},s("div",{class:"icon"},o[0]?s(zt,Object.assign({color:e[0]?e[0]:`var(${d.PRIMARY})`,id:"image1"},o[0],{sizeX:"3em",sizeY:"3em"})):null),s("div",{class:"text-wrapper"},s("div",{class:"text title"},s("div",null,n[++r]?n[r]:"")),s("div",{class:"text subtitle"},s("div",null,n[++r]?n[r]:""))))),s("div",{class:"section-2"},i[0]?s("kup-chart",Object.assign({id:"chart1"},i[0])):null))},create10:function(t){const i=t.data.chart?t.data.chart:[],e=t.data.color?t.data.color:[],o=t.data.image?t.data.image:[];let r=0;const n=t.data.text?t.data.text:[];return s("div",{class:`standard-layout-${t.layoutNumber}`,style:{"--color-0":e[0]?e[0]:`var(${d.PRIMARY})`}},s("div",{class:"section-1"},i[0]?s("kup-chart",Object.assign({id:"chart1"},i[0])):null),s("div",{class:"section-2"},s("div",{class:"sub-1"},s("div",{class:"text description"},n[r]?n[r]:"")),s("div",{class:"sub-2"},s("div",{class:"icon"},o[0]?s(zt,Object.assign({color:e[0]?e[0]:`var(${d.PRIMARY})`,id:"image1"},o[0],{sizeX:"3em",sizeY:"3em"})):null),s("div",{class:"text-wrapper"},s("div",{class:"text title"},s("div",null,n[++r]?n[r]:"")),s("div",{class:"text subtitle"},s("div",null,n[++r]?n[r]:""))))))},create11:function(t){const i=t.data.chart?t.data.chart:[],e=t.data.color?t.data.color:[],o=t.data.image?t.data.image:[];let r=0;const n=t.data.text?t.data.text:[];return s("div",{class:`standard-layout-${t.layoutNumber}`,style:{"--color-0":e[0]?e[0]:`var(${d.PRIMARY})`}},s("div",{class:"section-1",onMouseEnter:t=>{let i=t.currentTarget;i.style.minWidth=i.scrollWidth+10+"px",i.style.maxWidth=i.scrollWidth+10+"px"},onMouseLeave:t=>{let i=t.currentTarget;i.style.minWidth="",i.style.maxWidth=""}},s("div",{class:"sub-1 dyn-color"},s("div",{class:"text description"},n[r]?n[r]:"")),s("div",{class:"sub-2"},s("div",{class:"icon"},o[0]?s(zt,Object.assign({color:e[0]?e[0]:`var(${d.PRIMARY})`,id:"image1"},o[0],{sizeX:"3em",sizeY:"3em"})):null),s("div",{class:"text-wrapper"},s("div",{class:"text title"},s("div",null,n[++r]?n[r]:"")),s("div",{class:"text subtitle"},s("div",null,n[++r]?n[r]:""))))),s("div",{class:"section-2"},i[0]?s("kup-chart",Object.assign({id:"chart1"},i[0])):null))},create12:function(t){const i=t.data.button?t.data.button:[],e=t.data.checkbox?t.data.checkbox:[],o=t.data.datepicker?t.data.datepicker:[],r=t.data.textfield?t.data.textfield:[],n=t.data.timepicker?t.data.timepicker:[],a=[];for(let t=0;t<i.length;t++){const e=i[t];e.id&&a.push(e.id)}return s("div",{class:`standard-layout-${t.layoutNumber} `},a.includes(pe.BUTTON_REMOVE)||a.includes(pe.BUTTON_GROUP)||a.includes(pe.BUTTON_ADD_COLUMNS)?s("div",{class:"section-1"},a.includes(pe.BUTTON_REMOVE)?s("kup-button",Object.assign({},i.find((t=>t.id===pe.BUTTON_REMOVE)))):null,a.includes(pe.BUTTON_GROUP)?s("kup-button",Object.assign({},i.find((t=>t.id===pe.BUTTON_GROUP)))):null,a.includes(pe.BUTTON_ADD_COLUMNS)?s("kup-button",Object.assign({},i.find((t=>t.id===pe.BUTTON_ADD_COLUMNS)))):null):null,s("div",{class:`section-2 ${r.length>0||o.length>0||n.length>0?g.HAS_CONTENT:""}`},o.length>0?fe(o,"datepicker"):null,r.length>0?fe(r,"textfield"):null,n.length>0?fe(n,"timepicker"):null),e.length>0?s("div",{class:"section-3"},fe(e,"checkbox")):null)},create13:function(t){const i=t.data.button?t.data.button:[],e=t.data.combobox?t.data.combobox:[],o=t.data.text?t.data.text:[],r=t.data.textfield?t.data.textfield:[];return s("div",{class:`standard-layout-${t.layoutNumber} ${i.length>0?g.HAS_ACTIONS:""}`},s("div",null,i.length>0||r.length>0?s("div",{class:"section-1"},fe(i,"button"),fe(r,"textfield"),fe(e,"combobox")):null,o.length>0?s("div",{class:"section-2"},fe(o,"text")):null))},create14:function(t){const i=t.data.autocomplete?t.data.autocomplete:[],e=t.data.button?t.data.button:[],o=t.data.checkbox?t.data.checkbox:[],r=t.data.chip?t.data.chip:[],n=t.data.datepicker?t.data.datepicker:[],a=t.data.image?t.data.image:[],l=t.data.object?t.data.object:[],h=t.data.switch?t.data.switch:[],c=t.data.tabbar?t.data.tabbar:[],u=t.data.text?t.data.text:[],d=t.data.textfield?t.data.textfield:[],p=t.data.timepicker?t.data.timepicker:[],f=t.data.tree?t.data.tree:[],b=[];let m=1,k=1;if(c[0]&&c[0].data)for(let t=0;t<c[0].data.length;t++){const i=c[0].data[t];b.push(i.id),i.active&&(k=t+1)}const v=[];for(let t=0;t<e.length;t++){const i=e[t];i.id&&v.push(i.id)}const x=[];for(let t=0;t<h.length;t++){const i=h[t];i.id&&x.push(i.id)}const _=[];for(let t=0;t<d.length;t++){const i=d[t];i.id&&_.push(i.id)}return s("div",{class:`standard-layout-${t.layoutNumber} `},l[0]?s("div",{class:"section-1"},a[0]?s(zt,Object.assign({id:"image1"},a[0],{sizeX:"84px",sizeY:"84px"})):s("div",{class:"sub-spinner"},s("kup-spinner",{active:!0,dimensions:"7px",layout:14})),s("div",{class:"sub-1"},u[0]||v.includes(pe.BUTTON_OPEN_IN_NEW)||v.includes(pe.BUTTON_SEARCH)?s("div",{class:"top"},u[0]?s("div",{class:"title"},s("span",{class:`label ${g.CLICKABLE_LINK}`,id:"title-link"},u[0])):null,v.includes(pe.BUTTON_OPEN_IN_NEW)||v.includes(pe.BUTTON_SEARCH)?s("div",{class:"buttons"},v.includes(pe.BUTTON_SEARCH)?s("kup-button",Object.assign({},e.find((t=>t.id===pe.BUTTON_OPEN_IN_NEW)))):null,v.includes(pe.BUTTON_SEARCH)?s("kup-button",Object.assign({},e.find((t=>t.id===pe.BUTTON_SEARCH)))):null):null):null,u[1]&&u[2]?s("div",{class:"info"},s("span",{class:"label"},u[1]),s("span",{class:"value"},u[2])):null,u[3]&&u[4]?s("div",{class:"info"},s("span",{class:"label"},u[3]),s("span",{class:"value"},u[4])):null)):null,s("div",{class:"section-2"},c[0]?s("kup-tab-bar",Object.assign({},c[0],{id:z.VIEW_SELECTOR})):null),s("div",{class:"section-3"},b.includes(y.FILTERS)?s("div",{class:`${g.CARD_VIEW} ${g.VIEW_PREFIX}${m} ${k===m++?g.VISIBLE:""}`},s("div",{class:`sub-field ${d.length>0||n.length>0||p.length>0?g.HAS_CONTENT:""}`},n.length>0?fe(n,"datepicker"):null,_.includes(pe.TEXTFIELD_FILTER)?s("kup-text-field",Object.assign({},d.find((t=>t.id===pe.TEXTFIELD_FILTER)))):null,_.includes(pe.TEXTFIELD_FROM)?s("kup-text-field",Object.assign({},d.find((t=>t.id===pe.TEXTFIELD_FROM)))):null,_.includes(pe.TEXTFIELD_TO)?s("kup-text-field",Object.assign({},d.find((t=>t.id===pe.TEXTFIELD_TO)))):null,p.length>0?fe(p,"timepicker"):null),o.length>0?s("div",{class:"sub-checkbox"},fe(o,"checkbox")):null):null,b.includes(w.COLUMNS)?s("div",{class:`${g.CARD_VIEW} ${g.VIEW_PREFIX}${m} ${k===m++?g.VISIBLE:""}`},s("div",{class:"sub-button"},v.includes(pe.BUTTON_REMOVE)?s("kup-button",Object.assign({},e.find((t=>t.id===pe.BUTTON_REMOVE)))):null,v.includes(pe.BUTTON_GROUP)?s("kup-button",Object.assign({},e.find((t=>t.id===pe.BUTTON_GROUP)))):null),s("div",{class:"sub-formula"},_.includes(pe.TEXTFIELD_FORMULA)?s("kup-text-field",Object.assign({},d.find((t=>t.id===pe.TEXTFIELD_FORMULA)))):null),s("div",{class:"sub-chip"},s("kup-chip",r[0]?Object.assign({},r[0],{type:Mt.INPUT,id:z.COLUMNS_LIST}):{type:Mt.INPUT,id:z.COLUMNS_LIST}),v.includes(pe.BUTTON_APPLY)?s("kup-button",Object.assign({},e.find((t=>t.id===pe.BUTTON_APPLY)))):null),l[0]?s("div",{class:"sub-tree"},f[0]?s("kup-tree",Object.assign({class:"kup-full-width",globalFilter:!0},f[0],{id:z.EXTRA_COLUMNS})):s("div",{class:"sub-spinner"},s("kup-spinner",{active:!0,dimensions:"8px",layout:2}))):null):null,b.includes(y.SETTINGS)?s("div",{class:`${g.CARD_VIEW} ${g.VIEW_PREFIX}${m} ${k===m++?g.VISIBLE:""}`},s("div",{class:"sub-autocomplete"},i.length>0?fe(i,"autocomplete"):null),s("div",{class:"sub-switch"},x.includes(pe.SWITCH_KEY)?s("kup-switch",Object.assign({},h.find((t=>t.id===pe.SWITCH_KEY)))):null)):null))},create15:function(t){const i=t.data.button?t.data.button:[],e=t.data.image?t.data.image:[],o=t.data.text?t.data.text:[],r=t.data.tree?t.data.tree:[],n=o.slice(0,5),a=o.slice(5),l=[],h=[],c=[];for(let t=0;t<a.length;t++)t%2==0?h.push(a[t]):c.push(a[t]);for(let t=0;t<h.length;t++)l.push(s("div",{class:"detail-row"},s("div",{class:"detail-row__label ellipsis"},h[t]),s("div",{class:"detail-row__value ellipsis"},c[t])));const u=[],d=[];for(let t=0;t<i.length;t++){const e=i[t];e.id&&u.push(e.id),(p=e.id)!==pe.BUTTON_OPEN_IN_NEW&&p!==pe.BUTTON_SEARCH&&d.push(e)}var p;return s("div",{class:`standard-layout-${t.layoutNumber}`},s("div",{class:"section-1"},e[0]?s(zt,Object.assign({id:"image1"},e[0],{sizeX:"84px",sizeY:"84px"})):s("div",{class:"sub-spinner"},s("kup-spinner",{active:!0,dimensions:"7px",layout:14})),s("div",{class:"sub-1"},o[0]||u.includes(pe.BUTTON_OPEN_IN_NEW)||u.includes(pe.BUTTON_SEARCH)?s("div",{class:"top"},o[0]?s("div",{class:"title"},s("span",{class:`label ${g.CLICKABLE_LINK}`,id:"title-link"},o[0])):null,u.includes(pe.BUTTON_OPEN_IN_NEW)||u.includes(pe.BUTTON_SEARCH)?s("div",{class:"buttons"},u.includes(pe.BUTTON_SEARCH)?s("kup-button",Object.assign({},i.find((t=>t.id===pe.BUTTON_OPEN_IN_NEW)))):null,u.includes(pe.BUTTON_SEARCH)?s("kup-button",Object.assign({},i.find((t=>t.id===pe.BUTTON_SEARCH)))):null):null):null,n[1]&&n[2]?s("div",{class:"info"},s("span",{class:"label"},n[1]),s("span",{class:"value"},n[2])):null,n[3]&&n[4]?s("div",{class:"info"},s("span",{class:"label"},n[3]),s("span",{class:"value"},n[4])):null)),s("div",{class:"section-2"},s("div",{class:`${g.CARD_VIEW} ${g.VIEW_PREFIX}1 ${g.VISIBLE}`},s("div",{class:"info"},l.length>0?l:null)),s("div",{class:`${g.CARD_VIEW} ${g.VIEW_PREFIX}2`},r[0]?s("kup-tree",Object.assign({class:"kup-full-width"},r[0])):null)),d.length>0?s("div",{class:"section-3"},fe(d.slice(0,5),"button"),d.length>5?(()=>{const t={data:{"kup-list":{data:[],showIcons:!0}},dropdownOnly:!0,icon:"more_vert",id:"options",styling:jt.ICON};for(let i=5;i<d.length;i++){const e=d[i];t.data["kup-list"].data.push(Object.assign(Object.assign({},e),{value:e.title}))}return s("kup-dropdown-button",Object.assign({},t,{title:ze.ketchup.language.translate(y.OPTIONS)}))})():null,r[0]?s("kup-button",{title:ze.ketchup.language.translate(y.SHOW_ROW_OPTIONS),id:"view-selector",icon:"menu"}):null):null)}});
2
2
  /*!
3
3
  * vanilla-picker v2.12.2
4
4
  * https://vanilla-picker.js.org
@@ -1 +1 @@
1
- import{B as e,E as t,C as l,A as n,ac as r,u as i,w as o,ae as s,af as a,I as u,$ as c,ag as f,q as h,l as d}from"./p-610a03d4.js";import{K as p}from"./p-de07d17e.js";import{h as m}from"./p-1ad7fea0.js";import{F as b}from"./p-e43d4ccc.js";import{F as v}from"./p-c634eb82.js";class F extends e{getTextFilterValue(e={},t){return this._getTextFilterValue(e,t,!1)}getTextFilterValueTmp(e={},t){return this._getTextFilterValue(e,t,!0)}_getTextFilterValue(e={},t,l){let n="";if(null==e)return n;let r=e[t];return null==r||(n=l?r.textFieldTmp:r.textField),n}hasFiltersForColumn(e={},t){return this._hasFiltersForColumn(e,t,!1)}hasFiltersForColumnTmp(e={},t){return this._hasFiltersForColumn(e,t,!0)}_hasFiltersForColumn(e={},t,l){if(!t)return!1;let n=this._getTextFilterValue(e,t.name,l);if(null!=n&&""!=n.trim())return!0;if(this._hasIntervalTextFieldFilterValues(e,t,l))return!0;let r=this.getCheckBoxFilterValues(e,t.name);return!(null==r||r.length<1)}getCheckBoxFilterValues(e={},t){let l=[];if(null==e)return l;let n=e[t];return null==n||null==n.checkBoxes||(l=n.checkBoxes),l}hasIntervalTextFieldFilterValues(e={},t){return this._hasIntervalTextFieldFilterValues(e,t,!1)}hasIntervalTextFieldFilterValuesTmp(e={},t){return this._hasIntervalTextFieldFilterValues(e,t,!0)}_hasIntervalTextFieldFilterValues(e={},l,n){if(null==l)return!1;if(!this.isColumnFiltrableByInterval(l))return!1;let r=this._getIntervalTextFieldFilterValue(e,l.name,t.FROM,n);if(null!=r&&""!=r.trim())return!0;let i=this._getIntervalTextFieldFilterValue(e,l.name,t.TO,n);return null!=i&&""!=i.trim()}addCheckboxFilter(t={},l,n){if(null==t)return;let r=t[l];null==r&&(r={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null},t[l]=r),null==r.checkBoxes&&(r.checkBoxes=[]),null==n||null==n.value?r.checkBoxes=[]:e.valuesArrayContainsValue(r.checkBoxes,n.value)||(r.checkBoxes[r.checkBoxes.length]=n)}removeCheckboxFilter(t={},l,n){if(null==t||null==n)return;let r=t[l];if(null==r)return;null==r.checkBoxes&&(r.checkBoxes=[]);let i=e.indexOfValueInValuesArray(r.checkBoxes,n);if(i>=0){let e=[];for(let t=0;t<r.checkBoxes.length;t++)t!=i&&(e[e.length]=r.checkBoxes[t]);r.checkBoxes=[...e]}}isColumnFiltrableByInterval(e){return this.isObjFiltrableByInterval(e.obj)}getIntervalTextFieldFilterValues(e={},t){return this._getIntervalTextFieldFilterValues(e,t,!1)}getIntervalTextFieldFilterValuesTmp(e={},t){return this._getIntervalTextFieldFilterValues(e,t,!0)}_getIntervalTextFieldFilterValues(e={},l,n){return this._hasIntervalTextFieldFilterValues(e,l,n)?[this._getIntervalTextFieldFilterValue(e,l.name,t.FROM,n),this._getIntervalTextFieldFilterValue(e,l.name,t.TO,n)]:["",""]}getIntervalTextFieldFilterValue(e={},t,l){return this._getIntervalTextFieldFilterValue(e,t,l,!1)}getIntervalTextFieldFilterValueTmp(e={},t,l){return this._getIntervalTextFieldFilterValue(e,t,l,!0)}_getIntervalTextFieldFilterValue(e={},t,l,n){let r="";if(null==e)return r;let i=e[t];return null==i||n&&null==i.intervalTmp?r:n||null!=i.interval?(r=n?i.intervalTmp[l]:i.interval[l],r):r}setTextFieldFilterValue(e={},t,l){this._setTextFieldFilterValue(e,t,l,!0)}_setTextFieldFilterValue(e={},t,l,n){if(null==e)return;let r=e[t];null==r&&(r={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null},e[t]=r),n?r.textFieldTmp=null!=l?l.trim():l:r.textField=null!=l?l.trim():l}setIntervalTextFieldFilterValue(e={},t,l,n){this._setIntervalTextFieldFilterValue(e,t,l,n,!0)}_setIntervalTextFieldFilterValue(e={},t,l,n,r){if(null==e)return;let i=e[t];null==i&&(i={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null},e[t]=i),null==i.interval&&(i.interval=[],i.interval.push("","")),null==i.intervalTmp&&(i.intervalTmp=[],i.intervalTmp.push("","")),r?i.intervalTmp[n]=null!=l?l.trim():l:i.interval[n]=null!=l?l.trim():l}saveTextualFilters(e={},l){this._setTextFieldFilterValue(e,l,this.getTextFilterValueTmp(e,l),!1),this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValueTmp(e,l,t.FROM),t.FROM,!1),this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValueTmp(e,l,t.TO),t.TO,!1)}resetTextualFilters(e={},l){this._setTextFieldFilterValue(e,l,this.getTextFilterValue(e,l),!0),this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValue(e,l,t.FROM),t.FROM,!0),this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValue(e,l,t.TO),t.TO,!0)}getFilterValueForTooltip(e={},r){let i=this.getTextFilterValue(e,r.name),o=this.getIntervalTextFieldFilterValues(e,r),s=this.getCheckBoxFilterValues(e,r.name),a="",u=l(i,r.obj,r.decimals);""!=i&&(a=" AND "),""!=o[t.FROM]&&(u+=a+"(>= "+l(o[t.FROM],r.obj,r.decimals)+")",a=" AND "),""!=o[t.TO]&&(u+=a+"(<= "+l(o[t.TO],r.obj,r.decimals)+")",a=" AND "),a="";let c="";return s.forEach((e=>{c+=a+n(e,r),a=" OR "})),""!=c&&(c="("+c+")",""!=u&&(c=" AND "+c)),c=u+c,c}removeFilter(e={},t){e[t]={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null}}}var x;!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.removableColumns="Sets the possibility to remove the selected column.",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.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."}(x||(x={}));const w="TREE_COLUMN";var g;!function(e){e.DROPDOWN="dropdown",e.NODE="node"}(g||(g={}));const k=document.documentElement,T=k.ketchup?k.ketchup.objects:new o,y=k.ketchup?k.ketchup.data:new s;class j extends e{isFilterCompliantForCell(e,t,l){return!!e&&this.isFilterCompliantForSimpleValue(e.value,e.obj,t,l)}isFilterCompliantForCellObj(e,t,l){return!!e&&!!e.obj&&this.isFilterCompliantForSimpleValue(e.obj.k,e.obj,t,l)}isRowCompliant(e,t={},l="",n=!1,r=[],i){return this.areCellsCompliant(e.cells,t,l,n,r,i)}areCellsCompliant(e,t={},l="",n=!1,o=[],s){if(n){let t=!0;if(o&&null!=o&&o.length>0){t=!1;let n=this.filterIsNegative(l);for(let i=0;i<o.length;i++){if(0==o[i].visible)continue;const s=e[o[i].name];if(null==s)continue;t=this.isFilterCompliantForValue(s.value,l);let a=r(o[i],s);if(a!=s.value&&(t=t||this.isFilterCompliantForValue(a,l)),1==t&&!n)break;if(0==t&&n)break}}if(!t)return!1}if(null==s&&(s=new F),!this.hasFilters(t,o,s))return!0;let a=Object.keys(t);for(let l=0;l<a.length;l++){let n=a[l];const r=e[n];if(!r)return!1;let u=s.getTextFilterValue(t,n),c=s.getIntervalTextFieldFilterValues(t,i(o,n));const f=this.filterIsNegative(u);let h=this.isFilterCompliantForCell(r,u,c),d=f;if(T.isNumber(r.obj)||T.isDate(r.obj)||T.isTime(r.obj)||T.isTimestamp(r.obj)||(d=this.isFilterCompliantForCellObj(r,u,c)),f){if(!h||!d)return!1}else if(!h&&!d)return!1;let p=s.getCheckBoxFilterValues(t,n);if(0==p.length)continue;let m=!1;for(let e=0;e<p.length;e++){let t=p[e];if(null!=t&&null!=t.value){if(null!=r.value&&r.value.toLowerCase().trim()==t.value.toLowerCase().trim()){m=!0;break}if(null!=r.obj&&r.obj.k.toLowerCase().trim()==t.value.toLowerCase().trim()){m=!0;break}}}if(!m)return!1}return!0}hasFilters(e={},t,l){if(null==e)return!1;let n=Object.keys(e);if(null==n||n.length<1)return!1;null==l&&(l=new F);for(let r=0;r<n.length;r++){let o=n[r],s=null;if(s=o===w?{name:w,title:""}:i(t,o),l.hasFiltersForColumn(e,s))return!0}return!1}filterRows(e=[],t={},l="",n=[],r){if(!e||null==e)return[];let i=[];const o=!(!l||!n);if(this.hasFilters(t,n,r)||o)for(let s=0;s<e.length;s++){let a=e[s];(a.id&&a.id.indexOf("insert_")>-1||this.isRowCompliant(a,t,l,o,n,r))&&(i[i.length]=a)}else i=[...e];return i}getColumnValues(t,n,r,i){let o=new Array;null==i&&(i=new F);let s=i.getTextFilterValueTmp(t.filters,n.name),a=i.getIntervalTextFieldFilterValuesTmp(t.filters,n),u=i.getCheckBoxFilterValues(t.filters,n.name);if(null!=n.valuesForFilter&&n.valuesForFilter.length>0)return n.valuesForFilter.forEach((t=>{let r=t;(e.valuesArrayContainsValue(u,r)||""==s||i.isFilterCompliantForSimpleValue(r,n.obj,s,a))&&o.push({value:r,displayedValue:l(r,n.obj,n.decimals)})})),o;let c=Object.assign({},t.filters);c[n.name]={textField:s,textFieldTmp:s,checkBoxes:[],interval:a,intervalTmp:a};let f=this.filterRows(t.getRows(),c,r,t.getVisibleColumns(),i);for(let e=0;e<u.length;e++)o.push(u[e]);return y.cell.getUnivocalValue({rows:f},n,!0)}}const C=document.documentElement;function V(e=[],t=[]){if(!e||0===e.length)return[];if(e[0].group)return function(e=[],t=[]){if(!e||0===e.length)return[];const l=e[0].group.column;let n=function(e="",t=[]){if(!e||!t||0===t.length)return null;for(let l of t)if(l.column===e)return l;return null}(l,t);return n||(n={column:l,sortMode:c.A}),e.sort(((e,t)=>a({obj:e.group.obj,value:e.group.id},{obj:t.group.obj,value:t.group.id},n.sortMode))),e.forEach((e=>{e.group.children=V(e.group.children,t)})),e}(e,t);if(!t||0===t.length)return e;const l=t.length>1;return e.slice(0).sort(((e,n)=>{if(l){for(let l=0;l<t.length;l++){const r=O(e,n,t[l]);if(0!==r)return r}return 0}return O(e,n,t[0])}))}function O(e,t,l){const n=e.cells[l.column],r=t.cells[l.column];return n||r?n?r?a(n,r,l.sortMode):-1:1:0}function I(e=[],t={},l="",n=[],r,i){return null==i&&(i=new j),i.filterRows(e,t,l,n,r)}function M(e=[],t=[],l=[],n={}){if(!t)return[];if(!l||0===l.length||!e||0===e.length)return t;const o={},s=l.filter((({column:t})=>{for(let{name:l,title:n}of e)if(l===t)return o[l]=n,!0;return!1}));if(0===s.length)return t;const a=[];let c={};return t.forEach((t=>{const l=s[0].column,f=t.cells[l];if(f){const h=i(e,l),d=r(h,f),m=f.value;let b=null;for(let e of a)if(e.group.label===d){b=e;break}null===b&&(b={group:{id:m,parent:null,column:l,columnLabel:o[l],expanded:!1,label:d,children:[],obj:f.obj,totals:{}},cells:{}},a.push(b));for(let l=1;l<s.length;l++){const n=s[l],a=t.cells[n.column];if(a){const t=i(e,n.column),l=r(t,a),s=a.value;let u=null;for(let e=0;e<b.group.children.length;e++){const t=b.group.children[e];if(t.group.label===l){u=t;break}}u||(u={cells:{},group:{id:s,parent:b,column:n.column,columnLabel:o[n.column],children:[],expanded:!1,label:l,totals:{},obj:a.obj}},$(u),b.group.children.push(u)),b=u}}b.group.children.push(t),function(e,t,l,n){if(!e||!t)return;const r=Object.keys(t);0!==r.length&&r.forEach((r=>{const i=l.cells[r];if(i){const l=C.ketchup.objects.isNumber(i.obj),o=t[r];switch(o){case u.COUNT:let t=e.group.totals[r]||0;e.group.totals[r]=++t;let s=e.group.parent;for(;null!=s;){let e=s.group.totals[r]||0;s.group.totals[r]=++e,s=s.group.parent}break;case u.DISTINCT:let a;if(a=l?C.ketchup.math.numberify(C.ketchup.math.numberifySafe(i.value)):i.value,n[e.group.id]){let t=n[e.group.id][r];t?t.push(a):(n[e.group.id][r]=[],n[e.group.id][r].push(a))}else n[e.group.id]={},n[e.group.id][r]=[],n[e.group.id][r].push(a);let c=e.group.parent;for(;null!=c;){if(n[c.group.id]){let e=n[c.group.id][r];e?e.push(a):(n[c.group.id][r]=[],n[c.group.id][r].push(a))}else n[c.group.id]={},n[c.group.id][r]=[],n[c.group.id][r].push(a);c=c.group.parent}break;case u.SUM:case u.AVERAGE:if(l&&i.value){const t=C.ketchup.math.numberify(C.ketchup.math.numberifySafe(i.value));e.group.totals[r]=t+(e.group.totals[r]||0);let l=e.group.parent;for(;null!=l;){const e=C.ketchup.math.numberify(l.group.totals[r]||0);l.group.totals[r]=t+e,l=l.group.parent}}break;case u.MIN:if(l&&i.value){const t=e.group.totals[r],l=C.ketchup.math.numberify(C.ketchup.math.numberifySafe(i.value));e.group.totals[r]=t?Math.min(t,l):l;let n=e.group.parent;for(;null!=n;){const e=n.group.totals[r];n.group.totals[r]=e?Math.min(e,l):l,n=n.group.parent}}else if(i.value&&C.ketchup.objects.isDate(i.obj)){const t=C.ketchup.dates.toDayjs(i.value);if(C.ketchup.dates.isValid(t)){const l=e.group.totals[r];if(l){let n=[];n.push(t),n.push(C.ketchup.dates.toDayjs(l)),e.group.totals[r]=C.ketchup.dates.format(C.ketchup.dates.min(n),p.ISO_DATE)}else e.group.totals[r]=C.ketchup.dates.format(t,p.ISO_DATE);let n=e.group.parent;for(;null!=n;){const e=n.group.totals[r];if(e){let l=[];l.push(t),l.push(C.ketchup.dates.toDayjs(e)),n.group.totals[r]=C.ketchup.dates.format(C.ketchup.dates.min(l),p.ISO_DATE)}else n.group.totals[r]=C.ketchup.dates.format(t,p.ISO_DATE);n=n.group.parent}}}break;case u.MAX:if(l&&i.value){const t=e.group.totals[r],l=C.ketchup.math.numberify(C.ketchup.math.numberifySafe(i.value));e.group.totals[r]=t?Math.max(t,l):l;let n=e.group.parent;for(;null!=n;){const e=n.group.totals[r];n.group.totals[r]=e?Math.max(e,l):l,n=n.group.parent}}else if(i.value&&C.ketchup.objects.isDate(i.obj)){const t=C.ketchup.dates.toDayjs(i.value);if(C.ketchup.dates.isValid(t)){const l=e.group.totals[r];if(l){let n=[];n.push(t),n.push(C.ketchup.dates.toDayjs(l)),e.group.totals[r]=C.ketchup.dates.format(C.ketchup.dates.max(n),p.ISO_DATE)}else e.group.totals[r]=C.ketchup.dates.format(t,p.ISO_DATE);let n=e.group.parent;for(;null!=n;){const e=n.group.totals[r];if(e){let l=[];l.push(t),l.push(C.ketchup.dates.toDayjs(e)),n.group.totals[r]=C.ketchup.dates.format(C.ketchup.dates.max(l),p.ISO_DATE)}else n.group.totals[r]=C.ketchup.dates.format(t,p.ISO_DATE);n=n.group.parent}}}break;default:0!=o.indexOf(u.MATH)&&console.warn(`invalid total mode: ${o}`)}}}))}(b,n,t,c)}})),function(e,t,l){if(!e||!t)return;const n=Object.keys(t);if(0===e.length||!e[0].group||0===n.length)return;let r=n.filter((e=>u.DISTINCT===t[e]));r.length>0&&e.filter((e=>e.group.children.length>0)).forEach((e=>A(e,r,l)))}(a,n,c),_(a,u.AVERAGE,n),_(a,u.MATH,n),a}function _(e,t,l){if(!e||!l)return;const n=Object.keys(l);if(0===e.length||!e[0].group||0===n.length)return;let r;t==u.AVERAGE&&(r=n.filter((e=>u.AVERAGE===l[e]))),t==u.MATH&&(r=n.filter((e=>0==l[e].indexOf(u.MATH)))),r.length>0&&e.filter((e=>e.group.children.length>0)).forEach((e=>B(e,t,r,l)))}function A(e,t,l){const n=e.group.children;0!==n.length&&(n[0].group&&n.forEach((e=>{A(e,t,l)})),t.forEach((t=>{e.group.totals[t]=new Set(l[e.group.id][t]).size})))}function B(e,t,l,n){const r=e.group.children;if(0===r.length)return 0;let i=0;return r[0].group?r.forEach((e=>{i+=B(e,t,l,n)})):i=r.length,l.forEach((l=>{if(t==u.AVERAGE&&(e.group.totals[l]=e.group.totals[l]/i),t==u.MATH){let t=n[l].substring(u.MATH.length);e.group.totals[l]=C.ketchup.math.formulas.custom(t,e.group.totals)}})),i}function W(e,t){if(t){const l=Object.assign(t);return t.forEach((t=>{e.forEach((e=>{if(t.cells){const l=t.cells[e.name];l&&e.obj&&!l.obj&&(l.obj={t:e.obj.t,p:e.obj.p,k:l.value})}}))})),l}}function N(e=[],t={}){if(C.ketchup.objects.isEmptyJsObject(e)||C.ketchup.objects.isEmptyJsObject(t))return{};const l=Object.keys(t),n={},r=new Array;if(0===l.length||l.every((e=>t[e]===u.COUNT)))l.forEach((t=>n[t]=e.length));else{let i={};e.forEach(((e,o,s)=>{l.filter((e=>u.COUNT!==t[e]&&0!=t[e].indexOf(u.MATH))).forEach((l=>{const a=e.cells[l];if(a)if(t[l]===u.DISTINCT){let e;e=C.ketchup.objects.isNumber(a.obj)?C.ketchup.math.numberify(C.ketchup.math.numberifySafe(a.value)):a.value;let t=i[l];t?t.push(e):(i[l]=[],i[l].push(e))}else if(C.ketchup.objects.isNumber(a.obj)){const e=C.ketchup.math.numberify(C.ketchup.math.numberifySafe(a.value));let r=n[l];switch(!0){case t[l]===u.MIN:n[l]=r?Math.min(r,e):e;break;case t[l]===u.MAX:n[l]=r?Math.max(r,e):e;break;default:r=n[l]||0,n[l]=e+C.ketchup.math.numberify(r)}}else if(C.ketchup.objects.isDate(a.obj)){-1==r.indexOf(l)&&r.push(l);const e=C.ketchup.dates.toDayjs(a.value);if(C.ketchup.dates.isValid(e)){const r=C.ketchup.dates.toDate(e),i=n[l]?C.ketchup.dates.toDate(C.ketchup.dates.toDayjs(n[l])):null;switch(!0){case t[l]===u.MIN:if(i){let e=[];e.push(r),e.push(i),n[l]=C.ketchup.dates.format(C.ketchup.dates.min(e),p.ISO_DATE)}else n[l]=C.ketchup.dates.format(r,p.ISO_DATE);break;case t[l]===u.MAX:if(i){let e=[];e.push(r),e.push(i),n[l]=C.ketchup.dates.format(C.ketchup.dates.max(e),p.ISO_DATE)}else n[l]=C.ketchup.dates.format(r,p.ISO_DATE)}}}o===s.length-1&&t[l]===u.DISTINCT&&(n[l]=new Set(i[l]).size,i[l]=[])}))}))}for(let i of l){switch(!0){case t[i]===u.AVERAGE:const l=n[i];l&&e.length>0&&(n[i]=l/e.length);break;case t[i]===u.COUNT:n[i]=e.length;break;case 0==t[i].indexOf(u.MATH):n[i]=C.ketchup.math.formulas.custom(t[i].substring(u.MATH.length),n)}n[i]&&(-1!=r.indexOf(i)?n[i]=C.ketchup.dates.format(n[i]):C.ketchup.math.isNumber(n[i])&&(n[i]=+n[i].toFixed(2)))}return n}function $(e){if(!e.group)return;let t=e.group.id,l=e.group.parent;for(;null!==l;)t=`${l.group.id};${t}`,l=l.group.parent;e.group.id=t}function D(e,t,l,n){const r=t*l-l,i=r+Number(l);if(0==n)return e.slice(r,i);let o=[];return E(e,o,r,Number(l),0),o}function E(e,t,l,n,r){let i=!1;for(let o=0;o<e.length;o++){let s=e[o],a=L(e[o]);if(null!=s.group&&null!=s.group.children&&s.group.children.length>0){a.group.children=[];let e=E(s.group.children,a.group.children,l,n,r);r=e.ci,i=e.added,1==i&&(t[t.length]=a)}else r>=l&&(t[t.length]=a,i=!0),r++;if(r>=l+n)break}return{ci:r,added:i}}function L(e){return null==e?null:{id:e.id,cells:Object.assign({},e.cells),actions:e.actions?[...e.actions]:null,group:R(e.group),clonedFrom:e,readOnly:e.readOnly,cssClass:e.cssClass}}function S(e){if(null==e)return null;let t=[];for(let l=0;l<e.length;l++)t[t.length]=L(e[l]);return t}function R(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:S(e.children),obj:Object.assign({},e.obj),totals:Object.assign({},e.totals)}}var q;!function(e){e.SIMPLE="simple",e.FULL="full"}(q||(q={}));const z=document.documentElement,K=e=>{const t=Math.ceil(e.max/e.perPage),l=function(e,t){const l=[];for(let n=1;n<=t;n++){const t=n==e.currentPage;l.push({id:n.toString(),selected:t,value:n.toString()})}return l}(e,t),n=function(e){const t=[];let l=e.perPage;if(0===l)return t;for(;l<e.max;){const n=l==e.perPage;t.push({id:l.toString(),selected:n,value:l.toString()}),l*=2}const n=e.max==e.perPage;return t.push({id:e.max.toString(),selected:n,value:e.max.toString()}),t}(e),r={"kup-list":{data:l},"kup-text-field":{label:z.ketchup.language.translate(f.PAGE),helper:z.ketchup.language.translate(f.TOTAL)+`: ${t}`,helperWhenFocused:!0,inputType:"number",max:t,min:1}},i={"kup-list":{data:n},"kup-text-field":{label:z.ketchup.language.translate(h.ROWS)+" / "+z.ketchup.language.translate(f.PAGE),helper:z.ketchup.language.translate(h.TOTAL)+`: ${e.max}`,helperWhenFocused:!0,inputType:"number",max:e.max,min:1}};return m("div",Object.assign({class:`f-paginator ${e.mode?e.mode:""} ${e.wrapperClass?e.wrapperClass:""}`},e.dataSet,{id:e.id,title:e.title}),e.mode!==q.SIMPLE?m(b,{icon:"chevron_left",disabled:G(e),onClick:e.onPrevPage,wrapperClass:"prev-page"}):null,m("kup-combobox",{class:"page-selector",data:r,initialValue:e.currentPage.toString(),"onkup-combobox-change":e.onPageChange}),e.mode!==q.SIMPLE?m(b,{icon:"chevron_right",disabled:U(e),onClick:e.onNextPage,wrapperClass:"next-page"}):null,m("kup-combobox",{class:"rows-selector",data:i,initialValue:e.perPage.toString(),"onkup-combobox-change":e.onRowsChange}),e.onLoadMore?m(b,{icon:"plus",onClick:e.onLoadMore,label:z.ketchup.language.translate(d.LOAD_MORE),styling:v.FLAT,wrapperClass:"load-more-button"}):null)};function U(e){return e.currentPage*e.perPage>=e.max}function G(e){return 1==e.currentPage}const H=document.documentElement;function J(e,t,l){if(H.ketchup.math.isNumber(e)){const n=Math.ceil(t/l);let r=e;return r>n&&(r=n),r<1&&(r=1),r}return null}function P(e,t){if(H.ketchup.math.isNumber(e)){let l=e;return l>t&&(l=t),l<1&&(l=1),l}return null}export{F,g as K,j as a,K as b,N as c,J as d,x as e,I as f,M as g,q as h,W as n,D as p,P as r,V as s,w as t}
1
+ import{B as e,E as t,C as l,A as n,ac as r,u as i,w as o,ae as s,af as a,I as u,$ as c,ag as f,q as h,l as d}from"./p-610a03d4.js";import{K as p}from"./p-de07d17e.js";import{h as m}from"./p-1ad7fea0.js";import{F as b}from"./p-e43d4ccc.js";import{F as v}from"./p-c634eb82.js";class F extends e{getTextFilterValue(e={},t){return this._getTextFilterValue(e,t,!1)}getTextFilterValueTmp(e={},t){return this._getTextFilterValue(e,t,!0)}_getTextFilterValue(e={},t,l){let n="";if(null==e)return n;let r=e[t];return null==r||(n=l?r.textFieldTmp:r.textField),n}hasFiltersForColumn(e={},t){return this._hasFiltersForColumn(e,t,!1)}hasFiltersForColumnTmp(e={},t){return this._hasFiltersForColumn(e,t,!0)}_hasFiltersForColumn(e={},t,l){if(!t)return!1;let n=this._getTextFilterValue(e,t.name,l);if(null!=n&&""!=n.trim())return!0;if(this._hasIntervalTextFieldFilterValues(e,t,l))return!0;let r=this.getCheckBoxFilterValues(e,t.name);return!(null==r||r.length<1)}getCheckBoxFilterValues(e={},t){let l=[];if(null==e)return l;let n=e[t];return null==n||null==n.checkBoxes||(l=n.checkBoxes),l}hasIntervalTextFieldFilterValues(e={},t){return this._hasIntervalTextFieldFilterValues(e,t,!1)}hasIntervalTextFieldFilterValuesTmp(e={},t){return this._hasIntervalTextFieldFilterValues(e,t,!0)}_hasIntervalTextFieldFilterValues(e={},l,n){if(null==l)return!1;if(!this.isColumnFiltrableByInterval(l))return!1;let r=this._getIntervalTextFieldFilterValue(e,l.name,t.FROM,n);if(null!=r&&""!=r.trim())return!0;let i=this._getIntervalTextFieldFilterValue(e,l.name,t.TO,n);return null!=i&&""!=i.trim()}addCheckboxFilter(t={},l,n){if(null==t)return;let r=t[l];null==r&&(r={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null},t[l]=r),null==r.checkBoxes&&(r.checkBoxes=[]),null==n||null==n.value?r.checkBoxes=[]:e.valuesArrayContainsValue(r.checkBoxes,n.value)||(r.checkBoxes[r.checkBoxes.length]=n)}removeCheckboxFilter(t={},l,n){if(null==t||null==n)return;let r=t[l];if(null==r)return;null==r.checkBoxes&&(r.checkBoxes=[]);let i=e.indexOfValueInValuesArray(r.checkBoxes,n);if(i>=0){let e=[];for(let t=0;t<r.checkBoxes.length;t++)t!=i&&(e[e.length]=r.checkBoxes[t]);r.checkBoxes=[...e]}}isColumnFiltrableByInterval(e){return this.isObjFiltrableByInterval(e.obj)}getIntervalTextFieldFilterValues(e={},t){return this._getIntervalTextFieldFilterValues(e,t,!1)}getIntervalTextFieldFilterValuesTmp(e={},t){return this._getIntervalTextFieldFilterValues(e,t,!0)}_getIntervalTextFieldFilterValues(e={},l,n){return this._hasIntervalTextFieldFilterValues(e,l,n)?[this._getIntervalTextFieldFilterValue(e,l.name,t.FROM,n),this._getIntervalTextFieldFilterValue(e,l.name,t.TO,n)]:["",""]}getIntervalTextFieldFilterValue(e={},t,l){return this._getIntervalTextFieldFilterValue(e,t,l,!1)}getIntervalTextFieldFilterValueTmp(e={},t,l){return this._getIntervalTextFieldFilterValue(e,t,l,!0)}_getIntervalTextFieldFilterValue(e={},t,l,n){let r="";if(null==e)return r;let i=e[t];return null==i||n&&null==i.intervalTmp?r:n||null!=i.interval?(r=n?i.intervalTmp[l]:i.interval[l],r):r}setTextFieldFilterValue(e={},t,l){this._setTextFieldFilterValue(e,t,l,!0)}_setTextFieldFilterValue(e={},t,l,n){if(null==e)return;let r=e[t];null==r&&(r={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null},e[t]=r),n?r.textFieldTmp=null!=l?l.trim():l:r.textField=null!=l?l.trim():l}setIntervalTextFieldFilterValue(e={},t,l,n){this._setIntervalTextFieldFilterValue(e,t,l,n,!0)}_setIntervalTextFieldFilterValue(e={},t,l,n,r){if(null==e)return;let i=e[t];null==i&&(i={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null},e[t]=i),null==i.interval&&(i.interval=[],i.interval.push("","")),null==i.intervalTmp&&(i.intervalTmp=[],i.intervalTmp.push("","")),r?i.intervalTmp[n]=null!=l?l.trim():l:i.interval[n]=null!=l?l.trim():l}saveTextualFilters(e={},l){this._setTextFieldFilterValue(e,l,this.getTextFilterValueTmp(e,l),!1),this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValueTmp(e,l,t.FROM),t.FROM,!1),this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValueTmp(e,l,t.TO),t.TO,!1)}resetTextualFilters(e={},l){this._setTextFieldFilterValue(e,l,this.getTextFilterValue(e,l),!0),this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValue(e,l,t.FROM),t.FROM,!0),this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValue(e,l,t.TO),t.TO,!0)}getFilterValueForTooltip(e={},r){let i=this.getTextFilterValue(e,r.name),o=this.getIntervalTextFieldFilterValues(e,r),s=this.getCheckBoxFilterValues(e,r.name),a="",u=l(i,r.obj,r.decimals);""!=i&&(a=" AND "),""!=o[t.FROM]&&(u+=a+"(>= "+l(o[t.FROM],r.obj,r.decimals)+")",a=" AND "),""!=o[t.TO]&&(u+=a+"(<= "+l(o[t.TO],r.obj,r.decimals)+")",a=" AND "),a="";let c="";return s.forEach((e=>{c+=a+n(e,r),a=" OR "})),""!=c&&(c="("+c+")",""!=u&&(c=" AND "+c)),c=u+c,c}removeFilter(e={},t){e[t]={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null}}}var x;!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.removableColumns="Sets the possibility to remove the selected column.",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.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."}(x||(x={}));const w="TREE_COLUMN";var g;!function(e){e.DROPDOWN="dropdown",e.NODE="node"}(g||(g={}));const k=document.documentElement,T=k.ketchup?k.ketchup.objects:new o,y=k.ketchup?k.ketchup.data:new s;class j extends e{isFilterCompliantForCell(e,t,l){return!!e&&this.isFilterCompliantForSimpleValue(e.value,e.obj,t,l)}isFilterCompliantForCellObj(e,t,l){return!!e&&!!e.obj&&this.isFilterCompliantForSimpleValue(e.obj.k,e.obj,t,l)}isRowCompliant(e,t={},l="",n=!1,r=[],i){return this.areCellsCompliant(e.cells,t,l,n,r,i)}areCellsCompliant(e,t={},l="",n=!1,o=[],s){if(n){let t=!0;if(o&&null!=o&&o.length>0){t=!1;let n=this.filterIsNegative(l);for(let i=0;i<o.length;i++){if(0==o[i].visible)continue;const s=e[o[i].name];if(null==s)continue;t=this.isFilterCompliantForValue(s.value,l);let a=r(o[i],s);if(a!=s.value&&(t=t||this.isFilterCompliantForValue(a,l)),1==t&&!n)break;if(0==t&&n)break}}if(!t)return!1}if(null==s&&(s=new F),!this.hasFilters(t,o,s))return!0;let a=Object.keys(t);for(let l=0;l<a.length;l++){let n=a[l];const r=e[n];if(!r)return!1;let u=s.getTextFilterValue(t,n),c=s.getIntervalTextFieldFilterValues(t,i(o,n));const f=this.filterIsNegative(u);let h=this.isFilterCompliantForCell(r,u,c),d=f;if(T.isNumber(r.obj)||T.isDate(r.obj)||T.isTime(r.obj)||T.isTimestamp(r.obj)||(d=this.isFilterCompliantForCellObj(r,u,c)),f){if(!h||!d)return!1}else if(!h&&!d)return!1;let p=s.getCheckBoxFilterValues(t,n);if(0==p.length)continue;let m=!1;for(let e=0;e<p.length;e++){let t=p[e];if(null!=t&&null!=t.value){if(null!=r.value&&r.value.toLowerCase().trim()==t.value.toLowerCase().trim()){m=!0;break}if(null!=r.obj&&r.obj.k.toLowerCase().trim()==t.value.toLowerCase().trim()){m=!0;break}}}if(!m)return!1}return!0}hasFilters(e={},t,l){if(null==e)return!1;let n=Object.keys(e);if(null==n||n.length<1)return!1;null==l&&(l=new F);for(let r=0;r<n.length;r++){let o=n[r],s=null;if(s=o===w?{name:w,title:""}:i(t,o),l.hasFiltersForColumn(e,s))return!0}return!1}filterRows(e=[],t={},l="",n=[],r){if(!e||null==e)return[];let i=[];const o=!(!l||!n);if(this.hasFilters(t,n,r)||o)for(let s=0;s<e.length;s++){let a=e[s];(a.id&&a.id.indexOf("insert_")>-1||this.isRowCompliant(a,t,l,o,n,r))&&(i[i.length]=a)}else i=[...e];return i}getColumnValues(t,n,r,i){let o=new Array;null==i&&(i=new F);let s=i.getTextFilterValueTmp(t.filters,n.name),a=i.getIntervalTextFieldFilterValuesTmp(t.filters,n),u=i.getCheckBoxFilterValues(t.filters,n.name);if(null!=n.valuesForFilter&&n.valuesForFilter.length>0)return n.valuesForFilter.forEach((t=>{let r=t;(e.valuesArrayContainsValue(u,r)||""==s||i.isFilterCompliantForSimpleValue(r,n.obj,s,a))&&o.push({value:r,displayedValue:l(r,n.obj,n.decimals)})})),o;let c=Object.assign({},t.filters);c[n.name]={textField:s,textFieldTmp:s,checkBoxes:[],interval:a,intervalTmp:a};let f=this.filterRows(t.getRows(),c,r,t.getVisibleColumns(),i);for(let e=0;e<u.length;e++)o.push(u[e]);return y.cell.getUnivocalValue({rows:f},n,!0)}}const C=document.documentElement;function V(e=[],t=[]){if(!e||0===e.length)return[];if(e[0].group)return function(e=[],t=[]){if(!e||0===e.length)return[];const l=e[0].group.column;let n=function(e="",t=[]){if(!e||!t||0===t.length)return null;for(let l of t)if(l.column===e)return l;return null}(l,t);return n||(n={column:l,sortMode:c.A}),e.sort(((e,t)=>a({obj:e.group.obj,value:e.group.id},{obj:t.group.obj,value:t.group.id},n.sortMode))),e.forEach((e=>{e.group.children=V(e.group.children,t)})),e}(e,t);if(!t||0===t.length)return e;const l=t.length>1;return e.slice(0).sort(((e,n)=>{if(l){for(let l=0;l<t.length;l++){const r=O(e,n,t[l]);if(0!==r)return r}return 0}return O(e,n,t[0])}))}function O(e,t,l){const n=e.cells[l.column],r=t.cells[l.column];return n||r?n?r?a(n,r,l.sortMode):-1:1:0}function I(e=[],t={},l="",n=[],r,i){return null==i&&(i=new j),i.filterRows(e,t,l,n,r)}function M(e=[],t=[],l=[],n={}){if(!t)return[];if(!l||0===l.length||!e||0===e.length)return t;const o={},s=l.filter((({column:t})=>{for(let{name:l,title:n}of e)if(l===t)return o[l]=n,!0;return!1}));if(0===s.length)return t;const a=[];let c={};return t.forEach((t=>{const l=s[0].column,f=t.cells[l];if(f){const h=i(e,l),d=r(h,f),m=f.value;let b=null;for(let e of a)if(e.group.label===d){b=e;break}null===b&&(b={group:{id:m,parent:null,column:l,columnLabel:o[l],expanded:!1,label:d,children:[],obj:f.obj,totals:{}},cells:{}},a.push(b));for(let l=1;l<s.length;l++){const n=s[l],a=t.cells[n.column];if(a){const t=i(e,n.column),l=r(t,a),s=a.value;let u=null;for(let e=0;e<b.group.children.length;e++){const t=b.group.children[e];if(t.group.label===l){u=t;break}}u||(u={cells:{},group:{id:s,parent:b,column:n.column,columnLabel:o[n.column],children:[],expanded:!1,label:l,totals:{},obj:a.obj}},$(u),b.group.children.push(u)),b=u}}b.group.children.push(t),function(e,t,l,n){if(!e||!t)return;const r=Object.keys(t);0!==r.length&&r.forEach((r=>{const i=l.cells[r];if(i){const l=C.ketchup.objects.isNumber(i.obj),o=t[r];switch(o){case u.COUNT:let t=e.group.totals[r]||0;e.group.totals[r]=++t;let s=e.group.parent;for(;null!=s;){let e=s.group.totals[r]||0;s.group.totals[r]=++e,s=s.group.parent}break;case u.DISTINCT:let a;if(a=l?C.ketchup.math.numberify(C.ketchup.math.numberifySafe(i.value)):i.value,n[e.group.id]){let t=n[e.group.id][r];t?t.push(a):(n[e.group.id][r]=[],n[e.group.id][r].push(a))}else n[e.group.id]={},n[e.group.id][r]=[],n[e.group.id][r].push(a);let c=e.group.parent;for(;null!=c;){if(n[c.group.id]){let e=n[c.group.id][r];e?e.push(a):(n[c.group.id][r]=[],n[c.group.id][r].push(a))}else n[c.group.id]={},n[c.group.id][r]=[],n[c.group.id][r].push(a);c=c.group.parent}break;case u.SUM:case u.AVERAGE:if(l&&i.value){const t=C.ketchup.math.numberify(C.ketchup.math.numberifySafe(i.value));e.group.totals[r]=t+(e.group.totals[r]||0);let l=e.group.parent;for(;null!=l;){const e=C.ketchup.math.numberify(l.group.totals[r]||0);l.group.totals[r]=t+e,l=l.group.parent}}break;case u.MIN:if(l&&i.value){const t=e.group.totals[r],l=C.ketchup.math.numberify(C.ketchup.math.numberifySafe(i.value));e.group.totals[r]=t?Math.min(t,l):l;let n=e.group.parent;for(;null!=n;){const e=n.group.totals[r];n.group.totals[r]=e?Math.min(e,l):l,n=n.group.parent}}else if(i.value&&C.ketchup.objects.isDate(i.obj)){const t=C.ketchup.dates.toDayjs(i.value);if(C.ketchup.dates.isValid(t)){const l=e.group.totals[r];if(l){let n=[];n.push(t),n.push(C.ketchup.dates.toDayjs(l)),e.group.totals[r]=C.ketchup.dates.format(C.ketchup.dates.min(n),p.ISO_DATE)}else e.group.totals[r]=C.ketchup.dates.format(t,p.ISO_DATE);let n=e.group.parent;for(;null!=n;){const e=n.group.totals[r];if(e){let l=[];l.push(t),l.push(C.ketchup.dates.toDayjs(e)),n.group.totals[r]=C.ketchup.dates.format(C.ketchup.dates.min(l),p.ISO_DATE)}else n.group.totals[r]=C.ketchup.dates.format(t,p.ISO_DATE);n=n.group.parent}}}break;case u.MAX:if(l&&i.value){const t=e.group.totals[r],l=C.ketchup.math.numberify(C.ketchup.math.numberifySafe(i.value));e.group.totals[r]=t?Math.max(t,l):l;let n=e.group.parent;for(;null!=n;){const e=n.group.totals[r];n.group.totals[r]=e?Math.max(e,l):l,n=n.group.parent}}else if(i.value&&C.ketchup.objects.isDate(i.obj)){const t=C.ketchup.dates.toDayjs(i.value);if(C.ketchup.dates.isValid(t)){const l=e.group.totals[r];if(l){let n=[];n.push(t),n.push(C.ketchup.dates.toDayjs(l)),e.group.totals[r]=C.ketchup.dates.format(C.ketchup.dates.max(n),p.ISO_DATE)}else e.group.totals[r]=C.ketchup.dates.format(t,p.ISO_DATE);let n=e.group.parent;for(;null!=n;){const e=n.group.totals[r];if(e){let l=[];l.push(t),l.push(C.ketchup.dates.toDayjs(e)),n.group.totals[r]=C.ketchup.dates.format(C.ketchup.dates.max(l),p.ISO_DATE)}else n.group.totals[r]=C.ketchup.dates.format(t,p.ISO_DATE);n=n.group.parent}}}break;default:0!=o.indexOf(u.MATH)&&console.warn(`invalid total mode: ${o}`)}}}))}(b,n,t,c)}})),function(e,t,l){if(!e||!t)return;const n=Object.keys(t);if(0===e.length||!e[0].group||0===n.length)return;let r=n.filter((e=>u.DISTINCT===t[e]));r.length>0&&e.filter((e=>e.group.children.length>0)).forEach((e=>A(e,r,l)))}(a,n,c),_(a,u.AVERAGE,n),_(a,u.MATH,n),a}function _(e,t,l){if(!e||!l)return;const n=Object.keys(l);if(0===e.length||!e[0].group||0===n.length)return;let r;t==u.AVERAGE&&(r=n.filter((e=>u.AVERAGE===l[e]))),t==u.MATH&&(r=n.filter((e=>0==l[e].indexOf(u.MATH)))),r.length>0&&e.filter((e=>e.group.children.length>0)).forEach((e=>B(e,t,r,l)))}function A(e,t,l){const n=e.group.children;0!==n.length&&(n[0].group&&n.forEach((e=>{A(e,t,l)})),t.forEach((t=>{e.group.totals[t]=new Set(l[e.group.id][t]).size})))}function B(e,t,l,n){const r=e.group.children;if(0===r.length)return 0;let i=0;return r[0].group?r.forEach((e=>{i+=B(e,t,l,n)})):i=r.length,l.forEach((l=>{if(t==u.AVERAGE&&(e.group.totals[l]=e.group.totals[l]/i),t==u.MATH){let t=n[l].substring(u.MATH.length);e.group.totals[l]=C.ketchup.math.formulas.custom(t,e.group.totals)}})),i}function W(e,t){if(t){const l=Object.assign(t);return t.forEach((t=>{e.forEach((e=>{if(t.cells){const l=t.cells[e.name];l&&e.obj&&!l.obj&&(l.obj={t:e.obj.t,p:e.obj.p,k:l.value})}}))})),l}}function N(e=[],t={}){if(C.ketchup.objects.isEmptyJsObject(e)||C.ketchup.objects.isEmptyJsObject(t))return{};const l=Object.keys(t),n={},r=new Array;if(0===l.length||l.every((e=>t[e]===u.COUNT)))l.forEach((t=>n[t]=e.length));else{let i={};e.forEach(((e,o,s)=>{l.filter((e=>u.COUNT!==t[e]&&0!=t[e].indexOf(u.MATH))).forEach((l=>{const a=e.cells[l];if(a)if(t[l]===u.DISTINCT){let e;e=C.ketchup.objects.isNumber(a.obj)?C.ketchup.math.numberify(C.ketchup.math.numberifySafe(a.value)):a.value;let t=i[l];t?t.push(e):(i[l]=[],i[l].push(e))}else if(C.ketchup.objects.isNumber(a.obj)){const e=C.ketchup.math.numberify(C.ketchup.math.numberifySafe(a.value));let r=n[l];switch(!0){case t[l]===u.MIN:n[l]=r?Math.min(r,e):e;break;case t[l]===u.MAX:n[l]=r?Math.max(r,e):e;break;default:r=n[l]||0,n[l]=e+C.ketchup.math.numberify(r)}}else if(C.ketchup.objects.isDate(a.obj)){-1==r.indexOf(l)&&r.push(l);const e=C.ketchup.dates.toDayjs(a.value);if(C.ketchup.dates.isValid(e)){const r=C.ketchup.dates.toDate(e),i=n[l]?C.ketchup.dates.toDate(C.ketchup.dates.toDayjs(n[l])):null;switch(!0){case t[l]===u.MIN:if(i){let e=[];e.push(r),e.push(i),n[l]=C.ketchup.dates.format(C.ketchup.dates.min(e),p.ISO_DATE)}else n[l]=C.ketchup.dates.format(r,p.ISO_DATE);break;case t[l]===u.MAX:if(i){let e=[];e.push(r),e.push(i),n[l]=C.ketchup.dates.format(C.ketchup.dates.max(e),p.ISO_DATE)}else n[l]=C.ketchup.dates.format(r,p.ISO_DATE)}}}o===s.length-1&&t[l]===u.DISTINCT&&(n[l]=new Set(i[l]).size,i[l]=[])}))}))}for(let i of l){switch(!0){case t[i]===u.AVERAGE:const l=n[i];l&&e.length>0&&(n[i]=l/e.length);break;case t[i]===u.COUNT:n[i]=e.length;break;case 0==t[i].indexOf(u.MATH):n[i]=C.ketchup.math.formulas.custom(t[i].substring(u.MATH.length),n)}n[i]&&(-1!=r.indexOf(i)?n[i]=C.ketchup.dates.format(n[i]):C.ketchup.math.isNumber(n[i])&&(n[i]=+n[i].toFixed(2)))}return n}function $(e){if(!e.group)return;let t=e.group.id,l=e.group.parent;for(;null!==l;)t=`${l.group.id};${t}`,l=l.group.parent;e.group.id=t}function D(e,t,l,n){const r=t*l-l,i=r+Number(l);if(0==n)return e.slice(r,i);let o=[];return E(e,o,r,Number(l),0),o}function E(e,t,l,n,r){let i=!1;for(let o=0;o<e.length;o++){let s=e[o],a=L(e[o]);if(null!=s.group&&null!=s.group.children&&s.group.children.length>0){a.group.children=[];let e=E(s.group.children,a.group.children,l,n,r);r=e.ci,i=e.added,1==i&&(t[t.length]=a)}else r>=l&&(t[t.length]=a,i=!0),r++;if(r>=l+n)break}return{ci:r,added:i}}function L(e){return null==e?null:{id:e.id,cells:Object.assign({},e.cells),actions:e.actions?[...e.actions]:null,group:R(e.group),clonedFrom:e,readOnly:e.readOnly,cssClass:e.cssClass}}function S(e){if(null==e)return null;let t=[];for(let l=0;l<e.length;l++)t[t.length]=L(e[l]);return t}function R(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:S(e.children),obj:Object.assign({},e.obj),totals:Object.assign({},e.totals)}}var q;!function(e){e.SIMPLE="simple",e.FULL="full"}(q||(q={}));const z=document.documentElement,K=e=>{const t=Math.ceil(e.max/e.perPage),l=function(e,t){const l=[];for(let n=1;n<=t;n++){const t=n==e.currentPage;l.push({id:n.toString(),selected:t,value:n.toString()})}return l}(e,t),n=function(e){const t=[];let l=e.perPage;if(0===l)return t;for(;l<e.max;){const n=l==e.perPage;t.push({id:l.toString(),selected:n,value:l.toString()}),l*=2}const n=e.max==e.perPage;return t.push({id:e.max.toString(),selected:n,value:e.max.toString()}),t}(e),r={"kup-list":{data:l},"kup-text-field":{label:z.ketchup.language.translate(f.PAGE),helper:z.ketchup.language.translate(f.TOTAL)+`: ${t}`,helperWhenFocused:!0,inputType:"number",max:t,min:1}},i={"kup-list":{data:n},"kup-text-field":{label:z.ketchup.language.translate(h.ROWS)+" / "+z.ketchup.language.translate(f.PAGE),helper:z.ketchup.language.translate(h.TOTAL)+`: ${e.max}`,helperWhenFocused:!0,inputType:"number",max:e.max,min:1}};return m("div",Object.assign({class:`f-paginator ${e.mode?e.mode:""} ${e.wrapperClass?e.wrapperClass:""}`},e.dataSet,{id:e.id,title:e.title}),e.mode!==q.SIMPLE?m(b,{icon:"chevron_left",disabled:G(e),onClick:e.onPrevPage,wrapperClass:"prev-page"}):null,m("kup-combobox",{class:"page-selector",data:r,initialValue:e.currentPage.toString(),"onkup-combobox-change":e.onPageChange}),e.mode!==q.SIMPLE?m(b,{icon:"chevron_right",disabled:U(e),onClick:e.onNextPage,wrapperClass:"next-page"}):null,m("kup-combobox",{class:"rows-selector",data:i,initialValue:e.perPage.toString(),"onkup-combobox-change":e.onRowsChange}),e.onLoadMore?m(b,{icon:"plus",onClick:e.onLoadMore,label:z.ketchup.language.translate(d.LOAD_MORE),styling:v.FLAT,wrapperClass:"load-more-button"}):null)};function U(e){return e.currentPage*e.perPage>=e.max}function G(e){return 1==e.currentPage}const H=document.documentElement;function J(e,t,l){if(H.ketchup.math.isNumber(e)){const n=Math.ceil(t/l);let r=e;return r>n&&(r=n),r<1&&(r=1),r}return null}function P(e,t){if(H.ketchup.math.isNumber(e)){let l=e;return l>t&&(l=t),l<1&&(l=1),l}return null}export{F,g as K,j as a,K as b,N as c,J as d,x as e,I as f,M as g,W as n,D as p,P as r,V as s,w as t}
@@ -22,6 +22,9 @@ export declare enum KupBoxProps {
22
22
  kanban = "Displays the boxlist as a Kanban.",
23
23
  layout = "How the field will be displayed. If not present, a default one will be created.",
24
24
  lazyLoadRows = "When set to true, extra rows will be automatically loaded once the last row enters the viewport.",
25
+ loadMoreLimit = "Sets a maximum limit of new records which can be required by the load more functionality.",
26
+ loadMoreMode = "Establish the modality of how many new records will be downloaded. This property is regulated also by loadMoreStep.",
27
+ loadMoreStep = "The number of records which will be requested to be downloaded when clicking on the load more button. This property is regulated also by loadMoreMode.",
25
28
  multiSelection = "Enable multi selection.",
26
29
  pageSelected = "Current page number.",
27
30
  pagination = "Enables pagination.",
@@ -29,6 +32,7 @@ export declare enum KupBoxProps {
29
32
  scrollOnHover = "Activates the scroll on hover function.",
30
33
  selectBox = "Automatically selects the box at the specified index.",
31
34
  selectedRowsState = "Multiple selection.",
35
+ showLoadMore = "If set to true, displays the button to load more records.",
32
36
  showSelection = "If enabled, highlights the selected box/boxes.",
33
37
  sortBy = "If sorting is enabled, specifies which column to sort.",
34
38
  sortEnabled = "Enable sorting.",
@@ -36,6 +40,11 @@ export declare enum KupBoxProps {
36
40
  store = "",
37
41
  swipeDisabled = "Disable swipe."
38
42
  }
43
+ export declare enum LoadMoreMode {
44
+ CONSTANT = "constant",
45
+ CONSTANT_INCREMENT = "constant_increment",
46
+ PROGRESSIVE_THRESHOLD = "progressive_threshold"
47
+ }
39
48
  export interface KupBoxData {
40
49
  columns?: KupDataColumn[];
41
50
  rows?: KupBoxRow[];
@@ -112,3 +121,6 @@ export interface KupBoxRowActionClickEventPayload extends KupEventPayload {
112
121
  export interface KupBoxContextMenuEventPayload extends KupEventPayload {
113
122
  details: KupBoxEventHandlerDetails;
114
123
  }
124
+ export interface KupBoxLoadMoreClickEventPayload extends KupEventPayload {
125
+ loadItems: number;
126
+ }