@mattilsynet/design 1.0.4 → 1.0.6

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 (51) hide show
  1. package/mtds/field/field-observer.js +39 -40
  2. package/mtds/field/field-observer.js.map +1 -1
  3. package/mtds/fieldset/fieldset-observer.js +10 -10
  4. package/mtds/fieldset/fieldset-observer.js.map +1 -1
  5. package/mtds/{typography/typography.js → heading/heading.js} +1 -1
  6. package/mtds/heading/heading.js.map +1 -0
  7. package/mtds/{typography/typography.stories.d.ts → heading/heading.stories.d.ts} +0 -1
  8. package/mtds/helptext/helptext.js +26 -0
  9. package/mtds/helptext/helptext.js.map +1 -0
  10. package/mtds/helptext/{helptext.story.d.ts → helptext.stories.d.ts} +0 -1
  11. package/mtds/illustrations/illustrations.json +1 -0
  12. package/mtds/illustrations/inspector-nature.svg +1 -0
  13. package/mtds/illustrations/inspector.svg +1 -13
  14. package/mtds/illustrations/person-drop.svg +1 -13
  15. package/mtds/illustrations/person-mobile.svg +1 -1
  16. package/mtds/index.d.ts +2 -2
  17. package/mtds/index.iife.js +3 -3
  18. package/mtds/index.iife.js.map +1 -1
  19. package/mtds/index.js +12 -9
  20. package/mtds/index.js.map +1 -1
  21. package/mtds/layout/app-observer.js +19 -0
  22. package/mtds/layout/app-observer.js.map +1 -0
  23. package/mtds/layout/layout.stories.d.ts +1 -0
  24. package/mtds/logo/logo-observer.js +16 -18
  25. package/mtds/logo/logo-observer.js.map +1 -1
  26. package/mtds/popover/popover.stories.d.ts +1 -0
  27. package/mtds/react-types.d.ts +1 -0
  28. package/mtds/react.d.ts +2 -1
  29. package/mtds/react.js +41 -39
  30. package/mtds/react.js.map +1 -1
  31. package/mtds/styles.css +1 -1
  32. package/mtds/styles.json +34 -34
  33. package/mtds/styles.module.css.js +67 -63
  34. package/mtds/styles.module.css.js.map +1 -1
  35. package/mtds/table/table-observer.js +18 -20
  36. package/mtds/table/table-observer.js.map +1 -1
  37. package/mtds/tabs/tabs.js +2 -3
  38. package/mtds/tabs/tabs.js.map +1 -1
  39. package/mtds/tailwind.css +19 -2
  40. package/mtds/toast/toast-observer.d.ts +2 -0
  41. package/mtds/toast/toast.d.ts +2 -0
  42. package/mtds/tooltip/tooltip-observer.js +16 -16
  43. package/mtds/tooltip/tooltip-observer.js.map +1 -1
  44. package/mtds/utils.js +24 -24
  45. package/mtds/utils.js.map +1 -1
  46. package/package.json +1 -1
  47. package/mtds/layout/layout-observer.js +0 -27
  48. package/mtds/layout/layout-observer.js.map +0 -1
  49. package/mtds/typography/typography.js.map +0 -1
  50. /package/mtds/{typography/typography.d.ts → heading/heading.d.ts} +0 -0
  51. /package/mtds/layout/{layout-observer.d.ts → app-observer.d.ts} +0 -0
