@globalpayments/vega 2.38.0 → 2.40.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (435) hide show
  1. package/dist/cjs/{app-globals-7087f121.js → app-globals-cdd0972c.js} +14 -4
  2. package/dist/cjs/check-box-required-rule-1ee54b9a.js +70 -0
  3. package/dist/cjs/content-state-c5b47ca1.js +6644 -0
  4. package/dist/cjs/date-required-rule-4e1f84fd.js +92 -0
  5. package/dist/cjs/{element-appender-slimmer-c6e0f4ca.js → element-appender-slimmer-4f0dc8c6.js} +9 -5
  6. package/dist/cjs/file-uploader-required-rule-313ec9e3.js +21 -0
  7. package/dist/cjs/{form-field-controller-slimmer-48c0ad0b.js → form-field-controller-slimmer-d92e8212.js} +28 -1
  8. package/dist/cjs/{image-annotation-action-7d82f7e1.js → image-annotation-action-75b9c0d3.js} +5 -6
  9. package/dist/cjs/index.cjs.js +35 -15
  10. package/dist/cjs/input-phone-number-required-rule-2668fdf1.js +65 -0
  11. package/dist/cjs/input-range-required-rule-5b9c2a95.js +63 -0
  12. package/dist/cjs/internal-form-field-validation-rule.abstract-07cdff46.js +15 -0
  13. package/dist/cjs/loader.cjs.js +10 -10
  14. package/dist/cjs/{min-number-rule-115c5a3b.js → min-number-rule-5bcccc8f.js} +7 -4
  15. package/dist/cjs/{min-string-length-rule-75f24a48.js → min-string-length-rule-af215976.js} +8 -4
  16. package/dist/cjs/public-rules-90b972e5.js +42 -0
  17. package/dist/cjs/{required-field-rule-7f9945fa.js → required-field-rule-d73c1d8c.js} +6 -3
  18. package/dist/cjs/rich-text-editor-required-rule-cacc5fe0.js +64 -0
  19. package/dist/cjs/time-required-rule-ccf178e7.js +141 -0
  20. package/dist/cjs/toggle-switch-required-rule-88a51b36.js +66 -0
  21. package/dist/cjs/{valid-credit-card-number-rule-4a9ae5d9.js → valid-credit-card-number-rule-4a1b00b8.js} +3 -2
  22. package/dist/cjs/vega-checkbox_2.cjs.entry.js +11 -79
  23. package/dist/cjs/vega-color-picker.cjs.entry.js +3 -2
  24. package/dist/cjs/vega-combo-box.cjs.entry.js +3 -2
  25. package/dist/cjs/vega-date-picker_2.cjs.entry.js +9 -91
  26. package/dist/cjs/vega-dialog_2.cjs.entry.js +29 -1
  27. package/dist/cjs/vega-dropdown_5.cjs.entry.js +1 -1
  28. package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
  29. package/dist/cjs/vega-file-uploader.cjs.entry.js +5 -19
  30. package/dist/cjs/vega-form.cjs.entry.js +2 -1
  31. package/dist/cjs/vega-image-uploader.cjs.entry.js +3 -2
  32. package/dist/cjs/vega-input-credit-card.cjs.entry.js +4 -3
  33. package/dist/cjs/vega-input-numeric.cjs.entry.js +3 -2
  34. package/dist/cjs/vega-input-phone-number.cjs.entry.js +38 -70
  35. package/dist/cjs/vega-input-range.cjs.entry.js +6 -61
  36. package/dist/cjs/vega-input-select.cjs.entry.js +3 -2
  37. package/dist/cjs/vega-input.cjs.entry.js +7 -6
  38. package/dist/cjs/vega-popover_2.cjs.entry.js +15 -1
  39. package/dist/cjs/vega-radio_2.cjs.entry.js +3 -2
  40. package/dist/cjs/vega-rich-text-content.cjs.entry.js +18 -19
  41. package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +79 -139
  42. package/dist/cjs/vega-selection-chip_2.cjs.entry.js +3 -2
  43. package/dist/cjs/vega-selection-tile_2.cjs.entry.js +3 -2
  44. package/dist/cjs/vega-signature-capture.cjs.entry.js +3 -2
  45. package/dist/cjs/vega-stepper.cjs.entry.js +3 -2
  46. package/dist/cjs/vega-textarea.cjs.entry.js +4 -3
  47. package/dist/cjs/vega-time-picker_2.cjs.entry.js +11 -140
  48. package/dist/cjs/vega-toggle-switch.cjs.entry.js +4 -63
  49. package/dist/cjs/vega-tooltip_2.cjs.entry.js +53 -12
  50. package/dist/cjs/vega.cjs.js +10 -10
  51. package/dist/collection/components/vega-checkbox/vega-checkbox.css +82 -33
  52. package/dist/collection/components/vega-checkbox/vega-checkbox.js +8 -13
  53. package/dist/collection/components/vega-file-uploader/vega-file-uploader.js +2 -2
  54. package/dist/collection/components/vega-input-phone-number/slimmers/controllers/vega-input-phone-number-value-controller.js +18 -2
  55. package/dist/collection/components/vega-input-phone-number/vega-input-phone-number.js +7 -4
  56. package/dist/collection/components/vega-modal/slimmers/controllers/vega-modal-layout-controller.js +9 -0
  57. package/dist/collection/components/vega-modal/slimmers/controllers/vega-modal-scroll-controller.js +16 -0
  58. package/dist/collection/components/vega-modal/vega-modal.js +6 -0
  59. package/dist/collection/components/vega-popover/slimmers/controllers/vega-popover-appender-controller.js +4 -0
  60. package/dist/collection/components/vega-popover/vega-popover.js +37 -0
  61. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/action-handle-strategy-registry.js +52 -0
  62. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/action-handle-strategy.abstract.js +63 -0
  63. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/apply-annotation-strategies/block-update-link-group-strategy.js +21 -0
  64. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/apply-annotation-strategies/block-update-text-style-strategy.js +32 -0
  65. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/apply-annotation-strategies/image-set-annotation-map-strategy.js +13 -0
  66. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/apply-annotation-strategies/node-split-text-strategy.js +134 -0
  67. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/apply-annotation-strategies/node-update-annotation-map-strategy.js +47 -0
  68. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-append-blocks-strategy.js +19 -0
  69. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-append-nodes-strategy.js +21 -0
  70. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-delete-image-strategy.js +54 -0
  71. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-delete-node-content-strategy.js +152 -0
  72. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-delete-text-content-strategy.js +99 -0
  73. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-blocks-after-strategy.js +15 -0
  74. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-blocks-before-strategy.js +38 -0
  75. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-image-into-text-strategy.js +31 -0
  76. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-line-break-strategy.js +57 -0
  77. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-line-break-with-blocks-strategy.js +60 -0
  78. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-new-paragraph-strategy.js +55 -0
  79. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-nodes-after-node-strategy.js +14 -0
  80. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-nodes-before-node-strategy.js +14 -0
  81. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-merge-nodes-strategy.js +25 -0
  82. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-remove-child-block-strategy.js +15 -0
  83. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-remove-node-strategy.js +21 -0
  84. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-replace-node-with-nodes-strategy.js +28 -0
  85. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-replace-nodes-strategy.js +17 -0
  86. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-split-with-image-node-strategy.js +48 -0
  87. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-split-with-text-node-strategy.js +43 -0
  88. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-transform-to-list-strategy.js +26 -0
  89. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/image-block-insert-image-strategy.js +32 -0
  90. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/image-insert-line-break-strategy.js +21 -0
  91. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/image-insert-line-break-with-blocks-strategy.js +55 -0
  92. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/image-insert-new-paragraph-strategy.js +44 -0
  93. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/image-update-url-strategy.js +12 -0
  94. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-insert-image-strategy.js +22 -0
  95. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-delete-text-content-strategy.js +20 -0
  96. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-insert-image-strategy.js +15 -0
  97. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-insert-new-paragraph-strategy.js +92 -0
  98. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-remove-nest-list-strategy.js +22 -0
  99. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-remove-node-strategy.js +19 -0
  100. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-replace-nest-list-strategy.js +15 -0
  101. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-remove-list-item-strategy.js +27 -0
  102. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-transform-to-list-strategy.js +36 -0
  103. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-transform-to-paragraph-strategy.js +63 -0
  104. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/node-replace-selected-text-strategy.js +46 -0
  105. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/node-update-text-strategy.js +20 -0
  106. package/dist/collection/components/vega-rich-text-editor/dto/actions/image-update-url-action.js +13 -0
  107. package/dist/collection/components/vega-rich-text-editor/dto/actions/modify-content-action.abstract.js +1 -1
  108. package/dist/collection/components/vega-rich-text-editor/dto/blocks/block.abstract.js +3 -215
  109. package/dist/collection/components/vega-rich-text-editor/dto/blocks/image-block.js +31 -244
  110. package/dist/collection/components/vega-rich-text-editor/dto/blocks/list-block.js +17 -155
  111. package/dist/collection/components/vega-rich-text-editor/dto/blocks/list-item-block.js +33 -184
  112. package/dist/collection/components/vega-rich-text-editor/dto/blocks/text-block.js +40 -352
  113. package/dist/collection/components/vega-rich-text-editor/dto/content-state.js +13 -23
  114. package/dist/collection/components/vega-rich-text-editor/dto/nodes/image-node.js +14 -6
  115. package/dist/collection/components/vega-rich-text-editor/dto/nodes/text-node.js +23 -182
  116. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/image-toolbar-button-slimmer.js +2 -1
  117. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/action-handle-strategy-registry.test.js +41 -0
  118. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/block-insert-line-break-with-blocks-strategy.test.js +24 -0
  119. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/content-state-strategy-registry.test.js +14 -0
  120. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/image-block-strategy-register.test.js +30 -0
  121. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/image-set-annotation-map-strategy.test.js +11 -0
  122. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/image-update-url-strategy.test.js +16 -0
  123. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/list-block-strategy-register.test.js +20 -0
  124. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/list-item-strategy-register.test.js +31 -0
  125. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/node-split-text-strategy.test.js +31 -0
  126. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/node-update-annotation-map-strategy.test.js +17 -0
  127. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/text-block-strategy-register.test.js +55 -0
  128. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/update-selected-text-strategy.test.js +23 -0
  129. package/dist/collection/components/vega-rich-text-editor/vega-rich-text-editor.js +2 -2
  130. package/dist/collection/components/vega-tooltip/slimmers/controllers/vega-tooltip-element-appender-controller.js +45 -11
  131. package/dist/collection/components/vega-tooltip/vega-tooltip.js +12 -0
  132. package/dist/collection/global/scripts/before-vega-load.js +11 -0
  133. package/dist/collection/helpers/slimmers/element-appender-slimmer.js +8 -5
  134. package/dist/collection/helpers/slimmers/test/element-appender-slimmer.test.js +2 -0
  135. package/dist/collection/helpers/ui/element-appender.js +1 -0
  136. package/dist/collection/helpers/ui/test/element-appender.test.js +1 -0
  137. package/dist/collection/helpers/validator/form-field-controller.js +28 -1
  138. package/dist/collection/helpers/validator/public-rules.js +10 -0
  139. package/dist/collection/helpers/validator/rules/check-box-required-rule.js +4 -3
  140. package/dist/collection/helpers/validator/rules/date-range-rule.js +2 -1
  141. package/dist/collection/helpers/validator/rules/date-required-rule.js +5 -3
  142. package/dist/collection/helpers/validator/rules/email-field-rule.js +3 -2
  143. package/dist/collection/helpers/validator/rules/{object-array-required-rule.js → file-uploader-required-rule.js} +1 -1
  144. package/dist/collection/helpers/validator/rules/input-phone-number-required-rule.js +5 -3
  145. package/dist/collection/helpers/validator/rules/input-range-min-and-max-rule.js +3 -1
  146. package/dist/collection/helpers/validator/rules/input-range-required-rule.js +5 -4
  147. package/dist/collection/helpers/validator/rules/internal-form-field-validation-rule.abstract.js +11 -0
  148. package/dist/collection/helpers/validator/rules/max-number-rule.js +4 -2
  149. package/dist/collection/helpers/validator/rules/max-string-length-rule.js +4 -2
  150. package/dist/collection/helpers/validator/rules/min-and-max-date-rule.js +3 -1
  151. package/dist/collection/helpers/validator/rules/min-number-rule.js +4 -2
  152. package/dist/collection/helpers/validator/rules/min-string-length-rule.js +4 -2
  153. package/dist/collection/helpers/validator/rules/required-field-rule.js +5 -3
  154. package/dist/collection/helpers/validator/rules/rich-text-editor-required-rule.js +4 -3
  155. package/dist/collection/helpers/validator/rules/time-range-required-rule.js +5 -3
  156. package/dist/collection/helpers/validator/rules/time-range-rule.js +3 -1
  157. package/dist/collection/helpers/validator/rules/time-required-rule.js +5 -3
  158. package/dist/collection/helpers/validator/rules/toggle-switch-required-rule.js +4 -3
  159. package/dist/collection/helpers/validator/rules/valid-credit-card-number-rule.js +3 -2
  160. package/dist/collection/helpers/validator/rules/valid-phone-number-rule.js +11 -4
  161. package/dist/collection/helpers/validator/test/rules/file-uploader-required-rule.test.js +7 -0
  162. package/dist/collection/helpers/validator/test/rules/public-rules.test.js +80 -0
  163. package/dist/collection/helpers/validator/test/rules/valid-phone-number-rule.test.js +8 -0
  164. package/dist/collection/index.js +1 -0
  165. package/dist/esm/{app-globals-4cca4a96.js → app-globals-88fa3549.js} +14 -4
  166. package/dist/esm/check-box-required-rule-cb0aa339.js +68 -0
  167. package/dist/esm/content-state-2edba4ec.js +6600 -0
  168. package/dist/esm/{date-732bc749.js → date-c55b97f0.js} +1 -1
  169. package/dist/esm/date-required-rule-8944f3bf.js +90 -0
  170. package/dist/esm/{element-appender-slimmer-f5e703f3.js → element-appender-slimmer-d9155ee0.js} +9 -5
  171. package/dist/esm/file-uploader-required-rule-ad886d01.js +19 -0
  172. package/dist/esm/{form-field-controller-slimmer-3535e76a.js → form-field-controller-slimmer-bb64dec7.js} +29 -2
  173. package/dist/esm/{image-annotation-action-3da42221.js → image-annotation-action-b6668f48.js} +1 -2
  174. package/dist/esm/{index-6e05b241.js → index-d172bafa.js} +1 -1
  175. package/dist/esm/index.js +17 -7
  176. package/dist/esm/input-phone-number-required-rule-be6a5572.js +63 -0
  177. package/dist/esm/input-range-required-rule-3ad74776.js +61 -0
  178. package/dist/esm/internal-form-field-validation-rule.abstract-f5b6bdbf.js +13 -0
  179. package/dist/esm/loader.js +11 -11
  180. package/dist/esm/{min-number-rule-31d48b22.js → min-number-rule-a6082418.js} +7 -4
  181. package/dist/esm/{min-string-length-rule-c6a69eeb.js → min-string-length-rule-c31c89f4.js} +8 -4
  182. package/dist/esm/public-rules-413f6a17.js +27 -0
  183. package/dist/esm/{required-field-rule-368b31fa.js → required-field-rule-ab4bdc47.js} +6 -3
  184. package/dist/esm/rich-text-editor-required-rule-75cc2db0.js +62 -0
  185. package/dist/esm/{string-input-formatter-slimmer-d4132497.js → string-input-formatter-slimmer-418b54f0.js} +2 -2
  186. package/dist/esm/{sub-state-notify-slimmer-51151fc3.js → sub-state-notify-slimmer-b36fd081.js} +1 -1
  187. package/dist/esm/{sub-state-observer-slimmer-d77a1c46.js → sub-state-observer-slimmer-09452523.js} +1 -1
  188. package/dist/esm/time-required-rule-a01163b5.js +138 -0
  189. package/dist/esm/toggle-switch-required-rule-b3cf4302.js +64 -0
  190. package/dist/esm/{valid-credit-card-number-rule-2aef3ad5.js → valid-credit-card-number-rule-cc497bec.js} +3 -2
  191. package/dist/esm/vega-button-group_2.entry.js +3 -3
  192. package/dist/esm/vega-calendar_3.entry.js +4 -4
  193. package/dist/esm/vega-checkbox_2.entry.js +12 -80
  194. package/dist/esm/vega-color-picker.entry.js +4 -3
  195. package/dist/esm/vega-combo-box.entry.js +4 -3
  196. package/dist/esm/vega-date-picker_2.entry.js +12 -94
  197. package/dist/esm/vega-dialog_2.entry.js +29 -1
  198. package/dist/esm/vega-dropdown_5.entry.js +4 -4
  199. package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
  200. package/dist/esm/vega-file-uploader.entry.js +6 -20
  201. package/dist/esm/vega-form.entry.js +3 -2
  202. package/dist/esm/vega-image-uploader.entry.js +4 -3
  203. package/dist/esm/vega-input-credit-card.entry.js +5 -4
  204. package/dist/esm/vega-input-numeric.entry.js +5 -4
  205. package/dist/esm/vega-input-phone-number.entry.js +38 -70
  206. package/dist/esm/vega-input-range.entry.js +6 -61
  207. package/dist/esm/vega-input-select.entry.js +4 -3
  208. package/dist/esm/vega-input.entry.js +11 -10
  209. package/dist/esm/{vega-internal-event-id-d0690d0d.js → vega-internal-event-id-f269c42f.js} +1 -1
  210. package/dist/esm/vega-left-nav_5.entry.js +3 -3
  211. package/dist/esm/vega-popover_2.entry.js +16 -2
  212. package/dist/esm/vega-radio_2.entry.js +4 -3
  213. package/dist/esm/vega-rich-text-content.entry.js +6 -7
  214. package/dist/esm/vega-rich-text-editor_4.entry.js +23 -83
  215. package/dist/esm/vega-selection-chip_2.entry.js +6 -5
  216. package/dist/esm/vega-selection-tile_2.entry.js +6 -5
  217. package/dist/esm/vega-sidenav_3.entry.js +3 -3
  218. package/dist/esm/vega-signature-capture.entry.js +4 -3
  219. package/dist/esm/vega-stepper.entry.js +4 -3
  220. package/dist/esm/vega-table_8.entry.js +3 -3
  221. package/dist/esm/vega-textarea.entry.js +5 -4
  222. package/dist/esm/vega-time-picker_2.entry.js +8 -137
  223. package/dist/esm/vega-toggle-switch.entry.js +4 -63
  224. package/dist/esm/vega-tooltip_2.entry.js +53 -12
  225. package/dist/esm/vega.js +11 -11
  226. package/dist/types/components/vega-input-phone-number/slimmers/controllers/vega-input-phone-number-value-controller.d.ts +7 -0
  227. package/dist/types/components/vega-modal/slimmers/controllers/vega-modal-layout-controller.d.ts +4 -0
  228. package/dist/types/components/vega-modal/slimmers/controllers/vega-modal-scroll-controller.d.ts +5 -0
  229. package/dist/types/components/vega-modal/vega-modal.d.ts +1 -0
  230. package/dist/types/components/vega-popover/slimmers/controllers/vega-popover-appender-controller.d.ts +1 -0
  231. package/dist/types/components/vega-popover/vega-popover.d.ts +10 -0
  232. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/action-handle-strategy-registry.d.ts +37 -0
  233. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/action-handle-strategy.abstract.d.ts +66 -0
  234. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/apply-annotation-strategies/block-update-link-group-strategy.d.ts +15 -0
  235. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/apply-annotation-strategies/block-update-text-style-strategy.d.ts +15 -0
  236. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/apply-annotation-strategies/image-set-annotation-map-strategy.d.ts +13 -0
  237. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/apply-annotation-strategies/node-split-text-strategy.d.ts +47 -0
  238. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/apply-annotation-strategies/node-update-annotation-map-strategy.d.ts +15 -0
  239. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-append-blocks-strategy.d.ts +13 -0
  240. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-append-nodes-strategy.d.ts +16 -0
  241. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-delete-image-strategy.d.ts +19 -0
  242. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-delete-node-content-strategy.d.ts +61 -0
  243. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-delete-text-content-strategy.d.ts +19 -0
  244. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-blocks-after-strategy.d.ts +13 -0
  245. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-blocks-before-strategy.d.ts +23 -0
  246. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-image-into-text-strategy.d.ts +15 -0
  247. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-line-break-strategy.d.ts +30 -0
  248. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-line-break-with-blocks-strategy.d.ts +36 -0
  249. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-new-paragraph-strategy.d.ts +29 -0
  250. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-nodes-after-node-strategy.d.ts +13 -0
  251. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-nodes-before-node-strategy.d.ts +13 -0
  252. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-merge-nodes-strategy.d.ts +16 -0
  253. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-remove-child-block-strategy.d.ts +13 -0
  254. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-remove-node-strategy.d.ts +17 -0
  255. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-replace-node-with-nodes-strategy.d.ts +20 -0
  256. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-replace-nodes-strategy.d.ts +16 -0
  257. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-split-with-image-node-strategy.d.ts +30 -0
  258. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-split-with-text-node-strategy.d.ts +24 -0
  259. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-transform-to-list-strategy.d.ts +15 -0
  260. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/image-block-insert-image-strategy.d.ts +12 -0
  261. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/image-insert-line-break-strategy.d.ts +15 -0
  262. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/image-insert-line-break-with-blocks-strategy.d.ts +27 -0
  263. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/image-insert-new-paragraph-strategy.d.ts +21 -0
  264. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/image-update-url-strategy.d.ts +12 -0
  265. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-insert-image-strategy.d.ts +15 -0
  266. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-delete-text-content-strategy.d.ts +15 -0
  267. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-insert-image-strategy.d.ts +15 -0
  268. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-insert-new-paragraph-strategy.d.ts +38 -0
  269. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-remove-nest-list-strategy.d.ts +15 -0
  270. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-remove-node-strategy.d.ts +15 -0
  271. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-replace-nest-list-strategy.d.ts +12 -0
  272. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-remove-list-item-strategy.d.ts +15 -0
  273. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-transform-to-list-strategy.d.ts +12 -0
  274. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-transform-to-paragraph-strategy.d.ts +19 -0
  275. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/node-replace-selected-text-strategy.d.ts +20 -0
  276. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/node-update-text-strategy.d.ts +15 -0
  277. package/dist/types/components/vega-rich-text-editor/dto/actions/image-update-url-action.d.ts +11 -0
  278. package/dist/types/components/vega-rich-text-editor/dto/actions/modify-content-action.abstract.d.ts +2 -2
  279. package/dist/types/components/vega-rich-text-editor/dto/blocks/block.abstract.d.ts +1 -79
  280. package/dist/types/components/vega-rich-text-editor/dto/blocks/image-block.d.ts +3 -77
  281. package/dist/types/components/vega-rich-text-editor/dto/blocks/list-block.d.ts +0 -38
  282. package/dist/types/components/vega-rich-text-editor/dto/blocks/list-item-block.d.ts +3 -58
  283. package/dist/types/components/vega-rich-text-editor/dto/blocks/text-block.d.ts +5 -93
  284. package/dist/types/components/vega-rich-text-editor/dto/content-state.d.ts +1 -2
  285. package/dist/types/components/vega-rich-text-editor/dto/nodes/text-node.d.ts +0 -43
  286. package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/block-insert-line-break-with-blocks-strategy.test.d.ts +1 -0
  287. package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/content-state-strategy-registry.test.d.ts +1 -0
  288. package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/image-block-strategy-register.test.d.ts +1 -0
  289. package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/image-set-annotation-map-strategy.test.d.ts +1 -0
  290. package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/image-update-url-strategy.test.d.ts +1 -0
  291. package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/list-block-strategy-register.test.d.ts +1 -0
  292. package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/list-item-strategy-register.test.d.ts +1 -0
  293. package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/node-split-text-strategy.test.d.ts +1 -0
  294. package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/node-update-annotation-map-strategy.test.d.ts +1 -0
  295. package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/text-block-strategy-register.test.d.ts +1 -0
  296. package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/update-selected-text-strategy.test.d.ts +1 -0
  297. package/dist/types/components/vega-tooltip/slimmers/controllers/vega-tooltip-element-appender-controller.d.ts +18 -0
  298. package/dist/types/components/vega-tooltip/vega-tooltip.d.ts +4 -0
  299. package/dist/types/components.d.ts +14 -0
  300. package/dist/types/helpers/slimmers/element-appender-slimmer.d.ts +1 -0
  301. package/dist/types/helpers/slimmers/form-field-controller-slimmer.d.ts +2 -1
  302. package/dist/types/helpers/validator/form-field-controller.d.ts +10 -0
  303. package/dist/types/helpers/validator/public-rules.d.ts +10 -0
  304. package/dist/types/helpers/validator/rules/check-box-required-rule.d.ts +7 -6
  305. package/dist/types/helpers/validator/rules/date-range-rule.d.ts +3 -2
  306. package/dist/types/helpers/validator/rules/date-required-rule.d.ts +7 -6
  307. package/dist/types/helpers/validator/rules/email-field-rule.d.ts +4 -3
  308. package/dist/types/helpers/validator/rules/{object-array-required-rule.d.ts → file-uploader-required-rule.d.ts} +1 -1
  309. package/dist/types/helpers/validator/rules/input-phone-number-required-rule.d.ts +7 -6
  310. package/dist/types/helpers/validator/rules/input-range-min-and-max-rule.d.ts +3 -2
  311. package/dist/types/helpers/validator/rules/input-range-required-rule.d.ts +8 -7
  312. package/dist/types/helpers/validator/rules/internal-form-field-validation-rule.abstract.d.ts +19 -0
  313. package/dist/types/helpers/validator/rules/max-number-rule.d.ts +4 -3
  314. package/dist/types/helpers/validator/rules/max-string-length-rule.d.ts +4 -3
  315. package/dist/types/helpers/validator/rules/min-and-max-date-rule.d.ts +3 -2
  316. package/dist/types/helpers/validator/rules/min-number-rule.d.ts +4 -3
  317. package/dist/types/helpers/validator/rules/min-string-length-rule.d.ts +4 -3
  318. package/dist/types/helpers/validator/rules/required-field-rule.d.ts +7 -6
  319. package/dist/types/helpers/validator/rules/rich-text-editor-required-rule.d.ts +7 -6
  320. package/dist/types/helpers/validator/rules/time-range-required-rule.d.ts +7 -6
  321. package/dist/types/helpers/validator/rules/time-range-rule.d.ts +3 -2
  322. package/dist/types/helpers/validator/rules/time-required-rule.d.ts +7 -6
  323. package/dist/types/helpers/validator/rules/toggle-switch-required-rule.d.ts +5 -4
  324. package/dist/types/helpers/validator/rules/valid-credit-card-number-rule.d.ts +4 -3
  325. package/dist/types/helpers/validator/rules/valid-phone-number-rule.d.ts +7 -4
  326. package/dist/types/helpers/validator/test/rules/file-uploader-required-rule.test.d.ts +1 -0
  327. package/dist/types/helpers/validator/test/rules/public-rules.test.d.ts +1 -0
  328. package/dist/types/index.d.ts +1 -0
  329. package/dist/types/types/public-api.d.ts +1 -1
  330. package/dist/vega/index.esm.js +1 -1
  331. package/dist/vega/p-04c72f30.entry.js +1 -0
  332. package/dist/vega/{p-ba077ca8.entry.js → p-073beb31.entry.js} +1 -1
  333. package/dist/vega/p-07c2725a.js +1 -0
  334. package/dist/vega/{p-b5990090.js → p-08835909.js} +1 -1
  335. package/dist/vega/p-0b6d4561.entry.js +1 -0
  336. package/dist/vega/p-0bb860cc.js +1 -0
  337. package/dist/vega/p-0cc1ad76.js +1 -0
  338. package/dist/vega/p-113cd659.entry.js +1 -0
  339. package/dist/vega/{p-b9a0f136.entry.js → p-154d262e.entry.js} +1 -1
  340. package/dist/vega/p-17598aac.entry.js +1 -0
  341. package/dist/vega/p-23130825.entry.js +1 -0
  342. package/dist/vega/{p-29d6ec6c.js → p-239bae84.js} +1 -1
  343. package/dist/vega/{p-7198d675.entry.js → p-24ac5151.entry.js} +1 -1
  344. package/dist/vega/p-280cbcdb.js +1 -0
  345. package/dist/vega/p-3299c30b.entry.js +1 -0
  346. package/dist/vega/p-3fd9d39f.entry.js +1 -0
  347. package/dist/vega/p-42a949f5.entry.js +1 -0
  348. package/dist/vega/p-4bd1b877.entry.js +1 -0
  349. package/dist/vega/p-590fd123.js +1 -0
  350. package/dist/vega/p-5a7eabcc.js +1 -0
  351. package/dist/vega/p-5e56f3bd.js +1 -0
  352. package/dist/vega/p-5f377954.js +1 -1
  353. package/dist/vega/p-612c9374.entry.js +1 -0
  354. package/dist/vega/p-6408d3dc.entry.js +1 -0
  355. package/dist/vega/{p-a2a34239.entry.js → p-6585bddc.entry.js} +2 -2
  356. package/dist/vega/p-6603081a.entry.js +1 -0
  357. package/dist/vega/p-6e5db02b.js +1 -0
  358. package/dist/vega/p-6f90d444.js +1 -0
  359. package/dist/vega/p-7303fff2.entry.js +1 -0
  360. package/dist/vega/p-7b648a05.entry.js +1 -0
  361. package/dist/vega/p-7c0b4c36.js +1 -0
  362. package/dist/vega/p-81b21503.entry.js +1 -0
  363. package/dist/vega/p-8fae8f9e.js +1 -0
  364. package/dist/vega/p-924b4e24.js +1 -0
  365. package/dist/vega/{p-ee2e4bff.entry.js → p-94459733.entry.js} +1 -1
  366. package/dist/vega/p-a05ca459.entry.js +1 -0
  367. package/dist/vega/p-a3e80fb2.entry.js +1 -0
  368. package/dist/vega/p-a7a46358.entry.js +1 -0
  369. package/dist/vega/{p-34bd9204.js → p-a9e1123a.js} +1 -1
  370. package/dist/vega/p-abd7aeaa.js +1 -0
  371. package/dist/vega/{p-267cde46.entry.js → p-b071be5c.entry.js} +1 -1
  372. package/dist/vega/p-b24da503.entry.js +1 -0
  373. package/dist/vega/p-b44f3309.js +1 -0
  374. package/dist/vega/p-b9051ad2.js +1 -0
  375. package/dist/vega/{p-20326c64.js → p-bd0116f9.js} +1 -1
  376. package/dist/vega/{p-4ab0d645.js → p-c253d09c.js} +1 -1
  377. package/dist/vega/p-c56acdd5.entry.js +1 -0
  378. package/dist/vega/p-cdbbdcc2.js +1 -0
  379. package/dist/vega/p-d1a06058.entry.js +1 -0
  380. package/dist/vega/{p-348e95ba.js → p-d2ff56d8.js} +1 -1
  381. package/dist/vega/p-d51b04ce.entry.js +1 -0
  382. package/dist/vega/p-e0446879.js +1 -0
  383. package/dist/vega/p-e08b6542.entry.js +1 -0
  384. package/dist/vega/p-e0d3ca2d.js +1 -0
  385. package/dist/vega/{p-e9a5bd12.entry.js → p-f1ebe86b.entry.js} +1 -1
  386. package/dist/vega/p-f396c69a.js +1 -0
  387. package/dist/vega/p-fda6c178.entry.js +1 -0
  388. package/dist/vega/p-ffac4b8c.entry.js +1 -0
  389. package/dist/vega/vega.esm.js +1 -1
  390. package/package.json +1 -1
  391. package/dist/cjs/content-state-f97d3278.js +0 -2990
  392. package/dist/cjs/node-annotation.abstract-4f6df9cf.js +0 -3223
  393. package/dist/collection/components/vega-rich-text-editor/dto/actions/clear-child-nodes-action.js +0 -12
  394. package/dist/collection/components/vega-rich-text-editor/dto/helper/block-base-operator.js +0 -47
  395. package/dist/collection/helpers/validator/test/rules/object-array-required-rule.test.js +0 -7
  396. package/dist/esm/content-state-ccf5f960.js +0 -2954
  397. package/dist/esm/node-annotation.abstract-b2e36bc4.js +0 -3214
  398. package/dist/types/components/vega-rich-text-editor/dto/actions/clear-child-nodes-action.d.ts +0 -9
  399. package/dist/types/components/vega-rich-text-editor/dto/helper/block-base-operator.d.ts +0 -24
  400. package/dist/vega/p-0461e318.js +0 -1
  401. package/dist/vega/p-12fe63c1.entry.js +0 -1
  402. package/dist/vega/p-1b67c443.entry.js +0 -1
  403. package/dist/vega/p-1d93b3a9.js +0 -1
  404. package/dist/vega/p-23fd9401.entry.js +0 -1
  405. package/dist/vega/p-2fecbcf9.entry.js +0 -1
  406. package/dist/vega/p-3152031c.js +0 -1
  407. package/dist/vega/p-3cb90bdf.entry.js +0 -1
  408. package/dist/vega/p-3e8f9fcf.entry.js +0 -1
  409. package/dist/vega/p-497f2f86.entry.js +0 -1
  410. package/dist/vega/p-50eabdca.entry.js +0 -1
  411. package/dist/vega/p-52a8a4f8.js +0 -1
  412. package/dist/vega/p-6419e13e.entry.js +0 -1
  413. package/dist/vega/p-66b9e86d.entry.js +0 -1
  414. package/dist/vega/p-74958b1a.js +0 -1
  415. package/dist/vega/p-7baa4fae.entry.js +0 -1
  416. package/dist/vega/p-7edcb8d0.entry.js +0 -1
  417. package/dist/vega/p-904b489a.entry.js +0 -1
  418. package/dist/vega/p-9689ad99.entry.js +0 -1
  419. package/dist/vega/p-9728d571.entry.js +0 -1
  420. package/dist/vega/p-a7e078ac.entry.js +0 -1
  421. package/dist/vega/p-a7f40a65.entry.js +0 -1
  422. package/dist/vega/p-a8a809e1.entry.js +0 -1
  423. package/dist/vega/p-a8b16ff2.js +0 -1
  424. package/dist/vega/p-aed80794.entry.js +0 -1
  425. package/dist/vega/p-b517ed15.js +0 -1
  426. package/dist/vega/p-b809f3d7.entry.js +0 -1
  427. package/dist/vega/p-ba2833c0.entry.js +0 -1
  428. package/dist/vega/p-bf4996d5.entry.js +0 -1
  429. package/dist/vega/p-cb4fd6e1.entry.js +0 -1
  430. package/dist/vega/p-e9785742.entry.js +0 -1
  431. package/dist/vega/p-ecaf4cfa.entry.js +0 -1
  432. package/dist/vega/p-f41102cd.js +0 -1
  433. package/dist/vega/p-f5b0ce61.js +0 -1
  434. package/dist/vega/p-f86ec91b.js +0 -1
  435. /package/dist/types/{helpers/validator/test/rules/object-array-required-rule.test.d.ts → components/vega-rich-text-editor/test/dto/action-handle-strategies/action-handle-strategy-registry.test.d.ts} +0 -0
