@webority/ui-elements 0.99.0 → 0.101.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/dist/WuiConsentBanner-C2RCJzA3.js +1 -0
  2. package/dist/WuiTour-COCpmCY9.js +1 -0
  3. package/dist/elements/consent-banner.js +1 -1
  4. package/dist/elements/tour.js +1 -1
  5. package/dist/ui-chart.global.js +1 -1
  6. package/dist/ui-chart.js +1 -1
  7. package/dist/ui-consent-banner.global.js +1 -1
  8. package/dist/ui-elements/autocomplete.global.js +1 -1
  9. package/dist/ui-elements/carousel.global.js +1 -1
  10. package/dist/ui-elements/code-block.global.js +1 -1
  11. package/dist/ui-elements/command-palette.global.js +1 -1
  12. package/dist/ui-elements/comment-thread.global.js +1 -1
  13. package/dist/ui-elements/consent-banner.global.js +1 -1
  14. package/dist/ui-elements/context-menu.global.js +1 -1
  15. package/dist/ui-elements/date-range.global.js +1 -1
  16. package/dist/ui-elements/drawer.global.js +1 -1
  17. package/dist/ui-elements/image-crop.global.js +1 -1
  18. package/dist/ui-elements/inline-edit.global.js +1 -1
  19. package/dist/ui-elements/kanban.global.js +1 -1
  20. package/dist/ui-elements/lightbox.global.js +1 -1
  21. package/dist/ui-elements/markdown.global.js +1 -1
  22. package/dist/ui-elements/menubar.global.js +1 -1
  23. package/dist/ui-elements/multiselect.global.js +1 -1
  24. package/dist/ui-elements/phone.global.js +1 -1
  25. package/dist/ui-elements/resizable.global.js +1 -1
  26. package/dist/ui-elements/slider.global.js +1 -1
  27. package/dist/ui-elements/sortable.global.js +1 -1
  28. package/dist/ui-elements/status-icon.global.js +1 -1
  29. package/dist/ui-elements/taginput.global.js +1 -1
  30. package/dist/ui-elements/timepicker.global.js +1 -1
  31. package/dist/ui-elements/tour.global.js +1 -1
  32. package/dist/ui-elements/tree.global.js +1 -1
  33. package/dist/ui-elements/wizard.global.js +1 -1
  34. package/dist/ui-elements.global.js +1 -1
  35. package/dist/ui-elements.js +1 -1
  36. package/dist/ui-tour.global.js +1 -1
  37. package/package.json +1 -1
  38. package/dist/WuiConsentBanner-D3rxcVUX.js +0 -1
  39. package/dist/WuiTour-BM4jjoAH.js +0 -1
