@globalpayments/vega 2.15.0 → 2.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (137) hide show
  1. package/dist/cjs/{app-globals-6b5136b1.js → app-globals-5e074c5e.js} +14 -7
  2. package/dist/cjs/{childNodesEventPreventSlimmer-5b352793.js → childNodesEventPreventSlimmer-7e1895d7.js} +12 -0
  3. package/dist/cjs/index.cjs.js +9 -8
  4. package/dist/cjs/loader.cjs.js +3 -3
  5. package/dist/cjs/vega-accordion.cjs.entry.js +1 -1
  6. package/dist/cjs/vega-app-header-button.cjs.entry.js +1 -1
  7. package/dist/cjs/vega-breadcrumb.cjs.entry.js +1 -1
  8. package/dist/cjs/vega-button-circle.cjs.entry.js +1 -1
  9. package/dist/cjs/vega-button-group_2.cjs.entry.js +1 -1
  10. package/dist/cjs/vega-button-link.cjs.entry.js +1 -1
  11. package/dist/cjs/vega-button.cjs.entry.js +1 -1
  12. package/dist/cjs/vega-calendar_2.cjs.entry.js +2 -2
  13. package/dist/cjs/vega-checkbox_2.cjs.entry.js +1 -1
  14. package/dist/cjs/vega-chip.cjs.entry.js +1 -1
  15. package/dist/cjs/vega-combo-box.cjs.entry.js +1 -1
  16. package/dist/cjs/vega-date-picker_2.cjs.entry.js +1 -1
  17. package/dist/cjs/vega-dialog_2.cjs.entry.js +1 -1
  18. package/dist/cjs/vega-dropdown_5.cjs.entry.js +3 -2
  19. package/dist/cjs/vega-field-label.cjs.entry.js +1 -1
  20. package/dist/cjs/vega-form.cjs.entry.js +1 -1
  21. package/dist/cjs/vega-image-uploader.cjs.entry.js +1 -1
  22. package/dist/cjs/vega-input-credit-card.cjs.entry.js +1 -1
  23. package/dist/cjs/vega-input-range.cjs.entry.js +1 -1
  24. package/dist/cjs/vega-input-select.cjs.entry.js +89 -87
  25. package/dist/cjs/vega-pagination.cjs.entry.js +1 -1
  26. package/dist/cjs/vega-radio_2.cjs.entry.js +1 -1
  27. package/dist/cjs/vega-selection-tile_2.cjs.entry.js +1 -1
  28. package/dist/cjs/{index-b8881ddc.js → vega-skeleton-loader-controller-bac82c82.js} +90 -2
  29. package/dist/cjs/vega-skeleton.cjs.entry.js +1 -1
  30. package/dist/cjs/vega-stepper.cjs.entry.js +1 -1
  31. package/dist/cjs/vega-tab-group_2.cjs.entry.js +1 -1
  32. package/dist/cjs/vega-table_8.cjs.entry.js +1 -1
  33. package/dist/cjs/vega-textarea.cjs.entry.js +1 -1
  34. package/dist/cjs/vega-time-picker_2.cjs.entry.js +1 -1
  35. package/dist/cjs/vega.cjs.js +3 -3
  36. package/dist/collection/components/vega-calendar/vega-calendar.css +2 -0
  37. package/dist/collection/components/vega-dropdown/slimmers/renderers/vega-dropdown-renderer.js +2 -1
  38. package/dist/collection/components/vega-input-select/slimmers/controllers/vega-input-select-dropdown-controller.js +1 -42
  39. package/dist/collection/components/vega-input-select/slimmers/controllers/vega-input-select-lazy-load-controller.js +2 -2
  40. package/dist/collection/components/vega-input-select/slimmers/controllers/vega-input-select-source-controller.js +37 -0
  41. package/dist/collection/components/vega-input-select/slimmers/renderers/vega-input-select-dropdown-renderer.js +7 -4
  42. package/dist/collection/components/vega-input-select/vega-input-select.js +5 -2
  43. package/dist/collection/components/vega-skeleton/vega-skeleton.css +5 -2
  44. package/dist/collection/global/scripts/beforeVegaLoad.js +8 -0
  45. package/dist/collection/helpers/event-manager/slimmers/childNodesEventPreventSlimmer.js +12 -0
  46. package/dist/collection/helpers/event-manager/test/childNodesEventPreventSlimmer.test.js +14 -0
  47. package/dist/collection/helpers/publicApi.js +1 -0
  48. package/dist/collection/helpers/skeleton-loader/tests/vega-skeleton-loader-controller.test.js +139 -0
  49. package/dist/collection/helpers/skeleton-loader/vega-skeleton-loader-controller.js +87 -0
  50. package/dist/collection/helpers/vega-telemetry-helper/test/vegaEnvManager.test.js +1 -1
  51. package/dist/collection/helpers/vega-telemetry-helper/vegaEnvManager.js +2 -2
  52. package/dist/esm/{app-globals-cf903368.js → app-globals-032d6105.js} +8 -1
  53. package/dist/esm/{childNodesEventPreventSlimmer-ca73e6c1.js → childNodesEventPreventSlimmer-b9c50cc4.js} +12 -0
  54. package/dist/esm/index.js +1 -1
  55. package/dist/esm/loader.js +3 -3
  56. package/dist/esm/vega-accordion.entry.js +1 -1
  57. package/dist/esm/vega-app-header-button.entry.js +1 -1
  58. package/dist/esm/vega-breadcrumb.entry.js +1 -1
  59. package/dist/esm/vega-button-circle.entry.js +1 -1
  60. package/dist/esm/vega-button-group_2.entry.js +1 -1
  61. package/dist/esm/vega-button-link.entry.js +1 -1
  62. package/dist/esm/vega-button.entry.js +1 -1
  63. package/dist/esm/vega-calendar_2.entry.js +2 -2
  64. package/dist/esm/vega-checkbox_2.entry.js +1 -1
  65. package/dist/esm/vega-chip.entry.js +1 -1
  66. package/dist/esm/vega-combo-box.entry.js +1 -1
  67. package/dist/esm/vega-date-picker_2.entry.js +1 -1
  68. package/dist/esm/vega-dialog_2.entry.js +1 -1
  69. package/dist/esm/vega-dropdown_5.entry.js +3 -2
  70. package/dist/esm/vega-field-label.entry.js +1 -1
  71. package/dist/esm/vega-form.entry.js +1 -1
  72. package/dist/esm/vega-image-uploader.entry.js +1 -1
  73. package/dist/esm/vega-input-credit-card.entry.js +1 -1
  74. package/dist/esm/vega-input-range.entry.js +1 -1
  75. package/dist/esm/vega-input-select.entry.js +89 -87
  76. package/dist/esm/vega-pagination.entry.js +1 -1
  77. package/dist/esm/vega-radio_2.entry.js +1 -1
  78. package/dist/esm/vega-selection-tile_2.entry.js +1 -1
  79. package/dist/esm/{index-dd06e5e7.js → vega-skeleton-loader-controller-3f5500e5.js} +90 -3
  80. package/dist/esm/vega-skeleton.entry.js +1 -1
  81. package/dist/esm/vega-stepper.entry.js +1 -1
  82. package/dist/esm/vega-tab-group_2.entry.js +1 -1
  83. package/dist/esm/vega-table_8.entry.js +1 -1
  84. package/dist/esm/vega-textarea.entry.js +1 -1
  85. package/dist/esm/vega-time-picker_2.entry.js +1 -1
  86. package/dist/esm/vega.js +3 -3
  87. package/dist/types/components/vega-input-select/slimmers/controllers/vega-input-select-dropdown-controller.d.ts +0 -19
  88. package/dist/types/components/vega-input-select/slimmers/controllers/vega-input-select-lazy-load-controller.d.ts +1 -1
  89. package/dist/types/components/vega-input-select/slimmers/controllers/vega-input-select-source-controller.d.ts +19 -0
  90. package/dist/types/components/vega-input-select/slimmers/renderers/vega-input-select-dropdown-renderer.d.ts +1 -1
  91. package/dist/types/components/vega-input-select/vega-input-select.d.ts +2 -2
  92. package/dist/types/helpers/event-manager/slimmers/childNodesEventPreventSlimmer.d.ts +6 -0
  93. package/dist/types/helpers/publicApi.d.ts +1 -0
  94. package/dist/types/helpers/skeleton-loader/interface.d.ts +16 -0
  95. package/dist/types/helpers/skeleton-loader/tests/vega-skeleton-loader-controller.test.d.ts +1 -0
  96. package/dist/types/helpers/skeleton-loader/vega-skeleton-loader-controller.d.ts +48 -0
  97. package/dist/types/types/publicApi.d.ts +1 -0
  98. package/dist/vega/index.esm.js +1 -1
  99. package/dist/vega/{p-692df03d.entry.js → p-0f88130f.entry.js} +1 -1
  100. package/dist/vega/{p-d978ee2c.entry.js → p-1092a8ce.entry.js} +1 -1
  101. package/dist/vega/{p-d224e798.entry.js → p-12e93c00.entry.js} +1 -1
  102. package/dist/vega/{p-282648c1.entry.js → p-2066e3eb.entry.js} +1 -1
  103. package/dist/vega/{p-ceec3241.entry.js → p-21675b8e.entry.js} +1 -1
  104. package/dist/vega/{p-38a22eb3.entry.js → p-25f60a0b.entry.js} +1 -1
  105. package/dist/vega/{p-1b3a0b54.entry.js → p-40db8b33.entry.js} +1 -1
  106. package/dist/vega/{p-38d19c4f.entry.js → p-43515fe4.entry.js} +1 -1
  107. package/dist/vega/p-4bc71294.entry.js +1 -0
  108. package/dist/vega/p-76265c0e.entry.js +1 -0
  109. package/dist/vega/p-7706a169.js +1 -0
  110. package/dist/vega/{p-de5db6c9.entry.js → p-7d22c459.entry.js} +1 -1
  111. package/dist/vega/{p-37d3b80c.entry.js → p-7d9934ee.entry.js} +1 -1
  112. package/dist/vega/{p-2e59a4f1.entry.js → p-7fd253e0.entry.js} +1 -1
  113. package/dist/vega/{p-b58e2fae.entry.js → p-86d3e5eb.entry.js} +1 -1
  114. package/dist/vega/{p-3efc814a.entry.js → p-8e63fc54.entry.js} +1 -1
  115. package/dist/vega/{p-b3056874.entry.js → p-9316cd6d.entry.js} +1 -1
  116. package/dist/vega/{p-9047ee85.entry.js → p-9b5e858e.entry.js} +1 -1
  117. package/dist/vega/{p-6f7f9cda.entry.js → p-9d9f7c25.entry.js} +1 -1
  118. package/dist/vega/{p-99c8fe92.js → p-9e5f7b82.js} +1 -1
  119. package/dist/vega/p-a9d3ea86.js +1 -0
  120. package/dist/vega/{p-a6cb10e8.entry.js → p-bb845e70.entry.js} +1 -1
  121. package/dist/vega/{p-f723790c.entry.js → p-bd1bc019.entry.js} +1 -1
  122. package/dist/vega/{p-b708b0c2.entry.js → p-c8e1b56d.entry.js} +1 -1
  123. package/dist/vega/p-c9f922bf.entry.js +1 -0
  124. package/dist/vega/{p-4d2859c9.entry.js → p-ca1fae74.entry.js} +1 -1
  125. package/dist/vega/{p-af72a212.entry.js → p-cbb90cf6.entry.js} +1 -1
  126. package/dist/vega/{p-e1a284b1.entry.js → p-ceb5067a.entry.js} +1 -1
  127. package/dist/vega/{p-2bb1c1c1.entry.js → p-d7cb0227.entry.js} +1 -1
  128. package/dist/vega/{p-eb709bc0.entry.js → p-d7f7e2df.entry.js} +1 -1
  129. package/dist/vega/{p-8c62c493.entry.js → p-f5d3d49f.entry.js} +1 -1
  130. package/dist/vega/{p-c849236f.entry.js → p-fb34de30.entry.js} +1 -1
  131. package/dist/vega/vega.esm.js +1 -1
  132. package/package.json +1 -1
  133. package/dist/vega/p-009405b6.entry.js +0 -1
  134. package/dist/vega/p-38b01f3f.entry.js +0 -1
  135. package/dist/vega/p-557516a4.entry.js +0 -1
  136. package/dist/vega/p-999e1318.js +0 -1
  137. package/dist/vega/p-fda33444.js +0 -1