@@ -0,0 +1 @@
1
+ import{r as t,c as i,h as e,H as h,g as s}from"./p-1c298d5a.js";import{F as a}from"./p-ff4bafa3.js";import{V as l,M as r,A as o,D as c}from"./p-3a0a4d15.js";import{R as p}from"./p-280cbcdb.js";import{V as d}from"./p-6f90d444.js";import{s as n}from"./p-9b797118.js";import{I as v}from"./p-6e1ab235.js";import{V as m,I as f}from"./p-4387d550.js";import{F as u}from"./p-5e56f3bd.js";import{b as g}from"./p-5dce8dfe.js";import{C as _}from"./p-2d0d575f.js";import{c as A}from"./p-57669fd6.js";import{C as M}from"./p-ac608edc.js";import{D as E}from"./p-d7219734.js";import{f as w,A as Z,z as b}from"./p-7c37e5bb.js";import{V as j}from"./p-8284a445.js";import"./p-7a40e033.js";import"./p-112455b1.js";import"./p-abd7aeaa.js";import"./p-262ec334.js";import"./p-0bb29d98.js";import"./p-331a62d5.js";import"./p-79ec5d69.js";import"./p-33b62194.js";import"./p-6a334573.js";import"./p-d2ff56d8.js";import"./p-483c483a.js";import"./p-5f589974.js";import"./p-4bcd6612.js";import"./p-74168615.js";import"./p-ed45b3b6.js";import"./p-987fbbd0.js";import"./p-a9354a5c.js";import"./p-b0502d01.js";import"./p-1b860f90.js";import"./p-5f377954.js";import"./p-032df16f.js";const I=[{type:"visa",iconName:"visa",pattern:l,maskConfig:{type:"custom",options:{mask:"9999 9999 9999 9999 999",slot:"9",accept:/\d/,triggerAtInit:a.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")}}},{type:"mastercard",iconName:"mastercard",pattern:r,maskConfig:{type:"custom",options:{mask:"9999 9999 9999 9999",slot:"9",accept:/\d/,triggerAtInit:a.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")}}},{type:"amex",iconName:"amex",pattern:o,maskConfig:{type:"custom",options:{mask:"9999 999999 99999",slot:"9",accept:/\d/,triggerAtInit:a.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")}}},{type:"discover",iconName:"discover",pattern:c,maskConfig:{type:"custom",options:{mask:"9999 9999 9999 9999",slot:"9",accept:/\d/,triggerAtInit:a.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")}}}],D=[{payloadKey:"AUTO_VALIDATION_IS_TRUE",payloadDescription:"Determines whether the user's input in the credit card field should be automatically validated",payloadValue:t=>!0===t.autoValidation},{payloadKey:"AUTO_VALIDATION_IS_FALSE",payloadDescription:"Determines whether the user's input in the credit card field should be automatically validated",payloadValue:t=>!1===t.autoValidation}];var R=function(t,i,e,h){var s,a=arguments.length,l=a<3?i:null===h?h=Object.getOwnPropertyDescriptor(i,e):h;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,i,e,h);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(l=(a<3?s(l):a>3?s(i,e,l):s(i,e))||l);return a>3&&l&&Object.defineProperty(i,e,l),l};const y=class{constructor(h){t(this,h),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.vegaBlur=i(this,"vegaBlur",7),this.blur=i(this,"blur",7),this.vegaFocus=i(this,"vegaFocus",7),this.focus=i(this,"focus",7),this.globalSlimmers={},this.formFieldController=new u({propertyRules:[{propertyName:"required",ruleFactory:t=>t?new p:null},{propertyName:"",ruleFactory:()=>new d}],validationRulesName:"validationRules",defaultValue:"",attributeGetter:t=>this[t],inputContainerGetter:()=>this.inputContainerGetter(),touchableAreaGetter:()=>this.touchableAreaGetter()}),this.changeEventEmitter=A(y,w),this.blurEventEmitter=A(y,Z),this.focusEventEmitter=A(y,b),this.inputCreditCardEventPrevent=new M([w,b,Z],(()=>this.host),!0),this.vegaComponentUsageRuntimeMetricsSlimmer=new m(D),this.maskConfig={type:"custom",options:{mask:"",slot:"9",accept:/[\d\s]/,insertMode:!1,triggerAtInit:a.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")},trigger:"blur"},this.required=!1,this.disabled=!1,this.label="",this.hint="",this.size="default",this.placeholder="",this.hideCardNumberOnBlur=!0,this.autoValidation=!0,this.validationRules=[],this.isValid=null,this.value="",this.renderInputContainer=()=>{var t;const i=(null===(t=this.getCreditCardType(this.value))||void 0===t?void 0:t.iconName)||"regular-credit-card";return e("vega-input",{label:this.label,type:"number",prefixIcon:j.getIconKey(i),maskConfig:this.getMaskConfig(),placeholder:this.placeholder,disabled:this.disabled,size:this.size,value:this.value,hint:this.hint,required:this.required,showClearIcon:!1,ref:t=>{this.inputRef=t,E.addUniqueObserverToNode(t,w,(t=>{this.handleVegaChange(t)})),E.addUniqueObserverToNode(t,Z,(()=>{this.handleVegaBlur()})),E.addUniqueObserverToNode(t,b,(()=>{this.handleVegaFocus()}))}})},this.handleVegaChange=t=>{this.value=t.detail},this.handleVegaBlur=()=>{this.blurEventEmitter.emit()},this.handleVegaFocus=()=>{this.focusEventEmitter.emit()},this.inputContainerGetter=()=>this.inputRef.shadowRoot.querySelector(".vega-input-container"),this.touchableAreaGetter=()=>Array.from(this.inputRef.shadowRoot.querySelectorAll("input"))}watchValidationRules(){}watchValue(t){this.changeEventEmitter.emit(t),_.notify(g,{host:this.host,detail:t})}componentDidLoad(){a.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")&&this.hideCardNumberOnBlur&&this.inputRef.value&&this.value!==this.inputRef.value&&(this.value=this.inputRef.value)}render(){return n(e(h,null,this.renderInputContainer()),this.host)}getCreditCardType(t){return I.filter((i=>i.pattern.test(t)))[0]}getMaskConfig(){const t=[],i=this.getCreditCardType(this.value);return i&&(t.push(i.maskConfig),this.hideCardNumberOnBlur&&this.value.trim().includes(" ")&&(this.maskConfig.options.mask=this.generateDynamicMask(),t.push(this.maskConfig))),t}generateDynamicMask(){const t=this.value.trim().split(" ");return this.maskCardNumber(t).join(" ")}maskCardNumber(t){return t.map(((i,e)=>(e===t.length-1?"9":"X").repeat(i.length)))}get host(){return s(this)}static get watchers(){return{validationRules:["watchValidationRules"],value:["watchValue"]}}};j.register({visa:{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="24" fill="none"><rect width="36" height="24" fill="#00579F" rx="2"/><path fill="#fff" d="M15.474 15.792h-1.979l1.238-7.653h1.979l-1.238 7.653ZM22.647 8.326A4.877 4.877 0 0 0 20.872 8c-1.954 0-3.33 1.042-3.339 2.532-.016 1.1.986 1.71 1.735 2.076.765.375 1.026.62 1.026.953-.008.513-.619.75-1.189.75-.79 0-1.213-.123-1.857-.408l-.26-.122-.277 1.718c.464.211 1.32.4 2.207.407 2.076 0 3.428-1.026 3.444-2.613.008-.872-.52-1.54-1.66-2.085-.693-.35-1.117-.586-1.117-.944.008-.326.359-.66 1.14-.66a3.362 3.362 0 0 1 1.474.293l.18.082.268-1.653ZM25.279 13.08l.79-2.14c-.008.016.162-.448.26-.733l.138.66s.375 1.831.457 2.214h-1.645ZM27.72 8.14h-1.53c-.472 0-.831.138-1.035.635l-2.94 7.018h2.077l.416-1.148h2.54c.057.269.237 1.148.237 1.148h1.832L27.72 8.14ZM11.842 8.139l-1.938 5.219-.212-1.059c-.358-1.221-1.482-2.548-2.736-3.208l1.775 6.693h2.093l3.11-7.645h-2.092Z"/><path fill="#FAA61A" d="M8.104 8.139H4.92l-.032.154c2.483.635 4.128 2.166 4.804 4.007L9 8.782c-.114-.489-.464-.627-.896-.643Z"/></svg>',autoSize:!0},mastercard:{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="24" fill="none"><rect width="36" height="24" fill="#000" rx="2"/><path fill="#ED0006" fill-rule="evenodd" d="M18.25 17.157a6.75 6.75 0 0 1-4.426 1.649c-3.769 0-6.824-3.09-6.824-6.903C7 8.091 10.055 5 13.824 5a6.75 6.75 0 0 1 4.426 1.649A6.75 6.75 0 0 1 22.676 5c3.769 0 6.824 3.09 6.824 6.903 0 3.812-3.055 6.903-6.824 6.903a6.75 6.75 0 0 1-4.426-1.65Z" clip-rule="evenodd"/><path fill="#F9A000" fill-rule="evenodd" d="M18.25 17.157a6.92 6.92 0 0 0 2.398-5.254 6.92 6.92 0 0 0-2.398-5.254A6.75 6.75 0 0 1 22.676 5c3.769 0 6.824 3.09 6.824 6.903 0 3.812-3.055 6.903-6.824 6.903a6.75 6.75 0 0 1-4.426-1.65Z" clip-rule="evenodd"/><path fill="#FF5E00" fill-rule="evenodd" d="M18.25 6.65a6.92 6.92 0 0 1 2.398 5.253 6.92 6.92 0 0 1-2.398 5.254 6.92 6.92 0 0 1-2.398-5.254A6.92 6.92 0 0 1 18.25 6.65Z" clip-rule="evenodd"/></svg>',autoSize:!0},amex:{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="24" fill="none"><g clip-path="url(#a)"><rect width="36" height="24" fill="#016FD0" rx="2"/><path fill="#fff" d="M6.99 18.549v-5.654h5.986l.643.838.663-.838h21.729v5.264s-.569.384-1.226.39H22.754l-.724-.891v.891h-2.373v-1.521s-.325.212-1.025.212h-.808v1.309h-3.593l-.641-.855-.651.855H6.99ZM0 8.634l1.35-3.147h2.334l.767 1.763V5.487h2.902l.456 1.274.442-1.274h13.027v.64s.685-.64 1.81-.64l4.227.015.753 1.74V5.487h2.428l.669 1v-1h2.45v5.654h-2.45l-.64-1.003v1.003h-3.569l-.359-.892h-.959l-.353.892h-2.42c-.968 0-1.587-.628-1.587-.628v.628H17.63l-.725-.892v.892H3.34l-.359-.892h-.956l-.356.892H0V8.634Z"/><path fill="#016FD0" d="M1.827 6.184.006 10.417h1.185l.336-.847H3.48l.335.847h1.211L3.207 6.184h-1.38Zm.673.985.596 1.482H1.903L2.5 7.169ZM5.151 10.416V6.183l1.685.006.98 2.73.956-2.736h1.671v4.233H9.385v-3.12l-1.122 3.12h-.928L6.21 7.296v3.12H5.15ZM11.168 10.416V6.183h3.454v.947h-2.384v.724h2.328v.891h-2.328v.752h2.384v.92h-3.454ZM15.233 6.184v4.233h1.059V8.913h.445l1.27 1.504H19.3l-1.393-1.56a1.29 1.29 0 0 0 1.161-1.3c0-.89-.7-1.373-1.48-1.373h-2.355Zm1.059.947h1.21c.29 0 .5.227.5.446 0 .28-.273.445-.485.445h-1.225v-.891ZM20.582 10.416h-1.08V6.183h1.08v4.233ZM23.144 10.416h-.233c-1.129 0-1.814-.889-1.814-2.1 0-1.24.678-2.133 2.103-2.133h1.17v1.003h-1.213c-.578 0-.988.451-.988 1.141 0 .82.468 1.165 1.142 1.165h.279l-.446.924ZM25.448 6.184l-1.82 4.233h1.185l.336-.847h1.953l.334.847h1.211l-1.819-4.233h-1.38Zm.674.985.595 1.482h-1.192l.597-1.482ZM28.77 10.416V6.183h1.345l1.718 2.66v-2.66h1.059v4.233H31.59l-1.762-2.73v2.73H28.77ZM7.715 17.825v-4.233h3.453v.947H8.784v.724h2.329v.89H8.784v.753h2.384v.919H7.715ZM24.636 17.825v-4.233h3.454v.947h-2.384v.724h2.317v.89h-2.317v.753h2.384v.919h-3.454ZM11.303 17.825l1.681-2.09-1.721-2.143h1.333l1.025 1.324 1.029-1.324h1.281l-1.699 2.116 1.685 2.117h-1.333l-.996-1.304-.971 1.304h-1.314ZM16.041 13.592v4.233h1.086v-1.337h1.114c.943 0 1.658-.5 1.658-1.472 0-.806-.56-1.424-1.52-1.424H16.04Zm1.086.957h1.174c.304 0 .522.187.522.488 0 .282-.217.487-.526.487h-1.17v-.975ZM20.359 13.592v4.233h1.058V16.32h.446l1.269 1.504h1.293l-1.393-1.56a1.29 1.29 0 0 0 1.162-1.3c0-.89-.7-1.373-1.48-1.373h-2.355Zm1.058.947h1.21c.29 0 .501.226.501.445 0 .281-.273.446-.486.446h-1.225v-.891ZM28.58 17.825v-.92H30.7c.313 0 .449-.169.449-.354 0-.178-.136-.358-.45-.358h-.957c-.831 0-1.295-.507-1.295-1.268 0-.679.424-1.333 1.66-1.333h2.062l-.446.952H29.94c-.341 0-.446.179-.446.35 0 .175.13.369.39.369h1.003c.927 0 1.33.526 1.33 1.215 0 .74-.449 1.347-1.38 1.347H28.58ZM32.464 17.825v-.92h2.118c.313 0 .45-.169.45-.354 0-.178-.136-.358-.45-.358h-.957c-.832 0-1.295-.507-1.295-1.268 0-.679.424-1.333 1.66-1.333h2.02l-.404.952h-1.783c-.34 0-.446.179-.446.35 0 .175.13.369.39.369h1.003c.927 0 1.33.526 1.33 1.215 0 .74-.449 1.347-1.38 1.347h-2.256Z"/></g><defs><clipPath id="a"><rect width="36" height="24" fill="#fff" rx="2"/></clipPath></defs></svg>',autoSize:!0},discover:{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="24" fill="none"><rect width="36" height="24" fill="#232342" rx="2"/><path fill="#fff" fill-rule="evenodd" d="M30.686 9.61c1.086 0 1.684.484 1.684 1.398a1.307 1.307 0 0 1-1.087 1.397l1.467 1.988h-1.14l-1.25-1.935h-.109v1.935h-.924V9.61h1.359Zm-.435 2.204h.272c.597 0 .869-.269.869-.752 0-.43-.272-.699-.87-.699h-.27v1.45Zm-4.129 2.579h2.608v-.806h-1.684v-1.29h1.63v-.806h-1.63v-1.074h1.684V9.61h-2.608v4.781Zm-2.716-1.559-1.25-3.223h-.978l2.01 4.889h.49l2.01-4.89h-.978l-1.304 3.225Zm-11.029-.805c0 1.343 1.087 2.471 2.445 2.471.435 0 .815-.107 1.195-.269v-1.074c-.271.322-.652.537-1.086.537-.87 0-1.576-.645-1.576-1.504v-.108c-.054-.86.652-1.612 1.521-1.665.435 0 .87.215 1.141.537V9.879c-.326-.214-.76-.268-1.14-.268-1.413-.108-2.5 1.02-2.5 2.418Zm-1.684-.591c-.543-.215-.706-.323-.706-.591.054-.323.326-.591.652-.538.271 0 .543.162.76.376l.49-.644c-.381-.323-.87-.538-1.359-.538-.76-.053-1.412.538-1.467 1.29v.054c0 .644.272 1.02 1.141 1.289.217.054.435.161.652.269a.563.563 0 0 1 .272.483c0 .376-.326.699-.652.699h-.055c-.434 0-.814-.269-.977-.645l-.598.59c.326.592.978.914 1.63.914.869.054 1.575-.59 1.63-1.45v-.162c-.055-.644-.326-.967-1.413-1.396Zm-3.15 2.954h.923V9.611h-.924v4.781ZM3.25 9.611H4.88c1.304.054 2.336 1.128 2.282 2.418 0 .698-.326 1.343-.87 1.826-.488.376-1.086.591-1.684.538H3.25V9.61Zm1.195 3.976c.435.053.924-.108 1.25-.376.326-.323.489-.753.489-1.236 0-.43-.163-.86-.49-1.182-.325-.269-.814-.43-1.249-.376h-.271v3.17h.271Z" clip-rule="evenodd"/><path fill="#FD6020" fill-rule="evenodd" d="M18.788 9.5c-1.358 0-2.499 1.075-2.499 2.471 0 1.344 1.087 2.472 2.5 2.526 1.412.053 2.498-1.075 2.553-2.472C21.287 10.628 20.2 9.5 18.788 9.5Z" clip-rule="evenodd"/></svg>',autoSize:!0},"regular-credit-card":{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="24" fill="none"><rect width="36" height="24" rx="2" style=\'fill: rgba(var(--v-regular-credit-card-bg, 205, 209, 211, 1))\'/><g clip-path="url(#a)"><path style="fill: rgba(var(--v-regular-credit-card-top, 252, 252, 252, 1))" d="M11 5c-1.103 0-2 .897-2 2v1h18V7c0-1.103-.897-2-2-2H11Zm16 6H9v6c0 1.103.897 2 2 2h14c1.103 0 2-.897 2-2v-6Zm-14.5 4h2c.275 0 .5.225.5.5s-.225.5-.5.5h-2a.501.501 0 0 1-.5-.5c0-.275.225-.5.5-.5Zm3.5.5c0-.275.225-.5.5-.5h4c.275 0 .5.225.5.5s-.225.5-.5.5h-4a.501.501 0 0 1-.5-.5Z"/></g><defs><clipPath id="a"><path d="M9 4h18v16H9z" style=\'fill: rgba(var(--v-regular-credit-card-bottom, 255, 255, 255, 1))\'/></clipPath></defs></svg>',autoSize:!0}}),R([f()],y.prototype,"globalSlimmers",void 0),R([v()],y.prototype,"formFieldController",void 0),R([v()],y.prototype,"changeEventEmitter",void 0),R([v()],y.prototype,"blurEventEmitter",void 0),R([v()],y.prototype,"focusEventEmitter",void 0),R([v()],y.prototype,"inputCreditCardEventPrevent",void 0),R([v()],y.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),y.style=":host{display:inline-block;width:100%;text-align:left;line-height:normal}";export{y as vega_input_credit_card}
@@ -0,0 +1 @@
1
+ import{I as t}from"./p-abd7aeaa.js";class e extends t{constructor(t){super(),this.config=t}evaluate(t){var e;if(!this.isAcceptedInputType(t))throw new Error(`Unexpected type of input: ${typeof t}: ${t}`);const r=(null===(e=this.config)||void 0===e?void 0:e.maxStrLength)||Number.MAX_VALUE;return{isValid:t.length<=r,message:t.length<=r?"":{key:"The maximum input length is {0}",args:[r]}}}canEvaluate(t,e){return e?this.isAcceptedInputType(t)&&!e.disabled&&e.visible:this.isAcceptedInputType(t)}shouldShowError(t){return!t.disabled&&t.visible&&(t.touched||t.modified)}isAcceptedInputType(t){return"string"==typeof t}}class r extends t{constructor(t){super(),this.config=t}evaluate(t){var e;if(!this.isAcceptedInputType(t))throw new Error(`Unexpected type of input: ${typeof t}: ${t}`);const r=(null===(e=this.config)||void 0===e?void 0:e.minStrLength)||0;return{isValid:t.length>=r,message:t.length>=r?"":{key:"The minimum input length is {0}",args:[r]}}}canEvaluate(t,e){return e?this.isAcceptedInputType(t)&&!e.disabled&&e.visible:this.isAcceptedInputType(t)}shouldShowError(t){return!t.disabled&&t.visible&&(t.touched||t.modified)}isAcceptedInputType(t){return"string"==typeof t}}export{r as M,e as a}
@@ -0,0 +1 @@
1
+ import{h as e,F as t,H as i,r as o,c as a,g as r}from"./p-1c298d5a.js";import{R as n}from"./p-280cbcdb.js";import{g as s,s as d}from"./p-9b797118.js";import{N as p,O as c}from"./p-b1f65b13.js";import{c as l,M as h,V as b,I as f}from"./p-6e1ab235.js";import{V as m,I as v}from"./p-4387d550.js";import{F as g}from"./p-5e56f3bd.js";import{C as x}from"./p-ac608edc.js";import{c as u}from"./p-57669fd6.js";import{k as w,n as y,b as j,c as R,f as I,l as C}from"./p-7c37e5bb.js";import{b as k}from"./p-5dce8dfe.js";import{C as O}from"./p-2d0d575f.js";import{c as D}from"./p-86194314.js";import{D as S}from"./p-d7219734.js";import{e as z}from"./p-d2ff56d8.js";import{K as E}from"./p-de25326f.js";import{f as A}from"./p-79ec5d69.js";import{M as V}from"./p-987fbbd0.js";import{T as L}from"./p-a9354a5c.js";import"./p-abd7aeaa.js";import"./p-ed45b3b6.js";import"./p-74168615.js";import"./p-3a0a4d15.js";import"./p-d884c644.js";import"./p-0bb29d98.js";import"./p-331a62d5.js";import"./p-33b62194.js";import"./p-6a334573.js";import"./p-483c483a.js";import"./p-5f589974.js";import"./p-4bcd6612.js";import"./p-b0502d01.js";import"./p-262ec334.js";import"./p-1b860f90.js";import"./p-5f377954.js";import"./p-ff4bafa3.js";import"./p-7a40e033.js";import"./p-112455b1.js";import"./p-6a5a5c7b.js";const T=[{payloadKey:"AUTO_VALIDATION_IS_TRUE",payloadDescription:"Determines whether automatic validation should be implemented when a value is edited in the combo box",payloadValue:e=>!0===e.autoValidation},{payloadKey:"AUTO_VALIDATION_IS_FALSE",payloadDescription:"Determines whether automatic validation should be implemented when a value is edited in the combo box",payloadValue:e=>!1===e.autoValidation}];var F=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class N extends b{constructor(){super(...arguments),this.onItemClick=async()=>{this.valueController.setValue(await this.dropdownRef.getSelection()),await this.clearInput()},this.onDropdownHide=async()=>{await this.clearInput()},this.onDropdownCreate=async e=>{this.createEventEmit.emit(e),await this.clearInput()},this.onInputChange=async e=>{const t=e.target.value;(this.useDefaultFilter||this.vegaDropdownProps.dynamicOption)&&(await this.dropdownRef.show(),await this.dropdownRef.search(t)),!this.isTemplateMode&&this.useDefaultFilter||this.searchEventEmit.emit(t)}}connectedCallback(){this.isTemplateMode=null!==this.host.querySelector("[slot=items]")}getDropdownRef(){return this.dropdownRef}getSearchInputRef(){return this.searchInputRef}focusInput(){this.searchInputRef.focus()}async hide(){await this.dropdownRef.hide()}async show(){await this.dropdownRef.show()}replaceItemsSlot(e){e&&this.itemsSlotRef&&(this.itemsSlotRef.remove(),this.dropdownRef.append(e))}renderDropdown(){return e("vega-dropdown",Object.assign({trigger:this.disabled?"none":"click",source:this.source,selectType:"multiple",selectedSourceKey:this.value,matchTargetWidth:!0,useDefaultFilter:this.useDefaultFilter},this.vegaDropdownProps,{ref:e=>{this.dropdownRef=e,S.addUniqueObserverToNode(e,w,(async e=>{await this.onDropdownCreate(e.detail)})),S.addUniqueObserverToNode(e,y,(async()=>{await this.onDropdownHide()})),S.addUniqueObserverToNode(e,j,(async()=>{await this.onItemClick()})),S.addUniqueObserverToNode(e,z,(e=>{const t=Array.from(e).filter((e=>!this.source.find((t=>t.key===e.itemKey)))).map((e=>({key:e.itemKey,label:e.label})));this.sourceController.setSource([...this.source,...t])}))}}),this.renderContainer(),this.renderItemsSlot())}renderContainer(){return e("div",{class:{"vega-combo-box-container":!0,[`vega-combo-box-size-${this.size}`]:!0}},this.renderSelectedContainer(),this.renderInputContainer())}renderItemsSlot(){return this.isTemplateMode&&e("div",{slot:"items",ref:e=>{this.itemsSlotRef=e}})}renderSelectedContainer(){const i=this.value.map((e=>this.source.find((t=>t.key===e)))).filter((e=>e));return e(t,null,i.map((e=>this.renderSelectedChip(e))))}renderSelectedChip(t){return e("vega-chip",{key:t.key,text:t.label,variant:"outlined",showCloseIcon:!this.disabled,size:"small",ref:e=>{S.addUniqueObserverToNode(e,R,(async()=>{await this.onChipClose(t.key)}))}})}renderInputContainer(){return e("div",{class:"vega-combo-box-input-container"},e("input",{onInput:this.onInputChange,"aria-label":this.label||"No label defined",placeholder:0===this.value.length?this.placeholder:"",ref:e=>this.searchInputRef=e,onKeyDown:D(),disabled:this.disabled}))}async onChipClose(e){this.valueController.setValue([...this.value.filter((t=>t!==e))]),await this.dropdownRef.hide()}async clearInput(){this.searchInputRef.value="",await this.dropdownRef.search("")}}F([l()],N.prototype,"host",void 0),F([l()],N.prototype,"value",void 0),F([l()],N.prototype,"source",void 0),F([l()],N.prototype,"disabled",void 0),F([l()],N.prototype,"size",void 0),F([l()],N.prototype,"vegaDropdownProps",void 0),F([l()],N.prototype,"label",void 0),F([l()],N.prototype,"placeholder",void 0),F([l()],N.prototype,"useDefaultFilter",void 0),F([l()],N.prototype,"createEventEmit",void 0),F([l()],N.prototype,"searchEventEmit",void 0),F([l()],N.prototype,"valueController",void 0),F([l()],N.prototype,"sourceController",void 0),F([h("connectedCallback")],N.prototype,"connectedCallback",null);class _ extends b{setValue(e){this.value=e}}!function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);r>3&&n&&Object.defineProperty(t,i,n)}([l({writable:!0})],_.prototype,"value",void 0);var K=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class G extends b{constructor(){super(...arguments),this.onLabelClick=()=>{this.dropdownRenderer.focusInput()}}render(){return e(i,{class:{"vega-combo-box-disabled":this.disabled}},this.renderLabel(),this.dropdownRenderer.renderDropdown(),this.renderHint())}renderLabel(){return e("vega-field-label",{onClick:this.onLabelClick,"is-field-required":this.required,disabled:this.disabled,label:this.label})}renderHint(){return e("div",{class:"vega-combo-box-hint"},this.hint)}}K([l()],G.prototype,"required",void 0),K([l()],G.prototype,"hint",void 0),K([l()],G.prototype,"disabled",void 0),K([l()],G.prototype,"dropdownRenderer",void 0),K([l()],G.prototype,"label",void 0);var H=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class M extends E{constructor(){super((e=>[{keyCode:"Backspace",activeElementInScope:[e.dropdownRenderer.getSearchInputRef()],eventName:"keydown",callback:e.deleteLastSelectedItem},{keyCode:"ArrowLeft",activeElementInScope:[e.host],callback:()=>e.controlDirectionByKeyboard("ArrowLeft")},{keyCode:"ArrowRight",activeElementInScope:[e.host],callback:()=>e.controlDirectionByKeyboard("ArrowRight")}])),this.deleteLastSelectedItem=()=>{""===this.dropdownRenderer.getSearchInputRef().value&&(this.value.pop(),this.valueController.setValue([...this.value]))}}controlDirectionByKeyboard(e){const t=s();if(t&&t.classList.contains("vega-chip-close-icon")){const i=A(t,"vega-chip");"ArrowLeft"===e&&this.focusItemByKeyboard(i.previousSibling),"ArrowRight"===e&&this.focusItemByKeyboard(i.nextSibling)}else"ArrowLeft"===e&&0===this.dropdownRenderer.getSearchInputRef().selectionStart&&this.focusItemByKeyboard(this.host.shadowRoot.querySelector("vega-chip:last-of-type"))}focusItemByKeyboard(e){e&&(e.classList.contains("vega-combo-box-input-container")?e.querySelector("input").focus():e.shadowRoot.querySelector(".vega-chip-close-icon").focus())}}H([l()],M.prototype,"host",void 0),H([l()],M.prototype,"value",void 0),H([l()],M.prototype,"dropdownRenderer",void 0),H([l()],M.prototype,"valueController",void 0);var P=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class U extends b{constructor(){super(...arguments),this.mutationObserver=new V({mutationFilter:L("VEGA-DROPDOWN-ITEM"),options:{childList:!0,subtree:!0},callback:()=>this.appendHostItemsToDropdown()})}componentDidLoad(){this.appendHostItemsToDropdown()}appendHostItemsToDropdown(){this.dropdownRenderer.replaceItemsSlot(this.host.querySelector("[slot=items]"))}}P([f()],U.prototype,"mutationObserver",void 0),P([l()],U.prototype,"host",void 0),P([l()],U.prototype,"dropdownRenderer",void 0),P([h("componentDidLoad")],U.prototype,"componentDidLoad",null);class q extends b{setSource(e){this.source=e}}!function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);r>3&&n&&Object.defineProperty(t,i,n)}([l({writable:!0})],q.prototype,"source",void 0);var B=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};const W=class{constructor(e){o(this,e),this.vegaChange=a(this,"vegaChange",7),this.change=a(this,"change",7),this.vegaCreate=a(this,"vegaCreate",7),this.create=a(this,"create",7),this.vegaSearch=a(this,"vegaSearch",7),this.search=a(this,"search",7),this.globalSlimmers={},this.itemsSlotController=new U,this.keyboardController=new M,this.valueController=new _,this.sourceController=new q,this.renderer=new G,this.dropdownRenderer=new N,this.formFieldController=new g({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new n:null}],validationRulesName:"validationRules",defaultValue:[],attributeGetter:e=>this[e],inputContainerGetter:()=>this.dropdownRenderer.getDropdownRef(),touchableAreaGetter:()=>[this.dropdownRenderer.getSearchInputRef()]}),this.changeEventEmit=u(W,I),this.createEventEmit=u(W,w),this.searchEventEmit=u(W,C),this.dropdownEventPrevent=new x([w,C],(()=>this.dropdownRenderer.getDropdownRef()),{customPreventHandle:e=>{e.stopImmediatePropagation()}}),this.vegaComponentUsageRuntimeMetricsSlimmer=new m(T),this.label="",this.required=!1,this.source=[],this.value=[],this.isValid=null,this.autoValidation=!0,this.validationRules=[],this.disabled=!1,this.placeholder="",this.hint="",this.size="medium",this.vegaDropdownProps={},this.useDefaultFilter=!0}watchSource(){this.source=p(this.source,c)?this.source:[]}watchValue(){this.changeEventEmit.emit(this.value),O.notify(k,{host:this.host,detail:this.value})}watchValidationRules(){}async close(){this.disabled||await this.dropdownRenderer.hide()}async open(){this.disabled||await this.dropdownRenderer.show()}render(){return d(this.renderer.render(),this.host)}get host(){return r(this)}static get watchers(){return{source:["watchSource"],value:["watchValue"],validationRules:["watchValidationRules"]}}};B([v()],W.prototype,"globalSlimmers",void 0),B([f()],W.prototype,"itemsSlotController",void 0),B([f()],W.prototype,"keyboardController",void 0),B([f()],W.prototype,"valueController",void 0),B([f()],W.prototype,"sourceController",void 0),B([f()],W.prototype,"renderer",void 0),B([f()],W.prototype,"dropdownRenderer",void 0),B([f()],W.prototype,"formFieldController",void 0),B([f()],W.prototype,"changeEventEmit",void 0),B([f()],W.prototype,"createEventEmit",void 0),B([f()],W.prototype,"searchEventEmit",void 0),B([f()],W.prototype,"dropdownEventPrevent",void 0),B([f()],W.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),W.style=':host{display:inline-block;width:100%;min-width:0px;text-align:left;line-height:normal}.vega-combo-box-container{border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1));background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));padding-left:16px;padding-right:16px;padding-top:12px;padding-bottom:12px;border-radius:8px;gap:8px;display:block;display:flex;flex-wrap:wrap;align-items:center;cursor:pointer}.vega-combo-box-container:hover{border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1))}.vega-combo-box-container:focus-within{border:1px solid rgba(var(--v-border-input-field-focus, 19, 98, 226, 1));box-shadow:0 0 0 4px rgba(var(--v-ring-input-focus, 19, 98, 226, 0.25))}.vega-combo-box-container .vega-combo-box-input-container{width:-webkit-min-content;width:-moz-min-content;width:min-content;flex-grow:1}.vega-combo-box-container input{border-style:none;background-color:rgba(var(--v-bg-transparent, 0, 0, 0, 0));font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));width:100%}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-combo-box-container input{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-combo-box-container input{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-combo-box-container input{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}.vega-combo-box-container input:focus{outline:2px solid transparent;outline-offset:2px}.vega-combo-box-size-medium{padding-left:12px;padding-right:12px;padding-top:11px;padding-bottom:11px}.vega-combo-box-size-small{padding-left:12px;padding-right:12px;padding-top:7px;padding-bottom:7px}.vega-combo-box-container:focus{outline:none}vega-field-label{margin-bottom:8px}.error .vega-combo-box-container{border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}.error .vega-combo-box-container:hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}.error .vega-combo-box-container:focus-within{border:1px solid rgba(var(--v-border-input-field-danger-focus, 233, 71, 104, 1));box-shadow:0 0 0 4px rgba(var(--v-ring-input-danger-focus, 230, 50, 87, 0.25))}:host(.vega-combo-box-disabled) .vega-combo-box-container{border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1));background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));--tw-shadow:0 0 #0000;box-shadow:rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px}:host(.vega-combo-box-disabled) .vega-combo-box-container:hover{border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}:host(.vega-combo-box-disabled) vega-icon{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}.vega-combo-box-container input::placeholder{color:rgba(var(--v-text-input-placeholder, 176, 180, 181, 1))}.vega-error{display:inline-block;padding-left:8px;padding-right:8px;padding-top:8px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}.vega-hidden{display:none}.vega-combo-box-hint{padding-left:8px;padding-right:8px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));padding-top:8px}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-combo-box-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-combo-box-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-combo-box-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}.vega-error:not(.vega-hidden)+.vega-combo-box-hint{padding-top:4px}vega-dropdown{display:block}';export{W as vega_combo_box}
@@ -1 +1 @@
1
- class e{constructor(e){this.name=e}getName(){return this.name}}const n=new e("valid"),a=new e("fieldErrorStateChange"),t=new e("virtualScrollToBottom"),s=new e("buttonGroupClick"),r=new e("leftNavLinkClick"),o=new e("subStatePull"),w=new e("subStatePush"),l=new e("monthEventsChange"),d=new e("dropdownTemplateItemsChange"),i=new e("tableRowSelect"),c=new e("tableRowSelectAll"),h=new e("tableRowExpand"),p=new e("dropdownRenderItemInternalOverridden"),g=new e("VegaDropdownSearchInternalOverridden"),u=new e("sidenavLinkClick"),m=new e("leftNavGroupExpand"),v=new e("dropdownUpdateTarget"),C=new e("richTextEditorFlushChanges"),S=new e("richTextEditorSelectionRangeChange"),T=new e("richTextImageClick"),k=new e("richTextImageDeleteButtonClicked"),x=new e("componentDidRender"),b=new e("popoverUpdateTarget"),E=new e("richTextEditDeleteSelectedNodes");export{C as V,x as a,S as b,a as c,n as d,d as e,t as f,w as g,o as h,p as i,g as j,v as k,b as l,s as m,l as n,u as o,E as p,T as q,k as r,r as s,m as t,h as u,i as v,c as w}
1
+ class e{constructor(e){this.name=e}getName(){return this.name}}const n=new e("valid"),a=new e("fieldErrorStateChange"),t=new e("virtualScrollToBottom"),s=new e("buttonGroupClick"),r=new e("leftNavLinkClick"),o=new e("subStatePull"),w=new e("subStatePush"),l=new e("monthEventsChange"),d=new e("dropdownTemplateItemsChange"),i=new e("tableRowSelect"),c=new e("tableRowSelectAll"),h=new e("tableRowExpand"),p=new e("dropdownRenderItemInternalOverridden"),g=new e("VegaDropdownSearchInternalOverridden"),u=new e("sidenavLinkClick"),m=new e("leftNavGroupExpand"),v=new e("dropdownUpdateTarget"),C=new e("richTextEditorFlushChanges"),S=new e("richTextEditorSelectionRangeChange"),T=new e("richTextImageClick"),k=new e("richTextImageDeleteButtonClicked"),x=new e("componentDidRender"),b=new e("popoverUpdateTarget"),E=new e("richTextEditDeleteSelectedNodes");export{C as V,S as a,x as b,a as c,n as d,d as e,t as f,w as g,o as h,p as i,g as j,v as k,b as l,s as m,l as n,u as o,E as p,T as q,k as r,r as s,m as t,h as u,i as v,c as w}
@@ -0,0 +1 @@
1
+ import{h as e,H as t,r as i,c as r,g as n}from"./p-1c298d5a.js";import{c as o,V as s,M as a,I as l}from"./p-6e1ab235.js";import{V as d,I as c}from"./p-4387d550.js";import{V as p}from"./p-8284a445.js";import{s as h}from"./p-9b797118.js";import{D as u}from"./p-d7219734.js";import{a as f,f as g}from"./p-7c37e5bb.js";import{f as m}from"./p-666cd80f.js";import{b as v}from"./p-5dce8dfe.js";import{C as b}from"./p-2d0d575f.js";import{d as w}from"./p-47a4c625.js";import{c as x}from"./p-57669fd6.js";import{F as j}from"./p-5e56f3bd.js";import{R as y}from"./p-280cbcdb.js";import{P as R}from"./p-5f589974.js";import{g as C}from"./p-4bcd6612.js";import{T as z}from"./p-9ab547b0.js";import"./p-032df16f.js";import"./p-33b62194.js";import"./p-6a334573.js";import"./p-331a62d5.js";import"./p-79ec5d69.js";import"./p-b1f65b13.js";import"./p-ed45b3b6.js";import"./p-74168615.js";import"./p-3a0a4d15.js";import"./p-d884c644.js";import"./p-7f2441d6.js";import"./p-262ec334.js";import"./p-0c667d6a.js";import"./p-2205ee4c.js";import"./p-1b860f90.js";import"./p-0bb29d98.js";import"./p-d2ff56d8.js";import"./p-483c483a.js";import"./p-abd7aeaa.js";import"./p-987fbbd0.js";import"./p-a9354a5c.js";import"./p-b0502d01.js";var I=function(e,t,i,r){var n,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,i,s):n(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s};class V extends s{render(){return e(t,null,"written"===this.mode&&this.writtenModeRenderer.render())}}I([o()],V.prototype,"mode",void 0),I([o()],V.prototype,"writtenModeRenderer",void 0);var S=function(e,t,i,r){var n,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,i,s):n(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s};class L extends s{constructor(){super(...arguments),this.signatureCaptureFocus=()=>{this.signatureCaptureContainerRef.focus()}}getSignatureCaptureContainer(){return this.signatureCaptureContainerRef}render(){return e("vega-flex",{direction:"col",gap:"size-8"},this.renderLabel(),this.renderContainer(),this.renderFooter())}renderLabel(){return this.label&&e("vega-field-label",{onClick:this.signatureCaptureFocus,isFieldRequired:this.required,label:this.label,disabled:this.disabled})}renderContainer(){return e("div",{class:{"signature-capture-written-container":!0,disabled:this.disabled},"aria-label":"Please sign here",role:"textbox",tabIndex:this.disabled?-1:0,ref:e=>this.signatureCaptureContainerRef=e},this.renderPlaceholder(),this.renderSignaturePad())}renderPlaceholder(){if(!this.isDrawing&&!this.value)return this.placeholder&&e("vega-flex",{class:"placeholder-container",gap:"size-8",justifyContent:"center",alignItems:"center",margin:{left:"size-24",right:"size-24"}},this.placeholderIcon&&e("vega-icon",{class:"placeholder-container-icon",size:"size-20",color:"text-secondary",icon:this.placeholderIcon}),e("div",{class:"placeholder-container-content"},this.translationSlimmer.t(this.placeholder)))}renderSignaturePad(){return e("svg",{style:{width:"100%",height:m(this.height,"widthAndHeight"),touchAction:"none"},ref:e=>this.writtenModeSvgController.setSignatureContainerRef(e)})}renderFooter(){return this.showClearBtn&&e("vega-flex",{class:"signature-capture-written-footer",justifyContent:"space-between"},e("div",{class:"vega-error vega-hidden vega-error-content"}),this.renderClearBtn())}renderClearBtn(){return e("div",{class:"clear-button"},e("vega-button-link",{size:"small",disabled:this.disabled,ref:e=>{u.addUniqueObserverToNode(e,f,(()=>{this.writtenModeSvgController.clear()}))},label:this.translationSlimmer.t("Clear Signature")}))}}p.register({signature:{icon:'<svg width="20" height="20" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M176 128c0-26.5 21.5-48 48-48s48 21.5 48 48v7.9c0 27.5-2.3 55-7 82.1L158 251.1c-36.9 11.4-62 45.5-62 84.1V410c0 38.6 31.3 70 70 70c24.6 0 47.4-12.9 60-34l15.9-26.4c29.6-49.4 51.1-103.3 63.6-159.5l1-4.7 110.8-34.3-23.9 66.8c-2.6 7.4-1.5 15.5 3 21.9s11.8 10.2 19.6 10.2H552c13.3 0 24-10.7 24-24s-10.7-24-24-24H450.1l28.5-79.9c3.1-8.6 1-18.1-5.3-24.7s-15.7-9-24.4-6.3l-133 41.2c2.7-22 4.1-44.2 4.1-66.4V128c0-53-43-96-96-96s-96 43-96 96v40c0 13.3 10.7 24 24 24s24-10.7 24-24V128zm-3.8 169l80.9-25c-11.7 43.2-29.4 84.5-52.4 123l-15.9 26.4c-4 6.6-11.1 10.7-18.8 10.7c-12.1 0-22-9.8-22-22V335.2c0-17.5 11.4-33 28.2-38.2zM64 368H24c-13.3 0-24 10.7-24 24s10.7 24 24 24H64.2c-.1-2-.2-4-.2-6V368zm216.8 48H616c13.3 0 24-10.7 24-24s-10.7-24-24-24H304.1c-7 16.3-14.8 32.4-23.3 48z"/></svg>'}}),S([o()],L.prototype,"label",void 0),S([o()],L.prototype,"required",void 0),S([o()],L.prototype,"showClearBtn",void 0),S([o()],L.prototype,"placeholder",void 0),S([o()],L.prototype,"placeholderIcon",void 0),S([o()],L.prototype,"disabled",void 0),S([o()],L.prototype,"value",void 0),S([o()],L.prototype,"isDrawing",void 0),S([o()],L.prototype,"height",void 0),S([o()],L.prototype,"writtenModeSvgController",void 0),S([o()],L.prototype,"translationSlimmer",void 0);var k=function(e,t,i,r){var n,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,i,s):n(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s};class M extends s{constructor(){super(...arguments),this.penWidth="4px",this.clear=()=>{this.signatureContainerRef.innerHTML="",this.value=null},this.startDrawing=e=>{if(this.disabled)return;this.isDrawing=!0;const{x:t,y:i}=this.getPoint(e);this.currentPath=document.createElementNS("http://www.w3.org/2000/svg","path"),this.currentPath.setAttribute("d",`M ${t} ${i}`),Object.assign(this.currentPath.style,{stroke:"rgba(4, 4, 28, 1)",strokeWidth:this.penWidth,fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),this.signatureContainerRef.appendChild(this.currentPath)},this.getPoint=e=>{var t,i;const r=this.signatureContainerRef.getBoundingClientRect(),n=null!==(t=e.clientX)&&void 0!==t?t:e.touches[0].clientX,o=null!==(i=e.clientY)&&void 0!==i?i:e.touches[0].clientY;return{x:n-r.left,y:o-r.top}},this.draw=e=>{if(!this.isDrawing)return;const{x:t,y:i}=this.getPoint(e),r=this.currentPath.getAttribute("d");this.currentPath.setAttribute("d",`${r} L ${t} ${i}`)},this.stopDrawing=()=>{this.isDrawing&&(this.isDrawing=!1,this.value={type:"written",img:this.generateSignatureImage()})}}componentDidLoad(){this.setupListeners(),this.fillSignature(this.value)}handleClear(){this.clear()}watchValue(e,t){w(e,t)||(this.changeEventEmitter.emit(e),this.fillSignature(e),b.notify(v,{host:this.host,detail:e}))}setSignatureContainerRef(e){this.signatureContainerRef=e}setupListeners(){const e=this.signatureContainerRef;e.addEventListener("mousedown",this.startDrawing),e.addEventListener("mousemove",this.draw),e.addEventListener("mouseup",this.stopDrawing),e.addEventListener("mouseleave",this.stopDrawing),e.addEventListener("touchstart",this.startDrawing),e.addEventListener("touchmove",this.draw),e.addEventListener("touchend",this.stopDrawing)}generateSignatureImage(){const e=(new XMLSerializer).serializeToString(this.signatureContainerRef);return`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(e)))}`}fromDataURL(e){if(!e||!e.img)return;const t=this.value.img.replace("data:image/svg+xml;base64,","");return(new DOMParser).parseFromString(atob(t),"image/svg+xml").documentElement}fillSignature(e){this.signatureContainerRef.replaceChildren();const t=this.fromDataURL(e);if(t){const e=Array.from(t.childNodes);this.signatureContainerRef.append(...e)}}}k([o()],M.prototype,"changeEventEmitter",void 0),k([o()],M.prototype,"host",void 0),k([o({writable:!0})],M.prototype,"value",void 0),k([o({writable:!0})],M.prototype,"isDrawing",void 0),k([o()],M.prototype,"disabled",void 0),k([a("componentDidLoad")],M.prototype,"componentDidLoad",null),k([a("clear")],M.prototype,"handleClear",null),k([a("watchValue")],M.prototype,"watchValue",null);var O=function(e,t,i,r){var n,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,i,s):n(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s};const D=class{constructor(e){i(this,e),this.vegaChange=r(this,"vegaChange",7),this.change=r(this,"change",7),this.globalSlimmers={},this.translationSlimmer=new z,this.vegaComponentUsageRuntimeMetricsSlimmer=new d,this.vegaSignatureCaptureRenderer=new V,this.writtenModeRenderer=new L,this.writtenModeSvgController=new M,this.changeEventEmitter=x(D,g),this.formFieldController=new j({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new y:null}],validationRulesName:"validationRules",defaultValue:null,attributeGetter:e=>this[e],inputContainerGetter:()=>this.writtenModeRenderer.getSignatureCaptureContainer(),touchableAreaGetter:()=>[this.writtenModeRenderer.getSignatureCaptureContainer()]}),this.pageResizeSlimmer=new R,this.currentBreakpoint=C(),this.isDrawing=!1,this.mode="written",this.label="",this.required=!1,this.showClearBtn=!0,this.placeholder="Please sign here",this.placeholderIcon=p.getIconKey("signature"),this.disabled=!1,this.value=null,this.isValid=null,this.autoValidation=!0,this.validationRules=[],this.height="320px"}watchValue(e,t){}watchValidationRules(){}async clear(){}render(){return h(this.vegaSignatureCaptureRenderer.render(),this.host)}get host(){return n(this)}static get watchers(){return{value:["watchValue"],validationRules:["watchValidationRules"]}}};O([c()],D.prototype,"globalSlimmers",void 0),O([l()],D.prototype,"translationSlimmer",void 0),O([l()],D.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),O([l()],D.prototype,"vegaSignatureCaptureRenderer",void 0),O([l()],D.prototype,"writtenModeRenderer",void 0),O([l()],D.prototype,"writtenModeSvgController",void 0),O([l()],D.prototype,"changeEventEmitter",void 0),O([l()],D.prototype,"formFieldController",void 0),O([l()],D.prototype,"pageResizeSlimmer",void 0),D.style=':host{display:block}.signature-capture-written-container{border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1));border-radius:8px;overflow:hidden;width:100%;position:relative;background-color:rgb(252, 252, 252)}.signature-capture-written-container:hover{border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1))}.signature-capture-written-container:focus-within{border:1px solid rgba(var(--v-border-input-field-focus, 19, 98, 226, 1));outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px;border:1px solid rgba(var(--v-border-color-input-field-focus, 19, 98, 226, 1))}.signature-capture-written-container .placeholder-container{height:100%;position:absolute;top:0px;right:0px;bottom:0px;left:0px;pointer-events:none}.signature-capture-written-container .placeholder-container-content{font-family:"Inter", sans-serif;font-size:18px;font-weight:500;line-height:28px;letter-spacing:0px;color:rgba(4, 4, 28, 0.64)}@media screen and (min-width: 768px) and (max-width: 1023px){.signature-capture-written-container .placeholder-container-content{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.signature-capture-written-container .placeholder-container-content{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.signature-capture-written-container .placeholder-container-content{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}.signature-capture-written-container .placeholder-container-icon{flex-shrink:0;color:rgba(4, 4, 28, 0.64)}.signature-capture-written-container.error{border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}.signature-capture-written-container.error:hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}.signature-capture-written-container.error:focus-within{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:2px;border:1px solid rgba(var(--v-border-color-input-field-danger-focus, 233, 71, 104, 1));border:1px solid rgba(var(--v-border-input-field-danger-focus, 233, 71, 104, 1))}.signature-capture-written-container.disabled{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}.signature-capture-written-container.disabled:hover,.signature-capture-written-container.disabled:focus-within{border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}.signature-capture-written-container.disabled:focus-within{outline:none}.signature-capture-written-container.disabled .placeholder-container-content,.signature-capture-written-container.disabled .placeholder-container-icon{color:rgba(var(--v-text-input-disabled, 107, 116, 125, 1))}.signature-capture-written-footer .clear-button{flex-grow:1;padding-right:8px;text-align:right}.signature-capture-written-footer .vega-error-content{padding-top:0px;padding-right:0px;flex-grow:1}.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1));display:block;padding-right:8px;padding-left:8px}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}.vega-hidden{display:none}';export{D as vega_signature_capture}
@@ -0,0 +1 @@
1
+ import{a as r}from"./p-e0d3ca2d.js";import{I as e}from"./p-abd7aeaa.js";class i extends e{evaluate(r){var e,i;if(!this.isAcceptedInputType(r))throw new Error(`Invalid value ${r} for rich text editor`);const a=(null===(e=null==r?void 0:r.blocks)||void 0===e?void 0:e.length)>1||1===(null===(i=null==r?void 0:r.blocks)||void 0===i?void 0:i.length)&&r.blocks.some((r=>r.isNotEmpty()));return{isValid:a,message:a?"":"This field is required"}}canEvaluate(r,e){return e?this.isAcceptedInputType(r)&&!e.disabled&&e.visible:this.isAcceptedInputType(r)}shouldShowError(r){return!r.disabled&&r.visible&&(r.touched||r.modified)}isAcceptedInputType(e){return null==e||e instanceof r}}export{i as R}
@@ -0,0 +1 @@
1
+ import{h as e,H as t,r as i,c as s,g as o}from"./p-1c298d5a.js";import{R as r}from"./p-280cbcdb.js";import{s as n}from"./p-9b797118.js";import{g as a}from"./p-4bcd6612.js";import{c as l,V as p,M as d,L as h,I as c}from"./p-6e1ab235.js";import{a as v}from"./p-79ec5d69.js";import{R as f}from"./p-7f2441d6.js";import{V as g,I as u}from"./p-4387d550.js";import{D as m}from"./p-d7219734.js";import{m as x,n as b,b as w,o as y,p as j,f as I,l as S,C as R,D}from"./p-7c37e5bb.js";import{e as z,f as O}from"./p-d2ff56d8.js";import{i as C}from"./p-b0502d01.js";import{C as E}from"./p-2d0d575f.js";import{b as L}from"./p-5dce8dfe.js";import{c as T}from"./p-86194314.js";import{c as V}from"./p-1ec763ab.js";import{c as k}from"./p-613ddaab.js";import{V as A}from"./p-8284a445.js";import{F as _}from"./p-5e56f3bd.js";import{P as N}from"./p-5f589974.js";import{c as G}from"./p-57669fd6.js";import{C as P}from"./p-ac608edc.js";import{N as U,P as F}from"./p-b1f65b13.js";import{M as K}from"./p-987fbbd0.js";import{T as M}from"./p-a9354a5c.js";import{T as q}from"./p-9ab547b0.js";import"./p-abd7aeaa.js";import"./p-74168615.js";import"./p-ed45b3b6.js";import"./p-262ec334.js";import"./p-0c667d6a.js";import"./p-331a62d5.js";import"./p-032df16f.js";import"./p-33b62194.js";import"./p-6a334573.js";import"./p-0bb29d98.js";import"./p-483c483a.js";import"./p-1b860f90.js";import"./p-5f377954.js";import"./p-ff4bafa3.js";import"./p-7a40e033.js";import"./p-112455b1.js";import"./p-3a0a4d15.js";import"./p-d884c644.js";var B=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class H extends p{constructor(){super(...arguments),this.renderLabel=()=>this.label&&e("div",{class:"vega-input-select-label"},e("span",null,this.label),this.required&&e("span",{class:"vega-input-select-required"},"*")),this.renderErrorMessage=()=>e("div",{class:"vega-input-select-error-message"}),this.renderHelpMessage=()=>e("div",{class:"vega-input-select-hint"},this.hint)}render(){return e(t,{class:v([this.disabled?"vega-input-select-disabled":"",f.formatCustom(this.size)])},this.renderLabel(),this.dropdownRenderer.render(),this.renderErrorMessage(),this.hint&&this.renderHelpMessage())}}B([l()],H.prototype,"disabled",void 0),B([l()],H.prototype,"size",void 0),B([l()],H.prototype,"hint",void 0),B([l()],H.prototype,"label",void 0),B([l()],H.prototype,"required",void 0),B([l({componentFieldName:"vegaInputSelectDropdownRenderer"})],H.prototype,"dropdownRenderer",void 0);var W=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class $ extends p{constructor(){super(...arguments),this.onDropdownShow=()=>{this.isDropdownShow=!0},this.onDropdownHide=()=>{this.isDropdownShow=!1}}addDropdownObserver(e){m.addUniqueObserverToNode(e,x,(e=>{this.onDropdownShow(),this.showEventEmitter.emit(e.detail)})),m.addUniqueObserverToNode(e,b,(e=>{this.onDropdownHide(),this.hideEventEmitter.emit(e.detail)})),m.addUniqueObserverToNode(e,w,(async e=>{this.vegaInputSelectValueController.setValue(await e.host.getSelection())})),m.addUniqueObserverToNode(e,y,(e=>{this.searchEventEmitter.emit(e.detail)})),m.addUniqueObserverToNode(e,j,(e=>{this.searchTriggerEventEmitter.emit(e.detail)})),m.addUniqueObserverToNode(e,z,(e=>{const t=Array.from(e).filter((e=>!this.source.find((t=>t.id===e.itemKey)))).map((e=>({id:e.itemKey,displayName:e.label})));this.sourceController.appendSourceItems(t)}))}}W([l({writable:!0})],$.prototype,"isDropdownShow",void 0),W([l()],$.prototype,"vegaSearch",void 0),W([l()],$.prototype,"searchEventEmitter",void 0),W([l()],$.prototype,"searchTriggerEventEmitter",void 0),W([l()],$.prototype,"vegaInputSelectValueController",void 0),W([l()],$.prototype,"sourceController",void 0),W([l()],$.prototype,"source",void 0),W([l()],$.prototype,"showEventEmitter",void 0),W([l()],$.prototype,"hideEventEmitter",void 0);var J=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class Q extends p{constructor(){super(...arguments),this.handleValueChange=(e,t)=>{if("multiple"===this.selectType){t=t;const i=(e=e)?e.filter((e=>this.sourceController.getItem(e))):[];C(i,t,!0)?C(i,e,!0)||this.setValue(i):(this.setValue(i),this.changeEventEmitter.emit(i),E.notify(L,{host:this.host,detail:i}))}else if(e!==t){const t=this.sourceController.getItem(e);this.setValue(t?t.id:""),this.changeEventEmitter.emit(this.value),E.notify(L,{host:this.host,detail:this.value})}}}setValue(e){this.valueGuard(e)&&(this.value=e)}valueGuard(e){switch(this.selectType){case"single":return null===e||"string"==typeof e;case"multiple":return Array.isArray(e)&&e.every((e=>"string"==typeof e));default:return h.warn(`Invalid input select value ${e} for ${this.selectType} mode`),!1}}}J([l({writable:!0})],Q.prototype,"value",void 0),J([l()],Q.prototype,"selectType",void 0),J([l()],Q.prototype,"changeEventEmitter",void 0),J([l()],Q.prototype,"host",void 0),J([l()],Q.prototype,"sourceController",void 0),J([d("watchValue")],Q.prototype,"handleValueChange",void 0);var X=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class Y extends p{constructor(){super(...arguments),this.renderContainer=()=>e("div",{role:"button",class:"vega-input-select-container",ref:e=>this.inputSelectContainer=e,tabIndex:0,onKeyDown:T(),onBlur:this.preventBlur},this.renderPrefixIcon(),this.renderSelectContainer(),this.renderToggleIcon()),this.renderPrefixIcon=()=>this.prefixIcon&&e("div",{class:"vega-input-select-prefix-icon"},e("vega-icon",{icon:this.prefixIcon,size:"size-16"})),this.renderToggleIcon=()=>e("div",{class:"vega-input-select-toggle-icon"},e("vega-icon",{icon:A.getIconKey(this.isDropdownShow?"chevron-up":"chevron-down")})),this.renderSelectContainer=()=>e("div",{class:"vega-input-select-select-container"},e("div",{class:"vega-input-select-selected-box"},"multiple"===this.selectType?this.renderMultipleSelected():this.renderSingleSelected())),this.renderMultipleSelected=()=>this.value.length>0?e("span",{class:"vega-input-select-selected"},this.selectedLabel(this.value)):e("div",{class:"vega-input-select-placeholder"},this.translationSlimmer.t(this.placeholder)),this.renderSingleSelected=()=>{const t=this.sourceController.getItem(this.value);return t?e("span",{class:"vega-input-select-selected"},t.displayName):e("div",{class:"vega-input-select-placeholder"},this.translationSlimmer.t(this.placeholder))},this.getVegaDropdownProperties=()=>Object.assign({searchable:!0,caseSensitive:!1},this.vegaDropdownProps)}show(){return this.dropdown.show()}hide(){return this.dropdown.hide()}getDropdownRef(){return this.dropdown}getInputSelectContainerRef(){return this.inputSelectContainer}getItemsSlotRef(){return this.itemsSlotRef}render(){return e("vega-dropdown",Object.assign({trigger:"click",source:this.getDropdownSource(),selectType:this.selectType,selectedSourceKey:this.value,matchTargetWidth:!0},this.getVegaDropdownProperties(),{ref:e=>{this.dropdown=e,this.vegaInputSelectDropdownController.addDropdownObserver(e)},isLazyLoading:this.isLazyLoading}),this.renderContainer(),this.renderItemsSlot())}renderItemsSlot(){return this.host.querySelector("[slot=items]")&&e("div",{slot:"items",ref:e=>{this.itemsSlotRef=e}})}preventBlur(e){e.stopImmediatePropagation()}getDropdownSource(){return this.source.map((e=>({key:e.id,label:e.displayName})))}}A.register({"chevron-up":V,"chevron-down":k}),X([l()],Y.prototype,"value",void 0),X([l()],Y.prototype,"source",void 0),X([l()],Y.prototype,"host",void 0),X([l()],Y.prototype,"selectType",void 0),X([l()],Y.prototype,"isDropdownShow",void 0),X([l()],Y.prototype,"vegaDropdownProps",void 0),X([l()],Y.prototype,"prefixIcon",void 0),X([l()],Y.prototype,"placeholder",void 0),X([l()],Y.prototype,"selectedLabel",void 0),X([l()],Y.prototype,"isLazyLoading",void 0),X([l()],Y.prototype,"vegaInputSelectDropdownController",void 0),X([l()],Y.prototype,"sourceController",void 0),X([l()],Y.prototype,"translationSlimmer",void 0);var Z=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class ee extends p{constructor(){super(...arguments),this.hasMore=!0}componentDidLoad(){const e=this.getVirtualScroll();e&&m.addUniqueObserverToNode(e,O,this.onScrollToBottom.bind(this))}getVirtualScroll(){var e,t,i;return null===(i=null===(t=null===(e=this.vegaInputSelectDropdownRenderer.getDropdownRef().shadowRoot)||void 0===e?void 0:e.querySelector("vega-dropdown-content-box"))||void 0===t?void 0:t.shadowRoot)||void 0===i?void 0:i.querySelector("vega-virtual-scroll")}async onScrollToBottom(e){if(this.sourceLazyLoadCallback&&this.hasMore){this.isLazyLoading=!0;const t=await this.sourceLazyLoadCallback(e.endIndex);this.hasMore=t.hasMore,t.items.length>0&&this.sourceController.appendSourceItems(t.items),this.isLazyLoading=!1}}}Z([l()],ee.prototype,"sourceLazyLoadCallback",void 0),Z([l({writable:!0})],ee.prototype,"isLazyLoading",void 0),Z([l()],ee.prototype,"sourceController",void 0),Z([l()],ee.prototype,"vegaInputSelectDropdownRenderer",void 0),Z([d("componentDidLoad")],ee.prototype,"componentDidLoad",null);const te=[{payloadKey:"AUTO_VALIDATION_IS_TRUE",payloadDescription:"Specifies whether the system should automatically carry out validation checks on the user's selection in real-time, ensuring that the input adheres to predefined criteria before submission or proceeding further",payloadValue:e=>!0===e.autoValidation},{payloadKey:"AUTO_VALIDATION_IS_FALSE",payloadDescription:"Specifies whether the system should automatically carry out validation checks on the user's selection in real-time, ensuring that the input adheres to predefined criteria before submission or proceeding further",payloadValue:e=>!1===e.autoValidation},{payloadKey:"IS_USING_TEMPLATE",payloadDescription:"Contains the data records to be rendered and displayed within the input select",payloadValue:e=>0===e.source.length},{payloadKey:"IS_USING_DATA_SOURCE",payloadDescription:"Contains the data records to be rendered and displayed within the input select",payloadValue:e=>e.source.length>0}];var ie=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class se extends p{constructor(){super(...arguments),this.handleSourceChange=()=>{this.source=U(this.source,F)?this.source:[]}}appendSourceItems(e){this.source=[...this.source,...e]}getItem(e){return this.source.find((t=>t.id===e))}}ie([l({writable:!0})],se.prototype,"source",void 0),ie([d("watchSource")],se.prototype,"handleSourceChange",void 0);var oe=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class re extends p{constructor(){super(...arguments),this.mutationObserver=new K({mutationFilter:M("VEGA-DROPDOWN-ITEM"),options:{childList:!0,subtree:!0},callback:()=>this.appendHostItemsToDropdown()})}componentDidLoad(){this.appendHostItemsToDropdown()}appendHostItemsToDropdown(){const e=this.host.querySelector("[slot=items]"),t=this.vegaInputSelectDropdownRenderer.getItemsSlotRef();e&&t&&(t.remove(),this.vegaInputSelectDropdownRenderer.getDropdownRef().append(e))}}oe([c()],re.prototype,"mutationObserver",void 0),oe([l()],re.prototype,"host",void 0),oe([l()],re.prototype,"vegaInputSelectDropdownRenderer",void 0),oe([d("componentDidLoad")],re.prototype,"componentDidLoad",null);var ne=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};const ae=class{constructor(e){i(this,e),this.vegaChange=s(this,"vegaChange",7),this.change=s(this,"change",7),this.vegaSearch=s(this,"vegaSearch",7),this.search=s(this,"search",7),this.vegaSearchTrigger=s(this,"vegaSearchTrigger",7),this.searchTrigger=s(this,"searchTrigger",7),this.vegaShow=s(this,"vegaShow",7),this.vegaHide=s(this,"vegaHide",7),this.globalSlimmers={},this.translationSlimmer=new q,this.sourceController=new se,this.vegaInputSelectRenderer=new H,this.vegaInputSelectDropdownController=new $,this.vegaInputSelectValueController=new Q,this.vegaInputSelectDropdownRenderer=new Y,this.vegaInputSelectItemsSlotController=new re,this.formFieldControllerSlimmer=new _({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new r:null}],validationRulesName:"validationRules",defaultValue:e=>"multiple"===e.selectType?[]:"",attributeGetter:e=>this[e],inputContainerGetter:()=>this.vegaInputSelectDropdownRenderer.getDropdownRef(),touchableAreaGetter:()=>[this.vegaInputSelectDropdownRenderer.getInputSelectContainerRef()]}),this.pageResizeObserverSlimmer=new N,this.lazyLoadController=new ee,this.changeEventEmitter=G(ae,I),this.searchEventEmitter=G(ae,S),this.searchTriggerEventEmitter=G(ae,j),this.showEventEmitter=G(ae,R),this.hideEventEmitter=G(ae,D),this.eventPrevent=new P([S,j,R,D],(()=>this.host),!0),this.vegaComponentUsageRuntimeMetricsSlimmer=new g(te),this.isDropdownShow=!1,this.currentBreakpoint=a(),this.isLazyLoading=!1,this.label="",this.required=!1,this.selectedLabel=e=>`${e.length} Selected`,this.selectType="single",this.source=[],this.value="multiple"===this.selectType?[]:"",this.isValid=null,this.autoValidation=!0,this.validationRules=[],this.disabled=!1,this.placeholder="Please select",this.vegaDropdownProps={},this.size="default"}watchSource(){}watchValue(e,t){}watchValidationRules(){}componentWillLoad(){}async doClose(){await this.vegaInputSelectDropdownRenderer.hide()}async doOpen(){await this.vegaInputSelectDropdownRenderer.show()}async doChange(e){this.vegaInputSelectValueController.setValue(e)}render(){return n(this.vegaInputSelectRenderer.render(),this.host)}get host(){return o(this)}static get watchers(){return{source:["watchSource"],value:["watchValue"],validationRules:["watchValidationRules"]}}};ne([u()],ae.prototype,"globalSlimmers",void 0),ne([c()],ae.prototype,"translationSlimmer",void 0),ne([c()],ae.prototype,"sourceController",void 0),ne([c()],ae.prototype,"vegaInputSelectRenderer",void 0),ne([c()],ae.prototype,"vegaInputSelectDropdownController",void 0),ne([c()],ae.prototype,"vegaInputSelectValueController",void 0),ne([c()],ae.prototype,"vegaInputSelectDropdownRenderer",void 0),ne([c()],ae.prototype,"vegaInputSelectItemsSlotController",void 0),ne([c()],ae.prototype,"formFieldControllerSlimmer",void 0),ne([c()],ae.prototype,"pageResizeObserverSlimmer",void 0),ne([c()],ae.prototype,"lazyLoadController",void 0),ne([c()],ae.prototype,"changeEventEmitter",void 0),ne([c()],ae.prototype,"searchEventEmitter",void 0),ne([c()],ae.prototype,"searchTriggerEventEmitter",void 0),ne([c()],ae.prototype,"showEventEmitter",void 0),ne([c()],ae.prototype,"hideEventEmitter",void 0),ne([c()],ae.prototype,"eventPrevent",void 0),ne([c()],ae.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),ae.style=':host{display:inline-block;width:100%;min-width:0px;text-align:left;line-height:normal}:host(.default) .vega-input-select-container{padding-left:16px;padding-right:16px;padding-top:12px;padding-bottom:12px}:host(.small) .vega-input-select-container{padding-left:12px;padding-right:12px;padding-top:8px;padding-bottom:8px}:host .vega-input-select-label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));padding-bottom:8px}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-input-select-label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-input-select-label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-input-select-label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}:host .vega-input-select-label .vega-input-select-required{color:rgba(var(--v-text-error, 189, 41, 71, 1));margin-left:4px}:host .vega-input-select-container{border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1));background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border-radius:8px;gap:8px;display:block;display:flex;align-items:center;cursor:pointer}:host .vega-input-select-container:hover{border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1))}:host .vega-input-select-container:focus{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px;border:1px solid rgba(var(--v-border-color-input-field-focus, 19, 98, 226, 1))}:host .error .vega-input-select-container{border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}:host .error .vega-input-select-container:hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}:host .error .vega-input-select-container:focus{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:2px;border:1px solid rgba(var(--v-border-color-input-field-danger-focus, 233, 71, 104, 1))}:host(.vega-input-select-disabled) .vega-input-select-label{color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}:host(.vega-input-select-disabled) vega-dropdown{pointer-events:none}:host(.vega-input-select-disabled) .vega-input-select-container{border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1));background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));--tw-shadow:0 0 #0000;box-shadow:rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px}:host(.vega-input-select-disabled) .vega-input-select-container:hover{border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}:host(.vega-input-select-disabled) vega-icon{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}:host .vega-input-select-select-container{flex-grow:1;min-width:0px}:host .vega-input-select-selected{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block;min-height:24px}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-input-select-selected{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-input-select-selected{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-input-select-selected{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}:host(.vega-input-select-disabled) .vega-input-select-selected{color:rgba(var(--v-text-input-disabled, 107, 116, 125, 1))}:host .vega-input-select-placeholder{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px;color:rgba(var(--v-text-input-placeholder, 176, 180, 181, 1));overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-height:24px}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-input-select-placeholder{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-input-select-placeholder{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-input-select-placeholder{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}:host .vega-input-select-prefix-icon{text-align:center;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));font-size:0px}:host .vega-input-select-toggle-icon{width:16px;height:16px;color:rgba(var(--v-text-link, 19, 98, 226, 1))}:host .vega-error{display:inline-block;padding-left:8px;padding-right:8px;padding-top:12px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host .vega-hidden{display:none}:host .vega-input-select-hint{padding-left:8px;padding-right:8px;padding-top:12px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-input-select-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-input-select-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-input-select-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host vega-dropdown{display:block}';export{ae as vega_input_select}
@@ -0,0 +1 @@
1
+ import{C as e}from"./p-2d0d575f.js";import{d as t}from"./p-7c37e5bb.js";import{V as r,a as n}from"./p-d2ff56d8.js";import{L as i}from"./p-6e1ab235.js";import{i as s}from"./p-b1f65b13.js";import{I as o,c as a,g as c}from"./p-33b62194.js";import{c as d,a as l}from"./p-112455b1.js";import{D as u}from"./p-5dce8dfe.js";import{O as h}from"./p-331a62d5.js";var f=d((function(e){e.exports=function(){const e=/^\s+/,t=/\s+$/;function r(n,i){if(i=i||{},(n=n||"")instanceof r)return n;if(!(this instanceof r))return new r(n,i);var s=function(r){var n={r:0,g:0,b:0},i=1,s=null,o=null,a=null,c=!1,d=!1;return"string"==typeof r&&(r=function(r){r=r.replace(e,"").replace(t,"").toLowerCase();var n,i=!1;if(x[r])r=x[r],i=!0;else if("transparent"==r)return{r:0,g:0,b:0,a:0,format:"name"};return(n=L.rgb.exec(r))?{r:n[1],g:n[2],b:n[3]}:(n=L.rgba.exec(r))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=L.hsl.exec(r))?{h:n[1],s:n[2],l:n[3]}:(n=L.hsla.exec(r))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=L.hsv.exec(r))?{h:n[1],s:n[2],v:n[3]}:(n=L.hsva.exec(r))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=L.hex8.exec(r))?{r:M(n[1]),g:M(n[2]),b:M(n[3]),a:S(n[4]),format:i?"name":"hex8"}:(n=L.hex6.exec(r))?{r:M(n[1]),g:M(n[2]),b:M(n[3]),format:i?"name":"hex"}:(n=L.hex4.exec(r))?{r:M(n[1]+""+n[1]),g:M(n[2]+""+n[2]),b:M(n[3]+""+n[3]),a:S(n[4]+""+n[4]),format:i?"name":"hex8"}:!!(n=L.hex3.exec(r))&&{r:M(n[1]+""+n[1]),g:M(n[2]+""+n[2]),b:M(n[3]+""+n[3]),format:i?"name":"hex"}}(r)),"object"==typeof r&&(G(r.r)&&G(r.g)&&G(r.b)?(l=r.r,u=r.g,h=r.b,n={r:255*k(l,255),g:255*k(u,255),b:255*k(h,255)},c=!0,d="%"===String(r.r).substr(-1)?"prgb":"rgb"):G(r.h)&&G(r.s)&&G(r.v)?(s=O(r.s),o=O(r.v),n=function(e,t,r){e=6*k(e,360),t=k(t,100),r=k(r,100);var n=Math.floor(e),i=e-n,s=r*(1-t),o=r*(1-i*t),a=r*(1-(1-i)*t),c=n%6;return{r:255*[r,o,s,s,a,r][c],g:255*[a,r,r,o,s,s][c],b:255*[s,s,a,r,r,o][c]}}(r.h,s,o),c=!0,d="hsv"):G(r.h)&&G(r.s)&&G(r.l)&&(s=O(r.s),a=O(r.l),n=function(e,t,r){var n,i,s;function o(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}if(e=k(e,360),t=k(t,100),r=k(r,100),0===t)n=i=s=r;else{var a=r<.5?r*(1+t):r+t-r*t,c=2*r-a;n=o(c,a,e+1/3),i=o(c,a,e),s=o(c,a,e-1/3)}return{r:255*n,g:255*i,b:255*s}}(r.h,s,a),c=!0,d="hsl"),r.hasOwnProperty("a")&&(i=r.a)),i=y(i),{ok:c,format:r.format||d,r:Math.min(255,Math.max(n.r,0)),g:Math.min(255,Math.max(n.g,0)),b:Math.min(255,Math.max(n.b,0)),a:i};var l,u,h}(n);this._originalInput=n,this._r=s.r,this._g=s.g,this._b=s.b,this._a=s.a,this._roundA=Math.round(100*this._a)/100,this._format=i.format||s.format,this._gradientType=i.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=s.ok}function n(e,t,r){e=k(e,255),t=k(t,255),r=k(r,255);var n,i,s=Math.max(e,t,r),o=Math.min(e,t,r),a=(s+o)/2;if(s==o)n=i=0;else{var c=s-o;switch(i=a>.5?c/(2-s-o):c/(s+o),s){case e:n=(t-r)/c+(t<r?6:0);break;case t:n=(r-e)/c+2;break;case r:n=(e-t)/c+4}n/=6}return{h:n,s:i,l:a}}function i(e,t,r){e=k(e,255),t=k(t,255),r=k(r,255);var n,i,s=Math.max(e,t,r),o=Math.min(e,t,r),a=s,c=s-o;if(i=0===s?0:c/s,s==o)n=0;else{switch(s){case e:n=(t-r)/c+(t<r?6:0);break;case t:n=(r-e)/c+2;break;case r:n=(e-t)/c+4}n/=6}return{h:n,s:i,v:a}}function s(e,t,r,n){var i=[E(Math.round(e).toString(16)),E(Math.round(t).toString(16)),E(Math.round(r).toString(16))];return n&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function o(e,t,r,n){return[E(N(n)),E(Math.round(e).toString(16)),E(Math.round(t).toString(16)),E(Math.round(r).toString(16))].join("")}function a(e,t){t=0===t?0:t||10;var n=r(e).toHsl();return n.s-=t/100,n.s=A(n.s),r(n)}function c(e,t){t=0===t?0:t||10;var n=r(e).toHsl();return n.s+=t/100,n.s=A(n.s),r(n)}function d(e){return r(e).desaturate(100)}function l(e,t){t=0===t?0:t||10;var n=r(e).toHsl();return n.l+=t/100,n.l=A(n.l),r(n)}function u(e,t){t=0===t?0:t||10;var n=r(e).toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(-t/100*255))),n.g=Math.max(0,Math.min(255,n.g-Math.round(-t/100*255))),n.b=Math.max(0,Math.min(255,n.b-Math.round(-t/100*255))),r(n)}function h(e,t){t=0===t?0:t||10;var n=r(e).toHsl();return n.l-=t/100,n.l=A(n.l),r(n)}function f(e,t){var n=r(e).toHsl(),i=(n.h+t)%360;return n.h=i<0?360+i:i,r(n)}function b(e){var t=r(e).toHsl();return t.h=(t.h+180)%360,r(t)}function g(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var n=r(e).toHsl(),i=[r(e)],s=360/t,o=1;o<t;o++)i.push(r({h:(n.h+o*s)%360,s:n.s,l:n.l}));return i}function v(e){var t=r(e).toHsl(),n=t.h;return[r(e),r({h:(n+72)%360,s:t.s,l:t.l}),r({h:(n+216)%360,s:t.s,l:t.l})]}function p(e,t,n){t=t||6,n=n||30;var i=r(e).toHsl(),s=360/n,o=[r(e)];for(i.h=(i.h-(s*t>>1)+720)%360;--t;)i.h=(i.h+s)%360,o.push(r(i));return o}function m(e,t){t=t||6;for(var n=r(e).toHsv(),i=n.h,s=n.s,o=n.v,a=[],c=1/t;t--;)a.push(r({h:i,s,v:o})),o=(o+c)%1;return a}r.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,r,n=this.toRgb();return t=n.g/255,r=n.b/255,.2126*((e=n.r/255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))},setAlpha:function(e){return this._a=y(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=i(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=i(this._r,this._g,this._b),t=Math.round(360*e.h),r=Math.round(100*e.s),n=Math.round(100*e.v);return 1==this._a?"hsv("+t+", "+r+"%, "+n+"%)":"hsva("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var e=n(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=n(this._r,this._g,this._b),t=Math.round(360*e.h),r=Math.round(100*e.s),i=Math.round(100*e.l);return 1==this._a?"hsl("+t+", "+r+"%, "+i+"%)":"hsla("+t+", "+r+"%, "+i+"%, "+this._roundA+")"},toHex:function(e){return s(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,r,n,i){var s=[E(Math.round(e).toString(16)),E(Math.round(t).toString(16)),E(Math.round(r).toString(16)),E(N(n))];return i&&s[0].charAt(0)==s[0].charAt(1)&&s[1].charAt(0)==s[1].charAt(1)&&s[2].charAt(0)==s[2].charAt(1)&&s[3].charAt(0)==s[3].charAt(1)?s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0)+s[3].charAt(0):s.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*k(this._r,255))+"%",g:Math.round(100*k(this._g,255))+"%",b:Math.round(100*k(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*k(this._r,255))+"%, "+Math.round(100*k(this._g,255))+"%, "+Math.round(100*k(this._b,255))+"%)":"rgba("+Math.round(100*k(this._r,255))+"%, "+Math.round(100*k(this._g,255))+"%, "+Math.round(100*k(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(w[s(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+o(this._r,this._g,this._b,this._a),n=t,i=this._gradientType?"GradientType = 1, ":"";if(e){var s=r(e);n="#"+o(s._r,s._g,s._b,s._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var r=!1;return t||!(this._a<1&&this._a>=0)||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(r=this.toRgbString()),"prgb"===e&&(r=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(r=this.toHexString()),"hex3"===e&&(r=this.toHexString(!0)),"hex4"===e&&(r=this.toHex8String(!0)),"hex8"===e&&(r=this.toHex8String()),"name"===e&&(r=this.toName()),"hsl"===e&&(r=this.toHslString()),"hsv"===e&&(r=this.toHsvString()),r||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return r(this.toString())},_applyModification:function(e,t){var r=e.apply(null,[this].concat([].slice.call(t)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(l,arguments)},brighten:function(){return this._applyModification(u,arguments)},darken:function(){return this._applyModification(h,arguments)},desaturate:function(){return this._applyModification(a,arguments)},saturate:function(){return this._applyModification(c,arguments)},greyscale:function(){return this._applyModification(d,arguments)},spin:function(){return this._applyModification(f,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(p,arguments)},complement:function(){return this._applyCombination(b,arguments)},monochromatic:function(){return this._applyCombination(m,arguments)},splitcomplement:function(){return this._applyCombination(v,arguments)},triad:function(){return this._applyCombination(g,[3])},tetrad:function(){return this._applyCombination(g,[4])}},r.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var i in e)e.hasOwnProperty(i)&&(n[i]="a"===i?e[i]:O(e[i]));e=n}return r(e,t)},r.equals=function(e,t){return!(!e||!t)&&r(e).toRgbString()==r(t).toRgbString()},r.random=function(){return r.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},r.mix=function(e,t,n){n=0===n?0:n||50;var i=r(e).toRgb(),s=r(t).toRgb(),o=n/100;return r({r:(s.r-i.r)*o+i.r,g:(s.g-i.g)*o+i.g,b:(s.b-i.b)*o+i.b,a:(s.a-i.a)*o+i.a})},r.readability=function(e,t){var n=r(e),i=r(t);return(Math.max(n.getLuminance(),i.getLuminance())+.05)/(Math.min(n.getLuminance(),i.getLuminance())+.05)},r.isReadable=function(e,t,n){var i,s,o,a,c,d=r.readability(e,t);switch(s=!1,(o=n,"AA"!==(a=((o=o||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==a&&(a="AA"),"small"!==(c=(o.size||"small").toLowerCase())&&"large"!==c&&(c="small"),i={level:a,size:c}).level+i.size){case"AAsmall":case"AAAlarge":s=d>=4.5;break;case"AAlarge":s=d>=3;break;case"AAAsmall":s=d>=7}return s},r.mostReadable=function(e,t,n){var i,s,o,a,c=null,d=0;s=(n=n||{}).includeFallbackColors,o=n.level,a=n.size;for(var l=0;l<t.length;l++)(i=r.readability(e,t[l]))>d&&(d=i,c=r(t[l]));return r.isReadable(e,c,{level:o,size:a})||!s?c:(n.includeFallbackColors=!1,r.mostReadable(e,["#fff","#000"],n))};var x=r.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},w=r.hexNames=function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}(x);function y(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function k(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var r=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=Math.min(t,Math.max(0,parseFloat(e))),r&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function A(e){return Math.min(1,Math.max(0,e))}function M(e){return parseInt(e,16)}function E(e){return 1==e.length?"0"+e:""+e}function O(e){return e<=1&&(e=100*e+"%"),e}function N(e){return Math.round(255*parseFloat(e)).toString(16)}function S(e){return M(e)/255}var T,C,I,L=(C="[\\s|\\(]+("+(T="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+T+")[,|\\s]+("+T+")\\s*\\)?",I="[\\s|\\(]+("+T+")[,|\\s]+("+T+")[,|\\s]+("+T+")[,|\\s]+("+T+")\\s*\\)?",{CSS_UNIT:new RegExp(T),rgb:new RegExp("rgb"+C),rgba:new RegExp("rgba"+I),hsl:new RegExp("hsl"+C),hsla:new RegExp("hsla"+I),hsv:new RegExp("hsv"+C),hsva:new RegExp("hsva"+I),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function G(e){return!!L.CSS_UNIT.exec(e)}return r}()}));const b=e=>{if(!e)return"";const{r:t,g:r,b:n,a:i}=e.toRgb();return`${t} ${r} ${n} / ${i}`},g=[{name:"bg-action",overrideGetter:(e,t)=>{const r=e.actionColor;if(!r)return"";const n=r?t(r):void 0;let i=n?n.clone():void 0;return b(i)}},{name:"dark-bg-action"},{name:"bg-action-hover",overrideGetter:(e,t)=>{const r=e.actionColor;if(!r)return"";const n=r?t(r):void 0;let i=n?n.clone():void 0;return i=(null==n?void 0:n.isDark())?null==i?void 0:i.lighten(10):null==i?void 0:i.lighten(-10),b(i)}},{name:"dark-bg-action-hover"},{name:"bg-action-focus",overrideGetter:(e,t)=>{const r=e.actionColor;if(!r)return"";const n=r?t(r):void 0;let i=n?n.clone():void 0;return b(i)}},{name:"dark-bg-action-focus"},{name:"bg-action-active",overrideGetter:(e,t)=>{const r=e.actionColor;if(!r)return"";const n=r?t(r):void 0;let i=n?n.clone():void 0;return i=(null==n?void 0:n.isDark())?null==i?void 0:i.lighten(15):null==i?void 0:i.lighten(-15),b(i)}},{name:"dark-bg-action-active"},{name:"bg-action-secondary-hover",overrideGetter:(e,t)=>{const r=e.actionColor;if(!r)return"";const n=r?t(r):void 0;let i=n?n.clone():void 0;return i=(null==n?void 0:n.isDark())?null==i?void 0:i.lighten(10):null==i?void 0:i.lighten(-10),i=null==i?void 0:i.setAlpha(.15),b(i)}},{name:"dark-bg-action-secondary-hover"},{name:"bg-action-secondary-active",overrideGetter:(e,t)=>{const r=e.actionColor;if(!r)return"";const n=r?t(r):void 0;let i=n?n.clone():void 0;return i=(null==n?void 0:n.isDark())?null==i?void 0:i.lighten(20):null==i?void 0:i.lighten(-20),i=null==i?void 0:i.setAlpha(.15),b(i)}},{name:"dark-bg-action-secondary-active"},{name:"bg-divider",overrideGetter:(e,t)=>{const r=e.actionColor;if(!r)return"";const n=r?t(r):void 0;let i=n?n.clone():void 0;return i=null==i?void 0:i.setAlpha(.6),b(i)}},{name:"dark-bg-divider"},{name:"bg-keypad-btn-active",overrideGetter:(e,t)=>{const r=e.actionColor;if(!r)return"";const n=r?t(r):void 0;let i=n?n.clone():void 0;return i=null==i?void 0:i.setAlpha(.3),b(i)}},{name:"dark-bg-keypad-btn-active"},{name:"bg-selected",overrideGetter:(e,t)=>{const r=e.actionColor;if(!r)return"";const n=r?t(r):void 0;let i=n?n.clone():void 0;return i=(null==n?void 0:n.isDark())?null==i?void 0:i.lighten(10):null==i?void 0:i.lighten(-10),i=null==i?void 0:i.setAlpha(.25),b(i)}},{name:"dark-bg-selected"},{name:"bg-sidebar",overrideGetter:(e,t)=>{const r=e.sidebarColor;if(!r)return"";const n=r?t(r):void 0;let i=n?n.clone():void 0;return b(i)}},{name:"dark-bg-sidebar"},{name:"bg-sidebar-item-hover",overrideGetter:(e,t)=>{const r=e.sidebarColor;if(!r)return"";const n=r?t(r):void 0;let i=n?n.clone():void 0;return i=(null==n?void 0:n.isDark())?t({a:.9,r:255,b:255,g:255}):t({a:.86,r:15,b:15,g:15}),b(i)}},{name:"dark-bg-sidebar-item-hover"},{name:"bg-sidebar-item-selected",overrideGetter:(e,t)=>{const r=e.actionColor;if(!r)return"";const n=r?t(r):void 0;let i=n?n.clone():void 0;return i=null==i?void 0:i.setAlpha(.4),b(i)}},{name:"dark-bg-sidebar-item-selected"},{name:"bg-table-selected-row",overrideGetter:(e,t)=>{const r=e.actionColor;if(!r)return"";const n=r?t(r):void 0;let i=n?n.clone():void 0;return i=null==i?void 0:i.setAlpha(.2),b(i)}},{name:"dark-bg-table-selected-row"},{name:"bg-toggle-switch-selected-disabled",overrideGetter:(e,t)=>{const r=e.actionColor;if(!r)return"";const n=r?t(r):void 0;let i=n?n.clone():void 0;return i=null==i?void 0:i.setAlpha(.5),b(i)}},{name:"dark-bg-toggle-switch-selected-disabled"},{name:"bg-date-picker-range",overrideGetter:(e,t)=>{const r=e.actionColor;if(!r)return"";const n=r?t(r):void 0;let i=n?n.clone():void 0;return i=(null==n?void 0:n.isDark())?null==i?void 0:i.lighten(10):null==i?void 0:i.lighten(-10),i=null==i?void 0:i.setAlpha(.15),b(i)}},{name:"dark-bg-date-picker-range"},{name:"text-link",overrideGetter:(e,t)=>{const r=e.actionColor;if(!r)return"";const n=r?t(r):void 0;let i=n?n.clone():void 0;return b(i)}},{name:"dark-text-link"},{name:"text-link-hover",overrideGetter:(e,t)=>{const r=e.actionColor;if(!r)return"";const n=r?t(r):void 0;let i=n?n.clone():void 0;return i=(null==n?void 0:n.isDark())?null==i?void 0:i.lighten(10):null==i?void 0:i.lighten(-10),b(i)}},{name:"dark-text-link-hover"},{name:"text-link-active",overrideGetter:(e,t)=>{const r=e.actionColor;if(!r)return"";const n=r?t(r):void 0;let i=n?n.clone():void 0;return i=(null==n?void 0:n.isDark())?null==i?void 0:i.lighten(15):null==i?void 0:i.lighten(-15),b(i)}},{name:"dark-text-link-active"},{name:"text-link-focus",overrideGetter:(e,t)=>{const r=e.actionColor;if(!r)return"";const n=r?t(r):void 0;let i=n?n.clone():void 0;return i=(null==n?void 0:n.isDark())?null==i?void 0:i.lighten(10):null==i?void 0:i.lighten(-10),b(i)}},{name:"dark-text-link-focus"},{name:"text-link-visited",overrideGetter:(e,t)=>{const r=e.actionColor;if(!r)return"";const n=r?t(r):void 0;let i=n?n.clone():void 0;return i=(null==n?void 0:n.isDark())?null==i?void 0:i.lighten(20):null==i?void 0:i.lighten(-22),b(i)}},{name:"dark-text-link-visited"},{name:"text-sidebar-link",overrideGetter:(e,t)=>{const r=e.sidebarColor;if(!r)return"";const n=r?t(r):void 0;let i=n?n.clone():void 0;return i=(null==n?void 0:n.isDark())?t({a:.9,b:255,r:255,g:255}):t({a:.86,b:15,r:15,g:15}),b(i)}},{name:"dark-text-sidebar-link"},{name:"text-sidebar-link-hover",overrideGetter:(e,t)=>{const r=e.sidebarColor;if(!r)return"";const n=r?t(r):void 0;let i=n?n.clone():void 0;return i=(null==n?void 0:n.isDark())?t({a:.86,r:15,b:15,g:15}):t({a:.9,r:255,b:255,g:255}),b(i)}},{name:"dark-text-sidebar-link-hover"},{name:"text-sidebar-link-selected",overrideGetter:(e,t)=>{const r=e.sidebarColor;if(!r)return"";const n=r?t(r):void 0;let i=n?n.clone():void 0;return i=(null==n?void 0:n.isDark())?t({a:.9,r:255,b:255,g:255}):t({a:.86,b:15,r:15,g:15}),b(i)}},{name:"dark-text-sidebar-link-selected"},{name:"border-color-action",overrideGetter:(e,t)=>{const r=e.actionColor;if(!r)return"";const n=r?t(r):void 0;let i=n?n.clone():void 0;return b(i)}},{name:"dark-border-color-action"},{name:"border-color-action-hover",overrideGetter:(e,t)=>{const r=e.actionColor;if(!r)return"";const n=r?t(r):void 0;let i=n?n.clone():void 0;return i=(null==n?void 0:n.isDark())?null==i?void 0:i.lighten(10):null==i?void 0:i.lighten(-10),b(i)}},{name:"dark-border-color-action-hover"},{name:"border-color-action-active",overrideGetter:(e,t)=>{const r=e.actionColor;if(!r)return"";const n=r?t(r):void 0;let i=n?n.clone():void 0;return i=(null==n?void 0:n.isDark())?null==i?void 0:i.lighten(15):null==i?void 0:i.lighten(-15),b(i)}},{name:"dark-border-color-action-active"},{name:"border-color-divider",overrideGetter:(e,t)=>{const r=e.actionColor;if(!r)return"";const n=r?t(r):void 0;let i=n?n.clone():void 0;return i=null==i?void 0:i.setAlpha(.6),b(i)}},{name:"dark-border-color-divider"},{name:"border-color-divider-secondary",overrideGetter:(e,t)=>{const r=e.actionColor;if(!r)return"";const n=r?t(r):void 0;let i=n?n.clone():void 0;return i=(null==n?void 0:n.isDark())?null==i?void 0:i.lighten(15):null==i?void 0:i.lighten(-15),i=null==i?void 0:i.setAlpha(.4),b(i)}},{name:"dark-border-color-divider-secondary"},{name:"border-color-input-field",overrideGetter:(e,t)=>{const r=e.actionColor;if(!r)return"";const n=r?t(r):void 0;let i=n?n.clone():void 0;return i=null==i?void 0:i.setAlpha(.6),b(i)}},{name:"dark-border-color-input-field"},{name:"border-color-input-field-hover",overrideGetter:(e,t)=>{const r=e.actionColor;if(!r)return"";const n=r?t(r):void 0;let i=n?n.clone():void 0;return i=(null==n?void 0:n.isDark())?null==i?void 0:i.lighten(10):null==i?void 0:i.lighten(-10),i=null==i?void 0:i.setAlpha(.6),b(i)}},{name:"dark-border-color-input-field-hover"},{name:"border-color-input-field-focus",overrideGetter:(e,t)=>{const r=e.actionColor;if(!r)return"";const n=r?t(r):void 0;let i=n?n.clone():void 0;return i=(null==n?void 0:n.isDark())?null==i?void 0:i.lighten(15):null==i?void 0:i.lighten(-15),i=null==i?void 0:i.setAlpha(.6),b(i)}},{name:"dark-border-color-input-field-focus"},{name:"border-color-input-field-disabled",overrideGetter:(e,t)=>{const r=e.actionColor;if(!r)return"";const n=r?t(r):void 0;let i=n?n.clone():void 0;return i=t({a:.2,r:15,b:15,g:15}),b(i)}},{name:"dark-border-color-input-field-disabled"},{name:"border-color-tile-focus",overrideGetter:(e,t)=>{const r=e.actionColor;if(!r)return"";const n=r?t(r):void 0;let i=n?n.clone():void 0;return b(i)}},{name:"dark-border-color-tile-focus"},{name:"border-color-tile-selected-focus",overrideGetter:(e,t)=>{const r=e.actionColor;if(!r)return"";const n=r?t(r):void 0;let i=n?n.clone():void 0;return i=(null==n?void 0:n.isDark())?null==i?void 0:i.lighten(15):null==i?void 0:i.lighten(-15),i=null==i?void 0:i.setAlpha(.6),b(i)}},{name:"dark-border-color-tile-selected-focus"},{name:"border-color-tile-selected",overrideGetter:(e,t)=>{const r=e.actionColor;if(!r)return"";const n=r?t(r):void 0;let i=n?n.clone():void 0;return b(i)}},{name:"dark-border-color-tile-selected"},{name:"border-color-tile-selected-hover",overrideGetter:(e,t)=>{const r=e.actionColor;if(!r)return"";const n=r?t(r):void 0;let i=n?n.clone():void 0;return i=(null==n?void 0:n.isDark())?null==i?void 0:i.lighten(10):null==i?void 0:i.lighten(-10),b(i)}},{name:"dark-border-color-tile-selected-hover"}],v=e=>{if(!e)return"";const{r:t,g:r,b:n,a:i}=e.toRgb();return`${t} ${r} ${n} / ${i}`},p=[{name:"border-secondary-btn",overrideGetter:(e,t)=>{const r=e.actionColor;if(!r)return"";const n=r?t(r):void 0;let i=n?n.clone():void 0;return v(i)}},{name:"dark-border-secondary-btn"},{name:"border-secondary-btn-hover",overrideGetter:(e,t)=>{const r=e.actionColor;if(!r)return"";const n=r?t(r):void 0;let i=n?n.clone():void 0;return i=(null==n?void 0:n.isDark())?null==i?void 0:i.lighten(10):null==i?void 0:i.lighten(-10),v(i)}},{name:"dark-border-secondary-btn-hover"},{name:"border-secondary-btn-active",overrideGetter:(e,t)=>{const r=e.actionColor;if(!r)return"";const n=r?t(r):void 0;let i=n?n.clone():void 0;return i=(null==n?void 0:n.isDark())?null==i?void 0:i.lighten(15):null==i?void 0:i.lighten(-15),v(i)}},{name:"dark-border-secondary-btn-active"},{name:"border-input-field",overrideGetter:(e,t)=>{const r=e.actionColor;if(!r)return"";const n=r?t(r):void 0;let i=n?n.clone():void 0;return i=null==i?void 0:i.setAlpha(.6),v(i)}},{name:"dark-border-input-field"},{name:"border-input-field-hover",overrideGetter:(e,t)=>{const r=e.actionColor;if(!r)return"";const n=r?t(r):void 0;let i=n?n.clone():void 0;return i=(null==n?void 0:n.isDark())?null==i?void 0:i.lighten(10):null==i?void 0:i.lighten(-10),i=null==i?void 0:i.setAlpha(.6),v(i)}},{name:"dark-border-input-field-hover"},{name:"border-input-field-focus",overrideGetter:(e,t)=>{const r=e.actionColor;if(!r)return"";const n=r?t(r):void 0;let i=n?n.clone():void 0;return i=(null==n?void 0:n.isDark())?null==i?void 0:i.lighten(15):null==i?void 0:i.lighten(-15),i=null==i?void 0:i.setAlpha(.6),v(i)}},{name:"dark-border-input-field-focus"},{name:"border-input-field-disabled",overrideGetter:(e,t)=>{const r=e.actionColor;if(!r)return"";const n=r?t(r):void 0;let i=n?n.clone():void 0;return i=t({a:.2,r:15,b:15,g:15}),v(i)}},{name:"dark-border-input-field-disabled"},{name:"border-divider",overrideGetter:(e,t)=>{const r=e.actionColor;if(!r)return"";const n=r?t(r):void 0;let i=n?n.clone():void 0;return i=null==i?void 0:i.setAlpha(.6),v(i)}},{name:"dark-border-divider"},{name:"border-divider-secondary",overrideGetter:(e,t)=>{const r=e.actionColor;if(!r)return"";const n=r?t(r):void 0;let i=n?n.clone():void 0;return i=(null==n?void 0:n.isDark())?null==i?void 0:i.lighten(15):null==i?void 0:i.lighten(-15),i=null==i?void 0:i.setAlpha(.4),v(i)}},{name:"dark-border-divider-secondary"},{name:"border-tile-selected",overrideGetter:(e,t)=>{const r=e.actionColor;if(!r)return"";const n=r?t(r):void 0;let i=n?n.clone():void 0;return v(i)}},{name:"dark-border-tile-selected"},{name:"border-tile-selected-hover",overrideGetter:(e,t)=>{const r=e.actionColor;if(!r)return"";const n=r?t(r):void 0;let i=n?n.clone():void 0;return i=(null==n?void 0:n.isDark())?null==i?void 0:i.lighten(10):null==i?void 0:i.lighten(-10),v(i)}},{name:"dark-border-tile-selected-hover"},{name:"border-tile-focus",overrideGetter:(e,t)=>{const r=e.actionColor;if(!r)return"";const n=r?t(r):void 0;let i=n?n.clone():void 0;return v(i)}},{name:"dark-border-tile-focus"},{name:"border-tile-selected-focus",overrideGetter:(e,t)=>{const r=e.actionColor;if(!r)return"";const n=r?t(r):void 0;let i=n?n.clone():void 0;return i=(null==n?void 0:n.isDark())?null==i?void 0:i.lighten(15):null==i?void 0:i.lighten(-15),i=null==i?void 0:i.setAlpha(.6),v(i)}},{name:"dark-border-tile-selected-focus"}],m=e=>{if(!e)return"";const{r:t,g:r,b:n,a:i}=e.toRgb();return`${t} ${r} ${n} / ${i}`},x=[{name:"ring-input-focus",overrideGetter:(e,t)=>{const r=e.actionColor;if(!r)return"";const n=r?t(r):void 0;let i=n?n.clone():void 0;return i=null==i?void 0:i.setAlpha(.25),m(i)}},{name:"dark-ring-input-focus"},{name:"ring-action-focus",overrideGetter:(e,t)=>{const r=e.actionColor;if(!r)return"";const n=r?t(r):void 0;let i=n?n.clone():void 0;return i=null==i?void 0:i.setAlpha(.25),m(i)}},{name:"dark-ring-action-focus"}],w=new class{generateOverrideThemes(e){return this.getOverridableTokens().map((t=>({name:t.name,value:this.parseCssVarValue(t,e)})))}applyTheme(e){this.getOverrideThemeContainer().innerHTML=`\n:root {\n\t\t${e.filter((e=>!!e.value)).map((e=>`--v-${e.name}: ${e.value};`)).join("\n\t\t")}\n}\n\t\t\t\t`}getOverrideThemeContainer(){let e=document.head.querySelector("#vegaCustomOverrideTheme");return e||(e=document.createElement("style"),e.id="vegaCustomOverrideTheme",document.head.append(e)),e}getOverridableTokens(){return[...g,...p,...x]}parseCssVarValue(e,t){var r;return null===(r=e.overrideGetter)||void 0===r?void 0:r.call(e,t,f)}},y={"bg-brand":"176, 180, 181, 1","bg-page":"24, 24, 48, 1","bg-primary":"4, 4, 28, 1","bg-secondary":"18, 18, 39, 1","bg-tertiary":"24, 24, 48, 1","bg-quaternary":"70, 71, 101, 1","bg-inverted-primary":"252, 252, 252, 1","bg-inverted-secondary":"247, 247, 247, 1","bg-inverted-tertiary":"240, 243, 247, 1","bg-inverted-quaternary":"241, 248, 251, 1","bg-action":"0, 187, 255, 1","bg-action-hover":"0, 204, 255, 1","bg-action-focus":"0, 187, 255, 1","bg-action-active":"4, 165, 245, 1","bg-action-quaternary":"51, 57, 61, 1","bg-action-quaternary-hover":"89, 96, 99, 1","bg-action-quaternary-active":"24, 24, 48, 1","bg-action-secondary":"0, 0, 0, 0","bg-action-secondary-hover":"0, 204, 255, 0.2","bg-action-secondary-active":"4, 165, 245, 0.2","bg-action-tertiary":"0, 0, 0, 0","bg-action-tertiary-hover":"252, 252, 252, 0.2","bg-action-tertiary-active":"252, 252, 252, 0.1","bg-app-header":"24, 24, 48, 0.92","bg-backdrop-modal":"70, 71, 101, 0.8","bg-backdrop-popover":"70, 71, 101, 0.56","bg-backdrop-sidebar":"70, 71, 101, 0.8","bg-chip":"252, 252, 252, 0.1","bg-chip-hover":"252, 252, 252, 0.2","bg-chip-active":"252, 252, 252, 0.06","bg-danger":"255, 56, 97, 1","bg-danger-hover":"255, 71, 123, 1","bg-danger-focus":"255, 56, 97, 1","bg-danger-active":"230, 50, 87, 1","bg-danger-tertiary":"0, 0, 0, 0","bg-danger-tertiary-hover":"255, 71, 123, 0.2","bg-danger-tertiary-active":"230, 50, 87, 0.2","bg-disabled":"70, 71, 101, 1","bg-divider":"32, 54, 69, 1","bg-divider-secondary":"51, 57, 61, 1","bg-keypad-btn-active":"45, 76, 97, 1","bg-loading-progress":"4, 165, 245, 1","bg-loading-track":"142, 223, 249, 1","bg-segment-hover":"70, 71, 101, 1","bg-segment-control":"210, 208, 223, 0.1","bg-selected":"85, 218, 255, 0.3","bg-sidebar":"18, 18, 39, 1","bg-sidebar-icon":"188, 186, 213, 1","bg-sidebar-icon-hover":"18, 18, 39, 1","bg-sidebar-icon-selected":"252, 252, 252, 1","bg-sidebar-item-hover":"252, 252, 252, 1","bg-sidebar-item-selected":"0, 187, 255, 0.4","bg-site-footer":"51, 57, 61, 1","bg-site-footer-action":"171, 198, 216, 1","bg-site-footer-action-hover":"199, 217, 229, 1","bg-site-footer-action-active":"143, 179, 203, 1","bg-site-footer-field":"89, 96, 99, 1","bg-slider-handle":"252, 252, 252, 1","bg-status-error":"189, 41, 71, 1","bg-status-info":"252, 252, 252, 1","bg-status-success":"123, 242, 151, 1","bg-status-warning":"255, 212, 105, 1","bg-tab":"51, 57, 61, 1","bg-tab-hover":"89, 96, 99, 1","bg-tab-selected":"240, 243, 247, 1","bg-table-alt-row":"18, 18, 39, 1","bg-table-header":"24, 24, 48, 1","bg-table-row-hover":"70, 71, 101, 1","bg-table-row-selected-expanded":"32, 54, 69, 1","bg-table-selected-row":"45, 76, 97, 1","bg-textarea-count":"252, 252, 252, 0.5","bg-tile":"4, 4, 28, 1","bg-tile-hover":"24, 24, 48, 1","bg-tile-selected":"32, 54, 69, 1","bg-tile-selected-hover":"45, 76, 97, 1","bg-toggle-switch":"210, 208, 223, 1","bg-toggle-switch-hover":"188, 186, 213, 1","bg-toggle-switch-selected-disabled":"0, 75, 128, 1","bg-transparent":"0, 0, 0, 0","bg-accent1-primary":"109, 217, 202, 1","bg-accent1-secondary":"174, 234, 226, 1","bg-accent1-tertiary":"223, 247, 243, 1","bg-accent2-primary":"95, 56, 206, 1","bg-accent2-secondary":"184, 167, 233, 1","bg-accent2-tertiary":"219, 211, 244, 1","bg-accent3-primary":"255, 203, 105, 1","bg-accent3-secondary":"251, 226, 185, 1","bg-accent3-tertiary":"255, 243, 222, 1","bg-accent4-primary":"255, 129, 87, 1","bg-accent4-secondary":"255, 185, 162, 1","bg-accent4-tertiary":"255, 227, 218, 1","bg-accent5-primary":"4, 165, 245, 1","bg-accent5-secondary":"85, 218, 255, 1","bg-accent5-tertiary":"227, 247, 253, 1","bg-accent6-primary":"255, 84, 165, 1","bg-accent6-secondary":"255, 179, 215, 1","bg-accent6-tertiary":"255, 217, 235, 1","bg-accent7-primary":"37, 159, 159, 1","bg-accent7-secondary":"155, 212, 214, 1","bg-accent7-tertiary":"208, 239, 239, 1","bg-accent8-primary":"86, 61, 130, 1","bg-accent8-secondary":"199, 162, 204, 1","bg-accent8-tertiary":"230, 214, 234, 1","bg-accent9-primary":"255, 191, 63, 1","bg-accent9-secondary":"254, 215, 142, 1","bg-accent9-tertiary":"251, 226, 185, 1","bg-accent10-primary":"237, 122, 35, 1","bg-accent10-secondary":"241, 146, 85, 1","bg-accent10-tertiary":"245, 187, 148, 1","bg-date-picker-range":"32, 54, 69, 1","text-primary":"252, 252, 252, 1","text-secondary":"188, 186, 213, 1","text-inverted-primary":"4, 4, 28, 1","text-inverted-secondary":"107, 116, 125, 1","text-black":"32, 54, 69, 1","text-white":"252, 252, 252, 1","text-brand":"176, 180, 181, 1","text-danger-link":"255, 56, 97, 1","text-danger-link-hover":"255, 71, 123, 1","text-danger-link-active":"230, 50, 87, 1","text-danger-link-focus":"255, 82, 136, 1","text-danger-link-visited":"255, 56, 97, 1","text-disabled":"70, 71, 101, 1","text-error":"255, 56, 97, 1","text-input-disabled":"176, 180, 181, 1","text-input-placeholder":"89, 96, 99, 1","text-link":"0, 187, 255, 1","text-link-hover":"0, 204, 255, 1","text-link-active":"4, 165, 245, 1","text-link-focus":"0, 204, 255, 1","text-link-visited":"128, 107, 255, 1","text-on-action":"4, 4, 28, 1","text-on-danger":"4, 4, 28, 1","text-on-disabled":"4, 4, 28, 1","text-sidebar-link":"188, 186, 213, 1","text-sidebar-link-hover":"18, 18, 39, 1","text-sidebar-link-selected":"252, 252, 252, 1","text-site-footer-link":"171, 198, 216, 1","text-site-footer-link-hover":"199, 217, 229, 1","text-site-footer-link-active":"143, 179, 203, 1","text-success":"89, 217, 119, 1","text-inverted-success":"1, 128, 31, 1","text-accent1-primary":"109, 217, 202, 1","text-accent2-primary":"95, 56, 206, 1","text-accent3-primary":"255, 203, 105, 1","text-accent4-primary":"255, 129, 87, 1","text-accent5-primary":"4, 165, 245, 1","text-accent6-primary":"255, 71, 123, 1","text-accent7-primary":"37, 159, 159, 1","text-accent8-primary":"86, 61, 130, 1","text-accent9-primary":"255, 191, 63, 1","text-accent10-primary":"237, 122, 35, 1","border-color-action":"0, 187, 255, 1","border-color-action-hover":"0, 204, 255, 1","border-color-action-active":"4, 165, 245, 1","border-color-chip":"107, 116, 125, 1","border-color-danger":"255, 56, 97, 1","border-color-danger-hover":"255, 71, 123, 1","border-color-danger-active":"230, 50, 87, 1","border-color-divider":"32, 54, 69, 1","border-color-divider-secondary":"51, 57, 61, 1","border-color-input-field":"32, 54, 69, 1","border-color-input-field-hover":"58, 98, 125, 1","border-color-input-field-focus":"0, 187, 255, 1","border-color-input-field-danger":"255, 56, 97, 1","border-color-input-field-danger-hover":"255, 71, 123, 1","border-color-input-field-danger-focus":"255, 56, 97, 1","border-color-input-field-disabled":"4, 4, 28, 1","border-color-secondary-btn-disabled":"70, 71, 101, 1","border-color-sidebar-item-focus":"0, 187, 255, 1","border-color-slider-handle":"107, 116, 125, 1","border-color-success":"89, 217, 119, 1","border-color-table-divider":"32, 54, 69, 1","border-color-tile":"32, 54, 69, 1","border-color-tile-hover":"58, 98, 125, 1","border-color-tile-focus":"0, 187, 255, 1","border-color-tile-selected-focus":"153, 192, 255, 1","border-color-tile-selected":"153, 192, 255, 1","border-color-tile-selected-hover":"178, 208, 255, 1","border-color-notification-btn":"252, 252, 252, 1","border-color-notification-btn-dark":"32, 54, 69, 1"},k={"border-secondary-btn":"0, 187, 255, 1","border-secondary-btn-hover":"0, 204, 255, 1","border-secondary-danger-btn":"255, 56, 97, 1","border-secondary-btn-active":"4, 165, 245, 1","border-secondary-danger-btn-hover":"255, 71, 123, 1","border-secondary-danger-btn-active":"230, 50, 87, 1","border-input-field":"32, 54, 69, 1","border-input-field-hover":"58, 98, 125, 1","border-input-field-focus":"0, 187, 255, 1","border-input-field-danger":"255, 56, 97, 1","border-input-field-danger-hover":"255, 71, 123, 1","border-input-field-danger-focus":"255, 56, 97, 1","border-sidebar-item-focus":"0, 187, 255, 1","border-input-field-disabled":"4, 4, 28, 1","border-success":"89, 217, 119, 1","border-secondary-btn-disabled":"70, 71, 101, 1","border-chip":"107, 116, 125, 1","border-divider":"32, 54, 69, 1","border-divider-secondary":"51, 57, 61, 1","border-tile-selected":"153, 192, 255, 1","border-tile-selected-hover":"178, 208, 255, 1","border-table-divider":"32, 54, 69, 1","border-slider-handle":"107, 116, 125, 1","border-tile":"32, 54, 69, 1","border-tile-hover":"58, 98, 125, 1","border-tile-focus":"0, 187, 255, 1","border-tile-selected-focus":"153, 192, 255, 1","border-notification-btn":"252, 252, 252, 1","border-notification-btn-black":"32, 54, 69, 1"},A={"shadow-card":"0px 2px 10px 0px rgba(0, 0, 0, 0.18), 0px 2px 4px 0px rgba(0, 0, 0, 0.1)","shadow-modal":"0px 6px 40px 0px rgba(2, 2, 15, 0.14), 0px 4px 24px 0px rgba(2, 2, 15, 0.28), 0px 8px 80px 0px rgba(2, 2, 15, 0.26)","shadow-popover":"0px 0px 88px 0px rgba(2, 2, 15, 0.08), 0px 0px 32px 0px rgba(2, 2, 15, 0.1), 0px 4px 72px 0px rgba(2, 2, 15, 0.16)","shadow-form-field":"0px 1px 2px 0px rgba(170, 170, 170, 0.06), 0px 1px 3px 0px rgba(170, 170, 170, 0.1)","shadow-dropdown-menu":"0px 2px 4px -2px rgba(0, 0, 0, 0.14), 0px 4px 6px -1px rgba(0, 0, 0, 0.16)","shadow-app-header":"0px 1px 0px 0px rgba(188, 186, 213, 0.25)","shadow-modal-header":"0px 1px 0px 0px rgba(188, 186, 213, 0.25)","shadow-modal-footer":"0px -2px 8px 0px rgba(188, 186, 213, 0.4), 0px -1px 0px 0px rgba(188, 186, 213, 0.25)","shadow-modal-footer-no-scroll":"0px -1px 0px 0px rgba(188, 186, 213, 0.25)"},M={"ring-input-focus":"0, 187, 255, 0.25","ring-input-danger-focus":"255, 56, 97, 0.25","ring-action-focus":"0, 187, 255, 0.25","ring-action-danger-focus":"255, 56, 97, 0.25"},E={"bg-backdrop-loading":"0, 0, 0, 0.5","text-page-notification-content":y["text-inverted-primary"],"bg-textarea-counter-exceed-max-length":"255, 87, 114","bg-date-picker-range":"32, 54, 69, 1","regular-credit-card-bg":"252, 252, 252, 1","regular-credit-card-top":"4, 4, 28, 1","regular-credit-card-bottom":"255, 255, 255, 1"},O=new class{constructor(){this.dynamicCustomDarkModeColor={},this.darkModeColorAllTokens={},this.observer=new h(this.isAcceptObserver.bind(this),(e=>{e?this.generateDarkModeStyle():this.removeDarkModeStyleContainer()})),e.register(u,this.observer)}registerCustomDarkModeColor(e){this.dynamicCustomDarkModeColor=Object.assign(Object.assign({},this.dynamicCustomDarkModeColor),e),this.generateDarkModeStyle()}generateDarkModeStyle(){this.darkModeColorAllTokens=Object.assign(y,k,M,A,E,this.dynamicCustomDarkModeColor);const e=Object.keys(this.darkModeColorAllTokens);this.getDarkModeStyleContainer().innerHTML=`\nhtml.dark {\n\t\t${e.map((e=>`--v-${e}: ${this.darkModeColorAllTokens[e]};`)).join("\n\t\t")}}`}getDarkModeStyleContainer(){let e=document.head.querySelector("#vegaDarkModeStyle");return e||(e=document.createElement("style"),e.id="vegaDarkModeStyle",document.head.append(e)),e}removeDarkModeStyleContainer(){const e=document.head.querySelector("#vegaDarkModeStyle");e&&e.remove()}isAcceptObserver(){return!0}},N=[{payloadKey:"IS_OVERRIDECOLORS_METHOD_CALLED",payloadDescription:"Indicate if the method overrideColors of public API ThemeManager is called",canAccept:(e,t)=>"ThemeManager"===e&&"overrideColors"===t,payloadValue:()=>!0},{payloadKey:"IS_RESET_METHOD_CALLED",payloadDescription:"Indicate if the method reset of public API ThemeManager is called",canAccept:(e,t)=>"ThemeManager"===e&&"reset"===t,payloadValue:()=>!0},{payloadKey:"IS_TOGGLEDARKMODE_METHOD_CALLED",payloadDescription:"Indicate if the method toggleDarkMode of public API ThemeManager is called",canAccept:(e,t)=>"ThemeManager"===e&&"toggleDarkMode"===t,payloadValue:()=>!0},{payloadKey:"IS_ISDARKMODE_METHOD_CALLED",payloadDescription:"Indicate if the method isDarkMode of public API ThemeManager is called",canAccept:(e,t)=>"ThemeManager"===e&&"isDarkMode"===t,payloadValue:()=>!0}];class S{constructor(){this.vegaPublicAPIRuntimeMetricsSlimmer=a(S,["overrideColors","reset","toggleDarkMode","isDarkMode"],N)}async overrideColors(e){const t=w.generateOverrideThemes(e);w.applyTheme(t)}async reset(){w.getOverrideThemeContainer().innerHTML=""}toggleDarkMode(t){t?(document.documentElement.classList.add("dark"),O.generateDarkModeStyle()):document.documentElement.classList.remove("dark"),e.notify(u,t)}isDarkMode(){return document.documentElement.classList.contains("dark")}}!function(e,t,r,n){var i,s=arguments.length,o=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,r,o):i(t,r))||o);s>3&&o&&Object.defineProperty(t,r,o)}([o()],S.prototype,"vegaPublicAPIRuntimeMetricsSlimmer",void 0);const T=new S;var C,I;!function(e){e.SELECTION_RANGE="SELECTION_RANGE",e.CLEAR_FORMATTING="CLEAR_FORMATTING",e.LINK_GROUP="LINK_GROUP"}(C||(C={}));class L{}!function(e){e.ALIGNMENT="ALIGNMENT",e.TEXT_STYLE="TEXT_STYLE",e.INDENT="INDENT"}(I||(I={}));class G extends L{}const _=new class{constructor(){this.domToEntity=new WeakMap,this.entityToDOM=new WeakMap}register(e,t){this.domToEntity.set(e,t),this.entityToDOM.set(t,e)}getEntityByDOM(e){return this.domToEntity.get(e)}getDOMByEntity(e){return this.entityToDOM.get(e)}};var D,B,R;!function(e){e.DELETE_CHILD="DELETE_CHILD",e.DELETE_NEST_LIST="DELETE_NEST_LIST",e.UPDATE_TEXT="UPDATE_TEXT",e.REPLACE_SELECTED_TEXT="REPLACE_SELECTED_TEXT",e.APPEND_CHILD_NODES="APPEND_CHILD_NODES",e.INSERT_BLOCKS_AFTER="INSERT_BLOCKS_AFTER",e.INSERT_BLOCKS_BEFORE="INSERT_BLOCKS_BEFORE",e.INSERT_NODES_AFTER="INSERT_NODES_AFTER",e.INSERT_NODES_BEFORE="INSERT_NODES_BEFORE",e.SPLIT_BLOCK_WITH_NODE="SPLIT_BLOCK_WITH_NODE",e.REPLACE_CHILD_NODES="REPLACE_CHILD_NODES",e.REPLACE_NEST_LIST="REPLACE_NEST_LIST",e.MERGE_TWO_BLOCKS_NODES="MERGE_TWO_BLOCKS_NODES",e.BREAK_SINGLE_BLOCK="BREAK_SINGLE_BLOCK",e.LINE_BREAK_SINGLE_BLOCK="LINE_BREAK_SINGLE_BLOCK",e.LINE_BREAK_MULTIPLE_BLOCKS="LINE_BREAK_MULTIPLE_BLOCKS",e.TRANSFORM_LIST_BLOCK="TRANSFORM_LIST_BLOCK",e.TRANSFORM_PARAGRAPH_BLOCK="TRANSFORM_PARAGRAPH_BLOCK",e.DELETE_BLOCK_CONTENT="DELETE_BLOCK_CONTENT",e.INSERT_IMAGE_TO_BLOCK="INSERT_IMAGE_TO_BLOCK",e.UPDATE_IMAGE_NODE_URL="UPDATE_IMAGE_NODE_URL"}(D||(D={}));class j{constructor(){this.isFlushable=!1}}class F extends G{constructor(e){super(),this.type=I.ALIGNMENT,this.textAlign=e}static from(e){return[I.ALIGNMENT,new F(e)]}toJSON(){return{textAlign:this.textAlign}}renderClass(){return`v-rte--horizontal-alignment-${this.textAlign}`}render(){return null}}class $ extends G{constructor(e){super(),this.type=I.INDENT,this.indent=Math.max(0,e)}static from(e){return[I.INDENT,new $(e)]}toJSON(){return this.indent>0?{indent:this.indent}:null}render(){return this.indent>0?{"margin-left":16*this.indent+"px"}:null}}class P{static register(e,t,r){this.registry.has(t)||this.registry.set(t,new Map),this.registry.get(t).set(e,r)}static get(e,t){const r=this.registry.get(t);if(r)return r.get(e)}static executeTheStrategy(e,t){const r=e instanceof j?e.type:e.constructor.name,n=P.get(r,t.constructor.name);if(n)return n.execute(e,t);i.error(`Type ${r} action handle strategy is not registered in class ${t.constructor.name}`)}}P.registry=new Map;class K{constructor(e){this.annotationMap=new Map,this.id=e}static createAnnotationEntity(e,t){switch(e){case"textAlign":return F.from(t);case"indent":return $.from(t)}}toJSON(){const e=Array.from(this.annotationMap.values()).filter((e=>e instanceof G)).reduce(((e,t)=>Object.assign(Object.assign({},e),t.toJSON())),{});return Object.assign({id:this.id},Object.keys(e).length>0?{annotations:e}:{})}getAnnotationByType(e){return this.annotationMap.get(e)}apply(n){if(this.doApply(n),n.isFlushable){const n=_.getDOMByEntity(this);if(n){const i=t.getSubjectFromParentNodeByEventId(n,r);i&&e.notify(i,{})}}}doApply(e){e instanceof j?P.executeTheStrategy(e,this):this.applyAnnotationAction(e)}applyAnnotationAction(e){const t=e.toAnnotation();this.annotationMap.set(t.type,t),"function"==typeof this.doAnnotationActionApply&&this.doAnnotationActionApply(e)}}!function(e){e.TEXT="TEXT",e.IMAGE="IMAGE"}(B||(B={}));class H{constructor(e,t){this.annotationMap=new Map,this.id=e,t&&(this.annotationMap=t)}getAnnotationByType(e){return this.annotationMap.get(e)}deleteAnnotationByType(e){this.annotationMap.delete(e),this.flushChange()}apply(e){return this.doApply(e),e.isFlushable&&this.flushChange(),this}doApply(e){e instanceof j?this.doModifyActionApply(e):this.doAnnotationActionApply(e)}flushChange(){const n=_.getDOMByEntity(this);if(n){const i=t.getSubjectFromParentNodeByEventId(n,r);i&&e.notify(i,{})}}}!function(e){e.BOLD="BOLD",e.ITALIC="ITALIC",e.UNDERLINE="UNDERLINE",e.STRIKETHROUGH="STRIKETHROUGH",e.SELECTION_RANGE="SELECTION_RANGE",e.IMAGE="IMAGE",e.CODE="CODE",e.TEXT_COLOR="TEXT_COLOR",e.LINK="LINK"}(R||(R={}));class J extends L{}class q extends J{constructor(e="md",t){super(),this.type=R.IMAGE,this.size=e,this.alt=t}static from(e,t){return[R.IMAGE,new q(e,t)]}toJSON(){return s(this.alt)?{size:this.size,alt:this.alt}:{size:this.size}}render(){switch(this.size){case"sm":return{width:"25%"};case"md":return{width:"50%"};case"lg":return{width:"100%"}}}}class W{execute(e,t){return i.log(`Executing action ${e.constructor.name} on ${t.constructor.name} ${t.id}`),this.handleAction(e,t)}isCaretPositionAtTextBlockEnd(e,t,r){const n=e.nodes[e.nodes.length-1];return t===n&&(t.isEmpty()||r===n.text.length)}isCaretPositionAtTextBlockStart(e,t,r){return t===e.nodes[0]&&0===r}isCaretPositionAtImageBlockStart(e,t,r){return t===e.nodes[0]&&0===r}isCaretPositionAtImageBlockEnd(e,t,r){return t===e.nodes[e.nodes.length-1]&&1===r}}class z{}class U extends H{constructor(e,t,r,n){super(e,n),this.type=B.IMAGE,this.url=t,this.parentBlock=r}static from(e,t){const r=new U(e.id,e.url,t);let n;return n=e.annotations&&0!==Object.keys(e.annotations).length?e.annotations:{size:"md"},r.annotationMap=new Map(Object.keys(n).map((()=>q.from(n.size,n.alt))).filter(s)),r}toJSON(){const e=this.annotationMap.get(R.IMAGE),t={};return(null==e?void 0:e.size)&&(t.size=e.size),(null==e?void 0:e.alt)&&(t.alt=e.alt),Object.assign(Object.assign({id:this.id},Object.keys(t).length>0?{annotations:t}:{}),{type:"image",url:this.url})}doAnnotationActionApply(e){const t=P.get(z.name,U.name);t&&t.execute(e,this)}doModifyActionApply(e){P.executeTheStrategy(e,this)}}P.register(D.UPDATE_IMAGE_NODE_URL,U.name,new class extends W{handleAction(e,t){t.url=e.url}}),P.register(z.name,U.name,new class extends W{handleAction(e,t){const r=e.toAnnotation();t.annotationMap.set(r.type,r)}});class V extends j{constructor(e){super(),this.type=D.DELETE_CHILD,this.entityToBeRemoved=e}}class X extends W{getPreviousNode(e){const t=e.parentBlock,r=t.nodes.indexOf(e);if(r>0)return t.nodes[r-1];if(t.parent){const e=this.getPreviousBlock(t);if(e)return this.getBlockLastNode(e)}}getNextNode(e){const t=e.parentBlock,r=t.nodes.indexOf(e);if(t.nodes[r+1])return t.nodes[r+1];if(t.parent){const e=this.getNextBlock(t);if(e)return this.getBlockFirstNode(e)}}isContentFirstNode(e){const t=e.parentBlock,r=t.nodes.indexOf(e),n=t.parent;if("list-item"===t.type){const e=n.parent;return 0===r&&Array.isArray(n.blocks)&&n.blocks[0]===t&&"list-item"!==e.type&&Array.isArray(e.blocks)&&e.blocks[0]===n}return 0===r&&Array.isArray(n.blocks)&&n.blocks[0]===t}getPreviousBlock(e){if(e&&e.parent&&e.parent.blocks){const t=e.parent.blocks.indexOf(e);if(t>0)return e.parent.blocks[t-1];if(("number-list"===e.parent.type||"bullet-list"===e.parent.type)&&0===t)return this.getPreviousBlock(e.parent)}}getBlockLastNode(e){if("list-item"===e.type)return e.children&&e.children.length>0?this.getBlockLastNode(e.children[e.children.length-1]):e.nodes[e.nodes.length-1];if("number-list"===e.type||"bullet-list"===e.type){const t=e.blocks;if(t)return this.getBlockLastNode(t[t.length-1])}else if(e.nodes)return e.nodes[e.nodes.length-1]}getBlockFirstNode(e){if("number-list"===e.type||"bullet-list"===e.type){if(e.blocks)return this.getBlockFirstNode(e.blocks[0])}else if(e.nodes)return e.nodes[0]}getNextBlock(e){if(e&&e.parent&&e.parent.blocks){const t=e.parent.blocks.indexOf(e);if(e.parent.blocks[t+1])return e.parent.blocks[t+1];if("list-item"===e.type&&e.parent.blocks.length===t+1)return this.getNextBlock(e.parent)}}}class Y extends j{constructor(e){super(),this.type=D.APPEND_CHILD_NODES,this.entityToBeAppended=e}}class Z extends W{handleAction(e,t){const r=e.blockNeedToBeMerged;if(t.type===r.type||"image"!==t.type&&"image"!==r.type){let e=r.nodes;"image"!==r.type&&(e=r.nodes.filter((e=>e.text))),t.apply(new Y(e)),r.parent.apply(new V(r))}}}class Q extends W{handleAction(e,t){t.nodes=t.nodes.filter((t=>t!==e.entityToBeRemoved)),0===t.nodes.length&&t.parent&&t.parent.apply(new V(t))}}class ee extends W{handleAction(e,t){const r=e.entityToBeAppended;r.forEach((e=>{e.parentBlock=t})),t.nodes=t.nodes.concat(r)}}class te extends W{handleAction(e,t){t.nodes=[],t.apply(new Y(e.newChildNodes))}}class re extends j{constructor(e,...t){super(),this.type=D.INSERT_BLOCKS_AFTER,this.referBlock=e,this.blocksToBeInserted=t}}class ne extends j{constructor(e){super(),this.type=D.REPLACE_CHILD_NODES,this.newChildNodes=e}}class ie extends j{constructor(e,...t){super(),this.type=D.INSERT_BLOCKS_BEFORE,this.referBlock=e,this.blocksToBeInserted=t}}class se extends j{constructor(e,t){super(),this.type=D.SPLIT_BLOCK_WITH_NODE,this.splitPointNode=e,this.startOffsetOfNode=t}}class oe extends z{constructor(){super(...arguments),this.doSplit=!0}}class ae extends L{constructor(e){super(),this.type=C.SELECTION_RANGE,this.range=e}}class ce extends J{constructor(e){super(),this.type=R.STRIKETHROUGH,this.strikethrough=e}static from(e){return[R.STRIKETHROUGH,new ce(e)]}toJSON(){return{strikethrough:this.strikethrough}}renderClass(){return this.strikethrough?"v-rte--strikethrough":null}render(){return null}}class de extends J{constructor(e){super(),this.type=R.UNDERLINE,this.underline=e}static from(e){return[R.UNDERLINE,new de(e)]}toJSON(){return{underline:this.underline}}renderClass(){return this.underline?"v-rte--underline":null}render(){return null}}class le extends J{constructor(e){super(),this.type=R.ITALIC,this.italic=e}static from(e){return[R.ITALIC,new le(e)]}toJSON(){return{italic:this.italic}}render(){return this.italic?{"font-style":"italic"}:null}}class ue extends J{constructor(e){super(),this.type=R.BOLD,this.bold=e}static from(e){return[R.BOLD,new ue(e)]}toJSON(){return{bold:this.bold}}render(){return this.bold?{"font-weight":"700"}:null}}class he extends J{constructor(e){super(),this.type=R.CODE,this.code=e}static from(e){return[R.CODE,new he(e)]}toJSON(){return{code:this.code}}renderClass(){return this.code?"v-rte--code":null}render(){return null}}const fe=[{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"}],be="​";class ge extends J{constructor(e){super(),this.type=R.TEXT_COLOR,this.textColor=this.formatTextColor(e)}static from(e){return[R.TEXT_COLOR,new ge(e)]}toJSON(){return{textColor:this.textColor.key}}renderClass(){return null}render(){return{color:T.isDarkMode()?this.textColor.dark:this.textColor.light}}formatTextColor(e){return fe.find((t=>t.key===e))||fe[0]}}class ve extends J{constructor(e){super(),this.type=R.LINK,this.link=e}static from(e){return[R.LINK,new ve({href:e.href,groupKey:e.groupKey})]}toJSON(){return{link:{href:this.link.href,groupKey:this.link.groupKey}}}toEqual(e){return this.link.groupKey===e.link.groupKey}render(){return null}}class pe extends L{constructor(e){super(),this.type=C.LINK_GROUP,this.linkGroups=new Map,this.linkGroups=new Map([[e,[]]])}}class me extends z{constructor(e,t){super(),this.isFlushable=!1,this.groupKey=e,this.nodes=t}toAnnotation(){return new pe(this.groupKey)}}class xe extends z{constructor(){super(),this.isFlushable=!1}toAnnotation(){return null}}class we extends j{constructor(e){super(),this.type=D.UPDATE_TEXT,this.newTextContent="",this.newTextContent=e}}class ye extends L{constructor(){super(...arguments),this.type=C.CLEAR_FORMATTING,this.items=[R.BOLD,R.ITALIC,R.UNDERLINE,R.STRIKETHROUGH,R.TEXT_COLOR,R.CODE]}}class ke extends oe{constructor(){super(...arguments),this.isFlushable=!0}toAnnotation(){return new ye}}class Ae extends oe{constructor(e){super(),this.isFlushable=!0,this.code=e}toAnnotation(){return new he(this.code)}}class Me extends z{constructor(e){super(),this.isFlushable=!0,this.annotationType=e}toAnnotation(){}}class Ee extends oe{constructor({link:e,newText:t,needMergeNode:r,doSplit:n}){super(),this.isFlushable=!0,this.link=e,this.needMergeNode=r,this.newText=t,s(n)&&(this.doSplit=n)}toAnnotation(){return new ve(this.link)}}class Oe extends H{constructor(e,t,r,n){super(e,n),this.type=B.TEXT,this.parentBlock=r,this.text=t}static from(e,t){const r=new Oe(e.id,e.text,t),{annotations:n}=e;return n&&(r.annotationMap=new Map(Object.keys(n).map((e=>(n.link&&t.apply(new me(n.link.groupKey,[r])),this.createAnnotationEntity(e,n[e])))).filter(s))),r}static createAnnotationEntity(e,t){switch(e){case"bold":return ue.from(t);case"italic":return le.from(t);case"underline":return de.from(t);case"strikethrough":return ce.from(t);case"code":return he.from(t);case"textColor":return ge.from(t);case"link":return ve.from(t)}}toJSON(){const e=Array.from(this.annotationMap.values()).filter((e=>e instanceof J)).reduce(((e,t)=>Object.assign(Object.assign({},e),t.toJSON())),{});return Object.assign(Object.assign({id:this.id},Object.keys(e).length>0?{annotations:e}:{}),{type:"text",text:this.text})}cloneWithText(e){return new Oe(c(),e,this.parentBlock,new Map(this.annotationMap))}isEmpty(){return!this.text||"​"===this.text||"\n"===this.text}doAnnotationActionApply(e){const t=this.getAnnotationByType(C.SELECTION_RANGE);if(e instanceof oe&&e.doSplit&&t){const t=P.get(oe.name,Oe.name);if(t){const r=t.execute(e,this);r&&this.applyActionToNode(r,e)}}else this.applyActionToNode(this,e);this.parentBlock.mergeNodes(e)}doModifyActionApply(e){P.executeTheStrategy(e,this)}applyActionToNode(e,t){const r=t.toAnnotation();if(t instanceof xe)return void this.syncUpSelectedNodes(e);r instanceof ae||this.syncUpSelectedNodes(e);const n=P.get(z.name,Oe.name);n&&n.execute(t,e)}syncUpSelectedNodes(r){const i=_.getDOMByEntity(this);if(i){const s=t.getSubjectFromParentNodeByEventId(i,n);s&&e.notify(s,{node:r})}}}P.register(D.UPDATE_TEXT,Oe.name,new class extends W{handleAction(e,t){t.text=e.newTextContent,!t.text&&t.annotationMap.has("LINK")&&t.annotationMap.delete(R.LINK)}}),P.register(D.REPLACE_SELECTED_TEXT,Oe.name,new class extends W{handleAction(e,t){this.replaceSelectedText(e.textToBeInsert,e.currentRange,t)}replaceSelectedText(e,t,r){if(t&&t.startContainer&&t.endContainer){const{startContainer:n,endContainer:i,startOffset:s,endOffset:o}=t;let a=r.text;if(n===i&&s===o&&e)a=r.text.slice(0,s)+e+r.text.slice(s);else{const t=n.parentElement,c=i.parentElement,d=t&&_.getEntityByDOM(t),l=c&&_.getEntityByDOM(c);let u=0,h=r.text.length;d&&d===r?(u=s,h=n===i?o:h):l&&l===r&&(h=o),a=r.text.slice(0,u)+e+r.text.slice(h)}r.apply(new we(a))}}}),P.register(oe.name,Oe.name,new class extends W{constructor(){super(...arguments),this.applyTargetNode=null}handleAction(e,t){const r=t.getAnnotationByType(C.SELECTION_RANGE);if(this.setApplyTargetNode(null),e instanceof oe&&e.doSplit&&r){const{startContainer:e,endContainer:n,startOffset:i,endOffset:s}=r.range,o=e===n&&i===s;t.parentBlock.nodes=t.parentBlock.nodes.flatMap((e=>e.id===t.id?o?this.insertNewNode(i,t):this.shouldSplitSelection(r.range)?this.splitTextNode(r.range,t):(this.setApplyTargetNode(t),t):e))}return this.applyTargetNode}insertNewNode(e,t){const r=t.cloneWithText("");return this.setApplyTargetNode(r),0===e?[r,t]:e===t.text.length?[t,r]:[t.cloneWithText(t.text.substring(0,e)),r,t.cloneWithText(t.text.substring(e))]}shouldSplitSelection(e){const{startContainer:t,endContainer:r,startOffset:n,endOffset:i}=e;return t!==r||n>0||i<(r.textContent?r.textContent.length:0)}splitTextNode(e,t){const{startContainer:r,endContainer:n,startOffset:i}=e,s=r.parentElement,o=n.parentElement,a=(e,r,n)=>{const i=e.substring(0,r),s=e.substring(r,n),o=e.substring(n);return[t.cloneWithText(i),t.cloneWithText(s),t.cloneWithText(o)]},c=s&&_.getEntityByDOM(s),d=o&&_.getEntityByDOM(o);if(c&&c.id===t.id){const s=r===n?e.endOffset:t.text.length,[o,c,d]=a(t.text,i,s);return this.setApplyTargetNode(c),[o,c,d].filter((e=>!!e.text))}if(d&&d.id===t.id){const[r,n,i]=a(t.text,0,e.endOffset);return this.setApplyTargetNode(n),[r,n,i].filter((e=>!!e.text))}return this.setApplyTargetNode(t),t}setApplyTargetNode(e){this.applyTargetNode=e}}),P.register(z.name,Oe.name,new class extends W{handleAction(e,t){const r=e.toAnnotation();if(e instanceof Me)t.annotationMap.delete(e.annotationType);else{if(!(r instanceof ye))return r instanceof J||r instanceof ae?(e instanceof Ee&&(s(e.newText)&&(t.text=e.newText),t.parentBlock.apply(new me(e.link.groupKey,[t]))),e instanceof Ae&&this.handleAction(new ke,t),void t.annotationMap.set(r.type,r)):void 0;r.items.forEach((e=>{t.deleteAnnotationByType(e)}))}}});class Ne extends G{constructor(e){super(),this.type=I.TEXT_STYLE,this.textStyle=e}static from(e){return[I.TEXT_STYLE,new Ne(e)]}toJSON(){return{textStyle:this.textStyle}}render(){const e={fontFamily:"Inter",fontSize:"16px",lineHeight:"22px",fontWeight:"500"};switch(this.textStyle){case"paragraph":return e;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"}}}}class Se extends z{constructor(e,t){super(),this.isFlushable=!0,this.textStyle=e,this.bold=t}toAnnotation(){return new Ne(this.textStyle)}}class Te extends oe{constructor(e){super(),this.isFlushable=!0,this.bold=e}toAnnotation(){return new ue(this.bold)}}class Ce extends W{handleAction(e,t){e.newBlock=this.splitTextNodeBlock(e.splitPointNode,e.startOffsetOfNode,t)}splitTextNodeBlock(e,t,r){if(e){const n=e.text.slice(0,t),i=e.text.slice(t),s=r.nodes.indexOf(e);if(s>-1){const t=r.nodes.slice(0,s),o=r.nodes.slice(s+1);n&&t.push(e.cloneWithText(n)),i&&o.unshift(e.cloneWithText(i)),r.apply(new ne(t));const a=r.cloneWithNodes(o);return r.parent.apply(new re(r,a)),a}}}}class Ie extends W{handleAction(e,t){e.lineBreakNode=this.lineBreakSingleBlock(e.startContainerNode,e.startOffset,t)}lineBreakSingleBlock(e,t,r){if(e){const n=new Oe(c(),"\n",r),i=e.text.slice(0,t),s=e.text.slice(t),o=r.nodes.indexOf(e);if(o>-1){const t=r.nodes.slice(0,o),a=r.nodes.slice(o+1);i&&t.push(e.cloneWithText(i)),s&&a.unshift(e.cloneWithText(s)),this.mergeLineBreakNodes(t,n,a,r)}return n}}mergeLineBreakNodes(e,t,r,n){(0===r.length||r[0]&&""===r[0].text)&&r.push(new Oe(c(),"\n",n,e[e.length-1]&&e[e.length-1].annotationMap)),n.apply(new ne([...e,t,...r]))}}class Le extends W{handleAction(e,t){e.lineBreakNode=this.lineBreakMultipleBlocks(e.selectedBlocks,t)}lineBreakMultipleBlocks(e,t){const r=t.nodes,n=new Oe(c(),"\n",t),i=this.concatBlocksNodes(e.slice(1));return this.mergeLineBreakNodes(r,n,i,t),n}concatBlocksNodes(e){const t=[];return e.map((e=>{"image"!==e.type&&(t.push(...e.nodes),e.parent.apply(new V(e)))})),t}mergeLineBreakNodes(e,t,r,n){(0===r.length||r[0]&&""===r[0].text)&&r.push(new Oe(c(),"\n",n,e[e.length-1]&&e[e.length-1].annotationMap)),n.apply(new ne([...e,t,...r]))}}class Ge extends j{constructor(e){super(),this.type=D.MERGE_TWO_BLOCKS_NODES,this.blockNeedToBeMerged=e}}class _e extends X{handleAction(e,t){this.deleteNodeContent(e,t)}deleteNodeContent(e,t){const r=e.startContainerNode,n=e.startOffset;if(0!==n&&!r.isEmpty()){const i=r.text.slice(0,n-1)+r.text.slice(n);if(r.apply(new we(i)),i)return void(e.previousNode=r);{const n=this.getPreviousNode(r);return n&&n.parentBlock===t&&"\n"===n.text||1===t.nodes.length?void(e.previousNode=r):(t.apply(new V(r)),void(e.previousNode=n))}}{let n=this.getPreviousNode(r),i=null;if(t.nodes.length&&n&&n.parentBlock!==t)r.isEmpty()&&t.apply(new V(r)),n.parentBlock.apply(new Ge(t));else if(this.isContentFirstNode(r)&&r.isEmpty()&&(i=this.getNextNode(r)),r.isEmpty()&&t.apply(new V(r)),n instanceof Oe&&n.isEmpty()){const e=n;n=this.getPreviousNode(n),e.parentBlock.apply(new V(e)),n||(i=r)}0===t.nodes.length&&t.parent.apply(new V(t)),n?e.previousNode=n:i&&(e.nextNode=i)}}}class De extends W{replaceNodeWithNodes(e,t,r){e.nodes&&(r.forEach((t=>{t.parentBlock=e})),e.nodes=e.nodes.flatMap((e=>e===t?r:e)))}}class Be extends De{handleAction(e,t){const r=e.referNode,n=[...e.nodesToBeInserted,r];this.replaceNodeWithNodes(t,r,n)}}class Re extends K{constructor(e,t){super(e),this.nodes=[],this.type=t,this.annotationMap=Re.isAcceptableTextStyle(t)?new Map([Ne.from(t)]):new Map([Ne.from("paragraph")])}static from(e){const t=new Re(e.id,e.type),{annotations:r}=e;return t.nodes=e.nodes.map((e=>Oe.from(e,t))),r&&Object.entries(r).forEach((([e,r])=>{const n=this.createAnnotationEntity(e,r);s(n)&&t.annotationMap.set(...n)})),t}static createAnnotationEntity(e,t){return"textStyle"===e?Ne.from(t):super.createAnnotationEntity(e,t)}static isAcceptableTextStyle(e){return["title","subtitle","paragraph","heading-1","heading-2","heading-3"].includes(e)}mergeNodes(e){this.nodes=this.nodes.reduce(((t,r)=>{const n=t.at(-1);if(e instanceof Ee&&e.needMergeNode){const e=null==n?void 0:n.getAnnotationByType(R.LINK),i=r.getAnnotationByType(R.LINK);if(e&&i&&e.toEqual(i))return t}return[...t,r]}),[])}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,nodes:this.nodes.map((e=>e.toJSON()))})}cloneWithNodes(e){const t=new Re(c(),this.type);return t.nodes=[],t.apply(new Y(e)),t}isNotEmpty(){return this.nodes.length>0&&this.nodes.some((e=>!e.isEmpty()))}getLastNode(){return this.nodes[this.nodes.length-1]}createNewParagraph(){return new Re(c(),"paragraph")}doAnnotationActionApply(e){const t=P.get(e.constructor.name,Re.name);t&&t.execute(e,this)}}P.register(Se.name,Re.name,new class extends W{handleAction(e,t){"list-item"!==t.type&&(t.type=e.textStyle),t.nodes.forEach(e.bold?e=>{const t=new Te(!0);t.doSplit=!1,e.apply(t)}:e=>{e.apply(new Me(R.BOLD))})}}),P.register(me.name,Re.name,new class extends W{handleAction(e,t){const r=t.getAnnotationByType(C.LINK_GROUP);if(r){const n=r.linkGroups.get(e.groupKey);r.linkGroups.set(e.groupKey,[...n,...e.nodes]),t.annotationMap.set(C.LINK_GROUP,r)}}}),P.register(D.DELETE_CHILD,Re.name,new Q),P.register(D.APPEND_CHILD_NODES,Re.name,new ee),P.register(D.SPLIT_BLOCK_WITH_NODE,Re.name,new Ce),P.register(D.REPLACE_CHILD_NODES,Re.name,new te),P.register(D.MERGE_TWO_BLOCKS_NODES,Re.name,new Z),P.register(D.BREAK_SINGLE_BLOCK,Re.name,new class extends W{handleAction(e,t){e.newBlock=this.breakSingleTextBlock(e.startContainerNode,e.startOffset,t)}breakSingleTextBlock(e,t,r){const n=this.copyInlineStyleToNewParagraph(e,r);if(this.isCaretPositionAtTextBlockEnd(r,e,t))r.parent.apply(new re(r,n));else{if(!this.isCaretPositionAtTextBlockStart(r,e,t)){const n=new se(e,t);return r.apply(n),n.newBlock}r.parent.apply(new ie(r,n))}return n}copyInlineStyleToNewParagraph(e,t){const r=e.cloneWithText("");r.annotationMap.delete(R.LINK);const n=t.createNewParagraph();return n.apply(new Y([r])),n}}),P.register(D.LINE_BREAK_SINGLE_BLOCK,Re.name,new Ie),P.register(D.LINE_BREAK_MULTIPLE_BLOCKS,Re.name,new Le),P.register(D.DELETE_BLOCK_CONTENT,Re.name,new _e),P.register(D.INSERT_IMAGE_TO_BLOCK,Re.name,new class extends W{handleAction(e,t){const r=e.splitPointNode,n=e.startOffsetOfNode,i=e.imageBlockToBeInserted;if(this.isCaretPositionAtTextBlockEnd(t,r,n))t.parent.apply(new re(t,i));else if(this.isCaretPositionAtTextBlockStart(t,r,n))t.parent.apply(new ie(t,i));else{const e=new se(r,n);t.apply(e),t.parent.apply(new re(t,i))}}}),P.register(D.INSERT_NODES_BEFORE,Re.name,new Be),P.register(D.TRANSFORM_LIST_BLOCK,Re.name,new class extends W{handleAction(e,t){const r=t.parent,n=r.createList(e.listType),i=e.selectedBlocks,s=i.map((e=>r.toListItem(e)));n.apply(new Y(s)),r.apply(new re(e.selectedBlocks[0],n)),i.forEach((e=>{e.parent.apply(new V(e))}))}});class je extends j{constructor(e,t){super(),this.type=D.BREAK_SINGLE_BLOCK,this.startContainerNode=e,this.startOffset=t}}class Fe extends K{constructor(e){super(e),this.type="image",this.nodes=[]}static from(e){const t=new Fe(e.id),{annotations:r}=e;return t.nodes=e.nodes.map((e=>U.from(e,t))),r&&Object.entries(r).forEach((([e,r])=>{const n=this.createAnnotationEntity(e,r);s(n)&&t.annotationMap.set(...n)})),t}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:"image",nodes:this.nodes.map((e=>e.toJSON()))})}isNotEmpty(){return this.nodes.length>0&&this.nodes.some((e=>e.url.length>0))}getLastNode(){return this.nodes[this.nodes.length-1]}createNewImageBlock(){return new Fe(c())}}P.register(D.DELETE_BLOCK_CONTENT,Fe.name,new class extends X{handleAction(e,t){this.deleteNodeContent(e,t)}deleteNodeContent(e,t){const r=e.startContainerNode,n=e.startOffset;let i=this.getPreviousNode(r),s=null;if(1===n){const e=t;this.isContentFirstNode(r)&&(s=this.getNextNode(r)),1===e.nodes.length?e.parent.apply(new V(e)):e.apply(new V(r))}else{const t=i;t&&t instanceof U&&(i=this.getPreviousNode(t),t.parentBlock.apply(new V(t)),i||(e.nextNode=r))}i?e.previousNode=i:s&&(e.nextNode=s)}}),P.register(D.MERGE_TWO_BLOCKS_NODES,Fe.name,new Z),P.register(D.DELETE_CHILD,Fe.name,new Q),P.register(D.APPEND_CHILD_NODES,Fe.name,new ee),P.register(D.REPLACE_CHILD_NODES,Fe.name,new te),P.register(D.SPLIT_BLOCK_WITH_NODE,Fe.name,new class extends W{handleAction(e,t){e.newBlock=this.splitImageNodes(e.splitPointNode,e.startOffsetOfNode,t)}splitImageNodes(e,t,r){const n=r.nodes.indexOf(e);if(n>-1){const e=r.nodes.slice(0,n+t),i=r.nodes.slice(n+t);r.apply(new ne(e));const s=this.cloneWithNodes(i,r);return r.parent.apply(new re(r,s)),s}}cloneWithNodes(e,t){const r=t.createNewImageBlock();return r.nodes=[],r.apply(new Y(e)),r}}),P.register(D.BREAK_SINGLE_BLOCK,Fe.name,new class extends W{handleAction(e,t){e.newBlock=this.breakSingleBlock(e.startContainerNode,e.startOffset,t)}breakSingleBlock(e,t,r){const n=Re.from({id:c(),type:"paragraph",nodes:[{id:c(),type:"text",text:""}]});if(this.isCaretPositionAtImageBlockEnd(r,e,t))r.parent.apply(new re(r,n));else{if(!this.isCaretPositionAtImageBlockStart(r,e,t)){const n=new se(e,t);return r.apply(n),n.newBlock}r.parent.apply(new ie(r,n))}return n}}),P.register(D.LINE_BREAK_SINGLE_BLOCK,Fe.name,new class extends W{handleAction(e,t){const r=new je(e.startContainerNode,e.startOffset);t.apply(r);const n=r.newBlock;n&&(e.lineBreakNode=n.nodes[0])}}),P.register(D.LINE_BREAK_MULTIPLE_BLOCKS,Fe.name,new class extends W{handleAction(e,t){e.lineBreakNode=this.lineBreakMultipleBlocks(e.selectedBlocks,t)}lineBreakMultipleBlocks(e,t){const r=Re.from({id:c(),type:"paragraph",nodes:[{id:c(),type:"text",text:"\n"}]});t.parent.apply(new re(t,r));const n=this.concatBlocksNodes(e.slice(1));return(0===n.length||n[0]&&""===n[0].text)&&n.push(new Oe(c(),"\n",r)),r.apply(new Y(n)),r.nodes[0]}concatBlocksNodes(e){const t=[];return e.map((e=>{"image"!==e.type&&(t.push(...e.nodes),e.parent.apply(new V(e)))})),t}}),P.register(D.INSERT_IMAGE_TO_BLOCK,Fe.name,new class extends W{handleAction(e,t){const r=e.splitPointNode,n=e.startOffsetOfNode,i=e.imageBlockToBeInserted;t.nodes.length<1?t.apply(new Y(i.nodes)):this.isCaretPositionAtImageBlockEnd(t,r,n)?t.parent.apply(new re(t,i)):this.isCaretPositionAtImageBlockStart(t,r,n)?t.parent.apply(new ie(t,i)):(t.apply(new se(r,n)),t.parent.apply(new re(t,i)))}}),P.register(D.INSERT_NODES_BEFORE,Fe.name,new Be),P.register(D.INSERT_NODES_AFTER,Fe.name,new class extends De{handleAction(e,t){const r=e.referNode,n=[r,...e.nodesToBeInserted];this.replaceNodeWithNodes(t,r,n)}});class $e extends Re{constructor(e,t){super(e,"list-item"),this.children=[],this.children=t}static from(e){const t=new $e(e.id);t.nodes=e.nodes.map((e=>Oe.from(e,t))),e.children&&(t.children=e.children.map((e=>{const r=We.from(e);return r.parent=t,r})));const{annotations:r}=e;return r&&Object.entries(r).forEach((([e,r])=>{const n=this.createAnnotationEntity(e,r);s(n)&&t.annotationMap.set(...n)})),t}toJSON(){var e;return Object.assign(Object.assign({},super.toJSON()),{type:"list-item",children:null===(e=this.children)||void 0===e?void 0:e.map((e=>e.toJSON()))})}cloneWithNodes(e){const t=new $e(c());return t.nodes=[],t.apply(new Y(e)),t}isNotEmpty(){return this.children?super.isNotEmpty()||this.children.some((e=>e.isNotEmpty())):super.isNotEmpty()}getLastNode(){return this.children&&this.children.length>0?this.children[this.children.length-1].getLastNode():super.getLastNode()}createNewListItem(){return new $e(c())}}P.register(D.DELETE_BLOCK_CONTENT,$e.name,new class extends _e{handleAction(e,t){const r=t.parent;this.deleteNodeContent(e,t),0===r.blocks.length&&r.parent.apply(new V(r))}}),P.register(D.LINE_BREAK_SINGLE_BLOCK,$e.name,new Ie),P.register(D.LINE_BREAK_MULTIPLE_BLOCKS,$e.name,new Le),P.register(D.DELETE_CHILD,$e.name,new class extends W{handleAction(e,t){t.nodes=t.nodes.filter((t=>t!==e.entityToBeRemoved)),0!==t.nodes.length||t.children&&t.children.length||t.parent.apply(new V(t))}}),P.register(D.DELETE_NEST_LIST,$e.name,new class extends W{handleAction(e,t){t.children&&(t.children=t.children.length>1?t.children.filter((t=>t!==e.nestListBlockToBeRemoved)):void 0)}}),P.register(D.APPEND_CHILD_NODES,$e.name,new ee),P.register(D.SPLIT_BLOCK_WITH_NODE,$e.name,new Ce),P.register(D.REPLACE_CHILD_NODES,$e.name,new te),P.register(D.REPLACE_NEST_LIST,$e.name,new class extends W{handleAction(e,t){e.newList.forEach((e=>{e.parent=t})),t.children=e.newList}}),P.register(D.MERGE_TWO_BLOCKS_NODES,$e.name,new Z),P.register(D.BREAK_SINGLE_BLOCK,$e.name,new class extends W{handleAction(e,t){e.newBlock=this.breakSingleListItemBlock(e.startContainerNode,e.startOffset,t)}breakSingleListItemBlock(e,t,r){const n=r.createNewListItem(),i=this.copyInlineStyleToNewNode(e);if(n.apply(new Y([i])),this.isCaretPositionAtTextBlockEnd(r,e,t))return this.breakListItemAtEnd(n,r);if(!this.isCaretPositionAtTextBlockStart(r,e,t)){const n=new se(e,t);return r.apply(n),n.newBlock}return r.parent.apply(new ie(r,n)),n}breakListItemAtEnd(e,t){const r=t.parent.blocks[t.parent.blocks.length-1],n=1===t.nodes.length&&t.nodes[0].isEmpty();if(t===r&&n){const r=t.parent.parent;if("list-item"!==r.type){const n=Re.from({id:c(),type:"paragraph",nodes:[]});return n.apply(new Y(e.nodes)),r.apply(new re(t.parent,n)),t.parent.apply(new V(t)),n}r.parent.apply(new re(r,e)),t.parent.apply(new V(t))}else t.parent.apply(new re(t,e));return e}copyInlineStyleToNewNode(e){const t=e.cloneWithText("");return t.annotationMap.delete(R.LINK),t}}),P.register(D.INSERT_IMAGE_TO_BLOCK,$e.name,new class extends W{handleAction(e,t){t.parent.apply(e)}}),P.register(D.INSERT_NODES_BEFORE,$e.name,new Be);class Pe extends W{handleAction(e,t){this.replaceBlockWithBlocks(t,e.referBlock,[...e.blocksToBeInserted,e.referBlock])}replaceBlockWithBlocks(e,t,r){e.blocks&&(r.forEach((t=>{t.parent=e})),e.blocks=e.blocks.flatMap((e=>e===t?r:e)))}}class Ke extends Pe{handleAction(e,t){this.replaceBlockWithBlocks(t,e.referBlock,[e.referBlock,...e.blocksToBeInserted])}}class He extends W{handleAction(e,t){const r=e.entityToBeAppended;t.blocks&&(r.forEach((e=>{e.parent=t})),t.blocks=t.blocks.concat(r))}}class Je extends j{constructor(e){super(),this.type=D.DELETE_NEST_LIST,this.nestListBlockToBeRemoved=e}}class qe extends W{handleAction(e,t){const r=e.entityToBeRemoved;t.blocks&&(t.blocks=t.blocks.filter((e=>e!==r)))}}class We extends K{constructor(e,t){super(e),this.type="bullet-list",this.blocks=[],this.type=t}static from(e){const t=new We(e.id,e.type);return t.blocks=e.blocks.map((e=>{const r=$e.from(e);return r.parent=t,r})),t}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{id:this.id,type:this.type,blocks:this.blocks.map((e=>e.toJSON()))})}isNotEmpty(){return this.blocks.length>0&&this.blocks.some((e=>e.isNotEmpty()))}getLastNode(){return this.blocks[this.blocks.length-1].getLastNode()}}P.register(D.DELETE_CHILD,We.name,new class extends qe{handleAction(e,t){super.handleAction(e,t);const r=t.parent;0===t.blocks.length&&r&&r.apply("list-item"===r.type?new Je(t):new V(t))}}),P.register(D.INSERT_BLOCKS_BEFORE,We.name,new Pe),P.register(D.INSERT_BLOCKS_AFTER,We.name,new Ke),P.register(D.APPEND_CHILD_NODES,We.name,new He),P.register(D.TRANSFORM_LIST_BLOCK,We.name,new class extends W{handleAction(e,t){const r=e.selectedBlocks,n=t.parent.createList(e.listType);if(r.every((e=>e.parent===t)))n.apply(new Y(t.blocks)),t.parent.apply(new re(t,n)),t.parent.apply(new V(t)),r.forEach((e=>e.nodes.map((e=>e.apply(new xe)))));else{const r=e.selectedBlocks.map((e=>t.parent.toListItem(e)));n.apply(new Y(r)),t.parent.apply(new re(t,n)),e.selectedBlocks.forEach((e=>{e.parent.apply(new V(e))})),0===t.blocks.length&&t.parent.apply(new V(t))}}}),P.register(D.TRANSFORM_PARAGRAPH_BLOCK,We.name,new class extends W{handleAction(e,t){let r=!1,n=!1;const i=e.selectedBlocks,s=i.map((e=>(e.nodes.map((e=>e.apply(new xe))),e===t.blocks[0]&&(r=!0),e===t.blocks[t.blocks.length-1]&&(n=!0),this.toParagraph(e))));if(r)t.parent.apply(new ie(t,...s));else if(n)t.parent.apply(new re(t,...s));else{const e=t.blocks.indexOf(i[0]),r=t.blocks.indexOf(i[i.length-1]),n=t.parent.createList(t.type);n.apply(new Y(t.blocks.slice(0,e)));const o=t.parent.createList(t.type);o.apply(new Y(t.blocks.slice(r+1))),t.parent.apply(new ie(t,n,...s,o)),t.parent.apply(new V(t))}i.map((e=>{t.apply(new V(e))})),0===t.blocks.length&&t.parent.apply(new V(t))}toParagraph(e){const t=new Re(c(),"paragraph");return t.apply(new Y(e.nodes)),t.annotationMap=e.annotationMap,t}}),P.register(D.INSERT_IMAGE_TO_BLOCK,We.name,new class extends W{handleAction(e,t){t.parent.apply("list-item"!==t.parent.type?new re(t,e.imageBlockToBeInserted):e)}});class ze{constructor(e){e.forEach((e=>{e.parent=this})),this.blocks=e}static fromJSON(e){const t=e.map((e=>{switch(e.type){case"paragraph":case"title":case"subtitle":case"heading-1":case"heading-2":case"heading-3":return Re.from(e);case"image":return Fe.from(e);case"bullet-list":case"number-list":return We.from(e);default:throw new Error(`[Vega] Unknown block type: ${e.type}`)}}));return new ze(t)}static createEmptyContent(){return ze.fromJSON([{id:c(),type:"paragraph",nodes:[{id:c(),type:"text",text:""}]}])}clone(){return new ze([...this.blocks])}toJSON(){return this.blocks.map((e=>e.toJSON()))}apply(e){P.executeTheStrategy(e,this)}toListItem(e){e.nodes.map((e=>e.apply(new xe)));const t=new $e(c());return t.apply(new Y(e.nodes)),t.annotationMap=e.annotationMap,t}createList(e){return new We(c(),e)}}P.register(D.DELETE_CHILD,ze.name,new qe),P.register(D.APPEND_CHILD_NODES,ze.name,new He),P.register(D.INSERT_BLOCKS_BEFORE,ze.name,new Pe),P.register(D.INSERT_BLOCKS_AFTER,ze.name,new Ke);export{z as A,G as B,ke as C,Ge as D,se as E,je as F,V as G,F as H,C as I,ne as J,ie as K,Ee as L,j as M,J as N,re as O,Re as R,ce as S,oe as T,de as U,T as V,be as Z,ze as a,Fe as b,$e as c,We as d,K as e,U as f,Oe as g,H as h,R as i,q as j,O as k,ge as l,fe as m,Te as n,le as o,Se as p,Ne as q,ue as r,_ as s,I as t,Ae as u,ae as v,$ as w,D as x,Y as y,we as z}