@globalpayments/vega 2.56.0 → 2.57.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (428) hide show
  1. package/dist/cjs/{app-globals-7e482341.js → app-globals-26e2fe1e.js} +9 -9
  2. package/dist/cjs/card-config-2ee5505e.js +65 -0
  3. package/dist/cjs/{child-nodes-event-prevent-slimmer-29020cc8.js → child-nodes-event-prevent-slimmer-96240a0e.js} +1 -1
  4. package/dist/cjs/{code-block-e56c5216.js → code-block-7650c868.js} +3 -3
  5. package/dist/cjs/{component-usage-runtime-metrics-dcb32c24.js → component-usage-runtime-metrics-d10ace87.js} +1 -1
  6. package/dist/cjs/{component-value-history-controller-slimmer.abstract-9a1285a1.js → component-value-history-controller-slimmer.abstract-a6e4e5bc.js} +3 -3
  7. package/dist/cjs/{content-state-e07c843c.js → content-state-fd5ad4a8.js} +3 -3
  8. package/dist/cjs/{create-public-api-runtime-metrics-slimmer-a3d17afb.js → create-public-api-runtime-metrics-slimmer-e2e274e1.js} +1 -1
  9. package/dist/cjs/{design-token-3e0bd48d.js → design-token-e771bb16.js} +3 -3
  10. package/dist/cjs/{element-appender-slimmer-2b9ca234.js → element-appender-slimmer-7f98d16b.js} +4 -4
  11. package/dist/cjs/{feature-flag-controller-5e58aae4.js → feature-flag-controller-ce2162c8.js} +1 -1
  12. package/dist/cjs/{form-field-controller-slimmer-dc6d0fe1.js → form-field-controller-slimmer-7bb7df10.js} +4 -4
  13. package/dist/cjs/{icon-manager-9a47399c.js → icon-manager-9072356d.js} +1 -1
  14. package/dist/cjs/{image-annotation-action-76e3c89d.js → image-annotation-action-6715d6f3.js} +2 -2
  15. package/dist/cjs/{index-8b247c17.js → index-4d7bce1a.js} +2 -2
  16. package/dist/cjs/{index-ebb1bb17.js → index-ee4bc191.js} +2 -2
  17. package/dist/cjs/index.cjs.js +16 -16
  18. package/dist/cjs/{inject-keyboard-manager-11df8296.js → inject-keyboard-manager-f1f781b7.js} +1 -1
  19. package/dist/cjs/{internal-icon-manager-00f49470.js → internal-icon-manager-f8677abb.js} +1 -1
  20. package/dist/cjs/{keyboard-manager-1843112c.js → keyboard-manager-0be55fb9.js} +1 -1
  21. package/dist/cjs/{keyboard-manager-slimmer-0a5f5770.js → keyboard-manager-slimmer-92c7227b.js} +1 -1
  22. package/dist/cjs/loader.cjs.js +14 -14
  23. package/dist/cjs/{public-rules-1ac67099.js → public-rules-036795a4.js} +6 -6
  24. package/dist/cjs/{responsive-format-facade-e2e11c24.js → responsive-format-facade-d164ced7.js} +7 -7
  25. package/dist/cjs/{rich-text-editor-required-rule-63f50aa4.js → rich-text-editor-required-rule-91eb0e22.js} +1 -1
  26. package/dist/cjs/{state-background-color-formatter-e585a027.js → state-background-color-formatter-c57409ea.js} +1 -1
  27. package/dist/cjs/{string-input-formatter-slimmer-a5feb2ed.js → string-input-formatter-slimmer-dc1747ad.js} +23 -4
  28. package/dist/cjs/{style-formatter-0213d3a8.js → style-formatter-3e7af35b.js} +2 -2
  29. package/dist/cjs/{sub-state-notify-slimmer-f68fbf29.js → sub-state-notify-slimmer-409bbd1a.js} +1 -1
  30. package/dist/cjs/{sub-state-observer-slimmer-e06cdf7e.js → sub-state-observer-slimmer-93d0a609.js} +1 -1
  31. package/dist/cjs/{translation-e5003a00.js → translation-de7e351e.js} +1 -1
  32. package/dist/cjs/{translation-slimmer-127a0f83.js → translation-slimmer-83bdb9fe.js} +1 -1
  33. package/dist/cjs/{type-guard-4ba85fdc.js → type-guard-aa8fdeaf.js} +16 -0
  34. package/dist/cjs/vega-accordion.cjs.entry.js +16 -16
  35. package/dist/cjs/vega-app-footer.cjs.entry.js +1 -1
  36. package/dist/cjs/vega-app-header-button.cjs.entry.js +17 -17
  37. package/dist/cjs/vega-backdrop.cjs.entry.js +1 -1
  38. package/dist/cjs/vega-banner.cjs.entry.js +6 -6
  39. package/dist/cjs/vega-bar-chart.cjs.entry.js +1 -1
  40. package/dist/cjs/vega-box.cjs.entry.js +16 -16
  41. package/dist/cjs/vega-brand-logo.cjs.entry.js +4 -4
  42. package/dist/cjs/vega-breadcrumb.cjs.entry.js +4 -4
  43. package/dist/cjs/vega-button-circle.cjs.entry.js +16 -16
  44. package/dist/cjs/vega-button-group_2.cjs.entry.js +7 -7
  45. package/dist/cjs/vega-button-link.cjs.entry.js +4 -4
  46. package/dist/cjs/vega-button.cjs.entry.js +14 -14
  47. package/dist/cjs/vega-calendar_3.cjs.entry.js +14 -14
  48. package/dist/cjs/vega-card.cjs.entry.js +15 -15
  49. package/dist/cjs/vega-carousel.cjs.entry.js +13 -13
  50. package/dist/cjs/vega-checkbox_2.cjs.entry.js +9 -9
  51. package/dist/cjs/vega-chip.cjs.entry.js +16 -16
  52. package/dist/cjs/vega-code-block.cjs.entry.js +15 -15
  53. package/dist/cjs/vega-color-picker.cjs.entry.js +6 -6
  54. package/dist/cjs/vega-combo-box.cjs.entry.js +12 -12
  55. package/dist/cjs/vega-counter-badge.cjs.entry.js +1 -1
  56. package/dist/cjs/vega-date-picker_2.cjs.entry.js +23 -23
  57. package/dist/cjs/vega-dialog_2.cjs.entry.js +16 -16
  58. package/dist/cjs/vega-divider.cjs.entry.js +15 -15
  59. package/dist/cjs/vega-dropdown_5.cjs.entry.js +20 -20
  60. package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
  61. package/dist/cjs/vega-field-error.cjs.entry.js +1 -1
  62. package/dist/cjs/vega-field-label.cjs.entry.js +1 -1
  63. package/dist/cjs/vega-file-uploader.cjs.entry.js +9 -9
  64. package/dist/cjs/vega-flag-icon.cjs.entry.js +16 -16
  65. package/dist/cjs/vega-flex.cjs.entry.js +16 -16
  66. package/dist/cjs/vega-font.cjs.entry.js +15 -15
  67. package/dist/cjs/vega-form.cjs.entry.js +10 -10
  68. package/dist/cjs/vega-grid.cjs.entry.js +15 -15
  69. package/dist/cjs/vega-hint.cjs.entry.js +1 -1
  70. package/dist/cjs/vega-icon.cjs.entry.js +15 -15
  71. package/dist/cjs/vega-image-uploader.cjs.entry.js +17 -17
  72. package/dist/cjs/vega-input-credit-card.cjs.entry.js +28 -124
  73. package/dist/cjs/vega-input-numeric.cjs.entry.js +13 -13
  74. package/dist/cjs/vega-input-phone-number.cjs.entry.js +16 -16
  75. package/dist/cjs/vega-input-range.cjs.entry.js +10 -10
  76. package/dist/cjs/vega-input-select.cjs.entry.js +18 -18
  77. package/dist/cjs/vega-input.cjs.entry.js +203 -11
  78. package/dist/cjs/{vega-internal-event-id-6cdc95fe.js → vega-internal-event-id-bda08efa.js} +6 -0
  79. package/dist/cjs/vega-item-toggle.cjs.entry.js +1 -1
  80. package/dist/cjs/vega-left-nav_5.cjs.entry.js +18 -18
  81. package/dist/cjs/vega-line-chart.cjs.entry.js +1 -1
  82. package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +13 -13
  83. package/dist/cjs/vega-page-notification_2.cjs.entry.js +1 -1
  84. package/dist/cjs/vega-pagination-page-selector-mobile.cjs.entry.js +5 -5
  85. package/dist/cjs/vega-pagination-page-size-selector-mobile.cjs.entry.js +5 -5
  86. package/dist/cjs/vega-pagination.cjs.entry.js +15 -15
  87. package/dist/cjs/vega-pie-chart.cjs.entry.js +1 -1
  88. package/dist/cjs/vega-popover_2.cjs.entry.js +16 -16
  89. package/dist/cjs/vega-progress-tracker.cjs.entry.js +1 -1
  90. package/dist/cjs/vega-radio_2.cjs.entry.js +12 -12
  91. package/dist/cjs/vega-rich-text-content.cjs.entry.js +12 -12
  92. package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +23 -23
  93. package/dist/cjs/vega-section-title.cjs.entry.js +1 -1
  94. package/dist/cjs/vega-segment-control.cjs.entry.js +1 -1
  95. package/dist/cjs/vega-selection-chip_2.cjs.entry.js +17 -17
  96. package/dist/cjs/vega-selection-tile_2.cjs.entry.js +10 -10
  97. package/dist/cjs/vega-sidenav_3.cjs.entry.js +16 -16
  98. package/dist/cjs/vega-signature-capture.cjs.entry.js +19 -19
  99. package/dist/cjs/{vega-skeleton-loader-controller-3833c813.js → vega-skeleton-loader-controller-d534f5a1.js} +1 -1
  100. package/dist/cjs/vega-skeleton.cjs.entry.js +1 -1
  101. package/dist/cjs/vega-slot-container.cjs.entry.js +1 -1
  102. package/dist/cjs/vega-stepper.cjs.entry.js +9 -9
  103. package/dist/cjs/vega-tab-group_2.cjs.entry.js +4 -4
  104. package/dist/cjs/vega-table_8.cjs.entry.js +1474 -316
  105. package/dist/cjs/vega-text.cjs.entry.js +1 -1
  106. package/dist/cjs/vega-textarea.cjs.entry.js +9 -9
  107. package/dist/cjs/vega-time-picker_2.cjs.entry.js +20 -20
  108. package/dist/cjs/vega-toggle-switch.cjs.entry.js +6 -6
  109. package/dist/cjs/vega-tooltip_2.cjs.entry.js +16 -16
  110. package/dist/cjs/vega.cjs.js +14 -14
  111. package/dist/cjs/{wait-for-vega-handler-4491efc9.js → wait-for-vega-handler-5469ff80.js} +1 -1
  112. package/dist/collection/components/vega-input/slimmers/controllers/vega-input-mask-config-controller.js +25 -2
  113. package/dist/collection/components/vega-input/vega-input.js +1 -1
  114. package/dist/collection/components/vega-input-credit-card/vega-input-credit-card.js +13 -52
  115. package/dist/collection/components/vega-table/slimmers/controllers/dto/column-render-input-model.js +216 -0
  116. package/dist/collection/components/vega-table/slimmers/controllers/dto/column-structure-model.js +238 -0
  117. package/dist/collection/components/vega-table/slimmers/controllers/dto/test/column-render-input-model.test.js +83 -0
  118. package/dist/collection/components/vega-table/slimmers/controllers/dto/test/column-structure-model.test.js +147 -0
  119. package/dist/collection/components/vega-table/slimmers/controllers/vega-table-column-structure-model-controller.js +66 -0
  120. package/dist/collection/components/vega-table/slimmers/controllers/vega-table-render-input-controller.js +171 -0
  121. package/dist/collection/components/vega-table/slimmers/renderers/vega-table-body-renderer.js +6 -1
  122. package/dist/collection/components/vega-table/slimmers/renderers/vega-table-cell-renderer.js +22 -4
  123. package/dist/collection/components/vega-table/slimmers/renderers/vega-table-col-group-renderer.js +13 -3
  124. package/dist/collection/components/vega-table/slimmers/renderers/vega-table-header-renderer.js +43 -6
  125. package/dist/collection/components/vega-table/slimmers/renderers/vega-table-pinned-renderer.js +175 -0
  126. package/dist/collection/components/vega-table/slimmers/renderers/vega-table-renderer.js +7 -0
  127. package/dist/collection/components/vega-table/slimmers/renderers/vega-table-row-renderer.js +6 -5
  128. package/dist/collection/components/vega-table/vega-table-cell/slimmers/controllers/vega-table-cell-state-controller.js +41 -0
  129. package/dist/collection/components/vega-table/vega-table-cell/slimmers/controllers/vega-table-row-state-controller.js +48 -0
  130. package/dist/collection/components/vega-table/vega-table-cell/vega-table-cell.css +58 -11
  131. package/dist/collection/components/vega-table/vega-table-cell/vega-table-cell.js +49 -6
  132. package/dist/collection/components/vega-table/vega-table-expand-row/slimmers/renderers/vega-table-expand-row-renderer.js +5 -1
  133. package/dist/collection/components/vega-table/vega-table-expand-row/vega-table-expand-row.css +11 -0
  134. package/dist/collection/components/vega-table/vega-table-head-cell/slimmers/controllers/vega-table-head-cell-state-controller.js +15 -0
  135. package/dist/collection/components/vega-table/vega-table-head-cell/vega-table-head-cell.css +42 -11
  136. package/dist/collection/components/vega-table/vega-table-head-cell/vega-table-head-cell.js +45 -9
  137. package/dist/collection/components/vega-table/vega-table-head-row/slimmers/renderers/vega-table-head-row-renderer.js +53 -10
  138. package/dist/collection/components/vega-table/vega-table-head-row/vega-table-head-row.css +37 -0
  139. package/dist/collection/components/vega-table/vega-table-row/vega-table-row.css +5 -16
  140. package/dist/collection/components/vega-table/vega-table-row/vega-table-row.js +21 -0
  141. package/dist/collection/components/vega-table/vega-table.css +22 -0
  142. package/dist/collection/components/vega-table/vega-table.js +52 -1
  143. package/dist/collection/constants/card-config.js +4 -4
  144. package/dist/collection/helpers/event-manager/event-id/vega-internal-event-id.js +3 -0
  145. package/dist/collection/helpers/formatter/string-formatter/credit-card-blur-mask-strategy.js +74 -0
  146. package/dist/collection/helpers/formatter/string-formatter/credit-card-input-mask-strategy.js +34 -0
  147. package/dist/collection/helpers/formatter/string-formatter/credit-card-mask-strategy.abstract.js +63 -0
  148. package/dist/collection/helpers/formatter/string-formatter/string-format-strategy.abstract.js +4 -1
  149. package/dist/collection/helpers/formatter/string-formatter/string-mask-strategy.js +8 -0
  150. package/dist/collection/helpers/slimmers/string-input-formatter-slimmer.js +8 -0
  151. package/dist/collection/types/type-guard.js +15 -0
  152. package/dist/esm/{app-globals-b5881948.js → app-globals-ee6a1250.js} +9 -9
  153. package/dist/esm/card-config-d2ad484e.js +63 -0
  154. package/dist/esm/{child-nodes-event-prevent-slimmer-2b975cbf.js → child-nodes-event-prevent-slimmer-b59a578e.js} +1 -1
  155. package/dist/esm/{code-block-1cdb0599.js → code-block-7bd4cb87.js} +3 -3
  156. package/dist/esm/{component-usage-runtime-metrics-385c7124.js → component-usage-runtime-metrics-a84cc93e.js} +1 -1
  157. package/dist/esm/{component-value-history-controller-slimmer.abstract-c12b2958.js → component-value-history-controller-slimmer.abstract-41c58caf.js} +3 -3
  158. package/dist/esm/{content-state-cf27d19b.js → content-state-a43e703e.js} +3 -3
  159. package/dist/esm/{create-public-api-runtime-metrics-slimmer-8ada793f.js → create-public-api-runtime-metrics-slimmer-bedf3a1e.js} +1 -1
  160. package/dist/esm/{design-token-96e03257.js → design-token-23522f5c.js} +3 -3
  161. package/dist/esm/{element-appender-slimmer-00dcccb9.js → element-appender-slimmer-042df95a.js} +4 -4
  162. package/dist/esm/{feature-flag-controller-0fbe8fb0.js → feature-flag-controller-51659753.js} +2 -2
  163. package/dist/esm/{form-field-controller-slimmer-6f49d396.js → form-field-controller-slimmer-f0982f11.js} +4 -4
  164. package/dist/esm/{icon-manager-638dd4d4.js → icon-manager-2ee1c619.js} +1 -1
  165. package/dist/esm/{image-annotation-action-e76b3396.js → image-annotation-action-1e88f5a0.js} +2 -2
  166. package/dist/esm/{index-44c794b4.js → index-e9da316f.js} +2 -2
  167. package/dist/esm/{index-f5d2fe61.js → index-fb3b74bd.js} +2 -2
  168. package/dist/esm/index.js +16 -16
  169. package/dist/esm/{inject-keyboard-manager-a15cf43c.js → inject-keyboard-manager-5141d09a.js} +1 -1
  170. package/dist/esm/{internal-icon-manager-58cf8aa6.js → internal-icon-manager-7eac52c8.js} +1 -1
  171. package/dist/esm/{keyboard-manager-f496a623.js → keyboard-manager-3ffe81b0.js} +1 -1
  172. package/dist/esm/{keyboard-manager-slimmer-a4cc9593.js → keyboard-manager-slimmer-751e98f5.js} +1 -1
  173. package/dist/esm/loader.js +14 -14
  174. package/dist/esm/{public-rules-e8616346.js → public-rules-287d4d77.js} +6 -6
  175. package/dist/esm/{responsive-format-facade-464498b6.js → responsive-format-facade-d2632288.js} +7 -7
  176. package/dist/esm/{rich-text-editor-required-rule-69844536.js → rich-text-editor-required-rule-69d5f035.js} +1 -1
  177. package/dist/esm/{state-background-color-formatter-121ae7d3.js → state-background-color-formatter-da5e76e8.js} +1 -1
  178. package/dist/esm/{string-input-formatter-slimmer-e53b6412.js → string-input-formatter-slimmer-09478e0d.js} +24 -5
  179. package/dist/esm/{style-formatter-670e20f7.js → style-formatter-f7951677.js} +2 -2
  180. package/dist/esm/{sub-state-notify-slimmer-b6c8051c.js → sub-state-notify-slimmer-0a6c3cbb.js} +1 -1
  181. package/dist/esm/{sub-state-observer-slimmer-93eeb87d.js → sub-state-observer-slimmer-53eec5fb.js} +1 -1
  182. package/dist/esm/{translation-71e0711d.js → translation-a6eacb5f.js} +1 -1
  183. package/dist/esm/{translation-slimmer-e6b130bf.js → translation-slimmer-f28e4708.js} +1 -1
  184. package/dist/esm/{type-guard-158f6d7a.js → type-guard-84b1f192.js} +16 -1
  185. package/dist/esm/vega-accordion.entry.js +16 -16
  186. package/dist/esm/vega-app-footer.entry.js +1 -1
  187. package/dist/esm/vega-app-header-button.entry.js +17 -17
  188. package/dist/esm/vega-backdrop.entry.js +1 -1
  189. package/dist/esm/vega-banner.entry.js +6 -6
  190. package/dist/esm/vega-bar-chart.entry.js +1 -1
  191. package/dist/esm/vega-box.entry.js +16 -16
  192. package/dist/esm/vega-brand-logo.entry.js +4 -4
  193. package/dist/esm/vega-breadcrumb.entry.js +4 -4
  194. package/dist/esm/vega-button-circle.entry.js +16 -16
  195. package/dist/esm/vega-button-group_2.entry.js +7 -7
  196. package/dist/esm/vega-button-link.entry.js +4 -4
  197. package/dist/esm/vega-button.entry.js +14 -14
  198. package/dist/esm/vega-calendar_3.entry.js +14 -14
  199. package/dist/esm/vega-card.entry.js +15 -15
  200. package/dist/esm/vega-carousel.entry.js +13 -13
  201. package/dist/esm/vega-checkbox_2.entry.js +9 -9
  202. package/dist/esm/vega-chip.entry.js +16 -16
  203. package/dist/esm/vega-code-block.entry.js +15 -15
  204. package/dist/esm/vega-color-picker.entry.js +6 -6
  205. package/dist/esm/vega-combo-box.entry.js +12 -12
  206. package/dist/esm/vega-counter-badge.entry.js +1 -1
  207. package/dist/esm/vega-date-picker_2.entry.js +23 -23
  208. package/dist/esm/vega-dialog_2.entry.js +16 -16
  209. package/dist/esm/vega-divider.entry.js +15 -15
  210. package/dist/esm/vega-dropdown_5.entry.js +20 -20
  211. package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
  212. package/dist/esm/vega-field-error.entry.js +1 -1
  213. package/dist/esm/vega-field-label.entry.js +1 -1
  214. package/dist/esm/vega-file-uploader.entry.js +9 -9
  215. package/dist/esm/vega-flag-icon.entry.js +16 -16
  216. package/dist/esm/vega-flex.entry.js +16 -16
  217. package/dist/esm/vega-font.entry.js +15 -15
  218. package/dist/esm/vega-form.entry.js +10 -10
  219. package/dist/esm/vega-grid.entry.js +15 -15
  220. package/dist/esm/vega-hint.entry.js +1 -1
  221. package/dist/esm/vega-icon.entry.js +15 -15
  222. package/dist/esm/vega-image-uploader.entry.js +17 -17
  223. package/dist/esm/vega-input-credit-card.entry.js +27 -123
  224. package/dist/esm/vega-input-numeric.entry.js +13 -13
  225. package/dist/esm/vega-input-phone-number.entry.js +16 -16
  226. package/dist/esm/vega-input-range.entry.js +10 -10
  227. package/dist/esm/vega-input-select.entry.js +18 -18
  228. package/dist/esm/vega-input.entry.js +203 -11
  229. package/dist/esm/{vega-internal-event-id-178b2743.js → vega-internal-event-id-4072659b.js} +4 -1
  230. package/dist/esm/vega-item-toggle.entry.js +1 -1
  231. package/dist/esm/vega-left-nav_5.entry.js +18 -18
  232. package/dist/esm/vega-line-chart.entry.js +1 -1
  233. package/dist/esm/vega-loader-wrapper_2.entry.js +13 -13
  234. package/dist/esm/vega-page-notification_2.entry.js +1 -1
  235. package/dist/esm/vega-pagination-page-selector-mobile.entry.js +5 -5
  236. package/dist/esm/vega-pagination-page-size-selector-mobile.entry.js +5 -5
  237. package/dist/esm/vega-pagination.entry.js +15 -15
  238. package/dist/esm/vega-pie-chart.entry.js +1 -1
  239. package/dist/esm/vega-popover_2.entry.js +16 -16
  240. package/dist/esm/vega-progress-tracker.entry.js +1 -1
  241. package/dist/esm/vega-radio_2.entry.js +12 -12
  242. package/dist/esm/vega-rich-text-content.entry.js +12 -12
  243. package/dist/esm/vega-rich-text-editor_4.entry.js +23 -23
  244. package/dist/esm/vega-section-title.entry.js +1 -1
  245. package/dist/esm/vega-segment-control.entry.js +1 -1
  246. package/dist/esm/vega-selection-chip_2.entry.js +17 -17
  247. package/dist/esm/vega-selection-tile_2.entry.js +10 -10
  248. package/dist/esm/vega-sidenav_3.entry.js +16 -16
  249. package/dist/esm/vega-signature-capture.entry.js +19 -19
  250. package/dist/esm/{vega-skeleton-loader-controller-9d1ffa6c.js → vega-skeleton-loader-controller-3f6faa17.js} +1 -1
  251. package/dist/esm/vega-skeleton.entry.js +1 -1
  252. package/dist/esm/vega-slot-container.entry.js +1 -1
  253. package/dist/esm/vega-stepper.entry.js +9 -9
  254. package/dist/esm/vega-tab-group_2.entry.js +4 -4
  255. package/dist/esm/vega-table_8.entry.js +1475 -317
  256. package/dist/esm/vega-text.entry.js +1 -1
  257. package/dist/esm/vega-textarea.entry.js +9 -9
  258. package/dist/esm/vega-time-picker_2.entry.js +20 -20
  259. package/dist/esm/vega-toggle-switch.entry.js +6 -6
  260. package/dist/esm/vega-tooltip_2.entry.js +16 -16
  261. package/dist/esm/vega.js +14 -14
  262. package/dist/esm/{wait-for-vega-handler-e0a928cd.js → wait-for-vega-handler-c2c07ac3.js} +1 -1
  263. package/dist/types/components/vega-input/slimmers/controllers/vega-input-mask-config-controller.d.ts +7 -0
  264. package/dist/types/components/vega-input/types.d.ts +10 -1
  265. package/dist/types/components/vega-input-credit-card/vega-input-credit-card.d.ts +1 -13
  266. package/dist/types/components/vega-table/interface.d.ts +38 -0
  267. package/dist/types/components/vega-table/slimmers/controllers/dto/column-render-input-model.d.ts +138 -0
  268. package/dist/types/components/vega-table/slimmers/controllers/dto/column-structure-model.d.ts +140 -0
  269. package/dist/types/components/vega-table/slimmers/controllers/dto/test/column-render-input-model.test.d.ts +1 -0
  270. package/dist/types/components/vega-table/slimmers/controllers/dto/test/column-structure-model.test.d.ts +1 -0
  271. package/dist/types/components/vega-table/slimmers/controllers/vega-table-column-structure-model-controller.d.ts +35 -0
  272. package/dist/types/components/vega-table/slimmers/controllers/vega-table-render-input-controller.d.ts +103 -0
  273. package/dist/types/components/vega-table/slimmers/renderers/vega-table-body-renderer.d.ts +1 -0
  274. package/dist/types/components/vega-table/slimmers/renderers/vega-table-cell-renderer.d.ts +5 -2
  275. package/dist/types/components/vega-table/slimmers/renderers/vega-table-col-group-renderer.d.ts +1 -0
  276. package/dist/types/components/vega-table/slimmers/renderers/vega-table-header-renderer.d.ts +4 -1
  277. package/dist/types/components/vega-table/slimmers/renderers/vega-table-pinned-renderer.d.ts +18 -0
  278. package/dist/types/components/vega-table/slimmers/renderers/vega-table-renderer.d.ts +1 -0
  279. package/dist/types/components/vega-table/slimmers/renderers/vega-table-row-renderer.d.ts +1 -1
  280. package/dist/types/components/vega-table/vega-table-cell/slimmers/controllers/vega-table-cell-state-controller.d.ts +4 -0
  281. package/dist/types/components/vega-table/vega-table-cell/slimmers/controllers/vega-table-row-state-controller.d.ts +15 -0
  282. package/dist/types/components/vega-table/vega-table-cell/vega-table-cell.d.ts +10 -0
  283. package/dist/types/components/vega-table/vega-table-expand-row/slimmers/renderers/vega-table-expand-row-renderer.d.ts +1 -0
  284. package/dist/types/components/vega-table/vega-table-head-cell/slimmers/controllers/vega-table-head-cell-state-controller.d.ts +1 -0
  285. package/dist/types/components/vega-table/vega-table-head-cell/vega-table-head-cell.d.ts +8 -1
  286. package/dist/types/components/vega-table/vega-table-head-row/slimmers/renderers/vega-table-head-row-renderer.d.ts +1 -0
  287. package/dist/types/components/vega-table/vega-table-row/vega-table-row.d.ts +5 -0
  288. package/dist/types/components/vega-table/vega-table.d.ts +17 -1
  289. package/dist/types/components.d.ts +21 -1
  290. package/dist/types/helpers/event-manager/event-id/vega-internal-event-id.d.ts +3 -0
  291. package/dist/types/helpers/formatter/string-formatter/credit-card-blur-mask-strategy.d.ts +28 -0
  292. package/dist/types/helpers/formatter/string-formatter/credit-card-input-mask-strategy.d.ts +21 -0
  293. package/dist/types/helpers/formatter/string-formatter/credit-card-mask-strategy.abstract.d.ts +36 -0
  294. package/dist/types/helpers/formatter/string-formatter/string-format-strategy.abstract.d.ts +1 -1
  295. package/dist/types/helpers/formatter/string-formatter/string-mask-strategy.d.ts +9 -3
  296. package/dist/types/helpers/slimmers/string-input-formatter-slimmer.d.ts +4 -0
  297. package/dist/types/types/components.type.d.ts +2 -0
  298. package/dist/types/types/public-api.d.ts +1 -0
  299. package/dist/types/types/type-guard.d.ts +10 -0
  300. package/dist/vega/index.esm.js +1 -1
  301. package/dist/vega/{p-4df90a1b.entry.js → p-080db42b.entry.js} +1 -1
  302. package/dist/vega/{p-dc383362.entry.js → p-083af15f.entry.js} +1 -1
  303. package/dist/vega/{p-246090cf.entry.js → p-091ab617.entry.js} +1 -1
  304. package/dist/vega/{p-e5eda663.entry.js → p-0b5330e1.entry.js} +1 -1
  305. package/dist/vega/{p-7e70938a.entry.js → p-1792a352.entry.js} +1 -1
  306. package/dist/vega/{p-ec7dc51f.entry.js → p-1a4f77de.entry.js} +1 -1
  307. package/dist/vega/{p-1737536e.entry.js → p-1a6dacc7.entry.js} +1 -1
  308. package/dist/vega/{p-c5afd9aa.entry.js → p-1db2ba98.entry.js} +1 -1
  309. package/dist/vega/{p-c9f544bd.entry.js → p-1f9a735a.entry.js} +1 -1
  310. package/dist/vega/{p-002062c3.entry.js → p-24042f0c.entry.js} +1 -1
  311. package/dist/vega/{p-03c759ae.entry.js → p-27ec0c07.entry.js} +1 -1
  312. package/dist/vega/{p-578ac47f.entry.js → p-311f338d.entry.js} +1 -1
  313. package/dist/vega/{p-0c660956.entry.js → p-317920e6.entry.js} +1 -1
  314. package/dist/vega/{p-5016b57e.entry.js → p-34dc3f71.entry.js} +1 -1
  315. package/dist/vega/{p-302e01e9.entry.js → p-376b3ec7.entry.js} +1 -1
  316. package/dist/vega/{p-586139ce.entry.js → p-394594e9.entry.js} +1 -1
  317. package/dist/vega/{p-a2c4c241.entry.js → p-397b5d91.entry.js} +1 -1
  318. package/dist/vega/{p-08a0cbd0.entry.js → p-39906ad2.entry.js} +1 -1
  319. package/dist/vega/{p-06cd4a19.entry.js → p-41465ad0.entry.js} +1 -1
  320. package/dist/vega/{p-fac5990f.entry.js → p-42ec43ef.entry.js} +1 -1
  321. package/dist/vega/{p-da1d0c02.js → p-43263510.js} +1 -1
  322. package/dist/vega/{p-e2282f71.entry.js → p-435451be.entry.js} +1 -1
  323. package/dist/vega/{p-04c8b83d.entry.js → p-45eb1e01.entry.js} +1 -1
  324. package/dist/vega/{p-7a8b6f2f.entry.js → p-4674c318.entry.js} +1 -1
  325. package/dist/vega/p-472108bd.entry.js +1 -0
  326. package/dist/vega/{p-b6e0d996.entry.js → p-48ae6f02.entry.js} +1 -1
  327. package/dist/vega/{p-7cc20ed5.entry.js → p-48b24fd3.entry.js} +1 -1
  328. package/dist/vega/p-49fd1009.js +1 -0
  329. package/dist/vega/{p-66516ee9.js → p-4a237308.js} +1 -1
  330. package/dist/vega/{p-46eb330f.entry.js → p-4ab67150.entry.js} +1 -1
  331. package/dist/vega/{p-9a9766cc.entry.js → p-4c4ac1a5.entry.js} +1 -1
  332. package/dist/vega/{p-6bd7114d.entry.js → p-4c871d0f.entry.js} +1 -1
  333. package/dist/vega/p-4fb159d5.js +1 -0
  334. package/dist/vega/{p-72a4edf2.entry.js → p-500684e1.entry.js} +1 -1
  335. package/dist/vega/{p-bba5b112.entry.js → p-59282fc8.entry.js} +1 -1
  336. package/dist/vega/p-5bd3487e.js +1 -0
  337. package/dist/vega/{p-fa5eb496.js → p-5d676a94.js} +1 -1
  338. package/dist/vega/{p-b1f65b13.js → p-5e2c9e69.js} +1 -1
  339. package/dist/vega/p-5f377954.js +1 -1
  340. package/dist/vega/{p-e860318d.entry.js → p-5f6b942c.entry.js} +1 -1
  341. package/dist/vega/{p-5cb92c51.entry.js → p-5fe47fe8.entry.js} +1 -1
  342. package/dist/vega/{p-2a6517f9.entry.js → p-61ea2d75.entry.js} +1 -1
  343. package/dist/vega/{p-c0043eed.entry.js → p-63adca7b.entry.js} +1 -1
  344. package/dist/vega/{p-6419abd9.entry.js → p-66e9d31a.entry.js} +1 -1
  345. package/dist/vega/p-699032fc.entry.js +1 -0
  346. package/dist/vega/{p-7503fe08.entry.js → p-6dad2e5c.entry.js} +1 -1
  347. package/dist/vega/{p-f50cd6c3.entry.js → p-710da484.entry.js} +1 -1
  348. package/dist/vega/{p-397c7199.js → p-71c65f7e.js} +1 -1
  349. package/dist/vega/{p-0ce88865.entry.js → p-7c348ac7.entry.js} +1 -1
  350. package/dist/vega/{p-fc790de5.entry.js → p-7d5ebd26.entry.js} +1 -1
  351. package/dist/vega/{p-487c0f17.entry.js → p-81279fea.entry.js} +1 -1
  352. package/dist/vega/p-81ed90d5.js +1 -0
  353. package/dist/vega/{p-aab6f547.entry.js → p-82b18195.entry.js} +1 -1
  354. package/dist/vega/{p-cc6410e6.js → p-832b59af.js} +1 -1
  355. package/dist/vega/{p-5c9efff8.entry.js → p-86a300e8.entry.js} +1 -1
  356. package/dist/vega/{p-138fcf6e.js → p-8782abeb.js} +1 -1
  357. package/dist/vega/{p-68864531.js → p-88e08a33.js} +1 -1
  358. package/dist/vega/{p-cc63e827.js → p-8c46e116.js} +1 -1
  359. package/dist/vega/{p-8e31e7ea.js → p-8c4f893b.js} +1 -1
  360. package/dist/vega/{p-6ec0e3ce.entry.js → p-8e581755.entry.js} +1 -1
  361. package/dist/vega/{p-a46ac2eb.js → p-8e662f26.js} +1 -1
  362. package/dist/vega/{p-3162a3f0.entry.js → p-8f8de5ab.entry.js} +1 -1
  363. package/dist/vega/p-92355996.entry.js +1 -0
  364. package/dist/vega/{p-d8e1ed2d.js → p-9a956a00.js} +1 -1
  365. package/dist/vega/{p-778fd499.js → p-9afdcf65.js} +1 -1
  366. package/dist/vega/p-9b08ed46.entry.js +1 -0
  367. package/dist/vega/{p-1ebc1acf.entry.js → p-9ca7467d.entry.js} +1 -1
  368. package/dist/vega/{p-81e56716.entry.js → p-9ce0bd82.entry.js} +2 -2
  369. package/dist/vega/{p-4ab3df00.js → p-9d6003ef.js} +1 -1
  370. package/dist/vega/p-a04491cc.entry.js +1 -0
  371. package/dist/vega/{p-1a7d0e21.entry.js → p-a1056063.entry.js} +1 -1
  372. package/dist/vega/{p-f3ec4ae6.entry.js → p-a1e50e6c.entry.js} +1 -1
  373. package/dist/vega/p-a4670e23.js +1 -0
  374. package/dist/vega/{p-7728041e.entry.js → p-a4a0fcfd.entry.js} +1 -1
  375. package/dist/vega/{p-a42bc438.entry.js → p-a7042a5a.entry.js} +1 -1
  376. package/dist/vega/p-acf7667e.entry.js +1 -0
  377. package/dist/vega/{p-b3da0b44.entry.js → p-b21b128c.entry.js} +1 -1
  378. package/dist/vega/{p-144d2390.entry.js → p-b75a8edb.entry.js} +1 -1
  379. package/dist/vega/{p-d5f1794e.js → p-bcdb235d.js} +1 -1
  380. package/dist/vega/{p-36827489.entry.js → p-bd84b7b9.entry.js} +1 -1
  381. package/dist/vega/{p-6b8d105e.entry.js → p-c21295cf.entry.js} +1 -1
  382. package/dist/vega/{p-ac3a2d9c.entry.js → p-c42ec0ac.entry.js} +1 -1
  383. package/dist/vega/{p-bbdc6170.entry.js → p-c69a6547.entry.js} +1 -1
  384. package/dist/vega/p-c9740710.entry.js +1 -0
  385. package/dist/vega/{p-59f1fd3e.entry.js → p-ce5a3589.entry.js} +1 -1
  386. package/dist/vega/{p-1c3e1134.js → p-d1355307.js} +1 -1
  387. package/dist/vega/{p-6b7dca3e.js → p-d789b291.js} +1 -1
  388. package/dist/vega/{p-c685adcd.js → p-d7e0c57a.js} +1 -1
  389. package/dist/vega/p-d849e0f5.js +1 -0
  390. package/dist/vega/{p-7a40e033.js → p-db8cdba6.js} +1 -1
  391. package/dist/vega/{p-f4a13f3f.js → p-e1ed78db.js} +1 -1
  392. package/dist/vega/{p-4d793cb0.js → p-e77a83e4.js} +1 -1
  393. package/dist/vega/{p-c990e249.js → p-e940bc37.js} +1 -1
  394. package/dist/vega/p-ef84dc90.entry.js +1 -0
  395. package/dist/vega/{p-c9b9322b.js → p-f08a4adf.js} +1 -1
  396. package/dist/vega/{p-ae74d511.js → p-f229d6d1.js} +1 -1
  397. package/dist/vega/{p-dc3d93d6.js → p-f25570f5.js} +1 -1
  398. package/dist/vega/{p-576b812b.entry.js → p-f27fcc7c.entry.js} +1 -1
  399. package/dist/vega/{p-5f86a286.entry.js → p-f3ab00ad.entry.js} +1 -1
  400. package/dist/vega/{p-151dec6a.entry.js → p-f3bd26a1.entry.js} +1 -1
  401. package/dist/vega/p-f543e911.entry.js +1 -0
  402. package/dist/vega/p-f5ac60f5.js +1 -0
  403. package/dist/vega/p-f7b5833d.entry.js +1 -0
  404. package/dist/vega/{p-73821eba.entry.js → p-f940b7f7.entry.js} +1 -1
  405. package/dist/vega/p-fc02a67a.js +1 -0
  406. package/dist/vega/p-fcb5b40f.entry.js +1 -0
  407. package/dist/vega/{p-4b2a90b8.js → p-fda6f8bc.js} +1 -1
  408. package/dist/vega/{p-5be150cb.entry.js → p-fe1512f9.entry.js} +1 -1
  409. package/dist/vega/vega.esm.js +1 -1
  410. package/package.json +2 -2
  411. package/dist/vega/p-063d0bee.entry.js +0 -1
  412. package/dist/vega/p-2205ee4c.js +0 -1
  413. package/dist/vega/p-23064067.entry.js +0 -1
  414. package/dist/vega/p-2f6c4f2c.entry.js +0 -1
  415. package/dist/vega/p-37b05e0b.js +0 -1
  416. package/dist/vega/p-425ba7d6.js +0 -1
  417. package/dist/vega/p-4387d550.js +0 -1
  418. package/dist/vega/p-4a12fb0d.entry.js +0 -1
  419. package/dist/vega/p-4c595d8d.entry.js +0 -1
  420. package/dist/vega/p-5e530257.js +0 -1
  421. package/dist/vega/p-61e1e356.entry.js +0 -1
  422. package/dist/vega/p-636142ae.entry.js +0 -1
  423. package/dist/vega/p-6a7b7214.js +0 -1
  424. package/dist/vega/p-78937642.entry.js +0 -1
  425. package/dist/vega/p-7cb11f3f.entry.js +0 -1
  426. package/dist/vega/p-962b40d1.entry.js +0 -1
  427. package/dist/vega/p-9d286c08.entry.js +0 -1
  428. package/dist/vega/p-d64b20c2.js +0 -1