@@ -1 +1 @@
1
- import{n as e}from"./elementBase-DV9IZZCu.js";import{a as t,c as n,d as r,f as i,i as a,l as o,m as s,n as c,o as l,p as u,r as d,s as f,t as p,u as m}from"./shortcutKeys-DdQ_0ops.js";import{n as h,t as g}from"./filterPopover-B1Te0nqD.js";import{t as _}from"./devWarn-DXdRWZs3.js";import{a as v,c as y,d as b,f as x,h as S,i as ee,l as te,m as ne,n as re,o as ie,p as ae,r as oe,s as se,t as ce,u as le}from"./formatters-BAE__8ye.js";import{A as ue,C as de,D as fe,E as pe,M as me,O as he,S as ge,T as _e,_ as ve,a as ye,b as be,c as xe,d as Se,f as Ce,g as we,h as Te,i as Ee,j as De,k as Oe,l as ke,m as Ae,n as je,o as Me,p as Ne,r as Pe,s as Fe,t as Ie,u as Le,v as Re,w as ze,x as Be,y as Ve}from"./dataTable-Cd_IJQcs.js";import{t as He}from"./iconGlyphs.g-Bo-gCFpk.js";import{C as Ue,S as We,T as Ge,_ as Ke,a as qe,b as Je,c as C,d as Ye,f as Xe,g as Ze,h as Qe,i as $e,l as et,m as tt,n as nt,o as w,p as rt,r as it,s as at,t as ot,u as st,v as ct,w as lt,x as ut,y as dt}from"./wuiHttp-B2OJ14z5.js";import{_ as ft,a as pt,b as mt,c as ht,d as gt,f as _t,g as vt,h as yt,i as bt,l as xt,m as St,n as Ct,o as wt,p as Tt,r as Et,s as Dt,t as Ot,u as kt,v as At,y as jt}from"./kanban-DmeWP1iE.js";import{n as Mt,t as Nt}from"./statusIcons-Dt2ZVJyk.js";import{o as Pt}from"./optionLabel-DFT2Lcs6.js";import{t as Ft}from"./WuiAutocomplete-iTE6YNEU.js";import{t as It}from"./WuiCarousel-BbO8AoM6.js";import{t as Lt}from"./WuiCodeBlock-g0ofpXMd.js";import{n as Rt,t as zt}from"./copyText-DM5HhXjf.js";import{t as Bt}from"./textMatch-wdY7XLIc.js";import{t as Vt}from"./WuiCommandPalette-BND6hxMZ.js";import{i as Ht,n as Ut,r as Wt,t as Gt}from"./WuiCommentThread-tk01SHbs.js";import{t as Kt}from"./WuiConsentBanner-D3rxcVUX.js";import{t as qt}from"./WuiContextMenu-D-u6EH92.js";import{t as Jt}from"./WuiSelect-fwUpY87I.js";import{t as Yt}from"./WuiCountrySelect-CSEBbpAZ.js";import{t as Xt}from"./WuiDataTable-Ds44BXhE.js";import{t as Zt}from"./WuiDatePicker-9LQqLQMv.js";import{t as Qt}from"./WuiDateRange-B9Yrczsh.js";import{t as $t}from"./WuiDock-Bd2ijOaJ.js";import{t as en}from"./WuiDrawer-DnHsXG4q.js";import{t as tn}from"./WuiHoverCard-DeXHqAS9.js";import{t as nn}from"./WuiImageCrop-CvXh791S.js";import{a as rn,i as an,n as on,r as sn,t as cn}from"./WuiInlineEdit-CJHsCNn4.js";import{t as ln}from"./WuiLightbox-BMbaWFYN.js";import{t as un}from"./WuiMarkdown-C2flvSIt.js";import{a as dn,c as fn,i as pn,l as mn,n as hn,o as gn,r as _n,s as vn,t as yn,u as bn}from"./WuiMentionInput-Cs1RmP5Q.js";import{t as xn}from"./WuiMenubar-urKQw5uQ.js";import{t as Sn}from"./WuiMultiSelect-CS22nTKj.js";import{t as Cn}from"./WuiNavigationMenu-CGqTADvr.js";import{a as wn,c as Tn,i as En,n as Dn,o as On,r as kn,s as An,t as jn}from"./notificationDays-BUoh4mG6.js";import{t as Mn}from"./WuiNotificationCenter-UQz-EAjS.js";import{t as Nn}from"./WuiOnboardingChecklist-DXUETu1h.js";import{t as Pn}from"./WuiOtp-DfhXc829.js";import{t as Fn}from"./WuiOverflow-kCwO7k7b.js";import{t as In}from"./WuiPhone-BKrBaAdJ.js";import{t as Ln}from"./WuiRating-DhhqYj5Z.js";import{t as Rn}from"./WuiRecordPager-DRSJg2o9.js";import{n as zn,r as Bn,t as Vn}from"./WuiRelativeTime-D6hPHWXX.js";import{t as Hn}from"./WuiResizable-CtwCQUWR.js";import{t as Un}from"./WuiRollingNumber-gAaTn4jG.js";import{t as Wn}from"./WuiShortcuts-DfAbWRZZ.js";import{t as Gn}from"./WuiShowMore-D3VHRZJg.js";import{t as Kn}from"./WuiSlider-IOqadOtK.js";import{t as qn}from"./WuiSortable-CugtxycN.js";import{t as Jn}from"./WuiTagInput-DVmiTCMB.js";import{t as Yn}from"./WuiTimePicker-DC37hHJJ.js";import{n as Xn,t as Zn}from"./WuiTour-BM4jjoAH.js";import{t as Qn}from"./WuiTree-CIoS5-Xt.js";import{t as $n}from"./WuiTruncate-Cxujs1Xt.js";import{n as er,t as tr}from"./WuiWhatsNew-BZdN4cR5.js";import{n as nr,t as rr}from"./WuiWizardStep-6VAgAV7V.js";import{$ as ir,A as ar,B as or,C as sr,D as cr,E as lr,F as ur,G as dr,H as fr,I as pr,J as mr,K as hr,L as gr,M as _r,N as vr,O as yr,P as br,Q as xr,R as Sr,S as Cr,T as wr,U as Tr,V as Er,W as Dr,X as Or,Y as kr,Z as Ar,_ as jr,a as Mr,at as Nr,b as Pr,c as Fr,d as Ir,et as Lr,f as Rr,g as zr,h as Br,i as Vr,it as Hr,j as Ur,k as Wr,l as Gr,m as Kr,n as qr,nt as Jr,o as Yr,ot as Xr,p as Zr,q as Qr,r as $r,rt as ei,s as ti,t as ni,tt as ri,u as ii,v as ai,w as oi,x as si,y as ci,z as li}from"./themeTransition-BlOe94Bx.js";var ui=`/`,di=`.search-wrap.wui-search-collapsible`,fi=`.wui-topsearch-panel`,pi=`.modal, wui-drawer[open]`,mi=new WeakSet,T=e=>e.querySelector(`.wui-search-toggle`),E=e=>e.querySelector(`.search-input`);function D(e){e.classList.remove(`is-collapsed`),T(e)?.setAttribute(`aria-expanded`,`true`),E(e)?.focus()}function O(e){E(e)?.value||(e.classList.add(`is-collapsed`),T(e)?.setAttribute(`aria-expanded`,`false`))}function hi(e){if(e.dataset.wuiCollapseWired)return;e.dataset.wuiCollapseWired=`1`;let t=T(e),n=E(e);t?.addEventListener(`click`,()=>D(e)),n?.addEventListener(`keydown`,r=>{r.key!==`Escape`||n.value||(r.preventDefault(),O(e),t?.focus())}),e.addEventListener(`focusout`,t=>{e.contains(t.relatedTarget)||O(e)})}function gi(e){mi.has(e)||(mi.add(e),e.addEventListener(`keydown`,t=>{if(t.key!==`/`||t.ctrlKey||t.altKey||t.metaKey||t.defaultPrevented||o(t.target)||t.target?.closest?.(pi)||e.querySelector(fi))return;let n=[...e.querySelectorAll(di)].find(e=>e.offsetParent!==null);n&&(t.preventDefault(),D(n))}))}function _i(e=document){for(let t of e.querySelectorAll(di))hi(t);gi(e.ownerDocument??e)}var k=`wuiConfirm`,A=Object.freeze([`danger`]),j=Object.freeze([`success`,`info`,`warning`,`danger`]),M=`wui.flash`,N=Object.freeze({confirmTitle:`Are you sure?`,confirmLabel:`Confirm`,cancelLabel:`Cancel`,failed:`That did not work. Try again.`,forbidden:`You do not have permission to do that.`,network:`Could not reach the server. Check your connection and try again.`}),vi=new WeakSet,yi=new WeakSet,P=null,F=null,I=!1,bi=e=>{let t=document.createElement(`span`);return t.textContent=e??``,t.innerHTML},L=(e,t)=>{e&&window.WUI?.toast?.(e,{variant:t})},xi=()=>{let e=window.bootstrap?.Modal;if(!e)throw Error(`data-wui-confirm: Bootstrap's bundle (window.bootstrap) is not loaded on this page.`);return e};function Si(){let e=document.getElementById(k);return e||(e=document.createElement(`div`),e.id=k,e.className=`modal fade wui-modal-shell`,e.tabIndex=-1,e.setAttribute(`aria-hidden`,`true`),e.setAttribute(`role`,`dialog`),e.setAttribute(`aria-modal`,`true`),e.style.setProperty(`--wui-modal-max-width`,`${ft.md}px`),e.innerHTML=`<div class="modal-dialog modal-dialog-centered wui-rb-dialog"><div class="modal-content wui-modal wui-confirm"><div class="wui-modal-body"><div class="wui-confirm-content"><span class="wui-confirm-icon"><wui-status-icon tone="info" size="120"></wui-status-icon></span><h3 class="wui-confirm-title" tabindex="-1" data-autofocus></h3><p class="wui-confirm-msg"></p></div></div><div class="wui-modal-footer"><div class="wui-confirm-actions"><button type="button" class="btn btn-secondary" data-bs-dismiss="modal">${bi(N.cancelLabel)}</button><button type="button" class="btn btn-primary" data-app-confirm></button></div></div></div></div>`,document.body.appendChild(e),e)}function Ci(e,t){let n=e.getAttribute(`data-wui-confirm-tone`);if(n!==null&&!A.includes(n))throw TypeError(`data-wui-confirm-tone="${n}" is not supported. Use danger, or leave it off.`);wi({title:e.getAttribute(`data-wui-confirm-title`),message:e.getAttribute(`data-wui-confirm`),label:e.getAttribute(`data-wui-confirm-label`),danger:n===`danger`},t)}function wi({title:e,message:t,label:n,danger:r},i){let a=xi(),o=Si(),s=o.querySelector(`.wui-confirm-title`),c=o.querySelector(`[data-app-confirm]`);if(!s||!c)throw Error(`#${k} is not a confirm dialog with a confirm button. Render <app-confirm-dialog id="${k}"> without confirm-href, or leave the dialog to the library.`);let l=o.querySelector(`.wui-confirm-msg`);l||(l=document.createElement(`p`),l.className=`wui-confirm-msg`,s.after(l)),s.textContent=e||N.confirmTitle,l.textContent=t,c.textContent=n||N.confirmLabel,c.classList.toggle(`btn-danger`,r),c.classList.toggle(`btn-primary`,!r),o.querySelector(`wui-status-icon`)?.setAttribute(`tone`,r?`delete`:`info`),o.setAttribute(`aria-label`,s.textContent),F=i,I=!1,a.getOrCreateInstance(o).show()}var R=(e,t)=>{P=e;try{t()}finally{P=null}};function Ti(e,{title:t,message:n,label:r,tone:i},a){if(i!=null&&!A.includes(i))throw TypeError(`confirmAction: tone "${i}" is not supported. Use danger, or leave it off.`);Bi(e.ownerDocument),wi({title:t,message:n,label:r,danger:i===`danger`},()=>R(e,a))}var Ei=e=>e.disabled===!0||e.getAttribute(`aria-disabled`)===`true`;function Di(e){let t=e.target.closest?.(`[data-wui-confirm]:not(form)`);!t||t===P||Ei(t)||(e.preventDefault(),e.stopImmediatePropagation(),Ci(t,()=>R(t,()=>t.click())))}function Oi(e){let t=e.target;if(!(t instanceof HTMLFormElement)||!t.hasAttribute(`data-wui-confirm`)||t===P||e.submitter&&e.submitter===P||t.querySelector(`input[data-app-repeater-hidden]`))return;e.preventDefault(),e.stopImmediatePropagation();let n=e.submitter?.form===t?e.submitter:void 0;Ci(t,()=>R(t,()=>t.requestSubmit(n)))}function ki(e){let t=e.target.closest?.(`#${k} [data-app-confirm]`);!t||t.disabled||!F||(I=!0,xi().getOrCreateInstance(t.closest(`#${k}`)).hide())}function Ai(e){if(e.target.id!==`wuiConfirm`)return;let t=I?F:null;F=null,I=!1,t?.()}var ji=(e,t)=>{e&&window.sessionStorage.setItem(M,JSON.stringify({message:e,variant:t}))},Mi=e=>e===`forbidden`?N.forbidden:e===`network`?N.network:N.failed;function Ni(){for(let e of document.querySelectorAll(`[data-wui-server]`))e.dataset.refreshOnSuccess!==`false`&&tt(e)?.reload()}async function Pi(e){let t=e.getAttribute(`data-wui-post`);if(!t)throw Error(`A data-wui-post button needs the URL the action posts to.`);return Fi(t,e)}async function Fi(e,t,n){let r=t.getAttribute(`data-wui-post-reload`);if(r!==null&&r!==`page`)throw TypeError(`data-wui-post-reload="${r}" is not supported. Use page, or leave it off to reload the server tables.`);t.disabled=!0,t.setAttribute(`aria-busy`,`true`);let i=await C(e,{method:`POST`,body:n});if(i.kind===`session`||i.kind===`aborted`)return;let a=i.toastVariant||`success`;if(i.ok&&(i.redirect||r===`page`)){ji(i.message,a),i.redirect?window.location.assign(i.redirect):window.location.reload();return}if(t.disabled=!1,t.removeAttribute(`aria-busy`),i.ok){rt(i,a),Ni();return}L(i.message||Mi(i.kind),`danger`)}function Ii(e){let t=e.target.closest?.(`[data-wui-post]`);t&&(e.preventDefault(),!(Ei(t)||t.getAttribute(`aria-busy`)===`true`)&&Pi(t).catch(e=>_(e)))}function Li(e){let t=e.target.closest?.(`form[data-wui-post-form]`);if(!t||e.defaultPrevented)return;e.preventDefault();let n=e.submitter||t.querySelector(`button`);n.getAttribute(`aria-busy`)!==`true`&&(Fi(t.getAttribute(`action`),n,new FormData(t)).catch(e=>_(e)),window.bootstrap?.Dropdown?.getInstance(t.closest(`.dropdown`)?.querySelector(`[data-bs-toggle='dropdown']`))?.hide())}function Ri(){let e=window.sessionStorage.getItem(M);if(!e)return;window.sessionStorage.removeItem(M);let{message:t,variant:n}=JSON.parse(e);L(t,n)}function zi(e){let t=e.querySelectorAll?[...e.querySelectorAll(`[data-wui-flash]`)]:[];e instanceof Element&&e.matches(`[data-wui-flash]`)&&t.unshift(e);for(let e of t){let t=e.getAttribute(`data-wui-flash-variant`)||`success`;if(!j.includes(t))throw TypeError(`data-wui-flash-variant="${t}" is not supported. Use ${j.join(`, `)}.`);let n=e.getAttribute(`data-wui-flash`)||e.textContent.trim();e.remove(),L(n,t)}}function Bi(e){yi.has(e)||(yi.add(e),e.addEventListener(`click`,ki),e.addEventListener(`hidden.bs.modal`,Ai))}function Vi(e=document){let t=e.ownerDocument||e;vi.has(t)||(vi.add(t),t.addEventListener(`click`,Di,!0),t.addEventListener(`submit`,Oi,!0),Bi(t),t.addEventListener(`click`,Ii),t.addEventListener(`submit`,Li),Ri()),zi(e)}var z=Object.freeze({title:`Leave without saving?`,message:`Your changes on this page are not saved. If you leave now, they are lost.`,leaveLabel:`Leave`}),B=`form[data-wui-unsaved]`,Hi=`[aria-invalid="true"], .field-error:not(:empty), .field-validation-error, .validation-summary-errors, .wui-error-summary`,Ui=`[download], [data-wui-modal], [data-wui-post], [data-bs-toggle]`,Wi=new Set([`submit`,`button`,`reset`,`image`]),Gi=new Set([`hidden`,`checkbox`,`radio`,`file`,`submit`,`button`,`reset`,`image`,`range`,`color`]),V=new WeakMap,Ki=new WeakSet,qi=e=>`${e.name}:${e.size}:${e.lastModified}`;function H(e){let t=[];for(let n of e.elements)!n.name||n.disabled||Wi.has(n.type)||(n.type===`checkbox`||n.type===`radio`?t.push([n.name,n.value,n.checked]):n.type===`file`?t.push([n.name,[...n.files||[]].map(qi)]):n.type===`select-multiple`?t.push([n.name,[...n.selectedOptions].map(e=>e.value)]):t.push([n.name,n.value]));return JSON.stringify(t)}function U(e){return H(e)}function Ji(e){for(let t of e.elements)if(!(!t.name||t.disabled)){if(t.tagName===`TEXTAREA`||t.tagName===`INPUT`&&!Gi.has(t.type)){if(t.value.trim()!==``)return!0}else if(t.tagName===`INPUT`&&t.type===`file`&&t.files?.length>0)return!0}return!1}var Yi=e=>({saved:e.querySelector(Hi)&&Ji(e)?null:H(e),engaged:!1,discarded:!1});function Xi(e){let t=V.get(e);return!t||t.discarded||!e.isConnected?!1:t.saved===null||t.engaged&&H(e)!==t.saved}var W=(e,t)=>[...e.querySelectorAll(B)].filter(e=>e!==t&&Xi(e)),Zi=()=>!!window.bootstrap?.Modal;function Qi(e,t,n){let r=t.map(e=>e.getAttribute(`data-wui-unsaved`)).find(Boolean)||z.message;Ti(e,{title:z.title,message:r,label:z.leaveLabel,tone:`danger`},()=>{for(let e of t)V.get(e).discarded=!0;n()})}function $i(e){if(e.matches(Ui))return!1;let t=e.getAttribute(`target`);if(t&&t.toLowerCase()!==`_self`)return!1;let n=new URL(e.getAttribute(`href`),window.location.href);if(n.protocol!==`http:`&&n.protocol!==`https:`)return!1;let r=window.location;return!(n.hash&&n.origin===r.origin&&n.pathname===r.pathname&&n.search===r.search)}function ea(e,t){if((t?.getAttribute(`formmethod`)||e.getAttribute(`method`)||`get`).toLowerCase()===`dialog`)return!1;let n=t?.getAttribute(`formtarget`)||e.getAttribute(`target`);return!n||n.toLowerCase()===`_self`}function ta(e){if(e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;let t=e.target.closest?.(`a[href]`);if(!t||!$i(t))return;let n=W(t.ownerDocument,null);!n.length||!Zi()||(e.preventDefault(),Qi(t,n,()=>t.click()))}function na(e){let t=e.target;if(!(t instanceof HTMLFormElement)||e.defaultPrevented||!ea(t,e.submitter))return;let n=W(t.ownerDocument,t);if(n.length&&Zi()){e.preventDefault();let r=e.submitter?.form===t?e.submitter:void 0;Qi(t,n,()=>t.requestSubmit(r));return}let r=V.get(t);r&&(r.saved=H(t),r.discarded=!1)}function ra(e){W(document,null).length&&(e.preventDefault(),e.returnValue=``)}function ia(e){let t=e.target.closest?.(B),n=t&&V.get(t);!n||n.engaged||(n.saved!==null&&(n.saved=H(t)),n.engaged=!0)}function aa(e){let t=e.target.closest?.(B),n=t&&V.get(t);n&&(n.discarded=!1,e.isTrusted&&(n.engaged=!0))}function oa(e){let t=e.detail?.handle?.el;if(t instanceof Element)for(let e of t.querySelectorAll(B))ca(e)}function sa(e=document){let t=e.ownerDocument||e;if(!Ki.has(t)){Ki.add(t);for(let e of[`focusin`,`pointerdown`,`drop`])t.addEventListener(e,ia,!0);for(let e of[`input`,`change`])t.addEventListener(e,aa,!0);t.addEventListener(`click`,ta),t.addEventListener(`submit`,na),t.addEventListener(`wui:modal:success`,oa),t.defaultView.addEventListener(`beforeunload`,ra)}let n=[...e.querySelectorAll?.(B)||[]];e.matches?.(B)&&n.unshift(e);for(let e of n)V.has(e)||V.set(e,Yi(e))}function ca(e){if(!(e instanceof HTMLFormElement)||!e.matches(B))throw TypeError(`resetUnsavedChanges: ${String(e)} is not a <form data-wui-unsaved>.`);V.set(e,{saved:H(e),engaged:!1,discarded:!1})}var G=Object.freeze({discard:`Discard`,keep:`Keep editing`}),la=`wui:drawer:discard`,K=`wui-drawer[confirm-discard]`,q=`.wui-modal-shell`,ua=`form[data-wui-confirm-discard]`,J=`.wui-drawer-discard`,da=`input, select, textarea`,Y=new WeakMap,fa=new WeakSet,pa=new WeakSet;function ma(e,t,n,r){let i=e.createElement(`button`);return i.type=`button`,i.className=t,i.setAttribute(n,``),i.textContent=r,i}function ha(e,t){let n=e.createElement(`div`);n.className=`wui-drawer-discard`,n.setAttribute(`role`,`alert`);let r=e.createElement(`span`);return r.className=`wui-drawer-discard-text`,r.textContent=t,n.append(r,ma(e,`btn btn-danger btn-sm`,`data-wui-discard-confirm`,G.discard),ma(e,`btn btn-secondary btn-sm`,`data-wui-discard-keep`,G.keep)),n}function ga(e){let t=e.closest?.(K);if(t)return t;let n=e.closest?.(q);return n&&(n.hasAttribute(`confirm-discard`)||n.querySelector(ua))?n:null}function _a(e){return e.closest(K)??e.closest(q)}function X(e){return e.matches(K)||e.hasAttribute(`confirm-discard`)?e.querySelectorAll(`form`):e.querySelectorAll(ua)}function va(e){let t=Y.get(e);return t!=null&&U(e)!==t}function ya(e){let t=e.ownerDocument.createElement(`div`);return t.className=`wui-drawer-footer`,e.querySelector(`.wui-drawer-panel`).append(t),pa.add(t),t}function ba(e){let t=e.ownerDocument.createElement(`div`);return t.className=`wui-modal-footer`,(e.querySelector(`.wui-modal-body`)?.parentElement??e.querySelector(`.modal-content`)??e).append(t),pa.add(t),t}function xa(e){e.querySelector(`[data-wui-discard-confirm]`).focus()}function Sa(e,t){let n=e.querySelector(J);if(n){xa(n);return}let r=ha(e.ownerDocument,t),i;if(e.matches(K))i=e.querySelector(`.wui-drawer-footer`)??ya(e),i.prepend(r);else if(e.hasAttribute(`confirm-discard`))i=e.querySelector(`.wui-modal-footer`)??ba(e),i.prepend(r);else{let t=e.querySelector(ua);i=t.querySelector(`.modal-footer`),i?i.prepend(r):(i=t,t.append(r))}i.classList.add(`wui-drawer-discarding`),xa(r)}function Ca(e){let t=e.parentElement;e.remove(),t.classList.remove(`wui-drawer-discarding`),pa.has(t)&&t.remove()}function wa(e){for(let t of X(e)){let e=[...t.querySelectorAll(da)].find(e=>e.type!==`hidden`&&!e.disabled);if(e){e.focus();return}}}function Ta(e){let t=ga(e.target);if(t)for(let e of X(t))Y.get(e)??Y.set(e,U(e))}function Ea(e){let t=e.target;!(t instanceof HTMLFormElement)||!ga(t)||Y.set(t,U(t))}function Da(e){let t=e.detail?.handle?.el;if(t instanceof Element)for(let e of t.querySelectorAll(`form`))Y.delete(e)}function Oa(e){let t=e.target;!(t instanceof Element)||!t.matches(K)||[...X(t)].some(va)&&(e.preventDefault(),Sa(t,t.getAttribute(`confirm-discard`)))}function ka(e){let t=e.target;if(!(t instanceof Element)||!t.matches(q))return;let n=[...X(t)].find(va);n&&(e.preventDefault(),Sa(t,t.getAttribute(`confirm-discard`)??n.getAttribute(`data-wui-confirm-discard`)))}function Aa(e){let t=e.closest(`wui-drawer`);if(t){t.dispatchEvent(new CustomEvent(`wui-drawer-close`,{bubbles:!0,cancelable:!0}))&&t.hide();return}let n=e.closest(q);n&&window.bootstrap?.Modal?.getInstance(n)?.hide()}function ja(e){let t=e.closest(J),n=_a(t);Ca(t);for(let e of X(n))Y.set(e,U(e));n.dispatchEvent(new CustomEvent(la,{bubbles:!0})),n.matches(K)?n.hide():window.bootstrap.Modal.getInstance(n).hide()}function Ma(e){let t=e.closest(J),n=_a(t);Ca(t),wa(n)}function Na(e){let t=e.target,n=t.closest?.(`[data-wui-discard-confirm]`);if(n){ja(n);return}let r=t.closest?.(`[data-wui-discard-keep]`);if(r){Ma(r);return}let i=t.closest?.(`[data-wui-dismiss]`);i&&Aa(i)}function Pa(e){if(e.key!==`Escape`)return;let t=e.currentTarget.querySelector(J);if(!t)return;e.preventDefault(),e.stopPropagation();let n=_a(t);Ca(t),wa(n)}function Fa(e=document){let t=e.ownerDocument||e;fa.has(t)||(fa.add(t),t.addEventListener(`focusin`,Ta),t.addEventListener(`pointerdown`,Ta),t.addEventListener(`submit`,Ea),t.addEventListener(`wui:modal:success`,Da),t.addEventListener(`wui:modal:loaded`,Da),t.addEventListener(`wui-drawer-close`,Oa,!0),t.addEventListener(`hide.bs.modal`,ka),t.addEventListener(`click`,Na),t.addEventListener(`keydown`,Pa,!0))}var Ia=`data-wui-bulk-in-bar`,La=`[data-wui-page-header-bar][data-wui-bulk-for]`,Ra=new WeakSet;function za(e){return`${x(e,{decimals:0})} selected`}function Ba(e,t){for(let n of e.querySelectorAll(`[data-wui-bar-swap]`))n.hidden=t>0;let n=e.querySelector(`[data-wui-bar-bulk]`);n&&(n.hidden=t===0,n.querySelector(`.page-header-bar-bulk-count`).textContent=t>0?za(t):``)}function Va(e=document){for(let t of e.querySelectorAll(La))document.getElementById(t.dataset.wuiBulkFor)?.setAttribute(Ia,``);Ra.has(document)||(Ra.add(document),document.addEventListener(`selectionchange`,e=>{if(typeof e.detail?.selected==`number`)for(let t of document.querySelectorAll(La))document.getElementById(t.dataset.wuiBulkFor)?.contains(e.target)&&Ba(t,e.detail.selected)}))}var Ha=31536e3,Z=new WeakMap,Q=e=>e>99?`99+`:String(e);function Ua(e,t,n=document){try{n.cookie=`${e}=${t?`1`:`0`}; Path=/; Max-Age=${Ha}; SameSite=Lax`}catch(e){if(!(e instanceof DOMException&&e.name===`SecurityError`))throw e}}var Wa=e=>{let t=document.createElement(`template`);return t.innerHTML=e,t.content},$=(e,t)=>{let n=document.createElement(`div`);return n.className=e,n.textContent=t,n};function Ga(e,t){let n=e.querySelector(`.wui-bell-trigger`),r=e.querySelector(`.wui-bell-count`),i=e.querySelector(`[data-wui-bell-live]`),a=e.querySelector(`[data-wui-bell-list]`),o=e.querySelector(`.wui-bell-menu`),{src:s,readAction:c}=e.dataset,l=e.dataset.label||`Notifications`,u=e.dataset.emptyText||`You are all caught up.`,d=Number(e.dataset.pollSeconds??60),f=w(),p=Number(e.dataset.unread)||0,m=(t,a=!0)=>{let o=Math.max(0,Number(t)||0),s=o!==p;p=o,e.dataset.unread=String(o),r&&(r.textContent=Q(o),r.hidden=o===0),n?.setAttribute(`aria-label`,o===0?l:`${l}, ${Q(o)} unread`),a&&s&&i&&(i.textContent=o===0?`No unread notifications`:`${Q(o)} unread notifications`)},h=()=>o?.classList.contains(`show`)??!1,g=()=>{let e=$(`wui-bell-state`,`Could not load notifications. `),t=document.createElement(`button`);t.type=`button`,t.className=`btn btn-link btn-sm`,t.dataset.wuiBellRetry=``,t.textContent=`Retry`,e.append(t),a.replaceChildren(e)},_=async t=>{t&&(a.setAttribute(`aria-busy`,`true`),a.querySelector(`.wui-bell-item`)||a.replaceChildren($(`wui-bell-state`,`Loading…`)));let n=await f.run(s);if(n.kind===`aborted`||n.kind===`stale`||n.kind===`session`)return;if(a.removeAttribute(`aria-busy`),!n.ok){t&&g();return}let r=Wa(n.html),i=r.querySelector(`[data-wui-unread]`),o=i?Number(i.getAttribute(`data-wui-unread`)):p;m(o),(t||h())&&(r.querySelector(`.wui-bell-item`)?a.replaceChildren(r):a.replaceChildren($(`wui-bell-state`,u))),e.dispatchEvent(new CustomEvent(`wui:notifications:loaded`,{bubbles:!0,detail:{unread:o}}))};e.addEventListener(`show.bs.dropdown`,()=>_(!0)),e.addEventListener(`click`,async e=>{if(e.target.closest(`[data-wui-bell-retry]`)){_(!0);return}let t=e.target.closest(`[data-wui-bell-read]`);if(!t||!c)return;t.disabled=!0;let n=await C(c,{method:`POST`});t.disabled=!1,n.ok&&(m(0),_(!0))});let v=null,y=()=>{d>0&&v===null&&(v=setInterval(()=>_(h()),d*1e3))},b=()=>{v!==null&&clearInterval(v),v=null},x=()=>{document.hidden?b():(_(h()),y())};return d>0&&(document.addEventListener(`visibilitychange`,x),document.hidden||y()),t.push(()=>{b(),f.abort(),document.removeEventListener(`visibilitychange`,x)}),{setUnread:e=>m(e),refresh:()=>_(h())}}var Ka=e=>!!e&&(e.isContentEditable||/^(INPUT|TEXTAREA|SELECT)$/.test(e.tagName)),qa=(e,t,n)=>`${e}${e.includes(`?`)?`&`:`?`}${encodeURIComponent(t)}=${encodeURIComponent(n)}`;function Ja(e,t){let n=e.querySelector(`input.search-input`),r=e.querySelector(`.wui-topsearch-results`),i=e.querySelector(`.wui-topsearch-open`),a=e.querySelector(`[data-wui-topsearch-live]`),{src:o,param:s=`q`,resultsHref:c}=e.dataset,l=Number(e.dataset.minChars??2),u=Number(e.dataset.debounceMs??250),d=w(),f=null,p=-1,m=()=>[...r.querySelectorAll(`.wui-topsearch-hit`)],h=e=>{let t=m();p=t.length===0?-1:(e+t.length)%t.length,t.forEach((e,t)=>{let n=t===p;e.classList.toggle(`is-active`,n),e.setAttribute(`aria-selected`,n?`true`:`false`)}),p>=0?(n.setAttribute(`aria-activedescendant`,t[p].id),t[p].scrollIntoView?.({block:`nearest`})):n.removeAttribute(`aria-activedescendant`)},g=()=>{r.hidden=!0,n.setAttribute(`aria-expanded`,`false`),n.removeAttribute(`aria-activedescendant`),p=-1},_=()=>{r.hidden=!1,n.setAttribute(`aria-expanded`,`true`)},v=t=>{e.classList.toggle(`is-open`,t),i?.setAttribute(`aria-expanded`,t?`true`:`false`)},y=t=>{let n=new CustomEvent(`wui:search:select`,{bubbles:!0,cancelable:!0,detail:{href:t}});e.dispatchEvent(n)&&window.location.assign(t)},b=async t=>{e.classList.add(`is-loading`);let n=await d.run(qa(o,s,t));if(!(n.kind===`aborted`||n.kind===`stale`||n.kind===`session`)){if(e.classList.remove(`is-loading`),n.ok){let e=Wa(n.html),t=e.querySelector(`[data-wui-count]`);r.replaceChildren(e),m().forEach((e,t)=>{e.id=`${r.id}-opt-${t}`});let i=t?Number(t.getAttribute(`data-wui-count`)):m().length;a&&(a.textContent=i===0?`No results`:`${i} ${i===1?`result`:`results`}`)}else r.replaceChildren($(`wui-topsearch-empty`,`Search is unavailable right now.`));p=-1,_()}};n.addEventListener(`input`,()=>{clearTimeout(f);let t=n.value.trim();if(t.length<l){d.abort(),e.classList.remove(`is-loading`),r.replaceChildren(),g();return}f=setTimeout(()=>b(t),u)}),n.addEventListener(`keydown`,t=>{if(t.key===`ArrowDown`||t.key===`ArrowUp`){if(r.hidden||m().length===0)return;t.preventDefault(),h(p+(t.key===`ArrowDown`?1:-1))}else if(t.key===`Enter`){let e=m();!r.hidden&&p>=0&&e[p]?(t.preventDefault(),y(e[p].getAttribute(`href`))):c&&n.value.trim()!==``&&(t.preventDefault(),y(qa(c,s,n.value.trim())))}else t.key===`Escape`&&(r.hidden?e.classList.contains(`is-open`)&&(t.preventDefault(),t.stopPropagation(),v(!1),i?.focus()):(t.preventDefault(),t.stopPropagation(),g()))}),r.addEventListener(`click`,e=>{let t=e.target.closest(`.wui-topsearch-hit`);!t||e.ctrlKey||e.metaKey||e.shiftKey||e.button===1||(e.preventDefault(),y(t.getAttribute(`href`)))}),i?.addEventListener(`click`,()=>{let t=!e.classList.contains(`is-open`);v(t),t&&n.focus()});let x=e=>{e.key!==`/`||e.ctrlKey||e.metaKey||e.altKey||Ka(e.target)||(e.preventDefault(),v(!0),n.focus())},S=t=>{e.contains(t.target)||(g(),e.classList.contains(`is-open`)&&v(!1))};document.addEventListener(`keydown`,x),document.addEventListener(`pointerdown`,S),t.push(()=>{clearTimeout(f),d.abort(),document.removeEventListener(`keydown`,x),document.removeEventListener(`pointerdown`,S)})}function Ya(e){let t=[],n=e.dataset.wuiCollapsedCookie;n&&e.addEventListener(`wui:shell:collapse`,e=>Ua(n,!!e.detail?.collapsed)),e.addEventListener(`click`,t=>{t.target.closest(`[data-wui-tabbar-more]`)&&e.querySelector(`[data-app-shell-menu]`)?.click()});let r=e.querySelector(`[data-wui-bell]`),i=r?Ga(r,t):null,a=e.querySelector(`[data-wui-topsearch]`);a&&Ja(a,t);let o={el:e,setUnread(e){if(!i)throw Error(`WUI.shell: this <app-shell> has no <app-shell-notifications>.`);i.setUnread(e)},refreshNotifications(){if(!i)throw Error(`WUI.shell: this <app-shell> has no <app-shell-notifications>.`);return i.refresh()},get collapsed(){return e.classList.contains(`collapsed`)},set collapsed(t){if(!!t===e.classList.contains(`collapsed`))return;let n=e.querySelector(`[data-app-shell-collapse]`);n?n.click():e.classList.toggle(`collapsed`,!!t)}};Z.set(e,o);let s=n=>{if(n.target===e||n.target.contains?.(e)){for(let e of t)e();Z.delete(e),delete e.dataset.wuiPartsWired,document.removeEventListener(`wui:teardown`,s)}};return document.addEventListener(`wui:teardown`,s),o}function Xa(e=document){let t=[];e instanceof Element&&e.matches(`[data-app-shell]`)&&t.push(e),t.push(...e.querySelectorAll(`[data-app-shell]`));for(let e of t)e.dataset.wuiPartsWired||(e.dataset.wuiPartsWired=`1`,Ya(e))}function Za(e){let t=e?.closest?.(`[data-app-shell]`)??null;return t?(Z.has(t)||Xa(t),Z.get(t)??null):null}function Qa(){h(),e(`wui-select`,Jt),e(`wui-country-select`,Yt),e(`wui-phone`,In),e(`wui-datepicker`,Zt),e(`wui-date-range`,Qt),e(`wui-dock`,$t),e(`wui-image-crop`,nn),e(`wui-kanban`,ht),e(`wui-inline-edit`,an),e(`wui-consent-banner`,Kt),e(`wui-slider`,Kn),e(`wui-sortable`,qn),e(`wui-timepicker`,Yn),e(`wui-tour`,Zn),e(`wui-tree`,Qn),e(`wui-autocomplete`,Ft),e(`wui-command-palette`,Vt),e(`wui-context-menu`,qt),e(`wui-multiselect`,Sn),e(`wui-taginput`,Jn),e(`wui-otp`,Pn),e(`wui-status-icon`,Mt),e(`wui-shortcuts`,Wn),e(`wui-record-pager`,Rn),e(`wui-carousel`,It),e(`wui-code-block`,Lt),e(`wui-markdown`,un),e(`wui-data-table`,Xt),e(`wui-drawer`,en),e(`wui-hover-card`,tn),e(`wui-lightbox`,ln),e(`wui-menubar`,xn),e(`wui-navigation-menu`,Cn),e(`wui-notification-center`,Mn),e(`wui-onboarding-checklist`,Nn),e(`wui-overflow`,Fn),e(`wui-rating`,Ln),e(`wui-relative-time`,Vn),e(`wui-resizable`,Hn),e(`wui-rolling-number`,Un),e(`wui-show-more`,Gn),e(`wui-truncate`,$n),e(`wui-whats-new`,er),e(`wui-mention-input`,pn),e(`wui-comment-thread`,Ht),e(`wui-wizard-step`,rr),e(`wui-wizard`,nr)}Qa();export{xr as AVATAR_ACCEPT,ir as AVATAR_MAX_SIZE_MB,Lr as AVATAR_OUTPUT_SIZE,ri as AVATAR_OUTPUT_TYPE,Jr as AVATAR_PREVIEW_SIZES,ei as AVATAR_TEXT,Ia as BAR_BULK_IN_BAR_ATTRIBUTE,Ie as COLUMN_MAX_WIDTH,je as COLUMN_MIN_WIDTH,Gt as COMMENT_INTENTS,Ut as COMMENT_REACTIONS,Wt as COMMENT_TEXT,k as CONFIRM_DIALOG_ID,A as CONFIRM_TONES,zt as COPY_FEEDBACK_MS,ot as CSRF_META_NAME,ce as CURRENCIES,Pe as DATA_TABLE_TEXT,re as DATE_PATTERNS,nt as DEFAULT_CSRF_HEADER,Tr as DEFAULT_IMAGE_ACCEPT,Dr as DEFAULT_MAX_SIZE_MB,yr as DEFAULT_PASSWORD_RULES,Wr as DEFAULT_REQUIREMENTS_TITLE,ni as DEFAULT_THEME_EFFECT,qr as DEFAULT_THEME_STORAGE_KEY,la as DISCARD_EVENT,G as DISCARD_TEXT,si as DROP_OVER_CLASS,oe as DURATION_UNITS,ee as EMPTY_VALUE,g as FILTER_POPOVER_MAX_CHIPS,M as FLASH_STORAGE_KEY,j as FLASH_VARIANTS,v as FORMAT_STYLES,it as HTTP_KINDS,cn as INLINE_EDIT_SAVED_MS,on as INLINE_EDIT_TEXT,sn as INLINE_EDIT_TYPES,ie as IST_TIME_ZONE,Ot as KANBAN_DRAG_THRESHOLD_PX,Ct as KANBAN_LONG_PRESS_MS,Et as KANBAN_PHONE_QUERY,bt as KANBAN_STORAGE_PREFIX,pt as KANBAN_SUMMARY_FORMATS,wt as KANBAN_TEXT,Dt as KANBAN_TONES,p as LIST_KEYS,vr as MASK_INPUT_TYPES,br as MASK_NAMES,dn as MENTION_ID_PATTERN,yn as MENTION_MAX_QUERY,hn as MENTION_MAX_RESULTS,_n as MENTION_TEXT,se as MONEY_UNITS,jn as NOTIFICATION_COUNT_CAP,Dn as NOTIFICATION_TEXT,Ee as PIN_AT_VAR,ye as PIN_SIDES,Me as RESIZE_STEP,Fe as RESIZE_STEP_LARGE,Cr as ROW_DRAG_TYPE,sr as ROW_DROP_EVENT,xe as ROW_HEIGHTS,ke as ROW_MOVE_LIMIT,Le as ROW_MOVE_MS,Se as ROW_SAVE_ATTR,Ce as ROW_SAVE_ERROR_CLASS,Ne as ROW_SAVE_STATES,ai as SCROLL_EDGE_SELECTOR,ui as SEARCH_OPEN_KEY,Ze as SELECT_ALL_LABEL,Ke as SELECT_CELL_CLASS,c as SELECT_KEY,ct as SELECT_ROW_LABEL,N as SERVER_ACTION_TEXT,d as SHORTCUTS_OFF_ATTRIBUTE,a as SHORTCUT_EVENT,t as SHORTCUT_SCOPE_ATTRIBUTE,l as SHORTCUT_TEXT,Nt as STATUS_TONES,$r as THEME_BOOT_SCRIPT_BODY,Vr as THEME_CHANGE_EVENT,Mr as THEME_EFFECTS,Yr as THEME_EFFECT_DURATION,ti as THEME_MODES,Fr as THEME_SWITCHING_CLASS,et as TOAST_ACTION_METHODS,st as TOAST_ACTION_MS,z as UNSAVED_TEXT,Ae as VIRTUAL_OVERSCAN,tr as WHATS_NEW_READ_EVENT,$e as WUI_HEADERS,Ft as WuiAutocomplete,It as WuiCarousel,Lt as WuiCodeBlock,Vt as WuiCommandPalette,Ht as WuiCommentThread,Kt as WuiConsentBanner,qt as WuiContextMenu,Yt as WuiCountrySelect,Xt as WuiDataTable,Zt as WuiDatePicker,Qt as WuiDateRange,$t as WuiDock,en as WuiDrawer,tn as WuiHoverCard,nn as WuiImageCrop,an as WuiInlineEdit,ht as WuiKanban,ln as WuiLightbox,un as WuiMarkdown,pn as WuiMentionInput,xn as WuiMenubar,Sn as WuiMultiSelect,Cn as WuiNavigationMenu,Mn as WuiNotificationCenter,Nn as WuiOnboardingChecklist,Pn as WuiOtp,Fn as WuiOverflow,In as WuiPhone,Ln as WuiRating,Rn as WuiRecordPager,Vn as WuiRelativeTime,Hn as WuiResizable,Un as WuiRollingNumber,Jt as WuiSelect,Wn as WuiShortcuts,Gn as WuiShowMore,Kn as WuiSlider,qn as WuiSortable,Mt as WuiStatusIcon,Jn as WuiTagInput,Yn as WuiTimePicker,Zn as WuiTour,Qn as WuiTree,$n as WuiTruncate,er as WuiWhatsNew,nr as WuiWizard,rr as WuiWizardStep,dr as acceptLabel,dt as addRowSelectCells,Je as addSelectColumn,Ba as applyBarBulk,Gr as applyTheme,f as ariaKeyShortcuts,ur as attachInputMask,oi as attachRowDrag,ci as attachScrollEdges,ut as attachShiftRange,Hr as avatarCropOptions,Nr as avatarUnreadableMessage,za as barBulkCountText,ar as buildPasswordRules,Te as clampColumnWidth,qe as classifyStatus,O as collapseSearch,Ti as confirmAction,Rt as copyTextToClipboard,ha as createDiscardPrompt,Xn as createLocalSeenStore,w as createRequestQueue,We as createSelectHeaderCell,Ue as createSelectRowCell,lt as createSelectSpacerCell,Qa as defineWeborityElements,Ur as evaluatePassword,U as formValues,y as formatCompact,te as formatCurrency,le as formatDate,b as formatDuration,hr as formatFileSize,pr as formatMasked,x as formatNumber,ae as formatPercent,zn as formatRelativeTime,ne as formatValue,tt as getServerTable,Za as getShell,He as glyphSvg,we as groupCount,ve as groupItems,kn as groupNotificationsByDay,Re as identityCell,n as inShortcutScope,_i as initCollapsibleSearch,Fa as initDrawerDiscard,gr as initInputMasks,Va as initPageBarBulk,At as initRemoteModals,wr as initRowDrag,Pr as initScrollEdges,Vi as initServerActions,Qe as initServerTables,Xa as initShellParts,sa as initUnsavedChanges,rn as inlineEditText,Xr as isHeicFile,Qr as isImageFile,mr as isImageOnlyAccept,Sr as isMaskPattern,kr as isPdfFile,o as isTypingTarget,xt as kanbanCardLabel,kt as kanbanOverflow,gt as kanbanStorageKey,_t as kanbanSummaryFormat,Tt as kanbanVisibleLimit,jt as loadRemoteDrawer,mt as loadRemoteModal,li as maskedPostValue,Bt as matchSegments,Or as matchesAccept,Ve as measureRows,gn as mentionLabel,vn as mentionTextFromValue,fn as mentionValueFromText,mn as mentionedIds,m as moveFocus,ii as nextTheme,En as notificationCountText,wn as notificationDayHeading,On as notificationTime,An as notificationTriggerLabel,Tn as notificationUnreadAnnouncement,D as openSearch,bn as parseMentionValue,Ye as parseToastAction,_r as passwordSatisfies,be as pinAtValue,Be as pinClasses,ge as pinOffsetVar,de as planPins,ze as playRowMoves,or as postedMasked,Er as rawMasked,_e as readColumnWidths,at as readCsrf,St as readKanbanCollapsed,Ir as readStoredTheme,Bn as relativeTimeTitle,ca as resetUnsavedChanges,fr as resolveMask,Rr as resolveTheme,pe as rowLabel,fe as rowOrderChanged,r as runShortcut,Xe as runToastAction,he as saveOutcomeText,Oe as setRowSaveState,ue as settledRows,i as shortcutKey,u as shortcutName,s as shortcutsOff,rt as showResultToast,Zr as storeTheme,yt as sumKanbanValues,Ge as syncSelectAll,lr as syncTargets,Kr as themeBootScript,Br as themeKeyframes,cr as tickedKeys,S as toInstant,zr as transitionTheme,Ar as validateFile,De as virtualRange,jr as watchSystemTheme,Pt as withTrustedLabel,me as writeColumnWidths,vt as writeKanbanCollapsed,C as wuiFetch};
1
+ import{n as e}from"./elementBase-DV9IZZCu.js";import{a as t,c as n,d as r,f as i,i as a,l as o,m as s,n as c,o as l,p as u,r as d,s as f,t as p,u as m}from"./shortcutKeys-DdQ_0ops.js";import{n as h,t as g}from"./filterPopover-B1Te0nqD.js";import{t as _}from"./devWarn-DXdRWZs3.js";import{a as v,c as y,d as b,f as x,h as S,i as ee,l as te,m as ne,n as re,o as ie,p as ae,r as oe,s as se,t as ce,u as le}from"./formatters-BAE__8ye.js";import{A as ue,C as de,D as fe,E as pe,M as me,O as he,S as ge,T as _e,_ as ve,a as ye,b as be,c as xe,d as Se,f as Ce,g as we,h as Te,i as Ee,j as De,k as Oe,l as ke,m as Ae,n as je,o as Me,p as Ne,r as Pe,s as Fe,t as Ie,u as Le,v as Re,w as ze,x as Be,y as Ve}from"./dataTable-Cd_IJQcs.js";import{t as He}from"./iconGlyphs.g-Bo-gCFpk.js";import{C as Ue,S as We,T as Ge,_ as Ke,a as qe,b as Je,c as C,d as Ye,f as Xe,g as Ze,h as Qe,i as $e,l as et,m as tt,n as nt,o as w,p as rt,r as it,s as at,t as ot,u as st,v as ct,w as lt,x as ut,y as dt}from"./wuiHttp-B2OJ14z5.js";import{_ as ft,a as pt,b as mt,c as ht,d as gt,f as _t,g as vt,h as yt,i as bt,l as xt,m as St,n as Ct,o as wt,p as Tt,r as Et,s as Dt,t as Ot,u as kt,v as At,y as jt}from"./kanban-DmeWP1iE.js";import{n as Mt,t as Nt}from"./statusIcons-Dt2ZVJyk.js";import{o as Pt}from"./optionLabel-DFT2Lcs6.js";import{t as Ft}from"./WuiAutocomplete-iTE6YNEU.js";import{t as It}from"./WuiCarousel-BbO8AoM6.js";import{t as Lt}from"./WuiCodeBlock-g0ofpXMd.js";import{n as Rt,t as zt}from"./copyText-DM5HhXjf.js";import{t as Bt}from"./textMatch-wdY7XLIc.js";import{t as Vt}from"./WuiCommandPalette-BND6hxMZ.js";import{i as Ht,n as Ut,r as Wt,t as Gt}from"./WuiCommentThread-tk01SHbs.js";import{t as Kt}from"./WuiConsentBanner-C2RCJzA3.js";import{t as qt}from"./WuiContextMenu-D-u6EH92.js";import{t as Jt}from"./WuiSelect-fwUpY87I.js";import{t as Yt}from"./WuiCountrySelect-CSEBbpAZ.js";import{t as Xt}from"./WuiDataTable-Ds44BXhE.js";import{t as Zt}from"./WuiDatePicker-9LQqLQMv.js";import{t as Qt}from"./WuiDateRange-B9Yrczsh.js";import{t as $t}from"./WuiDock-Bd2ijOaJ.js";import{t as en}from"./WuiDrawer-DnHsXG4q.js";import{t as tn}from"./WuiHoverCard-DeXHqAS9.js";import{t as nn}from"./WuiImageCrop-CvXh791S.js";import{a as rn,i as an,n as on,r as sn,t as cn}from"./WuiInlineEdit-CJHsCNn4.js";import{t as ln}from"./WuiLightbox-BMbaWFYN.js";import{t as un}from"./WuiMarkdown-C2flvSIt.js";import{a as dn,c as fn,i as pn,l as mn,n as hn,o as gn,r as _n,s as vn,t as yn,u as bn}from"./WuiMentionInput-Cs1RmP5Q.js";import{t as xn}from"./WuiMenubar-urKQw5uQ.js";import{t as Sn}from"./WuiMultiSelect-CS22nTKj.js";import{t as Cn}from"./WuiNavigationMenu-CGqTADvr.js";import{a as wn,c as Tn,i as En,n as Dn,o as On,r as kn,s as An,t as jn}from"./notificationDays-BUoh4mG6.js";import{t as Mn}from"./WuiNotificationCenter-UQz-EAjS.js";import{t as Nn}from"./WuiOnboardingChecklist-DXUETu1h.js";import{t as Pn}from"./WuiOtp-DfhXc829.js";import{t as Fn}from"./WuiOverflow-kCwO7k7b.js";import{t as In}from"./WuiPhone-BKrBaAdJ.js";import{t as Ln}from"./WuiRating-DhhqYj5Z.js";import{t as Rn}from"./WuiRecordPager-DRSJg2o9.js";import{n as zn,r as Bn,t as Vn}from"./WuiRelativeTime-D6hPHWXX.js";import{t as Hn}from"./WuiResizable-CtwCQUWR.js";import{t as Un}from"./WuiRollingNumber-gAaTn4jG.js";import{t as Wn}from"./WuiShortcuts-DfAbWRZZ.js";import{t as Gn}from"./WuiShowMore-D3VHRZJg.js";import{t as Kn}from"./WuiSlider-IOqadOtK.js";import{t as qn}from"./WuiSortable-CugtxycN.js";import{t as Jn}from"./WuiTagInput-DVmiTCMB.js";import{t as Yn}from"./WuiTimePicker-DC37hHJJ.js";import{n as Xn,t as Zn}from"./WuiTour-COCpmCY9.js";import{t as Qn}from"./WuiTree-CIoS5-Xt.js";import{t as $n}from"./WuiTruncate-Cxujs1Xt.js";import{n as er,t as tr}from"./WuiWhatsNew-BZdN4cR5.js";import{n as nr,t as rr}from"./WuiWizardStep-6VAgAV7V.js";import{$ as ir,A as ar,B as or,C as sr,D as cr,E as lr,F as ur,G as dr,H as fr,I as pr,J as mr,K as hr,L as gr,M as _r,N as vr,O as yr,P as br,Q as xr,R as Sr,S as Cr,T as wr,U as Tr,V as Er,W as Dr,X as Or,Y as kr,Z as Ar,_ as jr,a as Mr,at as Nr,b as Pr,c as Fr,d as Ir,et as Lr,f as Rr,g as zr,h as Br,i as Vr,it as Hr,j as Ur,k as Wr,l as Gr,m as Kr,n as qr,nt as Jr,o as Yr,ot as Xr,p as Zr,q as Qr,r as $r,rt as ei,s as ti,t as ni,tt as ri,u as ii,v as ai,w as oi,x as si,y as ci,z as li}from"./themeTransition-BlOe94Bx.js";var ui=`/`,di=`.search-wrap.wui-search-collapsible`,fi=`.wui-topsearch-panel`,pi=`.modal, wui-drawer[open]`,mi=new WeakSet,T=e=>e.querySelector(`.wui-search-toggle`),E=e=>e.querySelector(`.search-input`);function D(e){e.classList.remove(`is-collapsed`),T(e)?.setAttribute(`aria-expanded`,`true`),E(e)?.focus()}function O(e){E(e)?.value||(e.classList.add(`is-collapsed`),T(e)?.setAttribute(`aria-expanded`,`false`))}function hi(e){if(e.dataset.wuiCollapseWired)return;e.dataset.wuiCollapseWired=`1`;let t=T(e),n=E(e);t?.addEventListener(`click`,()=>D(e)),n?.addEventListener(`keydown`,r=>{r.key!==`Escape`||n.value||(r.preventDefault(),O(e),t?.focus())}),e.addEventListener(`focusout`,t=>{e.contains(t.relatedTarget)||O(e)})}function gi(e){mi.has(e)||(mi.add(e),e.addEventListener(`keydown`,t=>{if(t.key!==`/`||t.ctrlKey||t.altKey||t.metaKey||t.defaultPrevented||o(t.target)||t.target?.closest?.(pi)||e.querySelector(fi))return;let n=[...e.querySelectorAll(di)].find(e=>e.offsetParent!==null);n&&(t.preventDefault(),D(n))}))}function _i(e=document){for(let t of e.querySelectorAll(di))hi(t);gi(e.ownerDocument??e)}var k=`wuiConfirm`,A=Object.freeze([`danger`]),j=Object.freeze([`success`,`info`,`warning`,`danger`]),M=`wui.flash`,N=Object.freeze({confirmTitle:`Are you sure?`,confirmLabel:`Confirm`,cancelLabel:`Cancel`,failed:`That did not work. Try again.`,forbidden:`You do not have permission to do that.`,network:`Could not reach the server. Check your connection and try again.`}),vi=new WeakSet,yi=new WeakSet,P=null,F=null,I=!1,bi=e=>{let t=document.createElement(`span`);return t.textContent=e??``,t.innerHTML},L=(e,t)=>{e&&window.WUI?.toast?.(e,{variant:t})},xi=()=>{let e=window.bootstrap?.Modal;if(!e)throw Error(`data-wui-confirm: Bootstrap's bundle (window.bootstrap) is not loaded on this page.`);return e};function Si(){let e=document.getElementById(k);return e||(e=document.createElement(`div`),e.id=k,e.className=`modal fade wui-modal-shell`,e.tabIndex=-1,e.setAttribute(`aria-hidden`,`true`),e.setAttribute(`role`,`dialog`),e.setAttribute(`aria-modal`,`true`),e.style.setProperty(`--wui-modal-max-width`,`${ft.md}px`),e.innerHTML=`<div class="modal-dialog modal-dialog-centered wui-rb-dialog"><div class="modal-content wui-modal wui-confirm"><div class="wui-modal-body"><div class="wui-confirm-content"><span class="wui-confirm-icon"><wui-status-icon tone="info" size="120"></wui-status-icon></span><h3 class="wui-confirm-title" tabindex="-1" data-autofocus></h3><p class="wui-confirm-msg"></p></div></div><div class="wui-modal-footer"><div class="wui-confirm-actions"><button type="button" class="btn btn-secondary" data-bs-dismiss="modal">${bi(N.cancelLabel)}</button><button type="button" class="btn btn-primary" data-app-confirm></button></div></div></div></div>`,document.body.appendChild(e),e)}function Ci(e,t){let n=e.getAttribute(`data-wui-confirm-tone`);if(n!==null&&!A.includes(n))throw TypeError(`data-wui-confirm-tone="${n}" is not supported. Use danger, or leave it off.`);wi({title:e.getAttribute(`data-wui-confirm-title`),message:e.getAttribute(`data-wui-confirm`),label:e.getAttribute(`data-wui-confirm-label`),danger:n===`danger`},t)}function wi({title:e,message:t,label:n,danger:r},i){let a=xi(),o=Si(),s=o.querySelector(`.wui-confirm-title`),c=o.querySelector(`[data-app-confirm]`);if(!s||!c)throw Error(`#${k} is not a confirm dialog with a confirm button. Render <app-confirm-dialog id="${k}"> without confirm-href, or leave the dialog to the library.`);let l=o.querySelector(`.wui-confirm-msg`);l||(l=document.createElement(`p`),l.className=`wui-confirm-msg`,s.after(l)),s.textContent=e||N.confirmTitle,l.textContent=t,c.textContent=n||N.confirmLabel,c.classList.toggle(`btn-danger`,r),c.classList.toggle(`btn-primary`,!r),o.querySelector(`wui-status-icon`)?.setAttribute(`tone`,r?`delete`:`info`),o.setAttribute(`aria-label`,s.textContent),F=i,I=!1,a.getOrCreateInstance(o).show()}var R=(e,t)=>{P=e;try{t()}finally{P=null}};function Ti(e,{title:t,message:n,label:r,tone:i},a){if(i!=null&&!A.includes(i))throw TypeError(`confirmAction: tone "${i}" is not supported. Use danger, or leave it off.`);Bi(e.ownerDocument),wi({title:t,message:n,label:r,danger:i===`danger`},()=>R(e,a))}var Ei=e=>e.disabled===!0||e.getAttribute(`aria-disabled`)===`true`;function Di(e){let t=e.target.closest?.(`[data-wui-confirm]:not(form)`);!t||t===P||Ei(t)||(e.preventDefault(),e.stopImmediatePropagation(),Ci(t,()=>R(t,()=>t.click())))}function Oi(e){let t=e.target;if(!(t instanceof HTMLFormElement)||!t.hasAttribute(`data-wui-confirm`)||t===P||e.submitter&&e.submitter===P||t.querySelector(`input[data-app-repeater-hidden]`))return;e.preventDefault(),e.stopImmediatePropagation();let n=e.submitter?.form===t?e.submitter:void 0;Ci(t,()=>R(t,()=>t.requestSubmit(n)))}function ki(e){let t=e.target.closest?.(`#${k} [data-app-confirm]`);!t||t.disabled||!F||(I=!0,xi().getOrCreateInstance(t.closest(`#${k}`)).hide())}function Ai(e){if(e.target.id!==`wuiConfirm`)return;let t=I?F:null;F=null,I=!1,t?.()}var ji=(e,t)=>{e&&window.sessionStorage.setItem(M,JSON.stringify({message:e,variant:t}))},Mi=e=>e===`forbidden`?N.forbidden:e===`network`?N.network:N.failed;function Ni(){for(let e of document.querySelectorAll(`[data-wui-server]`))e.dataset.refreshOnSuccess!==`false`&&tt(e)?.reload()}async function Pi(e){let t=e.getAttribute(`data-wui-post`);if(!t)throw Error(`A data-wui-post button needs the URL the action posts to.`);return Fi(t,e)}async function Fi(e,t,n){let r=t.getAttribute(`data-wui-post-reload`);if(r!==null&&r!==`page`)throw TypeError(`data-wui-post-reload="${r}" is not supported. Use page, or leave it off to reload the server tables.`);t.disabled=!0,t.setAttribute(`aria-busy`,`true`);let i=await C(e,{method:`POST`,body:n});if(i.kind===`session`||i.kind===`aborted`)return;let a=i.toastVariant||`success`;if(i.ok&&(i.redirect||r===`page`)){ji(i.message,a),i.redirect?window.location.assign(i.redirect):window.location.reload();return}if(t.disabled=!1,t.removeAttribute(`aria-busy`),i.ok){rt(i,a),Ni();return}L(i.message||Mi(i.kind),`danger`)}function Ii(e){let t=e.target.closest?.(`[data-wui-post]`);t&&(e.preventDefault(),!(Ei(t)||t.getAttribute(`aria-busy`)===`true`)&&Pi(t).catch(e=>_(e)))}function Li(e){let t=e.target.closest?.(`form[data-wui-post-form]`);if(!t||e.defaultPrevented)return;e.preventDefault();let n=e.submitter||t.querySelector(`button`);n.getAttribute(`aria-busy`)!==`true`&&(Fi(t.getAttribute(`action`),n,new FormData(t)).catch(e=>_(e)),window.bootstrap?.Dropdown?.getInstance(t.closest(`.dropdown`)?.querySelector(`[data-bs-toggle='dropdown']`))?.hide())}function Ri(){let e=window.sessionStorage.getItem(M);if(!e)return;window.sessionStorage.removeItem(M);let{message:t,variant:n}=JSON.parse(e);L(t,n)}function zi(e){let t=e.querySelectorAll?[...e.querySelectorAll(`[data-wui-flash]`)]:[];e instanceof Element&&e.matches(`[data-wui-flash]`)&&t.unshift(e);for(let e of t){let t=e.getAttribute(`data-wui-flash-variant`)||`success`;if(!j.includes(t))throw TypeError(`data-wui-flash-variant="${t}" is not supported. Use ${j.join(`, `)}.`);let n=e.getAttribute(`data-wui-flash`)||e.textContent.trim();e.remove(),L(n,t)}}function Bi(e){yi.has(e)||(yi.add(e),e.addEventListener(`click`,ki),e.addEventListener(`hidden.bs.modal`,Ai))}function Vi(e=document){let t=e.ownerDocument||e;vi.has(t)||(vi.add(t),t.addEventListener(`click`,Di,!0),t.addEventListener(`submit`,Oi,!0),Bi(t),t.addEventListener(`click`,Ii),t.addEventListener(`submit`,Li),Ri()),zi(e)}var z=Object.freeze({title:`Leave without saving?`,message:`Your changes on this page are not saved. If you leave now, they are lost.`,leaveLabel:`Leave`}),B=`form[data-wui-unsaved]`,Hi=`[aria-invalid="true"], .field-error:not(:empty), .field-validation-error, .validation-summary-errors, .wui-error-summary`,Ui=`[download], [data-wui-modal], [data-wui-post], [data-bs-toggle]`,Wi=new Set([`submit`,`button`,`reset`,`image`]),Gi=new Set([`hidden`,`checkbox`,`radio`,`file`,`submit`,`button`,`reset`,`image`,`range`,`color`]),V=new WeakMap,Ki=new WeakSet,qi=e=>`${e.name}:${e.size}:${e.lastModified}`;function H(e){let t=[];for(let n of e.elements)!n.name||n.disabled||Wi.has(n.type)||(n.type===`checkbox`||n.type===`radio`?t.push([n.name,n.value,n.checked]):n.type===`file`?t.push([n.name,[...n.files||[]].map(qi)]):n.type===`select-multiple`?t.push([n.name,[...n.selectedOptions].map(e=>e.value)]):t.push([n.name,n.value]));return JSON.stringify(t)}function U(e){return H(e)}function Ji(e){for(let t of e.elements)if(!(!t.name||t.disabled)){if(t.tagName===`TEXTAREA`||t.tagName===`INPUT`&&!Gi.has(t.type)){if(t.value.trim()!==``)return!0}else if(t.tagName===`INPUT`&&t.type===`file`&&t.files?.length>0)return!0}return!1}var Yi=e=>({saved:e.querySelector(Hi)&&Ji(e)?null:H(e),engaged:!1,discarded:!1});function Xi(e){let t=V.get(e);return!t||t.discarded||!e.isConnected?!1:t.saved===null||t.engaged&&H(e)!==t.saved}var W=(e,t)=>[...e.querySelectorAll(B)].filter(e=>e!==t&&Xi(e)),Zi=()=>!!window.bootstrap?.Modal;function Qi(e,t,n){let r=t.map(e=>e.getAttribute(`data-wui-unsaved`)).find(Boolean)||z.message;Ti(e,{title:z.title,message:r,label:z.leaveLabel,tone:`danger`},()=>{for(let e of t)V.get(e).discarded=!0;n()})}function $i(e){if(e.matches(Ui))return!1;let t=e.getAttribute(`target`);if(t&&t.toLowerCase()!==`_self`)return!1;let n=new URL(e.getAttribute(`href`),window.location.href);if(n.protocol!==`http:`&&n.protocol!==`https:`)return!1;let r=window.location;return!(n.hash&&n.origin===r.origin&&n.pathname===r.pathname&&n.search===r.search)}function ea(e,t){if((t?.getAttribute(`formmethod`)||e.getAttribute(`method`)||`get`).toLowerCase()===`dialog`)return!1;let n=t?.getAttribute(`formtarget`)||e.getAttribute(`target`);return!n||n.toLowerCase()===`_self`}function ta(e){if(e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;let t=e.target.closest?.(`a[href]`);if(!t||!$i(t))return;let n=W(t.ownerDocument,null);!n.length||!Zi()||(e.preventDefault(),Qi(t,n,()=>t.click()))}function na(e){let t=e.target;if(!(t instanceof HTMLFormElement)||e.defaultPrevented||!ea(t,e.submitter))return;let n=W(t.ownerDocument,t);if(n.length&&Zi()){e.preventDefault();let r=e.submitter?.form===t?e.submitter:void 0;Qi(t,n,()=>t.requestSubmit(r));return}let r=V.get(t);r&&(r.saved=H(t),r.discarded=!1)}function ra(e){W(document,null).length&&(e.preventDefault(),e.returnValue=``)}function ia(e){let t=e.target.closest?.(B),n=t&&V.get(t);!n||n.engaged||(n.saved!==null&&(n.saved=H(t)),n.engaged=!0)}function aa(e){let t=e.target.closest?.(B),n=t&&V.get(t);n&&(n.discarded=!1,e.isTrusted&&(n.engaged=!0))}function oa(e){let t=e.detail?.handle?.el;if(t instanceof Element)for(let e of t.querySelectorAll(B))ca(e)}function sa(e=document){let t=e.ownerDocument||e;if(!Ki.has(t)){Ki.add(t);for(let e of[`focusin`,`pointerdown`,`drop`])t.addEventListener(e,ia,!0);for(let e of[`input`,`change`])t.addEventListener(e,aa,!0);t.addEventListener(`click`,ta),t.addEventListener(`submit`,na),t.addEventListener(`wui:modal:success`,oa),t.defaultView.addEventListener(`beforeunload`,ra)}let n=[...e.querySelectorAll?.(B)||[]];e.matches?.(B)&&n.unshift(e);for(let e of n)V.has(e)||V.set(e,Yi(e))}function ca(e){if(!(e instanceof HTMLFormElement)||!e.matches(B))throw TypeError(`resetUnsavedChanges: ${String(e)} is not a <form data-wui-unsaved>.`);V.set(e,{saved:H(e),engaged:!1,discarded:!1})}var G=Object.freeze({discard:`Discard`,keep:`Keep editing`}),la=`wui:drawer:discard`,K=`wui-drawer[confirm-discard]`,q=`.wui-modal-shell`,ua=`form[data-wui-confirm-discard]`,J=`.wui-drawer-discard`,da=`input, select, textarea`,Y=new WeakMap,fa=new WeakSet,pa=new WeakSet;function ma(e,t,n,r){let i=e.createElement(`button`);return i.type=`button`,i.className=t,i.setAttribute(n,``),i.textContent=r,i}function ha(e,t){let n=e.createElement(`div`);n.className=`wui-drawer-discard`,n.setAttribute(`role`,`alert`);let r=e.createElement(`span`);return r.className=`wui-drawer-discard-text`,r.textContent=t,n.append(r,ma(e,`btn btn-danger btn-sm`,`data-wui-discard-confirm`,G.discard),ma(e,`btn btn-secondary btn-sm`,`data-wui-discard-keep`,G.keep)),n}function ga(e){let t=e.closest?.(K);if(t)return t;let n=e.closest?.(q);return n&&(n.hasAttribute(`confirm-discard`)||n.querySelector(ua))?n:null}function _a(e){return e.closest(K)??e.closest(q)}function X(e){return e.matches(K)||e.hasAttribute(`confirm-discard`)?e.querySelectorAll(`form`):e.querySelectorAll(ua)}function va(e){let t=Y.get(e);return t!=null&&U(e)!==t}function ya(e){let t=e.ownerDocument.createElement(`div`);return t.className=`wui-drawer-footer`,e.querySelector(`.wui-drawer-panel`).append(t),pa.add(t),t}function ba(e){let t=e.ownerDocument.createElement(`div`);return t.className=`wui-modal-footer`,(e.querySelector(`.wui-modal-body`)?.parentElement??e.querySelector(`.modal-content`)??e).append(t),pa.add(t),t}function xa(e){e.querySelector(`[data-wui-discard-confirm]`).focus()}function Sa(e,t){let n=e.querySelector(J);if(n){xa(n);return}let r=ha(e.ownerDocument,t),i;if(e.matches(K))i=e.querySelector(`.wui-drawer-footer`)??ya(e),i.prepend(r);else if(e.hasAttribute(`confirm-discard`))i=e.querySelector(`.wui-modal-footer`)??ba(e),i.prepend(r);else{let t=e.querySelector(ua);i=t.querySelector(`.modal-footer`),i?i.prepend(r):(i=t,t.append(r))}i.classList.add(`wui-drawer-discarding`),xa(r)}function Ca(e){let t=e.parentElement;e.remove(),t.classList.remove(`wui-drawer-discarding`),pa.has(t)&&t.remove()}function wa(e){for(let t of X(e)){let e=[...t.querySelectorAll(da)].find(e=>e.type!==`hidden`&&!e.disabled);if(e){e.focus();return}}}function Ta(e){let t=ga(e.target);if(t)for(let e of X(t))Y.get(e)??Y.set(e,U(e))}function Ea(e){let t=e.target;!(t instanceof HTMLFormElement)||!ga(t)||Y.set(t,U(t))}function Da(e){let t=e.detail?.handle?.el;if(t instanceof Element)for(let e of t.querySelectorAll(`form`))Y.delete(e)}function Oa(e){let t=e.target;!(t instanceof Element)||!t.matches(K)||[...X(t)].some(va)&&(e.preventDefault(),Sa(t,t.getAttribute(`confirm-discard`)))}function ka(e){let t=e.target;if(!(t instanceof Element)||!t.matches(q))return;let n=[...X(t)].find(va);n&&(e.preventDefault(),Sa(t,t.getAttribute(`confirm-discard`)??n.getAttribute(`data-wui-confirm-discard`)))}function Aa(e){let t=e.closest(`wui-drawer`);if(t){t.dispatchEvent(new CustomEvent(`wui-drawer-close`,{bubbles:!0,cancelable:!0}))&&t.hide();return}let n=e.closest(q);n&&window.bootstrap?.Modal?.getInstance(n)?.hide()}function ja(e){let t=e.closest(J),n=_a(t);Ca(t);for(let e of X(n))Y.set(e,U(e));n.dispatchEvent(new CustomEvent(la,{bubbles:!0})),n.matches(K)?n.hide():window.bootstrap.Modal.getInstance(n).hide()}function Ma(e){let t=e.closest(J),n=_a(t);Ca(t),wa(n)}function Na(e){let t=e.target,n=t.closest?.(`[data-wui-discard-confirm]`);if(n){ja(n);return}let r=t.closest?.(`[data-wui-discard-keep]`);if(r){Ma(r);return}let i=t.closest?.(`[data-wui-dismiss]`);i&&Aa(i)}function Pa(e){if(e.key!==`Escape`)return;let t=e.currentTarget.querySelector(J);if(!t)return;e.preventDefault(),e.stopPropagation();let n=_a(t);Ca(t),wa(n)}function Fa(e=document){let t=e.ownerDocument||e;fa.has(t)||(fa.add(t),t.addEventListener(`focusin`,Ta),t.addEventListener(`pointerdown`,Ta),t.addEventListener(`submit`,Ea),t.addEventListener(`wui:modal:success`,Da),t.addEventListener(`wui:modal:loaded`,Da),t.addEventListener(`wui-drawer-close`,Oa,!0),t.addEventListener(`hide.bs.modal`,ka),t.addEventListener(`click`,Na),t.addEventListener(`keydown`,Pa,!0))}var Ia=`data-wui-bulk-in-bar`,La=`[data-wui-page-header-bar][data-wui-bulk-for]`,Ra=new WeakSet;function za(e){return`${x(e,{decimals:0})} selected`}function Ba(e,t){for(let n of e.querySelectorAll(`[data-wui-bar-swap]`))n.hidden=t>0;let n=e.querySelector(`[data-wui-bar-bulk]`);n&&(n.hidden=t===0,n.querySelector(`.page-header-bar-bulk-count`).textContent=t>0?za(t):``)}function Va(e=document){for(let t of e.querySelectorAll(La))document.getElementById(t.dataset.wuiBulkFor)?.setAttribute(Ia,``);Ra.has(document)||(Ra.add(document),document.addEventListener(`selectionchange`,e=>{if(typeof e.detail?.selected==`number`)for(let t of document.querySelectorAll(La))document.getElementById(t.dataset.wuiBulkFor)?.contains(e.target)&&Ba(t,e.detail.selected)}))}var Ha=31536e3,Z=new WeakMap,Q=e=>e>99?`99+`:String(e);function Ua(e,t,n=document){try{n.cookie=`${e}=${t?`1`:`0`}; Path=/; Max-Age=${Ha}; SameSite=Lax`}catch(e){if(!(e instanceof DOMException&&e.name===`SecurityError`))throw e}}var Wa=e=>{let t=document.createElement(`template`);return t.innerHTML=e,t.content},$=(e,t)=>{let n=document.createElement(`div`);return n.className=e,n.textContent=t,n};function Ga(e,t){let n=e.querySelector(`.wui-bell-trigger`),r=e.querySelector(`.wui-bell-count`),i=e.querySelector(`[data-wui-bell-live]`),a=e.querySelector(`[data-wui-bell-list]`),o=e.querySelector(`.wui-bell-menu`),{src:s,readAction:c}=e.dataset,l=e.dataset.label||`Notifications`,u=e.dataset.emptyText||`You are all caught up.`,d=Number(e.dataset.pollSeconds??60),f=w(),p=Number(e.dataset.unread)||0,m=(t,a=!0)=>{let o=Math.max(0,Number(t)||0),s=o!==p;p=o,e.dataset.unread=String(o),r&&(r.textContent=Q(o),r.hidden=o===0),n?.setAttribute(`aria-label`,o===0?l:`${l}, ${Q(o)} unread`),a&&s&&i&&(i.textContent=o===0?`No unread notifications`:`${Q(o)} unread notifications`)},h=()=>o?.classList.contains(`show`)??!1,g=()=>{let e=$(`wui-bell-state`,`Could not load notifications. `),t=document.createElement(`button`);t.type=`button`,t.className=`btn btn-link btn-sm`,t.dataset.wuiBellRetry=``,t.textContent=`Retry`,e.append(t),a.replaceChildren(e)},_=async t=>{t&&(a.setAttribute(`aria-busy`,`true`),a.querySelector(`.wui-bell-item`)||a.replaceChildren($(`wui-bell-state`,`Loading…`)));let n=await f.run(s);if(n.kind===`aborted`||n.kind===`stale`||n.kind===`session`)return;if(a.removeAttribute(`aria-busy`),!n.ok){t&&g();return}let r=Wa(n.html),i=r.querySelector(`[data-wui-unread]`),o=i?Number(i.getAttribute(`data-wui-unread`)):p;m(o),(t||h())&&(r.querySelector(`.wui-bell-item`)?a.replaceChildren(r):a.replaceChildren($(`wui-bell-state`,u))),e.dispatchEvent(new CustomEvent(`wui:notifications:loaded`,{bubbles:!0,detail:{unread:o}}))};e.addEventListener(`show.bs.dropdown`,()=>_(!0)),e.addEventListener(`click`,async e=>{if(e.target.closest(`[data-wui-bell-retry]`)){_(!0);return}let t=e.target.closest(`[data-wui-bell-read]`);if(!t||!c)return;t.disabled=!0;let n=await C(c,{method:`POST`});t.disabled=!1,n.ok&&(m(0),_(!0))});let v=null,y=()=>{d>0&&v===null&&(v=setInterval(()=>_(h()),d*1e3))},b=()=>{v!==null&&clearInterval(v),v=null},x=()=>{document.hidden?b():(_(h()),y())};return d>0&&(document.addEventListener(`visibilitychange`,x),document.hidden||y()),t.push(()=>{b(),f.abort(),document.removeEventListener(`visibilitychange`,x)}),{setUnread:e=>m(e),refresh:()=>_(h())}}var Ka=e=>!!e&&(e.isContentEditable||/^(INPUT|TEXTAREA|SELECT)$/.test(e.tagName)),qa=(e,t,n)=>`${e}${e.includes(`?`)?`&`:`?`}${encodeURIComponent(t)}=${encodeURIComponent(n)}`;function Ja(e,t){let n=e.querySelector(`input.search-input`),r=e.querySelector(`.wui-topsearch-results`),i=e.querySelector(`.wui-topsearch-open`),a=e.querySelector(`[data-wui-topsearch-live]`),{src:o,param:s=`q`,resultsHref:c}=e.dataset,l=Number(e.dataset.minChars??2),u=Number(e.dataset.debounceMs??250),d=w(),f=null,p=-1,m=()=>[...r.querySelectorAll(`.wui-topsearch-hit`)],h=e=>{let t=m();p=t.length===0?-1:(e+t.length)%t.length,t.forEach((e,t)=>{let n=t===p;e.classList.toggle(`is-active`,n),e.setAttribute(`aria-selected`,n?`true`:`false`)}),p>=0?(n.setAttribute(`aria-activedescendant`,t[p].id),t[p].scrollIntoView?.({block:`nearest`})):n.removeAttribute(`aria-activedescendant`)},g=()=>{r.hidden=!0,n.setAttribute(`aria-expanded`,`false`),n.removeAttribute(`aria-activedescendant`),p=-1},_=()=>{r.hidden=!1,n.setAttribute(`aria-expanded`,`true`)},v=t=>{e.classList.toggle(`is-open`,t),i?.setAttribute(`aria-expanded`,t?`true`:`false`)},y=t=>{let n=new CustomEvent(`wui:search:select`,{bubbles:!0,cancelable:!0,detail:{href:t}});e.dispatchEvent(n)&&window.location.assign(t)},b=async t=>{e.classList.add(`is-loading`);let n=await d.run(qa(o,s,t));if(!(n.kind===`aborted`||n.kind===`stale`||n.kind===`session`)){if(e.classList.remove(`is-loading`),n.ok){let e=Wa(n.html),t=e.querySelector(`[data-wui-count]`);r.replaceChildren(e),m().forEach((e,t)=>{e.id=`${r.id}-opt-${t}`});let i=t?Number(t.getAttribute(`data-wui-count`)):m().length;a&&(a.textContent=i===0?`No results`:`${i} ${i===1?`result`:`results`}`)}else r.replaceChildren($(`wui-topsearch-empty`,`Search is unavailable right now.`));p=-1,_()}};n.addEventListener(`input`,()=>{clearTimeout(f);let t=n.value.trim();if(t.length<l){d.abort(),e.classList.remove(`is-loading`),r.replaceChildren(),g();return}f=setTimeout(()=>b(t),u)}),n.addEventListener(`keydown`,t=>{if(t.key===`ArrowDown`||t.key===`ArrowUp`){if(r.hidden||m().length===0)return;t.preventDefault(),h(p+(t.key===`ArrowDown`?1:-1))}else if(t.key===`Enter`){let e=m();!r.hidden&&p>=0&&e[p]?(t.preventDefault(),y(e[p].getAttribute(`href`))):c&&n.value.trim()!==``&&(t.preventDefault(),y(qa(c,s,n.value.trim())))}else t.key===`Escape`&&(r.hidden?e.classList.contains(`is-open`)&&(t.preventDefault(),t.stopPropagation(),v(!1),i?.focus()):(t.preventDefault(),t.stopPropagation(),g()))}),r.addEventListener(`click`,e=>{let t=e.target.closest(`.wui-topsearch-hit`);!t||e.ctrlKey||e.metaKey||e.shiftKey||e.button===1||(e.preventDefault(),y(t.getAttribute(`href`)))}),i?.addEventListener(`click`,()=>{let t=!e.classList.contains(`is-open`);v(t),t&&n.focus()});let x=e=>{e.key!==`/`||e.ctrlKey||e.metaKey||e.altKey||Ka(e.target)||(e.preventDefault(),v(!0),n.focus())},S=t=>{e.contains(t.target)||(g(),e.classList.contains(`is-open`)&&v(!1))};document.addEventListener(`keydown`,x),document.addEventListener(`pointerdown`,S),t.push(()=>{clearTimeout(f),d.abort(),document.removeEventListener(`keydown`,x),document.removeEventListener(`pointerdown`,S)})}function Ya(e){let t=[],n=e.dataset.wuiCollapsedCookie;n&&e.addEventListener(`wui:shell:collapse`,e=>Ua(n,!!e.detail?.collapsed)),e.addEventListener(`click`,t=>{t.target.closest(`[data-wui-tabbar-more]`)&&e.querySelector(`[data-app-shell-menu]`)?.click()});let r=e.querySelector(`[data-wui-bell]`),i=r?Ga(r,t):null,a=e.querySelector(`[data-wui-topsearch]`);a&&Ja(a,t);let o={el:e,setUnread(e){if(!i)throw Error(`WUI.shell: this <app-shell> has no <app-shell-notifications>.`);i.setUnread(e)},refreshNotifications(){if(!i)throw Error(`WUI.shell: this <app-shell> has no <app-shell-notifications>.`);return i.refresh()},get collapsed(){return e.classList.contains(`collapsed`)},set collapsed(t){if(!!t===e.classList.contains(`collapsed`))return;let n=e.querySelector(`[data-app-shell-collapse]`);n?n.click():e.classList.toggle(`collapsed`,!!t)}};Z.set(e,o);let s=n=>{if(n.target===e||n.target.contains?.(e)){for(let e of t)e();Z.delete(e),delete e.dataset.wuiPartsWired,document.removeEventListener(`wui:teardown`,s)}};return document.addEventListener(`wui:teardown`,s),o}function Xa(e=document){let t=[];e instanceof Element&&e.matches(`[data-app-shell]`)&&t.push(e),t.push(...e.querySelectorAll(`[data-app-shell]`));for(let e of t)e.dataset.wuiPartsWired||(e.dataset.wuiPartsWired=`1`,Ya(e))}function Za(e){let t=e?.closest?.(`[data-app-shell]`)??null;return t?(Z.has(t)||Xa(t),Z.get(t)??null):null}function Qa(){h(),e(`wui-select`,Jt),e(`wui-country-select`,Yt),e(`wui-phone`,In),e(`wui-datepicker`,Zt),e(`wui-date-range`,Qt),e(`wui-dock`,$t),e(`wui-image-crop`,nn),e(`wui-kanban`,ht),e(`wui-inline-edit`,an),e(`wui-consent-banner`,Kt),e(`wui-slider`,Kn),e(`wui-sortable`,qn),e(`wui-timepicker`,Yn),e(`wui-tour`,Zn),e(`wui-tree`,Qn),e(`wui-autocomplete`,Ft),e(`wui-command-palette`,Vt),e(`wui-context-menu`,qt),e(`wui-multiselect`,Sn),e(`wui-taginput`,Jn),e(`wui-otp`,Pn),e(`wui-status-icon`,Mt),e(`wui-shortcuts`,Wn),e(`wui-record-pager`,Rn),e(`wui-carousel`,It),e(`wui-code-block`,Lt),e(`wui-markdown`,un),e(`wui-data-table`,Xt),e(`wui-drawer`,en),e(`wui-hover-card`,tn),e(`wui-lightbox`,ln),e(`wui-menubar`,xn),e(`wui-navigation-menu`,Cn),e(`wui-notification-center`,Mn),e(`wui-onboarding-checklist`,Nn),e(`wui-overflow`,Fn),e(`wui-rating`,Ln),e(`wui-relative-time`,Vn),e(`wui-resizable`,Hn),e(`wui-rolling-number`,Un),e(`wui-show-more`,Gn),e(`wui-truncate`,$n),e(`wui-whats-new`,er),e(`wui-mention-input`,pn),e(`wui-comment-thread`,Ht),e(`wui-wizard-step`,rr),e(`wui-wizard`,nr)}Qa();export{xr as AVATAR_ACCEPT,ir as AVATAR_MAX_SIZE_MB,Lr as AVATAR_OUTPUT_SIZE,ri as AVATAR_OUTPUT_TYPE,Jr as AVATAR_PREVIEW_SIZES,ei as AVATAR_TEXT,Ia as BAR_BULK_IN_BAR_ATTRIBUTE,Ie as COLUMN_MAX_WIDTH,je as COLUMN_MIN_WIDTH,Gt as COMMENT_INTENTS,Ut as COMMENT_REACTIONS,Wt as COMMENT_TEXT,k as CONFIRM_DIALOG_ID,A as CONFIRM_TONES,zt as COPY_FEEDBACK_MS,ot as CSRF_META_NAME,ce as CURRENCIES,Pe as DATA_TABLE_TEXT,re as DATE_PATTERNS,nt as DEFAULT_CSRF_HEADER,Tr as DEFAULT_IMAGE_ACCEPT,Dr as DEFAULT_MAX_SIZE_MB,yr as DEFAULT_PASSWORD_RULES,Wr as DEFAULT_REQUIREMENTS_TITLE,ni as DEFAULT_THEME_EFFECT,qr as DEFAULT_THEME_STORAGE_KEY,la as DISCARD_EVENT,G as DISCARD_TEXT,si as DROP_OVER_CLASS,oe as DURATION_UNITS,ee as EMPTY_VALUE,g as FILTER_POPOVER_MAX_CHIPS,M as FLASH_STORAGE_KEY,j as FLASH_VARIANTS,v as FORMAT_STYLES,it as HTTP_KINDS,cn as INLINE_EDIT_SAVED_MS,on as INLINE_EDIT_TEXT,sn as INLINE_EDIT_TYPES,ie as IST_TIME_ZONE,Ot as KANBAN_DRAG_THRESHOLD_PX,Ct as KANBAN_LONG_PRESS_MS,Et as KANBAN_PHONE_QUERY,bt as KANBAN_STORAGE_PREFIX,pt as KANBAN_SUMMARY_FORMATS,wt as KANBAN_TEXT,Dt as KANBAN_TONES,p as LIST_KEYS,vr as MASK_INPUT_TYPES,br as MASK_NAMES,dn as MENTION_ID_PATTERN,yn as MENTION_MAX_QUERY,hn as MENTION_MAX_RESULTS,_n as MENTION_TEXT,se as MONEY_UNITS,jn as NOTIFICATION_COUNT_CAP,Dn as NOTIFICATION_TEXT,Ee as PIN_AT_VAR,ye as PIN_SIDES,Me as RESIZE_STEP,Fe as RESIZE_STEP_LARGE,Cr as ROW_DRAG_TYPE,sr as ROW_DROP_EVENT,xe as ROW_HEIGHTS,ke as ROW_MOVE_LIMIT,Le as ROW_MOVE_MS,Se as ROW_SAVE_ATTR,Ce as ROW_SAVE_ERROR_CLASS,Ne as ROW_SAVE_STATES,ai as SCROLL_EDGE_SELECTOR,ui as SEARCH_OPEN_KEY,Ze as SELECT_ALL_LABEL,Ke as SELECT_CELL_CLASS,c as SELECT_KEY,ct as SELECT_ROW_LABEL,N as SERVER_ACTION_TEXT,d as SHORTCUTS_OFF_ATTRIBUTE,a as SHORTCUT_EVENT,t as SHORTCUT_SCOPE_ATTRIBUTE,l as SHORTCUT_TEXT,Nt as STATUS_TONES,$r as THEME_BOOT_SCRIPT_BODY,Vr as THEME_CHANGE_EVENT,Mr as THEME_EFFECTS,Yr as THEME_EFFECT_DURATION,ti as THEME_MODES,Fr as THEME_SWITCHING_CLASS,et as TOAST_ACTION_METHODS,st as TOAST_ACTION_MS,z as UNSAVED_TEXT,Ae as VIRTUAL_OVERSCAN,tr as WHATS_NEW_READ_EVENT,$e as WUI_HEADERS,Ft as WuiAutocomplete,It as WuiCarousel,Lt as WuiCodeBlock,Vt as WuiCommandPalette,Ht as WuiCommentThread,Kt as WuiConsentBanner,qt as WuiContextMenu,Yt as WuiCountrySelect,Xt as WuiDataTable,Zt as WuiDatePicker,Qt as WuiDateRange,$t as WuiDock,en as WuiDrawer,tn as WuiHoverCard,nn as WuiImageCrop,an as WuiInlineEdit,ht as WuiKanban,ln as WuiLightbox,un as WuiMarkdown,pn as WuiMentionInput,xn as WuiMenubar,Sn as WuiMultiSelect,Cn as WuiNavigationMenu,Mn as WuiNotificationCenter,Nn as WuiOnboardingChecklist,Pn as WuiOtp,Fn as WuiOverflow,In as WuiPhone,Ln as WuiRating,Rn as WuiRecordPager,Vn as WuiRelativeTime,Hn as WuiResizable,Un as WuiRollingNumber,Jt as WuiSelect,Wn as WuiShortcuts,Gn as WuiShowMore,Kn as WuiSlider,qn as WuiSortable,Mt as WuiStatusIcon,Jn as WuiTagInput,Yn as WuiTimePicker,Zn as WuiTour,Qn as WuiTree,$n as WuiTruncate,er as WuiWhatsNew,nr as WuiWizard,rr as WuiWizardStep,dr as acceptLabel,dt as addRowSelectCells,Je as addSelectColumn,Ba as applyBarBulk,Gr as applyTheme,f as ariaKeyShortcuts,ur as attachInputMask,oi as attachRowDrag,ci as attachScrollEdges,ut as attachShiftRange,Hr as avatarCropOptions,Nr as avatarUnreadableMessage,za as barBulkCountText,ar as buildPasswordRules,Te as clampColumnWidth,qe as classifyStatus,O as collapseSearch,Ti as confirmAction,Rt as copyTextToClipboard,ha as createDiscardPrompt,Xn as createLocalSeenStore,w as createRequestQueue,We as createSelectHeaderCell,Ue as createSelectRowCell,lt as createSelectSpacerCell,Qa as defineWeborityElements,Ur as evaluatePassword,U as formValues,y as formatCompact,te as formatCurrency,le as formatDate,b as formatDuration,hr as formatFileSize,pr as formatMasked,x as formatNumber,ae as formatPercent,zn as formatRelativeTime,ne as formatValue,tt as getServerTable,Za as getShell,He as glyphSvg,we as groupCount,ve as groupItems,kn as groupNotificationsByDay,Re as identityCell,n as inShortcutScope,_i as initCollapsibleSearch,Fa as initDrawerDiscard,gr as initInputMasks,Va as initPageBarBulk,At as initRemoteModals,wr as initRowDrag,Pr as initScrollEdges,Vi as initServerActions,Qe as initServerTables,Xa as initShellParts,sa as initUnsavedChanges,rn as inlineEditText,Xr as isHeicFile,Qr as isImageFile,mr as isImageOnlyAccept,Sr as isMaskPattern,kr as isPdfFile,o as isTypingTarget,xt as kanbanCardLabel,kt as kanbanOverflow,gt as kanbanStorageKey,_t as kanbanSummaryFormat,Tt as kanbanVisibleLimit,jt as loadRemoteDrawer,mt as loadRemoteModal,li as maskedPostValue,Bt as matchSegments,Or as matchesAccept,Ve as measureRows,gn as mentionLabel,vn as mentionTextFromValue,fn as mentionValueFromText,mn as mentionedIds,m as moveFocus,ii as nextTheme,En as notificationCountText,wn as notificationDayHeading,On as notificationTime,An as notificationTriggerLabel,Tn as notificationUnreadAnnouncement,D as openSearch,bn as parseMentionValue,Ye as parseToastAction,_r as passwordSatisfies,be as pinAtValue,Be as pinClasses,ge as pinOffsetVar,de as planPins,ze as playRowMoves,or as postedMasked,Er as rawMasked,_e as readColumnWidths,at as readCsrf,St as readKanbanCollapsed,Ir as readStoredTheme,Bn as relativeTimeTitle,ca as resetUnsavedChanges,fr as resolveMask,Rr as resolveTheme,pe as rowLabel,fe as rowOrderChanged,r as runShortcut,Xe as runToastAction,he as saveOutcomeText,Oe as setRowSaveState,ue as settledRows,i as shortcutKey,u as shortcutName,s as shortcutsOff,rt as showResultToast,Zr as storeTheme,yt as sumKanbanValues,Ge as syncSelectAll,lr as syncTargets,Kr as themeBootScript,Br as themeKeyframes,cr as tickedKeys,S as toInstant,zr as transitionTheme,Ar as validateFile,De as virtualRange,jr as watchSystemTheme,Pt as withTrustedLabel,me as writeColumnWidths,vt as writeKanbanCollapsed,C as wuiFetch};
@@ -1 +1 @@
1
- (function(){function e(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 e of Object.keys(r)){let i=Object.getOwnPropertyDescriptor(t.prototype,e);i&&(i.set||i.get)&&(n.push([r,e,r[e]]),delete r[e])}customElements.define(e,t);for(let[e,t,r]of n)e[t]=r}var t=typeof HTMLElement>`u`?class{}:HTMLElement;function n(e,t){r(e),e._reanchor=t,e._reanchorScroll=n=>{n.target instanceof Node&&typeof e.contains==`function`&&e.contains(n.target)||t()},window.addEventListener(`resize`,e._reanchor),window.addEventListener(`scroll`,e._reanchorScroll,!0)}function r(e){e?._reanchor&&(window.removeEventListener(`resize`,e._reanchor),window.removeEventListener(`scroll`,e._reanchorScroll,!0),e._reanchor=null,e._reanchorScroll=null)}var i=`data-advance`,a=`wui-tour-hint`,o=`Click {actionName} to continue.`,s=`a[href], button, input, select, textarea, summary, [tabindex], [contenteditable]`,c=(e,t)=>e?.advanceOn===`click`&&!!t,l=e=>(e??``).replace(/\s+/g,` `).trim();function u(e){let t=e.ownerDocument,n=(e.getAttribute(`aria-labelledby`)||``).split(/\s+/).filter(Boolean),r=e.tagName===`INPUT`&&/^(button|submit|reset)$/.test(e.type)?e.value:``,i=[n.map(e=>t.getElementById(e)?.textContent??``).join(` `),e.getAttribute(`aria-label`),Array.from(e.labels??[],e=>e.textContent).join(` `),e.getAttribute(`alt`),r,e.textContent,e.getAttribute(`title`)];for(let e of i){let t=l(e);if(t)return t}return``}function d(e){for(let t of[e,...e.querySelectorAll(s)])if(t.tabIndex>=0&&!t.disabled)return t;return null}function f(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 p(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&&f(e,i,!1);return}n||(n=e.ownerDocument.createElement(`p`),n.className=a,i&&(n.id=i),e.querySelector(`.wui-tour-actions`).before(n)),n.textContent=t,i&&f(e,i,!0)}var m=e=>getComputedStyle(e).animationName;function h(e,{layer:t,spot:n,card:r},a,s){let d=c(a,s);t.toggleAttribute(i,d&&!(t.getRootNode()instanceof ShadowRoot)),n.hasAttribute(i)&&(n.removeAttribute(i),d&&m(n)),d&&n.setAttribute(i,``);let f=r.querySelector(`.wui-tour-next`);f.classList.toggle(`btn-primary`,!d),f.classList.toggle(`btn-link`,d);let h=d?l(a.actionLabel)||u(s):``,g=e.getAttribute(`advance-label`)||o,_=h?g.replace(/\{actionName\}/g,()=>h):``;return p(r,_),_}function g(e,t,n){if(!c(e,t))return()=>{};let r=null,i=()=>{r??=setTimeout(n,0)};return t.addEventListener(`click`,i),()=>{t.removeEventListener(`click`,i),clearTimeout(r)}}function _(e,t,n,r){return e.contains(r)||c(t,n)&&n.contains(r)}function ee(e,{card:t,active:n,step:r,target:i}){let a=Array.from(t.querySelectorAll(`button`)).filter(e=>!e.hidden),o=c(r,i)?d(i):null;o&&a.push(o);let s=a.findIndex(e=>e===n||e===o&&i.contains(n));e.preventDefault(),a[s===-1?e.shiftKey?a.length-1:0:(s+(e.shiftKey?-1:1)+a.length)%a.length].focus()}var te=2/3,ne=1e3,re=new Set([`top`,`left`,`width`,`height`]),v=new WeakMap,y=(e,t)=>typeof e.getAnimations==`function`?e.getAnimations().filter(t):[],b=e=>e.transitionProperty===`opacity`,ie=e=>re.has(e.transitionProperty),x=e=>typeof e.animationName==`string`&&e.animationName.startsWith(`wui-tour-`);function S(e){return e.length===0?null:new Promise(t=>{let n=setTimeout(t,ne);Promise.allSettled(e.map(e=>e.finished)).then(()=>{clearTimeout(n),t()})})}function ae(e){let t=e.parentElement?.querySelector(`:scope > .wui-tour-spot`),n=0;for(let e of t?y(t,ie):[]){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*te-r)}return n}function C(e){let t=ae(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={};v.set(e,n);let r=()=>{v.get(e)===n&&e.dataset.state===`entering`&&(e.dataset.state=`shown`)},i=y(e,x);i.length===0?r():Promise.allSettled(i.map(e=>e.finished)).then(r)}function w(e){return e.dataset.state=`leaving`,S(y(e,b))}function oe(e){let t=e.classList.contains(`wui-tour-layer`)?e:e.shadowRoot?.querySelector(`.wui-tour-layer`);t&&(t.dataset.state=`leaving`);let n=t?S(y(t,b)):null;if(!n){e.remove();return}e.setAttribute(`inert`,``),n.then(()=>e.remove())}var T=2,E=12,D=8,O=4,k=20,se=`(max-width: 575.98px)`,ce=[`bottom`,`top`,`right`,`left`],A=[`top-left`,`top-right`,`bottom-right`,`bottom-left`],j,M=(e,t,n)=>Math.max(t,Math.min(e,n)),N=(e,t,n,r)=>(Math.max(e,n)+Math.min(t,r))/2;function le(e,t){if(!t?.scrollIntoView)return;e.style.maxHeight=``;let n=z(e),r=e.offsetHeight+E;if(t.getBoundingClientRect().height+T*2+r*2<=n.bottom-n.top){t.scrollIntoView({block:`center`,inline:`nearest`});return}let i=t.style.scrollMarginTop;t.style.scrollMarginTop=`${n.top+r+T}px`,t.scrollIntoView({block:`start`,inline:`nearest`}),t.style.scrollMarginTop=i}function P(e,t,n){let r=e.style,i=t.style,a=B(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 A)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`,F(r,n);let s=t.scrollTop;i.maxHeight=``;let c={width:t.offsetWidth,height:t.offsetHeight},l=z(t),u=l.bottom-l.top,d={bottom:l.bottom-o.bottom-E,top:o.top-E-l.top,right:l.right-o.right-E,left:o.left-E-l.left},f=window.matchMedia(se).matches,p=ce.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+D)-Math.max(o.top,l.top-D);p?I(t,a,p,o,l,c):m>=Math.min(c.height,u)+O*2?L(t,a,o,l,c):R(t,a,d.bottom>=d.top?`bottom`:`top`,o,l,c,d),t.scrollTop=s}function F(e,t){j??=CSS.supports(`corner-top-left-shape`,`squircle`);let n=getComputedStyle(t);for(let t of A)e.setProperty(`border-${t}-radius`,n.getPropertyValue(`border-${t}-radius`)),j&&e.setProperty(`corner-${t}-shape`,n.getPropertyValue(`corner-${t}-shape`))}function I(e,t,n,r,i,a){let o=n===`top`||n===`bottom`,s,c,l;if(o){let e=N(r.left,r.right,i.left,i.right);s=M(e-a.width/2,i.left,i.right-a.width),c=n===`bottom`?r.bottom+E:r.top-E-a.height,l=M(e-s,k,a.width-k)}else{let e=N(r.top,r.bottom,i.top,i.bottom);c=M(e-a.height/2,i.top,i.bottom-a.height),s=n===`right`?r.right+E:r.left-E-a.width,l=M(e-c,k,a.height-k)}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 L(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)-O;e.style.top=`${Math.max(r.top,o-Math.min(i.height,a))}px`,e.style.left=`${M(n.left+O,r.left,r.right-i.width)}px`}function R(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+E:r.top-E-c}px`;let l=N(r.left,r.right,i.left,i.right);e.style.left=`${M(l-a.width/2,i.left,i.right-a.width)}px`}function z(e){let t=e.parentElement,n=t?getComputedStyle(t):null,r=e=>Number.parseFloat(n?.[e])||0;return{top:r(`paddingTop`)+D,bottom:window.innerHeight-r(`paddingBottom`)-D,left:r(`paddingLeft`)+D,right:window.innerWidth-r(`paddingRight`)-D}}function B(e){let t=e.querySelector(`:scope > .wui-tour-arrow`);return t||(t=document.createElement(`span`),t.className=`wui-tour-arrow`,t.setAttribute(`aria-hidden`,`true`),t.hidden=!0,e.append(t)),t}var V=0;function H(e,t,n){let r=`wui-tour-end-${++V}`,i=e.createElement(`div`);return i.className=`wui-tour-card wui-tour-end`,i.dataset.layout=`center`,i.setAttribute(`role`,`dialog`),n&&i.setAttribute(`aria-modal`,`true`),i.tabIndex=-1,i.setAttribute(`aria-labelledby`,`${r}-title`),i.setAttribute(`aria-describedby`,`${r}-message`),i.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"><button type="button" class="btn btn-sm btn-primary wui-tour-end-button"></button></div>`,i.querySelector(`.wui-tour-end-title`).textContent=t.title,i.querySelector(`.wui-tour-end-message`).textContent=t.message,i.querySelector(`.wui-tour-end-button`).textContent=t.button,i}function U(e,t,n){let r=e.ownerDocument,i=e.getRootNode()===r,a=e.querySelector(`.wui-tour-card:not(.wui-tour-end)`),o=e.querySelector(`.wui-tour-spot`),s=e.querySelector(`[role=status]`),c=H(r,t,i),l=c.querySelector(`.wui-tour-end-button`),u=new AbortController;return new Promise(d=>{let f=()=>{u.abort(),d()};if(n?.aborted){f();return}let p={signal:u.signal};n?.addEventListener(`abort`,f,p),l.addEventListener(`click`,f,p),r.addEventListener(`keydown`,e=>{e.altKey||e.ctrlKey||e.metaKey||(e.key===`Escape`?(e.preventDefault(),e.stopPropagation(),f()):e.key===`Tab`&&i&&(e.preventDefault(),l.focus()))},{capture:!0,signal:u.signal}),i&&r.addEventListener(`focusin`,e=>{c.contains(e.target)||l.focus()},p);let m=()=>{u.signal.aborted||(a.hidden=!0,P(o,a,null),e.append(c),C(c),s.textContent=[t.title,t.message].filter(Boolean).join(`. `),l.focus())},h=w(a);h?h.then(m):m()})}var W=` :host { all: initial; ${Object.entries({"--wui-z-tour":`1550`,"--wui-radius-sm":`8px`,"--wui-radius-lg":`14px`,"--wui-shadow-overlay":`0 8px 28px -6px rgba(7, 20, 55, 0.14)`,"--wui-ease-out-quart":`cubic-bezier(0.22, 1, 0.36, 1)`,"--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-ink":`#4F46E5`,"--color-focus-ring":`#4F46E5`,"--wui-focus-ring-width":`2px`,"--wui-focus-ring-offset":`2px`,"--color-primary-text":`#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-primary-text); } .btn-primary:hover { background: var(--color-primary-hover); border-color: var(--color-primary-hover); } .btn-outline-secondary { border-color: var(--color-text-muted); color: var(--color-text-muted); } .btn-outline-secondary:hover { background: var(--color-bg-muted); color: var(--color-text); } .btn-link { font-weight: 400; color: var(--color-primary-ink); 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); } .wui-tour-spot { position: fixed; box-shadow: 0 0 0 2px var(--color-primary), 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-overlay); } .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 120ms linear; } .wui-tour-layer[data-state=leaving] { transition: opacity 120ms linear; } .wui-tour-card[data-state=entering] { animation: wui-tour-fade-in 120ms 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-media=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: 2px; } .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); } @keyframes wui-tour-pulse { from { box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-primary) 85%, transparent); } to { box-shadow: 0 0 0 14px color-mix(in srgb, var(--color-primary) 0%, transparent); } } @media (prefers-reduced-motion: no-preference) { .wui-tour-spot[data-advance]::after { content: ""; position: absolute; inset: 0; border-radius: inherit; corner-shape: inherit; pointer-events: none; animation: wui-tour-pulse 600ms var(--wui-ease-out-quart) var(--wui-tour-spot-duration); } } @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-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-button { min-width: 120px; } @media (prefers-reduced-motion: no-preference) { .wui-tour-end-mark path { animation: wui-tour-check 300ms var(--wui-ease-out-quart) calc(var(--wui-tour-card-delay, 0ms) + 120ms) both; } } `,G=`wui-tour-media`,ue=`wui-tour-media-toggle`,K=`http://www.w3.org/2000/svg`,de=`M6 5h4v14H6zM14 5h4v14h-4z`,fe=`M8 5v14l11-7z`,pe={pause:`Pause animation`,play:`Play animation`},me=()=>globalThis.matchMedia?.(`(prefers-reduced-motion: reduce)`)?.matches===!0;function he(e){let t=document.createElementNS(K,`svg`);t.setAttribute(`viewBox`,`0 0 24 24`),t.setAttribute(`aria-hidden`,`true`),t.setAttribute(`focusable`,`false`);let n=document.createElementNS(K,`path`);return n.setAttribute(`d`,e),t.appendChild(n),t}function ge(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 _e(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 ve(e,t){let n=document.createElement(`button`);n.type=`button`,n.className=ue;let r=(r=!e.paused)=>{n.setAttribute(`aria-label`,r?t.pause:t.play),n.replaceChildren(he(r?de:fe))};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 ye(e){let t=e.querySelector(`:scope > .${G}`);if(!t)return;let n=t.querySelector(`video`);n&&(n.pause(),n.removeAttribute(`src`),n.load()),t.remove()}function be(e,t,n=pe){if(ye(e),!t.media){e.removeAttribute(`data-media`);return}let r=document.createElement(`div`);if(r.className=G,t.mediaType===`video`){let e=_e(t,!me());r.append(e,ve(e,n))}else r.appendChild(ge(t));e.prepend(r),e.setAttribute(`data-media`,t.target?`step`:`welcome`)}var q=`data-wui-tour-open`,xe=`Step {current} of {total}`;function Se(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 Ce(e,t,n){return(e.getAttribute(`progress-label`)||xe).replace(/\{(current|total)\}/g,(e,r)=>String(r===`current`?t:n))}function we(e,{text:t,position:n,total:r}){let i=e.querySelector(`.wui-tour-position`);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;)a.lastElementChild.remove();for(let e=0;e<o.length;e++)o[e].toggleAttribute(`data-filled`,e<n)}var Te=`wui-tour-step`,Ee=`wui-tour-host`,De=`wui-tour-seen:`,J=`data-tracking`,Oe={back:`Back`,next:`Next`,skip:`Skip`,done:`Done`,mediaPause:`Pause animation`,mediaPlay:`Play animation`,endTitle:`You're all set`,endMessage:`You know your way around now. Enjoy exploring.`,endButton:`Done`},ke={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`},Ae=[[`media`,`media`],[`mediaAlt`,`media-alt`],[`mediaPoster`,`media-poster`],[`mediaType`,`media-type`],[`advanceOn`,`advance-on`],[`actionLabel`,`action-label`]],Y={index:null,position:null,total:null},X=0;function je(e=De,t=globalThis.localStorage){return{isSeen:async n=>t.getItem(e+n)===`1`,markSeen:async n=>{t.setItem(e+n,`1`)}}}var Z=e=>!e?.isConnected||getComputedStyle(e).visibility===`hidden`?!1:e.getClientRects().length>0,Q=e=>!!e&&(e.isContentEditable||/^(INPUT|TEXTAREA|SELECT)$/.test(e.tagName)),Me=()=>{let e=document.activeElement;for(;e?.shadowRoot?.activeElement;)e=e.shadowRoot.activeElement;return e},$=null;function Ne(e){$||($=new CSSStyleSheet,$.replaceSync(W)),e.adoptedStyleSheets=[$]}var Pe=class extends t{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 > ${Te}`),e=>{let t={target:e.getAttribute(`target`)||``,title:e.getAttribute(`title`)||void 0,description:e.textContent.trim()};for(let[n,r]of Ae)e.hasAttribute(r)&&(t[n]=e.getAttribute(r));return t})}_store(){return this.seenStore?this.seenStore:this.getAttribute(`seen-store`)===`local`?je():globalThis.window?.WUI?.tour?.seenStore||null}_label(e){return this.getAttribute(ke[e])||Oe[e]}_endDialogText(){return this.getAttribute(`end-dialog`)===`false`?null:{title:this._label(`endTitle`),message:this._label(`endMessage`),button:this._label(`endButton`)}}_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=Se(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&&!Z(document.querySelector(t.target))&&this._progress.drop(e);this._returnFocus=document.activeElement;let n=await this._locate(0,1,e);if(e===this._run){if(!n){this._finish(`noTargets`);return}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))}}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(await this._beforeStep(e,i),n!==this._run)return null;if(!e.target)return{index:i,target:null};let t=document.querySelector(e.target);if(Z(t))return this._progress.position(i),{index:i,target:t};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-${++X}`,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" aria-modal="true" 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="btn btn-sm btn-outline-secondary wui-tour-back"></button> <button type="button" class="btn btn-sm btn-primary wui-tour-next"></button> </div> </div> </div> <div class="visually-hidden" role="status" aria-live="polite"></div>`;let r=t;this._shadow=null,this.isolated&&(r=document.createElement(Ee),this._shadow=r.attachShadow({mode:`open`}),Ne(this._shadow),this._shadow.appendChild(t)),document.body.appendChild(r),document.documentElement.setAttribute(q,``),this._outer=r,this._layer=t,this._spot=t.querySelector(`.wui-tour-spot`),this._card=t.querySelector(`.wui-tour-card`),this._live=t.querySelector(`[role=status]`),this._card.querySelector(`.wui-tour-skip`).addEventListener(`click`,()=>this._close(`skipped`,`button`)),this._card.querySelector(`.wui-tour-back`).addEventListener(`click`,()=>this._move(-1)),this._card.querySelector(`.wui-tour-next`).addEventListener(`click`,()=>this._move(1)),this._shadow&&this._card.removeAttribute(`aria-modal`),this._onKey=e=>this._key(e),this._onFocusIn=e=>{if(!this._layer||this._ending)return;let t=this._current,n=t?this._steps[t.index]:null;_(this._layer,n,t?.target??null,e.target)||this._card.focus()},document.addEventListener(`keydown`,this._onKey,!0),this._shadow||document.addEventListener(`focusin`,this._onFocusIn),n(r,()=>this._follow())}_active(){return this._shadow?this._shadow.activeElement:document.activeElement}_show(e){this._current=e;let{index:t,target:n}=e,r=this._steps[t],i=this._card,a=this._progress.position(t),o=this._progress.total(),s=a===o&&!this._endDialogText(),c=Ce(this,a,o);we(i,{text:c,position:a,total:o}),be(i,r,{pause:this._label(`mediaPause`),play:this._label(`mediaPlay`)});let l=h(this,{layer:this._layer,spot:this._spot,card:i},r,n),u=i.querySelector(`.wui-tour-title`);u.textContent=r.title||``,u.hidden=!r.title,i.querySelector(`.wui-tour-text`).textContent=r.description||``,i.querySelector(`.wui-tour-skip`).textContent=this._label(`skip`),i.querySelector(`.wui-tour-back`).textContent=this._label(`back`),i.querySelector(`.wui-tour-back`).hidden=t<=this._firstIndex,i.querySelector(`.wui-tour-next`).textContent=this._label(s?`done`:`next`);let d=[c,r.title,r.description].filter(Boolean).join(`. `);this._live.textContent=l?[d,l].join(/[.!?]$/.test(d)?` `:`. `):d,le(i,n),this._spot.removeAttribute(J),this._place(),C(i),this._unbindAdvance?.(),this._unbindAdvance=g(r,n,()=>this._move(1));let f=this._active();(i.contains(f)?!f.hidden:this._shadow!==null&&Q(Me()))||i.focus(),this.dispatchEvent(new CustomEvent(`wui-tour:step`,{bubbles:!0,detail:{step:r,index:t,position:a,total:o}}))}_place(){!this._current||!this._layer||P(this._spot,this._card,this._current.target)}_follow(){if(!this._current||!this._layer||this._ending)return;let e=this._spot.style.cssText;this._place(),this._spot.style.cssText!==e&&this._spot.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=w(this._card);if(e&&await e,n!==this._run)return;this._show(r)}else if(t>0){let e=this._endDialogText();if(e&&await this._showEnd(e),n!==this._run)return;await this._close(`finished`)}}finally{this._moving=!1}}_showEnd(e){return this._unbindAdvance?.(),this._unbindAdvance=null,h(this,{layer:this._layer,spot:this._spot,card:this._card},null,null),this._spot.removeAttribute(J),this._ending=new AbortController,this._seenMark=this._markSeen(`finished`),U(this._layer,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(Q(e.composedPath?.()[0]??e.target))return;e.preventDefault(),e.key===`ArrowRight`?this._move(1):this._current.index>this._firstIndex&&this._move(-1)}else if(e.key===`Tab`&&!this._shadow){let{index:t,target:n}=this._current;ee(e,{card:this._card,active:this._active(),step:this._steps[t],target:n})}}}_teardown(){if(!this._layer)return;document.removeEventListener(`keydown`,this._onKey,!0),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,r(this._outer),oe(this._outer),document.documentElement.removeAttribute(q),this._outer=null,this._shadow=null,this._layer=null,this._current=null;let t=this._returnFocus;this._returnFocus=null,e&&t?.isConnected&&t.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()}:Y,a=this._seenMark;this._teardown();try{n===this._run&&await(a??this._markSeen(e))}finally{this._finish(e,i,t)}}_finish(e,t=Y,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}}))}},Fe=class extends t{constructor(){super(),this.shadowRoot||this.attachShadow({mode:`open`})}};e(`wui-tour`,Pe),e(`wui-tour-step`,Fe)})();
1
+ (function(){function e(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 e of Object.keys(r)){let i=Object.getOwnPropertyDescriptor(t.prototype,e);i&&(i.set||i.get)&&(n.push([r,e,r[e]]),delete r[e])}customElements.define(e,t);for(let[e,t,r]of n)e[t]=r}var t=typeof HTMLElement>`u`?class{}:HTMLElement;function n(e,t){r(e),e._reanchor=t,e._reanchorScroll=n=>{n.target instanceof Node&&typeof e.contains==`function`&&e.contains(n.target)||t()},window.addEventListener(`resize`,e._reanchor),window.addEventListener(`scroll`,e._reanchorScroll,!0)}function r(e){e?._reanchor&&(window.removeEventListener(`resize`,e._reanchor),window.removeEventListener(`scroll`,e._reanchorScroll,!0),e._reanchor=null,e._reanchorScroll=null)}var i=`data-advance`,a=`wui-tour-hint`,o=`Click {actionName} to continue.`,s=`a[href], button, input, select, textarea, summary, [tabindex], [contenteditable]`,c=(e,t)=>e?.advanceOn===`click`&&!!t,l=e=>(e??``).replace(/\s+/g,` `).trim();function u(e){let t=e.ownerDocument,n=(e.getAttribute(`aria-labelledby`)||``).split(/\s+/).filter(Boolean),r=e.tagName===`INPUT`&&/^(button|submit|reset)$/.test(e.type)?e.value:``,i=[n.map(e=>t.getElementById(e)?.textContent??``).join(` `),e.getAttribute(`aria-label`),Array.from(e.labels??[],e=>e.textContent).join(` `),e.getAttribute(`alt`),r,e.textContent,e.getAttribute(`title`)];for(let e of i){let t=l(e);if(t)return t}return``}function d(e){for(let t of[e,...e.querySelectorAll(s)])if(t.tabIndex>=0&&!t.disabled)return t;return null}function f(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 p(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&&f(e,i,!1);return}n||(n=e.ownerDocument.createElement(`p`),n.className=a,i&&(n.id=i),e.querySelector(`.wui-tour-actions`).before(n)),n.textContent=t,i&&f(e,i,!0)}var m=e=>getComputedStyle(e).animationName;function h(e,{layer:t,spot:n,card:r},a,s){let d=c(a,s);t.toggleAttribute(i,d&&!(t.getRootNode()instanceof ShadowRoot)),n.hasAttribute(i)&&(n.removeAttribute(i),d&&m(n)),d&&n.setAttribute(i,``);let f=r.querySelector(`.wui-tour-next`);f.classList.toggle(`btn-primary`,!d),f.classList.toggle(`btn-link`,d);let h=d?l(a.actionLabel)||u(s):``,g=e.getAttribute(`advance-label`)||o,_=h?g.replace(/\{actionName\}/g,()=>h):``;return p(r,_),_}function g(e,t,n){if(!c(e,t))return()=>{};let r=null,i=()=>{r??=setTimeout(n,0)};return t.addEventListener(`click`,i),()=>{t.removeEventListener(`click`,i),clearTimeout(r)}}function _(e,t,n,r){return e.contains(r)||c(t,n)&&n.contains(r)}function ee(e,{card:t,active:n,step:r,target:i}){let a=Array.from(t.querySelectorAll(`button`)).filter(e=>!e.hidden),o=c(r,i)?d(i):null;o&&a.push(o);let s=a.findIndex(e=>e===n||e===o&&i.contains(n));e.preventDefault(),a[s===-1?e.shiftKey?a.length-1:0:(s+(e.shiftKey?-1:1)+a.length)%a.length].focus()}var te=2/3,ne=1e3,re=new Set([`top`,`left`,`width`,`height`]),v=new WeakMap,y=(e,t)=>typeof e.getAnimations==`function`?e.getAnimations().filter(t):[],b=e=>e.transitionProperty===`opacity`,ie=e=>re.has(e.transitionProperty),x=e=>typeof e.animationName==`string`&&e.animationName.startsWith(`wui-tour-`);function S(e){return e.length===0?null:new Promise(t=>{let n=setTimeout(t,ne);Promise.allSettled(e.map(e=>e.finished)).then(()=>{clearTimeout(n),t()})})}function ae(e){let t=e.parentElement?.querySelector(`:scope > .wui-tour-spot`),n=0;for(let e of t?y(t,ie):[]){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*te-r)}return n}function C(e){let t=ae(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={};v.set(e,n);let r=()=>{v.get(e)===n&&e.dataset.state===`entering`&&(e.dataset.state=`shown`)},i=y(e,x);i.length===0?r():Promise.allSettled(i.map(e=>e.finished)).then(r)}function w(e){return e.dataset.state=`leaving`,S(y(e,b))}function oe(e){let t=e.classList.contains(`wui-tour-layer`)?e:e.shadowRoot?.querySelector(`.wui-tour-layer`);t&&(t.dataset.state=`leaving`);let n=t?S(y(t,b)):null;if(!n){e.remove();return}e.setAttribute(`inert`,``),n.then(()=>e.remove())}var T=2,E=12,D=8,O=4,k=20,se=`(max-width: 575.98px)`,ce=[`bottom`,`top`,`right`,`left`],A=[`top-left`,`top-right`,`bottom-right`,`bottom-left`],j,M=(e,t,n)=>Math.max(t,Math.min(e,n)),N=(e,t,n,r)=>(Math.max(e,n)+Math.min(t,r))/2;function le(e,t){if(!t?.scrollIntoView)return;e.style.maxHeight=``;let n=z(e),r=e.offsetHeight+E;if(t.getBoundingClientRect().height+T*2+r*2<=n.bottom-n.top){t.scrollIntoView({block:`center`,inline:`nearest`});return}let i=t.style.scrollMarginTop;t.style.scrollMarginTop=`${n.top+r+T}px`,t.scrollIntoView({block:`start`,inline:`nearest`}),t.style.scrollMarginTop=i}function P(e,t,n){let r=e.style,i=t.style,a=B(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 A)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`,F(r,n);let s=t.scrollTop;i.maxHeight=``;let c={width:t.offsetWidth,height:t.offsetHeight},l=z(t),u=l.bottom-l.top,d={bottom:l.bottom-o.bottom-E,top:o.top-E-l.top,right:l.right-o.right-E,left:o.left-E-l.left},f=window.matchMedia(se).matches,p=ce.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+D)-Math.max(o.top,l.top-D);p?I(t,a,p,o,l,c):m>=Math.min(c.height,u)+O*2?L(t,a,o,l,c):R(t,a,d.bottom>=d.top?`bottom`:`top`,o,l,c,d),t.scrollTop=s}function F(e,t){j??=CSS.supports(`corner-top-left-shape`,`squircle`);let n=getComputedStyle(t);for(let t of A)e.setProperty(`border-${t}-radius`,n.getPropertyValue(`border-${t}-radius`)),j&&e.setProperty(`corner-${t}-shape`,n.getPropertyValue(`corner-${t}-shape`))}function I(e,t,n,r,i,a){let o=n===`top`||n===`bottom`,s,c,l;if(o){let e=N(r.left,r.right,i.left,i.right);s=M(e-a.width/2,i.left,i.right-a.width),c=n===`bottom`?r.bottom+E:r.top-E-a.height,l=M(e-s,k,a.width-k)}else{let e=N(r.top,r.bottom,i.top,i.bottom);c=M(e-a.height/2,i.top,i.bottom-a.height),s=n===`right`?r.right+E:r.left-E-a.width,l=M(e-c,k,a.height-k)}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 L(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)-O;e.style.top=`${Math.max(r.top,o-Math.min(i.height,a))}px`,e.style.left=`${M(n.left+O,r.left,r.right-i.width)}px`}function R(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+E:r.top-E-c}px`;let l=N(r.left,r.right,i.left,i.right);e.style.left=`${M(l-a.width/2,i.left,i.right-a.width)}px`}function z(e){let t=e.parentElement,n=t?getComputedStyle(t):null,r=e=>Number.parseFloat(n?.[e])||0;return{top:r(`paddingTop`)+D,bottom:window.innerHeight-r(`paddingBottom`)-D,left:r(`paddingLeft`)+D,right:window.innerWidth-r(`paddingRight`)-D}}function B(e){let t=e.querySelector(`:scope > .wui-tour-arrow`);return t||(t=document.createElement(`span`),t.className=`wui-tour-arrow`,t.setAttribute(`aria-hidden`,`true`),t.hidden=!0,e.append(t)),t}var V=0;function H(e,t,n){let r=`wui-tour-end-${++V}`,i=e.createElement(`div`);return i.className=`wui-tour-card wui-tour-end`,i.dataset.layout=`center`,i.setAttribute(`role`,`dialog`),n&&i.setAttribute(`aria-modal`,`true`),i.tabIndex=-1,i.setAttribute(`aria-labelledby`,`${r}-title`),i.setAttribute(`aria-describedby`,`${r}-message`),i.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"><button type="button" class="btn btn-sm btn-primary wui-tour-end-button"></button></div>`,i.querySelector(`.wui-tour-end-title`).textContent=t.title,i.querySelector(`.wui-tour-end-message`).textContent=t.message,i.querySelector(`.wui-tour-end-button`).textContent=t.button,i}function U(e,t,n){let r=e.ownerDocument,i=e.getRootNode()===r,a=e.querySelector(`.wui-tour-card:not(.wui-tour-end)`),o=e.querySelector(`.wui-tour-spot`),s=e.querySelector(`[role=status]`),c=H(r,t,i),l=c.querySelector(`.wui-tour-end-button`),u=new AbortController;return new Promise(d=>{let f=()=>{u.abort(),d()};if(n?.aborted){f();return}let p={signal:u.signal};n?.addEventListener(`abort`,f,p),l.addEventListener(`click`,f,p),r.addEventListener(`keydown`,e=>{e.altKey||e.ctrlKey||e.metaKey||(e.key===`Escape`?(e.preventDefault(),e.stopPropagation(),f()):e.key===`Tab`&&i&&(e.preventDefault(),l.focus()))},{capture:!0,signal:u.signal}),i&&r.addEventListener(`focusin`,e=>{c.contains(e.target)||l.focus()},p);let m=()=>{u.signal.aborted||(a.hidden=!0,P(o,a,null),e.append(c),C(c),s.textContent=[t.title,t.message].filter(Boolean).join(`. `),l.focus())},h=w(a);h?h.then(m):m()})}var W=` :host { all: initial; ${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-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-secondary { border-color: var(--color-text-muted); color: var(--color-text-muted); } .btn-outline-secondary: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); } .wui-tour-spot { position: fixed; box-shadow: 0 0 0 2px var(--color-primary), 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 120ms linear; } .wui-tour-layer[data-state=leaving] { transition: opacity 120ms linear; } .wui-tour-card[data-state=entering] { animation: wui-tour-fade-in 120ms 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-media=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: 2px; } .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); } @keyframes wui-tour-pulse { from { box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-primary) 85%, transparent); } to { box-shadow: 0 0 0 14px color-mix(in srgb, var(--color-primary) 0%, transparent); } } @media (prefers-reduced-motion: no-preference) { .wui-tour-spot[data-advance]::after { content: ""; position: absolute; inset: 0; border-radius: inherit; corner-shape: inherit; pointer-events: none; animation: wui-tour-pulse 600ms var(--wui-ease-out) var(--wui-tour-spot-duration); } } @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-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-button { min-width: 120px; } @media (prefers-reduced-motion: no-preference) { .wui-tour-end-mark path { animation: wui-tour-check 300ms var(--wui-ease-out) calc(var(--wui-tour-card-delay, 0ms) + 120ms) both; } } `,G=`wui-tour-media`,ue=`wui-tour-media-toggle`,K=`http://www.w3.org/2000/svg`,de=`M6 5h4v14H6zM14 5h4v14h-4z`,fe=`M8 5v14l11-7z`,pe={pause:`Pause animation`,play:`Play animation`},me=()=>globalThis.matchMedia?.(`(prefers-reduced-motion: reduce)`)?.matches===!0;function he(e){let t=document.createElementNS(K,`svg`);t.setAttribute(`viewBox`,`0 0 24 24`),t.setAttribute(`aria-hidden`,`true`),t.setAttribute(`focusable`,`false`);let n=document.createElementNS(K,`path`);return n.setAttribute(`d`,e),t.appendChild(n),t}function ge(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 _e(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 ve(e,t){let n=document.createElement(`button`);n.type=`button`,n.className=ue;let r=(r=!e.paused)=>{n.setAttribute(`aria-label`,r?t.pause:t.play),n.replaceChildren(he(r?de:fe))};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 ye(e){let t=e.querySelector(`:scope > .${G}`);if(!t)return;let n=t.querySelector(`video`);n&&(n.pause(),n.removeAttribute(`src`),n.load()),t.remove()}function be(e,t,n=pe){if(ye(e),!t.media){e.removeAttribute(`data-media`);return}let r=document.createElement(`div`);if(r.className=G,t.mediaType===`video`){let e=_e(t,!me());r.append(e,ve(e,n))}else r.appendChild(ge(t));e.prepend(r),e.setAttribute(`data-media`,t.target?`step`:`welcome`)}var q=`data-wui-tour-open`,xe=`Step {current} of {total}`;function Se(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 Ce(e,t,n){return(e.getAttribute(`progress-label`)||xe).replace(/\{(current|total)\}/g,(e,r)=>String(r===`current`?t:n))}function we(e,{text:t,position:n,total:r}){let i=e.querySelector(`.wui-tour-position`);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;)a.lastElementChild.remove();for(let e=0;e<o.length;e++)o[e].toggleAttribute(`data-filled`,e<n)}var Te=`wui-tour-step`,Ee=`wui-tour-host`,De=`wui-tour-seen:`,J=`data-tracking`,Oe={back:`Back`,next:`Next`,skip:`Skip`,done:`Done`,mediaPause:`Pause animation`,mediaPlay:`Play animation`,endTitle:`You're all set`,endMessage:`You know your way around now. Enjoy exploring.`,endButton:`Done`},ke={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`},Ae=[[`media`,`media`],[`mediaAlt`,`media-alt`],[`mediaPoster`,`media-poster`],[`mediaType`,`media-type`],[`advanceOn`,`advance-on`],[`actionLabel`,`action-label`]],Y={index:null,position:null,total:null},X=0;function je(e=De,t=globalThis.localStorage){return{isSeen:async n=>t.getItem(e+n)===`1`,markSeen:async n=>{t.setItem(e+n,`1`)}}}var Z=e=>!e?.isConnected||getComputedStyle(e).visibility===`hidden`?!1:e.getClientRects().length>0,Q=e=>!!e&&(e.isContentEditable||/^(INPUT|TEXTAREA|SELECT)$/.test(e.tagName)),Me=()=>{let e=document.activeElement;for(;e?.shadowRoot?.activeElement;)e=e.shadowRoot.activeElement;return e},$=null;function Ne(e){$||($=new CSSStyleSheet,$.replaceSync(W)),e.adoptedStyleSheets=[$]}var Pe=class extends t{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 > ${Te}`),e=>{let t={target:e.getAttribute(`target`)||``,title:e.getAttribute(`title`)||void 0,description:e.textContent.trim()};for(let[n,r]of Ae)e.hasAttribute(r)&&(t[n]=e.getAttribute(r));return t})}_store(){return this.seenStore?this.seenStore:this.getAttribute(`seen-store`)===`local`?je():globalThis.window?.WUI?.tour?.seenStore||null}_label(e){return this.getAttribute(ke[e])||Oe[e]}_endDialogText(){return this.getAttribute(`end-dialog`)===`false`?null:{title:this._label(`endTitle`),message:this._label(`endMessage`),button:this._label(`endButton`)}}_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=Se(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&&!Z(document.querySelector(t.target))&&this._progress.drop(e);this._returnFocus=document.activeElement;let n=await this._locate(0,1,e);if(e===this._run){if(!n){this._finish(`noTargets`);return}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))}}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(await this._beforeStep(e,i),n!==this._run)return null;if(!e.target)return{index:i,target:null};let t=document.querySelector(e.target);if(Z(t))return this._progress.position(i),{index:i,target:t};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-${++X}`,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" aria-modal="true" 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="btn btn-sm btn-outline-secondary wui-tour-back"></button> <button type="button" class="btn btn-sm btn-primary wui-tour-next"></button> </div> </div> </div> <div class="visually-hidden" role="status" aria-live="polite"></div>`;let r=t;this._shadow=null,this.isolated&&(r=document.createElement(Ee),this._shadow=r.attachShadow({mode:`open`}),Ne(this._shadow),this._shadow.appendChild(t)),document.body.appendChild(r),document.documentElement.setAttribute(q,``),this._outer=r,this._layer=t,this._spot=t.querySelector(`.wui-tour-spot`),this._card=t.querySelector(`.wui-tour-card`),this._live=t.querySelector(`[role=status]`),this._card.querySelector(`.wui-tour-skip`).addEventListener(`click`,()=>this._close(`skipped`,`button`)),this._card.querySelector(`.wui-tour-back`).addEventListener(`click`,()=>this._move(-1)),this._card.querySelector(`.wui-tour-next`).addEventListener(`click`,()=>this._move(1)),this._shadow&&this._card.removeAttribute(`aria-modal`),this._onKey=e=>this._key(e),this._onFocusIn=e=>{if(!this._layer||this._ending)return;let t=this._current,n=t?this._steps[t.index]:null;_(this._layer,n,t?.target??null,e.target)||this._card.focus()},document.addEventListener(`keydown`,this._onKey,!0),this._shadow||document.addEventListener(`focusin`,this._onFocusIn),n(r,()=>this._follow())}_active(){return this._shadow?this._shadow.activeElement:document.activeElement}_show(e){this._current=e;let{index:t,target:n}=e,r=this._steps[t],i=this._card,a=this._progress.position(t),o=this._progress.total(),s=a===o&&!this._endDialogText(),c=Ce(this,a,o);we(i,{text:c,position:a,total:o}),be(i,r,{pause:this._label(`mediaPause`),play:this._label(`mediaPlay`)});let l=h(this,{layer:this._layer,spot:this._spot,card:i},r,n),u=i.querySelector(`.wui-tour-title`);u.textContent=r.title||``,u.hidden=!r.title,i.querySelector(`.wui-tour-text`).textContent=r.description||``,i.querySelector(`.wui-tour-skip`).textContent=this._label(`skip`),i.querySelector(`.wui-tour-back`).textContent=this._label(`back`),i.querySelector(`.wui-tour-back`).hidden=t<=this._firstIndex,i.querySelector(`.wui-tour-next`).textContent=this._label(s?`done`:`next`);let d=[c,r.title,r.description].filter(Boolean).join(`. `);this._live.textContent=l?[d,l].join(/[.!?]$/.test(d)?` `:`. `):d,le(i,n),this._spot.removeAttribute(J),this._place(),C(i),this._unbindAdvance?.(),this._unbindAdvance=g(r,n,()=>this._move(1));let f=this._active();(i.contains(f)?!f.hidden:this._shadow!==null&&Q(Me()))||i.focus(),this.dispatchEvent(new CustomEvent(`wui-tour:step`,{bubbles:!0,detail:{step:r,index:t,position:a,total:o}}))}_place(){!this._current||!this._layer||P(this._spot,this._card,this._current.target)}_follow(){if(!this._current||!this._layer||this._ending)return;let e=this._spot.style.cssText;this._place(),this._spot.style.cssText!==e&&this._spot.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=w(this._card);if(e&&await e,n!==this._run)return;this._show(r)}else if(t>0){let e=this._endDialogText();if(e&&await this._showEnd(e),n!==this._run)return;await this._close(`finished`)}}finally{this._moving=!1}}_showEnd(e){return this._unbindAdvance?.(),this._unbindAdvance=null,h(this,{layer:this._layer,spot:this._spot,card:this._card},null,null),this._spot.removeAttribute(J),this._ending=new AbortController,this._seenMark=this._markSeen(`finished`),U(this._layer,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(Q(e.composedPath?.()[0]??e.target))return;e.preventDefault(),e.key===`ArrowRight`?this._move(1):this._current.index>this._firstIndex&&this._move(-1)}else if(e.key===`Tab`&&!this._shadow){let{index:t,target:n}=this._current;ee(e,{card:this._card,active:this._active(),step:this._steps[t],target:n})}}}_teardown(){if(!this._layer)return;document.removeEventListener(`keydown`,this._onKey,!0),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,r(this._outer),oe(this._outer),document.documentElement.removeAttribute(q),this._outer=null,this._shadow=null,this._layer=null,this._current=null;let t=this._returnFocus;this._returnFocus=null,e&&t?.isConnected&&t.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()}:Y,a=this._seenMark;this._teardown();try{n===this._run&&await(a??this._markSeen(e))}finally{this._finish(e,i,t)}}_finish(e,t=Y,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}}))}},Fe=class extends t{constructor(){super(),this.shadowRoot||this.attachShadow({mode:`open`})}};e(`wui-tour`,Pe),e(`wui-tour-step`,Fe)})();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webority/ui-elements",
3
- "version": "0.99.0",
3
+ "version": "0.101.0",
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",
@@ -1 +0,0 @@
1
- import{t as e}from"./elementBase-DV9IZZCu.js";import{n as t}from"./devWarn-DXdRWZs3.js";import{t as n}from"./tourOpenMark-nPeAJFSo.js";var r={"--color-primary":`#4F46E5`,"--color-primary-hover":`#4338CA`,"--color-primary-ink":`#4F46E5`,"--color-primary-text":`#FFFFFF`,"--color-text":`#071437`,"--color-text-muted":`#4B5675`,"--color-border":`#EBEDF3`,"--color-surface":`#FFFFFF`,"--wui-radius-lg":`14px`,"--wui-shadow-overlay-lg":`0 24px 60px -16px rgba(7, 20, 55, 0.28)`,"--wui-z-fixed":`1030`},i=e=>`var(${e}, ${r[e]})`,a=` :host { all: initial; position: fixed; bottom: 20px; left: 20px; right: auto; z-index: ${i(`--wui-z-fixed`)}; display: block; width: 420px; max-width: calc(100vw - 40px); font-family: inherit; font-size: 16px; line-height: 1.5; color: ${i(`--color-text`)}; } :host([position="bottom-right"]) { right: 20px; left: auto; } :host([position="bar"]) { left: 0; right: 0; bottom: 0; width: auto; max-width: none; } :host([position="bar"]) .wui-consent-banner-panel { padding: 12px 24px calc(12px + env(safe-area-inset-bottom, 0px)); border-width: 1px 0 0; border-radius: 0; } :host(:not([open])) { pointer-events: none; } :host([tour-open]) { visibility: hidden; } *, *::before, *::after { box-sizing: border-box; } [hidden] { display: none !important; } .wui-consent-banner-panel { padding: 20px; background: ${i(`--color-surface`)}; border: 1px solid ${i(`--color-border`)}; border-radius: ${i(`--wui-radius-lg`)}; box-shadow: ${i(`--wui-shadow-overlay-lg`)}; text-align: start; pointer-events: auto; } .wui-consent-banner-heading { margin: 0 0 8px; font-size: 18px; font-weight: 600; line-height: 1.3; color: ${i(`--color-text`)}; } .wui-consent-banner-description { margin: 0 0 16px; font-size: 14px; line-height: 1.5; color: ${i(`--color-text-muted`)}; } .wui-consent-banner-policy { color: ${i(`--color-primary-ink`)}; font-weight: 500; } .wui-consent-banner-settings { display: grid; gap: 12px; max-height: 50vh; margin: 0 0 16px; padding: 12px 0; overflow-y: auto; border-top: 1px solid ${i(`--color-border`)}; border-bottom: 1px solid ${i(`--color-border`)}; } .wui-consent-banner-category-description { margin: 2px 0 0; padding-inline-start: 2.5em; font-size: 12px; line-height: 1.4; color: ${i(`--color-text-muted`)}; } .form-check { display: flex; align-items: center; gap: 0.5em; margin: 0; font-size: 14px; } .form-check-input { appearance: none; flex: none; width: 2em; height: 1em; margin: 0; border: 1px solid rgba(0, 0, 0, 0.25); border-radius: 2em; background: ${i(`--color-surface`)} radial-gradient(circle, rgba(0, 0, 0, 0.25) 0.35em, transparent 0.4em) left / 1em 1em no-repeat; cursor: pointer; transition: background-position 0.15s ease-in-out; } .form-check-input:checked { border-color: ${i(`--color-primary`)}; background: ${i(`--color-primary`)} radial-gradient(circle, #fff 0.35em, transparent 0.4em) right / 1em 1em no-repeat; } .form-check-input:disabled { opacity: 0.5; cursor: default; } .form-check-input:focus-visible { outline: 2px solid ${i(`--color-primary`)}; outline-offset: 2px; } .form-check-label { cursor: pointer; } .wui-consent-banner-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; } .btn { display: inline-block; 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; white-space: nowrap; cursor: pointer; } .btn:focus-visible { outline: 2px solid ${i(`--color-primary`)}; outline-offset: 2px; } .btn-primary { background: ${i(`--color-primary`)}; border-color: ${i(`--color-primary`)}; color: ${i(`--color-primary-text`)}; } .btn-primary:hover { background: ${i(`--color-primary-hover`)}; border-color: ${i(`--color-primary-hover`)}; } .btn-outline-secondary { border-color: ${i(`--color-text-muted`)}; color: ${i(`--color-text-muted`)}; } .btn-outline-secondary:hover { background: ${i(`--color-bg-muted`)}; color: ${i(`--color-text`)}; } .btn-link { font-weight: 400; color: ${i(`--color-primary-ink`)}; text-decoration: underline; } .btn-link:hover { color: ${i(`--color-primary-hover`)}; } .wui-consent-banner-settings-toggle { margin-inline-end: auto; padding-inline: 0; } .wui-consent-banner-save { flex: 1 1 100%; } @media (max-width: 575.98px) { :host, :host([position="bottom-right"]) { left: 0; right: 0; bottom: 0; width: auto; max-width: none; } .wui-consent-banner-panel { padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); border-width: 1px 0 0; border-radius: 0; } /* Hidden on phones, but it stays the dialog's accessible name. */ .wui-consent-banner-heading { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; } .wui-consent-banner-description { margin: 0 0 8px; font-size: 13px; line-height: 1.4; } .wui-consent-banner-actions { gap: 6px; } } @media (min-width: 576px) { :host([position="bar"]) .wui-consent-banner-panel { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; } /* Hidden on the bar, but it stays the dialog's accessible name. */ :host([position="bar"]) .wui-consent-banner-heading { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; } :host([position="bar"]) .wui-consent-banner-description { margin: 0; flex: 1 1 320px; } :host([position="bar"]) .wui-consent-banner-actions { flex: none; } :host([position="bar"]) .wui-consent-banner-settings { flex-basis: 100%; margin: 0; } } /* The actions are small buttons, which fall under the 44px touch target on touch screens. This sheet's .btn is inline-block, so it centres the label itself. */ @media (max-width: 575.98px), (pointer: coarse) { .wui-consent-banner-actions .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; } } `,o=`wui-consent-save`,s=`[data-consent-settings]`,c=`tour-open`,l=`--wui-consent-banner-block`,u=`--wui-consent-banner-inline`,d={heading:`Cookies on this site`,description:`We use cookies to understand how the site is used and to measure our campaigns. You can change your choice at any time.`,policyLabel:`Cookie policy`,essentialLabel:`Essential cookies`,essentialDescription:`Required for the site to work and stay secure. Always on.`,analyticsLabel:`Analytics cookies`,analyticsDescription:`Help us understand how visitors use the site.`,functionalLabel:`Functional cookies`,functionalDescription:`Remember choices you make, such as your preferences.`,marketingLabel:`Marketing cookies`,marketingDescription:`Measure how well our campaigns work.`,settingsLabel:`Cookie settings`,rejectLabel:`Reject all`,acceptLabel:`Accept all`,saveLabel:`Save preferences`},f=[`analytics`,`functional`,`marketing`],p={analytics:{label:d.analyticsLabel,description:`analyticsDescription`},functional:{label:d.functionalLabel,description:`functionalDescription`},marketing:{label:d.marketingLabel,description:`marketingDescription`}},m=new Set;function h(e){m.has(e)||(m.add(e),t(`[@webority/ui-elements] <wui-consent-banner> received categories containing "${e}", which is not one of ${f.map(e=>`"${e}"`).join(` | `)}. It is ignored.`))}var g=0,_=null;function v(e){_||(_=new CSSStyleSheet,_.replaceSync(a)),e.adoptedStyleSheets=[_]}var y=class extends e{static get observedAttributes(){return[`heading`,`description`,`policy-href`,`policy-label`,`analytics-description`,`functional-description`,`marketing-description`,`categories`]}constructor(){super(),g+=1,this._uid=`wui-consent-${g}`,this._preferences={analytics:!1,functional:!1,marketing:!1},this._settings=!1,this._onDocumentClick=e=>{e.target instanceof Element&&e.target.closest(s)&&(e.preventDefault(),this.open({settings:!0,focus:!0}))},this._tourWatch=null,this._roomObserver=null,this._onWindowResize=()=>this._reserveRoom()}get position(){let e=this.getAttribute(`position`);return e===`bottom-right`||e===`bar`?e:`bottom-left`}set position(e){this.setAttribute(`position`,String(e??`bottom-left`))}get standalone(){return this.hasAttribute(`standalone`)}set standalone(e){this.toggleAttribute(`standalone`,e===!0||e===``||e===`true`)}get preview(){return this.hasAttribute(`preview`)}set preview(e){this.toggleAttribute(`preview`,e===!0||e===``||e===`true`)}get heading(){return this.getAttribute(`heading`)||d.heading}set heading(e){this.setAttribute(`heading`,String(e??``))}get description(){return this.getAttribute(`description`)||d.description}set description(e){this.setAttribute(`description`,String(e??``))}get policyHref(){return this.getAttribute(`policy-href`)||``}set policyHref(e){this.setAttribute(`policy-href`,String(e??``))}get policyLabel(){return this.getAttribute(`policy-label`)||d.policyLabel}set policyLabel(e){this.setAttribute(`policy-label`,String(e??``))}get analyticsDescription(){return this.getAttribute(`analytics-description`)||d.analyticsDescription}set analyticsDescription(e){this.setAttribute(`analytics-description`,String(e??``))}get functionalDescription(){return this.getAttribute(`functional-description`)||d.functionalDescription}set functionalDescription(e){this.setAttribute(`functional-description`,String(e??``))}get marketingDescription(){return this.getAttribute(`marketing-description`)||d.marketingDescription}set marketingDescription(e){this.setAttribute(`marketing-description`,String(e??``))}get categories(){let e=this.getAttribute(`categories`);if(!e?.trim())return[...f];let t=e.split(/\s+/).filter(Boolean);for(let e of t)f.includes(e)||h(e);let n=f.filter(e=>t.includes(e));return n.length?n:[...f]}set categories(e){e==null?this.removeAttribute(`categories`):this.setAttribute(`categories`,Array.isArray(e)?e.join(` `):String(e))}get preferences(){let e=this.categories;return Object.fromEntries(f.map(t=>[t,e.includes(t)&&this._preferences[t]]))}set preferences(e){this._preferences={analytics:e?.analytics===!0,functional:e?.functional===!0,marketing:e?.marketing===!0},this._applyPreferences()}get isOpen(){return this.hasAttribute(`open`)}connectedCallback(){this._rendered||this.render(),document.addEventListener(`click`,this._onDocumentClick),this._syncTour(),this._tourWatch??=new MutationObserver(()=>this._syncTour()),this._tourWatch.observe(document.documentElement,{attributes:!0,attributeFilter:[n]}),this.preview&&!this.isOpen&&this.open(),this.isOpen&&this._trackRoom()}disconnectedCallback(){document.removeEventListener(`click`,this._onDocumentClick),this._tourWatch?.disconnect(),this._untrackRoom()}_syncTour(){this.toggleAttribute(c,document.documentElement.hasAttribute(n))}attributeChangedCallback(){this._rendered&&this.render()}render(){let e=this.isOpen,t=this._uid,n=this.policyHref?` <a class="wui-consent-banner-policy" href="${S(this.policyHref)}">${x(this.policyLabel)}</a>`:``,r=this._root();r!==this&&v(r),r.innerHTML=` <div class="wui-consent-banner-panel" role="dialog" aria-labelledby="${t}-heading" aria-describedby="${t}-description" hidden> <h2 class="wui-consent-banner-heading" id="${t}-heading">${x(this.heading)}</h2> <p class="wui-consent-banner-description" id="${t}-description">${x(this.description)}${n}</p> <div class="wui-consent-banner-settings" hidden> ${b(t,`essential`,d.essentialLabel,d.essentialDescription,!0)} ${this.categories.map(e=>b(t,e,p[e].label,this[p[e].description],!1)).join(` `)} </div> <div class="wui-consent-banner-actions"> <button type="button" class="btn btn-sm btn-link wui-consent-banner-settings-toggle" aria-expanded="false">${d.settingsLabel}</button> <button type="button" class="btn btn-sm btn-outline-secondary wui-consent-banner-reject">${d.rejectLabel}</button> <button type="button" class="btn btn-sm btn-primary wui-consent-banner-accept">${d.acceptLabel}</button> <button type="button" class="btn btn-sm btn-primary wui-consent-banner-save" hidden>${d.saveLabel}</button> </div> </div>`,this._rendered=!0,this._wire(),this._applyPreferences(),this._showSettings(this._settings),e&&(this._panel().hidden=!1)}open({settings:e=!1,focus:t=!1}={}){this._rendered||this.render(),this._applyPreferences(),this._showSettings(e),this._panel().hidden=!1,this.setAttribute(`open`,``),this._trackRoom(),t&&(e?this._root().querySelector(`.wui-consent-banner-category input:not([disabled])`):this._root().querySelector(`.wui-consent-banner-accept`))?.focus()}close(){let e=this._panel();e&&(e.hidden=!0),this.removeAttribute(`open`),this._showSettings(!1),this._untrackRoom()}_trackRoom(){!this.isConnected||this.preview||(typeof ResizeObserver<`u`&&(this._roomObserver??=new ResizeObserver(()=>this._reserveRoom()),this._roomObserver.observe(this)),window.addEventListener(`resize`,this._onWindowResize),this._reserveRoom())}_untrackRoom(){this._roomObserver?.disconnect(),window.removeEventListener(`resize`,this._onWindowResize),document.documentElement.style.removeProperty(l),document.documentElement.style.removeProperty(u)}_reserveRoom(){let e=this.getBoundingClientRect(),t=this.position===`bar`?0:this.position===`bottom-right`?window.innerWidth-e.left:e.right,n=document.documentElement.style;n.setProperty(l,`${Math.ceil(window.innerHeight-e.top)}px`),n.setProperty(u,`${Math.ceil(t)}px`)}_root(){return this.shadowRoot?this.shadowRoot:this.standalone?this.attachShadow({mode:`open`}):this}_panel(){return this._root().querySelector(`.wui-consent-banner-panel`)}_wire(){let e=this._root();e.querySelector(`.wui-consent-banner-accept`)?.addEventListener(`click`,()=>this._save(this._choiceForShown(!0))),e.querySelector(`.wui-consent-banner-reject`)?.addEventListener(`click`,()=>this._save(this._choiceForShown(!1))),e.querySelector(`.wui-consent-banner-save`)?.addEventListener(`click`,()=>this._save(this._switchValues())),e.querySelector(`.wui-consent-banner-settings-toggle`)?.addEventListener(`click`,()=>this._showSettings(!this._settings))}_save(e){this._preferences={...e},this.dispatchEvent(new CustomEvent(o,{bubbles:!0,composed:!0,detail:{...e}})),this.close()}_choiceForShown(e){let t=this.categories;return Object.fromEntries(f.map(n=>[n,e&&t.includes(n)]))}_switchValues(){let e={};for(let t of f)e[t]=this._root().querySelector(`input[data-category="${t}"]`)?.checked===!0;return e}_applyPreferences(){for(let e of f){let t=this._root().querySelector(`input[data-category="${e}"]`);t&&(t.checked=this._preferences[e])}}_showSettings(e){this._settings=e;let t=this._root(),n=t.querySelector(`.wui-consent-banner-settings`);if(!n)return;n.hidden=!e,t.querySelector(`.wui-consent-banner-settings-toggle`)?.setAttribute(`aria-expanded`,e?`true`:`false`);let r=t.querySelector(`.wui-consent-banner-save`);r&&(r.hidden=!e);for(let n of[`.wui-consent-banner-reject`,`.wui-consent-banner-accept`]){let r=t.querySelector(n);r&&(r.hidden=e)}}};function b(e,t,n,r,i){let a=`${e}-${t}`;return`<div class="wui-consent-banner-category"> <div class="form-check form-switch"> <input class="form-check-input" type="checkbox" role="switch" id="${a}" data-category="${t}"${i?` checked disabled`:``} /> <label class="form-check-label" for="${a}">${x(n)}</label> </div> <p class="wui-consent-banner-category-description">${x(r)}</p> </div>`}var x=e=>String(e??``).replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`),S=e=>String(e??``).replace(/&/g,`&amp;`).replace(/"/g,`&quot;`).replace(/</g,`&lt;`);export{y as t};
@@ -1 +0,0 @@
1
- import{t as e}from"./elementBase-DV9IZZCu.js";import{n as t,r as n}from"./anchorOverlay-BfE1ZeuJ.js";import{t as r}from"./tourOpenMark-nPeAJFSo.js";var i=`data-advance`,a=`wui-tour-hint`,o=`Click {actionName} to continue.`,s=`a[href], button, input, select, textarea, summary, [tabindex], [contenteditable]`,c=(e,t)=>e?.advanceOn===`click`&&!!t,l=e=>(e??``).replace(/\s+/g,` `).trim();function u(e){let t=e.ownerDocument,n=(e.getAttribute(`aria-labelledby`)||``).split(/\s+/).filter(Boolean),r=e.tagName===`INPUT`&&/^(button|submit|reset)$/.test(e.type)?e.value:``,i=[n.map(e=>t.getElementById(e)?.textContent??``).join(` `),e.getAttribute(`aria-label`),Array.from(e.labels??[],e=>e.textContent).join(` `),e.getAttribute(`alt`),r,e.textContent,e.getAttribute(`title`)];for(let e of i){let t=l(e);if(t)return t}return``}function d(e){for(let t of[e,...e.querySelectorAll(s)])if(t.tabIndex>=0&&!t.disabled)return t;return null}function f(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 p(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&&f(e,i,!1);return}n||(n=e.ownerDocument.createElement(`p`),n.className=a,i&&(n.id=i),e.querySelector(`.wui-tour-actions`).before(n)),n.textContent=t,i&&f(e,i,!0)}var m=e=>getComputedStyle(e).animationName;function h(e,{layer:t,spot:n,card:r},a,s){let d=c(a,s);t.toggleAttribute(i,d&&!(t.getRootNode()instanceof ShadowRoot)),n.hasAttribute(i)&&(n.removeAttribute(i),d&&m(n)),d&&n.setAttribute(i,``);let f=r.querySelector(`.wui-tour-next`);f.classList.toggle(`btn-primary`,!d),f.classList.toggle(`btn-link`,d);let h=d?l(a.actionLabel)||u(s):``,g=e.getAttribute(`advance-label`)||o,_=h?g.replace(/\{actionName\}/g,()=>h):``;return p(r,_),_}function g(e,t,n){if(!c(e,t))return()=>{};let r=null,i=()=>{r??=setTimeout(n,0)};return t.addEventListener(`click`,i),()=>{t.removeEventListener(`click`,i),clearTimeout(r)}}function _(e,t,n,r){return e.contains(r)||c(t,n)&&n.contains(r)}function ee(e,{card:t,active:n,step:r,target:i}){let a=Array.from(t.querySelectorAll(`button`)).filter(e=>!e.hidden),o=c(r,i)?d(i):null;o&&a.push(o);let s=a.findIndex(e=>e===n||e===o&&i.contains(n));e.preventDefault(),a[s===-1?e.shiftKey?a.length-1:0:(s+(e.shiftKey?-1:1)+a.length)%a.length].focus()}var te=2/3,ne=1e3,re=new Set([`top`,`left`,`width`,`height`]),v=new WeakMap,y=(e,t)=>typeof e.getAnimations==`function`?e.getAnimations().filter(t):[],b=e=>e.transitionProperty===`opacity`,ie=e=>re.has(e.transitionProperty),x=e=>typeof e.animationName==`string`&&e.animationName.startsWith(`wui-tour-`);function S(e){return e.length===0?null:new Promise(t=>{let n=setTimeout(t,ne);Promise.allSettled(e.map(e=>e.finished)).then(()=>{clearTimeout(n),t()})})}function ae(e){let t=e.parentElement?.querySelector(`:scope > .wui-tour-spot`),n=0;for(let e of t?y(t,ie):[]){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*te-r)}return n}function C(e){let t=ae(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={};v.set(e,n);let r=()=>{v.get(e)===n&&e.dataset.state===`entering`&&(e.dataset.state=`shown`)},i=y(e,x);i.length===0?r():Promise.allSettled(i.map(e=>e.finished)).then(r)}function w(e){return e.dataset.state=`leaving`,S(y(e,b))}function oe(e){let t=e.classList.contains(`wui-tour-layer`)?e:e.shadowRoot?.querySelector(`.wui-tour-layer`);t&&(t.dataset.state=`leaving`);let n=t?S(y(t,b)):null;if(!n){e.remove();return}e.setAttribute(`inert`,``),n.then(()=>e.remove())}var T=2,E=12,D=8,O=4,k=20,se=`(max-width: 575.98px)`,ce=[`bottom`,`top`,`right`,`left`],A=[`top-left`,`top-right`,`bottom-right`,`bottom-left`],j,M=(e,t,n)=>Math.max(t,Math.min(e,n)),N=(e,t,n,r)=>(Math.max(e,n)+Math.min(t,r))/2;function le(e,t){if(!t?.scrollIntoView)return;e.style.maxHeight=``;let n=z(e),r=e.offsetHeight+E;if(t.getBoundingClientRect().height+T*2+r*2<=n.bottom-n.top){t.scrollIntoView({block:`center`,inline:`nearest`});return}let i=t.style.scrollMarginTop;t.style.scrollMarginTop=`${n.top+r+T}px`,t.scrollIntoView({block:`start`,inline:`nearest`}),t.style.scrollMarginTop=i}function P(e,t,n){let r=e.style,i=t.style,a=B(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 A)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`,F(r,n);let s=t.scrollTop;i.maxHeight=``;let c={width:t.offsetWidth,height:t.offsetHeight},l=z(t),u=l.bottom-l.top,d={bottom:l.bottom-o.bottom-E,top:o.top-E-l.top,right:l.right-o.right-E,left:o.left-E-l.left},f=window.matchMedia(se).matches,p=ce.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+D)-Math.max(o.top,l.top-D);p?I(t,a,p,o,l,c):m>=Math.min(c.height,u)+O*2?L(t,a,o,l,c):R(t,a,d.bottom>=d.top?`bottom`:`top`,o,l,c,d),t.scrollTop=s}function F(e,t){j??=CSS.supports(`corner-top-left-shape`,`squircle`);let n=getComputedStyle(t);for(let t of A)e.setProperty(`border-${t}-radius`,n.getPropertyValue(`border-${t}-radius`)),j&&e.setProperty(`corner-${t}-shape`,n.getPropertyValue(`corner-${t}-shape`))}function I(e,t,n,r,i,a){let o=n===`top`||n===`bottom`,s,c,l;if(o){let e=N(r.left,r.right,i.left,i.right);s=M(e-a.width/2,i.left,i.right-a.width),c=n===`bottom`?r.bottom+E:r.top-E-a.height,l=M(e-s,k,a.width-k)}else{let e=N(r.top,r.bottom,i.top,i.bottom);c=M(e-a.height/2,i.top,i.bottom-a.height),s=n===`right`?r.right+E:r.left-E-a.width,l=M(e-c,k,a.height-k)}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 L(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)-O;e.style.top=`${Math.max(r.top,o-Math.min(i.height,a))}px`,e.style.left=`${M(n.left+O,r.left,r.right-i.width)}px`}function R(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+E:r.top-E-c}px`;let l=N(r.left,r.right,i.left,i.right);e.style.left=`${M(l-a.width/2,i.left,i.right-a.width)}px`}function z(e){let t=e.parentElement,n=t?getComputedStyle(t):null,r=e=>Number.parseFloat(n?.[e])||0;return{top:r(`paddingTop`)+D,bottom:window.innerHeight-r(`paddingBottom`)-D,left:r(`paddingLeft`)+D,right:window.innerWidth-r(`paddingRight`)-D}}function B(e){let t=e.querySelector(`:scope > .wui-tour-arrow`);return t||(t=document.createElement(`span`),t.className=`wui-tour-arrow`,t.setAttribute(`aria-hidden`,`true`),t.hidden=!0,e.append(t)),t}var V=0;function H(e,t,n){let r=`wui-tour-end-${++V}`,i=e.createElement(`div`);return i.className=`wui-tour-card wui-tour-end`,i.dataset.layout=`center`,i.setAttribute(`role`,`dialog`),n&&i.setAttribute(`aria-modal`,`true`),i.tabIndex=-1,i.setAttribute(`aria-labelledby`,`${r}-title`),i.setAttribute(`aria-describedby`,`${r}-message`),i.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"><button type="button" class="btn btn-sm btn-primary wui-tour-end-button"></button></div>`,i.querySelector(`.wui-tour-end-title`).textContent=t.title,i.querySelector(`.wui-tour-end-message`).textContent=t.message,i.querySelector(`.wui-tour-end-button`).textContent=t.button,i}function U(e,t,n){let r=e.ownerDocument,i=e.getRootNode()===r,a=e.querySelector(`.wui-tour-card:not(.wui-tour-end)`),o=e.querySelector(`.wui-tour-spot`),s=e.querySelector(`[role=status]`),c=H(r,t,i),l=c.querySelector(`.wui-tour-end-button`),u=new AbortController;return new Promise(d=>{let f=()=>{u.abort(),d()};if(n?.aborted){f();return}let p={signal:u.signal};n?.addEventListener(`abort`,f,p),l.addEventListener(`click`,f,p),r.addEventListener(`keydown`,e=>{e.altKey||e.ctrlKey||e.metaKey||(e.key===`Escape`?(e.preventDefault(),e.stopPropagation(),f()):e.key===`Tab`&&i&&(e.preventDefault(),l.focus()))},{capture:!0,signal:u.signal}),i&&r.addEventListener(`focusin`,e=>{c.contains(e.target)||l.focus()},p);let m=()=>{u.signal.aborted||(a.hidden=!0,P(o,a,null),e.append(c),C(c),s.textContent=[t.title,t.message].filter(Boolean).join(`. `),l.focus())},h=w(a);h?h.then(m):m()})}var W=` :host { all: initial; ${Object.entries({"--wui-z-tour":`1550`,"--wui-radius-sm":`8px`,"--wui-radius-lg":`14px`,"--wui-shadow-overlay":`0 8px 28px -6px rgba(7, 20, 55, 0.14)`,"--wui-ease-out-quart":`cubic-bezier(0.22, 1, 0.36, 1)`,"--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-ink":`#4F46E5`,"--color-focus-ring":`#4F46E5`,"--wui-focus-ring-width":`2px`,"--wui-focus-ring-offset":`2px`,"--color-primary-text":`#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-primary-text); } .btn-primary:hover { background: var(--color-primary-hover); border-color: var(--color-primary-hover); } .btn-outline-secondary { border-color: var(--color-text-muted); color: var(--color-text-muted); } .btn-outline-secondary:hover { background: var(--color-bg-muted); color: var(--color-text); } .btn-link { font-weight: 400; color: var(--color-primary-ink); 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); } .wui-tour-spot { position: fixed; box-shadow: 0 0 0 2px var(--color-primary), 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-overlay); } .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 120ms linear; } .wui-tour-layer[data-state=leaving] { transition: opacity 120ms linear; } .wui-tour-card[data-state=entering] { animation: wui-tour-fade-in 120ms 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-media=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: 2px; } .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); } @keyframes wui-tour-pulse { from { box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-primary) 85%, transparent); } to { box-shadow: 0 0 0 14px color-mix(in srgb, var(--color-primary) 0%, transparent); } } @media (prefers-reduced-motion: no-preference) { .wui-tour-spot[data-advance]::after { content: ""; position: absolute; inset: 0; border-radius: inherit; corner-shape: inherit; pointer-events: none; animation: wui-tour-pulse 600ms var(--wui-ease-out-quart) var(--wui-tour-spot-duration); } } @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-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-button { min-width: 120px; } @media (prefers-reduced-motion: no-preference) { .wui-tour-end-mark path { animation: wui-tour-check 300ms var(--wui-ease-out-quart) calc(var(--wui-tour-card-delay, 0ms) + 120ms) both; } } `,G=`wui-tour-media`,ue=`wui-tour-media-toggle`,K=`http://www.w3.org/2000/svg`,de=`M6 5h4v14H6zM14 5h4v14h-4z`,fe=`M8 5v14l11-7z`,pe={pause:`Pause animation`,play:`Play animation`},me=()=>globalThis.matchMedia?.(`(prefers-reduced-motion: reduce)`)?.matches===!0;function he(e){let t=document.createElementNS(K,`svg`);t.setAttribute(`viewBox`,`0 0 24 24`),t.setAttribute(`aria-hidden`,`true`),t.setAttribute(`focusable`,`false`);let n=document.createElementNS(K,`path`);return n.setAttribute(`d`,e),t.appendChild(n),t}function ge(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 _e(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 ve(e,t){let n=document.createElement(`button`);n.type=`button`,n.className=ue;let r=(r=!e.paused)=>{n.setAttribute(`aria-label`,r?t.pause:t.play),n.replaceChildren(he(r?de:fe))};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 ye(e){let t=e.querySelector(`:scope > .${G}`);if(!t)return;let n=t.querySelector(`video`);n&&(n.pause(),n.removeAttribute(`src`),n.load()),t.remove()}function be(e,t,n=pe){if(ye(e),!t.media){e.removeAttribute(`data-media`);return}let r=document.createElement(`div`);if(r.className=G,t.mediaType===`video`){let e=_e(t,!me());r.append(e,ve(e,n))}else r.appendChild(ge(t));e.prepend(r),e.setAttribute(`data-media`,t.target?`step`:`welcome`)}var xe=`Step {current} of {total}`;function Se(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 Ce(e,t,n){return(e.getAttribute(`progress-label`)||xe).replace(/\{(current|total)\}/g,(e,r)=>String(r===`current`?t:n))}function we(e,{text:t,position:n,total:r}){let i=e.querySelector(`.wui-tour-position`);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;)a.lastElementChild.remove();for(let e=0;e<o.length;e++)o[e].toggleAttribute(`data-filled`,e<n)}var Te=`wui-tour-step`,Ee=`wui-tour-host`,De=`wui-tour-seen:`,q=`data-tracking`,Oe={back:`Back`,next:`Next`,skip:`Skip`,done:`Done`,mediaPause:`Pause animation`,mediaPlay:`Play animation`,endTitle:`You're all set`,endMessage:`You know your way around now. Enjoy exploring.`,endButton:`Done`},ke={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`},Ae=[[`media`,`media`],[`mediaAlt`,`media-alt`],[`mediaPoster`,`media-poster`],[`mediaType`,`media-type`],[`advanceOn`,`advance-on`],[`actionLabel`,`action-label`]],J={index:null,position:null,total:null},je=0;function Y(e=De,t=globalThis.localStorage){return{isSeen:async n=>t.getItem(e+n)===`1`,markSeen:async n=>{t.setItem(e+n,`1`)}}}var X=e=>!e?.isConnected||getComputedStyle(e).visibility===`hidden`?!1:e.getClientRects().length>0,Z=e=>!!e&&(e.isContentEditable||/^(INPUT|TEXTAREA|SELECT)$/.test(e.tagName)),Q=()=>{let e=document.activeElement;for(;e?.shadowRoot?.activeElement;)e=e.shadowRoot.activeElement;return e},$=null;function Me(e){$||($=new CSSStyleSheet,$.replaceSync(W)),e.adoptedStyleSheets=[$]}var Ne=class extends e{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 > ${Te}`),e=>{let t={target:e.getAttribute(`target`)||``,title:e.getAttribute(`title`)||void 0,description:e.textContent.trim()};for(let[n,r]of Ae)e.hasAttribute(r)&&(t[n]=e.getAttribute(r));return t})}_store(){return this.seenStore?this.seenStore:this.getAttribute(`seen-store`)===`local`?Y():globalThis.window?.WUI?.tour?.seenStore||null}_label(e){return this.getAttribute(ke[e])||Oe[e]}_endDialogText(){return this.getAttribute(`end-dialog`)===`false`?null:{title:this._label(`endTitle`),message:this._label(`endMessage`),button:this._label(`endButton`)}}_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=Se(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);if(e===this._run){if(!n){this._finish(`noTargets`);return}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))}}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(await this._beforeStep(e,i),n!==this._run)return null;if(!e.target)return{index:i,target:null};let t=document.querySelector(e.target);if(X(t))return this._progress.position(i),{index:i,target:t};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-${++je}`,n=document.createElement(`div`);n.className=`wui-tour-layer`,n.innerHTML=` <div class="wui-tour-spot" aria-hidden="true"></div> <div class="wui-tour-card" role="dialog" aria-modal="true" 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="btn btn-sm btn-outline-secondary wui-tour-back"></button> <button type="button" class="btn btn-sm btn-primary wui-tour-next"></button> </div> </div> </div> <div class="visually-hidden" role="status" aria-live="polite"></div>`;let i=n;this._shadow=null,this.isolated&&(i=document.createElement(Ee),this._shadow=i.attachShadow({mode:`open`}),Me(this._shadow),this._shadow.appendChild(n)),document.body.appendChild(i),document.documentElement.setAttribute(r,``),this._outer=i,this._layer=n,this._spot=n.querySelector(`.wui-tour-spot`),this._card=n.querySelector(`.wui-tour-card`),this._live=n.querySelector(`[role=status]`),this._card.querySelector(`.wui-tour-skip`).addEventListener(`click`,()=>this._close(`skipped`,`button`)),this._card.querySelector(`.wui-tour-back`).addEventListener(`click`,()=>this._move(-1)),this._card.querySelector(`.wui-tour-next`).addEventListener(`click`,()=>this._move(1)),this._shadow&&this._card.removeAttribute(`aria-modal`),this._onKey=e=>this._key(e),this._onFocusIn=e=>{if(!this._layer||this._ending)return;let t=this._current,n=t?this._steps[t.index]:null;_(this._layer,n,t?.target??null,e.target)||this._card.focus()},document.addEventListener(`keydown`,this._onKey,!0),this._shadow||document.addEventListener(`focusin`,this._onFocusIn),t(i,()=>this._follow())}_active(){return this._shadow?this._shadow.activeElement:document.activeElement}_show(e){this._current=e;let{index:t,target:n}=e,r=this._steps[t],i=this._card,a=this._progress.position(t),o=this._progress.total(),s=a===o&&!this._endDialogText(),c=Ce(this,a,o);we(i,{text:c,position:a,total:o}),be(i,r,{pause:this._label(`mediaPause`),play:this._label(`mediaPlay`)});let l=h(this,{layer:this._layer,spot:this._spot,card:i},r,n),u=i.querySelector(`.wui-tour-title`);u.textContent=r.title||``,u.hidden=!r.title,i.querySelector(`.wui-tour-text`).textContent=r.description||``,i.querySelector(`.wui-tour-skip`).textContent=this._label(`skip`),i.querySelector(`.wui-tour-back`).textContent=this._label(`back`),i.querySelector(`.wui-tour-back`).hidden=t<=this._firstIndex,i.querySelector(`.wui-tour-next`).textContent=this._label(s?`done`:`next`);let d=[c,r.title,r.description].filter(Boolean).join(`. `);this._live.textContent=l?[d,l].join(/[.!?]$/.test(d)?` `:`. `):d,le(i,n),this._spot.removeAttribute(q),this._place(),C(i),this._unbindAdvance?.(),this._unbindAdvance=g(r,n,()=>this._move(1));let f=this._active();(i.contains(f)?!f.hidden:this._shadow!==null&&Z(Q()))||i.focus(),this.dispatchEvent(new CustomEvent(`wui-tour:step`,{bubbles:!0,detail:{step:r,index:t,position:a,total:o}}))}_place(){!this._current||!this._layer||P(this._spot,this._card,this._current.target)}_follow(){if(!this._current||!this._layer||this._ending)return;let e=this._spot.style.cssText;this._place(),this._spot.style.cssText!==e&&this._spot.setAttribute(q,``)}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=w(this._card);if(e&&await e,n!==this._run)return;this._show(r)}else if(t>0){let e=this._endDialogText();if(e&&await this._showEnd(e),n!==this._run)return;await this._close(`finished`)}}finally{this._moving=!1}}_showEnd(e){return this._unbindAdvance?.(),this._unbindAdvance=null,h(this,{layer:this._layer,spot:this._spot,card:this._card},null,null),this._spot.removeAttribute(q),this._ending=new AbortController,this._seenMark=this._markSeen(`finished`),U(this._layer,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(Z(e.composedPath?.()[0]??e.target))return;e.preventDefault(),e.key===`ArrowRight`?this._move(1):this._current.index>this._firstIndex&&this._move(-1)}else if(e.key===`Tab`&&!this._shadow){let{index:t,target:n}=this._current;ee(e,{card:this._card,active:this._active(),step:this._steps[t],target:n})}}}_teardown(){if(!this._layer)return;document.removeEventListener(`keydown`,this._onKey,!0),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,n(this._outer),oe(this._outer),document.documentElement.removeAttribute(r),this._outer=null,this._shadow=null,this._layer=null,this._current=null;let t=this._returnFocus;this._returnFocus=null,e&&t?.isConnected&&t.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()}:J,a=this._seenMark;this._teardown();try{n===this._run&&await(a??this._markSeen(e))}finally{this._finish(e,i,t)}}_finish(e,t=J,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}}))}};export{Y as n,Ne as t};