@@ -0,0 +1 @@
1
+ import{h as e,H as t,r as i,c as s,g as n}from"./p-9777b1c1.js";import{R as a}from"./p-d962b340.js";import{s as o}from"./p-b81bd0bb.js";import{g as r}from"./p-3542f8fe.js";import{a as l,V as p,M as d,L as h,I as c}from"./p-018d77cc.js";import{a as f}from"./p-320642bd.js";import{R as v}from"./p-bb761f8f.js";import{V as g,I as u}from"./p-5cad29f5.js";import{D as x}from"./p-0fd9f03f.js";import{i as m,j as b,b as w,k as y,h as j,d as I}from"./p-f1d8fd1c.js";import{d as R}from"./p-69b28805.js";import{C as S}from"./p-bf95b189.js";import{b as z}from"./p-2fa3841b.js";import{c as O}from"./p-86194314.js";import{c as D,a as C}from"./p-faea1620.js";import{V as L}from"./p-4e5c06ae.js";import{F as V}from"./p-77ff7c72.js";import{P as k}from"./p-cb13b4e6.js";import{c as E}from"./p-16608c5a.js";import{C as T}from"./p-a9d3ea86.js";import{b as A}from"./p-c47d4933.js";import{M as _,O as F}from"./p-1265732f.js";import"./p-3c8b2105.js";import"./p-344ee7cb.js";import"./p-0c667d6a.js";import"./p-9d426517.js";import"./p-0bb29d98.js";import"./p-469bc36e.js";import"./p-d3f1d3dd.js";import"./p-1ced3ae5.js";import"./p-56681feb.js";import"./p-aae8855d.js";import"./p-3a0a4d15.js";import"./p-c59042c0.js";var N=function(e,t,i,s){var n,a=arguments.length,o=a<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,s);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(o=(a<3?n(o):a>3?n(t,i,o):n(t,i))||o);return a>3&&o&&Object.defineProperty(t,i,o),o};class q extends p{constructor(){super(...arguments),this.renderLabel=()=>this.label&&e("div",{class:"vega-input-select-label"},e("span",null,this.label),this.required&&e("span",{class:"vega-input-select-required"},"*")),this.renderErrorMessage=()=>e("div",{class:"vega-input-select-error-message"}),this.renderHelpMessage=()=>e("div",{class:"vega-input-select-hint"},this.hint)}render(){return e(t,{class:f([this.disabled?"vega-input-select-disabled":"",v.formatCustom(this.size)])},this.renderLabel(),this.dropdownRenderer.render(),this.renderErrorMessage(),this.hint&&this.renderHelpMessage())}}N([l()],q.prototype,"disabled",void 0),N([l()],q.prototype,"size",void 0),N([l()],q.prototype,"hint",void 0),N([l()],q.prototype,"label",void 0),N([l()],q.prototype,"required",void 0),N([l({componentFieldName:"vegaInputSelectDropdownRenderer"})],q.prototype,"dropdownRenderer",void 0);var G=function(e,t,i,s){var n,a=arguments.length,o=a<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,s);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(o=(a<3?n(o):a>3?n(t,i,o):n(t,i))||o);return a>3&&o&&Object.defineProperty(t,i,o),o};class K extends p{constructor(){super(...arguments),this.onDropdownShow=()=>{this.isDropdownShow=!0},this.onDropdownHide=()=>{this.isDropdownShow=!1}}addDropdownObserver(e){x.addUniqueObserverToNode(e,m,(()=>{this.onDropdownShow()})),x.addUniqueObserverToNode(e,b,(()=>{this.onDropdownHide()})),x.addUniqueObserverToNode(e,w,(async e=>{this.vegaInputSelectValueController.setValue(await e.host.getSelection())})),x.addUniqueObserverToNode(e,y,(e=>{this.searchEventEmitter.emit(e.detail)}))}}G([l({writable:!0})],K.prototype,"isDropdownShow",void 0),G([l()],K.prototype,"vegaSearch",void 0),G([l()],K.prototype,"searchEventEmitter",void 0),G([l()],K.prototype,"vegaInputSelectValueController",void 0);var P=function(e,t,i,s){var n,a=arguments.length,o=a<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,s);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(o=(a<3?n(o):a>3?n(t,i,o):n(t,i))||o);return a>3&&o&&Object.defineProperty(t,i,o),o};class U extends p{constructor(){super(...arguments),this.handleValueChange=(e,t)=>{if("multiple"===this.selectType){e=e,t=t;const i=[];this.source.forEach((t=>{e.includes(t.id)&&i.push(t.id)})),R(i,t,!0)?R(i,e,!0)||this.setValue(i):(this.setValue(i),this.changeEventEmitter.emit(i),S.notify(z,{host:this.host,detail:i}))}else if(e!==t){const t=this.source.find((t=>t.id===e));this.setValue(t?t.id:""),this.changeEventEmitter.emit(this.value),S.notify(z,{host:this.host,detail:this.value})}}}setValue(e){this.valueGuard(e)&&(this.value=e)}valueGuard(e){switch(this.selectType){case"single":return null===e||"string"==typeof e;case"multiple":return Array.isArray(e)&&e.every((e=>"string"==typeof e));default:return h.warn(`Invalid input select value ${e} for ${this.selectType} mode`),!1}}}P([l({writable:!0})],U.prototype,"value",void 0),P([l()],U.prototype,"selectType",void 0),P([l()],U.prototype,"source",void 0),P([l()],U.prototype,"changeEventEmitter",void 0),P([l()],U.prototype,"host",void 0),P([d("watchValue")],U.prototype,"handleValueChange",void 0);var B=function(e,t,i,s){var n,a=arguments.length,o=a<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,s);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(o=(a<3?n(o):a>3?n(t,i,o):n(t,i))||o);return a>3&&o&&Object.defineProperty(t,i,o),o};class M extends p{constructor(){super(...arguments),this.renderContainer=()=>e("div",{role:"button",class:"vega-input-select-container",ref:e=>this.inputSelectContainer=e,tabIndex:0,onKeyDown:O(),onBlur:this.preventBlur},this.renderPrefixIcon(),this.renderSelectContainer(),this.renderToggleIcon()),this.renderPrefixIcon=()=>this.prefixIcon&&e("div",{class:"vega-input-select-prefix-icon"},e("vega-icon",{icon:this.prefixIcon,size:"size-16"})),this.renderToggleIcon=()=>e("div",{class:"vega-input-select-toggle-icon"},e("vega-icon",{icon:L.getIconKey(this.isDropdownShow?"chevron-up":"chevron-down")})),this.renderSelectContainer=()=>e("div",{class:"vega-input-select-select-container"},e("div",{class:"vega-input-select-selected-box"},"multiple"===this.selectType?this.renderMultipleSelected():this.renderSingleSelected())),this.renderMultipleSelected=()=>this.value.length>0?e("span",{class:"vega-input-select-selected"},this.selectedLabel(this.value)):e("div",{class:"vega-input-select-placeholder"},this.placeholder),this.renderSingleSelected=()=>{const t=this.source.find((e=>e.id===this.value));return t?e("span",{class:"vega-input-select-selected"},t.displayName):e("div",{class:"vega-input-select-placeholder"},this.placeholder)},this.getVegaDropdownProperties=()=>Object.assign({searchable:!0,caseSensitive:!1},this.vegaDropdownProps)}show(){return this.dropdown.show()}hide(){return this.dropdown.hide()}getDropdownRef(){return this.dropdown}getInputSelectContainerRef(){return this.inputSelectContainer}render(){return e("vega-dropdown",Object.assign({trigger:"click",source:this.getDropdownSource(),selectType:this.selectType,selectedSourceKey:this.value,matchTargetWidth:!0},this.getVegaDropdownProperties(),{ref:e=>{this.dropdown=e,this.vegaInputSelectDropdownController.addDropdownObserver(e)},isLazyLoading:this.isLazyLoading}),this.renderContainer())}preventBlur(e){e.stopImmediatePropagation()}getDropdownSource(){return this.source.map((e=>({key:e.id,label:e.displayName})))}}L.register({"chevron-up":D,"chevron-down":C}),B([l()],M.prototype,"value",void 0),B([l()],M.prototype,"source",void 0),B([l()],M.prototype,"selectType",void 0),B([l()],M.prototype,"isDropdownShow",void 0),B([l()],M.prototype,"vegaDropdownProps",void 0),B([l()],M.prototype,"prefixIcon",void 0),B([l()],M.prototype,"placeholder",void 0),B([l()],M.prototype,"selectedLabel",void 0),B([l()],M.prototype,"isLazyLoading",void 0),B([l()],M.prototype,"vegaInputSelectDropdownController",void 0);var $=function(e,t,i,s){var n,a=arguments.length,o=a<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,s);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(o=(a<3?n(o):a>3?n(t,i,o):n(t,i))||o);return a>3&&o&&Object.defineProperty(t,i,o),o};class W extends p{constructor(){super(...arguments),this.hasMore=!0}componentDidLoad(){const e=this.getVirtualScroll();e&&x.addUniqueObserverToNode(e,A,this.onScrollToBottom.bind(this))}getVirtualScroll(){var e,t,i;return null===(i=null===(t=null===(e=this.vegaInputSelectDropdownRenderer.getDropdownRef().shadowRoot)||void 0===e?void 0:e.querySelector("vega-dropdown-content-box"))||void 0===t?void 0:t.shadowRoot)||void 0===i?void 0:i.querySelector("vega-virtual-scroll")}async onScrollToBottom(e){if(this.sourceLazyLoadCallback&&this.hasMore){this.isLazyLoading=!0;const t=await this.sourceLazyLoadCallback(e.endIndex);this.hasMore=t.hasMore,t.items.length>0&&this.sourceController.appendSourceItems(t.items),this.isLazyLoading=!1}}}$([l()],W.prototype,"sourceLazyLoadCallback",void 0),$([l({writable:!0})],W.prototype,"isLazyLoading",void 0),$([l()],W.prototype,"sourceController",void 0),$([l()],W.prototype,"vegaInputSelectDropdownRenderer",void 0),$([d("componentDidLoad")],W.prototype,"componentDidLoad",null);const H=[{payloadKey:"AUTO_VALIDATION_IS_TRUE",payloadDescription:"Specifies whether the system should automatically carry out validation checks on the user's selection in real-time, ensuring that the input adheres to predefined criteria before submission or proceeding further",payloadValue:e=>!0===e.autoValidation},{payloadKey:"AUTO_VALIDATION_IS_FALSE",payloadDescription:"Specifies whether the system should automatically carry out validation checks on the user's selection in real-time, ensuring that the input adheres to predefined criteria before submission or proceeding further",payloadValue:e=>!1===e.autoValidation}];var J=function(e,t,i,s){var n,a=arguments.length,o=a<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,s);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(o=(a<3?n(o):a>3?n(t,i,o):n(t,i))||o);return a>3&&o&&Object.defineProperty(t,i,o),o};class Q extends p{constructor(){super(...arguments),this.handleSourceChange=()=>{this.source=_(this.source,F)?this.source:[]}}appendSourceItems(e){this.source=[...this.source,...e]}}J([l({writable:!0})],Q.prototype,"source",void 0),J([d("watchSource")],Q.prototype,"handleSourceChange",void 0);var X=function(e,t,i,s){var n,a=arguments.length,o=a<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,s);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(o=(a<3?n(o):a>3?n(t,i,o):n(t,i))||o);return a>3&&o&&Object.defineProperty(t,i,o),o};const Y=class{constructor(e){i(this,e),this.vegaChange=s(this,"vegaChange",7),this.change=s(this,"change",7),this.vegaSearch=s(this,"vegaSearch",7),this.search=s(this,"search",7),this.globalSlimmers={},this.sourceController=new Q,this.vegaInputSelectRenderer=new q,this.vegaInputSelectDropdownController=new K,this.vegaInputSelectValueController=new U,this.vegaInputSelectDropdownRenderer=new M,this.formFieldControllerSlimmer=new V({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new a:null}],validationRulesName:"validationRules",defaultValue:e=>"multiple"===e.selectType?[]:"",attributeGetter:e=>this[e],inputContainerGetter:()=>this.vegaInputSelectDropdownRenderer.getDropdownRef(),touchableAreaGetter:()=>[this.vegaInputSelectDropdownRenderer.getInputSelectContainerRef()]}),this.pageResizeObserverSlimmer=new k,this.lazyLoadController=new W,this.changeEventEmitter=E(Y,I),this.searchEventEmitter=E(Y,j),this.eventPrevent=new T([j],(()=>this.host),!0),this.vegaComponentUsageRuntimeMetricsSlimmer=new g(H),this.isDropdownShow=!1,this.currentBreakpoint=r(),this.isLazyLoading=!1,this.label="",this.required=!1,this.selectedLabel=e=>`${e.length} Selected`,this.selectType="single",this.source=[],this.value="multiple"===this.selectType?[]:"",this.isValid=null,this.autoValidation=!0,this.validationRules=[],this.disabled=!1,this.placeholder="Please select",this.vegaDropdownProps={},this.size="default"}watchSource(){}watchValue(e,t){}watchValidationRules(){}componentWillLoad(){}async doClose(){await this.vegaInputSelectDropdownRenderer.hide()}async doOpen(){await this.vegaInputSelectDropdownRenderer.show()}async doChange(e){this.vegaInputSelectValueController.setValue(e)}render(){return o(this.vegaInputSelectRenderer.render(),this.host)}get host(){return n(this)}static get watchers(){return{source:["watchSource"],value:["watchValue"],validationRules:["watchValidationRules"]}}};X([u()],Y.prototype,"globalSlimmers",void 0),X([c()],Y.prototype,"sourceController",void 0),X([c()],Y.prototype,"vegaInputSelectRenderer",void 0),X([c()],Y.prototype,"vegaInputSelectDropdownController",void 0),X([c()],Y.prototype,"vegaInputSelectValueController",void 0),X([c()],Y.prototype,"vegaInputSelectDropdownRenderer",void 0),X([c()],Y.prototype,"formFieldControllerSlimmer",void 0),X([c()],Y.prototype,"pageResizeObserverSlimmer",void 0),X([c()],Y.prototype,"lazyLoadController",void 0),X([c()],Y.prototype,"changeEventEmitter",void 0),X([c()],Y.prototype,"searchEventEmitter",void 0),X([c()],Y.prototype,"eventPrevent",void 0),X([c()],Y.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),Y.style=':host{display:inline-block;width:100%;min-width:0px;text-align:left;line-height:normal}:host(.default) .vega-input-select-container{padding-left:16px;padding-right:16px;padding-top:12px;padding-bottom:12px}:host(.small) .vega-input-select-container{padding-left:12px;padding-right:12px;padding-top:8px;padding-bottom:8px}:host .vega-input-select-label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));padding-bottom:8px}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-input-select-label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-input-select-label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-input-select-label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}:host .vega-input-select-label .vega-input-select-required{color:rgba(var(--v-text-error, 189, 41, 71, 1));margin-left:4px}:host .vega-input-select-container{border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1));background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border-radius:8px;gap:8px;display:block;display:flex;align-items:center;cursor:pointer}:host .vega-input-select-container:hover{border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1))}:host .vega-input-select-container:focus{border:1px solid rgba(var(--v-border-input-field-focus, 19, 98, 226, 1));box-shadow:0 0 0 4px rgba(var(--v-ring-input-focus, 19, 98, 226, 0.25));outline:none}:host .error .vega-input-select-container{border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}:host .error .vega-input-select-container:hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}:host .error .vega-input-select-container:focus{border:1px solid rgba(var(--v-border-input-field-danger-focus, 233, 71, 104, 1));box-shadow:0 0 0 4px rgba(var(--v-ring-input-danger-focus, 230, 50, 87, 0.25))}:host(.vega-input-select-disabled) .vega-input-select-label{color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}:host(.vega-input-select-disabled) vega-dropdown{pointer-events:none}:host(.vega-input-select-disabled) .vega-input-select-container{border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1));background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));--tw-shadow:0 0 #0000;box-shadow:rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px}:host(.vega-input-select-disabled) .vega-input-select-container:hover{border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}:host(.vega-input-select-disabled) vega-icon{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}:host .vega-input-select-select-container{flex-grow:1;min-width:0px}:host .vega-input-select-selected{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block;min-height:24px}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-input-select-selected{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-input-select-selected{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-input-select-selected{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}:host(.vega-input-select-disabled) .vega-input-select-selected{color:rgba(var(--v-text-input-disabled, 107, 116, 125, 1))}:host .vega-input-select-placeholder{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px;color:rgba(var(--v-text-input-placeholder, 176, 180, 181, 1));overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-height:24px}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-input-select-placeholder{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-input-select-placeholder{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-input-select-placeholder{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}:host .vega-input-select-prefix-icon{width:16px;height:16px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));padding-bottom:2px}:host .vega-input-select-toggle-icon{width:16px;height:16px;color:rgba(var(--v-text-link, 19, 98, 226, 1))}:host .vega-error{display:inline-block;padding-left:8px;padding-right:8px;padding-top:12px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host .vega-hidden{display:none}:host .vega-input-select-hint{padding-left:8px;padding-right:8px;padding-top:12px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-input-select-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-input-select-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-input-select-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host vega-dropdown{display:block}';export{Y as vega_input_select}
@@ -1 +1 @@
1
- import{h as e,F as t,f as n,r as i,c as r,H as a,g as o}from"./p-9777b1c1.js";import{s}from"./p-b81bd0bb.js";import{a as d,V as l,M as c,L as h,I as v}from"./p-018d77cc.js";import{V as p,I as w}from"./p-5cad29f5.js";import{D as m,d as f}from"./p-0fd9f03f.js";import{a as u,d as g,e as x}from"./p-f1d8fd1c.js";import{V as b}from"./p-4e5c06ae.js";import{p as y}from"./p-21c9f2c5.js";import{c as k}from"./p-16608c5a.js";import{C as R}from"./p-fda33444.js";import{f as j}from"./p-c47d4933.js";import{c as C}from"./p-86194314.js";import{g as z}from"./p-469bc36e.js";import{P as E}from"./p-cb13b4e6.js";import{d as I}from"./p-1bc5b3bc.js";import{C as D}from"./p-bf95b189.js";import{c as M,S as O}from"./p-a9c3e9fd.js";import{p as T}from"./p-1265732f.js";import{s as V}from"./p-6bdc4407.js";import{b as $}from"./p-0c667d6a.js";import"./p-9d426517.js";import"./p-d3f1d3dd.js";import"./p-aae8855d.js";import"./p-3542f8fe.js";import"./p-3c8b2105.js";import"./p-320642bd.js";import"./p-3a0a4d15.js";import"./p-c59042c0.js";var P=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class L extends l{render(){return e(t,null,this.switchPanelRenderer.render(),this.viewRenderer.render())}}P([d()],L.prototype,"switchPanelRenderer",void 0),P([d()],L.prototype,"viewRenderer",void 0);function S(e,t=!1){return e.toLocaleDateString("en-US",{month:t?"short":"long"})}function F(e,t=15){const[n,i]=e.split(":");return Math.round((60*Number(n)+Number(i))/t)}var N=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class B extends l{constructor(){super(...arguments),this.handleViewChange=e=>{this.calendarViewController.setViewMode(e.detail)},this.todayButtonClick=()=>{this.currentPeriodController.setCurrentPeriod(this.currentPeriod.now())},this.nextButtonClick=()=>{this.currentPeriodController.setCurrentPeriod(this.currentPeriod.next())},this.prevButtonClick=()=>{this.currentPeriodController.setCurrentPeriod(this.currentPeriod.previous())}}getSwitchPanelRef(){return this.switchPanelRef}render(){return e("vega-flex",{direction:"row",gap:"size-16",justifyContent:"space-between",alignItems:"center",class:"calendar-switch-panel",ref:e=>this.switchPanelRef=e},this.renderDateSwitch(),e("div",{class:"calendar-view-switch-container"},this.renderViewSwitch()))}renderDateSwitch(){return e("div",{class:"calendar-date-switch-container"},e("vega-button",{variant:"secondary",size:"small",ref:e=>{m.addUniqueObserverToNode(e,u,this.todayButtonClick)}},"Today"),e("vega-button-circle",{variant:"secondary",size:"small",icon:b.getIconKey("chevron-left"),label:"previous",showTooltip:!1,ref:e=>{m.addUniqueObserverToNode(e,u,this.prevButtonClick)}}),e("vega-button-circle",{variant:"secondary",size:"small",icon:b.getIconKey("chevron-right"),label:"next",showTooltip:!1,ref:e=>{m.addUniqueObserverToNode(e,u,this.nextButtonClick)}}),this.renderCurrentPeriod())}renderCurrentPeriod(){return e("vega-font",{class:"calendar-current-date",variant:"font-field-label",color:"text-primary"},this.getViewDateSummary())}renderViewSwitch(){return e("vega-segment-control",{segments:B.views,size:"small",variant:"text-only",selected:this.viewMode,ref:e=>{m.addUniqueObserverToNode(e,g,this.handleViewChange)}})}getViewDateSummary(){const e=this.currentPeriod.current;let t="";switch(this.viewMode){case"day":t=`${e.date} ${S(e.toDate())}, ${e.year}`;break;case"week":{const e=this.currentPeriod.startDate,n=this.currentPeriod.endDate;t=`${e.date} ${S(e.toDate())}${e.year===n.year?"":", "+e.year} - ${n.date} ${S(n.toDate())}, ${n.year}`;break}case"month":t=`${S(e.toDate())}, ${e.year}`}return t}}b.register({"chevron-right":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"/></svg>'},"chevron-left":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z"/></svg>'}}),B.views=[{text:"Day",key:"day"},{text:"Week",key:"week"},{text:"Month",key:"month"}],N([d()],B.prototype,"viewMode",void 0),N([d()],B.prototype,"calendarView",void 0),N([d()],B.prototype,"currentPeriod",void 0),N([d()],B.prototype,"currentPeriodController",void 0),N([d()],B.prototype,"calendarViewController",void 0);var A=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class W extends l{render(){return e("div",{class:`calendar-view calendar-view-${this.viewMode}`},"month"===this.viewMode?this.monthViewRenderer.render():this.viewWithTimeRenderer.render())}}A([d()],W.prototype,"viewMode",void 0),A([d()],W.prototype,"monthViewRenderer",void 0),A([d()],W.prototype,"viewWithTimeRenderer",void 0);var H=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class Y extends l{render(){return e("div",{class:"calendar-view-month-container"},e("div",{class:"calendar-view-row calendar-view-title border-divider-bottom"},this.calendarView.weekdays.map((t=>e("div",{key:t},t)))),this.renderMonthViewContent())}renderMonthViewContent(){const t=this.currentPeriod.current;return this.calendarView.dateItems.map(((n,i)=>{const r=this.monthEventRenderer.getCurrentRowEvents(n),a=this.monthEventRenderer.filterRowDisplayEvents(r);return e("div",{key:i,class:"calendar-view-row border-divider-bottom"},n.map(((n,i)=>e("div",{class:{"row-cell border-divider-right":!0,"current-month-day":n.compare(t).inMonth,active:n.isToday(),disabled:!1},key:`${n.month}-${n.date}`},this.renderDateBlock(n),this.monthEventRenderer.render(n,r[i],a[i],i)))))}))}renderDateBlock(t){return e("div",{class:"date"},1===t.date&&e("div",{class:"month-block"},S(t.toDate(),!0)),e("div",{role:"button",tabIndex:0,class:"grid-col"},t.date))}}H([d()],Y.prototype,"viewMode",void 0),H([d()],Y.prototype,"calendarView",void 0),H([d()],Y.prototype,"currentPeriod",void 0),H([d()],Y.prototype,"calendarViewController",void 0),H([d()],Y.prototype,"monthEventRenderer",void 0);var K=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class U extends l{render(){return e("div",{class:"calendar-view-container"},this.renderViewTitle(),this.renderViewContent())}renderViewTitle(){const t=this.calendarView.dateItems[0],n=this.calendarView.weekdays;return e("div",{class:"calendar-view-title-container"},e("div",{class:"calendar-view-row"},e("div",{class:"time-line-empty"}),e("div",{class:"calendar-view-title"},t.map(((t,i)=>e("div",{key:t.date,class:{active:t.isToday()}},e("div",null,n[i]),e("div",{class:"week-day"},t.date)))))),e("div",{class:"calendar-view-row calendar-view-event-all-container border-divider-bottom"},e("div",{class:"time-line-all"},"All Day"),this.dayViewFullDayEventRenderer.render()))}renderViewContent(){const t=this.calendarView.dateItems[0];return e("div",{class:"calendar-view-row calendar-view-day-container"},this.timeLineRenderer.render(),e("div",{class:"calendar-view-content-container"},e("div",{class:"calendar-view-content"},t.map((t=>e("div",{class:"grid-col border-divider-left",key:t.date},e("div",{class:"hour-empty border-divider-top"}),this.renderHourBlock())))),this.dayViewTimedEventRenderer.render(),this.timeLineRenderer.renderTimeMarker(t)))}renderHourBlock(){return Array(24).fill("").map((()=>e("div",{class:"grid-cell border-divider-top"})))}}K([d()],U.prototype,"viewMode",void 0),K([d()],U.prototype,"timeLineRenderer",void 0),K([d()],U.prototype,"dayViewTimedEventRenderer",void 0),K([d()],U.prototype,"dayViewFullDayEventRenderer",void 0),K([d()],U.prototype,"calendarView",void 0),K([d()],U.prototype,"calendarViewController",void 0);var _=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class q extends l{renderTimeMarker(t){const n=t.findIndex((e=>e.isToday()))>=0;return e("div",{class:{"time-marker-container":!0,hidden:!n}},e("div",{class:"time-marker",style:{top:this.getTimeMarkerPosition()},ref:e=>this.timeMarkerRef=e},t.map((t=>e("div",{key:t.date,class:{active:t.isToday()}})))))}render(){const t=this.getTimeLineTitles();return e("div",{class:"time-line",ref:e=>this.timeLineRef=e},e("div",{class:"hour-empty"}),t.map(((t,n)=>e("div",{key:t},e("div",{class:"time-text","data-time":0===n?24:n},t)))))}updateTimeLine(e){this.scrollToTargetTimeBlock(e),this.syncTimeMarkerPosition(e)}clearTimer(){clearInterval(this.timeMarkerPositionTimer)}updateTimeLineIfComponentAddBack(){this.syncTimeMarkerPosition(this.viewMode)}getTimeMarkerPosition(){const e=new Date;return(60*e.getHours()+e.getMinutes())/1440*100+"%"}getTimeLineTitles(){const e=[];if("12-hour"===this.timeFormat){e.push("12 AM");for(let t=1;t<12;t++)e.push(`${t} AM`);e.push("12 PM");for(let t=1;t<12;t++)e.push(`${t} PM`)}else for(let t=0;t<24;t++)e.push(y(t));return e}syncTimeMarkerPosition(e){clearInterval(this.timeMarkerPositionTimer),"month"!==e&&(this.timeMarkerPositionTimer=setInterval((()=>{this.timeMarkerRef&&(this.timeMarkerRef.style.top=this.getTimeMarkerPosition())}),6e4))}scrollToTargetTimeBlock(e){"month"!==e&&setTimeout((()=>{var e,t;const n=(new Date).getHours();null===(t=null===(e=this.timeLineRef)||void 0===e?void 0:e.querySelector(`[data-time='${n<23?n+1:n}']`))||void 0===t||t.scrollIntoView({block:"end"})}),0)}}_([d()],q.prototype,"timeFormat",void 0),_([d()],q.prototype,"viewMode",void 0),_([c("watchViewModeChange")],q.prototype,"updateTimeLine",null),_([c("disconnectedCallback")],q.prototype,"clearTimer",null),_([c("connectedCallback")],q.prototype,"updateTimeLineIfComponentAddBack",null);const G=(e=0)=>{const t=[0,1,2,3,4,5,6];return t.concat(t).slice(e,e+7)};class J{constructor(){this.WEEKDAYS_SHORT=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],this.weekdays=G()}getWeekdayNames(){return this.WEEKDAYS_SHORT}generateDates(e){const t=e.startDate.toDate(),n=[];for(let i=0;i<e.count;i++)n.push(new Date(t)),t.setDate(t.getDate()+1);return n}generateWeekHead(){return this.weekdays.map((e=>this.getWeekdayNames()[e]))}}class Q{constructor(e,t){this._weekdays=e,this._dateItems=t}get weekdays(){return this._weekdays}get dateItems(){return this._dateItems}}class X extends J{generate(e){return new Q([this.generateWeekHead()[e.current.toDate().getDay()]],[[e.current]])}}class Z{constructor(e,t,n){this._date=n,this._month=t,this._year=e}static from(e){return new Z(e.getFullYear(),e.getMonth()+1,e.getDate())}get year(){return this._year}set year(e){this._year=e}get month(){return this._month}set month(e){this._month=e}get date(){return this._date}set date(e){this._date=e}isToday(){const e=new Date;return e.getFullYear()===this.year&&e.getMonth()+1===this.month&&e.getDate()===this.date}toDate(){return new Date(this.year,this.month-1,this.date)}compare(e){const{year:t,month:n}=e,i={isPreviousMonth:!1,inMonth:!1,isNextMonth:!1};return this.year===t?this.month<n?i.isPreviousMonth=!0:this.month>n?i.isNextMonth=!0:i.inMonth=!0:this.year>t?i.isNextMonth=!0:i.isPreviousMonth=!0,i}}class ee extends J{generate(e){const t=this.generateDates(e);return new Q(this.generateWeekHead(),[t.map(Z.from)])}}class te extends J{generate(e){const t=[];let n=[];return this.generateDates(e).forEach(((e,i)=>{i%7||(t[i/7]=n=[]);const r=Z.from(e);n.push(r)})),new Q(this.generateWeekHead(),t)}}class ne{constructor(e,t){this._count=e,this._current=t||Z.from(new Date),this.calculatePeriod(this._current)}get current(){return this._current}get startDate(){return this._startDate}get endDate(){return this._endDate}get count(){return this._count}goTo(e){return this.createBy(e)}now(){return this.createBy(Z.from(new Date))}calculatePeriod(e){const t=e.toDate();this.count>1&&t.setDate(t.getDate()-G().indexOf(t.getDay())),this._startDate=Z.from(t),t.setDate(t.getDate()+this.count-1),this._endDate=Z.from(t)}}class ie extends ne{constructor(e){super(ie.DISPLAY_DATE_COUNT,e)}next(){const e=this.current.toDate();return e.setDate(e.getDate()+1),this.createBy(Z.from(e))}previous(){const e=this.current.toDate();return e.setDate(e.getDate()-1),this.createBy(Z.from(e))}createBy(e){return new ie(e)}}ie.DISPLAY_DATE_COUNT=1;class re extends ne{constructor(e){super(re.DISPLAY_DATE_COUNT,e)}next(){const e=this.current.toDate();return e.setDate(e.getDate()-G().indexOf(e.getDay())+7),this.createBy(Z.from(e))}previous(){const e=this.current.toDate();return e.setDate(e.getDate()-G().indexOf(e.getDay())-7),this.createBy(Z.from(e))}createBy(e){return new re(e)}}re.DISPLAY_DATE_COUNT=7;class ae extends ne{constructor(e){const t=e||Z.from(new Date),n=new Z(t.year,t.month,1);super(ae.DISPLAY_DATE_COUNT,n)}next(){const e=this.current.toDate();return e.setMonth(e.getMonth()+1),this.createBy(Z.from(e))}previous(){const e=this.current.toDate();return e.setMonth(e.getMonth()-1),this.createBy(Z.from(e))}createBy(e){return new ae(e)}}ae.DISPLAY_DATE_COUNT=42;var oe=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class se extends l{constructor(){super(...arguments),this.monthViewGenerator=new te,this.weekViewGenerator=new ee,this.dayViewGenerator=new X}setViewMode(e){this.viewMode=e}initialCalendarView(){this.setCalendarView(this.getCalendarViewByViewMode())}generateCalendarView(){this.setCalendarView(this.getCalendarViewByViewMode())}getCalendarViewByViewMode(){switch(this.viewMode){case"week":return this.weekViewGenerator.generate(this.currentPeriod);case"day":return this.dayViewGenerator.generate(this.currentPeriod);default:return this.monthViewGenerator.generate(this.currentPeriod)}}setCalendarView(e){this.calendarView=e}}oe([d({writable:!0})],se.prototype,"calendarView",void 0),oe([d({writable:!0})],se.prototype,"viewMode",void 0),oe([d()],se.prototype,"currentPeriod",void 0),oe([d()],se.prototype,"currentPeriodController",void 0),oe([c("componentWillLoad")],se.prototype,"initialCalendarView",null),oe([c("watchCurrentPeriodChange")],se.prototype,"generateCalendarView",null);var de=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class le extends l{setCurrentPeriod(e){this.currentPeriod=e}initialCurrentPeriod(){this.initCalendarPeriod(this.viewMode,Z.from(new Date))}emitChangeEvent(){this.changeEventEmitter.emit({viewMode:this.viewMode,currentPeriod:this.getCurrentPeriodSummary()})}updateCurrentPeriodByViewMode(e){this.initCalendarPeriod(e,this.currentPeriod.current)}getCurrentPeriodSummary(){const{current:e,startDate:t,endDate:n}=this.currentPeriod;return{year:e.year,month:e.month,startDate:{date:t.date,month:t.month,year:t.year},endDate:{date:n.date,month:n.month,year:n.year}}}initCalendarPeriod(e,t){switch(e){case"month":this.setCurrentPeriod(new ae(t));break;case"week":this.setCurrentPeriod(new re(t));break;case"day":this.setCurrentPeriod(new ie(t))}}}de([d({writable:!0})],le.prototype,"currentPeriod",void 0),de([d()],le.prototype,"changeEventEmitter",void 0),de([d()],le.prototype,"viewMode",void 0),de([c("componentWillLoad")],le.prototype,"initialCurrentPeriod",null),de([c("watchCurrentPeriodChange")],le.prototype,"emitChangeEvent",null),de([c("watchViewModeChange")],le.prototype,"updateCurrentPeriodByViewMode",null);var ce=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class he extends l{constructor(){super(...arguments),this.maxMonthDisplayEventsCount=2}getCurrentRowEvents(e){const t=[];return e.forEach((e=>{const n=this.calendarEventController.getCurrentDateEvents(e);t.push(n)})),this.fullDayEventLayoutRenderer.sortLongEvents(t)}filterRowDisplayEvents(e){const t=[];return e.forEach((e=>{const n=e.length>this.maxMonthDisplayEventsCount?e.slice(0,this.maxMonthDisplayEventsCount-1):e;t.push(n)})),this.hideTheCutOffEvents(e,t)}getMonthEventContainerRef(){return this.eventContainerRef}render(t,n,i,r){const a=n.slice(i.length).filter((e=>e)).length;return e("div",{class:"events-container",ref:e=>this.eventContainerRef=e},e("div",{class:"event-list"},this.fullDayEventLayoutRenderer.render(i,r)),this.renderMoreButton(n,a,`${t.date} ${S(t.toDate())} ${t.year}`))}addMaxDisplayCountChange(){m.addUniqueObserverToNode(this.host,j,(e=>{this.maxMonthDisplayEventsCount=e.detail,"month"===this.viewMode&&n(this.host)}))}renderMoreButton(t,n,i){if(n){const r=t.filter((e=>e&&(e.isAllDayEvent||e.isGroupEvent()))),a=t.filter((e=>e&&!e.isAllDayEvent&&!e.isGroupEvent()));return e("div",{class:"month-event-more"},e("vega-popover",{trigger:"click",placement:"right"},e("div",{tabIndex:0,slot:"popover-content",role:"button",class:"more-button",onKeyDown:C()},`${n} More`),e("vega-flex",{slot:"popover",direction:"col",gap:"0"},e("vega-font",{textAlign:"center",variant:"font-field-label",color:"text-primary",style:{padding:"4px 0",marginBottom:"8px"}},i),e("vega-flex",{direction:"col",gap:"size-4",style:{paddingBottom:a.length?"4px":"0px"}},r.map((e=>this.eventItemRenderer.render(e,{"month-event":!0,"calendar-event-large-size":!0})))),a.map((e=>this.eventItemRenderer.render(e,{"month-event":!0,"calendar-event-large-size":!0}))))))}}hideTheCutOffEvents(e,t){const n=[],i=[],r=t.map((e=>e[e.length-1])).filter((e=>e&&e.isGroupEvent()));return r.length&&r.forEach((n=>{e.filter((e=>e.includes(n))).length>t.filter((e=>e.includes(n))).length&&i.push(n)})),i.length?(t.forEach((e=>{e.length&&i.includes(e[e.length-1])?n.push(e.slice(0,e.length-1)):n.push(e)})),n):t}}ce([d()],he.prototype,"viewMode",void 0),ce([d()],he.prototype,"host",void 0),ce([d()],he.prototype,"calendarEventController",void 0),ce([d()],he.prototype,"eventItemRenderer",void 0),ce([d()],he.prototype,"fullDayEventLayoutRenderer",void 0),ce([c("componentWillLoad")],he.prototype,"addMaxDisplayCountChange",null);const ve=/^\d{1,2}\/\d{1,2}\/\d{4}/,pe=/^\d{1,2}:\d{1,2}/;class we{constructor(e){this._event=e,this._eventKey=z(),this.checkEventRequireField(e),this.initDate(e)}get event(){return this._event}get eventKey(){return this._eventKey}get title(){return this._event.title}get disabled(){return!!this._event.disabled}get variant(){return this._event.variant}get color(){return this._event.color}get isAllDayEvent(){return!!this._event.isAllDay}get isRepeatEvent(){return"none"!==this._event.repeat}get startDate(){return this._startDate}get endDate(){return this._endDate}get startTime(){return this._startTime}get endTime(){return this._endTime}isGroupEvent(){const{year:e,month:t,date:n}=Z.from(this.startDate),{year:i,month:r,date:a}=Z.from(this.endDate);return!(e===i&&t===r&&n===a)&&"daily"!==this._event.repeat}isCurrentDayEvent(e){const{startDate:t,endDate:n}=this,i=Z.from(t),r=Z.from(new Date(n.getFullYear(),n.getMonth(),n.getDate()+1)),a=this._event.repeat,o=e.toDate();if(i.toDate()<=o)switch(a){case"daily":return!0;case"weekly":return o.getDay()===t.getDay();case"monthly":return e.date===i.date;case"yearly":return e.month===i.month&&e.date===i.date;default:return r.toDate()>o}return!1}getEventDuration(){const[e,t]=this.startTime.split(":"),[n,i]=this.endTime.split(":"),r=Z.from(new Date),a=new Date(r.year,r.month,r.date,Number(e),Number(t));return(new Date(r.year,r.month,r.date,0===Number(n)&&0!==Number(e)?24:Number(n),Number(i)).valueOf()-a.valueOf())/6e4}convertTimeTo24Hour(e){if((e=e.toLocaleLowerCase()).indexOf("am")>0||e.indexOf("pm")>0){if(e.indexOf("am")>0){e=e.replace("am","").trim();const[t,n]=e.split(":");return`${"12"===t?"00":t}:${n}`}{e=e.replace("pm","").trim();const[t,n]=e.split(":");return`${"12"===t?"12":Number(t)+12}:${n}`}}return e}checkEventRequireField(e){const{title:t,startDate:n,endDate:i,startTime:r,endTime:a}=e;if(n&&"string"==typeof n&&!ve.test(n)||i&&"string"==typeof i&&!ve.test(i))throw new Error("Invalid calendar event item, the date format should be MM/DD/YYYY!");if(r&&"string"==typeof r&&!pe.test(r)||a&&"string"==typeof a&&!pe.test(a))throw new Error("Invalid calendar event item, the time format should be HH:mm!");if(!t||!n||!i&&!a)throw new Error("Invalid calendar event item, the required field should not empty!")}initDate(e){const{startDate:t,startTime:n,endDate:i,endTime:r}=e;if(t&&"object"==typeof t)this._startDate=t;else if(t&&"string"==typeof t){const[e,n,i]=t.split("/");this._startDate=new Date(Number(i),Number(e)-1,Number(n))}if(this._startTime=n?this.convertTimeTo24Hour(n):`${this._startDate.getHours()}:${this._startDate.getMinutes()}`,i&&"object"==typeof i)this._endDate=i;else if(i&&"string"==typeof i){const[e,t,n]=i.split("/");this._endDate=new Date(Number(n),Number(e)-1,Number(t),23,59,59)}else this._endDate=new Date(this._startDate.getFullYear(),this._startDate.getMonth(),this._startDate.getDate(),23,59,59);this._endTime=r?this.convertTimeTo24Hour(r):`${this._endDate.getHours()}:${this._endDate.getMinutes()}`}}var me=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class fe extends l{getCurrentDateEvents(e){return this.calendarEvents.filter((t=>t.isCurrentDayEvent(e)))}updateAfterEventChange(e){this.initCalendarEvents(e)}updateWhenComponentWillLoad(){this.initCalendarEvents(this.events)}initCalendarEvents(e){const t=[];e&&e.forEach((e=>{try{const n=new we(e);t.push(n)}catch(t){h.warn("Invalid calendar event item:",e)}})),this.calendarEvents=t}}me([d({writable:!0})],fe.prototype,"calendarEvents",void 0),me([d()],fe.prototype,"events",void 0),me([c("watchEventsChange")],fe.prototype,"updateAfterEventChange",null),me([c("componentWillLoad")],fe.prototype,"updateWhenComponentWillLoad",null);var ue=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class ge extends l{render(t,n){return e("vega-calendar-event",{key:t.eventKey,calendarEvent:t,class:n,onKeyDown:C(),onClick:()=>this.handleEventClick(t)})}handleEventClick(e){this.eventClickEmitter.emit({rawEvent:e.event})}}ge.backgroundColorModeEventHeight=18,ue([d()],ge.prototype,"calendarView",void 0),ue([d()],ge.prototype,"eventClickEmitter",void 0);var xe=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class be extends E{constructor(){super({target:()=>this.host,callback:()=>this.updateMaxDisplayCountWithDebounce()}),this.updateMaxDisplayCountWithDebounce=I(this.updateMaxDisplayCount,500,this)}updateMaxDisplayCount(){try{const e=this.monthEventRenderer.getMonthEventContainerRef();if("month"===this.viewMode&&e){const t=e.parentElement.getBoundingClientRect().height,n=Math.floor((t-be.monthDateTitleHeight)/ge.backgroundColorModeEventHeight);D.notify(f.getSubject(this.host,j),{host:this.host,detail:n})}}catch(e){}}updateMaxDisplayCountAfterSwitchToMonthView(e){"month"===e&&this.updateMaxDisplayCountWithDebounce()}}be.monthDateTitleHeight=26,xe([d()],be.prototype,"host",void 0),xe([d()],be.prototype,"monthEventRenderer",void 0),xe([d()],be.prototype,"viewMode",void 0),xe([c("componentDidLoad")],be.prototype,"updateMaxDisplayCount",null),xe([c("watchViewModeChange")],be.prototype,"updateMaxDisplayCountAfterSwitchToMonthView",null);var ye=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class ke extends l{render(){const t=this.calendarView.dateItems[0],n=t.map((e=>this.calendarEventController.getCurrentDateEvents(e).filter((e=>e.isAllDayEvent||e.isGroupEvent())))),i=this.fullDayEventLayoutRenderer.sortLongEvents(n);return e("div",{class:"calendar-view-event-all"},t.map(((t,n)=>e("div",{class:"event-all-col border-divider-left",key:t.date},this.renderCurrentFullDayEvents(i[n],n)))))}renderCurrentFullDayEvents(n,i){return e(t,null,e("div",{class:"placeholder-block",style:{height:n.length*ge.backgroundColorModeEventHeight-2+"px"}},e("span",null,n.length," events")),this.fullDayEventLayoutRenderer.render(n,i))}}ye([d()],ke.prototype,"calendarView",void 0),ye([d()],ke.prototype,"calendarEventController",void 0),ye([d()],ke.prototype,"eventItemRenderer",void 0),ye([d()],ke.prototype,"fullDayEventLayoutRenderer",void 0);class Re extends l{render(t){const n=[];return t.eventLayoutCells.forEach(((i,r)=>{let a=i.getEventBySlotIndex(0),o=0;for(let s=0;s<Re.totalNumberOfCells;s++){const d=i.getEventBySlotIndex(s);d!==a&&(a&&n.push(e("div",{key:r,class:"time-event-block",style:this.getTimeEventStyle(o,s,r,t.getEventColumnsSpannedCount(a))},this.eventItemRenderer.render(a,{"day-event":!0,"bg-shadow":r>0}))),a=d,o=s)}})),n}getTimeEventStyle(e,t,n,i){const r=n*(1/i);return{position:"absolute",left:100*r+"%",top:100/Re.totalNumberOfCells*e+"%",width:`calc(100% - ${100*r}%)`,height:100/Re.totalNumberOfCells*(t-e)+"%",zIndex:n>0?`${n}`:null}}}Re.totalNumberOfCells=96,function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);a>3&&o&&Object.defineProperty(t,n,o)}([d()],Re.prototype,"eventItemRenderer",void 0);class je{addCurrentEventToLayout(e,t){let n=e.find((e=>!e.hasOverlapEvent(t)));n?n.updateSlots(t):(n=this.createNewLayoutCell(),n.updateSlots(t),e.push(n))}}class Ce{get eventLayoutCells(){return this.cells}}class ze extends Ce{constructor(e){super(),this.cells=e}getEventColumnsSpannedCount(e){const t=this.cells.findIndex((t=>t.getEventStartIndex(e)>=0));let n=t+1;return t<this.cells.length-1&&this.cells.slice(t+1).forEach((t=>{t.hasOverlapEvent(e)&&n++})),n}}class Ee{getEventBySlotIndex(e){return this.slots[e]}getEventStartIndex(e){return this.slots.findIndex((t=>t===e))}getEventEndIndex(e){const t=this.getEventStartIndex(e);let n=t;if(t>=0)for(let i=t+1;i<this.slots.length;i++){if(this.slots[i]!==e){n=i-1;break}i===this.slots.length-1&&(n=i)}return n}}class Ie extends Ee{constructor(){super(...arguments),this.slots=Ie.defaultSlots}hasOverlapEvent(e){const[t,n]=this.getIndexRangeFromEvent(e);let i=!1;for(let e=t;e<n;e++)if(this.slots[e]){i=!0;break}return i}updateSlots(e){const[t,n]=this.getIndexRangeFromEvent(e);n>t&&(this.slots=this.slots.slice(0,t).concat(Array(n-t).fill(e),this.slots.slice(n)))}getIndexRangeFromEvent(e){const{startTime:t,endTime:n}=e;return[F(t),F(n)]}}Ie.defaultSlots=Array(96).fill(null);class De extends je{generate(e){const t=[new Ie];return e.forEach((e=>{this.addCurrentEventToLayout(t,e)})),new ze(t)}createNewLayoutCell(){return new Ie}}class Me{sort(e,t,n){const i=[],r=[],a=[];for(let t=0;t<e.length;t++){const n=e[t];n&&(n.isGroupEvent()?r.push(n):n.isAllDayEvent?i.push(n):a.push(n))}let o=i.concat(this.sortCalendarEventByTime(a)),s=n.getEventsByIndex(t);const d=s.filter((e=>e));if(o=r.filter((e=>d.findIndex((t=>t===e))<0)).concat(o),s.length>d.length){const e=o.slice(0,s.length-d.length);o=o.slice(s.length-d.length),s=this.insertEventsToEmptyPosition(s,e)}return o=s.concat(o),o}sortCalendarEventByTime(e){return e.sort(((e,t)=>{const n=F(e.startTime),i=F(t.startTime);return n===i?F(t.endTime)-F(e.endTime):n-i}))}insertEventsToEmptyPosition(e,t){return e.map((e=>{if(t.length&&!e){const e=t[0];return t=t.slice(1),e}return e}))}}var Oe=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class Te extends l{constructor(){super(...arguments),this.calendarEventSorter=new Me,this.dayViewTimedEventLayoutGenerator=new De}render(){return e("div",{class:"day-event-container"},this.calendarView.dateItems[0].map((t=>e("div",{key:`${t.month}-${t.date}`,class:"day-event-col"},this.renderTimedEvents(t)))))}renderTimedEvents(e){const t=this.calendarEventController.getCurrentDateEvents(e).filter((e=>!e.isAllDayEvent&&!e.isGroupEvent())),n=this.calendarEventSorter.sortCalendarEventByTime(t),i=this.dayViewTimedEventLayoutGenerator.generate(n);return this.dayViewEventLayoutRenderer.render(i)}}Oe([d()],Te.prototype,"calendarView",void 0),Oe([d()],Te.prototype,"calendarEventController",void 0),Oe([d()],Te.prototype,"dayViewEventLayoutRenderer",void 0);class Ve extends Ce{constructor(e){super(),this.cells=e}getEventRowsIndex(e){return this.cells.findIndex((t=>t.getEventStartIndex(e)>=0))}getEventsByIndex(e){const t=[];let n=0;return this.cells.forEach(((i,r)=>{const a=i.getEventBySlotIndex(e);t.push(a),a&&(n=r)})),t.slice(0,n+1)}}class $e extends Ee{constructor(){super(...arguments),this.slots=$e.defaultSlots}updateSlots(e){const{start:t,end:n}=e;this.slots=this.slots.slice(0,t).concat(Array(n-t+1).fill(e.event),this.slots.slice(n+1))}hasOverlapEvent(e){const{start:t,end:n}=e;let i=!1;for(let e=t;e<n+1;e++)if(this.slots[e]){i=!0;break}return i}}$e.defaultSlots=Array(7).fill(null);class Pe extends je{generate(e){const t=this.collectAllShouldOrderLongEvents(e),n=[new $e];return t.forEach((e=>{this.addCurrentEventToLayout(n,e)})),new Ve(n)}createNewLayoutCell(){return new $e}collectAllShouldOrderLongEvents(e){const t={};e.forEach(((e,n)=>{e.filter((e=>e&&e.isGroupEvent())).forEach((e=>{t[e.eventKey]=t[e.eventKey]?Object.assign(Object.assign({},t[e.eventKey]),{end:n,start:n-t[e.eventKey].end!=1?n:t[e.eventKey].start}):{start:n,end:n,event:e}}))}));const n=Object.values(t);return this.sortLongEventViews(n)}sortLongEventViews(e){return e.sort(((e,t)=>{const{startDate:n,endDate:i}=e.event,{startDate:r,endDate:a}=t.event;n.setHours(0,0,0),r.setHours(0,0,0),i.setHours(23,59,59),a.setHours(23,59,59);const o=a.valueOf()-r.valueOf()-(i.valueOf()-n.valueOf());return n.valueOf()!==r.valueOf()?n.valueOf()-r.valueOf():o}))}}var Le=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class Se extends l{constructor(){super(...arguments),this.longEventLayoutGenerator=new Pe,this.calendarEventSorter=new Me}sortLongEvents(e){return this.fullDayEventLayout=this.longEventLayoutGenerator.generate(e),e.map(((e,t)=>this.calendarEventSorter.sort(e,t,this.fullDayEventLayout)))}render(t,n){return t.map(((t,i)=>{if(t)return e("div",{key:t.eventKey,class:"month"===this.viewMode?"month-event-block":"day-event-block",style:this.getEventStyle(t,n,i,"month"===this.viewMode?Se.monthViewEventOffsetTop:0)},this.eventItemRenderer.render(t,{"month-event":"month"===this.viewMode,"day-event":"month"!==this.viewMode}))}))}getEventStyle(e,t,n,i){const r=this.calendarView.weekdays.length,a=t;let o=t+1;const s=n;let d=!0;const l=this.fullDayEventLayout.getEventRowsIndex(e);if(l>=0){const n=this.fullDayEventLayout.eventLayoutCells[l].getEventStartIndex(e),i=this.fullDayEventLayout.eventLayoutCells[l].getEventEndIndex(e);n===t?o=i+1:d=!1}return{position:"absolute",left:100/r*a+"%",top:`${s*ge.backgroundColorModeEventHeight+i}px`,width:100/r*(o-a)+"%",opacity:d?"1":"0"}}}Se.monthViewEventOffsetTop=26,Le([d()],Se.prototype,"eventItemRenderer",void 0),Le([d()],Se.prototype,"viewMode",void 0),Le([d()],Se.prototype,"calendarView",void 0);var Fe=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};const Ne=class{constructor(e){i(this,e),this.vegaChange=r(this,"vegaChange",7),this.change=r(this,"change",7),this.vegaEventClick=r(this,"vegaEventClick",7),this.eventClick=r(this,"eventClick",7),this.globalSlimmer={},this.vegaComponentUsageRuntimeMetricsSlimmer=new p,this.renderer=new L,this.switchPanelRenderer=new B,this.viewRenderer=new W,this.monthViewRenderer=new Y,this.viewWithTimeRenderer=new U,this.timeLineRenderer=new q,this.monthEventRenderer=new he,this.currentPeriodController=new le,this.calendarViewController=new se,this.dayViewFullDayEventRenderer=new ke,this.dayViewTimedEventRenderer=new Te,this.eventItemRenderer=new ge,this.dayViewEventLayoutRenderer=new Re,this.fullDayEventLayoutRenderer=new Se,this.calendarEventController=new fe,this.eventResponsiveController=new be,this.changeEventEmitter=k(Ne,g),this.eventClickEmitter=k(Ne,x),this.changeEventPrevent=new R([g],(()=>this.switchPanelRenderer.getSwitchPanelRef())),this.timeFormatNotifySlimmer=M(Ne,"timeFormat","watchTimeFormat"),this.calendarEvents=[],this.viewMode="month",this.timeFormat="24-hour"}watchCurrentPeriodChange(){}watchViewModeChange(e){}watchEventsChange(e){}watchTimeFormat(e){}render(){return s(e(a,null,this.renderer.render()),this.host)}get host(){return o(this)}static get watchers(){return{currentPeriod:["watchCurrentPeriodChange"],viewMode:["watchViewModeChange"],events:["watchEventsChange"],timeFormat:["watchTimeFormat"]}}};Fe([w()],Ne.prototype,"globalSlimmer",void 0),Fe([v()],Ne.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),Fe([v()],Ne.prototype,"renderer",void 0),Fe([v()],Ne.prototype,"switchPanelRenderer",void 0),Fe([v()],Ne.prototype,"viewRenderer",void 0),Fe([v()],Ne.prototype,"monthViewRenderer",void 0),Fe([v()],Ne.prototype,"viewWithTimeRenderer",void 0),Fe([v()],Ne.prototype,"timeLineRenderer",void 0),Fe([v()],Ne.prototype,"monthEventRenderer",void 0),Fe([v()],Ne.prototype,"currentPeriodController",void 0),Fe([v()],Ne.prototype,"calendarViewController",void 0),Fe([v()],Ne.prototype,"dayViewFullDayEventRenderer",void 0),Fe([v()],Ne.prototype,"dayViewTimedEventRenderer",void 0),Fe([v()],Ne.prototype,"eventItemRenderer",void 0),Fe([v()],Ne.prototype,"dayViewEventLayoutRenderer",void 0),Fe([v()],Ne.prototype,"fullDayEventLayoutRenderer",void 0),Fe([v()],Ne.prototype,"calendarEventController",void 0),Fe([v()],Ne.prototype,"eventResponsiveController",void 0),Fe([v()],Ne.prototype,"changeEventEmitter",void 0),Fe([v()],Ne.prototype,"eventClickEmitter",void 0),Fe([v()],Ne.prototype,"changeEventPrevent",void 0),Fe([v()],Ne.prototype,"timeFormatNotifySlimmer",void 0),Ne.style='.border-divider-top{border:1px solid rgba(var(--v-border-divider-secondary, 199, 217, 229, 1));border-left-width:0px;border-right-width:0px;border-bottom-width:0px}.border-divider-left{border:1px solid rgba(var(--v-border-divider-secondary, 199, 217, 229, 1));border-top-width:0px;border-right-width:0px;border-bottom-width:0px}.border-divider-right{border:1px solid rgba(var(--v-border-divider-secondary, 199, 217, 229, 1));border-top-width:0px;border-left-width:0px;border-bottom-width:0px}.border-divider-bottom{border:1px solid rgba(var(--v-border-divider-secondary, 199, 217, 229, 1));border-top-width:0px;border-left-width:0px;border-right-width:0px}:host{display:flex;flex-direction:column;border-radius:12px;border:1px solid rgba(var(--v-border-divider, 171, 198, 216, 1));background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));overflow:hidden;width:100%;height:100%;box-sizing:border-box;max-height:1966px}.calendar-switch-panel{padding:24px;border-bottom-width:1px;border-top-width:0px;border-left-width:0px;border-right-width:0px;border-style:solid;border-color:rgba(var(--v-border-color-divider, 171, 198, 216, 1));flex-shrink:0;width:100%;box-sizing:border-box}.calendar-switch-panel .calendar-date-switch-container{display:flex;gap:8px;align-items:center;flex-direction:row}.calendar-switch-panel .calendar-view-switch-container{display:flex;gap:16px;align-items:center;flex-direction:row}.calendar-switch-panel .calendar-current-date{padding-left:8px}.calendar-view{width:100%;position:relative;flex-grow:1;overflow-y:auto;overflow-x:hidden}.calendar-view-month .calendar-view-month-container{width:100%;display:grid;min-height:100%;grid-template-rows:43px repeat(6, minmax(64px, 1fr))}.calendar-view-month .calendar-view-title{background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));top:0;left:0;z-index:62}.calendar-view-month .calendar-view-title div{padding-top:12px;padding-bottom:12px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px;text-align:center}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-month .calendar-view-title div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-month .calendar-view-title div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-month .calendar-view-title div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}.calendar-view-month .calendar-view-row{position:relative;display:grid;grid-template-rows:1fr;grid-template-columns:repeat(7, minmax(64px, 1fr))}.calendar-view-month .calendar-view-row.calendar-view-title{position:sticky}.calendar-view-month .calendar-view-row:last-child{border-bottom-width:0px}.calendar-view-month .calendar-view-row .row-cell{overflow:hidden;display:flex;flex-direction:column;justify-content:space-between}.calendar-view-month .calendar-view-row .row-cell:last-child{border-right-width:0px}.calendar-view-month .calendar-view-row .row-cell .date{padding-top:4px;padding-bottom:4px;padding-right:12px;padding-left:8px}.calendar-view-month .calendar-view-row .row-cell .date>div{display:inline-block;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-month .calendar-view-row .row-cell .date>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-month .calendar-view-row .row-cell .date>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-month .calendar-view-row .row-cell .date>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}.calendar-view-month .calendar-view-row .row-cell .date .month-block{margin-right:2px}.calendar-view-month .calendar-view-row .row-cell .date .grid-col{text-align:center;border-top-left-radius:9999px;border-bottom-left-radius:9999px;border-top-right-radius:9999px;border-bottom-right-radius:9999px;cursor:pointer;width:18px;height:18px;line-height:18px}.calendar-view-month .calendar-view-row .row-cell .date .grid-col:hover{background-color:rgba(var(--v-bg-action-secondary-hover, 4, 112, 236, 0.1))}.calendar-view-month .calendar-view-row .row-cell .date .grid-col:active{background-color:rgba(var(--v-bg-action-secondary-active, 29, 65, 195, 0.1))}.calendar-view-month .calendar-view-row .row-cell .date .grid-col:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}.calendar-view-month .calendar-view-row .row-cell.current-month-day .date>div{color:rgba(var(--v-text-primary, 32, 54, 69, 1))}.calendar-view-month .calendar-view-row .row-cell.disabled{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1))}.calendar-view-month .calendar-view-row .row-cell.disabled .date>div{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}.calendar-view-month .calendar-view-row .row-cell.active .date .grid-col{background-color:rgba(var(--v-bg-action, 19, 98, 226, 1));border-top-left-radius:9999px;border-bottom-left-radius:9999px;color:rgba(var(--v-text-on-action, 252, 252, 252, 1))}.calendar-view-month .calendar-view-row .row-cell.active .date .grid-col:hover{background-color:rgba(var(--v-bg-action-hover, 4, 112, 236, 1))}.calendar-view-month .calendar-view-row .row-cell.active .date .grid-col:active{background-color:rgba(var(--v-bg-action-active, 29, 65, 195, 1))}.calendar-view-month .calendar-view-row .row-cell.active .date .grid-col:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}.calendar-view-container{width:100%}.calendar-view-container .calendar-view-title-container{background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));position:sticky;top:0;left:0;z-index:62}.calendar-view-container .calendar-view-row{box-sizing:border-box;width:100%;display:flex;flex-direction:row}.calendar-view-container .calendar-view-row .time-line,.calendar-view-container .calendar-view-row .time-line-empty,.calendar-view-container .calendar-view-row .time-line-all{width:72px;text-align:right;padding-right:8px;box-sizing:border-box;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));flex-shrink:0}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-container .calendar-view-row .time-line,.calendar-view-container .calendar-view-row .time-line-empty,.calendar-view-container .calendar-view-row .time-line-all{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-container .calendar-view-row .time-line,.calendar-view-container .calendar-view-row .time-line-empty,.calendar-view-container .calendar-view-row .time-line-all{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-container .calendar-view-row .time-line,.calendar-view-container .calendar-view-row .time-line-empty,.calendar-view-container .calendar-view-row .time-line-all{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}.calendar-view-container .calendar-view-title{width:100%}.calendar-view-container .calendar-view-title>div{padding:12px;padding-bottom:8px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px;text-align:center;display:flex;flex-direction:column;gap:8px}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-container .calendar-view-title>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-container .calendar-view-title>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-container .calendar-view-title>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}.calendar-view-container .calendar-view-title .week-day{cursor:pointer;color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:20px;font-weight:500;line-height:24px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-container .calendar-view-title .week-day{font-family:"Inter", sans-serif;font-size:20px;font-weight:500;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-container .calendar-view-title .week-day{font-family:"Inter", sans-serif;font-size:20px;font-weight:500;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-container .calendar-view-title .week-day{font-family:"Inter", sans-serif;font-size:20px;font-weight:500;line-height:24px;letter-spacing:0px}}.calendar-view-container .calendar-view-title .active div{color:rgba(var(--v-text-link, 19, 98, 226, 1))}.calendar-view-container .calendar-view-event-all-container{align-items:center}.calendar-view-container .calendar-view-event-all{display:grid;grid-template-rows:1fr;flex-grow:1;min-height:18px}.calendar-view-container .calendar-view-day-container .time-line{display:grid;grid-template-rows:16px repeat(24, minmax(74px, 1fr))}.calendar-view-container .calendar-view-day-container .time-line .time-text{margin-top:-9px}.calendar-view-container .calendar-view-day-container .calendar-view-content{width:100%}.calendar-view-container .calendar-view-day-container .calendar-view-content .grid-col{display:grid;grid-template-rows:16px repeat(24, minmax(74px, 1fr));grid-template-columns:minmax(64px, 1fr)}.calendar-view-container .calendar-view-day-container .calendar-view-content .grid-col>.border-divider-top:first-child{border-top-width:0px}.calendar-view-container .calendar-view-content-container{width:100%;position:relative}.calendar-view-week .calendar-view-container{min-height:100%}.calendar-view-week .calendar-view-container .calendar-view-title{display:grid;grid-template-rows:1fr;grid-template-columns:repeat(7, minmax(64px, 1fr))}.calendar-view-week .calendar-view-container .calendar-view-event-all{grid-template-columns:repeat(7, minmax(64px, 1fr))}.calendar-view-week .calendar-view-container .calendar-view-day-container .calendar-view-content{display:grid;grid-template-columns:repeat(7, minmax(64px, 1fr))}.calendar-view-week .time-marker-container .time-marker{display:grid;grid-template-columns:repeat(7, minmax(64px, 1fr))}.calendar-view-week .day-event-container{display:grid;grid-template-columns:repeat(7, minmax(64px, 1fr))}.calendar-view-day .calendar-view-container{min-height:100%}.time-marker-container{position:absolute;min-width:100%;left:0;top:16px;height:calc(100% - 16px);pointer-events:none}.time-marker-container.hidden{display:none}.time-marker-container .time-marker{position:absolute;height:2px;display:grid;min-width:100%;left:0;top:0;z-index:61}.time-marker-container .time-marker div{width:100%;height:2px;background-color:rgba(var(--v-bg-status-error, 255, 110, 139, 1));opacity:0.3}.time-marker-container .time-marker div.active{opacity:1;position:relative}.time-marker-container .time-marker div.active::before{content:"";display:block;border-top-left-radius:9999px;border-bottom-left-radius:9999px;border-top-right-radius:9999px;border-bottom-right-radius:9999px;position:absolute;width:8px;height:8px;background-color:rgba(var(--v-bg-status-error, 255, 110, 139, 1));top:-3px;left:-4px}.day-event-container{position:absolute;min-width:100%;left:0;top:16px;height:calc(100% - 16px);pointer-events:none}.day-event-container .day-event-col{height:100%;overflow:hidden}.day-event-container vega-calendar-event{pointer-events:auto;height:100%}.calendar-view-month .month-event-row{position:absolute;width:100%;overflow:hidden;height:calc(100% - 26px);left:0;bottom:0}.calendar-view-month .events-container{width:100%;box-sizing:border-box;overflow:hidden;padding:2px;display:flex;flex-direction:column;gap:2px;justify-content:space-between}.calendar-view-month .events-container .event-list{display:flex;flex-direction:column;gap:2px}.calendar-view-month .events-container .event-list .month-event-block{box-sizing:border-box;padding-left:2px;padding-right:3px}.calendar-view-month .events-container .month-event-more .more-button{display:inline-block;height:16px;font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px;color:rgba(var(--v-text-link, 19, 98, 226, 1));cursor:pointer;border-radius:2px}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-month .events-container .month-event-more .more-button{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-month .events-container .month-event-more .more-button{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-month .events-container .month-event-more .more-button{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}.calendar-view-month .events-container .month-event-more .more-button:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:0px}.calendar-view-container .calendar-view-event-all{position:relative}.calendar-view-container .calendar-view-event-all .placeholder-block{padding-top:2px;padding-bottom:2px;box-sizing:content-box}.calendar-view-container .calendar-view-event-all .placeholder-block span{display:none}.calendar-view-container .calendar-view-event-all .day-event-block{padding-top:2px;padding-right:2px;box-sizing:border-box;padding-left:3px}.calendar-view-container .day-event-col{position:relative}.calendar-view-container .day-event-col .time-event-block{box-sizing:border-box;padding-right:8px;padding-bottom:2px;padding-top:3px}.calendar-view-container .day-event-col .time-event-block vega-calendar-event.bg-shadow::part(event-container):not(:focus){outline:2px solid rgba(var(--v-bg-primary, 252, 252, 252, 1))}.calendar-view-container .day-event-col .time-event-block:focus-within{z-index:60 !important}';var Be=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class Ae extends l{getEventTitleContainerRef(){return this.eventTitleContainerRef}render(){return e(t,null,this.injectBackgroundColorStyle(),this.calendarEvent.isAllDayEvent||this.calendarEvent.isGroupEvent()?this.renderBackgroundModeEvent():this.renderNormalEvent())}renderBackgroundModeEvent(){const t=this.calendarEvent.disabled;return e("div",{role:"button",tabIndex:0,class:{"background-color-mode":!0,"event-bg-color":!t,"bg-disabled":t}},this.calendarEvent.title)}renderNormalEvent(){const{variant:t="primary",disabled:n,startTime:i,endTime:r,title:a}=this.calendarEvent,o={"event-container":!0,disabled:n,[t]:!0};if(!this.host.classList.contains("day-event"))return e("div",{role:"button",tabIndex:0,class:o},this.renderEventStatus(),e("div",{class:"event-title"},`${this.formatDisplayTime(i)} ${a}`));{const t=this.calendarEvent.getEventDuration();return e("div",{part:"event-container",class:Object.assign(Object.assign({},o),{vertical:t>30,"duration-half-an-hour":30===t,"event-bg-color":!n,"bg-disabled":n}),role:"button",tabIndex:0},this.renderEventStatus(),e("div",{class:"cover-block"}),e("div",{class:"event-content"},e("div",{class:{"event-title":!0,"title-word-wrap":t>30},ref:e=>this.eventTitleContainerRef=e},a),e("div",{class:"event-time"},e("vega-icon",{size:"size-12",icon:b.getIconKey("clock-three")}),e("span",null,`${this.formatDisplayTime(i)} - ${this.formatDisplayTime(r)}`))))}}renderEventStatus(){const t=this.calendarEvent.disabled;return e("div",{class:{"event-status":!0,"event-bg-color":!t,"bg-disabled":t}},e("span",{class:{stripe:"secondary"===this.calendarEvent.variant}}))}injectBackgroundColorStyle(){return e("style",null,this.colorController.getBackgroundColorStyle())}formatDisplayTime(e){const[t,n]=e.split(":");if("24-hour"===this.timeFormat)return`${t.padStart(2,"0")}:${n.padStart(2,"0")}`;{const e=Number(t),i=e>=12?"pm":"am",r=n.padStart(2,"0");return e>12?`${e-12}:${r} pm`:0===e?`12:${r} am`:`${e}:${r} ${i}`}}}b.register({"clock-three":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M464 256A208 208 0 1 1 48 256a208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM232 120V256c0 13.3 10.7 24 24 24H360c13.3 0 24-10.7 24-24s-10.7-24-24-24H280V120c0-13.3-10.7-24-24-24s-24 10.7-24 24z"/></svg>'}}),Be([d()],Ae.prototype,"host",void 0),Be([d()],Ae.prototype,"timeFormat",void 0),Be([d()],Ae.prototype,"calendarEvent",void 0),Be([d()],Ae.prototype,"colorController",void 0);class We extends l{getBackgroundColorStyle(){const e=this.calendarEvent.color||"bg-accent6-primary";return T(e)?`.event-bg-color{${V.formatToken(e)}}`:`.event-bg-color{background-color:${e}}`}}!function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);a>3&&o&&Object.defineProperty(t,n,o)}([d()],We.prototype,"calendarEvent",void 0);class He extends O{constructor(){super({parent:"vega-calendar",subStates:[{subStateName:"timeFormat",parentStateName:"timeFormat"}]})}}!function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);a>3&&o&&Object.defineProperty(t,n,o)}([d({writable:!0})],He.prototype,"timeFormat",void 0);class Ye extends l{setVerticalTitleMaxHeight(){const e=this.renderer.getEventTitleContainerRef();if(e&&e.classList.contains("title-word-wrap")){const t=window.getComputedStyle(e),n=$(t.height),i=$(t.lineHeight),r=Math.max(Math.floor(n/i),1);e.style.maxHeight=r*i+"px"}}}!function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);a>3&&o&&Object.defineProperty(t,n,o)}([d()],Ye.prototype,"renderer",void 0);var Ke=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};const Ue=class{constructor(e){i(this,e),this.globalSlimmer={},this.pageResizeObserverSlimmer=new E({target:()=>this.host,callback:()=>this.titleMaxHeightController.setVerticalTitleMaxHeight()}),this.vegaComponentUsageRuntimeMetricsSlimmer=new p,this.renderer=new Ae,this.colorController=new We,this.subStateController=new He,this.titleMaxHeightController=new Ye,this.timeFormat="24-hour"}render(){return s(e(a,null,this.calendarEvent?this.renderer.render():null),this.host)}get host(){return o(this)}};Ke([w()],Ue.prototype,"globalSlimmer",void 0),Ke([v()],Ue.prototype,"pageResizeObserverSlimmer",void 0),Ke([v()],Ue.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),Ke([v()],Ue.prototype,"renderer",void 0),Ke([v()],Ue.prototype,"colorController",void 0),Ke([v()],Ue.prototype,"subStateController",void 0),Ke([v()],Ue.prototype,"titleMaxHeightController",void 0),Ue.style='.bg-disabled{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1))}:host{display:block;box-sizing:border-box;width:100%}:host .background-color-mode{border-radius:2px;padding-left:8px;padding-right:8px;color:rgba(var(--v-text-black, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px;cursor:pointer;overflow:hidden;white-space:nowrap}@media screen and (min-width: 768px) and (max-width: 1023px){:host .background-color-mode{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .background-color-mode{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .background-color-mode{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}:host .event-container{display:block;width:100%;border-radius:4px;cursor:pointer;box-sizing:border-box;overflow:hidden}:host(.month-event) .event-container{padding-left:2px;padding-right:2px;display:flex;flex-direction:row;gap:4px;align-items:center;min-height:16px}:host(.month-event) .event-container .event-status{width:8px;height:8px;box-sizing:border-box;border-top-left-radius:9999px;border-bottom-left-radius:9999px;border-top-right-radius:9999px;border-bottom-right-radius:9999px;margin-left:2px;flex-shrink:0}:host(.month-event) .event-container .event-status span{display:none;width:100%;height:100%;border-top-left-radius:9999px;border-bottom-left-radius:9999px;border-top-right-radius:9999px;border-bottom-right-radius:9999px}:host(.month-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));flex-grow:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@media screen and (min-width: 768px) and (max-width: 1023px){:host(.month-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host(.month-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host(.month-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}:host(.month-event) .event-container.secondary .event-status span{display:block;background-size:4px 4px;opacity:0.8}:host(.month-event) .event-container.tertiary .event-status{padding:1px}:host(.month-event) .event-container.tertiary .event-status span{display:block;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1))}:host(.month-event) .event-container.disabled .event-status{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1))}:host(.month-event) .event-container:hover{background-color:rgba(var(--v-bg-action-secondary-hover, 4, 112, 236, 0.1))}:host(.month-event) .event-container:active{background-color:rgba(var(--v-bg-action-secondary-active, 29, 65, 195, 0.1))}:host(.month-event) .event-container:focus{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:0px}:host(.day-event) .event-container{padding-left:8px;padding-right:8px;position:relative}:host(.day-event) .event-container .event-status{position:absolute;width:4px;height:100%;left:0;top:0;z-index:1}:host(.day-event) .event-container .event-status span{display:none}:host(.day-event) .event-container .cover-block{position:absolute;height:100%;width:100%;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border-radius:4px;left:0;top:0;opacity:0.7}:host(.day-event) .event-container .event-content,:host(.day-event) .event-container .event-time{display:flex;flex-direction:row;align-items:center}:host(.day-event) .event-container .event-content{gap:8px;position:relative;height:100%;box-sizing:border-box}:host(.day-event) .event-container .event-time{gap:4px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}@media screen and (min-width: 768px) and (max-width: 1023px){:host(.day-event) .event-container .event-time{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host(.day-event) .event-container .event-time{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host(.day-event) .event-container .event-time{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}:host(.day-event) .event-container .event-time vega-icon{flex-shrink:0}:host(.day-event) .event-container .event-time span{white-space:nowrap}:host(.day-event) .event-container .event-title{color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){:host(.day-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host(.day-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host(.day-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}:host(.day-event) .event-container .event-title.title-word-wrap{overflow:hidden}:host(.day-event) .event-container .event-title:not(.title-word-wrap){white-space:nowrap}:host(.day-event) .event-container.duration-half-an-hour{padding-top:8px;padding-bottom:8px}:host(.day-event) .event-container.vertical{height:100%}:host(.day-event) .event-container.vertical .event-content{flex-direction:column;align-items:flex-start;gap:4px;padding-top:8px;padding-bottom:8px}:host(.day-event) .event-container.secondary .event-status span,:host(.day-event) .event-container.tertiary .event-status span{display:block;position:absolute;border-top-left-radius:4px;border-bottom-left-radius:4px}:host(.day-event) .event-container.secondary .cover-block,:host(.day-event) .event-container.tertiary .cover-block{width:calc(100% - 2px);height:calc(100% - 2px);top:1px;left:1px}:host(.day-event) .event-container.secondary .event-status span{width:100%;height:100%;top:0px;left:0px;background-size:4px 4px;opacity:0.8}:host(.day-event) .event-container.secondary .cover-block{opacity:0.9}:host(.day-event) .event-container.tertiary .event-status span{background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));width:2px;height:calc(100% - 2px);top:1px;left:1px}:host(.day-event) .event-container.tertiary .cover-block{opacity:1}:host(.day-event) .event-container.disabled{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1))}:host(.day-event) .event-container.disabled .event-status{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1))}:host(.day-event) .event-container:focus{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:0px}:host(.month-event.calendar-event-large-size) .background-color-mode{border-radius:4px;padding-top:4px;padding-bottom:4px}:host(.month-event.calendar-event-large-size) .event-container{padding-top:4px;padding-bottom:4px}.stripe{background-image:linear-gradient(-45deg, transparent 25%, rgba(var(--v-bg-primary, 252, 252, 252, 1)) 25% 50%, transparent 50% 75%, rgba(var(--v-bg-primary, 252, 252, 252, 1)) 75% 100%)}';export{Ne as vega_calendar,Ue as vega_calendar_event}
1
+ import{h as e,F as t,f as n,r as i,c as r,H as a,g as o}from"./p-9777b1c1.js";import{s}from"./p-b81bd0bb.js";import{a as d,V as l,M as c,L as h,I as v}from"./p-018d77cc.js";import{V as p,I as w}from"./p-5cad29f5.js";import{D as m,d as f}from"./p-0fd9f03f.js";import{a as u,d as g,e as x}from"./p-f1d8fd1c.js";import{V as b}from"./p-4e5c06ae.js";import{p as y}from"./p-21c9f2c5.js";import{c as k}from"./p-16608c5a.js";import{C as R}from"./p-a9d3ea86.js";import{f as j}from"./p-c47d4933.js";import{c as C}from"./p-86194314.js";import{g as z}from"./p-469bc36e.js";import{P as E}from"./p-cb13b4e6.js";import{d as I}from"./p-1bc5b3bc.js";import{C as D}from"./p-bf95b189.js";import{c as M,S as O}from"./p-a9c3e9fd.js";import{p as T}from"./p-1265732f.js";import{s as V}from"./p-6bdc4407.js";import{b as $}from"./p-0c667d6a.js";import"./p-9d426517.js";import"./p-d3f1d3dd.js";import"./p-aae8855d.js";import"./p-3542f8fe.js";import"./p-3c8b2105.js";import"./p-320642bd.js";import"./p-3a0a4d15.js";import"./p-c59042c0.js";var P=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class L extends l{render(){return e(t,null,this.switchPanelRenderer.render(),this.viewRenderer.render())}}P([d()],L.prototype,"switchPanelRenderer",void 0),P([d()],L.prototype,"viewRenderer",void 0);function S(e,t=!1){return e.toLocaleDateString("en-US",{month:t?"short":"long"})}function F(e,t=15){const[n,i]=e.split(":");return Math.round((60*Number(n)+Number(i))/t)}var N=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class B extends l{constructor(){super(...arguments),this.handleViewChange=e=>{this.calendarViewController.setViewMode(e.detail)},this.todayButtonClick=()=>{this.currentPeriodController.setCurrentPeriod(this.currentPeriod.now())},this.nextButtonClick=()=>{this.currentPeriodController.setCurrentPeriod(this.currentPeriod.next())},this.prevButtonClick=()=>{this.currentPeriodController.setCurrentPeriod(this.currentPeriod.previous())}}getSwitchPanelRef(){return this.switchPanelRef}render(){return e("vega-flex",{direction:"row",gap:"size-16",justifyContent:"space-between",alignItems:"center",class:"calendar-switch-panel",ref:e=>this.switchPanelRef=e},this.renderDateSwitch(),e("div",{class:"calendar-view-switch-container"},this.renderViewSwitch()))}renderDateSwitch(){return e("div",{class:"calendar-date-switch-container"},e("vega-button",{variant:"secondary",size:"small",ref:e=>{m.addUniqueObserverToNode(e,u,this.todayButtonClick)}},"Today"),e("vega-button-circle",{variant:"secondary",size:"small",icon:b.getIconKey("chevron-left"),label:"previous",showTooltip:!1,ref:e=>{m.addUniqueObserverToNode(e,u,this.prevButtonClick)}}),e("vega-button-circle",{variant:"secondary",size:"small",icon:b.getIconKey("chevron-right"),label:"next",showTooltip:!1,ref:e=>{m.addUniqueObserverToNode(e,u,this.nextButtonClick)}}),this.renderCurrentPeriod())}renderCurrentPeriod(){return e("vega-font",{class:"calendar-current-date",variant:"font-field-label",color:"text-primary"},this.getViewDateSummary())}renderViewSwitch(){return e("vega-segment-control",{segments:B.views,size:"small",variant:"text-only",selected:this.viewMode,ref:e=>{m.addUniqueObserverToNode(e,g,this.handleViewChange)}})}getViewDateSummary(){const e=this.currentPeriod.current;let t="";switch(this.viewMode){case"day":t=`${e.date} ${S(e.toDate())}, ${e.year}`;break;case"week":{const e=this.currentPeriod.startDate,n=this.currentPeriod.endDate;t=`${e.date} ${S(e.toDate())}${e.year===n.year?"":", "+e.year} - ${n.date} ${S(n.toDate())}, ${n.year}`;break}case"month":t=`${S(e.toDate())}, ${e.year}`}return t}}b.register({"chevron-right":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"/></svg>'},"chevron-left":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z"/></svg>'}}),B.views=[{text:"Day",key:"day"},{text:"Week",key:"week"},{text:"Month",key:"month"}],N([d()],B.prototype,"viewMode",void 0),N([d()],B.prototype,"calendarView",void 0),N([d()],B.prototype,"currentPeriod",void 0),N([d()],B.prototype,"currentPeriodController",void 0),N([d()],B.prototype,"calendarViewController",void 0);var A=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class W extends l{render(){return e("div",{class:`calendar-view calendar-view-${this.viewMode}`},"month"===this.viewMode?this.monthViewRenderer.render():this.viewWithTimeRenderer.render())}}A([d()],W.prototype,"viewMode",void 0),A([d()],W.prototype,"monthViewRenderer",void 0),A([d()],W.prototype,"viewWithTimeRenderer",void 0);var H=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class Y extends l{render(){return e("div",{class:"calendar-view-month-container"},e("div",{class:"calendar-view-row calendar-view-title border-divider-bottom"},this.calendarView.weekdays.map((t=>e("div",{key:t},t)))),this.renderMonthViewContent())}renderMonthViewContent(){const t=this.currentPeriod.current;return this.calendarView.dateItems.map(((n,i)=>{const r=this.monthEventRenderer.getCurrentRowEvents(n),a=this.monthEventRenderer.filterRowDisplayEvents(r);return e("div",{key:i,class:"calendar-view-row border-divider-bottom"},n.map(((n,i)=>e("div",{class:{"row-cell border-divider-right":!0,"current-month-day":n.compare(t).inMonth,active:n.isToday(),disabled:!1},key:`${n.month}-${n.date}`},this.renderDateBlock(n),this.monthEventRenderer.render(n,r[i],a[i],i)))))}))}renderDateBlock(t){return e("div",{class:"date"},1===t.date&&e("div",{class:"month-block"},S(t.toDate(),!0)),e("div",{role:"button",tabIndex:0,class:"grid-col"},t.date))}}H([d()],Y.prototype,"viewMode",void 0),H([d()],Y.prototype,"calendarView",void 0),H([d()],Y.prototype,"currentPeriod",void 0),H([d()],Y.prototype,"calendarViewController",void 0),H([d()],Y.prototype,"monthEventRenderer",void 0);var K=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class U extends l{render(){return e("div",{class:"calendar-view-container"},this.renderViewTitle(),this.renderViewContent())}renderViewTitle(){const t=this.calendarView.dateItems[0],n=this.calendarView.weekdays;return e("div",{class:"calendar-view-title-container"},e("div",{class:"calendar-view-row"},e("div",{class:"time-line-empty"}),e("div",{class:"calendar-view-title"},t.map(((t,i)=>e("div",{key:t.date,class:{active:t.isToday()}},e("div",null,n[i]),e("div",{class:"week-day"},t.date)))))),e("div",{class:"calendar-view-row calendar-view-event-all-container border-divider-bottom"},e("div",{class:"time-line-all"},"All Day"),this.dayViewFullDayEventRenderer.render()))}renderViewContent(){const t=this.calendarView.dateItems[0];return e("div",{class:"calendar-view-row calendar-view-day-container"},this.timeLineRenderer.render(),e("div",{class:"calendar-view-content-container"},e("div",{class:"calendar-view-content"},t.map((t=>e("div",{class:"grid-col border-divider-left",key:t.date},e("div",{class:"hour-empty border-divider-top"}),this.renderHourBlock())))),this.dayViewTimedEventRenderer.render(),this.timeLineRenderer.renderTimeMarker(t)))}renderHourBlock(){return Array(24).fill("").map((()=>e("div",{class:"grid-cell border-divider-top"})))}}K([d()],U.prototype,"viewMode",void 0),K([d()],U.prototype,"timeLineRenderer",void 0),K([d()],U.prototype,"dayViewTimedEventRenderer",void 0),K([d()],U.prototype,"dayViewFullDayEventRenderer",void 0),K([d()],U.prototype,"calendarView",void 0),K([d()],U.prototype,"calendarViewController",void 0);var _=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class q extends l{renderTimeMarker(t){const n=t.findIndex((e=>e.isToday()))>=0;return e("div",{class:{"time-marker-container":!0,hidden:!n}},e("div",{class:"time-marker",style:{top:this.getTimeMarkerPosition()},ref:e=>this.timeMarkerRef=e},t.map((t=>e("div",{key:t.date,class:{active:t.isToday()}})))))}render(){const t=this.getTimeLineTitles();return e("div",{class:"time-line",ref:e=>this.timeLineRef=e},e("div",{class:"hour-empty"}),t.map(((t,n)=>e("div",{key:t},e("div",{class:"time-text","data-time":0===n?24:n},t)))))}updateTimeLine(e){this.scrollToTargetTimeBlock(e),this.syncTimeMarkerPosition(e)}clearTimer(){clearInterval(this.timeMarkerPositionTimer)}updateTimeLineIfComponentAddBack(){this.syncTimeMarkerPosition(this.viewMode)}getTimeMarkerPosition(){const e=new Date;return(60*e.getHours()+e.getMinutes())/1440*100+"%"}getTimeLineTitles(){const e=[];if("12-hour"===this.timeFormat){e.push("12 AM");for(let t=1;t<12;t++)e.push(`${t} AM`);e.push("12 PM");for(let t=1;t<12;t++)e.push(`${t} PM`)}else for(let t=0;t<24;t++)e.push(y(t));return e}syncTimeMarkerPosition(e){clearInterval(this.timeMarkerPositionTimer),"month"!==e&&(this.timeMarkerPositionTimer=setInterval((()=>{this.timeMarkerRef&&(this.timeMarkerRef.style.top=this.getTimeMarkerPosition())}),6e4))}scrollToTargetTimeBlock(e){"month"!==e&&setTimeout((()=>{var e,t;const n=(new Date).getHours();null===(t=null===(e=this.timeLineRef)||void 0===e?void 0:e.querySelector(`[data-time='${n<23?n+1:n}']`))||void 0===t||t.scrollIntoView({block:"end"})}),0)}}_([d()],q.prototype,"timeFormat",void 0),_([d()],q.prototype,"viewMode",void 0),_([c("watchViewModeChange")],q.prototype,"updateTimeLine",null),_([c("disconnectedCallback")],q.prototype,"clearTimer",null),_([c("connectedCallback")],q.prototype,"updateTimeLineIfComponentAddBack",null);const G=(e=0)=>{const t=[0,1,2,3,4,5,6];return t.concat(t).slice(e,e+7)};class J{constructor(){this.WEEKDAYS_SHORT=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],this.weekdays=G()}getWeekdayNames(){return this.WEEKDAYS_SHORT}generateDates(e){const t=e.startDate.toDate(),n=[];for(let i=0;i<e.count;i++)n.push(new Date(t)),t.setDate(t.getDate()+1);return n}generateWeekHead(){return this.weekdays.map((e=>this.getWeekdayNames()[e]))}}class Q{constructor(e,t){this._weekdays=e,this._dateItems=t}get weekdays(){return this._weekdays}get dateItems(){return this._dateItems}}class X extends J{generate(e){return new Q([this.generateWeekHead()[e.current.toDate().getDay()]],[[e.current]])}}class Z{constructor(e,t,n){this._date=n,this._month=t,this._year=e}static from(e){return new Z(e.getFullYear(),e.getMonth()+1,e.getDate())}get year(){return this._year}set year(e){this._year=e}get month(){return this._month}set month(e){this._month=e}get date(){return this._date}set date(e){this._date=e}isToday(){const e=new Date;return e.getFullYear()===this.year&&e.getMonth()+1===this.month&&e.getDate()===this.date}toDate(){return new Date(this.year,this.month-1,this.date)}compare(e){const{year:t,month:n}=e,i={isPreviousMonth:!1,inMonth:!1,isNextMonth:!1};return this.year===t?this.month<n?i.isPreviousMonth=!0:this.month>n?i.isNextMonth=!0:i.inMonth=!0:this.year>t?i.isNextMonth=!0:i.isPreviousMonth=!0,i}}class ee extends J{generate(e){const t=this.generateDates(e);return new Q(this.generateWeekHead(),[t.map(Z.from)])}}class te extends J{generate(e){const t=[];let n=[];return this.generateDates(e).forEach(((e,i)=>{i%7||(t[i/7]=n=[]);const r=Z.from(e);n.push(r)})),new Q(this.generateWeekHead(),t)}}class ne{constructor(e,t){this._count=e,this._current=t||Z.from(new Date),this.calculatePeriod(this._current)}get current(){return this._current}get startDate(){return this._startDate}get endDate(){return this._endDate}get count(){return this._count}goTo(e){return this.createBy(e)}now(){return this.createBy(Z.from(new Date))}calculatePeriod(e){const t=e.toDate();this.count>1&&t.setDate(t.getDate()-G().indexOf(t.getDay())),this._startDate=Z.from(t),t.setDate(t.getDate()+this.count-1),this._endDate=Z.from(t)}}class ie extends ne{constructor(e){super(ie.DISPLAY_DATE_COUNT,e)}next(){const e=this.current.toDate();return e.setDate(e.getDate()+1),this.createBy(Z.from(e))}previous(){const e=this.current.toDate();return e.setDate(e.getDate()-1),this.createBy(Z.from(e))}createBy(e){return new ie(e)}}ie.DISPLAY_DATE_COUNT=1;class re extends ne{constructor(e){super(re.DISPLAY_DATE_COUNT,e)}next(){const e=this.current.toDate();return e.setDate(e.getDate()-G().indexOf(e.getDay())+7),this.createBy(Z.from(e))}previous(){const e=this.current.toDate();return e.setDate(e.getDate()-G().indexOf(e.getDay())-7),this.createBy(Z.from(e))}createBy(e){return new re(e)}}re.DISPLAY_DATE_COUNT=7;class ae extends ne{constructor(e){const t=e||Z.from(new Date),n=new Z(t.year,t.month,1);super(ae.DISPLAY_DATE_COUNT,n)}next(){const e=this.current.toDate();return e.setMonth(e.getMonth()+1),this.createBy(Z.from(e))}previous(){const e=this.current.toDate();return e.setMonth(e.getMonth()-1),this.createBy(Z.from(e))}createBy(e){return new ae(e)}}ae.DISPLAY_DATE_COUNT=42;var oe=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class se extends l{constructor(){super(...arguments),this.monthViewGenerator=new te,this.weekViewGenerator=new ee,this.dayViewGenerator=new X}setViewMode(e){this.viewMode=e}initialCalendarView(){this.setCalendarView(this.getCalendarViewByViewMode())}generateCalendarView(){this.setCalendarView(this.getCalendarViewByViewMode())}getCalendarViewByViewMode(){switch(this.viewMode){case"week":return this.weekViewGenerator.generate(this.currentPeriod);case"day":return this.dayViewGenerator.generate(this.currentPeriod);default:return this.monthViewGenerator.generate(this.currentPeriod)}}setCalendarView(e){this.calendarView=e}}oe([d({writable:!0})],se.prototype,"calendarView",void 0),oe([d({writable:!0})],se.prototype,"viewMode",void 0),oe([d()],se.prototype,"currentPeriod",void 0),oe([d()],se.prototype,"currentPeriodController",void 0),oe([c("componentWillLoad")],se.prototype,"initialCalendarView",null),oe([c("watchCurrentPeriodChange")],se.prototype,"generateCalendarView",null);var de=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class le extends l{setCurrentPeriod(e){this.currentPeriod=e}initialCurrentPeriod(){this.initCalendarPeriod(this.viewMode,Z.from(new Date))}emitChangeEvent(){this.changeEventEmitter.emit({viewMode:this.viewMode,currentPeriod:this.getCurrentPeriodSummary()})}updateCurrentPeriodByViewMode(e){this.initCalendarPeriod(e,this.currentPeriod.current)}getCurrentPeriodSummary(){const{current:e,startDate:t,endDate:n}=this.currentPeriod;return{year:e.year,month:e.month,startDate:{date:t.date,month:t.month,year:t.year},endDate:{date:n.date,month:n.month,year:n.year}}}initCalendarPeriod(e,t){switch(e){case"month":this.setCurrentPeriod(new ae(t));break;case"week":this.setCurrentPeriod(new re(t));break;case"day":this.setCurrentPeriod(new ie(t))}}}de([d({writable:!0})],le.prototype,"currentPeriod",void 0),de([d()],le.prototype,"changeEventEmitter",void 0),de([d()],le.prototype,"viewMode",void 0),de([c("componentWillLoad")],le.prototype,"initialCurrentPeriod",null),de([c("watchCurrentPeriodChange")],le.prototype,"emitChangeEvent",null),de([c("watchViewModeChange")],le.prototype,"updateCurrentPeriodByViewMode",null);var ce=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class he extends l{constructor(){super(...arguments),this.maxMonthDisplayEventsCount=2}getCurrentRowEvents(e){const t=[];return e.forEach((e=>{const n=this.calendarEventController.getCurrentDateEvents(e);t.push(n)})),this.fullDayEventLayoutRenderer.sortLongEvents(t)}filterRowDisplayEvents(e){const t=[];return e.forEach((e=>{const n=e.length>this.maxMonthDisplayEventsCount?e.slice(0,this.maxMonthDisplayEventsCount-1):e;t.push(n)})),this.hideTheCutOffEvents(e,t)}getMonthEventContainerRef(){return this.eventContainerRef}render(t,n,i,r){const a=n.slice(i.length).filter((e=>e)).length;return e("div",{class:"events-container",ref:e=>this.eventContainerRef=e},e("div",{class:"event-list"},this.fullDayEventLayoutRenderer.render(i,r)),this.renderMoreButton(n,a,`${t.date} ${S(t.toDate())} ${t.year}`))}addMaxDisplayCountChange(){m.addUniqueObserverToNode(this.host,j,(e=>{this.maxMonthDisplayEventsCount=e.detail,"month"===this.viewMode&&n(this.host)}))}renderMoreButton(t,n,i){if(n){const r=t.filter((e=>e&&(e.isAllDayEvent||e.isGroupEvent()))),a=t.filter((e=>e&&!e.isAllDayEvent&&!e.isGroupEvent()));return e("div",{class:"month-event-more"},e("vega-popover",{trigger:"click",placement:"right"},e("div",{tabIndex:0,slot:"popover-content",role:"button",class:"more-button",onKeyDown:C()},`${n} More`),e("vega-flex",{slot:"popover",direction:"col",gap:"0"},e("vega-font",{textAlign:"center",variant:"font-field-label",color:"text-primary",style:{padding:"4px 0",marginBottom:"8px"}},i),e("vega-flex",{direction:"col",gap:"size-4",style:{paddingBottom:a.length?"4px":"0px"}},r.map((e=>this.eventItemRenderer.render(e,{"month-event":!0,"calendar-event-large-size":!0})))),a.map((e=>this.eventItemRenderer.render(e,{"month-event":!0,"calendar-event-large-size":!0}))))))}}hideTheCutOffEvents(e,t){const n=[],i=[],r=t.map((e=>e[e.length-1])).filter((e=>e&&e.isGroupEvent()));return r.length&&r.forEach((n=>{e.filter((e=>e.includes(n))).length>t.filter((e=>e.includes(n))).length&&i.push(n)})),i.length?(t.forEach((e=>{e.length&&i.includes(e[e.length-1])?n.push(e.slice(0,e.length-1)):n.push(e)})),n):t}}ce([d()],he.prototype,"viewMode",void 0),ce([d()],he.prototype,"host",void 0),ce([d()],he.prototype,"calendarEventController",void 0),ce([d()],he.prototype,"eventItemRenderer",void 0),ce([d()],he.prototype,"fullDayEventLayoutRenderer",void 0),ce([c("componentWillLoad")],he.prototype,"addMaxDisplayCountChange",null);const ve=/^\d{1,2}\/\d{1,2}\/\d{4}/,pe=/^\d{1,2}:\d{1,2}/;class we{constructor(e){this._event=e,this._eventKey=z(),this.checkEventRequireField(e),this.initDate(e)}get event(){return this._event}get eventKey(){return this._eventKey}get title(){return this._event.title}get disabled(){return!!this._event.disabled}get variant(){return this._event.variant}get color(){return this._event.color}get isAllDayEvent(){return!!this._event.isAllDay}get isRepeatEvent(){return"none"!==this._event.repeat}get startDate(){return this._startDate}get endDate(){return this._endDate}get startTime(){return this._startTime}get endTime(){return this._endTime}isGroupEvent(){const{year:e,month:t,date:n}=Z.from(this.startDate),{year:i,month:r,date:a}=Z.from(this.endDate);return!(e===i&&t===r&&n===a)&&"daily"!==this._event.repeat}isCurrentDayEvent(e){const{startDate:t,endDate:n}=this,i=Z.from(t),r=Z.from(new Date(n.getFullYear(),n.getMonth(),n.getDate()+1)),a=this._event.repeat,o=e.toDate();if(i.toDate()<=o)switch(a){case"daily":return!0;case"weekly":return o.getDay()===t.getDay();case"monthly":return e.date===i.date;case"yearly":return e.month===i.month&&e.date===i.date;default:return r.toDate()>o}return!1}getEventDuration(){const[e,t]=this.startTime.split(":"),[n,i]=this.endTime.split(":"),r=Z.from(new Date),a=new Date(r.year,r.month,r.date,Number(e),Number(t));return(new Date(r.year,r.month,r.date,0===Number(n)&&0!==Number(e)?24:Number(n),Number(i)).valueOf()-a.valueOf())/6e4}convertTimeTo24Hour(e){if((e=e.toLocaleLowerCase()).indexOf("am")>0||e.indexOf("pm")>0){if(e.indexOf("am")>0){e=e.replace("am","").trim();const[t,n]=e.split(":");return`${"12"===t?"00":t}:${n}`}{e=e.replace("pm","").trim();const[t,n]=e.split(":");return`${"12"===t?"12":Number(t)+12}:${n}`}}return e}checkEventRequireField(e){const{title:t,startDate:n,endDate:i,startTime:r,endTime:a}=e;if(n&&"string"==typeof n&&!ve.test(n)||i&&"string"==typeof i&&!ve.test(i))throw new Error("Invalid calendar event item, the date format should be MM/DD/YYYY!");if(r&&"string"==typeof r&&!pe.test(r)||a&&"string"==typeof a&&!pe.test(a))throw new Error("Invalid calendar event item, the time format should be HH:mm!");if(!t||!n||!i&&!a)throw new Error("Invalid calendar event item, the required field should not empty!")}initDate(e){const{startDate:t,startTime:n,endDate:i,endTime:r}=e;if(t&&"object"==typeof t)this._startDate=t;else if(t&&"string"==typeof t){const[e,n,i]=t.split("/");this._startDate=new Date(Number(i),Number(e)-1,Number(n))}if(this._startTime=n?this.convertTimeTo24Hour(n):`${this._startDate.getHours()}:${this._startDate.getMinutes()}`,i&&"object"==typeof i)this._endDate=i;else if(i&&"string"==typeof i){const[e,t,n]=i.split("/");this._endDate=new Date(Number(n),Number(e)-1,Number(t),23,59,59)}else this._endDate=new Date(this._startDate.getFullYear(),this._startDate.getMonth(),this._startDate.getDate(),23,59,59);this._endTime=r?this.convertTimeTo24Hour(r):`${this._endDate.getHours()}:${this._endDate.getMinutes()}`}}var me=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class fe extends l{getCurrentDateEvents(e){return this.calendarEvents.filter((t=>t.isCurrentDayEvent(e)))}updateAfterEventChange(e){this.initCalendarEvents(e)}updateWhenComponentWillLoad(){this.initCalendarEvents(this.events)}initCalendarEvents(e){const t=[];e&&e.forEach((e=>{try{const n=new we(e);t.push(n)}catch(t){h.warn("Invalid calendar event item:",e)}})),this.calendarEvents=t}}me([d({writable:!0})],fe.prototype,"calendarEvents",void 0),me([d()],fe.prototype,"events",void 0),me([c("watchEventsChange")],fe.prototype,"updateAfterEventChange",null),me([c("componentWillLoad")],fe.prototype,"updateWhenComponentWillLoad",null);var ue=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class ge extends l{render(t,n){return e("vega-calendar-event",{key:t.eventKey,calendarEvent:t,class:n,onKeyDown:C(),onClick:()=>this.handleEventClick(t)})}handleEventClick(e){this.eventClickEmitter.emit({rawEvent:e.event})}}ge.backgroundColorModeEventHeight=18,ue([d()],ge.prototype,"calendarView",void 0),ue([d()],ge.prototype,"eventClickEmitter",void 0);var xe=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class be extends E{constructor(){super({target:()=>this.host,callback:()=>this.updateMaxDisplayCountWithDebounce()}),this.updateMaxDisplayCountWithDebounce=I(this.updateMaxDisplayCount,500,this)}updateMaxDisplayCount(){try{const e=this.monthEventRenderer.getMonthEventContainerRef();if("month"===this.viewMode&&e){const t=e.parentElement.getBoundingClientRect().height,n=Math.floor((t-be.monthDateTitleHeight)/ge.backgroundColorModeEventHeight);D.notify(f.getSubject(this.host,j),{host:this.host,detail:n})}}catch(e){}}updateMaxDisplayCountAfterSwitchToMonthView(e){"month"===e&&this.updateMaxDisplayCountWithDebounce()}}be.monthDateTitleHeight=26,xe([d()],be.prototype,"host",void 0),xe([d()],be.prototype,"monthEventRenderer",void 0),xe([d()],be.prototype,"viewMode",void 0),xe([c("componentDidLoad")],be.prototype,"updateMaxDisplayCount",null),xe([c("watchViewModeChange")],be.prototype,"updateMaxDisplayCountAfterSwitchToMonthView",null);var ye=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class ke extends l{render(){const t=this.calendarView.dateItems[0],n=t.map((e=>this.calendarEventController.getCurrentDateEvents(e).filter((e=>e.isAllDayEvent||e.isGroupEvent())))),i=this.fullDayEventLayoutRenderer.sortLongEvents(n);return e("div",{class:"calendar-view-event-all"},t.map(((t,n)=>e("div",{class:"event-all-col border-divider-left",key:t.date},this.renderCurrentFullDayEvents(i[n],n)))))}renderCurrentFullDayEvents(n,i){return e(t,null,e("div",{class:"placeholder-block",style:{height:n.length*ge.backgroundColorModeEventHeight-2+"px"}},e("span",null,n.length," events")),this.fullDayEventLayoutRenderer.render(n,i))}}ye([d()],ke.prototype,"calendarView",void 0),ye([d()],ke.prototype,"calendarEventController",void 0),ye([d()],ke.prototype,"eventItemRenderer",void 0),ye([d()],ke.prototype,"fullDayEventLayoutRenderer",void 0);class Re extends l{render(t){const n=[];return t.eventLayoutCells.forEach(((i,r)=>{let a=i.getEventBySlotIndex(0),o=0;for(let s=0;s<Re.totalNumberOfCells;s++){const d=i.getEventBySlotIndex(s);d!==a&&(a&&n.push(e("div",{key:r,class:"time-event-block",style:this.getTimeEventStyle(o,s,r,t.getEventColumnsSpannedCount(a))},this.eventItemRenderer.render(a,{"day-event":!0,"bg-shadow":r>0}))),a=d,o=s)}})),n}getTimeEventStyle(e,t,n,i){const r=n*(1/i);return{position:"absolute",left:100*r+"%",top:100/Re.totalNumberOfCells*e+"%",width:`calc(100% - ${100*r}%)`,height:100/Re.totalNumberOfCells*(t-e)+"%",zIndex:n>0?`${n}`:null}}}Re.totalNumberOfCells=96,function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);a>3&&o&&Object.defineProperty(t,n,o)}([d()],Re.prototype,"eventItemRenderer",void 0);class je{addCurrentEventToLayout(e,t){let n=e.find((e=>!e.hasOverlapEvent(t)));n?n.updateSlots(t):(n=this.createNewLayoutCell(),n.updateSlots(t),e.push(n))}}class Ce{get eventLayoutCells(){return this.cells}}class ze extends Ce{constructor(e){super(),this.cells=e}getEventColumnsSpannedCount(e){const t=this.cells.findIndex((t=>t.getEventStartIndex(e)>=0));let n=t+1;return t<this.cells.length-1&&this.cells.slice(t+1).forEach((t=>{t.hasOverlapEvent(e)&&n++})),n}}class Ee{getEventBySlotIndex(e){return this.slots[e]}getEventStartIndex(e){return this.slots.findIndex((t=>t===e))}getEventEndIndex(e){const t=this.getEventStartIndex(e);let n=t;if(t>=0)for(let i=t+1;i<this.slots.length;i++){if(this.slots[i]!==e){n=i-1;break}i===this.slots.length-1&&(n=i)}return n}}class Ie extends Ee{constructor(){super(...arguments),this.slots=Ie.defaultSlots}hasOverlapEvent(e){const[t,n]=this.getIndexRangeFromEvent(e);let i=!1;for(let e=t;e<n;e++)if(this.slots[e]){i=!0;break}return i}updateSlots(e){const[t,n]=this.getIndexRangeFromEvent(e);n>t&&(this.slots=this.slots.slice(0,t).concat(Array(n-t).fill(e),this.slots.slice(n)))}getIndexRangeFromEvent(e){const{startTime:t,endTime:n}=e;return[F(t),F(n)]}}Ie.defaultSlots=Array(96).fill(null);class De extends je{generate(e){const t=[new Ie];return e.forEach((e=>{this.addCurrentEventToLayout(t,e)})),new ze(t)}createNewLayoutCell(){return new Ie}}class Me{sort(e,t,n){const i=[],r=[],a=[];for(let t=0;t<e.length;t++){const n=e[t];n&&(n.isGroupEvent()?r.push(n):n.isAllDayEvent?i.push(n):a.push(n))}let o=i.concat(this.sortCalendarEventByTime(a)),s=n.getEventsByIndex(t);const d=s.filter((e=>e));if(o=r.filter((e=>d.findIndex((t=>t===e))<0)).concat(o),s.length>d.length){const e=o.slice(0,s.length-d.length);o=o.slice(s.length-d.length),s=this.insertEventsToEmptyPosition(s,e)}return o=s.concat(o),o}sortCalendarEventByTime(e){return e.sort(((e,t)=>{const n=F(e.startTime),i=F(t.startTime);return n===i?F(t.endTime)-F(e.endTime):n-i}))}insertEventsToEmptyPosition(e,t){return e.map((e=>{if(t.length&&!e){const e=t[0];return t=t.slice(1),e}return e}))}}var Oe=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class Te extends l{constructor(){super(...arguments),this.calendarEventSorter=new Me,this.dayViewTimedEventLayoutGenerator=new De}render(){return e("div",{class:"day-event-container"},this.calendarView.dateItems[0].map((t=>e("div",{key:`${t.month}-${t.date}`,class:"day-event-col"},this.renderTimedEvents(t)))))}renderTimedEvents(e){const t=this.calendarEventController.getCurrentDateEvents(e).filter((e=>!e.isAllDayEvent&&!e.isGroupEvent())),n=this.calendarEventSorter.sortCalendarEventByTime(t),i=this.dayViewTimedEventLayoutGenerator.generate(n);return this.dayViewEventLayoutRenderer.render(i)}}Oe([d()],Te.prototype,"calendarView",void 0),Oe([d()],Te.prototype,"calendarEventController",void 0),Oe([d()],Te.prototype,"dayViewEventLayoutRenderer",void 0);class Ve extends Ce{constructor(e){super(),this.cells=e}getEventRowsIndex(e){return this.cells.findIndex((t=>t.getEventStartIndex(e)>=0))}getEventsByIndex(e){const t=[];let n=0;return this.cells.forEach(((i,r)=>{const a=i.getEventBySlotIndex(e);t.push(a),a&&(n=r)})),t.slice(0,n+1)}}class $e extends Ee{constructor(){super(...arguments),this.slots=$e.defaultSlots}updateSlots(e){const{start:t,end:n}=e;this.slots=this.slots.slice(0,t).concat(Array(n-t+1).fill(e.event),this.slots.slice(n+1))}hasOverlapEvent(e){const{start:t,end:n}=e;let i=!1;for(let e=t;e<n+1;e++)if(this.slots[e]){i=!0;break}return i}}$e.defaultSlots=Array(7).fill(null);class Pe extends je{generate(e){const t=this.collectAllShouldOrderLongEvents(e),n=[new $e];return t.forEach((e=>{this.addCurrentEventToLayout(n,e)})),new Ve(n)}createNewLayoutCell(){return new $e}collectAllShouldOrderLongEvents(e){const t={};e.forEach(((e,n)=>{e.filter((e=>e&&e.isGroupEvent())).forEach((e=>{t[e.eventKey]=t[e.eventKey]?Object.assign(Object.assign({},t[e.eventKey]),{end:n,start:n-t[e.eventKey].end!=1?n:t[e.eventKey].start}):{start:n,end:n,event:e}}))}));const n=Object.values(t);return this.sortLongEventViews(n)}sortLongEventViews(e){return e.sort(((e,t)=>{const{startDate:n,endDate:i}=e.event,{startDate:r,endDate:a}=t.event;n.setHours(0,0,0),r.setHours(0,0,0),i.setHours(23,59,59),a.setHours(23,59,59);const o=a.valueOf()-r.valueOf()-(i.valueOf()-n.valueOf());return n.valueOf()!==r.valueOf()?n.valueOf()-r.valueOf():o}))}}var Le=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class Se extends l{constructor(){super(...arguments),this.longEventLayoutGenerator=new Pe,this.calendarEventSorter=new Me}sortLongEvents(e){return this.fullDayEventLayout=this.longEventLayoutGenerator.generate(e),e.map(((e,t)=>this.calendarEventSorter.sort(e,t,this.fullDayEventLayout)))}render(t,n){return t.map(((t,i)=>{if(t)return e("div",{key:t.eventKey,class:"month"===this.viewMode?"month-event-block":"day-event-block",style:this.getEventStyle(t,n,i,"month"===this.viewMode?Se.monthViewEventOffsetTop:0)},this.eventItemRenderer.render(t,{"month-event":"month"===this.viewMode,"day-event":"month"!==this.viewMode}))}))}getEventStyle(e,t,n,i){const r=this.calendarView.weekdays.length,a=t;let o=t+1;const s=n;let d=!0;const l=this.fullDayEventLayout.getEventRowsIndex(e);if(l>=0){const n=this.fullDayEventLayout.eventLayoutCells[l].getEventStartIndex(e),i=this.fullDayEventLayout.eventLayoutCells[l].getEventEndIndex(e);n===t?o=i+1:d=!1}return{position:"absolute",left:100/r*a+"%",top:`${s*ge.backgroundColorModeEventHeight+i}px`,width:100/r*(o-a)+"%",opacity:d?"1":"0"}}}Se.monthViewEventOffsetTop=26,Le([d()],Se.prototype,"eventItemRenderer",void 0),Le([d()],Se.prototype,"viewMode",void 0),Le([d()],Se.prototype,"calendarView",void 0);var Fe=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};const Ne=class{constructor(e){i(this,e),this.vegaChange=r(this,"vegaChange",7),this.change=r(this,"change",7),this.vegaEventClick=r(this,"vegaEventClick",7),this.eventClick=r(this,"eventClick",7),this.globalSlimmer={},this.vegaComponentUsageRuntimeMetricsSlimmer=new p,this.renderer=new L,this.switchPanelRenderer=new B,this.viewRenderer=new W,this.monthViewRenderer=new Y,this.viewWithTimeRenderer=new U,this.timeLineRenderer=new q,this.monthEventRenderer=new he,this.currentPeriodController=new le,this.calendarViewController=new se,this.dayViewFullDayEventRenderer=new ke,this.dayViewTimedEventRenderer=new Te,this.eventItemRenderer=new ge,this.dayViewEventLayoutRenderer=new Re,this.fullDayEventLayoutRenderer=new Se,this.calendarEventController=new fe,this.eventResponsiveController=new be,this.changeEventEmitter=k(Ne,g),this.eventClickEmitter=k(Ne,x),this.changeEventPrevent=new R([g],(()=>this.switchPanelRenderer.getSwitchPanelRef())),this.timeFormatNotifySlimmer=M(Ne,"timeFormat","watchTimeFormat"),this.calendarEvents=[],this.viewMode="month",this.timeFormat="24-hour"}watchCurrentPeriodChange(){}watchViewModeChange(e){}watchEventsChange(e){}watchTimeFormat(e){}render(){return s(e(a,null,this.renderer.render()),this.host)}get host(){return o(this)}static get watchers(){return{currentPeriod:["watchCurrentPeriodChange"],viewMode:["watchViewModeChange"],events:["watchEventsChange"],timeFormat:["watchTimeFormat"]}}};Fe([w()],Ne.prototype,"globalSlimmer",void 0),Fe([v()],Ne.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),Fe([v()],Ne.prototype,"renderer",void 0),Fe([v()],Ne.prototype,"switchPanelRenderer",void 0),Fe([v()],Ne.prototype,"viewRenderer",void 0),Fe([v()],Ne.prototype,"monthViewRenderer",void 0),Fe([v()],Ne.prototype,"viewWithTimeRenderer",void 0),Fe([v()],Ne.prototype,"timeLineRenderer",void 0),Fe([v()],Ne.prototype,"monthEventRenderer",void 0),Fe([v()],Ne.prototype,"currentPeriodController",void 0),Fe([v()],Ne.prototype,"calendarViewController",void 0),Fe([v()],Ne.prototype,"dayViewFullDayEventRenderer",void 0),Fe([v()],Ne.prototype,"dayViewTimedEventRenderer",void 0),Fe([v()],Ne.prototype,"eventItemRenderer",void 0),Fe([v()],Ne.prototype,"dayViewEventLayoutRenderer",void 0),Fe([v()],Ne.prototype,"fullDayEventLayoutRenderer",void 0),Fe([v()],Ne.prototype,"calendarEventController",void 0),Fe([v()],Ne.prototype,"eventResponsiveController",void 0),Fe([v()],Ne.prototype,"changeEventEmitter",void 0),Fe([v()],Ne.prototype,"eventClickEmitter",void 0),Fe([v()],Ne.prototype,"changeEventPrevent",void 0),Fe([v()],Ne.prototype,"timeFormatNotifySlimmer",void 0),Ne.style='.border-divider-top{border:1px solid rgba(var(--v-border-divider-secondary, 199, 217, 229, 1));border-left-width:0px;border-right-width:0px;border-bottom-width:0px}.border-divider-left{border:1px solid rgba(var(--v-border-divider-secondary, 199, 217, 229, 1));border-top-width:0px;border-right-width:0px;border-bottom-width:0px}.border-divider-right{border:1px solid rgba(var(--v-border-divider-secondary, 199, 217, 229, 1));border-top-width:0px;border-left-width:0px;border-bottom-width:0px}.border-divider-bottom{border:1px solid rgba(var(--v-border-divider-secondary, 199, 217, 229, 1));border-top-width:0px;border-left-width:0px;border-right-width:0px}:host{display:flex;flex-direction:column;border-radius:12px;border:1px solid rgba(var(--v-border-divider, 171, 198, 216, 1));background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));overflow:hidden;width:100%;height:100%;box-sizing:border-box;max-height:1966px}.calendar-switch-panel{padding:24px;border-bottom-width:1px;border-top-width:0px;border-left-width:0px;border-right-width:0px;border-style:solid;border-color:rgba(var(--v-border-color-divider, 171, 198, 216, 1));flex-shrink:0;width:100%;box-sizing:border-box}.calendar-switch-panel .calendar-date-switch-container{display:flex;gap:8px;align-items:center;flex-direction:row}.calendar-switch-panel .calendar-view-switch-container{display:flex;gap:16px;align-items:center;flex-direction:row}.calendar-switch-panel .calendar-current-date{padding-left:8px}.calendar-view{width:100%;position:relative;flex-grow:1;overflow-y:auto;overflow-x:hidden}.calendar-view-month .calendar-view-month-container{width:100%;display:grid;min-height:100%;grid-template-rows:43px repeat(6, minmax(64px, 1fr))}.calendar-view-month .calendar-view-title{background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));top:0;left:0;z-index:62}.calendar-view-month .calendar-view-title div{padding-top:12px;padding-bottom:12px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px;text-align:center}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-month .calendar-view-title div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-month .calendar-view-title div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-month .calendar-view-title div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}.calendar-view-month .calendar-view-row{position:relative;display:grid;grid-template-rows:1fr;grid-template-columns:repeat(7, minmax(64px, 1fr))}.calendar-view-month .calendar-view-row.calendar-view-title{position:sticky}.calendar-view-month .calendar-view-row:last-child{border-bottom-width:0px}.calendar-view-month .calendar-view-row .row-cell{overflow:hidden;display:flex;flex-direction:column;justify-content:space-between}.calendar-view-month .calendar-view-row .row-cell:last-child{border-right-width:0px}.calendar-view-month .calendar-view-row .row-cell .date{padding-top:4px;padding-bottom:4px;padding-right:12px;padding-left:8px}.calendar-view-month .calendar-view-row .row-cell .date>div{display:inline-block;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-month .calendar-view-row .row-cell .date>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-month .calendar-view-row .row-cell .date>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-month .calendar-view-row .row-cell .date>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}.calendar-view-month .calendar-view-row .row-cell .date .month-block{margin-right:2px}.calendar-view-month .calendar-view-row .row-cell .date .grid-col{text-align:center;border-top-left-radius:9999px;border-bottom-left-radius:9999px;border-top-right-radius:9999px;border-bottom-right-radius:9999px;cursor:pointer;width:18px;height:18px;line-height:18px}.calendar-view-month .calendar-view-row .row-cell .date .grid-col:hover{background-color:rgba(var(--v-bg-action-secondary-hover, 4, 112, 236, 0.1))}.calendar-view-month .calendar-view-row .row-cell .date .grid-col:active{background-color:rgba(var(--v-bg-action-secondary-active, 29, 65, 195, 0.1))}.calendar-view-month .calendar-view-row .row-cell .date .grid-col:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}.calendar-view-month .calendar-view-row .row-cell.current-month-day .date>div{color:rgba(var(--v-text-primary, 32, 54, 69, 1))}.calendar-view-month .calendar-view-row .row-cell.disabled{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1))}.calendar-view-month .calendar-view-row .row-cell.disabled .date>div{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}.calendar-view-month .calendar-view-row .row-cell.active .date .grid-col{background-color:rgba(var(--v-bg-action, 19, 98, 226, 1));border-top-left-radius:9999px;border-bottom-left-radius:9999px;color:rgba(var(--v-text-on-action, 252, 252, 252, 1))}.calendar-view-month .calendar-view-row .row-cell.active .date .grid-col:hover{background-color:rgba(var(--v-bg-action-hover, 4, 112, 236, 1))}.calendar-view-month .calendar-view-row .row-cell.active .date .grid-col:active{background-color:rgba(var(--v-bg-action-active, 29, 65, 195, 1))}.calendar-view-month .calendar-view-row .row-cell.active .date .grid-col:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}.calendar-view-container{width:100%}.calendar-view-container .calendar-view-title-container{background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));position:sticky;top:0;left:0;z-index:62}.calendar-view-container .calendar-view-row{box-sizing:border-box;width:100%;display:flex;flex-direction:row}.calendar-view-container .calendar-view-row .time-line,.calendar-view-container .calendar-view-row .time-line-empty,.calendar-view-container .calendar-view-row .time-line-all{width:72px;text-align:right;padding-right:8px;box-sizing:border-box;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));flex-shrink:0}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-container .calendar-view-row .time-line,.calendar-view-container .calendar-view-row .time-line-empty,.calendar-view-container .calendar-view-row .time-line-all{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-container .calendar-view-row .time-line,.calendar-view-container .calendar-view-row .time-line-empty,.calendar-view-container .calendar-view-row .time-line-all{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-container .calendar-view-row .time-line,.calendar-view-container .calendar-view-row .time-line-empty,.calendar-view-container .calendar-view-row .time-line-all{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}.calendar-view-container .calendar-view-title{width:100%}.calendar-view-container .calendar-view-title>div{padding:12px;padding-bottom:8px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px;text-align:center;display:flex;flex-direction:column;gap:8px}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-container .calendar-view-title>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-container .calendar-view-title>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-container .calendar-view-title>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}.calendar-view-container .calendar-view-title .week-day{cursor:pointer;color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:20px;font-weight:500;line-height:24px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-container .calendar-view-title .week-day{font-family:"Inter", sans-serif;font-size:20px;font-weight:500;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-container .calendar-view-title .week-day{font-family:"Inter", sans-serif;font-size:20px;font-weight:500;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-container .calendar-view-title .week-day{font-family:"Inter", sans-serif;font-size:20px;font-weight:500;line-height:24px;letter-spacing:0px}}.calendar-view-container .calendar-view-title .active div{color:rgba(var(--v-text-link, 19, 98, 226, 1))}.calendar-view-container .calendar-view-event-all-container{align-items:center}.calendar-view-container .calendar-view-event-all{display:grid;grid-template-rows:1fr;flex-grow:1;min-height:18px}.calendar-view-container .calendar-view-day-container .time-line{display:grid;grid-template-rows:16px repeat(24, minmax(74px, 1fr))}.calendar-view-container .calendar-view-day-container .time-line .time-text{margin-top:-9px}.calendar-view-container .calendar-view-day-container .calendar-view-content{width:100%}.calendar-view-container .calendar-view-day-container .calendar-view-content .grid-col{display:grid;grid-template-rows:16px repeat(24, minmax(74px, 1fr));grid-template-columns:minmax(64px, 1fr)}.calendar-view-container .calendar-view-day-container .calendar-view-content .grid-col>.border-divider-top:first-child{border-top-width:0px}.calendar-view-container .calendar-view-content-container{width:100%;position:relative}.calendar-view-week .calendar-view-container{min-height:100%}.calendar-view-week .calendar-view-container .calendar-view-title{display:grid;grid-template-rows:1fr;grid-template-columns:repeat(7, minmax(64px, 1fr))}.calendar-view-week .calendar-view-container .calendar-view-event-all{grid-template-columns:repeat(7, minmax(64px, 1fr))}.calendar-view-week .calendar-view-container .calendar-view-day-container .calendar-view-content{display:grid;grid-template-columns:repeat(7, minmax(64px, 1fr))}.calendar-view-week .time-marker-container .time-marker{display:grid;grid-template-columns:repeat(7, minmax(64px, 1fr))}.calendar-view-week .day-event-container{display:grid;grid-template-columns:repeat(7, minmax(64px, 1fr))}.calendar-view-day .calendar-view-container{min-height:100%}.time-marker-container{position:absolute;min-width:100%;left:0;top:16px;height:calc(100% - 16px);pointer-events:none}.time-marker-container.hidden{display:none}.time-marker-container .time-marker{position:absolute;height:2px;display:grid;min-width:100%;left:0;top:0;z-index:61}.time-marker-container .time-marker div{width:100%;height:2px;background-color:rgba(var(--v-bg-status-error, 255, 110, 139, 1));opacity:0.3}.time-marker-container .time-marker div.active{opacity:1;position:relative}.time-marker-container .time-marker div.active::before{content:"";display:block;border-top-left-radius:9999px;border-bottom-left-radius:9999px;border-top-right-radius:9999px;border-bottom-right-radius:9999px;position:absolute;width:8px;height:8px;background-color:rgba(var(--v-bg-status-error, 255, 110, 139, 1));top:-3px;left:-4px}.day-event-container{position:absolute;min-width:100%;left:0;top:16px;height:calc(100% - 16px);pointer-events:none}.day-event-container .day-event-col{height:100%;overflow:hidden}.day-event-container vega-calendar-event{pointer-events:auto;height:100%}.calendar-view-month .month-event-row{position:absolute;width:100%;overflow:hidden;height:calc(100% - 26px);left:0;bottom:0}.calendar-view-month .events-container{width:100%;box-sizing:border-box;overflow:hidden;padding:2px;display:flex;flex-direction:column;gap:2px;justify-content:space-between;flex-grow:1}.calendar-view-month .events-container .event-list{display:flex;flex-direction:column;gap:2px;flex-grow:1}.calendar-view-month .events-container .event-list .month-event-block{box-sizing:border-box;padding-left:2px;padding-right:3px}.calendar-view-month .events-container .month-event-more .more-button{display:inline-block;height:16px;font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px;color:rgba(var(--v-text-link, 19, 98, 226, 1));cursor:pointer;border-radius:2px}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-month .events-container .month-event-more .more-button{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-month .events-container .month-event-more .more-button{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-month .events-container .month-event-more .more-button{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}.calendar-view-month .events-container .month-event-more .more-button:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:0px}.calendar-view-container .calendar-view-event-all{position:relative}.calendar-view-container .calendar-view-event-all .placeholder-block{padding-top:2px;padding-bottom:2px;box-sizing:content-box}.calendar-view-container .calendar-view-event-all .placeholder-block span{display:none}.calendar-view-container .calendar-view-event-all .day-event-block{padding-top:2px;padding-right:2px;box-sizing:border-box;padding-left:3px}.calendar-view-container .day-event-col{position:relative}.calendar-view-container .day-event-col .time-event-block{box-sizing:border-box;padding-right:8px;padding-bottom:2px;padding-top:3px}.calendar-view-container .day-event-col .time-event-block vega-calendar-event.bg-shadow::part(event-container):not(:focus){outline:2px solid rgba(var(--v-bg-primary, 252, 252, 252, 1))}.calendar-view-container .day-event-col .time-event-block:focus-within{z-index:60 !important}';var Be=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class Ae extends l{getEventTitleContainerRef(){return this.eventTitleContainerRef}render(){return e(t,null,this.injectBackgroundColorStyle(),this.calendarEvent.isAllDayEvent||this.calendarEvent.isGroupEvent()?this.renderBackgroundModeEvent():this.renderNormalEvent())}renderBackgroundModeEvent(){const t=this.calendarEvent.disabled;return e("div",{role:"button",tabIndex:0,class:{"background-color-mode":!0,"event-bg-color":!t,"bg-disabled":t}},this.calendarEvent.title)}renderNormalEvent(){const{variant:t="primary",disabled:n,startTime:i,endTime:r,title:a}=this.calendarEvent,o={"event-container":!0,disabled:n,[t]:!0};if(!this.host.classList.contains("day-event"))return e("div",{role:"button",tabIndex:0,class:o},this.renderEventStatus(),e("div",{class:"event-title"},`${this.formatDisplayTime(i)} ${a}`));{const t=this.calendarEvent.getEventDuration();return e("div",{part:"event-container",class:Object.assign(Object.assign({},o),{vertical:t>30,"duration-half-an-hour":30===t,"event-bg-color":!n,"bg-disabled":n}),role:"button",tabIndex:0},this.renderEventStatus(),e("div",{class:"cover-block"}),e("div",{class:"event-content"},e("div",{class:{"event-title":!0,"title-word-wrap":t>30},ref:e=>this.eventTitleContainerRef=e},a),e("div",{class:"event-time"},e("vega-icon",{size:"size-12",icon:b.getIconKey("clock-three")}),e("span",null,`${this.formatDisplayTime(i)} - ${this.formatDisplayTime(r)}`))))}}renderEventStatus(){const t=this.calendarEvent.disabled;return e("div",{class:{"event-status":!0,"event-bg-color":!t,"bg-disabled":t}},e("span",{class:{stripe:"secondary"===this.calendarEvent.variant}}))}injectBackgroundColorStyle(){return e("style",null,this.colorController.getBackgroundColorStyle())}formatDisplayTime(e){const[t,n]=e.split(":");if("24-hour"===this.timeFormat)return`${t.padStart(2,"0")}:${n.padStart(2,"0")}`;{const e=Number(t),i=e>=12?"pm":"am",r=n.padStart(2,"0");return e>12?`${e-12}:${r} pm`:0===e?`12:${r} am`:`${e}:${r} ${i}`}}}b.register({"clock-three":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M464 256A208 208 0 1 1 48 256a208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM232 120V256c0 13.3 10.7 24 24 24H360c13.3 0 24-10.7 24-24s-10.7-24-24-24H280V120c0-13.3-10.7-24-24-24s-24 10.7-24 24z"/></svg>'}}),Be([d()],Ae.prototype,"host",void 0),Be([d()],Ae.prototype,"timeFormat",void 0),Be([d()],Ae.prototype,"calendarEvent",void 0),Be([d()],Ae.prototype,"colorController",void 0);class We extends l{getBackgroundColorStyle(){const e=this.calendarEvent.color||"bg-accent6-primary";return T(e)?`.event-bg-color{${V.formatToken(e)}}`:`.event-bg-color{background-color:${e}}`}}!function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);a>3&&o&&Object.defineProperty(t,n,o)}([d()],We.prototype,"calendarEvent",void 0);class He extends O{constructor(){super({parent:"vega-calendar",subStates:[{subStateName:"timeFormat",parentStateName:"timeFormat"}]})}}!function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);a>3&&o&&Object.defineProperty(t,n,o)}([d({writable:!0})],He.prototype,"timeFormat",void 0);class Ye extends l{setVerticalTitleMaxHeight(){const e=this.renderer.getEventTitleContainerRef();if(e&&e.classList.contains("title-word-wrap")){const t=window.getComputedStyle(e),n=$(t.height),i=$(t.lineHeight),r=Math.max(Math.floor(n/i),1);e.style.maxHeight=r*i+"px"}}}!function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);a>3&&o&&Object.defineProperty(t,n,o)}([d()],Ye.prototype,"renderer",void 0);var Ke=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};const Ue=class{constructor(e){i(this,e),this.globalSlimmer={},this.pageResizeObserverSlimmer=new E({target:()=>this.host,callback:()=>this.titleMaxHeightController.setVerticalTitleMaxHeight()}),this.vegaComponentUsageRuntimeMetricsSlimmer=new p,this.renderer=new Ae,this.colorController=new We,this.subStateController=new He,this.titleMaxHeightController=new Ye,this.timeFormat="24-hour"}render(){return s(e(a,null,this.calendarEvent?this.renderer.render():null),this.host)}get host(){return o(this)}};Ke([w()],Ue.prototype,"globalSlimmer",void 0),Ke([v()],Ue.prototype,"pageResizeObserverSlimmer",void 0),Ke([v()],Ue.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),Ke([v()],Ue.prototype,"renderer",void 0),Ke([v()],Ue.prototype,"colorController",void 0),Ke([v()],Ue.prototype,"subStateController",void 0),Ke([v()],Ue.prototype,"titleMaxHeightController",void 0),Ue.style='.bg-disabled{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1))}:host{display:block;box-sizing:border-box;width:100%}:host .background-color-mode{border-radius:2px;padding-left:8px;padding-right:8px;color:rgba(var(--v-text-black, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px;cursor:pointer;overflow:hidden;white-space:nowrap}@media screen and (min-width: 768px) and (max-width: 1023px){:host .background-color-mode{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .background-color-mode{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .background-color-mode{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}:host .event-container{display:block;width:100%;border-radius:4px;cursor:pointer;box-sizing:border-box;overflow:hidden}:host(.month-event) .event-container{padding-left:2px;padding-right:2px;display:flex;flex-direction:row;gap:4px;align-items:center;min-height:16px}:host(.month-event) .event-container .event-status{width:8px;height:8px;box-sizing:border-box;border-top-left-radius:9999px;border-bottom-left-radius:9999px;border-top-right-radius:9999px;border-bottom-right-radius:9999px;margin-left:2px;flex-shrink:0}:host(.month-event) .event-container .event-status span{display:none;width:100%;height:100%;border-top-left-radius:9999px;border-bottom-left-radius:9999px;border-top-right-radius:9999px;border-bottom-right-radius:9999px}:host(.month-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));flex-grow:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@media screen and (min-width: 768px) and (max-width: 1023px){:host(.month-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host(.month-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host(.month-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}:host(.month-event) .event-container.secondary .event-status span{display:block;background-size:4px 4px;opacity:0.8}:host(.month-event) .event-container.tertiary .event-status{padding:1px}:host(.month-event) .event-container.tertiary .event-status span{display:block;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1))}:host(.month-event) .event-container.disabled .event-status{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1))}:host(.month-event) .event-container:hover{background-color:rgba(var(--v-bg-action-secondary-hover, 4, 112, 236, 0.1))}:host(.month-event) .event-container:active{background-color:rgba(var(--v-bg-action-secondary-active, 29, 65, 195, 0.1))}:host(.month-event) .event-container:focus{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:0px}:host(.day-event) .event-container{padding-left:8px;padding-right:8px;position:relative}:host(.day-event) .event-container .event-status{position:absolute;width:4px;height:100%;left:0;top:0;z-index:1}:host(.day-event) .event-container .event-status span{display:none}:host(.day-event) .event-container .cover-block{position:absolute;height:100%;width:100%;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border-radius:4px;left:0;top:0;opacity:0.7}:host(.day-event) .event-container .event-content,:host(.day-event) .event-container .event-time{display:flex;flex-direction:row;align-items:center}:host(.day-event) .event-container .event-content{gap:8px;position:relative;height:100%;box-sizing:border-box}:host(.day-event) .event-container .event-time{gap:4px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}@media screen and (min-width: 768px) and (max-width: 1023px){:host(.day-event) .event-container .event-time{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host(.day-event) .event-container .event-time{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host(.day-event) .event-container .event-time{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}:host(.day-event) .event-container .event-time vega-icon{flex-shrink:0}:host(.day-event) .event-container .event-time span{white-space:nowrap}:host(.day-event) .event-container .event-title{color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){:host(.day-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host(.day-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host(.day-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}:host(.day-event) .event-container .event-title.title-word-wrap{overflow:hidden}:host(.day-event) .event-container .event-title:not(.title-word-wrap){white-space:nowrap}:host(.day-event) .event-container.duration-half-an-hour{padding-top:8px;padding-bottom:8px}:host(.day-event) .event-container.vertical{height:100%}:host(.day-event) .event-container.vertical .event-content{flex-direction:column;align-items:flex-start;gap:4px;padding-top:8px;padding-bottom:8px}:host(.day-event) .event-container.secondary .event-status span,:host(.day-event) .event-container.tertiary .event-status span{display:block;position:absolute;border-top-left-radius:4px;border-bottom-left-radius:4px}:host(.day-event) .event-container.secondary .cover-block,:host(.day-event) .event-container.tertiary .cover-block{width:calc(100% - 2px);height:calc(100% - 2px);top:1px;left:1px}:host(.day-event) .event-container.secondary .event-status span{width:100%;height:100%;top:0px;left:0px;background-size:4px 4px;opacity:0.8}:host(.day-event) .event-container.secondary .cover-block{opacity:0.9}:host(.day-event) .event-container.tertiary .event-status span{background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));width:2px;height:calc(100% - 2px);top:1px;left:1px}:host(.day-event) .event-container.tertiary .cover-block{opacity:1}:host(.day-event) .event-container.disabled{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1))}:host(.day-event) .event-container.disabled .event-status{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1))}:host(.day-event) .event-container:focus{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:0px}:host(.month-event.calendar-event-large-size) .background-color-mode{border-radius:4px;padding-top:4px;padding-bottom:4px}:host(.month-event.calendar-event-large-size) .event-container{padding-top:4px;padding-bottom:4px}.stripe{background-image:linear-gradient(-45deg, transparent 25%, rgba(var(--v-bg-primary, 252, 252, 252, 1)) 25% 50%, transparent 50% 75%, rgba(var(--v-bg-primary, 252, 252, 252, 1)) 75% 100%)}';export{Ne as vega_calendar,Ue as vega_calendar_event}
@@ -1 +1 @@
1
- import{r as e,c as i,h as t,H as a,g as r}from"./p-9777b1c1.js";import{c as n}from"./p-86194314.js";import{s as o}from"./p-b81bd0bb.js";import{C as s}from"./p-bf95b189.js";import{C as c,b as h,h as l}from"./p-2fa3841b.js";import{O as d,d as p}from"./p-0fd9f03f.js";import{f as g}from"./p-320642bd.js";import{a as b,M as x,V as v,I as f}from"./p-018d77cc.js";import{V as m,I as u}from"./p-5cad29f5.js";import{F as k}from"./p-77ff7c72.js";import{c as w}from"./p-16608c5a.js";import{d as y}from"./p-f1d8fd1c.js";import{V as j}from"./p-c47d4933.js";import{R as C}from"./p-d962b340.js";import{C as I}from"./p-8c414f6f.js";import{C as z}from"./p-7d1b4d02.js";import{C as R}from"./p-fda33444.js";import"./p-0bb29d98.js";import"./p-469bc36e.js";import"./p-d3f1d3dd.js";import"./p-cb13b4e6.js";import"./p-3542f8fe.js";import"./p-3c8b2105.js";import"./p-1ced3ae5.js";import"./p-56681feb.js";import"./p-69b28805.js";import"./p-344ee7cb.js";import"./p-aae8855d.js";class V{evaluate(e){return"boolean"==typeof e?{isValid:e,message:e?"":"This field is required"}:"string"==typeof e?{isValid:""!==e,message:""!==e?"":"This field is required"}:{isValid:!1,message:"This field is required"}}canEvaluate(e,i){return i?this.isAcceptedInputType(e)&&!i.disabled&&i.visible:this.isAcceptedInputType(e)}shouldShowError(e){return!e.disabled&&e.visible&&(e.touched||e.modified)}isAcceptedInputType(e){return"string"==typeof e||"boolean"==typeof e||null===e}}var D=function(e,i,t,a){var r,n=arguments.length,o=n<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(n<3?r(o):n>3?r(i,t,o):r(i,t))||o);return n>3&&o&&Object.defineProperty(i,t,o),o};class O extends v{connectedCallback(){this.checkboxGroup=g(this.host,"vega-checkbox-group")||g(this.host,"vega-selection-tile-group"),this.fieldErrorObserver=new d(this.canAcceptFieldErrorObserver.bind(this),this.fieldErrorObserverListener.bind(this)),s.register(p.getSubject(this.checkboxGroup||this.host,j),this.fieldErrorObserver)}disconnectedCallback(){s.unregister(p.getSubject(this.checkboxGroup||this.host,j),this.fieldErrorObserver)}canAcceptFieldErrorObserver(){return!0}fieldErrorObserverListener(e){this.showError=e.showError}}D([b({writable:!0})],O.prototype,"showError",void 0),D([b()],O.prototype,"host",void 0),D([x("connectedCallback")],O.prototype,"connectedCallback",null),D([x("disconnectedCallback")],O.prototype,"disconnectedCallback",null);var E=function(e,i,t,a){var r,n=arguments.length,o=n<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(n<3?r(o):n>3?r(i,t,o):r(i,t))||o);return n>3&&o&&Object.defineProperty(i,t,o),o};const G=class{constructor(t){e(this,t),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.globalSlimmers={},this.vegaCheckboxShowErrorController=new O,this.formFieldController=new k({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new V:null}],defaultValue:e=>""!==e.identifier&&"",attributeGetter:e=>this[e],inputContainerGetter:()=>this.inputContainerRef,touchableAreaGetter:()=>[this.inputRef]}),this.changeEventEmitter=w(G,y),this.vegaComponentUsageRuntimeMetricsSlimmer=new m,this.groupDisabled=!1,this.showError=!1,this.identifier="",this.value=""!==this.identifier&&"",this.checked=!1,this.disabled=!1,this.size="default",this.required=!1,this.isValid=null,this.onCheckBoxChange=e=>{this.checked=e.currentTarget.checked,e.stopPropagation()},this.onSelectedIconClick=e=>{e.stopPropagation()}}watchCheckedChange(){this.initValue(),this.changeEventEmitter.emit(this.value),s.notify(c,{host:this.host,detail:this.value}),s.notify(h,{host:this.host,detail:this.value})}disconnectedCallback(){this.unRegisterGroupDisabledObserver()}componentWillLoad(){this.initValue(),this.initAndRegisterGroupDisabledObserver()}componentDidRender(){""===this.host.innerHTML.trim()&&this.labelElement.classList.add("vega-hidden")}async setValue(e){this.checked=this.identifier?e===this.identifier:!0===e}render(){return o(t(a,{class:{"vega-flex-shrink-0 v-min-w-min":"VEGA-CHECKBOX-GROUP"==this.host.parentElement.nodeName,checked:this.checked,disabled:this.isDisabled()}},t("label",{class:{"vega-checkbox-container":!0,error:this.showError},ref:e=>this.inputContainerRef=e},t("input",{ref:e=>this.inputRef=e,type:"checkbox",checked:this.checked,value:this.identifier,onChange:this.onCheckBoxChange,"aria-label":this.identifier||"No label defined",disabled:this.isDisabled(),role:"button",tabIndex:0,onKeyDown:n()}),t("span",{class:{"vega-checkbox-icon":!0,"vega-checkbox-small":"small"===this.size},onClick:this.onSelectedIconClick,tabIndex:-1},this.renderIconDom()),t("div",{class:{"vega-checkbox-label-container":!0,"vega-checkbox-label-small":"small"===this.size},ref:e=>this.labelElement=e},this.renderLabelDom(),this.renderRequireDom()))),this.host)}renderIconDom(){return this.checked?t("vega-icon",{icon:"checkmark",size:"small"===this.size?"size-12":"size-16"}):null}renderLabelDom(){return t("span",{class:"vega-checkbox-label"},t("slot",null))}renderRequireDom(){return t("span",{class:{"vega-require":this.required}},this.required?"*":"")}initValue(){this.value=""!==this.identifier?this.checked?this.identifier:"":this.checked}isDisabled(){return this.disabled||this.groupDisabled}canAcceptGroupDisabledObserver(e){return g(this.host,"vega-checkbox-group")===e.host}groupDisabledObserverListener(e){this.groupDisabled=e.host.disabled}initAndRegisterGroupDisabledObserver(){g(this.host,"vega-checkbox-group")&&(this.groupDisabledObserver=new d(this.canAcceptGroupDisabledObserver.bind(this),this.groupDisabledObserverListener.bind(this)),s.register(l,this.groupDisabledObserver))}unRegisterGroupDisabledObserver(){this.groupDisabledObserver&&s.unregister(l,this.groupDisabledObserver)}get host(){return r(this)}static get watchers(){return{checked:["watchCheckedChange"]}}};E([u()],G.prototype,"globalSlimmers",void 0),E([f()],G.prototype,"vegaCheckboxShowErrorController",void 0),E([f()],G.prototype,"formFieldController",void 0),E([f()],G.prototype,"changeEventEmitter",void 0),E([f()],G.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),G.style=':host{display:inline-block;vertical-align:middle}.vega-checkbox-container{position:relative;display:flex;-webkit-tap-highlight-color:transparent}.vega-checkbox-container>input[type=checkbox]{position:absolute;left:0px;top:0px;opacity:0;width:24px;height:24px;padding:0px;margin:0px}.vega-checkbox-container>.vega-checkbox-icon{display:inline-block;box-sizing:border-box;width:24px;height:24px;border-style:solid;border-width:2px;border-color:rgba(var(--v-border-color-action-active, 29, 65, 195, 1));position:relative;left:0px;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1));border-radius:4px;min-width:24px;color:rgba(var(--v-text-inverted-primary, 252, 252, 252, 1))}.vega-checkbox-container>.vega-checkbox-icon.vega-checkbox-small{width:16px;height:16px;min-width:16px;border-radius:2px}.vega-checkbox-container>.vega-checkbox-icon:hover{border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1))}:host(.checked) .vega-checkbox-container>.vega-checkbox-icon{background-color:rgba(var(--v-bg-action, 19, 98, 226, 1))}:host(.checked) .vega-checkbox-container>.vega-checkbox-icon:hover{background-color:rgba(var(--v-bg-action-hover, 4, 112, 236, 1))}.vega-checkbox-container>input[type=checkbox]:focus-visible+.vega-checkbox-icon{box-shadow:0 0 0 4px rgba(var(--v-ring-input-focus, 19, 98, 226, 0.25));border:1px solid rgba(var(--v-border-input-field-focus, 19, 98, 226, 1));outline:none}.vega-checkbox-container>.vega-checkbox-icon:active{border-width:1px;border-style:solid;border-color:rgba(var(--v-border-color-action-active, 29, 65, 195, 1))}:host(.checked) .vega-checkbox-container>.vega-checkbox-icon:active{background-color:rgba(var(--v-bg-action-active, 29, 65, 195, 1))}:host(.checked) .vega-checkbox-container>.vega-checkbox-icon{display:inline-flex;align-items:center;justify-content:center}.vega-checkbox-container:hover{cursor:pointer}.vega-checkbox-container .vega-require{color:rgba(var(--v-text-error, 189, 41, 71, 1));margin-left:4px;vertical-align:middle}.vega-checkbox-container.error>.vega-checkbox-icon{background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}:host(.checked) .vega-checkbox-container.error>.vega-checkbox-icon{background-color:rgba(var(--v-bg-danger, 189, 41, 71, 1))}.vega-checkbox-container.error>.vega-checkbox-icon:hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}:host(.checked) .vega-checkbox-container.error>.vega-checkbox-icon:hover{background-color:rgba(var(--v-bg-danger-hover, 233, 71, 104, 1))}.vega-checkbox-container.error>input[type=checkbox]:focus-visible+.vega-checkbox-icon{box-shadow:0 0 0 4px rgba(var(--v-ring-input-danger-focus, 230, 50, 87, 0.25));border:1px solid rgba(var(--v-border-input-field-danger-focus, 233, 71, 104, 1));outline:none}:host(.checked) .vega-checkbox-container.error>.vega-checkbox-icon:active{background-color:rgba(var(--v-bg-danger-active, 230, 50, 87, 1))}.vega-checkbox-container.error>.vega-checkbox-icon:active{border-width:1px;border-style:solid;border-color:rgba(var(--v-border-color-danger-active, 189, 41, 71, 1))}:host(.disabled) .vega-checkbox-container>.vega-checkbox-icon{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}:host(.checked.disabled) .vega-checkbox-container>.vega-checkbox-icon{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1));border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}:host(.checked.disabled) .vega-checkbox-container>.vega-checkbox-icon>vega-icon{color:rgba(var(--v-text-inverted-primary, 252, 252, 252, 1))}.vega-checkbox-container>.vega-checkbox-label-container{display:inline-block;margin-left:12px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-checkbox-container>.vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-checkbox-container>.vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-checkbox-container>.vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}.vega-checkbox-container>.vega-checkbox-label-container.vega-checkbox-label-small{margin-left:8px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-checkbox-container>.vega-checkbox-label-container.vega-checkbox-label-small{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-checkbox-container>.vega-checkbox-label-container.vega-checkbox-label-small{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-checkbox-container>.vega-checkbox-label-container.vega-checkbox-label-small{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}:host(.disabled) .vega-checkbox-container>.vega-checkbox-label-container{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}.vega-error{display:block;margin-top:12px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}.vega-checkbox-label-container.vega-hidden{display:none}.vega-hidden{display:none}';var q=function(e,i,t,a){var r,n=arguments.length,o=n<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(n<3?r(o):n>3?r(i,t,o):r(i,t))||o);return n>3&&o&&Object.defineProperty(i,t,o),o};const F=class{constructor(t){e(this,t),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.globalSlimmers={},this.formFieldController=new k({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new C:null}],defaultValue:[],validationRulesName:"validationRules",attributeGetter:e=>this[e],inputContainerGetter:()=>this.inputContainerRef,touchableAreaGetter:()=>this.touchableAreaGetter()}),this.checkboxValueChangeObserver=new z(c,(e=>this.childCheckboxValueChange(e))),this.checkboxEventPrevent=new R([y],(()=>this.vegaFlexElement)),this.changeEventEmitter=w(F,y),this.vegaComponentUsageRuntimeMetricsSlimmer=new m,this.label="",this.value=[],this.vegaFlexProp={},this.disabled=!1,this.required=!1,this.hint="",this.isValid=null,this.autoValidation=!0,this.validationRules=[],this.childCheckboxValueChange=e=>{this.syncCheckboxItemsValue(e.detail,e.host.identifier)},this.touchableAreaGetter=()=>{const e=[];return this.vegaCheckboxArray&&this.vegaCheckboxArray.forEach((async i=>{e.push(i.shadowRoot.querySelector("input"))})),e}}async watchValue(){this.initCheckboxArray(),this.changeEventEmitter.emit(this.value),s.notify(h,{host:this.host,detail:this.value})}watchVegaFlexProp(){this.setVegaFlexProperty()}async watchDisabled(){this.notifyGroupDisabledChange()}watchValidationRules(){}componentDidLoad(){this.setVegaFlexProperty(),this.initCheckboxArray(),this.notifyGroupDisabledChange()}render(){return o(t(a,null,this.renderLabelDom(),t("div",{class:"vega-checkbox-group-container",ref:e=>this.inputContainerRef=e},t("vega-flex",{ref:e=>{this.vegaFlexElement=e}},t("slot",null))),this.renderHintDom()),this.host)}renderLabelDom(){return this.label&&t("div",{class:"vega-label"},t("label",{"aria-label":this.label},this.label,this.renderRequireDom()))}renderRequireDom(){return this.required?t("span",{class:"vega-require"},"*"):null}renderHintDom(){return this.hint&&t("div",{class:"vega-hint"},t("label",null,this.hint))}setVegaFlexProperty(){this.vegaFlexProp&&Object.assign(this.vegaFlexElement,{gap:"size-16",direction:"col"},this.vegaFlexProp)}syncCheckboxItemsValue(e,i){e&&!this.value.includes(i)?this.value=[...this.value,i]:!e&&this.value.includes(i)&&(this.value=[...this.value.filter((e=>e!==i))])}initCheckboxArray(){this.vegaCheckboxArray=Array.from(this.host.querySelectorAll("vega-checkbox")),this.vegaCheckboxArray.forEach((e=>{e.checked=!!(this.value&&this.value.length>0)&&this.value.includes(e.identifier)}))}notifyGroupDisabledChange(){s.notify(l,{host:this.host})}get host(){return r(this)}static get watchers(){return{value:["watchValue"],vegaFlexProp:["watchVegaFlexProp"],disabled:["watchDisabled"],validationRules:["watchValidationRules"]}}};q([u()],F.prototype,"globalSlimmers",void 0),q([f()],F.prototype,"formFieldController",void 0),q([f()],F.prototype,"checkboxValueChangeObserver",void 0),q([f()],F.prototype,"checkboxEventPrevent",void 0),q([f()],F.prototype,"changeEventEmitter",void 0),q([f()],F.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),q([I()],F.prototype,"watchVegaFlexProp",null),F.style=':host{display:block;text-align:left;line-height:normal}.vega-error{display:block;margin-top:12px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}.vega-hidden{display:none}.vega-label{margin-bottom:16px}.vega-label label{font-family:"Inter", sans-serif;font-size:18px;font-weight:500;line-height:30px;letter-spacing:0px;color:rgba(var(--v-text-primary, 32, 54, 69, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-label label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:28px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-label label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:28px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-label label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:28px;letter-spacing:0px}}.vega-require{color:rgba(var(--v-text-error, 189, 41, 71, 1));margin-left:4px}.vega-hint{padding-top:12px}.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}';export{G as vega_checkbox,F as vega_checkbox_group}
1
+ import{r as e,c as i,h as t,H as a,g as r}from"./p-9777b1c1.js";import{c as n}from"./p-86194314.js";import{s as o}from"./p-b81bd0bb.js";import{C as s}from"./p-bf95b189.js";import{C as c,b as h,h as l}from"./p-2fa3841b.js";import{O as d,d as p}from"./p-0fd9f03f.js";import{f as g}from"./p-320642bd.js";import{a as b,M as x,V as v,I as f}from"./p-018d77cc.js";import{V as m,I as u}from"./p-5cad29f5.js";import{F as k}from"./p-77ff7c72.js";import{c as w}from"./p-16608c5a.js";import{d as y}from"./p-f1d8fd1c.js";import{V as j}from"./p-c47d4933.js";import{R as C}from"./p-d962b340.js";import{C as I}from"./p-8c414f6f.js";import{C as z}from"./p-7d1b4d02.js";import{C as R}from"./p-a9d3ea86.js";import"./p-0bb29d98.js";import"./p-469bc36e.js";import"./p-d3f1d3dd.js";import"./p-cb13b4e6.js";import"./p-3542f8fe.js";import"./p-3c8b2105.js";import"./p-1ced3ae5.js";import"./p-56681feb.js";import"./p-69b28805.js";import"./p-344ee7cb.js";import"./p-aae8855d.js";class V{evaluate(e){return"boolean"==typeof e?{isValid:e,message:e?"":"This field is required"}:"string"==typeof e?{isValid:""!==e,message:""!==e?"":"This field is required"}:{isValid:!1,message:"This field is required"}}canEvaluate(e,i){return i?this.isAcceptedInputType(e)&&!i.disabled&&i.visible:this.isAcceptedInputType(e)}shouldShowError(e){return!e.disabled&&e.visible&&(e.touched||e.modified)}isAcceptedInputType(e){return"string"==typeof e||"boolean"==typeof e||null===e}}var D=function(e,i,t,a){var r,n=arguments.length,o=n<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(n<3?r(o):n>3?r(i,t,o):r(i,t))||o);return n>3&&o&&Object.defineProperty(i,t,o),o};class O extends v{connectedCallback(){this.checkboxGroup=g(this.host,"vega-checkbox-group")||g(this.host,"vega-selection-tile-group"),this.fieldErrorObserver=new d(this.canAcceptFieldErrorObserver.bind(this),this.fieldErrorObserverListener.bind(this)),s.register(p.getSubject(this.checkboxGroup||this.host,j),this.fieldErrorObserver)}disconnectedCallback(){s.unregister(p.getSubject(this.checkboxGroup||this.host,j),this.fieldErrorObserver)}canAcceptFieldErrorObserver(){return!0}fieldErrorObserverListener(e){this.showError=e.showError}}D([b({writable:!0})],O.prototype,"showError",void 0),D([b()],O.prototype,"host",void 0),D([x("connectedCallback")],O.prototype,"connectedCallback",null),D([x("disconnectedCallback")],O.prototype,"disconnectedCallback",null);var E=function(e,i,t,a){var r,n=arguments.length,o=n<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(n<3?r(o):n>3?r(i,t,o):r(i,t))||o);return n>3&&o&&Object.defineProperty(i,t,o),o};const G=class{constructor(t){e(this,t),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.globalSlimmers={},this.vegaCheckboxShowErrorController=new O,this.formFieldController=new k({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new V:null}],defaultValue:e=>""!==e.identifier&&"",attributeGetter:e=>this[e],inputContainerGetter:()=>this.inputContainerRef,touchableAreaGetter:()=>[this.inputRef]}),this.changeEventEmitter=w(G,y),this.vegaComponentUsageRuntimeMetricsSlimmer=new m,this.groupDisabled=!1,this.showError=!1,this.identifier="",this.value=""!==this.identifier&&"",this.checked=!1,this.disabled=!1,this.size="default",this.required=!1,this.isValid=null,this.onCheckBoxChange=e=>{this.checked=e.currentTarget.checked,e.stopPropagation()},this.onSelectedIconClick=e=>{e.stopPropagation()}}watchCheckedChange(){this.initValue(),this.changeEventEmitter.emit(this.value),s.notify(c,{host:this.host,detail:this.value}),s.notify(h,{host:this.host,detail:this.value})}disconnectedCallback(){this.unRegisterGroupDisabledObserver()}componentWillLoad(){this.initValue(),this.initAndRegisterGroupDisabledObserver()}componentDidRender(){""===this.host.innerHTML.trim()&&this.labelElement.classList.add("vega-hidden")}async setValue(e){this.checked=this.identifier?e===this.identifier:!0===e}render(){return o(t(a,{class:{"vega-flex-shrink-0 v-min-w-min":"VEGA-CHECKBOX-GROUP"==this.host.parentElement.nodeName,checked:this.checked,disabled:this.isDisabled()}},t("label",{class:{"vega-checkbox-container":!0,error:this.showError},ref:e=>this.inputContainerRef=e},t("input",{ref:e=>this.inputRef=e,type:"checkbox",checked:this.checked,value:this.identifier,onChange:this.onCheckBoxChange,"aria-label":this.identifier||"No label defined",disabled:this.isDisabled(),role:"button",tabIndex:0,onKeyDown:n()}),t("span",{class:{"vega-checkbox-icon":!0,"vega-checkbox-small":"small"===this.size},onClick:this.onSelectedIconClick,tabIndex:-1},this.renderIconDom()),t("div",{class:{"vega-checkbox-label-container":!0,"vega-checkbox-label-small":"small"===this.size},ref:e=>this.labelElement=e},this.renderLabelDom(),this.renderRequireDom()))),this.host)}renderIconDom(){return this.checked?t("vega-icon",{icon:"checkmark",size:"small"===this.size?"size-12":"size-16"}):null}renderLabelDom(){return t("span",{class:"vega-checkbox-label"},t("slot",null))}renderRequireDom(){return t("span",{class:{"vega-require":this.required}},this.required?"*":"")}initValue(){this.value=""!==this.identifier?this.checked?this.identifier:"":this.checked}isDisabled(){return this.disabled||this.groupDisabled}canAcceptGroupDisabledObserver(e){return g(this.host,"vega-checkbox-group")===e.host}groupDisabledObserverListener(e){this.groupDisabled=e.host.disabled}initAndRegisterGroupDisabledObserver(){g(this.host,"vega-checkbox-group")&&(this.groupDisabledObserver=new d(this.canAcceptGroupDisabledObserver.bind(this),this.groupDisabledObserverListener.bind(this)),s.register(l,this.groupDisabledObserver))}unRegisterGroupDisabledObserver(){this.groupDisabledObserver&&s.unregister(l,this.groupDisabledObserver)}get host(){return r(this)}static get watchers(){return{checked:["watchCheckedChange"]}}};E([u()],G.prototype,"globalSlimmers",void 0),E([f()],G.prototype,"vegaCheckboxShowErrorController",void 0),E([f()],G.prototype,"formFieldController",void 0),E([f()],G.prototype,"changeEventEmitter",void 0),E([f()],G.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),G.style=':host{display:inline-block;vertical-align:middle}.vega-checkbox-container{position:relative;display:flex;-webkit-tap-highlight-color:transparent}.vega-checkbox-container>input[type=checkbox]{position:absolute;left:0px;top:0px;opacity:0;width:24px;height:24px;padding:0px;margin:0px}.vega-checkbox-container>.vega-checkbox-icon{display:inline-block;box-sizing:border-box;width:24px;height:24px;border-style:solid;border-width:2px;border-color:rgba(var(--v-border-color-action-active, 29, 65, 195, 1));position:relative;left:0px;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1));border-radius:4px;min-width:24px;color:rgba(var(--v-text-inverted-primary, 252, 252, 252, 1))}.vega-checkbox-container>.vega-checkbox-icon.vega-checkbox-small{width:16px;height:16px;min-width:16px;border-radius:2px}.vega-checkbox-container>.vega-checkbox-icon:hover{border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1))}:host(.checked) .vega-checkbox-container>.vega-checkbox-icon{background-color:rgba(var(--v-bg-action, 19, 98, 226, 1))}:host(.checked) .vega-checkbox-container>.vega-checkbox-icon:hover{background-color:rgba(var(--v-bg-action-hover, 4, 112, 236, 1))}.vega-checkbox-container>input[type=checkbox]:focus-visible+.vega-checkbox-icon{box-shadow:0 0 0 4px rgba(var(--v-ring-input-focus, 19, 98, 226, 0.25));border:1px solid rgba(var(--v-border-input-field-focus, 19, 98, 226, 1));outline:none}.vega-checkbox-container>.vega-checkbox-icon:active{border-width:1px;border-style:solid;border-color:rgba(var(--v-border-color-action-active, 29, 65, 195, 1))}:host(.checked) .vega-checkbox-container>.vega-checkbox-icon:active{background-color:rgba(var(--v-bg-action-active, 29, 65, 195, 1))}:host(.checked) .vega-checkbox-container>.vega-checkbox-icon{display:inline-flex;align-items:center;justify-content:center}.vega-checkbox-container:hover{cursor:pointer}.vega-checkbox-container .vega-require{color:rgba(var(--v-text-error, 189, 41, 71, 1));margin-left:4px;vertical-align:middle}.vega-checkbox-container.error>.vega-checkbox-icon{background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}:host(.checked) .vega-checkbox-container.error>.vega-checkbox-icon{background-color:rgba(var(--v-bg-danger, 189, 41, 71, 1))}.vega-checkbox-container.error>.vega-checkbox-icon:hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}:host(.checked) .vega-checkbox-container.error>.vega-checkbox-icon:hover{background-color:rgba(var(--v-bg-danger-hover, 233, 71, 104, 1))}.vega-checkbox-container.error>input[type=checkbox]:focus-visible+.vega-checkbox-icon{box-shadow:0 0 0 4px rgba(var(--v-ring-input-danger-focus, 230, 50, 87, 0.25));border:1px solid rgba(var(--v-border-input-field-danger-focus, 233, 71, 104, 1));outline:none}:host(.checked) .vega-checkbox-container.error>.vega-checkbox-icon:active{background-color:rgba(var(--v-bg-danger-active, 230, 50, 87, 1))}.vega-checkbox-container.error>.vega-checkbox-icon:active{border-width:1px;border-style:solid;border-color:rgba(var(--v-border-color-danger-active, 189, 41, 71, 1))}:host(.disabled) .vega-checkbox-container>.vega-checkbox-icon{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}:host(.checked.disabled) .vega-checkbox-container>.vega-checkbox-icon{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1));border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}:host(.checked.disabled) .vega-checkbox-container>.vega-checkbox-icon>vega-icon{color:rgba(var(--v-text-inverted-primary, 252, 252, 252, 1))}.vega-checkbox-container>.vega-checkbox-label-container{display:inline-block;margin-left:12px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-checkbox-container>.vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-checkbox-container>.vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-checkbox-container>.vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}.vega-checkbox-container>.vega-checkbox-label-container.vega-checkbox-label-small{margin-left:8px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-checkbox-container>.vega-checkbox-label-container.vega-checkbox-label-small{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-checkbox-container>.vega-checkbox-label-container.vega-checkbox-label-small{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-checkbox-container>.vega-checkbox-label-container.vega-checkbox-label-small{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}:host(.disabled) .vega-checkbox-container>.vega-checkbox-label-container{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}.vega-error{display:block;margin-top:12px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}.vega-checkbox-label-container.vega-hidden{display:none}.vega-hidden{display:none}';var q=function(e,i,t,a){var r,n=arguments.length,o=n<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(n<3?r(o):n>3?r(i,t,o):r(i,t))||o);return n>3&&o&&Object.defineProperty(i,t,o),o};const F=class{constructor(t){e(this,t),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.globalSlimmers={},this.formFieldController=new k({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new C:null}],defaultValue:[],validationRulesName:"validationRules",attributeGetter:e=>this[e],inputContainerGetter:()=>this.inputContainerRef,touchableAreaGetter:()=>this.touchableAreaGetter()}),this.checkboxValueChangeObserver=new z(c,(e=>this.childCheckboxValueChange(e))),this.checkboxEventPrevent=new R([y],(()=>this.vegaFlexElement)),this.changeEventEmitter=w(F,y),this.vegaComponentUsageRuntimeMetricsSlimmer=new m,this.label="",this.value=[],this.vegaFlexProp={},this.disabled=!1,this.required=!1,this.hint="",this.isValid=null,this.autoValidation=!0,this.validationRules=[],this.childCheckboxValueChange=e=>{this.syncCheckboxItemsValue(e.detail,e.host.identifier)},this.touchableAreaGetter=()=>{const e=[];return this.vegaCheckboxArray&&this.vegaCheckboxArray.forEach((async i=>{e.push(i.shadowRoot.querySelector("input"))})),e}}async watchValue(){this.initCheckboxArray(),this.changeEventEmitter.emit(this.value),s.notify(h,{host:this.host,detail:this.value})}watchVegaFlexProp(){this.setVegaFlexProperty()}async watchDisabled(){this.notifyGroupDisabledChange()}watchValidationRules(){}componentDidLoad(){this.setVegaFlexProperty(),this.initCheckboxArray(),this.notifyGroupDisabledChange()}render(){return o(t(a,null,this.renderLabelDom(),t("div",{class:"vega-checkbox-group-container",ref:e=>this.inputContainerRef=e},t("vega-flex",{ref:e=>{this.vegaFlexElement=e}},t("slot",null))),this.renderHintDom()),this.host)}renderLabelDom(){return this.label&&t("div",{class:"vega-label"},t("label",{"aria-label":this.label},this.label,this.renderRequireDom()))}renderRequireDom(){return this.required?t("span",{class:"vega-require"},"*"):null}renderHintDom(){return this.hint&&t("div",{class:"vega-hint"},t("label",null,this.hint))}setVegaFlexProperty(){this.vegaFlexProp&&Object.assign(this.vegaFlexElement,{gap:"size-16",direction:"col"},this.vegaFlexProp)}syncCheckboxItemsValue(e,i){e&&!this.value.includes(i)?this.value=[...this.value,i]:!e&&this.value.includes(i)&&(this.value=[...this.value.filter((e=>e!==i))])}initCheckboxArray(){this.vegaCheckboxArray=Array.from(this.host.querySelectorAll("vega-checkbox")),this.vegaCheckboxArray.forEach((e=>{e.checked=!!(this.value&&this.value.length>0)&&this.value.includes(e.identifier)}))}notifyGroupDisabledChange(){s.notify(l,{host:this.host})}get host(){return r(this)}static get watchers(){return{value:["watchValue"],vegaFlexProp:["watchVegaFlexProp"],disabled:["watchDisabled"],validationRules:["watchValidationRules"]}}};q([u()],F.prototype,"globalSlimmers",void 0),q([f()],F.prototype,"formFieldController",void 0),q([f()],F.prototype,"checkboxValueChangeObserver",void 0),q([f()],F.prototype,"checkboxEventPrevent",void 0),q([f()],F.prototype,"changeEventEmitter",void 0),q([f()],F.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),q([I()],F.prototype,"watchVegaFlexProp",null),F.style=':host{display:block;text-align:left;line-height:normal}.vega-error{display:block;margin-top:12px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}.vega-hidden{display:none}.vega-label{margin-bottom:16px}.vega-label label{font-family:"Inter", sans-serif;font-size:18px;font-weight:500;line-height:30px;letter-spacing:0px;color:rgba(var(--v-text-primary, 32, 54, 69, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-label label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:28px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-label label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:28px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-label label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:28px;letter-spacing:0px}}.vega-require{color:rgba(var(--v-text-error, 189, 41, 71, 1));margin-left:4px}.vega-hint{padding-top:12px}.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}';export{G as vega_checkbox,F as vega_checkbox_group}