@@ -1 +1 @@
1
- import{i as t}from"./p-b1f65b13.js";import{C as e}from"./p-2d0d575f.js";import{d as s}from"./p-6e01f0a2.js";import{a as n,b as i}from"./p-425ba7d6.js";import{L as r}from"./p-6e1ab235.js";import{g as o}from"./p-37b05e0b.js";import{V as c}from"./p-0c8bd757.js";var a,h;!function(t){t.SELECTION_RANGE="SELECTION_RANGE",t.CLEAR_FORMATTING="CLEAR_FORMATTING",t.LINK_GROUP="LINK_GROUP"}(a||(a={}));class l{}!function(t){t.ALIGNMENT="ALIGNMENT",t.TEXT_STYLE="TEXT_STYLE",t.INDENT="INDENT"}(h||(h={}));class u extends l{}const d=new class{constructor(){this.domToEntity=new WeakMap,this.entityToDOM=new WeakMap}register(t,e){this.domToEntity.set(t,e),this.entityToDOM.set(e,t)}getEntityByDOM(t){return this.domToEntity.get(t)}getDOMByEntity(t){return this.entityToDOM.get(t)}removeDirtyDomRef(t){this.domToEntity.delete(t)}};var p,f,w;!function(t){t.DELETE_CHILD="DELETE_CHILD",t.DELETE_NEST_LIST="DELETE_NEST_LIST",t.UPDATE_TEXT="UPDATE_TEXT",t.REPLACE_SELECTED_TEXT="REPLACE_SELECTED_TEXT",t.APPEND_CHILD_NODES="APPEND_CHILD_NODES",t.INSERT_BLOCKS_AFTER="INSERT_BLOCKS_AFTER",t.INSERT_BLOCKS_BEFORE="INSERT_BLOCKS_BEFORE",t.INSERT_NODES_AFTER="INSERT_NODES_AFTER",t.INSERT_NODES_BEFORE="INSERT_NODES_BEFORE",t.SPLIT_BLOCK_WITH_NODE="SPLIT_BLOCK_WITH_NODE",t.REPLACE_CHILD_NODES="REPLACE_CHILD_NODES",t.REPLACE_NEST_LIST="REPLACE_NEST_LIST",t.MERGE_TWO_BLOCKS_NODES="MERGE_TWO_BLOCKS_NODES",t.BREAK_SINGLE_BLOCK="BREAK_SINGLE_BLOCK",t.LINE_BREAK_SINGLE_BLOCK="LINE_BREAK_SINGLE_BLOCK",t.LINE_BREAK_MULTIPLE_BLOCKS="LINE_BREAK_MULTIPLE_BLOCKS",t.TRANSFORM_LIST_BLOCK="TRANSFORM_LIST_BLOCK",t.TRANSFORM_PARAGRAPH_BLOCK="TRANSFORM_PARAGRAPH_BLOCK",t.DELETE_BLOCK_CONTENT="DELETE_BLOCK_CONTENT",t.INSERT_IMAGE_TO_BLOCK="INSERT_IMAGE_TO_BLOCK",t.UPDATE_IMAGE_NODE_URL="UPDATE_IMAGE_NODE_URL",t.TRANSFORM_TO_CODE_BLOCK="TRANSFORM_TO_CODE_BLOCK",t.UPDATE_CODE_BLOCK="UPDATE_CODE_BLOCK",t.SWITCH_OUT_FROM_CODE_BLOCK="SWITCH_OUT_FROM_CODE_BLOCK",t.DELETE_CODE_BLOCK="DELETE_CODE_BLOCK"}(p||(p={}));class x{constructor(){this.isFlushable=!1}}class A extends u{constructor(t){super(),this.type=h.ALIGNMENT,this.textAlign=t}static from(t){return[h.ALIGNMENT,new A(t)]}toJSON(){return{textAlign:this.textAlign}}renderClass(){return`v-rte--horizontal-alignment-${this.textAlign}`}clone(){return new A(this.textAlign)}render(){return null}}class E extends u{constructor(t){super(),this.type=h.INDENT,this.indent=Math.max(0,t)}static from(t){return[h.INDENT,new E(t)]}toJSON(){return this.indent>0?{indent:this.indent}:null}clone(){return new E(this.indent)}render(){return this.indent>0?{"margin-left":16*this.indent+"px"}:null}}class g{static register(t,e,s){this.registry.has(e)||this.registry.set(e,new Map),this.registry.get(e).set(t,s)}static get(t,e){const s=this.registry.get(e);if(s)return s.get(t)}static executeTheStrategy(t,e){const s=t instanceof x?t.type:t.constructor.name,n=g.get(s,e.constructor.name);if(n)return n.execute(t,e);r.error(`Type ${s} action handle strategy is not registered in class ${e.constructor.name}`)}}g.registry=new Map;class O{constructor(t){this.annotationMap=new Map,this.id=t}static createAnnotationEntity(t,e){switch(t){case"textAlign":return A.from(e);case"indent":return E.from(e)}}toJSON(){const t=Array.from(this.annotationMap.values()).filter((t=>t instanceof u)).reduce(((t,e)=>Object.assign(Object.assign({},t),e.toJSON())),{});return Object.assign({id:this.id},Object.keys(t).length>0?{annotations:t}:{})}getAnnotationByType(t){return this.annotationMap.get(t)}apply(t){if(this.doApply(t),t.isFlushable){const t=d.getDOMByEntity(this);if(t){const i=s.getSubjectFromParentNodeByEventId(t,n);i&&e.notify(i,{})}}}isListItemBlock(){return"list-item"===this.type}doApply(t){t instanceof x?g.executeTheStrategy(t,this):this.applyAnnotationAction(t)}applyAnnotationAction(t){const e=t.toAnnotation();this.annotationMap.set(e.type,e),"function"==typeof this.doAnnotationActionApply&&this.doAnnotationActionApply(t)}cloneAnnotations(){return new Map(Array.from(this.annotationMap.entries()).map((([t,e])=>[t,e.clone()])))}}!function(t){t.TEXT="TEXT",t.IMAGE="IMAGE",t.CODE_BLOCK_NODE="CODE_BLOCK_NODE"}(f||(f={}));class N{constructor(t,e){this.annotationMap=new Map,this.id=t,e&&(this.annotationMap=e)}getAnnotationByType(t){return this.annotationMap.get(t)}deleteAnnotationByType(t){this.annotationMap.delete(t),this.flushChange()}apply(t){return this.doApply(t),t.isFlushable&&this.flushChange(),this}doApply(t){t instanceof x?this.doModifyActionApply(t):this.doAnnotationActionApply(t)}flushChange(){const t=d.getDOMByEntity(this);if(t){const i=s.getSubjectFromParentNodeByEventId(t,n);i&&e.notify(i,{})}}cloneAnnotations(){return new Map(Array.from(this.annotationMap.entries()).map((([t,e])=>[t,e.clone()])))}}!function(t){t.BOLD="BOLD",t.ITALIC="ITALIC",t.UNDERLINE="UNDERLINE",t.STRIKETHROUGH="STRIKETHROUGH",t.SELECTION_RANGE="SELECTION_RANGE",t.IMAGE="IMAGE",t.CODE="CODE",t.TEXT_COLOR="TEXT_COLOR",t.LINK="LINK"}(w||(w={}));class y extends l{}class S extends y{constructor(t="md",e){super(),this.type=w.IMAGE,this.size=t,this.alt=e}static from(t,e){return[w.IMAGE,new S(t,e)]}toJSON(){return t(this.alt)?{size:this.size,alt:this.alt}:{size:this.size}}clone(){return new S(this.size,this.alt)}render(){switch(this.size){case"sm":return{width:"25%"};case"md":return{width:"50%"};case"lg":return{width:"100%"}}}}class T{execute(t,e){return r.log(`Executing action ${t.constructor.name} on ${e.constructor.name} ${e.id}`),this.handleAction(t,e)}isCaretPositionAtTextBlockEnd(t,e,s){const n=t.children[t.children.length-1];return e===n&&(e.isEmpty()||s===n.text.length)}isCaretPositionAtTextBlockStart(t,e,s){return e===t.children[0]&&0===s}isCaretPositionAtImageBlockStart(t,e,s){return e===t.children[0]&&0===s}isCaretPositionAtImageBlockEnd(t,e,s){return e===t.children[t.children.length-1]&&1===s}}class m{}class _ extends N{constructor(t,e,s,n){super(t,n),this.type=f.IMAGE,this.url=e,this.parent=s}static from(e,s){const n=new _(e.id,e.url,s);let i;return i=e.annotations&&0!==Object.keys(e.annotations).length?e.annotations:{size:"md"},n.annotationMap=new Map(Object.keys(i).map((()=>S.from(i.size,i.alt))).filter(t)),n}toJSON(){const t=this.annotationMap.get(w.IMAGE),e={};return(null==t?void 0:t.size)&&(e.size=t.size),(null==t?void 0:t.alt)&&(e.alt=t.alt),Object.assign(Object.assign({id:this.id},Object.keys(e).length>0?{annotations:e}:{}),{type:"image",url:this.url})}clone(){return new _(this.id,this.url,this.parent,super.cloneAnnotations())}doAnnotationActionApply(t){const e=g.get(m.name,_.name);e&&e.execute(t,this)}doModifyActionApply(t){g.executeTheStrategy(t,this)}}g.register(p.UPDATE_IMAGE_NODE_URL,_.name,new class extends T{handleAction(t,e){e.url=t.url}}),g.register(m.name,_.name,new class extends T{handleAction(t,e){const s=t.toAnnotation();e.annotationMap.set(s.type,s)}});class C extends x{constructor(t){super(),this.type=p.DELETE_CHILD,this.entityToBeRemoved=t}}class L extends T{getPreviousNode(t){const e=t.parent,s=e.children.indexOf(t);if(s>0)return e.children[s-1];if(e.parent){const t=this.getPreviousBlock(e);if(t)return this.getBlockLastNode(t)}}getNextNode(t){const e=t.parent,s=e.children.indexOf(t);if(e.children[s+1])return e.children[s+1];if(e.parent){const t=this.getNextBlock(e);if(t)return this.getBlockFirstNode(t)}}isContentFirstNode(t){const e=t.parent,s=e.children.indexOf(t),n=e.parent;if(e.isListItemBlock()){const t=n.parent;return 0===s&&Array.isArray(n.children)&&n.children[0]===e&&"list-item"!==t.type&&Array.isArray(t.children)&&t.children[0]===n}return 0===s&&Array.isArray(n.children)&&n.children[0]===e}getPreviousBlock(t){if(t&&t.parent&&t.parent.children){const e=t.parent.children.indexOf(t);if(e>0)return t.parent.children[e-1];if(("number-list"===t.parent.type||"bullet-list"===t.parent.type)&&0===e)return this.getPreviousBlock(t.parent)}}getBlockLastNode(t){return t.getLastNode()}getBlockFirstNode(t){if("number-list"===t.type||"bullet-list"===t.type){if(t.children)return this.getBlockFirstNode(t.children[0])}else if(t.children)return t.children[0]}getNextBlock(t){if(t&&t.parent&&t.parent.children){const e=t.parent.children.indexOf(t);if(t.parent.children[e+1])return t.parent.children[e+1];if("list-item"===t.type&&t.parent.children.length===e+1)return this.getNextBlock(t.parent)}}}class B extends x{constructor(t){super(),this.type=p.APPEND_CHILD_NODES,this.entityToBeAppended=t}}class I extends T{handleAction(t,e){const s=t.blockNeedToBeMerged;if(e.type===s.type||"image"!==e.type&&"image"!==s.type){let t=s.children;"image"!==s.type&&(t=s.children.filter((t=>t.text))),e.apply(new B(t)),s.parent.apply(new C(s))}}}class k extends T{handleAction(t,e){e.children=e.children.filter((e=>e!==t.entityToBeRemoved)),0===e.children.length&&e.parent&&e.parent.apply(new C(e))}}class D extends T{handleAction(t,e){const s=t.entityToBeAppended;s.forEach((t=>{t.parent=e})),e.children=e.children.concat(s)}}class b extends T{handleAction(t,e){e.children=[],e.apply(new B(t.newChildNodes))}}class R extends x{constructor(t,...e){super(),this.type=p.INSERT_BLOCKS_AFTER,this.referBlock=t,this.blocksToBeInserted=e}}class M extends x{constructor(t){super(),this.type=p.REPLACE_CHILD_NODES,this.newChildNodes=t}}class F extends x{constructor(t,...e){super(),this.type=p.INSERT_BLOCKS_BEFORE,this.referBlock=t,this.blocksToBeInserted=e}}class K extends x{constructor(t,e){super(),this.type=p.SPLIT_BLOCK_WITH_NODE,this.splitPointNode=t,this.startOffsetOfNode=e}}class j extends m{constructor(){super(...arguments),this.doSplit=!0}}class P extends l{constructor(t){super(),this.type=a.SELECTION_RANGE,this.range=t}clone(){return new P(this.range)}}class v extends y{constructor(t){super(),this.type=w.STRIKETHROUGH,this.strikethrough=t}static from(t){return[w.STRIKETHROUGH,new v(t)]}toJSON(){return{strikethrough:this.strikethrough}}clone(){return new v(this.strikethrough)}renderClass(){return this.strikethrough?"v-rte--strikethrough":null}render(){return null}}class H extends y{constructor(t){super(),this.type=w.UNDERLINE,this.underline=t}static from(t){return[w.UNDERLINE,new H(t)]}toJSON(){return{underline:this.underline}}clone(){return new H(this.underline)}renderClass(){return this.underline?"v-rte--underline":null}render(){return null}}class J extends y{constructor(t){super(),this.type=w.ITALIC,this.italic=t}static from(t){return[w.ITALIC,new J(t)]}toJSON(){return{italic:this.italic}}clone(){return new J(this.italic)}render(){return this.italic?{"font-style":"italic"}:null}}class W extends y{constructor(t){super(),this.type=w.BOLD,this.bold=t}static from(t){return[w.BOLD,new W(t)]}toJSON(){return{bold:this.bold}}clone(){return new W(this.bold)}render(){return this.bold?{"font-weight":"700"}:null}}class G extends y{constructor(t){super(),this.type=w.CODE,this.code=t}static from(t){return[w.CODE,new G(t)]}toJSON(){return{code:this.code}}clone(){return new G(this.code)}renderClass(){return this.code?"v-rte--code":null}render(){return null}}const z=[{key:"black",light:"#111128",dark:"#E3E3E8"},{key:"gray",light:"#5E5E6D",dark:"#B9B9C1"},{key:"green",light:"#01801F",dark:"#59D977"},{key:"red",light:"#BD2947",dark:"#FFB2B5"},{key:"purple",light:"#563D82",dark:"#BEB2FF"},{key:"teal",light:"#17758F",dark:"#4CD8FF"}],U="​";class $ extends y{constructor(t){super(),this.type=w.TEXT_COLOR,this.textColor=this.formatTextColor(t)}static from(t){return[w.TEXT_COLOR,new $(t)]}toJSON(){return{textColor:this.textColor.key}}clone(){return new $(this.textColor.key)}renderClass(){return null}render(){return{color:c.isDarkMode()?this.textColor.dark:this.textColor.light}}formatTextColor(t){return z.find((e=>e.key===t))||z[0]}}class X extends y{constructor(t){super(),this.type=w.LINK,this.link=t}static from(t){return[w.LINK,new X({href:t.href,groupKey:t.groupKey})]}toJSON(){return{link:{href:this.link.href,groupKey:this.link.groupKey}}}clone(){return new X(this.link)}toEqual(t){return this.link.groupKey===t.link.groupKey}render(){return null}}class q extends l{constructor(t){super(),this.type=a.LINK_GROUP,this.linkGroups=new Map,this.linkGroups=new Map([[t,[]]])}clone(){const t=new q("");return this.linkGroups.forEach(((e,s)=>{t.linkGroups.set(s,e.map((t=>t.clone())))})),t}}class V extends m{constructor(t,e){super(),this.isFlushable=!1,this.groupKey=t,this.nodes=e}toAnnotation(){return new q(this.groupKey)}}class Y extends m{constructor(){super(),this.isFlushable=!1}toAnnotation(){return null}}class Q extends x{constructor(t){super(),this.type=p.UPDATE_TEXT,this.newTextContent="",this.newTextContent=t}}class Z extends l{constructor(){super(...arguments),this.type=a.CLEAR_FORMATTING,this.items=[w.BOLD,w.ITALIC,w.UNDERLINE,w.STRIKETHROUGH,w.TEXT_COLOR,w.CODE]}}class tt extends j{constructor(){super(...arguments),this.isFlushable=!0}toAnnotation(){return new Z}}class et extends j{constructor(t){super(),this.isFlushable=!0,this.code=t}toAnnotation(){return new G(this.code)}}class st extends m{constructor(t){super(),this.isFlushable=!0,this.annotationType=t}toAnnotation(){}}class nt extends j{constructor({link:e,newText:s,needMergeNode:n,doSplit:i}){super(),this.isFlushable=!0,this.link=e,this.needMergeNode=n,this.newText=s,t(i)&&(this.doSplit=i)}toAnnotation(){return new X(this.link)}}class it extends N{constructor(t,e,s,n){super(t,n),this.type=f.TEXT,this.parent=s,this.text=e}static from(e,s){const n=new it(e.id,e.text,s),{annotations:i}=e;return i&&(n.annotationMap=new Map(Object.keys(i).map((t=>(i.link&&s.apply(new V(i.link.groupKey,[n])),this.createAnnotationEntity(t,i[t])))).filter(t))),n}static createAnnotationEntity(t,e){switch(t){case"bold":return W.from(e);case"italic":return J.from(e);case"underline":return H.from(e);case"strikethrough":return v.from(e);case"code":return G.from(e);case"textColor":return $.from(e);case"link":return X.from(e)}}toJSON(){const t=Array.from(this.annotationMap.values()).filter((t=>t instanceof y)).reduce(((t,e)=>Object.assign(Object.assign({},t),e.toJSON())),{});return Object.assign(Object.assign({id:this.id},Object.keys(t).length>0?{annotations:t}:{}),{type:"text",text:this.text})}cloneWithText(t){return new it(o(),t,this.parent,super.cloneAnnotations())}clone(){return new it(this.id,this.text,this.parent,super.cloneAnnotations())}isEmpty(){return!this.text||"​"===this.text||"\n"===this.text}doAnnotationActionApply(t){const e=this.getAnnotationByType(a.SELECTION_RANGE);if(t instanceof j&&t.doSplit&&e){const e=g.get(j.name,it.name);if(e){const s=e.execute(t,this);s&&this.applyActionToNode(s,t)}}else this.applyActionToNode(this,t);this.parent.mergeNodes(t)}doModifyActionApply(t){g.executeTheStrategy(t,this)}applyActionToNode(t,e){const s=e.toAnnotation();if(e instanceof Y)return void this.syncUpSelectedNodes(t);s instanceof P||this.syncUpSelectedNodes(t);const n=g.get(m.name,it.name);n&&n.execute(e,t)}syncUpSelectedNodes(t){const n=d.getDOMByEntity(this);if(n){const r=s.getSubjectFromParentNodeByEventId(n,i);r&&e.notify(r,{node:t})}}}g.register(p.UPDATE_TEXT,it.name,new class extends T{handleAction(t,e){e.text=t.newTextContent,!e.text&&e.annotationMap.has("LINK")&&e.annotationMap.delete(w.LINK)}}),g.register(p.REPLACE_SELECTED_TEXT,it.name,new class extends T{handleAction(t,e){this.replaceSelectedText(t.textToBeInsert,t.currentRange,e)}replaceSelectedText(t,e,s){if(e&&e.startContainer&&e.endContainer){const{startContainer:n,endContainer:i,startOffset:r,endOffset:o}=e;let c=s.text;if(n===i&&r===o&&t)c=s.text.slice(0,r)+t+s.text.slice(r);else{const e=n.parentElement,a=i.parentElement,h=e&&d.getEntityByDOM(e),l=a&&d.getEntityByDOM(a);let u=0,p=s.text.length;h&&h===s?(u=r,p=n===i?o:p):l&&l===s&&(p=o),c=s.text.slice(0,u)+t+s.text.slice(p)}s.apply(new Q(c))}}}),g.register(j.name,it.name,new class extends T{constructor(){super(...arguments),this.applyTargetNode=null}handleAction(t,e){const s=e.getAnnotationByType(a.SELECTION_RANGE);if(this.setApplyTargetNode(null),t instanceof j&&t.doSplit&&s){const{startContainer:t,endContainer:n,startOffset:i,endOffset:r}=s.range,o=t===n&&i===r;e.parent.children=e.parent.children.flatMap((t=>t.id===e.id?o?this.insertNewNode(i,e):this.shouldSplitSelection(s.range)?this.splitTextNode(s.range,e):(this.setApplyTargetNode(e),e):t))}return this.applyTargetNode}insertNewNode(t,e){const s=e.cloneWithText("");return this.setApplyTargetNode(s),0===t?[s,e]:t===e.text.length?[e,s]:[e.cloneWithText(e.text.substring(0,t)),s,e.cloneWithText(e.text.substring(t))]}shouldSplitSelection(t){const{startContainer:e,endContainer:s,startOffset:n,endOffset:i}=t;return e!==s||n>0||i<(s.textContent?s.textContent.length:0)}splitTextNode(t,e){const{startContainer:s,endContainer:n,startOffset:i}=t,r=s.parentElement,o=n.parentElement,c=(t,s,n)=>{const i=t.substring(0,s),r=t.substring(s,n),o=t.substring(n);return[e.cloneWithText(i),e.cloneWithText(r),e.cloneWithText(o)]},a=r&&d.getEntityByDOM(r),h=o&&d.getEntityByDOM(o);if(a&&a.id===e.id){const r=s===n?t.endOffset:e.text.length,[o,a,h]=c(e.text,i,r);return this.setApplyTargetNode(a),[o,a,h].filter((t=>!!t.text))}if(h&&h.id===e.id){const[s,n,i]=c(e.text,0,t.endOffset);return this.setApplyTargetNode(n),[s,n,i].filter((t=>!!t.text))}return this.setApplyTargetNode(e),e}setApplyTargetNode(t){this.applyTargetNode=t}}),g.register(m.name,it.name,new class extends T{handleAction(e,s){const n=e.toAnnotation();if(e instanceof st)s.annotationMap.delete(e.annotationType);else{if(!(n instanceof Z))return n instanceof y||n instanceof P?(e instanceof nt&&(t(e.newText)&&(s.text=e.newText),s.parent.apply(new V(e.link.groupKey,[s]))),e instanceof et&&this.handleAction(new tt,s),void s.annotationMap.set(n.type,n)):void 0;n.items.forEach((t=>{s.deleteAnnotationByType(t)}))}}});class rt extends u{constructor(t){super(),this.type=h.TEXT_STYLE,this.textStyle=t}static from(t){return[h.TEXT_STYLE,new rt(t)]}toJSON(){return{textStyle:this.textStyle}}clone(){return new rt(this.textStyle)}render(){const t={fontFamily:"Inter",fontSize:"16px",lineHeight:"22px",fontWeight:"500"};switch(this.textStyle){case"paragraph":return t;case"title":return{fontFamily:"Inter",fontSize:"36px",lineHeight:"40px",fontWeight:"500"};case"subtitle":return{fontFamily:"Inter",fontSize:"28px",lineHeight:"32px",fontWeight:"500"};case"heading-1":return{fontFamily:"Inter",fontSize:"22px",lineHeight:"24px",fontWeight:"500"};case"heading-2":return{fontFamily:"Inter",fontSize:"20px",lineHeight:"24px",fontWeight:"500"};case"heading-3":return{fontFamily:"Inter",fontSize:"18px",lineHeight:"22px",fontWeight:"500"};case"heading-4":return{fontFamily:"Inter",fontSize:"16px",lineHeight:"22px",fontWeight:"500"};case"heading-5":return{fontFamily:"Inter",fontSize:"14px",lineHeight:"22px",fontWeight:"500"};case"heading-6":return{fontFamily:"Inter",fontSize:"12px",lineHeight:"22px",fontWeight:"500"}}}}class ot extends m{constructor(t,e){super(),this.isFlushable=!0,this.textStyle=t,this.bold=e}toAnnotation(){return new rt(this.textStyle)}}class ct extends j{constructor(t){super(),this.isFlushable=!0,this.bold=t}toAnnotation(){return new W(this.bold)}}class at extends T{handleAction(t,e){t.newBlock=this.splitTextNodeBlock(t.splitPointNode,t.startOffsetOfNode,e)}splitTextNodeBlock(t,e,s){if(t){const n=t.text.slice(0,e),i=t.text.slice(e),r=s.children.indexOf(t);if(r>-1){const e=s.children.slice(0,r),o=s.children.slice(r+1);n&&e.push(t.cloneWithText(n)),i&&o.unshift(t.cloneWithText(i)),s.apply(new M(e));const c=s.cloneWithNodes(o);return s.parent.apply(new R(s,c)),c}}}}class ht extends T{handleAction(t,e){t.lineBreakNode=this.lineBreakSingleBlock(t.startContainerNode,t.startOffset,e)}lineBreakSingleBlock(t,e,s){if(t){const n=new it(o(),"\n",s),i=t.text.slice(0,e),r=t.text.slice(e),c=s.children.indexOf(t);if(c>-1){const e=s.children.slice(0,c),o=s.children.slice(c+1);i&&e.push(t.cloneWithText(i)),r&&o.unshift(t.cloneWithText(r)),this.mergeLineBreakNodes(e,n,o,s)}return n}}mergeLineBreakNodes(t,e,s,n){(0===s.length||s[0]&&""===s[0].text)&&s.push(new it(o(),"\n",n,t[t.length-1]&&t[t.length-1].annotationMap)),n.apply(new M([...t,e,...s]))}}class lt extends T{handleAction(t,e){t.lineBreakNode=this.lineBreakMultipleBlocks(t.selectedBlocks,e)}lineBreakMultipleBlocks(t,e){const s=e.children,n=new it(o(),"\n",e),i=this.concatBlocksNodes(t.slice(1));return this.mergeLineBreakNodes(s,n,i,e),n}concatBlocksNodes(t){const e=[];return t.map((t=>{"image"!==t.type&&(e.push(...t.children),t.parent.apply(new C(t)))})),e}mergeLineBreakNodes(t,e,s,n){(0===s.length||s[0]&&""===s[0].text)&&s.push(new it(o(),"\n",n,t[t.length-1]&&t[t.length-1].annotationMap)),n.apply(new M([...t,e,...s]))}}class ut extends x{constructor(t){super(),this.type=p.MERGE_TWO_BLOCKS_NODES,this.blockNeedToBeMerged=t}}class dt extends L{handleAction(t,e){this.deleteNodeContent(t,e)}deleteNodeContent(t,e){const s=t.startContainerNode,n=t.startOffset;if(0!==n&&!s.isEmpty()){const i=s.text.slice(0,n-1)+s.text.slice(n);if(s.apply(new Q(i)),i)return void(t.previousNode=s);{const n=this.getPreviousNode(s);return n&&n.parent===e&&"\n"===n.text||1===e.children.length?void(t.previousNode=s):(e.apply(new C(s)),void(t.previousNode=n))}}{let n=this.getPreviousNode(s),i=null;if(e.children.length&&n&&n.parent!==e)s.isEmpty()&&e.apply(new C(s)),e.type===n.parent.type&&n.parent.apply(new ut(e));else if(this.isContentFirstNode(s)&&s.isEmpty()&&(i=this.getNextNode(s)),s.isEmpty()&&e.apply(new C(s)),n instanceof it&&n.isEmpty()){const t=n;n=this.getPreviousNode(n),t.parent.apply(new C(t)),n||(i=s)}0===e.children.length&&e.parent.apply(new C(e)),n?t.previousNode=n:i&&(t.nextNode=i)}}}class pt extends T{replaceNodeWithNodes(t,e,s){t.children&&(s.forEach((e=>{e.parent=t})),t.children=t.children.flatMap((t=>t===e?s:t)))}}class ft extends pt{handleAction(t,e){const s=t.referNode,n=[...t.nodesToBeInserted,s];this.replaceNodeWithNodes(e,s,n)}}class wt extends O{constructor(t,e){super(t),this.children=[],this.type=e,this.annotationMap=wt.isAcceptableTextStyle(e)?new Map([rt.from(e)]):new Map([rt.from("paragraph")])}static from(e){const s=new wt(e.id,e.type),{annotations:n}=e;return s.children=e.nodes.map((t=>it.from(t,s))),n&&Object.entries(n).forEach((([e,n])=>{const i=this.createAnnotationEntity(e,n);t(i)&&s.annotationMap.set(...i)})),s}static createAnnotationEntity(t,e){return"textStyle"===t?rt.from(e):super.createAnnotationEntity(t,e)}static isAcceptableTextStyle(t){return["title","subtitle","paragraph","heading-1","heading-2","heading-3","heading-4","heading-5","heading-6"].includes(t)}mergeNodes(t){this.children=this.children.reduce(((e,s)=>{const n=e.at(-1);if(t instanceof nt&&t.needMergeNode){const t=null==n?void 0:n.getAnnotationByType(w.LINK),i=s.getAnnotationByType(w.LINK);if(t&&i&&t.toEqual(i))return e}return[...e,s]}),[])}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,nodes:this.children.map((t=>t.toJSON()))})}cloneWithNodes(t){const e=new wt(o(),this.type);return e.children=[],e.apply(new B(t)),e}clone(){const t=new wt(this.id,this.type);return t.children=this.children.map((e=>{const s=e.clone();return s.parent=t,s})),t.annotationMap=super.cloneAnnotations(),t.parent=this.parent,t}isNotEmpty(){return this.children.length>0&&this.children.some((t=>!t.isEmpty()))}getLastNode(){return this.children[this.children.length-1]}createNewParagraph(){return new wt(o(),"paragraph")}doAnnotationActionApply(t){const e=g.get(t.constructor.name,wt.name);e&&e.execute(t,this)}}g.register(ot.name,wt.name,new class extends T{handleAction(t,e){"list-item"!==e.type&&(e.type=t.textStyle),e.children.forEach(t.bold?t=>{const e=new ct(!0);e.doSplit=!1,t.apply(e)}:t=>{t.apply(new st(w.BOLD))})}}),g.register(V.name,wt.name,new class extends T{handleAction(t,e){const s=e.getAnnotationByType(a.LINK_GROUP);if(s){const n=s.linkGroups.get(t.groupKey);s.linkGroups.set(t.groupKey,[...n,...t.nodes]),e.annotationMap.set(a.LINK_GROUP,s)}}}),g.register(p.DELETE_CHILD,wt.name,new k),g.register(p.APPEND_CHILD_NODES,wt.name,new D),g.register(p.SPLIT_BLOCK_WITH_NODE,wt.name,new at),g.register(p.REPLACE_CHILD_NODES,wt.name,new b),g.register(p.MERGE_TWO_BLOCKS_NODES,wt.name,new I),g.register(p.BREAK_SINGLE_BLOCK,wt.name,new class extends T{handleAction(t,e){t.newBlock=this.breakSingleTextBlock(t.startContainerNode,t.startOffset,e)}breakSingleTextBlock(t,e,s){const n=this.copyInlineStyleToNewParagraph(t,s);if(this.isCaretPositionAtTextBlockEnd(s,t,e))s.parent.apply(new R(s,n));else{if(!this.isCaretPositionAtTextBlockStart(s,t,e)){const n=new K(t,e);return s.apply(n),n.newBlock}s.parent.apply(new F(s,n))}return n}copyInlineStyleToNewParagraph(t,e){const s=t.cloneWithText("");s.annotationMap.delete(w.LINK);const n=e.createNewParagraph();return n.apply(new B([s])),n}}),g.register(p.LINE_BREAK_SINGLE_BLOCK,wt.name,new ht),g.register(p.LINE_BREAK_MULTIPLE_BLOCKS,wt.name,new lt),g.register(p.DELETE_BLOCK_CONTENT,wt.name,new dt),g.register(p.INSERT_IMAGE_TO_BLOCK,wt.name,new class extends T{handleAction(t,e){const s=t.splitPointNode,n=t.startOffsetOfNode,i=t.imageBlockToBeInserted;if(this.isCaretPositionAtTextBlockEnd(e,s,n))e.parent.apply(new R(e,i));else if(this.isCaretPositionAtTextBlockStart(e,s,n))e.parent.apply(new F(e,i));else{const t=new K(s,n);e.apply(t),e.parent.apply(new R(e,i))}}}),g.register(p.INSERT_NODES_BEFORE,wt.name,new ft),g.register(p.TRANSFORM_LIST_BLOCK,wt.name,new class extends T{handleAction(t,e){const s=e.parent,n=s.createList(t.listType),i=t.selectedBlocks,r=i.map((t=>s.toListItem(t)));n.apply(new B(r)),s.apply(new R(t.selectedBlocks[0],n)),i.forEach((t=>{t.parent.apply(new C(t))}))}});class xt extends x{constructor(t,e){super(),this.isFlushable=!0,this.type=p.UPDATE_CODE_BLOCK,this.content=t,this.language=e}}class At extends m{constructor(t){super(),this.isFlushable=!1,this.range=t}toAnnotation(){return new P(this.range)}}class Et extends N{constructor(t,e,s,n){super(t),this.type=f.CODE_BLOCK_NODE,this.text="",this.annotationMap=new Map,this.text=e,this.parent=n,this.language=s}toJSON(){return{id:this.id,type:"text",text:this.text,language:this.language}}clone(){return new Et(this.id,this.text,this.language,this.parent)}doAnnotationActionApply(t){g.executeTheStrategy(t,this)}doModifyActionApply(t){g.executeTheStrategy(t,this)}}g.register(p.UPDATE_CODE_BLOCK,Et.name,new class extends T{handleAction(t,e){const{content:s,language:n}=t;e.language=n,e.text=s}}),g.register(At.name,Et.name,new class extends T{handleAction(t,e){e.annotationMap.set(a.SELECTION_RANGE,t.toAnnotation())}});class gt extends O{constructor(t,e,s){super(t),this.type="code-block",this.children=[new Et(`${t}-1`,e,s,this)]}static from(t){return new gt(t.id,t.content,t.language)}toJSON(){const{language:t,text:e}=this.children[0];return{id:this.id,type:"code-block",content:e,language:t}}clone(){const t=gt.from(this.toJSON());return t.parent=this.parent,t}apply(t){if(t instanceof x&&g.executeTheStrategy(t,this),t.isFlushable){const t=d.getDOMByEntity(this);if(t){const i=s.getSubjectFromParentNodeByEventId(t,n);i&&e.notify(i,{})}}}isNotEmpty(){return!!this.children.length}getLastNode(){return this.children[0]}isSelected(){return this.children[0].annotationMap.has(a.SELECTION_RANGE)}}g.register(p.DELETE_CODE_BLOCK,gt.name,new class extends L{handleAction(t,e){const s=e.children[0],n=e.parent;if(n){let t=this.getPreviousNode(s),i=this.getRTENodeEndOffset(t);t||(t=this.getNextNode(s),i=0),n.apply(new C(e));const r=t?d.getDOMByEntity(t):null;if(0===n.children.length){const s=wt.from({id:o(),type:"paragraph",nodes:[{id:o(),type:"text",text:""}]});e.parent.apply(new B([s])),t=s.children[0],i=0}this.notifyUpdateSelection(t,r,i,e)}}notifyUpdateSelection(t,n,r,o){const c=d.getDOMByEntity(o);if(c){const o=s.getSubjectFromParentNodeByEventId(c,i);o&&e.notify(o,{node:t,updateDirectly:!!n,offset:r})}}getRTENodeEndOffset(t){return t&&"CODE_BLOCK_NODE"!==t.type?"IMAGE"!==t.type?t.text.length:1:0}}),g.register(p.DELETE_CHILD,gt.name,new k),g.register(p.SWITCH_OUT_FROM_CODE_BLOCK,gt.name,new class extends T{handleAction(t,n){const{content:r,language:c}=t,a=r.split("\n"),h=new xt(a.slice(0,a.length-2).join("\n"),c);h.isFlushable=!1,n.children[0].apply(h);const l=wt.from({id:o(),type:"paragraph",nodes:[{id:o(),text:"",type:"text"}]});n.parent.apply(new R(n,l));const u=d.getDOMByEntity(n);if(u){const t=s.getSubjectFromParentNodeByEventId(u,i);t&&e.notify(t,{node:l.children[0]})}}}),g.register(p.INSERT_IMAGE_TO_BLOCK,gt.name,new class extends T{handleAction(t,e){e.parent.apply(new R(e,t.imageBlockToBeInserted))}}),gt.CODE_BLOCK_PLACEHOLDER_CLASS_NAME="code-block-placeholder-element";export{E as $,T as A,L as B,S as C,At as D,$ as E,z as F,Et as G,m as H,R as I,ct as J,J as K,nt as L,x as M,w as N,H as O,ot as P,rt as Q,C as R,K as S,j as T,xt as U,W as V,h as W,tt as X,et as Y,U as Z,v as _,_ as a,A as a0,Q as a1,ut as a2,M as b,B as c,wt as d,F as e,p as f,it as g,pt as h,O as i,g as j,I as k,k as l,D as m,b as n,ft as o,dt as p,ht as q,lt as r,at as s,Y as t,gt as u,N as v,d as w,u as x,y,a as z}
1
+ import{i as t}from"./p-5e2c9e69.js";import{C as e}from"./p-2d0d575f.js";import{d as s}from"./p-6e01f0a2.js";import{a as n,b as i}from"./p-f5ac60f5.js";import{L as r}from"./p-6e1ab235.js";import{g as o}from"./p-a4670e23.js";import{V as c}from"./p-0c8bd757.js";var a,h;!function(t){t.SELECTION_RANGE="SELECTION_RANGE",t.CLEAR_FORMATTING="CLEAR_FORMATTING",t.LINK_GROUP="LINK_GROUP"}(a||(a={}));class l{}!function(t){t.ALIGNMENT="ALIGNMENT",t.TEXT_STYLE="TEXT_STYLE",t.INDENT="INDENT"}(h||(h={}));class u extends l{}const d=new class{constructor(){this.domToEntity=new WeakMap,this.entityToDOM=new WeakMap}register(t,e){this.domToEntity.set(t,e),this.entityToDOM.set(e,t)}getEntityByDOM(t){return this.domToEntity.get(t)}getDOMByEntity(t){return this.entityToDOM.get(t)}removeDirtyDomRef(t){this.domToEntity.delete(t)}};var p,f,w;!function(t){t.DELETE_CHILD="DELETE_CHILD",t.DELETE_NEST_LIST="DELETE_NEST_LIST",t.UPDATE_TEXT="UPDATE_TEXT",t.REPLACE_SELECTED_TEXT="REPLACE_SELECTED_TEXT",t.APPEND_CHILD_NODES="APPEND_CHILD_NODES",t.INSERT_BLOCKS_AFTER="INSERT_BLOCKS_AFTER",t.INSERT_BLOCKS_BEFORE="INSERT_BLOCKS_BEFORE",t.INSERT_NODES_AFTER="INSERT_NODES_AFTER",t.INSERT_NODES_BEFORE="INSERT_NODES_BEFORE",t.SPLIT_BLOCK_WITH_NODE="SPLIT_BLOCK_WITH_NODE",t.REPLACE_CHILD_NODES="REPLACE_CHILD_NODES",t.REPLACE_NEST_LIST="REPLACE_NEST_LIST",t.MERGE_TWO_BLOCKS_NODES="MERGE_TWO_BLOCKS_NODES",t.BREAK_SINGLE_BLOCK="BREAK_SINGLE_BLOCK",t.LINE_BREAK_SINGLE_BLOCK="LINE_BREAK_SINGLE_BLOCK",t.LINE_BREAK_MULTIPLE_BLOCKS="LINE_BREAK_MULTIPLE_BLOCKS",t.TRANSFORM_LIST_BLOCK="TRANSFORM_LIST_BLOCK",t.TRANSFORM_PARAGRAPH_BLOCK="TRANSFORM_PARAGRAPH_BLOCK",t.DELETE_BLOCK_CONTENT="DELETE_BLOCK_CONTENT",t.INSERT_IMAGE_TO_BLOCK="INSERT_IMAGE_TO_BLOCK",t.UPDATE_IMAGE_NODE_URL="UPDATE_IMAGE_NODE_URL",t.TRANSFORM_TO_CODE_BLOCK="TRANSFORM_TO_CODE_BLOCK",t.UPDATE_CODE_BLOCK="UPDATE_CODE_BLOCK",t.SWITCH_OUT_FROM_CODE_BLOCK="SWITCH_OUT_FROM_CODE_BLOCK",t.DELETE_CODE_BLOCK="DELETE_CODE_BLOCK"}(p||(p={}));class x{constructor(){this.isFlushable=!1}}class A extends u{constructor(t){super(),this.type=h.ALIGNMENT,this.textAlign=t}static from(t){return[h.ALIGNMENT,new A(t)]}toJSON(){return{textAlign:this.textAlign}}renderClass(){return`v-rte--horizontal-alignment-${this.textAlign}`}clone(){return new A(this.textAlign)}render(){return null}}class E extends u{constructor(t){super(),this.type=h.INDENT,this.indent=Math.max(0,t)}static from(t){return[h.INDENT,new E(t)]}toJSON(){return this.indent>0?{indent:this.indent}:null}clone(){return new E(this.indent)}render(){return this.indent>0?{"margin-left":16*this.indent+"px"}:null}}class g{static register(t,e,s){this.registry.has(e)||this.registry.set(e,new Map),this.registry.get(e).set(t,s)}static get(t,e){const s=this.registry.get(e);if(s)return s.get(t)}static executeTheStrategy(t,e){const s=t instanceof x?t.type:t.constructor.name,n=g.get(s,e.constructor.name);if(n)return n.execute(t,e);r.error(`Type ${s} action handle strategy is not registered in class ${e.constructor.name}`)}}g.registry=new Map;class O{constructor(t){this.annotationMap=new Map,this.id=t}static createAnnotationEntity(t,e){switch(t){case"textAlign":return A.from(e);case"indent":return E.from(e)}}toJSON(){const t=Array.from(this.annotationMap.values()).filter((t=>t instanceof u)).reduce(((t,e)=>Object.assign(Object.assign({},t),e.toJSON())),{});return Object.assign({id:this.id},Object.keys(t).length>0?{annotations:t}:{})}getAnnotationByType(t){return this.annotationMap.get(t)}apply(t){if(this.doApply(t),t.isFlushable){const t=d.getDOMByEntity(this);if(t){const i=s.getSubjectFromParentNodeByEventId(t,n);i&&e.notify(i,{})}}}isListItemBlock(){return"list-item"===this.type}doApply(t){t instanceof x?g.executeTheStrategy(t,this):this.applyAnnotationAction(t)}applyAnnotationAction(t){const e=t.toAnnotation();this.annotationMap.set(e.type,e),"function"==typeof this.doAnnotationActionApply&&this.doAnnotationActionApply(t)}cloneAnnotations(){return new Map(Array.from(this.annotationMap.entries()).map((([t,e])=>[t,e.clone()])))}}!function(t){t.TEXT="TEXT",t.IMAGE="IMAGE",t.CODE_BLOCK_NODE="CODE_BLOCK_NODE"}(f||(f={}));class N{constructor(t,e){this.annotationMap=new Map,this.id=t,e&&(this.annotationMap=e)}getAnnotationByType(t){return this.annotationMap.get(t)}deleteAnnotationByType(t){this.annotationMap.delete(t),this.flushChange()}apply(t){return this.doApply(t),t.isFlushable&&this.flushChange(),this}doApply(t){t instanceof x?this.doModifyActionApply(t):this.doAnnotationActionApply(t)}flushChange(){const t=d.getDOMByEntity(this);if(t){const i=s.getSubjectFromParentNodeByEventId(t,n);i&&e.notify(i,{})}}cloneAnnotations(){return new Map(Array.from(this.annotationMap.entries()).map((([t,e])=>[t,e.clone()])))}}!function(t){t.BOLD="BOLD",t.ITALIC="ITALIC",t.UNDERLINE="UNDERLINE",t.STRIKETHROUGH="STRIKETHROUGH",t.SELECTION_RANGE="SELECTION_RANGE",t.IMAGE="IMAGE",t.CODE="CODE",t.TEXT_COLOR="TEXT_COLOR",t.LINK="LINK"}(w||(w={}));class y extends l{}class S extends y{constructor(t="md",e){super(),this.type=w.IMAGE,this.size=t,this.alt=e}static from(t,e){return[w.IMAGE,new S(t,e)]}toJSON(){return t(this.alt)?{size:this.size,alt:this.alt}:{size:this.size}}clone(){return new S(this.size,this.alt)}render(){switch(this.size){case"sm":return{width:"25%"};case"md":return{width:"50%"};case"lg":return{width:"100%"}}}}class T{execute(t,e){return r.log(`Executing action ${t.constructor.name} on ${e.constructor.name} ${e.id}`),this.handleAction(t,e)}isCaretPositionAtTextBlockEnd(t,e,s){const n=t.children[t.children.length-1];return e===n&&(e.isEmpty()||s===n.text.length)}isCaretPositionAtTextBlockStart(t,e,s){return e===t.children[0]&&0===s}isCaretPositionAtImageBlockStart(t,e,s){return e===t.children[0]&&0===s}isCaretPositionAtImageBlockEnd(t,e,s){return e===t.children[t.children.length-1]&&1===s}}class m{}class _ extends N{constructor(t,e,s,n){super(t,n),this.type=f.IMAGE,this.url=e,this.parent=s}static from(e,s){const n=new _(e.id,e.url,s);let i;return i=e.annotations&&0!==Object.keys(e.annotations).length?e.annotations:{size:"md"},n.annotationMap=new Map(Object.keys(i).map((()=>S.from(i.size,i.alt))).filter(t)),n}toJSON(){const t=this.annotationMap.get(w.IMAGE),e={};return(null==t?void 0:t.size)&&(e.size=t.size),(null==t?void 0:t.alt)&&(e.alt=t.alt),Object.assign(Object.assign({id:this.id},Object.keys(e).length>0?{annotations:e}:{}),{type:"image",url:this.url})}clone(){return new _(this.id,this.url,this.parent,super.cloneAnnotations())}doAnnotationActionApply(t){const e=g.get(m.name,_.name);e&&e.execute(t,this)}doModifyActionApply(t){g.executeTheStrategy(t,this)}}g.register(p.UPDATE_IMAGE_NODE_URL,_.name,new class extends T{handleAction(t,e){e.url=t.url}}),g.register(m.name,_.name,new class extends T{handleAction(t,e){const s=t.toAnnotation();e.annotationMap.set(s.type,s)}});class C extends x{constructor(t){super(),this.type=p.DELETE_CHILD,this.entityToBeRemoved=t}}class L extends T{getPreviousNode(t){const e=t.parent,s=e.children.indexOf(t);if(s>0)return e.children[s-1];if(e.parent){const t=this.getPreviousBlock(e);if(t)return this.getBlockLastNode(t)}}getNextNode(t){const e=t.parent,s=e.children.indexOf(t);if(e.children[s+1])return e.children[s+1];if(e.parent){const t=this.getNextBlock(e);if(t)return this.getBlockFirstNode(t)}}isContentFirstNode(t){const e=t.parent,s=e.children.indexOf(t),n=e.parent;if(e.isListItemBlock()){const t=n.parent;return 0===s&&Array.isArray(n.children)&&n.children[0]===e&&"list-item"!==t.type&&Array.isArray(t.children)&&t.children[0]===n}return 0===s&&Array.isArray(n.children)&&n.children[0]===e}getPreviousBlock(t){if(t&&t.parent&&t.parent.children){const e=t.parent.children.indexOf(t);if(e>0)return t.parent.children[e-1];if(("number-list"===t.parent.type||"bullet-list"===t.parent.type)&&0===e)return this.getPreviousBlock(t.parent)}}getBlockLastNode(t){return t.getLastNode()}getBlockFirstNode(t){if("number-list"===t.type||"bullet-list"===t.type){if(t.children)return this.getBlockFirstNode(t.children[0])}else if(t.children)return t.children[0]}getNextBlock(t){if(t&&t.parent&&t.parent.children){const e=t.parent.children.indexOf(t);if(t.parent.children[e+1])return t.parent.children[e+1];if("list-item"===t.type&&t.parent.children.length===e+1)return this.getNextBlock(t.parent)}}}class B extends x{constructor(t){super(),this.type=p.APPEND_CHILD_NODES,this.entityToBeAppended=t}}class I extends T{handleAction(t,e){const s=t.blockNeedToBeMerged;if(e.type===s.type||"image"!==e.type&&"image"!==s.type){let t=s.children;"image"!==s.type&&(t=s.children.filter((t=>t.text))),e.apply(new B(t)),s.parent.apply(new C(s))}}}class k extends T{handleAction(t,e){e.children=e.children.filter((e=>e!==t.entityToBeRemoved)),0===e.children.length&&e.parent&&e.parent.apply(new C(e))}}class D extends T{handleAction(t,e){const s=t.entityToBeAppended;s.forEach((t=>{t.parent=e})),e.children=e.children.concat(s)}}class R extends T{handleAction(t,e){e.children=[],e.apply(new B(t.newChildNodes))}}class M extends x{constructor(t,...e){super(),this.type=p.INSERT_BLOCKS_AFTER,this.referBlock=t,this.blocksToBeInserted=e}}class b extends x{constructor(t){super(),this.type=p.REPLACE_CHILD_NODES,this.newChildNodes=t}}class F extends x{constructor(t,...e){super(),this.type=p.INSERT_BLOCKS_BEFORE,this.referBlock=t,this.blocksToBeInserted=e}}class K extends x{constructor(t,e){super(),this.type=p.SPLIT_BLOCK_WITH_NODE,this.splitPointNode=t,this.startOffsetOfNode=e}}class j extends m{constructor(){super(...arguments),this.doSplit=!0}}class P extends l{constructor(t){super(),this.type=a.SELECTION_RANGE,this.range=t}clone(){return new P(this.range)}}class v extends y{constructor(t){super(),this.type=w.STRIKETHROUGH,this.strikethrough=t}static from(t){return[w.STRIKETHROUGH,new v(t)]}toJSON(){return{strikethrough:this.strikethrough}}clone(){return new v(this.strikethrough)}renderClass(){return this.strikethrough?"v-rte--strikethrough":null}render(){return null}}class H extends y{constructor(t){super(),this.type=w.UNDERLINE,this.underline=t}static from(t){return[w.UNDERLINE,new H(t)]}toJSON(){return{underline:this.underline}}clone(){return new H(this.underline)}renderClass(){return this.underline?"v-rte--underline":null}render(){return null}}class J extends y{constructor(t){super(),this.type=w.ITALIC,this.italic=t}static from(t){return[w.ITALIC,new J(t)]}toJSON(){return{italic:this.italic}}clone(){return new J(this.italic)}render(){return this.italic?{"font-style":"italic"}:null}}class W extends y{constructor(t){super(),this.type=w.BOLD,this.bold=t}static from(t){return[w.BOLD,new W(t)]}toJSON(){return{bold:this.bold}}clone(){return new W(this.bold)}render(){return this.bold?{"font-weight":"700"}:null}}class G extends y{constructor(t){super(),this.type=w.CODE,this.code=t}static from(t){return[w.CODE,new G(t)]}toJSON(){return{code:this.code}}clone(){return new G(this.code)}renderClass(){return this.code?"v-rte--code":null}render(){return null}}const z=[{key:"black",light:"#111128",dark:"#E3E3E8"},{key:"gray",light:"#5E5E6D",dark:"#B9B9C1"},{key:"green",light:"#01801F",dark:"#59D977"},{key:"red",light:"#BD2947",dark:"#FFB2B5"},{key:"purple",light:"#563D82",dark:"#BEB2FF"},{key:"teal",light:"#17758F",dark:"#4CD8FF"}],U="​";class $ extends y{constructor(t){super(),this.type=w.TEXT_COLOR,this.textColor=this.formatTextColor(t)}static from(t){return[w.TEXT_COLOR,new $(t)]}toJSON(){return{textColor:this.textColor.key}}clone(){return new $(this.textColor.key)}renderClass(){return null}render(){return{color:c.isDarkMode()?this.textColor.dark:this.textColor.light}}formatTextColor(t){return z.find((e=>e.key===t))||z[0]}}class X extends y{constructor(t){super(),this.type=w.LINK,this.link=t}static from(t){return[w.LINK,new X({href:t.href,groupKey:t.groupKey})]}toJSON(){return{link:{href:this.link.href,groupKey:this.link.groupKey}}}clone(){return new X(this.link)}toEqual(t){return this.link.groupKey===t.link.groupKey}render(){return null}}class q extends l{constructor(t){super(),this.type=a.LINK_GROUP,this.linkGroups=new Map,this.linkGroups=new Map([[t,[]]])}clone(){const t=new q("");return this.linkGroups.forEach(((e,s)=>{t.linkGroups.set(s,e.map((t=>t.clone())))})),t}}class V extends m{constructor(t,e){super(),this.isFlushable=!1,this.groupKey=t,this.nodes=e}toAnnotation(){return new q(this.groupKey)}}class Y extends m{constructor(){super(),this.isFlushable=!1}toAnnotation(){return null}}class Q extends x{constructor(t){super(),this.type=p.UPDATE_TEXT,this.newTextContent="",this.newTextContent=t}}class Z extends l{constructor(){super(...arguments),this.type=a.CLEAR_FORMATTING,this.items=[w.BOLD,w.ITALIC,w.UNDERLINE,w.STRIKETHROUGH,w.TEXT_COLOR,w.CODE]}}class tt extends j{constructor(){super(...arguments),this.isFlushable=!0}toAnnotation(){return new Z}}class et extends j{constructor(t){super(),this.isFlushable=!0,this.code=t}toAnnotation(){return new G(this.code)}}class st extends m{constructor(t){super(),this.isFlushable=!0,this.annotationType=t}toAnnotation(){}}class nt extends j{constructor({link:e,newText:s,needMergeNode:n,doSplit:i}){super(),this.isFlushable=!0,this.link=e,this.needMergeNode=n,this.newText=s,t(i)&&(this.doSplit=i)}toAnnotation(){return new X(this.link)}}class it extends N{constructor(t,e,s,n){super(t,n),this.type=f.TEXT,this.parent=s,this.text=e}static from(e,s){const n=new it(e.id,e.text,s),{annotations:i}=e;return i&&(n.annotationMap=new Map(Object.keys(i).map((t=>(i.link&&s.apply(new V(i.link.groupKey,[n])),this.createAnnotationEntity(t,i[t])))).filter(t))),n}static createAnnotationEntity(t,e){switch(t){case"bold":return W.from(e);case"italic":return J.from(e);case"underline":return H.from(e);case"strikethrough":return v.from(e);case"code":return G.from(e);case"textColor":return $.from(e);case"link":return X.from(e)}}toJSON(){const t=Array.from(this.annotationMap.values()).filter((t=>t instanceof y)).reduce(((t,e)=>Object.assign(Object.assign({},t),e.toJSON())),{});return Object.assign(Object.assign({id:this.id},Object.keys(t).length>0?{annotations:t}:{}),{type:"text",text:this.text})}cloneWithText(t){return new it(o(),t,this.parent,super.cloneAnnotations())}clone(){return new it(this.id,this.text,this.parent,super.cloneAnnotations())}isEmpty(){return!this.text||"​"===this.text||"\n"===this.text}doAnnotationActionApply(t){const e=this.getAnnotationByType(a.SELECTION_RANGE);if(t instanceof j&&t.doSplit&&e){const e=g.get(j.name,it.name);if(e){const s=e.execute(t,this);s&&this.applyActionToNode(s,t)}}else this.applyActionToNode(this,t);this.parent.mergeNodes(t)}doModifyActionApply(t){g.executeTheStrategy(t,this)}applyActionToNode(t,e){const s=e.toAnnotation();if(e instanceof Y)return void this.syncUpSelectedNodes(t);s instanceof P||this.syncUpSelectedNodes(t);const n=g.get(m.name,it.name);n&&n.execute(e,t)}syncUpSelectedNodes(t){const n=d.getDOMByEntity(this);if(n){const r=s.getSubjectFromParentNodeByEventId(n,i);r&&e.notify(r,{node:t})}}}g.register(p.UPDATE_TEXT,it.name,new class extends T{handleAction(t,e){e.text=t.newTextContent,!e.text&&e.annotationMap.has("LINK")&&e.annotationMap.delete(w.LINK)}}),g.register(p.REPLACE_SELECTED_TEXT,it.name,new class extends T{handleAction(t,e){this.replaceSelectedText(t.textToBeInsert,t.currentRange,e)}replaceSelectedText(t,e,s){if(e&&e.startContainer&&e.endContainer){const{startContainer:n,endContainer:i,startOffset:r,endOffset:o}=e;let c=s.text;if(n===i&&r===o&&t)c=s.text.slice(0,r)+t+s.text.slice(r);else{const e=n.parentElement,a=i.parentElement,h=e&&d.getEntityByDOM(e),l=a&&d.getEntityByDOM(a);let u=0,p=s.text.length;h&&h===s?(u=r,p=n===i?o:p):l&&l===s&&(p=o),c=s.text.slice(0,u)+t+s.text.slice(p)}s.apply(new Q(c))}}}),g.register(j.name,it.name,new class extends T{constructor(){super(...arguments),this.applyTargetNode=null}handleAction(t,e){const s=e.getAnnotationByType(a.SELECTION_RANGE);if(this.setApplyTargetNode(null),t instanceof j&&t.doSplit&&s){const{startContainer:t,endContainer:n,startOffset:i,endOffset:r}=s.range,o=t===n&&i===r;e.parent.children=e.parent.children.flatMap((t=>t.id===e.id?o?this.insertNewNode(i,e):this.shouldSplitSelection(s.range)?this.splitTextNode(s.range,e):(this.setApplyTargetNode(e),e):t))}return this.applyTargetNode}insertNewNode(t,e){const s=e.cloneWithText("");return this.setApplyTargetNode(s),0===t?[s,e]:t===e.text.length?[e,s]:[e.cloneWithText(e.text.substring(0,t)),s,e.cloneWithText(e.text.substring(t))]}shouldSplitSelection(t){const{startContainer:e,endContainer:s,startOffset:n,endOffset:i}=t;return e!==s||n>0||i<(s.textContent?s.textContent.length:0)}splitTextNode(t,e){const{startContainer:s,endContainer:n,startOffset:i}=t,r=s.parentElement,o=n.parentElement,c=(t,s,n)=>{const i=t.substring(0,s),r=t.substring(s,n),o=t.substring(n);return[e.cloneWithText(i),e.cloneWithText(r),e.cloneWithText(o)]},a=r&&d.getEntityByDOM(r),h=o&&d.getEntityByDOM(o);if(a&&a.id===e.id){const r=s===n?t.endOffset:e.text.length,[o,a,h]=c(e.text,i,r);return this.setApplyTargetNode(a),[o,a,h].filter((t=>!!t.text))}if(h&&h.id===e.id){const[s,n,i]=c(e.text,0,t.endOffset);return this.setApplyTargetNode(n),[s,n,i].filter((t=>!!t.text))}return this.setApplyTargetNode(e),e}setApplyTargetNode(t){this.applyTargetNode=t}}),g.register(m.name,it.name,new class extends T{handleAction(e,s){const n=e.toAnnotation();if(e instanceof st)s.annotationMap.delete(e.annotationType);else{if(!(n instanceof Z))return n instanceof y||n instanceof P?(e instanceof nt&&(t(e.newText)&&(s.text=e.newText),s.parent.apply(new V(e.link.groupKey,[s]))),e instanceof et&&this.handleAction(new tt,s),void s.annotationMap.set(n.type,n)):void 0;n.items.forEach((t=>{s.deleteAnnotationByType(t)}))}}});class rt extends u{constructor(t){super(),this.type=h.TEXT_STYLE,this.textStyle=t}static from(t){return[h.TEXT_STYLE,new rt(t)]}toJSON(){return{textStyle:this.textStyle}}clone(){return new rt(this.textStyle)}render(){const t={fontFamily:"Inter",fontSize:"16px",lineHeight:"22px",fontWeight:"500"};switch(this.textStyle){case"paragraph":return t;case"title":return{fontFamily:"Inter",fontSize:"36px",lineHeight:"40px",fontWeight:"500"};case"subtitle":return{fontFamily:"Inter",fontSize:"28px",lineHeight:"32px",fontWeight:"500"};case"heading-1":return{fontFamily:"Inter",fontSize:"22px",lineHeight:"24px",fontWeight:"500"};case"heading-2":return{fontFamily:"Inter",fontSize:"20px",lineHeight:"24px",fontWeight:"500"};case"heading-3":return{fontFamily:"Inter",fontSize:"18px",lineHeight:"22px",fontWeight:"500"};case"heading-4":return{fontFamily:"Inter",fontSize:"16px",lineHeight:"22px",fontWeight:"500"};case"heading-5":return{fontFamily:"Inter",fontSize:"14px",lineHeight:"22px",fontWeight:"500"};case"heading-6":return{fontFamily:"Inter",fontSize:"12px",lineHeight:"22px",fontWeight:"500"}}}}class ot extends m{constructor(t,e){super(),this.isFlushable=!0,this.textStyle=t,this.bold=e}toAnnotation(){return new rt(this.textStyle)}}class ct extends j{constructor(t){super(),this.isFlushable=!0,this.bold=t}toAnnotation(){return new W(this.bold)}}class at extends T{handleAction(t,e){t.newBlock=this.splitTextNodeBlock(t.splitPointNode,t.startOffsetOfNode,e)}splitTextNodeBlock(t,e,s){if(t){const n=t.text.slice(0,e),i=t.text.slice(e),r=s.children.indexOf(t);if(r>-1){const e=s.children.slice(0,r),o=s.children.slice(r+1);n&&e.push(t.cloneWithText(n)),i&&o.unshift(t.cloneWithText(i)),s.apply(new b(e));const c=s.cloneWithNodes(o);return s.parent.apply(new M(s,c)),c}}}}class ht extends T{handleAction(t,e){t.lineBreakNode=this.lineBreakSingleBlock(t.startContainerNode,t.startOffset,e)}lineBreakSingleBlock(t,e,s){if(t){const n=new it(o(),"\n",s),i=t.text.slice(0,e),r=t.text.slice(e),c=s.children.indexOf(t);if(c>-1){const e=s.children.slice(0,c),o=s.children.slice(c+1);i&&e.push(t.cloneWithText(i)),r&&o.unshift(t.cloneWithText(r)),this.mergeLineBreakNodes(e,n,o,s)}return n}}mergeLineBreakNodes(t,e,s,n){(0===s.length||s[0]&&""===s[0].text)&&s.push(new it(o(),"\n",n,t[t.length-1]&&t[t.length-1].annotationMap)),n.apply(new b([...t,e,...s]))}}class lt extends T{handleAction(t,e){t.lineBreakNode=this.lineBreakMultipleBlocks(t.selectedBlocks,e)}lineBreakMultipleBlocks(t,e){const s=e.children,n=new it(o(),"\n",e),i=this.concatBlocksNodes(t.slice(1));return this.mergeLineBreakNodes(s,n,i,e),n}concatBlocksNodes(t){const e=[];return t.map((t=>{"image"!==t.type&&(e.push(...t.children),t.parent.apply(new C(t)))})),e}mergeLineBreakNodes(t,e,s,n){(0===s.length||s[0]&&""===s[0].text)&&s.push(new it(o(),"\n",n,t[t.length-1]&&t[t.length-1].annotationMap)),n.apply(new b([...t,e,...s]))}}class ut extends x{constructor(t){super(),this.type=p.MERGE_TWO_BLOCKS_NODES,this.blockNeedToBeMerged=t}}class dt extends L{handleAction(t,e){this.deleteNodeContent(t,e)}deleteNodeContent(t,e){const s=t.startContainerNode,n=t.startOffset;if(0!==n&&!s.isEmpty()){const i=s.text.slice(0,n-1)+s.text.slice(n);if(s.apply(new Q(i)),i)return void(t.previousNode=s);{const n=this.getPreviousNode(s);return n&&n.parent===e&&"\n"===n.text||1===e.children.length?void(t.previousNode=s):(e.apply(new C(s)),void(t.previousNode=n))}}{let n=this.getPreviousNode(s),i=null;if(e.children.length&&n&&n.parent!==e)s.isEmpty()&&e.apply(new C(s)),e.type===n.parent.type&&n.parent.apply(new ut(e));else if(this.isContentFirstNode(s)&&s.isEmpty()&&(i=this.getNextNode(s)),s.isEmpty()&&e.apply(new C(s)),n instanceof it&&n.isEmpty()){const t=n;n=this.getPreviousNode(n),t.parent.apply(new C(t)),n||(i=s)}0===e.children.length&&e.parent.apply(new C(e)),n?t.previousNode=n:i&&(t.nextNode=i)}}}class pt extends T{replaceNodeWithNodes(t,e,s){t.children&&(s.forEach((e=>{e.parent=t})),t.children=t.children.flatMap((t=>t===e?s:t)))}}class ft extends pt{handleAction(t,e){const s=t.referNode,n=[...t.nodesToBeInserted,s];this.replaceNodeWithNodes(e,s,n)}}class wt extends O{constructor(t,e){super(t),this.children=[],this.type=e,this.annotationMap=wt.isAcceptableTextStyle(e)?new Map([rt.from(e)]):new Map([rt.from("paragraph")])}static from(e){const s=new wt(e.id,e.type),{annotations:n}=e;return s.children=e.nodes.map((t=>it.from(t,s))),n&&Object.entries(n).forEach((([e,n])=>{const i=this.createAnnotationEntity(e,n);t(i)&&s.annotationMap.set(...i)})),s}static createAnnotationEntity(t,e){return"textStyle"===t?rt.from(e):super.createAnnotationEntity(t,e)}static isAcceptableTextStyle(t){return["title","subtitle","paragraph","heading-1","heading-2","heading-3","heading-4","heading-5","heading-6"].includes(t)}mergeNodes(t){this.children=this.children.reduce(((e,s)=>{const n=e.at(-1);if(t instanceof nt&&t.needMergeNode){const t=null==n?void 0:n.getAnnotationByType(w.LINK),i=s.getAnnotationByType(w.LINK);if(t&&i&&t.toEqual(i))return e}return[...e,s]}),[])}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,nodes:this.children.map((t=>t.toJSON()))})}cloneWithNodes(t){const e=new wt(o(),this.type);return e.children=[],e.apply(new B(t)),e}clone(){const t=new wt(this.id,this.type);return t.children=this.children.map((e=>{const s=e.clone();return s.parent=t,s})),t.annotationMap=super.cloneAnnotations(),t.parent=this.parent,t}isNotEmpty(){return this.children.length>0&&this.children.some((t=>!t.isEmpty()))}getLastNode(){return this.children[this.children.length-1]}createNewParagraph(){return new wt(o(),"paragraph")}doAnnotationActionApply(t){const e=g.get(t.constructor.name,wt.name);e&&e.execute(t,this)}}g.register(ot.name,wt.name,new class extends T{handleAction(t,e){"list-item"!==e.type&&(e.type=t.textStyle),e.children.forEach(t.bold?t=>{const e=new ct(!0);e.doSplit=!1,t.apply(e)}:t=>{t.apply(new st(w.BOLD))})}}),g.register(V.name,wt.name,new class extends T{handleAction(t,e){const s=e.getAnnotationByType(a.LINK_GROUP);if(s){const n=s.linkGroups.get(t.groupKey);s.linkGroups.set(t.groupKey,[...n,...t.nodes]),e.annotationMap.set(a.LINK_GROUP,s)}}}),g.register(p.DELETE_CHILD,wt.name,new k),g.register(p.APPEND_CHILD_NODES,wt.name,new D),g.register(p.SPLIT_BLOCK_WITH_NODE,wt.name,new at),g.register(p.REPLACE_CHILD_NODES,wt.name,new R),g.register(p.MERGE_TWO_BLOCKS_NODES,wt.name,new I),g.register(p.BREAK_SINGLE_BLOCK,wt.name,new class extends T{handleAction(t,e){t.newBlock=this.breakSingleTextBlock(t.startContainerNode,t.startOffset,e)}breakSingleTextBlock(t,e,s){const n=this.copyInlineStyleToNewParagraph(t,s);if(this.isCaretPositionAtTextBlockEnd(s,t,e))s.parent.apply(new M(s,n));else{if(!this.isCaretPositionAtTextBlockStart(s,t,e)){const n=new K(t,e);return s.apply(n),n.newBlock}s.parent.apply(new F(s,n))}return n}copyInlineStyleToNewParagraph(t,e){const s=t.cloneWithText("");s.annotationMap.delete(w.LINK);const n=e.createNewParagraph();return n.apply(new B([s])),n}}),g.register(p.LINE_BREAK_SINGLE_BLOCK,wt.name,new ht),g.register(p.LINE_BREAK_MULTIPLE_BLOCKS,wt.name,new lt),g.register(p.DELETE_BLOCK_CONTENT,wt.name,new dt),g.register(p.INSERT_IMAGE_TO_BLOCK,wt.name,new class extends T{handleAction(t,e){const s=t.splitPointNode,n=t.startOffsetOfNode,i=t.imageBlockToBeInserted;if(this.isCaretPositionAtTextBlockEnd(e,s,n))e.parent.apply(new M(e,i));else if(this.isCaretPositionAtTextBlockStart(e,s,n))e.parent.apply(new F(e,i));else{const t=new K(s,n);e.apply(t),e.parent.apply(new M(e,i))}}}),g.register(p.INSERT_NODES_BEFORE,wt.name,new ft),g.register(p.TRANSFORM_LIST_BLOCK,wt.name,new class extends T{handleAction(t,e){const s=e.parent,n=s.createList(t.listType),i=t.selectedBlocks,r=i.map((t=>s.toListItem(t)));n.apply(new B(r)),s.apply(new M(t.selectedBlocks[0],n)),i.forEach((t=>{t.parent.apply(new C(t))}))}});class xt extends x{constructor(t,e){super(),this.isFlushable=!0,this.type=p.UPDATE_CODE_BLOCK,this.content=t,this.language=e}}class At extends m{constructor(t){super(),this.isFlushable=!1,this.range=t}toAnnotation(){return new P(this.range)}}class Et extends N{constructor(t,e,s,n){super(t),this.type=f.CODE_BLOCK_NODE,this.text="",this.annotationMap=new Map,this.text=e,this.parent=n,this.language=s}toJSON(){return{id:this.id,type:"text",text:this.text,language:this.language}}clone(){return new Et(this.id,this.text,this.language,this.parent)}doAnnotationActionApply(t){g.executeTheStrategy(t,this)}doModifyActionApply(t){g.executeTheStrategy(t,this)}}g.register(p.UPDATE_CODE_BLOCK,Et.name,new class extends T{handleAction(t,e){const{content:s,language:n}=t;e.language=n,e.text=s}}),g.register(At.name,Et.name,new class extends T{handleAction(t,e){e.annotationMap.set(a.SELECTION_RANGE,t.toAnnotation())}});class gt extends O{constructor(t,e,s){super(t),this.type="code-block",this.children=[new Et(`${t}-1`,e,s,this)]}static from(t){return new gt(t.id,t.content,t.language)}toJSON(){const{language:t,text:e}=this.children[0];return{id:this.id,type:"code-block",content:e,language:t}}clone(){const t=gt.from(this.toJSON());return t.parent=this.parent,t}apply(t){if(t instanceof x&&g.executeTheStrategy(t,this),t.isFlushable){const t=d.getDOMByEntity(this);if(t){const i=s.getSubjectFromParentNodeByEventId(t,n);i&&e.notify(i,{})}}}isNotEmpty(){return!!this.children.length}getLastNode(){return this.children[0]}isSelected(){return this.children[0].annotationMap.has(a.SELECTION_RANGE)}}g.register(p.DELETE_CODE_BLOCK,gt.name,new class extends L{handleAction(t,e){const s=e.children[0],n=e.parent;if(n){let t=this.getPreviousNode(s),i=this.getRTENodeEndOffset(t);t||(t=this.getNextNode(s),i=0),n.apply(new C(e));const r=t?d.getDOMByEntity(t):null;if(0===n.children.length){const s=wt.from({id:o(),type:"paragraph",nodes:[{id:o(),type:"text",text:""}]});e.parent.apply(new B([s])),t=s.children[0],i=0}this.notifyUpdateSelection(t,r,i,e)}}notifyUpdateSelection(t,n,r,o){const c=d.getDOMByEntity(o);if(c){const o=s.getSubjectFromParentNodeByEventId(c,i);o&&e.notify(o,{node:t,updateDirectly:!!n,offset:r})}}getRTENodeEndOffset(t){return t&&"CODE_BLOCK_NODE"!==t.type?"IMAGE"!==t.type?t.text.length:1:0}}),g.register(p.DELETE_CHILD,gt.name,new k),g.register(p.SWITCH_OUT_FROM_CODE_BLOCK,gt.name,new class extends T{handleAction(t,n){const{content:r,language:c}=t,a=r.split("\n"),h=new xt(a.slice(0,a.length-2).join("\n"),c);h.isFlushable=!1,n.children[0].apply(h);const l=wt.from({id:o(),type:"paragraph",nodes:[{id:o(),text:"",type:"text"}]});n.parent.apply(new M(n,l));const u=d.getDOMByEntity(n);if(u){const t=s.getSubjectFromParentNodeByEventId(u,i);t&&e.notify(t,{node:l.children[0]})}}}),g.register(p.INSERT_IMAGE_TO_BLOCK,gt.name,new class extends T{handleAction(t,e){e.parent.apply(new M(e,t.imageBlockToBeInserted))}}),gt.CODE_BLOCK_PLACEHOLDER_CLASS_NAME="code-block-placeholder-element";export{E as $,T as A,L as B,S as C,At as D,$ as E,z as F,Et as G,m as H,M as I,ct as J,J as K,nt as L,x as M,w as N,H as O,ot as P,rt as Q,C as R,K as S,j as T,xt as U,W as V,h as W,tt as X,et as Y,U as Z,v as _,_ as a,A as a0,Q as a1,ut as a2,b,B as c,wt as d,F as e,p as f,it as g,pt as h,O as i,g as j,I as k,k as l,D as m,R as n,ft as o,dt as p,ht as q,lt as r,at as s,Y as t,gt as u,N as v,d as w,u as x,y,a as z}
@@ -0,0 +1 @@
1
+ import{G as t,d as e,C as o,e as s,c as n,M as a,V as c,L as r}from"./p-6e1ab235.js";function i(){return function(t,e){Object.defineProperty(t,e,{set:l(e),get:s(e)})}}function l(s){return function(){const n={};t.globalSlimmers.forEach((t=>{n[t.name]=new t({component:this})}));const a=Object.values(n);a.forEach((t=>{e(s).call(this,t)})),a.length>0&&this[o].set(s,n)}}var f=function(t,e,o,s){var n,a=arguments.length,c=a<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,o):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,o,s);else for(var r=t.length-1;r>=0;r--)(n=t[r])&&(c=(a<3?n(c):a>3?n(e,o,c):n(e,o))||c);return a>3&&c&&Object.defineProperty(e,o,c),c};class d extends c{constructor(t){super(),this.usageDefinitions=t}sendUsagePayloadToTelemetry(){import("./p-db8cdba6.js").then((t=>{try{t.default.emit("componentUsage",this.getComponentUsageMetricsPayload())}catch(t){r.log("Component usage payload failed to emit telemetry:",t)}}))}getComponentUsageMetricsPayload(){const t={};if(t[d.baseUsageKey]=!0,this.usageDefinitions)for(const e of this.usageDefinitions){const{payloadKey:o,payloadValue:s}=e;t[o]=s(this.host)}return{componentName:this.host.tagName.toUpperCase(),data:t}}}d.baseUsageKey="COMPONENT_USED",f([n()],d.prototype,"host",void 0),f([a("componentDidRender")],d.prototype,"sendUsagePayloadToTelemetry",null);export{i as I,d as V}
@@ -1 +1 @@
1
- import{c as t}from"./p-112455b1.js";var e=t((function(t){!function(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s={rotl:function(t,e){return t<<e|t>>>32-e},rotr:function(t,e){return t<<32-e|t>>>e},endian:function(t){if(t.constructor==Number)return 16711935&s.rotl(t,8)|4278255360&s.rotl(t,24);for(var e=0;e<t.length;e++)t[e]=s.endian(t[e]);return t},randomBytes:function(t){for(var e=[];t>0;t--)e.push(Math.floor(256*Math.random()));return e},bytesToWords:function(t){for(var e=[],s=0,r=0;s<t.length;s++,r+=8)e[r>>>5]|=t[s]<<24-r%32;return e},wordsToBytes:function(t){for(var e=[],s=0;s<32*t.length;s+=8)e.push(t[s>>>5]>>>24-s%32&255);return e},bytesToHex:function(t){for(var e=[],s=0;s<t.length;s++)e.push((t[s]>>>4).toString(16)),e.push((15&t[s]).toString(16));return e.join("")},hexToBytes:function(t){for(var e=[],s=0;s<t.length;s+=2)e.push(parseInt(t.substr(s,2),16));return e},bytesToBase64:function(t){for(var s=[],r=0;r<t.length;r+=3)for(var i=t[r]<<16|t[r+1]<<8|t[r+2],n=0;n<4;n++)s.push(8*r+6*n<=8*t.length?e.charAt(i>>>6*(3-n)&63):"=");return s.join("")},base64ToBytes:function(t){t=t.replace(/[^A-Z0-9+\/]/gi,"");for(var s=[],r=0,i=0;r<t.length;i=++r%4)0!=i&&s.push((e.indexOf(t.charAt(r-1))&Math.pow(2,-2*i+8)-1)<<2*i|e.indexOf(t.charAt(r))>>>6-2*i);return s}};t.exports=s}()})),s={utf8:{stringToBytes:function(t){return s.bin.stringToBytes(unescape(encodeURIComponent(t)))},bytesToString:function(t){return decodeURIComponent(escape(s.bin.bytesToString(t)))}},bin:{stringToBytes:function(t){for(var e=[],s=0;s<t.length;s++)e.push(255&t.charCodeAt(s));return e},bytesToString:function(t){for(var e=[],s=0;s<t.length;s++)e.push(String.fromCharCode(t[s]));return e.join("")}}},r=s,i=function(t){return null!=t&&(n(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&n(t.slice(0,0))}(t)||!!t._isBuffer)};function n(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}var o=t((function(t){!function(){var s=e,n=r.utf8,o=i,c=r.bin,a=function(t,e){t.constructor==String?t=e&&"binary"===e.encoding?c.stringToBytes(t):n.stringToBytes(t):o(t)?t=Array.prototype.slice.call(t,0):Array.isArray(t)||t.constructor===Uint8Array||(t=t.toString());for(var r=s.bytesToWords(t),i=8*t.length,h=1732584193,u=-271733879,l=-1732584194,d=271733878,g=0;g<r.length;g++)r[g]=16711935&(r[g]<<8|r[g]>>>24)|4278255360&(r[g]<<24|r[g]>>>8);r[i>>>5]|=128<<i%32,r[14+(i+64>>>9<<4)]=i;var f=a._ff,m=a._gg,p=a._hh,b=a._ii;for(g=0;g<r.length;g+=16){var y=h,w=u,v=l,T=d;h=f(h,u,l,d,r[g+0],7,-680876936),d=f(d,h,u,l,r[g+1],12,-389564586),l=f(l,d,h,u,r[g+2],17,606105819),u=f(u,l,d,h,r[g+3],22,-1044525330),h=f(h,u,l,d,r[g+4],7,-176418897),d=f(d,h,u,l,r[g+5],12,1200080426),l=f(l,d,h,u,r[g+6],17,-1473231341),u=f(u,l,d,h,r[g+7],22,-45705983),h=f(h,u,l,d,r[g+8],7,1770035416),d=f(d,h,u,l,r[g+9],12,-1958414417),l=f(l,d,h,u,r[g+10],17,-42063),u=f(u,l,d,h,r[g+11],22,-1990404162),h=f(h,u,l,d,r[g+12],7,1804603682),d=f(d,h,u,l,r[g+13],12,-40341101),l=f(l,d,h,u,r[g+14],17,-1502002290),h=m(h,u=f(u,l,d,h,r[g+15],22,1236535329),l,d,r[g+1],5,-165796510),d=m(d,h,u,l,r[g+6],9,-1069501632),l=m(l,d,h,u,r[g+11],14,643717713),u=m(u,l,d,h,r[g+0],20,-373897302),h=m(h,u,l,d,r[g+5],5,-701558691),d=m(d,h,u,l,r[g+10],9,38016083),l=m(l,d,h,u,r[g+15],14,-660478335),u=m(u,l,d,h,r[g+4],20,-405537848),h=m(h,u,l,d,r[g+9],5,568446438),d=m(d,h,u,l,r[g+14],9,-1019803690),l=m(l,d,h,u,r[g+3],14,-187363961),u=m(u,l,d,h,r[g+8],20,1163531501),h=m(h,u,l,d,r[g+13],5,-1444681467),d=m(d,h,u,l,r[g+2],9,-51403784),l=m(l,d,h,u,r[g+7],14,1735328473),h=p(h,u=m(u,l,d,h,r[g+12],20,-1926607734),l,d,r[g+5],4,-378558),d=p(d,h,u,l,r[g+8],11,-2022574463),l=p(l,d,h,u,r[g+11],16,1839030562),u=p(u,l,d,h,r[g+14],23,-35309556),h=p(h,u,l,d,r[g+1],4,-1530992060),d=p(d,h,u,l,r[g+4],11,1272893353),l=p(l,d,h,u,r[g+7],16,-155497632),u=p(u,l,d,h,r[g+10],23,-1094730640),h=p(h,u,l,d,r[g+13],4,681279174),d=p(d,h,u,l,r[g+0],11,-358537222),l=p(l,d,h,u,r[g+3],16,-722521979),u=p(u,l,d,h,r[g+6],23,76029189),h=p(h,u,l,d,r[g+9],4,-640364487),d=p(d,h,u,l,r[g+12],11,-421815835),l=p(l,d,h,u,r[g+15],16,530742520),h=b(h,u=p(u,l,d,h,r[g+2],23,-995338651),l,d,r[g+0],6,-198630844),d=b(d,h,u,l,r[g+7],10,1126891415),l=b(l,d,h,u,r[g+14],15,-1416354905),u=b(u,l,d,h,r[g+5],21,-57434055),h=b(h,u,l,d,r[g+12],6,1700485571),d=b(d,h,u,l,r[g+3],10,-1894986606),l=b(l,d,h,u,r[g+10],15,-1051523),u=b(u,l,d,h,r[g+1],21,-2054922799),h=b(h,u,l,d,r[g+8],6,1873313359),d=b(d,h,u,l,r[g+15],10,-30611744),l=b(l,d,h,u,r[g+6],15,-1560198380),u=b(u,l,d,h,r[g+13],21,1309151649),h=b(h,u,l,d,r[g+4],6,-145523070),d=b(d,h,u,l,r[g+11],10,-1120210379),l=b(l,d,h,u,r[g+2],15,718787259),u=b(u,l,d,h,r[g+9],21,-343485551),h=h+y>>>0,u=u+w>>>0,l=l+v>>>0,d=d+T>>>0}return s.endian([h,u,l,d])};a._ff=function(t,e,s,r,i,n,o){var c=t+(e&s|~e&r)+(i>>>0)+o;return(c<<n|c>>>32-n)+e},a._gg=function(t,e,s,r,i,n,o){var c=t+(e&r|s&~r)+(i>>>0)+o;return(c<<n|c>>>32-n)+e},a._hh=function(t,e,s,r,i,n,o){var c=t+(e^s^r)+(i>>>0)+o;return(c<<n|c>>>32-n)+e},a._ii=function(t,e,s,r,i,n,o){var c=t+(s^(e|~r))+(i>>>0)+o;return(c<<n|c>>>32-n)+e},a._blocksize=16,a._digestsize=16,t.exports=function(t,e){if(null==t)throw new Error("Illegal argument "+t);var r=s.wordsToBytes(a(t,e));return e&&e.asBytes?r:e&&e.asString?c.bytesToString(r):s.bytesToHex(r)}}()}));class c{static setVegaTelemetryLogLevel(t){this.logLevel=t}static log(...t){this.shouldLog("log")&&console.log(`%c${this.LOG_PREFIX_STR}`,this.LOG_PREFIX_STYLE,...t)}static debug(...t){this.shouldLog("debug")&&console.debug(`%c${this.LOG_PREFIX_STR}`,this.LOG_PREFIX_STYLE,...t)}static warn(...t){this.shouldLog("warn")&&console.warn(`%c${this.LOG_PREFIX_STR}`,this.LOG_PREFIX_STYLE,...t)}static error(...t){this.shouldLog("error")&&console.error(`%c${this.LOG_PREFIX_STR}`,this.LOG_PREFIX_STYLE,...t)}static shouldLog(t){return this.LOG_LEVELS.indexOf(t)<=this.LOG_LEVELS.indexOf(this.logLevel)}}c.logLevel="off",c.LOG_PREFIX_STR="[VegaTelemetry]",c.LOG_PREFIX_STYLE="font-weight: bold",c.LOG_LEVELS=["off","error","warn","debug","log"],Object.assign(globalThis,{LogUtility:c});class a{constructor(t,e){this.environment=t,this.payload=e,this.id=o(JSON.stringify({environment:t,payload:e}))}}var h=new class{constructor(){this.runtimeMetrics=[],this.runtimeMetricsIds=new Set([])}collect(t){c.debug("Collecting the runtime metrics payload"),this.runtimeMetricsIds.has(t.id)||(this.runtimeMetrics.push(t),this.runtimeMetricsIds.add(t.id))}getRuntimeMetrics(){return this.runtimeMetrics}deleteRuntimeMetrics(t){this.runtimeMetrics=this.runtimeMetrics.filter((e=>(this.runtimeMetricsIds.delete(e.id),!t.includes(e))))}},u=new class{constructor(){this.localStorage=null;try{this.localStorage=globalThis.localStorage}catch(t){c.error("Failed to access browser localStorage:",t)}}setItem(t,e){this.localStorage&&this.localStorage.setItem(t,JSON.stringify(e))}getItem(t){if(this.localStorage){const e=this.localStorage.getItem(t);if(e)return JSON.parse(e)}return null}removeItem(t){this.localStorage&&this.localStorage.removeItem(t)}clear(){this.localStorage&&this.localStorage.clear()}findKeys(t){const e=[];if(this.localStorage)for(let s=0;s<this.localStorage.length;s++){const r=this.localStorage.key(s);r&&r.includes(t)&&e.push(r)}return e}};class l{isDuplicate(t){return this.getRuntimeMetricsIds().includes(t.id)}cleanup(){c.debug("Vega telemetry start clear the old vega version runtime metrics ids in localStorage"),u.findKeys(l.RUNTIME_METRICS_IDS_KEY_PREFIX).map((t=>{t!==l.RUNTIME_METRICS_IDS_KEY_PREFIX+globalThis.VegaEnvInfo.version&&u.removeItem(t)}))}getRuntimeMetricsIds(){return u.getItem(l.RUNTIME_METRICS_IDS_KEY_PREFIX+globalThis.VegaEnvInfo.version)||[]}onDispatched(t){c.debug("Vega telemetry records runtime metrics ids in localStorage");const e=t.map((t=>t.id));u.setItem(l.RUNTIME_METRICS_IDS_KEY_PREFIX+globalThis.VegaEnvInfo.version,[...new Set([...this.getRuntimeMetricsIds(),...e])])}}l.RUNTIME_METRICS_IDS_KEY_PREFIX="vega-telemetry-runtime-metrics-ids-";var d=new class{constructor(t){this.strategies=t}checkByStrategies(t){c.debug("Start check duplicate payload by strategies");for(const e of this.strategies)return e.isDuplicate(t);return!1}updateDispatchedRuntimeMetrics(t){for(const e of this.strategies)e.onDispatched(t)}clearRuntimeMetrics(){try{for(const t of this.strategies)t.cleanup()}catch(t){c.error("Vega telemetry failed to clear runtime metrics in localStorage:",t)}}}([new l]);class g{constructor(t,e,s,r,i){this.vegaVersion=t,this.framework=e,this.browser=s,this.os=r,this.origin=i}}class f{constructor(t,e){this.name=t,this.version=e}}class m{constructor(t,e){this.name=t,this.version=e}}class p{constructor(){this.commonVersionRegExp=/version\/(\d+(\.?_?\d+)+)/i}getVersion(t){return this.getPCTerminalMatch(this.versionRegExp[0],t)}isNameMatch(t){return this.nameRegExp.some((e=>e.test(t)))}predict(t){const e=this.name,s=this.getVersion(t);return new f(e,s)}getPCTerminalMatch(t,e){const s=e.match(t);return s&&s.length>0&&s[1]||""}getMobileTerminalMatch(t,e){const s=e.match(t);return s&&s.length>1&&s[2]||""}}class b extends p{constructor(){super(...arguments),this.name="IE",this.nameRegExp=[/msie|trident/i],this.versionRegExp=[/(?:msie |rv:)(\d+(\.?_?\d+)+)/i]}}class y extends p{constructor(){super(...arguments),this.name="Edge",this.nameRegExp=[/\sedg\//i,/edg([ae]|ios)/i],this.versionRegExp=[/\sedg\/(\d+(\.?_?\d+)+)/i,/edg([ae]|ios)\/(\d+(\.?_?\d+)+)/i]}getVersion(t){return this.nameRegExp[0].test(t)?this.getPCTerminalMatch(this.versionRegExp[0],t):this.getMobileTerminalMatch(this.versionRegExp[1],t)}}class w extends p{constructor(){super(...arguments),this.name="FireFox",this.nameRegExp=[/firefox|iceweasel|fxios/i],this.versionRegExp=[/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i]}}class v extends p{constructor(){super(...arguments),this.name="Chrome",this.nameRegExp=[/chromium/i,/^(?!.*\s(edg|edga)\/).*chrome|crios|crmo/i],this.versionRegExp=[/chromium[\s/](\d+(\.?_?\d+)+)/i,/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i]}getVersion(t){let e="";return e=this.nameRegExp[0].test(t)?this.getPCTerminalMatch(this.versionRegExp[0],t)||this.getPCTerminalMatch(this.commonVersionRegExp,t):this.getPCTerminalMatch(this.versionRegExp[1],t),e}}class T extends p{constructor(){super(...arguments),this.name="Safari",this.nameRegExp=[/^(?!.*\s(firefox|iceweasel|fxios)\/).*(safari|applewebkit)/i],this.versionRegExp=[/version\/(\d+(\.?_?\d+)+)/i]}}class E{detect(t){if(t)for(const e of this.predictors)if(e.isNameMatch(t))return e.predict(t);return{name:"Other",version:""}}}class x extends E{constructor(){super(...arguments),this.predictors=[new v,new y,new T,new w,new b]}}class S{constructor(){this.commonVersionRegExp=/version\/(\d+(\.?_?\d+)+)/i,this.versionDelimiterRegExp=/[\s_]/g}isNameMatch(t){return this.nameRegExp.some((e=>e.test(t)))}predict(t){const e=this.getName(t),s=this.getVersion(t);return new m(e,s)}getName(t){const e=t.match(/\((.*?)\)/);return e&&e[1]||"Other"}getVersion(t){return this.getCommonVersion(t)}getCommonVersion(t,e=!1){let s=this.getMainstreamOSMatch(this.versionRegExp[0]||this.commonVersionRegExp,t);return s&&e&&(s=s.replace(this.versionDelimiterRegExp,".")),s}getMainstreamOSMatch(t,e){const s=e.match(t);return s&&s.length>0&&s[1]||""}}class V extends S{constructor(){super(...arguments),this.nameRegExp=[/windows /i],this.versionRegExp=[/windows ((nt|xp)( \d\d?.\d)?)/i]}}class _ extends S{constructor(){super(...arguments),this.nameRegExp=[/macintosh/i],this.versionRegExp=[/mac os x (\d+(\.?_?\d+)+)/i]}getVersion(t){return this.getCommonVersion(t,!0)}}class M extends S{constructor(){super(...arguments),this.nameRegExp=[/(ipod|iphone|ipad)/i],this.versionRegExp=[/os (\d+([\s_]\d+)*) like mac os x/i]}getVersion(t){return this.getCommonVersion(t,!0)}}class L extends S{constructor(){super(...arguments),this.nameRegExp=[/android/i],this.versionRegExp=[/android[\s/-](\d+(\.\d+)*)/i]}}class A extends S{constructor(){super(...arguments),this.nameRegExp=[/linux/i],this.versionRegExp=[]}}class C extends E{constructor(){super(...arguments),this.predictors=[new _,new V,new M,new L,new A]}}function O(t){c.debug("Vega telemetry start clear runtime metrics in localStorage"),"requestIdleCallback"in globalThis?globalThis.requestIdleCallback((()=>{t()})):setTimeout((()=>{t()}),100)}function R(){return globalThis.location.origin}function I(){return globalThis.navigator.userAgent}function N(){try{return globalThis&&!!globalThis.localStorage&&!!globalThis.navigator&&!!globalThis.location}catch(t){return c.debug("Failed to access browser localStorage, navigator or location:",t),!1}}var B,k,F,U,D=new class{constructor(){this.browserDetector=new x,this.osDetector=new C}generate(){return this.environment||(this.environment=new g(globalThis.VegaEnvInfo.version,globalThis.VegaEnvInfo.framework,this.browserDetector.detect(I()),this.osDetector.detect(I()),R())),this.environment}},G=new class{emit(t){const e=new a(D.generate(),t);c.debug("Vega telemetry start emit runtime metrics"),d.checkByStrategies(e)||(c.debug("The payload has not been collected by strategies check"),h.collect(e))}};class P{static post(t,e){const s=new globalThis.Blob([JSON.stringify(e)]);return globalThis.navigator.sendBeacon(P.getVegaTelemetryApimHost()+t+`?subscription-key=${P.getVegaTelemetryApimSubKey()}`,s)}static getVegaTelemetryApimHost(){return R().includes("localhost")?"http://localhost:3334":"https://vega-telemetry-apim-dev.azure-api.net"}static getVegaTelemetryApimSubKey(){return"8bc15c7c8b514d1bb92825b0b17a1731"}}class ${constructor(t,e,s){this.environment=t,this.payloads=e,this.triggerEvent=s}}(U=B||(B={})).ComponentUsagePayload="componentUsage",U.FeatureFlagOverriddenPayload="featureFlagOverridden",U.PublicAPIMetricsPayload="publicAPIMetrics",function(t){t.VisibilityChange="visibilitychange",t.PageHide="pagehide"}(k||(k={})),function(t){t.ENABLE_COLLECT_COMPONENTS_USAGE="VEGA_TELEMETRY.ENABLE_COLLECT_COMPONENTS_USAGE",t.ENABLE_COLLECT_PUBLIC_API="VEGA_TELEMETRY.ENABLE_COLLECT_PUBLIC_API",t.ENABLE_COLLECT_FEATURE_FLAG_OVERRIDDEN="VEGA_TELEMETRY.ENABLE_COLLECT_FEATURE_FLAG_OVERRIDDEN"}(F||(F={}));var J=new class{constructor(){this.dispatchedRuntimeMetrics=[]}dispatch(t){try{const e=this.generateRuntimeMetricsSubmitDto(t);e&&(c.debug("Vega telemetry start dispatch runtime metrics"),P.post("/runtime-metrics",e),d.updateDispatchedRuntimeMetrics(this.dispatchedRuntimeMetrics),h.deleteRuntimeMetrics(this.dispatchedRuntimeMetrics),c.debug("The runtime metrics have been dispatched successfully!"))}catch(t){c.error("Vega telemetry failed to dispatch:",t)}}generateRuntimeMetricsSubmitDto(t){const e=this.filterRuntimeMetrics();return e.length>0?(this.dispatchedRuntimeMetrics=e,new $(D.generate(),e.map((t=>t.payload)),t)):null}filterRuntimeMetrics(){return h.getRuntimeMetrics().filter((t=>this.canDispatch(t)&&!d.checkByStrategies(t)))}canDispatch(t){const e=Y.getFeatureFlagController();if(!e)return!1;switch(t.payload.type){case B.ComponentUsagePayload:return e.isEnabled(F.ENABLE_COLLECT_COMPONENTS_USAGE);case B.FeatureFlagOverriddenPayload:return e.isEnabled(F.ENABLE_COLLECT_FEATURE_FLAG_OVERRIDDEN);case B.PublicAPIMetricsPayload:return e.isEnabled(F.ENABLE_COLLECT_PUBLIC_API)}}},Y=new class{register(t){var e;c.debug("Vega telemetry start register 'pagehide' and 'visibilitychange' event"),e=()=>J.dispatch(k.VisibilityChange),"visibilityState"in document&&document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e()})),globalThis.addEventListener("pagehide",(()=>J.dispatch(k.PageHide))),O((()=>d.clearRuntimeMetrics())),this.featureFlagController=t}getFeatureFlagController(){return this.featureFlagController}};class j{constructor(t,e,s){this.type=t,this.componentName=e,this.data=s}}class H{constructor(t,e,s){this.type=t,this.featureFlagName=e,this.featureFlagOverriddenValue=s}}class K{constructor(t,e,s){this.type=t,this.publicAPIName=e,this.data=s}}var q=new class{emit(t,e){O((()=>{try{if(N())switch(t){case B.ComponentUsagePayload:G.emit(new j(t,e.componentName,e.data));break;case B.FeatureFlagOverriddenPayload:G.emit(new H(t,e.featureFlagName,e.featureFlagOverriddenValue));break;case B.PublicAPIMetricsPayload:G.emit(new K(t,e.publicAPIName,e.data));break;default:throw new Error(`Unknown runtime metrics payload type: ${t}`)}}catch(t){c.error("Vega telemetry failed to emit runtime metrics:",t)}}))}init(t){try{N()&&Y.register(t)}catch(t){c.error("Vega telemetry failed to register event:",t)}}};export default q;
1
+ import{c as t}from"./p-112455b1.js";var e=t((function(t){!function(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s={rotl:function(t,e){return t<<e|t>>>32-e},rotr:function(t,e){return t<<32-e|t>>>e},endian:function(t){if(t.constructor==Number)return 16711935&s.rotl(t,8)|4278255360&s.rotl(t,24);for(var e=0;e<t.length;e++)t[e]=s.endian(t[e]);return t},randomBytes:function(t){for(var e=[];t>0;t--)e.push(Math.floor(256*Math.random()));return e},bytesToWords:function(t){for(var e=[],s=0,r=0;s<t.length;s++,r+=8)e[r>>>5]|=t[s]<<24-r%32;return e},wordsToBytes:function(t){for(var e=[],s=0;s<32*t.length;s+=8)e.push(t[s>>>5]>>>24-s%32&255);return e},bytesToHex:function(t){for(var e=[],s=0;s<t.length;s++)e.push((t[s]>>>4).toString(16)),e.push((15&t[s]).toString(16));return e.join("")},hexToBytes:function(t){for(var e=[],s=0;s<t.length;s+=2)e.push(parseInt(t.substr(s,2),16));return e},bytesToBase64:function(t){for(var s=[],r=0;r<t.length;r+=3)for(var i=t[r]<<16|t[r+1]<<8|t[r+2],n=0;n<4;n++)s.push(8*r+6*n<=8*t.length?e.charAt(i>>>6*(3-n)&63):"=");return s.join("")},base64ToBytes:function(t){t=t.replace(/[^A-Z0-9+\/]/gi,"");for(var s=[],r=0,i=0;r<t.length;i=++r%4)0!=i&&s.push((e.indexOf(t.charAt(r-1))&Math.pow(2,-2*i+8)-1)<<2*i|e.indexOf(t.charAt(r))>>>6-2*i);return s}};t.exports=s}()})),s={utf8:{stringToBytes:function(t){return s.bin.stringToBytes(unescape(encodeURIComponent(t)))},bytesToString:function(t){return decodeURIComponent(escape(s.bin.bytesToString(t)))}},bin:{stringToBytes:function(t){for(var e=[],s=0;s<t.length;s++)e.push(255&t.charCodeAt(s));return e},bytesToString:function(t){for(var e=[],s=0;s<t.length;s++)e.push(String.fromCharCode(t[s]));return e.join("")}}},r=s,i=function(t){return null!=t&&(n(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&n(t.slice(0,0))}(t)||!!t._isBuffer)};function n(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}var o=t((function(t){!function(){var s=e,n=r.utf8,o=i,c=r.bin,a=function(t,e){t.constructor==String?t=e&&"binary"===e.encoding?c.stringToBytes(t):n.stringToBytes(t):o(t)?t=Array.prototype.slice.call(t,0):Array.isArray(t)||t.constructor===Uint8Array||(t=t.toString());for(var r=s.bytesToWords(t),i=8*t.length,h=1732584193,u=-271733879,l=-1732584194,d=271733878,g=0;g<r.length;g++)r[g]=16711935&(r[g]<<8|r[g]>>>24)|4278255360&(r[g]<<24|r[g]>>>8);r[i>>>5]|=128<<i%32,r[14+(i+64>>>9<<4)]=i;var f=a._ff,m=a._gg,p=a._hh,b=a._ii;for(g=0;g<r.length;g+=16){var y=h,w=u,v=l,T=d;h=f(h,u,l,d,r[g+0],7,-680876936),d=f(d,h,u,l,r[g+1],12,-389564586),l=f(l,d,h,u,r[g+2],17,606105819),u=f(u,l,d,h,r[g+3],22,-1044525330),h=f(h,u,l,d,r[g+4],7,-176418897),d=f(d,h,u,l,r[g+5],12,1200080426),l=f(l,d,h,u,r[g+6],17,-1473231341),u=f(u,l,d,h,r[g+7],22,-45705983),h=f(h,u,l,d,r[g+8],7,1770035416),d=f(d,h,u,l,r[g+9],12,-1958414417),l=f(l,d,h,u,r[g+10],17,-42063),u=f(u,l,d,h,r[g+11],22,-1990404162),h=f(h,u,l,d,r[g+12],7,1804603682),d=f(d,h,u,l,r[g+13],12,-40341101),l=f(l,d,h,u,r[g+14],17,-1502002290),h=m(h,u=f(u,l,d,h,r[g+15],22,1236535329),l,d,r[g+1],5,-165796510),d=m(d,h,u,l,r[g+6],9,-1069501632),l=m(l,d,h,u,r[g+11],14,643717713),u=m(u,l,d,h,r[g+0],20,-373897302),h=m(h,u,l,d,r[g+5],5,-701558691),d=m(d,h,u,l,r[g+10],9,38016083),l=m(l,d,h,u,r[g+15],14,-660478335),u=m(u,l,d,h,r[g+4],20,-405537848),h=m(h,u,l,d,r[g+9],5,568446438),d=m(d,h,u,l,r[g+14],9,-1019803690),l=m(l,d,h,u,r[g+3],14,-187363961),u=m(u,l,d,h,r[g+8],20,1163531501),h=m(h,u,l,d,r[g+13],5,-1444681467),d=m(d,h,u,l,r[g+2],9,-51403784),l=m(l,d,h,u,r[g+7],14,1735328473),h=p(h,u=m(u,l,d,h,r[g+12],20,-1926607734),l,d,r[g+5],4,-378558),d=p(d,h,u,l,r[g+8],11,-2022574463),l=p(l,d,h,u,r[g+11],16,1839030562),u=p(u,l,d,h,r[g+14],23,-35309556),h=p(h,u,l,d,r[g+1],4,-1530992060),d=p(d,h,u,l,r[g+4],11,1272893353),l=p(l,d,h,u,r[g+7],16,-155497632),u=p(u,l,d,h,r[g+10],23,-1094730640),h=p(h,u,l,d,r[g+13],4,681279174),d=p(d,h,u,l,r[g+0],11,-358537222),l=p(l,d,h,u,r[g+3],16,-722521979),u=p(u,l,d,h,r[g+6],23,76029189),h=p(h,u,l,d,r[g+9],4,-640364487),d=p(d,h,u,l,r[g+12],11,-421815835),l=p(l,d,h,u,r[g+15],16,530742520),h=b(h,u=p(u,l,d,h,r[g+2],23,-995338651),l,d,r[g+0],6,-198630844),d=b(d,h,u,l,r[g+7],10,1126891415),l=b(l,d,h,u,r[g+14],15,-1416354905),u=b(u,l,d,h,r[g+5],21,-57434055),h=b(h,u,l,d,r[g+12],6,1700485571),d=b(d,h,u,l,r[g+3],10,-1894986606),l=b(l,d,h,u,r[g+10],15,-1051523),u=b(u,l,d,h,r[g+1],21,-2054922799),h=b(h,u,l,d,r[g+8],6,1873313359),d=b(d,h,u,l,r[g+15],10,-30611744),l=b(l,d,h,u,r[g+6],15,-1560198380),u=b(u,l,d,h,r[g+13],21,1309151649),h=b(h,u,l,d,r[g+4],6,-145523070),d=b(d,h,u,l,r[g+11],10,-1120210379),l=b(l,d,h,u,r[g+2],15,718787259),u=b(u,l,d,h,r[g+9],21,-343485551),h=h+y>>>0,u=u+w>>>0,l=l+v>>>0,d=d+T>>>0}return s.endian([h,u,l,d])};a._ff=function(t,e,s,r,i,n,o){var c=t+(e&s|~e&r)+(i>>>0)+o;return(c<<n|c>>>32-n)+e},a._gg=function(t,e,s,r,i,n,o){var c=t+(e&r|s&~r)+(i>>>0)+o;return(c<<n|c>>>32-n)+e},a._hh=function(t,e,s,r,i,n,o){var c=t+(e^s^r)+(i>>>0)+o;return(c<<n|c>>>32-n)+e},a._ii=function(t,e,s,r,i,n,o){var c=t+(s^(e|~r))+(i>>>0)+o;return(c<<n|c>>>32-n)+e},a._blocksize=16,a._digestsize=16,t.exports=function(t,e){if(null==t)throw new Error("Illegal argument "+t);var r=s.wordsToBytes(a(t,e));return e&&e.asBytes?r:e&&e.asString?c.bytesToString(r):s.bytesToHex(r)}}()}));class c{static setVegaTelemetryLogLevel(t){this.logLevel=t}static log(...t){this.shouldLog("log")&&console.log(`%c${this.LOG_PREFIX_STR}`,this.LOG_PREFIX_STYLE,...t)}static debug(...t){this.shouldLog("debug")&&console.debug(`%c${this.LOG_PREFIX_STR}`,this.LOG_PREFIX_STYLE,...t)}static warn(...t){this.shouldLog("warn")&&console.warn(`%c${this.LOG_PREFIX_STR}`,this.LOG_PREFIX_STYLE,...t)}static error(...t){this.shouldLog("error")&&console.error(`%c${this.LOG_PREFIX_STR}`,this.LOG_PREFIX_STYLE,...t)}static shouldLog(t){return this.LOG_LEVELS.indexOf(t)<=this.LOG_LEVELS.indexOf(this.logLevel)}}c.logLevel="off",c.LOG_PREFIX_STR="[VegaTelemetry]",c.LOG_PREFIX_STYLE="font-weight: bold",c.LOG_LEVELS=["off","error","warn","debug","log"],Object.assign(globalThis,{LogUtility:c});class a{constructor(t,e){this.environment=t,this.payload=e,this.id=o(JSON.stringify({environment:t,payload:e}))}}var h=new class{constructor(){this.runtimeMetrics=[],this.runtimeMetricsIds=new Set([])}collect(t){c.debug("Collecting the runtime metrics payload"),this.runtimeMetricsIds.has(t.id)||(this.runtimeMetrics.push(t),this.runtimeMetricsIds.add(t.id))}getRuntimeMetrics(){return this.runtimeMetrics}deleteRuntimeMetrics(t){this.runtimeMetrics=this.runtimeMetrics.filter((e=>(this.runtimeMetricsIds.delete(e.id),!t.includes(e))))}},u=new class{constructor(){this.localStorage=null;try{this.localStorage=globalThis.localStorage}catch(t){c.error("Failed to access browser localStorage:",t)}}setItem(t,e){this.localStorage&&this.localStorage.setItem(t,JSON.stringify(e))}getItem(t){if(this.localStorage){const e=this.localStorage.getItem(t);if(e)return JSON.parse(e)}return null}removeItem(t){this.localStorage&&this.localStorage.removeItem(t)}clear(){this.localStorage&&this.localStorage.clear()}findKeys(t){const e=[];if(this.localStorage)for(let s=0;s<this.localStorage.length;s++){const r=this.localStorage.key(s);r&&r.includes(t)&&e.push(r)}return e}};class l{isDuplicate(t){return this.getRuntimeMetricsIds().includes(t.id)}cleanup(){c.debug("Vega telemetry start clear the old vega version runtime metrics ids in localStorage"),u.findKeys(l.RUNTIME_METRICS_IDS_KEY_PREFIX).map((t=>{t!==l.RUNTIME_METRICS_IDS_KEY_PREFIX+globalThis.VegaEnvInfo.version&&u.removeItem(t)}))}getRuntimeMetricsIds(){return u.getItem(l.RUNTIME_METRICS_IDS_KEY_PREFIX+globalThis.VegaEnvInfo.version)||[]}onDispatched(t){c.debug("Vega telemetry records runtime metrics ids in localStorage");const e=t.map((t=>t.id));u.setItem(l.RUNTIME_METRICS_IDS_KEY_PREFIX+globalThis.VegaEnvInfo.version,[...new Set([...this.getRuntimeMetricsIds(),...e])])}}l.RUNTIME_METRICS_IDS_KEY_PREFIX="vega-telemetry-runtime-metrics-ids-";var d=new class{constructor(t){this.strategies=t}checkByStrategies(t){c.debug("Start check duplicate payload by strategies");for(const e of this.strategies)return e.isDuplicate(t);return!1}updateDispatchedRuntimeMetrics(t){for(const e of this.strategies)e.onDispatched(t)}clearRuntimeMetrics(){try{for(const t of this.strategies)t.cleanup()}catch(t){c.error("Vega telemetry failed to clear runtime metrics in localStorage:",t)}}}([new l]);class g{constructor(t,e,s,r,i){this.vegaVersion=t,this.framework=e,this.browser=s,this.os=r,this.origin=i}}class f{constructor(t,e){this.name=t,this.version=e}}class m{constructor(t,e){this.name=t,this.version=e}}class p{constructor(){this.commonVersionRegExp=/version\/(\d+(\.?_?\d+)+)/i}getVersion(t){return this.getPCTerminalMatch(this.versionRegExp[0],t)}isNameMatch(t){return this.nameRegExp.some((e=>e.test(t)))}predict(t){const e=this.name,s=this.getVersion(t);return new f(e,s)}getPCTerminalMatch(t,e){const s=e.match(t);return s&&s.length>0&&s[1]||""}getMobileTerminalMatch(t,e){const s=e.match(t);return s&&s.length>1&&s[2]||""}}class b extends p{constructor(){super(...arguments),this.name="IE",this.nameRegExp=[/msie|trident/i],this.versionRegExp=[/(?:msie |rv:)(\d+(\.?_?\d+)+)/i]}}class y extends p{constructor(){super(...arguments),this.name="Edge",this.nameRegExp=[/\sedg\//i,/edg([ae]|ios)/i],this.versionRegExp=[/\sedg\/(\d+(\.?_?\d+)+)/i,/edg([ae]|ios)\/(\d+(\.?_?\d+)+)/i]}getVersion(t){return this.nameRegExp[0].test(t)?this.getPCTerminalMatch(this.versionRegExp[0],t):this.getMobileTerminalMatch(this.versionRegExp[1],t)}}class w extends p{constructor(){super(...arguments),this.name="FireFox",this.nameRegExp=[/firefox|iceweasel|fxios/i],this.versionRegExp=[/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i]}}class v extends p{constructor(){super(...arguments),this.name="Chrome",this.nameRegExp=[/chromium/i,/^(?!.*\s(edg|edga)\/).*chrome|crios|crmo/i],this.versionRegExp=[/chromium[\s/](\d+(\.?_?\d+)+)/i,/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i]}getVersion(t){let e="";return e=this.nameRegExp[0].test(t)?this.getPCTerminalMatch(this.versionRegExp[0],t)||this.getPCTerminalMatch(this.commonVersionRegExp,t):this.getPCTerminalMatch(this.versionRegExp[1],t),e}}class T extends p{constructor(){super(...arguments),this.name="Safari",this.nameRegExp=[/^(?!.*\s(firefox|iceweasel|fxios)\/).*(safari|applewebkit)/i],this.versionRegExp=[/version\/(\d+(\.?_?\d+)+)/i]}}class E{detect(t){if(t)for(const e of this.predictors)if(e.isNameMatch(t))return e.predict(t);return{name:"Other",version:""}}}class x extends E{constructor(){super(...arguments),this.predictors=[new v,new y,new T,new w,new b]}}class S{constructor(){this.commonVersionRegExp=/version\/(\d+(\.?_?\d+)+)/i,this.versionDelimiterRegExp=/[\s_]/g}isNameMatch(t){return this.nameRegExp.some((e=>e.test(t)))}predict(t){const e=this.getName(t),s=this.getVersion(t);return new m(e,s)}getName(t){const e=t.match(/\((.*?)\)/);return e&&e[1]||"Other"}getVersion(t){return this.getCommonVersion(t)}getCommonVersion(t,e=!1){let s=this.getMainstreamOSMatch(this.versionRegExp[0]||this.commonVersionRegExp,t);return s&&e&&(s=s.replace(this.versionDelimiterRegExp,".")),s}getMainstreamOSMatch(t,e){const s=e.match(t);return s&&s.length>0&&s[1]||""}}class V extends S{constructor(){super(...arguments),this.nameRegExp=[/windows /i],this.versionRegExp=[/windows ((nt|xp)( \d\d?.\d)?)/i]}}class _ extends S{constructor(){super(...arguments),this.nameRegExp=[/macintosh/i],this.versionRegExp=[/mac os x (\d+(\.?_?\d+)+)/i]}getVersion(t){return this.getCommonVersion(t,!0)}}class M extends S{constructor(){super(...arguments),this.nameRegExp=[/(ipod|iphone|ipad)/i],this.versionRegExp=[/os (\d+([\s_]\d+)*) like mac os x/i]}getVersion(t){return this.getCommonVersion(t,!0)}}class L extends S{constructor(){super(...arguments),this.nameRegExp=[/android/i],this.versionRegExp=[/android[\s/-](\d+(\.\d+)*)/i]}}class A extends S{constructor(){super(...arguments),this.nameRegExp=[/linux/i],this.versionRegExp=[]}}class C extends E{constructor(){super(...arguments),this.predictors=[new _,new V,new M,new L,new A]}}function O(t){c.debug("Vega telemetry start clear runtime metrics in localStorage"),"requestIdleCallback"in globalThis?globalThis.requestIdleCallback((()=>{t()})):setTimeout((()=>{t()}),100)}function R(){return globalThis.navigator.userAgent}function I(){try{return globalThis&&!!globalThis.localStorage&&!!globalThis.navigator&&!!globalThis.location}catch(t){return c.debug("Failed to access browser localStorage, navigator or location:",t),!1}}var N,B,k,F,U=new class{constructor(){this.browserDetector=new x,this.osDetector=new C}generate(){return this.environment||(this.environment=new g(globalThis.VegaEnvInfo.version,globalThis.VegaEnvInfo.framework,this.browserDetector.detect(R()),this.osDetector.detect(R()),globalThis.location.origin)),this.environment}},D=new class{emit(t){const e=new a(U.generate(),t);c.debug("Vega telemetry start emit runtime metrics"),d.checkByStrategies(e)||(c.debug("The payload has not been collected by strategies check"),h.collect(e))}};class G{static post(t,e){const s=new globalThis.Blob([JSON.stringify(e)]);return globalThis.navigator.sendBeacon(G.getVegaTelemetryApimHost()+t+`?subscription-key=${G.getVegaTelemetryApimSubKey()}`,s)}static getVegaTelemetryApimHost(){return"https://vega-telemetry-apim-dev.azure-api.net"}static getVegaTelemetryApimSubKey(){return"8bc15c7c8b514d1bb92825b0b17a1731"}}class P{constructor(t,e,s){this.environment=t,this.payloads=e,this.triggerEvent=s}}(F=N||(N={})).ComponentUsagePayload="componentUsage",F.FeatureFlagOverriddenPayload="featureFlagOverridden",F.PublicAPIMetricsPayload="publicAPIMetrics",function(t){t.VisibilityChange="visibilitychange",t.PageHide="pagehide"}(B||(B={})),function(t){t.ENABLE_COLLECT_COMPONENTS_USAGE="VEGA_TELEMETRY.ENABLE_COLLECT_COMPONENTS_USAGE",t.ENABLE_COLLECT_PUBLIC_API="VEGA_TELEMETRY.ENABLE_COLLECT_PUBLIC_API",t.ENABLE_COLLECT_FEATURE_FLAG_OVERRIDDEN="VEGA_TELEMETRY.ENABLE_COLLECT_FEATURE_FLAG_OVERRIDDEN"}(k||(k={}));var $=new class{constructor(){this.dispatchedRuntimeMetrics=[]}dispatch(t){try{const e=this.generateRuntimeMetricsSubmitDto(t);e&&(c.debug("Vega telemetry start dispatch runtime metrics"),G.post("/runtime-metrics",e),d.updateDispatchedRuntimeMetrics(this.dispatchedRuntimeMetrics),h.deleteRuntimeMetrics(this.dispatchedRuntimeMetrics),c.debug("The runtime metrics have been dispatched successfully!"))}catch(t){c.error("Vega telemetry failed to dispatch:",t)}}generateRuntimeMetricsSubmitDto(t){const e=this.filterRuntimeMetrics();return e.length>0?(this.dispatchedRuntimeMetrics=e,new P(U.generate(),e.map((t=>t.payload)),t)):null}filterRuntimeMetrics(){return h.getRuntimeMetrics().filter((t=>this.canDispatch(t)&&!d.checkByStrategies(t)))}canDispatch(t){const e=J.getFeatureFlagController();if(!e)return!1;switch(t.payload.type){case N.ComponentUsagePayload:return e.isEnabled(k.ENABLE_COLLECT_COMPONENTS_USAGE);case N.FeatureFlagOverriddenPayload:return e.isEnabled(k.ENABLE_COLLECT_FEATURE_FLAG_OVERRIDDEN);case N.PublicAPIMetricsPayload:return e.isEnabled(k.ENABLE_COLLECT_PUBLIC_API)}}},J=new class{register(t){var e;c.debug("Vega telemetry start register 'pagehide' and 'visibilitychange' event"),e=()=>$.dispatch(B.VisibilityChange),"visibilityState"in document&&document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e()})),globalThis.addEventListener("pagehide",(()=>$.dispatch(B.PageHide))),O((()=>d.clearRuntimeMetrics())),this.featureFlagController=t}getFeatureFlagController(){return this.featureFlagController}};class Y{constructor(t,e,s){this.type=t,this.componentName=e,this.data=s}}class j{constructor(t,e,s){this.type=t,this.featureFlagName=e,this.featureFlagOverriddenValue=s}}class H{constructor(t,e,s){this.type=t,this.publicAPIName=e,this.data=s}}var K=new class{emit(t,e){O((()=>{try{if(I())switch(t){case N.ComponentUsagePayload:D.emit(new Y(t,e.componentName,e.data));break;case N.FeatureFlagOverriddenPayload:D.emit(new j(t,e.featureFlagName,e.featureFlagOverriddenValue));break;case N.PublicAPIMetricsPayload:D.emit(new H(t,e.publicAPIName,e.data));break;default:throw new Error(`Unknown runtime metrics payload type: ${t}`)}}catch(t){c.error("Vega telemetry failed to emit runtime metrics:",t)}}))}init(t){try{I()&&J.register(t)}catch(t){c.error("Vega telemetry failed to register event:",t)}}};export default K;
@@ -1 +1 @@
1
- import{W as s}from"./p-fa5eb496.js";import{O as a}from"./p-331a62d5.js";import{C as o}from"./p-2d0d575f.js";import{d as r}from"./p-6e01f0a2.js";import{V as m}from"./p-425ba7d6.js";const p=async()=>s.handle(),f=async s=>new Promise((p=>{const f=new a(n.bind(null),(()=>{o.unregister(r.getSubject(s,m),f),p(null)}));o.register(r.getSubject(s,m),f)})),n=()=>!0;export{f as a,p as w}
1
+ import{W as s}from"./p-5d676a94.js";import{O as a}from"./p-331a62d5.js";import{C as o}from"./p-2d0d575f.js";import{d as r}from"./p-6e01f0a2.js";import{V as m}from"./p-f5ac60f5.js";const p=async()=>s.handle(),f=async s=>new Promise((p=>{const f=new a(n.bind(null),(()=>{o.unregister(r.getSubject(s,m),f),p(null)}));o.register(r.getSubject(s,m),f)})),n=()=>!0;export{f as a,p as w}
@@ -1 +1 @@
1
- import{L as e}from"./p-6e1ab235.js";import t from"./p-7a40e033.js";const r=Object.freeze({"VEGA_DATE_PICKER.COMPONENT_LOAD_REQUIRED_DECORATOR":{description:"Feature flag to enable the required decorator for the date picker component. <br/> <b>Note: This feature flag is for demonstration purpose and will be persisted permanently.</b>",createdTimestamp:1660330561422,createdAtVersion:"1.2.0",removedAfterVersion:"1.11.1"},"VEGA_COMPONENT.SANITIZE_VEGA_COMPONENT":{description:"Feature flag to enable sanitize vega components.",createdTimestamp:1664262689486,createdAtVersion:"1.8.1",removedAfterVersion:"2.0.0"},"VEGA_TEXT.LABEL_OR_CONTENT_NESTED_VEGA_TEXT_COMPONENT":{description:"Feature flag to enable the label or content of other component nested vega-text component.",createdTimestamp:1665218525140,createdAtVersion:"1.8.1",removedAfterVersion:"1.9.1"},"VEGA_FLEX.ENABLE_DIRECTION_ONLY":{description:"Feature flag to make direction take effect only regardless of breakpoint for vega-flex component.",createdTimestamp:1665639912117,createdAtVersion:"1.9.0"},"VEGA_FIELD_LABEL.SHOW_LABEL":{description:"Feature flag to enable the vega-field-label component for vega-input, vega-input-select and vega-date-picker.",createdTimestamp:1666184962131,createdAtVersion:"1.9.0",removedAfterVersion:"2.0.0"},"VEGA_FLEX.USE_NATIVE_FLEX_BEHAVIOR":{description:"Feature flag to enable the **default** use of native flex behavior for vega-flex component.",createdTimestamp:1668059639449,createdAtVersion:"1.11.1",removedAfterVersion:"2.0.0"},"VEGA_TABLE.DEPRECATED_ROW_SELECTION_CHANGE_PROP":{description:"Feature flag to deprecate the rowSelection.onSelectChange and rowSelection.onSelectAllChange",createdTimestamp:1673321949321,createdAtVersion:"1.18.0",removedAfterVersion:"2.0.0"},"VEGA_ICON.USE_SIZE_PROP_FOR_THIRD_PARTY_ICONS":{description:"Feature flag to make size prop of vega-icon to take effect for third party icons.",createdTimestamp:1675752744795,createdAtVersion:"1.20.0",removedAfterVersion:"2.0.0"},"VEGA_INJECT_FORM_FIELD_CONTROLLER.ADD_DATA_VEGA_FORM_FILTER":{description:"Feature flag to deprecate the form field should validate only have data-vega-from attribute",createdTimestamp:1676017004107,createdAtVersion:"1.19.0",removedAfterVersion:"2.0.0"},"VEGA_FORM_FIELD.CHANGE_BLOCK_TO_INLINE_BLOCK":{description:"Feature flag to deprecate the form fields like input/datePicker/timePicker should use inline block",createdTimestamp:1676512727310,createdAtVersion:"1.20.0",removedAfterVersion:"2.0.0"},"VEGA_CHECKBOX_RADIO_GROUP.FLEX_DIRECTION_COL_DEFAULT":{description:"Feature flag to make the checkbox group and radio group prop vegaFlexProp default direction to col",createdTimestamp:16811712e5,createdAtVersion:"1.27.3",removedAfterVersion:"2.0.0"},"VEGA_REACT.PREVENT_SSR":{description:"Feature flag to prevent the SSR in vega-react",createdTimestamp:1679450185124,createdAtVersion:"1.25.0",disabledByDefault:!0},"VEGA_STEPPER.INPUT_DISABLED":{description:"Feature flag to rename the prop input-editable to input-disabled ",createdTimestamp:1683252081350,createdAtVersion:"1.30.0",removedAfterVersion:"2.0.0"},"VEGA_FLEX.ALIGNITEM_JUSTIFYCONTENT_USE_PREFIX_V_INSTEAD_OF_VEGA":{description:"Feature flag to render vega-flex prop alignItems and justifyContent classes by using v- instead of vega-",createdTimestamp:1684128467390,createdAtVersion:"1.32.0",removedAfterVersion:"1.48.3"},"VEGA_ANGULAR.USE_JUGGLE_RESIZE_OBSERVER":{description:"Feature flag to enable the @juggle/resizeObserver to instead window resizeObserver",createdTimestamp:1684203399089,createdAtVersion:"1.31.0"},"VEGA_INPUT.FOCUS_ON_INPUT_BY_CLICK_CLEAR_BUTTON":{description:"Feature flag to keep the input focused whenever click the clear button",createdTimestamp:1685513925082,createdAtVersion:"1.34.0",removedAfterVersion:"1.38.2"},"VEGA_VUE.EMIT_CAMEL_CASE_EVENT_NAME":{description:"Feature flag to emit camel case event name for Vue framework",createdTimestamp:1688971026741,createdAtVersion:"1.37.0"},VEGA_ITEM_TOGGLE_ISERROR_DEPRECATED:{description:"Feature flag to deprecated the component vega-item-toggle property isError",createdTimestamp:1687934508330,createdAtVersion:"1.36.0",removedAfterVersion:"2.0.0"},"VEGA_BUTTON_LINK.DEPRECATED_EVENTFUL":{description:"Feature flag to deprecated eventful property",createdTimestamp:1689313658898,createdAtVersion:"1.36.1",removedAfterVersion:"2.0.0"},"VEGA_DROPDOWN.RENAME_PREFIX_TO_PREFIX_ICON":{description:"Feature flag to rename prefix to prefixIcon",createdTimestamp:1689576347049,createdAtVersion:"1.37.0",removedAfterVersion:"2.0.0"},"VEGA_REACT.PREVENT_CALL_WATCH_METHOD_BEFORE_COMPONENT_LOAD":{description:"Feature flag to prevent call watch method before componnentDidLoad",createdTimestamp:1706598728908,createdAtVersion:"2.0.0"},"VEGA_FRAMEWORK.PREVENT_CALL_WATCH_METHOD_BEFORE_COMPONENT_LOAD":{description:"Feature flag to prevent call watch method before componnentDidLoad in all framework",createdTimestamp:1708495728180,createdAtVersion:"2.0.0"},"VEGA_REACT.ENABLE_ON_CHANGE_HANDLE_UNDER_LOW_VERSION":{description:"Feature flag to enable the onChange event handle under react version 19 or below",createdTimestamp:1709603823660,createdAtVersion:"2.0.0"},"VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD":{description:"Feature flag to enable the hide card number mask upon initial loading of the credit card.",createdTimestamp:1715932781059,createdAtVersion:"2.9.0"},"VEGA_TABLE.ENABLE_NEW_CELL_BREAK_WORDS_STYLE":{description:"Feature flag to enable the new cell words break style",createdTimestamp:1719282763075,createdAtVersion:"2.11.2"},"VEGA_TELEMETRY.ENABLE_COLLECT_COMPONENTS_USAGE":{description:"Feature flag to enable the collection of component usage.",createdTimestamp:1717468723384,createdAtVersion:"2.11.3"},"VEGA_TELEMETRY.ENABLE_COLLECT_FEATURE_FLAG_OVERRIDDEN":{description:"Feature flag to enable the feature flag overridden.",createdTimestamp:1717468723384,createdAtVersion:"2.11.3"},"VEGA_REACT.ENABLE_ON_CLOSE_HANDLE_UNDER_LOW_VERSION":{description:"Feature flag to enable the onClose event handle under react version 19 or below",createdTimestamp:1719910557333,createdAtVersion:"2.12.0"},VEGA_BANNER_DEPRECATED_ACTION_BUTTON_PROP_VEGA_CLICK:{description:"Feature flag to deprecated the vega-banner component property actionButtons property vegaClick",createdTimestamp:1723449433833,createdAtVersion:"2.18.0"},"VEGA_REACT.SKIP_NATIVE_EVENT_PREVENT_BY_DEFAULT":{description:"Feature flag to skip the native event prevent logic in default",createdTimestamp:17239968e5,createdAtVersion:"2.18.1",disabledByDefault:!0},"VEGA_TELEMETRY.ENABLE_COLLECT_PUBLIC_API":{description:"Feature flag to enable the collection of public api.",createdTimestamp:1727232497961,createdAtVersion:"2.21.0"},"VEGA_LEFT_NAV.DISABLE_ANIMATION_ON_LOAD":{description:"Feature flag that disables the transition animation of the left nav.",createdTimestamp:1730361348399,createdAtVersion:"2.26.0"},"VEGA_DATE_PICKER.ENABLE_CALCULATION_POSITION_BY_SCREEN":{description:"Feature flag that enable use screen to calculation position.",createdTimestamp:1733293586535,createdAtVersion:"2.29.0"},"VEGA_TABLE.REVERSE_SORT_ORDER":{description:"Feature flag that reverses table column sorting order from default>asc>desc to default>desc>asc",createdTimestamp:1737521148363,createdAtVersion:"2.32.0",disabledByDefault:!1},"VEGA_PAGINATION.ENABLE_EXTENSIONS_RESPONSIVE_DEFAULT_VALUE":{description:"Feature flag to enable responsive default values for the extensions property in vega-pagination.",createdTimestamp:1744876233415,createdAtVersion:"2.42.0",disabledByDefault:!0},"VEGA_COMPONENT.CORNERS_USE_OLD_BEHAVIOR":{description:"Feature flag that the component corners style weights are sorted according to the [0, 9999, 2, 4, 8, ..., 48]",createdTimestamp:1744772429681,createdAtVersion:"2.41.0",disabledByDefault:!0},"VEGA_INPUT_PHONE_NUMBER.ENABLE_CALCULATION_POSITION_BY_SCREEN":{description:"Feature flag that enable use screen to calculation position.",createdTimestamp:1750317683577,createdAtVersion:"2.48.1",disabledByDefault:!0}}),a=new class{constructor(){this.enabledFeatureFlagKeySet=new Set,this.init()}enable(...e){e.forEach((e=>{this.versionGuard(e)&&(this.enabledFeatureFlagKeySet.add(e),this.sendFeatureFlagKeyToTelemetry(e,!0))}))}disable(...e){e.forEach((e=>{this.versionGuard(e)&&(this.enabledFeatureFlagKeySet.delete(e),this.sendFeatureFlagKeyToTelemetry(e,!1))}))}isEnabled(e){return this.enabledFeatureFlagKeySet.has(e)}init(){Object.keys(r).map((e=>{r[e].disabledByDefault||this.isRemoved(e)||this.enabledFeatureFlagKeySet.add(e)}))}versionGuard(t){return!this.isRemoved(t)||(e.error(`The feature flag key '${t}' has been removed after v${r[t].removedAfterVersion}`),!1)}isRemoved(e){return!!r[e].removedAfterVersion}sendFeatureFlagKeyToTelemetry(e,r){this.canSendFeatureFlagsToTelemetry(e,r)&&t.emit("featureFlagOverridden",{featureFlagName:e,featureFlagOverriddenValue:r})}canSendFeatureFlagsToTelemetry(e,t){return!!r[e].disabledByDefault===t}};export{a as F}
1
+ import{L as e}from"./p-6e1ab235.js";import t from"./p-db8cdba6.js";const r=Object.freeze({"VEGA_DATE_PICKER.COMPONENT_LOAD_REQUIRED_DECORATOR":{description:"Feature flag to enable the required decorator for the date picker component. <br/> <b>Note: This feature flag is for demonstration purpose and will be persisted permanently.</b>",createdTimestamp:1660330561422,createdAtVersion:"1.2.0",removedAfterVersion:"1.11.1"},"VEGA_COMPONENT.SANITIZE_VEGA_COMPONENT":{description:"Feature flag to enable sanitize vega components.",createdTimestamp:1664262689486,createdAtVersion:"1.8.1",removedAfterVersion:"2.0.0"},"VEGA_TEXT.LABEL_OR_CONTENT_NESTED_VEGA_TEXT_COMPONENT":{description:"Feature flag to enable the label or content of other component nested vega-text component.",createdTimestamp:1665218525140,createdAtVersion:"1.8.1",removedAfterVersion:"1.9.1"},"VEGA_FLEX.ENABLE_DIRECTION_ONLY":{description:"Feature flag to make direction take effect only regardless of breakpoint for vega-flex component.",createdTimestamp:1665639912117,createdAtVersion:"1.9.0"},"VEGA_FIELD_LABEL.SHOW_LABEL":{description:"Feature flag to enable the vega-field-label component for vega-input, vega-input-select and vega-date-picker.",createdTimestamp:1666184962131,createdAtVersion:"1.9.0",removedAfterVersion:"2.0.0"},"VEGA_FLEX.USE_NATIVE_FLEX_BEHAVIOR":{description:"Feature flag to enable the **default** use of native flex behavior for vega-flex component.",createdTimestamp:1668059639449,createdAtVersion:"1.11.1",removedAfterVersion:"2.0.0"},"VEGA_TABLE.DEPRECATED_ROW_SELECTION_CHANGE_PROP":{description:"Feature flag to deprecate the rowSelection.onSelectChange and rowSelection.onSelectAllChange",createdTimestamp:1673321949321,createdAtVersion:"1.18.0",removedAfterVersion:"2.0.0"},"VEGA_ICON.USE_SIZE_PROP_FOR_THIRD_PARTY_ICONS":{description:"Feature flag to make size prop of vega-icon to take effect for third party icons.",createdTimestamp:1675752744795,createdAtVersion:"1.20.0",removedAfterVersion:"2.0.0"},"VEGA_INJECT_FORM_FIELD_CONTROLLER.ADD_DATA_VEGA_FORM_FILTER":{description:"Feature flag to deprecate the form field should validate only have data-vega-from attribute",createdTimestamp:1676017004107,createdAtVersion:"1.19.0",removedAfterVersion:"2.0.0"},"VEGA_FORM_FIELD.CHANGE_BLOCK_TO_INLINE_BLOCK":{description:"Feature flag to deprecate the form fields like input/datePicker/timePicker should use inline block",createdTimestamp:1676512727310,createdAtVersion:"1.20.0",removedAfterVersion:"2.0.0"},"VEGA_CHECKBOX_RADIO_GROUP.FLEX_DIRECTION_COL_DEFAULT":{description:"Feature flag to make the checkbox group and radio group prop vegaFlexProp default direction to col",createdTimestamp:16811712e5,createdAtVersion:"1.27.3",removedAfterVersion:"2.0.0"},"VEGA_REACT.PREVENT_SSR":{description:"Feature flag to prevent the SSR in vega-react",createdTimestamp:1679450185124,createdAtVersion:"1.25.0",disabledByDefault:!0},"VEGA_STEPPER.INPUT_DISABLED":{description:"Feature flag to rename the prop input-editable to input-disabled ",createdTimestamp:1683252081350,createdAtVersion:"1.30.0",removedAfterVersion:"2.0.0"},"VEGA_FLEX.ALIGNITEM_JUSTIFYCONTENT_USE_PREFIX_V_INSTEAD_OF_VEGA":{description:"Feature flag to render vega-flex prop alignItems and justifyContent classes by using v- instead of vega-",createdTimestamp:1684128467390,createdAtVersion:"1.32.0",removedAfterVersion:"1.48.3"},"VEGA_ANGULAR.USE_JUGGLE_RESIZE_OBSERVER":{description:"Feature flag to enable the @juggle/resizeObserver to instead window resizeObserver",createdTimestamp:1684203399089,createdAtVersion:"1.31.0"},"VEGA_INPUT.FOCUS_ON_INPUT_BY_CLICK_CLEAR_BUTTON":{description:"Feature flag to keep the input focused whenever click the clear button",createdTimestamp:1685513925082,createdAtVersion:"1.34.0",removedAfterVersion:"1.38.2"},"VEGA_VUE.EMIT_CAMEL_CASE_EVENT_NAME":{description:"Feature flag to emit camel case event name for Vue framework",createdTimestamp:1688971026741,createdAtVersion:"1.37.0"},VEGA_ITEM_TOGGLE_ISERROR_DEPRECATED:{description:"Feature flag to deprecated the component vega-item-toggle property isError",createdTimestamp:1687934508330,createdAtVersion:"1.36.0",removedAfterVersion:"2.0.0"},"VEGA_BUTTON_LINK.DEPRECATED_EVENTFUL":{description:"Feature flag to deprecated eventful property",createdTimestamp:1689313658898,createdAtVersion:"1.36.1",removedAfterVersion:"2.0.0"},"VEGA_DROPDOWN.RENAME_PREFIX_TO_PREFIX_ICON":{description:"Feature flag to rename prefix to prefixIcon",createdTimestamp:1689576347049,createdAtVersion:"1.37.0",removedAfterVersion:"2.0.0"},"VEGA_REACT.PREVENT_CALL_WATCH_METHOD_BEFORE_COMPONENT_LOAD":{description:"Feature flag to prevent call watch method before componnentDidLoad",createdTimestamp:1706598728908,createdAtVersion:"2.0.0"},"VEGA_FRAMEWORK.PREVENT_CALL_WATCH_METHOD_BEFORE_COMPONENT_LOAD":{description:"Feature flag to prevent call watch method before componnentDidLoad in all framework",createdTimestamp:1708495728180,createdAtVersion:"2.0.0"},"VEGA_REACT.ENABLE_ON_CHANGE_HANDLE_UNDER_LOW_VERSION":{description:"Feature flag to enable the onChange event handle under react version 19 or below",createdTimestamp:1709603823660,createdAtVersion:"2.0.0"},"VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD":{description:"Feature flag to enable the hide card number mask upon initial loading of the credit card.",createdTimestamp:1715932781059,createdAtVersion:"2.9.0"},"VEGA_TABLE.ENABLE_NEW_CELL_BREAK_WORDS_STYLE":{description:"Feature flag to enable the new cell words break style",createdTimestamp:1719282763075,createdAtVersion:"2.11.2"},"VEGA_TELEMETRY.ENABLE_COLLECT_COMPONENTS_USAGE":{description:"Feature flag to enable the collection of component usage.",createdTimestamp:1717468723384,createdAtVersion:"2.11.3"},"VEGA_TELEMETRY.ENABLE_COLLECT_FEATURE_FLAG_OVERRIDDEN":{description:"Feature flag to enable the feature flag overridden.",createdTimestamp:1717468723384,createdAtVersion:"2.11.3"},"VEGA_REACT.ENABLE_ON_CLOSE_HANDLE_UNDER_LOW_VERSION":{description:"Feature flag to enable the onClose event handle under react version 19 or below",createdTimestamp:1719910557333,createdAtVersion:"2.12.0"},VEGA_BANNER_DEPRECATED_ACTION_BUTTON_PROP_VEGA_CLICK:{description:"Feature flag to deprecated the vega-banner component property actionButtons property vegaClick",createdTimestamp:1723449433833,createdAtVersion:"2.18.0"},"VEGA_REACT.SKIP_NATIVE_EVENT_PREVENT_BY_DEFAULT":{description:"Feature flag to skip the native event prevent logic in default",createdTimestamp:17239968e5,createdAtVersion:"2.18.1",disabledByDefault:!0},"VEGA_TELEMETRY.ENABLE_COLLECT_PUBLIC_API":{description:"Feature flag to enable the collection of public api.",createdTimestamp:1727232497961,createdAtVersion:"2.21.0"},"VEGA_LEFT_NAV.DISABLE_ANIMATION_ON_LOAD":{description:"Feature flag that disables the transition animation of the left nav.",createdTimestamp:1730361348399,createdAtVersion:"2.26.0"},"VEGA_DATE_PICKER.ENABLE_CALCULATION_POSITION_BY_SCREEN":{description:"Feature flag that enable use screen to calculation position.",createdTimestamp:1733293586535,createdAtVersion:"2.29.0"},"VEGA_TABLE.REVERSE_SORT_ORDER":{description:"Feature flag that reverses table column sorting order from default>asc>desc to default>desc>asc",createdTimestamp:1737521148363,createdAtVersion:"2.32.0",disabledByDefault:!1},"VEGA_PAGINATION.ENABLE_EXTENSIONS_RESPONSIVE_DEFAULT_VALUE":{description:"Feature flag to enable responsive default values for the extensions property in vega-pagination.",createdTimestamp:1744876233415,createdAtVersion:"2.42.0",disabledByDefault:!0},"VEGA_COMPONENT.CORNERS_USE_OLD_BEHAVIOR":{description:"Feature flag that the component corners style weights are sorted according to the [0, 9999, 2, 4, 8, ..., 48]",createdTimestamp:1744772429681,createdAtVersion:"2.41.0",disabledByDefault:!0},"VEGA_INPUT_PHONE_NUMBER.ENABLE_CALCULATION_POSITION_BY_SCREEN":{description:"Feature flag that enable use screen to calculation position.",createdTimestamp:1750317683577,createdAtVersion:"2.48.1",disabledByDefault:!0}}),a=new class{constructor(){this.enabledFeatureFlagKeySet=new Set,this.init()}enable(...e){e.forEach((e=>{this.versionGuard(e)&&(this.enabledFeatureFlagKeySet.add(e),this.sendFeatureFlagKeyToTelemetry(e,!0))}))}disable(...e){e.forEach((e=>{this.versionGuard(e)&&(this.enabledFeatureFlagKeySet.delete(e),this.sendFeatureFlagKeyToTelemetry(e,!1))}))}isEnabled(e){return this.enabledFeatureFlagKeySet.has(e)}init(){Object.keys(r).map((e=>{r[e].disabledByDefault||this.isRemoved(e)||this.enabledFeatureFlagKeySet.add(e)}))}versionGuard(t){return!this.isRemoved(t)||(e.error(`The feature flag key '${t}' has been removed after v${r[t].removedAfterVersion}`),!1)}isRemoved(e){return!!r[e].removedAfterVersion}sendFeatureFlagKeyToTelemetry(e,r){this.canSendFeatureFlagsToTelemetry(e,r)&&t.emit("featureFlagOverridden",{featureFlagName:e,featureFlagOverriddenValue:r})}canSendFeatureFlagsToTelemetry(e,t){return!!r[e].disabledByDefault===t}};export{a as F}
@@ -1 +1 @@
1
- import{K as n}from"./p-a46ac2eb.js";function t(t){return i=>{const{connectedCallback:o,componentDidLoad:e,disconnectedCallback:s}=i;i.connectedCallback=function(){const{keyboardEventListeners:t=[]}=this;return n.register(t),null==o?void 0:o.call(this)},i.componentDidLoad=function(){return this.keyboardEventListeners=t(this),n.register(this.keyboardEventListeners),null==e?void 0:e.call(this)},i.disconnectedCallback=function(){const{keyboardEventListeners:t=[]}=this;return n.deregister(t),null==s?void 0:s.call(this)}}}export{t as I}
1
+ import{K as n}from"./p-8e662f26.js";function t(t){return i=>{const{connectedCallback:o,componentDidLoad:e,disconnectedCallback:s}=i;i.connectedCallback=function(){const{keyboardEventListeners:t=[]}=this;return n.register(t),null==o?void 0:o.call(this)},i.componentDidLoad=function(){return this.keyboardEventListeners=t(this),n.register(this.keyboardEventListeners),null==e?void 0:e.call(this)},i.disconnectedCallback=function(){const{keyboardEventListeners:t=[]}=this;return n.deregister(t),null==s?void 0:s.call(this)}}}export{t as I}
@@ -0,0 +1 @@
1
+ import{h as t,f as e,r as s,H as o,g as i}from"./p-21d26bb4.js";import{s as r}from"./p-519a7d55.js";import{c as p,V as a,M as n,L as c,I as m}from"./p-6e1ab235.js";import{V as l,I as d}from"./p-d849e0f5.js";import{V as f}from"./p-f08a4adf.js";import{V as j}from"./p-8c46e116.js";import{f as h}from"./p-fda6f8bc.js";import{h as u}from"./p-5773a9a3.js";import{O as b}from"./p-331a62d5.js";import{C as v}from"./p-2d0d575f.js";import"./p-a4670e23.js";import"./p-6a334573.js";import"./p-5e2c9e69.js";import"./p-ed45b3b6.js";import"./p-74168615.js";import"./p-3a0a4d15.js";import"./p-d884c644.js";import"./p-4a237308.js";import"./p-7d9cd9c8.js";import"./p-b75ee3ba.js";import"./p-262ec334.js";import"./p-0c667d6a.js";import"./p-d27ae9ff.js";import"./p-5f377954.js";import"./p-bcdb235d.js";import"./p-d5776087.js";import"./p-0c8bd757.js";import"./p-112455b1.js";import"./p-613ee009.js";import"./p-6e01f0a2.js";import"./p-e77a83e4.js";import"./p-db8cdba6.js";import"./p-5d676a94.js";import"./p-9d6003ef.js";import"./p-88e08a33.js";import"./p-d7e0c57a.js";import"./p-f5ac60f5.js";import"./p-49fd1009.js";var g=function(t,e,s,o){var i,r=arguments.length,p=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,s):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)p=Reflect.decorate(t,e,s,o);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(p=(r<3?i(p):r>3?i(e,s,p):i(e,s))||p);return r>3&&p&&Object.defineProperty(e,s,p),p};class y extends a{render(){const e=f.getIconKey(this.country),s=j.hasIcon(e),o=h(this.size,"widthAndHeight"),i=`calc(${o} * 4 / 3)`;return s?t("vega-icon",{icon:e,size:this.size,style:{width:i}}):t("vega-skeleton",{type:"image",corners:"rounded-2",height:o,width:i})}}g([p()],y.prototype,"size",void 0),g([p()],y.prototype,"country",void 0);var R=function(t,e,s,o){var i,r=arguments.length,p=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,s):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)p=Reflect.decorate(t,e,s,o);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(p=(r<3?i(p):r>3?i(e,s,p):i(e,s))||p);return r>3&&p&&Object.defineProperty(e,s,p),p};class O extends a{constructor(){super(...arguments),this.isAcceptObserver=()=>!0,this.listenerCallback=()=>{e(this.host)}}componentWillLoad(){this.country&&(this.isFlagForCountryCodeLoaded(this.country)||this.registerObserver())}unRegisterObserver(){this.observer&&(v.unregister(u,this.observer),this.observer=null)}registerObserver(){this.observer=new b(this.isAcceptObserver.bind(this),this.listenerCallback.bind(this)),v.register(u,this.observer)}isFlagForCountryCodeLoaded(t){const e=f.getIconKey(t);return f.hasIcon(e)}}!async function(){try{const t=(await import("./p-1e926324.js")).CountryFlags;f.register(t),v.notify(u,{})}catch(t){c.error("Error loading flag module:",t)}}(),R([p()],O.prototype,"host",void 0),R([p()],O.prototype,"country",void 0),R([n("componentWillLoad")],O.prototype,"componentWillLoad",null),R([n("disconnectedCallback")],O.prototype,"unRegisterObserver",null);var w=function(t,e,s,o){var i,r=arguments.length,p=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,s):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)p=Reflect.decorate(t,e,s,o);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(p=(r<3?i(p):r>3?i(e,s,p):i(e,s))||p);return r>3&&p&&Object.defineProperty(e,s,p),p};const C=class{constructor(t){s(this,t),this.globalSlimmers={},this.renderer=new y,this.vegaFlagIconController=new O,this.vegaComponentUsageRuntimeMetricsSlimmer=new l,this.size="size-16"}render(){return r(t(o,null,this.renderer.render()),this.host)}get host(){return i(this)}};w([d()],C.prototype,"globalSlimmers",void 0),w([m()],C.prototype,"renderer",void 0),w([m()],C.prototype,"vegaFlagIconController",void 0),w([m()],C.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),C.style=":host{display:inline-block}:host vega-icon,:host vega-skeleton,:host svg{display:block}";export{C as vega_flag_icon}
@@ -1 +1 @@
1
- import{V as e}from"./p-cc63e827.js";class t{getIconKey(e){return this.generateIconKeyWithNamespace(e,t.INTERNAL_ICON_NAMESPACE)}hasIcon(t){return e.hasIcon(this.getIconKey(t))}register(n){const r=Object.entries(n).reduce(((e,[n,r])=>(e[this.generateIconKeyWithNamespace(n,t.INTERNAL_ICON_NAMESPACE)]=r,e)),{});e.register(r)}generateIconKeyWithNamespace(e,t){return[t,e].join(" ")}}t.INTERNAL_ICON_NAMESPACE="v-internal-icon";const n=new t;export{n as V}
1
+ import{V as e}from"./p-8c46e116.js";class t{getIconKey(e){return this.generateIconKeyWithNamespace(e,t.INTERNAL_ICON_NAMESPACE)}hasIcon(t){return e.hasIcon(this.getIconKey(t))}register(n){const r=Object.entries(n).reduce(((e,[n,r])=>(e[this.generateIconKeyWithNamespace(n,t.INTERNAL_ICON_NAMESPACE)]=r,e)),{});e.register(r)}generateIconKeyWithNamespace(e,t){return[t,e].join(" ")}}t.INTERNAL_ICON_NAMESPACE="v-internal-icon";const n=new t;export{n as V}
@@ -1 +1 @@
1
- import{F as s}from"./p-4d793cb0.js";import{V as o,a as t,b as a,c as l,d as i,e,f as c}from"./p-d5f1794e.js";import{M as n,V as r,s as f,G as p}from"./p-6e1ab235.js";import{v as b}from"./p-5f377954.js";import{V as h}from"./p-cc63e827.js";import"./p-fa5eb496.js";import"./p-d5776087.js";import{V as d,a as m,s as T}from"./p-4ab3df00.js";import{V as u}from"./p-68864531.js";import{T as j}from"./p-d884c644.js";import{V as g}from"./p-6f90d444.js";import{w as O}from"./p-f4a13f3f.js";import{U as C}from"./p-5773a9a3.js";import{C as E}from"./p-2d0d575f.js";import{O as _}from"./p-331a62d5.js";import{f as R}from"./p-21d26bb4.js";var A=function(s,o,t,a){var l,i=arguments.length,e=i<3?o:null===a?a=Object.getOwnPropertyDescriptor(o,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)e=Reflect.decorate(s,o,t,a);else for(var c=s.length-1;c>=0;c--)(l=s[c])&&(e=(i<3?l(e):i>3?l(o,t,e):l(o,t))||e);return i>3&&e&&Object.defineProperty(o,t,e),e};class k extends r{constructor(o){super(),this.originalWatchers=new Map,this.hasDisconnected=!1,this.isEnabled=s.isEnabled("VEGA_REACT.PREVENT_CALL_WATCH_METHOD_BEFORE_COMPONENT_LOAD")&&s.isEnabled("VEGA_FRAMEWORK.PREVENT_CALL_WATCH_METHOD_BEFORE_COMPONENT_LOAD"),this.component=o.component}connectedCallback(){if(!this.isEnabled)return;if(this.hasDisconnected)return;const s=this.component.constructor.watchers;for(const o in s)s[o].forEach((s=>{this.originalWatchers.has(s)||(this.originalWatchers.set(s,this.component[s]),this.component[s]=function(){})}))}disconnectedCallback(){this.isEnabled&&(this.hasDisconnected=!0)}componentDidLoad(){this.isEnabled&&this.originalWatchers.forEach(((s,o)=>{const t=s;this.component[o]=function(...s){return t.apply(this,s)}}))}}A([n("connectedCallback")],k.prototype,"connectedCallback",null),A([n("disconnectedCallback")],k.prototype,"disconnectedCallback",null),A([n("componentDidLoad")],k.prototype,"componentDidLoad",null);class v extends r{constructor(s){super(),this.component=s.component}connectedCallback(){const s=new _(this.isAcceptable.bind(this),(()=>{R(this.component)}));E.register(C,s)}isAcceptable(){var s;const o=this.component.host;return null===(s=d.getConnectedComponents().get(o.tagName))||void 0===s?void 0:s.has(o)}}!function(s,o,t,a){var l,i=arguments.length,e=i<3?o:null===a?a=Object.getOwnPropertyDescriptor(o,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)e=Reflect.decorate(s,o,t,a);else for(var c=s.length-1;c>=0;c--)(l=s[c])&&(e=(i<3?l(e):i>3?l(o,t,e):l(o,t))||e);i>3&&e&&Object.defineProperty(o,t,e)}([n("connectedCallback")],v.prototype,"connectedCallback",null);const V=function(){globalThis.VegaDisabledFeatureKeys&&s.disable(...globalThis.VegaDisabledFeatureKeys),globalThis.VegaEnabledFeatureKeys&&s.enable(...globalThis.VegaEnabledFeatureKeys),globalThis.VegaLoader=o,globalThis.VegaNotify=t,globalThis.VegaThemeManager=a,globalThis.setVegaLogLevel=f,globalThis.VegaDialog=l,p.register([k,v]),globalThis.VegaEventManager=i,Object.keys(j).forEach((s=>{const{url:o}=j[s],t="vega-typography-"+s;if(!document.querySelector("#"+t)){const s=document.createElement("link");s.id=t,s.href=o,s.rel="stylesheet",document.head.append(s)}})),globalThis.VegaIconManager=h,globalThis.VegaZIndexManager=e,globalThis.ValidCreditCardNumberRule=g,globalThis.VegaEnvInfo=b.getVegaEnv(),import("./p-7a40e033.js").then((o=>{o.default.init(s)})),globalThis.waitForVega=O,globalThis.VegaSkeletonLoader=c,globalThis.VegaTranslation=m,globalThis.VegaTranslationResourceEN=T,globalThis.VegaRTEContent=u,import("./p-d8e1ed2d.js").then((s=>{Object.entries(s).forEach((([s,o])=>{globalThis[s]=o}))})),globalThis.VegaThemeManagerApplyBranding&&a.applyBranding(globalThis.VegaThemeManagerApplyBranding)};export{V as g}
1
+ import{F as s}from"./p-e77a83e4.js";import{V as o,a as t,b as a,c as l,d as i,e,f as c}from"./p-bcdb235d.js";import{M as n,V as r,s as p,G as b}from"./p-6e1ab235.js";import{v as h}from"./p-5f377954.js";import{V as f}from"./p-8c46e116.js";import"./p-5d676a94.js";import"./p-d5776087.js";import{V as d,a as m,s as T}from"./p-9d6003ef.js";import{V as u}from"./p-88e08a33.js";import{T as j}from"./p-d884c644.js";import{V as g}from"./p-6f90d444.js";import{w as O}from"./p-e1ed78db.js";import{U as C}from"./p-5773a9a3.js";import{C as E}from"./p-2d0d575f.js";import{O as _}from"./p-331a62d5.js";import{f as R}from"./p-21d26bb4.js";var A=function(s,o,t,a){var l,i=arguments.length,e=i<3?o:null===a?a=Object.getOwnPropertyDescriptor(o,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)e=Reflect.decorate(s,o,t,a);else for(var c=s.length-1;c>=0;c--)(l=s[c])&&(e=(i<3?l(e):i>3?l(o,t,e):l(o,t))||e);return i>3&&e&&Object.defineProperty(o,t,e),e};class k extends r{constructor(o){super(),this.originalWatchers=new Map,this.hasDisconnected=!1,this.isEnabled=s.isEnabled("VEGA_REACT.PREVENT_CALL_WATCH_METHOD_BEFORE_COMPONENT_LOAD")&&s.isEnabled("VEGA_FRAMEWORK.PREVENT_CALL_WATCH_METHOD_BEFORE_COMPONENT_LOAD"),this.component=o.component}connectedCallback(){if(!this.isEnabled)return;if(this.hasDisconnected)return;const s=this.component.constructor.watchers;for(const o in s)s[o].forEach((s=>{this.originalWatchers.has(s)||(this.originalWatchers.set(s,this.component[s]),this.component[s]=function(){})}))}disconnectedCallback(){this.isEnabled&&(this.hasDisconnected=!0)}componentDidLoad(){this.isEnabled&&this.originalWatchers.forEach(((s,o)=>{const t=s;this.component[o]=function(...s){return t.apply(this,s)}}))}}A([n("connectedCallback")],k.prototype,"connectedCallback",null),A([n("disconnectedCallback")],k.prototype,"disconnectedCallback",null),A([n("componentDidLoad")],k.prototype,"componentDidLoad",null);class v extends r{constructor(s){super(),this.component=s.component}connectedCallback(){const s=new _(this.isAcceptable.bind(this),(()=>{R(this.component)}));E.register(C,s)}isAcceptable(){var s;const o=this.component.host;return null===(s=d.getConnectedComponents().get(o.tagName))||void 0===s?void 0:s.has(o)}}!function(s,o,t,a){var l,i=arguments.length,e=i<3?o:null===a?a=Object.getOwnPropertyDescriptor(o,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)e=Reflect.decorate(s,o,t,a);else for(var c=s.length-1;c>=0;c--)(l=s[c])&&(e=(i<3?l(e):i>3?l(o,t,e):l(o,t))||e);i>3&&e&&Object.defineProperty(o,t,e)}([n("connectedCallback")],v.prototype,"connectedCallback",null);const V=function(){globalThis.VegaDisabledFeatureKeys&&s.disable(...globalThis.VegaDisabledFeatureKeys),globalThis.VegaEnabledFeatureKeys&&s.enable(...globalThis.VegaEnabledFeatureKeys),globalThis.VegaLoader=o,globalThis.VegaNotify=t,globalThis.VegaThemeManager=a,globalThis.setVegaLogLevel=p,globalThis.VegaDialog=l,b.register([k,v]),globalThis.VegaEventManager=i,Object.keys(j).forEach((s=>{const{url:o}=j[s],t="vega-typography-"+s;if(!document.querySelector("#"+t)){const s=document.createElement("link");s.id=t,s.href=o,s.rel="stylesheet",document.head.append(s)}})),globalThis.VegaIconManager=f,globalThis.VegaZIndexManager=e,globalThis.ValidCreditCardNumberRule=g,globalThis.VegaEnvInfo=h.getVegaEnv(),import("./p-db8cdba6.js").then((o=>{o.default.init(s)})),globalThis.waitForVega=O,globalThis.VegaSkeletonLoader=c,globalThis.VegaTranslation=m,globalThis.VegaTranslationResourceEN=T,globalThis.VegaRTEContent=u,import("./p-9a956a00.js").then((s=>{Object.entries(s).forEach((([s,o])=>{globalThis[s]=o}))})),globalThis.VegaThemeManagerApplyBranding&&a.applyBranding(globalThis.VegaThemeManagerApplyBranding)};export{V as g}
@@ -1 +1 @@
1
- import{c as t,I as e,V as i,L as s,M as o}from"./p-6e1ab235.js";import{f as n,c as h,i as r}from"./p-d5776087.js";import{I as c}from"./p-d5f1794e.js";import{c as l}from"./p-6a334573.js";import{P as a}from"./p-7d9cd9c8.js";import{P as d,A as u}from"./p-74168615.js";import{A as f}from"./p-b1f65b13.js";import{R as p}from"./p-66516ee9.js";import{C as v}from"./p-2d0d575f.js";import{S as m}from"./p-5773a9a3.js";import{O as g}from"./p-331a62d5.js";import{d as b}from"./p-6e01f0a2.js";import{q as w}from"./p-425ba7d6.js";import{D as j}from"./p-e7b00bf0.js";class R{canRetrieve(){return!0}retrieve(){const t=document.body;return this.showConfig.appendableElement.parentElement!==t&&t.append(this.showConfig.appendableElement),t}}!function(t,e,i,s){var o,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(h=(n<3?o(h):n>3?o(e,i,h):o(e,i))||h);n>3&&h&&Object.defineProperty(e,i,h)}([t()],R.prototype,"showConfig",void 0);class y{canRetrieve(){return!this.showConfig.isScreenPosition}}class C extends y{canRetrieve(){return super.canRetrieve()&&!!this.showConfig.positionRelativeTo&&!!document.querySelector(this.showConfig.positionRelativeTo)}retrieve(){const t=document.querySelector(this.showConfig.positionRelativeTo);return this.showConfig.appendableElement.parentElement!==t&&t.append(this.showConfig.appendableElement),t}}!function(t,e,i,s){var o,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(h=(n<3?o(h):n>3?o(e,i,h):o(e,i))||h);n>3&&h&&Object.defineProperty(e,i,h)}([t()],C.prototype,"showConfig",void 0);class x extends y{canRetrieve(){return super.canRetrieve()&&!!n(this.showConfig.target,"vega-modal")}retrieve(){return this.getVegaModalShowConfigContainer()}setElementSlot(t,e){var i;const s=null===(i=Array.from(t.children).find((t=>{const e=t.getAttribute("slot");return e&&["content","modal-content"].includes(e)})))||void 0===i?void 0:i.getAttribute("slot");s&&e.setAttribute("slot",s)}getVegaModalShowConfigContainer(){const t=n(this.showConfig.target,"vega-modal"),e=t.shadowRoot.querySelector(".vega-modal-content-with-scroll"),i=t.shadowRoot.querySelector(".modal-dialog");return this.setElementSlot(t,this.showConfig.appendableElement),t.append(this.showConfig.appendableElement),e||i}}!function(t,e,i,s){var o,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(h=(n<3?o(h):n>3?o(e,i,h):o(e,i))||h);n>3&&h&&Object.defineProperty(e,i,h)}([t({writable:!0})],x.prototype,"showConfig",void 0);class O extends y{canRetrieve(){return super.canRetrieve()&&!!n(this.showConfig.target,".vega-popover")}retrieve(){const t=n(this.showConfig.target,".vega-popover");return t.append(this.showConfig.appendableElement),t}}!function(t,e,i,s){var o,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(h=(n<3?o(h):n>3?o(e,i,h):o(e,i))||h);n>3&&h&&Object.defineProperty(e,i,h)}([t()],O.prototype,"showConfig",void 0);var S=function(t,e,i,s){var o,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(h=(n<3?o(h):n>3?o(e,i,h):o(e,i))||h);return n>3&&h&&Object.defineProperty(e,i,h),h};class E extends i{constructor(){super(...arguments),this.positionRelativeToWrapper=new C,this.vegaPopoverWrapper=new O,this.vegaModalWrapper=new x,this.defaultWrapper=new R}setContainer(){this.setContainerRetrievers();for(const t of this.containerRetrievers)if(t.canRetrieve())return void(this.container=t.retrieve())}setContainerRetrievers(){this.containerRetrievers=[this.positionRelativeToWrapper,this.vegaPopoverWrapper,this.vegaModalWrapper,this.defaultWrapper]}}S([t({writable:!0})],E.prototype,"container",void 0),S([t({writable:!0})],E.prototype,"showConfig",void 0),S([e()],E.prototype,"positionRelativeToWrapper",void 0),S([e()],E.prototype,"vegaPopoverWrapper",void 0),S([e()],E.prototype,"vegaModalWrapper",void 0),S([e()],E.prototype,"defaultWrapper",void 0);class A extends i{getPositionBox(t,e){const i=t||this.getPlacements(),s=e||this.getAlignments(),o=this.getTargetBoundBox(),n=this.getElementBoundBox(),h=this.getElementScrollDimension(),r=this.getSuitablePlacement(h,n,o,i),c=this.getSuitableAlignment(h,n,o,r,s),l=this.calculatePosition(n,o,r,c),a=this.getTranslocationBox(r);return l.placement=r,l.alignment=c,l.left+=a.X,l.top+=a.Y,l}getElementBoundBox(){const t=this.showConfig.appendableElement,e=t.classList.contains("vega-force-hidden");e&&t.classList.remove("vega-force-hidden");const i=t.getBoundingClientRect();return e&&t.classList.add("vega-force-hidden"),{width:i.width,height:i.height,left:i.left,top:i.top}}getPlacements(){const t=this.showConfig.placement;if("string"==typeof t){const e=d.filter((e=>e!==t));return[t,...e]}return Array.isArray(t)?t:[...d]}getAlignments(){const t=this.showConfig.alignment;if("string"==typeof t){const e=u.filter((e=>e!==t));return[t,...e]}return Array.isArray(t)?t:[...u]}calculatePosition(t,e,i,s){return{top:this.calculateTop(t,e,i,s),left:this.calculateLeft(t,e,i,s)}}getTranslocationBox(t){const e=Array.isArray(this.showConfig.placement)?this.showConfig.placement[0]:this.showConfig.placement,i=this.getTranslocation(),s={X:0,Y:0};if(f(i)){let o=i.X,n=i.Y;(e&&["left","right"].includes(e)&&["top","bottom"].includes(t)||e&&["top","bottom"].includes(e)&&["left","right"].includes(t))&&(o=i.Y,n=i.X),["bottom","top"].includes(t)&&(s.Y="top"===t?-n:n,s.X=o),["left","right"].includes(t)&&(s.X="left"===t?-o:o,s.Y=n)}return s}calculateLeft(t,e,i,s){switch(i){case"top":case"bottom":return"end"===s?e.left+e.width-t.width:"center"===s?e.left-(t.width-e.width)/2:e.left;case"left":return e.left-t.width;case"right":return e.left+e.width;default:throw new Error(`Unexpected placement: ${i}. Expected values are top, bottom, left, or right.`)}}calculateTop(t,e,i,s){switch(i){case"left":case"right":return"end"===s?e.top+e.height-t.height:"center"===s?e.top-(t.height-e.height)/2:e.top;case"top":return e.top-t.height;case"bottom":return e.top+e.height;default:throw new Error(`Unexpected placement: ${i}. Expected values are top, bottom, left, or right.`)}}getSuitablePlacement(t,e,i,o){const n=o[0];return o.find((s=>this.hasEnoughSpace(t,s,i,e)))||(s.warn(`\n No enough space found for placing element and we will keep using the defined placement:\n ${n}\n `),n)}getSuitableAlignment(t,e,i,o,n){const h=n[0];return n.find((s=>this.hasEnoughAlignmentSpace(t,i,e,o,s)))||(s.warn(`\n No enough space found for placing element and we will keep using the defined alignment:\n ${h}\n `),h)}hasEnoughAlignmentSpace(t,e,i,s,o){if(["top","bottom"].includes(s))switch(o){case"start":return e.left+i.width<=t.width;case"center":return e.left>=(i.width-e.width)/2&&e.left+e.width/2+i.width/2<=t.width;case"end":return e.left+e.width>=i.width}if(["right","left"].includes(s))switch(o){case"start":return e.top+i.height<=t.height;case"center":return e.top>=(i.height-e.height)/2&&e.top+e.height/2+i.height/2<=t.height;case"end":return e.top+e.height>=i.height}return!1}hasEnoughSpace(t,e,i,s){switch(e){case"top":return i.top>=s.height;case"bottom":return t.height-i.top-i.height>=s.height;case"left":return i.left>=s.width;case"right":return t.width-i.left-i.width>=s.width;default:return!1}}getTranslocation(){const t=this.showConfig.translocation;return t&&p.format(t,"translocation")}}var P=function(t,e,i,s){var o,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(h=(n<3?o(h):n>3?o(e,i,h):o(e,i))||h);return n>3&&h&&Object.defineProperty(e,i,h),h};class k extends A{getPosition(){return"relative"!==window.getComputedStyle(this.container).position&&s.warn("Calculate position should make container as 'position: relative', otherwise the result might not be accurate."),this.getPositionBox()}getTargetBoundBox(){const t=this.container.getBoundingClientRect(),e=this.showConfig.target.getBoundingClientRect();return{width:e.width,height:e.height,top:e.top-t.top+this.container.scrollTop,left:e.left-t.left+this.container.scrollLeft}}getElementScrollDimension(){return{width:this.container.scrollWidth,height:this.container.scrollHeight}}}P([t()],k.prototype,"container",void 0),P([t()],k.prototype,"showConfig",void 0);class T extends A{getPosition(t){const e=t?this.getPositionBox([this.previousPositionBox.placement],[this.previousPositionBox.alignment]):this.getPositionBox();return this.previousPositionBox=e,e}getTargetBoundBox(){const t=this.showConfig.target.getBoundingClientRect();return{width:t.width,height:t.height,top:t.top,left:t.left}}getElementScrollDimension(){return{width:window.innerWidth,height:window.innerHeight}}}!function(t,e,i,s){var o,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(h=(n<3?o(h):n>3?o(e,i,h):o(e,i))||h);n>3&&h&&Object.defineProperty(e,i,h)}([t()],T.prototype,"showConfig",void 0);var $=function(t,e,i,s){var o,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(h=(n<3?o(h):n>3?o(e,i,h):o(e,i))||h);return n>3&&h&&Object.defineProperty(e,i,h),h};class D extends i{constructor(){super(...arguments),this.bodyPositionStrategy=new k,this.screenPositionStrategy=new T}setCalculationStrategy(){this.positionStrategy=this.showConfig.isScreenPosition?this.screenPositionStrategy:this.bodyPositionStrategy}adjustPosition(t){this.adjustWidth(),this.adjustHeight(),this.applyPosition(this.positionStrategy.getPosition(t))}applyPosition(t){const e=this.showConfig.appendableElement;this.showConfig.isScreenPosition&&(e.style.position="fixed"),e.style.left=`${t.left}px`,e.style.top=`${t.top}px`,e.classList.remove("vega-placement-left","vega-placement-right","vega-placement-top","vega-placement-bottom"),e.classList.remove("vega-alignment-start","vega-alignment-center","vega-alignment-end"),e.classList.add(`vega-placement-${t.placement}`),e.classList.add(`vega-alignment-${t.alignment}`)}adjustWidth(){if(this.showConfig.matchTargetWidth){const{width:t}=this.showConfig.target.getBoundingClientRect();this.setRelatedWidth("width",t)}else this.setRelatedWidth("width",this.showConfig.size),this.setRelatedWidth("minWidth",this.showConfig.minWidth),this.setRelatedWidth("maxWidth",this.showConfig.maxWidth)}setRelatedWidth(t,e){if(!e)return;const i=p.format(e,"size");i&&(this.showConfig.appendableElement.style[t]="number"==typeof i?`${i}px`:i)}adjustHeight(){if(this.showConfig.matchContainerHeight&&!this.showConfig.isScreenPosition){const{height:t}=this.showConfig.target.getBoundingClientRect();let e=this.container.scrollHeight-this.showConfig.target.offsetTop-t;this.showConfig.maxHeight&&(e=Math.min(e,this.showConfig.maxHeight)),this.showConfig.appendableElement.style.maxHeight=`${e}px`}else this.showConfig.maxHeight&&(this.showConfig.appendableElement.style.maxHeight=`${this.showConfig.maxHeight}px`)}}$([t()],D.prototype,"container",void 0),$([t()],D.prototype,"showConfig",void 0),$([e()],D.prototype,"bodyPositionStrategy",void 0),$([e()],D.prototype,"screenPositionStrategy",void 0);var B=function(t,e,i,s){var o,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(h=(n<3?o(h):n>3?o(e,i,h):o(e,i))||h);return n>3&&h&&Object.defineProperty(e,i,h),h};class L{constructor(t,e){var i,s;this.resizeObserverSlimmer=l(L,a,[],[{mapFrom:"connectResizeObserver",mapTo:"connectResizeObserver"},{mapFrom:"disconnectResizeObserver",mapTo:"disconnectResizeObserver"}],[{callback:()=>{h(this.showConfig.target)&&h(this.showConfig.appendableElement)&&this.adjustPosition()},target:()=>[document.body,this.showConfig.appendableElement,this.showConfig.target]}]),this.elementAppenderContainerController=new E,this.positionCalculationController=new D,this.showConfigCallback=t,this.showConfigCallbackTarget=e;const o=this.getShowConfig();null===(i=o.appendableElement)||void 0===i||i.classList.add("vega-force-hidden"),null===(s=o.appendableElement)||void 0===s||s.classList.add("vega-element-appender-appendable")}show(){this.setShowConfig(),this.showConfig.target?this.showConfig.appendableElement?(this.prepareShow(),this.adjustPosition(),this.setZIndex(),this.toggleShow(!0),this.connectResizeObserver()):s.error("No appendable element found, please add it at new elementAppender."):s.error("No target element found, please add it at new elementAppender.")}hide(){this.showConfig&&(this.toggleShow(!1),this.resetContainerPosition(),c.removeZIndex(this.showConfig.appendableElement,"base"))}onScroll(){var t;const e=this.showConfig.target.getBoundingClientRect();!this.showConfig.isScreenPosition||e.left===(null===(t=this.previousTargetRect)||void 0===t?void 0:t.left)&&e.top===this.previousTargetRect.top||this.adjustPosition(!0)}destroy(){this.showConfig&&(this.removeVisibleAppendElement(this.showConfig.appendableElement),this.resetContainerPosition(),c.removeZIndex(this.showConfig.appendableElement,"base"),this.showConfig.appendableElement.remove(),this.disconnectResizeObserver())}connectResizeObserver(){}disconnectResizeObserver(){}toggleShow(t){t?(this.showConfig.appendableElement.classList.remove("vega-force-hidden"),this.saveVisibleAppendElement(this.showConfig.appendableElement)):(this.showConfig.appendableElement.classList.add("vega-force-hidden"),this.removeVisibleAppendElement(this.showConfig.appendableElement))}saveVisibleAppendElement(t){const e=L.containerMap.get(this.container);e&&e.visibleAppendElements.add(t)}removeVisibleAppendElement(t){const e=L.containerMap.get(this.container);e&&e.visibleAppendElements.delete(t)}resetContainerPosition(){const t=L.containerMap.get(this.container);if(t){const{visibleAppendElements:e,originPosition:i="static"}=t;0===e.size&&(this.container.style.position=i,L.containerMap.delete(this.container))}}setShowConfig(){this.showConfig=this.getShowConfig(),this.showConfig=Object.assign({matchTargetWidth:!1,matchContainerHeight:!1},this.showConfig),this.showConfig.target&&this.showConfig.appendableElement&&this.elementAppenderContainerController.setContainer()}prepareShow(){this.showConfig.isScreenPosition||this.initVisibleAppendElement(),this.showConfig.appendableElement.style.boxSizing="border-box",this.positionCalculationController.setCalculationStrategy()}initVisibleAppendElement(){const t=window.getComputedStyle(this.container).position;L.containerMap.has(this.container)||L.containerMap.set(this.container,{visibleAppendElements:new Set,originPosition:t}),"static"===t&&(this.container.style.position="relative")}adjustPosition(t){this.positionCalculationController.adjustPosition(t)}setZIndex(){c.setZIndex(this.showConfig.appendableElement,"base")}getShowConfig(){return this.showConfigCallback instanceof Function?this.showConfigCallback(this.showConfigCallbackTarget):this.showConfigCallback}}L.containerMap=new Map,B([e()],L.prototype,"resizeObserverSlimmer",void 0),B([e()],L.prototype,"elementAppenderContainerController",void 0),B([e()],L.prototype,"positionCalculationController",void 0);var W,z=function(t,e,i,s){var o,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(h=(n<3?o(h):n>3?o(e,i,h):o(e,i))||h);return n>3&&h&&Object.defineProperty(e,i,h),h};!function(t){t.SHOW="show",t.HIDE="hide"}(W||(W={}));class M extends i{constructor(t){super(),this.childrenEA=[],this.currentEA=t}componentDidLoad(){this.register()}onShow(){this.notify(W.SHOW)}onHide(){this.notify(W.HIDE)}getParent(){return this.parentEA}getChildren(){return this.childrenEA}notify(t){const e=n(this.showConfig.target,".vega-element-appender-appendable");e&&v.notify(b.getSubject(e,w),{type:t,child:this.currentEA,callback:t=>{this.parentEA=t}})}register(){this.showConfig&&j.addUniqueObserverToNode(this.showConfig.appendableElement,w,(t=>{t.type===W.SHOW?this.childrenEA.push(t.child):t.type===W.HIDE&&(this.childrenEA=this.childrenEA.filter((e=>e!==t.child))),t.callback(this.currentEA)}))}}z([t()],M.prototype,"showConfig",void 0),z([o("componentDidLoad")],M.prototype,"componentDidLoad",null),z([o("show")],M.prototype,"onShow",null),z([o("hide")],M.prototype,"onHide",null);var V=function(t,e,i,s){var o,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(h=(n<3?o(h):n>3?o(e,i,h):o(e,i))||h);return n>3&&h&&Object.defineProperty(e,i,h),h};class F extends i{constructor(t,e,i="isDropdownShow",s=(()=>!1)){super(),this.hierarchyTreeManager=new M(this),this.registerElementAppenderListener=()=>{var t,e,i,s,o,n;this.unRegisterElementAppenderListener(),this.showConfig&&(null===(t=this.showConfig.target)||void 0===t||t.addEventListener("click",this.targetClickHandler),null===(e=this.showConfig.target)||void 0===e||e.addEventListener("mouseenter",this.targetMouseEnterHandler),null===(i=this.showConfig.target)||void 0===i||i.addEventListener("mouseleave",this.targetMouseLeaveHandler),null===(s=this.showConfig.target)||void 0===s||s.addEventListener("focusout",this.targetFocusoutHandler),null===(o=this.showConfig.appendableElement)||void 0===o||o.addEventListener("mouseenter",this.elementMouseEnterHandler),null===(n=this.showConfig.appendableElement)||void 0===n||n.addEventListener("mouseleave",this.elementMouseLeaveHandler)),window.addEventListener("mousedown",this.globalMouseDownHandler),document.addEventListener("scroll",this.globalScrollHandler,{capture:!0}),this.listenShadowRootElementScrolling()},this.targetClickHandler=()=>{this.shouldListenerWork("click")&&(this.isShowing()?this.hide():this.show())},this.targetMouseEnterHandler=()=>{this.shouldListenerWork("hover")&&(!1===this.isShowing()&&this.show(),this.clearDelayHideTimer())},this.targetMouseLeaveHandler=()=>{this.shouldListenerWork("hover")&&this.createDelayHideTimer()},this.targetFocusoutHandler=t=>{var e;r(t.relatedTarget,null===(e=this.showConfig)||void 0===e?void 0:e.appendableElement)||this.targetMouseLeaveHandler()},this.elementMouseEnterHandler=()=>{var t;null===(t=this.hierarchyTreeManager.getParent())||void 0===t||t.elementMouseEnterHandler(),this.shouldListenerWork("hover")&&!this.disableInteractiveGetter()&&this.clearDelayHideTimer()},this.elementMouseLeaveHandler=()=>{var t;null===(t=this.hierarchyTreeManager.getParent())||void 0===t||t.elementMouseLeaveHandler(),this.shouldListenerWork("hover")&&!this.disableInteractiveGetter()&&this.createDelayHideTimer()},this.globalMouseDownHandler=t=>{const e=t.composedPath()[0];!this.hierarchyTreeManager.getChildren().some((t=>t.isShowing()))&&this.shouldListenerWork("custom")&&this.isShowing()&&this.showConfig&&!r(e,this.showConfig.appendableElement)&&!r(e,this.showConfig.target)&&n(e,"vega-modal")===n(this.showConfig.target,"vega-modal")&&this.hide()},this.globalScrollHandler=()=>{var t;this.showConfig&&this.showConfig.isScreenPosition&&this.isShowing()&&(null===(t=this.elementAppender)||void 0===t||t.onScroll())},this.createDelayHideTimer=()=>{this.delayHideTimer=setTimeout((()=>{this.hide(),clearTimeout(this.delayHideTimer)}),F.DELAY_HIDE_TIME)},this.clearDelayHideTimer=()=>{this.delayHideTimer&&clearTimeout(this.delayHideTimer)},this.shouldListenerWork=t=>{const e=this.getTrigger();switch(t){case"custom":return"none"!==e;case"click":return"click"===e;case"hover":return"hover"===e}throw new Error(`Unexpected trigger: ${t}. Expected values are custom, click, or hover.`)},this.showConfigFactory=t,this.getTrigger=e,this.isDropdownShowName=i,this.disableInteractiveGetter=s}connectedCallback(){null===this.elementAppender&&(this.setElementAppender(),this.registerElementAppenderListener())}disconnectedCallback(){this.unRegisterElementAppenderListener(),this.destroyElementAppender()}componentDidLoad(){this.initElementAppender()}getElementAppender(){return this.elementAppender}show(){this.elementAppender&&this.elementAppender.show(),this[this.isDropdownShowName]=!0}hide(){this.elementAppender&&this.elementAppender.hide(),this[this.isDropdownShowName]=!1,this.hierarchyTreeManager.getChildren().map((t=>{t.hide()}))}destroy(){this.destroyElementAppender(),this[this.isDropdownShowName]=!1}updateShowConfigFactory(t){this.showConfigFactory=t,this.initElementAppender()}destroyElementAppender(){this.elementAppender&&(this.elementAppender.destroy(),this.elementAppender=null)}initElementAppender(){this.setShowConfig(),this.setElementAppender(),this.registerElementAppenderListener()}setElementAppender(){this.elementAppender=new L(this.showConfigFactory,this)}isShowing(){return this[this.isDropdownShowName]}setShowConfig(){this.showConfig=this.showConfigFactory()}unRegisterElementAppenderListener(){var t,e,i,s,o,n;this.showConfig&&(null===(t=this.showConfig.target)||void 0===t||t.removeEventListener("click",this.targetClickHandler),null===(e=this.showConfig.target)||void 0===e||e.removeEventListener("mouseenter",this.targetMouseEnterHandler),null===(i=this.showConfig.target)||void 0===i||i.removeEventListener("mouseleave",this.targetMouseLeaveHandler),null===(s=this.showConfig.target)||void 0===s||s.removeEventListener("focusout",this.targetMouseLeaveHandler),null===(o=this.showConfig.appendableElement)||void 0===o||o.removeEventListener("mouseenter",this.elementMouseEnterHandler),null===(n=this.showConfig.appendableElement)||void 0===n||n.removeEventListener("mouseleave",this.elementMouseLeaveHandler)),window.removeEventListener("mousedown",this.globalMouseDownHandler),document.removeEventListener("scroll",this.globalScrollHandler),this.removeShadowRootElementScrolling()}listenShadowRootElementScrolling(){this.shadowRootElementScrollingObserver=new g(this.canAcceptShadowRootScrollEvent.bind(this),this.globalScrollHandler.bind(this)),v.register(m,this.shadowRootElementScrollingObserver)}canAcceptShadowRootScrollEvent(t){return Boolean(this.showConfig&&r(this.showConfig.target,t.host))}removeShadowRootElementScrolling(){v.unregister(m,this.shadowRootElementScrollingObserver)}}F.DELAY_HIDE_TIME=100,V([e()],F.prototype,"hierarchyTreeManager",void 0),V([o("connectedCallback")],F.prototype,"connectedCallback",null),V([o("disconnectedCallback")],F.prototype,"disconnectedCallback",null),V([o("componentDidLoad")],F.prototype,"componentDidLoad",null);export{F as E}
1
+ import{c as t,I as e,V as i,L as s,M as o}from"./p-6e1ab235.js";import{f as n,c as h,i as r}from"./p-d5776087.js";import{I as c}from"./p-bcdb235d.js";import{c as l}from"./p-6a334573.js";import{P as a}from"./p-7d9cd9c8.js";import{P as d,A as u}from"./p-74168615.js";import{A as f}from"./p-5e2c9e69.js";import{R as p}from"./p-4a237308.js";import{C as v}from"./p-2d0d575f.js";import{S as m}from"./p-5773a9a3.js";import{O as g}from"./p-331a62d5.js";import{d as w}from"./p-6e01f0a2.js";import{q as b}from"./p-f5ac60f5.js";import{D as j}from"./p-e7b00bf0.js";class R{canRetrieve(){return!0}retrieve(){const t=document.body;return this.showConfig.appendableElement.parentElement!==t&&t.append(this.showConfig.appendableElement),t}}!function(t,e,i,s){var o,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(h=(n<3?o(h):n>3?o(e,i,h):o(e,i))||h);n>3&&h&&Object.defineProperty(e,i,h)}([t()],R.prototype,"showConfig",void 0);class y{canRetrieve(){return!this.showConfig.isScreenPosition}}class C extends y{canRetrieve(){return super.canRetrieve()&&!!this.showConfig.positionRelativeTo&&!!document.querySelector(this.showConfig.positionRelativeTo)}retrieve(){const t=document.querySelector(this.showConfig.positionRelativeTo);return this.showConfig.appendableElement.parentElement!==t&&t.append(this.showConfig.appendableElement),t}}!function(t,e,i,s){var o,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(h=(n<3?o(h):n>3?o(e,i,h):o(e,i))||h);n>3&&h&&Object.defineProperty(e,i,h)}([t()],C.prototype,"showConfig",void 0);class x extends y{canRetrieve(){return super.canRetrieve()&&!!n(this.showConfig.target,"vega-modal")}retrieve(){return this.getVegaModalShowConfigContainer()}setElementSlot(t,e){var i;const s=null===(i=Array.from(t.children).find((t=>{const e=t.getAttribute("slot");return e&&["content","modal-content"].includes(e)})))||void 0===i?void 0:i.getAttribute("slot");s&&e.setAttribute("slot",s)}getVegaModalShowConfigContainer(){const t=n(this.showConfig.target,"vega-modal"),e=t.shadowRoot.querySelector(".vega-modal-content-with-scroll"),i=t.shadowRoot.querySelector(".modal-dialog");return this.setElementSlot(t,this.showConfig.appendableElement),t.append(this.showConfig.appendableElement),e||i}}!function(t,e,i,s){var o,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(h=(n<3?o(h):n>3?o(e,i,h):o(e,i))||h);n>3&&h&&Object.defineProperty(e,i,h)}([t({writable:!0})],x.prototype,"showConfig",void 0);class O extends y{canRetrieve(){return super.canRetrieve()&&!!n(this.showConfig.target,".vega-popover")}retrieve(){const t=n(this.showConfig.target,".vega-popover");return t.append(this.showConfig.appendableElement),t}}!function(t,e,i,s){var o,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(h=(n<3?o(h):n>3?o(e,i,h):o(e,i))||h);n>3&&h&&Object.defineProperty(e,i,h)}([t()],O.prototype,"showConfig",void 0);var S=function(t,e,i,s){var o,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(h=(n<3?o(h):n>3?o(e,i,h):o(e,i))||h);return n>3&&h&&Object.defineProperty(e,i,h),h};class E extends i{constructor(){super(...arguments),this.positionRelativeToWrapper=new C,this.vegaPopoverWrapper=new O,this.vegaModalWrapper=new x,this.defaultWrapper=new R}setContainer(){this.setContainerRetrievers();for(const t of this.containerRetrievers)if(t.canRetrieve())return void(this.container=t.retrieve())}setContainerRetrievers(){this.containerRetrievers=[this.positionRelativeToWrapper,this.vegaPopoverWrapper,this.vegaModalWrapper,this.defaultWrapper]}}S([t({writable:!0})],E.prototype,"container",void 0),S([t({writable:!0})],E.prototype,"showConfig",void 0),S([e()],E.prototype,"positionRelativeToWrapper",void 0),S([e()],E.prototype,"vegaPopoverWrapper",void 0),S([e()],E.prototype,"vegaModalWrapper",void 0),S([e()],E.prototype,"defaultWrapper",void 0);class A extends i{getPositionBox(t,e){const i=t||this.getPlacements(),s=e||this.getAlignments(),o=this.getTargetBoundBox(),n=this.getElementBoundBox(),h=this.getElementScrollDimension(),r=this.getSuitablePlacement(h,n,o,i),c=this.getSuitableAlignment(h,n,o,r,s),l=this.calculatePosition(n,o,r,c),a=this.getTranslocationBox(r);return l.placement=r,l.alignment=c,l.left+=a.X,l.top+=a.Y,l}getElementBoundBox(){const t=this.showConfig.appendableElement,e=t.classList.contains("vega-force-hidden");e&&t.classList.remove("vega-force-hidden");const i=t.getBoundingClientRect();return e&&t.classList.add("vega-force-hidden"),{width:i.width,height:i.height,left:i.left,top:i.top}}getPlacements(){const t=this.showConfig.placement;if("string"==typeof t){const e=d.filter((e=>e!==t));return[t,...e]}return Array.isArray(t)?t:[...d]}getAlignments(){const t=this.showConfig.alignment;if("string"==typeof t){const e=u.filter((e=>e!==t));return[t,...e]}return Array.isArray(t)?t:[...u]}calculatePosition(t,e,i,s){return{top:this.calculateTop(t,e,i,s),left:this.calculateLeft(t,e,i,s)}}getTranslocationBox(t){const e=Array.isArray(this.showConfig.placement)?this.showConfig.placement[0]:this.showConfig.placement,i=this.getTranslocation(),s={X:0,Y:0};if(f(i)){let o=i.X,n=i.Y;(e&&["left","right"].includes(e)&&["top","bottom"].includes(t)||e&&["top","bottom"].includes(e)&&["left","right"].includes(t))&&(o=i.Y,n=i.X),["bottom","top"].includes(t)&&(s.Y="top"===t?-n:n,s.X=o),["left","right"].includes(t)&&(s.X="left"===t?-o:o,s.Y=n)}return s}calculateLeft(t,e,i,s){switch(i){case"top":case"bottom":return"end"===s?e.left+e.width-t.width:"center"===s?e.left-(t.width-e.width)/2:e.left;case"left":return e.left-t.width;case"right":return e.left+e.width;default:throw new Error(`Unexpected placement: ${i}. Expected values are top, bottom, left, or right.`)}}calculateTop(t,e,i,s){switch(i){case"left":case"right":return"end"===s?e.top+e.height-t.height:"center"===s?e.top-(t.height-e.height)/2:e.top;case"top":return e.top-t.height;case"bottom":return e.top+e.height;default:throw new Error(`Unexpected placement: ${i}. Expected values are top, bottom, left, or right.`)}}getSuitablePlacement(t,e,i,o){const n=o[0];return o.find((s=>this.hasEnoughSpace(t,s,i,e)))||(s.warn(`\n No enough space found for placing element and we will keep using the defined placement:\n ${n}\n `),n)}getSuitableAlignment(t,e,i,o,n){const h=n[0];return n.find((s=>this.hasEnoughAlignmentSpace(t,i,e,o,s)))||(s.warn(`\n No enough space found for placing element and we will keep using the defined alignment:\n ${h}\n `),h)}hasEnoughAlignmentSpace(t,e,i,s,o){if(["top","bottom"].includes(s))switch(o){case"start":return e.left+i.width<=t.width;case"center":return e.left>=(i.width-e.width)/2&&e.left+e.width/2+i.width/2<=t.width;case"end":return e.left+e.width>=i.width}if(["right","left"].includes(s))switch(o){case"start":return e.top+i.height<=t.height;case"center":return e.top>=(i.height-e.height)/2&&e.top+e.height/2+i.height/2<=t.height;case"end":return e.top+e.height>=i.height}return!1}hasEnoughSpace(t,e,i,s){switch(e){case"top":return i.top>=s.height;case"bottom":return t.height-i.top-i.height>=s.height;case"left":return i.left>=s.width;case"right":return t.width-i.left-i.width>=s.width;default:return!1}}getTranslocation(){const t=this.showConfig.translocation;return t&&p.format(t,"translocation")}}var P=function(t,e,i,s){var o,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(h=(n<3?o(h):n>3?o(e,i,h):o(e,i))||h);return n>3&&h&&Object.defineProperty(e,i,h),h};class k extends A{getPosition(){return"relative"!==window.getComputedStyle(this.container).position&&s.warn("Calculate position should make container as 'position: relative', otherwise the result might not be accurate."),this.getPositionBox()}getTargetBoundBox(){const t=this.container.getBoundingClientRect(),e=this.showConfig.target.getBoundingClientRect();return{width:e.width,height:e.height,top:e.top-t.top+this.container.scrollTop,left:e.left-t.left+this.container.scrollLeft}}getElementScrollDimension(){return{width:this.container.scrollWidth,height:this.container.scrollHeight}}}P([t()],k.prototype,"container",void 0),P([t()],k.prototype,"showConfig",void 0);class T extends A{getPosition(t){const e=t?this.getPositionBox([this.previousPositionBox.placement],[this.previousPositionBox.alignment]):this.getPositionBox();return this.previousPositionBox=e,e}getTargetBoundBox(){const t=this.showConfig.target.getBoundingClientRect();return{width:t.width,height:t.height,top:t.top,left:t.left}}getElementScrollDimension(){return{width:window.innerWidth,height:window.innerHeight}}}!function(t,e,i,s){var o,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(h=(n<3?o(h):n>3?o(e,i,h):o(e,i))||h);n>3&&h&&Object.defineProperty(e,i,h)}([t()],T.prototype,"showConfig",void 0);var $=function(t,e,i,s){var o,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(h=(n<3?o(h):n>3?o(e,i,h):o(e,i))||h);return n>3&&h&&Object.defineProperty(e,i,h),h};class D extends i{constructor(){super(...arguments),this.bodyPositionStrategy=new k,this.screenPositionStrategy=new T}setCalculationStrategy(){this.positionStrategy=this.showConfig.isScreenPosition?this.screenPositionStrategy:this.bodyPositionStrategy}adjustPosition(t){this.adjustWidth(),this.adjustHeight(),this.applyPosition(this.positionStrategy.getPosition(t))}applyPosition(t){const e=this.showConfig.appendableElement;this.showConfig.isScreenPosition&&(e.style.position="fixed"),e.style.left=`${t.left}px`,e.style.top=`${t.top}px`,e.classList.remove("vega-placement-left","vega-placement-right","vega-placement-top","vega-placement-bottom"),e.classList.remove("vega-alignment-start","vega-alignment-center","vega-alignment-end"),e.classList.add(`vega-placement-${t.placement}`),e.classList.add(`vega-alignment-${t.alignment}`)}adjustWidth(){if(this.showConfig.matchTargetWidth){const{width:t}=this.showConfig.target.getBoundingClientRect();this.setRelatedWidth("width",t)}else this.setRelatedWidth("width",this.showConfig.size),this.setRelatedWidth("minWidth",this.showConfig.minWidth),this.setRelatedWidth("maxWidth",this.showConfig.maxWidth)}setRelatedWidth(t,e){if(!e)return;const i=p.format(e,"size");i&&(this.showConfig.appendableElement.style[t]="number"==typeof i?`${i}px`:i)}adjustHeight(){if(this.showConfig.matchContainerHeight&&!this.showConfig.isScreenPosition){const{height:t}=this.showConfig.target.getBoundingClientRect();let e=this.container.scrollHeight-this.showConfig.target.offsetTop-t;this.showConfig.maxHeight&&(e=Math.min(e,this.showConfig.maxHeight)),this.showConfig.appendableElement.style.maxHeight=`${e}px`}else this.showConfig.maxHeight&&(this.showConfig.appendableElement.style.maxHeight=`${this.showConfig.maxHeight}px`)}}$([t()],D.prototype,"container",void 0),$([t()],D.prototype,"showConfig",void 0),$([e()],D.prototype,"bodyPositionStrategy",void 0),$([e()],D.prototype,"screenPositionStrategy",void 0);var B=function(t,e,i,s){var o,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(h=(n<3?o(h):n>3?o(e,i,h):o(e,i))||h);return n>3&&h&&Object.defineProperty(e,i,h),h};class L{constructor(t,e){var i,s;this.resizeObserverSlimmer=l(L,a,[],[{mapFrom:"connectResizeObserver",mapTo:"connectResizeObserver"},{mapFrom:"disconnectResizeObserver",mapTo:"disconnectResizeObserver"}],[{callback:()=>{h(this.showConfig.target)&&h(this.showConfig.appendableElement)&&this.adjustPosition()},target:()=>[document.body,this.showConfig.appendableElement,this.showConfig.target]}]),this.elementAppenderContainerController=new E,this.positionCalculationController=new D,this.showConfigCallback=t,this.showConfigCallbackTarget=e;const o=this.getShowConfig();null===(i=o.appendableElement)||void 0===i||i.classList.add("vega-force-hidden"),null===(s=o.appendableElement)||void 0===s||s.classList.add("vega-element-appender-appendable")}show(){this.setShowConfig(),this.showConfig.target?this.showConfig.appendableElement?(this.prepareShow(),this.adjustPosition(),this.setZIndex(),this.toggleShow(!0),this.connectResizeObserver()):s.error("No appendable element found, please add it at new elementAppender."):s.error("No target element found, please add it at new elementAppender.")}hide(){this.showConfig&&(this.toggleShow(!1),this.resetContainerPosition(),c.removeZIndex(this.showConfig.appendableElement,"base"))}onScroll(){var t;const e=this.showConfig.target.getBoundingClientRect();!this.showConfig.isScreenPosition||e.left===(null===(t=this.previousTargetRect)||void 0===t?void 0:t.left)&&e.top===this.previousTargetRect.top||this.adjustPosition(!0)}destroy(){this.showConfig&&(this.removeVisibleAppendElement(this.showConfig.appendableElement),this.resetContainerPosition(),c.removeZIndex(this.showConfig.appendableElement,"base"),this.showConfig.appendableElement.remove(),this.disconnectResizeObserver())}connectResizeObserver(){}disconnectResizeObserver(){}toggleShow(t){t?(this.showConfig.appendableElement.classList.remove("vega-force-hidden"),this.saveVisibleAppendElement(this.showConfig.appendableElement)):(this.showConfig.appendableElement.classList.add("vega-force-hidden"),this.removeVisibleAppendElement(this.showConfig.appendableElement))}saveVisibleAppendElement(t){const e=L.containerMap.get(this.container);e&&e.visibleAppendElements.add(t)}removeVisibleAppendElement(t){const e=L.containerMap.get(this.container);e&&e.visibleAppendElements.delete(t)}resetContainerPosition(){const t=L.containerMap.get(this.container);if(t){const{visibleAppendElements:e,originPosition:i="static"}=t;0===e.size&&(this.container.style.position=i,L.containerMap.delete(this.container))}}setShowConfig(){this.showConfig=this.getShowConfig(),this.showConfig=Object.assign({matchTargetWidth:!1,matchContainerHeight:!1},this.showConfig),this.showConfig.target&&this.showConfig.appendableElement&&this.elementAppenderContainerController.setContainer()}prepareShow(){this.showConfig.isScreenPosition||this.initVisibleAppendElement(),this.showConfig.appendableElement.style.boxSizing="border-box",this.positionCalculationController.setCalculationStrategy()}initVisibleAppendElement(){const t=window.getComputedStyle(this.container).position;L.containerMap.has(this.container)||L.containerMap.set(this.container,{visibleAppendElements:new Set,originPosition:t}),"static"===t&&(this.container.style.position="relative")}adjustPosition(t){this.positionCalculationController.adjustPosition(t)}setZIndex(){c.setZIndex(this.showConfig.appendableElement,"base")}getShowConfig(){return this.showConfigCallback instanceof Function?this.showConfigCallback(this.showConfigCallbackTarget):this.showConfigCallback}}L.containerMap=new Map,B([e()],L.prototype,"resizeObserverSlimmer",void 0),B([e()],L.prototype,"elementAppenderContainerController",void 0),B([e()],L.prototype,"positionCalculationController",void 0);var W,z=function(t,e,i,s){var o,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(h=(n<3?o(h):n>3?o(e,i,h):o(e,i))||h);return n>3&&h&&Object.defineProperty(e,i,h),h};!function(t){t.SHOW="show",t.HIDE="hide"}(W||(W={}));class M extends i{constructor(t){super(),this.childrenEA=[],this.currentEA=t}componentDidLoad(){this.register()}onShow(){this.notify(W.SHOW)}onHide(){this.notify(W.HIDE)}getParent(){return this.parentEA}getChildren(){return this.childrenEA}notify(t){const e=n(this.showConfig.target,".vega-element-appender-appendable");e&&v.notify(w.getSubject(e,b),{type:t,child:this.currentEA,callback:t=>{this.parentEA=t}})}register(){this.showConfig&&j.addUniqueObserverToNode(this.showConfig.appendableElement,b,(t=>{t.type===W.SHOW?this.childrenEA.push(t.child):t.type===W.HIDE&&(this.childrenEA=this.childrenEA.filter((e=>e!==t.child))),t.callback(this.currentEA)}))}}z([t()],M.prototype,"showConfig",void 0),z([o("componentDidLoad")],M.prototype,"componentDidLoad",null),z([o("show")],M.prototype,"onShow",null),z([o("hide")],M.prototype,"onHide",null);var V=function(t,e,i,s){var o,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(h=(n<3?o(h):n>3?o(e,i,h):o(e,i))||h);return n>3&&h&&Object.defineProperty(e,i,h),h};class F extends i{constructor(t,e,i="isDropdownShow",s=(()=>!1)){super(),this.hierarchyTreeManager=new M(this),this.registerElementAppenderListener=()=>{var t,e,i,s,o,n;this.unRegisterElementAppenderListener(),this.showConfig&&(null===(t=this.showConfig.target)||void 0===t||t.addEventListener("click",this.targetClickHandler),null===(e=this.showConfig.target)||void 0===e||e.addEventListener("mouseenter",this.targetMouseEnterHandler),null===(i=this.showConfig.target)||void 0===i||i.addEventListener("mouseleave",this.targetMouseLeaveHandler),null===(s=this.showConfig.target)||void 0===s||s.addEventListener("focusout",this.targetFocusoutHandler),null===(o=this.showConfig.appendableElement)||void 0===o||o.addEventListener("mouseenter",this.elementMouseEnterHandler),null===(n=this.showConfig.appendableElement)||void 0===n||n.addEventListener("mouseleave",this.elementMouseLeaveHandler)),window.addEventListener("mousedown",this.globalMouseDownHandler),document.addEventListener("scroll",this.globalScrollHandler,{capture:!0}),this.listenShadowRootElementScrolling()},this.targetClickHandler=()=>{this.shouldListenerWork("click")&&(this.isShowing()?this.hide():this.show())},this.targetMouseEnterHandler=()=>{this.shouldListenerWork("hover")&&(!1===this.isShowing()&&this.show(),this.clearDelayHideTimer())},this.targetMouseLeaveHandler=()=>{this.shouldListenerWork("hover")&&this.createDelayHideTimer()},this.targetFocusoutHandler=t=>{var e;r(t.relatedTarget,null===(e=this.showConfig)||void 0===e?void 0:e.appendableElement)||this.targetMouseLeaveHandler()},this.elementMouseEnterHandler=()=>{var t;null===(t=this.hierarchyTreeManager.getParent())||void 0===t||t.elementMouseEnterHandler(),this.shouldListenerWork("hover")&&!this.disableInteractiveGetter()&&this.clearDelayHideTimer()},this.elementMouseLeaveHandler=()=>{var t;null===(t=this.hierarchyTreeManager.getParent())||void 0===t||t.elementMouseLeaveHandler(),this.shouldListenerWork("hover")&&!this.disableInteractiveGetter()&&this.createDelayHideTimer()},this.globalMouseDownHandler=t=>{const e=t.composedPath()[0];!this.hierarchyTreeManager.getChildren().some((t=>t.isShowing()))&&this.shouldListenerWork("custom")&&this.isShowing()&&this.showConfig&&!r(e,this.showConfig.appendableElement)&&!r(e,this.showConfig.target)&&n(e,"vega-modal")===n(this.showConfig.target,"vega-modal")&&this.hide()},this.globalScrollHandler=()=>{var t;this.showConfig&&this.showConfig.isScreenPosition&&this.isShowing()&&(null===(t=this.elementAppender)||void 0===t||t.onScroll())},this.createDelayHideTimer=()=>{this.delayHideTimer=setTimeout((()=>{this.hide(),clearTimeout(this.delayHideTimer)}),F.DELAY_HIDE_TIME)},this.clearDelayHideTimer=()=>{this.delayHideTimer&&clearTimeout(this.delayHideTimer)},this.shouldListenerWork=t=>{const e=this.getTrigger();switch(t){case"custom":return"none"!==e;case"click":return"click"===e;case"hover":return"hover"===e}throw new Error(`Unexpected trigger: ${t}. Expected values are custom, click, or hover.`)},this.showConfigFactory=t,this.getTrigger=e,this.isDropdownShowName=i,this.disableInteractiveGetter=s}connectedCallback(){null===this.elementAppender&&(this.setElementAppender(),this.registerElementAppenderListener())}disconnectedCallback(){this.unRegisterElementAppenderListener(),this.destroyElementAppender()}componentDidLoad(){this.initElementAppender()}getElementAppender(){return this.elementAppender}show(){this.elementAppender&&this.elementAppender.show(),this[this.isDropdownShowName]=!0}hide(){this.elementAppender&&this.elementAppender.hide(),this[this.isDropdownShowName]=!1,this.hierarchyTreeManager.getChildren().map((t=>{t.hide()}))}destroy(){this.destroyElementAppender(),this[this.isDropdownShowName]=!1}updateShowConfigFactory(t){this.showConfigFactory=t,this.initElementAppender()}destroyElementAppender(){this.elementAppender&&(this.elementAppender.destroy(),this.elementAppender=null)}initElementAppender(){this.setShowConfig(),this.setElementAppender(),this.registerElementAppenderListener()}setElementAppender(){this.elementAppender=new L(this.showConfigFactory,this)}isShowing(){return this[this.isDropdownShowName]}setShowConfig(){this.showConfig=this.showConfigFactory()}unRegisterElementAppenderListener(){var t,e,i,s,o,n;this.showConfig&&(null===(t=this.showConfig.target)||void 0===t||t.removeEventListener("click",this.targetClickHandler),null===(e=this.showConfig.target)||void 0===e||e.removeEventListener("mouseenter",this.targetMouseEnterHandler),null===(i=this.showConfig.target)||void 0===i||i.removeEventListener("mouseleave",this.targetMouseLeaveHandler),null===(s=this.showConfig.target)||void 0===s||s.removeEventListener("focusout",this.targetMouseLeaveHandler),null===(o=this.showConfig.appendableElement)||void 0===o||o.removeEventListener("mouseenter",this.elementMouseEnterHandler),null===(n=this.showConfig.appendableElement)||void 0===n||n.removeEventListener("mouseleave",this.elementMouseLeaveHandler)),window.removeEventListener("mousedown",this.globalMouseDownHandler),document.removeEventListener("scroll",this.globalScrollHandler),this.removeShadowRootElementScrolling()}listenShadowRootElementScrolling(){this.shadowRootElementScrollingObserver=new g(this.canAcceptShadowRootScrollEvent.bind(this),this.globalScrollHandler.bind(this)),v.register(m,this.shadowRootElementScrollingObserver)}canAcceptShadowRootScrollEvent(t){return Boolean(this.showConfig&&r(this.showConfig.target,t.host))}removeShadowRootElementScrolling(){v.unregister(m,this.shadowRootElementScrollingObserver)}}F.DELAY_HIDE_TIME=100,V([e()],F.prototype,"hierarchyTreeManager",void 0),V([o("connectedCallback")],F.prototype,"connectedCallback",null),V([o("disconnectedCallback")],F.prototype,"disconnectedCallback",null),V([o("componentDidLoad")],F.prototype,"componentDidLoad",null);export{F as E}
@@ -1 +1 @@
1
- import{r as e,h as t,H as i,g as a}from"./p-21d26bb4.js";import{c as r,M as o,V as s,I as n}from"./p-6e1ab235.js";import{V as l,I as d}from"./p-4387d550.js";import{I as c}from"./p-d5f1794e.js";import{s as p}from"./p-519a7d55.js";import{a as g}from"./p-d5776087.js";import{R as h}from"./p-66516ee9.js";import{P as m,g as f}from"./p-7d9cd9c8.js";import"./p-37b05e0b.js";import"./p-6a334573.js";import"./p-0c8bd757.js";import"./p-5773a9a3.js";import"./p-2d0d575f.js";import"./p-331a62d5.js";import"./p-112455b1.js";import"./p-613ee009.js";import"./p-6e01f0a2.js";import"./p-262ec334.js";import"./p-b1f65b13.js";import"./p-ed45b3b6.js";import"./p-74168615.js";import"./p-3a0a4d15.js";import"./p-d884c644.js";import"./p-0c667d6a.js";import"./p-d27ae9ff.js";import"./p-5f377954.js";import"./p-4d793cb0.js";import"./p-7a40e033.js";import"./p-cc63e827.js";import"./p-fa5eb496.js";import"./p-4ab3df00.js";import"./p-68864531.js";import"./p-c685adcd.js";import"./p-425ba7d6.js";import"./p-b75ee3ba.js";var b=function(e,t,i,a){var r,o=arguments.length,s=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,a);else for(var n=e.length-1;n>=0;n--)(r=e[n])&&(s=(o<3?r(s):o>3?r(t,i,s):r(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s};class v extends s{connectedCallback(){this.setIndex()}disconnectedCallback(){this.removeIndex()}setIndex(){const e=document.querySelector(this.host.dataset.container);e&&"BODY"===e.tagName&&c.setZIndex(this.host,"base")}removeIndex(){c.removeZIndex(this.host,"base")}}b([r()],v.prototype,"host",void 0),b([o("connectedCallback")],v.prototype,"connectedCallback",null),b([o("disconnectedCallback")],v.prototype,"disconnectedCallback",null);var x=function(e,t,i,a){var r,o=arguments.length,s=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,a);else for(var n=e.length-1;n>=0;n--)(r=e[n])&&(s=(o<3?r(s):o>3?r(t,i,s):r(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s};const u=class{constructor(t){e(this,t),this.globalSlimmers={},this.manageVegaLoaderWrapperZIndexController=new v,this.vegaComponentUsageRuntimeMetricsSlimmer=new l}render(){return t(i,{class:"vega-loader-wrapper"},t("slot",null))}get host(){return a(this)}};x([d()],u.prototype,"globalSlimmers",void 0),x([n()],u.prototype,"manageVegaLoaderWrapperZIndexController",void 0),x([n()],u.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),u.style=":host{display:block;display:inline-flex;align-items:center;justify-content:center;top:0px;right:0px;bottom:0px;left:0px;background-color:rgba(var(--v-bg-backdrop-loading, 255, 255, 255, 0.5))}:host(.absolute-wrapper){position:absolute}:host(.fixed-wrapper){width:100%;height:100%;position:fixed}";const j=[{payloadKey:"MODE_IS_INDETERMINATE",payloadDescription:"Specifies the mode of the loading indicator",payloadValue:e=>"indeterminate"===e.mode},{payloadKey:"MODE_IS_DETERMINATE",payloadDescription:"Specifies the mode of the loading indicator",payloadValue:e=>"determinate"===e.mode}];var k=function(e,t,i,a){var r,o=arguments.length,s=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,a);else for(var n=e.length-1;n>=0;n--)(r=e[n])&&(s=(o<3?r(s):o>3?r(t,i,s):r(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s};const w=class{constructor(i){e(this,i),this.globalSlimmers={},this.pageResizeObserverSlimmer=new m,this.vegaComponentUsageRuntimeMetricsSlimmer=new l(j),this.currentBreakpoint=f(),this.shape="circle",this.size="default",this.mode="indeterminate",this.percent=0,this.label="",this.hint="",this.status="default",this.renderCircleLoader=()=>{const e=this.getCircleLoaderRadius(this.getResponsiveSize()),i="indeterminate"===this.mode?.75:this.percent/100,a=2*Math.PI*e,r="error"===this.status?a:a*i;return t("svg",{class:"circle-loader"},t("circle",{r:e,class:"circle-loader-track",part:"circle-loader-track"}),t("circle",{r:e,class:"circle-loader-progress",part:"circle-loader-progress","stroke-linecap":"indeterminate"===this.mode?"round":"butt","stroke-dasharray":[r,a].join(" ")}),"determinate"===this.mode&&t("circle",{r:e,class:g(["circle-loader-progress-pointer",0===i&&"v-hidden"].filter(Boolean)),"stroke-dashoffset":-r,"stroke-dasharray":[0,a].join(" ")}))},this.renderBarLoader=()=>{let e=75;return"determinate"===this.mode&&(e="error"===this.status?100:this.percent),t("div",{class:"bar-loader-track"},t("div",{class:g(["bar-loader",this.getResponsiveSize()]),style:{width:`${e}%`}}))},this.renderLabelAndHint=()=>{if(this.label||this.hint)return t("vega-flex",{direction:"col",gap:"size-4",alignItems:"center"},this.label&&t("span",{class:"vega-loading-indicator-label"},this.label),this.hint&&t("span",{class:"vega-loading-indicator-hint"},this.hint))},this.getResponsiveSize=()=>h.formatCustom(this.size),this.getCircleLoaderRadius=e=>{switch(e){case"micro":return 6.5;case"small":return 10;case"large":return 52;default:return 20}}}render(){const e=g([this.getResponsiveSize(),this.mode,`status-${this.status}`,this.shape].map((e=>`vega-loading-indicator-${e}`)));return p(t(i,{class:e},t("vega-flex",{direction:"col",gap:"size-16",alignItems:"center"},"circle"===this.shape?this.renderCircleLoader():this.renderBarLoader(),this.renderLabelAndHint())),this.host)}get host(){return a(this)}};k([d()],w.prototype,"globalSlimmers",void 0),k([n()],w.prototype,"pageResizeObserverSlimmer",void 0),k([n()],w.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),w.style=':host{display:inline-block}:host(.vega-loading-indicator-bar){width:100%}:host(.vega-loading-indicator-indeterminate) .circle-loader{animation:circle-loader-animation 2000ms linear infinite;transform:rotate(-90deg)}:host(.vega-loading-indicator-determinate) .circle-loader{transform:rotate(-180deg)}:host(.vega-loading-indicator-default) .circle-loader{width:48px;height:48px}:host(.vega-loading-indicator-micro) .circle-loader{width:16px;height:16px}:host(.vega-loading-indicator-small) .circle-loader{width:24px;height:24px}:host(.vega-loading-indicator-large) .circle-loader{width:120px;height:120px}:host .circle-loader-track{stroke:rgba(var(--v-bg-loading-track, 229, 239, 255, 1));fill:none;cy:50%;cx:50%}:host .circle-loader-progress-pointer.v-hidden{display:none}:host .circle-loader-progress-pointer,:host .circle-loader-progress{stroke:rgba(var(--v-bg-loading-progress, 153, 192, 255, 1));fill:none;cy:50%;cx:50%}:host(.vega-loading-indicator-status-success) .circle-loader-progress-pointer,:host(.vega-loading-indicator-status-success) .circle-loader-progress{stroke:rgba(var(--v-bg-status-success, 160, 233, 167, 1))}:host(.vega-loading-indicator-status-error) .circle-loader-progress-pointer,:host(.vega-loading-indicator-status-error) .circle-loader-progress{stroke:rgba(var(--v-bg-status-error, 255, 110, 139, 1))}:host(.vega-loading-indicator-default) .circle-loader-progress-pointer,:host(.vega-loading-indicator-default) .circle-loader-track,:host(.vega-loading-indicator-default) .circle-loader-progress{stroke-width:8px}:host .circle-loader-progress-pointer{stroke-linecap:round}:host(.vega-loading-indicator-micro) .circle-loader-progress-pointer,:host(.vega-loading-indicator-micro) .circle-loader-track,:host(.vega-loading-indicator-micro) .circle-loader-progress{stroke-width:3px}:host(.vega-loading-indicator-small) .circle-loader-progress-pointer,:host(.vega-loading-indicator-small) .circle-loader-track,:host(.vega-loading-indicator-small) .circle-loader-progress{stroke-width:4px}:host(.vega-loading-indicator-large) .circle-loader-progress-pointer,:host(.vega-loading-indicator-large) .circle-loader-track,:host(.vega-loading-indicator-large) .circle-loader-progress{stroke-width:16px}@keyframes circle-loader-animation{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}:host .bar-loader{border-radius:9999px;position:absolute;box-sizing:border-box;height:8px;background-color:rgba(var(--v-bg-loading-progress, 153, 192, 255, 1));content:"";width:75%;top:0;left:0}:host(.vega-loading-indicator-status-success) .bar-loader{background-color:rgba(var(--v-bg-status-success, 160, 233, 167, 1))}:host(.vega-loading-indicator-status-error) .bar-loader{background-color:rgba(var(--v-bg-status-error, 255, 110, 139, 1))}:host(.vega-loading-indicator-micro) .bar-loader,:host(.vega-loading-indicator-micro) .bar-loader-track{height:3px}:host(.vega-loading-indicator-small) .bar-loader,:host(.vega-loading-indicator-small) .bar-loader-track{height:4px}:host(.vega-loading-indicator-large) .bar-loader,:host(.vega-loading-indicator-large) .bar-loader-track{height:16px}:host(.vega-loading-indicator-indeterminate) .bar-loader{animation:bar-loader-animation 1250ms cubic-bezier(0.75, 0, 0.5, 1) infinite;animation-delay:50ms}@keyframes bar-loader-animation{0%{left:0;transform:translateX(-100%)}100%{left:100%;transform:translateX(0%)}}:host .bar-loader-track{display:inline-block;border-radius:9999px;position:relative;overflow:hidden;height:8px;width:100%;background-color:rgba(var(--v-bg-loading-track, 229, 239, 255, 1))}:host .vega-loading-indicator-label{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:25px;letter-spacing:0px;color:rgba(var(--v-text-primary, 32, 54, 69, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-loading-indicator-label{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:25px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-loading-indicator-label{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:25px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-loading-indicator-label{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:25px;letter-spacing:0px}}:host .vega-loading-indicator-hint{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;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-loading-indicator-hint{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-loading-indicator-hint{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-loading-indicator-hint{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}';export{u as vega_loader_wrapper,w as vega_loading_indicator}
1
+ import{r as e,h as t,H as i,g as a}from"./p-21d26bb4.js";import{c as r,M as o,V as s,I as n}from"./p-6e1ab235.js";import{V as l,I as d}from"./p-d849e0f5.js";import{I as c}from"./p-bcdb235d.js";import{s as p}from"./p-519a7d55.js";import{a as g}from"./p-d5776087.js";import{R as h}from"./p-4a237308.js";import{P as m,g as f}from"./p-7d9cd9c8.js";import"./p-a4670e23.js";import"./p-6a334573.js";import"./p-0c8bd757.js";import"./p-5773a9a3.js";import"./p-2d0d575f.js";import"./p-331a62d5.js";import"./p-112455b1.js";import"./p-613ee009.js";import"./p-6e01f0a2.js";import"./p-262ec334.js";import"./p-5e2c9e69.js";import"./p-ed45b3b6.js";import"./p-74168615.js";import"./p-3a0a4d15.js";import"./p-d884c644.js";import"./p-0c667d6a.js";import"./p-d27ae9ff.js";import"./p-5f377954.js";import"./p-e77a83e4.js";import"./p-db8cdba6.js";import"./p-8c46e116.js";import"./p-5d676a94.js";import"./p-9d6003ef.js";import"./p-88e08a33.js";import"./p-d7e0c57a.js";import"./p-f5ac60f5.js";import"./p-b75ee3ba.js";var v=function(e,t,i,a){var r,o=arguments.length,s=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,a);else for(var n=e.length-1;n>=0;n--)(r=e[n])&&(s=(o<3?r(s):o>3?r(t,i,s):r(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s};class b extends s{connectedCallback(){this.setIndex()}disconnectedCallback(){this.removeIndex()}setIndex(){const e=document.querySelector(this.host.dataset.container);e&&"BODY"===e.tagName&&c.setZIndex(this.host,"base")}removeIndex(){c.removeZIndex(this.host,"base")}}v([r()],b.prototype,"host",void 0),v([o("connectedCallback")],b.prototype,"connectedCallback",null),v([o("disconnectedCallback")],b.prototype,"disconnectedCallback",null);var x=function(e,t,i,a){var r,o=arguments.length,s=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,a);else for(var n=e.length-1;n>=0;n--)(r=e[n])&&(s=(o<3?r(s):o>3?r(t,i,s):r(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s};const u=class{constructor(t){e(this,t),this.globalSlimmers={},this.manageVegaLoaderWrapperZIndexController=new b,this.vegaComponentUsageRuntimeMetricsSlimmer=new l}render(){return t(i,{class:"vega-loader-wrapper"},t("slot",null))}get host(){return a(this)}};x([d()],u.prototype,"globalSlimmers",void 0),x([n()],u.prototype,"manageVegaLoaderWrapperZIndexController",void 0),x([n()],u.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),u.style=":host{display:block;display:inline-flex;align-items:center;justify-content:center;top:0px;right:0px;bottom:0px;left:0px;background-color:rgba(var(--v-bg-backdrop-loading, 255, 255, 255, 0.5))}:host(.absolute-wrapper){position:absolute}:host(.fixed-wrapper){width:100%;height:100%;position:fixed}";const j=[{payloadKey:"MODE_IS_INDETERMINATE",payloadDescription:"Specifies the mode of the loading indicator",payloadValue:e=>"indeterminate"===e.mode},{payloadKey:"MODE_IS_DETERMINATE",payloadDescription:"Specifies the mode of the loading indicator",payloadValue:e=>"determinate"===e.mode}];var k=function(e,t,i,a){var r,o=arguments.length,s=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,a);else for(var n=e.length-1;n>=0;n--)(r=e[n])&&(s=(o<3?r(s):o>3?r(t,i,s):r(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s};const w=class{constructor(i){e(this,i),this.globalSlimmers={},this.pageResizeObserverSlimmer=new m,this.vegaComponentUsageRuntimeMetricsSlimmer=new l(j),this.currentBreakpoint=f(),this.shape="circle",this.size="default",this.mode="indeterminate",this.percent=0,this.label="",this.hint="",this.status="default",this.renderCircleLoader=()=>{const e=this.getCircleLoaderRadius(this.getResponsiveSize()),i="indeterminate"===this.mode?.75:this.percent/100,a=2*Math.PI*e,r="error"===this.status?a:a*i;return t("svg",{class:"circle-loader"},t("circle",{r:e,class:"circle-loader-track",part:"circle-loader-track"}),t("circle",{r:e,class:"circle-loader-progress",part:"circle-loader-progress","stroke-linecap":"indeterminate"===this.mode?"round":"butt","stroke-dasharray":[r,a].join(" ")}),"determinate"===this.mode&&t("circle",{r:e,class:g(["circle-loader-progress-pointer",0===i&&"v-hidden"].filter(Boolean)),"stroke-dashoffset":-r,"stroke-dasharray":[0,a].join(" ")}))},this.renderBarLoader=()=>{let e=75;return"determinate"===this.mode&&(e="error"===this.status?100:this.percent),t("div",{class:"bar-loader-track"},t("div",{class:g(["bar-loader",this.getResponsiveSize()]),style:{width:`${e}%`}}))},this.renderLabelAndHint=()=>{if(this.label||this.hint)return t("vega-flex",{direction:"col",gap:"size-4",alignItems:"center"},this.label&&t("span",{class:"vega-loading-indicator-label"},this.label),this.hint&&t("span",{class:"vega-loading-indicator-hint"},this.hint))},this.getResponsiveSize=()=>h.formatCustom(this.size),this.getCircleLoaderRadius=e=>{switch(e){case"micro":return 6.5;case"small":return 10;case"large":return 52;default:return 20}}}render(){const e=g([this.getResponsiveSize(),this.mode,`status-${this.status}`,this.shape].map((e=>`vega-loading-indicator-${e}`)));return p(t(i,{class:e},t("vega-flex",{direction:"col",gap:"size-16",alignItems:"center"},"circle"===this.shape?this.renderCircleLoader():this.renderBarLoader(),this.renderLabelAndHint())),this.host)}get host(){return a(this)}};k([d()],w.prototype,"globalSlimmers",void 0),k([n()],w.prototype,"pageResizeObserverSlimmer",void 0),k([n()],w.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),w.style=':host{display:inline-block}:host(.vega-loading-indicator-bar){width:100%}:host(.vega-loading-indicator-indeterminate) .circle-loader{animation:circle-loader-animation 2000ms linear infinite;transform:rotate(-90deg)}:host(.vega-loading-indicator-determinate) .circle-loader{transform:rotate(-180deg)}:host(.vega-loading-indicator-default) .circle-loader{width:48px;height:48px}:host(.vega-loading-indicator-micro) .circle-loader{width:16px;height:16px}:host(.vega-loading-indicator-small) .circle-loader{width:24px;height:24px}:host(.vega-loading-indicator-large) .circle-loader{width:120px;height:120px}:host .circle-loader-track{stroke:rgba(var(--v-bg-loading-track, 229, 239, 255, 1));fill:none;cy:50%;cx:50%}:host .circle-loader-progress-pointer.v-hidden{display:none}:host .circle-loader-progress-pointer,:host .circle-loader-progress{stroke:rgba(var(--v-bg-loading-progress, 153, 192, 255, 1));fill:none;cy:50%;cx:50%}:host(.vega-loading-indicator-status-success) .circle-loader-progress-pointer,:host(.vega-loading-indicator-status-success) .circle-loader-progress{stroke:rgba(var(--v-bg-status-success, 160, 233, 167, 1))}:host(.vega-loading-indicator-status-error) .circle-loader-progress-pointer,:host(.vega-loading-indicator-status-error) .circle-loader-progress{stroke:rgba(var(--v-bg-status-error, 255, 110, 139, 1))}:host(.vega-loading-indicator-default) .circle-loader-progress-pointer,:host(.vega-loading-indicator-default) .circle-loader-track,:host(.vega-loading-indicator-default) .circle-loader-progress{stroke-width:8px}:host .circle-loader-progress-pointer{stroke-linecap:round}:host(.vega-loading-indicator-micro) .circle-loader-progress-pointer,:host(.vega-loading-indicator-micro) .circle-loader-track,:host(.vega-loading-indicator-micro) .circle-loader-progress{stroke-width:3px}:host(.vega-loading-indicator-small) .circle-loader-progress-pointer,:host(.vega-loading-indicator-small) .circle-loader-track,:host(.vega-loading-indicator-small) .circle-loader-progress{stroke-width:4px}:host(.vega-loading-indicator-large) .circle-loader-progress-pointer,:host(.vega-loading-indicator-large) .circle-loader-track,:host(.vega-loading-indicator-large) .circle-loader-progress{stroke-width:16px}@keyframes circle-loader-animation{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}:host .bar-loader{border-radius:9999px;position:absolute;box-sizing:border-box;height:8px;background-color:rgba(var(--v-bg-loading-progress, 153, 192, 255, 1));content:"";width:75%;top:0;left:0}:host(.vega-loading-indicator-status-success) .bar-loader{background-color:rgba(var(--v-bg-status-success, 160, 233, 167, 1))}:host(.vega-loading-indicator-status-error) .bar-loader{background-color:rgba(var(--v-bg-status-error, 255, 110, 139, 1))}:host(.vega-loading-indicator-micro) .bar-loader,:host(.vega-loading-indicator-micro) .bar-loader-track{height:3px}:host(.vega-loading-indicator-small) .bar-loader,:host(.vega-loading-indicator-small) .bar-loader-track{height:4px}:host(.vega-loading-indicator-large) .bar-loader,:host(.vega-loading-indicator-large) .bar-loader-track{height:16px}:host(.vega-loading-indicator-indeterminate) .bar-loader{animation:bar-loader-animation 1250ms cubic-bezier(0.75, 0, 0.5, 1) infinite;animation-delay:50ms}@keyframes bar-loader-animation{0%{left:0;transform:translateX(-100%)}100%{left:100%;transform:translateX(0%)}}:host .bar-loader-track{display:inline-block;border-radius:9999px;position:relative;overflow:hidden;height:8px;width:100%;background-color:rgba(var(--v-bg-loading-track, 229, 239, 255, 1))}:host .vega-loading-indicator-label{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:25px;letter-spacing:0px;color:rgba(var(--v-text-primary, 32, 54, 69, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-loading-indicator-label{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:25px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-loading-indicator-label{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:25px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-loading-indicator-label{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:25px;letter-spacing:0px}}:host .vega-loading-indicator-hint{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;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-loading-indicator-hint{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-loading-indicator-hint{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-loading-indicator-hint{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}';export{u as vega_loader_wrapper,w as vega_loading_indicator}