@@ -1,8 +1,8 @@
1
- var mtds=function(x){"use strict";const Mt="_alert_cq24j_1 _ds-alert_z5gp5_1",Dt="_avatar_cq24j_1 _ds-avatar_z5gp5_1",Pt="_badge_cq24j_1",Rt="_breadcrumbs_cq24j_1 _ds-breadcrumbs_z5gp5_1",Ht="_button_cq24j_1 _ds-button_z5gp5_1",jt="_card_cq24j_1",Nt="_info_cq24j_1",Bt="_group_cq24j_1",qt="_chip_cq24j_1 _ds-chip_z5gp5_1",Ft="_details_cq24j_1 _ds-details_z5gp5_1",Ut="_dialog_cq24j_1 _ds-dialog_z5gp5_1",Vt="_divider_cq24j_1",zt="_errorsummary_cq24j_1 _ds-error-summary_z5gp5_1",Yt="__errorsummary_cq24j_1",Kt="_field_cq24j_1 _ds-field_z5gp5_1",Wt="_affixes_cq24j_1 _ds-field-affixes_z5gp5_1",Xt="_fieldset_cq24j_1 _ds-fieldset_z5gp5_1",Gt="_helptext_cq24j_1 _ds-focus_z5gp5_1",Qt="_input_cq24j_1 _ds-input_z5gp5_1",Jt="_app_cq24j_1",Zt="_grid_cq24j_1",te="_flex_cq24j_1",ee="_link_cq24j_1",ne="_logo_cq24j_1",oe="_pagination_cq24j_1 _ds-pagination_z5gp5_1",ie="_popover_cq24j_1",se="_skeleton_cq24j_1 _ds-skeleton_z5gp5_1",re="__skeleton_cq24j_1",ae="_spinner_cq24j_1",le="_table_cq24j_1 _ds-table_z5gp5_1",ce="__scrollShadow_cq24j_1",ue="_tabs_cq24j_1 _ds-tabs_z5gp5_1",de="_tag_cq24j_1 _ds-tag_z5gp5_1",fe="__tooltip_cq24j_1",pe="_heading_cq24j_1 _ds-heading_z5gp5_1",he="_prose_cq24j_1",_e="_validation_cq24j_1 _ds-validation-message_z5gp5_1",me="_body_cq24j_109",b={alert:Mt,avatar:Dt,badge:Pt,breadcrumbs:Rt,button:Ht,card:jt,info:Nt,group:Bt,chip:qt,details:Ft,dialog:Ut,divider:Vt,errorsummary:zt,_errorsummary:Yt,field:Kt,affixes:Wt,fieldset:Xt,helptext:Gt,input:Qt,app:Jt,grid:Zt,flex:te,link:ee,logo:ne,pagination:oe,popover:ie,skeleton:se,_skeleton:re,spinner:ae,table:le,_scrollShadow:ce,tabs:ue,tag:de,_tooltip:fe,heading:pe,prose:he,validation:_e,body:me},Pn=Object.freeze(Object.defineProperty({__proto__:null,_errorsummary:Yt,_scrollShadow:ce,_skeleton:re,_tooltip:fe,affixes:Wt,alert:Mt,app:Jt,avatar:Dt,badge:Pt,body:me,breadcrumbs:Rt,button:Ht,card:jt,chip:qt,default:b,details:Ft,dialog:Ut,divider:Vt,errorsummary:zt,field:Kt,fieldset:Xt,flex:te,grid:Zt,group:Bt,heading:pe,helptext:Gt,info:Nt,input:Qt,link:ee,logo:ne,pagination:oe,popover:ie,prose:he,skeleton:se,spinner:ae,table:le,tabs:ue,tag:de,validation:_e},Symbol.toStringTag,{value:"Module"})),Rn=(t,e,n)=>{const o=(n-1)/2,i=Math.max(Math.min(t-Math.floor(o),e-n+1),1),r=Math.min(Math.max(t+Math.ceil(o),n),e),s=Array.from({length:r+1-i},(a,c)=>c+i);return n>4&&i>1&&s.splice(0,2,1,0),n>3&&r<e&&s.splice(-2,2,0,e),s},Hn=({current:t=1,total:e=10,show:n=7})=>({prev:t>1?t-1:0,next:t<e?t+1:0,pages:Rn(t,e,n).map((o,i)=>({current:o===t&&"page",key:`key-${o}-${i}`,page:o}))}),P=typeof window<"u"&&typeof document<"u",v={capture:!0,passive:!0};function f(t,e,n){return n===void 0?t.getAttribute(e)??null:(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null)}let jn=0;const Nn=`${Date.now().toString(36)}${Math.random().toString(36).slice(2,5)}`;function R(t){return t.id||(t.id=`${Nn}${++jn}`),t.id}const ve=(t,e,n)=>{for(const o of n[0].split(","))n[0]=o,e[`${t}EventListener`](...n)},g=(t,...e)=>ve("add",t,e),L=(t,...e)=>ve("remove",t,e),K=new Map,E=P?document.createElement("div"):null;E&&f(E,"style","position:absolute;padding:1px;top:0;left:0px"),P&&g(window,"load,resize,scroll",()=>{for(const[t,e]of K)e()},v);const A={top:0,right:1,bottom:2,left:3};function H(t,e,n){var Dn;if(e===!1||!e.isConnected||!t.isConnected)return K.delete(t);if(E!=null&&E.isConnected||document.body.append(E||""),!K.has(t)){const hi=A[n]??A.bottom;return(Dn=K.set(t,()=>H(t,e,hi)).get(t))==null?void 0:Dn()}const{offsetWidth:o,offsetHeight:i}=t,{offsetWidth:r,offsetHeight:s}=e,{width:a,height:c,left:l,top:u}=e.getBoundingClientRect(),h=Math.round(l-(r-a)/2),m=Math.round(u-(s-c)/2),S=h-o>0,Ot=r+r+o<window.innerWidth,D=m-i>0,rt=m+s+i<window.innerHeight,_=n===A.bottom&&Ot||!S,z=n===A.bottom&&rt||!D,Y=Math.min(Math.max(10,h-(o-r)/2),window.innerWidth-o-10),at=Math.min(Math.max(10,m-(i-s)/2),window.innerHeight-i-10),lt=n===A.top||n===A.bottom;t.style.left=`${Math.round(lt?Y:_?h+r:h-o)}px`,t.style.top=`${Math.round(lt?z?m+s:m-i:at)}px`,E==null||E.style.setProperty("translate",`${Math.round(window.scrollX+h+r+o+30)} ${Math.round(window.scrollY+m+s+i+30)}px`)}function Bn(t){let e=0;const n=()=>setTimeout(o,200),o=()=>{t([],i),e=0},i=new MutationObserver(()=>{e||(e=requestAnimationFrame(n))});return i}const W=new WeakMap,qn=t=>{var n;const e=W.get(t);if(!e||!t.isConnected)(n=e==null?void 0:e.observer)==null||n.disconnect(),W.delete(t);else for(const[,o]of e.collections)o()},T=(t,e,n)=>{const o=t.getElementsByClassName(e);let i=W.get(t);i||(i={collections:new Map,observer:Bn(()=>qn(t))},i.observer.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class"]}),W.set(t,i)),n?i.collections.set(e,()=>n(o)):i.collections.delete(e)},ct=t=>t instanceof HTMLElement&&"validity"in t&&!(t instanceof HTMLButtonElement),Fn=b._tooltip.split(" "),be="aria-describedby",ge="Escape",X="aria-labelledby",Un="--mtds-tooltip-position",Vn=300,G="mtds-tooltip";let $=null,ye=Number.NEGATIVE_INFINITY,Ee=0,y=null;function ut({target:t,type:e,key:n}){if(e==="keydown"&&n!==ge)return;const o=ye+Vn-Date.now();clearTimeout(Ee),Ee=setTimeout(zn,Math.max(o,0),n===ge?null:t)}function zn(t){var a;if(ye=Date.now(),!y||t===y)return;let e=((a=t==null?void 0:t.closest)==null?void 0:a.call(t,"[data-tooltip]"))||null;if(e===$)return;const n=e&&f(e,"data-tooltip")||"",o=e&&f(e,"data-tooltip-position")||window.getComputedStyle(e||document.body).getPropertyValue(Un)||"top";(!n||n==="false"||n==="true"||o==="none")&&(e=null),e&&(y.textContent=n);const r=$&&f($,X)===G,s=!!(e!=null&&e.innerText.trim())||(e==null?void 0:e.hasAttribute(X))||(e==null?void 0:e.hasAttribute("aria-label"));$==null||$.removeAttribute(r?X:be),H(y,!1),$=e,$&&f($,s?be:X,G),y.togglePopover(!!e),H(y,e||!1,o)}P&&!document.getElementById(G)&&(y=document.body.appendChild(document.createElement("div")),y.classList.add(...Fn),y.id=G,f(y,"popover","manual"),g(document,"blur,focus,mouseout,mouseover",ut,v),g(window,"keydown",ut,v),g(window,"blur",ut,v));var $e=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",Te;$e&&/^Mac/i.test(((Te=navigator.userAgentData)==null?void 0:Te.platform)||navigator.platform);var Yn=":host(:not([hidden])) { display: block }",we=typeof HTMLElement>"u"?class{}:HTMLElement;function I(t,e,n){var o;return n===void 0?(o=t.getAttribute(e))!=null?o:null:(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null)}var Se=(t,e,n)=>{for(const o of n[0].split(","))n[0]=o,Element.prototype[`${t}EventListener`].apply(e,n)},Ie=(t,...e)=>Se("add",t,e),Ce=(t,...e)=>Se("remove",t,e),Kn=t=>{const e="key"in t&&(t.key===" "||t.key==="Enter");return e&&t.preventDefault(),e&&t.target instanceof HTMLElement&&t.target.click(),e},Wn=t=>{var e;const n=((e=t.getRootNode)==null?void 0:e.call(t))||t.ownerDocument;return n instanceof Document||n instanceof ShadowRoot?n:document},dt=(t,e,n)=>{const o=document.createElement(t);if(e&&(o.textContent=e),n)for(const[i,r]of Object.entries(n))I(o,i,r);return o},xe={define:(t,e)=>!$e||window.customElements.get(t)||window.customElements.define(t,e)},Xn=class extends we{constructor(){super(),this._content=null,this.attachShadow({mode:"open"}).append(dt("slot",null,{name:"summary"}),dt("slot",null,{part:"details-content"}),dt("style",`${Yn}
1
+ var mtds=function(C){"use strict";const qt="_alert_jsd43_1 _ds-alert_z5gp5_1",Xt="_avatar_jsd43_1 _ds-avatar_z5gp5_1",Gt="_badge_jsd43_1",Qt="_breadcrumbs_jsd43_1 _ds-breadcrumbs_z5gp5_1",Jt="_button_jsd43_1 _ds-button_z5gp5_1",Zt="_card_jsd43_1",te="_info_jsd43_1",ee="_group_jsd43_1",ne="_chip_jsd43_1 _ds-chip_z5gp5_1",oe="_details_jsd43_1 _ds-details_z5gp5_1",ie="_dialog_jsd43_1 _ds-dialog_z5gp5_1",se="_divider_jsd43_1",re="_errorsummary_jsd43_1 _ds-error-summary_z5gp5_1",ae="__errorsummary_jsd43_1",le="_field_jsd43_1 _ds-field_z5gp5_1",de="_affixes_jsd43_1 _ds-field-affixes_z5gp5_1",ue="_fieldset_jsd43_1 _ds-fieldset_z5gp5_1",ce="_heading_jsd43_1 _ds-heading_z5gp5_1",fe="_helptext_jsd43_1 _ds-focus_z5gp5_1",pe="_input_jsd43_1 _ds-input_z5gp5_1",he="_app_jsd43_1",_e="_grid_jsd43_1",me="_flex_jsd43_1",be="_prose_jsd43_1",ve="_link_jsd43_1",ge="_logo_jsd43_1",ye="__onInjectLogo_jsd43_1",Ee="_pagination_jsd43_1 _ds-pagination_z5gp5_1",$e="_popover_jsd43_1",we="_skeleton_jsd43_1 _ds-skeleton_z5gp5_1",Te="__skeleton_jsd43_1",Ie="_spinner_jsd43_1",xe="_table_jsd43_1 _ds-table_z5gp5_1",Se="__onInjectTable_jsd43_1",Le="__scrollShadow_jsd43_1",Ce="_tabs_jsd43_1 _ds-tabs_z5gp5_1",Ae="_tag_jsd43_1 _ds-tag_z5gp5_1",ke="__tooltip_jsd43_1",Oe="_validation_jsd43_1 _ds-validation-message_z5gp5_1",Me="_body_jsd43_125",E={alert:qt,avatar:Xt,badge:Gt,breadcrumbs:Qt,button:Jt,card:Zt,info:te,group:ee,chip:ne,details:oe,dialog:ie,divider:se,errorsummary:re,_errorsummary:ae,field:le,affixes:de,fieldset:ue,heading:ce,helptext:fe,input:pe,app:he,grid:_e,flex:me,prose:be,link:ve,logo:ge,_onInjectLogo:ye,pagination:Ee,popover:$e,skeleton:we,_skeleton:Te,spinner:Ie,table:xe,_onInjectTable:Se,_scrollShadow:Le,tabs:Ce,tag:Ae,_tooltip:ke,validation:Oe,body:Me},io=Object.freeze(Object.defineProperty({__proto__:null,_errorsummary:ae,_onInjectLogo:ye,_onInjectTable:Se,_scrollShadow:Le,_skeleton:Te,_tooltip:ke,affixes:de,alert:qt,app:he,avatar:Xt,badge:Gt,body:Me,breadcrumbs:Qt,button:Jt,card:Zt,chip:ne,default:E,details:oe,dialog:ie,divider:se,errorsummary:re,field:le,fieldset:ue,flex:me,grid:_e,group:ee,heading:ce,helptext:fe,info:te,input:pe,link:ve,logo:ge,pagination:Ee,popover:$e,prose:be,skeleton:we,spinner:Ie,table:xe,tabs:Ce,tag:Ae,validation:Oe},Symbol.toStringTag,{value:"Module"})),so=(t,e,n)=>{const o=(n-1)/2,i=Math.max(Math.min(t-Math.floor(o),e-n+1),1),s=Math.min(Math.max(t+Math.ceil(o),n),e),r=Array.from({length:s+1-i},(a,d)=>d+i);return n>4&&i>1&&r.splice(0,2,1,0),n>3&&s<e&&r.splice(-2,2,0,e),r},ro=({current:t=1,total:e=10,show:n=7})=>({prev:t>1?t-1:0,next:t<e?t+1:0,pages:so(t,e,n).map((o,i)=>({current:o===t&&"page",key:`key-${o}-${i}`,page:o}))}),q=typeof window<"u"&&typeof document<"u",m={capture:!0,passive:!0};function u(t,e,n){return n===void 0?t.getAttribute(e)??null:(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null)}let ao=0;const lo=`${Date.now().toString(36)}${Math.random().toString(36).slice(2,5)}`;function R(t){return t.id||(t.id=`${lo}${++ao}`),t.id}const Pe=(t,e,n)=>{for(const o of n[0].split(","))n[0]=o,e[`${t}EventListener`](...n)},v=(t,...e)=>Pe("add",t,e),T=(t,...e)=>Pe("remove",t,e),X=new Map,$=q?document.createElement("div"):null;$&&u($,"style","position:absolute;padding:1px;top:0;left:0px"),q&&v(window,"load,resize,scroll",()=>{for(const[t,e]of X)e()},m);const A={top:0,right:1,bottom:2,left:3};function j(t,e,n){var oo;if(e===!1||!e.isConnected||!t.isConnected)return X.delete(t);if($!=null&&$.isConnected||document.body.append($||""),!X.has(t)){const zi=A[n]??A.bottom;return(oo=X.set(t,()=>j(t,e,zi)).get(t))==null?void 0:oo()}const{offsetWidth:o,offsetHeight:i}=t,{offsetWidth:s,offsetHeight:r}=e,{width:a,height:d,left:l,top:f}=e.getBoundingClientRect(),h=Math.round(l-(s-a)/2),b=Math.round(f-(r-d)/2),x=h-o>0,Wt=s+s+o<window.innerWidth,D=b-i>0,_t=b+r+i<window.innerHeight,_=n===A.bottom&&Wt||!x,K=n===A.bottom&&_t||!D,W=Math.min(Math.max(10,h-(o-s)/2),window.innerWidth-o-10),mt=Math.min(Math.max(10,b-(i-r)/2),window.innerHeight-i-10),bt=n===A.top||n===A.bottom;t.style.left=`${Math.round(bt?W:_?h+s:h-o)}px`,t.style.top=`${Math.round(bt?K?b+r:b-i:mt)}px`,$==null||$.style.setProperty("translate",`${Math.round(window.scrollX+h+s+o+30)} ${Math.round(window.scrollY+b+r+i+30)}px`)}function uo(t){let e=0;const n=()=>setTimeout(o,200),o=()=>{t([],i),e=0},i=new MutationObserver(()=>{e||(e=requestAnimationFrame(n))});return i}const H=new WeakMap,co=t=>{var n;const e=H.get(t);if(!e||!t.isConnected)(n=e==null?void 0:e.observer)==null||n.disconnect(),H.delete(t);else for(const[,o]of e.collections)o()},G=(t,e,n)=>{const o=t.getElementsByClassName(e);let i=H.get(t);i||(i={collections:new Map,observer:uo(()=>co(t))},i.observer.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class"]}),H.set(t,i)),n?i.collections.set(e,()=>n(o)):i.collections.delete(e),i.collections.size||(i.observer.disconnect(),H.delete(t))},vt=t=>t instanceof HTMLElement&&"validity"in t&&!(t instanceof HTMLButtonElement),fo=E._tooltip.split(" "),De="aria-describedby",Re="Escape",Q="aria-labelledby",po="--mtds-tooltip-position",ho=300,J="mtds-tooltip";let w=null,je=Number.NEGATIVE_INFINITY,He=0,y=null;function gt({target:t,type:e,key:n}){if(e==="keydown"&&n!==Re)return;const o=je+ho-Date.now();clearTimeout(He),He=setTimeout(_o,Math.max(o,0),n===Re?null:t)}function _o(t){var a,d;if(je=Date.now(),!y||t===y)return;let e=((a=t==null?void 0:t.closest)==null?void 0:a.call(t,"[data-tooltip]"))||null;if(e===w)return;const n=e&&u(e,"data-tooltip")||"",o=e&&u(e,"data-tooltip-position")||((d=window.getComputedStyle(e||document.body).getPropertyValue(po))==null?void 0:d.trim())||"top";(!n||n==="false"||n==="true"||o==="none")&&(e=null),e&&(y.textContent=n);const s=w&&u(w,Q)===J,r=!!(e!=null&&e.innerText.trim())||(e==null?void 0:e.hasAttribute(Q))||(e==null?void 0:e.hasAttribute("aria-label"));w==null||w.removeAttribute(s?Q:De),j(y,!1),w=e,w&&u(w,r?De:Q,J),y.togglePopover(!!e),j(y,e||!1,o)}q&&!document.getElementById(J)&&(y=document.body.appendChild(document.createElement("div")),y.classList.add(...fo),y.id=J,u(y,"popover","manual"),v(document,"blur,focus,mouseout,mouseover",gt,m),v(window,"keydown",gt,m),v(window,"blur",gt,m));var mo=Object.defineProperty,Ne=Object.getOwnPropertySymbols,bo=Object.prototype.hasOwnProperty,vo=Object.prototype.propertyIsEnumerable,Be=(t,e,n)=>e in t?mo(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,go=(t,e)=>{for(var n in e||(e={}))bo.call(e,n)&&Be(t,n,e[n]);if(Ne)for(var n of Ne(e))vo.call(e,n)&&Be(t,n,e[n]);return t},S=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",yo=S&&/android/i.test(navigator.userAgent),yt=S&&/iPad|iPhone|iPod/.test(navigator.userAgent),Fe=S&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent),Ue;S&&/^Mac/i.test(((Ue=navigator.userAgentData)==null?void 0:Ue.platform)||navigator.platform);var Eo=`${yo?"data":"aria"}-labelledby`,Ve=`${Fe?"aria":"data"}-multiselectable`,ze=":host(:not([hidden])) { display: block }",$o="outline: 1px dotted; outline: 5px auto Highlight; outline: 5px auto -webkit-focus-ring-color",Ye=typeof HTMLElement>"u"?class{}:HTMLElement;function p(t,e,n){var o;return n===void 0?(o=t.getAttribute(e))!=null?o:null:(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null)}var Ke=(t,e,n)=>{for(const o of n[0].split(","))n[0]=o,Element.prototype[`${t}EventListener`].apply(e,n)},Et=(t,...e)=>Ke("add",t,e),$t=(t,...e)=>Ke("remove",t,e),We=(t,e)=>t.attachShadow({mode:"open"}).append(Tt("slot"),Tt("style",e)),Z=new WeakMap,qe=(t,e)=>{if(e===void 0)return Z.get(t);try{Z.get(t).disconnect(),Z.delete(t)}catch{}if(e){const n=new MutationObserver(o=>t.handleEvent({type:"mutation",detail:o}));n.observe(t,e),Z.set(t,n)}},Xe=t=>{var e;const n=((e=t.getRootNode)==null?void 0:e.call(t))||t.ownerDocument;return n instanceof Document||n instanceof ShadowRoot?n:document},wo=0,wt=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++wo).toString(32)}`),t.id):"",Tt=(t,e,n)=>{const o=document.createElement(t);return e&&(o.textContent=e),o},Ge={define:(t,e)=>!S||window.customElements.get(t)||window.customElements.define(t,e)},To=t=>{if(!S)return null;const e=Tt("div");return e.style.cssText="position:fixed;overflow:hidden;width:1px;white-space:nowrap",p(e,"aria-live",t),document.body.appendChild(e)};function Qe(t,e,n){if(!e)return Object.keys(t).map(i=>`data-sr-${i}`);const o=(e==null?void 0:e.startsWith("data-sr-"))&&e.slice(8);return o&&n&&t[o]&&(t[o]=n),[]}var It="disabled",N="selected",Io=class extends Ye{static get observedAttributes(){return[It,N]}constructor(){super(),We(this,`${ze}:host(:focus){${$o}}:host{ cursor: pointer }`)}connectedCallback(){yt||(this.tabIndex=-1),p(this,"role")||p(this,"role","option"),this.attributeChangedCallback()}attributeChangedCallback(){p(this,"aria-disabled",`${this.disabled}`),p(this,"aria-selected",`${this.selected}`)}get defaultSelected(){return this[N]}set defaultSelected(e){this[N]=e}get disabled(){return p(this,It)!==null}set disabled(e){p(this,It,e?"":null)}get form(){return this.closest("form")}get index(){var e;const n=(e=this.closest("u-datalist"))==null?void 0:e.getElementsByTagName("u-option");return Array.from(n||[this]).indexOf(this)}get label(){return p(this,"label")||this.text}set label(e){p(this,"label",e)}get selected(){return p(this,N)!==null}set selected(e){p(this,N,e?"":null)}get text(){var e;return((e=this.textContent)==null?void 0:e.trim())||""}set text(e){this.textContent=e}get value(){return p(this,"value")||this.text}set value(e){p(this,"value",e)}};Ge.define("u-option",Io);var xt=!1,Je,xo=0,B=To("assertive"),So=Fe&&!yt,Ze="click,focusout,input,keydown,mousedown,mouseup",tn={singular:"%d hit",plural:"%d hits"},en=class extends Ye{constructor(){super(),this._blurTimer=0,this._input=null,this._root=null,this._value="",this._texts=go({},tn),We(this,`${ze}::slotted(u-option[disabled]) { display: none !important }`)}static get observedAttributes(){return["id",...Qe(tn)]}connectedCallback(){this.hidden=!0,this._root=Xe(this),B&&!B.isConnected&&document.body.append(B),p(this,"role","listbox"),Et(this._root,"focusin",this),Et(this._root,"focus",this,!0),setTimeout(()=>this.attributeChangedCallback())}disconnectedCallback(){$t(this._root||this,"focus",this,!0),$t(this._root||this,"focusin",this),St(this),this._root=null}attributeChangedCallback(e,n,o){var i;Qe(this._texts,e,o);const s=(i=this._root)==null?void 0:i.querySelectorAll(`input[list="${this.id}"]`);for(const r of s||[])on(this,r)}handleEvent(e){const{type:n}=e;e.defaultPrevented||(n==="click"&&Ao(this,e),(n==="focus"||n==="focusin")&&Lo(this,e),n==="focusout"&&Co(this),n==="keydown"&&ko(this,e),(n==="mutation"||n==="input")&&rn(this,e),n==="mouseup"&&(xt=!1),n==="mousedown"&&(xt=this.contains(e.target)))}get options(){return this.getElementsByTagName("u-option")}},Lo=(t,{target:e})=>{var n;const o=t._input===e;if(o||t.contains(e))return clearTimeout(t._blurTimer);!o&&e instanceof HTMLInputElement&&p(e,"list")===t.id&&(t._input&&St(t),t._input=e,p(t,Eo,wt((n=t._input.labels)==null?void 0:n[0])),Et(t._root||t,Ze,t),qe(t,{attributeFilter:["value"],attributes:!0,childList:!0,subtree:!0}),k(t,!0))},Co=t=>{xt||(t._blurTimer=setTimeout(()=>St(t)))},Ao=(t,{target:e})=>{var n,o,i,s,r;const a=p(t,Ve)!=="true",d=[...t.options].find(l=>l.contains(e));if(t._input===e)k(t,!0);else if(d&&tt(d)){for(const l of t.options)l===d?l.selected=!0:a&&(l.selected=!1);(o=(n=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"))==null?void 0:n.set)==null||o.call(t._input,d.value),a&&((i=t._input)==null||i.focus(),k(t,!1)),(s=t._input)==null||s.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),(r=t._input)==null||r.dispatchEvent(new Event("change",{bubbles:!0}))}},ko=(t,e)=>{var n,o;if(e.altKey||e.ctrlKey||e.metaKey||e.shiftKey)return;e.key!=="Escape"&&k(t,!0);const{key:i}=e,s=(n=t._root)==null?void 0:n.activeElement,r=nn(t),a=r.indexOf(s);let d=-1;if(i==="ArrowDown"&&(d=(a+1)%r.length),i==="ArrowUp"&&(d=(~a?a:r.length)-1),~a&&((i==="Home"||i==="PageUp")&&(d=0),(i==="End"||i==="PageDown")&&(d=r.length-1),i==="Enter"))return r[a].click(),e.preventDefault();if(r[d])for(const l of r)l.tabIndex=-1;r[d]&&e.preventDefault(),(o=r[d]||t._input)==null||o.focus(),i==="Escape"&&k(t,!1)},k=(t,e)=>{t.hidden=!e,t.popover&&t.togglePopover(e),t._input&&on(t,t._input,e),e&&rn(t)},St=t=>{$t(t._root||t,Ze,t),qe(t,!1),k(t,!1),t._input=null},nn=t=>[...t.options].filter(e=>!e.disabled&&e.offsetWidth&&e.offsetHeight),tt=t=>t instanceof HTMLOptionElement||t.getAttribute("role")==="option",on=(t,e,n=!1)=>{p(e,"popovertarget",wt(t)),p(e,"aria-autocomplete","list"),p(e,"aria-controls",wt(t)),p(e,"aria-expanded",`${So||n}`),p(e,"autocomplete","off"),p(e,"role","combobox")},sn=t=>(t==null?void 0:t.toLowerCase().trim())||"",rn=(t,e)=>{var n;const o=sn((n=t._input)==null?void 0:n.value);if(!((e==null?void 0:e.type)==="mutation"||t._value!==o))return;const s=t.hidden,r=p(t,Ve)!=="true",a=e instanceof InputEvent&&!Po(e);t.hidden=!0,t._value=o;for(const l of t.options){const f=[l.value,l.label,l.text].map(sn);l.hidden=!f.some(h=>h.includes(o)),r&&a&&tt(l)&&(l.selected=f.includes(o))}t.hidden=s;const d=nn(t);clearTimeout(Je),Je=setTimeout(()=>{const{length:l}=d.filter(tt),f=++xo%2?" ":"",h=`${`${t._texts[l===1?"singular":"plural"]}`.replace("%d",`${l}`)}`;B&&(B.textContent=`${!l&&t.innerText.trim()||h}${f}`)},1e3),yt&&d.map((l,f,h)=>{l.title=`${f+1}/${h}`})};S&&Object.defineProperty(HTMLInputElement.prototype,"list",{configurable:!0,enumerable:!0,get(){return Xe(this).getElementById(p(this,"list")||"")}}),Ge.define("u-datalist",en);var Oo=" ".repeat(100),Mo="insertReplacementText";function Po(t){var e;const n=t instanceof Event&&t.type==="input"&&t.target instanceof HTMLInputElement&&(!t.inputType||t.inputType===Mo);if(n){const o=t.target.value,i=Array.from(((e=t.target.list)==null?void 0:e.options)||[]).some(s=>s.value===o&&!tt(s));t.target.value=o.split(Oo)[i?1:0]}return n}var an=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",ln;an&&/^Mac/i.test(((ln=navigator.userAgentData)==null?void 0:ln.platform)||navigator.platform);var Do=":host(:not([hidden])) { display: block }",dn=typeof HTMLElement>"u"?class{}:HTMLElement;function L(t,e,n){var o;return n===void 0?(o=t.getAttribute(e))!=null?o:null:(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null)}var un=(t,e,n)=>{for(const o of n[0].split(","))n[0]=o,Element.prototype[`${t}EventListener`].apply(e,n)},cn=(t,...e)=>un("add",t,e),fn=(t,...e)=>un("remove",t,e),Ro=t=>{const e="key"in t&&(t.key===" "||t.key==="Enter");return e&&t.preventDefault(),e&&t.target instanceof HTMLElement&&t.target.click(),e},jo=t=>{var e;const n=((e=t.getRootNode)==null?void 0:e.call(t))||t.ownerDocument;return n instanceof Document||n instanceof ShadowRoot?n:document},Lt=(t,e,n)=>{const o=document.createElement(t);if(e&&(o.textContent=e),n)for(const[i,s]of Object.entries(n))L(o,i,s);return o},pn={define:(t,e)=>!an||window.customElements.get(t)||window.customElements.define(t,e)},Ho=class extends dn{constructor(){super(),this._content=null,this.attachShadow({mode:"open"}).append(Lt("slot",null,{name:"summary"}),Lt("slot",null,{part:"details-content"}),Lt("style",`${Do}
2
2
  ::slotted(u-summary) { cursor: pointer; display: list-item; counter-increment: list-item 0; list-style: disclosure-closed inside }
3
3
  ::slotted(u-summary[aria-expanded="true"]) { list-style-type: disclosure-open }
4
- :host > [part="details-content"]:not([hidden=""]) { display: block }`))}static get observedAttributes(){return["open"]}connectedCallback(){var t;this._content=(t=this.shadowRoot)==null?void 0:t.children[1],Ie(this._content,"beforematch",this),Ie(this,"click,keydown",this),this.attributeChangedCallback()}disconnectedCallback(){this._content&&Ce(this._content,"beforematch",this),Ce(this,"click,keydown",this),this._content=null}attributeChangedCallback(t,e,n){const o="onbeforematch"in this?"until-found":!0,i=this.open;for(const r of this.children)r.nodeName==="U-SUMMARY"&&I(r,"aria-expanded",`${i}`);if(this._content&&(I(this._content,"aria-hidden",`${!i}`),this._content.hidden=i?!1:o),i&&this.name){const r=Wn(this).querySelectorAll(`${this.nodeName}[name="${this.name}"]`);for(const s of r)s!==this&&(s.open=!1)}t==="open"&&e===null!=(n===null)&&this.dispatchEvent(new Event("toggle"))}handleEvent(t){const e=this.querySelector(":scope > u-summary"),n=e==null?void 0:e.contains(t.target);t.defaultPrevented||(t.type==="beforematch"&&(this.open=!0),n&&t.type==="keydown"&&Kn(t),n&&t.type==="click"&&(this.open=!this.open))}get open(){return this.hasAttribute("open")}set open(t){I(this,"open",t?"":null)}get name(){return I(this,"name")||""}set name(t){I(this,"name",t)}},Gn=class extends we{connectedCallback(){I(this,"role","button"),this.slot="summary",this.tabIndex=0}};xe.define("u-details",Xn),xe.define("u-summary",Gn);const Le=({clientX:t,clientY:e,target:n})=>{var o;if(n instanceof HTMLDialogElement&&f(n,"data-closedby")==="any"){const{top:i,right:r,bottom:s,left:a}=n.getBoundingClientRect();i<=e&&e<=s&&a<=t&&t<=r||n.close()}else n instanceof Element&&n.closest('button[data-command="close"]')&&((o=n==null?void 0:n.closest("dialog"))==null||o.close())};function Qn(t){g(t,"click",Le,v)}function Jn(t){L(t,"click",Le,v)}var Zn=Object.defineProperty,Ae=Object.getOwnPropertySymbols,to=Object.prototype.hasOwnProperty,eo=Object.prototype.propertyIsEnumerable,ke=(t,e,n)=>e in t?Zn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,no=(t,e)=>{for(var n in e||(e={}))to.call(e,n)&&ke(t,n,e[n]);if(Ae)for(var n of Ae(e))eo.call(e,n)&&ke(t,n,e[n]);return t},C=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",oo=C&&/android/i.test(navigator.userAgent),ft=C&&/iPad|iPhone|iPod/.test(navigator.userAgent),Oe=C&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent),Me;C&&/^Mac/i.test(((Me=navigator.userAgentData)==null?void 0:Me.platform)||navigator.platform);var io=`${oo?"data":"aria"}-labelledby`,De=`${Oe?"aria":"data"}-multiselectable`,Pe=":host(:not([hidden])) { display: block }",so="outline: 1px dotted; outline: 5px auto Highlight; outline: 5px auto -webkit-focus-ring-color",Re=typeof HTMLElement>"u"?class{}:HTMLElement;function p(t,e,n){var o;return n===void 0?(o=t.getAttribute(e))!=null?o:null:(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null)}var He=(t,e,n)=>{for(const o of n[0].split(","))n[0]=o,Element.prototype[`${t}EventListener`].apply(e,n)},pt=(t,...e)=>He("add",t,e),ht=(t,...e)=>He("remove",t,e),je=(t,e)=>t.attachShadow({mode:"open"}).append(mt("slot"),mt("style",e)),Q=new WeakMap,Ne=(t,e)=>{if(e===void 0)return Q.get(t);try{Q.get(t).disconnect(),Q.delete(t)}catch{}if(e){const n=new MutationObserver(o=>t.handleEvent({type:"mutation",detail:o}));n.observe(t,e),Q.set(t,n)}},Be=t=>{var e;const n=((e=t.getRootNode)==null?void 0:e.call(t))||t.ownerDocument;return n instanceof Document||n instanceof ShadowRoot?n:document},ro=0,_t=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++ro).toString(32)}`),t.id):"",mt=(t,e,n)=>{const o=document.createElement(t);return e&&(o.textContent=e),o},qe={define:(t,e)=>!C||window.customElements.get(t)||window.customElements.define(t,e)},ao=t=>{if(!C)return null;const e=mt("div");return e.style.cssText="position:fixed;overflow:hidden;width:1px;white-space:nowrap",p(e,"aria-live",t),document.body.appendChild(e)};function Fe(t,e,n){if(!e)return Object.keys(t).map(i=>`data-sr-${i}`);const o=(e==null?void 0:e.startsWith("data-sr-"))&&e.slice(8);return o&&n&&t[o]&&(t[o]=n),[]}var vt="disabled",j="selected",lo=class extends Re{static get observedAttributes(){return[vt,j]}constructor(){super(),je(this,`${Pe}:host(:focus){${so}}:host{ cursor: pointer }`)}connectedCallback(){ft||(this.tabIndex=-1),p(this,"role")||p(this,"role","option"),this.attributeChangedCallback()}attributeChangedCallback(){p(this,"aria-disabled",`${this.disabled}`),p(this,"aria-selected",`${this.selected}`)}get defaultSelected(){return this[j]}set defaultSelected(e){this[j]=e}get disabled(){return p(this,vt)!==null}set disabled(e){p(this,vt,e?"":null)}get form(){return this.closest("form")}get index(){var e;const n=(e=this.closest("u-datalist"))==null?void 0:e.getElementsByTagName("u-option");return Array.from(n||[this]).indexOf(this)}get label(){return p(this,"label")||this.text}set label(e){p(this,"label",e)}get selected(){return p(this,j)!==null}set selected(e){p(this,j,e?"":null)}get text(){var e;return((e=this.textContent)==null?void 0:e.trim())||""}set text(e){this.textContent=e}get value(){return p(this,"value")||this.text}set value(e){p(this,"value",e)}};qe.define("u-option",lo);var bt=!1,Ue,co=0,N=ao("assertive"),uo=Oe&&!ft,Ve="click,focusout,input,keydown,mousedown,mouseup",ze={singular:"%d hit",plural:"%d hits"},Ye=class extends Re{constructor(){super(),this._blurTimer=0,this._input=null,this._root=null,this._value="",this._texts=no({},ze),je(this,`${Pe}::slotted(u-option[disabled]) { display: none !important }`)}static get observedAttributes(){return["id",...Fe(ze)]}connectedCallback(){this.hidden=!0,this._root=Be(this),N&&!N.isConnected&&document.body.append(N),p(this,"role","listbox"),pt(this._root,"focusin",this),pt(this._root,"focus",this,!0),setTimeout(()=>this.attributeChangedCallback())}disconnectedCallback(){ht(this._root||this,"focus",this,!0),ht(this._root||this,"focusin",this),gt(this),this._root=null}attributeChangedCallback(e,n,o){var i;Fe(this._texts,e,o);const r=(i=this._root)==null?void 0:i.querySelectorAll(`input[list="${this.id}"]`);for(const s of r||[])We(this,s)}handleEvent(e){const{type:n}=e;e.defaultPrevented||(n==="click"&&ho(this,e),(n==="focus"||n==="focusin")&&fo(this,e),n==="focusout"&&po(this),n==="keydown"&&_o(this,e),(n==="mutation"||n==="input")&&Ge(this,e),n==="mouseup"&&(bt=!1),n==="mousedown"&&(bt=this.contains(e.target)))}get options(){return this.getElementsByTagName("u-option")}},fo=(t,{target:e})=>{var n;const o=t._input===e;if(o||t.contains(e))return clearTimeout(t._blurTimer);!o&&e instanceof HTMLInputElement&&p(e,"list")===t.id&&(t._input&&gt(t),t._input=e,p(t,io,_t((n=t._input.labels)==null?void 0:n[0])),pt(t._root||t,Ve,t),Ne(t,{attributeFilter:["value"],attributes:!0,childList:!0,subtree:!0}),k(t,!0))},po=t=>{bt||(t._blurTimer=setTimeout(()=>gt(t)))},ho=(t,{target:e})=>{var n,o,i,r,s;const a=p(t,De)!=="true",c=[...t.options].find(l=>l.contains(e));if(t._input===e)k(t,!0);else if(c&&J(c)){for(const l of t.options)l===c?l.selected=!0:a&&(l.selected=!1);(o=(n=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"))==null?void 0:n.set)==null||o.call(t._input,c.value),a&&((i=t._input)==null||i.focus(),k(t,!1)),(r=t._input)==null||r.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),(s=t._input)==null||s.dispatchEvent(new Event("change",{bubbles:!0}))}},_o=(t,e)=>{var n,o;if(e.altKey||e.ctrlKey||e.metaKey||e.shiftKey)return;e.key!=="Escape"&&k(t,!0);const{key:i}=e,r=(n=t._root)==null?void 0:n.activeElement,s=Ke(t),a=s.indexOf(r);let c=-1;if(i==="ArrowDown"&&(c=(a+1)%s.length),i==="ArrowUp"&&(c=(~a?a:s.length)-1),~a&&((i==="Home"||i==="PageUp")&&(c=0),(i==="End"||i==="PageDown")&&(c=s.length-1),i==="Enter"))return s[a].click(),e.preventDefault();if(s[c])for(const l of s)l.tabIndex=-1;s[c]&&e.preventDefault(),(o=s[c]||t._input)==null||o.focus(),i==="Escape"&&k(t,!1)},k=(t,e)=>{t.hidden=!e,t.popover&&t.togglePopover(e),t._input&&We(t,t._input,e),e&&Ge(t)},gt=t=>{ht(t._root||t,Ve,t),Ne(t,!1),k(t,!1),t._input=null},Ke=t=>[...t.options].filter(e=>!e.disabled&&e.offsetWidth&&e.offsetHeight),J=t=>t instanceof HTMLOptionElement||t.getAttribute("role")==="option",We=(t,e,n=!1)=>{p(e,"popovertarget",_t(t)),p(e,"aria-autocomplete","list"),p(e,"aria-controls",_t(t)),p(e,"aria-expanded",`${uo||n}`),p(e,"autocomplete","off"),p(e,"role","combobox")},Xe=t=>(t==null?void 0:t.toLowerCase().trim())||"",Ge=(t,e)=>{var n;const o=Xe((n=t._input)==null?void 0:n.value);if(!((e==null?void 0:e.type)==="mutation"||t._value!==o))return;const r=t.hidden,s=p(t,De)!=="true",a=e instanceof InputEvent&&!bo(e);t.hidden=!0,t._value=o;for(const l of t.options){const u=[l.value,l.label,l.text].map(Xe);l.hidden=!u.some(h=>h.includes(o)),s&&a&&J(l)&&(l.selected=u.includes(o))}t.hidden=r;const c=Ke(t);clearTimeout(Ue),Ue=setTimeout(()=>{const{length:l}=c.filter(J),u=++co%2?" ":"",h=`${`${t._texts[l===1?"singular":"plural"]}`.replace("%d",`${l}`)}`;N&&(N.textContent=`${!l&&t.innerText.trim()||h}${u}`)},1e3),ft&&c.map((l,u,h)=>{l.title=`${u+1}/${h}`})};C&&Object.defineProperty(HTMLInputElement.prototype,"list",{configurable:!0,enumerable:!0,get(){return Be(this).getElementById(p(this,"list")||"")}}),qe.define("u-datalist",Ye);var mo=" ".repeat(100),vo="insertReplacementText";function bo(t){var e;const n=t instanceof Event&&t.type==="input"&&t.target instanceof HTMLInputElement&&(!t.inputType||t.inputType===vo);if(n){const o=t.target.value,i=Array.from(((e=t.target.list)==null?void 0:e.options)||[]).some(r=>r.value===o&&!J(r));t.target.value=o.split(mo)[i?1:0]}return n}var go=Object.defineProperty,Qe=Object.getOwnPropertySymbols,yo=Object.prototype.hasOwnProperty,Eo=Object.prototype.propertyIsEnumerable,Je=(t,e,n)=>e in t?go(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ze=(t,e)=>{for(var n in e||(e={}))yo.call(e,n)&&Je(t,n,e[n]);if(Qe)for(var n of Qe(e))Eo.call(e,n)&&Je(t,n,e[n]);return t},w=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",tn=w&&/android/i.test(navigator.userAgent),$o=w&&/firefox/i.test(navigator.userAgent),Z=w&&/iPad|iPhone|iPod/.test(navigator.userAgent),en=w&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent),nn,To=w&&/^Mac/i.test(((nn=navigator.userAgentData)==null?void 0:nn.platform)||navigator.platform),wo=`${tn?"data":"aria"}-labelledby`,yt=`${en?"aria":"data"}-multiselectable`,on=":host(:not([hidden])) { display: block }",sn="outline: 1px dotted; outline: 5px auto Highlight; outline: 5px auto -webkit-focus-ring-color",Et=typeof HTMLElement>"u"?class{}:HTMLElement;function d(t,e,n){var o;return n===void 0?(o=t.getAttribute(e))!=null?o:null:(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null)}var rn=(t,e,n)=>{for(const o of n[0].split(","))n[0]=o,Element.prototype[`${t}EventListener`].apply(e,n)},B=(t,...e)=>rn("add",t,e),q=(t,...e)=>rn("remove",t,e),an=(t,e)=>t.attachShadow({mode:"open"}).append(O("slot"),O("style",e)),tt=new WeakMap,et=(t,e)=>{if(e===void 0)return tt.get(t);try{tt.get(t).disconnect(),tt.delete(t)}catch{}if(e){const n=new MutationObserver(o=>t.handleEvent({type:"mutation",detail:o}));n.observe(t,e),tt.set(t,n)}},So=t=>{const e="key"in t&&(t.key===" "||t.key==="Enter");return e&&t.preventDefault(),e&&t.target instanceof HTMLElement&&t.target.click(),e},nt=t=>{var e;const n=((e=t.getRootNode)==null?void 0:e.call(t))||t.ownerDocument;return n instanceof Document||n instanceof ShadowRoot?n:document},Io=0,$t=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++Io).toString(32)}`),t.id):"",O=(t,e,n)=>{const o=document.createElement(t);if(e&&(o.textContent=e),n)for(const[i,r]of Object.entries(n))d(o,i,r);return o},Tt={define:(t,e)=>!w||window.customElements.get(t)||window.customElements.define(t,e)},ln=t=>{if(!w)return null;const e=O("div");return e.style.cssText="position:fixed;overflow:hidden;width:1px;white-space:nowrap",d(e,"aria-live",t),document.body.appendChild(e)};function ot(t,e,n){if(!e)return Object.keys(t).map(i=>`data-sr-${i}`);const o=(e==null?void 0:e.startsWith("data-sr-"))&&e.slice(8);return o&&n&&t[o]&&(t[o]=n),[]}var wt="disabled",F="selected",Co=class extends Et{static get observedAttributes(){return[wt,F]}constructor(){super(),an(this,`${on}:host(:focus){${sn}}:host{ cursor: pointer }`)}connectedCallback(){Z||(this.tabIndex=-1),d(this,"role")||d(this,"role","option"),this.attributeChangedCallback()}attributeChangedCallback(){d(this,"aria-disabled",`${this.disabled}`),d(this,"aria-selected",`${this.selected}`)}get defaultSelected(){return this[F]}set defaultSelected(t){this[F]=t}get disabled(){return d(this,wt)!==null}set disabled(t){d(this,wt,t?"":null)}get form(){return this.closest("form")}get index(){var t;const e=(t=this.closest("u-datalist"))==null?void 0:t.getElementsByTagName("u-option");return Array.from(e||[this]).indexOf(this)}get label(){return d(this,"label")||this.text}set label(t){d(this,"label",t)}get selected(){return d(this,F)!==null}set selected(t){d(this,F,t?"":null)}get text(){var t;return((t=this.textContent)==null?void 0:t.trim())||""}set text(t){this.textContent=t}get value(){return d(this,"value")||this.text}set value(t){d(this,"value",t)}};Tt.define("u-option",Co);var St=!1,cn,xo=0,U=ln("assertive"),Lo=en&&!Z,un="click,focusout,input,keydown,mousedown,mouseup",dn={singular:"%d hit",plural:"%d hits"},Ao=class extends Et{constructor(){super(),this._blurTimer=0,this._input=null,this._root=null,this._value="",this._texts=Ze({},dn),an(this,`${on}::slotted(u-option[disabled]) { display: none !important }`)}static get observedAttributes(){return["id",...ot(dn)]}connectedCallback(){this.hidden=!0,this._root=nt(this),U&&!U.isConnected&&document.body.append(U),d(this,"role","listbox"),B(this._root,"focusin",this),B(this._root,"focus",this,!0),setTimeout(()=>this.attributeChangedCallback())}disconnectedCallback(){q(this._root||this,"focus",this,!0),q(this._root||this,"focusin",this),It(this),this._root=null}attributeChangedCallback(t,e,n){var o;ot(this._texts,t,n);const i=(o=this._root)==null?void 0:o.querySelectorAll(`input[list="${this.id}"]`);for(const r of i||[])pn(this,r)}handleEvent(t){const{type:e}=t;t.defaultPrevented||(e==="click"&&Mo(this,t),(e==="focus"||e==="focusin")&&ko(this,t),e==="focusout"&&Oo(this),e==="keydown"&&Do(this,t),(e==="mutation"||e==="input")&&_n(this,t),e==="mouseup"&&(St=!1),e==="mousedown"&&(St=this.contains(t.target)))}get options(){return this.getElementsByTagName("u-option")}},ko=(t,{target:e})=>{var n;const o=t._input===e;if(o||t.contains(e))return clearTimeout(t._blurTimer);!o&&e instanceof HTMLInputElement&&d(e,"list")===t.id&&(t._input&&It(t),t._input=e,d(t,wo,$t((n=t._input.labels)==null?void 0:n[0])),B(t._root||t,un,t),et(t,{attributeFilter:["value"],attributes:!0,childList:!0,subtree:!0}),M(t,!0))},Oo=t=>{St||(t._blurTimer=setTimeout(()=>It(t)))},Mo=(t,{target:e})=>{var n,o,i,r,s;const a=d(t,yt)!=="true",c=[...t.options].find(l=>l.contains(e));if(t._input===e)M(t,!0);else if(c&&it(c)){for(const l of t.options)l===c?l.selected=!0:a&&(l.selected=!1);(o=(n=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"))==null?void 0:n.set)==null||o.call(t._input,c.value),a&&((i=t._input)==null||i.focus(),M(t,!1)),(r=t._input)==null||r.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),(s=t._input)==null||s.dispatchEvent(new Event("change",{bubbles:!0}))}},Do=(t,e)=>{var n,o;if(e.altKey||e.ctrlKey||e.metaKey||e.shiftKey)return;e.key!=="Escape"&&M(t,!0);const{key:i}=e,r=(n=t._root)==null?void 0:n.activeElement,s=fn(t),a=s.indexOf(r);let c=-1;if(i==="ArrowDown"&&(c=(a+1)%s.length),i==="ArrowUp"&&(c=(~a?a:s.length)-1),~a&&((i==="Home"||i==="PageUp")&&(c=0),(i==="End"||i==="PageDown")&&(c=s.length-1),i==="Enter"))return s[a].click(),e.preventDefault();if(s[c])for(const l of s)l.tabIndex=-1;s[c]&&e.preventDefault(),(o=s[c]||t._input)==null||o.focus(),i==="Escape"&&M(t,!1)},M=(t,e)=>{t.hidden=!e,t.popover&&t.togglePopover(e),t._input&&pn(t,t._input,e),e&&_n(t)},It=t=>{q(t._root||t,un,t),et(t,!1),M(t,!1),t._input=null},fn=t=>[...t.options].filter(e=>!e.disabled&&e.offsetWidth&&e.offsetHeight),it=t=>t instanceof HTMLOptionElement||t.getAttribute("role")==="option",pn=(t,e,n=!1)=>{d(e,"popovertarget",$t(t)),d(e,"aria-autocomplete","list"),d(e,"aria-controls",$t(t)),d(e,"aria-expanded",`${Lo||n}`),d(e,"autocomplete","off"),d(e,"role","combobox")},hn=t=>(t==null?void 0:t.toLowerCase().trim())||"",_n=(t,e)=>{var n;const o=hn((n=t._input)==null?void 0:n.value);if(!((e==null?void 0:e.type)==="mutation"||t._value!==o))return;const r=t.hidden,s=d(t,yt)!=="true",a=e instanceof InputEvent&&!vn(e);t.hidden=!0,t._value=o;for(const l of t.options){const u=[l.value,l.label,l.text].map(hn);l.hidden=!u.some(h=>h.includes(o)),s&&a&&it(l)&&(l.selected=u.includes(o))}t.hidden=r;const c=fn(t);clearTimeout(cn),cn=setTimeout(()=>{const{length:l}=c.filter(it),u=++xo%2?" ":"",h=`${`${t._texts[l===1?"singular":"plural"]}`.replace("%d",`${l}`)}`;U&&(U.textContent=`${!l&&t.innerText.trim()||h}${u}`)},1e3),Z&&c.map((l,u,h)=>{l.title=`${u+1}/${h}`})};w&&Object.defineProperty(HTMLInputElement.prototype,"list",{configurable:!0,enumerable:!0,get(){return nt(this).getElementById(d(this,"list")||"")}}),Tt.define("u-datalist",Ao);var mn=" ".repeat(100),Po="insertReplacementText",Ct=({value:t})=>t.split(mn)[0];function vn(t){var e;const n=t instanceof Event&&t.type==="input"&&t.target instanceof HTMLInputElement&&(!t.inputType||t.inputType===Po);if(n){const o=t.target.value,i=Array.from(((e=t.target.list)==null?void 0:e.options)||[]).some(r=>r.value===o&&!it(r));t.target.value=o.split(mn)[i?1:0]}return n}var Ro=tn||Z,Ho=$o||To,V=ln("polite"),bn="input,focusin,focusout,keydown",gn={added:"Added",remove:"Press to remove",removed:"Removed",empty:"No selected",found:"Navigate left to find %d selected",of:"of"},jo=class extends Et{constructor(){super(),this._blurAnnounceReset=!1,this._blurTimer=0,this._focusIndex=null,this._root=null,this._texts=Ze({},gn),this.attachShadow({mode:"open"}).append(O("slot"),O("style",`:host(:not([hidden])){ display: inline-block }
4
+ :host > [part="details-content"]:not([hidden=""]) { display: block }`))}static get observedAttributes(){return["open"]}connectedCallback(){var t;this._content=(t=this.shadowRoot)==null?void 0:t.children[1],cn(this._content,"beforematch",this),cn(this,"click,keydown",this),this.attributeChangedCallback()}disconnectedCallback(){this._content&&fn(this._content,"beforematch",this),fn(this,"click,keydown",this),this._content=null}attributeChangedCallback(t,e,n){const o="onbeforematch"in this?"until-found":!0,i=this.open;for(const s of this.children)s.nodeName==="U-SUMMARY"&&L(s,"aria-expanded",`${i}`);if(this._content&&(L(this._content,"aria-hidden",`${!i}`),this._content.hidden=i?!1:o),i&&this.name){const s=jo(this).querySelectorAll(`${this.nodeName}[name="${this.name}"]`);for(const r of s)r!==this&&(r.open=!1)}t==="open"&&e===null!=(n===null)&&this.dispatchEvent(new Event("toggle"))}handleEvent(t){const e=this.querySelector(":scope > u-summary"),n=e==null?void 0:e.contains(t.target);t.defaultPrevented||(t.type==="beforematch"&&(this.open=!0),n&&t.type==="keydown"&&Ro(t),n&&t.type==="click"&&(this.open=!this.open))}get open(){return this.hasAttribute("open")}set open(t){L(this,"open",t?"":null)}get name(){return L(this,"name")||""}set name(t){L(this,"name",t)}},No=class extends dn{connectedCallback(){L(this,"role","button"),this.slot="summary",this.tabIndex=0}};pn.define("u-details",Ho),pn.define("u-summary",No);var Ct=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",Bo=Ct&&/android/i.test(navigator.userAgent),hn;Ct&&/^Mac/i.test(((hn=navigator.userAgentData)==null?void 0:hn.platform)||navigator.platform);var Fo=`${Bo?"data":"aria"}-labelledby`,At=":host(:not([hidden])) { display: block }",et=typeof HTMLElement>"u"?class{}:HTMLElement;function g(t,e,n){var o;return n===void 0?(o=t.getAttribute(e))!=null?o:null:(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null)}var _n=(t,e,n)=>{for(const o of n[0].split(","))n[0]=o,Element.prototype[`${t}EventListener`].apply(e,n)},Uo=(t,...e)=>_n("add",t,e),Vo=(t,...e)=>_n("remove",t,e),nt=(t,e)=>t.attachShadow({mode:"open"}).append(gn("slot"),gn("style",e)),ot=new WeakMap,mn=(t,e)=>{if(e===void 0)return ot.get(t);try{ot.get(t).disconnect(),ot.delete(t)}catch{}if(e){const n=new MutationObserver(o=>t.handleEvent({type:"mutation",detail:o}));n.observe(t,e),ot.set(t,n)}},zo=t=>{const e="key"in t&&(t.key===" "||t.key==="Enter");return e&&t.preventDefault(),e&&t.target instanceof HTMLElement&&t.target.click(),e},bn=t=>{var e;const n=((e=t.getRootNode)==null?void 0:e.call(t))||t.ownerDocument;return n instanceof Document||n instanceof ShadowRoot?n:document},Yo=0,vn=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++Yo).toString(32)}`),t.id):"",gn=(t,e,n)=>{const o=document.createElement(t);return e&&(o.textContent=e),o},it={define:(t,e)=>!Ct||window.customElements.get(t)||window.customElements.define(t,e)},st="aria-controls",O="aria-selected",Ko=class extends et{constructor(){super(),nt(this,At)}get tabList(){return rt("u-tablist",this)[0]||null}get selectedIndex(){return at(this.tabs)}set selectedIndex(t){Mt(this.tabs[t])}get tabs(){return rt("u-tab",this)}get panels(){return rt("u-tabpanel",this)}},Wo=class extends et{constructor(){super(),nt(this,At)}connectedCallback(){g(this,"role","tablist"),Uo(this,"click,keydown",this),mn(this,{childList:!0}),this.tabs.length&&this.handleEvent()}disconnectedCallback(){Vo(this,"click,keydown",this),mn(this,!1)}handleEvent(t){if(!t||t.type==="mutation"){const s=this.tabs[Math.max(this.selectedIndex,0)];return s==null?void 0:s.setAttribute(O,"true")}const{key:e}=t,n=[...this.tabs],o=n.findIndex(s=>s.contains(t.target));let i=o;if(!(t.defaultPrevented||o===-1)&&(t.type==="click"&&Mt(n[o]),t.type==="keydown"&&!zo(t))){if(e==="ArrowDown"||e==="ArrowRight")i=(o+1)%n.length;else if(e==="ArrowUp"||e==="ArrowLeft")i=(o||n.length)-1;else if(e==="End")i=n.length-1;else if(e==="Home")i=0;else if(e==="Tab")i=at(n);else return;setTimeout(()=>{n[o].tabIndex=-1,n[i].tabIndex=0}),e!=="Tab"&&(t.preventDefault(),n[i].focus())}}get tabsElement(){return this.closest("u-tabs")}get tabs(){return this.querySelectorAll("u-tab")}get selectedIndex(){return at(this.tabs)}set selectedIndex(t){Mt(this.tabs[t])}},kt=!1,qo=class extends et{static get observedAttributes(){return["id",O,st]}constructor(){super(),nt(this,":host(:not([hidden])) { cursor: pointer; display: inline-block }")}connectedCallback(){g(this,"role","tab"),this.tabIndex=this.selected?0:-1}attributeChangedCallback(){if(!kt&&this.selected&&this.tabList){kt=!0;const t=[...this.tabList.querySelectorAll("u-tab")],e=rt("u-tabpanel",this.tabsElement||this),n=Ot(this,e[t.indexOf(this)]);n&&g(n,Fo,vn(this)),t.forEach((o,i)=>{const s=Ot(o,e[i]);o.tabIndex=o===this?0:-1,g(o,O,`${o===this}`),s&&(s.hidden=s!==n),s&&g(o,st,s.id)}),kt=!1}}get tabsElement(){return this.closest("u-tabs")}get tabList(){const t=this.parentElement;return(t==null?void 0:t.nodeName)==="U-TABLIST"?t:null}get selected(){return g(this,O)==="true"}set selected(t){g(this,O,`${!!t}`)}get index(){const t=this.tabList;return t?[...t.querySelectorAll("u-tab")].indexOf(this):0}get panel(){return Ot(this)}},Xo=class extends et{static get observedAttributes(){return["hidden"]}constructor(){super(),nt(this,At)}connectedCallback(){g(this,"role","tabpanel"),this.hidden=at(this.tabs)===-1,this.attributeChangedCallback()}attributeChangedCallback(){this.hidden||Go(this.firstChild)?g(this,"tabindex",null):this.tabIndex=0}get tabsElement(){return this.closest("u-tabs")}get tabs(){const t=`u-tab[${st}="${this.id}"]`;return bn(this).querySelectorAll(t)}},rt=(t,e)=>e.querySelectorAll(`${t}:not(:scope u-tabpanel ${t})`),Ot=(t,e)=>{const n=g(t,st)||vn(e),o=bn(t).getElementById(n);return(o==null?void 0:o.nodeName)==="U-TABPANEL"?o:null},at=t=>[...t].findIndex(e=>g(e,O)==="true"),Mt=t=>t&&g(t,"aria-selected","true"),Go=t=>t instanceof Element&&!t.matches(':disabled,[tabindex^="-"]')&&t.matches('[contenteditable],[controls],[href],[tabindex],input:not([type="hidden"]),select,textarea,button,summary,iframe');it.define("u-tabs",Ko),it.define("u-tablist",Wo),it.define("u-tab",qo),it.define("u-tabpanel",Xo);var Qo=Object.defineProperty,yn=Object.getOwnPropertySymbols,Jo=Object.prototype.hasOwnProperty,Zo=Object.prototype.propertyIsEnumerable,En=(t,e,n)=>e in t?Qo(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,$n=(t,e)=>{for(var n in e||(e={}))Jo.call(e,n)&&En(t,n,e[n]);if(yn)for(var n of yn(e))Zo.call(e,n)&&En(t,n,e[n]);return t},I=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",wn=I&&/android/i.test(navigator.userAgent),ti=I&&/firefox/i.test(navigator.userAgent),lt=I&&/iPad|iPhone|iPod/.test(navigator.userAgent),Tn=I&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent),In,ei=I&&/^Mac/i.test(((In=navigator.userAgentData)==null?void 0:In.platform)||navigator.platform),ni=`${wn?"data":"aria"}-labelledby`,Pt=`${Tn?"aria":"data"}-multiselectable`,xn=":host(:not([hidden])) { display: block }",Sn="outline: 1px dotted; outline: 5px auto Highlight; outline: 5px auto -webkit-focus-ring-color",Dt=typeof HTMLElement>"u"?class{}:HTMLElement;function c(t,e,n){var o;return n===void 0?(o=t.getAttribute(e))!=null?o:null:(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null)}var Ln=(t,e,n)=>{for(const o of n[0].split(","))n[0]=o,Element.prototype[`${t}EventListener`].apply(e,n)},F=(t,...e)=>Ln("add",t,e),U=(t,...e)=>Ln("remove",t,e),Cn=(t,e)=>t.attachShadow({mode:"open"}).append(M("slot"),M("style",e)),dt=new WeakMap,ut=(t,e)=>{if(e===void 0)return dt.get(t);try{dt.get(t).disconnect(),dt.delete(t)}catch{}if(e){const n=new MutationObserver(o=>t.handleEvent({type:"mutation",detail:o}));n.observe(t,e),dt.set(t,n)}},oi=t=>{const e="key"in t&&(t.key===" "||t.key==="Enter");return e&&t.preventDefault(),e&&t.target instanceof HTMLElement&&t.target.click(),e},ct=t=>{var e;const n=((e=t.getRootNode)==null?void 0:e.call(t))||t.ownerDocument;return n instanceof Document||n instanceof ShadowRoot?n:document},ii=0,Rt=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++ii).toString(32)}`),t.id):"",M=(t,e,n)=>{const o=document.createElement(t);if(e&&(o.textContent=e),n)for(const[i,s]of Object.entries(n))c(o,i,s);return o},jt={define:(t,e)=>!I||window.customElements.get(t)||window.customElements.define(t,e)},An=t=>{if(!I)return null;const e=M("div");return e.style.cssText="position:fixed;overflow:hidden;width:1px;white-space:nowrap",c(e,"aria-live",t),document.body.appendChild(e)};function ft(t,e,n){if(!e)return Object.keys(t).map(i=>`data-sr-${i}`);const o=(e==null?void 0:e.startsWith("data-sr-"))&&e.slice(8);return o&&n&&t[o]&&(t[o]=n),[]}var Ht="disabled",V="selected",si=class extends Dt{static get observedAttributes(){return[Ht,V]}constructor(){super(),Cn(this,`${xn}:host(:focus){${Sn}}:host{ cursor: pointer }`)}connectedCallback(){lt||(this.tabIndex=-1),c(this,"role")||c(this,"role","option"),this.attributeChangedCallback()}attributeChangedCallback(){c(this,"aria-disabled",`${this.disabled}`),c(this,"aria-selected",`${this.selected}`)}get defaultSelected(){return this[V]}set defaultSelected(t){this[V]=t}get disabled(){return c(this,Ht)!==null}set disabled(t){c(this,Ht,t?"":null)}get form(){return this.closest("form")}get index(){var t;const e=(t=this.closest("u-datalist"))==null?void 0:t.getElementsByTagName("u-option");return Array.from(e||[this]).indexOf(this)}get label(){return c(this,"label")||this.text}set label(t){c(this,"label",t)}get selected(){return c(this,V)!==null}set selected(t){c(this,V,t?"":null)}get text(){var t;return((t=this.textContent)==null?void 0:t.trim())||""}set text(t){this.textContent=t}get value(){return c(this,"value")||this.text}set value(t){c(this,"value",t)}};jt.define("u-option",si);var Nt=!1,kn,ri=0,z=An("assertive"),ai=Tn&&!lt,On="click,focusout,input,keydown,mousedown,mouseup",Mn={singular:"%d hit",plural:"%d hits"},li=class extends Dt{constructor(){super(),this._blurTimer=0,this._input=null,this._root=null,this._value="",this._texts=$n({},Mn),Cn(this,`${xn}::slotted(u-option[disabled]) { display: none !important }`)}static get observedAttributes(){return["id",...ft(Mn)]}connectedCallback(){this.hidden=!0,this._root=ct(this),z&&!z.isConnected&&document.body.append(z),c(this,"role","listbox"),F(this._root,"focusin",this),F(this._root,"focus",this,!0),setTimeout(()=>this.attributeChangedCallback())}disconnectedCallback(){U(this._root||this,"focus",this,!0),U(this._root||this,"focusin",this),Bt(this),this._root=null}attributeChangedCallback(t,e,n){var o;ft(this._texts,t,n);const i=(o=this._root)==null?void 0:o.querySelectorAll(`input[list="${this.id}"]`);for(const s of i||[])Dn(this,s)}handleEvent(t){const{type:e}=t;t.defaultPrevented||(e==="click"&&ci(this,t),(e==="focus"||e==="focusin")&&di(this,t),e==="focusout"&&ui(this),e==="keydown"&&fi(this,t),(e==="mutation"||e==="input")&&jn(this,t),e==="mouseup"&&(Nt=!1),e==="mousedown"&&(Nt=this.contains(t.target)))}get options(){return this.getElementsByTagName("u-option")}},di=(t,{target:e})=>{var n;const o=t._input===e;if(o||t.contains(e))return clearTimeout(t._blurTimer);!o&&e instanceof HTMLInputElement&&c(e,"list")===t.id&&(t._input&&Bt(t),t._input=e,c(t,ni,Rt((n=t._input.labels)==null?void 0:n[0])),F(t._root||t,On,t),ut(t,{attributeFilter:["value"],attributes:!0,childList:!0,subtree:!0}),P(t,!0))},ui=t=>{Nt||(t._blurTimer=setTimeout(()=>Bt(t)))},ci=(t,{target:e})=>{var n,o,i,s,r;const a=c(t,Pt)!=="true",d=[...t.options].find(l=>l.contains(e));if(t._input===e)P(t,!0);else if(d&&pt(d)){for(const l of t.options)l===d?l.selected=!0:a&&(l.selected=!1);(o=(n=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"))==null?void 0:n.set)==null||o.call(t._input,d.value),a&&((i=t._input)==null||i.focus(),P(t,!1)),(s=t._input)==null||s.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),(r=t._input)==null||r.dispatchEvent(new Event("change",{bubbles:!0}))}},fi=(t,e)=>{var n,o;if(e.altKey||e.ctrlKey||e.metaKey||e.shiftKey)return;e.key!=="Escape"&&P(t,!0);const{key:i}=e,s=(n=t._root)==null?void 0:n.activeElement,r=Pn(t),a=r.indexOf(s);let d=-1;if(i==="ArrowDown"&&(d=(a+1)%r.length),i==="ArrowUp"&&(d=(~a?a:r.length)-1),~a&&((i==="Home"||i==="PageUp")&&(d=0),(i==="End"||i==="PageDown")&&(d=r.length-1),i==="Enter"))return r[a].click(),e.preventDefault();if(r[d])for(const l of r)l.tabIndex=-1;r[d]&&e.preventDefault(),(o=r[d]||t._input)==null||o.focus(),i==="Escape"&&P(t,!1)},P=(t,e)=>{t.hidden=!e,t.popover&&t.togglePopover(e),t._input&&Dn(t,t._input,e),e&&jn(t)},Bt=t=>{U(t._root||t,On,t),ut(t,!1),P(t,!1),t._input=null},Pn=t=>[...t.options].filter(e=>!e.disabled&&e.offsetWidth&&e.offsetHeight),pt=t=>t instanceof HTMLOptionElement||t.getAttribute("role")==="option",Dn=(t,e,n=!1)=>{c(e,"popovertarget",Rt(t)),c(e,"aria-autocomplete","list"),c(e,"aria-controls",Rt(t)),c(e,"aria-expanded",`${ai||n}`),c(e,"autocomplete","off"),c(e,"role","combobox")},Rn=t=>(t==null?void 0:t.toLowerCase().trim())||"",jn=(t,e)=>{var n;const o=Rn((n=t._input)==null?void 0:n.value);if(!((e==null?void 0:e.type)==="mutation"||t._value!==o))return;const s=t.hidden,r=c(t,Pt)!=="true",a=e instanceof InputEvent&&!Nn(e);t.hidden=!0,t._value=o;for(const l of t.options){const f=[l.value,l.label,l.text].map(Rn);l.hidden=!f.some(h=>h.includes(o)),r&&a&&pt(l)&&(l.selected=f.includes(o))}t.hidden=s;const d=Pn(t);clearTimeout(kn),kn=setTimeout(()=>{const{length:l}=d.filter(pt),f=++ri%2?" ":"",h=`${`${t._texts[l===1?"singular":"plural"]}`.replace("%d",`${l}`)}`;z&&(z.textContent=`${!l&&t.innerText.trim()||h}${f}`)},1e3),lt&&d.map((l,f,h)=>{l.title=`${f+1}/${h}`})};I&&Object.defineProperty(HTMLInputElement.prototype,"list",{configurable:!0,enumerable:!0,get(){return ct(this).getElementById(c(this,"list")||"")}}),jt.define("u-datalist",li);var Hn=" ".repeat(100),pi="insertReplacementText",Ft=({value:t})=>t.split(Hn)[0];function Nn(t){var e;const n=t instanceof Event&&t.type==="input"&&t.target instanceof HTMLInputElement&&(!t.inputType||t.inputType===pi);if(n){const o=t.target.value,i=Array.from(((e=t.target.list)==null?void 0:e.options)||[]).some(s=>s.value===o&&!pt(s));t.target.value=o.split(Hn)[i?1:0]}return n}var hi=wn||lt,_i=ti||ei,Y=An("polite"),Bn="input,focusin,focusout,keydown",Fn={added:"Added",remove:"Press to remove",removed:"Removed",empty:"No selected",found:"Navigate left to find %d selected",of:"of"},mi=class extends Dt{constructor(){super(),this._blurAnnounceReset=!1,this._blurTimer=0,this._focusIndex=null,this._root=null,this._texts=$n({},Fn),this.attachShadow({mode:"open"}).append(M("slot"),M("style",`:host(:not([hidden])){ display: inline-block }
5
5
  ::slotted(data) { cursor: pointer; display: inline-block; outline: none; pointer-events: none }
