@webority/ui-elements 0.171.3 → 0.172.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (277) hide show
  1. package/dist/WuiCarousel-CFKmFVzc.js +1 -0
  2. package/dist/{WuiCodeBlock-Du-JZO3A.js → WuiCodeBlock-fBc3Uwsw.js} +1 -1
  3. package/dist/{WuiCommandPalette-BKW0e-ho.js → WuiCommandPalette-BQCy0bon.js} +2 -2
  4. package/dist/WuiCommentThread-jy4rMc9Q.js +1 -0
  5. package/dist/WuiConsentBanner-DlAE3DTf.js +1 -0
  6. package/dist/WuiContextMenu-hLeCs0qw.js +1 -0
  7. package/dist/WuiDataTable-B-JaTsrI.js +1 -0
  8. package/dist/WuiDatePicker-4tdWakGX.js +1 -0
  9. package/dist/WuiDateRange-D7LJuY2F.js +1 -0
  10. package/dist/WuiDateTime-BSJfyZ0q.js +1 -0
  11. package/dist/{WuiDock-d5abaLkL.js → WuiDock-2LGlbEFx.js} +1 -1
  12. package/dist/{WuiDrawer-BMkPnEFz.js → WuiDrawer-D-XfW1kl.js} +1 -1
  13. package/dist/{WuiDropdown-B9WeT-gH.js → WuiDropdown-5-6E5Q9d.js} +1 -1
  14. package/dist/{WuiEntryGrid-Bm5_MizA.js → WuiEntryGrid-DkW0tIDy.js} +1 -1
  15. package/dist/WuiGantt-XMvgsZsn.js +1 -0
  16. package/dist/{WuiHoverCard-D6JBAqdW.js → WuiHoverCard-DhJcIIM1.js} +1 -1
  17. package/dist/WuiImageCrop-CIAjHOGk.js +1 -0
  18. package/dist/WuiInlineEdit-C9FxCWCk.js +1 -0
  19. package/dist/WuiLeadPopup-KyguGV-q.js +345 -0
  20. package/dist/WuiLightbox-CBiqJmGE.js +1 -0
  21. package/dist/WuiMarkdown-DsN4YbiZ.js +4 -0
  22. package/dist/WuiMentionInput-CktKQjQc.js +1 -0
  23. package/dist/{WuiModal-DMGgOCBU.js → WuiModal-DQbVJGUo.js} +1 -1
  24. package/dist/WuiNavigationMenu-KdW7yuLn.js +1 -0
  25. package/dist/{WuiNotificationCenter-DgcJYPV3.js → WuiNotificationCenter-DZariS2K.js} +1 -1
  26. package/dist/WuiOrgTree-CFxoY9Vr.js +1 -0
  27. package/dist/WuiOtp-Cc0formv.js +1 -0
  28. package/dist/{WuiOverflow-MzrZwzud.js → WuiOverflow-CXYk2ubC.js} +1 -1
  29. package/dist/WuiPhone-BI438y4S.js +1 -0
  30. package/dist/{WuiPopover-BYO_H-fk.js → WuiPopover-BvWKRNQY.js} +1 -1
  31. package/dist/{WuiRating-DLVduJZ_.js → WuiRating-DIQfif9x.js} +1 -1
  32. package/dist/{WuiRecordPager-Dye7AfCS.js → WuiRecordPager-DAyoD650.js} +1 -1
  33. package/dist/{WuiRelativeTime-CujAFS_w.js → WuiRelativeTime-CPzs4tjM.js} +1 -1
  34. package/dist/WuiSavedViews-BAqHgVj2.js +1 -0
  35. package/dist/WuiSelect-htggZB0v.js +1 -0
  36. package/dist/{WuiShortcuts-Crj8lFVz.js → WuiShortcuts-DWzmRKEG.js} +1 -1
  37. package/dist/{WuiShowMore-CGhWrlmK.js → WuiShowMore-DyfGnrob.js} +1 -1
  38. package/dist/WuiSlider-LE2wquOo.js +1 -0
  39. package/dist/WuiSortable-DxwYjicc.js +1 -0
  40. package/dist/WuiTimePicker-xrPYytjq.js +1 -0
  41. package/dist/WuiTour-D-H5sMJS.js +1 -0
  42. package/dist/WuiTree-BnlK9fYL.js +1 -0
  43. package/dist/WuiTreePicker-Bx9nvRrC.js +1 -0
  44. package/dist/{WuiWhatsNew-DjnQWqlF.js → WuiWhatsNew-Dm4Yl68x.js} +1 -1
  45. package/dist/WuiWizardStep-n8Ge5GDI.js +1 -0
  46. package/dist/anchorOverlay-daGdh_91.js +1 -0
  47. package/dist/avatarNode-BaEvz5Xr.js +1 -0
  48. package/dist/{calendarMath-DIoh4HjR.js → calendarMath-rI1aBVRd.js} +1 -1
  49. package/dist/chips-DrTvHdbb.js +2 -0
  50. package/dist/{dataTable-oR_YiFJc.js → dataTable-Bz6HxUx0.js} +1 -1
  51. package/dist/dataTable.g-DazoWWps.js +1 -0
  52. package/dist/datePicker.g-sGQE8c3n.js +1 -0
  53. package/dist/dom-DMQu--xV.js +1 -0
  54. package/dist/drawerDiscard-B33Oc_Sv.js +1 -0
  55. package/dist/elements/carousel.js +1 -1
  56. package/dist/elements/code-block.js +1 -1
  57. package/dist/elements/command-palette.js +1 -1
  58. package/dist/elements/comment-thread.js +1 -1
  59. package/dist/elements/consent-banner.js +1 -1
  60. package/dist/elements/context-menu.js +1 -1
  61. package/dist/elements/data-table.js +1 -1
  62. package/dist/elements/date-range.js +1 -1
  63. package/dist/elements/date-time.js +1 -0
  64. package/dist/elements/datepicker.js +1 -1
  65. package/dist/elements/dock.js +1 -1
  66. package/dist/elements/drawer.js +1 -1
  67. package/dist/elements/dropdown.js +1 -1
  68. package/dist/elements/entry-grid.js +1 -1
  69. package/dist/elements/filter-popover.js +1 -1
  70. package/dist/elements/gantt.js +1 -1
  71. package/dist/elements/hover-card.js +1 -1
  72. package/dist/elements/image-crop.js +1 -1
  73. package/dist/elements/inline-edit.js +1 -1
  74. package/dist/elements/kanban.js +1 -1
  75. package/dist/elements/lead-popup.js +1 -1
  76. package/dist/elements/lightbox.js +1 -1
  77. package/dist/elements/markdown.js +1 -1
  78. package/dist/elements/mention-input.js +1 -1
  79. package/dist/elements/modal.js +1 -1
  80. package/dist/elements/navigation-menu.js +1 -1
  81. package/dist/elements/notification-center.js +1 -1
  82. package/dist/elements/org-tree.js +1 -1
  83. package/dist/elements/otp.js +1 -1
  84. package/dist/elements/overflow.js +1 -1
  85. package/dist/elements/phone.js +1 -1
  86. package/dist/elements/popover.js +1 -1
  87. package/dist/elements/rating.js +1 -1
  88. package/dist/elements/record-pager.js +1 -1
  89. package/dist/elements/relative-time.js +1 -1
  90. package/dist/elements/saved-views.js +1 -1
  91. package/dist/elements/select.js +1 -1
  92. package/dist/elements/shortcuts.js +1 -1
  93. package/dist/elements/show-more.js +1 -1
  94. package/dist/elements/slider.js +1 -1
  95. package/dist/elements/sortable.js +1 -1
  96. package/dist/elements/status-icon.js +1 -1
  97. package/dist/elements/timepicker.js +1 -1
  98. package/dist/elements/tour.js +1 -1
  99. package/dist/elements/tree-picker.js +1 -1
  100. package/dist/elements/tree.js +1 -1
  101. package/dist/elements/whats-new.js +1 -1
  102. package/dist/elements/wizard.js +1 -1
  103. package/dist/fileViewer.g-B6N9K2xi.js +1 -0
  104. package/dist/{fileViewerImage-uL9m83k1.js → fileViewerImage-ItX9j9U9.js} +2 -2
  105. package/dist/fileViewerMedia-BCqp2Z96.js +1 -0
  106. package/dist/{fileViewerPdf-BsSc-9fL.js → fileViewerPdf-aaI2R2nB.js} +2 -2
  107. package/dist/{filterPopover-C_oDfQBg.js → filterPopover-D7LGrhnO.js} +1 -1
  108. package/dist/formatters-DikbTYA4.js +1 -0
  109. package/dist/helpers.js +1 -1
  110. package/dist/iconGlyphs.g-P04RJkSE.js +1 -0
  111. package/dist/{inlineEditText-CGaAKZhR.js → inlineEditText-C6g6qhye.js} +1 -1
  112. package/dist/kanban-CX6DyApZ.js +1 -0
  113. package/dist/{kanbanModel-sAwpMCpn.js → kanbanModel-CuMgMnSc.js} +1 -1
  114. package/dist/loader-B3lirubB.js +1 -0
  115. package/dist/{nativeOverlay-DGady-wN.js → nativeOverlay-BHD2QV02.js} +1 -1
  116. package/dist/{notificationDays-DQlrEZ3z.js → notificationDays-grsj1DtM.js} +1 -1
  117. package/dist/optionLabel-CmrOSHbD.js +1 -0
  118. package/dist/{relativeTime-CQuwuwZ-.js → relativeTime-vdCXtfKg.js} +1 -1
  119. package/dist/rtl-g7G8Bsib.js +1 -0
  120. package/dist/{search-w5M6FzD9.js → search-DwboX91o.js} +1 -1
  121. package/dist/server.js +1 -1
  122. package/dist/serverHtml-BC6tAyAl.js +1 -0
  123. package/dist/{shortcutKeys-DmPiY4T7.js → shortcutKeys-6iLc6oDR.js} +1 -1
  124. package/dist/statusIcons-Cd3GJcBR.js +1 -0
  125. package/dist/svgNodes-CyPS2oFH.js +1 -0
  126. package/dist/tableExport-D1OdFVQj.js +2 -0
  127. package/dist/tableSelect.g-Bmd-ExRE.js +1 -0
  128. package/dist/text/en.json +14 -2
  129. package/dist/text.js +1 -1
  130. package/dist/{themeTransition-CA1qzCZk.js → themeTransition-D7HJ4A4m.js} +1 -1
  131. package/dist/ui-calendar.global.js +1 -1
  132. package/dist/ui-calendar.js +1 -1
  133. package/dist/ui-chart.global.js +15 -15
  134. package/dist/ui-chart.js +10 -10
  135. package/dist/ui-consent-banner.global.js +1 -1
  136. package/dist/ui-elements/carousel.global.js +1 -1
  137. package/dist/ui-elements/code-block.global.js +1 -1
  138. package/dist/ui-elements/command-palette.global.js +2 -2
  139. package/dist/ui-elements/comment-thread.global.js +1 -1
  140. package/dist/ui-elements/consent-banner.global.js +1 -1
  141. package/dist/ui-elements/context-menu.global.js +1 -1
  142. package/dist/ui-elements/date-range.global.js +1 -25
  143. package/dist/ui-elements/date-time.global.js +1 -0
  144. package/dist/ui-elements/datepicker.global.js +1 -0
  145. package/dist/ui-elements/drawer.global.js +1 -1
  146. package/dist/ui-elements/dropdown.global.js +1 -1
  147. package/dist/ui-elements/entry-grid.global.js +1 -1
  148. package/dist/ui-elements/gantt.global.js +1 -1
  149. package/dist/ui-elements/glyphs.global.js +1 -1
  150. package/dist/ui-elements/image-crop.global.js +1 -17
  151. package/dist/ui-elements/inline-edit.global.js +1 -1
  152. package/dist/ui-elements/kanban.global.js +1 -1
  153. package/dist/ui-elements/lead-popup.global.js +40 -77
  154. package/dist/ui-elements/lightbox.global.js +1 -1
  155. package/dist/ui-elements/markdown.global.js +3 -3
  156. package/dist/ui-elements/org-tree.global.js +1 -1
  157. package/dist/ui-elements/phone.global.js +1 -16
  158. package/dist/ui-elements/popover.global.js +1 -1
  159. package/dist/ui-elements/saved-views.global.js +1 -1
  160. package/dist/ui-elements/select-chips.global.js +2 -2
  161. package/dist/ui-elements/select-recents.global.js +1 -1
  162. package/dist/ui-elements/select-search.global.js +1 -1
  163. package/dist/ui-elements/select-window.global.js +1 -1
  164. package/dist/ui-elements/slider.global.js +1 -51
  165. package/dist/ui-elements/sortable.global.js +1 -1
  166. package/dist/ui-elements/status-icon.global.js +1 -10
  167. package/dist/ui-elements/table-export.global.js +2 -0
  168. package/dist/ui-elements/timepicker.global.js +1 -9
  169. package/dist/ui-elements/tour.global.js +1 -1
  170. package/dist/ui-elements/tree-picker.global.js +1 -1
  171. package/dist/ui-elements/tree.global.js +1 -1
  172. package/dist/ui-elements/wizard.global.js +1 -1
  173. package/dist/ui-elements.global.js +1 -55
  174. package/dist/ui-elements.js +1 -1
  175. package/dist/ui-file-viewer.global.js +11 -11
  176. package/dist/ui-file-viewer.js +1 -1
  177. package/dist/ui-lead-popup.global.js +1 -1
  178. package/dist/ui-rich-text.global.js +53 -63
  179. package/dist/ui-rich-text.js +53 -63
  180. package/dist/ui-tour.global.js +1 -1
  181. package/dist/wuiHttp-BWf9dDsZ.js +1 -0
  182. package/dist/zone-BR02ZkHF.js +1 -0
  183. package/package.json +10 -6
  184. package/types/WuiCommandPalette.d.ts +0 -60
  185. package/types/WuiDataTable.d.ts +2 -0
  186. package/types/WuiDatePicker.d.ts +6 -4
  187. package/types/WuiDateRange.d.ts +2 -2
  188. package/types/WuiDateTime.d.ts +26 -0
  189. package/types/WuiInlineEdit.d.ts +1 -1
  190. package/types/WuiLeadPopup.d.ts +1 -1
  191. package/types/WuiMarkdown.d.ts +4 -4
  192. package/types/WuiNavigationMenu.d.ts +30 -0
  193. package/types/WuiOrgTree.d.ts +12 -0
  194. package/types/WuiTimePicker.d.ts +1 -1
  195. package/types/WuiTree.d.ts +58 -0
  196. package/types/WuiTreePicker.d.ts +38 -0
  197. package/types/WuiWizard.d.ts +3 -3
  198. package/types/anchorOverlay.d.ts +3 -1
  199. package/types/{avatarHtml.d.ts → avatarNode.d.ts} +3 -3
  200. package/types/chartSpec.d.ts +10 -1
  201. package/types/dom.d.ts +7 -0
  202. package/types/elements/date-time.d.ts +2 -0
  203. package/types/global/core.d.ts +2 -3
  204. package/types/global/glyphs.d.ts +5 -4
  205. package/types/global/parts/table-export.d.ts +1 -0
  206. package/types/global/shared.d.ts +12 -2
  207. package/types/global/tableExport.d.ts +6 -0
  208. package/types/globals.d.ts +3 -1
  209. package/types/helpers.d.ts +3 -2
  210. package/types/iconGlyphs.g.d.ts +5 -4
  211. package/types/iconGlyphsCore.g.d.ts +2 -1
  212. package/types/iconGlyphsLazy.g.d.ts +2 -1
  213. package/types/index.d.ts +2 -1
  214. package/types/optionLabel.d.ts +9 -15
  215. package/types/razor-js/modules/shared.d.ts +1 -1
  216. package/types/razor-js/webority-ui.d.ts +1 -0
  217. package/types/richTextIcons.d.ts +14 -1
  218. package/types/rtl.d.ts +2 -0
  219. package/types/select/list.d.ts +9 -4
  220. package/types/server/index.d.ts +2 -1
  221. package/types/server/serverHtml.d.ts +6 -0
  222. package/types/server/serverTable.d.ts +1 -1
  223. package/types/server/wuiHttp.d.ts +8 -1
  224. package/types/svgNodes.d.ts +7 -0
  225. package/types/tableExport.d.ts +9 -0
  226. package/types/tableExportLoader.d.ts +4 -0
  227. package/types/text/web/chart.g.d.ts +1 -0
  228. package/types/text/web/confirmDialog.g.d.ts +1 -0
  229. package/types/text/web/dataTable.g.d.ts +7 -0
  230. package/types/text/web/datePicker.g.d.ts +2 -0
  231. package/types/text/web/modal.g.d.ts +1 -0
  232. package/types/toastTypes.d.ts +2 -1
  233. package/types/tooltips.d.ts +3 -3
  234. package/dist/WuiCarousel-CRx2-eKV.js +0 -1
  235. package/dist/WuiCommentThread-DZEYOHsk.js +0 -1
  236. package/dist/WuiConsentBanner-CWvXnwBH.js +0 -1
  237. package/dist/WuiContextMenu-DvYwIicr.js +0 -1
  238. package/dist/WuiDataTable-BSMhRQ1i.js +0 -1
  239. package/dist/WuiDatePicker-DxPethoe.js +0 -34
  240. package/dist/WuiDateRange-zPmNewOW.js +0 -25
  241. package/dist/WuiGantt-DaEgtdOU.js +0 -1
  242. package/dist/WuiImageCrop-BTY59Qsm.js +0 -17
  243. package/dist/WuiInlineEdit-BlsGNQSC.js +0 -1
  244. package/dist/WuiLeadPopup-L9UCTVA5.js +0 -382
  245. package/dist/WuiLightbox-BnLEEkj1.js +0 -1
  246. package/dist/WuiMarkdown-B7nfQ6tW.js +0 -4
  247. package/dist/WuiMentionInput-DvKw8MXS.js +0 -1
  248. package/dist/WuiNavigationMenu-CfD0FWvt.js +0 -1
  249. package/dist/WuiOrgTree-5v0vqPVk.js +0 -1
  250. package/dist/WuiOtp-DonxSwVn.js +0 -14
  251. package/dist/WuiPhone-BFb_LjJa.js +0 -16
  252. package/dist/WuiSavedViews-BsAyuOzX.js +0 -1
  253. package/dist/WuiSelect-iE3EVUWK.js +0 -9
  254. package/dist/WuiSlider-J9YPWu9e.js +0 -51
  255. package/dist/WuiSortable-BfOm57Mj.js +0 -1
  256. package/dist/WuiTimePicker-BsnPOYNw.js +0 -9
  257. package/dist/WuiTour-C2CRQvS7.js +0 -1
  258. package/dist/WuiTree-DGZSXgBh.js +0 -1
  259. package/dist/WuiTreePicker-CkTfNUQx.js +0 -1
  260. package/dist/WuiWizardStep-CryQ5BlK.js +0 -1
  261. package/dist/anchorOverlay-DSzkGQPi.js +0 -1
  262. package/dist/avatarHtml-BWlA0cm-.js +0 -1
  263. package/dist/chips-B4ZNRO-h.js +0 -2
  264. package/dist/dataTable.g-BVxhub_d.js +0 -1
  265. package/dist/datePicker.g-VdBlhA2G.js +0 -1
  266. package/dist/dom-Do1pAA12.js +0 -1
  267. package/dist/drawerDiscard-B4OcoR8S.js +0 -1
  268. package/dist/fileViewer.g-D5lbrn8g.js +0 -1
  269. package/dist/fileViewerMedia-cfmycjzl.js +0 -1
  270. package/dist/formatters-CMTSYlW9.js +0 -1
  271. package/dist/iconGlyphs.g-BUF97bUu.js +0 -1
  272. package/dist/kanban-CRRLqNn_.js +0 -1
  273. package/dist/loader-Cf_ozcXz.js +0 -1
  274. package/dist/optionLabel-CWMhBkdO.js +0 -1
  275. package/dist/statusIcons-CRtqA_1C.js +0 -10
  276. package/dist/tableSelect.g-DKZqXQT_.js +0 -1
  277. package/dist/wuiHttp-DGbD7Fra.js +0 -1
