@webority/ui-elements 0.68.0 → 0.68.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/ui-elements.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./elementBase-BlsR4tqa.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-BQiDpsTJ.js";import{n as h,t as g}from"./filterPopover-B4nw2nUP.js";import{a as _,c as v,d as y,f as b,h as x,i as S,l as ee,m as te,n as ne,o as re,p as ie,r as ae,s as oe,t as se,u as ce}from"./formatters-BAE__8ye.js";import{A as le,C as ue,D as de,E as fe,M as pe,O as me,S as he,T as ge,_ as _e,a as ve,b as ye,c as be,d as xe,f as Se,g as Ce,h as we,i as Te,j as Ee,k as De,l as Oe,m as ke,n as Ae,o as je,p as Me,r as Ne,s as Pe,t as Fe,u as Ie,v as Le,w as Re,x as ze,y as Be}from"./dataTable-Cd_IJQcs.js";import{t as Ve}from"./iconGlyphs.g-CUm_mfze.js";import{C as He,S as Ue,T as We,_ as Ge,a as Ke,b as qe,c as C,d as Je,f as Ye,g as Xe,h as Ze,i as Qe,l as $e,m as et,n as tt,o as w,p as nt,r as rt,s as it,t as at,u as ot,v as st,w as ct,x as lt,y as ut}from"./wuiHttp-0pGmgUIV.js";import{_ as dt,a as ft,b as pt,c as mt,d as ht,f as gt,g as _t,h as vt,i as yt,l as bt,m as xt,n as St,o as Ct,p as wt,r as Tt,s as Et,t as Dt,u as Ot,v as kt,y as At}from"./kanban-DclZZohi.js";import{n as jt,t as Mt}from"./statusIcons-2X4iGkKL.js";import{o as Nt}from"./optionLabel-BBaur8Bs.js";import{t as Pt}from"./WuiAutocomplete-5pVUMbGl.js";import{t as Ft}from"./WuiCarousel-C33Z8FBt.js";import{t as It}from"./WuiCodeBlock-BcLJhLBJ.js";import{n as Lt,t as Rt}from"./copyText-DM5HhXjf.js";import{t as zt}from"./textMatch-wdY7XLIc.js";import{t as Bt}from"./WuiCommandPalette-CcmFOWNc.js";import{i as Vt,n as Ht,r as Ut,t as Wt}from"./WuiCommentThread-BrCd4o4b.js";import{t as Gt}from"./WuiConsentBanner-C2jOIeQK.js";import{t as Kt}from"./WuiContextMenu-CBy0O4HT.js";import{t as qt}from"./WuiSelect-C-NN9ZSX.js";import{t as Jt}from"./WuiCountrySelect-B4O8uijt.js";import{t as Yt}from"./WuiDataTable-Bqs6FW2t.js";import{t as Xt}from"./WuiDatePicker-CeqLTVTD.js";import{t as Zt}from"./WuiDateRange-Bk45QgnB.js";import{t as Qt}from"./WuiDock-BD2HgMmP.js";import{t as $t}from"./WuiDrawer-D6K2eRlW.js";import{t as en}from"./WuiHoverCard-BsYAwmbA.js";import{t as tn}from"./WuiImageCrop-Cr3D2iPo.js";import{a as nn,i as rn,n as an,r as on,t as sn}from"./WuiInlineEdit-2XnVPzY-.js";import{t as cn}from"./WuiLightbox-hluak_-q.js";import{a as ln,c as un,i as dn,l as fn,n as pn,o as mn,r as hn,s as gn,t as _n,u as vn}from"./WuiMentionInput-U87MXi2S.js";import{t as yn}from"./WuiMenubar-D2tb_3eU.js";import{t as bn}from"./WuiMultiSelect-CR4meVOZ.js";import{t as xn}from"./WuiNavigationMenu-BsLnvz2Y.js";import{a as Sn,c as Cn,i as wn,n as Tn,o as En,r as Dn,s as On,t as kn}from"./notificationDays-pYmoU0g6.js";import{t as An}from"./WuiNotificationCenter-BLsM1WkE.js";import{t as jn}from"./WuiOnboardingChecklist-s2DG6PZ0.js";import{t as Mn}from"./WuiOtp-BbO_75RB.js";import{t as Nn}from"./WuiOverflow-CB3j6q6n.js";import{t as Pn}from"./WuiPhone-Cbt2ekvK.js";import{t as Fn}from"./WuiRating-BzeW6iDC.js";import{t as In}from"./WuiRecordPager-yXv4g2ZR.js";import{n as Ln,r as Rn,t as zn}from"./WuiRelativeTime-Cfc8TMd8.js";import{t as Bn}from"./WuiResizable-m2Ypa-zD.js";import{t as Vn}from"./WuiRollingNumber-DBgi_3l7.js";import{t as Hn}from"./WuiShortcuts-CMibF1XM.js";import{t as Un}from"./WuiShowMore-Bu7IQcXS.js";import{t as Wn}from"./WuiSlider-Br6V2amU.js";import{t as Gn}from"./WuiSortable-Bd7Fz5Ox.js";import{t as Kn}from"./WuiTagInput-DQ79rmjZ.js";import{t as qn}from"./WuiTimePicker-F0KkpOGq.js";import{n as Jn,t as Yn}from"./WuiTour-DW3kPaR9.js";import{t as Xn}from"./WuiTree-BSx5pKJo.js";import{t as Zn}from"./WuiTruncate-BLl2u3b-.js";import{n as Qn,t as $n}from"./WuiWhatsNew-BO78119Z.js";import{n as er,t as tr}from"./WuiWizardStep-DIHxrXn9.js";import{$ as nr,A as rr,B as ir,C as ar,D as or,E as sr,F as cr,G as lr,H as ur,I as dr,J as fr,K as pr,L as mr,M as hr,N as gr,O as _r,P as vr,Q as yr,R as br,S as xr,T as Sr,U as Cr,V as wr,W as Tr,X as Er,Y as Dr,Z as Or,_ as kr,a as Ar,at as jr,b as Mr,c as Nr,d as Pr,et as Fr,f as Ir,g as Lr,h as Rr,i as zr,it as Br,j as Vr,k as Hr,l as Ur,m as Wr,n as Gr,nt as Kr,o as qr,ot as Jr,p as Yr,q as Xr,r as Zr,rt as Qr,s as $r,t as ei,tt as ti,u as ni,v as ri,w as ii,x as ai,y as oi,z as si}from"./themeTransition-Bzcxp2cy.js";var ci=`/`,li=`.search-wrap.wui-search-collapsible`,ui=`.wui-topsearch-panel`,di=`.modal, wui-drawer[open]`,fi=new WeakSet,T=e=>e.querySelector(`.wui-search-toggle`),E=e=>e.querySelector(`.search-input`);function pi(e){e.classList.remove(`is-collapsed`),T(e)?.setAttribute(`aria-expanded`,`true`),E(e)?.focus()}function D(e){E(e)?.value||(e.classList.add(`is-collapsed`),T(e)?.setAttribute(`aria-expanded`,`false`))}function mi(e){if(e.dataset.wuiCollapseWired)return;e.dataset.wuiCollapseWired=`1`;let t=T(e),n=E(e);t?.addEventListener(`click`,()=>pi(e)),n?.addEventListener(`keydown`,r=>{r.key!==`Escape`||n.value||(r.preventDefault(),D(e),t?.focus())}),e.addEventListener(`focusout`,t=>{e.contains(t.relatedTarget)||D(e)})}function hi(e){fi.has(e)||(fi.add(e),e.addEventListener(`keydown`,t=>{if(t.key!==`/`||t.ctrlKey||t.altKey||t.metaKey||t.defaultPrevented||o(t.target)||t.target?.closest?.(di)||e.querySelector(ui))return;let n=[...e.querySelectorAll(li)].find(e=>e.offsetParent!==null);n&&(t.preventDefault(),pi(n))}))}function gi(e=document){for(let t of e.querySelectorAll(li))mi(t);hi(e.ownerDocument??e)}var O=`wuiConfirm`,k=Object.freeze([`danger`]),A=Object.freeze([`success`,`info`,`warning`,`danger`]),j=`wui.flash`,M=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.`}),_i=new WeakSet,vi=new WeakSet,N=null,P=null,F=!1,yi=e=>{let t=document.createElement(`span`);return t.textContent=e??``,t.innerHTML},I=(e,t)=>{e&&window.WUI?.toast?.(e,{variant:t})},bi=()=>{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 xi(){let e=document.getElementById(O);return e||(e=document.createElement(`div`),e.id=O,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`,`${dt.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">${yi(M.cancelLabel)}</button><button type="button" class="btn btn-primary" data-app-confirm></button></div></div></div></div>`,document.body.appendChild(e),e)}function Si(e,t){let n=e.getAttribute(`data-wui-confirm-tone`);if(n!==null&&!k.includes(n))throw TypeError(`data-wui-confirm-tone="${n}" is not supported. Use danger, or leave it off.`);Ci({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 Ci({title:e,message:t,label:n,danger:r},i){let a=bi(),o=xi(),s=o.querySelector(`.wui-confirm-title`),c=o.querySelector(`[data-app-confirm]`);if(!s||!c)throw Error(`#${O} is not a confirm dialog with a confirm button. Render <app-confirm-dialog id="${O}"> 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||M.confirmTitle,l.textContent=t,c.textContent=n||M.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),P=i,F=!1,a.getOrCreateInstance(o).show()}var L=(e,t)=>{N=e;try{t()}finally{N=null}};function wi(e,{title:t,message:n,label:r,tone:i},a){if(i!=null&&!k.includes(i))throw TypeError(`confirmAction: tone "${i}" is not supported. Use danger, or leave it off.`);zi(e.ownerDocument),Ci({title:t,message:n,label:r,danger:i===`danger`},()=>L(e,a))}var Ti=e=>e.disabled===!0||e.getAttribute(`aria-disabled`)===`true`;function Ei(e){let t=e.target.closest?.(`[data-wui-confirm]:not(form)`);!t||t===N||Ti(t)||(e.preventDefault(),e.stopImmediatePropagation(),Si(t,()=>L(t,()=>t.click())))}function Di(e){let t=e.target;if(!(t instanceof HTMLFormElement)||!t.hasAttribute(`data-wui-confirm`)||t===N||e.submitter&&e.submitter===N)return;e.preventDefault(),e.stopImmediatePropagation();let n=e.submitter?.form===t?e.submitter:void 0;Si(t,()=>L(t,()=>t.requestSubmit(n)))}function Oi(e){let t=e.target.closest?.(`#${O} [data-app-confirm]`);!t||t.disabled||!P||(F=!0,bi().getOrCreateInstance(t.closest(`#${O}`)).hide())}function ki(e){if(e.target.id!==`wuiConfirm`)return;let t=F?P:null;P=null,F=!1,t?.()}var Ai=(e,t)=>{e&&window.sessionStorage.setItem(j,JSON.stringify({message:e,variant:t}))},ji=e=>e===`forbidden`?M.forbidden:e===`network`?M.network:M.failed;function Mi(){for(let e of document.querySelectorAll(`[data-wui-server]`))e.dataset.refreshOnSuccess!==`false`&&et(e)?.reload()}async function Ni(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 Pi(t,e)}async function Pi(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`)){Ai(i.message,a),i.redirect?window.location.assign(i.redirect):window.location.reload();return}if(t.disabled=!1,t.removeAttribute(`aria-busy`),i.ok){nt(i,a),Mi();return}I(i.message||ji(i.kind),`danger`)}function Fi(e){let t=e.target.closest?.(`[data-wui-post]`);t&&(e.preventDefault(),!(Ti(t)||t.getAttribute(`aria-busy`)===`true`)&&Ni(t).catch(e=>console.error(e)))}function Ii(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`&&(Pi(t.getAttribute(`action`),n,new FormData(t)).catch(e=>console.error(e)),window.bootstrap?.Dropdown?.getInstance(t.closest(`.dropdown`)?.querySelector(`[data-bs-toggle='dropdown']`))?.hide())}function Li(){let e=window.sessionStorage.getItem(j);if(!e)return;window.sessionStorage.removeItem(j);let{message:t,variant:n}=JSON.parse(e);I(t,n)}function Ri(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(!A.includes(t))throw TypeError(`data-wui-flash-variant="${t}" is not supported. Use ${A.join(`, `)}.`);let n=e.getAttribute(`data-wui-flash`)||e.textContent.trim();e.remove(),I(n,t)}}function zi(e){vi.has(e)||(vi.add(e),e.addEventListener(`click`,Oi),e.addEventListener(`hidden.bs.modal`,ki))}function Bi(e=document){let t=e.ownerDocument||e;_i.has(t)||(_i.add(t),t.addEventListener(`click`,Ei,!0),t.addEventListener(`submit`,Di,!0),zi(t),t.addEventListener(`click`,Fi),t.addEventListener(`submit`,Ii),Li()),Ri(e)}var R=Object.freeze({title:`Leave without saving?`,message:`Your changes on this page are not saved. If you leave now, they are lost.`,leaveLabel:`Leave`}),z=`form[data-wui-unsaved]`,Vi=`[aria-invalid="true"], .field-error:not(:empty), .field-validation-error, .validation-summary-errors, .wui-error-summary`,Hi=`[download], [data-wui-modal], [data-wui-post], [data-bs-toggle]`,Ui=new Set([`submit`,`button`,`reset`,`image`]),B=new WeakMap,Wi=new WeakSet,Gi=e=>`${e.name}:${e.size}:${e.lastModified}`;function V(e){let t=[];for(let n of e.elements)!n.name||n.disabled||Ui.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(Gi)]):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 H(e){return V(e)}var Ki=e=>({saved:e.querySelector(Vi)?null:V(e),engaged:!1,discarded:!1});function qi(e){let t=B.get(e);return!t||t.discarded||!e.isConnected?!1:t.saved===null||t.engaged&&V(e)!==t.saved}var U=(e,t)=>[...e.querySelectorAll(z)].filter(e=>e!==t&&qi(e)),Ji=()=>!!window.bootstrap?.Modal;function Yi(e,t,n){let r=t.map(e=>e.getAttribute(`data-wui-unsaved`)).find(Boolean)||R.message;wi(e,{title:R.title,message:r,label:R.leaveLabel,tone:`danger`},()=>{for(let e of t)B.get(e).discarded=!0;n()})}function Xi(e){if(e.matches(Hi))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 Zi(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 Qi(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||!Xi(t))return;let n=U(t.ownerDocument,null);!n.length||!Ji()||(e.preventDefault(),Yi(t,n,()=>t.click()))}function $i(e){let t=e.target;if(!(t instanceof HTMLFormElement)||e.defaultPrevented||!Zi(t,e.submitter))return;let n=U(t.ownerDocument,t);if(n.length&&Ji()){e.preventDefault();let r=e.submitter?.form===t?e.submitter:void 0;Yi(t,n,()=>t.requestSubmit(r));return}let r=B.get(t);r&&(r.saved=V(t),r.discarded=!1)}function ea(e){U(document,null).length&&(e.preventDefault(),e.returnValue=``)}function ta(e){let t=e.target.closest?.(z),n=t&&B.get(t);!n||n.engaged||(n.saved!==null&&(n.saved=V(t)),n.engaged=!0)}function na(e){let t=e.target.closest?.(z),n=t&&B.get(t);n&&(n.discarded=!1,e.isTrusted&&(n.engaged=!0))}function ra(e){let t=e.detail?.handle?.el;if(t instanceof Element)for(let e of t.querySelectorAll(z))aa(e)}function ia(e=document){let t=e.ownerDocument||e;if(!Wi.has(t)){Wi.add(t);for(let e of[`focusin`,`pointerdown`,`drop`])t.addEventListener(e,ta,!0);for(let e of[`input`,`change`])t.addEventListener(e,na,!0);t.addEventListener(`click`,Qi),t.addEventListener(`submit`,$i),t.addEventListener(`wui:modal:success`,ra),t.defaultView.addEventListener(`beforeunload`,ea)}let n=[...e.querySelectorAll?.(z)||[]];e.matches?.(z)&&n.unshift(e);for(let e of n)B.has(e)||B.set(e,Ki(e))}function aa(e){if(!(e instanceof HTMLFormElement)||!e.matches(z))throw TypeError(`resetUnsavedChanges: ${String(e)} is not a <form data-wui-unsaved>.`);B.set(e,{saved:V(e),engaged:!1,discarded:!1})}var W=Object.freeze({discard:`Discard`,keep:`Keep editing`}),oa=`wui:drawer:discard`,G=`wui-drawer[confirm-discard]`,K=`.wui-modal-shell`,q=`form[data-wui-confirm-discard]`,J=`.wui-drawer-discard`,sa=`input, select, textarea`,Y=new WeakMap,ca=new WeakSet,la=new WeakSet;function ua(e,t,n,r){let i=e.createElement(`button`);return i.type=`button`,i.className=t,i.setAttribute(n,``),i.textContent=r,i}function da(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,ua(e,`btn btn-danger btn-sm`,`data-wui-discard-confirm`,W.discard),ua(e,`btn btn-secondary btn-sm`,`data-wui-discard-keep`,W.keep)),n}function fa(e){let t=e.closest?.(G);if(t)return t;let n=e.closest?.(K);return n?.querySelector(q)?n:null}function X(e){return e.closest(G)??e.closest(K)}function Z(e){return e.matches(G)?e.querySelectorAll(`form`):e.querySelectorAll(q)}function pa(e){let t=Y.get(e);return t!=null&&H(e)!==t}function ma(e){let t=e.ownerDocument.createElement(`div`);return t.className=`wui-drawer-footer`,e.querySelector(`.wui-drawer-panel`).append(t),la.add(t),t}function ha(e){e.querySelector(`[data-wui-discard-confirm]`).focus()}function ga(e,t){let n=e.querySelector(J);if(n){ha(n);return}let r=da(e.ownerDocument,t),i;if(e.matches(G))i=e.querySelector(`.wui-drawer-footer`)??ma(e),i.prepend(r);else{let t=e.querySelector(q);i=t.querySelector(`.modal-footer`),i?i.prepend(r):(i=t,t.append(r))}i.classList.add(`wui-drawer-discarding`),ha(r)}function _a(e){let t=e.parentElement;e.remove(),t.classList.remove(`wui-drawer-discarding`),la.has(t)&&t.remove()}function va(e){for(let t of Z(e)){let e=[...t.querySelectorAll(sa)].find(e=>e.type!==`hidden`&&!e.disabled);if(e){e.focus();return}}}function ya(e){let t=fa(e.target);if(t)for(let e of Z(t))Y.get(e)??Y.set(e,H(e))}function ba(e){let t=e.target;!(t instanceof HTMLFormElement)||!fa(t)||Y.set(t,H(t))}function xa(e){let t=e.detail?.handle?.el;if(t instanceof Element)for(let e of t.querySelectorAll(`form`))Y.delete(e)}function Sa(e){let t=e.target;!(t instanceof Element)||!t.matches(G)||[...Z(t)].some(pa)&&(e.preventDefault(),ga(t,t.getAttribute(`confirm-discard`)))}function Ca(e){let t=e.target;if(!(t instanceof Element)||!t.matches(K))return;let n=[...Z(t)].find(pa);n&&(e.preventDefault(),ga(t,n.getAttribute(`data-wui-confirm-discard`)))}function wa(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(K);n&&window.bootstrap?.Modal?.getInstance(n)?.hide()}function Ta(e){let t=e.closest(J),n=X(t);_a(t);for(let e of Z(n))Y.set(e,H(e));n.dispatchEvent(new CustomEvent(oa,{bubbles:!0})),n.matches(G)?n.hide():window.bootstrap.Modal.getInstance(n).hide()}function Ea(e){let t=e.closest(J),n=X(t);_a(t),va(n)}function Da(e){let t=e.target,n=t.closest?.(`[data-wui-discard-confirm]`);if(n){Ta(n);return}let r=t.closest?.(`[data-wui-discard-keep]`);if(r){Ea(r);return}let i=t.closest?.(`[data-wui-dismiss]`);i&&wa(i)}function Oa(e){if(e.key!==`Escape`)return;let t=e.currentTarget.querySelector(J);if(!t)return;e.preventDefault(),e.stopPropagation();let n=X(t);_a(t),va(n)}function ka(e=document){let t=e.ownerDocument||e;ca.has(t)||(ca.add(t),t.addEventListener(`focusin`,ya),t.addEventListener(`pointerdown`,ya),t.addEventListener(`submit`,ba),t.addEventListener(`wui:modal:success`,xa),t.addEventListener(`wui:modal:loaded`,xa),t.addEventListener(`wui-drawer-close`,Sa,!0),t.addEventListener(`hide.bs.modal`,Ca),t.addEventListener(`click`,Da),t.addEventListener(`keydown`,Oa,!0))}var Aa=`data-wui-bulk-in-bar`,ja=`[data-wui-page-header-bar][data-wui-bulk-for]`,Ma=new WeakSet;function Na(e){return`${b(e,{decimals:0})} selected`}function Pa(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?Na(t):``)}function Fa(e=document){for(let t of e.querySelectorAll(ja))document.getElementById(t.dataset.wuiBulkFor)?.setAttribute(Aa,``);Ma.has(document)||(Ma.add(document),document.addEventListener(`selectionchange`,e=>{if(typeof e.detail?.selected==`number`)for(let t of document.querySelectorAll(ja))document.getElementById(t.dataset.wuiBulkFor)?.contains(e.target)&&Pa(t,e.detail.selected)}))}var Ia=31536e3,Q=new WeakMap,La=e=>e>99?`99+`:String(e);function Ra(e,t,n=document){n.cookie=`${e}=${t?`1`:`0`}; Path=/; Max-Age=${Ia}; SameSite=Lax`}var za=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 Ba(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=La(o),r.hidden=o===0),n?.setAttribute(`aria-label`,o===0?l:`${l}, ${La(o)} unread`),a&&s&&i&&(i.textContent=o===0?`No unread notifications`:`${La(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=za(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 Va=e=>!!e&&(e.isContentEditable||/^(INPUT|TEXTAREA|SELECT)$/.test(e.tagName)),Ha=(e,t,n)=>`${e}${e.includes(`?`)?`&`:`?`}${encodeURIComponent(t)}=${encodeURIComponent(n)}`;function Ua(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(Ha(o,s,t));if(!(n.kind===`aborted`||n.kind===`stale`||n.kind===`session`)){if(e.classList.remove(`is-loading`),n.ok){let e=za(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(Ha(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||Va(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 Wa(e){let t=[],n=e.dataset.wuiCollapsedCookie;n&&e.addEventListener(`wui:shell:collapse`,e=>Ra(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?Ba(r,t):null,a=e.querySelector(`[data-wui-topsearch]`);a&&Ua(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)}};Q.set(e,o);let s=n=>{if(n.target===e||n.target.contains?.(e)){for(let e of t)e();Q.delete(e),delete e.dataset.wuiPartsWired,document.removeEventListener(`wui:teardown`,s)}};return document.addEventListener(`wui:teardown`,s),o}function Ga(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`,Wa(e))}function Ka(e){let t=e?.closest?.(`[data-app-shell]`)??null;return t?(Q.has(t)||Ga(t),Q.get(t)??null):null}function qa(){h(),e(`wui-select`,qt),e(`wui-country-select`,Jt),e(`wui-phone`,Pn),e(`wui-datepicker`,Xt),e(`wui-date-range`,Zt),e(`wui-dock`,Qt),e(`wui-image-crop`,tn),e(`wui-kanban`,mt),e(`wui-inline-edit`,rn),e(`wui-consent-banner`,Gt),e(`wui-slider`,Wn),e(`wui-sortable`,Gn),e(`wui-timepicker`,qn),e(`wui-tour`,Yn),e(`wui-tree`,Xn),e(`wui-autocomplete`,Pt),e(`wui-command-palette`,Bt),e(`wui-context-menu`,Kt),e(`wui-multiselect`,bn),e(`wui-taginput`,Kn),e(`wui-otp`,Mn),e(`wui-status-icon`,jt),e(`wui-shortcuts`,Hn),e(`wui-record-pager`,In),e(`wui-carousel`,Ft),e(`wui-code-block`,It),e(`wui-data-table`,Yt),e(`wui-drawer`,$t),e(`wui-hover-card`,en),e(`wui-lightbox`,cn),e(`wui-menubar`,yn),e(`wui-navigation-menu`,xn),e(`wui-notification-center`,An),e(`wui-onboarding-checklist`,jn),e(`wui-overflow`,Nn),e(`wui-rating`,Fn),e(`wui-relative-time`,zn),e(`wui-resizable`,Bn),e(`wui-rolling-number`,Vn),e(`wui-show-more`,Un),e(`wui-truncate`,Zn),e(`wui-whats-new`,Qn),e(`wui-mention-input`,dn),e(`wui-comment-thread`,Vt),e(`wui-wizard-step`,tr),e(`wui-wizard`,er)}qa();export{yr as AVATAR_ACCEPT,nr as AVATAR_MAX_SIZE_MB,Fr as AVATAR_OUTPUT_SIZE,ti as AVATAR_OUTPUT_TYPE,Kr as AVATAR_PREVIEW_SIZES,Qr as AVATAR_TEXT,Aa as BAR_BULK_IN_BAR_ATTRIBUTE,Fe as COLUMN_MAX_WIDTH,Ae as COLUMN_MIN_WIDTH,Wt as COMMENT_INTENTS,Ht as COMMENT_REACTIONS,Ut as COMMENT_TEXT,O as CONFIRM_DIALOG_ID,k as CONFIRM_TONES,Rt as COPY_FEEDBACK_MS,at as CSRF_META_NAME,se as CURRENCIES,Ne as DATA_TABLE_TEXT,ne as DATE_PATTERNS,tt as DEFAULT_CSRF_HEADER,Tr as DEFAULT_IMAGE_ACCEPT,lr as DEFAULT_MAX_SIZE_MB,Hr as DEFAULT_PASSWORD_RULES,rr as DEFAULT_REQUIREMENTS_TITLE,ei as DEFAULT_THEME_EFFECT,Gr as DEFAULT_THEME_STORAGE_KEY,oa as DISCARD_EVENT,W as DISCARD_TEXT,xr as DROP_OVER_CLASS,ae as DURATION_UNITS,S as EMPTY_VALUE,g as FILTER_POPOVER_MAX_CHIPS,j as FLASH_STORAGE_KEY,A as FLASH_VARIANTS,_ as FORMAT_STYLES,rt as HTTP_KINDS,sn as INLINE_EDIT_SAVED_MS,an as INLINE_EDIT_TEXT,on as INLINE_EDIT_TYPES,re as IST_TIME_ZONE,Dt as KANBAN_DRAG_THRESHOLD_PX,St as KANBAN_LONG_PRESS_MS,Tt as KANBAN_PHONE_QUERY,yt as KANBAN_STORAGE_PREFIX,ft as KANBAN_SUMMARY_FORMATS,Ct as KANBAN_TEXT,Et as KANBAN_TONES,p as LIST_KEYS,vr as MASK_INPUT_TYPES,cr as MASK_NAMES,ln as MENTION_ID_PATTERN,_n as MENTION_MAX_QUERY,pn as MENTION_MAX_RESULTS,hn as MENTION_TEXT,oe as MONEY_UNITS,kn as NOTIFICATION_COUNT_CAP,Tn as NOTIFICATION_TEXT,Te as PIN_AT_VAR,ve as PIN_SIDES,je as RESIZE_STEP,Pe as RESIZE_STEP_LARGE,ar as ROW_DRAG_TYPE,ii as ROW_DROP_EVENT,be as ROW_HEIGHTS,Oe as ROW_MOVE_LIMIT,Ie as ROW_MOVE_MS,xe as ROW_SAVE_ATTR,Se as ROW_SAVE_ERROR_CLASS,Me as ROW_SAVE_STATES,oi as SCROLL_EDGE_SELECTOR,ci as SEARCH_OPEN_KEY,Xe as SELECT_ALL_LABEL,Ge as SELECT_CELL_CLASS,c as SELECT_KEY,st as SELECT_ROW_LABEL,M as SERVER_ACTION_TEXT,d as SHORTCUTS_OFF_ATTRIBUTE,a as SHORTCUT_EVENT,t as SHORTCUT_SCOPE_ATTRIBUTE,l as SHORTCUT_TEXT,Mt as STATUS_TONES,Zr as THEME_BOOT_SCRIPT_BODY,zr as THEME_CHANGE_EVENT,Ar as THEME_EFFECTS,qr as THEME_EFFECT_DURATION,$r as THEME_LIVE_NAME,Nr as THEME_MODES,Ur as THEME_SWITCHING_CLASS,$e as TOAST_ACTION_METHODS,ot as TOAST_ACTION_MS,R as UNSAVED_TEXT,ke as VIRTUAL_OVERSCAN,$n as WHATS_NEW_READ_EVENT,Qe as WUI_HEADERS,Pt as WuiAutocomplete,Ft as WuiCarousel,It as WuiCodeBlock,Bt as WuiCommandPalette,Vt as WuiCommentThread,Gt as WuiConsentBanner,Kt as WuiContextMenu,Jt as WuiCountrySelect,Yt as WuiDataTable,Xt as WuiDatePicker,Zt as WuiDateRange,Qt as WuiDock,$t as WuiDrawer,en as WuiHoverCard,tn as WuiImageCrop,rn as WuiInlineEdit,mt as WuiKanban,cn as WuiLightbox,dn as WuiMentionInput,yn as WuiMenubar,bn as WuiMultiSelect,xn as WuiNavigationMenu,An as WuiNotificationCenter,jn as WuiOnboardingChecklist,Mn as WuiOtp,Nn as WuiOverflow,Pn as WuiPhone,Fn as WuiRating,In as WuiRecordPager,zn as WuiRelativeTime,Bn as WuiResizable,Vn as WuiRollingNumber,qt as WuiSelect,Hn as WuiShortcuts,Un as WuiShowMore,Wn as WuiSlider,Gn as WuiSortable,jt as WuiStatusIcon,Kn as WuiTagInput,qn as WuiTimePicker,Yn as WuiTour,Xn as WuiTree,Zn as WuiTruncate,Qn as WuiWhatsNew,er as WuiWizard,tr as WuiWizardStep,pr as acceptLabel,ut as addRowSelectCells,qe as addSelectColumn,Pa as applyBarBulk,ni as applyTheme,f as ariaKeyShortcuts,dr as attachInputMask,Sr as attachRowDrag,Mr as attachScrollEdges,lt as attachShiftRange,Br as avatarCropOptions,jr as avatarUnreadableMessage,Na as barBulkCountText,Vr as buildPasswordRules,we as clampColumnWidth,Ke as classifyStatus,D as collapseSearch,wi as confirmAction,Lt as copyTextToClipboard,da as createDiscardPrompt,Jn as createLocalSeenStore,w as createRequestQueue,Ue as createSelectHeaderCell,He as createSelectRowCell,ct as createSelectSpacerCell,qa as defineWeborityElements,hr as evaluatePassword,H as formValues,v as formatCompact,ee as formatCurrency,ce as formatDate,y as formatDuration,mr as formatMasked,b as formatNumber,ie as formatPercent,Ln as formatRelativeTime,te as formatValue,et as getServerTable,Ka as getShell,Ve as glyphSvg,Ce as groupCount,_e as groupItems,Dn as groupNotificationsByDay,Le as identityCell,n as inShortcutScope,gi as initCollapsibleSearch,ka as initDrawerDiscard,br as initInputMasks,Fa as initPageBarBulk,kt as initRemoteModals,sr as initRowDrag,ai as initScrollEdges,Bi as initServerActions,Ze as initServerTables,Ga as initShellParts,ia as initUnsavedChanges,nn as inlineEditText,Jr as isHeicFile,Xr as isImageFile,fr as isImageOnlyAccept,si as isMaskPattern,Dr as isPdfFile,o as isTypingTarget,bt as kanbanCardLabel,Ot as kanbanOverflow,ht as kanbanStorageKey,gt as kanbanSummaryFormat,wt as kanbanVisibleLimit,At as loadRemoteDrawer,pt as loadRemoteModal,ir as maskedPostValue,zt as matchSegments,Er as matchesAccept,Be as measureRows,mn as mentionLabel,gn as mentionTextFromValue,un as mentionValueFromText,fn as mentionedIds,m as moveFocus,Pr as nextTheme,wn as notificationCountText,Sn as notificationDayHeading,En as notificationTime,On as notificationTriggerLabel,Cn as notificationUnreadAnnouncement,pi as openSearch,vn as parseMentionValue,Je as parseToastAction,gr as passwordSatisfies,ye as pinAtValue,ze as pinClasses,he as pinOffsetVar,ue as planPins,Re as playRowMoves,wr as postedMasked,ur as rawMasked,ge as readColumnWidths,it as readCsrf,xt as readKanbanCollapsed,Ir as readStoredTheme,Rn as relativeTimeTitle,aa as resetUnsavedChanges,Cr as resolveMask,Yr as resolveTheme,fe as rowLabel,de as rowOrderChanged,r as runShortcut,Ye as runToastAction,me as saveOutcomeText,De as setRowSaveState,le as settledRows,i as shortcutKey,u as shortcutName,s as shortcutsOff,nt as showResultToast,Wr as storeTheme,vt as sumKanbanValues,We as syncSelectAll,or as syncTargets,Rr as themeBootScript,Lr as themeKeyframes,_r as tickedKeys,x as toInstant,kr as transitionTheme,Or as validateFile,Ee as virtualRange,ri as watchSystemTheme,Nt as withTrustedLabel,pe as writeColumnWidths,_t as writeKanbanCollapsed,C as wuiFetch};
|
|
1
|
+
import{n as e}from"./elementBase-BlsR4tqa.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-BQiDpsTJ.js";import{n as h,t as g}from"./filterPopover-B4nw2nUP.js";import{a as _,c as v,d as y,f as b,h as x,i as S,l as ee,m as te,n as ne,o as re,p as ie,r as ae,s as oe,t as se,u as ce}from"./formatters-BAE__8ye.js";import{A as le,C as ue,D as de,E as fe,M as pe,O as me,S as he,T as ge,_ as _e,a as ve,b as ye,c as be,d as xe,f as Se,g as Ce,h as we,i as Te,j as Ee,k as De,l as Oe,m as ke,n as Ae,o as je,p as Me,r as Ne,s as Pe,t as Fe,u as Ie,v as Le,w as Re,x as ze,y as Be}from"./dataTable-Cd_IJQcs.js";import{t as Ve}from"./iconGlyphs.g-CUm_mfze.js";import{C as He,S as Ue,T as We,_ as Ge,a as Ke,b as qe,c as C,d as Je,f as Ye,g as Xe,h as Ze,i as Qe,l as $e,m as et,n as tt,o as w,p as nt,r as rt,s as it,t as at,u as ot,v as st,w as ct,x as lt,y as ut}from"./wuiHttp-0pGmgUIV.js";import{_ as dt,a as ft,b as pt,c as mt,d as ht,f as gt,g as _t,h as vt,i as yt,l as bt,m as xt,n as St,o as Ct,p as wt,r as Tt,s as Et,t as Dt,u as Ot,v as kt,y as At}from"./kanban-DclZZohi.js";import{n as jt,t as Mt}from"./statusIcons-2X4iGkKL.js";import{o as Nt}from"./optionLabel-BBaur8Bs.js";import{t as Pt}from"./WuiAutocomplete-5pVUMbGl.js";import{t as Ft}from"./WuiCarousel-C33Z8FBt.js";import{t as It}from"./WuiCodeBlock-BcLJhLBJ.js";import{n as Lt,t as Rt}from"./copyText-DM5HhXjf.js";import{t as zt}from"./textMatch-wdY7XLIc.js";import{t as Bt}from"./WuiCommandPalette-CcmFOWNc.js";import{i as Vt,n as Ht,r as Ut,t as Wt}from"./WuiCommentThread-BrCd4o4b.js";import{t as Gt}from"./WuiConsentBanner-C2jOIeQK.js";import{t as Kt}from"./WuiContextMenu-CBy0O4HT.js";import{t as qt}from"./WuiSelect-C-NN9ZSX.js";import{t as Jt}from"./WuiCountrySelect-B4O8uijt.js";import{t as Yt}from"./WuiDataTable-Bqs6FW2t.js";import{t as Xt}from"./WuiDatePicker-CeqLTVTD.js";import{t as Zt}from"./WuiDateRange-Bk45QgnB.js";import{t as Qt}from"./WuiDock-BD2HgMmP.js";import{t as $t}from"./WuiDrawer-D6K2eRlW.js";import{t as en}from"./WuiHoverCard-BsYAwmbA.js";import{t as tn}from"./WuiImageCrop-Cr3D2iPo.js";import{a as nn,i as rn,n as an,r as on,t as sn}from"./WuiInlineEdit-2XnVPzY-.js";import{t as cn}from"./WuiLightbox-hluak_-q.js";import{a as ln,c as un,i as dn,l as fn,n as pn,o as mn,r as hn,s as gn,t as _n,u as vn}from"./WuiMentionInput-U87MXi2S.js";import{t as yn}from"./WuiMenubar-D2tb_3eU.js";import{t as bn}from"./WuiMultiSelect-CR4meVOZ.js";import{t as xn}from"./WuiNavigationMenu-BsLnvz2Y.js";import{a as Sn,c as Cn,i as wn,n as Tn,o as En,r as Dn,s as On,t as kn}from"./notificationDays-pYmoU0g6.js";import{t as An}from"./WuiNotificationCenter-BLsM1WkE.js";import{t as jn}from"./WuiOnboardingChecklist-s2DG6PZ0.js";import{t as Mn}from"./WuiOtp-BbO_75RB.js";import{t as Nn}from"./WuiOverflow-CB3j6q6n.js";import{t as Pn}from"./WuiPhone-Cbt2ekvK.js";import{t as Fn}from"./WuiRating-BzeW6iDC.js";import{t as In}from"./WuiRecordPager-yXv4g2ZR.js";import{n as Ln,r as Rn,t as zn}from"./WuiRelativeTime-Cfc8TMd8.js";import{t as Bn}from"./WuiResizable-m2Ypa-zD.js";import{t as Vn}from"./WuiRollingNumber-DBgi_3l7.js";import{t as Hn}from"./WuiShortcuts-CMibF1XM.js";import{t as Un}from"./WuiShowMore-Bu7IQcXS.js";import{t as Wn}from"./WuiSlider-Br6V2amU.js";import{t as Gn}from"./WuiSortable-Bd7Fz5Ox.js";import{t as Kn}from"./WuiTagInput-DQ79rmjZ.js";import{t as qn}from"./WuiTimePicker-F0KkpOGq.js";import{n as Jn,t as Yn}from"./WuiTour-DW3kPaR9.js";import{t as Xn}from"./WuiTree-BSx5pKJo.js";import{t as Zn}from"./WuiTruncate-BLl2u3b-.js";import{n as Qn,t as $n}from"./WuiWhatsNew-BO78119Z.js";import{n as er,t as tr}from"./WuiWizardStep-DIHxrXn9.js";import{$ as nr,A as rr,B as ir,C as ar,D as or,E as sr,F as cr,G as lr,H as ur,I as dr,J as fr,K as pr,L as mr,M as hr,N as gr,O as _r,P as vr,Q as yr,R as br,S as xr,T as Sr,U as Cr,V as wr,W as Tr,X as Er,Y as Dr,Z as Or,_ as kr,a as Ar,at as jr,b as Mr,c as Nr,d as Pr,et as Fr,f as Ir,g as Lr,h as Rr,i as zr,it as Br,j as Vr,k as Hr,l as Ur,m as Wr,n as Gr,nt as Kr,o as qr,ot as Jr,p as Yr,q as Xr,r as Zr,rt as Qr,s as $r,t as ei,tt as ti,u as ni,v as ri,w as ii,x as ai,y as oi,z as si}from"./themeTransition-Bzcxp2cy.js";var ci=`/`,li=`.search-wrap.wui-search-collapsible`,ui=`.wui-topsearch-panel`,di=`.modal, wui-drawer[open]`,fi=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 pi(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 mi(e){fi.has(e)||(fi.add(e),e.addEventListener(`keydown`,t=>{if(t.key!==`/`||t.ctrlKey||t.altKey||t.metaKey||t.defaultPrevented||o(t.target)||t.target?.closest?.(di)||e.querySelector(ui))return;let n=[...e.querySelectorAll(li)].find(e=>e.offsetParent!==null);n&&(t.preventDefault(),D(n))}))}function hi(e=document){for(let t of e.querySelectorAll(li))pi(t);mi(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.`}),gi=new WeakSet,_i=new WeakSet,P=null,F=null,I=!1,vi=e=>{let t=document.createElement(`span`);return t.textContent=e??``,t.innerHTML},L=(e,t)=>{e&&window.WUI?.toast?.(e,{variant:t})},yi=()=>{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 bi(){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`,`${dt.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">${vi(N.cancelLabel)}</button><button type="button" class="btn btn-primary" data-app-confirm></button></div></div></div></div>`,document.body.appendChild(e),e)}function xi(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.`);Si({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 Si({title:e,message:t,label:n,danger:r},i){let a=yi(),o=bi(),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 Ci(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.`);Ri(e.ownerDocument),Si({title:t,message:n,label:r,danger:i===`danger`},()=>R(e,a))}var wi=e=>e.disabled===!0||e.getAttribute(`aria-disabled`)===`true`;function Ti(e){let t=e.target.closest?.(`[data-wui-confirm]:not(form)`);!t||t===P||wi(t)||(e.preventDefault(),e.stopImmediatePropagation(),xi(t,()=>R(t,()=>t.click())))}function Ei(e){let t=e.target;if(!(t instanceof HTMLFormElement)||!t.hasAttribute(`data-wui-confirm`)||t===P||e.submitter&&e.submitter===P)return;e.preventDefault(),e.stopImmediatePropagation();let n=e.submitter?.form===t?e.submitter:void 0;xi(t,()=>R(t,()=>t.requestSubmit(n)))}function Di(e){let t=e.target.closest?.(`#${k} [data-app-confirm]`);!t||t.disabled||!F||(I=!0,yi().getOrCreateInstance(t.closest(`#${k}`)).hide())}function Oi(e){if(e.target.id!==`wuiConfirm`)return;let t=I?F:null;F=null,I=!1,t?.()}var ki=(e,t)=>{e&&window.sessionStorage.setItem(M,JSON.stringify({message:e,variant:t}))},Ai=e=>e===`forbidden`?N.forbidden:e===`network`?N.network:N.failed;function ji(){for(let e of document.querySelectorAll(`[data-wui-server]`))e.dataset.refreshOnSuccess!==`false`&&et(e)?.reload()}async function Mi(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 Ni(t,e)}async function Ni(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`)){ki(i.message,a),i.redirect?window.location.assign(i.redirect):window.location.reload();return}if(t.disabled=!1,t.removeAttribute(`aria-busy`),i.ok){nt(i,a),ji();return}L(i.message||Ai(i.kind),`danger`)}function Pi(e){let t=e.target.closest?.(`[data-wui-post]`);t&&(e.preventDefault(),!(wi(t)||t.getAttribute(`aria-busy`)===`true`)&&Mi(t).catch(e=>console.error(e)))}function Fi(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`&&(Ni(t.getAttribute(`action`),n,new FormData(t)).catch(e=>console.error(e)),window.bootstrap?.Dropdown?.getInstance(t.closest(`.dropdown`)?.querySelector(`[data-bs-toggle='dropdown']`))?.hide())}function Ii(){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 Li(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 Ri(e){_i.has(e)||(_i.add(e),e.addEventListener(`click`,Di),e.addEventListener(`hidden.bs.modal`,Oi))}function zi(e=document){let t=e.ownerDocument||e;gi.has(t)||(gi.add(t),t.addEventListener(`click`,Ti,!0),t.addEventListener(`submit`,Ei,!0),Ri(t),t.addEventListener(`click`,Pi),t.addEventListener(`submit`,Fi),Ii()),Li(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]`,Bi=`[aria-invalid="true"], .field-error:not(:empty), .field-validation-error, .validation-summary-errors, .wui-error-summary`,Vi=`[download], [data-wui-modal], [data-wui-post], [data-bs-toggle]`,Hi=new Set([`submit`,`button`,`reset`,`image`]),V=new WeakMap,Ui=new WeakSet,Wi=e=>`${e.name}:${e.size}:${e.lastModified}`;function H(e){let t=[];for(let n of e.elements)!n.name||n.disabled||Hi.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(Wi)]):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)}var Gi=e=>({saved:e.querySelector(Bi)?null:H(e),engaged:!1,discarded:!1});function Ki(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&&Ki(e)),qi=()=>!!window.bootstrap?.Modal;function Ji(e,t,n){let r=t.map(e=>e.getAttribute(`data-wui-unsaved`)).find(Boolean)||z.message;Ci(e,{title:z.title,message:r,label:z.leaveLabel,tone:`danger`},()=>{for(let e of t)V.get(e).discarded=!0;n()})}function Yi(e){if(e.matches(Vi))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 Xi(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 Zi(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||!Yi(t))return;let n=W(t.ownerDocument,null);!n.length||!qi()||(e.preventDefault(),Ji(t,n,()=>t.click()))}function Qi(e){let t=e.target;if(!(t instanceof HTMLFormElement)||e.defaultPrevented||!Xi(t,e.submitter))return;let n=W(t.ownerDocument,t);if(n.length&&qi()){e.preventDefault();let r=e.submitter?.form===t?e.submitter:void 0;Ji(t,n,()=>t.requestSubmit(r));return}let r=V.get(t);r&&(r.saved=H(t),r.discarded=!1)}function $i(e){W(document,null).length&&(e.preventDefault(),e.returnValue=``)}function ea(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 ta(e){let t=e.target.closest?.(B),n=t&&V.get(t);n&&(n.discarded=!1,e.isTrusted&&(n.engaged=!0))}function na(e){let t=e.detail?.handle?.el;if(t instanceof Element)for(let e of t.querySelectorAll(B))ia(e)}function ra(e=document){let t=e.ownerDocument||e;if(!Ui.has(t)){Ui.add(t);for(let e of[`focusin`,`pointerdown`,`drop`])t.addEventListener(e,ea,!0);for(let e of[`input`,`change`])t.addEventListener(e,ta,!0);t.addEventListener(`click`,Zi),t.addEventListener(`submit`,Qi),t.addEventListener(`wui:modal:success`,na),t.defaultView.addEventListener(`beforeunload`,$i)}let n=[...e.querySelectorAll?.(B)||[]];e.matches?.(B)&&n.unshift(e);for(let e of n)V.has(e)||V.set(e,Gi(e))}function ia(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 aa=Object.freeze({discard:`Discard`,keep:`Keep editing`}),oa=`wui:drawer:discard`,G=`wui-drawer[confirm-discard]`,K=`.wui-modal-shell`,sa=`form[data-wui-confirm-discard]`,q=`.wui-drawer-discard`,ca=`input, select, textarea`,J=new WeakMap,la=new WeakSet,ua=new WeakSet;function da(e,t,n,r){let i=e.createElement(`button`);return i.type=`button`,i.className=t,i.setAttribute(n,``),i.textContent=r,i}function fa(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,da(e,`btn btn-danger btn-sm`,`data-wui-discard-confirm`,aa.discard),da(e,`btn btn-secondary btn-sm`,`data-wui-discard-keep`,aa.keep)),n}function pa(e){let t=e.closest?.(G);if(t)return t;let n=e.closest?.(K);return n&&(n.hasAttribute(`confirm-discard`)||n.querySelector(sa))?n:null}function Y(e){return e.closest(G)??e.closest(K)}function X(e){return e.matches(G)||e.hasAttribute(`confirm-discard`)?e.querySelectorAll(`form`):e.querySelectorAll(sa)}function ma(e){let t=J.get(e);return t!=null&&U(e)!==t}function ha(e){let t=e.ownerDocument.createElement(`div`);return t.className=`wui-drawer-footer`,e.querySelector(`.wui-drawer-panel`).append(t),ua.add(t),t}function ga(e){let t=e.ownerDocument.createElement(`div`);return t.className=`wui-modal-footer`,(e.querySelector(`.wui-modal-body`)?.parentElement??e.querySelector(`.modal-content`)).append(t),ua.add(t),t}function _a(e){e.querySelector(`[data-wui-discard-confirm]`).focus()}function va(e,t){let n=e.querySelector(q);if(n){_a(n);return}let r=fa(e.ownerDocument,t),i;if(e.matches(G))i=e.querySelector(`.wui-drawer-footer`)??ha(e),i.prepend(r);else if(e.hasAttribute(`confirm-discard`))i=e.querySelector(`.wui-modal-footer`)??ga(e),i.prepend(r);else{let t=e.querySelector(sa);i=t.querySelector(`.modal-footer`),i?i.prepend(r):(i=t,t.append(r))}i.classList.add(`wui-drawer-discarding`),_a(r)}function ya(e){let t=e.parentElement;e.remove(),t.classList.remove(`wui-drawer-discarding`),ua.has(t)&&t.remove()}function ba(e){for(let t of X(e)){let e=[...t.querySelectorAll(ca)].find(e=>e.type!==`hidden`&&!e.disabled);if(e){e.focus();return}}}function xa(e){let t=pa(e.target);if(t)for(let e of X(t))J.get(e)??J.set(e,U(e))}function Sa(e){let t=e.target;!(t instanceof HTMLFormElement)||!pa(t)||J.set(t,U(t))}function Ca(e){let t=e.detail?.handle?.el;if(t instanceof Element)for(let e of t.querySelectorAll(`form`))J.delete(e)}function wa(e){let t=e.target;!(t instanceof Element)||!t.matches(G)||[...X(t)].some(ma)&&(e.preventDefault(),va(t,t.getAttribute(`confirm-discard`)))}function Ta(e){let t=e.target;if(!(t instanceof Element)||!t.matches(K))return;let n=[...X(t)].find(ma);n&&(e.preventDefault(),va(t,t.getAttribute(`confirm-discard`)??n.getAttribute(`data-wui-confirm-discard`)))}function Ea(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(K);n&&window.bootstrap?.Modal?.getInstance(n)?.hide()}function Da(e){let t=e.closest(q),n=Y(t);ya(t);for(let e of X(n))J.set(e,U(e));n.dispatchEvent(new CustomEvent(oa,{bubbles:!0})),n.matches(G)?n.hide():window.bootstrap.Modal.getInstance(n).hide()}function Oa(e){let t=e.closest(q),n=Y(t);ya(t),ba(n)}function ka(e){let t=e.target,n=t.closest?.(`[data-wui-discard-confirm]`);if(n){Da(n);return}let r=t.closest?.(`[data-wui-discard-keep]`);if(r){Oa(r);return}let i=t.closest?.(`[data-wui-dismiss]`);i&&Ea(i)}function Aa(e){if(e.key!==`Escape`)return;let t=e.currentTarget.querySelector(q);if(!t)return;e.preventDefault(),e.stopPropagation();let n=Y(t);ya(t),ba(n)}function ja(e=document){let t=e.ownerDocument||e;la.has(t)||(la.add(t),t.addEventListener(`focusin`,xa),t.addEventListener(`pointerdown`,xa),t.addEventListener(`submit`,Sa),t.addEventListener(`wui:modal:success`,Ca),t.addEventListener(`wui:modal:loaded`,Ca),t.addEventListener(`wui-drawer-close`,wa,!0),t.addEventListener(`hide.bs.modal`,Ta),t.addEventListener(`click`,ka),t.addEventListener(`keydown`,Aa,!0))}var Ma=`data-wui-bulk-in-bar`,Na=`[data-wui-page-header-bar][data-wui-bulk-for]`,Pa=new WeakSet;function Fa(e){return`${b(e,{decimals:0})} selected`}function Ia(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?Fa(t):``)}function La(e=document){for(let t of e.querySelectorAll(Na))document.getElementById(t.dataset.wuiBulkFor)?.setAttribute(Ma,``);Pa.has(document)||(Pa.add(document),document.addEventListener(`selectionchange`,e=>{if(typeof e.detail?.selected==`number`)for(let t of document.querySelectorAll(Na))document.getElementById(t.dataset.wuiBulkFor)?.contains(e.target)&&Ia(t,e.detail.selected)}))}var Ra=31536e3,Z=new WeakMap,Q=e=>e>99?`99+`:String(e);function za(e,t,n=document){n.cookie=`${e}=${t?`1`:`0`}; Path=/; Max-Age=${Ra}; SameSite=Lax`}var Ba=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 Va(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=Ba(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 Ha=e=>!!e&&(e.isContentEditable||/^(INPUT|TEXTAREA|SELECT)$/.test(e.tagName)),Ua=(e,t,n)=>`${e}${e.includes(`?`)?`&`:`?`}${encodeURIComponent(t)}=${encodeURIComponent(n)}`;function Wa(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(Ua(o,s,t));if(!(n.kind===`aborted`||n.kind===`stale`||n.kind===`session`)){if(e.classList.remove(`is-loading`),n.ok){let e=Ba(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(Ua(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||Ha(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 Ga(e){let t=[],n=e.dataset.wuiCollapsedCookie;n&&e.addEventListener(`wui:shell:collapse`,e=>za(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?Va(r,t):null,a=e.querySelector(`[data-wui-topsearch]`);a&&Wa(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 Ka(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`,Ga(e))}function qa(e){let t=e?.closest?.(`[data-app-shell]`)??null;return t?(Z.has(t)||Ka(t),Z.get(t)??null):null}function Ja(){h(),e(`wui-select`,qt),e(`wui-country-select`,Jt),e(`wui-phone`,Pn),e(`wui-datepicker`,Xt),e(`wui-date-range`,Zt),e(`wui-dock`,Qt),e(`wui-image-crop`,tn),e(`wui-kanban`,mt),e(`wui-inline-edit`,rn),e(`wui-consent-banner`,Gt),e(`wui-slider`,Wn),e(`wui-sortable`,Gn),e(`wui-timepicker`,qn),e(`wui-tour`,Yn),e(`wui-tree`,Xn),e(`wui-autocomplete`,Pt),e(`wui-command-palette`,Bt),e(`wui-context-menu`,Kt),e(`wui-multiselect`,bn),e(`wui-taginput`,Kn),e(`wui-otp`,Mn),e(`wui-status-icon`,jt),e(`wui-shortcuts`,Hn),e(`wui-record-pager`,In),e(`wui-carousel`,Ft),e(`wui-code-block`,It),e(`wui-data-table`,Yt),e(`wui-drawer`,$t),e(`wui-hover-card`,en),e(`wui-lightbox`,cn),e(`wui-menubar`,yn),e(`wui-navigation-menu`,xn),e(`wui-notification-center`,An),e(`wui-onboarding-checklist`,jn),e(`wui-overflow`,Nn),e(`wui-rating`,Fn),e(`wui-relative-time`,zn),e(`wui-resizable`,Bn),e(`wui-rolling-number`,Vn),e(`wui-show-more`,Un),e(`wui-truncate`,Zn),e(`wui-whats-new`,Qn),e(`wui-mention-input`,dn),e(`wui-comment-thread`,Vt),e(`wui-wizard-step`,tr),e(`wui-wizard`,er)}Ja();export{yr as AVATAR_ACCEPT,nr as AVATAR_MAX_SIZE_MB,Fr as AVATAR_OUTPUT_SIZE,ti as AVATAR_OUTPUT_TYPE,Kr as AVATAR_PREVIEW_SIZES,Qr as AVATAR_TEXT,Ma as BAR_BULK_IN_BAR_ATTRIBUTE,Fe as COLUMN_MAX_WIDTH,Ae as COLUMN_MIN_WIDTH,Wt as COMMENT_INTENTS,Ht as COMMENT_REACTIONS,Ut as COMMENT_TEXT,k as CONFIRM_DIALOG_ID,A as CONFIRM_TONES,Rt as COPY_FEEDBACK_MS,at as CSRF_META_NAME,se as CURRENCIES,Ne as DATA_TABLE_TEXT,ne as DATE_PATTERNS,tt as DEFAULT_CSRF_HEADER,Tr as DEFAULT_IMAGE_ACCEPT,lr as DEFAULT_MAX_SIZE_MB,Hr as DEFAULT_PASSWORD_RULES,rr as DEFAULT_REQUIREMENTS_TITLE,ei as DEFAULT_THEME_EFFECT,Gr as DEFAULT_THEME_STORAGE_KEY,oa as DISCARD_EVENT,aa as DISCARD_TEXT,xr as DROP_OVER_CLASS,ae as DURATION_UNITS,S as EMPTY_VALUE,g as FILTER_POPOVER_MAX_CHIPS,M as FLASH_STORAGE_KEY,j as FLASH_VARIANTS,_ as FORMAT_STYLES,rt as HTTP_KINDS,sn as INLINE_EDIT_SAVED_MS,an as INLINE_EDIT_TEXT,on as INLINE_EDIT_TYPES,re as IST_TIME_ZONE,Dt as KANBAN_DRAG_THRESHOLD_PX,St as KANBAN_LONG_PRESS_MS,Tt as KANBAN_PHONE_QUERY,yt as KANBAN_STORAGE_PREFIX,ft as KANBAN_SUMMARY_FORMATS,Ct as KANBAN_TEXT,Et as KANBAN_TONES,p as LIST_KEYS,vr as MASK_INPUT_TYPES,cr as MASK_NAMES,ln as MENTION_ID_PATTERN,_n as MENTION_MAX_QUERY,pn as MENTION_MAX_RESULTS,hn as MENTION_TEXT,oe as MONEY_UNITS,kn as NOTIFICATION_COUNT_CAP,Tn as NOTIFICATION_TEXT,Te as PIN_AT_VAR,ve as PIN_SIDES,je as RESIZE_STEP,Pe as RESIZE_STEP_LARGE,ar as ROW_DRAG_TYPE,ii as ROW_DROP_EVENT,be as ROW_HEIGHTS,Oe as ROW_MOVE_LIMIT,Ie as ROW_MOVE_MS,xe as ROW_SAVE_ATTR,Se as ROW_SAVE_ERROR_CLASS,Me as ROW_SAVE_STATES,oi as SCROLL_EDGE_SELECTOR,ci as SEARCH_OPEN_KEY,Xe as SELECT_ALL_LABEL,Ge as SELECT_CELL_CLASS,c as SELECT_KEY,st 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,Mt as STATUS_TONES,Zr as THEME_BOOT_SCRIPT_BODY,zr as THEME_CHANGE_EVENT,Ar as THEME_EFFECTS,qr as THEME_EFFECT_DURATION,$r as THEME_LIVE_NAME,Nr as THEME_MODES,Ur as THEME_SWITCHING_CLASS,$e as TOAST_ACTION_METHODS,ot as TOAST_ACTION_MS,z as UNSAVED_TEXT,ke as VIRTUAL_OVERSCAN,$n as WHATS_NEW_READ_EVENT,Qe as WUI_HEADERS,Pt as WuiAutocomplete,Ft as WuiCarousel,It as WuiCodeBlock,Bt as WuiCommandPalette,Vt as WuiCommentThread,Gt as WuiConsentBanner,Kt as WuiContextMenu,Jt as WuiCountrySelect,Yt as WuiDataTable,Xt as WuiDatePicker,Zt as WuiDateRange,Qt as WuiDock,$t as WuiDrawer,en as WuiHoverCard,tn as WuiImageCrop,rn as WuiInlineEdit,mt as WuiKanban,cn as WuiLightbox,dn as WuiMentionInput,yn as WuiMenubar,bn as WuiMultiSelect,xn as WuiNavigationMenu,An as WuiNotificationCenter,jn as WuiOnboardingChecklist,Mn as WuiOtp,Nn as WuiOverflow,Pn as WuiPhone,Fn as WuiRating,In as WuiRecordPager,zn as WuiRelativeTime,Bn as WuiResizable,Vn as WuiRollingNumber,qt as WuiSelect,Hn as WuiShortcuts,Un as WuiShowMore,Wn as WuiSlider,Gn as WuiSortable,jt as WuiStatusIcon,Kn as WuiTagInput,qn as WuiTimePicker,Yn as WuiTour,Xn as WuiTree,Zn as WuiTruncate,Qn as WuiWhatsNew,er as WuiWizard,tr as WuiWizardStep,pr as acceptLabel,ut as addRowSelectCells,qe as addSelectColumn,Ia as applyBarBulk,ni as applyTheme,f as ariaKeyShortcuts,dr as attachInputMask,Sr as attachRowDrag,Mr as attachScrollEdges,lt as attachShiftRange,Br as avatarCropOptions,jr as avatarUnreadableMessage,Fa as barBulkCountText,Vr as buildPasswordRules,we as clampColumnWidth,Ke as classifyStatus,O as collapseSearch,Ci as confirmAction,Lt as copyTextToClipboard,fa as createDiscardPrompt,Jn as createLocalSeenStore,w as createRequestQueue,Ue as createSelectHeaderCell,He as createSelectRowCell,ct as createSelectSpacerCell,Ja as defineWeborityElements,hr as evaluatePassword,U as formValues,v as formatCompact,ee as formatCurrency,ce as formatDate,y as formatDuration,mr as formatMasked,b as formatNumber,ie as formatPercent,Ln as formatRelativeTime,te as formatValue,et as getServerTable,qa as getShell,Ve as glyphSvg,Ce as groupCount,_e as groupItems,Dn as groupNotificationsByDay,Le as identityCell,n as inShortcutScope,hi as initCollapsibleSearch,ja as initDrawerDiscard,br as initInputMasks,La as initPageBarBulk,kt as initRemoteModals,sr as initRowDrag,ai as initScrollEdges,zi as initServerActions,Ze as initServerTables,Ka as initShellParts,ra as initUnsavedChanges,nn as inlineEditText,Jr as isHeicFile,Xr as isImageFile,fr as isImageOnlyAccept,si as isMaskPattern,Dr as isPdfFile,o as isTypingTarget,bt as kanbanCardLabel,Ot as kanbanOverflow,ht as kanbanStorageKey,gt as kanbanSummaryFormat,wt as kanbanVisibleLimit,At as loadRemoteDrawer,pt as loadRemoteModal,ir as maskedPostValue,zt as matchSegments,Er as matchesAccept,Be as measureRows,mn as mentionLabel,gn as mentionTextFromValue,un as mentionValueFromText,fn as mentionedIds,m as moveFocus,Pr as nextTheme,wn as notificationCountText,Sn as notificationDayHeading,En as notificationTime,On as notificationTriggerLabel,Cn as notificationUnreadAnnouncement,D as openSearch,vn as parseMentionValue,Je as parseToastAction,gr as passwordSatisfies,ye as pinAtValue,ze as pinClasses,he as pinOffsetVar,ue as planPins,Re as playRowMoves,wr as postedMasked,ur as rawMasked,ge as readColumnWidths,it as readCsrf,xt as readKanbanCollapsed,Ir as readStoredTheme,Rn as relativeTimeTitle,ia as resetUnsavedChanges,Cr as resolveMask,Yr as resolveTheme,fe as rowLabel,de as rowOrderChanged,r as runShortcut,Ye as runToastAction,me as saveOutcomeText,De as setRowSaveState,le as settledRows,i as shortcutKey,u as shortcutName,s as shortcutsOff,nt as showResultToast,Wr as storeTheme,vt as sumKanbanValues,We as syncSelectAll,or as syncTargets,Rr as themeBootScript,Lr as themeKeyframes,_r as tickedKeys,x as toInstant,kr as transitionTheme,Or as validateFile,Ee as virtualRange,ri as watchSystemTheme,Nt as withTrustedLabel,pe as writeColumnWidths,_t as writeKanbanCollapsed,C as wuiFetch};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webority/ui-elements",
|
|
3
|
-
"version": "0.68.
|
|
3
|
+
"version": "0.68.1",
|
|
4
4
|
"description": "Webority framework-agnostic UI custom elements (<wui-*>) — the single implementation of the interactive components, styled by @webority/theme. Used natively in Razor and wrapped by @webority/ui-react.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"type": "module",
|