@supersoniks/concorde 2.0.7 → 3.0.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 (406) hide show
  1. package/build-infos.json +1 -0
  2. package/index.html +44 -0
  3. package/notes de migration.md +21 -0
  4. package/package.json +23 -290
  5. package/scripts/prebuild.mjs +22 -0
  6. package/{components.js → src/components.ts} +5 -2
  7. package/src/concorde-loaded.ts +3 -0
  8. package/src/core/_types/types.ts +55 -0
  9. package/src/core/components/functional/date/date.md +290 -0
  10. package/src/core/components/functional/date/date.ts +206 -0
  11. package/src/core/components/functional/example/example.ts +11 -0
  12. package/src/core/components/functional/fetch/fetch.md +117 -0
  13. package/{core/components/functional/fetch/fetch.js → src/core/components/functional/fetch/fetch.ts} +33 -37
  14. package/src/core/components/functional/if/if.md +16 -0
  15. package/src/core/components/functional/if/if.test.ts +40 -0
  16. package/src/core/components/functional/if/if.ts +23 -0
  17. package/src/core/components/functional/list/list.md +194 -0
  18. package/src/core/components/functional/list/list.ts +236 -0
  19. package/src/core/components/functional/mix/mix.md +41 -0
  20. package/src/core/components/functional/mix/mix.ts +95 -0
  21. package/src/core/components/functional/queue/queue.md +87 -0
  22. package/src/core/components/functional/queue/queue.ts +279 -0
  23. package/src/core/components/functional/router/redirect.ts +44 -0
  24. package/src/core/components/functional/router/router.md +112 -0
  25. package/src/core/components/functional/router/router.ts +108 -0
  26. package/src/core/components/functional/sdui/SDUIDescriptorTransformer.ts +229 -0
  27. package/{core → src/core}/components/functional/sdui/default-library.json +13 -13
  28. package/src/core/components/functional/sdui/example.json +99 -0
  29. package/src/core/components/functional/sdui/sdui-utils.ts +62 -0
  30. package/src/core/components/functional/sdui/sdui.md +356 -0
  31. package/src/core/components/functional/sdui/sdui.ts +230 -0
  32. package/src/core/components/functional/sdui/types.ts +34 -0
  33. package/src/core/components/functional/sonic-scope/sonic-scope.ts +13 -0
  34. package/src/core/components/functional/states/states.md +87 -0
  35. package/src/core/components/functional/states/states.ts +121 -0
  36. package/src/core/components/functional/submit/submit.md +48 -0
  37. package/src/core/components/functional/submit/submit.ts +265 -0
  38. package/src/core/components/functional/subscriber/subscriber.md +91 -0
  39. package/src/core/components/functional/subscriber/subscriber.ts +28 -0
  40. package/src/core/components/functional/value/value.md +35 -0
  41. package/src/core/components/functional/value/value.ts +18 -0
  42. package/{core/components/ui/_css/scroll.js → src/core/components/ui/_css/scroll.ts} +3 -2
  43. package/{core/components/ui/_css/size.js → src/core/components/ui/_css/size.ts} +5 -2
  44. package/{core/components/ui/_css/type.js → src/core/components/ui/_css/type.ts} +5 -3
  45. package/src/core/components/ui/alert/alert.md +121 -0
  46. package/src/core/components/ui/alert/alert.ts +177 -0
  47. package/src/core/components/ui/badge/badge.md +102 -0
  48. package/{core/components/ui/badge/badge.js → src/core/components/ui/badge/badge.ts} +36 -51
  49. package/src/core/components/ui/button/button.md +184 -0
  50. package/{core/components/ui/button/button.js → src/core/components/ui/button/button.ts} +258 -302
  51. package/src/core/components/ui/captcha/captcha.md +12 -0
  52. package/src/core/components/ui/captcha/captcha.ts +88 -0
  53. package/src/core/components/ui/card/card-footer.ts +19 -0
  54. package/src/core/components/ui/card/card-header-descripton.ts +24 -0
  55. package/{core/components/ui/card/card-header.js → src/core/components/ui/card/card-header.ts} +28 -38
  56. package/src/core/components/ui/card/card-main.ts +24 -0
  57. package/src/core/components/ui/card/card.md +96 -0
  58. package/{core/components/ui/card/card.js → src/core/components/ui/card/card.ts} +23 -34
  59. package/src/core/components/ui/divider/divider.md +35 -0
  60. package/{core/components/ui/divider/divider.js → src/core/components/ui/divider/divider.ts} +35 -65
  61. package/src/core/components/ui/form/checkbox/checkbox.md +96 -0
  62. package/{core/components/ui/form/checkbox/checkbox.js → src/core/components/ui/form/checkbox/checkbox.ts} +79 -98
  63. package/{core/components/ui/form/css/form-control.js → src/core/components/ui/form/css/form-control.ts} +9 -5
  64. package/src/core/components/ui/form/fieldset/fieldset.md +129 -0
  65. package/src/core/components/ui/form/fieldset/fieldset.ts +96 -0
  66. package/src/core/components/ui/form/fieldset/legend-description.ts +23 -0
  67. package/src/core/components/ui/form/fieldset/legend.ts +90 -0
  68. package/src/core/components/ui/form/form-actions/form-actions.md +77 -0
  69. package/src/core/components/ui/form/form-actions/form-actions.ts +32 -0
  70. package/src/core/components/ui/form/form-layout/form-layout.md +43 -0
  71. package/src/core/components/ui/form/form-layout/form-layout.ts +71 -0
  72. package/src/core/components/ui/form/input/input.md +168 -0
  73. package/src/core/components/ui/form/input/input.ts +227 -0
  74. package/src/core/components/ui/form/input/password-helper.ts +68 -0
  75. package/src/core/components/ui/form/input/same-value-helper.ts +48 -0
  76. package/src/core/components/ui/form/input-autocomplete/input-autocomplete.md +130 -0
  77. package/src/core/components/ui/form/input-autocomplete/input-autocomplete.ts +285 -0
  78. package/src/core/components/ui/form/radio/radio.md +86 -0
  79. package/src/core/components/ui/form/radio/radio.ts +44 -0
  80. package/src/core/components/ui/form/select/select.md +99 -0
  81. package/src/core/components/ui/form/select/select.ts +310 -0
  82. package/src/core/components/ui/form/textarea/textarea.md +66 -0
  83. package/src/core/components/ui/form/textarea/textarea.ts +119 -0
  84. package/src/core/components/ui/group/group.md +75 -0
  85. package/src/core/components/ui/group/group.ts +101 -0
  86. package/src/core/components/ui/icon/icon.md +125 -0
  87. package/src/core/components/ui/icon/icon.stories.ts +100 -0
  88. package/src/core/components/ui/icon/icon.ts +106 -0
  89. package/src/core/components/ui/icon/icons.json +1 -0
  90. package/src/core/components/ui/icon/icons.ts +130 -0
  91. package/src/core/components/ui/icon/svgs/cancel.svg +3 -0
  92. package/src/core/components/ui/icon/svgs/check-circled-outline.svg +4 -0
  93. package/src/core/components/ui/icon/svgs/check.svg +3 -0
  94. package/src/core/components/ui/icon/svgs/emoji-puzzled.svg +1 -0
  95. package/src/core/components/ui/icon/svgs/info-empty.svg +5 -0
  96. package/src/core/components/ui/icon/svgs/loader.svg +1 -0
  97. package/src/core/components/ui/icon/svgs/minus-small.svg +3 -0
  98. package/src/core/components/ui/icon/svgs/more-horiz.svg +5 -0
  99. package/src/core/components/ui/icon/svgs/more-vert.svg +5 -0
  100. package/src/core/components/ui/icon/svgs/nav-arrow-down.svg +3 -0
  101. package/src/core/components/ui/icon/svgs/warning-circled-outline.svg +5 -0
  102. package/src/core/components/ui/image/image.md +107 -0
  103. package/src/core/components/ui/image/image.ts +117 -0
  104. package/src/core/components/ui/link/link.md +43 -0
  105. package/src/core/components/ui/link/link.ts +108 -0
  106. package/src/core/components/ui/loader/loader.md +37 -0
  107. package/src/core/components/ui/loader/loader.stories.ts +25 -0
  108. package/src/core/components/ui/loader/loader.ts +81 -0
  109. package/{core/components/ui/loader/styles/fixed.js → src/core/components/ui/loader/styles/fixed.ts} +2 -1
  110. package/{core/components/ui/loader/styles/inline.js → src/core/components/ui/loader/styles/inline.ts} +3 -2
  111. package/src/core/components/ui/menu/menu-item.ts +30 -0
  112. package/src/core/components/ui/menu/menu.md +288 -0
  113. package/src/core/components/ui/menu/menu.ts +292 -0
  114. package/src/core/components/ui/modal/modal-actions.ts +35 -0
  115. package/src/core/components/ui/modal/modal-close.ts +36 -0
  116. package/src/core/components/ui/modal/modal-content.ts +19 -0
  117. package/src/core/components/ui/modal/modal-subtitle.ts +23 -0
  118. package/src/core/components/ui/modal/modal-title.ts +22 -0
  119. package/src/core/components/ui/modal/modal.md +123 -0
  120. package/src/core/components/ui/modal/modal.stories.ts +140 -0
  121. package/src/core/components/ui/modal/modal.ts +386 -0
  122. package/src/core/components/ui/pop/pop.md +79 -0
  123. package/src/core/components/ui/pop/pop.ts +291 -0
  124. package/src/core/components/ui/progress/progress.md +65 -0
  125. package/{core/components/ui/progress/progress.js → src/core/components/ui/progress/progress.ts} +31 -50
  126. package/src/core/components/ui/table/table-caption.ts +21 -0
  127. package/src/core/components/ui/table/table-tbody.ts +32 -0
  128. package/src/core/components/ui/table/table-td.ts +47 -0
  129. package/src/core/components/ui/table/table-tfoot.ts +20 -0
  130. package/src/core/components/ui/table/table-th.ts +56 -0
  131. package/src/core/components/ui/table/table-thead.ts +18 -0
  132. package/src/core/components/ui/table/table-tr.ts +48 -0
  133. package/src/core/components/ui/table/table.md +467 -0
  134. package/{core/components/ui/table/table.js → src/core/components/ui/table/table.ts} +32 -53
  135. package/{core/components/ui/theme/theme-collection/core-variables.js → src/core/components/ui/theme/theme-collection/core-variables.ts} +3 -2
  136. package/{core/components/ui/theme/theme-collection/dark.js → src/core/components/ui/theme/theme-collection/dark.ts} +5 -3
  137. package/{core/components/ui/theme/theme-collection/light.js → src/core/components/ui/theme/theme-collection/light.ts} +3 -2
  138. package/src/core/components/ui/theme/theme.ts +118 -0
  139. package/src/core/components/ui/toast/message-subscriber.stories.ts +43 -0
  140. package/src/core/components/ui/toast/message-subscriber.ts +37 -0
  141. package/{core/components/ui/toast/toast-item.js → src/core/components/ui/toast/toast-item.ts} +86 -113
  142. package/src/core/components/ui/toast/toast.ts +237 -0
  143. package/src/core/components/ui/toast/types.ts +14 -0
  144. package/src/core/components/ui/tooltip/tooltip.md +37 -0
  145. package/{core/components/ui/tooltip/tooltip.js → src/core/components/ui/tooltip/tooltip.ts} +26 -47
  146. package/{core/components/ui/ui.js → src/core/components/ui/ui.ts} +2 -0
  147. package/src/core/core.ts +22 -0
  148. package/src/core/decorators/Subscriber.ts +187 -0
  149. package/src/core/directives/DataProvider.ts +113 -0
  150. package/src/core/directives/Wording.ts +220 -0
  151. package/src/core/mixins/Fetcher.ts +258 -0
  152. package/src/core/mixins/FormCheckable.ts +287 -0
  153. package/src/core/mixins/FormElement.ts +275 -0
  154. package/src/core/mixins/FormInput.ts +135 -0
  155. package/src/core/mixins/Subscriber.ts +352 -0
  156. package/src/core/mixins/TemplatesContainer.ts +70 -0
  157. package/{core/mixins/mixins.d.ts → src/core/mixins/mixins.ts} +1 -1
  158. package/src/core/utils/Arrays.ts +161 -0
  159. package/src/core/utils/DataBindObserver.ts +286 -0
  160. package/src/core/utils/Electron.ts +15 -0
  161. package/src/core/utils/Format.ts +58 -0
  162. package/src/core/utils/HTML.ts +126 -0
  163. package/src/core/utils/LocationHandler.ts +139 -0
  164. package/src/core/utils/Objects.ts +103 -0
  165. package/src/core/utils/PublisherProxy.ts +786 -0
  166. package/src/core/utils/Utils.ts +12 -0
  167. package/src/core/utils/api.ts +456 -0
  168. package/{core/utils/url-pattern.d.ts → src/core/utils/url-pattern.ts} +1 -0
  169. package/{decorators.js → src/decorators.ts} +6 -2
  170. package/{directives.js → src/directives.ts} +11 -6
  171. package/src/docs/_core-concept/overview.md +57 -0
  172. package/src/docs/_core-concept/subscriber.md +76 -0
  173. package/src/docs/_getting-started/concorde-outside.md +141 -0
  174. package/src/docs/_getting-started/create-a-component.md +137 -0
  175. package/src/docs/_getting-started/pubsub.md +150 -0
  176. package/src/docs/_getting-started/start.md +37 -0
  177. package/src/docs/_getting-started/theming.md +91 -0
  178. package/src/docs/code.ts +281 -0
  179. package/src/docs/docs.ts +6 -0
  180. package/src/docs/example/users.ts +64 -0
  181. package/src/docs/navigation/navigation.ts +101 -0
  182. package/src/docs/prism/index.ts +6 -0
  183. package/src/docs/prism/prism.css +158 -0
  184. package/src/docs/prism/prism.js +1022 -0
  185. package/src/docs/search/docs-search.json +3767 -0
  186. package/src/docs/search/markdown-renderer.ts +40 -0
  187. package/src/docs/search/page.ts +40 -0
  188. package/src/docs/search/search.ts +184 -0
  189. package/src/docs.ts +2 -0
  190. package/src/index.ts +7 -0
  191. package/{mixins.js → src/mixins.ts} +10 -6
  192. package/src/tag-list.json +1 -0
  193. package/src/test-utils/TestUtils.ts +13 -0
  194. package/src/tsconfig.json +113 -0
  195. package/{utils.js → src/utils.ts} +15 -11
  196. package/test-utils/TestUtils.ts +13 -0
  197. package/vite/config.js +136 -0
  198. package/vite.config.mts +87 -0
  199. package/README.md +0 -27
  200. package/cli.js +0 -75
  201. package/components.d.ts +0 -4
  202. package/concorde-core.bundle.js +0 -3427
  203. package/concorde-core.es.js +0 -14372
  204. package/core/_types/types.d.ts +0 -28
  205. package/core/_types/types.js +0 -2
  206. package/core/components/functional/date/date.d.ts +0 -45
  207. package/core/components/functional/date/date.js +0 -243
  208. package/core/components/functional/example/example.d.ts +0 -7
  209. package/core/components/functional/example/example.js +0 -26
  210. package/core/components/functional/fetch/fetch.d.ts +0 -93
  211. package/core/components/functional/functional.js +0 -15
  212. package/core/components/functional/if/if.d.ts +0 -12
  213. package/core/components/functional/if/if.js +0 -38
  214. package/core/components/functional/if/if.test.d.ts +0 -1
  215. package/core/components/functional/if/if.test.js +0 -35
  216. package/core/components/functional/list/list.d.ts +0 -117
  217. package/core/components/functional/list/list.js +0 -214
  218. package/core/components/functional/mix/mix.d.ts +0 -22
  219. package/core/components/functional/mix/mix.js +0 -102
  220. package/core/components/functional/queue/queue.d.ts +0 -67
  221. package/core/components/functional/queue/queue.js +0 -310
  222. package/core/components/functional/router/redirect.d.ts +0 -18
  223. package/core/components/functional/router/redirect.js +0 -53
  224. package/core/components/functional/router/router.d.ts +0 -27
  225. package/core/components/functional/router/router.js +0 -119
  226. package/core/components/functional/sdui/SDUIDescriptorTransformer.d.ts +0 -58
  227. package/core/components/functional/sdui/SDUIDescriptorTransformer.js +0 -215
  228. package/core/components/functional/sdui/sdui-utils.d.ts +0 -5
  229. package/core/components/functional/sdui/sdui-utils.js +0 -63
  230. package/core/components/functional/sdui/sdui.d.ts +0 -136
  231. package/core/components/functional/sdui/sdui.js +0 -254
  232. package/core/components/functional/sdui/types.d.ts +0 -37
  233. package/core/components/functional/sdui/types.js +0 -1
  234. package/core/components/functional/sonic-scope/sonic-scope.d.ts +0 -5
  235. package/core/components/functional/sonic-scope/sonic-scope.js +0 -21
  236. package/core/components/functional/states/states.d.ts +0 -29
  237. package/core/components/functional/states/states.js +0 -134
  238. package/core/components/functional/submit/submit.d.ts +0 -30
  239. package/core/components/functional/submit/submit.js +0 -236
  240. package/core/components/functional/subscriber/subscriber.d.ts +0 -12
  241. package/core/components/functional/subscriber/subscriber.js +0 -38
  242. package/core/components/functional/value/value.d.ts +0 -7
  243. package/core/components/functional/value/value.js +0 -27
  244. package/core/components/ui/_css/scroll.d.ts +0 -1
  245. package/core/components/ui/_css/size.d.ts +0 -2
  246. package/core/components/ui/_css/type.d.ts +0 -2
  247. package/core/components/ui/alert/alert.d.ts +0 -34
  248. package/core/components/ui/alert/alert.js +0 -202
  249. package/core/components/ui/badge/badge.d.ts +0 -26
  250. package/core/components/ui/button/button.d.ts +0 -171
  251. package/core/components/ui/captcha/captcha.d.ts +0 -30
  252. package/core/components/ui/captcha/captcha.js +0 -93
  253. package/core/components/ui/card/card-footer.d.ts +0 -4
  254. package/core/components/ui/card/card-footer.js +0 -24
  255. package/core/components/ui/card/card-header-descripton.d.ts +0 -5
  256. package/core/components/ui/card/card-header-descripton.js +0 -32
  257. package/core/components/ui/card/card-header.d.ts +0 -8
  258. package/core/components/ui/card/card-main.d.ts +0 -4
  259. package/core/components/ui/card/card-main.js +0 -28
  260. package/core/components/ui/card/card.d.ts +0 -12
  261. package/core/components/ui/divider/divider.d.ts +0 -15
  262. package/core/components/ui/form/checkbox/checkbox.d.ts +0 -181
  263. package/core/components/ui/form/css/form-control.d.ts +0 -4
  264. package/core/components/ui/form/fieldset/fieldset.d.ts +0 -23
  265. package/core/components/ui/form/fieldset/fieldset.js +0 -118
  266. package/core/components/ui/form/fieldset/legend-description.d.ts +0 -5
  267. package/core/components/ui/form/fieldset/legend-description.js +0 -30
  268. package/core/components/ui/form/fieldset/legend.d.ts +0 -16
  269. package/core/components/ui/form/fieldset/legend.js +0 -112
  270. package/core/components/ui/form/form-actions/form-actions.d.ts +0 -7
  271. package/core/components/ui/form/form-actions/form-actions.js +0 -46
  272. package/core/components/ui/form/form-layout/form-layout.d.ts +0 -12
  273. package/core/components/ui/form/form-layout/form-layout.js +0 -83
  274. package/core/components/ui/form/input/input.d.ts +0 -106
  275. package/core/components/ui/form/input/input.js +0 -268
  276. package/core/components/ui/form/input/password-helper.d.ts +0 -25
  277. package/core/components/ui/form/input/password-helper.js +0 -119
  278. package/core/components/ui/form/input/same-value-helper.d.ts +0 -16
  279. package/core/components/ui/form/input/same-value-helper.js +0 -77
  280. package/core/components/ui/form/input-autocomplete/input-autocomplete.d.ts +0 -136
  281. package/core/components/ui/form/input-autocomplete/input-autocomplete.js +0 -296
  282. package/core/components/ui/form/radio/radio.d.ts +0 -12
  283. package/core/components/ui/form/radio/radio.js +0 -50
  284. package/core/components/ui/form/select/select.d.ts +0 -58
  285. package/core/components/ui/form/select/select.js +0 -298
  286. package/core/components/ui/form/textarea/textarea.d.ts +0 -84
  287. package/core/components/ui/form/textarea/textarea.js +0 -150
  288. package/core/components/ui/group/group.d.ts +0 -16
  289. package/core/components/ui/group/group.js +0 -118
  290. package/core/components/ui/icon/icon.d.ts +0 -26
  291. package/core/components/ui/icon/icon.js +0 -113
  292. package/core/components/ui/icon/icons.d.ts +0 -10
  293. package/core/components/ui/icon/icons.js +0 -126
  294. package/core/components/ui/icon/icons.json +0 -1
  295. package/core/components/ui/image/image.d.ts +0 -15
  296. package/core/components/ui/image/image.js +0 -153
  297. package/core/components/ui/link/link.d.ts +0 -29
  298. package/core/components/ui/link/link.js +0 -124
  299. package/core/components/ui/loader/loader.d.ts +0 -23
  300. package/core/components/ui/loader/loader.js +0 -97
  301. package/core/components/ui/loader/styles/fixed.d.ts +0 -1
  302. package/core/components/ui/loader/styles/inline.d.ts +0 -1
  303. package/core/components/ui/menu/menu-item.d.ts +0 -5
  304. package/core/components/ui/menu/menu-item.js +0 -34
  305. package/core/components/ui/menu/menu.d.ts +0 -41
  306. package/core/components/ui/menu/menu.js +0 -313
  307. package/core/components/ui/modal/modal-actions.d.ts +0 -7
  308. package/core/components/ui/modal/modal-actions.js +0 -42
  309. package/core/components/ui/modal/modal-close.d.ts +0 -7
  310. package/core/components/ui/modal/modal-close.js +0 -43
  311. package/core/components/ui/modal/modal-content.d.ts +0 -5
  312. package/core/components/ui/modal/modal-content.js +0 -26
  313. package/core/components/ui/modal/modal-subtitle.d.ts +0 -5
  314. package/core/components/ui/modal/modal-subtitle.js +0 -30
  315. package/core/components/ui/modal/modal-title.d.ts +0 -5
  316. package/core/components/ui/modal/modal-title.js +0 -29
  317. package/core/components/ui/modal/modal.d.ts +0 -58
  318. package/core/components/ui/modal/modal.js +0 -401
  319. package/core/components/ui/pop/pop.d.ts +0 -37
  320. package/core/components/ui/pop/pop.js +0 -299
  321. package/core/components/ui/progress/progress.d.ts +0 -10
  322. package/core/components/ui/table/table-caption.d.ts +0 -5
  323. package/core/components/ui/table/table-caption.js +0 -28
  324. package/core/components/ui/table/table-tbody.d.ts +0 -5
  325. package/core/components/ui/table/table-tbody.js +0 -39
  326. package/core/components/ui/table/table-td.d.ts +0 -12
  327. package/core/components/ui/table/table-td.js +0 -68
  328. package/core/components/ui/table/table-tfoot.d.ts +0 -5
  329. package/core/components/ui/table/table-tfoot.js +0 -27
  330. package/core/components/ui/table/table-th.d.ts +0 -11
  331. package/core/components/ui/table/table-th.js +0 -73
  332. package/core/components/ui/table/table-thead.d.ts +0 -5
  333. package/core/components/ui/table/table-thead.js +0 -25
  334. package/core/components/ui/table/table-tr.d.ts +0 -13
  335. package/core/components/ui/table/table-tr.js +0 -66
  336. package/core/components/ui/table/table.d.ts +0 -17
  337. package/core/components/ui/theme/theme-collection/core-variables.d.ts +0 -1
  338. package/core/components/ui/theme/theme-collection/dark.d.ts +0 -1
  339. package/core/components/ui/theme/theme-collection/light.d.ts +0 -1
  340. package/core/components/ui/theme/theme.d.ts +0 -19
  341. package/core/components/ui/theme/theme.js +0 -124
  342. package/core/components/ui/toast/message-subscriber.d.ts +0 -18
  343. package/core/components/ui/toast/message-subscriber.js +0 -40
  344. package/core/components/ui/toast/toast-item.d.ts +0 -19
  345. package/core/components/ui/toast/toast.d.ts +0 -25
  346. package/core/components/ui/toast/toast.js +0 -226
  347. package/core/components/ui/toast/types.d.ts +0 -11
  348. package/core/components/ui/toast/types.js +0 -1
  349. package/core/components/ui/tooltip/tooltip.d.ts +0 -10
  350. package/core/components/ui/ui.d.ts +0 -32
  351. package/core/core.d.ts +0 -4
  352. package/core/core.js +0 -19
  353. package/core/decorators/Subscriber.d.ts +0 -4
  354. package/core/decorators/Subscriber.js +0 -166
  355. package/core/directives/DataProvider.d.ts +0 -23
  356. package/core/directives/DataProvider.js +0 -102
  357. package/core/directives/Wording.d.ts +0 -42
  358. package/core/directives/Wording.js +0 -202
  359. package/core/mixins/Fetcher.d.ts +0 -90
  360. package/core/mixins/Fetcher.js +0 -242
  361. package/core/mixins/FormCheckable.d.ts +0 -88
  362. package/core/mixins/FormCheckable.js +0 -306
  363. package/core/mixins/FormElement.d.ts +0 -32
  364. package/core/mixins/FormElement.js +0 -272
  365. package/core/mixins/FormInput.d.ts +0 -70
  366. package/core/mixins/FormInput.js +0 -81
  367. package/core/mixins/Subscriber.d.ts +0 -36
  368. package/core/mixins/Subscriber.js +0 -333
  369. package/core/mixins/TemplatesContainer.d.ts +0 -13
  370. package/core/mixins/TemplatesContainer.js +0 -69
  371. package/core/mixins/mixins.js +0 -6
  372. package/core/utils/Arrays.d.ts +0 -97
  373. package/core/utils/Arrays.js +0 -140
  374. package/core/utils/DataBindObserver.d.ts +0 -83
  375. package/core/utils/DataBindObserver.js +0 -264
  376. package/core/utils/Electron.d.ts +0 -7
  377. package/core/utils/Electron.js +0 -11
  378. package/core/utils/Format.d.ts +0 -12
  379. package/core/utils/Format.js +0 -38
  380. package/core/utils/HTML.d.ts +0 -42
  381. package/core/utils/HTML.js +0 -119
  382. package/core/utils/LocationHandler.d.ts +0 -46
  383. package/core/utils/LocationHandler.js +0 -133
  384. package/core/utils/Objects.d.ts +0 -28
  385. package/core/utils/Objects.js +0 -102
  386. package/core/utils/PublisherProxy.d.ts +0 -176
  387. package/core/utils/PublisherProxy.js +0 -709
  388. package/core/utils/Utils.d.ts +0 -4
  389. package/core/utils/Utils.js +0 -12
  390. package/core/utils/api.d.ts +0 -139
  391. package/core/utils/api.js +0 -391
  392. package/core/utils/url-pattern.js +0 -2
  393. package/decorators.d.ts +0 -3
  394. package/directives.d.ts +0 -40
  395. package/img/concorde-logo.svg +0 -1
  396. package/img/concorde.png +0 -0
  397. package/img/concorde_def.png +0 -0
  398. package/mixins.d.ts +0 -181
  399. package/svg/regular/plane.svg +0 -1
  400. package/svg/solid/plane.svg +0 -1
  401. package/test-utils/TestUtils.d.ts +0 -4
  402. package/test-utils/TestUtils.js +0 -12
  403. package/utils.d.ts +0 -20
  404. /package/{core/components/functional/functional.d.ts → src/core/components/functional/functional.ts} +0 -0
  405. /package/{core → src/core}/components/ui/theme/css/tailwind.css +0 -0
  406. /package/{core → src/core}/components/ui/theme/css/tailwind.d.ts +0 -0
@@ -1,3427 +0,0 @@
1
- !function(t){"function"==typeof define&&define.amd?define(t):t()}((function(){var t,e;let s=class t{static getLanguage(){const t=document.documentElement.lang;return localStorage.getItem("SonicSelectedLanguage")||t}static getCookies(){return document.cookie.split(";").reduce(((t,e)=>{const s=e.indexOf("=");return t[e.substring(0,s).trim()]=e.substring(s+1),t}),{})}static everyAncestors(t,e){for(;t;){if(!e(t))return;t=t.parentNode||t.host}}static getAncestorAttributeValue(t,e){if(!t)return null;for(;!("hasAttribute"in t)||!t.hasAttribute(e);){if(!(t.parentNode||t.host))break;t=t.parentNode||t.host}return"hasAttribute"in t?t.getAttribute(e):null}static getApiConfiguration(e){const s=t.getAncestorAttributeValue(e,"token"),i=null!=t.getAncestorAttributeValue(e,"addHTTPResponse"),r=t.getAncestorAttributeValue(e,"serviceURL");let o=null,n=null;const a=t.getAncestorAttributeValue(e,"tokenProvider"),l=t.getAncestorAttributeValue(e,"eventsApiToken");s||(o=t.getAncestorAttributeValue(e,"userName"),n=t.getAncestorAttributeValue(e,"password"));return{serviceURL:r,token:s,userName:o,password:n,authToken:l,tokenProvider:a,addHTTPResponse:i,credentials:t.getAncestorAttributeValue(e,"credentials")||void 0,cache:e.getAttribute("cache"),blockUntilDone:e.hasAttribute("blockUntilDone")}}static getClosestElement(t,e){for(;!t.nodeName||t.nodeName.toLowerCase()!==e;){if(!(t.parentNode||t.host))break;t=t.parentNode||t.host}return t.nodeName?t:null}static getClosestForm(e){return t.getClosestElement(e,"form")}static async loadJS(t){return new Promise((async e=>{const s=document.createElement("script");s.src=t,s.onload=()=>e(!0),s.onerror=()=>e(!0),document.head.appendChild(s)}))}static async loadCSS(t){return new Promise((async e=>{const s=document.createElement("link");s.type="text/css",s.rel="stylesheet",s.href=t,s.onload=()=>e(!0),s.onerror=()=>e(!0),document.head.appendChild(s)}))}},i=class{static ucFirst(t){return"string"!=typeof t?t:t.charAt(0).toUpperCase()+t.substring(1)}static minutesDuration(t,e="",i="long"){e||(e=s.getLanguage());function r(t,e,s){return Intl.NumberFormat(t,{style:"unit",unit:e,unitDisplay:s}).format}const[o,n]=(a=t,l=60,[Math.floor(a/l),a%l]);var a,l;const c=[];return o&&c.push(r(e,"hour",i)(o)),n&&c.push(r(e,"minute",i)(n)),new Intl.ListFormat(e,{style:"long",type:"conjunction"}).format(c)}static js(t){try{return Function("return "+t)()}catch(e){return""}}};function r(t){return"object"==typeof t&&null!=t}const o=class t{constructor(t,e){for(this._proxies_=new Map,this._is_savable_=!1,this._invalidateListeners_=new Set,this._assignListeners_=new Set,this._mutationListeners_=new Set,this._fillListeners_=new Set,this._templateFillListeners_=new Set,this._lockInternalMutationPublishing_=!1,this._instanceCounter_=0,this._assignmentId_=0,this._value_=t,this.parent=e||null,this.root=this,this._instanceCounter_=0;this.root.parent;)this.root=this.root.parent}delete(){for(const t of this._proxies_.values())t.delete();this._invalidateListeners_.clear(),this._assignListeners_.clear(),this._mutationListeners_.clear(),this._fillListeners_.clear(),this._templateFillListeners_.clear(),this._proxies_.clear(),t.instances.delete(this._instanceCounter_)}hasListener(){return this._templateFillListeners_.size>0||this._assignListeners_.size>0||this._invalidateListeners_.size>0||this._mutationListeners_.size>0||this._fillListeners_.size>0}_publishInternalMutation_(t=!1){if(this._mutationListeners_.forEach((t=>t())),this._is_savable_&&!l.changed){l.changed=!0,l.saveId++;const t=l.saveId;setTimeout((()=>l.getInstance().saveToLocalStorage(t)),1e3)}t||this.parent&&this.parent._publishInternalMutation_()}async _publishAssignement_(t=!1){this._assignmentId_++;const e=this._assignmentId_;if(await(async()=>new Promise((t=>{window.queueMicrotask((()=>t(null)))})))(),e!==this._assignmentId_)return;const s=this.get();this._assignListeners_.forEach((t=>t(s))),this._publishInternalMutation_(t)}_publishInvalidation_(){this._invalidateListeners_.forEach((t=>t()))}_publishDynamicFilling_(t,e){this._fillListeners_.forEach((s=>{s[t]!==e&&(s[t]=e)})),this._publishTemplateFilling_(t,e)}_publishTemplateFilling_(t,e){this._templateFillListeners_.forEach((s=>{const i=Object.getOwnPropertyDescriptor(s,t);(!i||i.set||i.writable)&&(s.propertyMap&&s.propertyMap[t]&&(t=s.propertyMap[t]),void 0!==s[t]&&s[t]!==e&&(s[t]=e))}))}onAssign(t,e=!0){"function"==typeof t&&(this._assignListeners_.has(t)||(this._assignListeners_.add(t),e&&t(this.get())))}offAssign(t){this._assignListeners_.delete(t)}onInvalidate(t){"function"==typeof t&&this._invalidateListeners_.add(t)}offInvalidate(t){"function"==typeof t&&this._invalidateListeners_.delete(t)}invalidate(){this._publishInvalidation_()}onInternalMutation(t){"function"==typeof t&&(this._mutationListeners_.add(t),t())}offInternalMutation(t){"function"==typeof t&&this._mutationListeners_.delete(t)}startTemplateFilling(t){if(this._templateFillListeners_.add(t),"object"==typeof this._value_)for(const e in this._value_){let s=e;const i=this._value_[e];t.propertyMap&&t.propertyMap[e]&&(s=t.propertyMap[e]),void 0!==t[e]&&t[e]!==i&&(t[s]=i)}}stopTemplateFilling(t){this._templateFillListeners_.delete(t)}startDynamicFilling(t){this._fillListeners_.add(t);for(const e in this._value_){const s=this._value_[e];t[e]!==s&&(t[e]=s)}}stopDynamicFilling(t){this._fillListeners_.delete(t)}async set(t,e=!1){var s;if(this._value_===t)return!0;if(this._value_&&Object.prototype.hasOwnProperty.call(this._value_,"__value")&&Object.prototype.hasOwnProperty.call(t,"__value")&&this._value_.__value===t.__value)return!0;const i=this._value_;this._value_=r(t)?t:{__value:t},this._cachedGet_=void 0;if(Object.prototype.hasOwnProperty.call(this._value_,"__value"))return await this._publishAssignement_(e),!0;for(const r in this._value_)void 0===this._value_[r]&&delete this._value_[r];if(this._proxies_.forEach(((t,e)=>{void 0===this._value_[e]&&"_parent_"!=e&&i[e]&&(this._value_[e]=null)})),await this._publishAssignement_(),r(this._value_))for(const o in this._value_){const e=t[o],i=r(e)?e:{__value:e};this._proxies_.has(o)?(await(null==(s=this._proxies_.get(o))?void 0:s.set(i,!0)),this._publishDynamicFilling_(o,e)):this._publishDynamicFilling_(o,e)}return!0}get(){if(void 0!==this._cachedGet_)return this._cachedGet_;if(l.modifiedCollectore.length>0&&l.modifiedCollectore[0].add(this),Object.prototype.hasOwnProperty.call(this._value_,"__value")){const t=this._value_.__value;return this._cachedGet_=null!=t?t:null}return this._cachedGet_=this._value_}get $tag(){this._instanceCounter_||(t.instancesCounter++,this._instanceCounter_=t.instancesCounter),t.instances.set(this._instanceCounter_,this);return'<reactive-publisher-proxy publisher="'+this._instanceCounter_+'"></reactive-publisher-proxy>'}};o.instances=new Map,o.instancesCounter=0;let n=o;const a=class t{constructor(){if(this.enabledLocaStorageProxies=[],this.publishers=new Map,this.localStorageData={},this.isLocalStrorageReady=null,this.initialisedData=[],null!=t.instance)throw"Singleton / use getInstance";t.instance=this,this.isLocalStrorageReady=this.cleanStorageData()}async cleanStorageData(){return new Promise((t=>{(async()=>{try{let s=localStorage.getItem("publisher-proxies-data"),i=null;if(s&&(i=await this.decompress(s,"gzip")),i)try{this.localStorageData=JSON.parse(i)}catch(e){this.localStorageData={}}else s=await this.compress("{}","gzip"),localStorage.setItem("publisher-proxies-data",s),this.localStorageData={};const r=(new Date).getTime()-432e5;for(const t in this.localStorageData){this.localStorageData[t].lastModifiationMS<r&&delete this.localStorageData[t]}t(!0)}catch(e){window.requestAnimationFrame((()=>{t(!1)})),console.log("no publisher cache in this browser")}})()}))}static getInstance(){return null==t.instance?new t:t.instance}static get(e,s){return t.getInstance().get(e,s)}static collectModifiedPublisher(){t.modifiedCollectore.unshift(new Set)}static getModifiedPublishers(){return t.modifiedCollectore.shift()}static delete(e){return!!e&&t.getInstance().delete(e)}async setLocalData(t,e){var i;await this.isLocalStrorageReady,t.set((null==(i=this.localStorageData[e+"¤lang_"+s.getLanguage()])?void 0:i.data)||t.get())}get(t,e){const s="enabled"===(null==e?void 0:e.localStorageMode);if(!this.publishers.has(t)){const e=new h({});this.set(t,e)}const i=this.publishers.get(t);return s&&-1===this.initialisedData.indexOf(t)&&(i._is_savable_=!0,this.initialisedData.push(t),this.setLocalData(i,t)),this.publishers.get(t)}set(t,e){this.publishers.set(t,e)}delete(t){return!!this.publishers.has(t)&&(this.publishers.delete(t),!0)}async saveToLocalStorage(e=0){if(e===t.saveId||e%10==0)try{if(!t.changed||t.saving)return;t.saving=!0,t.changed=!1;const e=Array.from(this.publishers.keys());let i=!1;for(const t of e){const e=this.publishers.get(t);if(!(null==e?void 0:e._is_savable_))continue;const r=null==e?void 0:e.get();r&&(this.localStorageData[t+"¤lang_"+s.getLanguage()]={lastModifiationMS:(new Date).getTime(),data:r},i=!0)}if(i){const t=await this.compress(JSON.stringify(this.localStorageData),"gzip");localStorage.setItem("publisher-proxies-data",t)}if(t.saving=!1,t.changed){t.saveId++;const e=t.saveId;setTimeout((()=>this.saveToLocalStorage(e)),1e3)}}catch(i){t.saving=!1}}async compress(t,e){const s=(new TextEncoder).encode(t),i=new window.CompressionStream(e),r=i.writable.getWriter();r.write(s),r.close();const o=await new Response(i.readable).arrayBuffer(),n=new Uint8Array(o);let a="";for(let l=0;l<n.length;l++)a+=String.fromCharCode(n[l]);return btoa(a)}async decompress(t,e){const s=atob(t),i=Uint8Array.from(s,(t=>t.charCodeAt(0))).buffer,r=new window.DecompressionStream(e),o=r.writable.getWriter();o.write(i),o.close();const n=await new Response(r.readable).arrayBuffer();return(new TextDecoder).decode(n)}};a.buildDate="Thu Apr 04 2024 13:36:54 GMT+0200 (Central European Summer Time)",a.changed=!1,a.saving=!1,a.saveId=0,a.instance=null,a.modifiedCollectore=[];let l=a;const c=new Set(["invalidate","onInvalidate","offInvalidate","onAssign","offAssign","startDynamicFilling","stopDynamicFilling","startTemplateFilling","stopTemplateFilling","onInternalMutation","offInternalMutation","set","get","$tag","_cachedGet_","_templateFillListeners_","_fillListeners_","_assignListeners_","_invalidateListeners_","_publishInternalMutation_","hasListener","delete","_mutationListeners_","_publishDynamicFilling_","_publishInvalidation_","_publishTemplateFilling_","_publishAssignement_","_proxies_","parent","_value_","_is_savable_","_lockInternalMutationPublishing_","_instanceCounter_","_assignmentId_"]);class h extends n{constructor(t,e=null){super(t,e);const s=new Proxy(this,{get:function(t,e){if(e==Symbol.toPrimitive)return()=>s.get();if(c.has(e))return t[e];if(!t._proxies_.has(e)){const i=t._value_[e],o=new h(r(i)?i:{__value:i},t);o._proxies_.set("_parent_",s),t._proxies_.set(e,o)}return t._proxies_.get(e)},set:function(t,e,i){var o;if("_value_"==e)return t._value_=i,!0;if("_cachedGet_"==e)return t._cachedGet_=i,!0;if("_assignmentId_"==e)return t._assignmentId_=i,!0;if("_is_savable_"==e)return t._is_savable_=i,!0;if("_instanceCounter_"==e)return t._instanceCounter_=i,!0;if(!t._proxies_.has(e)){const i=new h({},t);i._proxies_.set("_parent_",s),t._proxies_.set(e,i)}return t._value_[e]!==i&&(t._value_[e]=i,t._publishDynamicFilling_(e,i),null==(o=t._proxies_.get(e))||o.set(r(i)?i:{__value:i})),!0},deleteProperty:function(t,e){var s;return t._publishDynamicFilling_(e,null),null==(s=t._proxies_.get(e))||s.set(null),delete t._value_[e]},has:function(t,e){return e in t._value_&&"_lockInternalMutationPublishing_"!=e},defineProperty:function(t,e,s){return s&&"value"in s&&(t._value_[e]=s.value),!0},getOwnPropertyDescriptor:function(t,e){return{enumerable:!0,configurable:!0}},ownKeys:function(t){return t._value_.__value?Object.keys(t._value_.__value):Object.keys(t._value_)}});return s}toString(){return"hey"}valueOf(){return 2}getProperty(t,e){return t[e]}}"undefined"!=typeof module&&(module.exports={Publisher:h,PublisherManager:l});class d extends HTMLElement{constructor(){super(),this.publisherId="",this.onAssign=t=>{this.innerHTML=t.toString()}}connectedCallback(){var t;this.publisherId=this.getAttribute("publisher")||"",this.publisher=n.instances.get(parseInt(this.publisherId)),null==(t=this.publisher)||t.onAssign(this.onAssign)}disconnectedCallback(){var t;null==(t=this.publisher)||t.offAssign(this.onAssign)}}customElements.define("reactive-publisher-proxy",d);const p=class t{static disable(){this.enabled&&(this.enabled=!1,Array.from(t.observedElements.keys()).forEach((e=>t.unObserve(e))))}static observe(e){if(!e)return;if(!t.enabled)return;if(t.observedElements.has(e))return;const s=new MutationObserver(t.onMutation),i={childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-bind"]};s.observe(e,i),e.querySelectorAll("[data-bind]").forEach((e=>t.addPublisherListeners(e))),t.observedElements.set(e,s)}static unObserve(e){if(!e)return;const s=this.observedElements.get(e);s&&(s.disconnect(),e.querySelectorAll("[data-bind]").forEach((e=>t.removePublisherListeners(e))))}static onAdded(e){e.hasAttribute&&e.hasAttribute("data-bind")&&t.addPublisherListeners(e),e.querySelectorAll?e.querySelectorAll("[data-bind]").forEach((e=>t.addPublisherListeners(e))):e.childNodes.forEach((e=>t.onAdded(e)))}static onRemoved(e){e.hasAttribute&&e.hasAttribute("data-bind")&&t.removePublisherListeners(e),e.querySelectorAll?e.querySelectorAll("[data-bind]").forEach((e=>t.removePublisherListeners(e))):e.childNodes.forEach((e=>t.onRemoved(e)))}static onMutation(e){for(const s of e)switch(s.type){case"attributes":t.addPublisherListeners(s.target);break;case"childList":s.addedNodes.forEach((e=>{t.onAdded(e)})),s.removedNodes.forEach((e=>{t.onRemoved(e)}))}}static removePublisherListeners(e){const s=t.publisherListeners.get(e);s&&(t.publisherListeners.delete(e),s.forEach((t=>{var e;null==(e=t.publisher)||e.offAssign(t.onAssign)})))}static getVariablesDescriptor(t){let e=t.match(/(\$(?:\w+\\?\.?)+)/g);return e=e?e.map((t=>t.replace("$",""))):[t],e=e.filter((t=>t.length>0)),{expression:t.replace("\\",""),variables:e.map((t=>t.split(/\b\.\b/).map((t=>t.replace("\\","")))))}}static getDataBindItems(e){return"attributes"in e?Array.from(e.attributes).filter((t=>0==t.name.indexOf("::"))).map((e=>({propertyToUpdate:e.name.substring(2).replace(/-((html)|\w)/g,(t=>t.substring(1).toUpperCase())),bindedVariablesDescriptor:t.getVariablesDescriptor(e.value)}))):[]}static getSubPublisher(t,e){if(!e)return t;for(const s of e)if("_self_"!=s){if(!t)return null;t=t[s]}return t}static addPublisherListeners(e){t.removePublisherListeners(e);const r=s.getAncestorAttributeValue(e.parentNode||e.host||e,"dataProvider");if(!r)return;const o=l.getInstance().get(r),n=t.getDataBindItems(e),a=[];n.forEach((s=>{const r=s.bindedVariablesDescriptor,n=s.propertyToUpdate;for(const l of r.variables){const s=l;let c=o;c=t.getSubPublisher(o,s);const h=e,d={publisher:c,onAssign:()=>{const e=r.variables.map((e=>{var s;return null==(s=t.getSubPublisher(o,e))?void 0:s.get()}));let s=r.expression,a=!1;if(1==e.length&&r.variables[0].join(".")==s.substring(1)){let t=e[0];return null===t&&(t=""),void(h[n]=t)}for(let t=0;t<e.length;t++){let i=e[t];const o=r.variables[t];null===i&&(a=!0,i=void 0),s=s.replace("$"+o.join("."),i)}if(-1!=s.indexOf("|")){const t=s.indexOf("|");if(0==t)s=i.js(s.substring(1));else{const e=s.substring(0,t),r=s.substring(t+1),o=i[e];s=a?"":o?o(r):s}}else s=a?"":s;h[n]=s}};null==c||c.onAssign(d.onAssign),a.push(d)}})),t.publisherListeners.set(e,a)}};p.observedElements=new Map,p.enabled=!0,p.publisherListeners=new Map;let u=p;u.observe(document.documentElement),window.SonicDataBindObserver||(window.SonicDataBindObserver=u);let g=class t{static shallowEqual(t,e,s=!0){const i=Object.keys(t),r=Object.keys(e);if(i.length!==r.length&&s)return!1;for(const o of i){const i=t[o],r=e[o];if(s?i!==r:i!=r)return!1}return!0}static deepEqual(e,s,i=!0){const r=Object.keys(e),o=Object.keys(s);if(r.length!==o.length&&i)return!1;for(const n of r){const r=e[n],o=s[n],a=t.isObject(r)&&t.isObject(o),l=i?r!==o:r!=o;if(a&&!t.deepEqual(r,o)||!a&&l)return!1}return!0}static isObject(t){return null!=t&&"object"==typeof t}static isUndefindOrNull(t){return null==t}static isEmpty(e){return!!t.isUndefindOrNull(e)||0===Object.keys(e).length}static traverse(e,s,i=!1){for(const r of s){const s=e[r];if(void 0===s)return;e=i&&t.isObject(s)?Object.assign(Array.isArray(s)?[]:{},e,s):e[r]}return e}static getURLSearchArray(e,s=""){let i=[];for(let r in e){const o=e[r];s&&(r=s+"["+r+"]"),t.isObject(o)?i=[...i,...this.getURLSearchArray(o,r)]:i.push(`${r}=${o}`)}return i}static getURLSearchString(e){return t.getURLSearchArray(e,"").join("&")}};
2
- /**
3
- * @license
4
- * Copyright 2017 Google LLC
5
- * SPDX-License-Identifier: BSD-3-Clause
6
- */const b=t=>(e,s)=>{void 0!==s?s.addInitializer((()=>{customElements.define(t,e)})):customElements.define(t,e)}
7
- /**
8
- * @license
9
- * Copyright 2019 Google LLC
10
- * SPDX-License-Identifier: BSD-3-Clause
11
- */,f=globalThis,m=f.ShadowRoot&&(void 0===f.ShadyCSS||f.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,v=Symbol(),y=new WeakMap;let w=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==v)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(m&&void 0===t){const s=void 0!==e&&1===e.length;s&&(t=y.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&y.set(e,t))}return t}toString(){return this.cssText}};const x=(t,...e)=>{const s=1===t.length?t[0]:e.reduce(((e,s,i)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[i+1]),t[0]);return new w(s,t,v)},_=m?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return(t=>new w("string"==typeof t?t:t+"",void 0,v))(e)})(t):t
12
- /**
13
- * @license
14
- * Copyright 2017 Google LLC
15
- * SPDX-License-Identifier: BSD-3-Clause
16
- */,{is:k,defineProperty:A,getOwnPropertyDescriptor:P,getOwnPropertyNames:C,getOwnPropertySymbols:S,getPrototypeOf:$}=Object,O=globalThis,D=O.trustedTypes,L=D?D.emptyScript:"",E=O.reactiveElementPolyfillSupport,j=(t,e)=>t,M={toAttribute(t,e){switch(e){case Boolean:t=t?L:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let s=t;switch(e){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch(i){s=null}}return s}},I=(t,e)=>!k(t,e),T={attribute:!0,type:String,converter:M,reflect:!1,hasChanged:I};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),O.litPropertyMetadata??(O.litPropertyMetadata=new WeakMap);let N=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=T){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),i=this.getPropertyDescriptor(t,s,e);void 0!==i&&A(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){const{get:i,set:r}=P(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get(){return null==i?void 0:i.call(this)},set(e){const o=null==i?void 0:i.call(this);r.call(this,e),this.requestUpdate(t,o,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??T}static _$Ei(){if(this.hasOwnProperty(j("elementProperties")))return;const t=$(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(j("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(j("properties"))){const t=this.properties,e=[...C(t),...S(t)];for(const s of e)this.createProperty(s,t[s])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,s]of e)this.elementProperties.set(t,s)}this._$Eh=new Map;for(const[e,s]of this.elementProperties){const t=this._$Eu(e,s);void 0!==t&&this._$Eh.set(t,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const t of s)e.unshift(_(t))}else void 0!==t&&e.push(_(t));return e}static _$Eu(t,e){const s=e.attribute;return!1===s?void 0:"string"==typeof s?s:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$Eg=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$ES(),this.requestUpdate(),null==(t=this.constructor.l)||t.forEach((t=>t(this)))}addController(t){var e;(this._$E_??(this._$E_=new Set)).add(t),void 0!==this.renderRoot&&this.isConnected&&(null==(e=t.hostConnected)||e.call(t))}removeController(t){var e;null==(e=this._$E_)||e.delete(t)}_$ES(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{if(m)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const s of e){const e=document.createElement("style"),i=f.litNonce;void 0!==i&&e.setAttribute("nonce",i),e.textContent=s.cssText,t.appendChild(e)}})(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null==(t=this._$E_)||t.forEach((t=>{var e;return null==(e=t.hostConnected)?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null==(t=this._$E_)||t.forEach((t=>{var e;return null==(e=t.hostDisconnected)?void 0:e.call(t)}))}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$EO(t,e){var s;const i=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,i);if(void 0!==r&&!0===i.reflect){const o=(void 0!==(null==(s=i.converter)?void 0:s.toAttribute)?i.converter:M).toAttribute(e,i.type);this._$Em=t,null==o?this.removeAttribute(r):this.setAttribute(r,o),this._$Em=null}}_$AK(t,e){var s;const i=this.constructor,r=i._$Eh.get(t);if(void 0!==r&&this._$Em!==r){const t=i.getPropertyOptions(r),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null==(s=t.converter)?void 0:s.fromAttribute)?t.converter:M;this._$Em=r,this[r]=o.fromAttribute(e,t.type),this._$Em=null}}requestUpdate(t,e,s,i=!1,r){if(void 0!==t){if(s??(s=this.constructor.getPropertyOptions(t)),!(s.hasChanged??I)(i?r:this[t],e))return;this.C(t,e,s)}!1===this.isUpdatePending&&(this._$Eg=this._$EP())}C(t,e,s){this._$AL.has(t)||this._$AL.set(t,e),!0===s.reflect&&this._$Em!==t&&(this._$Ej??(this._$Ej=new Set)).add(t)}async _$EP(){this.isUpdatePending=!0;try{await this._$Eg}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,s]of t)!0!==s.wrapped||this._$AL.has(e)||void 0===this[e]||this.C(e,this[e],s)}let e=!1;const s=this._$AL;try{e=this.shouldUpdate(s),e?(this.willUpdate(s),null==(t=this._$E_)||t.forEach((t=>{var e;return null==(e=t.hostUpdate)?void 0:e.call(t)})),this.update(s)):this._$ET()}catch(i){throw e=!1,this._$ET(),i}e&&this._$AE(s)}willUpdate(t){}_$AE(t){var e;null==(e=this._$E_)||e.forEach((t=>{var e;return null==(e=t.hostUpdated)?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$ET(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Eg}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach((t=>this._$EO(t,this[t])))),this._$ET()}updated(t){}firstUpdated(t){}};N.elementStyles=[],N.shadowRootOptions={mode:"open"},N[j("elementProperties")]=new Map,N[j("finalized")]=new Map,null==E||E({ReactiveElement:N}),(O.reactiveElementVersions??(O.reactiveElementVersions=[])).push("2.0.2");
17
- /**
18
- * @license
19
- * Copyright 2017 Google LLC
20
- * SPDX-License-Identifier: BSD-3-Clause
21
- */
22
- const z={attribute:!0,type:String,converter:M,reflect:!1,hasChanged:I},R=(t=z,e,s)=>{const{kind:i,metadata:r}=s;let o=globalThis.litPropertyMetadata.get(r);if(void 0===o&&globalThis.litPropertyMetadata.set(r,o=new Map),o.set(s.name,t),"accessor"===i){const{name:i}=s;return{set(s){const r=e.get.call(this);e.set.call(this,s),this.requestUpdate(i,r,t)},init(e){return void 0!==e&&this.C(i,void 0,t),e}}}if("setter"===i){const{name:i}=s;return function(s){const r=this[i];e.call(this,s),this.requestUpdate(i,r,t)}}throw Error("Unsupported decorator location: "+i)};function F(t){return(e,s)=>"object"==typeof s?R(t,e,s):((t,e,s)=>{const i=e.hasOwnProperty(s);return e.constructor.createProperty(s,i?{...t,wrapped:!0}:t),i?Object.getOwnPropertyDescriptor(e,s):void 0})(t,e,s)}
23
- /**
24
- * @license
25
- * Copyright 2017 Google LLC
26
- * SPDX-License-Identifier: BSD-3-Clause
27
- */function U(t){return F({...t,state:!0,attribute:!1})}
28
- /**
29
- * @license
30
- * Copyright 2017 Google LLC
31
- * SPDX-License-Identifier: BSD-3-Clause
32
- */const V=(t,e,s)=>(s.configurable=!0,s.enumerable=!0,Reflect.decorate&&"object"!=typeof e&&Object.defineProperty(t,e,s),s)
33
- /**
34
- * @license
35
- * Copyright 2017 Google LLC
36
- * SPDX-License-Identifier: BSD-3-Clause
37
- */;function B(t,e){return(s,i,r)=>{const o=e=>{var s;return(null==(s=e.renderRoot)?void 0:s.querySelector(t))??null};if(e){const{get:t,set:e}="object"==typeof i?s:r??(()=>{const t=Symbol();return{get(){return this[t]},set(e){this[t]=e}}})();return V(s,i,{get(){let s=t.call(this);return void 0===s&&(s=o(this),(null!==s||this.hasUpdated)&&e.call(this,s)),s}})}return V(s,i,{get(){return o(this)}})}}
38
- /**
39
- * @license
40
- * Copyright 2021 Google LLC
41
- * SPDX-License-Identifier: BSD-3-Clause
42
- */function H(t){return(e,s)=>{const{slot:i,selector:r}=t??{},o="slot"+(i?`[name=${i}]`:":not([name])");return V(e,s,{get(){var e;const s=null==(e=this.renderRoot)?void 0:e.querySelector(o),i=(null==s?void 0:s.assignedElements(t))??[];return void 0===r?i:i.filter((t=>t.matches(r)))}})}}
43
- /**
44
- * @license
45
- * Copyright 2017 Google LLC
46
- * SPDX-License-Identifier: BSD-3-Clause
47
- */function q(t){return(e,s)=>{const{slot:i}=t??{},r="slot"+(i?`[name=${i}]`:":not([name])");return V(e,s,{get(){var e;const s=null==(e=this.renderRoot)?void 0:e.querySelector(r);return(null==s?void 0:s.assignedNodes(t))??[]}})}}
48
- /**
49
- * @license
50
- * Copyright 2017 Google LLC
51
- * SPDX-License-Identifier: BSD-3-Clause
52
- */const W=globalThis,K=W.trustedTypes,Z=K?K.createPolicy("lit-html",{createHTML:t=>t}):void 0,Y="$lit$",G=`lit$${(Math.random()+"").slice(9)}$`,Q="?"+G,J=`<${Q}>`,X=document,tt=()=>X.createComment(""),et=t=>null===t||"object"!=typeof t&&"function"!=typeof t,st=Array.isArray,it=t=>st(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]),rt="[ \t\n\f\r]",ot=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,nt=/-->/g,at=/>/g,lt=RegExp(`>|${rt}(?:([^\\s"'>=/]+)(${rt}*=${rt}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),ct=/'/g,ht=/"/g,dt=/^(?:script|style|textarea|title)$/i,pt=(mt=1,(t,...e)=>({_$litType$:mt,strings:t,values:e})),ut=Symbol.for("lit-noChange"),gt=Symbol.for("lit-nothing"),bt=new WeakMap,ft=X.createTreeWalker(X,129);var mt;function vt(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==Z?Z.createHTML(e):e}const yt=(t,e)=>{const s=t.length-1,i=[];let r,o=2===e?"<svg>":"",n=ot;for(let a=0;a<s;a++){const e=t[a];let s,l,c=-1,h=0;for(;h<e.length&&(n.lastIndex=h,l=n.exec(e),null!==l);)h=n.lastIndex,n===ot?"!--"===l[1]?n=nt:void 0!==l[1]?n=at:void 0!==l[2]?(dt.test(l[2])&&(r=RegExp("</"+l[2],"g")),n=lt):void 0!==l[3]&&(n=lt):n===lt?">"===l[0]?(n=r??ot,c=-1):void 0===l[1]?c=-2:(c=n.lastIndex-l[2].length,s=l[1],n=void 0===l[3]?lt:'"'===l[3]?ht:ct):n===ht||n===ct?n=lt:n===nt||n===at?n=ot:(n=lt,r=void 0);const d=n===lt&&t[a+1].startsWith("/>")?" ":"";o+=n===ot?e+J:c>=0?(i.push(s),e.slice(0,c)+Y+e.slice(c)+G+d):e+G+(-2===c?a:d)}return[vt(t,o+(t[s]||"<?>")+(2===e?"</svg>":"")),i]};class wt{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let r=0,o=0;const n=t.length-1,a=this.parts,[l,c]=yt(t,e);if(this.el=wt.createElement(l,s),ft.currentNode=this.el.content,2===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=ft.nextNode())&&a.length<n;){if(1===i.nodeType){if(i.hasAttributes())for(const t of i.getAttributeNames())if(t.endsWith(Y)){const e=c[o++],s=i.getAttribute(t).split(G),n=/([.?@])?(.*)/.exec(e);a.push({type:1,index:r,name:n[2],strings:s,ctor:"."===n[1]?Pt:"?"===n[1]?Ct:"@"===n[1]?St:At}),i.removeAttribute(t)}else t.startsWith(G)&&(a.push({type:6,index:r}),i.removeAttribute(t));if(dt.test(i.tagName)){const t=i.textContent.split(G),e=t.length-1;if(e>0){i.textContent=K?K.emptyScript:"";for(let s=0;s<e;s++)i.append(t[s],tt()),ft.nextNode(),a.push({type:2,index:++r});i.append(t[e],tt())}}}else if(8===i.nodeType)if(i.data===Q)a.push({type:2,index:r});else{let t=-1;for(;-1!==(t=i.data.indexOf(G,t+1));)a.push({type:7,index:r}),t+=G.length-1}r++}}static createElement(t,e){const s=X.createElement("template");return s.innerHTML=t,s}}function xt(t,e,s=t,i){var r,o;if(e===ut)return e;let n=void 0!==i?null==(r=s._$Co)?void 0:r[i]:s._$Cl;const a=et(e)?void 0:e._$litDirective$;return(null==n?void 0:n.constructor)!==a&&(null==(o=null==n?void 0:n._$AO)||o.call(n,!1),void 0===a?n=void 0:(n=new a(t),n._$AT(t,s,i)),void 0!==i?(s._$Co??(s._$Co=[]))[i]=n:s._$Cl=n),void 0!==n&&(e=xt(t,n._$AS(t,e.values),n,i)),e}class _t{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:s}=this._$AD,i=((null==t?void 0:t.creationScope)??X).importNode(e,!0);ft.currentNode=i;let r=ft.nextNode(),o=0,n=0,a=s[0];for(;void 0!==a;){if(o===a.index){let e;2===a.type?e=new kt(r,r.nextSibling,this,t):1===a.type?e=new a.ctor(r,a.name,a.strings,this,t):6===a.type&&(e=new $t(r,this,t)),this._$AV.push(e),a=s[++n]}o!==(null==a?void 0:a.index)&&(r=ft.nextNode(),o++)}return ft.currentNode=X,i}p(t){let e=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class kt{get _$AU(){var t;return(null==(t=this._$AM)?void 0:t._$AU)??this._$Cv}constructor(t,e,s,i){this.type=2,this._$AH=gt,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=(null==i?void 0:i.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===(null==t?void 0:t.nodeType)&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=xt(this,t,e),et(t)?t===gt||null==t||""===t?(this._$AH!==gt&&this._$AR(),this._$AH=gt):t!==this._$AH&&t!==ut&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):it(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==gt&&et(this._$AH)?this._$AA.nextSibling.data=t:this.$(X.createTextNode(t)),this._$AH=t}g(t){var e;const{values:s,_$litType$:i}=t,r="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=wt.createElement(vt(i.h,i.h[0]),this.options)),i);if((null==(e=this._$AH)?void 0:e._$AD)===r)this._$AH.p(s);else{const t=new _t(r,this),e=t.u(this.options);t.p(s),this.$(e),this._$AH=t}}_$AC(t){let e=bt.get(t.strings);return void 0===e&&bt.set(t.strings,e=new wt(t)),e}T(t){st(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const r of t)i===e.length?e.push(s=new kt(this.k(tt()),this.k(tt()),this,this.options)):s=e[i],s._$AI(r),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var s;for(null==(s=this._$AP)||s.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cv=t,null==(e=this._$AP)||e.call(this,t))}}class At{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,r){this.type=1,this._$AH=gt,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=r,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=gt}_$AI(t,e=this,s,i){const r=this.strings;let o=!1;if(void 0===r)t=xt(this,t,e,0),o=!et(t)||t!==this._$AH&&t!==ut,o&&(this._$AH=t);else{const i=t;let n,a;for(t=r[0],n=0;n<r.length-1;n++)a=xt(this,i[s+n],e,n),a===ut&&(a=this._$AH[n]),o||(o=!et(a)||a!==this._$AH[n]),a===gt?t=gt:t!==gt&&(t+=(a??"")+r[n+1]),this._$AH[n]=a}o&&!i&&this.O(t)}O(t){t===gt?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Pt extends At{constructor(){super(...arguments),this.type=3}O(t){this.element[this.name]=t===gt?void 0:t}}class Ct extends At{constructor(){super(...arguments),this.type=4}O(t){this.element.toggleAttribute(this.name,!!t&&t!==gt)}}class St extends At{constructor(t,e,s,i,r){super(t,e,s,i,r),this.type=5}_$AI(t,e=this){if((t=xt(this,t,e,0)??gt)===ut)return;const s=this._$AH,i=t===gt&&s!==gt||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,r=t!==gt&&(s===gt||i);i&&this.element.removeEventListener(this.name,this,s),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e;"function"==typeof this._$AH?this._$AH.call((null==(e=this.options)?void 0:e.host)??this.element,t):this._$AH.handleEvent(t)}}class $t{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){xt(this,t)}}const Ot={j:Y,P:G,A:Q,C:1,M:yt,L:_t,R:it,V:xt,D:kt,I:At,H:Ct,N:St,U:Pt,B:$t},Dt=W.litHtmlPolyfillSupport;null==Dt||Dt(wt,kt),(W.litHtmlVersions??(W.litHtmlVersions=[])).push("3.1.0");const{D:Lt}=Ot,Et=()=>document.createComment(""),jt=(t,e,s)=>{var i;const r=t._$AA.parentNode,o=void 0===e?t._$AB:e._$AA;if(void 0===s){const e=r.insertBefore(Et(),o),i=r.insertBefore(Et(),o);s=new Lt(e,i,t,t.options)}else{const e=s._$AB.nextSibling,n=s._$AM,a=n!==t;if(a){let e;null==(i=s._$AQ)||i.call(s,t),s._$AM=t,void 0!==s._$AP&&(e=t._$AU)!==n._$AU&&s._$AP(e)}if(e!==o||a){let t=s._$AA;for(;t!==e;){const e=t.nextSibling;r.insertBefore(t,o),t=e}}}return s},Mt=(t,e,s=t)=>(t._$AI(e,s),t),It={},Tt=t=>{var e;null==(e=t._$AP)||e.call(t,!1,!0);let s=t._$AA;const i=t._$AB.nextSibling;for(;s!==i;){const t=s.nextSibling;s.remove(),s=t}},Nt=1,zt=2,Rt=t=>(...e)=>({_$litDirective$:t,values:e});
53
- /**
54
- * @license
55
- * Copyright 2020 Google LLC
56
- * SPDX-License-Identifier: BSD-3-Clause
57
- */let Ft=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,s){this._$Ct=t,this._$AM=e,this._$Ci=s}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};
58
- /**
59
- * @license
60
- * Copyright 2017 Google LLC
61
- * SPDX-License-Identifier: BSD-3-Clause
62
- */const Ut=(t,e)=>{var s;const i=t._$AN;if(void 0===i)return!1;for(const r of i)null==(s=r._$AO)||s.call(r,e,!1),Ut(r,e);return!0},Vt=t=>{let e,s;do{if(void 0===(e=t._$AM))break;s=e._$AN,s.delete(t),t=e}while(0===(null==s?void 0:s.size))},Bt=t=>{for(let e;e=t._$AM;t=e){let s=e._$AN;if(void 0===s)e._$AN=s=new Set;else if(s.has(t))break;s.add(t),Wt(e)}};function Ht(t){void 0!==this._$AN?(Vt(this),this._$AM=t,Bt(this)):this._$AM=t}function qt(t,e=!1,s=0){const i=this._$AH,r=this._$AN;if(void 0!==r&&0!==r.size)if(e)if(Array.isArray(i))for(let o=s;o<i.length;o++)Ut(i[o],!1),Vt(i[o]);else null!=i&&(Ut(i,!1),Vt(i));else Ut(this,t)}const Wt=t=>{t.type==zt&&(t._$AP??(t._$AP=qt),t._$AQ??(t._$AQ=Ht))};let Kt=class extends Ft{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,s){super._$AT(t,e,s),Bt(this),this.isConnected=t._$AU}_$AO(t,e=!0){var s,i;t!==this.isConnected&&(this.isConnected=t,t?null==(s=this.reconnected)||s.call(this):null==(i=this.disconnected)||i.call(this)),e&&(Ut(this,t),Vt(this))}setValue(t){if(void 0===this._$Ct.strings)this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}},Zt=class extends N{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t;const e=super.createRenderRoot();return(t=this.renderOptions).renderBefore??(t.renderBefore=e.firstChild),e}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,s)=>{const i=(null==s?void 0:s.renderBefore)??e;let r=i._$litPart$;if(void 0===r){const t=(null==s?void 0:s.renderBefore)??null;i._$litPart$=r=new kt(e.insertBefore(tt(),t),t,void 0,s??{})}return r._$AI(t),r})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null==(t=this._$Do)||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null==(t=this._$Do)||t.setConnected(!1)}render(){return ut}};
63
- /**
64
- * @license
65
- * Copyright 2017 Google LLC
66
- * SPDX-License-Identifier: BSD-3-Clause
67
- */Zt._$litElement$=!0,Zt.finalized=!0,null==(t=globalThis.litElementHydrateSupport)||t.call(globalThis,{LitElement:Zt});const Yt=globalThis.litElementPolyfillSupport;function Gt(t){if("function"==typeof t){const e=t;return l.collectModifiedPublisher(),e(),l.getModifiedPublishers()||new Set}if("string"==typeof t){const e=t.split("."),s=e.shift()||"";let i=l.get(s);i=g.traverse(i,e);const r=new Set;return r.add(i),r}return new Set([t])}null==Yt||Yt({LitElement:Zt}),(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.0.2");const Qt=Rt(class extends Kt{constructor(t){var e;super(t),this.observables=new Set,this.onAssign=t=>{this.setValue(t)},this.node=null==(e=t.options)?void 0:e.host}unsubscribe(){this.observables.forEach((t=>t.offAssign(this.onAssign)))}render(t){return this.observable!==t&&(this.observable=t,this.isConnected&&this.subscribe(t)),ut}subscribe(t){this.unsubscribe(),this.onAssign="function"==typeof t?()=>{this.setValue(t())}:t=>{this.setValue(t)},this.observables=Gt(t),this.observables.forEach((t=>{t.onAssign(this.onAssign)}))}disconnected(){this.unsubscribe()}reconnected(){this.observable&&this.subscribe(this.observable)}}),Jt=Qt,Xt=Qt,te=(t,e)=>{const s=Gt(t).values().next().value;if(void 0!==e){const t=s.get();g.isEmpty(t)&&s.set(e)}return s},ee=te,se=te,ie=class t{constructor(t){this.addHTTPResponse=!1,this.cache="default",this.isServiceSimulated=!1,this.blockUntilDone=!1,this.serviceURL=t.serviceURL,this.blockUntilDone=t.blockUntilDone||!1,"publisher://"==this.serviceURL&&(this.isServiceSimulated=!0),this.serviceURL||(this.serviceURL=document.location.origin),this.userName=t.userName,this.password=t.password,t.token&&(this.token=t.token),this.tokenProvider=t.tokenProvider,this.authToken=t.authToken,this.addHTTPResponse=t.addHTTPResponse||!1,this.credentials=t.credentials,this.cache=t.cache||"default"}set token(e){this._token=e,e?t.invalidTokens.includes(e)||t.tokens.set(this.serviceURL,e):t.tokens.delete(this.serviceURL)}get token(){return t.invalidTokens.includes(this._token)?t.tokens.get(this.serviceURL):this._token}handleInvalidToken(e){e&&(t.invalidTokens.includes(e)||(t.invalidTokens.push(e),this.token=null))}async handleResult(e,s){var i;t.firstCallDoneFlags.set(this.serviceURL,"done"),this.lastResult=e;const r=null==(i=e.headers.get("content-type"))?void 0:i.toLowerCase(),o=e.status;let n={};if(r&&0!=r.indexOf("text/"))try{n=await e.json()}catch(a){n={}}else{n={text:await e.text()}}return this.addHTTPResponse&&g.isObject(n)&&(n._sonic_http_response_=e),498!==o||t.failledTokenUpdates.has(this.serviceURL)||(this.handleInvalidToken(this.token),n="get"===s.apiMethod?await this[s.apiMethod](s.path,s.additionalHeaders):await this[s.apiMethod](s.path,s.data,s.method,s.additionalHeaders)),n}async auth(){if(this.token)return;if(t.tokens.has(this.serviceURL))return void(this.token=t.tokens.get(this.serviceURL));if(!this.tokenProvider)return;let e={};this.userName&&this.password?e={Authorization:"Basic "+window.btoa(unescape(encodeURIComponent(this.userName+":"+this.password)))}:this.authToken&&(e={Authorization:"Bearer "+this.authToken});const s=new URL(this.serviceURL),i=s.protocol+"//"+s.host,r=await fetch(this.computeURL(this.tokenProvider,{serviceHost:i}),{headers:e,credentials:this.credentials});try{const e=await r.json();e.token?this.token=e.token:t.failledTokenUpdates.set(this.serviceURL,!0)}catch(o){t.failledTokenUpdates.set(this.serviceURL,!0)}}async localGet(t,e){var s;const i=l.get(t);console.log(i);const r=new URLSearchParams(e.split("?")[1]||""),o=i.get();let n=[];n=Array.isArray(o)?o:[o];const a=[];let c=Number.POSITIVE_INFINITY,h=0,d=0;if(r.has("limit")&&(c=parseInt(r.get("limit")||"0"),d++),r.has("offset")&&(h=parseInt(r.get("offset")||"0"),d++),d>0&&(r.delete("limit"),r.delete("offset")),0===r.size)return n.slice(h,h+c);for(const[l,p]of r.entries()){const t=p.split(",").map((t=>t.trim()));for(const e of t)for(const t of n)if("object"!=typeof t)isNaN(+p)?t.toString().includes(p)&&a.push(t):t==p&&a.push(t);else{const i=t;if(!i[l])continue;isNaN(+e)?(null==(s=i[l])?void 0:s.toString().toLowerCase().includes(e.toLowerCase()))&&a.push(t):i[l]==e&&a.push(t)}}return a.slice(h,h+c)}firstCallDone(){return new Promise((e=>{if(t.firstCallDoneFlags.has(this.serviceURL)){const s=()=>{[void 0,"loading"].includes(t.firstCallDoneFlags.get(this.serviceURL))?window.requestAnimationFrame(s):e(!0)};s()}else t.firstCallDoneFlags.set(this.serviceURL,"loading"),e(!0)}))}async get(e,s){await this.firstCallDone(),this.blockUntilDone&&t.firstCallDoneFlags.set(this.serviceURL,"loading");const i=/dataProvider\((.*?)\)(.*?)$/;if(i.test(e)){const t=e.match(i);if(!t)throw new Error("dataProvider path is not valid");return await this.localGet(t[1],t[2])}const r={apiMethod:"get",path:e,additionalHeaders:s},o=await this.createHeaders(s),n=this.computeURL(e),a=JSON.stringify({url:n,headers:o});if(!t.loadingGetPromises.has(a)){const e=new Promise((async t=>{try{const e=await fetch(n,{headers:o,credentials:this.credentials,cache:this.cache});t(await this.handleResult(e,r))}catch(e){t(null)}}));t.loadingGetPromises.set(a,e)}const l=await t.loadingGetPromises.get(a);return t.loadingGetPromises.delete(a),l}async createHeaders(t){await this.auth();const e={};return this.token&&(e.Authorization="Bearer "+this.token),e["Accept-Language"]=s.getLanguage(),t&&Object.assign(e,t),e}computeURL(t,e={}){let s="";s=t.startsWith("http")?t:this.serviceURL+"/"+t,s.startsWith("http")||(s=window.location.origin+s);const i=new URL(s);for(const r in e)i.searchParams.set(r,e[r]);return i.toString().replace(/([^(https?:)])\/{2,}/g,"$1/")}async send(t,e,s="POST",i){const r={apiMethod:"send",path:t,additionalHeaders:i,method:s,data:e},o=await this.createHeaders(i);o.Accept="application/json",o["Content-Type"]="application/json";const n=await fetch(this.computeURL(t),{headers:o,credentials:this.credentials,method:s,body:JSON.stringify(e)});return await this.handleResult(n,r)}async submitFormData(t,e,s="POST",i){const r={apiMethod:"submitFormData",path:t,additionalHeaders:i,method:s,data:e},o=await this.createHeaders(i);o.Accept="application/json";const n=new FormData,a=e;for(const c in a)n.set(c,a[c]);const l=await fetch(this.computeURL(t),{headers:o,credentials:this.credentials,method:s,body:n});return await this.handleResult(l,r)}async put(t,e,s){return this.send(t,e,"PUT",s)}async post(t,e,s){return this.send(t,e,"POST",s)}async patch(t,e,s){return this.send(t,e,"PATCH",s)}async delete(t,e,s){return this.send(t,e,"delete",s)}};ie.loadingGetPromises=new Map,ie.tokens=new Map,ie.invalidTokens=[],ie.failledTokenUpdates=new Map,ie.firstCallDoneFlags=new Map;let re=ie,oe=class extends Ft{constructor(t){if(super(t),this.et=gt,t.type!==zt)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===gt||null==t)return this.vt=void 0,this.et=t;if(t===ut)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.et)return this.vt;this.et=t;const e=[t];return e.raw=e,this.vt={_$litType$:this.constructor.resultType,strings:e,values:[]}}};
68
- /**
69
- * @license
70
- * Copyright 2017 Google LLC
71
- * SPDX-License-Identifier: BSD-3-Clause
72
- */oe.directiveName="unsafeHTML",oe.resultType=1;const ne=Rt(oe),ae=new Map,le=t=>{if(!t)return null;const e=s.getApiConfiguration(t),i=s.getAncestorAttributeValue(t,"wordingProvider"),r=s.getAncestorAttributeValue(t,"wordingVersionProvider"),o={apiConfiguration:e,wordingProvider:i,wordingVersionProvider:r};let n=null;for(const[s,a]of ae)if(g.deepEqual(s,o)){n=a;break}if(!n){n={api:new re(e),keysToTranslate:new Set,translatedKeys:new Set,wordingProvider:i,callIndex:0,wordingVersionProvider:r,apiCallKey:o},ae.set(o,n)}return n},ce=class t extends Kt{constructor(t){super(t),this.useUnsafeHTML=!1,this.onAssign=t=>{const e=this.useUnsafeHTML?ne(t):t;this.setValue(e)},this.node=t.options.host}unsubscribe(){t.publisher["wording_"+this.key].offAssign(this.onAssign)}render(t,e=!1){return this.useUnsafeHTML=e,this.key!==t&&(this.key=t,this.isConnected&&this.subscribe(t)),ut}static async callApi(e,i,r=!0,o){if(await l.getInstance().isLocalStrorageReady,t.firstCall){t.firstCall=!1;const e=Object.keys(t.publisher.get());for(const s of e)""===t.publisher.get()[s]&&delete t.publisher[s]}if(e){const i=s.getAncestorAttributeValue(e,"wordingVersionProvider");i&&se(i).onAssign(t.handleVersionProvider(e))}let n=null!=t.publisher.get()["wording_"+i];const a=o||le(e);if(!a)return;if(n&&""!==i)return void a.translatedKeys.add(i);a.callIndex++;const c=a.callIndex,h=a.wordingProvider??"";if(!h&&r)return void window.setTimeout((async()=>{t.callApi(null,i,!1,a)}),1e3);const d=a.api;window.queueMicrotask((async()=>{if(n=null!=t.publisher["wording_"+i].get(),n||""===i||(a.keysToTranslate.add(i),t.publisher["wording_"+i]=""),c!==a.callIndex)return;const e=Array.from(a.keysToTranslate);if(!e.length)return;const s=h.split("?"),r=s.shift()+"?"+((s.length>0?s.join("?")+"&":"")+"labels[]="+e.join("&labels[]="));a.translatedKeys=new Set([...a.translatedKeys,...a.keysToTranslate]),a.keysToTranslate.clear();const o=await d.get(r);for(const i in o)t.publisher["wording_"+i]=o[i]}))}static handleVersionProvider(e){const s=le(e);if(!s)return;if(t.versionProviderHandlers.has(s))return t.versionProviderHandlers.get(s);const i=function(e){if(!s.wordingVersionProvider)return;const i=t.publisher.get().__wording_versions__??[];if(null==e)return;const r=i.find((t=>t.serviceURL===s.api.serviceURL))||{serviceURL:s.api.serviceURL,version:0};if(i.includes(r)||i.push(r),e!==r.version){r.version=e,t.publisher.set({__wording_versions__:i});for(const e of ae.values())e.keysToTranslate=new Set(e.translatedKeys),e.keysToTranslate.size>0&&t.callApi(null,"",!1,e)}};return t.versionProviderHandlers.set(s,i),i}subscribe(e){this.unsubscribe(),t.publisher["wording_"+e].onAssign(this.onAssign),t.callApi(this.node,e)}disconnected(){this.unsubscribe()}reconnected(){this.key&&this.subscribe(this.key)}};ce.publisher=l.get("sonic-wording",{localStorageMode:"enabled"}),ce.firstCall=!0,ce.versionProviderHandlers=new Map;let he=ce;var de=Object.defineProperty,pe=Object.getOwnPropertyDescriptor,ue=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?pe(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&de(e,s,o),o};let ge=!1,be=new Set;const fe=(t,e)=>{const i=class e extends t{constructor(...t){super(),this.collectDependenciesVersion=0,this.displayContents=!1,this.noAutoFill=!1,this.forceAutoFill=!1,this.renderOnPropsInternalChange=!1,this.noShadowDom=null,this.propertyMap=null,this.title="",this.dataProvider=null,this.bindPublisher=null,this._props=null,this.defferedDebug=null,this.debug=null,this.onAssign=t=>{this.props=t}}hasAncestorAttribute(t){return null!=this.getAncestorAttributeValue(t)}getAncestorAttributeValue(t){return s.getAncestorAttributeValue(this,t)}get props(){return null===this._props&&this.publisher?this.publisher.get():this._props}set props(t){"string"==typeof t&&["{","["].includes(t.trim().charAt(0))&&(t=JSON.parse(t)),t!=this._props&&(this._props=t,this.publisher&&this.publisher.get()!=t&&this.publisher.set(t),this.requestUpdate())}updated(t){super.updated(t);const e=[...(this.shadowRoot||this).children].filter((t=>"STYLE"!=t.tagName)),s=this.displayContents?"contents":0==e.length?"none":null;s?this.style.display=s:this.style.removeProperty("display")}connectedCallback(){if(e.instanceCounter++,this.hasAttribute("lazyRendering")){let t=!0;const e=new IntersectionObserver((s=>{for(const i of s)if(t&&i.isIntersecting){this.addDebugger(),t=!1,this.initWording(),this.initPublisher(),e.disconnect();break}}),{root:null,threshold:.9});e.observe(this)}else this.initWording(),this.initPublisher(),this.addDebugger();super.connectedCallback()}disconnectedCallback(){var t;this.removeDebugger(),super.disconnectedCallback(),this.publisher&&(this.publisher.stopTemplateFilling(this),this.publisher.offInternalMutation(this.requestUpdate)),he.publisher.stopTemplateFilling(this),this.onAssign&&(null==(t=this.publisher)||t.offAssign(this.onAssign))}addDebugger(){var t;if(this.hasAttribute("debug")&&!this.defferedDebug){if(!this.debug){this.debug=document.createElement("div");const t=this.debug.style;t.position="fixed",t.top="0",t.right="0",t.margin="auto",t.borderRadius=".7rem",t.backgroundColor="#0f1729",t.color="#c5d4f9",t.padding="16px 16px",t.margin="16px 16px",t.boxShadow="0 10px 30px -18px rgba(0,0,0,.3)",t.overflowY="auto",t.zIndex="99999999",t.maxHeight="calc(100vh - 32px)",t.fontFamily="Consolas, monospace",t.maxWidth="min(50vw,25rem)",t.fontSize="12px",t.minWidth="300px",t.overflowWrap="break-word",t.resize="vertical"}this.addEventListener("click",(t=>{t.ctrlKey&&(t.preventDefault(),ge=!ge)})),this.dataProvider&&(window[this.dataProvider]=this.publisher),this.addEventListener("mouseover",(()=>{ge||this.removeDebugger(),document.body.appendChild(this.debug),be.add(this.debug)})),this.addEventListener("mouseout",(()=>{ge||this.removeDebugger()})),null==(t=this.publisher)||t.onInternalMutation((()=>{var t;this.debug.innerHTML=`🤖 DataProvider : "<b style="font-weight:bold;color:#fff;">${this.dataProvider}</b>"<br>\n <div style="font-size:10px;border-top:1px dashed;margin-top:5px;padding-left:23px;opacity:.6;padding-top:5px;">\n Variable disponible dans la console<br>\n ctrl + Clique : épingler / désépingler\n </div>\n <pre style="margin-top:10px;background:transparent;padding:0;font-size:inherit;color:inherit;">${JSON.stringify(null==(t=this.publisher)?void 0:t.get(),null," ")}</pre>`}))}}removeDebugger(){be.forEach((t=>{document.body.contains(t)&&document.body.removeChild(t)})),be=new Set}getApiConfiguration(){return s.getApiConfiguration(this)}async initWording(){const t=Object.getOwnPropertyNames(this.constructor.prototype);for(const e of t)0==e.indexOf("wording_")&&he.callApi(this,e.substring(8));he.publisher.startTemplateFilling(this)}createRenderRoot(){if(""===this.noShadowDom||""===this.getAttribute("noShadowDom"))return this;const t=super.createRenderRoot();return u.observe(t),t}initPublisher(){if(!document)return;this.publisher&&(this.publisher.stopTemplateFilling(this),this.publisher.offInternalMutation(this.requestUpdate),this.onAssign&&this.publisher.offAssign(this.onAssign));const t=l.getInstance();this.dataProvider||(this.dataProvider=this.getAncestorAttributeValue("dataProvider"));let s=this.dataProvider;if(!s&&this._props&&(this.dataProvider=s="__subscriber__"+e.instanceCounter),s){this.bindPublisher&&t.set(s,this.bindPublisher());let e=t.get(s,{localStorageMode:this.getAttribute("localStorage")||"disabled"});if(this.dataProvider=s,this.hasAttribute("subDataProvider")){const i=this.getAttribute("subDataProvider");this.dataProvider=s+"/"+i,e=g.traverse(e,i.split(".")),t.set(this.dataProvider,e),this.publisher=e}this.publisher=e}this.publisher&&(this._props&&this.publisher.set(this._props),this.noAutoFill||this.publisher.startTemplateFilling(this),this.renderOnPropsInternalChange&&this.publisher.onInternalMutation(this.requestUpdate),this.publisher.onAssign(this.onAssign))}};return i.instanceCounter=0,ue([F({type:Number})],i.prototype,"collectDependenciesVersion",2),ue([F({type:Boolean})],i.prototype,"displayContents",2),ue([F({type:Boolean})],i.prototype,"noAutoFill",2),ue([F({type:Boolean})],i.prototype,"forceAutoFill",2),ue([F({type:Object})],i.prototype,"propertyMap",2),ue([F({type:String,attribute:"data-title"})],i.prototype,"title",2),ue([F({reflect:!0})],i.prototype,"dataProvider",2),ue([F()],i.prototype,"bindPublisher",2),ue([F()],i.prototype,"props",1),i};window.SonicPublisherManager||(window.SonicPublisherManager=l);var me=Object.defineProperty,ve=Object.getOwnPropertyDescriptor;const ye=t=>{class e extends t{constructor(){super(...arguments),this.templates=null,this.templateValueAttribute="data-value",this.templateList=[],this.templateParts={},this.templatePartsList=[]}connectedCallback(){const t=this.templates||[...this.querySelectorAll("template")];for(const e of t)e.hasAttribute(this.templateValueAttribute)&&(this.templateParts[e.getAttribute(this.templateValueAttribute)]=e,this.templatePartsList.push(e)),e.hasAttribute("skeleton")&&(this.templateParts.skeleton=e),e.hasAttribute("no-result")&&(this.templateParts["no-result"]=e),e.hasAttribute("no-item")&&(this.templateParts["no-item"]=e);this.templateList=t.filter((t=>!t.getAttribute("data-value"))),0==this.templateList.length&&(this.templateList=t),super.connectedCallback()}}return((t,e,s,i)=>{for(var r,o=i>1?void 0:i?ve(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);i&&o&&me(e,s,o)})([F({type:Array})],e.prototype,"templates",2),e};var we=Object.defineProperty,xe=Object.getOwnPropertyDescriptor,_e=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?xe(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&we(e,s,o),o};let ke=class extends(fe(ye(Zt))){constructor(){super(...arguments),this.pageLanguage="fr",this.duAu=[],this._wording_billet_periode_validite="",this.designMode=null,this.time_zone=null,this.date=null,this.date_string=null,this.start_date_string=null,this.end_date_string=null,this.start_date=0,this.hide_hours=!1,this.end_date=0,this.era="",this.year="numeric",this.month="short",this.day="2-digit",this.weekday="short",this.hour="2-digit",this.hour12=!1,this.minute="2-digit",this.language="",this.renderIf=!0,this.now=!1,this.startDateObject=new Date,this.endDateObject=new Date}get wording_billet_periode_validite(){return this._wording_billet_periode_validite}set wording_billet_periode_validite(t){var e;t||(t="Du %s au %s"),this._wording_billet_periode_validite=t,this.duAu=null==(e=this.wording_billet_periode_validite)?void 0:e.split("%s").map((t=>t.trim())),this.duAu.pop(),this.requestUpdate()}connectedCallback(){this.hasAttribute("wording_billet_periode_validite")||(this.wording_billet_periode_validite="Du %s au %s"),this.pageLanguage=s.getLanguage(),super.connectedCallback()}getDatesParts(t,e,s){const r=this.startDateObject;r.setTime(1e3*t);let o=[];if(e>0){const t=this.endDateObject;t.setTime(1e3*e);const i=r.toDateString()==t.toDateString();i&&!this.hide_hours||(delete s.hour,delete s.minute);if(o=new Intl.DateTimeFormat(this.language||this.pageLanguage,s).formatRangeToParts(r,t),!i){const t=o.find((t=>"literal"==t.type&&"shared"==t.source&&t.value.trim().length>0));t&&(t.value=" "+this.duAu[1]+" ",t.type="to"),this.designMode||o.unshift({type:"from",value:this.duAu[0]+" ",source:"shared"})}}else{o=new Intl.DateTimeFormat(this.language||this.pageLanguage,s).formatToParts(r)}return this.designMode&&o.forEach((t=>t.value=t.value.replace(/,/g," "))),o[0].value=i.ucFirst(o[0].value),o.filter((t=>!0!==t.hidden))}dateStringToSeconds(t){return new Date(t).getTime()/1e3}render(){if(!this.renderIf)return gt;if(this.date_string&&(this.date=this.dateStringToSeconds(this.date_string)),this.date&&(this.start_date=this.date),this.start_date_string&&(this.start_date=this.dateStringToSeconds(this.start_date_string)),this.end_date_string&&(this.end_date=this.dateStringToSeconds(this.end_date_string)),!this.start_date&&!this.now&&!this.end_date)return gt;if(this.start_date||(this.start_date=Date.now()/1e3),this.end_date>0&&this.end_date<this.start_date){const t=this.start_date;this.start_date=this.end_date,this.end_date=t}const t={year:this.year,month:this.month,day:this.day,hour12:this.hour12};"hidden"!==this.weekday&&(t.weekday=this.weekday),"hidden"!==this.hour&&(t.hour=this.hour),"hidden"!==this.minute&&(t.minute=this.minute),this.era&&(t.era=this.era),this.time_zone&&(t.timeZone=this.time_zone);const e=this.getDatesParts(this.start_date,this.end_date,t);return ne(`${e.map((t=>{const e=this.templateParts[t.type];if(e){const s=document.importNode(e.content,!0).children[0];return""==s.innerText.trim()&&(s.innerText=t.value),s.outerHTML}const s=document.createElement("span");return s.innerText=t.value,s.className=t.type,`<span class="${t.type}">${t.value}</span>`})).join("")}`)}};_e([F()],ke.prototype,"wording_billet_periode_validite",1),_e([F({type:Boolean})],ke.prototype,"designMode",2),_e([F({type:String})],ke.prototype,"time_zone",2),_e([F({type:Number})],ke.prototype,"date",2),_e([F({type:String})],ke.prototype,"date_string",2),_e([F({type:String})],ke.prototype,"start_date_string",2),_e([F({type:String})],ke.prototype,"end_date_string",2),_e([F({type:Number})],ke.prototype,"start_date",2),_e([F({type:Boolean})],ke.prototype,"hide_hours",2),_e([F({type:Number})],ke.prototype,"end_date",2),_e([F({type:String})],ke.prototype,"era",2),_e([F({type:String})],ke.prototype,"year",2),_e([F({type:String})],ke.prototype,"month",2),_e([F({type:String})],ke.prototype,"day",2),_e([F({type:String})],ke.prototype,"weekday",2),_e([F({type:String})],ke.prototype,"hour",2),_e([F({type:Boolean})],ke.prototype,"hour12",2),_e([F({type:String})],ke.prototype,"minute",2),_e([F({type:String})],ke.prototype,"language",2),_e([F({type:Boolean})],ke.prototype,"renderIf",2),_e([F({type:Boolean})],ke.prototype,"now",2),ke=_e([b("sonic-date")],ke);const Ae=class t{static listen(){var e;if(!t.listening)return;const s=null==(e=document.location)?void 0:e.href.replace(document.location.origin,"");t.prevURL&&t.prevURL!=s&&(t.prevURL=s,t.listeners.forEach((t=>{t.location=s}))),window.requestAnimationFrame(t.listen)}static offChange(e){const s=t.listeners.indexOf(e);-1!=s&&(t.listeners.splice(s,1),0==t.listeners.length&&(t.listening=!1))}static onChange(e){t.listening||(t.listening=!0,t.listen()),t.listeners.push(e),e.location=this.prevURL}static changeFromComponent(t){const e=t.goBack,s=document.referrer;if(null!=e){const t=document.location.origin,i=e||t,r=!!(0==s.indexOf("http"))&&new URL(s).origin!=t,o=""==s,n=history.length<3,a=o&&n,l=i!=document.location.href;if(r&&l||a){const t=history.state||{};t.concorde=t.concorde||{},t.concorde.hasDoneHistoryBack=!0,history.pushState(t,document.title),history.back(),document.location.replace(i)}else history.back();return}let i=t.getAttribute("to")||"";if(i||(i=t.href||""),!i)return;if(0==i.indexOf("#"))return void(document.location.hash=i.substring(1));const r=new URL(i,document.location.href),o=r.pathname.split("/"),n=[];let a="";for(const l of o)l!=a&&n.push(l),a=l;i="/"+n.join("/")+r.search+(r.hash?+r.hash:""),t.hasAttribute("pushState")?history.pushState(null,"",i):t.hasAttribute("replaceState")?history.replaceState(null,"",i):document.location.href=i}static updateComponentActiveState(t){if("disabled"!=t.autoActive&&t.href&&0!=t.href.indexOf("http")){const e=new URL(t.href,document.location.href),s=new URL(t.location||"",document.location.origin);let i=!1;i="strict"==t.autoActive?e.pathname==s.pathname&&e.hash==s.hash&&e.search==s.search:0==s.href.indexOf(e.href),i?t.setAttribute("active","true"):t.removeAttribute("active")}}};Ae.listeners=[],Ae.listening=!1,Ae.prevURL=null==(e=document.location)?void 0:e.href.replace(document.location.origin,"");let Pe=Ae;
73
- /**
74
- * @license
75
- * Copyright 2018 Google LLC
76
- * SPDX-License-Identifier: BSD-3-Clause
77
- */const Ce="important",Se=" !"+Ce,$e=Rt(class extends Ft{constructor(t){var e;if(super(t),t.type!==Nt||"style"!==t.name||(null==(e=t.strings)?void 0:e.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,s)=>{const i=t[s];return null==i?e:e+`${s=s.includes("-")?s:s.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`}),"")}update(t,[e]){const{style:s}=t.element;if(void 0===this.ut)return this.ut=new Set(Object.keys(e)),this.render(e);for(const i of this.ut)null==e[i]&&(this.ut.delete(i),i.includes("-")?s.removeProperty(i):s[i]=null);for(const i in e){const t=e[i];if(null!=t){this.ut.add(i);const e="string"==typeof t&&t.endsWith(Se);i.includes("-")||e?s.setProperty(i,e?t.slice(0,-11):t,e?Ce:""):s[i]=t}}return ut}});var Oe=Object.defineProperty,De=Object.getOwnPropertyDescriptor,Le=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?De(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Oe(e,s,o),o};const Ee=new Map,je=t=>{class e extends t{constructor(...t){super(),this.touched=!1,this.error=!1,this.autofocus=!1,this.required=!1,this.forceAutoFill=!1,this.disabled=null,this.formDataProvider="",this._name="",this._value="",this.onValueAssign=t=>{this.setValueFromPublisher(t)},this.onFormValueAssign=async t=>{this.setFormValueFromPublisher(t)},this.onFormDataInValidate=()=>{const t=this.getFormPublisher();t&&t.isFormValid.get()&&this.validateFormElement()}}get name(){return this._name}set name(t){this.hasAttribute("name")&&!this.forceAutoFill&&(t=this.getAttribute("name")),this._name=t,this.requestUpdate()}validateFormElement(){}updateDataValue(){const t=this.getAttribute("name");if(t){const e=this.getFormPublisher();e&&(e[t]=this.getValueForFormPublisher(),this.setFormValueFromPublisher(e[t].get()))}}getFormPublisher(){return this.formDataProvider||(this.formDataProvider=this.getAncestorAttributeValue("formDataProvider")),this.formDataProvider?l.get(this.formDataProvider):null}getValueForFormPublisher(){return this.value}setValueFromPublisher(t){this.value=t}setFormValueFromPublisher(t){this.value=t}get value(){return this._value}set value(t){null==t&&(t=""),g.isObject(t)&&Object.prototype.hasOwnProperty.call(t,"__value")&&null==t._value&&(t=""),this._value!=t&&(this._value=t,this.updateDataValue(),this.requestUpdate())}initPublisher(){let t=this.getFormPublisher();const e=this.hasAncestorAttribute("initFromPublisher")&&this._name&&t[this._name].get()?t[this._name].get():this.getAttribute("value");this._name&&this.publisher&&this.publisher[this._name].offAssign(this.onValueAssign),this._name&&t&&t[this._name].offAssign(this.onFormValueAssign),super.initPublisher(),this.name||(this._name=this.getAttribute("name")),this.value||(this._value=this.getAttribute("value")),this.publisher&&this._name&&this.publisher[this._name].onAssign(this.onValueAssign),t=this.getFormPublisher(),this._name&&t&&(t[this._name].onAssign(this.onFormValueAssign),t.onInvalidate(this.onFormDataInValidate)),this.updateDataValue(),e&&(this.value=e)}handleBlur(){this.touched=!0}handleChange(t){this.value=t.target.value;const e=new Event("change");this.dispatchEvent(e)}addKeyboardNavigation(){const t=this.getAncestorAttributeValue("data-keyboard-nav");if(!t)return;const e=t.split(" "),s=e[0];if(!s)return;for(const r of e){Ee.has(r)||Ee.set(r,[]);const t=Ee.get(r);-1==(null==t?void 0:t.indexOf(this))&&t.push(this)}const i=Ee.get(s);this.addEventListener("keydown",(t=>{var e;const s=t;if(!["ArrowDown","ArrowUp"].includes(s.key))return;const r="input:not([disabled]), button:not([disabled]), select:not([disabled]), textarea:not([disabled])",o=null==i?void 0:i.filter((t=>{var e;const s=null==(e=t.shadowRoot)?void 0:e.querySelector(r);if(!s)return!1;const i=window.getComputedStyle(s);return"none"!==i.display&&""!==i.display&&"none"!=i.pointerEvents&&"hidden"!==i.visibility&&s.getBoundingClientRect().width>0}));let n=null;if("ArrowDown"==s.key&&o){const t=o.indexOf(this);n=t==o.length-1?o[0]:o[t+1]}else if("ArrowUp"==s.key&&o){const t=o.indexOf(this);n=0==t?o[o.length-1]:o[t-1]}const a=null==(e=null==n?void 0:n.shadowRoot)?void 0:e.querySelector(r);a&&a.focus&&(a.focus(),t.preventDefault(),t.stopPropagation())}))}connectedCallback(){this.formDataProvider=this.getAncestorAttributeValue("formDataProvider"),super.connectedCallback(),this.addKeyboardNavigation()}disconnectedCallback(){super.disconnectedCallback(),this._name&&this.publisher&&this.publisher[this._name].offAssign(this.onValueAssign);const t=this.getFormPublisher();this._name&&t&&(t[this._name].offAssign(this.onFormValueAssign),t.offInvalidate(this.onFormDataInValidate))}}return Le([F({type:Boolean,reflect:!0})],e.prototype,"touched",2),Le([F({type:Boolean})],e.prototype,"error",2),Le([F({type:Boolean})],e.prototype,"autofocus",2),Le([F({type:Boolean})],e.prototype,"required",2),Le([F({type:Boolean})],e.prototype,"forceAutoFill",2),Le([F({type:Boolean})],e.prototype,"disabled",2),Le([F({type:String,attribute:"data-aria-label"})],e.prototype,"ariaLabel",2),Le([F({type:String,attribute:"data-aria-labelledby"})],e.prototype,"ariaLabelledby",2),Le([F()],e.prototype,"name",1),Le([F()],e.prototype,"value",1),e};var Me="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Ie(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Te,Ne,ze,Re,Fe={exports:{}};Te=Fe,Re=[].slice,Ne=Me,ze=function(){var t,e,s,i,r,o,n,a,l,c,h,d,p,u,g;return l=function(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")},n=function(t,e){var s,i,r;for(r=[],s=-1,i=t.length;++s<i;)r=r.concat(e(t[s]));return r},u=function(t,e){var s,i,r;for(r="",s=-1,i=t.length;++s<i;)r+=e(t[s]);return r},p=function(t){return new RegExp(t.toString()+"|").exec("").length-1},h=function(t,e){var s,i,r,o,n;for(o={},s=-1,r=t.length;++s<r;)i=t[s],null!=(n=e[s])&&(null!=o[i]?(Array.isArray(o[i])||(o[i]=[o[i]]),o[i].push(n)):o[i]=n);return o},(t={}).Result=function(t,e){this.value=t,this.rest=e},t.Tagged=function(t,e){this.tag=t,this.value=e},t.tag=function(e,s){return function(i){var r,o;if(null!=(r=s(i)))return o=new t.Tagged(e,r.value),new t.Result(o,r.rest)}},t.regex=function(e){return function(s){var i,r;if(null!=(i=e.exec(s)))return r=i[0],new t.Result(r,s.slice(r.length))}},t.sequence=function(){var e;return e=1<=arguments.length?Re.call(arguments,0):[],function(s){var i,r,o,n,a;for(i=-1,r=e.length,a=[],o=s;++i<r;){if(null==(n=(0,e[i])(o)))return;a.push(n.value),o=n.rest}return new t.Result(a,o)}},t.pick=function(){var e,s;return e=arguments[0],s=2<=arguments.length?Re.call(arguments,1):[],function(i){var r,o;if(null!=(o=t.sequence.apply(t,s)(i)))return r=o.value,o.value=r[e],o}},t.string=function(e){var s;return s=e.length,function(i){if(i.slice(0,s)===e)return new t.Result(e,i.slice(s))}},t.lazy=function(t){var e;return e=null,function(s){return null==e&&(e=t()),e(s)}},t.baseMany=function(e,s,i,r,o){var n,a,l;for(a=o,l=i?"":[];(null==s||null==s(a))&&null!=(n=e(a));)i?l+=n.value:l.push(n.value),a=n.rest;if(!r||0!==l.length)return new t.Result(l,a)},t.many1=function(e){return function(s){return t.baseMany(e,null,!1,!0,s)}},t.concatMany1Till=function(e,s){return function(i){return t.baseMany(e,s,!0,!0,i)}},t.firstChoice=function(){var t;return t=1<=arguments.length?Re.call(arguments,0):[],function(e){var s,i,r;for(s=-1,i=t.length;++s<i;)if(null!=(r=(0,t[s])(e)))return r}},d=function(e){var s;return(s={}).wildcard=t.tag("wildcard",t.string(e.wildcardChar)),s.optional=t.tag("optional",t.pick(1,t.string(e.optionalSegmentStartChar),t.lazy((function(){return s.pattern})),t.string(e.optionalSegmentEndChar))),s.name=t.regex(new RegExp("^["+e.segmentNameCharset+"]+")),s.named=t.tag("named",t.pick(1,t.string(e.segmentNameStartChar),t.lazy((function(){return s.name})))),s.escapedChar=t.pick(1,t.string(e.escapeChar),t.regex(/^./)),s.static=t.tag("static",t.concatMany1Till(t.firstChoice(t.lazy((function(){return s.escapedChar})),t.regex(/^./)),t.firstChoice(t.string(e.segmentNameStartChar),t.string(e.optionalSegmentStartChar),t.string(e.optionalSegmentEndChar),s.wildcard))),s.token=t.lazy((function(){return t.firstChoice(s.wildcard,s.optional,s.named,s.static)})),s.pattern=t.many1(t.lazy((function(){return s.token}))),s},a={escapeChar:"\\",segmentNameStartChar:":",segmentValueCharset:"a-zA-Z0-9-_~ %",segmentNameCharset:"a-zA-Z0-9",optionalSegmentStartChar:"(",optionalSegmentEndChar:")",wildcardChar:"*"},o=function(t,e){if(Array.isArray(t))return u(t,(function(t){return o(t,e)}));switch(t.tag){case"wildcard":return"(.*?)";case"named":return"(["+e+"]+)";case"static":return l(t.value);case"optional":return"(?:"+o(t.value,e)+")?"}},r=function(t,e){return null==e&&(e=a.segmentValueCharset),"^"+o(t,e)+"$"},i=function(t){if(Array.isArray(t))return n(t,i);switch(t.tag){case"wildcard":return["_"];case"named":return[t.value];case"static":return[];case"optional":return i(t.value)}},c=function(t,e,s,i){var r,o,n;if(null==i&&(i=!1),null!=(n=t[e])){if(!((r=s[e]||0)>(Array.isArray(n)?n.length-1:0)))return o=Array.isArray(n)?n[r]:n,i&&(s[e]=r+1),o;if(i)throw new Error("too few values provided for key `"+e+"`")}else if(i)throw new Error("no values provided for key `"+e+"`")},s=function(t,e,i){var r,o;if(Array.isArray(t)){for(r=-1,o=t.length;++r<o;)if(s(t[r],e,i))return!0;return!1}switch(t.tag){case"wildcard":return null!=c(e,"_",i,!1);case"named":return null!=c(e,t.value,i,!1);case"static":return!1;case"optional":return s(t.value,e,i)}},g=function(t,e,i){if(Array.isArray(t))return u(t,(function(t){return g(t,e,i)}));switch(t.tag){case"wildcard":return c(e,"_",i,!0);case"named":return c(e,t.value,i,!0);case"static":return t.value;case"optional":return s(t.value,e,i)?g(t.value,e,i):""}},(e=function(t,s){var o,n,l;if(t instanceof e)return this.isRegex=t.isRegex,this.regex=t.regex,this.ast=t.ast,void(this.names=t.names);if(this.isRegex=t instanceof RegExp,"string"!=typeof t&&!this.isRegex)throw new TypeError("argument must be a regex or a string");if(this.isRegex){if(this.regex=t,null!=s){if(!Array.isArray(s))throw new Error("if first argument is a regex the second argument may be an array of group names but you provided something else");if(o=p(this.regex),s.length!==o)throw new Error("regex contains "+o+" groups but array of group names contains "+s.length);this.names=s}}else{if(""===t)throw new Error("argument must not be the empty string");if(t.replace(/\s+/g,"")!==t)throw new Error("argument must not contain whitespace");if(n={escapeChar:(null!=s?s.escapeChar:void 0)||a.escapeChar,segmentNameStartChar:(null!=s?s.segmentNameStartChar:void 0)||a.segmentNameStartChar,segmentNameCharset:(null!=s?s.segmentNameCharset:void 0)||a.segmentNameCharset,segmentValueCharset:(null!=s?s.segmentValueCharset:void 0)||a.segmentValueCharset,optionalSegmentStartChar:(null!=s?s.optionalSegmentStartChar:void 0)||a.optionalSegmentStartChar,optionalSegmentEndChar:(null!=s?s.optionalSegmentEndChar:void 0)||a.optionalSegmentEndChar,wildcardChar:(null!=s?s.wildcardChar:void 0)||a.wildcardChar},null==(l=d(n).pattern(t)))throw new Error("couldn't parse pattern");if(""!==l.rest)throw new Error("could only partially parse pattern");this.ast=l.value,this.regex=new RegExp(r(this.ast,n.segmentValueCharset)),this.names=i(this.ast)}}).prototype.match=function(t){var e,s;return null==(s=this.regex.exec(t))?null:(e=s.slice(1),this.names?h(this.names,e):e)},e.prototype.stringify=function(t){if(null==t&&(t={}),this.isRegex)throw new Error("can't stringify patterns generated from a regex");if(t!==Object(t))throw new Error("argument must be an object or undefined");return g(this.ast,t,{})},e.escapeForRegex=l,e.concatMap=n,e.stringConcatMap=u,e.regexGroupCount=p,e.keysAndValuesToObject=h,e.P=t,e.newParser=d,e.defaultOptions=a,e.astNodeToRegexString=r,e.astNodeToNames=i,e.getParam=c,e.astNodeContainsSegmentsForProvidedParams=s,e.stringify=g,e},null!==Fe.exports?Te.exports=ze():Ne.UrlPattern=ze();const Ue=Ie(Fe.exports),Ve=class{static async queueTaskPromise(){return new Promise((t=>{window.queueMicrotask((()=>t(null)))}))}static async delayPromise(t){return new Promise((e=>{setTimeout(e,t)}))}},Be=class t{static areEqual(t,e){return t.length===e.length&&t.every(((t,s)=>t===e[s]))}static from2d(t){return{to1D:()=>{let e=[];return t.forEach((t=>e=e.concat(t))),this.from(e)}}}static from(e){return{get:()=>e||[],everyItem:()=>({has:()=>({same:()=>({value:()=>({forKey:t=>{if(e.length<1)return!0;const s=(e[0]||{})[t];return e.every((e=>(e||{})[t]==s))}})})}),value:()=>({forKey:s=>t.from(e.map((t=>t[s])))}),copy:()=>({fromKey:t=>({toKey:s=>{e.forEach((e=>{e[s]=Array.isArray(e[t])?[...e[t]]:"object"==typeof e[t]&&null!=e[t]?{...e[t]}:e[t]}))}})})}),map:s=>t.from(e.map(s)),filter:s=>t.from(e.filter(s)),find:t=>e.find(t),some:t=>e.some(t),every:t=>e.every(t),group:()=>({byKey:s=>{const i=[],r=new Map;for(const t of e){const e=t[s];if(!r.has(e)){const t=i.length;r.set(e,t);const o={items:[]};o[s]=e,i.push(o)}i[r.get(e)].items.push(t)}return t.from(i)}}),without:()=>({duplicates:()=>({forKey:s=>{const i=[...new Set(e.map((t=>t[s])))];return t.from(i.map((t=>e.find((e=>e[s]==t)))))}}),itemsIn:s=>({havingSameValue:()=>({forKey:i=>t.from(e.filter((t=>{return s.every((e=t,r=i,t=>e[r]!=t[r]));var e,r})))})})})}}},He=u,qe=i,We=s,Ke=Pe,Ze=g,Ye=h,Ge=l,Qe=re,Je=Ue;window["concorde-utils"]=window["concorde-utils"]||{},window["concorde-utils"]={Utils:Ve,Arrays:Be,DataBindObserver:He,Format:qe,HTML:We,LocationHandler:Ke,Objects:Ze,PublisherProxy:Ye,PublisherManager:Ge,api:Qe,URLPattern:Je};var Xe=Object.defineProperty,ts=Object.getOwnPropertyDescriptor,es=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?ts(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Xe(e,s,o),o};const ss=t=>{class e extends t{constructor(){super(...arguments),this._value="",this.forceAutoFill=!1,this.unique=null,this.radio=null,this.unCheckOnDisconnect=!1,this._checked=null,this.updateAllChecked=()=>{const t=this.getAttribute("name"),e=this.getCheckAllPublisher(),s=this.getFormPublisher();if((null==e?void 0:e.hasCheckAll.get())&&!this.checksAll()&&e&&s&&t){if(!s[this.name].get().length)return void(e.checkMode="noneChecked");null===this.checked?e.checkMode="someUnchecked":"noneChecked"!=e.checkMode.get()&&null!=e.checkMode.get()||(e.checkMode="someUnchecked");const i=s[t].get(),r=e.values.get();if(r&&r.length){let t=r.length;for(const e of r)-1==i.indexOf(e)&&(t-=1);t==r.length&&(e.checkMode="allChecked"),0==t&&(e.checkMode="noneChecked")}-1==r.indexOf(this.value)&&(this.checked=null)}},this.onChecksAllRequest=t=>{this.removeAttribute("allChecked"),this.removeAttribute("indeterminate"),"allChecked"==t&&(this.checked=!0,this.setAttribute("allChecked","")),"noneChecked"==t&&(this.checked=null),"someUnchecked"==t&&(this.checksAll()&&(this.checked="indeterminate"),this.setAttribute("indeterminate",""))}}get value(){return this._value}set value(t){if(this.value==t)return;if(this.hasAttribute("value")&&!this.forceAutoFill&&(t=this.getAttribute("value")),this._value==t)return;if(null==t)return;if(this._value=t,!this.value)return;const e=this.getFormPublisher();if(e&&this.name){let s=e[this.name].get();(this.radio||this.unique)&&(this.checked=s==t||null),Array.isArray(s)||(s=[]),-1!=s.indexOf(t)&&(this.checked=!0)}1==this.checked&&this.updateDataValue(),this.requestUpdate()}get checked(){return this._checked}set checked(t){if(this.setCheckedValue(t),this.checksAll()){const t=this.getCheckAllPublisher();if(t)if(!0===this.checked)t.checkMode="allChecked";else if(null===this.checked){t.checkMode="noneChecked";const e=this.getFormPublisher();e&&(e[this.name]=[])}}this.requestUpdate()}validateFormElement(){var t;const e=null==(t=this.shadowRoot)?void 0:t.querySelector("input");if(!e||e.checkValidity())return;const s=this.getFormPublisher();if(s){const t=s[this.name].get();if((this.unique||this.radio)&&null!==t&&t.toString().length>0)return;s.isFormValid=!1,e.reportValidity()}}checksAll(){return this.hasAttribute("checksAll")}setCheckedValue(t){this._checked!=t&&(this._checked=t,this.updateDataValue(),this.requestUpdate(),setTimeout((()=>this.updateAllChecked()),1))}handleChange(){const t=!0!==this.checked||(!!this.radio||null);this.checked=t;const e=new Event("change");this.dispatchEvent(e)}getValueForFormPublisher(){const t=this.getFormPublisher();if(!t)return null;let e=t[this.name].get();if(this.radio)return!0===this.checked&&null!=this.value?this.value:e;if(this.unique)return!0===this.checked&&null!=this.value?this.value:null;Array.isArray(e)||(e=[]),e=e.slice(0);const s=e.indexOf(this.value);return!0!==this.checked||-1!==s||this.checksAll()||e.push(this.value),null===this.checked&&-1!==s&&e.splice(s,1),e}setFormValueFromPublisher(t){this.unique||this.radio?this.checked=this.value==t||null:(Array.isArray(t)||(t=[]),this.checksAll()||(this.checked=-1!==t.indexOf(this.value)||null))}getCheckAllPublisher(){this.formDataProvider||(this.formDataProvider=this.getAncestorAttributeValue("formDataProvider"));const t=this.formDataProvider,e=this.getAttribute("name");return t&&e?Ge.get(t+"/"+e+"/_available_values_"):null}disconnectedCallback(){super.disconnectedCallback();const t=this.getCheckAllPublisher();if(t&&(t.checkMode.offAssign(this.onChecksAllRequest),!this.checksAll())){const e=t.values.get().slice(0),s=e.indexOf(this.value);-1!=s&&(e.splice(s,1),t.values=e)}setTimeout((()=>this.updateAllChecked()),1)}connectedCallback(){super.connectedCallback();const t=this.getFormPublisher();if(t&&this.name){const e=t[this.name].get();e&&Array.isArray(e)&&-1!==e.indexOf(this.value)&&(this.checked=!0)}const e=this.getCheckAllPublisher();e&&(e.checkMode.onAssign(this.onChecksAllRequest),this.checksAll()&&(e.hasCheckAll=!0),e.values.get()||(e.values=[]),this.checksAll()||(e.values=[...e.values.get(),this.value])),this.hasAttribute("checked")&&(this.publisher&&!1===this.publisher.get().checked||setTimeout((()=>this.checked=!0),1))}}return es([F()],e.prototype,"value",1),es([F()],e.prototype,"forceAutoFill",2),es([F({type:Boolean})],e.prototype,"unique",2),es([F({type:Boolean})],e.prototype,"radio",2),es([F({type:Boolean})],e.prototype,"unCheckOnDisconnect",2),es([F()],e.prototype,"checked",1),e},is=t=>t??gt,rs=x`
78
- /*SIZES*/
79
- :host {
80
- --sc-fs: 1rem;
81
- --sc-lh: 1.15;
82
- font-size: var(--sc-fs);
83
- line-height: var(--sc-lh);
84
- }
85
- :host([size="2xs"]) {
86
- --sc-fs: 0.625rem;
87
- }
88
- :host([size="xs"]) {
89
- --sc-fs: 0.75rem;
90
- }
91
- :host([size="sm"]) {
92
- --sc-fs: 0.875rem;
93
- }
94
- :host([size="lg"]) {
95
- --sc-fs: 1.125rem;
96
- }
97
- :host([size="xl"]) {
98
- --sc-fs: 1.25rem;
99
- }
100
- :host([size="2xl"]) {
101
- --sc-fs: 1.5rem;
102
- }
103
- `;
104
- /**
105
- * @license
106
- * Copyright 2018 Google LLC
107
- * SPDX-License-Identifier: BSD-3-Clause
108
- */var os=Object.defineProperty,ns=Object.getOwnPropertyDescriptor,as=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?ns(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&os(e,s,o),o};let ls=class extends(ss(je(fe(Zt)))){constructor(){super(...arguments),this.type="default",this.variant="default",this.shape="default",this.direction="row",this.alignItems="center",this.justify="center",this.minWidth="0",this.icon=!1,this.download=null,this.autoActive="partial",this.loading=!1,this.hasPrefix=!1,this.hasSuffix=!1,this._href="",this.goBack=null,this.pushState=!1,this.active=!1,this.autoRepeat=!1,this.pointerDownTime=0,this.lastRepeatTime=0,this.isRepeating=!1,this.handleRepeatend=()=>{window.removeEventListener("pointerup",this.handleRepeatend),window.removeEventListener("blur",this.handleRepeatend),this.autoRepeat&&(this.isRepeating=!1)},this.location=""}set href(t){this._href=t,this.href&&0!=this.href.indexOf("http")?Pe.onChange(this):Pe.offChange(this),this.requestUpdate()}get href(){return this._href}handleNavigation(t){t.preventDefault(),Pe.changeFromComponent(this)}handleChange(t){if(("click"!=(null==t?void 0:t.type)||!this.autoRepeat)&&(super.handleChange(),(this.pushState||null!==this.goBack)&&(null==t||t.preventDefault(),null==t||t.stopPropagation(),Pe.changeFromComponent(this)),this.hasAttribute("reset"))){const t=this.getAttribute("reset"),e=t?Ge.get(t):this.getFormPublisher();e&&e.set({})}}handleRepeatStart(t){this.autoRepeat&&(this.handleChange(t),this.pointerDownTime=Date.now(),this.isRepeating=!0,this.repeat()),window.addEventListener("pointerup",this.handleRepeatend),window.addEventListener("blur",this.handleRepeatend)}repeat(){this.isRepeating&&(this.hasAttribute("disabled")?this.isRepeating=!1:(window.requestAnimationFrame(this.repeat.bind(this)),Date.now()-this.pointerDownTime<500||Date.now()-this.lastRepeatTime<100||(this.handleChange(),this.lastRepeatTime=Date.now())))}connectedCallback(){super.connectedCallback()}setCheckedValue(t){if(this.name){if(t?this.setAttribute("active","true"):this.removeAttribute("active"),t==this._checked)return;super.setCheckedValue(t)}}disconnectedCallback(){Pe.offChange(this),super.disconnectedCallback()}willUpdate(t){(t.has("href")||t.has("autoActive"))&&Pe.updateComponentActiveState(this),t.has("location")&&Pe.updateComponentActiveState(this)}render(){const t={flexDirection:this.direction,alignItems:this.alignItems,justifyContent:this.justify,align:this.align,minWidth:this.minWidth},e=pt`
109
- <button
110
- part="button"
111
- class=${this.hasPrefix||this.hasSuffix?"has-prefix-or-suffix":""}
112
- style=${$e(t)}
113
- aria-controls=${is(this.ariaControls)}
114
- aria-expanded=${is(this.sonicAriaExpanded)}
115
- aria-label=${is(this.ariaLabel)}
116
- aria-labelledby=${is(this.ariaLabelledby)}
117
- @click=${this.handleChange}
118
- @pointerdown=${this.handleRepeatStart}
119
- >
120
- <slot @slotchange=${this.onSlotChange} part="prefix" name="prefix"></slot>
121
- <slot part="main" class="main-slot"></slot>
122
- <slot @slotchange=${this.onSlotChange} part="suffix" name="suffix"></slot>
123
- ${1==this.loading?pt`<sonic-icon name="loader" class="loader"></sonic-icon>`:""}
124
- </button>
125
- `;return this.href?pt`<a
126
- href="${this.href}"
127
- download=${is(this.download)}
128
- target=${is(this.target)}
129
- aria-label=${is(this.ariaLabel)}
130
- aria-labelledby=${is(this.ariaLabelledby)}
131
- @click=${this.pushState||null!==this.goBack?this.handleNavigation:null}
132
- >${e}</a
133
- >`:pt`${e}`}onSlotChange(){var t,e;this.hasPrefix=!!(null==(t=this.prefixes)?void 0:t.length),this.hasSuffix=!!(null==(e=this.suffixes)?void 0:e.length)}};ls.styles=[rs,x`
134
- * {
135
- box-sizing: border-box;
136
- }
137
- :host {
138
- --sc-btn-gap: 0.35em;
139
- --sc-btn-py: 0.25em;
140
- --sc-btn-px: 1.1em;
141
- --sc-btn-fs: var(--sc-fs, 1rem);
142
- --sc-btn-fw: var(--sc-btn-font-weight);
143
- --sc-btn-ff: var(--sc-btn-font-family);
144
- --sc-btn-fw: var(--sc-btn-font-weight);
145
-
146
- --sc-btn-height: var(--sc-form-height);
147
- --btn-color: var(--sc-btn-color, var(--sc-base-content));
148
- --btn-bg: var(--sc-btn-bg, var(--sc-base-100));
149
-
150
- --sc-btn-border-style: solid;
151
- --sc-btn-border-width: var(--sc-form-border-width);
152
- --sc-btn-border-color: transparent;
153
-
154
- --btn-outline-bg-hover: var(--sc-btn-outline-bg-hover, var(--sc-base-100));
155
- --sc-btn-ghost-bg-hover: var(--sc-base-100);
156
-
157
- --sc-btn-active-color: var(--sc-base);
158
- --sc-btn-hover-filter: brightness(0.98);
159
- --sc-btn-active-filter: brightness(0.97);
160
- --sc-btn-active-bg: var(--sc-base-content);
161
-
162
- --sc-item-rounded-tr: var(--sc-btn-rounded);
163
- --sc-item-rounded-tl: var(--sc-btn-rounded);
164
- --sc-item-rounded-bl: var(--sc-btn-rounded);
165
- --sc-item-rounded-br: var(--sc-btn-rounded);
166
-
167
- display: inline-flex;
168
- vertical-align: middle;
169
- box-sizing: border-box;
170
- -webkit-print-color-adjust: exact;
171
- }
172
-
173
- :host a {
174
- display: contents;
175
- color: unset;
176
- }
177
-
178
- :host button {
179
- display: flex;
180
- flex: 1;
181
- box-sizing: border-box;
182
- align-items: center;
183
- justify-content: center;
184
-
185
- font-family: var(--sc-btn-ff);
186
- font-weight: var(--sc-btn-fw);
187
- font-size: var(--sc-btn-fs);
188
-
189
- cursor: pointer;
190
- text-align: center;
191
- line-height: 1.1;
192
- border-radius: var(--sc-item-rounded-tl) var(--sc-item-rounded-tr) var(--sc-item-rounded-br) var(--sc-item-rounded-bl);
193
-
194
- background: var(--btn-bg);
195
- color: var(--btn-color);
196
-
197
- padding-top: var(--sc-btn-py);
198
- padding-bottom: var(--sc-btn-py);
199
- padding-left: var(--sc-btn-px);
200
- padding-right: var(--sc-btn-px);
201
-
202
- border: var(--sc-btn-border-width) var(--sc-btn-border-style) var(--sc-btn-border-color);
203
- min-height: var(--sc-btn-height);
204
- }
205
-
206
- :host button.has-prefix-or-suffix {
207
- gap: var(--sc-btn-gap);
208
- }
209
-
210
- :host button:focus,
211
- :host button:hover {
212
- filter: var(--sc-btn-hover-filter);
213
- }
214
-
215
- :host button:active {
216
- filter: var(--sc-btn-active-filter);
217
- }
218
-
219
- /*TYPES*/
220
- :host([type="default"]) button {
221
- --btn-color: var(--sc-base-content);
222
- --btn-bg: var(--sc-base-100);
223
- }
224
-
225
- :host([type="primary"]) button {
226
- --btn-color: var(--sc-primary-content);
227
- --btn-bg: var(--sc-primary);
228
- }
229
- :host([type="warning"]) button {
230
- --btn-color: var(--sc-warning-content);
231
- --btn-bg: var(--sc-warning);
232
- }
233
- :host([type="danger"]) button {
234
- --btn-color: var(--sc-danger-content);
235
- --btn-bg: var(--sc-danger);
236
- }
237
- :host([type="info"]) button {
238
- --btn-color: var(--sc-info-content);
239
- --btn-bg: var(--sc-info);
240
- }
241
- :host([type="success"]) button {
242
- --btn-color: var(--sc-success-content);
243
- --btn-bg: var(--sc-success);
244
- }
245
- :host([type="neutral"]) button {
246
- --btn-color: var(--sc-base);
247
- --btn-bg: var(--sc-base-600);
248
- }
249
- :host([type="custom"]) button {
250
- --btn-color: var(--sc-btn-custom-color);
251
- --btn-bg: var(--sc-btn-custom-bg);
252
- }
253
-
254
- /*UNSTYLED*/
255
- :host([variant="unstyled"]) {
256
- display: inline-block;
257
- }
258
-
259
- :host([variant="unstyled"]) button {
260
- all: unset;
261
- display: contents;
262
- cursor: pointer;
263
- --sc-btn-height: auto;
264
- --sc-btn-width: auto;
265
- }
266
-
267
- /*GESTION DU FOCUS*/
268
- :host(:not([disabled])) button:focus {
269
- box-shadow: 0 0 0 0.18rem var(--sc-base-300);
270
- border-color: var(--sc-base-300) !important;
271
- outline: none;
272
- }
273
-
274
- /*GHOST*/
275
- :host([variant="ghost"][type]) button {
276
- color: var(--btn-bg);
277
- background: transparent;
278
- }
279
-
280
- :host([variant="ghost"][type="default"]) button {
281
- color: var(--btn-color);
282
- background: transparent;
283
- }
284
-
285
- /*:host([variant="ghost"]) button:focus,*/
286
- :host([variant="ghost"]) button:hover {
287
- background: var(--sc-btn-ghost-bg-hover);
288
- filter: none;
289
- }
290
-
291
- :host([active][variant="ghost"]) button {
292
- background: var(--sc-btn-ghost-bg-hover);
293
- filter: none;
294
- }
295
-
296
- :host([active][variant="ghost"]) button:hover {
297
- filter: var(--sc-btn-hover-filter);
298
- }
299
-
300
- /*OUTLINE*/
301
- :host([variant="outline"][type]) button {
302
- border-color: var(--btn-bg);
303
- color: var(--btn-bg);
304
- background: transparent;
305
- }
306
-
307
- :host([variant="outline"][type="default"]) button {
308
- border-color: var(--sc-base-content);
309
- color: var(--sc-base-content);
310
- background: transparent;
311
- }
312
-
313
- /*:host([variant="outline"]) button:focus,*/
314
- :host([variant="outline"]) button:hover {
315
- background: var(--btn-outline-bg-hover);
316
- }
317
-
318
- /*OUTLINE*/
319
- :host([variant="link"]:not([size])) {
320
- vertical-align: baseline;
321
- margin-left: 0.25em;
322
- margin-right: 0.25em;
323
- }
324
-
325
- :host([variant="link"]:not([size])) {
326
- font-size: inherit;
327
- }
328
-
329
- :host([variant="link"]) button {
330
- text-decoration: underline;
331
- padding: 0;
332
- background: none;
333
- border: none;
334
- font-size: inherit;
335
- min-height: 0;
336
- color: inherit;
337
- }
338
-
339
- :host([variant="link"][type]) button {
340
- color: var(--btn-bg);
341
- }
342
- :host([variant="link"][type="default"]) button {
343
- color: inherit;
344
- }
345
-
346
- :host([variant="link"]) button:focus,
347
- :host([variant="link"]) button:hover {
348
- text-decoration: none;
349
- }
350
-
351
- /* Alignement */
352
- :host([align="left"]) button {
353
- text-align: left !important;
354
- }
355
-
356
- :host([align="right"]) button {
357
- text-align: right;
358
- }
359
-
360
- /*SHAPE*/
361
- :host([shape="circle"]) button {
362
- border-radius: 50%;
363
- }
364
- :host([shape="circle"]) .main-slot {
365
- line-height: 1;
366
- }
367
-
368
- :host([shape="circle"]) button,
369
- :host([shape="square"]) button {
370
- width: var(--sc-btn-height);
371
- height: var(--sc-btn-height);
372
- /*overflow: hidden;*/ /* fix bug #42622 */
373
- padding: 0;
374
- align-items: center;
375
- justify-content: 0;
376
- text-align: center !important;
377
- }
378
-
379
- :host([shape="block"]),
380
- :host([shape="block"]) button {
381
- width: 100%;
382
- }
383
-
384
- :host([disabled]) {
385
- opacity: 0.3;
386
- pointer-events: none;
387
- user-select: none;
388
- }
389
-
390
- /*ACTIVE*/
391
-
392
- :host([active]:not([variant="ghost"]):not([variant="unstyled"])) button {
393
- background: var(--sc-btn-active-bg);
394
- color: var(--sc-btn-active-color);
395
- border-color: var(--sc-btn-active-bg);
396
- }
397
-
398
- .main-slot {
399
- flex-grow: 1;
400
- display: block;
401
- }
402
-
403
- :host([minWidth]:not([shape="block"])) .main-slot {
404
- flex-grow: 0;
405
- }
406
-
407
- slot[name="suffix"],
408
- slot[name="prefix"] {
409
- flex-shrink: 0;
410
- }
411
-
412
- /*ALIGNEMENT DES ICONES
413
- permet de tous les avoir alignés dans un menu
414
- */
415
- ::slotted(sonic-icon) {
416
- min-width: 1em;
417
- text-align: center;
418
- }
419
-
420
- /*BOUTON Avec icone seulement*/
421
- :host([icon]) ::slotted(:only-child),
422
- :host([icon]) ::slotted(sonic-icon) {
423
- font-size: 1.2em;
424
- vertical-align: middle;
425
- }
426
-
427
- /*Tooltip ne joue pas sur le layout*/
428
- sonic-tooltip {
429
- display: contents;
430
- }
431
-
432
- /*OUTLINE*/
433
- :host(:not([active])) ::slotted([swap="on"]) {
434
- display: none !important;
435
- }
436
-
437
- :host([active]) ::slotted([swap="off"]) {
438
- display: none !important;
439
- }
440
-
441
- /*Loading*/
442
- :host([loading]) {
443
- pointer-events: none;
444
- position: relative;
445
- }
446
-
447
- :host([loading]) slot {
448
- opacity: 0 !important;
449
- pointer-events: none;
450
- }
451
- /*Loading*/
452
- :host([loading]) .loader {
453
- position: absolute;
454
- top: 50%;
455
- left: 50%;
456
- transform: translate(-50%, -50%);
457
- display: flex;
458
- align-items: center;
459
- justify-content: center;
460
- line-height: 0;
461
- height: var(--sc-btn-ff);
462
- width: var(--sc-btn-ff);
463
- animation: rotation 2s infinite linear;
464
- }
465
-
466
- @keyframes rotation {
467
- from {
468
- transform-origin: 50% 50%;
469
- transform: translate(-50%, -50%) rotate(0deg);
470
- }
471
- to {
472
- transform-origin: 50% 50%;
473
- transform: translate(-50%, -50%) rotate(359deg);
474
- }
475
- }
476
- `],as([F({type:String,reflect:!0})],ls.prototype,"type",2),as([F({type:String,reflect:!0})],ls.prototype,"variant",2),as([F({type:String,reflect:!0})],ls.prototype,"size",2),as([F({type:String,reflect:!0})],ls.prototype,"shape",2),as([F({type:String})],ls.prototype,"direction",2),as([F({type:String,reflect:!0})],ls.prototype,"alignItems",2),as([F({type:String})],ls.prototype,"justify",2),as([F({type:String,reflect:!0})],ls.prototype,"align",2),as([F({type:String})],ls.prototype,"minWidth",2),as([F({type:Boolean,reflect:!0})],ls.prototype,"icon",2),as([F({type:String})],ls.prototype,"download",2),as([F({type:String})],ls.prototype,"autoActive",2),as([F({type:Boolean,reflect:!0})],ls.prototype,"loading",2),as([U()],ls.prototype,"hasPrefix",2),as([U()],ls.prototype,"hasSuffix",2),as([H({flatten:!0,slot:"prefix"})],ls.prototype,"prefixes",2),as([H({flatten:!0,slot:"suffix"})],ls.prototype,"suffixes",2),as([F({type:String})],ls.prototype,"target",2),as([F({type:String})],ls.prototype,"href",1),as([F({type:String})],ls.prototype,"goBack",2),as([F({type:Boolean})],ls.prototype,"pushState",2),as([F({type:Boolean,reflect:!0})],ls.prototype,"active",2),as([F({type:Boolean,reflect:!0})],ls.prototype,"autoRepeat",2),as([F({type:String,attribute:"data-aria-controls"})],ls.prototype,"ariaControls",2),as([F({type:Boolean,attribute:"data-aria-expanded"})],ls.prototype,"sonicAriaExpanded",2),as([U()],ls.prototype,"location",2),ls=as([b("sonic-button")],ls);
477
- /**
478
- * @license
479
- * Copyright 2017 Google LLC
480
- * SPDX-License-Identifier: BSD-3-Clause
481
- */
482
- const cs=(t,e,s)=>{const i=new Map;for(let r=e;r<=s;r++)i.set(t[r],r);return i},hs=Rt(class extends Ft{constructor(t){if(super(t),t.type!==zt)throw Error("repeat() can only be used in text expressions")}ht(t,e,s){let i;void 0===s?s=e:void 0!==e&&(i=e);const r=[],o=[];let n=0;for(const a of t)r[n]=i?i(a,n):n,o[n]=s(a,n),n++;return{values:o,keys:r}}render(t,e,s){return this.ht(t,e,s).values}update(t,[e,s,i]){const r=t._$AH,{values:o,keys:n}=this.ht(e,s,i);if(!Array.isArray(r))return this.dt=n,o;const a=this.dt??(this.dt=[]),l=[];let c,h,d=0,p=r.length-1,u=0,g=o.length-1;for(;d<=p&&u<=g;)if(null===r[d])d++;else if(null===r[p])p--;else if(a[d]===n[u])l[u]=Mt(r[d],o[u]),d++,u++;else if(a[p]===n[g])l[g]=Mt(r[p],o[g]),p--,g--;else if(a[d]===n[g])l[g]=Mt(r[d],o[g]),jt(t,l[g+1],r[d]),d++,g--;else if(a[p]===n[u])l[u]=Mt(r[p],o[u]),jt(t,r[d],r[p]),p--,u++;else if(void 0===c&&(c=cs(n,u,g),h=cs(a,d,p)),c.has(a[d]))if(c.has(a[p])){const e=h.get(n[u]),s=void 0!==e?r[e]:null;if(null===s){const e=jt(t,r[d]);Mt(e,o[u]),l[u]=e}else l[u]=Mt(s,o[u]),jt(t,r[d],s),r[e]=null;u++}else Tt(r[p]),p--;else Tt(r[d]),d++;for(;u<=g;){const e=jt(t,l[g+1]);Mt(e,o[u]),l[u++]=e}for(;d<=p;){const t=r[d++];null!==t&&Tt(t)}return this.dt=n,((t,e=It)=>{t._$AH=e})(t,l),ut}}),ds=new WeakMap;let ps=0;const us=new Map,gs=new WeakSet,bs=()=>new Promise((t=>requestAnimationFrame(t))),fs=[{opacity:0}],ms=[{opacity:0},{opacity:1}],vs=(t,e)=>{const s=t-e;return 0===s?void 0:s},ys=(t,e)=>{const s=t/e;return 1===s?void 0:s},ws={left:(t,e)=>{const s=vs(t,e);return{value:s,transform:null==s||isNaN(s)?void 0:`translateX(${s}px)`}},top:(t,e)=>{const s=vs(t,e);return{value:s,transform:null==s||isNaN(s)?void 0:`translateY(${s}px)`}},width:(t,e)=>{let s;0===e&&(e=1,s={width:"1px"});const i=ys(t,e);return{value:i,overrideFrom:s,transform:null==i||isNaN(i)?void 0:`scaleX(${i})`}},height:(t,e)=>{let s;0===e&&(e=1,s={height:"1px"});const i=ys(t,e);return{value:i,overrideFrom:s,transform:null==i||isNaN(i)?void 0:`scaleY(${i})`}}},xs={duration:333,easing:"ease-in-out"},_s=["left","top","width","height","opacity","color","background"],ks=new WeakMap;const As=Rt(class extends Kt{constructor(t){if(super(t),this.t=null,this.i=null,this.o=!0,this.shouldLog=!1,t.type===zt)throw Error("The `animate` directive must be used in attribute position.");this.createFinished()}createFinished(){var t;null==(t=this.resolveFinished)||t.call(this),this.finished=new Promise((t=>{this.h=t}))}async resolveFinished(){var t;null==(t=this.h)||t.call(this),this.h=void 0}render(t){return gt}getController(){return ds.get(this.l)}isDisabled(){var t;return this.options.disabled||(null==(t=this.getController())?void 0:t.disabled)}update(t,[e]){var s;const i=void 0===this.l;return i&&(this.l=null==(s=t.options)?void 0:s.host,this.l.addController(this),this.element=t.element,ks.set(this.element,this)),this.optionsOrCallback=e,(i||"function"!=typeof e)&&this.u(e),this.render(e)}u(t){t=t??{};const e=this.getController();void 0!==e&&((t={...e.defaultOptions,...t}).keyframeOptions={...e.defaultOptions.keyframeOptions,...t.keyframeOptions}),t.properties??(t.properties=_s),this.options=t}p(){const t={},e=this.element.getBoundingClientRect(),s=getComputedStyle(this.element);return this.options.properties.forEach((i=>{const r=e[i]??(ws[i]?void 0:s[i]),o=Number(r);t[i]=isNaN(o)?r+"":o})),t}m(){let t,e=!0;return this.options.guard&&(t=this.options.guard(),e=((t,e)=>{if(Array.isArray(t)){if(Array.isArray(e)&&e.length===t.length&&t.every(((t,s)=>t===e[s])))return!1}else if(e===t)return!1;return!0})(t,this.v)),this.o=this.l.hasUpdated&&!this.isDisabled()&&!this.isAnimating()&&e&&this.element.isConnected,this.o&&(this.v=Array.isArray(t)?Array.from(t):t),this.o}hostUpdate(){"function"==typeof this.optionsOrCallback&&this.u(this.optionsOrCallback()),this.m()&&(this.g=this.p(),this.t=this.t??this.element.parentNode,this.i=this.element.nextSibling)}async hostUpdated(){if(!this.o||!this.element.isConnected||this.options.skipInitial&&!this.isHostRendered)return;let t;this.prepare(),await bs;const e=this._(),s=this.A(this.options.keyframeOptions,e),i=this.p();if(void 0!==this.g){const{from:s,to:r}=this.O(this.g,i,e);this.log("measured",[this.g,i,s,r]),t=this.calculateKeyframes(s,r)}else{const s=us.get(this.options.inId);if(s){us.delete(this.options.inId);const{from:r,to:o}=this.O(s,i,e);t=this.calculateKeyframes(r,o),t=this.options.in?[{...this.options.in[0],...t[0]},...this.options.in.slice(1),t[1]]:t,ps++,t.forEach((t=>t.zIndex=ps))}else this.options.in&&(t=[...this.options.in,{}])}this.animate(t,s)}resetStyles(){void 0!==this.j&&(this.element.setAttribute("style",this.j??""),this.j=void 0)}commitStyles(){var t,e;this.j=this.element.getAttribute("style"),null==(t=this.webAnimation)||t.commitStyles(),null==(e=this.webAnimation)||e.cancel()}reconnected(){}async disconnected(){var t;if(!this.o)return;if(void 0!==this.options.id&&us.set(this.options.id,this.g),void 0===this.options.out)return;if(this.prepare(),await bs(),null==(t=this.t)?void 0:t.isConnected){const t=this.i&&this.i.parentNode===this.t?this.i:null;if(this.t.insertBefore(this.element,t),this.options.stabilizeOut){const t=this.p();this.log("stabilizing out");const e=this.g.left-t.left,s=this.g.top-t.top;!("static"===getComputedStyle(this.element).position)||0===e&&0===s||(this.element.style.position="relative"),0!==e&&(this.element.style.left=e+"px"),0!==s&&(this.element.style.top=s+"px")}}const e=this.A(this.options.keyframeOptions);await this.animate(this.options.out,e),this.element.remove()}prepare(){this.createFinished()}start(){var t,e;null==(e=(t=this.options).onStart)||e.call(t,this)}didFinish(t){var e,s;t&&(null==(s=(e=this.options).onComplete)||s.call(e,this)),this.g=void 0,this.animatingProperties=void 0,this.frames=void 0,this.resolveFinished()}_(){const t=[];for(let e=this.element.parentNode;e;e=null==e?void 0:e.parentNode){const s=ks.get(e);s&&!s.isDisabled()&&s&&t.push(s)}return t}get isHostRendered(){const t=gs.has(this.l);return t||this.l.updateComplete.then((()=>{gs.add(this.l)})),t}A(t,e=this._()){const s={...xs};return e.forEach((t=>Object.assign(s,t.options.keyframeOptions))),Object.assign(s,t),s}O(t,e,s){t={...t},e={...e};const i=s.map((t=>t.animatingProperties)).filter((t=>void 0!==t));let r=1,o=1;return void 0!==i&&(i.forEach((t=>{t.width&&(r/=t.width),t.height&&(o/=t.height)})),void 0!==t.left&&void 0!==e.left&&(t.left=r*t.left,e.left=r*e.left),void 0!==t.top&&void 0!==e.top&&(t.top=o*t.top,e.top=o*e.top)),{from:t,to:e}}calculateKeyframes(t,e,s=!1){const i={},r={};let o=!1;const n={};for(const a in e){const s=t[a],l=e[a];if(a in ws){const t=ws[a];if(void 0===s||void 0===l)continue;const e=t(s,l);void 0!==e.transform&&(n[a]=e.value,o=!0,i.transform=`${i.transform??""} ${e.transform}`,void 0!==e.overrideFrom&&Object.assign(i,e.overrideFrom))}else s!==l&&void 0!==s&&void 0!==l&&(o=!0,i[a]=s,r[a]=l)}return i.transformOrigin=r.transformOrigin=s?"center center":"top left",this.animatingProperties=n,o?[i,r]:void 0}async animate(t,e=this.options.keyframeOptions){this.start(),this.frames=t;let s=!1;if(!this.isAnimating()&&!this.isDisabled()&&(this.options.onFrames&&(this.frames=t=this.options.onFrames(this),this.log("modified frames",t)),void 0!==t)){this.log("animate",[t,e]),s=!0,this.webAnimation=this.element.animate(t,e);const r=this.getController();null==r||r.add(this);try{await this.webAnimation.finished}catch(i){}null==r||r.remove(this)}return this.didFinish(s),s}isAnimating(){var t,e;return"running"===(null==(t=this.webAnimation)?void 0:t.playState)||(null==(e=this.webAnimation)?void 0:e.pending)}log(t,e){this.shouldLog&&!this.isDisabled()&&console.log(t,this.options.id,e)}}),Ps={core:{cancel:'<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M6.75827 17.2426L12.0009 12M17.2435 6.75736L12.0009 12M12.0009 12L6.75827 6.75736M12.0009 12L17.2435 17.2426" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n',"check-circled-outline":'<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M7 12.5L10 15.5L17 8.5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n',check:'<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M5 13L9 17L19 7" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n',"emoji-puzzled":'<svg width="24px" height="24px" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" ><path d="M2 12c0 5.523 4.477 10 10 10s10-4.477 10-10S17.523 2 12 2" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M11.5 15.5s1.5-2 4.5-2 4.5 2 4.5 2M3 4c0-2.754 4-2.754 4 0 0 1.967-2 1.64-2 4M5 11.01l.01-.011" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M17.5 9a.5.5 0 110-1 .5.5 0 010 1zM10.5 9a.5.5 0 110-1 .5.5 0 010 1z" fill="#000" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path></svg>',"info-empty":'<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M12 11.5V16.5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M12 7.51L12.01 7.49889" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n',loader:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-loader"><line x1="12" y1="2" x2="12" y2="6"></line><line x1="12" y1="18" x2="12" y2="22"></line><line x1="4.93" y1="4.93" x2="7.76" y2="7.76"></line><line x1="16.24" y1="16.24" x2="19.07" y2="19.07"></line><line x1="2" y1="12" x2="6" y2="12"></line><line x1="18" y1="12" x2="22" y2="12"></line><line x1="4.93" y1="19.07" x2="7.76" y2="16.24"></line><line x1="16.24" y1="7.76" x2="19.07" y2="4.93"></line></svg>',"minus-small":'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6">\n <path stroke-linecap="round" stroke-linejoin="round" d="M18 12H6" />\n</svg>\n',"more-horiz":'<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M18 12.5C18.2761 12.5 18.5 12.2761 18.5 12C18.5 11.7239 18.2761 11.5 18 11.5C17.7239 11.5 17.5 11.7239 17.5 12C17.5 12.2761 17.7239 12.5 18 12.5Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M12 12.5C12.2761 12.5 12.5 12.2761 12.5 12C12.5 11.7239 12.2761 11.5 12 11.5C11.7239 11.5 11.5 11.7239 11.5 12C11.5 12.2761 11.7239 12.5 12 12.5Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M6 12.5C6.27614 12.5 6.5 12.2761 6.5 12C6.5 11.7239 6.27614 11.5 6 11.5C5.72386 11.5 5.5 11.7239 5.5 12C5.5 12.2761 5.72386 12.5 6 12.5Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n',"more-vert":'<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M12 12.5C12.2761 12.5 12.5 12.2761 12.5 12C12.5 11.7239 12.2761 11.5 12 11.5C11.7239 11.5 11.5 11.7239 11.5 12C11.5 12.2761 11.7239 12.5 12 12.5Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M12 18.5C12.2761 18.5 12.5 18.2761 12.5 18C12.5 17.7239 12.2761 17.5 12 17.5C11.7239 17.5 11.5 17.7239 11.5 18C11.5 18.2761 11.7239 18.5 12 18.5Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M12 6.5C12.2761 6.5 12.5 6.27614 12.5 6C12.5 5.72386 12.2761 5.5 12 5.5C11.7239 5.5 11.5 5.72386 11.5 6C11.5 6.27614 11.7239 6.5 12 6.5Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n',"nav-arrow-down":'<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M6 9L12 15L18 9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n',"warning-circled-outline":'<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M12 7L12 13" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M12 17.01L12.01 16.9989" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n'}},Cs=new Map,Ss={heroicons:{url:"https://cdn.jsdelivr.net/npm/heroicons@2.0.4/24/$prefix/$name.svg",defaultPrefix:"outline"},iconoir:{url:"https://cdnjs.cloudflare.com/ajax/libs/iconoir/5.1.4/icons/$name.svg"},feathers:{url:"https://cdn.jsdelivr.net/npm/feather-icons@4.29.0/dist/icons/$name.svg"},lucide:{url:"https://cdn.jsdelivr.net/npm/lucide-static@0.16.29/icons/$name.svg"},material:{url:"https://cdn.jsdelivr.net/npm/@material-icons/svg@1.0.5/svg/$name/$prefix.svg",defaultPrefix:"regular"},fontAwesome:{url:"https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.15.1/svgs/$prefix/$name.svg",defaultPrefix:"regular"},custom:{url:"",defaultPrefix:""}};let $s=!1;const Os=sessionStorage.getItem("sonicIconsCache"),Ds=Os?JSON.parse(Os):{icons:{},names:[]};class Ls{}Ls.default={get:async t=>{const e=t.library;if(!t.name)return"";const s=t.name,i=Ps;var r,o;if("custom"==e&&($s||($s=!0,Ss.custom.url=(null==(r=document.querySelector("[customIconLibraryPath]"))?void 0:r.getAttribute("customIconLibraryPath"))||"",Ss.custom.defaultPrefix=(null==(o=document.querySelector("[customIconDefaultPrefix]"))?void 0:o.getAttribute("customIconDefaultPrefix"))||"")),e&&e in Ss){const r=Ss[e],o=t.prefix||r.defaultPrefix||"",n=i[e]||{};i[e]=n;const a=o+"-"+s;if(n[a])return ne(n[a]);const l=(r.url||"").replace("$prefix",o).replace("$name",s);if(Ds.icons[l])return n[a]=Ds.icons[l],ne(Ds.icons[l]);if(!Cs.has(l)){const t=new Promise((async t=>{const e=await fetch(l);if(e.ok)try{t(await e.text())}catch(s){t(null)}else t(`<b title="Erreur ${e.status}">😶</b>`)}));Cs.set(l,t)}const c=await Cs.get(l);if(Cs.delete(l),n[a]=c||"",Ds.icons[l]=c||"",Ds.names.length>100){const t=Ds.names.shift();delete Ds.icons[t]}return sessionStorage.setItem("sonicIconsCache",JSON.stringify(Ds)),ne(c)}return ne(i.core[t.name]||"")}};var Es=Object.defineProperty,js=Object.getOwnPropertyDescriptor,Ms=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?js(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Es(e,s,o),o};let Is=class extends Zt{constructor(){super(...arguments),this.iconText="",this.name="",this.prefix="",this.library=""}async updateIcon(){this.iconText=await Ls.default.get({name:this.name,prefix:this.prefix,library:this.library})}willUpdate(t){(t.has("name")||t.has("prefix")||t.has("library"))&&this.updateIcon(),super.willUpdate(t)}render(){return this.iconText?this.iconText:gt}};Is.styles=x`
483
- :host {
484
- line-height: 0.1em;
485
- width: fit-content;
486
- height: fit-content;
487
- vertical-align: -0.125em;
488
- flex-shrink: 0;
489
- }
490
- svg {
491
- height: var(--sc-icon-size, 1em);
492
- width: 1.4em;
493
- overflow: visible;
494
- }
495
-
496
- svg:not([fill="none"]) {
497
- fill: currentColor;
498
- }
499
-
500
- svg[fill="none"] {
501
- stroke-width: 2;
502
- }
503
-
504
- :host([size="2xs"]) svg {
505
- --sc-icon-size: 0.625em;
506
- }
507
-
508
- :host([size="xs"]) svg {
509
- --sc-icon-size: 0.75em;
510
- }
511
-
512
- :host([size="sm"]) svg {
513
- --sc-icon-size: 0.875em;
514
- }
515
-
516
- :host([size="lg"]) svg {
517
- --sc-icon-size: 1.25em;
518
- }
519
-
520
- :host([size="xl"]) svg {
521
- --sc-icon-size: 1.5em;
522
- }
523
-
524
- :host([size="2xl"]) svg {
525
- --sc-icon-size: 2em;
526
- }
527
-
528
- :host([size="3xl"]) svg {
529
- --sc-icon-size: 2.8em;
530
- }
531
- `,Ms([U()],Is.prototype,"iconText",2),Ms([F({type:String})],Is.prototype,"name",2),Ms([F({type:String})],Is.prototype,"prefix",2),Ms([F({type:String})],Is.prototype,"library",2),Is=Ms([b("sonic-icon")],Is);const Ts=x`
532
- .custom-scroll {
533
- overflow: auto !important;
534
- overflow-y: overlay !important;
535
- }
536
-
537
- @media (hover: hover) {
538
- .custom-scroll::-webkit-scrollbar {
539
- width: 0.5rem;
540
- height: 0.5rem;
541
- border: solid 0.15rem transparent;
542
- border-radius: var(--sc-rounded);
543
- background: transparent;
544
- }
545
-
546
- .custom-scroll::-webkit-scrollbar-thumb {
547
- box-shadow: inset 0 0 2rem 2rem var(--sc-scrollbar-bg);
548
- border-radius: var(--sc-rounded);
549
- border: solid 0.15rem transparent;
550
- }
551
- }
552
- `;var Ns=Object.defineProperty,zs=Object.getOwnPropertyDescriptor,Rs=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?zs(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Ns(e,s,o),o};const Fs={warning:"warning-circled-outline",success:"check-circled-outline",error:"warning-circled-outline",info:"info-empty"};let Us=class extends Zt{constructor(){super(...arguments),this.title="",this.id="",this.text="",this.status="",this.ghost=!1,this.preserve=!1,this.dismissForever=!1,this.maxHeight="10rem",this.visible=!0}render(){if(this.dismissForever){const t=localStorage.getItem("sonic-toast-dismissed")||"{}";if(JSON.parse(t)[this.id])return gt}return this.visible?pt`<div class="sonic-toast ${this.status} ${this.ghost?"ghost":""}">
553
- <button aria-label="Close" class="sonic-toast-close" @click=${()=>this.hide()}>
554
- <sonic-icon name="cancel" size="lg"></sonic-icon>
555
- </button>
556
- <div class="sonic-toast-content custom-scroll" style="max-height: ${this.maxHeight} ;">
557
- ${this.status&&pt`<sonic-icon name=${Fs[this.status]} class="sonic-toast-icon" size="2xl"></sonic-icon>`}
558
-
559
- <div class="sonic-toast-text">
560
- ${this.title?pt`<div class="sonic-toast-title">${this.title}</div>`:""} ${this.text?ne(this.text):""}
561
- <slot></slot>
562
- </div>
563
-
564
- ${this.preserve?"":this.autoHide()}
565
- </div>
566
- </div>`:gt}hide(){if(this.closest("sonic-toast")||(this.visible=!1),this.dismissForever){const t=localStorage.getItem("sonic-toast-dismissed")||"{}",e=JSON.parse(t);e[this.id]=!0,localStorage.setItem("sonic-toast-dismissed",JSON.stringify(e))}this.dispatchEvent(new CustomEvent("hide",{bubbles:!0}))}show(){this.visible=!0}autoHide(){setTimeout((()=>{this.hide()}),6e3)}};Us.styles=[Ts,x`
567
- * {
568
- box-sizing: border-box;
569
- }
570
- :host {
571
- display: block;
572
- pointer-events: auto;
573
- position: relative;
574
- --sc-toast-status-color: transparent;
575
- --sc-toast-color: var(--sc-base-content);
576
- --sc-toast-bg: var(--sc-base);
577
- --sc-toast-rounded: var(--sc-rounded-md);
578
- --sc-toast-shadow: var(--sc-shadow-lg);
579
- }
580
-
581
- .fixed-area {
582
- position: fixed;
583
- bottom: 1.25rem;
584
- right: 1.25rem;
585
- z-index: 10000;
586
- display: flex;
587
- flex-direction: column-reverse;
588
- }
589
-
590
- .sonic-toast {
591
- position: relative;
592
- pointer-events: auto;
593
- overflow: hidden;
594
- line-height: 1.25;
595
- color: var(--sc-toast-color);
596
- box-shadow: var(--sc-toast-shadow);
597
- border-radius: var(--sc-toast-rounded);
598
- background: var(--sc-toast-bg);
599
- }
600
-
601
- .sonic-toast-content {
602
- padding: 1em 2.5rem 1em 1em;
603
- display: flex;
604
- gap: 0.5rem;
605
- overflow: auto;
606
- position: relative;
607
- }
608
-
609
- .sonic-toast-text {
610
- align-self: center;
611
- margin-top: auto;
612
- margin-bottom: auto;
613
- max-width: 70ch;
614
- line-height: 1.2;
615
- }
616
-
617
- ::slotted(a:not(.btn)),
618
- .sonic-toast-text a {
619
- color: inherit !important;
620
- text-decoration: underline !important;
621
- text-underline-offset: 0.15rem;
622
- }
623
-
624
- ::slotted(:is(p, ul, ol, hr, h1, h2, h3, h4, h5, h6)),
625
- .sonic-toast-text :is(p, ul, ol, hr, h1, h2, h3, h4, h5, h6) {
626
- margin: 0 0 0.3em !important;
627
- }
628
-
629
- ::slotted(li),
630
- .sonic-toast-text li {
631
- margin-bottom: 0.15em !important;
632
- }
633
-
634
- ::slotted(:is(p, ul, ol, hr, h1, h2, h3, h4, h5, h6):last-child),
635
- .sonic-toast-text > :is(p, ul, ol, hr, h1, h2, h3, h4, h5, h6):last-child {
636
- margin-bottom: 0 !important;
637
- }
638
-
639
- /*BUTTON CLOSE*/
640
- .sonic-toast-close {
641
- all: unset;
642
- position: absolute;
643
- z-index: 4;
644
- pointer-events: initial;
645
- right: 0.5em;
646
- top: 0.5em;
647
- width: 1.5rem;
648
- height: 1.5rem;
649
- cursor: pointer;
650
- display: inline-flex;
651
- align-items: center;
652
- justify-content: center;
653
- border-radius: 50%;
654
- text-align: center;
655
- opacity: 0.5;
656
- background: rgba(0, 0, 0, 0);
657
- }
658
-
659
- .sonic-toast-close:focus,
660
- .sonic-toast-close:hover {
661
- opacity: 1;
662
- background: rgba(0, 0, 0, 0.075);
663
- }
664
-
665
- .sonic-toast-close svg {
666
- width: 1rem;
667
- height: 1rem;
668
- object-fit: contain;
669
- object-position: center center;
670
- }
671
-
672
- /*Title*/
673
- .sonic-toast-title {
674
- font-weight: bold;
675
- font-size: 1.15rem;
676
- margin: 0.15em 0 0.25em;
677
- line-height: 1.2;
678
- }
679
-
680
- /*STATUS*/
681
- .success {
682
- --sc-toast-status-color: var(--sc-success);
683
- --sc-toast-title-color: var(--sc-toast-status-color);
684
- }
685
-
686
- .error {
687
- --sc-toast-status-color: var(--sc-danger);
688
- --sc-toast-title-color: var(--sc-toast-status-color);
689
- }
690
-
691
- .warning {
692
- --sc-toast-status-color: var(--sc-warning);
693
- --sc-toast-title-color: var(--sc-toast-status-color);
694
- }
695
-
696
- .info {
697
- --sc-toast-status-color: var(--sc-info);
698
- --sc-toast-title-color: var(--sc-toast-status-color);
699
- }
700
-
701
- .success,
702
- .error,
703
- .info,
704
- .warning {
705
- border-top: 3px solid var(--sc-toast-status-color, currentColor);
706
- }
707
-
708
- .sonic-toast:before {
709
- content: "";
710
- display: block;
711
- position: absolute;
712
- left: 0;
713
- top: 0;
714
- right: 0;
715
- bottom: 0;
716
- opacity: 0.05;
717
- pointer-events: none;
718
- transition: 0.2s;
719
- border-radius: var(--sc-toast-rounded);
720
- background-color: var(--sc-toast-status-color);
721
- }
722
-
723
- .sonic-toast:hover:before {
724
- opacity: 0.025;
725
- }
726
-
727
- .info .sonic-toast-icon,
728
- .error .sonic-toast-icon,
729
- .success .sonic-toast-icon,
730
- .warning .sonic-toast-icon {
731
- color: var(--sc-toast-status-color, currentColor);
732
- }
733
-
734
- .sonic-toast-icon {
735
- position: sticky;
736
- top: 0;
737
- }
738
-
739
- .ghost {
740
- opacity: 0.85;
741
- pointer-events: none;
742
- }
743
- `],Rs([F({type:String})],Us.prototype,"title",2),Rs([F({type:String})],Us.prototype,"id",2),Rs([F({type:String})],Us.prototype,"text",2),Rs([F({type:String})],Us.prototype,"status",2),Rs([F({type:Boolean})],Us.prototype,"ghost",2),Rs([F({type:Boolean})],Us.prototype,"preserve",2),Rs([F({type:Boolean})],Us.prototype,"dismissForever",2),Rs([F({type:String})],Us.prototype,"maxHeight",2),Rs([U()],Us.prototype,"visible",2),Us=Rs([b("sonic-toast-item")],Us);const Vs=x`
744
- :host {
745
- /* polices*/
746
- --sc-font-family-base: "Inter var", "Inter", -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
747
- sans-serif;
748
- --sc-font-weight-base: 400;
749
- --sc-font-style-base: normal;
750
-
751
- --sc-headings-font-family: var(--sc-font-family-base), sans-serif;
752
- --sc-headings-font-style: var(--sc-font-style-base);
753
- --sc-headings-line-height: 1.1;
754
- --sc-headings-font-weight: 700;
755
- --sc-headings-text-transform: none;
756
-
757
- /* Button*/
758
- --sc-btn-font-weight: var(--sc-font-weight-base);
759
- --sc-btn-font-family: var(--sc-font-family-base);
760
- --sc-btn-font-style: var(--sc-font-style-base);
761
-
762
- /* ROUNDED*/
763
- --sc-rounded-sm: calc(var(--sc-rounded) * 0.5);
764
- --sc-rounded: 0.375rem;
765
- --sc-rounded-md: calc(var(--sc-rounded) * 1.8);
766
- --sc-rounded-lg: calc(var(--sc-rounded) * 3);
767
- --sc-rounded-xl: calc(var(--sc-rounded) * 7);
768
- --sc-rounded-size-intensity: calc((1em - 1rem) * 0.4);
769
-
770
- /* 4 for rounded full*/
771
- --sc-btn-rounded-intensity: 1.4;
772
- --sc-btn-font-weight: 500;
773
- --sc-btn-rounded: calc((var(--sc-rounded) + var(--sc-rounded-size-intensity)) * var(--sc-btn-rounded-intensity));
774
-
775
- /* Placeholder */
776
- --sc-placeholder-bg: rgba(17, 24, 39, 0.05);
777
-
778
- /* OMBRES */
779
- --sc-shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
780
- --sc-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
781
- --sc-shadow-lg: 0 10px 15px 0px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
782
- --sc-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
783
- --sc-shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
784
-
785
- /* Forms */
786
- --sc-border-width: max(1px, 0.12rem);
787
- --sc-border-color: var(--sc-base-100);
788
- --sc-form-height: 2.5em;
789
- --sc-form-border-width: var(--sc-border-width);
790
- --sc-input-bg: var(--sc-base-100);
791
- --sc-input-border-color: var(--sc-input-bg);
792
- --sc-input-rounded-intensity: 1.4;
793
- --sc-input-rounded: calc((var(--sc-rounded) + var(--sc-rounded-size-intensity)) * var(--sc-input-rounded-intensity));
794
- --sc-label-font-weight: 500;
795
-
796
- /* Contrast -- ex : Text on images */
797
- --sc-contrast-content: #fff;
798
- --sc-contrast: #11151f;
799
-
800
- /*Scrollbar*/
801
- --sc-scrollbar-bg: var(--sc-base-400);
802
-
803
- /*Body*/
804
- --sc-body-bg: var(--sc-base);
805
- }
806
- `,Bs=x`
807
- :host {
808
- /*Boutons*/
809
- --sc-primary: var(--sc-base-800);
810
- --sc-info: #2563eb;
811
- --sc-danger: #f43f5e;
812
- --sc-warning: #f97316;
813
- --sc-success: #14b8a6;
814
-
815
- --sc-primary-content: var(--sc-base);
816
- --sc-info-content: var(--sc-base);
817
- --sc-danger-content: var(--sc-base);
818
- --sc-warning-content: var(--sc-base);
819
- --sc-success-content: var(--sc-base);
820
-
821
- /*Bases*/
822
- --sc-base: #fff;
823
- --sc-base-50: #f8fafc;
824
- --sc-base-100: #f1f5f9;
825
- --sc-base-200: #e2e8f0;
826
- --sc-base-300: #cbd5e1;
827
- --sc-base-400: #94a3b8;
828
- --sc-base-500: #64748b;
829
- --sc-base-600: #475569;
830
- --sc-base-700: #334155;
831
- --sc-base-800: #1e293b;
832
- --sc-base-900: #0f172a;
833
- --sc-base-content: var(--sc-base-700);
834
-
835
- /*formulaires*/
836
- --sc-input-bg: var(--sc-base-100);
837
- --sc-input-color: var(--sc-base-content);
838
- }
839
- `,Hs=x`
840
- --sc-primary: var(--sc-dark-primary, var(--sc-base-700));
841
- --sc-info: var(--sc-dark-info, #3abff8);
842
- --sc-danger: var(--sc-dark-danger, #f87272);
843
- --sc-warning: var(--sc-dark-warning, #fbbd23);
844
- --sc-success: var(--sc-dark-success, #36d399);
845
-
846
- --sc-primary-content: var(--sc-dark-primary-content, #002b3d);
847
- --sc-info-content: var(--sc-dark-info-content, #002b3d);
848
- --sc-danger-content: var(--sc-dark-danger-content, #382800);
849
- --sc-warning-content: var(--sc-dark-warning-content, #382800);
850
- --sc-success-content: var(--sc-dark-success-content, #003320);
851
-
852
- --sc-base: var(--sc-dark-base, #1d2634);
853
- --sc-base-50: var(--sc-dark-base-50, #1f2937);
854
- --sc-base-100: var(--sc-dark-base-100, #252c36);
855
- --sc-base-200: var(--sc-dark-base-200, #2c3543);
856
- --sc-base-300: var(--sc-dark-base-300, #38414e);
857
- --sc-base-400: var(--sc-dark-base-400, #515964);
858
- --sc-base-500: var(--sc-dark-base-500, #828891);
859
- --sc-base-600: var(--sc-dark-base-600, #b4b8be);
860
- --sc-base-700: var(--sc-dark-base-700, #cdd0d5);
861
- --sc-base-800: var(--sc-dark-base-800, #d9dce0);
862
- --sc-base-900: var(--sc-dark-base-900, #e5e7eb);
863
- --sc-base-content: var(--sc-dark-base-content, #e5e7eb);
864
- `,qs=x`
865
- :host([theme="dark"]) {
866
- ${Hs}
867
- }
868
-
869
- @media (prefers-color-scheme: dark) {
870
- :host([theme="auto"]) {
871
- ${Hs}
872
- }
873
- }
874
- `;var Ws=Object.defineProperty,Ks=Object.getOwnPropertyDescriptor,Zs=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Ks(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Ws(e,s,o),o};let Ys=class extends Zt{constructor(){super(),this.theme="light",this.background=!1,this.color=!1,this.font=!1,Ys.instance=this}static getPopContainer(){return Ys.instance||document.body}connectedCallback(){super.connectedCallback(),window.addEventListener("message",(t=>this.receiveMessage(t)),!1),window.dispatchEvent(new CustomEvent("SonicThemeReady")),this.postCSSVars()}postCSSVars(){var t;const e=document.styleSheets,s=e.length,i=[];for(let o=0;o<s;o++){const t=e[o];t.href&&(t.href.includes("googleapis")||t.href.includes("typekit.net"))&&i.push(t.href)}const r={variables:this.getCssVariables(),fonts:i};null==(t=Ge.get("sonic-theme"))||t.set(r),document.querySelectorAll("iframe").forEach((t=>{var e;return null==(e=t.contentWindow)?void 0:e.postMessage({type:"SonicTheme",...r},"*")}))}receiveMessage(t){const e=t.data;e.type&&"GetSonicTheme"==e.type&&this.postCSSVars()}getCssVariables(){const t=[],e=[...Ys.styles.map((t=>t.styleSheet)),...Array.from(document.styleSheets)];for(const o of e)try{if(!o)continue;const e=o.cssRules;for(const s of e){if(!("style"in s))continue;const e=s.style;for(const s of e)t.includes(s)||0!==s.indexOf("--sc")||t.push(s)}}catch(r){console.log("Erreur lors de la récupération des variables CSS")}const s=window.getComputedStyle(this),i={};return t.forEach((t=>i[t]=s.getPropertyValue(t))),i}render(){return pt`<slot></slot>`}};Ys.styles=[Bs,qs,Vs,x`
875
- :host([color]) {
876
- color: var(--sc-base-content);
877
- }
878
-
879
- :host([font]) {
880
- font-family: var(--sc-font-family-base), sans-serif;
881
- font-weight: var(--sc-font-weight-base);
882
- font-style: var(--sc-font-style-base);
883
- }
884
- `],Zs([F({type:String,reflect:!0})],Ys.prototype,"theme",2),Zs([F({type:Boolean,reflect:!0})],Ys.prototype,"background",2),Zs([F({type:Boolean,reflect:!0})],Ys.prototype,"color",2),Zs([F({type:Boolean,reflect:!0})],Ys.prototype,"font",2),Ys=Zs([b("sonic-theme")],Ys);var Gs=Object.defineProperty,Qs=Object.getOwnPropertyDescriptor,Js=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Qs(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Gs(e,s,o),o};let Xs=class extends Zt{constructor(){super(...arguments),this.toasts=[]}createRenderRoot(){return this}render(){const t=!(window.parent==window);let e={pointerEvents:"none",gap:"1rem",display:"flex",margin:"1rem"};return t||(e={...e,margin:"0",width:"calc(100% - 2.5rem)",position:"fixed",bottom:"1.25rem",right:"1.25rem",zIndex:"10000",maxWidth:"64ch",flexDirection:"column-reverse"}),Xs.handleExistingToastDelegation(),this.toasts?pt`<div aria-live="polite" style=${$e(e)}>
885
- ${hs(this.toasts,(t=>t.id),(e=>pt`
886
- <sonic-toast-item
887
- maxHeight=${t?"none":"10rem"}
888
- status=${is(e.status)}
889
- title=${is(e.title)}
890
- ?ghost=${e.ghost}
891
- ?dismissForever=${e.dismissForever}
892
- ?preserve=${e.preserve}
893
- id=${is(e.id)}
894
- @hide=${()=>this.removeItem(e)}
895
- ${As({keyframeOptions:{duration:250,easing:"cubic-bezier(0.250, 0.250, 0.420, 1.225)"},in:[{transform:"translateY(0) scale(1.25)",boxShadow:"0 0 0 rgba(0,0,0,0)",opacity:0}],out:[{transform:"scale(.90) ",opacity:0,duration:3e3,easing:"ease-in-out"}],stabilizeOut:!0})}
896
- >
897
- <!-- Le texte est passé dans le slot et non pas en propriété pour contrer des problèmatiques de shadow-dom et d'appel exterieur (exemple: fancybox) -->
898
- ${e.text?ne(e.text):""}
899
- </sonic-toast-item>
900
- `))}
901
- </div>`:gt}static removeAll(){if(Xs.delegateToasts)return Xs.handleExistingToastDelegation(),void window.parent.postMessage({type:"removeAllToasts"},"*");const t=Xs.getInstance();t&&(t.toasts=t.toasts.filter((t=>t.ghost)))}static getInstance(){return Xs.instance||(Xs.instance=document.createElement("sonic-toast"),Ys.getPopContainer().prepend(Xs.instance)),Xs.instance}static add(t){if(Xs.delegateToasts)return Xs.handleExistingToastDelegation(),void window.parent.postMessage({type:"addToast",toast:t},"*");const e=Xs.getInstance(),s=t.id??(new Date).valueOf(),i=new RegExp("</a>|</.*?button>|</.*?input>|</.*?textarea>|</.*?select>").test(t.text),r={id:s,text:t.text,title:t.title,status:t.status,preserve:!!i||t.preserve,ghost:t.ghost,dismissForever:t.dismissForever};if(t.dismissForever&&t.id){const e=localStorage.getItem("sonic-toast-dismissed")||"{}";if(JSON.parse(e)[t.id])return null}if(null==e?void 0:e.toasts.length){const t={...r};for(const s of e.toasts){const e={...s};if(t.id=e.id=0,
902
- /*!currentToast.preserve && */
903
- g.shallowEqual(t,e))return null}}return e&&(e.toasts=[...e.toasts,r]),r}static handleExistingToastDelegation(){if(!this.delegateToasts)return;const t=Xs.getInstance();window.parent.postMessage({type:"addToasts",toasts:t.toasts},"*"),t.toasts=[]}static removeItem(t){if(Xs.delegateToasts)return Xs.handleExistingToastDelegation(),void window.parent.postMessage({type:"removeToast",toast:t},"*");const e=Xs.getInstance();e&&e.removeItem(t)}removeItem(t){t&&(this.toasts=this.toasts.filter((e=>(delete(e={...e}).id,!g.shallowEqual(e,t,!1)))))}};Xs.delegateToasts=!1,Js([F({type:Array})],Xs.prototype,"toasts",2),Xs=Js([b("sonic-toast")],Xs),"undefined"!=typeof window&&(window.SonicToast=Xs),function(){var t;const e=!(window.parent==window);if(window.addEventListener("message",(t=>{"querySonicToastAvailability"==t.data.type&&t.source.postMessage({type:"sonicToastAvailable"},"*"),"sonicToastAvailable"==t.data.type&&(Xs.delegateToasts=!0,Xs.handleExistingToastDelegation()),"addToasts"==t.data.type&&(Xs.getInstance().toasts=[...Xs.getInstance().toasts,...t.data.toasts]),"removeAllToasts"==t.data.type&&Xs.removeAll(),"removeToast"==t.data.type&&Xs.removeItem(t.data.toast),"addToast"==t.data.type&&Xs.add(t.data.toast)}),!1),e&&window.parent.postMessage({type:"querySonicToastAvailability"},"*"),!e)for(const s of document.querySelectorAll("iframe"))null==(t=s.contentWindow)||t.postMessage({type:"sonicToastAvailable"},"*")}();var ti=Object.defineProperty,ei=Object.getOwnPropertyDescriptor,si=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?ei(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ti(e,s,o),o};const ii=new Set,ri=new Set,oi=(t,e)=>{class s extends t{constructor(...t){super(),this.api=null,this.key="",this.isFirstLoad=!0,this.isLoading=!1,this.iObserver=null,this.isFetchEnabled=!0,this.fetchedData=null,this._endPoint="",this.requestId=0,this.refetchEveryMs=0,this.dataProvider=""}get props(){return super.props}set props(t){super.props=t}set endPoint(t){this._endPoint=t,this.isConnected&&this._fetchData()}get endPoint(){return this._endPoint}async _fetchData(){if(this.requestUpdate(),!this.isFetchEnabled)return;if(this.api=new re(this.getApiConfiguration()),!this.api)return;if(this.dispatchEvent(new CustomEvent("loading",{detail:this})),"enabled"===this.getAttribute("localStorage")&&await Ge.getInstance().isLocalStrorageReady,!this.isConnected)return;const t=Ge.getInstance().get(this.getAncestorAttributeValue("headersDataProvider")).get();this.isLoading=!0,g.isObject(this.props)&&Object.keys(this.props||{}).length>0&&this.isFirstLoad&&window.requestAnimationFrame((()=>{this.dispatchEvent(new CustomEvent("load",{detail:this})),this.isFirstLoad=!1,this.isLoading=!1}));let e=await this.api.get(this.endPoint||this.dataProvider||"",t);if(this.fetchedData=e,this.api.lastResult&&!this.api.lastResult.ok&&(ii.add(this),(t=>{for(const e of ri)e(t)})(this.api.lastResult)),this.isConnected){if(!e)return this.isLoading=!1,void(this.refetchEveryMs&&this.isConnected&&(this.refetchTimeOutId=setTimeout((()=>this._fetchData()),this.refetchEveryMs)));if(e._sonic_http_response_&&!e._sonic_http_response_.ok&&1===Object.keys(e).length&&Xs.add({text:"Network Error",status:"error"}),this.key){const t=e._sonic_http_response_,s=this.key.split(".");e=g.traverse(e,s,this.hasAttribute("preserveOtherKeys")),e&&g.isObject(e)&&t&&(e._sonic_http_response_=t)}this.props=e,this.dispatchEvent(new CustomEvent("load",{detail:this})),this.isFirstLoad=!1,this.isLoading=!1,this.refetchEveryMs&&this.isConnected&&(this.refetchTimeOutId=setTimeout((()=>this._fetchData()),this.refetchEveryMs))}}disconnectedCallback(){var t;super.disconnectedCallback(),null==(t=this.publisher)||t.offInvalidate(this.onInvalidate),clearTimeout(this.refetchTimeOutId),this.isFirstLoad=!1}connectedCallback(){var t;this.lazyLoad=void 0!==this.lazyLoad?this.lazyLoad:this.hasAttribute("lazyload"),super.connectedCallback(),this.isFetchEnabled&&(this.key=""!=this.key?this.key:this.getAttribute("key"),this.props&&this.publisher.set(this.props),this.onInvalidate=()=>this._fetchData(),null==(t=this.publisher)||t.onInvalidate(this.onInvalidate),this.lazyLoad?this.handleLazyLoad():this._fetchData())}handleLazyLoad(){if(!this.lazyLoad)return;const t=this.getBoundingClientRect();if(t.x<window.innerWidth&&t.right>0&&t.y<window.innerHeight&&t.right>0)return void this._fetchData();const e=parseFloat(this.getAttribute("lazyBoundsRatio")||"1"),s={root:null,rootMargin:Math.max(window.innerWidth*e,window.innerHeight*e)+"px",threshold:.9};this.iObserver=new IntersectionObserver((t=>this.onIntersection(t)),s);let i=this.shadowRoot?this.shadowRoot.children[0]:this.children[0];if("slot"==(null==i?void 0:i.nodeName.toLocaleLowerCase())&&(i=i.children[0]),!i||"template"==i.nodeName.toLocaleLowerCase()){i=document.createElement("span");i.style.pointerEvents="none",this.lazyLoadSpan=i,this.appendChild(i)}i?this.iObserver.observe(i):this.isFirstLoad&&this._fetchData()}onIntersection(t){var e,s;for(const i of t)if(i.isIntersecting&&this.isFirstLoad){this._fetchData(),null==(e=this.lazyLoadSpan)||e.remove(),this.lazyLoadSpan=void 0,null==(s=this.iObserver)||s.disconnect();break}}}return si([F()],s.prototype,"props",1),si([F({type:String})],s.prototype,"endPoint",1),si([F()],s.prototype,"requestId",2),si([F({type:Number})],s.prototype,"refetchEveryMs",2),s};var ni=Object.defineProperty,ai=Object.getOwnPropertyDescriptor,li=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?ai(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ni(e,s,o),o};const ci=t=>{class e extends t{constructor(...t){super(),this.forceAutoFill=!1,this._type="text",this.status="default"}validateFormElement(){var t;const e=null==(t=this.shadowRoot)?void 0:t.querySelector("input");if(!e||e.checkValidity())return;const s=this.getFormPublisher();s&&(s.isFormValid=!1),e.reportValidity()}set type(t){this.hasAttribute("type")&&!this.forceAutoFill&&(t=this.getAttribute("type")),this._type=t,this.requestUpdate()}get type(){return this._type}get description(){return this._description}set description(t){this.hasAttribute("description")&&!this.forceAutoFill&&(t=this.getAttribute("description")),this._description=t,this.requestUpdate()}get label(){return this._label}set label(t){this.hasAttribute("label")&&!this.forceAutoFill&&(t=this.getAttribute("label")),this._label=t,this.requestUpdate()}}return li([F()],e.prototype,"forceAutoFill",2),li([F({type:String})],e.prototype,"type",1),li([F()],e.prototype,"description",1),li([F()],e.prototype,"label",1),li([F({type:String,reflect:!0})],e.prototype,"status",2),li([F({type:Number})],e.prototype,"tabindex",2),li([F({type:String})],e.prototype,"autocomplete",2),e},hi=oi,di=ss,pi=je,ui=ci,gi=fe,bi=ye;window["concorde-mixins"]=window["concorde-mixins"]||{},window["concorde-mixins"]={Fetcher:hi,FormCheckable:di,FormElement:pi,FormInput:ui,Subscriber:gi,TemplatesContainer:bi};
904
- /**
905
- * @license
906
- * Copyright 2020 Google LLC
907
- * SPDX-License-Identifier: BSD-3-Clause
908
- */
909
- const fi=Rt(class extends Ft{constructor(t){if(super(t),t.type!==zt)throw Error("templateContent can only be used in child bindings")}render(t){return this.ft===t?ut:(this.ft=t,document.importNode(t.content,!0))}});var mi=Object.defineProperty,vi=Object.getOwnPropertyDescriptor,yi=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?vi(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&mi(e,s,o),o};let wi=class extends(oi(fe(bi(Zt)))){renderLoader(){if(!this.isLoading||void 0===this.loader)return gt;const t=!0===this.loader||""===this.loader?"fixed":this.loader;return pt`<sonic-loader mode=${t}></sonic-loader>`}renderSkeleton(){const t=this.templateParts.skeleton;return this.isLoading&&t?fi(t):gt}render(){return pt` ${this.renderSkeleton()} ${this.renderLoader()} ${this.isLoading?gt:pt`<slot></slot>`} `}};wi.styles=[x`
910
- :host {
911
- display: contents;
912
- }
913
- `],yi([F()],wi.prototype,"loader",2),wi=yi([b("sonic-fetch")],wi);var xi=Object.defineProperty,_i=Object.getOwnPropertyDescriptor,ki=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?_i(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&xi(e,s,o),o};let Ai=class extends Zt{constructor(){super(...arguments),this.condition=!1}render(){return this.condition?pt` <slot></slot> `:gt}};Ai.styles=x`
914
- :host {
915
- display: contents;
916
- }
917
- `,ki([F({type:Boolean})],Ai.prototype,"condition",2),Ai=ki([b("sonic-if")],Ai);const Pi=x`
918
- :host([align="left"]) .sonic-loader--inline {
919
- margin-left: 0;
920
- }
921
-
922
- :host([align="right"]) .sonic-loader--inline {
923
- margin-left: auto;
924
- margin-right: 0;
925
- }
926
- .sonic-loader--inline {
927
- display: block;
928
- position: relative;
929
- width: 80px;
930
- height: 24px;
931
- margin: auto;
932
- z-index: 20;
933
- }
934
- .sonic-loader--inline div {
935
- position: absolute;
936
- top: 5px;
937
- width: 13px;
938
- height: 13px;
939
- border-radius: 50%;
940
- background: var(--sc-loader-bg);
941
- animation-timing-function: cubic-bezier(0, 1, 1, 0);
942
- }
943
- .sonic-loader--inline div:nth-child(1) {
944
- left: 8px;
945
- animation: lds-ellipsis1 0.6s infinite;
946
- }
947
- .sonic-loader--inline div:nth-child(2) {
948
- left: 8px;
949
- animation: lds-ellipsis2 0.6s infinite;
950
- }
951
- .sonic-loader--inline div:nth-child(3) {
952
- left: 32px;
953
- animation: lds-ellipsis2 0.6s infinite;
954
- }
955
- .sonic-loader--inline div:nth-child(4) {
956
- left: 56px;
957
- animation: lds-ellipsis3 0.6s infinite;
958
- }
959
-
960
- @keyframes lds-ellipsis1 {
961
- 0% {
962
- transform: scale(0);
963
- }
964
- 100% {
965
- transform: scale(1);
966
- }
967
- }
968
- @keyframes lds-ellipsis3 {
969
- 0% {
970
- transform: scale(1);
971
- }
972
- 100% {
973
- transform: scale(0);
974
- }
975
- }
976
- @keyframes lds-ellipsis2 {
977
- 0% {
978
- transform: translate(0, 0);
979
- }
980
- 100% {
981
- transform: translate(24px, 0);
982
- }
983
- }
984
- `,Ci=x`
985
-
986
- @keyframes sonic-loader--fixed {
987
- 0% {
988
- transform: scale(0);
989
- opacity: 0;
990
- }
991
- 5% {
992
- opacity: 1;
993
- }
994
- 70% {
995
- opacity:90%;
996
- }
997
- 100% {
998
- transform: scale(1);
999
- opacity: 0;
1000
- }
1001
- }
1002
-
1003
- .sonic-loader--fixed {
1004
- position: fixed;
1005
- top:50%;
1006
- left:50%;
1007
- transform:transateY(-50%) translateX(-50%);
1008
- z-index:999;
1009
- }
1010
-
1011
- .sonic-loader--fixed > div:nth-child(2) {
1012
- animation-delay: -0.5s;
1013
- }
1014
- .sonic-loader--fixed > div:nth-child(3) {
1015
- animation-delay: -0.2s;
1016
- }
1017
-
1018
- .sonic-loader--fixed > div:nth-child(4) {
1019
- display:none !important;
1020
- }
1021
- .sonic-loader--fixed > div {
1022
- background-color: var(--sc-loader-bg);
1023
- width: 5rem;
1024
- height: 5rem;
1025
- border-radius: 100%;
1026
- margin: 2px;
1027
- animation-fill-mode: both;
1028
- position: absolute;
1029
- top: 0px;
1030
- opacity: 0;
1031
- margin: 0;
1032
- top: -2.5rem;
1033
- left: -2.5rem;
1034
- width: 5rem;
1035
- height: 5rem;
1036
- animation: sonic-loader--fixed 1s 0s linear infinite;
1037
- }
1038
-
1039
- `;var Si=Object.defineProperty,$i=Object.getOwnPropertyDescriptor,Oi=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?$i(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Si(e,s,o),o};let Di=class extends Zt{constructor(){super(...arguments),this.mode="fixed",this.noDelay=!1}static show(t){Di.loader||(Di.loader=document.createElement("sonic-loader"));const e=Di.loader;t||(t={}),t.mode&&e.setAttribute("mode",t.mode),t.noDelay&&e.setAttribute("noDelay",""),t.container||(t.container=Ys.getPopContainer(),t.mode="fixed"),t.container.appendChild(e),Di.callCounter++}static hide(){Di.callCounter--,Di.callCounter>0||Di.loader&&Di.loader.remove()}render(){return pt`<div class="sonic-loader sonic-loader--${this.mode} ${this.noDelay?"sonic-loader--nodelay":""} ">
1040
- <div></div>
1041
- <div></div>
1042
- <div></div>
1043
- <div></div>
1044
- </div>`}};Di.styles=[Pi,Ci,x`
1045
- :host {
1046
- --sc-loader-bg: var(--sc-primary, currentColor);
1047
- pointer-events: none;
1048
- }
1049
-
1050
- .sonic-loader {
1051
- opacity: 0;
1052
- animation: showLoader 0.5s 0.5s forwards;
1053
- }
1054
- .sonic-loader--inline,
1055
- .sonic-loader--nodelay {
1056
- animation-delay: 0s;
1057
- }
1058
-
1059
- @keyframes showLoader {
1060
- 0% {
1061
- opacity: 0;
1062
- }
1063
-
1064
- 100% {
1065
- opacity: 1;
1066
- }
1067
- }
1068
- `],Di.callCounter=0,Oi([F({type:String})],Di.prototype,"mode",2),Oi([F({type:Boolean})],Di.prototype,"noDelay",2),Di=Oi([b("sonic-loader")],Di);var Li=Object.defineProperty,Ei=Object.getOwnPropertyDescriptor;let ji=class extends(fe(Zt)){constructor(){super(...arguments),this.noAutofill=!0}connectedCallback(){this.noShadowDom="",super.connectedCallback()}updated(t){super.updated(t),0==this.children.length?this.style.display="none":this.style.display="contents"}render(){return pt`<slot></slot> `}};ji=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Ei(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Li(e,s,o),o})([b("sonic-subscriber")],ji);var Mi=Object.defineProperty,Ii=Object.getOwnPropertyDescriptor,Ti=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Ii(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Mi(e,s,o),o};let Ni=class extends(oi(fe(ye(Zt)))){constructor(){super(...arguments),this.templateKey="template",this.idKey="id",this.limit=Number.POSITIVE_INFINITY,this.offset=0}connectedCallback(){this.noShadowDom="",this.defferedDebug=this.hasAttribute("debug")||null,this.isFetchEnabled=this.hasAttribute("fetch"),this.isFetchEnabled&&(this.isLoading=!0),super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback()}renderLoader(){if(!this.isLoading||void 0===this.loader)return gt;if(this.templateParts.skeleton)return gt;const t=!0===this.loader||""===this.loader?"fixed":this.loader;return pt`<sonic-loader mode=${t}></sonic-loader>`}renderSkeleton(){const t=this.templateParts.skeleton;return this.isLoading&&t?fi(t):gt}renderLoadingState(){return pt`${this.renderSkeleton()} ${this.renderLoader()}`}renderNoResultState(){return pt` <div
1069
- style="color: var(--sc-base-400);
1070
- font-size: 1.5em;
1071
- margin: 4rem 0;
1072
- display: flex;
1073
- gap: 0.5rem;"
1074
- >
1075
- <sonic-icon name="emoji-puzzled" size="lg"></sonic-icon
1076
- ><span class="sonic-no-result-text">${"string"==typeof this.props&&""==this.props?"Aucun résultat":this.props}</span>
1077
- </div>`}formatProps(){let t=this.props;if(null==t)return null;const e=t._sonic_http_response_,s=this.hasAttribute("extractValues");return Array.isArray(t)||(t=s?Object.entries(t).map((([t,e])=>({key:t,value:e}))):g.isObject(t)&&Object.keys(t).length>0&&(!e||e.ok)?[t]:[]),t=t.filter((t=>null!=t)),e&&(t._sonic_http_response_=e),t}render(){if(this.isLoading&&!Array.isArray(this.props))return this.renderLoadingState();if("string"==typeof this.props)return this.renderNoResultState();if(!g.isObject(this.props))return pt`<div></div>`;const t=this.formatProps();if(0==((null==t?void 0:t.length)||0)&&this.templateParts["no-item"])return fi(this.templateParts["no-item"]);const e=this.templateList.length;let s=-1;const i=this.hasAttribute("extractValues"),r=this.templateParts.separator,o=(null==t?void 0:t.length)||0,n=null==t?void 0:t.slice(this.offset,this.offset+this.limit);return pt`
1078
- ${null==n?void 0:n.map(((t,n)=>{if(null==t)return gt;let a=null,l=n;if("object"==typeof t&&!Array.isArray(t)){const e=t[this.templateKey];e&&"string"==typeof e&&(a=this.templateParts[e]),i&&(l=null==t?void 0:t.key)}if("_sonic_http_response_"==l)return gt;if("string"!=typeof l&&"number"!=typeof l)return gt;const c=n>=o-1,h=n%2,d=this.publisher[l];return d._key_=l+"",d._metadata_={...d._metadata_.get(),key:l,even:0==h,odd:1==h,onlyChild:1==o,firstChild:0==n,lastChild:c},s++,a&&(s=-1),t&&pt`
1079
- <sonic-subscriber
1080
- ?debug=${!0===this.defferedDebug}
1081
- .bindPublisher=${function(){return d}}
1082
- .propertyMap?=${this.itemPropertyMap}
1083
- dataProvider="${this.dataProvider}/list-item/${l}"
1084
- >
1085
- ${fi(a||this.templateList[s%e])}
1086
- </sonic-subscriber>
1087
- ${r&&!c?fi(r):gt}
1088
- `}))}
1089
- `}};Ti([F({type:Object})],Ni.prototype,"itemPropertyMap",2),Ti([F({type:String})],Ni.prototype,"templateKey",2),Ti([F({type:String})],Ni.prototype,"idKey",2),Ti([F()],Ni.prototype,"loader",2),Ti([F()],Ni.prototype,"limit",2),Ti([F()],Ni.prototype,"offset",2),Ni=Ti([b("sonic-list")],Ni);var zi=Object.defineProperty,Ri=Object.getOwnPropertyDescriptor,Fi=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Ri(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&zi(e,s,o),o};let Ui=class extends(fe(Zt)){constructor(){super(...arguments),this.templates=null,this.lastRequestTime=0,this.key="",this.itemPropertyMap=null,this.cache="default",this.targetRequestDuration=500,this.limit=5,this.lazyBoundsRatio=1,this.offset=0,this.resultCount=0,this.noLazyload=!1,this.filteredFields="",this.instanceId=0,this.localStorage="disabled",this.filterPublisher=null,this.filterTimeoutMs=400,this.searchHash="",this.requestId=0,this.isFirstRequest=!0,this.updateFilteredContent=()=>{var t;const e=this.dataProviderExpression.split("?");e.shift();const s=new URLSearchParams(e.join("?")),i=null==(t=this.filterPublisher)?void 0:t.get(),r=this.filteredFields.split(" ");for(const n in i){let t=i[n];Array.isArray(t)&&(t=t.filter((t=>null!==t))),this.filteredFields&&!r.includes(n)||null==t||""===t.toString()||s.set(n,i[n].toString())}const o=s.toString();if(o!=this.searchHash||this.isFirstRequest){this.searchHash=o;for(const t of this.listDataProviders)l.delete(t);this.listDataProviders=[],clearTimeout(this.filterTimeoutId),this.filterTimeoutId=setTimeout((async()=>{const t=this.resultCount;this.props=null,this.requestId++,this.resultCount=t,await l.getInstance().isLocalStrorageReady,window.requestAnimationFrame((()=>this.next()))}),this.isFirstRequest?0:this.filterTimeoutMs),this.isFirstRequest=!1}},this.dataProviderExpression="",this.idKey="id",this.listDataProviders=[],this.nextHadEvent=!1}disconnectedCallback(){var t;for(const e of this.listDataProviders)l.delete(e),this.listDataProviders=[];null==(t=this.filterPublisher)||t.offInternalMutation(this.updateFilteredContent),this.props=null,this.limit=5,this.offset=0,this.resultCount=0,this.searchHash="",this.requestId=0,this.isFirstRequest=!0,this.nextHadEvent=!1,this.publisher.set({}),super.disconnectedCallback()}async connectedCallback(){this.instanceId=Ui.instanceCounter++,this.localStorage=this.getAttribute("localStorage")||this.localStorage,this.filterTimeoutMs=parseInt(this.getAttribute("filterTimeoutMs")||"400"),this.removeAttribute("localStorage"),this.noShadowDom="",this.defferedDebug=this.hasAttribute("debug")||null,this.dataProvider||(this.dataProvider=this.dataProviderExpression||"sonic-queue-"+this.instanceId+"-"+Math.random().toString(36).substring(7)),this.dataProviderExpression||(this.dataProviderExpression=We.getAncestorAttributeValue(this.parentElement,"dataProvider")||""),super.connectedCallback(),this.publisher.set({}),this.key=this.getAttribute("key"),await l.getInstance().isLocalStrorageReady,this.templates||(this.templates=Array.from(this.querySelectorAll("template"))),this.lastRequestTime=(new Date).getTime(),this.configFilter()}configFilter(){var t;const e=this.getAncestorAttributeValue("dataFilterProvider");e?(this.filterPublisher=l.getInstance().get(e),null==(t=this.filterPublisher)||t.onInternalMutation(this.updateFilteredContent)):this.next()}resetDuration(){this.lastRequestTime=(new Date).getTime()}next(t){var e;let s=this.offset;const i=(new Date).getTime()-this.lastRequestTime;if(!this.nextHadEvent&&t&&(this.publisher.resultCount=0,this.resultCount=0),this.nextHadEvent=!!t,t){if(this.publisher.lastFetchedData=t.detail.fetchedData,t.detail.requestId<this.requestId)return;if(this.resultCount+=t.detail.props.length,!t.detail.isFirstLoad||!t.detail.props.length||-1==this.dataProviderExpression.indexOf("$offset"))return void(this.publisher.resultCount=this.resultCount)}if(Array.isArray(this.props)){const t=this.props,e=t[t.length-1];s=parseInt(e.offset.toString())+parseInt(e.limit.toString())}else{const e=[];e.resultCount=this.resultCount,e.lastFetchedData=(null==t?void 0:t.detail.fetchedData)||{},this.props=e}i>0&&t&&!this.localStorage&&(this.limit=Math.round(this.limit/i*this.targetRequestDuration)),this.limit<1&&(this.limit=1),this.limit>15&&(this.limit=15);let r=this.dataProviderExpression.replace("$offset",s+"").replace("$limit",this.limit+"");const o=r.split("?");let n=o.shift();const a=new URLSearchParams(o.join("?")),l=null==(e=this.filterPublisher)?void 0:e.get(),c=this.filteredFields.split(" ");for(const d in l)this.filteredFields&&c.includes(d)||null==l[d]||""==l[d]||a.set(d,l[d]);this.searchHash||(this.searchHash=a.toString()),n=n+"?"+a.toString(),r=r+"_item_from_queue_"+this.instanceId,this.listDataProviders.push(r);const h=[...this.props,{id:a.toString()+"/"+this.props.length,dataProvider:r,endPoint:n,offset:s,limit:this.limit}];h.resultCount=this.resultCount,h.lastFetchedData=(null==t?void 0:t.detail.fetchedData)||{},this.props=h,this.lastRequestTime=(new Date).getTime()}render(){if(!Array.isArray(this.props))return gt;let t=!this.noLazyload;return 1==this.props.length&&(t=!1),pt`
1090
- ${
1091
- /**
1092
- * @license
1093
- * Copyright 2021 Google LLC
1094
- * SPDX-License-Identifier: BSD-3-Clause
1095
- */
1096
- function*(t,e){if(void 0!==t){let s=0;for(const i of t)yield e(i,s++)}}(this.props,((e,s)=>{var i;const r=0==s?this.templates:null==(i=this.templates)?void 0:i.filter((t=>"no-item"!=t.getAttribute("data-value")));return pt`
1097
- <sonic-list
1098
- fetch
1099
- loader="inline"
1100
- cache=${this.cache}
1101
- displayContents
1102
- lazyBoundsRatio=${this.lazyBoundsRatio}
1103
- ?lazyload=${t}
1104
- localStorage=${this.localStorage}
1105
- requestId=${this.requestId}
1106
- .itemPropertyMap=${this.itemPropertyMap}
1107
- ?debug=${!0===this.defferedDebug}
1108
- @load=${this.next}
1109
- key=${this.key}
1110
- @loading=${this.resetDuration}
1111
- dataProvider="${e.dataProvider}"
1112
- endPoint="${e.endPoint}"
1113
- idKey=${this.idKey}
1114
- .templates=${r}
1115
- >
1116
- </sonic-list>
1117
- `}))}
1118
- `}};Ui.instanceCounter=0,Fi([F({type:Array})],Ui.prototype,"templates",2),Fi([F({type:Object})],Ui.prototype,"itemPropertyMap",2),Fi([F()],Ui.prototype,"cache",2),Fi([F()],Ui.prototype,"targetRequestDuration",2),Fi([F()],Ui.prototype,"limit",2),Fi([F()],Ui.prototype,"lazyBoundsRatio",2),Fi([F()],Ui.prototype,"offset",2),Fi([F()],Ui.prototype,"resultCount",2),Fi([F({type:Boolean})],Ui.prototype,"noLazyload",2),Fi([F()],Ui.prototype,"filteredFields",2),Fi([F({type:String})],Ui.prototype,"dataProviderExpression",2),Fi([F({type:String})],Ui.prototype,"idKey",2),Ui=Fi([b("sonic-queue")],Ui);var Vi=Object.defineProperty,Bi=Object.getOwnPropertyDescriptor,Hi=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Bi(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Vi(e,s,o),o};let qi=class extends(fe(Zt)){constructor(){super(...arguments),this.submitResultKey=null,this.disabled=!1,this.endPoint=null,this.name="",this.value="",this.api=null}connectedCallback(){this.hasAttribute("onClick")&&this.addEventListener("click",(()=>this.submit())),this.hasAttribute("onEnterKey")&&this.addEventListener("keydown",(t=>{"Enter"===t.key&&this.submit()})),super.connectedCallback(),this.api=new re(this.getApiConfiguration())}submitNativeForm(){const t=We.getClosestForm(this);if(!t)return;const e=this.getAncestorAttributeValue("formDataProvider"),s=l.get(e).get();for(const r in s){if("isFormValid"==r)continue;let e=t.querySelector('input[name="'+r+'"], select[name="'+r+'"], textarea[name="'+r+'"]');e||(e=document.createElement("input"),e.type="hidden",e.name=r,t.appendChild(e));let i=s[r];Array.isArray(i)&&(i=i.join(",")),"checkbox"===e.type||"radio"===e.type?i&&(e.checked=!0):e.value=i}const i=document.createElement("input");i.name=this.name,i.style.display="none",i.value=this.value,i.type="submit",t.appendChild(i),i&&i.click()}async submit(){var t;const e=l.getInstance().get(this.getAncestorAttributeValue("formDataProvider"));if(e.isFormValid=!0,e.invalidate(),!e.isFormValid.get())return;this.publisher&&(this.publisher.disabled=!0),e.isFormValid;if(this.hasAttribute("native"))return void this.submitNativeForm();const s=(null==(t=this.getAttribute("method"))?void 0:t.toLocaleLowerCase())||"post",i=this.hasAttribute("sendAsFormData"),r=e.get();delete r.isFormValid;const o=this.getAncestorAttributeValue("headersDataProvider"),n=o?l.getInstance().get(o):null;let a={};n&&(a=n.get());let c=null;const h=this.getAncestorAttributeValue("dataProvider"),d=this.endPoint||h;Di.show();const p=async()=>{var t,e,o,n,h,p,u;if(i)c=await(null==(t=this.api)?void 0:t.submitFormData(d,r,s,a));else switch(s){case"put":c=await(null==(e=this.api)?void 0:e.put(d,r,a));break;case"delete":c=await(null==(o=this.api)?void 0:o.delete(d,r,a));break;case"get":const t=new URLSearchParams;if(r)for(const e in r)t.append(e,r[e]);const s="?"+t.toString();c=await(null==(n=this.api)?void 0:n.get(d+s,a));break;default:c=await(null==(h=this.api)?void 0:h.post(d,r,a))}Di.hide(),c?c._sonic_http_response_&&!c._sonic_http_response_.ok&&1===Object.keys(c).length&&(c.messages=[{content:"Network Error",status:"error"}]):c={messages:[{content:"Network Error",status:"error"}]};const b=this.getAncestorAttributeValue("clearedDataOnSuccess");b&&b.split(" ").forEach((t=>l.get(t).set({})));const f=this.hasAttribute("usernameKey")?this.getAttribute("usernameKey"):"username",m=this.hasAttribute("passwordKey")?this.getAttribute("passwordKey"):"password";(null==(u=null==(p=this.api)?void 0:p.lastResult)?void 0:u.ok)&&r[f]&&r[m]&&this.saveCredentials(r[f],r[m]),this.submitResultKey&&(c=g.traverse(c,this.submitResultKey.split("."),!0));const v=this.getAncestorAttributeValue("submitResultDataProvider");v&&l.get(v).set(c),this.publisher&&(this.publisher.disabled=null)},u=(null==n?void 0:n.needsCaptchaValidation.get())?n:e.needsCaptchaValidation.get()?e:null;if(u){u.captchaMethod=s,u.captchaAction=(null==h?void 0:h.split("?")[0])??this.getAncestorAttributeValue("formDataProvider")??"submit",u.captchaToken="request_token";const t=e=>{"request_token"!=e&&""!=e&&(p(),u.captchaToken.offAssign(t))};u.captchaToken.onAssign(t)}else p()}async saveCredentials(t,e){if("PasswordCredential"in window){const s=new window.PasswordCredential({id:t,password:e});await navigator.credentials.store(s)}}render(){return pt`<div ?data-disabled=${this.disabled}><slot></slot></div>`}};qi.styles=x`
1119
- [data-disabled] {
1120
- opacity: 0.3;
1121
- pointer-events: none;
1122
- user-select: none;
1123
- }
1124
- `,Hi([F({type:String})],qi.prototype,"submitResultKey",2),Hi([F({type:Boolean})],qi.prototype,"disabled",2),Hi([F({type:String})],qi.prototype,"endPoint",2),Hi([F()],qi.prototype,"name",2),Hi([F()],qi.prototype,"value",2),qi=Hi([b("sonic-submit")],qi);var Wi=Object.defineProperty,Ki=Object.getOwnPropertyDescriptor,Zi=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Ki(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Wi(e,s,o),o};let Yi=class extends(fe(ye(Zt))){constructor(){super(...arguments),this.templateValueAttribute="data-route",this._location=document.location.href.replace(document.location.origin,"")}connectedCallback(){this.noShadowDom="",Pe.onChange(this),super.connectedCallback()}disconnectedCallback(){Pe.offChange(this),super.disconnectedCallback()}set location(t){this._location=t,this.requestUpdate()}get location(){return this._location}render(){const t=[];for(const s of this.templatePartsList){const i=s.getAttribute(this.templateValueAttribute)||"";if(new RegExp(i).test(this.location))t.push(s);else try{new Ue("(/)*"+i+"*").match(this.location)&&(s.setAttribute("mode","patternMatching"),t.push(s))}catch(e){-1!=this.location.indexOf(i.replace(document.location.origin,""))&&t.push(s)}}if(0==t.length){this.fallBackRoute&&this.isConnected&&(document.location.href=this.fallBackRoute);const e=this.templatePartsList.find((t=>t.hasAttribute("data-fallback")));e&&t.push(e)}return pt`${hs(t,((t,e)=>e+(new Date).getTime()),(t=>{var e;if(t.title&&(document.title=t.title),t.hasAttribute("dataProviderExpression")){let s="";const i=t.getAttribute("dataProviderExpression")||"";if("patternMatching"==t.getAttribute("mode")){const e=new Ue("(/)*"+(t.getAttribute(this.templateValueAttribute)||"")+"*");s=new Ue(i).stringify(e.match(this.location))}else{const r=new RegExp(t.getAttribute(this.templateValueAttribute)||""),o=(this.location+"").match(r);o&&(s=(null==(e=o.shift())?void 0:e.replace(r,i))||"")}return pt`<div style="display:contents" dataProvider="${s}">${fi(t)}</div>`}return fi(t)}))}`}};Zi([F({type:String})],Yi.prototype,"fallBackRoute",2),Zi([F()],Yi.prototype,"location",1),Yi=Zi([b("sonic-router")],Yi);var Gi=Object.defineProperty,Qi=Object.getOwnPropertyDescriptor;let Ji=class extends(fe(Zt)){connectedCallback(){this.noShadowDom="",this.style.display="none",super.connectedCallback(),this.udpateCallBack=()=>this.update(),this.publisher&&this.publisher.onInternalMutation(this.udpateCallBack)}disconnectedCallback(){this.publisher&&this.publisher.offInternalMutation(this.udpateCallBack),super.disconnectedCallback()}update(){if(this.hasAttribute("onAdded"))return void Pe.changeFromComponent(this);if(!this.props)return;const t=this.getAttribute("onData").split("."),e=g.traverse(this.props,t);!e||g.isObject(e)&&e||Pe.changeFromComponent(this)}};Ji=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Qi(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Gi(e,s,o),o})([b("sonic-redirect")],Ji);var Xi=Object.defineProperty,tr=Object.getOwnPropertyDescriptor,er=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?tr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Xi(e,s,o),o};let sr=class extends(fe(ye(Zt))){constructor(){super(...arguments),this.state="",this.inverted=!1,this.statePath="",this.onAssign=t=>{this.state=t,this.requestUpdate()}}connectedCallback(){if(this.noShadowDom="",super.connectedCallback(),this.hasAttribute("data-path")&&(this.statePath=this.getAttribute("data-path")),this.statePath){this.statePublisher=this.publisher;const t=this.statePath.split(".");for(const e of t)this.statePublisher=this.statePublisher[e];this.statePublisher.onAssign(this.onAssign)}}disconnectedCallback(){var t;this.statePath&&(null==(t=this.statePublisher)||t.offAssign(this.onAssign)),super.disconnectedCallback()}render(){const t=[];let e=this.state;(!Array.isArray(e)&&g.isObject(e)||void 0===e)&&(e="");for(const s of this.templatePartsList){let i=s.getAttribute(this.templateValueAttribute),r=e;this.inverted&&(r=i,i=e),""==i&&(i=this.inverted?".*?":"^$");if(new RegExp(i).test(r))t.push(s),s.removeAttribute("mode");else{const e=new Ue(i);e.names.length>0&&e.match(r)&&(s.setAttribute("mode","patternMatching"),t.push(s))}}return pt`${hs(t,((t,e)=>e+(new Date).getTime()),(t=>{var s;if(t.title&&(document.title=t.title),t.hasAttribute("dataProviderExpression")){const i=t.getAttribute("dataProviderExpression");let r="",o=e,n=t.getAttribute(this.templateValueAttribute);if(this.inverted&&(o=n,n=e),""==n&&(n=this.inverted?"*":"^$"),"patternMatching"==t.getAttribute("mode")){const t=new Ue(n);r=new Ue(i).stringify(t.match(o))}else{const t=new RegExp(n),e=(o+"").match(t);e&&(r=null==(s=e.shift())?void 0:s.replace(t,i))}return pt`<div style="display:contents" dataProvider="${r}">${fi(t)}</div>`}return fi(t)}))}`}};er([F()],sr.prototype,"state",2),er([F({type:Boolean,reflect:!0})],sr.prototype,"inverted",2),sr=er([b("sonic-states")],sr);var ir=Object.defineProperty,rr=Object.getOwnPropertyDescriptor;let or=class extends Zt{createRenderRoot(){return this}render(){return pt`<slot></slot>`}};or=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?rr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ir(e,s,o),o})([b("sonic-scope")],or);var nr=Object.defineProperty,ar=Object.getOwnPropertyDescriptor,lr=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?ar(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&nr(e,s,o),o};let cr=class extends(fe(Zt)){constructor(){super(...arguments),this.text="Example"}render(){return pt`<div>${this.text}</div>`}};lr([F()],cr.prototype,"text",2),cr=lr([b("sonic-example")],cr);const hr={checkbox:{tagName:"sonic-checkbox"},date:{tagName:"sonic-input",attributes:{type:"date"}},fieldset:{tagName:"sonic-fieldset",nodes:[{libraryKey:"formLayout"}],contentElementSelector:"sonic-form-layout"},managed_file:{tagName:"sonic-input",attributes:{variant:"ghost",type:"file"}},password:{tagName:"sonic-input",attributes:{type:"password"}},radio:{tagName:"sonic-radio"},select:{tagName:"sonic-select"},textarea:{tagName:"sonic-textarea"},textfield:{tagName:"sonic-input",attributes:{type:"text"}},hidden:{tagName:"sonic-input",attributes:{type:"hidden"}},button:{tagName:"sonic-button"},form:{tagName:"sonic-submit",attributes:{onEnterKey:!0}},submit:{tagName:"sonic-submit",attributes:{onClick:!0},contentElementSelector:"sonic-button",nodes:[{libraryKey:"button",attributes:{type:"success"},nodes:[{tagName:"sonic-icon",attributes:{name:"check",slot:"prefix"}}]}]},email:{tagName:"sonic-input",attributes:{type:"email"}},formItemContainer:{tagName:"div",attributes:{class:"form-item-container"}},formLayout:{tagName:"sonic-form-layout"},formActions:{tagName:"sonic-form-actions"},passwordHelper:{tagName:"sonic-password-helper"},sameValueHelper:{tagName:"sonic-same-value-helper"},divider:{tagName:"sonic-divider"}};class dr{async transform(t,e){if(this.sduiDescriptor=t,this.sduiDescriptor.library)for(const s in e.library)this.sduiDescriptor.library[s]=e.library[s];for(const s of e.transforms)this.transformAction(s)}transformAction(t){const e=this.getNodesMatchingPatterns(t.patterns,this.sduiDescriptor);this[t.action](t,e)}getNodesMatchingPatterns(t,e){if(!t)return[];if(!e)return[];const s=e.nodes;if(!s)return[];let i=[],r=0;for(const o of t)for(const t of s)this.nodeMatchesPattern(o,t)&&i.push({parent:e,child:t,index:r}),i=i.concat(this.getNodesMatchingPatterns([o],t)),r++;return i}stringMatchesExpression(t,e){return!e||t&&t.match(e)}nodeMatchesPattern(t,e){const s=t,i=e,r=["libraryKey","innerHTML","prefix","suffix","markup"];for(const a of r)if(!this.stringMatchesExpression(i[a],s[a]))return!1;const o=t.attributes,n=e.attributes;if(o&&!n)return!1;if(o)for(const a in o)if(!n||!this.stringMatchesExpression(n[a],o[a]))return!1;return!0}unwrap(t,e){var s,i;for(const r of e)null==(s=r.parent.nodes)||s.splice(r.parent.nodes.indexOf(r.child),1),r.child.nodes&&(null==(i=r.parent.nodes)||i.splice(r.parent.nodes.indexOf(r.child),0,...r.child.nodes))}wrap(t,e){var s,i,r,o,n,a;const l={...t.ui};l.nodes||(l.nodes=[]);let c=0;for(const d of e)null==(s=l.nodes)||s.push(d.child),c>0&&(null==(i=d.parent.nodes)||i.splice(d.parent.nodes.indexOf(d.child),1)),c++;const h=null==(o=null==(r=e[0])?void 0:r.parent.nodes)?void 0:o.indexOf(e[0].child);h&&(null==(n=e[0].parent.nodes)||n.splice(h,1),null==(a=e[0].parent.nodes)||a.splice(h,0,l))}move(t,e){var s,i;for(const r of e){null==(s=r.parent.nodes)||s.splice(r.parent.nodes.indexOf(r.child),1);let e=[];t.after&&(e=this.getNodesMatchingPatterns([t.after],this.sduiDescriptor)),t.before&&(e=this.getNodesMatchingPatterns([t.before],this.sduiDescriptor));const o=e[0];o&&(null==(i=o.parent.nodes)||i.splice(o.parent.nodes.indexOf(o.child)+(t.after?1:0),0,r.child))}}remap(t,e){var s,i,r;for(const o of e){const e={...t.ui};e.attributes||(e.attributes={});const n=o.child.attributes;if(n)for(const t in n)Object.prototype.hasOwnProperty.call(e.attributes,"key")||(e.attributes[t]=n[t]);const a=["libraryKey","innerHTML","prefix","suffix","markup"],l=o.child,c=e;for(const t of a)!Object.prototype.hasOwnProperty.call(e,t)&&l[t]&&(c[t]=l[t]);e.nodes||(e.nodes=[]);const h=o.child.nodes;if(h)for(const t of h)e.nodes.push(t);const d=(null==(s=o.parent.nodes)?void 0:s.indexOf(o.child))||-1;-1!=d&&(null==(i=o.parent.nodes)||i.splice(d,1),null==(r=o.parent.nodes)||r.splice(d,0,e))}}delete(t,e){var s;for(const i of e)null==(s=i.parent.nodes)||s.splice(i.parent.nodes.indexOf(i.child),1)}insert(t,e){var s;const i=t.after?"after":t.before?"before":"in";e=[],t.after?e=this.getNodesMatchingPatterns([t.after],this.sduiDescriptor):t.before?e=this.getNodesMatchingPatterns([t.before],this.sduiDescriptor):t.in&&(e=this.getNodesMatchingPatterns([t.in],this.sduiDescriptor));const r=e[0];r&&("in"==i?(r.child.nodes||(r.child.nodes=[]),r.child.nodes.push({...t.ui})):null==(s=r.parent.nodes)||s.splice(r.parent.nodes.indexOf(r.child)+("after"==i?1:0),0,{...t.ui}))}}var pr=Object.defineProperty,ur=Object.getOwnPropertyDescriptor,gr=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?ur(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&pr(e,s,o),o};let br=class extends(hi(gi(Zt))){constructor(){super(...arguments),this.sduiDescriptor={}}connectedCallback(){this.noShadowDom="",this.displayContents=!0,this.isFetchEnabled=this.hasAttribute("fetch"),super.connectedCallback()}willUpdate(t){null==this.props&&(this.sduiDescriptor={});{const t=this.sduiKey?this.props[this.sduiKey]:this.props;if(this.sduiDescriptor==t)return;this.sduiDescriptor=t,this.updateContents()}super.willUpdate(t)}async updateContents(){if(!this.sduiDescriptor)return;const t={};Object.assign(t,hr,this.sduiDescriptor.library),this.sduiDescriptor.library=t,this.loadAssets(),await this.loadLibrary(),await this.transformSDUIDescriptor(),this.parseRootNodes()}removeChildren(){for(;[...this.children].filter((t=>"SLOT"!=t.nodeName)).length>0;)this.removeChild(this.children[0])}loadAssets(){if(this.sduiDescriptor){if(this.sduiDescriptor.js)for(const t of this.sduiDescriptor.js)We.loadJS(t);if(this.sduiDescriptor.css)for(const t of this.sduiDescriptor.css)We.loadCSS(t)}}async transformSDUIDescriptor(){if(!this.hasAttribute("transformation"))return;const t=await fetch(this.getAttribute("transformation")),e=await t.json(),s=new dr;await s.transform(this.sduiDescriptor,e)}async loadLibrary(){if(!this.hasAttribute("library"))return;const t=await fetch(this.getAttribute("library")),e=await t.json();this.sduiDescriptor.library=e}parseRootNodes(){if(this.removeChildren(),!this.sduiDescriptor)return;let t=this.sduiDescriptor.nodes;t||(t=[]);const e={tagName:"sonic-toast-message-subscriber",attributes:{}};this.messagesKey&&(e.attributes={subDataProvider:this.messagesKey}),t.push(e),t.forEach((t=>this.appendChild(this.parseChild(t))))}parseChild(t){const e=t.tagName||"div";let{element:s,contentElement:i}=this.handleLibrary(t,e);if(this.handleAttributes(t,s),s=this.handleMarkup(t,s),i||(i=s),this.handleChildNodes(t,i,s),this.handleInnerHTML(t,i),t.prefix||t.suffix){return this.handlePrefixSuffix(t,s)}return s}handlePrefixSuffix(t,e){const s=document.createElement("div");return s.innerHTML=(t.prefix||"")+e.outerHTML+(t.suffix||""),s.style.display="contents",s}handleChildNodes(t,e,s){if(t.nodes){const i=t.nodes;for(const t of i){const i=this.parseChild(t);let r=e;if(t.parentElementSelector&&(r=s.querySelector(t.parentElementSelector)||e),r.shadowRoot)r.shadowRoot.appendChild(i);else if("template"==r.tagName.toLocaleLowerCase()){r.content.appendChild(i)}else r.appendChild(i)}}}handleLibrary(t,e){let s,i;if(t.libraryKey&&this.sduiDescriptor.library){s=this.parseChild(this.sduiDescriptor.library[t.libraryKey]||{tagName:"div"});const e=(this.sduiDescriptor.library[t.libraryKey]||{}).contentElementSelector;e&&(i=s.querySelector(e))}else s=document.createElement(e);return{element:s,contentElement:i}}handleAttributes(t,e){const s=t.attributes;for(const i in s){const t=s[i],r=Ze.isObject(t)?JSON.stringify(t):t;e.setAttribute(i,r)}}handleMarkup(t,e){return t.markup&&((e=document.createElement("div")).style.display="contents",e.innerHTML=t.markup),e}handleInnerHTML(t,e){var s;if(t.innerHTML)if(-1!=t.innerHTML.indexOf("wording_")){const i=this.getAncestorAttributeValue("wordingProvider");null==(s=this.api)||s.post(i,{labels:[t.innerHTML.substring(8)]}).then((t=>{e&&(e.innerHTML+=t)}))}else e&&(e.innerHTML+=t.innerHTML)}};gr([F()],br.prototype,"sduiKey",2),gr([F()],br.prototype,"messagesKey",2),br=gr([b("sonic-sdui")],br);var fr=Object.defineProperty,mr=Object.getOwnPropertyDescriptor,vr=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?mr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&fr(e,s,o),o};let yr=class extends(gi(Zt)){constructor(){super(...arguments),this._composition={},this.listeners=[]}get composition(){return this._composition}set composition(t){this._composition=t,this.updateComposition()}connectedCallback(){super.connectedCallback(),this.updateComposition()}disconnectedCallback(){this.removePublisherListeners(),super.disconnectedCallback()}updateComposition(){this.removePublisherListeners(),this.publisher&&(this.publisher.set({}),this.parseComposition(this.composition,this.publisher))}removePublisherListeners(){const t=this.listeners;this.listeners=[],t.forEach((t=>{this.publisher.offAssign(t.subscriber)}))}parseComposition(t,e){if(t)for(const s in t){const i=t[s];if("string"==typeof i){const t=i.split("."),r=t.shift();if(!r)continue;let o=Ge.get(r);o=Ze.traverse(o,t);const n={publisher:o,subscriber:t=>{e[s]=t}};this.listeners.push(n),o.onAssign(n.subscriber),e._proxies_.set(s,o)}else{this.publisher[s]={};const t=new n({},e);e._proxies_.set(s,t);const r={publisher:t,subscriber:t=>{e[s]=t}};this.listeners.push(r),t.onAssign(r.subscriber),this.parseComposition(i,t)}}}render(){return pt`<slot></slot>`}};yr.styles=[x`
1125
- :host {
1126
- display: contents;
1127
- }
1128
- `],vr([F({type:Object})],yr.prototype,"composition",1),yr=vr([b("sonic-mix")],yr);var wr=Object.defineProperty,xr=Object.getOwnPropertyDescriptor;let _r=class extends(gi(Zt)){connectedCallback(){this.setAttribute("subDataProvider",this.getAttribute("key")),super.connectedCallback()}render(){return"object"==typeof this.props||void 0===this.props?pt`<slot name="prefix"></slot><slot></slot><slot name="suffix"></slot>`:pt`${ne(this.props.toString())}<slot name="prefix"></slot><slot></slot
1129
- ><slot name="suffix"></slot>`}};_r=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?xr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&wr(e,s,o),o})([b("sonic-value")],_r);var kr=Object.defineProperty,Ar=Object.getOwnPropertyDescriptor,Pr=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Ar(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&kr(e,s,o),o};let Cr=class extends Zt{constructor(){super(...arguments),this.type="default",this.variant="default",this.ellipsis=!1}render(){return pt`
1130
- <slot name="prefix"></slot>
1131
- <slot></slot>
1132
- <slot name="suffix"></slot>
1133
- `}};Cr.styles=[rs,x`
1134
- :host {
1135
- --sc-badge-gap: 0.3em;
1136
- --sc-badge-py: 0.35em;
1137
- --sc-badge-px: 0.67em;
1138
- --sc-fs: 1rem;
1139
-
1140
- --sc-badge-color: var(--sc-base-content, #1f2937);
1141
- --sc-badge-bg: var(--sc-base-100, #e5e7eb);
1142
-
1143
- /*--sc-badge-border-with: var(--sc-form-border-width, 0.1rem);*/
1144
- --sc-badge-border-with: 1px;
1145
- --sc-badge-border-color: transparent;
1146
- --sc-badge-border: var(--sc-badge-border-with) solid var(--sc-badge-border-color);
1147
-
1148
- --sc-badge-rounded: 0.85em;
1149
- --sc-badge-fw: var(--sc-font-weight-base);
1150
-
1151
- display: inline-flex;
1152
- align-items: center;
1153
- box-sizing: border-box;
1154
- line-height: var(--sc-lh);
1155
- border-radius: var(--sc-badge-rounded);
1156
-
1157
- background: var(--sc-badge-bg);
1158
- color: var(--sc-badge-color);
1159
-
1160
- font-family: var(--sc-badge-ff, var(--sc-font-family-base, inherit));
1161
- font-weight: var(--sc-badge-fw);
1162
- line-height: 1;
1163
-
1164
- padding-top: var(--sc-badge-py);
1165
- padding-bottom: var(--sc-badge-py);
1166
- padding-left: var(--sc-badge-px);
1167
- padding-right: var(--sc-badge-px);
1168
- min-height: calc(var(--sc-badge-px) * 2);
1169
- border: var(--sc-badge-border);
1170
- -webkit-print-color-adjust: exact;
1171
- }
1172
-
1173
- /*TYPES*/
1174
- :host([type="primary"]) {
1175
- --sc-badge-color: var(--sc-primary-content);
1176
- --sc-badge-bg: var(--sc-primary);
1177
- }
1178
- :host([type="warning"]) {
1179
- --sc-badge-color: var(--sc-warning-content);
1180
- --sc-badge-bg: var(--sc-warning);
1181
- }
1182
- :host([type="danger"]) {
1183
- --sc-badge-color: var(--sc-danger-content);
1184
- --sc-badge-bg: var(--sc-danger);
1185
- }
1186
- :host([type="info"]) {
1187
- --sc-badge-color: var(--sc-info-content);
1188
- --sc-badge-bg: var(--sc-info);
1189
- }
1190
- :host([type="success"]) {
1191
- --sc-badge-color: var(--sc-success-content);
1192
- --sc-badge-bg: var(--sc-success);
1193
- }
1194
- :host([type="neutral"]) {
1195
- --sc-badge-color: var(--sc-base);
1196
- --sc-badge-bg: var(--sc-base-content);
1197
- }
1198
-
1199
- /*SIZE*/
1200
- :host {
1201
- font-size: var(--sc-fs);
1202
- gap: var(--sc-badge-gap);
1203
- }
1204
-
1205
- :host([size="2xs"]) {
1206
- --sc-badge-gap: 0.35em;
1207
- }
1208
- :host([size="xs"]) {
1209
- --sc-badge-gap: 0.35em;
1210
- }
1211
-
1212
- :host([size="sm"]) {
1213
- --sc-badge-gap: 0.35em;
1214
- }
1215
-
1216
- :host([size="lg"]) {
1217
- --sc-lh: 1.2;
1218
- --sc-badge-gap: 0.5em;
1219
- }
1220
-
1221
- :host([size="xl"]) {
1222
- --sc-lh: 1.2;
1223
- --sc-badge-gap: 0.5em;
1224
- }
1225
-
1226
- :host([contrast]) {
1227
- --sc-badge-color: var(--sc-contrast-content);
1228
- --sc-badge-bg: var(--sc-contrast);
1229
- }
1230
-
1231
- /*OUTLINE*/
1232
- :host([variant="outline"][type]) {
1233
- border-width: var(--sc-badge-border-with) !important;
1234
- border-color: var(--sc-badge-bg);
1235
- color: var(--sc-badge-bg);
1236
- background: transparent;
1237
- }
1238
-
1239
- :host([variant="outline"][type="default"]) {
1240
- border-color: var(--sc-base-400);
1241
- color: var(--sc-base-500);
1242
- background: transparent;
1243
- }
1244
-
1245
- /*GHOST*/
1246
- :host([variant="ghost"][type]) {
1247
- color: var(--sc-badge-bg);
1248
- background: transparent;
1249
- padding: 0;
1250
- }
1251
- @media (forced-colors: active) {
1252
- :host([variant="ghost"][type]) {
1253
- padding: var(--sc-badge-py) var(--sc-badge-px);
1254
- }
1255
- }
1256
-
1257
- :host([variant="ghost"][type="default"]) {
1258
- color: var(--sc-badge-color);
1259
- background: transparent;
1260
- }
1261
-
1262
- :host([ellipsis]) {
1263
- flex-wrap: nowrap;
1264
- white-space: nowrap;
1265
- max-width: 100%;
1266
- }
1267
- :host([ellipsis]) slot {
1268
- overflow: hidden;
1269
- display: block;
1270
- text-overflow: ellipsis;
1271
- white-space: nowrap;
1272
- max-width: 100%;
1273
- }
1274
-
1275
- slot[name="suffix"],
1276
- slot[name="prefix"] {
1277
- flex-shrink: 0;
1278
- }
1279
- `],Pr([F({type:String,reflect:!0})],Cr.prototype,"type",2),Pr([F({type:String,reflect:!0})],Cr.prototype,"variant",2),Pr([F({type:String,reflect:!0})],Cr.prototype,"size",2),Pr([F({type:Boolean,reflect:!0})],Cr.prototype,"ellipsis",2),Cr=Pr([b("sonic-badge")],Cr);class Sr{static fixBlankLink(t){const e="undefined"==typeof require?null:require("electron");"_blank"==t.target&&t.addEventListener("click",(()=>{null==e||e.shell.openExternal(t.href)}))}}var $r=Object.defineProperty,Or=Object.getOwnPropertyDescriptor,Dr=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Or(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&$r(e,s,o),o};let Lr=class extends Zt{constructor(){super(...arguments),this.href="",this._location="",this.ariaLabel=null,this.autoActive="partial",this._target=null,this.pushState=null}get location(){return this._location}set location(t){this._location=t,Pe.updateComponentActiveState(this)}connectedCallback(){this.href&&0!=this.href.indexOf("http")&&(Pe.onChange(this),this.location=document.location.href.replace(document.location.origin,"")),this.addEventListener("keypress",(t=>{var e,s;"Enter"===t.key&&(null==(s=null==(e=this.shadowRoot)?void 0:e.querySelector("a"))||s.click())})),this.setFocusable(),super.connectedCallback()}setFocusable(){this.href?this.setAttribute("tabIndex","0"):this.removeAttribute("tabIndex")}disconnectedCallback(){Pe.offChange(this),super.disconnectedCallback()}set target(t){this._target=t,Sr.fixBlankLink(this),this.requestUpdate()}get target(){return this._target}handlePushState(t){t.preventDefault(),Pe.changeFromComponent(this)}updated(t){t.has("href")&&this.setFocusable()}render(){return this.href?pt`
1280
- <a
1281
- href="${this.href}"
1282
- aria-label=${this.ariaLabel||gt}
1283
- target=${is(this.target)}
1284
- @click=${this.pushState?this.handlePushState:null}
1285
- >
1286
- <slot></slot>
1287
- </a>
1288
- `:pt`<slot></slot>`}};Lr.styles=[x`
1289
- a {
1290
- color: inherit;
1291
- text-decoration: none;
1292
- display: contents;
1293
- }
1294
- `],Dr([F({type:String})],Lr.prototype,"href",2),Dr([F({type:String,attribute:"data-aria-label"})],Lr.prototype,"ariaLabel",2),Dr([F({type:String})],Lr.prototype,"autoActive",2),Dr([F({type:String})],Lr.prototype,"target",1),Dr([F({type:Boolean})],Lr.prototype,"pushState",2),Lr=Dr([b("sonic-link")],Lr);var Er=Object.defineProperty,jr=Object.getOwnPropertyDescriptor,Mr=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?jr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Er(e,s,o),o};let Ir=class extends Zt{constructor(){super(...arguments),this.max=100,this.invert=!1,this.type="default",this.size="md"}render(){return pt`
1295
- <progress value=${is(this.value)} max=${this.max}></progress>
1296
- <div class="slot-container">
1297
- <slot></slot>
1298
- <slot name="remaining"></slot>
1299
- </div>
1300
- `}};Ir.styles=[rs,x`
1301
- :host {
1302
- --sc-progress-bg: var(--sc-input-bg, var(--sc-base-100, #f5f5f5));
1303
- --sc-progress-color: var(--sc-base-content, #1f2937);
1304
- --sc-progress-height: 0.6em;
1305
- --sc-progress-fs: var(--sc-fs, 1rem);
1306
- --sc-progress-fw: 500;
1307
- --sc-progress-rounded: var(--sc-rounded-lg);
1308
- display: block;
1309
- line-height: 1.2;
1310
- font-weight: var(--sc-progress-fw);
1311
- font-size: var(--sc-progress-fs);
1312
- }
1313
-
1314
- progress {
1315
- position: relative;
1316
- width: 100%;
1317
- -webkit-appearance: none;
1318
- appearance: none;
1319
- overflow: hidden;
1320
- border: none;
1321
- height: var(--sc-progress-height);
1322
- border-radius: var(--sc-progress-rounded);
1323
- background-color: var(--sc-progress-bg);
1324
- color: var(--sc-progress-color);
1325
- }
1326
- progress::-moz-progress-bar {
1327
- background-color: var(--sc-progress-color);
1328
- border-radius: var(--sc-progress-rounded);
1329
- }
1330
-
1331
- progress:not([value])::-moz-progress-bar {
1332
- background-color: var(--sc-progress-bg);
1333
- }
1334
-
1335
- progress::-webkit-progress-bar {
1336
- background-color: var(--sc-progress-bg);
1337
- }
1338
- progress::-webkit-progress-value {
1339
- background-color: var(--sc-progress-color);
1340
- border-radius: var(--sc-progress-rounded);
1341
- }
1342
-
1343
- /* Indeterminate */
1344
- progress:indeterminate:after {
1345
- background-color: var(--sc-progress-color);
1346
- content: "";
1347
- position: absolute;
1348
- top: 0;
1349
- bottom: 0;
1350
- left: -40%;
1351
- width: 33.333333%;
1352
- border-radius: var(--sc-progress-rounded);
1353
- animation: progress-loading 3s infinite ease-in-out;
1354
- }
1355
-
1356
- @keyframes progress-loading {
1357
- 50% {
1358
- left: 107%;
1359
- }
1360
- }
1361
-
1362
- /* COLOR TYPES */
1363
- :host([type="warning"]) {
1364
- --sc-progress-color: var(--sc-warning);
1365
- }
1366
- :host([type="danger"]) {
1367
- --sc-progress-color: var(--sc-danger);
1368
- }
1369
- :host([type="info"]) {
1370
- --sc-progress-color: var(--sc-info);
1371
- }
1372
- :host([type="success"]) {
1373
- --sc-progress-color: var(--sc-success);
1374
- }
1375
-
1376
- :host([invert]) {
1377
- --sc-progress-bg: rgba(200, 200, 200, 0.1);
1378
- }
1379
-
1380
- :host([type="default"][invert]) {
1381
- --sc-progress-color: var(--sc-base);
1382
- }
1383
-
1384
- slot[name="remaining"] {
1385
- font-weight: var(--sc-font-weight-base);
1386
- font-size: 0.85em;
1387
- margin-top: 0.5em;
1388
- }
1389
- slot[name="remaining"]::slotted(*) {
1390
- margin-left: auto;
1391
- }
1392
-
1393
- slot:not([name]) {
1394
- color: var(--sc-progress-color);
1395
- }
1396
-
1397
- .slot-container {
1398
- display: flex;
1399
- justify-content: space-between;
1400
- gap: 0.5em;
1401
- margin-top: 0.15em;
1402
- }
1403
- `],Mr([F({type:Number})],Ir.prototype,"value",2),Mr([F({type:Number})],Ir.prototype,"max",2),Mr([F({type:Boolean})],Ir.prototype,"invert",2),Mr([F({type:String,reflect:!0})],Ir.prototype,"type",2),Mr([F({type:String,reflect:!0})],Ir.prototype,"size",2),Ir=Mr([b("sonic-progress")],Ir);const Tr=x`
1404
- .password-toggle {
1405
- color: var(--sc-input-c);
1406
- font-size: var(--sc-input-fs);
1407
- cursor: pointer;
1408
- margin-right: calc(-0.5 * var(--sc-input-px));
1409
- }
1410
-
1411
- :host([inlineContent]) .has-suffix .password-toggle {
1412
- margin-right: 0;
1413
- }
1414
- `,Nr=x`
1415
- :host {
1416
- --sc-label-fs: var(--sc-fs, 1rem);
1417
- --sc-label-fw: var(--sc-label-font-weight);
1418
- }
1419
- label {
1420
- font-size: var(--sc-label-fs);
1421
- font-weight: var(--sc-label-fw);
1422
- line-height: 1.2;
1423
- }
1424
- .form-label {
1425
- margin-bottom: 0.22em;
1426
- display: block;
1427
- }
1428
- `,zr=x`
1429
- .form-description {
1430
- color: var(--sc-base-400);
1431
- font-size: 0.85em;
1432
- margin-top: 0.2em;
1433
- display: block;
1434
- }
1435
- `,Rr=x`
1436
- * {
1437
- box-sizing: border-box;
1438
- }
1439
-
1440
- :host {
1441
- --sc-input-height: var(--sc-form-height);
1442
- --sc-input-c: var(--sc-input-color, var(--sc-base-content));
1443
- --sc-input-b-width: var(--sc-form-border-width);
1444
- --sc-input-b-color: var(--sc-input-border-color);
1445
-
1446
- --sc-item-rounded-tr: var(--sc-input-rounded);
1447
- --sc-item-rounded-tl: var(--sc-input-rounded);
1448
- --sc-item-rounded-bl: var(--sc-input-rounded);
1449
- --sc-item-rounded-br: var(--sc-input-rounded);
1450
-
1451
- --sc-input-fs: var(--sc-fs, 1rem);
1452
- --sc-input-ff: inherit;
1453
- --sc-input-py: 0.55em;
1454
- --sc-input-px: clamp(0.3em, 8%, 1.1em);
1455
-
1456
- --sc-input-background: var(--sc-input-bg);
1457
- --sc-input-addon-c: var(--sc-input-addon-color, var(--sc-base));
1458
- --sc-input-addon-bg: var(--sc-input-c);
1459
- }
1460
-
1461
- .form-element {
1462
- display: block;
1463
- flex-grow: 1;
1464
- width: 100%;
1465
-
1466
- line-height: 1.1;
1467
- color: var(--sc-input-c);
1468
- border-radius: var(--sc-item-rounded-tl) var(--sc-item-rounded-tr) var(--sc-item-rounded-br) var(--sc-item-rounded-bl);
1469
-
1470
- font-family: var(--sc-input-ff);
1471
- background-color: var(--sc-input-background);
1472
- border: var(--sc-input-b-width) solid var(--sc-input-b-color, var(--sc-base-300, #aaa));
1473
- width: 100%;
1474
- font-size: var(--sc-input-fs);
1475
-
1476
- padding-top: var(--sc-input-py);
1477
- padding-bottom: var(--sc-input-py);
1478
- padding-left: var(--sc-input-px);
1479
- padding-right: var(--sc-input-px);
1480
-
1481
- transition:
1482
- border-color 0.15s ease-in-out,
1483
- color 0.15s ease-in-out,
1484
- box-shadow 0.15s ease-in-out;
1485
- min-height: var(--sc-input-height);
1486
- }
1487
-
1488
- .form-control {
1489
- display: flex;
1490
- width: 100%;
1491
- }
1492
-
1493
- /*Suffix*/
1494
- :host(:not([inlineContent])) .has-suffix slot[name="suffix"],
1495
- :host(:not([inlineContent])) .has-prefix slot[name="prefix"] {
1496
- min-width: var(--sc-input-height);
1497
- box-sizing: border-box;
1498
- display: flex;
1499
- align-items: center;
1500
- justify-content: center;
1501
- line-height: 1.1;
1502
- flex-shrink: 0;
1503
- border: var(--sc-input-b-width) solid transparent;
1504
- padding-left: clamp(0.25em, 3%, calc(0.33 * var(--sc-input-px)));
1505
- padding-right: clamp(0.25em, 3%, calc(0.33 * var(--sc-input-px)));
1506
- }
1507
-
1508
- :host(:not([inlineContent])) slot[name="prefix"] {
1509
- border-radius: var(--sc-item-rounded-tl) 0 0 var(--sc-item-rounded-bl);
1510
- background-color: var(--sc-input-addon-bg);
1511
- color: var(--sc-input-addon-c);
1512
- /*margin-right: calc(-1 * var(--sc-input-b-width));
1513
- border: none;*/
1514
- }
1515
-
1516
- :host(:not([inlineContent])) slot[name="suffix"] {
1517
- border-radius: 0 var(--sc-item-rounded-tr) var(--sc-item-rounded-br) 0;
1518
- background-color: var(--sc-input-addon-bg);
1519
- color: var(--sc-input-addon-c);
1520
- /*margin-left: calc(-1 * var(--sc-input-b-width));
1521
- border: none;*/
1522
- }
1523
-
1524
- :host(:not([inlineContent])[disabled]) .has-suffix slot[name="suffix"],
1525
- :host(:not([inlineContent])[disabled]) .has-prefix slot[name="prefix"] {
1526
- opacity: 0.43;
1527
- }
1528
-
1529
- :host(:not([inlineContent])) .has-prefix .form-element {
1530
- border-top-left-radius: 0;
1531
- border-bottom-left-radius: 0;
1532
- }
1533
-
1534
- :host(:not([inlineContent])) .has-suffix .form-element {
1535
- border-top-right-radius: 0;
1536
- border-bottom-right-radius: 0;
1537
- }
1538
-
1539
- slot[name="suffix"]::slotted(sonic-icon),
1540
- slot[name="prefix"]::slotted(sonic-icon) {
1541
- font-size: 1.2em;
1542
- }
1543
-
1544
- /*InlineCONTENT */
1545
-
1546
- .form-element > slot,
1547
- .form-element .form-element {
1548
- all: unset;
1549
- }
1550
-
1551
- :host([inlineContent]) .form-element {
1552
- display: flex;
1553
- align-items: center;
1554
- gap: 0.35em;
1555
- min-height: var(--sc-form-height);
1556
- }
1557
-
1558
- :host([inlineContent]) .form-element .form-element {
1559
- appearance: none;
1560
- background: transparent;
1561
- border: none;
1562
- padding: 0;
1563
- display: block;
1564
- width: 50%;
1565
- min-width: 0;
1566
- flex: 1 1 auto;
1567
- height: auto;
1568
- min-height: auto;
1569
- border-radius: 0;
1570
- }
1571
- :host([inlineContent]) slot[name="prefix"]::slotted(*),
1572
- :host([inlineContent]) slot[name="suffix"]::slotted(*) {
1573
- display: block;
1574
- flex: 0 0 auto;
1575
- max-width: 100%;
1576
- max-width: 100%;
1577
- white-space: nowrap;
1578
- }
1579
-
1580
- :host([inlineContent]) .has-suffix slot[name="suffix"] {
1581
- margin-right: calc(-0.5 * var(--sc-input-px));
1582
- }
1583
- :host([inlineContent]) .has-prefix slot[name="prefix"] {
1584
- margin-left: calc(-0.5 * var(--sc-input-px));
1585
- }
1586
-
1587
- :host([inlineContent]) slot[name="suffix"]::slotted(*) {
1588
- margin-left: auto;
1589
- }
1590
-
1591
- :host([inlineContent]) .no-suffix slot[name="suffix"],
1592
- :host([inlineContent]) .no-prefix slot[name="prefix"] {
1593
- display: none;
1594
- }
1595
-
1596
- /* :host([inlineContent]) .input {
1597
-
1598
- }*/
1599
- /*Disabled */
1600
- :host([disabled]) .form-control {
1601
- cursor: not-allowed;
1602
- }
1603
-
1604
- :host([variant="ghost"]) .form-element {
1605
- --sc-input-bg: transparent;
1606
- }
1607
-
1608
- /*Disbaled*/
1609
- :host([disabled]) .form-element {
1610
- pointer-events: none;
1611
- opacity: 0.43;
1612
- /* border-color: transparent;*/
1613
- }
1614
- :host([disabled]) .select-chevron {
1615
- display: none;
1616
- /* border-color: transparent;*/
1617
- }
1618
-
1619
- /*PLACEHOLDER*/
1620
- ::placeholder {
1621
- color: inherit;
1622
- opacity: 0.45;
1623
- }
1624
-
1625
- :host([placehoderAsLabel]) ::placeholder {
1626
- opacity: 1;
1627
- }
1628
-
1629
- :focus::placeholder {
1630
- opacity: 0 !important;
1631
- }
1632
-
1633
- /*HOVER*/
1634
- :host(:not([disabled])) .form-element:hover,
1635
- .form-element:focus-visible,
1636
- .form-element:focus {
1637
- filter: brightness(0.97);
1638
- outline: none;
1639
- }
1640
-
1641
- .form-label {
1642
- margin-bottom: 0.22em;
1643
- display: block;
1644
- }
1645
-
1646
- .form-description {
1647
- color: var(--sc-base-400);
1648
- font-size: 0.85em;
1649
- margin-top: 0.2em;
1650
- display: block;
1651
- }
1652
-
1653
- /*Utilitaires*/
1654
- .hidden {
1655
- display: none;
1656
- }
1657
- .contents {
1658
- display: contents;
1659
- }
1660
-
1661
- /*ERROR*/
1662
- :host([error]) {
1663
- --sc-input-b-color: var(--sc-danger);
1664
- }
1665
-
1666
- :host input:visited {
1667
- display: none;
1668
- }
1669
-
1670
- :host([touched][required]) :not(:focus):invalid {
1671
- --sc-input-b-color: var(--sc-danger);
1672
- --sc-input-c: var(--sc-danger);
1673
- }
1674
-
1675
- :host([touched][required]) :not(:focus):invalid + .select-chevron {
1676
- --sc-input-c: var(--sc-danger);
1677
- }
1678
-
1679
- /*VALID*/
1680
- :host([touched][required]) :not([value=""]):not(:focus):valid {
1681
- --sc-input-b-color: var(--sc-success);
1682
- --sc-input-c: var(--sc-success);
1683
- }
1684
-
1685
- :host([touched][required]) :not(:focus):valid + .select-chevron {
1686
- --sc-input-c: var(--sc-success);
1687
- }
1688
-
1689
- /*Input COLOR*/
1690
- :host([type="color"]) .form-element {
1691
- padding: 0;
1692
- border: 0;
1693
- min-width: var(--sc-input-height);
1694
- }
1695
- input[type="color"]::-webkit-color-swatch-wrapper {
1696
- padding: 0;
1697
- }
1698
- input[type="color"]::-webkit-color-swatch {
1699
- border: none;
1700
- border-radius: var(--sc-item-rounded-tl) var(--sc-item-rounded-tr) var(--sc-item-rounded-br) var(--sc-item-rounded-bl);
1701
- }
1702
-
1703
- /*Input Image*/
1704
- :host([type="image"]) .form-element {
1705
- padding: 0;
1706
- border: none;
1707
- }
1708
-
1709
- /*Input reset & image*/
1710
- input[type="reset"],
1711
- input[type="submit"] {
1712
- cursor: pointer;
1713
- }
1714
-
1715
- /*Input search*/
1716
- :host([type="search"]) {
1717
- appearance: none !important;
1718
- }
1719
-
1720
- input[type="search"]::-webkit-search-cancel-button {
1721
- appearance: none;
1722
- cursor: pointer;
1723
- height: 0.65em;
1724
- width: 0.65em;
1725
- background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pg0KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE2LjAuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPg0KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCINCgkgd2lkdGg9IjEyMy4wNXB4IiBoZWlnaHQ9IjEyMy4wNXB4IiB2aWV3Qm94PSIwIDAgMTIzLjA1IDEyMy4wNSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMTIzLjA1IDEyMy4wNTsiDQoJIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPGc+DQoJPHBhdGggZD0iTTEyMS4zMjUsMTAuOTI1bC04LjUtOC4zOTljLTIuMy0yLjMtNi4xLTIuMy04LjUsMGwtNDIuNCw0Mi4zOTlMMTguNzI2LDEuNzI2Yy0yLjMwMS0yLjMwMS02LjEwMS0yLjMwMS04LjUsMGwtOC41LDguNQ0KCQljLTIuMzAxLDIuMy0yLjMwMSw2LjEsMCw4LjVsNDMuMSw0My4xbC00Mi4zLDQyLjVjLTIuMywyLjMtMi4zLDYuMSwwLDguNWw4LjUsOC41YzIuMywyLjMsNi4xLDIuMyw4LjUsMGw0Mi4zOTktNDIuNGw0Mi40LDQyLjQNCgkJYzIuMywyLjMsNi4xLDIuMyw4LjUsMGw4LjUtOC41YzIuMy0yLjMsMi4zLTYuMSwwLTguNWwtNDIuNS00Mi40bDQyLjQtNDIuMzk5QzEyMy42MjUsMTcuMTI1LDEyMy42MjUsMTMuMzI1LDEyMS4zMjUsMTAuOTI1eiIvPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPC9zdmc+DQo=);
1726
- background-size: contain;
1727
- background-repeat: no-repeat;
1728
- }
1729
-
1730
- /* Text align */
1731
- :host([align="center"]) .form-element {
1732
- text-align: center;
1733
- }
1734
- :host([align="left"]) .form-element {
1735
- text-align: left;
1736
- }
1737
- :host([align="right"]) .form-element {
1738
- text-align: right;
1739
- }
1740
-
1741
- /* No arrows ion input Number */
1742
- :host([noAppearance]) input[type="number"]::-webkit-outer-spin-button,
1743
- :host([noAppearance]) input[type="number"]::-webkit-inner-spin-button {
1744
- -webkit-appearance: none;
1745
- margin: 0;
1746
- }
1747
-
1748
- :host([noAppearance]) input[type="number"] {
1749
- -moz-appearance: textfield !important;
1750
- }
1751
-
1752
- /*type color "default" | "success" | "error" | "warning" | "info" */
1753
- :host([status="success"]) {
1754
- --sc-input-b-color: var(--sc-success);
1755
- --sc-input-c: var(--sc-success);
1756
- --sc-input-addon-bg: var(--sc-success);
1757
- --sc-input-addon-color: var(--sc-success-content);
1758
- }
1759
- :host([status="error"]) {
1760
- --sc-input-b-color: var(--sc-danger);
1761
- --sc-input-c: var(--sc-danger);
1762
- --sc-input-addon-bg: var(--sc-danger);
1763
- --sc-input-addon-color: var(--sc-danger-content);
1764
- }
1765
- :host([status="warning"]) {
1766
- --sc-input-b-color: var(--sc-warning);
1767
- --sc-input-c: var(--sc-warning);
1768
- --sc-input-addon-bg: var(--sc-warning);
1769
- --sc-input-addon-color: var(--sc-warning-content);
1770
- }
1771
- :host([status="info"]) {
1772
- --sc-input-b-color: var(--sc-info);
1773
- --sc-input-c: var(--sc-info);
1774
- --sc-input-addon-bg: var(--sc-info);
1775
- --sc-input-addon-color: var(--sc-info-content);
1776
- }
1777
- `
1778
- /**
1779
- * @license
1780
- * Copyright 2018 Google LLC
1781
- * SPDX-License-Identifier: BSD-3-Clause
1782
- */,Fr=Rt(class extends Ft{constructor(t){var e;if(super(t),t.type!==Nt||"class"!==t.name||(null==(e=t.strings)?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){var s,i;if(void 0===this.it){this.it=new Set,void 0!==t.strings&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null==(s=this.st)?void 0:s.has(t))&&this.it.add(t);return this.render(e)}const r=t.element.classList;for(const o of this.it)o in e||(r.remove(o),this.it.delete(o));for(const o in e){const t=!!e[o];t===this.it.has(o)||(null==(i=this.st)?void 0:i.has(o))||(t?(r.add(o),this.it.add(o)):(r.remove(o),this.it.delete(o)))}return ut}});var Ur=Object.defineProperty,Vr=Object.getOwnPropertyDescriptor,Br=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Vr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Ur(e,s,o),o};let Hr=class extends(ci(je(fe(Zt)))){constructor(){super(...arguments),this.readonly=!1,this.inlineContent=!1,this.disableInlineContentFocus=!1,this.showPasswordToggle=!1,this.hasDescription=!1,this.hasLabel=!1,this.hasSuffix=!1,this.hasPrefix=!1,this.isPassword=!1}connectedCallback(){if(super.connectedCallback(),this.hasSlotOrProps(),this.hasAttribute("sameValueAs")){this.sameValueAsName=this.getAttribute("sameValueAs"),this.sameValueAsHandle=t=>this.pattern=this.escapeRegExp(t);const t=this.getFormPublisher();if(!t)return;t[this.sameValueAsName].onAssign(this.sameValueAsHandle)}"password"==this.type&&(this.isPassword=!0,this.showPasswordToggle=!0,this.inlineContent=!0)}disconnectedCallback(){if(super.disconnectedCallback(),this.hasAttribute("sameValueAs")&&this.sameValueAsName){const t=this.getFormPublisher();if(!t)return;t[this.sameValueAsName].offAssign(this.sameValueAsHandle)}}escapeRegExp(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}willUpdate(t){this.hasSlotOrProps(),super.willUpdate(t)}setSelectionRange(t,e){this.input.setSelectionRange(t,e)}hasSlotOrProps(){var t,e,s,i;this.hasLabel=!(!this.label&&!(null==(t=this.slotLabelNodes)?void 0:t.length)),this.hasDescription=!(!this.description&&!(null==(e=this.slotDescriptionNodes)?void 0:e.length)),this.hasSuffix=!!(null==(s=this.slotSuffixNodes)?void 0:s.length),this.hasPrefix=!!(null==(i=this.slotPrefixNodes)?void 0:i.length)}inlineContentFocus(){var t;this.inlineContent&&!this.disableInlineContentFocus&&(null==(t=this.input)||t.focus())}handleChange(t){this.hasAttribute("inputDelayMs")?(this.changeTimeoutId&&clearTimeout(this.changeTimeoutId),this.changeTimeoutId=setTimeout((()=>super.handleChange(t)),parseInt(this.getAttribute("inputDelayMs")))):super.handleChange(t)}togglePasswordVisibility(){this.isPassword=!this.isPassword,this._type=this.isPassword?"password":"text"}render(){const t={"has-prefix":this.hasPrefix,"has-suffix":this.hasSuffix,"no-suffix":!this.hasSuffix,"no-prefix":!this.hasPrefix};return pt`
1783
- <label for="${this.id||"form-element"}" class="${this.hasLabel?"form-label":"hidden"}"
1784
- >${this.label?ne(this.label):""}<slot
1785
- name="label"
1786
- @slotchange=${this.hasSlotOrProps}
1787
- ></slot
1788
- ></label>
1789
-
1790
- <div @click=${this.inlineContentFocus} class="form-control ${Fr(t)}">
1791
- <div part="content" class="${this.inlineContent?"form-element form-element-wrapper":"contents"}">
1792
- <slot name="prefix" @slotchange=${this.hasSlotOrProps}></slot>
1793
- <input
1794
- part="input"
1795
- id=${is(this.id||"form-element")}
1796
- part="input"
1797
- class="form-element input"
1798
- @input=${this.handleChange}
1799
- @blur=${this.handleBlur}
1800
- type=${this.type}
1801
- disabled=${is(this.disabled)}
1802
- ?readonly=${this.readonly}
1803
- ?autofocus=${this.autofocus}
1804
- list=${is(this.list)}
1805
- tabindex=${is(this.tabindex)}
1806
- pattern=${is(this.pattern)}
1807
- min=${is(this.min)}
1808
- max=${is(this.max)}
1809
- step=${is(this.step)}
1810
- src=${is(this.src)}
1811
- minlength=${is(this.minlength)}
1812
- maxlength=${is(this.maxlength)}
1813
- placeholder=${is(this.placeholder)}
1814
- required=${is(this.required)}
1815
- autocomplete=${is(this.autocomplete)}
1816
- aria-label=${is(this.ariaLabel)}
1817
- aria-labelledby=${is(this.ariaLabelledby)}
1818
- .name=${this.name}
1819
- .value=${this.value}
1820
- />
1821
- ${this.showPasswordToggle?pt`<sonic-button
1822
- shape="circle"
1823
- class="password-toggle"
1824
- @click=${this.togglePasswordVisibility}
1825
- aria-label="Toggle password visibility"
1826
- variant="unstyled"
1827
- >
1828
- <sonic-icon library="heroicons" name=${this.isPassword?"eye":"eye-slash"}></sonic-icon>
1829
- </sonic-button>`:""}
1830
- <slot name="suffix" @slotchange=${this.hasSlotOrProps}></slot>
1831
- </div>
1832
- </div>
1833
-
1834
- <!-- le slot ne doit pas avoir d'espace-->
1835
- <slot
1836
- name="description"
1837
- @slotchange=${this.hasSlotOrProps}
1838
- class="${this.hasDescription?"form-description":"hidden"}"
1839
- >${this.description?pt`${ne(this.description)}`:gt}</slot>
1840
- <slot name="list"></slot>
1841
- </div>
1842
- `}};Hr.styles=[rs,Rr,Nr,zr,Tr,x`
1843
- :host([type="hidden"]) {
1844
- appearance: none !important;
1845
- display: none !important;
1846
- }
1847
- :host > .form-control {
1848
- position: relative;
1849
- }
1850
- `],Br([F({type:String,reflect:!0})],Hr.prototype,"size",2),Br([F({type:String})],Hr.prototype,"list",2),Br([F({type:String})],Hr.prototype,"placeholder",2),Br([F({type:String})],Hr.prototype,"pattern",2),Br([F({type:String})],Hr.prototype,"min",2),Br([F({type:String})],Hr.prototype,"max",2),Br([F({type:Boolean})],Hr.prototype,"readonly",2),Br([F({type:Number})],Hr.prototype,"step",2),Br([F({type:Number})],Hr.prototype,"minlength",2),Br([F({type:Number})],Hr.prototype,"maxlength",2),Br([F({type:String})],Hr.prototype,"src",2),Br([F({type:Boolean,reflect:!0})],Hr.prototype,"inlineContent",2),Br([F({type:Boolean})],Hr.prototype,"disableInlineContentFocus",2),Br([F({type:Boolean})],Hr.prototype,"showPasswordToggle",2),Br([q({slot:"label",flatten:!0})],Hr.prototype,"slotLabelNodes",2),Br([q({slot:"description",flatten:!0})],Hr.prototype,"slotDescriptionNodes",2),Br([q({slot:"suffix",flatten:!0})],Hr.prototype,"slotSuffixNodes",2),Br([q({slot:"prefix",flatten:!0})],Hr.prototype,"slotPrefixNodes",2),Br([B("input")],Hr.prototype,"input",2),Br([U()],Hr.prototype,"hasDescription",2),Br([U()],Hr.prototype,"hasLabel",2),Br([U()],Hr.prototype,"hasSuffix",2),Br([U()],Hr.prototype,"hasPrefix",2),Br([U()],Hr.prototype,"isPassword",2),Hr=Br([b("sonic-input")],Hr);var qr=Object.defineProperty,Wr=Object.getOwnPropertyDescriptor,Kr=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Wr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&qr(e,s,o),o};let Zr=class extends Zt{constructor(){super(...arguments),this.open=!1,this.noToggle=!1,this.inline=!1,this.shadow="lg",this.placement="bottom",this.positioningRuns=!1,this.lastContentX=0,this.lastContentY=0,this.resizeObserver=new ResizeObserver((()=>this.computePosition(this.placement))),this.ancestorsHavingZIndex=new Set}runPositioningLoop(){this.positioningRuns&&(this.positioningRuns=!0,this.computePosition(this.placement),window.requestAnimationFrame((()=>this.runPositioningLoop())))}toggle(t){if(this.open&&this.noToggle)return;const e=t;("keydown"!=t.type||"ArrowDown"==e.key&&!this.open)&&(this.open=!this.open,this.open?this.show():this.hide())}show(){this.setMaxZindex(),this.popContent.style.removeProperty("display"),this.open=!0,this.popContent.setAttribute("tabindex","0"),this.popBtn&&this.popContent&&!this.positioningRuns&&(this.positioningRuns=!0,this.lastContentX=0,this.lastContentY=0,this.runPositioningLoop()),this.dispatchEvent(new CustomEvent("show"))}hide(){this.resetZindexes(),this.open=!1,this.popContent.setAttribute("tabindex","-1"),this.positioningRuns=!1,this.dispatchEvent(new CustomEvent("hide"))}setMaxZindex(){s.everyAncestors(this,(t=>{const e=t;if(!e.className)return!0;if([...e.classList].includes("@container")){const s=e.style;s.zIndex="999999999";const i=getComputedStyle(e);return"relative"!==i.position&&"absolute"!==i.position&&(s.position="relative"),this.ancestorsHavingZIndex.add(t),!1}return!0}))}resetZindexes(){this.ancestorsHavingZIndex.forEach((t=>{t.style.removeProperty("position"),t.style.removeProperty("z-index")})),this.ancestorsHavingZIndex.clear()}_handleClosePop(t){const e=t.composedPath(),i=e[0];Zr.pops.forEach((r=>{const o=e.includes(r),n=e.includes(r.querySelector('[slot="content"]')),a="keep"===s.getAncestorAttributeValue(i,"data-on-select");"pointerdown"==t.type&&o||"click"==t.type&&(o&&a||!n)||r.hide()}))}connectedCallback(){super.connectedCallback(),0==Zr.pops.size&&(document.addEventListener("pointerdown",this._handleClosePop),document.addEventListener("click",this._handleClosePop)),Zr.pops.add(this)}firstUpdated(t){super.firstUpdated(t),this.resizeObserver.observe(this.popContent)}disconnectedCallback(){super.disconnectedCallback(),Zr.pops.delete(this),0==Zr.pops.size&&(document.removeEventListener("pointerdown",this._handleClosePop),document.removeEventListener("click",this._handleClosePop)),this.resizeObserver.unobserve(this.popContent)}computePosition(t){var e,s,i;let r=null==(e=this.popContent)?void 0:e.getBoundingClientRect();const o=this.getBoundingClientRect(),n=o.left,a=o.top;let l=n,c=a;const h=a-r.height-8,d=n-r.width-8,p=n+o.width+8,u=a+o.height+8;switch(t){case"bottom":c=u;break;case"top":c=h;break;case"left":l=d;break;case"right":l=p}this.lastContentX+=l-r.x,this.lastContentY+=c-r.y,Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`}),r=null==(s=this.popContent)?void 0:s.getBoundingClientRect(),r.x<5&&"left"==t&&(l=p),r.y<5&&"top"==t&&(c=u),r.x+r.width>window.innerWidth-5&&"right"==t&&(l=d),r.y+r.height>window.innerHeight-5&&"bottom"==t&&(c=h),this.lastContentX+=l-r.x,this.lastContentY+=c-r.y,Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`}),r=null==(i=this.popContent)?void 0:i.getBoundingClientRect(),r.x<0&&(this.lastContentX+=-r.x),r.y<0&&(this.lastContentY+=-r.y),r.x+r.width>window.innerWidth&&(this.lastContentX+=window.innerWidth-(r.x+r.width)),r.y+r.height>window.innerHeight&&(this.lastContentY+=window.innerHeight-(r.y+r.height)),Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`})}render(){return pt`
1851
- <slot @click=${this.toggle} @keydown=${this.toggle} class="contents"></slot>
1852
- <slot
1853
- name="content"
1854
- tabindex="-1"
1855
- part="content"
1856
- style="display: none;"
1857
- class="
1858
- ${this.open?"is-open":""}"
1859
- ></slot>
1860
- `}};Zr.pops=new Set,Zr.styles=[x`
1861
- :host {
1862
- display: inline-block;
1863
- vertical-align: middle;
1864
- }
1865
- slot[name="content"] {
1866
- max-width: 80vw;
1867
- background-color: var(--sc-base);
1868
- position: fixed;
1869
- z-index: 99999;
1870
- display: block;
1871
- transform: translateY(1rem) scale(0.95);
1872
- opacity: 0;
1873
- pointer-events: none;
1874
- transition-duration: 0.15s;
1875
- transition-timing-function: ease;
1876
- transition-property: all;
1877
- border-radius: min(calc(var(--sc-btn-rounded) * 2), 0.4em);
1878
- }
1879
-
1880
- slot[name="content"].is-open:not(.is-empty) {
1881
- transform: translateY(0) scale(1);
1882
- opacity: 1;
1883
- pointer-events: auto;
1884
- transition-property: scale, opacity;
1885
- transition-timing-function: cubic-bezier(0.25, 0.25, 0.42, 1.225);
1886
- }
1887
-
1888
- /*OMBRE*/
1889
- :host([shadow]) slot[name="content"],
1890
- :host([shadow="md"]) slot[name="content"],
1891
- :host([shadow="true"]) slot[name="content"] {
1892
- box-shadow: var(--sc-shadow);
1893
- }
1894
-
1895
- :host([shadow="sm"]) slot[name="content"] {
1896
- box-shadow: var(--sc-shadow-sm);
1897
- }
1898
-
1899
- :host([shadow="none"]) slot[name="content"] {
1900
- box-shadow: none;
1901
- }
1902
-
1903
- :host([shadow="lg"]) slot[name="content"] {
1904
- box-shadow: var(--sc-shadow-lg);
1905
- }
1906
-
1907
- :host([inline]) {
1908
- vertical-align: baseline;
1909
- }
1910
- `],Kr([U()],Zr.prototype,"open",2),Kr([B("slot:not([name=content])")],Zr.prototype,"popBtn",2),Kr([B("slot[name=content]")],Zr.prototype,"popContent",2),Kr([F({type:Boolean})],Zr.prototype,"noToggle",2),Kr([F({type:Boolean,reflect:!0})],Zr.prototype,"inline",2),Kr([F({type:String,reflect:!0})],Zr.prototype,"shadow",2),Kr([F({type:String})],Zr.prototype,"placement",2),Zr=Kr([b("sonic-pop")],Zr);var Yr=Object.defineProperty,Gr=Object.getOwnPropertyDescriptor;let Qr=class extends ls{constructor(){super()}connectedCallback(){this.hasAttribute("variant")||(this.variant="ghost"),this.hasAttribute("type")||(this.type="primary"),this.hasAttribute("shape")||(this.shape="block");const t="square"===this.shape||"circle"===this.shape;this.hasAttribute("align")||t||(this.align="left"),super.connectedCallback()}};Qr=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Gr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Yr(e,s,o),o})([b("sonic-menu-item")],Qr);class Jr{constructor(t,{target:e,config:s,callback:i,skipInitial:r}){this.t=new Set,this.o=!1,this.i=!1,this.h=t,null!==e&&this.t.add(e??t),this.l=s,this.o=r??this.o,this.callback=i,window.ResizeObserver?(this.u=new ResizeObserver((t=>{this.handleChanges(t),this.h.requestUpdate()})),t.addController(this)):console.warn("ResizeController error: browser does not support ResizeObserver.")}handleChanges(t){var e;this.value=null==(e=this.callback)?void 0:e.call(this,t,this.u)}hostConnected(){for(const t of this.t)this.observe(t)}hostDisconnected(){this.disconnect()}async hostUpdated(){!this.o&&this.i&&this.handleChanges([]),this.i=!1}observe(t){this.t.add(t),this.u.observe(t,this.l),this.i=!0,this.h.requestUpdate()}unobserve(t){this.t.delete(t),this.u.unobserve(t)}disconnect(){this.u.disconnect()}}var Xr=Object.defineProperty,to=Object.getOwnPropertyDescriptor,eo=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?to(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Xr(e,s,o),o};let so=class extends(bi(ui(pi(gi(Zt))))){constructor(){super(...arguments),this.size="md",this.placeholder="",this.filteredFields="",this.readonly=null,this.dataProviderExpression="",this.key="",this.searchParameter="",this.propertyName="",this.hasInputPrefix=!1,this._resizeController=new Jr(this,{}),this.searchDataProvider="",this.initSearchDataProvider="",this.queueDataProvider="",this.initQueueDataProvider="",this.lastValidSearch="",this.updateSearchParameter=t=>{var e;if(""==t)return void(this.lastValidSearch="");!1===this.queryQueueListItem(this.queueDataProvider,this.findSelection,this.setSearchFromSelection)&&(this.lastValidSearch=t,null==(e=this.searchPublisher)||e.set(this.lastValidSearch))},this.initSearchParameter=()=>{this.queryQueueListItem(this.initQueueDataProvider,this.findSelection,this.setSearchFromSelection)},this.selectListItem=t=>{var e;const s="_self"===this.propertyName?t:t[this.propertyName||this.name];null==(e=this.formValuePublisher)||e.set(s)},this.findSearchedItem=t=>{var e;return("_self"===this.propertyName?t:t[this.propertyName||this.searchParameter||this.name])==(null==(e=this.searchPublisher)?void 0:e.get())},this.findSelection=t=>("_self"===this.propertyName?t:t[this.propertyName||this.name])==this.value,this.setSearchFromSelection=t=>{var e;this.lastValidSearch="_self"===this.propertyName?t:t[this.propertyName||this.searchParameter||this.name],null==(e=this.searchPublisher)||e.set(this.lastValidSearch)},this.updateActiveSelection=()=>{var t,e,s;this.queryQueueListItem(this.queueDataProvider,this.findSearchedItem,this.selectListItem),!this.select&&this.lastValidSearch&&this.lastValidSearch!=(null==(t=this.searchPublisher)?void 0:t.get())&&(null==(e=this.formValuePublisher)?void 0:e.get())&&(null==(s=this.formValuePublisher)||s.set(""))}}hasSlotOrProps(){var t;this.hasInputPrefix=!!(null==(t=this.slotInputPrefixNodes)?void 0:t.length)}connectedCallback(){var t,e,s;super.connectedCallback();const i=this.searchParameter||this.name,r=this.getAncestorAttributeValue("formDataProvider"),o=r+"__"+this.name+"__autocomplete";this.initSearchDataProvider=`${o}_init_search__`,this.initQueueDataProvider=`${o}_init_queue__`,this.searchDataProvider=`${o}_search__`,this.queueDataProvider=`${o}_queue__`;const n=Ge.get;this.searchPublisher=n(this.searchDataProvider)[i],this.formValuePublisher=n(r)[this.name],this.countPublisher=n(this.queueDataProvider).resultCount,this.initCountPublisher=n(this.initQueueDataProvider).resultCount,this.value&&(Ge.get(this.initSearchDataProvider)[this.name]=this.value),null==(t=this.initCountPublisher)||t.onAssign(this.initSearchParameter),null==(e=this.formValuePublisher)||e.onAssign(this.updateSearchParameter),null==(s=this.countPublisher)||s.onAssign(this.updateActiveSelection)}disconnectedCallback(){var t,e,s;super.disconnectedCallback(),null==(t=this.initCountPublisher)||t.offAssign(this.initSearchParameter),null==(e=this.formValuePublisher)||e.offAssign(this.updateSearchParameter),null==(s=this.countPublisher)||s.offAssign(this.updateActiveSelection);const i=Ge.get;i(this.initSearchDataProvider).delete(),i(this.initQueueDataProvider).delete(),i(this.searchDataProvider).delete(),i(this.queueDataProvider).delete()}queryQueueListItem(t,e,s){let i;const r=Ge.get(t).get();if(Array.isArray(r)){for(const t of r){const s=Ge.get(t.dataProvider).get();if(Array.isArray(s)&&(i=s.find(e),i))break}return!!i&&(s(i),!0)}}setSelectionRange(t,e){var s;null==(s=this.querySelector("sonic-input"))||s.setSelectionRange(t,e)}handleHide(){var t,e,s;if(this.select)return""==(null==(t=this.searchPublisher)?void 0:t.get())?(this.lastValidSearch="",void(null==(e=this.formValuePublisher)||e.set(""))):void(null==(s=this.searchPublisher)||s.set(this.lastValidSearch))}render(){return pt`
1911
- <sonic-pop noToggle style="display:block;" @hide=${this.handleHide}>
1912
- <sonic-input
1913
- dataProvider="${this.initSearchDataProvider+Math.random()}"
1914
- formDataProvider="${this.searchDataProvider}"
1915
- type="search"
1916
- data-keyboard-nav="${this.getAttribute("data-keyboard-nav")||""}"
1917
- label="${is(this.label)}"
1918
- description="${is(this.description)}"
1919
- name="${is(this.searchParameter||this.name)}"
1920
- placeholder="${is(this.placeholder)}"
1921
- ?readonly="${this.readonly}"
1922
- autocomplete="off"
1923
- clearable
1924
- inlineContent
1925
- size=${this.size}
1926
- >
1927
- <slot name="prefix" slot="prefix" @slotchange=${this.hasSlotOrProps}></slot>
1928
-
1929
- ${this.select?pt` <sonic-icon slot="suffix" class="select-chevron" name="nav-arrow-down" .size=${this.size}></sonic-icon> `:gt}
1930
- </sonic-input>
1931
- <sonic-menu slot="content" class="custom-scroll" style="${this.offsetWidth?`width: ${this.offsetWidth}px`:""}">
1932
- <sonic-queue
1933
- dataProvider="${this.queueDataProvider}"
1934
- filteredFields=${this.filteredFields}
1935
- dataProviderExpression="${this.dataProviderExpression}"
1936
- dataFilterProvider="${this.searchDataProvider}"
1937
- key="${this.key}"
1938
- .templates=${this.templateList}
1939
- displayContents
1940
- >
1941
- </sonic-queue>
1942
- <sonic-queue
1943
- noLazyload
1944
- noLoader
1945
- dataProvider="${this.initQueueDataProvider}"
1946
- filteredFields=${this.filteredFields}
1947
- dataProviderExpression="${this.dataProviderExpression}"
1948
- dataFilterProvider="${this.initSearchDataProvider}"
1949
- key="${this.key}"
1950
- displayContents
1951
- >
1952
- </sonic-queue>
1953
- </sonic-menu>
1954
- </sonic-pop>
1955
- `}};so.styles=[Ts,x`
1956
- :host {
1957
- display: block;
1958
- }
1959
-
1960
- sonic-menu {
1961
- display: block;
1962
- max-height: clamp(12rem, 20vh, 20rem);
1963
- min-width: 14rem;
1964
- width: 100%;
1965
- }
1966
- `],eo([F({type:String})],so.prototype,"size",2),eo([F({type:String})],so.prototype,"placeholder",2),eo([F()],so.prototype,"filteredFields",2),eo([F({type:Boolean})],so.prototype,"readonly",2),eo([F({type:String})],so.prototype,"dataProviderExpression",2),eo([F({type:Boolean})],so.prototype,"select",2),eo([F({type:String})],so.prototype,"key",2),eo([F({type:String})],so.prototype,"searchParameter",2),eo([F({type:String})],so.prototype,"propertyName",2),eo([q({slot:"prefix",flatten:!0})],so.prototype,"slotInputPrefixNodes",2),eo([U()],so.prototype,"hasInputPrefix",2),so=eo([b("sonic-input-autocomplete")],so);var io=Object.defineProperty,ro=Object.getOwnPropertyDescriptor,oo=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?ro(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&io(e,s,o),o};let no=class extends(gi(Zt)){constructor(){super(...arguments),this.minChars=8,this.hasNoChar=!0,this.hasEnoughChars=!1,this.hasMinuscule=!1,this.hasMajuscule=!1,this.hasNumber=!1,this.hasSpecialChar=!1,this.wording_password_helper_decription="Le mot de passe doit contenir au moins :",this.wording_password_helper_min_length="8 caractères",this.wording_password_helper_lower_case="1 minuscule",this.wording_password_helper_upper_case="1 majuscule",this.wording_password_helper_number="1 chiffre",this.wording_password_helper_special_char="1 caractère spécial"}connectedCallback(){super.connectedCallback(),this.name&&(this.checkValue=t=>{t?(this.hasNoChar=0==t.length,this.hasEnoughChars=t.length>this.minChars):(this.hasNoChar=!0,this.hasEnoughChars=!1),this.hasMinuscule=/[a-z]/.test(t),this.hasMajuscule=/[A-Z]/.test(t),this.hasNumber=/[0-9]/.test(t),this.hasSpecialChar=/[!"#$%&'()*+,\-./:;<=>?@[\]^_`{|}~]/.test(t)},Ge.get(this.getAncestorAttributeValue("formDataProvider"))[this.name].onAssign(this.checkValue))}disconnectedCallback(){this.checkValue&&this.name&&Ge.get(this.getAncestorAttributeValue("formDataProvider"))[this.name].offAssign(this.checkValue),super.disconnectedCallback()}getIcon(t){return t?pt`<sonic-icon library="heroicons" name="face-smile"></sonic-icon>`:pt`<sonic-icon library="heroicons" name="x-mark"></sonic-icon>`}render(){return this.hasNoChar?gt:pt`
1967
- <div>${this.wording_password_helper_decription}</div>
1968
- <div>${this.getIcon(this.hasEnoughChars)} ${this.wording_password_helper_min_length}</div>
1969
- <div>${this.getIcon(this.hasMinuscule)} ${this.wording_password_helper_lower_case}</div>
1970
- <div>${this.getIcon(this.hasMajuscule)} ${this.wording_password_helper_upper_case}</div>
1971
- <div>${this.getIcon(this.hasNumber)} ${this.wording_password_helper_number}</div>
1972
- <div>${this.getIcon(this.hasSpecialChar)} ${this.wording_password_helper_special_char}</div>
1973
- `}};oo([F()],no.prototype,"name",2),oo([F()],no.prototype,"minChars",2),oo([U()],no.prototype,"hasNoChar",2),oo([U()],no.prototype,"hasEnoughChars",2),oo([U()],no.prototype,"hasMinuscule",2),oo([U()],no.prototype,"hasMajuscule",2),oo([U()],no.prototype,"hasNumber",2),oo([U()],no.prototype,"hasSpecialChar",2),oo([F()],no.prototype,"wording_password_helper_decription",2),oo([F()],no.prototype,"wording_password_helper_min_length",2),oo([F()],no.prototype,"wording_password_helper_lower_case",2),oo([F()],no.prototype,"wording_password_helper_upper_case",2),oo([F()],no.prototype,"wording_password_helper_number",2),oo([F()],no.prototype,"wording_password_helper_special_char",2),no=oo([b("sonic-password-helper")],no);var ao=Object.defineProperty,lo=Object.getOwnPropertyDescriptor,co=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?lo(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ao(e,s,o),o};let ho=class extends(gi(Zt)){constructor(){super(...arguments),this.descriptionWhenEqual="Correspondance : oui",this.descriptionWhenNotEqual="Correspondance : non",this.areEqual=!1,this.hasNoChar=!0}connectedCallback(){super.connectedCallback();const t=Ge.get(this.getAncestorAttributeValue("formDataProvider"));this.name&&this.sameValueAs&&(this.checkValue=e=>{this.hasNoChar=!e||0==e.length,this.name&&this.sameValueAs&&(this.areEqual=t[this.name].get()==t[this.sameValueAs].get())},t[this.name].onAssign(this.checkValue),t[this.sameValueAs].onAssign(this.checkValue))}disconnectedCallback(){if(this.checkValue&&this.name&&this.sameValueAs){const t=Ge.get(this.getAncestorAttributeValue("formDataProvider"));t[this.name].offAssign(this.checkValue),t[this.sameValueAs].offAssign(this.checkValue)}super.disconnectedCallback()}render(){return this.hasNoChar?gt:pt`
1974
- <span> ${this.areEqual?ne(this.descriptionWhenEqual):ne(this.descriptionWhenNotEqual)} </span>
1975
- `}};co([F()],ho.prototype,"name",2),co([F()],ho.prototype,"sameValueAs",2),co([F()],ho.prototype,"descriptionWhenEqual",2),co([F()],ho.prototype,"descriptionWhenNotEqual",2),co([U()],ho.prototype,"areEqual",2),co([U()],ho.prototype,"hasNoChar",2),ho=co([b("sonic-same-value-helper")],ho);var po=Object.defineProperty,uo=Object.getOwnPropertyDescriptor,go=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?uo(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&po(e,s,o),o};let bo=class extends(ss(ci(je(fe(Zt))))){constructor(){super(...arguments),this.touched=!1,this.iconName="check",this.indeterminateIconName="minus-small",this.showAsIndeterminate=!1,this.hasDescription=!1,this.hasLabel=!1}connectedCallback(){this.type="checkbox",this.hasSlotOrProps(),super.connectedCallback()}willUpdate(t){this.hasSlotOrProps(),super.willUpdate(t)}hasSlotOrProps(){var t,e;this.hasLabel=!(!this.label&&!(null==(t=this.slotLabelNodes)?void 0:t.length)),this.hasDescription=!(!this.description&&!(null==(e=this.slotDescriptionNodes)?void 0:e.length))}render(){return pt`
1976
- <label class="checkbox-container ${this.disabled?"disabled":""}">
1977
-
1978
- <span class="icon-container">
1979
- <input
1980
- type="${this.type}"
1981
- @click=${this.handleChange}
1982
- @blur=${this.handleBlur}
1983
- ?required=${this.required}
1984
- ?data-indeterminate=${this.showAsIndeterminate}
1985
- .disabled=${is(this.disabled)}
1986
- .checked=${is(this.checked)}
1987
- .name=${this.name}
1988
- .value=${this.value}
1989
- ?autofocus=${this.autofocus}
1990
- aria-label=${is(this.ariaLabel)}
1991
- aria-labelledby=${is(this.ariaLabelledby)}
1992
- />
1993
- <sonic-icon name="${"indeterminate"==this.checked||this.showAsIndeterminate?this.indeterminateIconName:this.iconName}" class="sc-input-icon"></sonic-icon>
1994
- </span>
1995
-
1996
- <div class="checkbox-text ${this.hasDescription||this.hasLabel?"checkbox-text":"hidden"}">
1997
- ${this.label?ne(this.label):""}
1998
- <slot @slotchange=${this.hasSlotOrProps}></slot>
1999
- <slot @slotchange=${this.hasSlotOrProps} name="description" class="${this.hasDescription?"description":"hidden"} ">${this.description?pt`${ne(this.description)}`:""}</slot>
2000
- </div>
2001
- </label>
2002
- </label>
2003
- `}};bo.styles=[rs,x`
2004
- :host {
2005
- --sc-checkbox-border-width: var(--sc-form-border-width);
2006
- --sc-checkbox-border-color: var(--sc-input-border-color);
2007
- --sc-checkbox-bg: var(--sc-input-bg);
2008
- --sc-checkbox-color: transparent;
2009
- }
2010
-
2011
- * {
2012
- box-sizing: border-box;
2013
- }
2014
-
2015
- .checkbox-container {
2016
- min-height: 1.4em;
2017
- display: flex;
2018
- gap: 0.5em;
2019
- line-height: 1.2;
2020
- align-items: flex-start;
2021
- font-size: var(--sc-fs);
2022
- }
2023
-
2024
- .icon-container {
2025
- position: relative;
2026
- display: flex;
2027
- flex-shrink: 0;
2028
- }
2029
-
2030
- input {
2031
- box-sizing: border-box;
2032
- appearance: none;
2033
- flex-shrink: 0;
2034
- height: calc(var(--sc-fs) * 1.25);
2035
- width: calc(var(--sc-fs) * 1.25);
2036
- display: block;
2037
- cursor: pointer;
2038
- border-radius: 0.25em;
2039
- transition: 0.2s;
2040
- outline: none;
2041
- margin: 0;
2042
- background-color: var(--sc-checkbox-bg);
2043
- border: var(--sc-checkbox-border-width) solid var(--sc-checkbox-border-color);
2044
- }
2045
-
2046
- input:focus,
2047
- :host(:not([disabled])) input:active {
2048
- box-shadow: 0 0 0 2px var(--sc-primary);
2049
- }
2050
-
2051
- :host(:not([disabled])) label {
2052
- cursor: pointer;
2053
- }
2054
-
2055
- sonic-icon {
2056
- line-height: 0;
2057
- position: absolute;
2058
- top: 50%;
2059
- left: 50%;
2060
- transform: translateX(-50%) translateY(-50%) scale(0);
2061
- transition: transform 0.2s ease-in-out;
2062
- color: var(--sc-checkbox-color);
2063
- }
2064
-
2065
- /* .checkbox-text {
2066
- align-self: center;
2067
- } */
2068
-
2069
- .description {
2070
- color: var(--sc-base-400);
2071
- font-size: 0.85em;
2072
- margin-top: 0.2em;
2073
- display: block;
2074
- }
2075
-
2076
- /*Active */
2077
- input:checked,
2078
- input[data-indeterminate],
2079
- input[checked] {
2080
- --sc-checkbox-border-color: var(--sc-primary);
2081
- --sc-checkbox-bg: var(--sc-primary);
2082
- }
2083
- input:checked + sonic-icon,
2084
- input[data-indeterminate] + sonic-icon,
2085
- input[checked] + sonic-icon {
2086
- --sc-checkbox-color: var(--sc-primary-content);
2087
- transform: translateX(-50%) translateY(-50%) scale(1);
2088
- }
2089
- /*DISABLED */
2090
- .disabled {
2091
- cursor: not-allowed;
2092
- }
2093
- .disabled input {
2094
- opacity: 0.4;
2095
- }
2096
-
2097
- .disabled .checkbox-text {
2098
- opacity: 0.6;
2099
- }
2100
-
2101
- /*INPUT HOVER*/
2102
- :host(:not([disabled])) label:hover input {
2103
- filter: brightness(0.97);
2104
- }
2105
-
2106
- ::slotted(a) {
2107
- color: inherit;
2108
- text-decoration: underline !important;
2109
- }
2110
-
2111
- ::slotted(a:hover) {
2112
- text-decoration: none !important;
2113
- }
2114
- /*Utils */
2115
- .hidden {
2116
- display: none;
2117
- }
2118
-
2119
- /*ERROR*/
2120
- /*
2121
- :host([touched]) .checkbox-container:has(input:not(:focus):invalid) {
2122
- --sc-checkbox-border-color:var(--sc-danger);
2123
- }
2124
- :host([touched]) .checkbox-container:has(input:not(:focus):invalid) .checkbox-text{
2125
- color:var(--sc-danger);
2126
- }
2127
- */
2128
- `],go([F({type:Boolean,reflect:!0})],bo.prototype,"touched",2),go([F({type:String})],bo.prototype,"iconName",2),go([F({type:String})],bo.prototype,"indeterminateIconName",2),go([F({type:Boolean})],bo.prototype,"showAsIndeterminate",2),go([F({type:Boolean})],bo.prototype,"hasDescription",2),go([F({type:Boolean})],bo.prototype,"hasLabel",2),go([q({flatten:!0})],bo.prototype,"slotLabelNodes",2),go([q({slot:"description",flatten:!0})],bo.prototype,"slotDescriptionNodes",2),bo=go([b("sonic-checkbox")],bo);var fo=Object.defineProperty,mo=Object.getOwnPropertyDescriptor;let vo=class extends bo{constructor(){super(),this.radio=!0}connectedCallback(){super.connectedCallback(),this.type="radio"}};vo.styles=[bo.styles,x`
2129
- :host input {
2130
- border-radius: 50%;
2131
- }
2132
- :host sonic-icon {
2133
- border-radius: 50%;
2134
- overflow: hidden;
2135
- background-color: var(--sc-primary-content);
2136
- line-height: 0;
2137
- display: block;
2138
- font-size: 1em;
2139
- height: 0.6em;
2140
- width: 0.6em;
2141
- }
2142
- `],vo=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?mo(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&fo(e,s,o),o})([b("sonic-radio")],vo);var yo=Object.defineProperty,wo=Object.getOwnPropertyDescriptor,xo=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?wo(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&yo(e,s,o),o};let _o=class extends(je(fe(Zt))){constructor(){super(...arguments),this.valueKey="value",this.wordingKey="wording",this.multiple=!1,this.status="default",this._options=[],this.hasDoneFirstUpdate=!1,this._value="",this.updateOptions=()=>{const t=this.querySelectorAll("option");t.length>0&&(this.options=Array.from(t).map((t=>({value:t.value,wording:t.text,selected:t.hasAttribute("selected")}))))},this.forceAutoFill=!1,this.hasDescription=!1,this.hasLabel=!1,this.hasSuffix=!1,this.hasPrefix=!1}set options(t){this._options=t;for(const e of t)e.selected&&(this.value=e.value||"");!(this.value||this.getAttribute("value"))&&this._options.length>0&&(this.value=this._options[0][this.valueKey]),this.requestUpdate()}get options(){return this._options}firstUpdated(t){this.hasDoneFirstUpdate=!0,super.firstUpdated(t)}set value(t){(null!=t||this.hasDoneFirstUpdate)&&(t||(t=""),this._value!=t&&(this._value=t,this.updateFormPublisherValue(),this.requestUpdate()))}get value(){return this._value}updateFormPublisherValue(){const t=this.getFormPublisher();t&&(t[this.name]=this.value)}connectedCallback(){super.connectedCallback(),this.hasSlotOrProps(),this.updateOptions()}get description(){return this._description}set description(t){this.hasAttribute("description")&&!this.forceAutoFill&&(t=this.getAttribute("description")),this._description=t,this.requestUpdate()}get label(){return this._label}set label(t){this.hasAttribute("label")&&!this.forceAutoFill&&(t=this.getAttribute("label")),this._label=t,this.requestUpdate()}willUpdate(t){this.hasSlotOrProps(),super.willUpdate(t)}hasSlotOrProps(){var t,e,s,i;this.hasLabel=!(!this.label&&!(null==(t=this.slotLabelNodes)?void 0:t.length)),this.hasDescription=!(!this.description&&!(null==(e=this.slotDescriptionNodes)?void 0:e.length)),this.hasSuffix=!!(null==(s=this.slotSuffixNodes)?void 0:s.length),this.hasPrefix=!!(null==(i=this.slotPrefixNodes)?void 0:i.length)}validateFormElement(){var t;const e=null==(t=this.shadowRoot)?void 0:t.querySelector("select");if(!e||e.checkValidity())return;const s=this.getFormPublisher();s&&(s.isFormValid=!1),e.reportValidity()}render(){const t={"has-prefix":this.hasPrefix,"has-suffix":this.hasSuffix};return pt`
2143
- <label for="form-element" class="${this.hasLabel?"form-label":"hidden"}"
2144
- >${this.label?ne(this.label):""}<slot name="label" @slotchange=${this.hasSlotOrProps}></slot
2145
- ></label>
2146
-
2147
- <div class="form-control ${Fr(t)}">
2148
- <slot name="prefix" @slotchange=${this.hasSlotOrProps}></slot>
2149
- <div class="form-select-wrapper">
2150
- <select
2151
- id="form-element"
2152
- @change=${this.handleChange}
2153
- @blur=${this.handleBlur}
2154
- ?disabled=${this.disabled}
2155
- ?required=${this.required}
2156
- ?multiple=${this.multiple}
2157
- size=${is(this.selectSize)}
2158
- ?autofocus=${this.autofocus}
2159
- .value="${this.value}"
2160
- class="form-element"
2161
- aria-label=${is(this.ariaLabel)}
2162
- aria-labelledby=${is(this.ariaLabelledby)}
2163
- >
2164
- ${hs(this.options,(t=>t[this.valueKey]),(t=>{const e=this.value==t[this.valueKey];return pt`<option ?selected=${e} value="${t[this.valueKey]}">${t[this.wordingKey]}</option>`}))}
2165
- <slot></slot>
2166
- </select>
2167
- <sonic-icon class="select-chevron" name="nav-arrow-down" .size=${this.size}></sonic-icon>
2168
- </div>
2169
- <slot name="suffix" @slotchange=${this.hasSlotOrProps}></slot>
2170
- </div>
2171
-
2172
- <slot name="description" @slotchange=${this.hasSlotOrProps} class="${this.hasDescription?"form-description":"hidden"}"
2173
- >${this.description?pt`${ne(this.description)}`:""}</slot
2174
- >
2175
- `}};_o.styles=[rs,Rr,Nr,zr,x`
2176
- .form-element {
2177
- appearance: none;
2178
- }
2179
-
2180
- :host([disabled]) sonic-icon {
2181
- opacity: 0;
2182
- }
2183
-
2184
- @supports selector(:has(*)) {
2185
- :host(:not([disabled])) .form-element:not(:has(option:only-child)) {
2186
- padding-right: max(1.275em, calc(1.5 * var(--sc-input-px)));
2187
- }
2188
- }
2189
- /*Firefox etc.*/
2190
- @supports not selector(:has(*)) {
2191
- :host(:not([disabled])) .form-element {
2192
- padding-right: max(1.275em, calc(1.5 * var(--sc-input-px)));
2193
- }
2194
- }
2195
-
2196
- .form-select-wrapper {
2197
- position: relative;
2198
- width: 100%;
2199
- }
2200
-
2201
- sonic-icon {
2202
- position: absolute;
2203
- right: calc(0.8 * var(--sc-input-px));
2204
- top: 50%;
2205
- pointer-events: none;
2206
- transform: translateY(-50%);
2207
- color: var(--sc-input-c);
2208
- }
2209
-
2210
- option {
2211
- padding: 0.1rem var(--sc-input-px);
2212
- color: var(--sc-base-content);
2213
- background: var(--sc-base);
2214
- }
2215
-
2216
- select[multiple] option {
2217
- background: transparent;
2218
- padding: 0;
2219
- }
2220
- `],xo([F({type:String})],_o.prototype,"valueKey",2),xo([F({type:String})],_o.prototype,"wordingKey",2),xo([F({type:Boolean})],_o.prototype,"multiple",2),xo([F({type:String,reflect:!0})],_o.prototype,"size",2),xo([F({type:Number})],_o.prototype,"selectSize",2),xo([F({type:String,reflect:!0})],_o.prototype,"status",2),xo([F({type:Array})],_o.prototype,"options",1),xo([F({reflect:!0})],_o.prototype,"value",1),xo([F({type:Boolean})],_o.prototype,"forceAutoFill",2),xo([F()],_o.prototype,"description",1),xo([F()],_o.prototype,"label",1),xo([q({slot:"label",flatten:!0})],_o.prototype,"slotLabelNodes",2),xo([q({slot:"description",flatten:!0})],_o.prototype,"slotDescriptionNodes",2),xo([q({slot:"suffix",flatten:!0})],_o.prototype,"slotSuffixNodes",2),xo([q({slot:"prefix",flatten:!0})],_o.prototype,"slotPrefixNodes",2),xo([U()],_o.prototype,"hasDescription",2),xo([U()],_o.prototype,"hasLabel",2),xo([U()],_o.prototype,"hasSuffix",2),xo([U()],_o.prototype,"hasPrefix",2),_o=xo([b("sonic-select")],_o);var ko=Object.defineProperty,Ao=Object.getOwnPropertyDescriptor,Po=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Ao(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ko(e,s,o),o};let Co=class extends(ci(je(fe(Zt)))){constructor(){super(...arguments),this.size="",this.readonly=!1,this.hasDescription=!1,this.hasLabel=!1}connectedCallback(){super.connectedCallback(),this.hasSlotOrProps()}willUpdate(t){this.hasSlotOrProps(),super.willUpdate(t)}hasSlotOrProps(){var t,e;this.hasLabel=!(!this.label&&!(null==(t=this.slotLabelNodes)?void 0:t.length)),this.hasDescription=!(!this.description&&!(null==(e=this.slotDescriptionNodes)?void 0:e.length))}validateFormElement(){var t;const e=null==(t=this.shadowRoot)?void 0:t.querySelector("textarea");if(!e||e.checkValidity())return;const s=this.getFormPublisher();s&&(s.isFormValid=!1),e.reportValidity()}render(){const t={resize:this.resize};return pt`
2221
- <label for="${this.id||"form-element"}" class="${this.hasLabel?"form-label":"hidden"}"
2222
- >${this.label?ne(this.label):""}<slot name="label" @slotchange=${this.hasSlotOrProps}></slot
2223
- ></label>
2224
-
2225
- <div class="form-control">
2226
- <textarea
2227
- id="${this.id||"form-element"}"
2228
- @input=${this.handleChange}
2229
- @blur=${this.handleBlur}
2230
- disabled=${is(this.disabled)}
2231
- ?required=${this.required}
2232
- ?autofocus=${this.autofocus}
2233
- rows=${is(this.rows)}
2234
- cols=${is(this.cols)}
2235
- maxlength=${is(this.maxlength)}
2236
- minlength=${is(this.minlength)}
2237
- ?readonly=${this.readonly}
2238
- spellcheck=${is(this.spellcheck)}
2239
- autocomplete=${is(this.autocomplete)}
2240
- tabindex=${is(this.tabindex)}
2241
- wrap=${is(this.wrap)}
2242
- placeholder="${this.placeholder}"
2243
- class="form-element textarea custom-scroll"
2244
- aria-label=${is(this.ariaLabel)}
2245
- aria-labelledby=${is(this.ariaLabelledby)}
2246
- style=${$e(t)}
2247
- >
2248
- ${this.value}</textarea
2249
- >
2250
- </div>
2251
-
2252
- <slot name="description" @slotchange=${this.hasSlotOrProps} class="${this.hasDescription?"form-description":"hidden"}"
2253
- >${this.description?pt`${ne(this.description)}`:""}</slot
2254
- >
2255
- `}};Co.styles=[rs,Rr,Nr,zr,Ts,x`
2256
- textarea {
2257
- overflow-y: auto !important;
2258
- font-size: inherit;
2259
- }
2260
- `],Po([F({type:String})],Co.prototype,"size",2),Po([F({type:Number})],Co.prototype,"rows",2),Po([F({type:Number})],Co.prototype,"cols",2),Po([F({type:Number})],Co.prototype,"maxlength",2),Po([F({type:Number})],Co.prototype,"minlength",2),Po([F({type:String})],Co.prototype,"wrap",2),Po([F({type:Boolean})],Co.prototype,"readonly",2),Po([F({type:String})],Co.prototype,"placeholder",2),Po([F({type:String})],Co.prototype,"resize",2),Po([q({slot:"label",flatten:!0})],Co.prototype,"slotLabelNodes",2),Po([q({slot:"description",flatten:!0})],Co.prototype,"slotDescriptionNodes",2),Po([U()],Co.prototype,"hasDescription",2),Po([U()],Co.prototype,"hasLabel",2),Co=Po([b("sonic-textarea")],Co);var So=Object.defineProperty,$o=Object.getOwnPropertyDescriptor;let Oo=class extends Zt{render(){return pt`<slot></slot>`}};Oo.styles=[x`
2261
- :host {
2262
- font-size: 1.15rem;
2263
- line-height: 1.2;
2264
- display: block;
2265
- color: var(--sc-base-500);
2266
- font-weight: var(--sc-font-weight-base);
2267
- font-style: var(--sc-font-style-base);
2268
- margin-top: 0.2em;
2269
- }
2270
- `],Oo=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?$o(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&So(e,s,o),o})([b("sonic-legend-description")],Oo);var Do=Object.defineProperty,Lo=Object.getOwnPropertyDescriptor,Eo=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Lo(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Do(e,s,o),o};let jo=class extends Zt{constructor(){super(...arguments),this.forceAutoFill=!1}get description(){return this._description}set description(t){this.hasAttribute("description")&&!this.forceAutoFill&&(t=this.getAttribute("description")),this._description=t,this.requestUpdate()}get label(){return this._label}set label(t){this.hasAttribute("label")&&!this.forceAutoFill&&(t=this.getAttribute("label")),this._label=t,this.requestUpdate()}render(){return pt`<legend part="legend">
2271
- ${this.iconName?pt`<div class="icon">
2272
- <sonic-icon name=${this.iconName} prefix=${is(this.iconPrefix)} library=${is(this.iconLibrary)}></sonic-icon>
2273
- </div>`:""}
2274
-
2275
- <div class="legend-content">
2276
- ${ne(this.label?this.label:"")}
2277
- ${this.description?pt`<sonic-legend-description>${ne(this.description)}</sonic-legend-description>`:""}
2278
- <slot></slot>
2279
- </div>
2280
- <slot name="suffix"></slot>
2281
- </legend>`}};jo.styles=[x`
2282
- :host {
2283
- --sc-legend-font-size: 1.5rem;
2284
- --sc-legend-font-weight: var(--sc-font-weight-base);
2285
- --sc-legend-font-style: var(--sc-headings-font-style);
2286
- --sc-legend-family: var(--sc-headings-font-family);
2287
- --sc-legend-line-height: var(--sc-headings-line-height);
2288
- --sc-legend-color: var(--sc-base-content);
2289
- display: flex;
2290
- width: 100%;
2291
- }
2292
-
2293
- legend {
2294
- font-size: var(--sc-legend-font-size);
2295
- font-weight: var(--sc-legend-font-weight);
2296
- font-style: var(--sc-legend-font-style);
2297
- font-family: var(--sc-legend-font-family);
2298
- line-height: var(--sc-legend-line-height);
2299
- color: var(--sc-legend-color);
2300
- padding: 0;
2301
- display: flex;
2302
- width: 100%;
2303
- align-items: flex-start;
2304
- gap: 0.5em;
2305
- }
2306
-
2307
- slot[name="suffix"] {
2308
- display: block;
2309
- margin-left: auto;
2310
- flex-shrink: 0;
2311
- }
2312
-
2313
- .legend-content {
2314
- flex-grow: 1;
2315
- }
2316
- `],Eo([F({type:Boolean})],jo.prototype,"forceAutoFill",2),Eo([F()],jo.prototype,"description",1),Eo([F()],jo.prototype,"label",1),Eo([F({type:String})],jo.prototype,"iconName",2),Eo([F({type:String})],jo.prototype,"iconLibrary",2),Eo([F({type:String})],jo.prototype,"iconPrefix",2),jo=Eo([b("sonic-legend")],jo);var Mo=Object.defineProperty,Io=Object.getOwnPropertyDescriptor,To=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Io(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Mo(e,s,o),o};let No=class extends(fe(Zt)){constructor(){super(...arguments),this.disabled=!1,this.variant="default"}render(){return pt`<fieldset form="${is(this.form)}" ?disabled="${this.disabled}">
2317
- ${this.label?pt` <sonic-legend
2318
- label=${is(this.label)}
2319
- description=${is(this.description)}
2320
- iconName=${is(this.iconName)}
2321
- iconPrefix=${is(this.iconPrefix)}
2322
- iconLibrary=${is(this.iconLibrary)}
2323
- ></sonic-legend>`:gt}
2324
- <slot></slot>
2325
- </fieldset>`}};No.styles=[x`
2326
- :host {
2327
- --sc-fieldset-mt: 0;
2328
- --sc-fieldset-mb: 1rem;
2329
- --sc-fieldset-border-color: var(--sc-border-color);
2330
- --sc-fieldset-border-width: var(--sc-form-border-width);
2331
- --sc-fieldset-px: 1.25rem;
2332
- --sc-fieldset-py: 1.8rem;
2333
-
2334
- margin-top: var(--sc-fieldset-mt);
2335
- margin-bottom: var(--sc-fieldset-mb);
2336
- display: block;
2337
- border: var(--sc-fieldset-border-width) solid var(--sc-fieldset-border-color) !important;
2338
- padding: var(--sc-fieldset-py) var(--sc-fieldset-px);
2339
- border-radius: var(--sc-rounded-lg);
2340
- }
2341
-
2342
- fieldset {
2343
- all: unset;
2344
- display: contents;
2345
- }
2346
-
2347
- :host([variant="shadow"]),
2348
- :host([variant="ghost"]) {
2349
- --sc-fieldset-border-color: transparent;
2350
- }
2351
- :host([variant="shadow"]) {
2352
- --sc-fieldset-border-color: transparent;
2353
- box-shadow: var(--sc-shadow-lg);
2354
- }
2355
-
2356
- :host([tight]) {
2357
- --sc-fieldset-px: 0;
2358
- border-left: none !important;
2359
- border-right: none !important;
2360
- border-radius: 0;
2361
- }
2362
-
2363
- sonic-legend,
2364
- ::slotted(sonic-legend) {
2365
- margin-bottom: 1.5rem;
2366
- display: block;
2367
- }
2368
-
2369
- ::slotted(sonic-legend:last-child) {
2370
- margin-bottom: 0;
2371
- }
2372
- `],To([F({type:Boolean,reflect:!0})],No.prototype,"disabled",2),To([F({type:String})],No.prototype,"form",2),To([F({type:String})],No.prototype,"label",2),To([F({type:String})],No.prototype,"description",2),To([F({type:String})],No.prototype,"iconName",2),To([F({type:String})],No.prototype,"iconLibrary",2),To([F({type:String})],No.prototype,"iconPrefix",2),To([F({type:Boolean,reflect:!0})],No.prototype,"tight",2),To([F({type:String,reflect:!0})],No.prototype,"variant",2),No=To([b("sonic-fieldset")],No);var zo=Object.defineProperty,Ro=Object.getOwnPropertyDescriptor,Fo=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Ro(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&zo(e,s,o),o};let Uo=class extends(fe(Zt)){constructor(){super(...arguments),this._resizeController=new Jr(this,{}),this.oneFormElement=!1}onSlotChange(){let t=this.slottedElements;const e=["sonic-input","sonic-select","sonic-input-autocomplete",".form-item-container"];t=t.filter((t=>e.includes(t.nodeName.toLowerCase()))),this.oneFormElement=1==t.length}render(){const t={"cq--md":this.offsetWidth>440,"one-form-element":this.oneFormElement};return pt`<div class=${Fr(t)}>
2373
- <slot @slotchange=${this.onSlotChange}></slot>
2374
- </div>`}};Uo.styles=[x`
2375
- :host {
2376
- display: block;
2377
- }
2378
-
2379
- div {
2380
- display: grid;
2381
- grid-gap: 1.5rem;
2382
- align-items: flex-start;
2383
- }
2384
-
2385
- .cq--md {
2386
- grid-gap: 1.75rem;
2387
- grid-template-columns: repeat(2, minmax(0, 1fr));
2388
- }
2389
- .one-form-element {
2390
- grid-template-columns: 1fr;
2391
- }
2392
- /*::slotted(sonic-radio),
2393
- ::slotted(sonic-checkbox),
2394
- ::slotted(sonic-form-actions),
2395
- ::slotted(sonic-divider),
2396
- ::slotted(sonic-textarea) {
2397
- grid-column: 1 / -1;
2398
- }*/
2399
- ::slotted(sonic-submit) {
2400
- display: contents;
2401
- }
2402
- ::slotted(:not(sonic-input):not(sonic-select):not(sonic-input-autocomplete):not(.form-item-container)) {
2403
- grid-column: 1 / -1;
2404
- }
2405
-
2406
- ::slotted(sonic-divider) {
2407
- --sc-divider-my: 0;
2408
- }
2409
- `],Fo([H({flatten:!0})],Uo.prototype,"slottedElements",2),Fo([F({type:Boolean})],Uo.prototype,"oneFormElement",2),Uo=Fo([b("sonic-form-layout")],Uo);var Vo=Object.defineProperty,Bo=Object.getOwnPropertyDescriptor,Ho=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Bo(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Vo(e,s,o),o};let qo=class extends Zt{constructor(){super(...arguments),this.direction="row",this.justify="flex-start"}render(){const t={flexDirection:this.direction,justifyContent:this.justify};return pt`<slot style=${$e(t)}></slot>`}};qo.styles=[x`
2410
- :host {
2411
- display: block;
2412
- }
2413
- slot {
2414
- display: flex;
2415
- flex-wrap: wrap;
2416
- gap: 0.3rem;
2417
- }
2418
- `],Ho([F({type:String})],qo.prototype,"direction",2),Ho([F({type:String})],qo.prototype,"justify",2),qo=Ho([b("sonic-form-actions")],qo);var Wo=Object.defineProperty,Ko=Object.getOwnPropertyDescriptor,Zo=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Ko(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Wo(e,s,o),o};let Yo=class extends Zt{constructor(){super(...arguments),this.alignItems="center",this.hasDescription=!1,this.hasLabel=!1}updated(){const t=this.querySelectorAll("sonic-input, sonic-button, sonic-select"),e=t.length;e>1&&t.forEach(((t,s)=>{const i=t;0===s?(i.style.setProperty("--sc-item-rounded-tr","0"),i.style.setProperty("--sc-item-rounded-br","0")):s===e-1?(i.style.setProperty("--sc-item-rounded-tl","0"),i.style.setProperty("--sc-item-rounded-bl","0")):(i.style.setProperty("--sc-item-rounded-tr","0"),i.style.setProperty("--sc-item-rounded-br","0"),i.style.setProperty("--sc-item-rounded-tl","0"),i.style.setProperty("--sc-item-rounded-bl","0"))}))}connectedCallback(){super.connectedCallback(),this.hasSlotOrProps()}willUpdate(t){this.hasSlotOrProps(),super.willUpdate(t)}hasSlotOrProps(){var t,e;this.hasLabel=!(!this.label&&!(null==(t=this.slotLabelNodes)?void 0:t.length)),this.hasDescription=!(!this.description&&!(null==(e=this.slotDescriptionNodes)?void 0:e.length))}render(){const t={alignItems:this.alignItems};return pt`<span class="${this.hasLabel?"form-label":"hidden"}"
2419
- >${this.label?ne(this.label):""}<slot name="label" @slotchange=${this.hasSlotOrProps}></slot
2420
- ></span>
2421
- <slot class="main-slot" style=${$e(t)}></slot>
2422
- <slot name="description" @slotchange=${this.hasSlotOrProps} class="${this.hasDescription?"form-description":"hidden"}">
2423
- ${this.description?pt`${ne(this.description)}`:""}
2424
- </slot>`}};Yo.styles=[rs,Nr,zr,x`
2425
- :host {
2426
- display: inline-block;
2427
- vertical-align: middle;
2428
- }
2429
-
2430
- .main-slot {
2431
- width: 100%;
2432
- display: flex;
2433
- }
2434
- .hidden {
2435
- display: none;
2436
- }
2437
-
2438
- ::slotted(sonic-button),
2439
- ::slotted(sonic-input),
2440
- ::slotted(sonic-select) {
2441
- flex-grow: 1;
2442
- }
2443
- `],Zo([F({type:String})],Yo.prototype,"alignItems",2),Zo([F({type:String})],Yo.prototype,"label",2),Zo([F({type:String})],Yo.prototype,"description",2),Zo([q({slot:"label",flatten:!0})],Yo.prototype,"slotLabelNodes",2),Zo([q({slot:"description",flatten:!0})],Yo.prototype,"slotDescriptionNodes",2),Zo([U()],Yo.prototype,"hasDescription",2),Zo([U()],Yo.prototype,"hasLabel",2),Yo=Zo([b("sonic-group")],Yo);var Go=Object.defineProperty,Qo=Object.getOwnPropertyDescriptor,Jo=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Qo(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Go(e,s,o),o};let Xo=class extends Zt{constructor(){super(...arguments),this.rounded="none",this.src="",this.alt="",this.loading="lazy",this.ratio="auto",this.objectPosition="center center",this.imageRendering="auto",this.cover=!1}firstUpdated(t){var e;if(this.transition){const t=null==(e=this.shadowRoot)?void 0:e.querySelector("img");if(!t)return;t.onload=function(){t.classList.add("loaded")}}super.firstUpdated(t)}render(){const t={aspectRatio:this.cover?"auto":this.ratio,imageRendering:this.imageRendering,objectPosition:this.objectPosition};return pt`<div part="image">
2444
- <picture part="picture"
2445
- ><img part="img" src="${this.src}" loading="${this.loading}" alt="${this.alt}" style=${$e(t)}
2446
- /></picture>
2447
- </div>`}};Xo.styles=[x`
2448
- :host {
2449
- --sc-img-radius: 0;
2450
- --sc-img-bg: var(--sc-placeholder-bg);
2451
- border-radius: var(--sc-img-radius);
2452
- display: block;
2453
- width: 100%;
2454
- background: var(--sc-img-bg);
2455
- }
2456
-
2457
- img {
2458
- width: 100%;
2459
- vertical-align: middle;
2460
- object-fit: cover;
2461
- }
2462
-
2463
- img[src=""] {
2464
- visibility: hidden;
2465
- }
2466
-
2467
- /*Rounded*/
2468
- :host([rounded]) {
2469
- --sc-img-radius: var(--sc-rounded);
2470
- overflow: hidden;
2471
- }
2472
- :host([rounded="sm"]) {
2473
- --sc-img-radius: var(--sc-rounded-sm);
2474
- }
2475
-
2476
- :host([rounded="md"]) {
2477
- --sc-img-radius: var(--sc-rounded-md);
2478
- }
2479
-
2480
- :host([rounded="lg"]) {
2481
- --sc-img-radius: var(--sc-rounded-lg);
2482
- }
2483
- :host([rounded="xl"]) {
2484
- --sc-img-radius: var(--sc-rounded-xl);
2485
- }
2486
-
2487
- /*Cercle*/
2488
- :host([rounded="full"]) {
2489
- --sc-img-radius: 50% !important;
2490
- }
2491
- :host([rounded="none"]) {
2492
- --sc-img-radius: 0 !important;
2493
- }
2494
-
2495
- :host([cover]),
2496
- :host([cover]) > div,
2497
- :host([cover]) img {
2498
- position: absolute !important;
2499
- left: 0 !important;
2500
- top: 0 !important;
2501
- right: 0 !important;
2502
- bottom: 0 !important;
2503
- height: 100% !important;
2504
- width: 100% !important;
2505
- }
2506
-
2507
- :host([transition]) img {
2508
- opacity: 0;
2509
- transition: 0.25s;
2510
- }
2511
-
2512
- :host([transition="fade-scale-out"]) img {
2513
- scale: 1.08;
2514
- transition: opacity 0.3s linear, scale 0.3s cubic-bezier(0.16, 1, 0.3, 1);
2515
- }
2516
- :host([transition]) img.loaded {
2517
- opacity: 1;
2518
- scale: 1;
2519
- }
2520
- `],Jo([F({type:String})],Xo.prototype,"rounded",2),Jo([F({type:String})],Xo.prototype,"src",2),Jo([F({type:String})],Xo.prototype,"alt",2),Jo([F({type:String})],Xo.prototype,"loading",2),Jo([F({type:String,reflect:!0})],Xo.prototype,"transition",2),Jo([F({type:String})],Xo.prototype,"ratio",2),Jo([F({type:String})],Xo.prototype,"objectPosition",2),Jo([F({type:String})],Xo.prototype,"imageRendering",2),Jo([F({type:Boolean,reflect:!0})],Xo.prototype,"cover",2),Xo=Jo([b("sonic-image")],Xo);var tn=Object.defineProperty,en=Object.getOwnPropertyDescriptor,sn=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?en(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&tn(e,s,o),o};let rn=class extends Zt{constructor(){super(...arguments),this.size="",this.direction="column",this.gap="var(--sc-menu-gap)",this.align="left",this.shadow=null,this.moreShape="circle",this.scrollable=!1,this.observer=null,this.minWidth="0",this.hasMoreElements=!1,this.updateIsScollable=()=>{this.scrollable&&(this.initScrollable(),this.setScrollShadow(this,this.direction))}}checkIfMore(){var t;this.hasMoreElements=!!(null==(t=this.moreElements)?void 0:t.length)}updated(t){const e=this.querySelector(".more-btn");this.size&&e&&e.setAttribute("size",this.size);this.querySelectorAll("sonic-divider").forEach((t=>{t.hasAttribute("size")||t.setAttribute("size","xs")})),super.updated(t)}mainSlotChange(){this.setChildrenSize(this.menuChildren),this.updateIsScollable()}connectedCallback(){this.observer=new ResizeObserver(this.updateIsScollable),this.observer.observe(this),super.connectedCallback()}disconnectedCallback(){var t;null==(t=this.observer)||t.disconnect(),super.disconnectedCallback()}initScrollable(){let t,e,s=!1;this.scrollable&&(this.addEventListener("mousedown",(i=>{s=!0,this.classList.add("active"),t=i.pageX-this.offsetLeft,e=this.scrollLeft})),this.addEventListener("mouseleave",(()=>{s=!1,this.classList.remove("active")})),this.addEventListener("mouseup",(()=>{s=!1,this.classList.remove("active")})),this.addEventListener("mousemove",(i=>{if(!s)return;i.preventDefault();const r=1.5*(i.pageX-this.offsetLeft-t);this.scrollLeft=e-r,this.setScrollShadow(this,this.direction)})),this.addEventListener("scroll",(t=>{t.preventDefault(),this.setScrollShadow(this,this.direction)})))}setScrollShadow(t,e){"row"==e?(t.scrollLeft>0?this.classList.add("shadow-left"):this.classList.remove("shadow-left"),t.scrollLeft<t.scrollWidth-t.offsetWidth?this.classList.add("shadow-right"):this.classList.remove("shadow-right")):"column"==e&&(t.scrollTop>0?this.classList.add("shadow-top"):this.classList.remove("shadow-top"),t.scrollTop<t.scrollHeight-(t.offsetHeight+1)?this.classList.add("shadow-bottom"):this.classList.remove("shadow-bottom"))}setChildrenSize(t){t.forEach((t=>{this.size&&t.setAttribute("size",this.size),this.align&&"square"!=t.getAttribute("shape")&&"circle"!=t.getAttribute("shape")&&t.setAttribute("align",this.align),"row"==this.direction&&"block"==t.getAttribute("shape")&&t.setAttribute("shape","default")}))}render(){const t={minWidth:this.minWidth,flexDirection:this.direction,gap:this.gap},e="row"==this.direction,s={display:"block",alignSelf:e?"center":"flex-start",justifySelf:"center",flexDirection:this.direction},i={marginLeft:e?"":".55em"};return pt`<menu part="menu" class="shadowable" style=${$e(t)}>
2521
- <slot @slotchange=${this.mainSlotChange}></slot>
2522
- <sonic-pop style=${$e(s)} class=${this.hasMoreElements?"":"hidden"}>
2523
- <sonic-menu-item style=${$e(i)} class="more-btn" shape=${this.moreShape} align="center">
2524
- <sonic-icon size="xl" name=${e?"more-vert":"more-horiz"}></sonic-icon>
2525
- </sonic-menu-item>
2526
- <slot name="more" @slotchange=${this.checkIfMore} slot="content"></slot>
2527
- </sonic-pop>
2528
- </menu>`}};rn.styles=[x`
2529
- :host {
2530
- display: block;
2531
- --sc-menu-gap: 0.15rem;
2532
- }
2533
-
2534
- :host > menu {
2535
- display: flex;
2536
- border-radius: min(calc(var(--sc-btn-rounded) * 2), 0.4em);
2537
- margin: 0;
2538
- padding: 0.35em;
2539
- }
2540
-
2541
- .hidden {
2542
- display: none !important;
2543
- }
2544
-
2545
- /*OMBRE*/
2546
- :host([shadow]) .shadowable,
2547
- :host([shadow="md"]) .shadowable,
2548
- :host([shadow="true"]) .shadowable {
2549
- box-shadow: var(--sc-shadow);
2550
- }
2551
-
2552
- :host([shadow="sm"]) .shadowable {
2553
- box-shadow: var(--sc-shadow-sm);
2554
- }
2555
-
2556
- :host([shadow="lg"]) .shadowable {
2557
- box-shadow: var(--sc-shadow-lg);
2558
- }
2559
-
2560
- :host([shadow="none"]) .shadowable {
2561
- box-shadow: none;
2562
- }
2563
-
2564
- /* SCROLLABLE*/
2565
- :host([scrollable]) {
2566
- scrollbar-width: none;
2567
- -ms-overflow-style: none;
2568
- }
2569
- :host([scrollable]) menu > * {
2570
- scroll-snap-align: start;
2571
- white-space: nowrap;
2572
- }
2573
- :host([scrollable][direction="row"]) {
2574
- overflow-x: scroll;
2575
- scroll-snap-type: x mandatory;
2576
- }
2577
- :host([scrollable][direction="column"]) {
2578
- overflow-y: scroll;
2579
- scroll-snap-type: y mandatory;
2580
- }
2581
- :host([scrollable])::-webkit-scrollbar {
2582
- display: none !important;
2583
- }
2584
- :host([scrollable][direction="row"].shadow-right) {
2585
- -webkit-mask-image: linear-gradient(to left, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1) 10%);
2586
- mask-image: linear-gradient(to left, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1) 10%);
2587
- }
2588
- :host([scrollable][direction="row"].shadow-left) {
2589
- -webkit-mask-image: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1) 10%);
2590
- mask-image: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1) 10%);
2591
- }
2592
- :host([scrollable][direction="row"].shadow-left.shadow-right) {
2593
- -webkit-mask-image: linear-gradient(
2594
- to right,
2595
- rgba(0, 0, 0, 0) 0%,
2596
- rgba(0, 0, 0, 1) 10%,
2597
- rgba(0, 0, 0, 1) 90%,
2598
- rgba(0, 0, 0, 0) 100%
2599
- );
2600
- mask-image: linear-gradient(to right, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 10%, rgba(0, 0, 0, 1) 90%, rgba(0, 0, 0, 0) 100%);
2601
- }
2602
- :host([scrollable][direction="column"].shadow-top) {
2603
- -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1) 10%);
2604
- mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1) 10%);
2605
- }
2606
- :host([scrollable][direction="column"].shadow-bottom) {
2607
- -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1) 10%);
2608
- mask-image: linear-gradient(to top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1) 10%);
2609
- }
2610
- :host([scrollable][direction="column"].shadow-top.shadow-bottom) {
2611
- -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 10%, rgba(0, 0, 0, 1) 90%, rgba(0, 0, 0, 0) 100%);
2612
- mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 10%, rgba(0, 0, 0, 1) 90%, rgba(0, 0, 0, 0) 100%);
2613
- }
2614
- `],sn([F({type:String,reflect:!0})],rn.prototype,"size",2),sn([F({type:String,reflect:!0})],rn.prototype,"direction",2),sn([F({type:String})],rn.prototype,"gap",2),sn([F({type:String,reflect:!0})],rn.prototype,"align",2),sn([F({type:String,reflect:!0})],rn.prototype,"shadow",2),sn([F({type:String})],rn.prototype,"moreShape",2),sn([F({type:Boolean})],rn.prototype,"scrollable",2),sn([F({type:String})],rn.prototype,"minWidth",2),sn([B("menu")],rn.prototype,"menu",2),sn([H({selector:"sonic-menu-item"})],rn.prototype,"menuChildren",2),sn([H({slot:"more",selector:"*"})],rn.prototype,"moreElements",2),sn([U()],rn.prototype,"hasMoreElements",2),rn=sn([b("sonic-menu")],rn);var on=Object.defineProperty,nn=Object.getOwnPropertyDescriptor,an=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?nn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&on(e,s,o),o};let ln=class extends Zt{firstUpdated(t){var e;null==(e=this.buttons)||e.forEach((t=>{t.addEventListener("click",(()=>{if("false"!=t.getAttribute("hideModal")){const t=this.closest("sonic-modal");null==t||t.hide()}}))})),super.firstUpdated(t)}render(){return pt`<slot></slot>`}};ln.styles=[x`
2615
- :host {
2616
- display: flex;
2617
- gap: 0.5rem;
2618
- margin-top: auto;
2619
- padding-top: 1.5rem;
2620
- }
2621
- `],an([H({selector:"sonic-button"})],ln.prototype,"buttons",2),ln=an([b("sonic-modal-actions")],ln);var cn=Object.defineProperty,hn=Object.getOwnPropertyDescriptor,dn=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?hn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&cn(e,s,o),o};let pn=class extends Zt{render(){return pt`<sonic-button reset=${is(this.reset)} shape="circle" @click=${this.handleClick}
2622
- ><sonic-icon name="cancel" size="lg"></sonic-icon
2623
- ></sonic-button>`}handleClick(){s.getClosestElement(this,"sonic-modal").hide()}};pn.styles=[x`
2624
- :host {
2625
- position: sticky;
2626
- display: block;
2627
- align-self: flex-end;
2628
- height: 0;
2629
- top: 0.5rem;
2630
- right: 0.5rem;
2631
- transform: translate3d(calc(var(--sc-modal-px)), calc(-1 * var(--sc-modal-py)), 0);
2632
- z-index: 20;
2633
- }
2634
- `],dn([F()],pn.prototype,"reset",2),pn=dn([b("sonic-modal-close")],pn);var un=Object.defineProperty,gn=Object.getOwnPropertyDescriptor;let bn=class extends Zt{render(){return pt`<slot></slot>`}};bn.styles=[x`
2635
- :host {
2636
- display: block;
2637
- width: 100%;
2638
- }
2639
- `],bn=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?gn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&un(e,s,o),o})([b("sonic-modal-content")],bn);var fn=Object.defineProperty,mn=Object.getOwnPropertyDescriptor;let vn=class extends Zt{render(){return pt`<slot></slot>`}};vn.styles=[x`
2640
- :host {
2641
- font-size: 1.1rem;
2642
- display: block;
2643
- line-height: 1.1rem;
2644
- line-height: var(--sc-headings-line-height);
2645
- font-family: var(--sc-headings-font-family);
2646
- font-weight: var(--sc-headings-font-weight);
2647
- }
2648
- `],vn=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?mn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&fn(e,s,o),o})([b("sonic-modal-subtitle")],vn);var yn=Object.defineProperty,wn=Object.getOwnPropertyDescriptor;let xn=class extends Zt{render(){return pt`<slot></slot>`}};xn.styles=[x`
2649
- :host {
2650
- font-weight: bold;
2651
- font-size: 1.5rem;
2652
- display: block;
2653
- line-height: var(--sc-headings-line-height);
2654
- font-family: var(--sc-headings-font-family);
2655
- }
2656
- `],xn=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?wn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&yn(e,s,o),o})([b("sonic-modal-title")],xn);var _n=Object.defineProperty,kn=Object.getOwnPropertyDescriptor,An=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?kn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&_n(e,s,o),o};const Pn="sonic-modal";let Cn=class extends(fe(Zt)){constructor(){super(...arguments),this.forceAction=!1,this.removeOnHide=!1,this.removeHashOnHide=!1,this.align="left",this.padding="var(--sc-modal-py) var(--sc-modal-px)",this.maxWidth="var(--sc-modal-max-w) ",this.maxHeight="var(--sc-modal-max-h) ",this.width="100%",this.height="auto",this.zIndex="var(--sc-modal-z-index)",this.fullScreen=!1,this.visible=!1}static create(t){const e=document.createElement(Pn);e.options=t,!0===t.removeHashOnHide&&e.setAttribute("removeHashOnHide","true"),!0===t.removeOnHide&&e.setAttribute("removeOnHide","true"),t.maxWidth&&(e.maxWidth=null==t?void 0:t.maxWidth),t.width&&(e.width=null==t?void 0:t.width),t.maxHeight&&(e.maxHeight=null==t?void 0:t.maxHeight),t.height&&(e.height=null==t?void 0:t.height),t.forceAction&&(e.forceAction=!0),t.paddingX&&e.style.setProperty("--sc-modal-px",null==t?void 0:t.paddingX),t.paddingY&&e.style.setProperty("--sc-modal-py",null==t?void 0:t.paddingY),t.zIndex&&e.style.setProperty("--sc-modal-z-index",null==t?void 0:t.zIndex);return Ys.getPopContainer().appendChild(e),e.show(),e}connectedCallback(){Cn.modals.push(this),super.connectedCallback(),this.handleFullsceen()}disconnectedCallback(){Cn.modals.splice(Cn.modals.indexOf(this),1),super.disconnectedCallback()}updated(){const t=this;document.addEventListener("keydown",this.handleEscape),t.closeBtn.forEach((e=>{e.addEventListener("click",(function(){t.hide()}),{once:!0})}))}willUpdate(t){t.has("fullScreen")&&this.handleFullsceen(),super.willUpdate(t)}render(){var t;if(0==this.visible)return gt;const e={padding:this.padding,maxWidth:this.maxWidth,maxHeight:this.maxHeight,width:this.width,height:this.height,zIndex:this.zIndex,borderRadius:this.fullScreen?"0":"var(--sc-modal-rounded)"},s={maxWidth:this.maxWidth,maxHeight:this.maxHeight,width:this.width,height:this.height,borderRadius:this.fullScreen?"0":"var(--sc-modal-rounded)"};return pt`<div
2657
- class="modal-wrapper"
2658
- style=${$e(s)}
2659
- ${As({out:fs})}
2660
- tabindex="0"
2661
- >
2662
- <div
2663
- part="modal"
2664
- class="modal custom-scroll"
2665
- style=${$e(e)}
2666
- ${As({keyframeOptions:{duration:400,easing:"cubic-bezier(0.250, 0.250, 0.420, 1.225)"},in:[{transform:"translateY(25%) scale(1)",boxShadow:"0 0 0 rgba(0,0,0,0)",opacity:0}],out:[{transform:"translateY(20%) scale(1)",boxShadow:"0 0 0 rgba(0,0,0,0)",opacity:0}]})}
2667
- >
2668
- <div class="modal-content">
2669
- ${(null==(t=this.options)?void 0:t.forceAction)?gt:pt`<sonic-modal-close></sonic-modal-close>`} ${this.modalFragment("title")}
2670
- ${this.modalFragment("subtitle")} ${this.modalFragment("content")} ${this.modalFragment("actions")}
2671
-
2672
- <slot></slot>
2673
- </div>
2674
- </div>
2675
- </div>
2676
- <div
2677
- class="overlay"
2678
- @click="${this.forceAction?null:this.hide}"
2679
- ${As({keyframeOptions:{duration:500},in:ms,out:[{opacity:0,pointerEvents:"none"}]})}
2680
- ></div>`}modalFragment(t){var e;const s=null==(e=this.options)?void 0:e[t];if(!s)return gt;let i;switch(i=s instanceof Object?s:ne(s),t){case"title":return pt`<sonic-modal-title>${i}</sonic-modal-title>`;case"subtitle":return pt`<sonic-modal-subtitle>${i}</sonic-modal-subtitle>`;case"content":return pt`<sonic-modal-content>${i}</sonic-modal-content>`;case"actions":return pt`<sonic-modal-actions>${i}</sonic-modal-actions>`;default:return gt}}show(){var t,e;this.visible=!0,null==(t=this.modalElement)||t.setAttribute("tabindex","0"),null==(e=this.modalElement)||e.focus(),this.dispatchEvent(new CustomEvent("show"))}hide(){var t;this.visible=!1,null==(t=this.modalElement)||t.setAttribute("tabindex","-1"),this.dispatchEvent(new CustomEvent("hide")),this.hasAttribute("resetDataProviderOnHide")&&Ge.get(this.getAttribute("resetDataProviderOnHide")).set({}),this.removeOnHide&&this.remove(),setTimeout((()=>{this.dispatchEvent(new CustomEvent("hidden")),this.removeHashOnHide&&window.history.replaceState({},"",window.location.pathname)}),480)}dispose(){this.hide(),this.remove()}static disposeAll(){Cn.modals.forEach((t=>{t.dispose()}))}handleEscape(t){"Escape"===t.key&&Cn.modals.forEach((t=>{t.forceAction||t.hide()}))}handleFullsceen(){this.fullScreen&&(this.width="100%",this.height="100%",this.maxWidth="none",this.maxHeight="none")}};Cn.styles=[Ts,x`
2681
- :host {
2682
- --sc-modal-py: 2.5rem;
2683
- --sc-modal-px: 1.5rem;
2684
- --sc-modal-max-w: min(100vw, 40rem);
2685
- --sc-modal-max-h: 85vh;
2686
- --sc-modal-rounded: var(--sc-rounded-lg);
2687
- --sc-modal-z-index: 990;
2688
- }
2689
-
2690
- * {
2691
- box-sizing: border-box;
2692
- }
2693
-
2694
- .modal-wrapper {
2695
- position: fixed;
2696
- bottom: 0;
2697
- left: 0;
2698
- width: 100%;
2699
- z-index: calc(var(--sc-modal-z-index) + 1);
2700
- align-items: center;
2701
- justify-content: center;
2702
- flex-direction: column;
2703
- display: flex;
2704
- pointer-events: none;
2705
- }
2706
-
2707
- .modal-content {
2708
- display: flex;
2709
- flex-direction: column;
2710
- min-height: 10rem;
2711
- line-height: 1.25;
2712
- }
2713
-
2714
- .modal {
2715
- background: var(--sc-base);
2716
- color: var(--sc-base-content);
2717
- width: 100%;
2718
- box-shadow: var(--sc-shadow-lg);
2719
- border-radius: var(--sc-modal-rounded) var(--sc-modal-rounded) 0 0;
2720
- pointer-events: auto;
2721
- /*overflow: hidden;*/
2722
- transform: translateZ(0);
2723
- }
2724
-
2725
- .overlay {
2726
- background: var(--sc-modal-overlay-bg, var(--sc-base-200));
2727
- left: 0;
2728
- top: 0;
2729
- right: 0;
2730
- bottom: 0;
2731
- z-index: var(--sc-modal-z-index);
2732
- opacity: 0.8;
2733
- position: fixed;
2734
- }
2735
-
2736
- ::slotted(sonic-modal-title) {
2737
- margin-bottom: 1.25rem;
2738
- }
2739
- :host([align="left"]) ::slotted(sonic-modal-title) {
2740
- padding-right: 1em;
2741
- }
2742
-
2743
- ::slotted(sonic-modal-subtitle) {
2744
- margin-top: -0.9rem;
2745
- margin-bottom: 1.25rem;
2746
- }
2747
-
2748
- @media (max-width: 767.5px) {
2749
- .modal-wrapper,
2750
- .modal {
2751
- max-width: none !important;
2752
- width: 100% !important;
2753
- border-radius: var(--sc-modal-rounded) var(--sc-modal-rounded) 0 0 !important;
2754
- }
2755
- }
2756
-
2757
- @media (min-width: 768px) {
2758
- .modal-wrapper {
2759
- top: 50%;
2760
- left: 50%;
2761
- bottom: auto;
2762
- right: auto;
2763
- transform: translateX(-50%) translateY(-50%);
2764
- }
2765
-
2766
- .modal {
2767
- top: 50%;
2768
- bottom: auto;
2769
- right: auto;
2770
- border-radius: var(--sc-modal-rounded);
2771
- }
2772
- }
2773
-
2774
- :host([align="left"]) .modal-content {
2775
- text-align: left;
2776
- align-items: flex-start;
2777
- }
2778
-
2779
- :host([align="center"]) .modal-content {
2780
- text-align: center;
2781
- align-items: center;
2782
- }
2783
-
2784
- :host([align="right"]) .modal-content {
2785
- text-align: right;
2786
- align-items: flex-end;
2787
- }
2788
-
2789
- /* Border radius */
2790
- :host([rounded="none"]) modal {
2791
- --sc-img-radius: 0 !important;
2792
- }
2793
- `],Cn.modals=[],An([F({type:Boolean})],Cn.prototype,"forceAction",2),An([F({type:Boolean})],Cn.prototype,"removeOnHide",2),An([F({type:Boolean})],Cn.prototype,"removeHashOnHide",2),An([F({type:String,reflect:!0})],Cn.prototype,"align",2),An([F({type:String})],Cn.prototype,"padding",2),An([F({type:String})],Cn.prototype,"maxWidth",2),An([F({type:String})],Cn.prototype,"maxHeight",2),An([F({type:String})],Cn.prototype,"width",2),An([F({type:String})],Cn.prototype,"height",2),An([F({type:String})],Cn.prototype,"zIndex",2),An([F({type:Object})],Cn.prototype,"options",2),An([F({type:Boolean,reflect:!0})],Cn.prototype,"fullScreen",2),An([F({type:Boolean,reflect:!0})],Cn.prototype,"visible",2),An([B(".modal-wrapper")],Cn.prototype,"modalWrapper",2),An([B(".modal")],Cn.prototype,"modalElement",2),An([H({selector:"sonic-modal-close"})],Cn.prototype,"closeBtn",2),Cn=An([b(Pn)],Cn),"undefined"!=typeof window&&(window.SonicModal=Cn);var Sn=Object.defineProperty,$n=Object.getOwnPropertyDescriptor,On=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?$n(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Sn(e,s,o),o};const Dn={warning:"warning-circled-outline",success:"check-circled-outline",error:"warning-circled-outline",info:"info-empty",default:"info-empty"};let Ln=class extends Zt{constructor(){super(...arguments),this.label="",this.noIcon=!1,this.text="",this.id=(new Date).getTime().toString(),this.dismissible=!1,this.background=!1,this.status="default",this.dismissForever=!1}render(){if(this.dismissForever){const t=localStorage.getItem("sonic-alert-dismissed")||"{}";if(JSON.parse(t)[this.id])return gt}return pt`<div part="alert" class="alert">
2794
- <slot name="icon" class="${this.noIcon?"hidden":gt}"
2795
- >${this.noIcon?gt:pt`<div>${this.status&&pt`<sonic-icon name=${Dn[this.status]}></sonic-icon>`}</div>`}</slot
2796
- >
2797
- <div>
2798
- ${this.label?pt`<span class="label">${ne(this.label)}</span>`:gt}
2799
- <div>${this.text}<slot></slot></div>
2800
- </div>
2801
- ${this.dismissible?pt`<sonic-button @click=${this.close} class="close-btn" variant="unstyled" shape="circle">
2802
- <sonic-icon name="cancel" size="lg"></sonic-icon>
2803
- </sonic-button>`:gt}
2804
- </div>`}close(){if(this.remove(),this.dismissForever){const t=localStorage.getItem("sonic-alert-dismissed")||"{}",e=JSON.parse(t);e[this.id]=!0,localStorage.setItem("sonic-alert-dismissed",JSON.stringify(e))}}};Ln.styles=[rs,x`
2805
- :host {
2806
- --sc-alert-color: var(--sc-base-content);
2807
- --sc-alert-rounded: var(--sc-rounded);
2808
- --sc-alert-fw: var(--sc-font-weight-base);
2809
- --sc-alert-fst: var(--sc-font-style-base);
2810
- --sc-alert-label-fw: bold;
2811
- display: block;
2812
- font-weight: var(--sc-alert-fw);
2813
- font-style: var(--sc-alert-fst);
2814
- }
2815
-
2816
- .alert {
2817
- color: var(--sc-alert-color);
2818
- position: relative;
2819
- display: flex;
2820
- gap: 0.4em;
2821
- border-radius: var(--sc-alert-rounded);
2822
- overflow: hidden;
2823
- }
2824
-
2825
- .label {
2826
- font-weight: var(--sc-alert-label-fw);
2827
- margin-bottom: 0.15em;
2828
- display: block;
2829
- }
2830
-
2831
- :host([status="warning"]) {
2832
- --sc-alert-color: var(--sc-warning);
2833
- }
2834
- :host([status="error"]) {
2835
- --sc-alert-color: var(--sc-danger);
2836
- }
2837
- :host([status="info"]) {
2838
- --sc-alert-color: var(--sc-info);
2839
- }
2840
- :host([status="success"]) {
2841
- --sc-alert-color: var(--sc-success);
2842
- }
2843
-
2844
- /*background*/
2845
- :host([dismissible]) .alert,
2846
- :host([background]) .alert {
2847
- background: var(--sc-base);
2848
- padding: 0.8em 1.15em;
2849
- }
2850
- :host([dismissible]) .alert:before,
2851
- :host([background]) .alert:before {
2852
- background-color: currentColor;
2853
- content: "";
2854
- display: block;
2855
- position: absolute;
2856
- left: 0;
2857
- top: 0;
2858
- right: 0;
2859
- bottom: 0;
2860
- opacity: 0.08;
2861
- border-radius: var(--sc-alert-rounded);
2862
- pointer-events: none;
2863
- }
2864
- :host([dismissible]) > div,
2865
- :host([background]) > div {
2866
- z-index: 2;
2867
- position: relative;
2868
- }
2869
-
2870
- slot {
2871
- display: block;
2872
- }
2873
-
2874
- .hidden {
2875
- display: none !important;
2876
- }
2877
-
2878
- /*Rounded*/
2879
- :host([size="xs"]) .alert {
2880
- --sc-alert-rounded: var(--sc-rounded-sm);
2881
- }
2882
- :host([size="sm"]) .alert {
2883
- --sc-alert-rounded: var(--sc-rounded-sm);
2884
- }
2885
-
2886
- /*Dismissible*/
2887
- :host([dismissible]) .alert {
2888
- padding-right: 3rem;
2889
- }
2890
- :host([dismissible]) .close-btn {
2891
- padding: 0.5em;
2892
- position: absolute;
2893
- top: 0.25rem;
2894
- right: 0.25rem;
2895
- }
2896
- `],On([F({type:String})],Ln.prototype,"label",2),On([F({type:Boolean,reflect:!0})],Ln.prototype,"noIcon",2),On([F({type:String})],Ln.prototype,"text",2),On([F({type:String})],Ln.prototype,"id",2),On([F({type:String,reflect:!0})],Ln.prototype,"size",2),On([F({type:Boolean,reflect:!0})],Ln.prototype,"dismissible",2),On([F({type:Boolean,reflect:!0})],Ln.prototype,"background",2),On([F({type:String,reflect:!0})],Ln.prototype,"status",2),On([F({type:Boolean,reflect:!0})],Ln.prototype,"dismissForever",2),Ln=On([b("sonic-alert")],Ln);var En=Object.defineProperty,jn=Object.getOwnPropertyDescriptor,Mn=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?jn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&En(e,s,o),o};let In=class extends(fe(Zt)){constructor(){super(...arguments),this._messages=[]}get messages(){return this._messages}set messages(t){this._messages=t,this.messages&&t.forEach((t=>{"public"==t.type&&Xs.add({text:t.content||"",status:t.status})}))}render(){return gt}};Mn([F({type:Array})],In.prototype,"messages",1),In=Mn([b("sonic-toast-message-subscriber")],In);var Tn=Object.defineProperty,Nn=Object.getOwnPropertyDescriptor,zn=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Nn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Tn(e,s,o),o};let Rn=class extends Zt{constructor(){super(...arguments),this.label="",this.disabled=!1,this.focusable=!1}connectedCallback(){this.focusable&&this.setAttribute("tabindex","0"),super.connectedCallback()}render(){const t=this.disabled||""==this.label?"disabled":"";return pt`<div data-tooltip-text="${this.label.trim().replace("&nbsp;"," ")}" class="tooltip ${t}">
2897
- <slot></slot>
2898
- </div>`}};Rn.styles=[x`
2899
- :host {
2900
- position: relative;
2901
- display: inline-flex;
2902
- align-items: center;
2903
- text-align: center;
2904
- --sc-tooltip-fw: var(--sc-font-weight-base);
2905
- }
2906
-
2907
- .tooltip:before {
2908
- position: absolute;
2909
- content: attr(data-tooltip-text);
2910
- font-size: 0.85rem;
2911
- display: block;
2912
- opacity: 0;
2913
- pointer-events: none;
2914
- background: var(--sc-base-content, #111827);
2915
- padding: 0.32rem 0.25rem;
2916
- border-radius: var(--sc-rounded);
2917
- color: var(--sc-base, #fff);
2918
- z-index: 999;
2919
- display: none;
2920
- line-height: 1.1;
2921
- width: max-content;
2922
- max-width: 18rem;
2923
- white-space: pre-line;
2924
- font-weight: var(--sc-tooltip-fw);
2925
- }
2926
- :host(:focus-within) .tooltip:not(.disabled):before,
2927
- .tooltip:not(.disabled):hover:before {
2928
- opacity: 1;
2929
- display: block;
2930
- }
2931
-
2932
- :host(:not([placement])) .tooltip:before,
2933
- :host([placement="top"]) .tooltip:before {
2934
- bottom: calc(100% + 0.25rem);
2935
- left: 50%;
2936
- transform: translateX(-50%);
2937
- }
2938
-
2939
- :host([placement="top-end"]) .tooltip:before {
2940
- bottom: calc(100% + 0.25rem);
2941
- right: 0;
2942
- transform: translateX(0);
2943
- }
2944
- :host([placement="top-start"]) .tooltip:before {
2945
- bottom: calc(100% + 0.25rem);
2946
- left: 0;
2947
- transform: translateX(0);
2948
- }
2949
-
2950
- :host([placement="bottom"]) .tooltip:before {
2951
- top: calc(100% + 0.25rem);
2952
- left: 50%;
2953
- transform: translateX(-50%);
2954
- }
2955
-
2956
- :host([placement="left"]) .tooltip:before {
2957
- top: 50%;
2958
- right: calc(100% + 0.25rem);
2959
- transform: translateY(-50%);
2960
- }
2961
-
2962
- :host([placement="right"]) .tooltip:before {
2963
- top: 50%;
2964
- transform: translateY(-50%);
2965
- left: calc(100% + 0.25rem);
2966
- }
2967
- `],zn([F({type:String})],Rn.prototype,"label",2),zn([F({type:String,reflect:!0})],Rn.prototype,"placement",2),zn([F({type:Boolean})],Rn.prototype,"disabled",2),zn([F({type:Boolean})],Rn.prototype,"focusable",2),Rn=zn([b("sonic-tooltip")],Rn);var Fn=Object.defineProperty,Un=Object.getOwnPropertyDescriptor,Vn=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Un(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Fn(e,s,o),o};let Bn=class extends Zt{constructor(){super(...arguments),this.label="",this.align="center",this.vertical=!1,this.noMargin=!1,this.dashed=!1,this.dotted=!1}firstUpdated(t){var e,s;super.firstUpdated(t),(this.label||(null==(e=this.slotNodes)?void 0:e.length))&&(null==(s=this.divider)||s.classList.add("has-text"))}render(){return pt`<div part="divider">
2968
- <span class="text">${ne(this.label?this.label:"")}<slot></slot></span>
2969
- </div>`}};Bn.styles=[x`
2970
- :host {
2971
- --sc-divider-my: 0.5rem;
2972
- --sc-divider-mx: 0;
2973
- --sc-divider-border-width: max(1px, var(--sc-border-width));
2974
- --sc-divider-border-color: var(--sc-border-color);
2975
- --sc-divider-border-style: solid;
2976
- --sc-divider-color: currentColor;
2977
- --sc-divider-ff: var(--sc-font-family-base);
2978
- --sc-divider-fs: 1rem;
2979
- --sc-divider-fw: var(--sc-font-weight-base);
2980
- --sc-divider-fst: var(--sc-font-style-base);
2981
-
2982
- margin: var(--sc-divider-my) var(--sc-divider-mx);
2983
- font-size: var(--sc-divider-fs);
2984
- font-style: var(--sc-divider-fst);
2985
- font-family: var(--sc-divider-ff);
2986
- font-weight: var(--sc-divider-fw);
2987
- color: var(--sc-divider-color);
2988
- display: block;
2989
- }
2990
-
2991
- /*SIZE*/
2992
- :host([size="2xs"]) {
2993
- --sc-divider-my: 0.35rem;
2994
- --sc-divider-fs: 0.68rem;
2995
- }
2996
-
2997
- :host([size="xs"]) {
2998
- --sc-divider-my: 0.5rem;
2999
- --sc-divider-fs: 0.75rem;
3000
- }
3001
-
3002
- :host([size="sm"]) {
3003
- --sc-divider-my: 0.75rem;
3004
- --sc-divider-fs: 0.875rem;
3005
- }
3006
-
3007
- :host([size="md"]) {
3008
- --sc-divider-my: 1.25rem;
3009
- }
3010
-
3011
- :host([size="lg"]) {
3012
- --sc-divider-my: 1.85rem;
3013
- }
3014
-
3015
- :host([size="xl"]) {
3016
- --sc-divider-my: 2.25rem;
3017
- }
3018
-
3019
- :host([size="2xl"]) {
3020
- --sc-divider-my: 3.35rem;
3021
- }
3022
-
3023
- div {
3024
- display: flex;
3025
- align-items: center;
3026
- width: 100%;
3027
- }
3028
-
3029
- div::before,
3030
- div::after {
3031
- content: "";
3032
- flex-grow: 1;
3033
- border-top: var(--sc-divider-border-width) var(--sc-divider-border-style) var(--sc-divider-border-color);
3034
- width: 100%;
3035
- opacity: var(--sc-divider-opacity, 1);
3036
- }
3037
-
3038
- /*ALIGNEMENT*/
3039
- :host([align="left"]) div:before {
3040
- display: none;
3041
- }
3042
-
3043
- :host([align="right"]) div:after {
3044
- display: none;
3045
- }
3046
-
3047
- :host([vertical]) {
3048
- margin: var(--sc-divider-mx) var(--sc-divider-my);
3049
- }
3050
-
3051
- :host([vertical]) div {
3052
- flex-direction: column;
3053
- height: 100%;
3054
- min-height: var(--sc-form-height);
3055
- }
3056
-
3057
- :host([vertical]) .has-text {
3058
- gap: 0.25rem;
3059
- }
3060
-
3061
- :host([vertical]) div::before,
3062
- :host([vertical]) div::after {
3063
- border-top: none;
3064
- border-left: var(--sc-divider-border-width) var(--sc-divider-border-style) var(--sc-divider-border-color);
3065
- width: auto;
3066
- height: 100%;
3067
- opacity: var(--sc-divider-opacity, 1);
3068
- }
3069
-
3070
- :host([noMargin]) {
3071
- margin: 0;
3072
- }
3073
-
3074
- /*TEXT*/
3075
- .text {
3076
- flex-shrink: 0;
3077
- line-height: 1.1;
3078
- max-width: 80%;
3079
- }
3080
-
3081
- .no-text .text {
3082
- display: none;
3083
- }
3084
-
3085
- .has-text {
3086
- gap: 0.5rem;
3087
- }
3088
-
3089
- :host([dotted]) {
3090
- --sc-divider-border-style: dotted;
3091
- }
3092
- :host([dashed]) {
3093
- --sc-divider-border-style: dashed;
3094
- }
3095
- `],Vn([q({flatten:!0})],Bn.prototype,"slotNodes",2),Vn([B("div")],Bn.prototype,"divider",2),Vn([F({type:String})],Bn.prototype,"label",2),Vn([F({type:String,reflect:!0})],Bn.prototype,"size",2),Vn([F({type:String,reflect:!0})],Bn.prototype,"align",2),Vn([F({type:Boolean,reflect:!0})],Bn.prototype,"vertical",2),Vn([F({type:Boolean,reflect:!0})],Bn.prototype,"noMargin",2),Vn([F({type:Boolean,reflect:!0})],Bn.prototype,"dashed",2),Vn([F({type:Boolean,reflect:!0})],Bn.prototype,"dotted",2),Bn=Vn([b("sonic-divider")],Bn);var Hn=Object.defineProperty,qn=Object.getOwnPropertyDescriptor;let Wn=class extends Zt{render(){return pt`
3096
- <div>
3097
- <slot></slot>
3098
- </div>
3099
- `}};Wn.styles=[x`
3100
- div {
3101
- margin-top: 0.1em;
3102
- font-family: var(--sc-font-family-base);
3103
- font-size: 0.7em;
3104
- font-weight: var(--sc-font-style-base);
3105
- }
3106
- `],Wn=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?qn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Hn(e,s,o),o})([b("sonic-card-header-description")],Wn);var Kn=Object.defineProperty,Zn=Object.getOwnPropertyDescriptor,Yn=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Zn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Kn(e,s,o),o};let Gn=class extends Zt{render(){return pt`
3107
- <div class="header">
3108
- <div class="header-content">
3109
- ${ne(this.label)}
3110
- ${this.description?pt`<sonic-card-header-description>${ne(this.description)}</sonic-card-header-description>`:""}
3111
- <slot></slot>
3112
- </div>
3113
- <slot name="suffix"></slot>
3114
- </div>
3115
- `}};Gn.styles=[x`
3116
- :host {
3117
- --sc-card-header-mb: 1.35rem;
3118
- --sc-card-header-font-size: 1.875rem;
3119
- --sc-card-header-font-weight: var(--sc-headings-font-weight);
3120
- --sc-card-header-font-style: var(--sc-headings-font-style);
3121
- --sc-card-header-family: var(--sc-headings-font-family);
3122
- --sc-card-header-line-height: var(--sc-headings-line-height);
3123
- }
3124
- @media print {
3125
- :host {
3126
- --sc-card-header-font-size: 1.45rem;
3127
- }
3128
- }
3129
- .header {
3130
- display: flex;
3131
- align-items: flex-start;
3132
- gap: 0.5em 1em;
3133
- margin-bottom: var(--sc-card-header-mb);
3134
- line-height: var(--sc-card-header-line-height);
3135
- font-family: var(--sc-card-header-font-family);
3136
- font-size: var(--sc-card-header-font-size);
3137
- font-style: var(--sc-card-header-font-style);
3138
- font-weight: var(--sc-card-header-font-weight);
3139
- }
3140
-
3141
- .header-content {
3142
- flex-grow: 1;
3143
- }
3144
-
3145
- slot[name="suffix"] {
3146
- flex-shrink: 0;
3147
- }
3148
- `],Yn([F()],Gn.prototype,"label",2),Yn([F()],Gn.prototype,"description",2),Gn=Yn([b("sonic-card-header")],Gn);var Qn=Object.defineProperty,Jn=Object.getOwnPropertyDescriptor;let Xn=class extends Zt{render(){return pt`
3149
- <div>
3150
- <slot></slot>
3151
- </div>
3152
- `}};Xn=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Jn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Qn(e,s,o),o})([b("sonic-card-main")],Xn);var ta=Object.defineProperty,ea=Object.getOwnPropertyDescriptor;let sa=class extends Zt{render(){return pt` <slot></slot> `}};sa=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?ea(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ta(e,s,o),o})([b("sonic-card-footer")],sa);var ia=Object.defineProperty,ra=Object.getOwnPropertyDescriptor,oa=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?ra(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ia(e,s,o),o};let na=class extends Zt{constructor(){super(...arguments),this.type="default"}render(){return pt`
3153
- <div part="card" class="card">
3154
- <slot></slot>
3155
- </div>
3156
- `}};na.styles=[x`
3157
- * {
3158
- box-sizing: border-box;
3159
- }
3160
- :host {
3161
- --sc-card-padding: 1.5rem;
3162
- --sc-card-color: var(--sc-base-content);
3163
- --sc-card-bg: var(--sc-base);
3164
- --sc-card-rounded: var(--sc-rounded-lg);
3165
- --sc-card-shadow: var(--sc-shadow-lg);
3166
- -webkit-print-color-adjust: exact;
3167
- }
3168
-
3169
- @media print {
3170
- .card {
3171
- page-break-inside: avoid;
3172
- break-inside: avoid;
3173
- box-shadow: none !important;
3174
- border: 1px solid var(--sc-base-200);
3175
- }
3176
- }
3177
-
3178
- .card {
3179
- padding: var(--sc-card-padding);
3180
- background-color: var(--sc-card-bg);
3181
- border-radius: var(--sc-card-rounded);
3182
- box-shadow: var(--sc-card-shadow);
3183
- color: var(--sc-card-color);
3184
- }
3185
-
3186
- /*TYPES*/
3187
- :host([type="primary"]) {
3188
- --sc-card-bg: var(--sc-primary);
3189
- --sc-card-color: var(--sc-primary-content);
3190
- --sc-border-color: var(--sc-primary-content);
3191
- --sc-divider-opacity: 0.2;
3192
- }
3193
- :host([type="warning"]) {
3194
- --sc-card-bg: var(--sc-warning);
3195
- --sc-card-color: var(--sc-warning-content);
3196
- --sc-border-color: var(--sc-primary-content);
3197
- --sc-divider-opacity: 0.2;
3198
- }
3199
- :host([type="danger"]) {
3200
- --sc-card-bg: var(--sc-danger);
3201
- --sc-card-color: var(--sc-danger-content);
3202
- --sc-border-color: var(--sc-primary-content);
3203
- --sc-divider-opacity: 0.2;
3204
- }
3205
- :host([type="info"]) {
3206
- --sc-card-bg: var(--sc-info);
3207
- --sc-card-color: var(--sc-info-content);
3208
- --sc-border-color: var(--sc-primary-content);
3209
- --sc-divider-opacity: 0.2;
3210
- }
3211
- :host([type="success"]) {
3212
- --sc-card-bg: var(--sc-success);
3213
- --sc-card-color: var(--sc-success-content);
3214
- --sc-border-color: var(--sc-primary-content);
3215
- --sc-divider-opacity: 0.2;
3216
- }
3217
-
3218
- :host([type="light"]) {
3219
- --sc-card-bg: var(--sc-base-100);
3220
- --sc-card-color: var(--sc-base-content);
3221
- }
3222
-
3223
- :host([type="neutral"]) {
3224
- --sc-card-bg: var(--sc-base-content);
3225
- --sc-card-color: var(--sc-base);
3226
- }
3227
-
3228
- :host([type="invert"]) {
3229
- --sc-card-color: var(--sc-base);
3230
- --sc-card-bg: var(--sc-base-900);
3231
- }
3232
- `],oa([F({type:String,reflect:!0})],na.prototype,"type",2),na=oa([b("sonic-card")],na);const aa=x`
3233
- :host {
3234
- --sc-color: inherit;
3235
- color: var(--sc-color);
3236
- }
3237
-
3238
- :host([type="primary"]) {
3239
- --sc-color: var(--sc-primary);
3240
- }
3241
- :host([type="warning"]) {
3242
- --sc-color: var(--sc-warning);
3243
- }
3244
- :host([type="danger"]) {
3245
- --sc-color: var(--sc-danger);
3246
- }
3247
- :host([type="info"]) {
3248
- --sc-color: var(--sc-info);
3249
- }
3250
- :host([type="success"]) {
3251
- --sc-color: var(--sc-success);
3252
- }
3253
-
3254
- .inherit-color {
3255
- color: var(--sc-color);
3256
- }
3257
- `;x`
3258
- :host {
3259
- --sc-color: inherit;
3260
- --sc-bg: inherit;
3261
- color: var(--sc-color);
3262
- background: var(--sc-bg);
3263
- }
3264
-
3265
- :host([type="primary"]) {
3266
- --sc-color: var(--sc-primary-content);
3267
- --sc-bg: var(--sc-primary);
3268
- }
3269
- :host([type="warning"]) {
3270
- --sc-color: var(--sc-warning-content);
3271
- --sc-bg: var(--sc-warning);
3272
- }
3273
- :host([type="danger"]) {
3274
- --sc-color: var(--sc-danger-content);
3275
- --sc-bg: var(--sc-danger);
3276
- }
3277
- :host([type="info"]) {
3278
- --sc-color: var(--sc-info-content);
3279
- --sc-bg: var(--sc-info);
3280
- }
3281
- :host([type="success"]) {
3282
- --sc-color: var(--sc-success-content);
3283
- --sc-bg: var(--sc-success);
3284
- }
3285
-
3286
- .inherit-bg {
3287
- color: inherit;
3288
- }
3289
- `;var la=Object.defineProperty,ca=Object.getOwnPropertyDescriptor,ha=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?ca(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&la(e,s,o),o};let da=class extends(fe(Zt)){constructor(){super(...arguments),this._metadata_={}}willUpdate(t){t.has("_metadata_")&&(this.even=!!this._metadata_.even,this.odd=!!this._metadata_.odd,this.last=!!this._metadata_.lastChild),super.willUpdate(t)}render(){return pt`<slot></slot>`}};da.styles=[aa,x`
3290
- :host {
3291
- display: table-row;
3292
- }
3293
-
3294
- :host([odd]) {
3295
- background: var(--sc-table-accent-bg) !important;
3296
- }
3297
- :host([even]) {
3298
- background: var(--sc-table-bg) !important;
3299
- }
3300
-
3301
- :host([last]) {
3302
- --sc-table-td-border-b: none;
3303
- }
3304
- :host(:hover) {
3305
- background: var(--sc-table-hover-bg) !important;
3306
- }
3307
- `],ha([F({type:Object})],da.prototype,"_metadata_",2),ha([F({type:Boolean,reflect:!0})],da.prototype,"even",2),ha([F({type:Boolean,reflect:!0})],da.prototype,"odd",2),ha([F({type:Boolean,reflect:!0})],da.prototype,"last",2),da=ha([b("sonic-tr")],da);var pa=Object.defineProperty,ua=Object.getOwnPropertyDescriptor,ga=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?ua(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&pa(e,s,o),o};let ba=class extends Zt{render(){const t={textAlign:this.align,minWidth:this.minWidth,maxWidth:this.maxWidth,width:this.width};return pt`<th part="th" style=${$e(t)} colspan=${is(this.colSpan)} rowspan=${is(this.rowSpan)}>
3308
- <slot></slot>
3309
- </th> `}};ba.styles=[aa,x`
3310
- :host {
3311
- display: contents;
3312
- background: var(--sc-table-bg);
3313
- position: sticky;
3314
- top: 0;
3315
- z-index: 20;
3316
- }
3317
-
3318
- th {
3319
- all: inherit;
3320
- display: table-cell;
3321
- border-bottom: calc(var(--sc-border-width) * 1.5) solid var(--sc-table-border-color);
3322
- text-transform: var(--sc-table-th-tt);
3323
- font-weight: var(--sc-table-th-fw);
3324
- font-size: var(--sc-table-th-fs);
3325
- padding: var(--sc-table-th-py) var(--sc-table-th-px);
3326
- }
3327
-
3328
- :host([noBorder]) th {
3329
- border-bottom: none;
3330
- }
3331
- `],ga([F({type:Number})],ba.prototype,"colSpan",2),ga([F({type:Number})],ba.prototype,"rowSpan",2),ga([F({type:String})],ba.prototype,"align",2),ga([F({type:String})],ba.prototype,"minWidth",2),ga([F({type:String})],ba.prototype,"maxWidth",2),ga([F({type:String})],ba.prototype,"width",2),ba=ga([b("sonic-th")],ba);var fa=Object.defineProperty,ma=Object.getOwnPropertyDescriptor,va=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?ma(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&fa(e,s,o),o};let ya=class extends Zt{render(){const t={textAlign:this.align,verticalAlign:this.vAlign,minWidth:this.minWidth,maxWidth:this.maxWidth,width:this.width};return pt`<td part="td" style=${$e(t)} colspan=${is(this.colSpan)} rowspan=${is(this.rowSpan)}>
3332
- <slot></slot>
3333
- </td>`}};ya.styles=[aa,x`
3334
- :host {
3335
- display: contents;
3336
- }
3337
- td {
3338
- all: inherit;
3339
- display: table-cell;
3340
- padding: var(--sc-table-td-py) var(--sc-table-td-px);
3341
- border-top: var(--sc-table-td-border-t, none);
3342
- border-bottom: var(--sc-table-td-border-b, none);
3343
- border-right: var(--sc-table-td-border-r, none);
3344
- border-left: var(--sc-table-td-border-l, none);
3345
- }
3346
- `],va([F({type:Number})],ya.prototype,"colSpan",2),va([F({type:Number})],ya.prototype,"rowSpan",2),va([F({type:String})],ya.prototype,"align",2),va([F({type:String})],ya.prototype,"vAlign",2),va([F({type:String})],ya.prototype,"minWidth",2),va([F({type:String})],ya.prototype,"maxWidth",2),va([F({type:String})],ya.prototype,"width",2),ya=va([b("sonic-td")],ya);var wa=Object.defineProperty,xa=Object.getOwnPropertyDescriptor;let _a=class extends Zt{render(){return pt`<slot></slot>`}};_a.styles=[x`
3347
- :host {
3348
- display: table-header-group;
3349
- }
3350
- `],_a=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?xa(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&wa(e,s,o),o})([b("sonic-thead")],_a);var ka=Object.defineProperty,Aa=Object.getOwnPropertyDescriptor;let Pa=class extends Zt{render(){return pt`<tbody part="tbody">
3351
- <slot></slot>
3352
- </tbody>`}};Pa.styles=[x`
3353
- :host {
3354
- display: table-row-group;
3355
- }
3356
-
3357
- ::slotted(sonic-tr:nth-child(odd)) {
3358
- background: var(--sc-table-accent-bg);
3359
- }
3360
-
3361
- ::slotted(sonic-tr:hover) {
3362
- background: var(--sc-table-hover-bg);
3363
- }
3364
-
3365
- ::slotted(sonic-tr:not(:last-child)) {
3366
- border-bottom: var(--sc-form-border-width) solid var(--sc-base-200) !important;
3367
- }
3368
- `],Pa=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Aa(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ka(e,s,o),o})([b("sonic-tbody")],Pa);var Ca=Object.defineProperty,Sa=Object.getOwnPropertyDescriptor;let $a=class extends Zt{render(){return pt`<tfoot>
3369
- <slot></slot>
3370
- </tfoot>`}};$a.styles=[x`
3371
- :host {
3372
- display: contents;
3373
- }
3374
- `],$a=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Sa(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Ca(e,s,o),o})([b("sonic-tfoot")],$a);var Oa=Object.defineProperty,Da=Object.getOwnPropertyDescriptor;let La=class extends Zt{render(){return pt`<slot></slot>`}};La.styles=[x`
3375
- :host {
3376
- display: table-caption;
3377
- font-size: 0.75rem;
3378
- color: var(--sc-table-caption-color);
3379
- padding: var(--sc-table-td-py) var(--sc-table-td-px) calc(2 * var(--sc-table-td-py));
3380
- }
3381
- `],La=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Da(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Oa(e,s,o),o})([b("sonic-caption")],La);var Ea=Object.defineProperty,ja=Object.getOwnPropertyDescriptor,Ma=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?ja(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Ea(e,s,o),o};let Ia=class extends Zt{constructor(){super(...arguments),this.bordered=!1,this.rounded=!1,this.noCustomScroll=!1}render(){const t={maxHeight:this.maxHeight};return pt`
3382
- <div class="table-container ${this.noCustomScroll?"":"custom-scroll"}" style=${$e(t)}>
3383
- <div class="table">
3384
- <slot></slot>
3385
- </div>
3386
- </div>
3387
- `}};Ia.styles=[Ts,rs,x`
3388
- :host {
3389
- --sc-table-fw: var(--sc-font-weight-base);
3390
- --sc-table-fst: var(--sc-font-style-base);
3391
- --sc-table-fs: 1rem;
3392
- --sc-table-border-color: var(--sc-border-color);
3393
- --sc-table-caption-color: var(--sc-base-500);
3394
- --sc-table-bg: var(--sc-base);
3395
- --sc-table-accent-bg: var(--sc-base-50);
3396
- --sc-table-hover-bg: var(--sc-base-100);
3397
- --sc-table-th-fs: 0.85em;
3398
- --sc-table-th-fw: bold;
3399
- --sc-table-th-tt: uppercase;
3400
- --sc-table-th-px: var(--sc-table-td-px);
3401
- --sc-table-th-py: calc(1.8 * var(--sc-table-td-py));
3402
- --sc-table-td-px: 0.5em;
3403
- --sc-table-td-py: 0.5em;
3404
- display: block;
3405
- }
3406
-
3407
- :host([maxHeight]) .table-container {
3408
- overflow-x: auto;
3409
- -webkit-overflow-scrolling: touch;
3410
- }
3411
-
3412
- :host(:not([maxHeight])) .table-container {
3413
- overflow: initial !important;
3414
- }
3415
-
3416
- .table {
3417
- width: 100%;
3418
- display: table;
3419
- box-sizing: border-box;
3420
- }
3421
-
3422
- :host([bordered]) .table-container {
3423
- border: var(--sc-border-width) solid var(--sc-table-border-color);
3424
- border-radius: var(--sc-rounded);
3425
- --sc-table-td-border-b: var(--sc-border-width) solid var(--sc-table-border-color);
3426
- }
3427
- `],Ma([F({type:String,reflect:!0})],Ia.prototype,"size",2),Ma([F({type:Boolean,reflect:!0})],Ia.prototype,"bordered",2),Ma([F({type:Boolean,reflect:!0})],Ia.prototype,"rounded",2),Ma([F({type:Boolean,reflect:!0})],Ia.prototype,"noCustomScroll",2),Ma([F({type:String})],Ia.prototype,"maxHeight",2),Ia=Ma([b("sonic-table")],Ia);var Ta=Object.defineProperty,Na=Object.getOwnPropertyDescriptor,za=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Na(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Ta(e,s,o),o};let Ra=class extends(gi(Zt)){constructor(){super(...arguments),this.key="",this.action=null,this.zIndex=9999,this.onCaptchaTokenChanged=t=>{"request_token"==t&&(this.formPublisher&&(this.formPublisher.captchaToken=""),this.requestToken())}}connectedCallback(){if(!document.getElementById("captcha-"+this.key)){const t=document.createElement("script");t.src="https://www.google.com/recaptcha/api.js?render="+this.key,t.id="captcha-"+this.key,document.head.appendChild(t)}if(super.connectedCallback(),this.formPublisher=Ge.get(this.getAncestorAttributeValue("headersDataProvider")??this.getAncestorAttributeValue("formDataProvider")),!document.getElementById("concorde-recaptcha-css")){const t=document.createElement("style");t.innerHTML=".grecaptcha-badge {z-index: 9999;}",t.id="concorde-recaptcha-css",document.head.appendChild(t)}this.formPublisher&&!this.formPublisher.captchaToken.get()&&(this.formPublisher.needsCaptchaValidation=!0,this.formPublisher.captchaToken.onAssign(this.onCaptchaTokenChanged))}disconnectedCallback(){this.formPublisher&&this.formPublisher.captchaToken.offAssign(this.onCaptchaTokenChanged),super.disconnectedCallback()}requestToken(){var t,e;if(!this.formPublisher)return;const s=(this.action??(null==(t=this.formPublisher.captchaAction)?void 0:t.get())??"submit").replace(/[^\w_/]/g,"_"),i=((null==(e=this.formPublisher.captchaMethod)?void 0:e.get())??"POST").toUpperCase();delete this.formPublisher.captchaAction,delete this.formPublisher.captchaMethod,window.grecaptcha.ready((()=>{window.grecaptcha.execute(this.key,{action:i+"//"+s}).then((t=>{this.formPublisher&&(this.formPublisher.captchaToken=t)}))}))}render(){return pt` <slot></slot> `}};function Fa(t){this.__connectedCallbackCalls__||(this.__connectedCallbackCalls__=new Set),this.__connectedCallbackCalls__.add(t)}function Ua(t){this.__disconnectedCallbackCalls__||(this.__disconnectedCallbackCalls__=new Set),this.__disconnectedCallbackCalls__.add(t)}function Va(t){if(t.__is__setSubscribable__)return;t.__is__setSubscribable__=!0,t.__onConnected__=Fa,t.__onDisconnected__=Ua;const e=t.connectedCallback;t.connectedCallback=function(){e.call(this),this.__connectedCallbackCalls__&&this.__connectedCallbackCalls__.forEach((t=>t(this)))};const s=t.disconnectedCallback;t.disconnectedCallback=function(){s.call(this),this.__disconnectedCallbackCalls__&&this.__disconnectedCallbackCalls__.forEach((t=>t(this)))}}za([F()],Ra.prototype,"key",2),za([F()],Ra.prototype,"action",2),za([F({type:Number})],Ra.prototype,"zIndex",2),Ra=za([b("sonic-captcha")],Ra),window.SonicPublisherManager||(window.SonicPublisherManager=l),window.SonicDataBindObserver||(window.SonicDataBindObserver=u),window.queueMicrotask=window.queueMicrotask||function(t){Promise.resolve().then(t).catch((t=>setTimeout((()=>{throw t}))))},window["concorde-decorator-subscriber"]=window["concorde-decorator-subscriber"]||{},window["concorde-decorator-subscriber"]={bind:function(t){const e=t.split(".");if(0==e.length)return function(){};const s=e.shift()||"";let i=l.get(s);return i=Ze.traverse(i,e),function(t,e){if(!t)return;let s;Va(t),t.__onConnected__((t=>{s=s=>{t[e]=s},i.onAssign(s)})),t.__onDisconnected__((()=>{i.offAssign(s)}))}},onAssing:function(...t){const e=[],s=[];for(let i=0;i<t.length;i++){const r=t[i].split(".");if(0==r.length)continue;const o=r.shift()||"";let n=l.get(o);n=Ze.traverse(n,r);const a=new Set,c=s=>{e[i]=s,e.filter((t=>null!==t)).length==t.length&&a.forEach((t=>t(...e)))};s.push({publisher:n,onAssign:c,callbacks:a})}return function(t,e,i){let r;Va(t),t.__onConnected__((t=>{for(const e of s)r=i.value.bind(t),e.callbacks.add(r),e.publisher.onAssign(e.onAssign)})),t.__onDisconnected__((()=>{for(const t of s)t.callbacks.delete(r),t.publisher.offAssign(t.onAssign)}))}}},window["concorde-directives-data-provider"]=window["concorde-directives-data-provider"]||{},window["concorde-directives-data-provider"]={dp:se,dataProvider:ee,sub:Xt,subscribe:Jt,get:t=>Gt(t).values().next().value.get(),set:(t,e)=>{Gt(t).values().next().value.set(e)}};const Ba=Xs,Ha=Cn;window["concorde-components"]=window["concorde-components"]||{},window["concorde-components"]={SonicToast:Ba,SonicModal:Ha},window.concordeIsLoaded=!0,window.dispatchEvent(new CustomEvent("concorde-loaded"))}));