@@ -1 +1 @@
1
- var WeborityTour=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e,t){if(typeof customElements>`u`||customElements.get(e))return;let n=[];if(typeof document<`u`)for(let r of document.querySelectorAll(e))for(let i of Object.keys(r)){let a=Object.getOwnPropertyDescriptor(t.prototype,i);if(a&&(a.set||a.get)&&(n.push([r,i,Reflect.get(r,i)]),!Reflect.deleteProperty(r,i)))throw Error(`defineElement: could not clear the early "${i}" property on <${e}>.`)}customElements.define(e,t);for(let[t,r,i]of n)if(!Reflect.set(t,r,i))throw Error(`defineElement: could not restore the "${r}" property on <${e}>.`)}var n=`@webority/ui-elements needs a browser DOM; import its types or helpers entry on the server`;if(typeof HTMLElement>`u`)throw Error(n);var r=HTMLElement;function i(e,t){a(e),e._reanchor=t,e._reanchorScroll=n=>{n.composedPath().includes(e)||t()},window.addEventListener(`resize`,e._reanchor),window.addEventListener(`scroll`,e._reanchorScroll,!0)}function a(e){if(!e?._reanchor)return;window.removeEventListener(`resize`,e._reanchor);let t=e._reanchorScroll;t&&window.removeEventListener(`scroll`,t,!0),e._reanchor=null,e._reanchorScroll=null}var o=`AppButton`,s=new Set([`primary`,`success`,`warning`,`danger`,`info`,`neutral`]),c={solid:e=>`btn-${e}`,soft:e=>`btn-soft-${e}`,outline:e=>`btn-outline-${e}`,ghost:e=>`btn-ghost-${e}`,link:e=>`btn-link-${e}`,glass:()=>`btn-glass`};function l(e){return Object.hasOwn(c,e)}function u(e=`primary`,t=`solid`,n=`md`){if(!s.has(e))throw RangeError(`buttonClass: unknown tone "${e}"`);if(!l(t))throw RangeError(`buttonClass: unknown variant "${t}"`);let r=c[t](e);return n===`md`?`btn ${r}`:`btn ${r} btn-${n}`}var d=`data-wui-dismiss`,f=`data-wui-closing`,p=`[${d}]`,m=`(prefers-reduced-motion: reduce)`,h=`a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])`,g=new WeakSet,_=Symbol.for(`webority.ui.modal-stack`),v=Symbol.for(`webority.ui.root-watches`);function ee(e){let t=e;return t[v]??=new Set,t[v]}function te(e){let t=e.querySelector(`[data-autofocus]`);if(t)return t;let n=null;for(let t of e.querySelectorAll(h))if(!t.closest(`[hidden],[inert]`)){if(!t.closest(`${p},.wui-modal-back`))return t;n??=t}return n}function ne(e){let t=[],n=new Map;for(let r of e.querySelectorAll(h))if(!(r.closest(`[hidden],[inert]`)||r.closest(`dialog`)!==e)&&!(r.tabIndex<0||r.getClientRects().length===0)){if(r instanceof HTMLInputElement&&r.type===`radio`&&r.name){let e=n.get(r.name);e?r.checked&&!e.checked&&(e.checked=r,t[t.indexOf(e.first)]=r):(n.set(r.name,{first:r,checked:r.checked?r:null}),t.push(r))}else t.push(r)}return t}function y(e){let t=e;return t[_]??=[],t[_]}function re(e){b(e),y(e.ownerDocument).push(e)}function b(e){let t=y(e.ownerDocument),n=t.indexOf(e);n>=0&&t.splice(n,1)}function x(e){for(let t of ee(e)){let n=S(e);t.last!==n&&(t.last=n,t.listener(n))}}function ie(e){let t=Promise.allSettled(e.getAnimations().map(e=>e.finished));return new Promise(e=>{let n=window.setTimeout(e,400);t.then(()=>{window.clearTimeout(n),e()})})}function ae(e,t){let n=t.focus===`first-control`?te(e):null,r=n??e,i=r===e&&!e.hasAttribute(`tabindex`);i&&e.setAttribute(`tabindex`,`-1`);let a=!t.escape&&!e.hasAttribute(`closedby`);a&&e.setAttribute(`closedby`,`none`),g.add(e);let o=()=>{if(re(e),!e.hasAttribute(`open`)){let t=n!==null&&!e.querySelector(`[autofocus]`);t&&n.setAttribute(`autofocus`,``);try{e.showModal()}catch(t){throw b(e),t}finally{t&&n.removeAttribute(`autofocus`)}}r.focus(),x(e.ownerDocument)},s=!1,c=n=>{if(n.key!==`Escape`||n.defaultPrevented||!t.escape||n.altKey||n.ctrlKey||n.metaKey)return;let r=e.ownerDocument;S(r)===e&&(e.querySelector(`:popover-open`)||r.querySelector(`[popover=""]:popover-open, [popover="auto"]:popover-open`)||(s=!0,window.setTimeout(()=>{s&&g.has(e)&&e.open&&(s=!1,t.onRequestClose(`escape`))},0)))},l=t=>{if(t.key!==`Tab`||t.defaultPrevented||t.altKey||t.ctrlKey||t.metaKey)return;let n=e.ownerDocument;if(S(n)!==e||e.querySelector(`:popover-open`))return;t.preventDefault();let r=ne(e),i=r[0],a=r[r.length-1];if(!i||!a){e.focus();return}let o=n.activeElement,s=o?r.findIndex(e=>e===o||e.contains(o)):-1;s<0?(t.shiftKey?a:i).focus():r[((t.shiftKey?s-1:s+1)+r.length)%r.length]?.focus()},u=e=>{s=!1,e.preventDefault(),t.escape&&t.onRequestClose(`escape`)},d=n=>{let r=n.target;if(!(r instanceof Element))return;let i=r.closest(p);if(i&&i.closest(`dialog`)===e){t.onRequestClose(`dismiss`);return}if(r!==e||!t.backdrop)return;let a=e.getBoundingClientRect();(n.clientX<a.left||n.clientX>a.right||n.clientY<a.top||n.clientY>a.bottom)&&t.onRequestClose(`backdrop`)},f=()=>{let n=s;s=!1,b(e),g.has(e)?(o(),n&&t.onRequestClose(`escape`)):x(e.ownerDocument)},m=e.ownerDocument;return m.addEventListener(`keydown`,c),m.addEventListener(`keydown`,l),e.addEventListener(`cancel`,u),e.addEventListener(`click`,d),e.addEventListener(`close`,f),o(),()=>{m.removeEventListener(`keydown`,c),m.removeEventListener(`keydown`,l),e.removeEventListener(`cancel`,u),e.removeEventListener(`click`,d),e.removeEventListener(`close`,f),g.delete(e),i&&e.removeAttribute(`tabindex`),a&&e.removeAttribute(`closedby`),b(e),x(e.ownerDocument)}}async function oe(e){g.delete(e),e.setAttribute(f,``),!window.matchMedia(m).matches&&typeof e.getAnimations==`function`&&e.getAnimations().length>0&&await ie(e),e.close(),b(e),x(e.ownerDocument),e.removeAttribute(f)}function se(e){if(ce(e),!e.isConnected)throw Error(`nativeOverlay: raisePopover was given a panel that is not on the page; a caller whose overlay root can leave the page skips the raise until the panel moves to the new root`);e.hidePopover(),e.showPopover()}function ce(e){if(!e.hasAttribute(`popover`))throw Error(`nativeOverlay: the panel has no popover attribute`)}function S(e=document){let t=y(e);for(let e=t.length-1;e>=0;e--){let n=t[e];if(n?.isConnected&&n.hasAttribute(`open`))return n}return e.body}var le=/\{([A-Za-z0-9_]+)\}/g,ue=new Map,de=0,fe=new Map;function C(e,t){let n=ue.get(e);if(n===void 0)return t;let r=fe.get(e);if(r!==void 0&&r.version===de&&r.english===t&&me(r.merged,t))return r.merged;let i=pe(e,n,t);return fe.set(e,{version:de,english:t,merged:i}),i}function pe(e,t,n){let r={};for(let[i,a]of Object.entries(t)){let t=Object.hasOwn(n,i)?n[i]:void 0;if(t===void 0)throw RangeError(`Text ${e}.${i} is not a key of the English text. Allowed keys: ${Object.keys(n).join(`, `)}.`);let o=he(t);for(let t of he(a))if(!o.includes(t))throw RangeError(`Text ${e}.${i} uses {${t}}, which the English text does not have. Allowed placeholders: ${o.length===0?`none`:o.map(e=>`{${e}}`).join(`, `)}.`);r[i]=a}return Object.assign({},n,r)}function me(e,t){let n=Object.keys(t);return Object.keys(e).length===n.length&&n.every(t=>Object.hasOwn(e,t))}function he(e){return Array.from(e.matchAll(le),e=>e[1]??``)}var w={backLabel:`Back`,doneLabel:`Done`,endMessage:`You know your way around now. Enjoy exploring.`,endTitle:`You're all set`,mediaPauseLabel:`Pause animation`,mediaPlayLabel:`Play animation`,nextLabel:`Next`,progressLabel:`Step {current} of {total}`,skipLabel:`Skip`},ge={advanceLabel:`Click {actionName} to continue.`},T=`data-advance`,E=`wui-tour-hint`,D=`wui-tour-pointer`,_e=`a[href], button, input, select, textarea, summary, [tabindex], [contenteditable]`,ve=()=>C(`tourAdvance`,ge),O=(e,t)=>e?.advanceOn===`click`&&!!t,k=e=>(e??``).replace(/\s+/g,` `).trim(),ye=e=>e instanceof HTMLButtonElement||e instanceof HTMLInputElement||e instanceof HTMLMeterElement||e instanceof HTMLOutputElement||e instanceof HTMLProgressElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement?e.labels:null,be=e=>e instanceof HTMLButtonElement||e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLFieldSetElement||e instanceof HTMLOptGroupElement||e instanceof HTMLOptionElement?e.disabled:!1;function xe(e){let t=e.ownerDocument,n=(e.getAttribute(`aria-labelledby`)||``).split(/\s+/).filter(Boolean),r=e instanceof HTMLInputElement&&/^(button|submit|reset)$/.test(e.type)?e.value:``,i=[n.map(e=>t.getElementById(e)?.textContent??``).join(` `),e.getAttribute(`aria-label`),Array.from(ye(e)??[],e=>e.textContent).join(` `),e.getAttribute(`alt`),r,e.textContent,e.getAttribute(`title`)];for(let e of i){let t=k(e);if(t)return t}return``}function Se(e){for(let t of[e,...e.querySelectorAll(_e)])if((t instanceof HTMLElement||t instanceof SVGElement)&&t.tabIndex>=0&&!be(t))return t;return null}function A(e,t,n){let r=(e.getAttribute(`aria-describedby`)||``).split(/\s+/).filter(e=>e&&e!==t);n&&r.push(t),r.length>0?e.setAttribute(`aria-describedby`,r.join(` `)):e.removeAttribute(`aria-describedby`)}function Ce(e,t){let n=e.querySelector(`.${E}`),r=e.querySelector(`.wui-tour-text`)?.id,i=r?`${r.replace(/-text$/,``)}-hint`:``;if(!t)n?.remove(),i&&A(e,i,!1);else{if(!n){n=e.ownerDocument.createElement(`p`),n.className=E,i&&(n.id=i);let t=e.querySelector(`.wui-tour-actions`);if(!t)throw Error(`Tour card has no actions row.`);t.before(n)}n.textContent=t,i&&A(e,i,!0)}}function we(e,t){let n=e.querySelector(`.${D}`);if(!t){n?.remove();return}if(n)return;let r=e.ownerDocument.createElement(`span`);r.className=D,r.setAttribute(`aria-hidden`,`true`),e.append(r)}var Te=e=>getComputedStyle(e).animationName;function j(e,{layer:t,spot:n,card:r},i,a){let o=O(i,a);t.toggleAttribute(T,o&&!(t.getRootNode()instanceof ShadowRoot)),n.hasAttribute(T)&&(n.removeAttribute(T),o&&Te(n)),o&&n.setAttribute(T,``),we(n,o);let s=r.querySelector(`.wui-tour-next`);if(!(s instanceof HTMLElement))throw Error(`Tour card has no next button.`);s.classList.toggle(`btn-primary`,!o),s.classList.toggle(`btn-link`,o);let c=o?k(i?.actionLabel)||xe(a):``,l=e.getAttribute(`advance-label`)||ve().advanceLabel,u=c?l.replace(/\{actionName\}/g,()=>c):``;return Ce(r,u),u}function Ee(e,t,n){if(!O(e,t))return()=>{};let r,i=()=>{r??=setTimeout(n,0)};return t.addEventListener(`click`,i),()=>{t.removeEventListener(`click`,i),clearTimeout(r)}}function De(e,t,n,r){return e.contains(r)||O(t,n)&&n.contains(r)}function Oe(e,{card:t,active:n,step:r,target:i}){let a=Array.from(t.querySelectorAll(`button`)).filter(e=>!e.hidden),o=O(r,i)?Se(i):null;o&&a.push(o);let s=a.findIndex(e=>e===n||e===o&&i?.contains(n));e.preventDefault();let c=a[s===-1?e.shiftKey?a.length-1:0:(s+(e.shiftKey?-1:1)+a.length)%a.length];if(!c)throw Error(`Tour card has no focus stop.`);c.focus()}function ke(e){return e.key===`Enter`&&e.isComposing!==!0&&e.keyCode!==229}var Ae=2/3,je=1e3,Me=new Set([`top`,`left`,`width`,`height`]),M=new WeakMap,N=(e,t)=>typeof e.getAnimations==`function`?e.getAnimations().filter(t):[],P=e=>`transitionProperty`in e&&e.transitionProperty===`opacity`,Ne=e=>`transitionProperty`in e&&typeof e.transitionProperty==`string`&&Me.has(e.transitionProperty),Pe=e=>`animationName`in e&&typeof e.animationName==`string`&&e.animationName.startsWith(`wui-tour-`);function F(e){return e.length===0?null:new Promise(t=>{let n=setTimeout(t,je);Promise.allSettled(e.map(e=>e.finished)).then(()=>{clearTimeout(n),t()})})}function Fe(e){let t=e.parentElement?.querySelector(`:scope > .wui-tour-spot`),n=0;for(let e of t?N(t,Ne):[]){let t=e.effect?.getComputedTiming?.();if(typeof t?.duration!=`number`)continue;let r=typeof e.currentTime==`number`?e.currentTime:0;n=Math.max(n,(t.delay??0)+t.duration*Ae-r)}return n}function I(e){let t=Fe(e);t>0?e.style.setProperty(`--wui-tour-card-delay`,`${Math.round(t)}ms`):e.style.removeProperty(`--wui-tour-card-delay`),e.dataset.state=`entering`;let n={};M.set(e,n);let r=()=>{M.get(e)===n&&e.dataset.state===`entering`&&(e.dataset.state=`shown`)},i=N(e,Pe);i.length===0?r():Promise.allSettled(i.map(e=>e.finished)).then(r)}function L(e){return e.dataset.state=`leaving`,F(N(e,P))}function Ie(e){let t=e.shadowRoot?.querySelector(`.wui-tour-layer`),n=e.classList.contains(`wui-tour-layer`)?e:t instanceof HTMLElement?t:null;n&&(n.dataset.state=`leaving`);let r=n?F(N(n,P)):null;r?(e.setAttribute(`inert`,``),r.then(()=>e.remove())):e.remove()}var Le=2,R=12,z=8,B=4,V=20,Re=`(max-width: 575.98px)`,ze=[`bottom`,`top`,`right`,`left`],H=[`top-left`,`top-right`,`bottom-right`,`bottom-left`],U,W=(e,t,n)=>Math.max(t,Math.min(e,n)),G=(e,t,n,r)=>(Math.max(e,n)+Math.min(t,r))/2;function Be(e,t){if(!t?.scrollIntoView)return;e.style.maxHeight=``;let n=q(e),r=e.offsetHeight+R;if(t.getBoundingClientRect().height+4+r*2<=n.bottom-n.top){t.scrollIntoView({block:`center`,inline:`nearest`});return}let i=t.style.scrollMarginTop;t.style.scrollMarginTop=`${n.top+r+Le}px`,t.scrollIntoView({block:`start`,inline:`nearest`}),t.style.scrollMarginTop=i}function K(e,t,n){let r=e.style,i=t.style,a=Ge(t);if(!n){r.top=`50%`,r.left=`50%`,r.width=`0px`,r.height=`0px`,r.boxShadow=`0 0 0 100vmax var(--color-scrim-strong)`;for(let e of H)r.removeProperty(`border-${e}-radius`),r.removeProperty(`corner-${e}-shape`);t.dataset.placement=`center`,a.hidden=!0,i.position=`fixed`,i.top=`50%`,i.left=`50%`,i.transform=`translate(-50%, -50%)`,i.maxHeight=`calc(100vh - 16px)`;return}r.boxShadow=``,i.transform=``,i.position=`fixed`;let o=n.getBoundingClientRect();r.top=`${o.top}px`,r.left=`${o.left}px`,r.width=`${o.width}px`,r.height=`${o.height}px`,Ve(r,n);let s=t.scrollTop;i.maxHeight=``;let c={width:t.offsetWidth,height:t.offsetHeight},l=q(t),u=l.bottom-l.top,d={bottom:l.bottom-o.bottom-R,top:o.top-R-l.top,right:l.right-o.right-R,left:o.left-R-l.left},f=window.matchMedia(Re).matches,p=ze.find(e=>e===`top`||e===`bottom`?c.height<=d[e]+1:!f&&c.width<=d[e]+1&&c.height<=u+1),m=Math.min(o.bottom,l.bottom+z)-Math.max(o.top,l.top-z);p?He(t,a,p,o,l,c):m>=Math.min(c.height,u)+8?Ue(t,a,o,l,c):We(t,a,d.bottom>=d.top?`bottom`:`top`,o,l,c,d),t.scrollTop=s}function Ve(e,t){U??=CSS.supports(`corner-top-left-shape`,`squircle`);let n=getComputedStyle(t);for(let t of H)e.setProperty(`border-${t}-radius`,n.getPropertyValue(`border-${t}-radius`)),U&&e.setProperty(`corner-${t}-shape`,n.getPropertyValue(`corner-${t}-shape`))}function He(e,t,n,r,i,a){let o=n===`top`||n===`bottom`,s,c,l;if(o){let e=G(r.left,r.right,i.left,i.right);s=W(e-a.width/2,i.left,i.right-a.width),c=n===`bottom`?r.bottom+R:r.top-R-a.height,l=W(e-s,V,a.width-V)}else{let e=G(r.top,r.bottom,i.top,i.bottom);c=W(e-a.height/2,i.top,i.bottom-a.height),s=n===`right`?r.right+R:r.left-R-a.width,l=W(e-c,V,a.height-V)}e.dataset.placement=n,e.style.top=`${c}px`,e.style.left=`${s}px`,t.hidden=!1,t.style.left=o?`${l-e.clientLeft-t.offsetWidth/2}px`:``,t.style.top=o?``:`${l-e.clientTop-t.offsetHeight/2}px`}function Ue(e,t,n,r,i){let a=r.bottom-r.top;e.dataset.placement=`overlap`,t.hidden=!0,e.style.maxHeight=i.height>a?`${Math.max(a,0)}px`:``;let o=Math.min(n.bottom,r.bottom)-B;e.style.top=`${Math.max(r.top,o-Math.min(i.height,a))}px`,e.style.left=`${W(n.left+B,r.left,r.right-i.width)}px`}function We(e,t,n,r,i,a,o){let s=Math.max(o[n],0),c=Math.min(a.height,s);e.dataset.placement=n,t.hidden=!0,e.style.maxHeight=a.height>s?`${s}px`:``,e.style.top=`${n===`bottom`?r.bottom+R:r.top-R-c}px`;let l=G(r.left,r.right,i.left,i.right);e.style.left=`${W(l-a.width/2,i.left,i.right-a.width)}px`}function q(e){let t=e.parentElement,n=t?getComputedStyle(t):null,r=e=>Number.parseFloat(n?.[e]??``)||0;return{top:r(`paddingTop`)+z,bottom:window.innerHeight-r(`paddingBottom`)-z,left:r(`paddingLeft`)+z,right:window.innerWidth-r(`paddingRight`)-z}}function Ge(e){let t=e.querySelector(`:scope > .wui-tour-arrow`);if(t instanceof HTMLElement)return t;let n=document.createElement(`span`);return n.className=`wui-tour-arrow`,n.setAttribute(`aria-hidden`,`true`),n.hidden=!0,e.append(n),n}var Ke=0,qe=`btn btn-sm btn-link`;function J(e,t,n){let r=e.querySelector(t);if(!(r instanceof n))throw Error(`Expected "${t}" to match a ${n.name}.`);return r}function Je(e,t,n){let r=`wui-tour-end-${++Ke}`,i=!!(t.nextLabel&&t.nextHref),a=n?e.createElement(`dialog`):e.createElement(`div`);a.className=`wui-tour-card wui-tour-end`,a.dataset.layout=`center`,i&&(a.dataset.next=``),a.setAttribute(`role`,`dialog`),a.tabIndex=-1,a.setAttribute(`aria-labelledby`,`${r}-title`),a.setAttribute(`aria-describedby`,`${r}-message`),a.innerHTML=` <div class="wui-tour-end-mark" aria-hidden="true"><svg viewBox="0 0 24 24" focusable="false"><path d="M5 12.5l4.5 4.5L19 7.5"/></svg></div> <h2 class="wui-tour-title wui-tour-end-title" id="${r}-title"></h2> <p class="wui-tour-text wui-tour-end-message" id="${r}-message"></p> <div class="wui-tour-actions">${i?`<a class="${u(`primary`,`solid`,`sm`)} wui-tour-end-next" data-wui="${o}"></a>`:``}<button type="button" class="${i?qe:u(`primary`,`solid`,`sm`)} wui-tour-end-button" data-wui="${o}"></button></div>`,J(a,`.wui-tour-end-title`,HTMLElement).textContent=t.title,J(a,`.wui-tour-end-message`,HTMLElement).textContent=t.message,J(a,`.wui-tour-end-button`,HTMLButtonElement).textContent=t.button;let{nextLabel:s,nextHref:c}=t;if(i&&s&&c){let e=J(a,`.wui-tour-end-next`,HTMLAnchorElement);e.textContent=s,e.setAttribute(`href`,c)}return a}var Ye=e=>e.button===0&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey;function Xe(e,t,n){let r=e.ownerDocument,i=Je(r,t,e.getRootNode()===r),a=J(i,`.wui-tour-end-button`,HTMLButtonElement),o=i.querySelector(`.wui-tour-end-next`);if(o!==null&&!(o instanceof HTMLAnchorElement))throw Error(`The end dialog's next link is not a link.`);let s=o,c=s??a,l=new AbortController,u=i instanceof HTMLDialogElement?i:null,d=null;return new Promise(o=>{let f=e=>{if(l.abort(),d&&u){let e=d;d=null,oe(u).then(e)}o(e)};if(n?.aborted){f(`done`);return}let p=J(e,`.wui-tour-card:not(.wui-tour-end)`,HTMLElement),m=J(e,`.wui-tour-spot`,HTMLElement),h=J(e,`[role=status]`,HTMLElement),g={signal:l.signal};n?.addEventListener(`abort`,()=>f(`done`),g),a.addEventListener(`click`,()=>f(`done`),g),s&&s.addEventListener(`click`,e=>{Ye(e)&&(e.preventDefault(),f(`next`))},g),r.addEventListener(`keydown`,e=>{if(!(e.altKey||e.ctrlKey||e.metaKey)){if(e.key===`Escape`){if(d)return;e.preventDefault(),e.stopPropagation(),f(`done`)}else ke(e)&&s&&!e.shiftKey&&(e.composedPath?.()[0]??e.target)===s&&(e.preventDefault(),f(`next`))}},{capture:!0,signal:l.signal});let _=()=>{l.signal.aborted||(p.hidden=!0,K(m,p,null),e.append(i),I(i),u&&(d=ae(u,{escape:!0,backdrop:!1,focus:`first-control`,onRequestClose:()=>f(`done`)})),h.textContent=[t.title,t.message].filter(Boolean).join(`. `),c.focus())},v=L(p);v?v.then(_):_()})}var Ze=` :host { all: initial; display: revert-layer; position: fixed; inset: 0; ${Object.entries({"--wui-z-tour":`1550`,"--wui-radius-sm":`8px`,"--wui-radius-lg":`14px`,"--wui-shadow-popover":`0px 8px 28px -6px rgba(7, 20, 55, 0.14)`,"--wui-ease-out":`cubic-bezier(0.22, 1, 0.36, 1)`,"--wui-ease-linear":`cubic-bezier(0, 0, 1, 1)`,"--wui-duration-fast":`150ms`,"--wui-duration-default":`250ms`,"--wui-duration-slow":`400ms`,"--wui-space-xs":`4px`,"--wui-tour-motion-duration":`200ms`,"--wui-tour-motion-ease":`cubic-bezier(0.22, 1, 0.36, 1)`,"--wui-tour-spot-duration":`240ms`,"--wui-tour-spot-ease":`cubic-bezier(0.32, 0.72, 0, 1)`,"--color-primary":`#4F46E5`,"--color-primary-hover":`#4338CA`,"--color-primary-text":`#4F46E5`,"--color-focus-ring":`#4F46E5`,"--wui-focus-ring-width":`2px`,"--wui-focus-ring-offset":`2px`,"--color-on-primary":`#FFFFFF`,"--color-success-soft":`#E8FAEE`,"--color-success-text":`#0e7531`,"--color-on-scrim":`#FFFFFF`,"--color-scrim-strong":`color-mix(in srgb, #071437 62%, transparent)`,"--color-surface":`#FFFFFF`,"--color-text":`#071437`,"--color-text-muted":`#4B5675`,"--color-border":`#EBEDF3`,"--color-bg-muted":`#F5F6FA`}).map(([e,t])=>` ${e}: ${t};`).join(` `)} } *, *::before, *::after { box-sizing: border-box; } [hidden] { display: none !important; } .visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; } .btn { display: inline-block; margin: 0; padding: 0.25rem 0.5rem; border: 1px solid transparent; border-radius: 0.375rem; background: transparent; font: inherit; font-size: 0.875rem; font-weight: 500; line-height: 1.5; text-align: center; text-decoration: none; white-space: nowrap; cursor: pointer; } .btn:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; } .btn-primary { background: var(--color-primary); border-color: var(--color-primary); color: var(--color-on-primary); } .btn-primary:hover { background: var(--color-primary-hover); border-color: var(--color-primary-hover); } .btn-outline-neutral { border-color: var(--color-text-muted); color: var(--color-text-muted); } .btn-outline-neutral:hover { background: var(--color-bg-muted); color: var(--color-text); } .btn-link { font-weight: 400; color: var(--color-primary-text); text-decoration: underline; } .btn-link:hover { color: var(--color-primary-hover); } .wui-tour-layer { pointer-events: none; font-family: "Webority Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; font-size: 16px; font-weight: 400; line-height: 1.5; color: var(--color-text); text-align: start; } .wui-tour-card { pointer-events: auto; } .wui-tour-layer { position: fixed; inset: 0; z-index: var(--wui-z-tour); width: auto; height: auto; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; overflow: visible; background: none; } .wui-tour-spot { position: fixed; box-shadow: 0 0 0 2px var(--color-primary), 0 0 4px 2px color-mix(in srgb, var(--color-primary) 30%, transparent), 0 0 0 100vmax var(--color-scrim-strong); pointer-events: none; } .wui-tour-card { display: flex; flex-direction: column; gap: 8px; width: min(360px, 100vw - 16px); padding: 16px; overflow-y: auto; background: var(--color-surface); color: var(--color-text); border: 1px solid var(--color-border); border-radius: var(--wui-radius-lg); corner-shape: squircle; box-shadow: var(--wui-shadow-popover); } .wui-tour-card:focus { outline: none; } .wui-tour-card:focus-visible { outline: var(--wui-focus-ring-width) solid var(--color-focus-ring); outline-offset: var(--wui-focus-ring-offset); } .wui-tour-title { margin: 0; font-size: 16px; font-weight: 600; } .wui-tour-text { margin: 0; font-size: 14px; color: var(--color-text-muted); } .wui-tour-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; } .wui-tour-nav { display: flex; gap: 8px; } .wui-tour-skip { color: var(--color-text-muted); } .wui-tour-back, .wui-tour-next { min-width: 64px; } @keyframes wui-tour-fade-in { from { opacity: 0; } to { opacity: 1; } } @keyframes wui-tour-card-enter { from { opacity: 0; scale: 0.96; translate: var(--wui-tour-card-lift, 0 6px); } to { opacity: 1; scale: 1; translate: 0 0; } } .wui-tour-layer[data-state=leaving], .wui-tour-card[data-state=leaving] { opacity: 0; } .wui-tour-layer[data-state=leaving], .wui-tour-layer[data-state=leaving] * { pointer-events: none; } @media (prefers-reduced-motion: no-preference) { .wui-tour-layer { animation: wui-tour-fade-in var(--wui-tour-motion-duration) var(--wui-tour-motion-ease); } .wui-tour-layer[data-state=leaving] { transition: opacity var(--wui-tour-motion-duration) var(--wui-tour-motion-ease); } .wui-tour-spot { transition: top var(--wui-tour-spot-duration) var(--wui-tour-spot-ease), left var(--wui-tour-spot-duration) var(--wui-tour-spot-ease), width var(--wui-tour-spot-duration) var(--wui-tour-spot-ease), height var(--wui-tour-spot-duration) var(--wui-tour-spot-ease), border-radius var(--wui-tour-spot-duration) var(--wui-tour-spot-ease); } .wui-tour-spot[data-tracking] { transition: none; } .wui-tour-card { --wui-tour-card-lift: 0 6px; transform-origin: top center; } .wui-tour-card[data-placement=top] { --wui-tour-card-lift: 0 -6px; transform-origin: bottom center; } .wui-tour-card[data-placement=bottom] { --wui-tour-card-lift: 0 6px; transform-origin: top center; } .wui-tour-card[data-placement=left] { --wui-tour-card-lift: -6px 0; transform-origin: right center; } .wui-tour-card[data-placement=right] { --wui-tour-card-lift: 6px 0; transform-origin: left center; } .wui-tour-card[data-placement=overlap], .wui-tour-card[data-placement=center] { --wui-tour-card-lift: 0 0; transform-origin: center; } .wui-tour-card[data-state=entering] { animation: wui-tour-card-enter var(--wui-tour-motion-duration) var(--wui-tour-motion-ease) var(--wui-tour-card-delay, 0ms) both; } .wui-tour-card[data-state=leaving] { transition: opacity calc(var(--wui-tour-motion-duration) / 2) var(--wui-tour-motion-ease); } } @media (prefers-reduced-motion: reduce) { .wui-tour-layer { animation: wui-tour-fade-in var(--wui-duration-fast) var(--wui-ease-linear); } .wui-tour-layer[data-state=leaving] { transition: opacity var(--wui-duration-fast) var(--wui-ease-linear); } .wui-tour-card[data-state=entering] { animation: wui-tour-fade-in var(--wui-duration-fast) var(--wui-ease-linear) both; } } .wui-tour-progress-bar { display: flex; gap: 4px; } .wui-tour-progress-segment { flex: 1 1 0; height: 4px; border-radius: 999px; background: var(--color-border); } .wui-tour-progress-segment[data-filled] { background: var(--color-primary); } .wui-tour-position { margin: 0; font-size: 12px; color: var(--color-text-muted); } .wui-tour-layer { padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); } .wui-tour-card:has(.wui-tour-arrow:not([hidden])) { overflow: visible; } .wui-tour-arrow { position: absolute; width: 8px; height: 8px; background: var(--color-surface); border: 1px solid var(--color-border); rotate: 45deg; pointer-events: none; } .wui-tour-card[data-placement=bottom] .wui-tour-arrow { top: -5px; border-right-color: rgba(0, 0, 0, 0); border-bottom-color: rgba(0, 0, 0, 0); } .wui-tour-card[data-placement=top] .wui-tour-arrow { bottom: -5px; border-top-color: rgba(0, 0, 0, 0); border-left-color: rgba(0, 0, 0, 0); } .wui-tour-card[data-placement=right] .wui-tour-arrow { left: -5px; border-top-color: rgba(0, 0, 0, 0); border-right-color: rgba(0, 0, 0, 0); } .wui-tour-card[data-placement=left] .wui-tour-arrow { right: -5px; border-bottom-color: rgba(0, 0, 0, 0); border-left-color: rgba(0, 0, 0, 0); } @media (max-width: 575.98px) { .wui-tour-card { width: calc(100vw - 16px); } .wui-tour-actions .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; } } .wui-tour-media { position: relative; order: -1; flex: none; aspect-ratio: 16/9; margin: -16px -16px 4px; overflow: hidden; background: var(--color-border); } .wui-tour-media>img, .wui-tour-media>video { display: block; width: 100%; height: 100%; object-fit: cover; } .wui-tour-card[data-welcome] { width: min(420px, 100vw - 16px); } .wui-tour-media-toggle { position: absolute; inset-block-end: 8px; inset-inline-end: 8px; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: var(--color-scrim-strong); color: var(--color-on-scrim); cursor: pointer; } .wui-tour-media-toggle>svg { width: 20px; height: 20px; fill: currentColor; } .wui-tour-media-toggle:focus-visible { outline: 2px solid var(--color-on-scrim); outline-offset: var(--wui-focus-ring-offset); } .wui-tour-layer[data-advance] { pointer-events: none; } .wui-tour-layer[data-advance]:not([data-state=leaving]) .wui-tour-card { pointer-events: auto; } .wui-tour-layer[data-advance]:not([data-state=leaving]) .wui-tour-spot::before { content: ""; position: absolute; inset: -100vmax; pointer-events: auto; clip-path: polygon(evenodd, 0 0, 100% 0, 100% 100%, 0 100%, 0 0, 100vmax 100vmax, calc(100% - 100vmax) 100vmax, calc(100% - 100vmax) calc(100% - 100vmax), 100vmax calc(100% - 100vmax), 100vmax 100vmax); } .wui-tour-hint { margin: 0; font-size: 14px; font-weight: 600; color: var(--color-text); } .wui-tour-pointer { position: absolute; top: 50%; left: 50%; width: 18px; height: 24px; pointer-events: none; } .wui-tour-pointer::before { content: ""; position: absolute; inset: 0; background: var(--color-primary); clip-path: polygon(0 0, 0 75%, 28% 58%, 46% 100%, 62% 92%, 45% 52%, 85% 52%); filter: drop-shadow(1px 0 0 var(--color-surface)) drop-shadow(-1px 0 0 var(--color-surface)) drop-shadow(0 1px 0 var(--color-surface)) drop-shadow(0 -1px 0 var(--color-surface)); } .wui-tour-pointer::after { content: ""; position: absolute; top: -16px; left: -16px; width: 32px; height: 32px; border-radius: 50%; background: var(--color-primary); opacity: 0; display: none; } @media (max-width: 575.98px) { .wui-tour-pointer { width: 24px; height: 24px; translate: -50% -50%; } .wui-tour-pointer::before { clip-path: none; border-radius: 50%; box-shadow: 0 0 0 2px var(--color-surface); filter: none; } .wui-tour-pointer::after { top: -4px; left: -4px; } } @keyframes wui-tour-tap { 0% { opacity: 0; transform: translate(56px, 44px) scale(1); } 10% { opacity: 1; transform: translate(56px, 44px) scale(1); } 45% { transform: translate(0, 0) scale(1); } 52% { transform: translate(0, 0) scale(0.86); } 60% { transform: translate(0, 0) scale(1); } 85% { opacity: 1; transform: translate(0, 0) scale(1); } 100% { opacity: 0; transform: translate(0, 0) scale(1); } } @keyframes wui-tour-tap-rtl { 0% { opacity: 0; transform: translate(-56px, 44px) scale(1); } 10% { opacity: 1; transform: translate(-56px, 44px) scale(1); } 45% { transform: translate(0, 0) scale(1); } 52% { transform: translate(0, 0) scale(0.86); } 60% { transform: translate(0, 0) scale(1); } 85% { opacity: 1; transform: translate(0, 0) scale(1); } 100% { opacity: 0; transform: translate(0, 0) scale(1); } } @keyframes wui-tour-ripple { 0%, 50% { opacity: 0; transform: scale(0.2); } 52% { opacity: 0.35; transform: scale(0.2); } 80%, 100% { opacity: 0; transform: scale(1); } } @media (prefers-reduced-motion: no-preference) { .wui-tour-pointer { opacity: 0; animation: wui-tour-tap calc(var(--wui-duration-slow) * 6) var(--wui-ease-out) var(--wui-tour-spot-duration) infinite; } .wui-tour-pointer:dir(rtl) { animation-name: wui-tour-tap-rtl; } .wui-tour-pointer::after { display: block; animation: wui-tour-ripple calc(var(--wui-duration-slow) * 6) var(--wui-ease-out) var(--wui-tour-spot-duration) infinite; } } @keyframes wui-tour-check { from { stroke-dashoffset: 24; } to { stroke-dashoffset: 0; } } .wui-tour-end[data-layout=center] { --wui-tour-card-lift: 0 0; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); transform-origin: center; align-items: center; gap: 8px; width: min(420px, 100vw - 16px); max-height: calc(100vh - 16px); padding: 24px; text-align: center; } .wui-tour-end[data-layout=center] .wui-tour-actions { justify-content: center; margin-top: 8px; } .wui-tour-end[data-layout=center][data-next] .wui-tour-actions { flex-direction: column; align-items: stretch; width: 100%; gap: var(--wui-space-xs); } .wui-tour-end-mark { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; background: var(--color-success-soft); color: var(--color-success-text); } .wui-tour-end-mark>svg { width: 26px; height: 26px; } .wui-tour-end-mark path { fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; } .wui-tour-end-title { font-size: 18px; } .wui-tour-end-message { text-wrap: balance; } .wui-tour-end-next { text-wrap: balance; } .wui-tour-end-button { min-width: 120px; } @media (prefers-reduced-motion: no-preference) { .wui-tour-end-mark path { animation: wui-tour-check var(--wui-duration-default) var(--wui-ease-out) calc(var(--wui-tour-card-delay, 0ms) + var(--wui-duration-fast)) both; } } `,Qe=()=>C(`tour`,w),$e=`wui-tour-media`,et=`wui-tour-media-toggle`,tt=`http://www.w3.org/2000/svg`,nt=`M6 5h4v14H6zM14 5h4v14h-4z`,rt=`M8 5v14l11-7z`,it=()=>({pause:Qe().mediaPauseLabel,play:Qe().mediaPlayLabel}),at=()=>globalThis.matchMedia?.(`(prefers-reduced-motion: reduce)`)?.matches===!0;function ot(e){let t=document.createElementNS(tt,`svg`);t.setAttribute(`viewBox`,`0 0 24 24`),t.setAttribute(`aria-hidden`,`true`),t.setAttribute(`focusable`,`false`);let n=document.createElementNS(tt,`path`);return n.setAttribute(`d`,e),t.appendChild(n),t}function st(e){let t=document.createElement(`img`);return t.setAttribute(`alt`,e.mediaAlt??``),t.setAttribute(`width`,`1280`),t.setAttribute(`height`,`720`),t.setAttribute(`loading`,`lazy`),t.setAttribute(`decoding`,`async`),t.setAttribute(`src`,e.media??``),t}function ct(e,t){let n=document.createElement(`video`);return n.muted=!0,n.setAttribute(`muted`,``),n.loop=!0,n.setAttribute(`playsinline`,``),t&&n.setAttribute(`autoplay`,``),n.setAttribute(`preload`,t?`auto`:`metadata`),e.mediaAlt&&n.setAttribute(`aria-label`,e.mediaAlt),e.mediaPoster&&n.setAttribute(`poster`,e.mediaPoster),n.setAttribute(`src`,e.media??``),n}function lt(e,t){let n=document.createElement(`button`);n.type=`button`,n.className=et;let r=(r=!e.paused)=>{n.setAttribute(`aria-label`,r?t.pause:t.play),n.replaceChildren(ot(r?nt:rt))};return e.addEventListener(`play`,()=>r()),e.addEventListener(`pause`,()=>r()),n.addEventListener(`click`,()=>{e.paused?e.play()?.catch(()=>r()):e.pause()}),r(e.hasAttribute(`autoplay`)),n}function ut(e){let t=e.querySelector(`:scope > .${$e}`);if(!t)return;let n=t.querySelector(`video`);n&&(n.pause(),n.removeAttribute(`src`),n.load()),t.remove()}function dt(e,t,n=it()){if(ut(e),!t.media){e.removeAttribute(`data-media`);return}let r=document.createElement(`div`);if(r.className=$e,t.mediaType===`video`){let e=ct(t,!at());r.append(e,lt(e,n))}else r.appendChild(st(t));e.prepend(r),e.setAttribute(`data-media`,t.target?`step`:`welcome`)}var ft=`data-wui-tour-open`,pt=()=>C(`tour`,w);function mt(e){let t=new Set;return{drop:e=>{t.add(e)},position:e=>{t.delete(e);let n=0;for(let r of t)r<e&&n++;return e+1-n},total:()=>e-t.size}}function ht(e,t,n){return(e.getAttribute(`progress-label`)||pt().progressLabel).replace(/\{(current|total)\}/g,(e,r)=>String(r===`current`?t:n))}function gt(e,{text:t,position:n,total:r}){let i=e.querySelector(`.wui-tour-position`);if(!(i instanceof HTMLElement))throw Error(`tour position label missing`);i.textContent=t;let a=e.querySelector(`.wui-tour-progress-bar`);if(!a){let t=e.ownerDocument,n=t.createElement(`div`);n.className=`wui-tour-progress`,n.setAttribute(`aria-hidden`,`true`),a=t.createElement(`div`),a.className=`wui-tour-progress-bar`,n.append(a),i.before(n)}let o=a.children;for(;o.length<r;){let t=e.ownerDocument.createElement(`span`);t.className=`wui-tour-progress-segment`,a.append(t)}for(;o.length>r;){let e=a.lastElementChild;if(!e)throw Error(`progress bar segment missing`);e.remove()}for(let e=0;e<o.length;e++){let t=o[e];if(!t)throw Error(`progress bar segment missing`);t.toggleAttribute(`data-filled`,e<n)}}var _t=`wui-tour-seen:`;function vt(e=_t,t=globalThis.localStorage){return{isSeen:async n=>t.getItem(e+n)===`1`,markSeen:async n=>{t.setItem(e+n,`1`)}}}var yt=`wui-tour-step`,bt=`wui-tour-host`,Y=`data-tracking`,X=()=>C(`tour`,w),xt=()=>({back:X().backLabel,next:X().nextLabel,skip:X().skipLabel,done:X().doneLabel,mediaPause:X().mediaPauseLabel,mediaPlay:X().mediaPlayLabel,endTitle:X().endTitle,endMessage:X().endMessage,endButton:X().doneLabel}),St={back:`back-label`,next:`next-label`,skip:`skip-label`,done:`done-label`,mediaPause:`media-pause-label`,mediaPlay:`media-play-label`,endTitle:`end-title`,endMessage:`end-message`,endButton:`end-button`},Ct=[[`media`,`media`],[`mediaAlt`,`media-alt`],[`mediaPoster`,`media-poster`],[`mediaType`,`media-type`],[`advanceOn`,`advance-on`],[`actionLabel`,`action-label`]],wt={index:null,position:null,total:null},Tt=0,Et=e=>!e?.isConnected||getComputedStyle(e).visibility===`hidden`?!1:e.getClientRects().length>0,Dt=e=>e instanceof HTMLElement&&(e.isContentEditable||/^(INPUT|TEXTAREA|SELECT)$/.test(e.tagName));function Z(e,t,n){let r=e.querySelector(t);if(!(r instanceof n))throw Error(`<wui-tour> layer has no ${t}`);return r}var Ot=()=>{let e=document.activeElement;for(;e?.shadowRoot?.activeElement;)e=e.shadowRoot.activeElement;return e},Q=null;function kt(e){Q||(Q=new CSSStyleSheet,Q.replaceSync(Ze)),e.adoptedStyleSheets=[Q]}var At=class extends r{seenStore;onBeforeStep;_run;_running;_layer;_outer;_shadow;_unbindAdvance;_ending;_seenMark;_steps=[];_progress=mt(0);_firstIndex=0;_returnFocus=null;_current=null;_moving=!1;_card=null;_spot=null;_live=null;_onKey=null;_onFocusIn=null;static get observedAttributes(){return[`open`]}constructor(){super(),this.seenStore=null,this.onBeforeStep=null,this._run=0,this._running=!1,this._layer=null,this._outer=null,this._shadow=null,this._unbindAdvance=null,this._ending=null,this._seenMark=null}connectedCallback(){this.hasAttribute(`open`)&&this.start()}disconnectedCallback(){this.stop()}attributeChangedCallback(e,t,n){e===`open`&&this.isConnected&&(n===null?this.stop():this.start())}get tourId(){return this.getAttribute(`tour-id`)||``}set tourId(e){e==null||e===``?this.removeAttribute(`tour-id`):this.setAttribute(`tour-id`,String(e))}get isolated(){return this.hasAttribute(`isolated`)}set isolated(e){this.toggleAttribute(`isolated`,e===!0||e===``||e===`true`)}_stepList(){return Array.from(this.querySelectorAll(`:scope > ${yt}`),e=>{let t={target:e.getAttribute(`target`)||``,title:e.getAttribute(`title`)||void 0,description:(e.textContent??``).trim()};for(let[n,r]of Ct)e.hasAttribute(r)&&(t[n]=e.getAttribute(r)??``);return t})}_stepAt(e){let t=this._steps[e];if(!t)throw RangeError(`<wui-tour> has no step ${e}; it has ${this._steps.length}.`);return t}_store(){return this.seenStore?this.seenStore:this.getAttribute(`seen-store`)===`local`?vt():globalThis.window?.WUI?.tour?.seenStore||null}_label(e){return this.getAttribute(St[e])||xt()[e]}_endDialogText(){if(this.getAttribute(`end-dialog`)===`false`)return null;let e=(this.getAttribute(`end-next-label`)??``).trim(),t=(this.getAttribute(`end-next-href`)??``).trim();return{title:this._label(`endTitle`),message:this._label(`endMessage`),button:this._label(`endButton`),nextLabel:e,nextHref:t}}_markSeen(e){let t=this._store();return t?t.markSeen(this.tourId,e):null}async start(){if(this._running)return;this._running=!0;let e=++this._run;this.hasAttribute(`open`)||this.setAttribute(`open`,``);try{await this._start(e)}catch(t){throw e===this._run&&(this._running=!1),t}}async _start(e){this._steps=this._stepList(),this._progress=mt(this._steps.length);let t=this._store();if(t&&!this.tourId)throw Error(`<wui-tour> needs a tour-id to use a seen store.`);if(t&&await t.isSeen(this.tourId)){e===this._run&&this._finish(`alreadySeen`);return}for(let[e,t]of this._steps.entries())t.target&&!Et(document.querySelector(t.target))&&this._progress.drop(e);this._returnFocus=document.activeElement;let n=await this._locate(0,1,e);e===this._run&&(n?(this._firstIndex=n.index,this.dispatchEvent(new CustomEvent(`wui-tour:start`,{bubbles:!0,detail:{total:this._progress.total()}})),e===this._run&&(this._build(),this._show(n))):this._finish(`noTargets`))}next(){return this._move(1)}back(){return!this._current||this._current.index<=this._firstIndex?Promise.resolve():this._move(-1)}async goTo(e){if(this._current){if(!Number.isInteger(e)||e<0||e>=this._steps.length)throw RangeError(`<wui-tour> has no step ${e}; it has ${this._steps.length}.`);await this._go(e,1)}}stop(){this._running&&(this._run++,this._teardown(),this._running=!1,this.hasAttribute(`open`)&&this.removeAttribute(`open`))}async _locate(e,t,n){let r=this._steps;for(let i=e;i>=0&&i<r.length;i+=t){let e=r[i];if(!e)break;if(await this._beforeStep(e,i),n!==this._run)return null;if(!e.target)return{index:i,target:null};let t=document.querySelector(e.target),a=t instanceof HTMLElement||t instanceof SVGElement?t:null;if(Et(a))return this._progress.position(i),{index:i,target:a};this._progress.drop(i)}return null}async _beforeStep(e,t){let n=[];this.dispatchEvent(new CustomEvent(`wui-tour:beforestep`,{bubbles:!0,detail:{step:e,index:t,wait:e=>n.push(e)}})),await Promise.all(n),typeof this.onBeforeStep==`function`&&await this.onBeforeStep(e,t)}_build(){let e=`wui-tour-${++Tt}`,t=document.createElement(`div`);t.className=`wui-tour-layer`,t.innerHTML=` <div class="wui-tour-spot" aria-hidden="true"></div> <div class="wui-tour-card" role="dialog" tabindex="-1" aria-labelledby="${e}-title" aria-describedby="${e}-text"> <p class="wui-tour-position"></p> <h2 class="wui-tour-title" id="${e}-title"></h2> <p class="wui-tour-text" id="${e}-text"></p> <div class="wui-tour-actions"> <button type="button" class="btn btn-sm btn-link wui-tour-skip"></button> <div class="wui-tour-nav"> <button type="button" class="${u(`neutral`,`outline`,`sm`)} wui-tour-back" data-wui="${o}"></button> <button type="button" class="${u(`primary`,`solid`,`sm`)} wui-tour-next" data-wui="${o}"></button> </div> </div> </div> <div class="visually-hidden" role="status" aria-live="polite"></div>`;let n=t;this._shadow=null,this.isolated&&(n=document.createElement(bt),this._shadow=n.attachShadow({mode:`open`}),kt(this._shadow),this._shadow.appendChild(t)),n.setAttribute(`popover`,`manual`),S(document).appendChild(n),document.documentElement.setAttribute(ft,``),this._outer=n,this._layer=t;let r=Z(t,`.wui-tour-spot`,HTMLDivElement),a=Z(t,`.wui-tour-card`,HTMLDivElement),s=Z(t,`[role=status]`,HTMLElement);this._spot=r,this._card=a,this._live=s,Z(a,`.wui-tour-skip`,HTMLElement).addEventListener(`click`,()=>this._close(`skipped`,`button`)),Z(a,`.wui-tour-back`,HTMLElement).addEventListener(`click`,()=>this._move(-1)),Z(a,`.wui-tour-next`,HTMLElement).addEventListener(`click`,()=>this._move(1));let c=e=>this._key(e);this._onKey=c;let l=e=>{let t=this._layer;if(!t||this._ending)return;let n=this._current,r=n?this._stepAt(n.index):null;if(!(e.target instanceof Node))throw Error(`<wui-tour> saw a focus change from a non-node target`);De(t,r,n?.target??null,e.target)||a.focus()};this._onFocusIn=l,document.addEventListener(`keydown`,c,!0),this._shadow||document.addEventListener(`focusin`,l),i(n,()=>this._follow())}_active(){return this._shadow?this._shadow.activeElement:document.activeElement}_raise(){let e=this._outer;if(!e)throw Error(`<wui-tour> raises a step before its host is built`);let t=S(this.ownerDocument);e.parentElement!==t&&t.appendChild(e),se(e)}_show(e){this._current=e;let{index:t,target:n}=e,r=this._stepAt(t),i=this._layer,a=this._spot,o=this._card,s=this._live;if(!i||!a||!o||!s)throw Error(`<wui-tour> shows a step before its layer is built`);this._raise();let c=this._progress.position(t),l=this._progress.total(),u=c===l&&!this._endDialogText(),d=ht(this,c,l);gt(o,{text:d,position:c,total:l}),dt(o,r,{pause:this._label(`mediaPause`),play:this._label(`mediaPlay`)}),o.toggleAttribute(`data-welcome`,!n);let f=j(this,{layer:i,spot:a,card:o},r,n),p=Z(o,`.wui-tour-title`,HTMLElement);p.textContent=r.title||``,p.hidden=!r.title,Z(o,`.wui-tour-text`,HTMLElement).textContent=r.description||``,Z(o,`.wui-tour-skip`,HTMLElement).textContent=this._label(`skip`);let m=Z(o,`.wui-tour-back`,HTMLElement);m.textContent=this._label(`back`),m.hidden=t<=this._firstIndex,Z(o,`.wui-tour-next`,HTMLElement).textContent=this._label(u?`done`:`next`);let h=[d,r.title,r.description].filter(Boolean).join(`. `);s.textContent=f?[h,f].join(/[.!?]$/.test(h)?` `:`. `):h,Be(o,n),a.removeAttribute(Y),this._place(),I(o),this._unbindAdvance?.(),this._unbindAdvance=Ee(r,n,()=>this._move(1));let g=this._active();(g!==null&&o.contains(g)?!(g instanceof HTMLElement&&g.hidden):this._shadow!==null&&Dt(Ot()))||o.focus(),this.dispatchEvent(new CustomEvent(`wui-tour:step`,{bubbles:!0,detail:{step:r,index:t,position:c,total:l}}))}_place(){if(!this._current||!this._layer)return;let e=this._spot,t=this._card;if(!e||!t)throw Error(`<wui-tour> places a step before its layer is built`);K(e,t,this._current.target)}_follow(){if(!this._current||!this._layer||this._ending)return;let e=this._spot;if(!e)throw Error(`<wui-tour> follows a step before its spot is built`);let t=e.style.cssText;this._place(),e.style.cssText!==t&&e.setAttribute(Y,``)}async _move(e){this._current&&await this._go(this._current.index+e,e)}async _go(e,t){if(!this._current||this._moving)return;this._moving=!0;let n=this._run;try{let r=await this._locate(e,t,n);if(n!==this._run)return;if(r){let e=this._card;if(!e)throw Error(`<wui-tour> moved with no card showing`);let t=L(e);if(t&&await t,n!==this._run)return;this._show(r)}else if(t>0){let e=this._endDialogText(),t=e?await this._showEnd(e):`done`;if(n!==this._run)return;let r=await this._close(t===`next`?`next`:`finished`);if(t===`next`&&r&&e){let t=this.ownerDocument.defaultView;if(!t)throw Error(`<wui-tour> has no window to follow its next link in`);t.location.assign(e.nextHref)}}}finally{this._moving=!1}}_showEnd(e){this._unbindAdvance?.(),this._unbindAdvance=null;let t=this._layer,n=this._spot,r=this._card;if(!t||!n||!r)throw Error(`<wui-tour> ends a tour before its layer is built`);return j(this,{layer:t,spot:n,card:r},null,null),n.removeAttribute(Y),this._ending=new AbortController,this._seenMark=this._markSeen(`finished`),Xe(t,e,this._ending.signal)}_key(e){if(!(!this._layer||this._ending||e.altKey||e.ctrlKey||e.metaKey)){if(e.key===`Escape`)e.preventDefault(),e.stopPropagation(),this._close(`skipped`,`escape`);else if(e.key===`ArrowRight`||e.key===`ArrowLeft`){if(Dt(e.composedPath?.()[0]??e.target))return;if(e.preventDefault(),e.key===`ArrowRight`)this._move(1);else{let e=this._current;if(!e)throw Error(`<wui-tour> moved back with no step showing`);e.index>this._firstIndex&&this._move(-1)}}else if(e.key===`Tab`&&!this._shadow){let t=this._current,n=this._card;if(!t||!n)throw Error(`<wui-tour> cycled focus with no step showing`);Oe(e,{card:n,active:this._active(),step:this._stepAt(t.index),target:t.target})}}}_teardown(){if(!this._layer)return;this._onKey&&document.removeEventListener(`keydown`,this._onKey,!0),this._onFocusIn&&document.removeEventListener(`focusin`,this._onFocusIn);let e=!this._shadow||this._shadow.activeElement!==null||!document.activeElement||document.activeElement===document.body;this._unbindAdvance?.(),this._unbindAdvance=null,this._ending?.abort(),this._ending=null,this._seenMark=null;let t=this._outer;if(a(t),!t)throw Error(`<wui-tour> has a layer with no host to remove`);Ie(t),document.documentElement.removeAttribute(ft),this._outer=null,this._shadow=null,this._layer=null,this._current=null;let n=this._returnFocus;this._returnFocus=null,e&&n?.isConnected&&(n instanceof HTMLElement||n instanceof SVGElement)&&n.focus()}async _close(e,t=null){let n=this._run,r=this._current,i=r?{index:r.index,position:this._progress.position(r.index),total:this._progress.total()}:wt,a=this._seenMark;this._teardown();let o=e===`next`?`finished`:e,s=!1;try{n===this._run&&await(a??this._markSeen(o)),s=n===this._run}finally{this._finish(e,i,t)}return s}_finish(e,t=wt,n=null){this._run++,this._running=!1,this.hasAttribute(`open`)&&this.removeAttribute(`open`),this.dispatchEvent(new CustomEvent(`wui-tour:close`,{bubbles:!0,detail:{reason:e,...t,via:n}}))}},$=class extends r{constructor(){super(),this.shadowRoot||this.attachShadow({mode:`open`})}};return t(`wui-tour`,At),t(`wui-tour-step`,$),e.WuiTourStep=$,e})({});
1
+ var WeborityTour=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e,t){if(typeof customElements>`u`||customElements.get(e))return;let n=[];if(typeof document<`u`)for(let r of document.querySelectorAll(e))for(let i of Object.keys(r)){let a=Object.getOwnPropertyDescriptor(t.prototype,i);if(a&&(a.set||a.get)&&(n.push([r,i,Reflect.get(r,i)]),!Reflect.deleteProperty(r,i)))throw Error(`defineElement: could not clear the early "${i}" property on <${e}>.`)}customElements.define(e,t);for(let[t,r,i]of n)if(!Reflect.set(t,r,i))throw Error(`defineElement: could not restore the "${r}" property on <${e}>.`)}var n=`@webority/ui-elements needs a browser DOM; import its types or helpers entry on the server`;if(typeof HTMLElement>`u`)throw Error(n);var r=HTMLElement;function i(e){return getComputedStyle(e).direction===`rtl`}function a(e,t){return t?e===`ArrowRight`?`ArrowLeft`:e===`ArrowLeft`?`ArrowRight`:e:e}function o(e,t){s(e),e._reanchor=t,e._reanchorScroll=n=>{n.composedPath().includes(e)||t()},window.addEventListener(`resize`,e._reanchor),window.addEventListener(`scroll`,e._reanchorScroll,!0)}function s(e){if(!e?._reanchor)return;window.removeEventListener(`resize`,e._reanchor);let t=e._reanchorScroll;t&&window.removeEventListener(`scroll`,t,!0),e._reanchor=null,e._reanchorScroll=null}var c=`AppButton`,l=new Set([`primary`,`success`,`warning`,`danger`,`info`,`neutral`]),u={solid:e=>`btn-${e}`,soft:e=>`btn-soft-${e}`,outline:e=>`btn-outline-${e}`,ghost:e=>`btn-ghost-${e}`,link:e=>`btn-link-${e}`,glass:()=>`btn-glass`};function d(e){return Object.hasOwn(u,e)}function f(e=`primary`,t=`solid`,n=`md`){if(!l.has(e))throw RangeError(`buttonClass: unknown tone "${e}"`);if(!d(t))throw RangeError(`buttonClass: unknown variant "${t}"`);let r=u[t](e);return n===`md`?`btn ${r}`:`btn ${r} btn-${n}`}function p(e,t,...n){if(e.toLowerCase()===`svg`)throw Error(`make() builds HTML elements; use svgRoot for svg`);let r=document.createElement(e);for(let[e,n]of Object.entries(t??{}))n===!0?r.setAttribute(e,``):(typeof n==`string`||typeof n==`number`)&&r.setAttribute(e,String(n));let i=[];for(let e of n)e instanceof Node?i.push(e):(typeof e==`string`||typeof e==`number`)&&i.push(document.createTextNode(String(e)));return r.append(...i),r}var m=`data-wui-dismiss`,h=`data-wui-closing`,g=`[${m}]`,_=`(prefers-reduced-motion: reduce)`,v=`a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])`,y=new WeakSet,b=Symbol.for(`webority.ui.modal-stack`),x=Symbol.for(`webority.ui.root-watches`);function ee(e){let t=e;return t[x]??=new Set,t[x]}function te(e){let t=e.querySelector(`[data-autofocus]`);if(t)return t;let n=null;for(let t of e.querySelectorAll(v))if(!t.closest(`[hidden],[inert]`)){if(!t.closest(`${g},.wui-modal-back`))return t;n??=t}return n}function ne(e){let t=[],n=new Map;for(let r of e.querySelectorAll(v))if(!(r.closest(`[hidden],[inert]`)||r.closest(`dialog`)!==e)&&!(r.tabIndex<0||r.getClientRects().length===0)){if(r instanceof HTMLInputElement&&r.type===`radio`&&r.name){let e=n.get(r.name);e?r.checked&&!e.checked&&(e.checked=r,t[t.indexOf(e.first)]=r):(n.set(r.name,{first:r,checked:r.checked?r:null}),t.push(r))}else t.push(r)}return t}function S(e){let t=e;return t[b]??=[],t[b]}function re(e){C(e),S(e.ownerDocument).push(e)}function C(e){let t=S(e.ownerDocument),n=t.indexOf(e);n>=0&&t.splice(n,1)}function w(e){for(let t of ee(e)){let n=T(e);t.last!==n&&(t.last=n,t.listener(n))}}function ie(e){let t=Promise.allSettled(e.getAnimations().map(e=>e.finished));return new Promise(e=>{let n=window.setTimeout(e,400);t.then(()=>{window.clearTimeout(n),e()})})}function ae(e,t){let n=t.focus===`first-control`?te(e):null,r=n??e,i=r===e&&!e.hasAttribute(`tabindex`);i&&e.setAttribute(`tabindex`,`-1`);let a=!t.escape&&!e.hasAttribute(`closedby`);a&&e.setAttribute(`closedby`,`none`),y.add(e);let o=()=>{if(re(e),!e.hasAttribute(`open`)){let t=n!==null&&!e.querySelector(`[autofocus]`);t&&n.setAttribute(`autofocus`,``);try{e.showModal()}catch(t){throw C(e),t}finally{t&&n.removeAttribute(`autofocus`)}}r.focus(),w(e.ownerDocument)},s=!1,c=n=>{if(n.key!==`Escape`||n.defaultPrevented||!t.escape||n.altKey||n.ctrlKey||n.metaKey)return;let r=e.ownerDocument;T(r)===e&&(e.querySelector(`:popover-open`)||r.querySelector(`[popover=""]:popover-open, [popover="auto"]:popover-open`)||(s=!0,window.setTimeout(()=>{s&&y.has(e)&&e.open&&(s=!1,t.onRequestClose(`escape`))},0)))},l=t=>{if(t.key!==`Tab`||t.defaultPrevented||t.altKey||t.ctrlKey||t.metaKey)return;let n=e.ownerDocument;if(T(n)!==e||e.querySelector(`:popover-open`))return;t.preventDefault();let r=ne(e),i=r[0],a=r[r.length-1];if(!i||!a){e.focus();return}let o=n.activeElement,s=o?r.findIndex(e=>e===o||e.contains(o)):-1;s<0?(t.shiftKey?a:i).focus():r[((t.shiftKey?s-1:s+1)+r.length)%r.length]?.focus()},u=e=>{s=!1,e.preventDefault(),t.escape&&t.onRequestClose(`escape`)},d=n=>{let r=n.target;if(!(r instanceof Element))return;let i=r.closest(g);if(i&&i.closest(`dialog`)===e){t.onRequestClose(`dismiss`);return}if(r!==e||!t.backdrop)return;let a=e.getBoundingClientRect();(n.clientX<a.left||n.clientX>a.right||n.clientY<a.top||n.clientY>a.bottom)&&t.onRequestClose(`backdrop`)},f=()=>{let n=s;s=!1,C(e),y.has(e)?(o(),n&&t.onRequestClose(`escape`)):w(e.ownerDocument)},p=e.ownerDocument;return p.addEventListener(`keydown`,c),p.addEventListener(`keydown`,l),e.addEventListener(`cancel`,u),e.addEventListener(`click`,d),e.addEventListener(`close`,f),o(),()=>{p.removeEventListener(`keydown`,c),p.removeEventListener(`keydown`,l),e.removeEventListener(`cancel`,u),e.removeEventListener(`click`,d),e.removeEventListener(`close`,f),y.delete(e),i&&e.removeAttribute(`tabindex`),a&&e.removeAttribute(`closedby`),C(e),w(e.ownerDocument)}}async function oe(e){y.delete(e),e.setAttribute(h,``),!window.matchMedia(_).matches&&typeof e.getAnimations==`function`&&e.getAnimations().length>0&&await ie(e),e.close(),C(e),w(e.ownerDocument),e.removeAttribute(h)}function se(e){if(ce(e),!e.isConnected)throw Error(`nativeOverlay: raisePopover was given a panel that is not on the page; a caller whose overlay root can leave the page skips the raise until the panel moves to the new root`);e.hidePopover(),e.showPopover()}function ce(e){if(!e.hasAttribute(`popover`))throw Error(`nativeOverlay: the panel has no popover attribute`)}function T(e=document){let t=S(e);for(let e=t.length-1;e>=0;e--){let n=t[e];if(n?.isConnected&&n.hasAttribute(`open`))return n}return e.body}var le=/\{([A-Za-z0-9_]+)\}/g,ue=new Map,de=0,fe=new Map;function E(e,t){let n=ue.get(e);if(n===void 0)return t;let r=fe.get(e);if(r!==void 0&&r.version===de&&r.english===t&&me(r.merged,t))return r.merged;let i=pe(e,n,t);return fe.set(e,{version:de,english:t,merged:i}),i}function pe(e,t,n){let r={};for(let[i,a]of Object.entries(t)){let t=Object.hasOwn(n,i)?n[i]:void 0;if(t===void 0)throw RangeError(`Text ${e}.${i} is not a key of the English text. Allowed keys: ${Object.keys(n).join(`, `)}.`);let o=D(t);for(let t of D(a))if(!o.includes(t))throw RangeError(`Text ${e}.${i} uses {${t}}, which the English text does not have. Allowed placeholders: ${o.length===0?`none`:o.map(e=>`{${e}}`).join(`, `)}.`);r[i]=a}return Object.assign({},n,r)}function me(e,t){let n=Object.keys(t);return Object.keys(e).length===n.length&&n.every(t=>Object.hasOwn(e,t))}function D(e){return Array.from(e.matchAll(le),e=>e[1]??``)}var O={backLabel:`Back`,doneLabel:`Done`,endMessage:`You know your way around now. Enjoy exploring.`,endTitle:`You're all set`,mediaPauseLabel:`Pause animation`,mediaPlayLabel:`Play animation`,nextLabel:`Next`,progressLabel:`Step {current} of {total}`,skipLabel:`Skip`},he={advanceLabel:`Click {actionName} to continue.`},k=`data-advance`,A=`wui-tour-hint`,j=`wui-tour-pointer`,ge=`a[href], button, input, select, textarea, summary, [tabindex], [contenteditable]`,_e=()=>E(`tourAdvance`,he),M=(e,t)=>e?.advanceOn===`click`&&!!t,N=e=>(e??``).replace(/\s+/g,` `).trim(),ve=e=>e instanceof HTMLButtonElement||e instanceof HTMLInputElement||e instanceof HTMLMeterElement||e instanceof HTMLOutputElement||e instanceof HTMLProgressElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement?e.labels:null,ye=e=>e instanceof HTMLButtonElement||e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLFieldSetElement||e instanceof HTMLOptGroupElement||e instanceof HTMLOptionElement?e.disabled:!1;function be(e){let t=e.ownerDocument,n=(e.getAttribute(`aria-labelledby`)||``).split(/\s+/).filter(Boolean),r=e instanceof HTMLInputElement&&/^(button|submit|reset)$/.test(e.type)?e.value:``,i=[n.map(e=>t.getElementById(e)?.textContent??``).join(` `),e.getAttribute(`aria-label`),Array.from(ve(e)??[],e=>e.textContent).join(` `),e.getAttribute(`alt`),r,e.textContent,e.getAttribute(`title`)];for(let e of i){let t=N(e);if(t)return t}return``}function xe(e){for(let t of[e,...e.querySelectorAll(ge)])if((t instanceof HTMLElement||t instanceof SVGElement)&&t.tabIndex>=0&&!ye(t))return t;return null}function P(e,t,n){let r=(e.getAttribute(`aria-describedby`)||``).split(/\s+/).filter(e=>e&&e!==t);n&&r.push(t),r.length>0?e.setAttribute(`aria-describedby`,r.join(` `)):e.removeAttribute(`aria-describedby`)}function Se(e,t){let n=e.querySelector(`.${A}`),r=e.querySelector(`.wui-tour-text`)?.id,i=r?`${r.replace(/-text$/,``)}-hint`:``;if(!t)n?.remove(),i&&P(e,i,!1);else{if(!n){n=e.ownerDocument.createElement(`p`),n.className=A,i&&(n.id=i);let t=e.querySelector(`.wui-tour-actions`);if(!t)throw Error(`Tour card has no actions row.`);t.before(n)}n.textContent=t,i&&P(e,i,!0)}}function Ce(e,t){let n=e.querySelector(`.${j}`);if(!t){n?.remove();return}if(n)return;let r=e.ownerDocument.createElement(`span`);r.className=j,r.setAttribute(`aria-hidden`,`true`),e.append(r)}var we=e=>getComputedStyle(e).animationName;function F(e,{layer:t,spot:n,card:r},i,a){let o=M(i,a);t.toggleAttribute(k,o&&!(t.getRootNode()instanceof ShadowRoot)),n.hasAttribute(k)&&(n.removeAttribute(k),o&&we(n)),o&&n.setAttribute(k,``),Ce(n,o);let s=r.querySelector(`.wui-tour-next`);if(!(s instanceof HTMLElement))throw Error(`Tour card has no next button.`);s.classList.toggle(`btn-primary`,!o),s.classList.toggle(`btn-link`,o);let c=o?N(i?.actionLabel)||be(a):``,l=e.getAttribute(`advance-label`)||_e().advanceLabel,u=c?l.replace(/\{actionName\}/g,()=>c):``;return Se(r,u),u}function Te(e,t,n){if(!M(e,t))return()=>{};let r,i=()=>{r??=setTimeout(n,0)};return t.addEventListener(`click`,i),()=>{t.removeEventListener(`click`,i),clearTimeout(r)}}function Ee(e,t,n,r){return e.contains(r)||M(t,n)&&n.contains(r)}function De(e,{card:t,active:n,step:r,target:i}){let a=Array.from(t.querySelectorAll(`button`)).filter(e=>!e.hidden),o=M(r,i)?xe(i):null;o&&a.push(o);let s=a.findIndex(e=>e===n||e===o&&i?.contains(n));e.preventDefault();let c=a[s===-1?e.shiftKey?a.length-1:0:(s+(e.shiftKey?-1:1)+a.length)%a.length];if(!c)throw Error(`Tour card has no focus stop.`);c.focus()}function Oe(e){return e.key===`Enter`&&e.isComposing!==!0&&e.keyCode!==229}var I=`http://www.w3.org/2000/svg`;function L(e){return e.map(Ae)}function ke(e,t){let n=document.createElementNS(I,`svg`);return R(n,e),n.append(...L(t)),n}function Ae(e){let[t,n,r]=e,i=document.createElementNS(I,t);return R(i,n),typeof r==`string`?i.append(document.createTextNode(r)):r&&i.append(...L(r)),i}function R(e,t){for(let[n,r]of Object.entries(t))r===!0?e.setAttribute(n,``):(typeof r==`string`||typeof r==`number`)&&e.setAttribute(n,String(r))}var je=2/3,Me=1e3,Ne=new Set([`top`,`left`,`width`,`height`]),z=new WeakMap,B=(e,t)=>typeof e.getAnimations==`function`?e.getAnimations().filter(t):[],V=e=>`transitionProperty`in e&&e.transitionProperty===`opacity`,Pe=e=>`transitionProperty`in e&&typeof e.transitionProperty==`string`&&Ne.has(e.transitionProperty),Fe=e=>`animationName`in e&&typeof e.animationName==`string`&&e.animationName.startsWith(`wui-tour-`);function Ie(e){return e.length===0?null:new Promise(t=>{let n=setTimeout(t,Me);Promise.allSettled(e.map(e=>e.finished)).then(()=>{clearTimeout(n),t()})})}function Le(e){let t=e.parentElement?.querySelector(`:scope > .wui-tour-spot`),n=0;for(let e of t?B(t,Pe):[]){let t=e.effect?.getComputedTiming?.();if(typeof t?.duration!=`number`)continue;let r=typeof e.currentTime==`number`?e.currentTime:0;n=Math.max(n,(t.delay??0)+t.duration*je-r)}return n}function Re(e){let t=Le(e);t>0?e.style.setProperty(`--wui-tour-card-delay`,`${Math.round(t)}ms`):e.style.removeProperty(`--wui-tour-card-delay`),e.dataset.state=`entering`;let n={};z.set(e,n);let r=()=>{z.get(e)===n&&e.dataset.state===`entering`&&(e.dataset.state=`shown`)},i=B(e,Fe);i.length===0?r():Promise.allSettled(i.map(e=>e.finished)).then(r)}function ze(e){return e.dataset.state=`leaving`,Ie(B(e,V))}function Be(e){let t=e.shadowRoot?.querySelector(`.wui-tour-layer`),n=e.classList.contains(`wui-tour-layer`)?e:t instanceof HTMLElement?t:null;n&&(n.dataset.state=`leaving`);let r=n?Ie(B(n,V)):null;r?(e.setAttribute(`inert`,``),r.then(()=>e.remove())):e.remove()}var Ve=2,H=12,U=8,He=4,W=20,Ue=`(max-width: 575.98px)`,We=[`bottom`,`top`,`right`,`left`],Ge=[`bottom`,`top`,`left`,`right`],Ke=[`top-left`,`top-right`,`bottom-right`,`bottom-left`],qe,G=(e,t,n)=>Math.max(t,Math.min(e,n)),K=(e,t,n,r)=>(Math.max(e,n)+Math.min(t,r))/2;function Je(e,t){if(!t?.scrollIntoView)return;e.style.maxHeight=``;let n=et(e),r=e.offsetHeight+H;if(t.getBoundingClientRect().height+4+r*2<=n.bottom-n.top){t.scrollIntoView({block:`center`,inline:`nearest`});return}let i=t.style.scrollMarginTop;t.style.scrollMarginTop=`${n.top+r+Ve}px`,t.scrollIntoView({block:`start`,inline:`nearest`}),t.style.scrollMarginTop=i}function Ye(e,t,n){let r=e.style,a=t.style,o=tt(t);if(!n){r.top=`50%`,r.left=`50%`,r.width=`0px`,r.height=`0px`,r.boxShadow=`0 0 0 100vmax var(--color-scrim-strong)`;for(let e of Ke)r.removeProperty(`border-${e}-radius`),r.removeProperty(`corner-${e}-shape`);t.dataset.placement=`center`,o.hidden=!0,a.position=`fixed`,a.top=`50%`,a.left=`50%`,a.transform=`translate(-50%, -50%)`,a.maxHeight=`calc(100vh - 16px)`;return}r.boxShadow=``,a.transform=``,a.position=`fixed`;let s=n.getBoundingClientRect();r.top=`${s.top}px`,r.left=`${s.left}px`,r.width=`${s.width}px`,r.height=`${s.height}px`,Xe(r,n);let c=t.scrollTop;a.maxHeight=``;let l={width:t.offsetWidth,height:t.offsetHeight},u=et(t),d=u.bottom-u.top,f={bottom:u.bottom-s.bottom-H,top:s.top-H-u.top,right:u.right-s.right-H,left:s.left-H-u.left},p=window.matchMedia(Ue).matches,m=(i(n)?Ge:We).find(e=>e===`top`||e===`bottom`?l.height<=f[e]+1:!p&&l.width<=f[e]+1&&l.height<=d+1),h=Math.min(s.bottom,u.bottom+U)-Math.max(s.top,u.top-U);m?Ze(t,o,m,s,u,l):h>=Math.min(l.height,d)+8?Qe(t,o,s,u,l):$e(t,o,f.bottom>=f.top?`bottom`:`top`,s,u,l,f),t.scrollTop=c}function Xe(e,t){qe??=CSS.supports(`corner-top-left-shape`,`squircle`);let n=getComputedStyle(t);for(let t of Ke)e.setProperty(`border-${t}-radius`,n.getPropertyValue(`border-${t}-radius`)),qe&&e.setProperty(`corner-${t}-shape`,n.getPropertyValue(`corner-${t}-shape`))}function Ze(e,t,n,r,i,a){let o=n===`top`||n===`bottom`,s,c,l;if(o){let e=K(r.left,r.right,i.left,i.right);s=G(e-a.width/2,i.left,i.right-a.width),c=n===`bottom`?r.bottom+H:r.top-H-a.height,l=G(e-s,W,a.width-W)}else{let e=K(r.top,r.bottom,i.top,i.bottom);c=G(e-a.height/2,i.top,i.bottom-a.height),s=n===`right`?r.right+H:r.left-H-a.width,l=G(e-c,W,a.height-W)}e.dataset.placement=n,e.style.top=`${c}px`,e.style.left=`${s}px`,t.hidden=!1,t.style.left=o?`${l-e.clientLeft-t.offsetWidth/2}px`:``,t.style.top=o?``:`${l-e.clientTop-t.offsetHeight/2}px`}function Qe(e,t,n,r,i){let a=r.bottom-r.top;e.dataset.placement=`overlap`,t.hidden=!0,e.style.maxHeight=i.height>a?`${Math.max(a,0)}px`:``;let o=Math.min(n.bottom,r.bottom)-He;e.style.top=`${Math.max(r.top,o-Math.min(i.height,a))}px`,e.style.left=`${G(n.left+He,r.left,r.right-i.width)}px`}function $e(e,t,n,r,i,a,o){let s=Math.max(o[n],0),c=Math.min(a.height,s);e.dataset.placement=n,t.hidden=!0,e.style.maxHeight=a.height>s?`${s}px`:``,e.style.top=`${n===`bottom`?r.bottom+H:r.top-H-c}px`;let l=K(r.left,r.right,i.left,i.right);e.style.left=`${G(l-a.width/2,i.left,i.right-a.width)}px`}function et(e){let t=e.parentElement,n=t?getComputedStyle(t):null,r=e=>Number.parseFloat(n?.[e]??``)||0;return{top:r(`paddingTop`)+U,bottom:window.innerHeight-r(`paddingBottom`)-U,left:r(`paddingLeft`)+U,right:window.innerWidth-r(`paddingRight`)-U}}function tt(e){let t=e.querySelector(`:scope > .wui-tour-arrow`);if(t instanceof HTMLElement)return t;let n=document.createElement(`span`);return n.className=`wui-tour-arrow`,n.setAttribute(`aria-hidden`,`true`),n.hidden=!0,e.append(n),n}var nt=0,rt=`btn btn-sm btn-link`;function q(e,t,n){let r=e.querySelector(t);if(!(r instanceof n))throw Error(`Expected "${t}" to match a ${n.name}.`);return r}function it(e,t){let n=`wui-tour-end-${++nt}`,{nextLabel:r,nextHref:i}=e,a=r&&i?p(`a`,{class:`${f(`primary`,`solid`,`sm`)} wui-tour-end-next`,"data-wui":c,href:i},r):null,o=a!==null,s=p(`button`,{type:`button`,class:`${o?rt:f(`primary`,`solid`,`sm`)} wui-tour-end-button`,"data-wui":c},e.button);return p(t?`dialog`:`div`,{class:`wui-tour-card wui-tour-end`,"data-layout":`center`,"data-next":o||void 0,role:`dialog`,tabindex:-1,"aria-labelledby":`${n}-title`,"aria-describedby":`${n}-message`},p(`div`,{class:`wui-tour-end-mark`,"aria-hidden":`true`},ke({viewBox:`0 0 24 24`,focusable:`false`},[[`path`,{d:`M5 12.5l4.5 4.5L19 7.5`}]])),p(`h2`,{class:`wui-tour-title wui-tour-end-title`,id:`${n}-title`},e.title),p(`p`,{class:`wui-tour-text wui-tour-end-message`,id:`${n}-message`},e.message),p(`div`,{class:`wui-tour-actions`},a,s))}var at=e=>e.button===0&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey;function ot(e,t,n){let r=e.ownerDocument,i=it(t,e.getRootNode()===r),a=q(i,`.wui-tour-end-button`,HTMLButtonElement),o=i.querySelector(`.wui-tour-end-next`);if(o!==null&&!(o instanceof HTMLAnchorElement))throw Error(`The end dialog's next link is not a link.`);let s=o,c=s??a,l=new AbortController,u=i instanceof HTMLDialogElement?i:null,d=null;return new Promise(o=>{let f=e=>{if(l.abort(),d&&u){let e=d;d=null,oe(u).then(e)}o(e)};if(n?.aborted){f(`done`);return}let p=q(e,`.wui-tour-card:not(.wui-tour-end)`,HTMLElement),m=q(e,`.wui-tour-spot`,HTMLElement),h=q(e,`[role=status]`,HTMLElement),g={signal:l.signal};n?.addEventListener(`abort`,()=>f(`done`),g),a.addEventListener(`click`,()=>f(`done`),g),s&&s.addEventListener(`click`,e=>{at(e)&&(e.preventDefault(),f(`next`))},g),r.addEventListener(`keydown`,e=>{if(!(e.altKey||e.ctrlKey||e.metaKey)){if(e.key===`Escape`){if(d)return;e.preventDefault(),e.stopPropagation(),f(`done`)}else Oe(e)&&s&&!e.shiftKey&&(e.composedPath?.()[0]??e.target)===s&&(e.preventDefault(),f(`next`))}},{capture:!0,signal:l.signal});let _=()=>{l.signal.aborted||(p.hidden=!0,Ye(m,p,null),e.append(i),Re(i),u&&(d=ae(u,{escape:!0,backdrop:!1,focus:`first-control`,onRequestClose:()=>f(`done`)})),h.textContent=[t.title,t.message].filter(Boolean).join(`. `),c.focus())},v=ze(p);v===null?_():v.then(_)})}var st=` :host { all: initial; display: revert-layer; position: fixed; inset: 0; ${Object.entries({"--wui-z-tour":`1550`,"--wui-radius-sm":`8px`,"--wui-radius-lg":`14px`,"--wui-shadow-popover":`0px 8px 28px -6px rgba(7, 20, 55, 0.14)`,"--wui-ease-out":`cubic-bezier(0.22, 1, 0.36, 1)`,"--wui-ease-linear":`cubic-bezier(0, 0, 1, 1)`,"--wui-duration-fast":`150ms`,"--wui-duration-default":`250ms`,"--wui-duration-slow":`400ms`,"--wui-space-xs":`4px`,"--wui-tour-motion-duration":`200ms`,"--wui-tour-motion-ease":`cubic-bezier(0.22, 1, 0.36, 1)`,"--wui-tour-spot-duration":`240ms`,"--wui-tour-spot-ease":`cubic-bezier(0.32, 0.72, 0, 1)`,"--color-primary":`#4F46E5`,"--color-primary-hover":`#4338CA`,"--color-primary-text":`#4F46E5`,"--color-focus-ring":`#4F46E5`,"--wui-focus-ring-width":`2px`,"--wui-focus-ring-offset":`2px`,"--color-on-primary":`#FFFFFF`,"--color-success-soft":`#E8FAEE`,"--color-success-text":`#0e7531`,"--color-on-scrim":`#FFFFFF`,"--color-scrim-strong":`color-mix(in srgb, #071437 62%, transparent)`,"--color-surface":`#FFFFFF`,"--color-text":`#071437`,"--color-text-muted":`#4B5675`,"--color-border":`#EBEDF3`,"--color-bg-muted":`#F5F6FA`}).map(([e,t])=>` ${e}: ${t};`).join(` `)} } *, *::before, *::after { box-sizing: border-box; } [hidden] { display: none !important; } .visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; } .btn { display: inline-block; margin: 0; padding: 0.25rem 0.5rem; border: 1px solid transparent; border-radius: 0.375rem; background: transparent; font: inherit; font-size: 0.875rem; font-weight: 500; line-height: 1.5; text-align: center; text-decoration: none; white-space: nowrap; cursor: pointer; } .btn:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; } .btn-primary { background: var(--color-primary); border-color: var(--color-primary); color: var(--color-on-primary); } .btn-primary:hover { background: var(--color-primary-hover); border-color: var(--color-primary-hover); } .btn-outline-neutral { border-color: var(--color-text-muted); color: var(--color-text-muted); } .btn-outline-neutral:hover { background: var(--color-bg-muted); color: var(--color-text); } .btn-link { font-weight: 400; color: var(--color-primary-text); text-decoration: underline; } .btn-link:hover { color: var(--color-primary-hover); } .wui-tour-layer { pointer-events: none; font-family: "Webority Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; font-size: 16px; font-weight: 400; line-height: 1.5; color: var(--color-text); text-align: start; } .wui-tour-card { pointer-events: auto; } .wui-tour-layer { position: fixed; inset: 0; z-index: var(--wui-z-tour); width: auto; height: auto; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; overflow: visible; background: none; } .wui-tour-spot { position: fixed; box-shadow: 0 0 0 2px var(--color-primary), 0 0 4px 2px color-mix(in srgb, var(--color-primary) 30%, transparent), 0 0 0 100vmax var(--color-scrim-strong); pointer-events: none; } .wui-tour-card { display: flex; flex-direction: column; gap: 8px; width: min(360px, 100vw - 16px); padding: 16px; overflow-y: auto; background: var(--color-surface); color: var(--color-text); border: 1px solid var(--color-border); border-radius: var(--wui-radius-lg); corner-shape: squircle; box-shadow: var(--wui-shadow-popover); } .wui-tour-card:focus { outline: none; } .wui-tour-card:focus-visible { outline: var(--wui-focus-ring-width) solid var(--color-focus-ring); outline-offset: var(--wui-focus-ring-offset); } .wui-tour-title { margin: 0; font-size: 16px; font-weight: 600; } .wui-tour-text { margin: 0; font-size: 14px; color: var(--color-text-muted); } .wui-tour-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; } .wui-tour-nav { display: flex; gap: 8px; } .wui-tour-skip { color: var(--color-text-muted); } .wui-tour-back, .wui-tour-next { min-width: 64px; } @keyframes wui-tour-fade-in { from { opacity: 0; } to { opacity: 1; } } @keyframes wui-tour-card-enter { from { opacity: 0; scale: 0.96; translate: var(--wui-tour-card-lift, 0 6px); } to { opacity: 1; scale: 1; translate: 0 0; } } .wui-tour-layer[data-state=leaving], .wui-tour-card[data-state=leaving] { opacity: 0; } .wui-tour-layer[data-state=leaving], .wui-tour-layer[data-state=leaving] * { pointer-events: none; } @media (prefers-reduced-motion: no-preference) { .wui-tour-layer { animation: wui-tour-fade-in var(--wui-tour-motion-duration) var(--wui-tour-motion-ease); } .wui-tour-layer[data-state=leaving] { transition: opacity var(--wui-tour-motion-duration) var(--wui-tour-motion-ease); } .wui-tour-spot { transition: top var(--wui-tour-spot-duration) var(--wui-tour-spot-ease), left var(--wui-tour-spot-duration) var(--wui-tour-spot-ease), width var(--wui-tour-spot-duration) var(--wui-tour-spot-ease), height var(--wui-tour-spot-duration) var(--wui-tour-spot-ease), border-radius var(--wui-tour-spot-duration) var(--wui-tour-spot-ease); } .wui-tour-spot[data-tracking] { transition: none; } .wui-tour-card { --wui-tour-card-lift: 0 6px; transform-origin: top center; } .wui-tour-card[data-placement=top] { --wui-tour-card-lift: 0 -6px; transform-origin: bottom center; } .wui-tour-card[data-placement=bottom] { --wui-tour-card-lift: 0 6px; transform-origin: top center; } .wui-tour-card[data-placement=left] { --wui-tour-card-lift: -6px 0; transform-origin: right center; } .wui-tour-card[data-placement=right] { --wui-tour-card-lift: 6px 0; transform-origin: left center; } .wui-tour-card[data-placement=overlap], .wui-tour-card[data-placement=center] { --wui-tour-card-lift: 0 0; transform-origin: center; } .wui-tour-card[data-state=entering] { animation: wui-tour-card-enter var(--wui-tour-motion-duration) var(--wui-tour-motion-ease) var(--wui-tour-card-delay, 0ms) both; } .wui-tour-card[data-state=leaving] { transition: opacity calc(var(--wui-tour-motion-duration) / 2) var(--wui-tour-motion-ease); } } @media (prefers-reduced-motion: reduce) { .wui-tour-layer { animation: wui-tour-fade-in var(--wui-duration-fast) var(--wui-ease-linear); } .wui-tour-layer[data-state=leaving] { transition: opacity var(--wui-duration-fast) var(--wui-ease-linear); } .wui-tour-card[data-state=entering] { animation: wui-tour-fade-in var(--wui-duration-fast) var(--wui-ease-linear) both; } } .wui-tour-progress-bar { display: flex; gap: 4px; } .wui-tour-progress-segment { flex: 1 1 0; height: 4px; border-radius: 999px; background: var(--color-border); } .wui-tour-progress-segment[data-filled] { background: var(--color-primary); } .wui-tour-position { margin: 0; font-size: 12px; color: var(--color-text-muted); } .wui-tour-layer { padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); } .wui-tour-card:has(.wui-tour-arrow:not([hidden])) { overflow: visible; } .wui-tour-arrow { position: absolute; width: 8px; height: 8px; background: var(--color-surface); border: 1px solid var(--color-border); rotate: 45deg; pointer-events: none; } .wui-tour-card[data-placement=bottom] .wui-tour-arrow { top: -5px; border-right-color: rgba(0, 0, 0, 0); border-bottom-color: rgba(0, 0, 0, 0); } .wui-tour-card[data-placement=top] .wui-tour-arrow { bottom: -5px; border-top-color: rgba(0, 0, 0, 0); border-left-color: rgba(0, 0, 0, 0); } .wui-tour-card[data-placement=right] .wui-tour-arrow { left: -5px; border-top-color: rgba(0, 0, 0, 0); border-right-color: rgba(0, 0, 0, 0); } .wui-tour-card[data-placement=left] .wui-tour-arrow { right: -5px; border-bottom-color: rgba(0, 0, 0, 0); border-left-color: rgba(0, 0, 0, 0); } @media (max-width: 575.98px) { .wui-tour-card { width: calc(100vw - 16px); } .wui-tour-actions .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; } } .wui-tour-media { position: relative; order: -1; flex: none; aspect-ratio: 16/9; margin: -16px -16px 4px; overflow: hidden; background: var(--color-border); } .wui-tour-media>img, .wui-tour-media>video { display: block; width: 100%; height: 100%; object-fit: cover; } .wui-tour-card[data-welcome] { width: min(420px, 100vw - 16px); } .wui-tour-media-toggle { position: absolute; inset-block-end: 8px; inset-inline-end: 8px; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: var(--color-scrim-strong); color: var(--color-on-scrim); cursor: pointer; } .wui-tour-media-toggle>svg { width: 20px; height: 20px; fill: currentColor; } .wui-tour-media-toggle:focus-visible { outline: 2px solid var(--color-on-scrim); outline-offset: var(--wui-focus-ring-offset); } .wui-tour-layer[data-advance] { pointer-events: none; } .wui-tour-layer[data-advance]:not([data-state=leaving]) .wui-tour-card { pointer-events: auto; } .wui-tour-layer[data-advance]:not([data-state=leaving]) .wui-tour-spot::before { content: ""; position: absolute; inset: -100vmax; pointer-events: auto; clip-path: polygon(evenodd, 0 0, 100% 0, 100% 100%, 0 100%, 0 0, 100vmax 100vmax, calc(100% - 100vmax) 100vmax, calc(100% - 100vmax) calc(100% - 100vmax), 100vmax calc(100% - 100vmax), 100vmax 100vmax); } .wui-tour-hint { margin: 0; font-size: 14px; font-weight: 600; color: var(--color-text); } .wui-tour-pointer { position: absolute; top: 50%; left: 50%; width: 18px; height: 24px; pointer-events: none; } .wui-tour-pointer::before { content: ""; position: absolute; inset: 0; background: var(--color-primary); clip-path: polygon(0 0, 0 75%, 28% 58%, 46% 100%, 62% 92%, 45% 52%, 85% 52%); filter: drop-shadow(1px 0 0 var(--color-surface)) drop-shadow(-1px 0 0 var(--color-surface)) drop-shadow(0 1px 0 var(--color-surface)) drop-shadow(0 -1px 0 var(--color-surface)); } .wui-tour-pointer::after { content: ""; position: absolute; top: -16px; left: -16px; width: 32px; height: 32px; border-radius: 50%; background: var(--color-primary); opacity: 0; display: none; } @media (max-width: 575.98px) { .wui-tour-pointer { width: 24px; height: 24px; translate: -50% -50%; } .wui-tour-pointer::before { clip-path: none; border-radius: 50%; box-shadow: 0 0 0 2px var(--color-surface); filter: none; } .wui-tour-pointer::after { top: -4px; left: -4px; } } @keyframes wui-tour-tap { 0% { opacity: 0; transform: translate(56px, 44px) scale(1); } 10% { opacity: 1; transform: translate(56px, 44px) scale(1); } 45% { transform: translate(0, 0) scale(1); } 52% { transform: translate(0, 0) scale(0.86); } 60% { transform: translate(0, 0) scale(1); } 85% { opacity: 1; transform: translate(0, 0) scale(1); } 100% { opacity: 0; transform: translate(0, 0) scale(1); } } @keyframes wui-tour-tap-rtl { 0% { opacity: 0; transform: translate(-56px, 44px) scale(1); } 10% { opacity: 1; transform: translate(-56px, 44px) scale(1); } 45% { transform: translate(0, 0) scale(1); } 52% { transform: translate(0, 0) scale(0.86); } 60% { transform: translate(0, 0) scale(1); } 85% { opacity: 1; transform: translate(0, 0) scale(1); } 100% { opacity: 0; transform: translate(0, 0) scale(1); } } @keyframes wui-tour-ripple { 0%, 50% { opacity: 0; transform: scale(0.2); } 52% { opacity: 0.35; transform: scale(0.2); } 80%, 100% { opacity: 0; transform: scale(1); } } @media (prefers-reduced-motion: no-preference) { .wui-tour-pointer { opacity: 0; animation: wui-tour-tap calc(var(--wui-duration-slow) * 6) var(--wui-ease-out) var(--wui-tour-spot-duration) infinite; } .wui-tour-pointer:dir(rtl) { animation-name: wui-tour-tap-rtl; } .wui-tour-pointer::after { display: block; animation: wui-tour-ripple calc(var(--wui-duration-slow) * 6) var(--wui-ease-out) var(--wui-tour-spot-duration) infinite; } } @keyframes wui-tour-check { from { stroke-dashoffset: 24; } to { stroke-dashoffset: 0; } } .wui-tour-end[data-layout=center] { --wui-tour-card-lift: 0 0; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); transform-origin: center; align-items: center; gap: 8px; width: min(420px, 100vw - 16px); max-height: calc(100vh - 16px); padding: 24px; text-align: center; } .wui-tour-end[data-layout=center] .wui-tour-actions { justify-content: center; margin-top: 8px; } .wui-tour-end[data-layout=center][data-next] .wui-tour-actions { flex-direction: column; align-items: stretch; width: 100%; gap: var(--wui-space-xs); } .wui-tour-end-mark { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; background: var(--color-success-soft); color: var(--color-success-text); } .wui-tour-end-mark>svg { width: 26px; height: 26px; } .wui-tour-end-mark path { fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; } .wui-tour-end-title { font-size: 18px; } .wui-tour-end-message { text-wrap: balance; } .wui-tour-end-next { text-wrap: balance; } .wui-tour-end-button { min-width: 120px; } @media (prefers-reduced-motion: no-preference) { .wui-tour-end-mark path { animation: wui-tour-check var(--wui-duration-default) var(--wui-ease-out) calc(var(--wui-tour-card-delay, 0ms) + var(--wui-duration-fast)) both; } } `,ct=()=>E(`tour`,O),lt=`wui-tour-media`,ut=`wui-tour-media-toggle`,dt=`http://www.w3.org/2000/svg`,ft=`M6 5h4v14H6zM14 5h4v14h-4z`,pt=`M8 5v14l11-7z`,mt=()=>({pause:ct().mediaPauseLabel,play:ct().mediaPlayLabel}),ht=()=>globalThis.matchMedia?.(`(prefers-reduced-motion: reduce)`)?.matches===!0;function gt(e){let t=document.createElementNS(dt,`svg`);t.setAttribute(`viewBox`,`0 0 24 24`),t.setAttribute(`aria-hidden`,`true`),t.setAttribute(`focusable`,`false`);let n=document.createElementNS(dt,`path`);return n.setAttribute(`d`,e),t.appendChild(n),t}function _t(e){let t=document.createElement(`img`);return t.setAttribute(`alt`,e.mediaAlt??``),t.setAttribute(`width`,`1280`),t.setAttribute(`height`,`720`),t.setAttribute(`loading`,`lazy`),t.setAttribute(`decoding`,`async`),t.setAttribute(`src`,e.media??``),t}function vt(e,t){let n=document.createElement(`video`);return n.muted=!0,n.setAttribute(`muted`,``),n.loop=!0,n.setAttribute(`playsinline`,``),t&&n.setAttribute(`autoplay`,``),n.setAttribute(`preload`,t?`auto`:`metadata`),e.mediaAlt&&n.setAttribute(`aria-label`,e.mediaAlt),e.mediaPoster&&n.setAttribute(`poster`,e.mediaPoster),n.setAttribute(`src`,e.media??``),n}function yt(e,t){let n=document.createElement(`button`);n.type=`button`,n.className=ut;let r=(r=!e.paused)=>{n.setAttribute(`aria-label`,r?t.pause:t.play),n.replaceChildren(gt(r?ft:pt))};return e.addEventListener(`play`,()=>r()),e.addEventListener(`pause`,()=>r()),n.addEventListener(`click`,()=>{e.paused?e.play()?.catch(()=>r()):e.pause()}),r(e.hasAttribute(`autoplay`)),n}function bt(e){let t=e.querySelector(`:scope > .${lt}`);if(!t)return;let n=t.querySelector(`video`);n&&(n.pause(),n.removeAttribute(`src`),n.load()),t.remove()}function xt(e,t,n=mt()){if(bt(e),!t.media){e.removeAttribute(`data-media`);return}let r=document.createElement(`div`);if(r.className=lt,t.mediaType===`video`){let e=vt(t,!ht());r.append(e,yt(e,n))}else r.appendChild(_t(t));e.prepend(r),e.setAttribute(`data-media`,t.target?`step`:`welcome`)}var St=`data-wui-tour-open`,Ct=()=>E(`tour`,O);function wt(e){let t=new Set;return{drop:e=>{t.add(e)},position:e=>{t.delete(e);let n=0;for(let r of t)r<e&&n++;return e+1-n},total:()=>e-t.size}}function Tt(e,t,n){return(e.getAttribute(`progress-label`)||Ct().progressLabel).replace(/\{(current|total)\}/g,(e,r)=>String(r===`current`?t:n))}function Et(e,{text:t,position:n,total:r}){let i=e.querySelector(`.wui-tour-position`);if(!(i instanceof HTMLElement))throw Error(`tour position label missing`);i.textContent=t;let a=e.querySelector(`.wui-tour-progress-bar`);if(!a){let t=e.ownerDocument,n=t.createElement(`div`);n.className=`wui-tour-progress`,n.setAttribute(`aria-hidden`,`true`),a=t.createElement(`div`),a.className=`wui-tour-progress-bar`,n.append(a),i.before(n)}let o=a.children;for(;o.length<r;){let t=e.ownerDocument.createElement(`span`);t.className=`wui-tour-progress-segment`,a.append(t)}for(;o.length>r;){let e=a.lastElementChild;if(!e)throw Error(`progress bar segment missing`);e.remove()}for(let e=0;e<o.length;e++){let t=o[e];if(!t)throw Error(`progress bar segment missing`);t.toggleAttribute(`data-filled`,e<n)}}var Dt=`wui-tour-seen:`;function Ot(e=Dt,t=globalThis.localStorage){return{isSeen:async n=>t.getItem(e+n)===`1`,markSeen:async n=>{t.setItem(e+n,`1`)}}}var kt=`wui-tour-step`,At=`wui-tour-host`,J=`data-tracking`,Y=()=>E(`tour`,O),jt=()=>({back:Y().backLabel,next:Y().nextLabel,skip:Y().skipLabel,done:Y().doneLabel,mediaPause:Y().mediaPauseLabel,mediaPlay:Y().mediaPlayLabel,endTitle:Y().endTitle,endMessage:Y().endMessage,endButton:Y().doneLabel}),Mt={back:`back-label`,next:`next-label`,skip:`skip-label`,done:`done-label`,mediaPause:`media-pause-label`,mediaPlay:`media-play-label`,endTitle:`end-title`,endMessage:`end-message`,endButton:`end-button`},Nt=[[`media`,`media`],[`mediaAlt`,`media-alt`],[`mediaPoster`,`media-poster`],[`mediaType`,`media-type`],[`advanceOn`,`advance-on`],[`actionLabel`,`action-label`]],Pt={index:null,position:null,total:null},Ft=0,X=e=>!e?.isConnected||getComputedStyle(e).visibility===`hidden`?!1:e.getClientRects().length>0,It=e=>e instanceof HTMLElement&&(e.isContentEditable||/^(INPUT|TEXTAREA|SELECT)$/.test(e.tagName));function Z(e,t,n){let r=e.querySelector(t);if(!(r instanceof n))throw Error(`<wui-tour> layer has no ${t}`);return r}var Lt=()=>{let e=document.activeElement;for(;e?.shadowRoot?.activeElement;)e=e.shadowRoot.activeElement;return e},Q=null;function Rt(e){Q||(Q=new CSSStyleSheet,Q.replaceSync(st)),e.adoptedStyleSheets=[Q]}var zt=class extends r{seenStore;onBeforeStep;_run;_running;_layer;_outer;_shadow;_unbindAdvance;_ending;_seenMark;_steps=[];_progress=wt(0);_firstIndex=0;_returnFocus=null;_current=null;_moving=!1;_card=null;_spot=null;_live=null;_onKey=null;_onFocusIn=null;static get observedAttributes(){return[`open`]}constructor(){super(),this.seenStore=null,this.onBeforeStep=null,this._run=0,this._running=!1,this._layer=null,this._outer=null,this._shadow=null,this._unbindAdvance=null,this._ending=null,this._seenMark=null}connectedCallback(){this.hasAttribute(`open`)&&this.start()}disconnectedCallback(){this.stop()}attributeChangedCallback(e,t,n){e===`open`&&this.isConnected&&(n===null?this.stop():this.start())}get tourId(){return this.getAttribute(`tour-id`)||``}set tourId(e){e==null||e===``?this.removeAttribute(`tour-id`):this.setAttribute(`tour-id`,String(e))}get isolated(){return this.hasAttribute(`isolated`)}set isolated(e){this.toggleAttribute(`isolated`,e===!0||e===``||e===`true`)}_stepList(){return Array.from(this.querySelectorAll(`:scope > ${kt}`),e=>{let t={target:e.getAttribute(`target`)||``,title:e.getAttribute(`title`)||void 0,description:(e.textContent??``).trim()};for(let[n,r]of Nt)e.hasAttribute(r)&&(t[n]=e.getAttribute(r)??``);return t})}_stepAt(e){let t=this._steps[e];if(!t)throw RangeError(`<wui-tour> has no step ${e}; it has ${this._steps.length}.`);return t}_store(){return this.seenStore?this.seenStore:this.getAttribute(`seen-store`)===`local`?Ot():globalThis.window?.WUI?.tour?.seenStore||null}_label(e){return this.getAttribute(Mt[e])||jt()[e]}_endDialogText(){if(this.getAttribute(`end-dialog`)===`false`)return null;let e=(this.getAttribute(`end-next-label`)??``).trim(),t=(this.getAttribute(`end-next-href`)??``).trim();return{title:this._label(`endTitle`),message:this._label(`endMessage`),button:this._label(`endButton`),nextLabel:e,nextHref:t}}_markSeen(e){let t=this._store();return t?t.markSeen(this.tourId,e):null}async start(){if(this._running)return;this._running=!0;let e=++this._run;this.hasAttribute(`open`)||this.setAttribute(`open`,``);try{await this._start(e)}catch(t){throw e===this._run&&(this._running=!1),t}}async _start(e){this._steps=this._stepList(),this._progress=wt(this._steps.length);let t=this._store();if(t&&!this.tourId)throw Error(`<wui-tour> needs a tour-id to use a seen store.`);if(t&&await t.isSeen(this.tourId)){e===this._run&&this._finish(`alreadySeen`);return}for(let[e,t]of this._steps.entries())t.target&&!X(document.querySelector(t.target))&&this._progress.drop(e);this._returnFocus=document.activeElement;let n=await this._locate(0,1,e);e===this._run&&(n?(this._firstIndex=n.index,this.dispatchEvent(new CustomEvent(`wui-tour:start`,{bubbles:!0,detail:{total:this._progress.total()}})),e===this._run&&(this._build(),this._show(n))):this._finish(`noTargets`))}next(){return this._move(1)}back(){return!this._current||this._current.index<=this._firstIndex?Promise.resolve():this._move(-1)}async goTo(e){if(this._current){if(!Number.isInteger(e)||e<0||e>=this._steps.length)throw RangeError(`<wui-tour> has no step ${e}; it has ${this._steps.length}.`);await this._go(e,1)}}stop(){this._running&&(this._run++,this._teardown(),this._running=!1,this.hasAttribute(`open`)&&this.removeAttribute(`open`))}async _locate(e,t,n){let r=this._steps;for(let i=e;i>=0&&i<r.length;i+=t){let e=r[i];if(!e)break;if(await this._beforeStep(e,i),n!==this._run)return null;if(!e.target)return{index:i,target:null};let t=document.querySelector(e.target),a=t instanceof HTMLElement||t instanceof SVGElement?t:null;if(X(a))return this._progress.position(i),{index:i,target:a};this._progress.drop(i)}return null}async _beforeStep(e,t){let n=[];this.dispatchEvent(new CustomEvent(`wui-tour:beforestep`,{bubbles:!0,detail:{step:e,index:t,wait:e=>n.push(e)}})),await Promise.all(n),typeof this.onBeforeStep==`function`&&await this.onBeforeStep(e,t)}_build(){let e=`wui-tour-${++Ft}`,t=document.createElement(`div`);t.className=`wui-tour-layer`,t.replaceChildren(p(`div`,{class:`wui-tour-spot`,"aria-hidden":`true`}),p(`div`,{class:`wui-tour-card`,role:`dialog`,tabindex:`-1`,"aria-labelledby":`${e}-title`,"aria-describedby":`${e}-text`},p(`p`,{class:`wui-tour-position`}),p(`h2`,{class:`wui-tour-title`,id:`${e}-title`}),p(`p`,{class:`wui-tour-text`,id:`${e}-text`}),p(`div`,{class:`wui-tour-actions`},p(`button`,{type:`button`,class:`btn btn-sm btn-link wui-tour-skip`}),p(`div`,{class:`wui-tour-nav`},p(`button`,{type:`button`,class:`${f(`neutral`,`outline`,`sm`)} wui-tour-back`,"data-wui":c}),p(`button`,{type:`button`,class:`${f(`primary`,`solid`,`sm`)} wui-tour-next`,"data-wui":c})))),p(`div`,{class:`visually-hidden`,role:`status`,"aria-live":`polite`}));let n=t;this._shadow=null,this.isolated&&(n=document.createElement(At),this._shadow=n.attachShadow({mode:`open`}),Rt(this._shadow),this._shadow.appendChild(t)),n.setAttribute(`popover`,`manual`),T(document).appendChild(n),document.documentElement.setAttribute(St,``),this._outer=n,this._layer=t;let r=Z(t,`.wui-tour-spot`,HTMLDivElement),i=Z(t,`.wui-tour-card`,HTMLDivElement),a=Z(t,`[role=status]`,HTMLElement);this._spot=r,this._card=i,this._live=a,Z(i,`.wui-tour-skip`,HTMLElement).addEventListener(`click`,()=>this._close(`skipped`,`button`)),Z(i,`.wui-tour-back`,HTMLElement).addEventListener(`click`,()=>this._move(-1)),Z(i,`.wui-tour-next`,HTMLElement).addEventListener(`click`,()=>this._move(1));let s=e=>this._key(e);this._onKey=s;let l=e=>{let t=this._layer;if(!t||this._ending)return;let n=this._current,r=n?this._stepAt(n.index):null;if(!(e.target instanceof Node))throw Error(`<wui-tour> saw a focus change from a non-node target`);Ee(t,r,n?.target??null,e.target)||i.focus()};this._onFocusIn=l,document.addEventListener(`keydown`,s,!0),this._shadow||document.addEventListener(`focusin`,l),o(n,()=>this._follow())}_active(){return this._shadow?this._shadow.activeElement:document.activeElement}_raise(){let e=this._outer;if(!e)throw Error(`<wui-tour> raises a step before its host is built`);let t=T(this.ownerDocument);e.parentElement!==t&&t.appendChild(e),se(e)}_show(e){this._current=e;let{index:t,target:n}=e,r=this._stepAt(t),i=this._layer,a=this._spot,o=this._card,s=this._live;if(!i||!a||!o||!s)throw Error(`<wui-tour> shows a step before its layer is built`);this._raise();let c=this._progress.position(t),l=this._progress.total(),u=c===l&&!this._endDialogText(),d=Tt(this,c,l);Et(o,{text:d,position:c,total:l}),xt(o,r,{pause:this._label(`mediaPause`),play:this._label(`mediaPlay`)}),o.toggleAttribute(`data-welcome`,!n);let f=F(this,{layer:i,spot:a,card:o},r,n),p=Z(o,`.wui-tour-title`,HTMLElement);p.textContent=r.title||``,p.hidden=!r.title,Z(o,`.wui-tour-text`,HTMLElement).textContent=r.description||``,Z(o,`.wui-tour-skip`,HTMLElement).textContent=this._label(`skip`);let m=Z(o,`.wui-tour-back`,HTMLElement);m.textContent=this._label(`back`),m.hidden=t<=this._firstIndex,Z(o,`.wui-tour-next`,HTMLElement).textContent=this._label(u?`done`:`next`);let h=[d,r.title,r.description].filter(Boolean).join(`. `);s.textContent=f?[h,f].join(/[.!?]$/.test(h)?` `:`. `):h,Je(o,n),a.removeAttribute(J),this._place(),Re(o),this._unbindAdvance?.(),this._unbindAdvance=Te(r,n,()=>void this._move(1));let g=this._active();(g!==null&&o.contains(g)?!(g instanceof HTMLElement&&g.hidden):this._shadow!==null&&It(Lt()))||o.focus(),this.dispatchEvent(new CustomEvent(`wui-tour:step`,{bubbles:!0,detail:{step:r,index:t,position:c,total:l}}))}_place(){if(!this._current||!this._layer)return;let e=this._spot,t=this._card;if(!e||!t)throw Error(`<wui-tour> places a step before its layer is built`);Ye(e,t,this._current.target)}_follow(){if(!this._current||!this._layer||this._ending)return;let e=this._spot;if(!e)throw Error(`<wui-tour> follows a step before its spot is built`);let t=e.style.cssText;this._place(),e.style.cssText!==t&&e.setAttribute(J,``)}async _move(e){this._current&&await this._go(this._current.index+e,e)}async _go(e,t){if(!this._current||this._moving)return;this._moving=!0;let n=this._run;try{let r=await this._locate(e,t,n);if(n!==this._run)return;if(r){let e=this._card;if(!e)throw Error(`<wui-tour> moved with no card showing`);let t=ze(e);if(t!==null&&await t,n!==this._run)return;this._show(r)}else if(t>0){let e=this._endDialogText(),t=e?await this._showEnd(e):`done`;if(n!==this._run)return;let r=await this._close(t===`next`?`next`:`finished`);if(t===`next`&&r&&e){let t=this.ownerDocument.defaultView;if(!t)throw Error(`<wui-tour> has no window to follow its next link in`);t.location.assign(e.nextHref)}}}finally{this._moving=!1}}_showEnd(e){this._unbindAdvance?.(),this._unbindAdvance=null;let t=this._layer,n=this._spot,r=this._card;if(!t||!n||!r)throw Error(`<wui-tour> ends a tour before its layer is built`);return F(this,{layer:t,spot:n,card:r},null,null),n.removeAttribute(J),this._ending=new AbortController,this._seenMark=this._markSeen(`finished`),ot(t,e,this._ending.signal)}_key(e){if(!this._layer||this._ending||e.altKey||e.ctrlKey||e.metaKey)return;let t=a(e.key,i(this));if(e.key===`Escape`)e.preventDefault(),e.stopPropagation(),this._close(`skipped`,`escape`);else if(t===`ArrowRight`||t===`ArrowLeft`){if(It(e.composedPath?.()[0]??e.target))return;if(e.preventDefault(),t===`ArrowRight`)this._move(1);else{let e=this._current;if(!e)throw Error(`<wui-tour> moved back with no step showing`);e.index>this._firstIndex&&this._move(-1)}}else if(e.key===`Tab`&&!this._shadow){let t=this._current,n=this._card;if(!t||!n)throw Error(`<wui-tour> cycled focus with no step showing`);De(e,{card:n,active:this._active(),step:this._stepAt(t.index),target:t.target})}}_teardown(){if(!this._layer)return;this._onKey&&document.removeEventListener(`keydown`,this._onKey,!0),this._onFocusIn&&document.removeEventListener(`focusin`,this._onFocusIn);let e=!this._shadow||this._shadow.activeElement!==null||!document.activeElement||document.activeElement===document.body;this._unbindAdvance?.(),this._unbindAdvance=null,this._ending?.abort(),this._ending=null,this._seenMark=null;let t=this._outer;if(s(t),!t)throw Error(`<wui-tour> has a layer with no host to remove`);Be(t),document.documentElement.removeAttribute(St),this._outer=null,this._shadow=null,this._layer=null,this._current=null;let n=this._returnFocus;this._returnFocus=null,e&&n?.isConnected&&(n instanceof HTMLElement||n instanceof SVGElement)&&n.focus()}async _close(e,t=null){let n=this._run,r=this._current,i=r?{index:r.index,position:this._progress.position(r.index),total:this._progress.total()}:Pt,a=this._seenMark;this._teardown();let o=e===`next`?`finished`:e,s=!1;try{n===this._run&&await(a??this._markSeen(o)),s=n===this._run}finally{this._finish(e,i,t)}return s}_finish(e,t=Pt,n=null){this._run++,this._running=!1,this.hasAttribute(`open`)&&this.removeAttribute(`open`),this.dispatchEvent(new CustomEvent(`wui-tour:close`,{bubbles:!0,detail:{reason:e,...t,via:n}}))}},$=class extends r{constructor(){super(),this.shadowRoot||this.attachShadow({mode:`open`})}};return t(`wui-tour`,zt),t(`wui-tour-step`,$),e.WuiTourStep=$,e})({});
@@ -0,0 +1 @@
1
+ import{n as e}from"./devWarn-DXdRWZs3.js";var t=Object.freeze([`POST`,`PUT`,`PATCH`,`DELETE`]),n=t=>(e(`[@webority/ui-elements] Wui-Toast-Action: ${t}; the toast shows no action.`),null),r=e=>typeof e==`object`&&!!e;function i(e){if(e==null||e===``)return null;let i;try{i=JSON.parse(e)}catch{return n(`the value is not JSON`)}let a=r(i)?i:{},o=a.label,s=a.url,c=String(a.method??`POST`).toUpperCase();return typeof o!=`string`||o===``||typeof s!=`string`||s===``?n(`label and url must be non-empty strings`):t.includes(c)?{label:o,url:s,method:c}:n(`method must be one of ${t.join(`, `)}`)}var a=`wui-csrf`,o=`RequestVerificationToken`,s={metaName:a,header:o};function c({metaName:e=a,header:t=o}={}){s={metaName:e,header:t}}var l=`Wui-Request`,u=Object.freeze({fragment:`Wui-Fragment`,message:`Wui-Message`,redirect:`Wui-Redirect`,result:`Wui-Result`,keepOpen:`Wui-Keep-Open`,toastVariant:`Wui-Toast-Variant`,toastAction:`Wui-Toast-Action`,data:`Wui-Data`,next:`Wui-Next`}),d=Object.freeze([`ok`,`validation`,`forbidden`,`client`,`server`,`network`,`timeout`,`aborted`,`stale`,`session`]),f=/* @__PURE__ */ new Set([`GET`,`HEAD`]);function p(e=document){let t=[...e.querySelectorAll(`meta`)].find(e=>e.getAttribute(`name`)===s.metaName),n=t?.getAttribute(`content`);return!t||!n?null:{header:t.getAttribute(`data-header`)||s.header,token:n}}var m=e=>{try{return new URL(e,window.location.href).origin===window.location.origin}catch{return!1}};function h(e){return e>=200&&e<300?`ok`:e===401?`session`:e===403?`forbidden`:e===422?`validation`:e>=400&&e<500?`client`:`server`}var g=e=>typeof e==`object`&&!!e&&`name`in e&&e.name===`AbortError`,_=3e4;function v(e){let t=e?.trim()??``;return/^\d+$/.test(t)?Number(t):void 0}var y=e=>{if(e==null||e===``)return null;try{return JSON.parse(e)}catch(e){throw TypeError(`The ${u.data} response header is not JSON: ${e instanceof Error?e.message:String(e)}`,{cause:e})}};async function b(e,t={}){let n=(t.method||`GET`).toUpperCase(),r=t.navigate||(e=>window.location.assign(e)),a={Accept:`text/html`,"X-Requested-With":`XMLHttpRequest`,[l]:`1`,...t.headers};if(!f.has(n)&&m(e)){let e=p();e&&(a[e.header]=e.token)}let o=e=>{if(e==null)return null;try{return decodeURIComponent(e)}catch{return e}},s=(e,t=null,n=``)=>{let r=e=>t?.headers.get(e)??null;return{kind:e,ok:e===`ok`,status:t?.status??0,html:n,response:t,message:o(r(u.message)),redirect:r(u.redirect),result:r(u.result),keepOpen:r(u.keepOpen)===`1`,toastVariant:r(u.toastVariant),toastAction:i(r(u.toastAction)),fragment:r(u.fragment)===`1`,data:y(o(r(u.data))),next:r(u.next)}},c=new AbortController,d=()=>c.abort(),_=t.signal;_?.aborted&&c.abort(),_?.addEventListener(`abort`,d,{once:!0});let v=t.timeoutMs??0,b=!1,x=v>0?setTimeout(()=>{b=!0,c.abort()},v):void 0,S=e=>_?.aborted?`aborted`:b?`timeout`:g(e)?`aborted`:`network`;try{let i;try{i=await fetch(e,{method:n,...t.body===void 0?{}:{body:t.body},headers:a,signal:c.signal,credentials:`same-origin`})}catch(e){return s(S(e))}let o=h(i.status);if(o===`ok`&&i.redirected&&i.headers.get(u.fragment)!==`1`&&(o=`session`),o===`session`)return r(i.status===401?i.headers.get(`Location`)||window.location.href:i.url),s(o,i);let l=``;if(o===`ok`||o===`validation`)try{l=await i.text()}catch(e){return s(S(e),i)}return s(o,i,l)}finally{clearTimeout(x),_?.removeEventListener(`abort`,d)}}function x(){let e=null,t=0;return{async run(n,r={}){e?.abort();let i=new AbortController;e=i;let a=++t,o=r.signal;o&&(o.aborted?i.abort():o.addEventListener(`abort`,()=>i.abort(),{once:!0}));let s;try{s=await b(n,{...r,signal:i.signal})}finally{e===i&&(e=null)}return a!==t&&s.kind!==`aborted`?{...s,kind:`stale`,ok:!1}:s},abort(){e?.abort(),e=null}}}export{u as a,x as c,b as d,t as f,d as i,p as l,o as n,h as o,i as p,_ as r,c as s,a as t,v as u};
@@ -0,0 +1 @@
1
+ var e=`Asia/Kolkata`,t=198e5,n=/* @__PURE__ */ new Map;function r(e){let t=n.get(e);return t||(t=new Intl.DateTimeFormat(`en-US`,{timeZone:e,hourCycle:`h23`,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`}),n.set(e,t)),t}function i(e){if(typeof e!=`string`||e===``)return!1;try{return r(e),!0}catch{return!1}}function a(n,i=e){if(i===`Asia/Kolkata`){let e=new Date(n+t);return{year:e.getUTCFullYear(),month:e.getUTCMonth(),day:e.getUTCDate(),hour:e.getUTCHours(),minute:e.getUTCMinutes(),second:e.getUTCSeconds()}}let a=Object.fromEntries(r(i).formatToParts(n).map(e=>[e.type,Number(e.value)]));return{year:Number(a.year),month:Number(a.month)-1,day:Number(a.day),hour:Number(a.hour)%24,minute:Number(a.minute),second:Number(a.second)}}function o(n,r=e){if(r===`Asia/Kolkata`)return t;let i=a(n,r),o=/* @__PURE__ */ new Date(0);return o.setUTCFullYear(i.year,i.month,i.day),o.setUTCHours(i.hour,i.minute,i.second,0),o.getTime()-Math.floor(n/1e3)*1e3}function s(t,n=e){let r=t-o(t,n);return r=t-o(r,n),r}var c=e=>e instanceof Date?e.getTime():e;function l(t,n=e){return new Date(t+o(t,n)).toISOString().slice(0,19)}function u(t=e,n=Date.now()){return l(c(n),t).slice(0,10)}export{s as a,l as i,i as n,o,u as r,a as s,e as t};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webority/ui-elements",
3
- "version": "0.171.3",
3
+ "version": "0.172.1",
4
4
  "description": "Webority framework-agnostic UI custom elements (<wui-*>): the single implementation of the interactive components, styled by @webority/theme. Used natively in Razor and wrapped by @webority/ui-react.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "type": "module",
@@ -72,6 +72,10 @@
72
72
  "types": "./types/elements/date-range.d.ts",
73
73
  "default": "./dist/elements/date-range.js"
74
74
  },
75
+ "./elements/date-time": {
76
+ "types": "./types/elements/date-time.d.ts",
77
+ "default": "./dist/elements/date-time.js"
78
+ },
75
79
  "./elements/datepicker": {
76
80
  "types": "./types/elements/datepicker.d.ts",
77
81
  "default": "./dist/elements/datepicker.js"
@@ -271,10 +275,10 @@
271
275
  "@tiptap/starter-kit": "3.31.4",
272
276
  "@types/node": "25.6.0",
273
277
  "@vitest/coverage-v8": "5.1.0",
274
- "@webority/biome-config": "0.171.3",
275
- "@webority/markdown-core": "0.171.3",
276
- "@webority/theme": "0.171.3",
277
- "@webority/web-core": "0.171.3",
278
+ "@webority/biome-config": "0.172.1",
279
+ "@webority/markdown-core": "0.172.1",
280
+ "@webority/theme": "0.172.1",
281
+ "@webority/web-core": "0.172.1",
278
282
  "echarts": "6.1.0",
279
283
  "jsdom": "30.1.1",
280
284
  "libphonenumber-js": "^1.13.9",
@@ -284,7 +288,7 @@
284
288
  "vitest": "5.1.0"
285
289
  },
286
290
  "scripts": {
287
- "build": "node scripts/check-wui-assembly.ts && tsc -p tsconfig.json && vite build && vite build -c vite.phone.config.ts && vite build -c vite.consent-banner.config.ts && vite build -c vite.lead-popup.config.ts && vite build -c vite.tour.config.ts && vite build -c vite.file-viewer.config.ts && vite build -c vite.chart.config.ts && vite build -c vite.calendar.config.ts && vite build -c vite.rich-text.config.ts && node build-global.ts && vite build -c vite.razor.config.ts && node ../../scripts/sync-rcl-assets.mjs elements && node scripts/emit-types.ts clean && tsc -p tsconfig.build.json && node scripts/emit-types.ts flatten && node -e \"const f=require('node:fs');f.mkdirSync('dist/text',{recursive:true});f.copyFileSync('../../text/web.en.json','dist/text/en.json')\"",
291
+ "build": "node scripts/check-wui-assembly.ts && node scripts/check-one-dom-helper.ts && tsc -p tsconfig.json && vite build && vite build -c vite.phone.config.ts && vite build -c vite.consent-banner.config.ts && vite build -c vite.lead-popup.config.ts && vite build -c vite.tour.config.ts && vite build -c vite.file-viewer.config.ts && vite build -c vite.chart.config.ts && vite build -c vite.calendar.config.ts && vite build -c vite.rich-text.config.ts && node build-global.ts && vite build -c vite.razor.config.ts && node ../../scripts/sync-rcl-assets.mjs elements && node scripts/emit-types.ts clean && tsc -p tsconfig.build.json && node scripts/emit-types.ts flatten && node -e \"const f=require('node:fs');f.mkdirSync('dist/text',{recursive:true});f.copyFileSync('../../text/web.en.json','dist/text/en.json')\"",
288
292
  "typecheck": "tsc -p tsconfig.json",
289
293
  "test": "vitest run",
290
294
  "test:razor-js": "vitest run --config vitest.razor-js.config.ts",
@@ -1,63 +1,3 @@
1
- /**
2
- * <wui-command-palette>: the keyboard and pointer behaviour of a "search and jump" list.
3
- *
4
- * Like <wui-dock>, this element renders no markup of its own. The wrappers (React
5
- * AppCommandPalette, Razor <app-command-palette>) author the input, the grouped listbox and
6
- * the footer, because item icons and trailing text can be arbitrary nodes. The overlay is the
7
- * library's modal on both surfaces, which already owns Escape, the backdrop, the focus trap
8
- * and returning focus, so none of that lives here. This element only:
9
- *
10
- * - keeps one ACTIVE option: `aria-selected="true"` on it, `aria-activedescendant` on the
11
- * combobox input. Focus never leaves the input, so the options are not focusable.
12
- * - moves it with ArrowUp / ArrowDown across every group, wrapping at both ends, and
13
- * scrolls it into view. A disabled option (`aria-disabled="true"`) stays listed but is
14
- * never active, skipped by the arrow keys, and ignored by Enter, click and the pointer.
15
- * - lets the pointer set it (mousemove, not mouseenter, so a list scrolling under a still
16
- * pointer does not steal it).
17
- * - marks keyboard use: `data-keyboard` on the element while an arrow key chose the active
18
- * option, cleared when the pointer picks one, when the first result takes over (a new query
19
- * or list), and when the modal closes. The theme draws the keyboard ring only under it.
20
- * - selects on Enter or click: dispatches a cancelable `wui-command-palette:select` event
21
- * with `{ key, groupKey, id }`. If nothing cancels it and the option carries `data-href`,
22
- * the page navigates there (the server-rendered path).
23
- *
24
- * The wrapper calls `refresh()` after it changes the options. A query that differs from the
25
- * one seen at the last refresh moves the active option back to the first result. Under the
26
- * same query, an option the user chose (arrow keys or pointer) is kept while it still exists;
27
- * an option that was only active by default follows the list, so results arriving late for
28
- * the same query make their first row the one Enter picks.
29
- *
30
- * With the `filter` attribute the element also filters the options itself, on their
31
- * `data-label`, as the user types: for a server-rendered list with no script of its own.
32
- * Each option also matches on its `data-keywords` (space-separated), the same way as its label.
33
- * Matching text in each label is wrapped in <mark> unless `highlight="false"`, groups left
34
- * with no match are hidden, and the `.wui-cmd-empty` status region shows `empty-text`.
35
- * Without `filter` the caller filters and renders the emphasis itself.
36
- *
37
- * With `group-filter` (which needs `filter`) the markup's `.wui-cmd-tabs` strip picks one
38
- * group: each `[data-group-tab]` button carries a group's `data-group-key`, and the empty value
39
- * is All. Tab and Shift+Tab in the input cycle the strip while focus stays in the input. The
40
- * pick resets when the query changes, and the strip is hidden on a nested page, where the
41
- * groups are not the root's.
42
- *
43
- * Nested pages. An option with `data-opens="<page key>"` opens a page instead of acting. The
44
- * current page is a path of `{ key, label }`, shown by the element in the wrappers' empty
45
- * `.wui-cmd-crumbs` bar (Back button, trail). Opening a page, Back, a click on a trail entry
46
- * and Backspace in an empty input all dispatch a cancelable `wui-command-palette:navigate`
47
- * with `{ path }`. A caller that owns the path (React) sets the `path` attribute (JSON) and
48
- * cancels the event; otherwise the element keeps the path itself, and with `.wui-cmd-page`
49
- * containers (`data-page`, `data-label`) in the markup it shows only the current page's options
50
- * (the root options when the path is empty). Every navigation clears the search. The path
51
- * resets when the enclosing wui-modal closes.
52
- *
53
- * Recents. With `recents-key` (a localStorage key; make it per user), each chosen option is
54
- * remembered by its `data-group-key` and `data-key`, newest first, up to `recents-limit`
55
- * (default 5). While the search is empty on the root page, the element copies the remembered
56
- * options that still exist into the wrappers' empty `.wui-cmd-recents` container, under a
57
- * `recents-label` heading (default "Recent"), so they are listed first. A copy keeps its
58
- * original's `data-group-key`, `data-key` and `data-href`, so choosing it does what the
59
- * original does. A page-opening or disabled option is never remembered.
60
- */
61
1
  import { ElementBase } from "./elementBase.ts";
62
2
  interface PathEntry {
63
3
  key: string;
@@ -80,6 +80,8 @@ export declare class WuiDataTable extends ElementBase {
80
80
  _startDrag(e: PointerEvent): void;
81
81
  _key(e: KeyboardEvent): void;
82
82
  _click(e: MouseEvent): void;
83
+ _export(format: string): Promise<void>;
84
+ _setDensity(name: string): void;
83
85
  _group(table: HTMLTableElement): void;
84
86
  _groupRow(doc: Document, key: string): HTMLTableRowElement;
85
87
  _showGroup(header: HTMLTableRowElement | null, open: boolean): void;
@@ -51,6 +51,8 @@ export declare class WuiDatePicker extends ElementBase {
51
51
  _firstDay(): number;
52
52
  _monthOnly(): boolean;
53
53
  _yearOnly(): boolean;
54
+ _monthKey(v: string | null | undefined): string | null | undefined;
55
+ _monthStored(iso: string): string;
54
56
  _parts(v: string | null | undefined): DateParts | null;
55
57
  _placeholder(): string;
56
58
  _label(v: string): string;
@@ -60,10 +62,10 @@ export declare class WuiDatePicker extends ElementBase {
60
62
  _limits(): DayLimits;
61
63
  _dropPanel(): void;
62
64
  _renderView(): void;
63
- _daysHtml(): string;
64
- _clearFoot(on: boolean): string;
65
- _monthsHtml(): string;
66
- _yearsHtml(): string;
65
+ _daysNodes(): Node[];
66
+ _clearFoot(on: boolean): Node[];
67
+ _monthsNodes(): Node[];
68
+ _yearsNodes(): Node[];
67
69
  _gridKind(): GridKind | null;
68
70
  _gridFocusCell(g: GridKind): number | null;
69
71
  _syncGridFocus(): void;
@@ -41,12 +41,12 @@ export declare class WuiDateRange extends ElementBase {
41
41
  _syncMirrors(): void;
42
42
  _mirror(kind: "start" | "end", name: string | null, val: string): void;
43
43
  _limits(): (y: number, m: number, d: number) => boolean;
44
- _monthHtml(y: number, m: number): string;
44
+ _monthHtml(y: number, m: number): HTMLDivElement;
45
45
  _presetOptions(): {
46
46
  timeZone: string;
47
47
  financialYearStart: number;
48
48
  };
49
- _presetsHtml(): string;
49
+ _presetsHtml(): HTMLDivElement | null;
50
50
  _renderView(): void;
51
51
  _paint(): void;
52
52
  _pick(iso: string): void;
@@ -0,0 +1,26 @@
1
+ import { ElementBase } from "./elementBase.ts";
2
+ export declare class WuiDateTime extends ElementBase {
3
+ static formAssociated: boolean;
4
+ _date: string;
5
+ _time: string;
6
+ _zone: string;
7
+ _rendered: boolean;
8
+ _written: boolean;
9
+ _defaultValue: string;
10
+ static get observedAttributes(): string[];
11
+ constructor();
12
+ connectedCallback(): void;
13
+ attributeChangedCallback(name: string, _old: string | null, val: string | null): void;
14
+ formResetCallback(): void;
15
+ get value(): string;
16
+ set value(v: string | null | undefined);
17
+ render(): void;
18
+ _readZone(): string;
19
+ _setParts(iso: string): void;
20
+ _write(iso: string): void;
21
+ _limit(name: "min" | "max"): string | null;
22
+ _child(part: "date" | "time"): HTMLElement | null;
23
+ _syncChildren(): void;
24
+ _syncMirror(): void;
25
+ _onPartChange(e: Event): void;
26
+ }
@@ -11,7 +11,7 @@ type SaveOutcome = {
11
11
  message: string;
12
12
  };
13
13
  interface ShownSnapshot {
14
- html: string;
14
+ nodes: Node[];
15
15
  empty: boolean;
16
16
  }
17
17
  type InlineEditControl = HTMLElement & {
@@ -56,7 +56,7 @@ export declare class WuiLeadPopup extends ElementBase {
56
56
  _maxLength(key: FieldKey): number | undefined;
57
57
  _triggers(): TriggerName[];
58
58
  _render(): void;
59
- _fieldMarkup(key: FieldKey, required: boolean): string;
59
+ _fieldNode(key: FieldKey, required: boolean): HTMLElement;
60
60
  _wire(): void;
61
61
  _showForm(): void;
62
62
  _showSuccess(): void;
@@ -8,7 +8,7 @@
8
8
  *
9
9
  * Once connected it hides the source (it stays as the no-script fallback and the text the blocks are
10
10
  * drawn from) and appends the blocks after it. The blocks come from @webority/markdown-core, the grammar
11
- * every renderer reads, and every node is built with createElement and textContent, so the source is
11
+ * every renderer reads, and every node is built with make and textContent, so the source is
12
12
  * never read as HTML. The `links` attribute sets which links open and the `resolveLink` property maps
13
13
  * an app address to a route; a link that does not open shows its label as text. The `base` attribute is an
14
14
  * https origin a relative link resolves against; any other value is ignored. The `isCitation` property
@@ -41,11 +41,11 @@ export interface DrawnBlock {
41
41
  * Parses a Markdown source once and draws each block as its own node list. A block's signature covers
42
42
  * its content and the policies it is drawn under, so a block whose signature is unchanged can keep its nodes.
43
43
  */
44
- export declare function drawMarkdownBlocks(doc: Document, source: string, options?: MarkdownDrawOptions): DrawnBlock[];
44
+ export declare function drawMarkdownBlocks(source: string, options?: MarkdownDrawOptions): DrawnBlock[];
45
45
  /**
46
- * Draws the blocks of a Markdown source as one flat list of DOM nodes, built with createElement and textContent only.
46
+ * Draws the blocks of a Markdown source as one flat list of DOM nodes, built with make and textContent only.
47
47
  */
48
- export declare function drawMarkdown(doc: Document, source: string, options?: MarkdownDrawOptions): Node[];
48
+ export declare function drawMarkdown(source: string, options?: MarkdownDrawOptions): Node[];
49
49
  /**
50
50
  * Makes the children of a container show the blocks of a Markdown source. A block whose signature matches
51
51
  * the previous block at its index keeps its nodes, so focus, scroll and a finished code block survive a
@@ -1,3 +1,33 @@
1
+ /**
2
+ * <wui-navigation-menu>: the behaviour of a site's top navigation with dropdown panels.
3
+ *
4
+ * Disclosure navigation, not a menu: the wrappers (React AppNavigationMenu, Razor
5
+ * <app-navigation-menu>) author a `<nav>` list whose entries are plain links or a button that
6
+ * discloses a panel of links:
7
+ *
8
+ * <wui-navigation-menu>
9
+ * <nav aria-label><ul>
10
+ * <li class="wui-nav-menu-item">
11
+ * <button class="wui-nav-menu-trigger" aria-expanded aria-controls="panel-id">Products</button>
12
+ * <div class="wui-nav-menu-panel" id="panel-id"><ul><li><a class="wui-nav-menu-link">...</a></li></ul></div>
13
+ * </li>
14
+ * <li class="wui-nav-menu-item"><a class="wui-nav-menu-toplink">Pricing</a></li>
15
+ * </ul></nav>
16
+ * </wui-navigation-menu>
17
+ *
18
+ * A panel is a popover="auto" placed under its button. Below the md tier (max-width 767.98px) it is
19
+ * not a popover: it stays in the page flow and is marked `data-open`. It opens on a click, Enter or
20
+ * Space on its button, and on Down from it; never on hover. Tab moves through the page's links as
21
+ * usual, with the open panel's links after its button.
22
+ * - One panel is open at a time. Opening one closes the other.
23
+ * - Left and Right move focus along the top entries, Home and End to the first and last (a panel
24
+ * that was open closes); Down and Up move between the links of an open panel and wrap.
25
+ * - Escape and a press outside the panel close it through the browser. Tab or a click out of it
26
+ * closes it too, as does choosing a link.
27
+ *
28
+ * Event, bubbling: `wui-navigation-menu:toggle` { key, open } after a panel opens or closes;
29
+ * `key` is the button's `data-key`.
30
+ */
1
31
  import { ElementBase } from "./elementBase.ts";
2
32
  export declare class WuiNavigationMenu extends ElementBase {
3
33
  _onClick: (e: MouseEvent) => void;
@@ -1,3 +1,15 @@
1
+ /**
2
+ * <wui-org-tree>: behaviour over an organisation tree of people by reporting line, shared by React
3
+ * AppOrgTree and Razor <app-org-tree>.
4
+ *
5
+ * The element never draws node markup. Both surfaces render the whole tree (a `li[data-wui-org-node]`
6
+ * per person, with a `ul.wui-org-tree-children` for direct reports) and this element adds collapse,
7
+ * keyboard, search, select and print scaling over it. Every key and click reads the DOM afresh, so a
8
+ * re-render that replaces the items only loses the focus that was on them.
9
+ *
10
+ * Events (bubbling, composed):
11
+ * wui-org-tree:select { id } a person was chosen while `selectable` is set
12
+ */
1
13
  import { ElementBase } from "./elementBase.ts";
2
14
  export declare class WuiOrgTree extends ElementBase {
3
15
  static get observedAttributes(): string[];
@@ -52,7 +52,7 @@ export declare class WuiTimePicker extends ElementBase {
52
52
  _syncInvalid(): void;
53
53
  _commitText(): boolean;
54
54
  _pending(): Hm | null;
55
- _columnsHtml(): string;
55
+ _columnsNodes(): Node[];
56
56
  _selectedIn(key: string | undefined, hm: Hm | null): string | null;
57
57
  _optionEnabled(key: string | undefined, v: string | undefined, hm: Hm | null): boolean;
58
58
  _syncColumns({ scroll }?: {
@@ -1,3 +1,61 @@
1
+ /**
2
+ * <wui-tree>: a hierarchy of nodes in the WAI-ARIA tree pattern, shared by React AppTreeView and
3
+ * Razor <app-tree-view>.
4
+ *
5
+ * The element draws its own markup from a node list: the `nodes` property (what React writes), or
6
+ * a child <script type="application/json"> when it is written into server HTML (what the Razor tag
7
+ * helper writes, with a plain nested list beside it for a page with no script). A node is
8
+ * `{ id, label, icon?, badge?, badgeTone?, children?, hasChildren?, expanded?, checked?, disabled? }`:
9
+ * `icon` is a library icon name, `children` an array (empty means a leaf), and `hasChildren: true`
10
+ * with no `children` marks a node whose children are fetched when it is first expanded (a node that
11
+ * starts `expanded` is fetched as soon as the tree has its nodes). Ids are
12
+ * strings, unique across the whole tree; a repeated id throws.
13
+ *
14
+ * Children are fetched through the `loadChildren` property (`(node) => Promise<node[]>`, the node
15
+ * being the object you supplied) or, when that is not set, the `load-url` attribute: a GET to that
16
+ * URL with `parentId=<id>` added, expecting a JSON array of nodes. A failure collapses the node,
17
+ * announces `error-text` and fires `wui-tree:error`; expanding it again retries.
18
+ *
19
+ * Keyboard (roving tabindex, one item in the tab order): ArrowDown / ArrowUp move through the
20
+ * visible items, ArrowRight opens a closed node or enters an open one, ArrowLeft closes an open
21
+ * node or goes to its parent, Home / End jump to the first / last visible item, a printable key
22
+ * jumps to the next item whose label starts with what was typed, Enter activates, and Space
23
+ * toggles the check in `multiple` mode (selects in `single`).
24
+ *
25
+ * `selection` is `none` (default), `single` (one selected row, `aria-selected`) or `multiple`
26
+ * (a tri-state checkbox per node, `aria-checked`). A parent is checked when every child is,
27
+ * mixed when some are, unchecked when none are; checking a parent checks every loaded child, and a
28
+ * parent checked before its children load passes the check on to them when they arrive. A disabled
29
+ * node is never changed by a click or key, including through its parent: clicking a parent checks
30
+ * every enabled leaf under it, or unchecks them when they are all checked already, and leaves the
31
+ * disabled ones as they are (the parent then shows mixed). Replacing `nodes` keeps the checks of ids
32
+ * that remain and drops those of ids that went; `checked` in a node only seeds an id seen first time.
33
+ *
34
+ * Events (bubbling, composed):
35
+ * wui-tree:select { id, node } a row was activated (clicked, or Enter/Space)
36
+ * wui-tree:check { id, checked, values } a check was toggled; `values` is every checked id
37
+ * wui-tree:error { id, message } children could not be loaded
38
+ *
39
+ * Long trees: once more than 300 rows are visible the tree draws only the rows near the scroll
40
+ * position of its nearest scrolling ancestor (the page when none scrolls), plus a few beyond each
41
+ * edge, with padding on the list standing for the rest. Rows are one flat list, so `aria-level`,
42
+ * `aria-setsize` and `aria-posinset` on each row carry the structure, and only drawn rows exist in
43
+ * the DOM. Keys move over every visible row and scroll the target into view; while the focused row is
44
+ * not drawn the list itself is the tab stop. A tree of 300 rows or fewer draws every row.
45
+ *
46
+ * Form: with a `name`, `multiple` posts one hidden input per checked id (parents included), and
47
+ * `single` posts the selected id.
48
+ *
49
+ * @property nodes The node list.
50
+ * @property selection 'none' | 'single' | 'multiple'. Default 'none'
51
+ * @property selected Selected id (single mode)
52
+ * @property values Checked ids (multiple mode)
53
+ * @property loadChildren Async children loader
54
+ * @property loadUrl Children endpoint (attribute `load-url`)
55
+ * @property name Field name for the form mirror
56
+ * @property loadingText Announced while children load (attribute `loading-text`). Default 'Loading'
57
+ * @property errorText Announced when they fail (attribute `error-text`). Default 'Could not load. Try again.'
58
+ */
1
59
  import { ElementBase } from "./elementBase.ts";
2
60
  import { createListboxKeyNav } from "./listboxKeyNav.ts";
3
61
  import { type HeightIndex } from "./select/window.ts";