6
6
  ::slotted(data)::after { content: '\\00D7'; content: '\\00D7' / ''; padding-inline: .5ch; pointer-events: auto }
7
- ::slotted(data:focus)::after { ${sn} }`))}static get observedAttributes(){return ot(gn)}connectedCallback(){this._root=nt(this),V&&!V.isConnected&&document.body.append(V),et(this,{childList:!0}),B(this._root,"click",this),B(this,bn,this),setTimeout(()=>st(this))}attributeChangedCallback(t,e,n){ot(this._texts,t,n)}disconnectedCallback(){et(this,!1),q(this._root||this,"click",this),q(this,bn,this),this._root=null}handleEvent(t){t.defaultPrevented||(t.type==="click"&&qo(this,t),t.type==="focusin"&&No(this,t),t.type==="focusout"&&Bo(this),t.type==="input"&&Fo(this,t),t.type==="keydown"&&Uo(this,t),t.type==="mutation"&&st(this,t))}get items(){return this.querySelectorAll("data")}get control(){return this.querySelector("input")}},xt=(t,e)=>t.dispatchEvent(new CustomEvent("tags",{bubbles:!0,cancelable:!0,detail:{item:e,action:e.isConnected?"remove":"add"}})),st=(t,e)=>{var n,o,i,r,s;const a=t._texts,c=Number.isNaN(t._focusIndex)?null:e==null?void 0:e.detail[0],l=(c==null?void 0:c.addedNodes[0])||(c==null?void 0:c.removedNodes[0]),u=`${l?`${l.isConnected?a.added:a.removed} ${l.textContent}, `:""}`,h=((i=(o=(n=t.control)==null?void 0:n.labels)==null?void 0:o[0])==null?void 0:i.textContent)||"",m=[];d(t,"role","group"),d(t,"aria-label",h),t.items.forEach((_,z,{length:Y})=>{var at;const lt=`${u}${_.textContent}, ${a.remove}, ${z+1} ${a.of} ${Y}`;d(_,"aria-label",lt),d(_,"role","button"),_.tabIndex=-1,_.value=_.value||((at=_.textContent)==null?void 0:at.trim())||"",m.push(_.value)});const S=t.control,Ot=`${u}${h}, ${m.length?a.found.replace("%d",`${m.length}`):a.empty}`,D=S&&document.getElementById(d(S,"list")||""),rt=D==null?void 0:D.children;S&&d(S,"aria-label",Ot),D&&d(D,yt,"true");for(const _ of rt||[])_.selected=m.includes(Ct(_));if(u){const _=t.items[(t._focusIndex||1)-1]||S,z=_===((r=nt(t))==null?void 0:r.activeElement),Y=rt||t.items;t._blurAnnounceReset=!1,_===S?(z&&(Ro&&V?V.textContent=u:(s=Y[0])==null||s.focus()),setTimeout(()=>_==null?void 0:_.focus(),100)):_==null||_.focus(),setTimeout(()=>{if(!Ho)return st(t);t._blurAnnounceReset=!0},500)}},No=(t,{target:e})=>{clearTimeout(t._blurTimer),t._focusIndex=[...t.items].indexOf(e)},Bo=t=>{t._blurAnnounceReset&&st(t),t._blurTimer=setTimeout(()=>{t._focusIndex=null})},qo=(t,{target:e,clientX:n,clientY:o})=>{var i;const r=t.contains(e)?[...t.items]:null,s=r==null?void 0:r.find(c=>c.contains(e)),a=r==null?void 0:r.find(c=>{const{top:l,right:u,bottom:h,left:m}=c.getBoundingClientRect();return o>=l&&o<=h&&n>=m&&n<=u});s?xt(t,s)&&s.remove():a?a.focus():e===t&&((i=t.control)==null||i.focus())},Fo=(t,e)=>{var n;const o=e.target;if(!vn(e)||!(o!=null&&o.value.trim()))return;const i=Ct(o),r=[...t.items],a=[...((n=o==null?void 0:o.list)==null?void 0:n.children)||[]].find(u=>Ct(u)===i),c=r.find(u=>u.value===i),l=O("data",(a==null?void 0:a.text)||i,{value:i});if(o.value="",!!xt(t,c||l)){if(c)return c.remove();if(!r[0])return t.prepend(l);r[r.length-1].insertAdjacentElement("afterend",l)}},Uo=(t,e)=>{var n,o;const{key:i,repeat:r,target:s}=e,a=t.control===s?t.control:null,c=a==null?void 0:a.selectionEnd;let l=a?t.items.length:(n=t._focusIndex)!=null?n:-1;if(!(l===-1||!a&&So(e))){if(i==="ArrowRight"&&!a)l+=1;else if(i==="ArrowLeft"&&!c)l-=1;else{if(i==="Enter"&&a)return e.preventDefault(),a.dispatchEvent(new Event("input",{bubbles:!0}));if((i==="Backspace"||i==="Delete")&&!c){const u=!r&&t.items[l];if(e.preventDefault(),u)return xt(t,u)&&u.remove();a&&(l-=1)}else return}e.preventDefault(),(o=t.items[Math.max(0,l)]||t.control)==null||o.focus()}};Tt.define("u-tags",jo);const Lt=b.field.split(" ")[0],Vo="--mtds-text-count-over",zo="--mtds-text-count-under",yn=b.validation.split(" "),Yo=yn[0];function Ko(t){for(const e of t){const n=[],o=[];let i=null,r=null,s=!0;for(const a of e.getElementsByTagName("*"))a instanceof HTMLLabelElement?n.push(a):a instanceof Ye?r=a:ct(a)?i=a:a.classList.contains(Yo)?(s=f(a,"data-color")==="success",o.unshift(R(a))):a instanceof HTMLParagraphElement&&o.push(R(a));if(i){for(const a of n)a.htmlFor=R(i);Wo(i,r),$n(i),En(i),f(i,"aria-describedby",o.join(" ")),f(i,"aria-invalid",`${!s}`)}}}function En(t){t instanceof HTMLTextAreaElement&&(t.style.height="auto",t.style.height=`${t.scrollHeight}px`)}function Wo(t,e){if(f(t,"list",e?R(e):null),!e)return;t.hasAttribute("placeholder")||f(t,"placeholder","");const n=window.getComputedStyle(e),o=n.getPropertyValue("--mtds-text-datalist-singular"),i=n.getPropertyValue("--mtds-text-datalist-plural");f(e,"data-sr-plural",i),f(e,"data-sr-singular",o)}function $n(t){var o,i;const e=t==null?void 0:t.nextElementSibling,n=e&&f(e,"data-count");if(e&&n){const r=Number(n)-t.value.length,s=r<0,a=f(e,"aria-live")==="polite",c=window.getComputedStyle(e||t),l=((o=c.getPropertyValue(Vo))==null?void 0:o.slice(1,-1))||"",u=((i=c.getPropertyValue(zo))==null?void 0:i.slice(1,-1))||"";if(a!==s){f(e,"aria-live",s?"polite":"off");for(const h of yn)e.classList.toggle(h,s)}e.textContent=(s?l:u).replace("%d",`${Math.abs(r)}`)}}function Tn({target:t}){ct(t)&&($n(t),En(t))}function wn(t){var e,n;(n=(e=t.target)==null?void 0:e.closest)!=null&&n.call(e,`.${Lt}`)&&t.preventDefault()}function Xo(t){T(t,Lt,Ko),g(t,"input",Tn,v),g(t,"invalid",wn,!0)}function Go(t){T(t,Lt,!1),L(t,"input",Tn,v),L(t,"invalid",wn,!0)}const Sn=b.fieldset.split(" ")[0],Qo=b.validation.split(" ")[0];function Jo(t){for(const e of t){const n=[];let o=null;for(const i of e.getElementsByTagName("*"))i.classList.contains(Qo)?o=R(i):ct(i)&&n.push(i);for(const i of n)f(i,"aria-describedby",o),f(i,"aria-invalid",`${!!o}`)}}const Zo=t=>T(t,Sn,Jo),ti=t=>T(t,Sn,!1),In=b.app.split(" ")[0],ei=`.${In} > header + :not(main) > button:empty:first-child`,ni="mtds-app-menu",Cn=({target:t})=>{const e=(t==null?void 0:t.nodeName)==="BUTTON"&&(t==null?void 0:t.closest(ei));if(!e)return;const n=e.closest(`.${In} > *`),o=`${n&&f(n,"data-expanded")==="false"}`,i=()=>n&&f(n,"data-expanded",o);oi(ni,o),document.startViewTransition?document.startViewTransition(()=>i()):i()};function oi(t,e){try{if(e)window.localStorage.setItem(t,e);else return window.localStorage.getItem(t)}catch{return null}}function ii(t){g(t,"click",Cn,v)}function si(t){L(t,"click",Cn,v)}const At=b.logo.split(" ")[0];let kt;function xn(t){var s,a;const e=(s=t[0])==null?void 0:s.firstElementChild;if(!e)return;if(!kt){const c=document.head.getElementsByTagName("link[rel~='icon']"),l=document.createElement("link");for(const u of c)u.remove();kt=document.head.appendChild(Object.assign(l,{rel:"icon"}))}const n=(a=e.parentElement)==null?void 0:a.hasAttribute("data-color"),o=window.getComputedStyle(e),i=o.getPropertyValue("color"),r=o.getPropertyValue("background-color");kt.href=`data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 55 55'><rect fill='${n?"none":r}' width='51' height='51' x='2' y='2' stroke='${i}' stroke-dasharray='0.09 6.38' stroke-linecap='round' stroke-opacity='${n?.6:0}' stroke-width='2.3' rx='25.5'/><g transform="translate(7.5 7.5)">${encodeURIComponent(e.outerHTML.replace(/(fill|width|height|xmlns)=\S+/gi,"").replace("<svg",`<svg width="40" height="40" fill="${i}"`))}</g></svg>`}P&&setTimeout(()=>xn(document.getElementsByClassName(At)),300);const ri=t=>T(t,At,xn),ai=t=>T(t,At,!1),Ln=b.popover.split(" ")[0];function li(t){g(t,"beforetoggle",An,v),g(t,"click",kn)}function ci(t){L(t,"beforetoggle",An,v),L(t,"click",kn)}function An({target:t,newState:e}){var n;if(t instanceof HTMLElement&&t.classList.contains(Ln)){const o=(n=t.getRootNode())==null?void 0:n.querySelector(`[popovertarget="${t.id}"]`);e==="closed"?H(t,!1):o&&H(t,o,f(t,"data-position")||"bottom")}}function kn({target:t}){var n,o;const e=(n=t==null?void 0:t.closest)==null?void 0:n.call(t,"a");if(e){const i=e.getRootNode(),r=((o=i.getElementById)==null?void 0:o.call(i,f(e,"popovertarget")||""))||e.closest(`.${Ln}`),s=f(e,"popovertargetaction")||"toggle";r==null||r.togglePopover(s==="show"||(s==="hide"?!1:void 0))}}const On=b.table.split(" ")[0];function ui(t){for(const e of t){const n=[];f(e,"role","table"),e.caption&&f(e.caption,"role","caption");for(const o of[e.tHead,e.tFoot,...e.tBodies])if(o){f(o,"role","rowgroup");const i=o.nodeName==="TBODY";for(const r of o.rows){f(r,"role","row");for(const s of r.cells)i?f(s,"data-th",n[s.cellIndex]||":empty"):n.push(s.innerText.trim()),s.nodeName==="TD"?f(s,"role","cell"):(f(s,"role",i?"rowheader":"columnheader"),f(s,"scope",i?"row":"col"))}}}}const di=t=>T(t,On,ui),fi=t=>T(t,On,!1);if(P){const t=document.readyState==="loading",e=()=>Mn(document.body);t?document.addEventListener("DOMContentLoaded",e):e()}function Mn(t){Qn(t),Xo(t),Zo(t),ii(t),ri(t),li(t),di(t)}function pi(t){Jn(t),Go(t),ti(t),si(t),ai(t),ci(t),fi(t)}return x.observe=Mn,x.pagination=Hn,x.styles=Pn,x.unobserve=pi,Object.defineProperty(x,Symbol.toStringTag,{value:"Module"}),x}({});
7
+ ::slotted(data:focus)::after { ${Sn} }`))}static get observedAttributes(){return ft(Fn)}connectedCallback(){this._root=ct(this),Y&&!Y.isConnected&&document.body.append(Y),ut(this,{childList:!0}),F(this._root,"click",this),F(this,Bn,this),setTimeout(()=>ht(this))}attributeChangedCallback(t,e,n){ft(this._texts,t,n)}disconnectedCallback(){ut(this,!1),U(this._root||this,"click",this),U(this,Bn,this),this._root=null}handleEvent(t){t.defaultPrevented||(t.type==="click"&&gi(this,t),t.type==="focusin"&&bi(this,t),t.type==="focusout"&&vi(this),t.type==="input"&&yi(this,t),t.type==="keydown"&&Ei(this,t),t.type==="mutation"&&ht(this,t))}get items(){return this.querySelectorAll("data")}get control(){return this.querySelector("input")}},Ut=(t,e)=>t.dispatchEvent(new CustomEvent("tags",{bubbles:!0,cancelable:!0,detail:{item:e,action:e.isConnected?"remove":"add"}})),ht=(t,e)=>{var n,o,i,s,r;const a=t._texts,d=Number.isNaN(t._focusIndex)?null:e==null?void 0:e.detail[0],l=(d==null?void 0:d.addedNodes[0])||(d==null?void 0:d.removedNodes[0]),f=`${l?`${l.isConnected?a.added:a.removed} ${l.textContent}, `:""}`,h=((i=(o=(n=t.control)==null?void 0:n.labels)==null?void 0:o[0])==null?void 0:i.textContent)||"",b=[];c(t,"role","group"),c(t,"aria-label",h),t.items.forEach((_,K,{length:W})=>{var mt;const bt=`${f}${_.textContent}, ${a.remove}, ${K+1} ${a.of} ${W}`;c(_,"aria-label",bt),c(_,"role","button"),_.tabIndex=-1,_.value=_.value||((mt=_.textContent)==null?void 0:mt.trim())||"",b.push(_.value)});const x=t.control,Wt=`${f}${h}, ${b.length?a.found.replace("%d",`${b.length}`):a.empty}`,D=x&&document.getElementById(c(x,"list")||""),_t=D==null?void 0:D.children;x&&c(x,"aria-label",Wt),D&&c(D,Pt,"true");for(const _ of _t||[])_.selected=b.includes(Ft(_));if(f){const _=t.items[(t._focusIndex||1)-1]||x,K=_===((s=ct(t))==null?void 0:s.activeElement),W=_t||t.items;t._blurAnnounceReset=!1,_===x?(K&&(hi&&Y?Y.textContent=f:(r=W[0])==null||r.focus()),setTimeout(()=>_==null?void 0:_.focus(),100)):_==null||_.focus(),setTimeout(()=>{if(!_i)return ht(t);t._blurAnnounceReset=!0},500)}},bi=(t,{target:e})=>{clearTimeout(t._blurTimer),t._focusIndex=[...t.items].indexOf(e)},vi=t=>{t._blurAnnounceReset&&ht(t),t._blurTimer=setTimeout(()=>{t._focusIndex=null})},gi=(t,{target:e,clientX:n,clientY:o})=>{var i;const s=t.contains(e)?[...t.items]:null,r=s==null?void 0:s.find(d=>d.contains(e)),a=s==null?void 0:s.find(d=>{const{top:l,right:f,bottom:h,left:b}=d.getBoundingClientRect();return o>=l&&o<=h&&n>=b&&n<=f});r?Ut(t,r)&&r.remove():a?a.focus():e===t&&((i=t.control)==null||i.focus())},yi=(t,e)=>{var n;const o=e.target;if(!Nn(e)||!(o!=null&&o.value.trim()))return;const i=Ft(o),s=[...t.items],a=[...((n=o==null?void 0:o.list)==null?void 0:n.children)||[]].find(f=>Ft(f)===i),d=s.find(f=>f.value===i),l=M("data",(a==null?void 0:a.text)||i,{value:i});if(o.value="",!!Ut(t,d||l)){if(d)return d.remove();if(!s[0])return t.prepend(l);s[s.length-1].insertAdjacentElement("afterend",l)}},Ei=(t,e)=>{var n,o;const{key:i,repeat:s,target:r}=e,a=t.control===r?t.control:null,d=a==null?void 0:a.selectionEnd;let l=a?t.items.length:(n=t._focusIndex)!=null?n:-1;if(!(l===-1||!a&&oi(e))){if(i==="ArrowRight"&&!a)l+=1;else if(i==="ArrowLeft"&&!d)l-=1;else{if(i==="Enter"&&a)return e.preventDefault(),a.dispatchEvent(new Event("input",{bubbles:!0}));if((i==="Backspace"||i==="Delete")&&!d){const f=!s&&t.items[l];if(e.preventDefault(),f)return Ut(t,f)&&f.remove();a&&(l-=1)}else return}e.preventDefault(),(o=t.items[Math.max(0,l)]||t.control)==null||o.focus()}};jt.define("u-tags",mi);const Un=({clientX:t,clientY:e,target:n})=>{var o;if(n instanceof HTMLDialogElement&&u(n,"data-closedby")==="any"){const{top:i,right:s,bottom:r,left:a}=n.getBoundingClientRect();i<=e&&e<=r&&a<=t&&t<=s||n.close()}else n instanceof Element&&n.closest('button[data-command="close"]')&&((o=n==null?void 0:n.closest("dialog"))==null||o.close())};function $i(t){v(t,"click",Un,m)}function wi(t){T(t,"click",Un,m)}const Vt=E.field.split(" ")[0],Ti="--mtds-text-count-over",Ii="--mtds-text-count-under",Vn=E.validation.split(" "),xi=Vn[0];function Si(t){for(const e of t){const n=[],o=[];let i=null,s=null,r=!0;for(const a of e.getElementsByTagName("*"))a instanceof HTMLLabelElement?n.push(a):a instanceof en?s=a:vt(a)?i=a:a.classList.contains(xi)?(r=u(a,"data-color")==="success",o.unshift(R(a))):a instanceof HTMLParagraphElement&&o.push(R(a));if(i){for(const a of n)a.htmlFor=R(i);Li(i,s),Yn(i),zn(i),u(i,"aria-describedby",o.join(" ")),u(i,"aria-invalid",`${!r}`)}}}function zn(t){t instanceof HTMLTextAreaElement&&(t.style.setProperty("--mtds-textarea-height","auto"),t.style.setProperty("--mtds-textarea-height",`${t.scrollHeight}px`))}function Li(t,e){if(u(t,"list",e?R(e):null),!e)return;t.hasAttribute("placeholder")||u(t,"placeholder","");const n=window.getComputedStyle(e),o=t.closest("u-tags");u(e,"data-sr-plural",n.getPropertyValue("--mtds-text-datalist-plural")),u(e,"data-sr-singular",n.getPropertyValue("--mtds-text-datalist-singular")),o&&(u(o,"data-sr-added",n.getPropertyValue("--mtds-text-tags-added")),u(o,"data-sr-empty",n.getPropertyValue("--mtds-text-tags-empty")),u(o,"data-sr-found",n.getPropertyValue("--mtds-text-tags-found")),u(o,"data-sr-of",n.getPropertyValue("--mtds-text-tags-of")),u(o,"data-sr-remove",n.getPropertyValue("--mtds-text-tags-remove")),u(o,"data-sr-removed",n.getPropertyValue("--mtds-text-tags-removed")))}function Yn(t){var o,i;const e=t==null?void 0:t.nextElementSibling,n=e&&u(e,"data-count");if(e&&n){const s=Number(n)-t.value.length,r=s<0,a=u(e,"aria-live")==="polite",d=window.getComputedStyle(e||t),l=((o=d.getPropertyValue(Ti))==null?void 0:o.slice(1,-1))||"",f=((i=d.getPropertyValue(Ii))==null?void 0:i.slice(1,-1))||"";if(a!==r){u(e,"aria-live",r?"polite":"off");for(const h of Vn)e.classList.toggle(h,r)}e.textContent=(r?l:f).replace("%d",`${Math.abs(s)}`)}}function Kn({target:t}){vt(t)&&(Yn(t),zn(t))}function Wn(t){var e,n;(n=(e=t.target)==null?void 0:e.closest)!=null&&n.call(e,`.${Vt}`)&&t.preventDefault()}function Ci(t){G(t,Vt,Si),v(t,"input",Kn,m),v(t,"invalid",Wn,!0)}function Ai(t){G(t,Vt,!1),T(t,"input",Kn,m),T(t,"invalid",Wn,!0)}const qn=E.fieldset.split(" ")[0],ki=E.validation.split(" ")[0];function Oi(t){for(const e of t){const n=[];let o=null;for(const i of e.getElementsByTagName("*"))i.classList.contains(ki)?o=R(i):vt(i)&&n.push(i);for(const i of n)u(i,"aria-describedby",o),u(i,"aria-invalid",`${!!o}`)}}const Mi=t=>G(t,qn,Oi),Pi=t=>G(t,qn,!1),zt="--mtds-app-expanded",Xn="mtds-app-menu",Gn=({target:t})=>{t!=null&&t.closest('[data-command="toggle-app-expanded"]')&&(document.startViewTransition?document.startViewTransition(()=>Yt()):Yt())},Yt=t=>{var o;const e=document.documentElement,n=t??!!((o=e.style.getPropertyValue(zt))!=null&&o.includes("--false"));e.style.setProperty(zt,`var(${zt}--${n})`),window.localStorage.setItem(Xn,`${n}`)};function Di(t){Yt(window.localStorage.getItem(Xn)!=="false"),v(t,"click",Gn,m)}function Ri(t){T(t,"click",Gn,m)}let Kt;function Qn(t){if(t.animationName!==E._onInjectLogo)return;const e=t.target,n=e==null?void 0:e.firstElementChild;if(!n)return;if(!Kt){const a=document.head.getElementsByTagName("link[rel~='icon']"),d=document.createElement("link");for(const l of a)l.remove();Kt=document.head.appendChild(Object.assign(d,{rel:"icon"}))}const o=e==null?void 0:e.hasAttribute("data-env"),i=window.getComputedStyle(n),s=i.getPropertyValue("color"),r=i.getPropertyValue("--mtds-logo-color");Kt.href=`data:image/svg+xml,${encodeURIComponent(`<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 55 55'><rect fill='${o?"none":r}' width='51' height='51' x='2' y='2' stroke='${s}' stroke-dasharray='0.09 6.38' stroke-linecap='round' stroke-opacity='${o?.6:0}' stroke-width='2.3' rx='25.5'/><g transform="translate(7.5 7.5)">${n.outerHTML.replace(/(fill|width|height|xmlns)=\S+/gi,"").replace("<svg",`<svg width="40" height="40" fill="${s}"`)}</g></svg>`)}`}const ji=t=>v(t,"animationend",Qn,m),Hi=t=>T(t,"animationend",Qn,m),Jn=E.popover.split(" ")[0];function Ni(t){v(t,"beforetoggle",Zn,m),v(t,"click",to)}function Bi(t){T(t,"beforetoggle",Zn,m),T(t,"click",to)}function Zn({target:t,newState:e}){var n;if(t instanceof HTMLElement&&t.classList.contains(Jn)){const o=(n=t.getRootNode())==null?void 0:n.querySelector(`[popovertarget="${t.id}"]`);e==="closed"?j(t,!1):o&&j(t,o,u(t,"data-position")||"bottom")}}function to({target:t}){var n,o;const e=(n=t==null?void 0:t.closest)==null?void 0:n.call(t,"a");if(e){const i=e.getRootNode(),s=((o=i.getElementById)==null?void 0:o.call(i,u(e,"popovertarget")||""))||e.closest(`.${Jn}`),r=u(e,"popovertargetaction")||"toggle";s==null||s.togglePopover(r==="show"||(r==="hide"?!1:void 0))}}function eo(t){if(t.animationName!==E._onInjectTable)return;const e=t.target,n=[];u(e,"role","table"),e.caption&&u(e.caption,"role","caption");for(const o of[e.tHead,e.tFoot,...e.tBodies])if(o){u(o,"role","rowgroup");const i=o.nodeName==="TBODY";for(const s of o.rows){u(s,"role","row");for(const r of s.cells)i?u(r,"data-th",n[r.cellIndex]||":empty"):n.push(r.innerText.trim()),r.nodeName==="TD"?u(r,"role","cell"):(u(r,"role",i?"rowheader":"columnheader"),u(r,"scope",i?"row":"col"))}}}const Fi=t=>v(t,"animationend",eo,m),Ui=t=>T(t,"animationend",eo,m);if(q){const t=document.readyState==="loading",e=()=>no(document.body);t?document.addEventListener("DOMContentLoaded",e):e()}function no(t){Di(t),$i(t),Ci(t),Mi(t),ji(t),Ni(t),Fi(t)}function Vi(t){Ri(t),wi(t),Ai(t),Pi(t),Hi(t),Bi(t),Ui(t)}return C.observe=no,C.pagination=ro,C.styles=io,C.unobserve=Vi,Object.defineProperty(C,Symbol.toStringTag,{value:"Module"}),C}({});
8
8
  //# sourceMappingURL=index.iife.js.map