@mattilsynet/design 3.1.19 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/mtds/atlas/atlas-element.js +1 -1
- package/mtds/atlas/atlas-element.js.map +1 -1
- package/mtds/illustrations/barn-water.svg +1 -0
- package/mtds/illustrations/barn.svg +1 -0
- package/mtds/illustrations/bowl-food-stacked.svg +1 -0
- package/mtds/illustrations/bowl.svg +1 -0
- package/mtds/illustrations/fertilizer.svg +1 -0
- package/mtds/illustrations/flagg-eu.svg +1 -0
- package/mtds/illustrations/flask-lab.svg +1 -0
- package/mtds/illustrations/flowerpot.svg +1 -0
- package/mtds/illustrations/fork-sausage.svg +1 -0
- package/mtds/illustrations/glas.svg +1 -0
- package/mtds/illustrations/index.json +166 -0
- package/mtds/illustrations/leaf.svg +1 -0
- package/mtds/illustrations/parasite.svg +1 -0
- package/mtds/illustrations/person-ham.svg +1 -1
- package/mtds/illustrations/person-inspect-border.svg +1 -0
- package/mtds/illustrations/person-inspect-kitchen.svg +1 -0
- package/mtds/illustrations/person-inspect-meat.svg +1 -0
- package/mtds/illustrations/person-inspect-plants.svg +1 -0
- package/mtds/illustrations/person-lab-clipboard.svg +1 -0
- package/mtds/illustrations/person-lab-greet.svg +1 -0
- package/mtds/illustrations/person-meat.svg +1 -22
- package/mtds/illustrations/pitchfork-soil.svg +1 -0
- package/mtds/illustrations/plant-pot.svg +1 -0
- package/mtds/illustrations/sailboat-people.svg +1 -0
- package/mtds/illustrations/salami.svg +1 -0
- package/mtds/illustrations/sausage.svg +1 -0
- package/mtds/illustrations/seed-group.svg +1 -0
- package/mtds/illustrations/seed.svg +1 -0
- package/mtds/illustrations/shopping-basket.svg +1 -0
- package/mtds/illustrations/skinke.svg +1 -1
- package/mtds/illustrations/sprouts-soil.svg +1 -0
- package/mtds/illustrations/stove.svg +1 -0
- package/mtds/illustrations/supplement-group.svg +1 -1
- package/mtds/illustrations/supplement-jar.svg +1 -1
- package/mtds/illustrations/supplement-tube.svg +1 -1
- package/mtds/illustrations/test-tube-wide.svg +1 -0
- package/mtds/illustrations/test-tube.svg +1 -0
- package/mtds/illustrations/tractor-pesticides.svg +1 -0
- package/mtds/illustrations/turnip-meat.svg +1 -1
- package/mtds/illustrations/virus.svg +1 -0
- package/mtds/index.iife.js +31 -19
- package/mtds/package.json.js +1 -1
- package/mtds/steps/steps.stories.d.ts +1 -0
- package/mtds/styles.css +1 -1
- package/mtds/styles.json +45 -45
- package/mtds/styles.module.css.js +60 -60
- package/package.json +15 -15
package/mtds/index.iife.js
CHANGED
|
@@ -1,4 +1,18 @@
|
|
|
1
|
-
var mtds=(function(
|
|
1
|
+
var mtds=(function(S){"use strict";var Zs=Object.defineProperty,Zn=Object.getOwnPropertySymbols,tl=Object.prototype.hasOwnProperty,el=Object.prototype.propertyIsEnumerable,ti=(t,e,o)=>e in t?Zs(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,ol=(t,e)=>{for(var o in e||(e={}))tl.call(e,o)&&ti(t,o,e[o]);if(Zn)for(var o of Zn(e))el.call(e,o)&&ti(t,o,e[o]);return t},yo=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",ge=yo(),_o=ge?navigator.userAgent:"",ei=/android/i.test(_o),nl=/firefox/i.test(_o),oi=/iPad|iPhone|iPod/.test(_o),ni,il=ge&&/^Mac/i.test(((ni=navigator.userAgentData)==null?void 0:ni.platform)||navigator.platform),rl=ge&&window.CSSStyleSheet&&document.adoptedStyleSheets,ii={once:!0,capture:!0,passive:!0},al=":host(:not([hidden])) { display: block }",sl="outline: 1px dotted; outline: 5px auto Highlight; outline: 5px auto -webkit-focus-ring-color",ll=`${ei?"data":"aria"}-multiselectable`,cl=typeof HTMLElement>"u"?class{}:HTMLElement,$=(t,e,o)=>o===void 0?t.getAttribute(e):(o===null?t.removeAttribute(e):t.getAttribute(e)!==o&&t.setAttribute(e,o),null),wo=(t,...e)=>{const[o,...n]=e;for(const i of o.split(" "))t.addEventListener(i,...n);return()=>ri(t,...e)},ri=(t,...e)=>{const[o,...n]=e;for(const i of o.split(" "))t.removeEventListener(i,...n)},dl=(t,e)=>{const o=t.shadowRoot||t.attachShadow({mode:"open"});if(o.querySelector("slot")||o.append(jt("slot")),!o.querySelector("style"))if(!rl)o.append(jt("style",null,e));else{const n=new CSSStyleSheet;n.replaceSync(e),o.adoptedStyleSheets=[n]}return o},ul=(t,e,o)=>{const n=new MutationObserver(r=>{if(!yo()||!t.isConnected)return i();e(t,r)}),i=Object.assign(()=>n.disconnect(),{takeRecords:()=>n.takeRecords()});return e(t),n.observe(t,o),i},fl=t=>{var e;const o=$(t,"aria-label")||"";return[...(((e=$(t,"aria-labelledby"))==null?void 0:e.split(" "))||[]).map(i=>document.getElementById(i.trim()||"-")),...Array.from(t.labels||[])].reduce((i,r)=>{var a;return i||((a=r?.innerText)==null?void 0:a.trim())||""},o).trim()},pl=t=>{if(!t||!ge)return null;if(window.uElementsId||(window.uElementsId={}),!t.id){const e=t.nodeName.toLowerCase();window.uElementsId[e]||(window.uElementsId[e]=1),t.id=`:${e}${window.uElementsId[e]++}`}return t.id},jt=(t,e,o)=>{const n=document.createElement(t);if(o&&(n.textContent=o),e)for(const[i,r]of Object.entries(e))$(n,i,r);return n},ml={define:(t,e)=>!yo()||window.customElements.get(t)||window.customElements.define(t,e)},ai=(t,e,o="")=>{var n,i;const r={bubbles:!0,composed:!0,data:e,inputType:o},a=HTMLInputElement.prototype;t.dispatchEvent(new InputEvent("beforeinput",r)),(i=(n=Object.getOwnPropertyDescriptor(a,"value"))==null?void 0:n.set)==null||i.call(t,e),t.dispatchEvent(new InputEvent("input",r)),t.dispatchEvent(new Event("change",{bubbles:!0}))},Eo=!1,So=t=>(t?.type==="pointerup"&&(Eo=!1),t?.type==="pointerdown"&&(Eo=!0,wo(document,"pointerup",So,ii)),Eo),hl=(t,e="<slot></slot>")=>`<template shadowrootmode="open">${e}<style>${t}</style></template>`,vl=t=>{const e=$(t,"form");$(t,"form","#"),setTimeout(gl,0,t,e)},gl=(t,e)=>$(t,"form",e),Lt=t=>{var e;return((e=t?.textContent)==null?void 0:e.trim())||""},Y,bl=0,si=0,xo=t=>{clearTimeout(si),Y||(Y=jt("div",{"aria-live":"assertive"}),Y.style.overflow="hidden",Y.style.position="fixed",Y.style.whiteSpace="nowrap",Y.style.width="1px"),Y.isConnected||document.body.append(Y),t===""&&(Y.textContent=""),t&&(Y.textContent=`${t}${bl++%2?" ":""}`,si=setTimeout(xo,!il&&nl?2e3:300,""))},$o=`${al}
|
|
2
|
+
:is(:host(:not([data-multiple])), :host([data-multiple="false"])) [part="items"] { display: none }
|
|
3
|
+
[role="listbox"] { display: contents }
|
|
4
|
+
::slotted(button[type="reset"]),::slotted(del) { font: inherit; border: 0; padding: 0; background: none; color: inherit; cursor: pointer; text-decoration: none }
|
|
5
|
+
::slotted(data) { cursor: pointer; pointer-events: none }
|
|
6
|
+
::slotted(data)::after { padding-inline: .5ch; pointer-events: auto }
|
|
7
|
+
::slotted(data)::after,::slotted(button[type="reset"]:empty)::before,::slotted(del:empty)::before { content: '\\00D7'; content: '\\00D7' / '' }
|
|
8
|
+
::slotted(data:focus),::slotted(del:focus),::slotted(button[type="reset"]:focus) { ${sl} }`,yl=hl($o),ft="aria-label",_l='button[type="reset"],del',wl='datalist,[role="listbox"]',El='option,[role="option"]',li="blur focus click input keydown pointerdown",be="false",ye={added:"Added",clear:"Clear input",empty:"No selected",found:"Navigate left to find %d selected",invalid:"Invalid value",items:"Selected",of:"of",remove:"Press to remove",removed:"Removed"},ci=class extends cl{constructor(){super(),this._focusMoved=!1,this._itemSingleVale="",this._speak="",this._texts=ol({},ye),this._value="";const e=dl(this,$o);this._listbox=e.querySelector('[role="listbox"]')||jt("div"),this._listbox.innerHTML='<slot name="items"></slot>',$(this._listbox,"aria-orientation","horizontal"),$(this._listbox,"role","listbox"),$(this._listbox,"part","items"),$(this._listbox,"tabindex","-1"),e.prepend(this._listbox)}static get observedAttributes(){return Object.keys(ye).map(e=>`data-sr-${e}`)}connectedCallback(){wo(this,li,this,!0),this._umutate=ul(this,Ll,{attributeFilter:["id","value","role"],attributes:!0,characterData:!0,childList:!0,subtree:!0}),_e(this),To(this)}attributeChangedCallback(e,o,n){const i=e.split("data-sr-")[1];ye[i]&&(this._texts[i]=n||ye[i]),i==="clear"&&this.clear&&$(this.clear,ft,this._texts.clear)}disconnectedCallback(){var e;ri(this,li,this,!0),(e=this._umutate)==null||e.call(this),this._umutate=this._list=this._options=this._match=void 0,this._items=this._clear=this._control=this._select=void 0}handleEvent(e){var o,n;(o=this.control)!=null&&o.disabled||(n=this.control)!=null&&n.readOnly||(e.type==="blur"&&Sl(this),e.type==="click"&&$l(this,e),e.type==="input"&&Tl(this,e),e.type==="keydown"&&Cl(this,e),e.type==="pointerdown"&&So(e))}get multiple(){var e;return((e=$(this,"data-multiple"))!=null?e:be)!==be}set multiple(e){$(this,"data-multiple",e?"":null)}get creatable(){var e;return((e=$(this,"data-creatable"))!=null?e:be)!==be}set creatable(e){$(this,"data-creatable",e?"":null)}get control(){var e;return(e=this._control)!=null&&e.isConnected||(this._control=this.querySelector("input")),this._control}get list(){var e;return(e=this._list)!=null&&e.isConnected||(this._list=this.querySelector(wl),this._options=void 0),this._list}get clear(){var e;return(e=this._clear)!=null&&e.isConnected||(this._clear=this.querySelector(_l)),this._clear}get items(){return this._items||(this._items=this.getElementsByTagName("data")),this._items}get options(){var e,o,n;const i=!this._options&&((o=(e=this.list)==null?void 0:e.querySelector(El))==null?void 0:o.nodeName);return i&&(this._options=(n=this.list)==null?void 0:n.getElementsByTagName(i)),this._options||this.getElementsByTagName("-")}get values(){return Array.from(this.items,({value:e})=>e)}},di=t=>{var e;const{creatable:o,control:n,options:i,multiple:r}=t,a=((e=n?.value)==null?void 0:e.trim())||"",l=a.toLowerCase()||null;let s=[...i].find(d=>d.label.trim().toLowerCase()===l);const c={bubbles:!0,cancelable:!0,detail:s};if(t.dispatchEvent(new CustomEvent("comboboxbeforematch",c))||(s=[...i].find(d=>d.selected)),r)fi(t);else for(const d of i)d.selected=d===s;return!s&&o&&a?{value:a}:s},It=(t,e,o=!0)=>{var n;const{_texts:i,control:r,items:a,multiple:l}=t;if(!e)return l?xo(i.invalid):!r?.value&&a[0]?It(t,a[0]):_e(t);const s=[...a].findIndex(h=>h.value===e.value),c=l||!s?a[s]:null,d=c&&((n=a[s])==null?void 0:n.matches(":focus"))&&(a[s-1]||a[s+1]||r);if(c&&!o)return _e(t);d&&d.focus(),t._focusMoved=!!d;const u=jt("data",{value:e.value},e.label||e.value),f={bubbles:!0,cancelable:!0,detail:c||u};if(t.dispatchEvent(new CustomEvent("comboboxbeforeselect",f))){if(!l)for(const h of[...a])h.remove();c?c.remove():r?.insertAdjacentElement("beforebegin",u),t.dispatchEvent(new CustomEvent("comboboxafterselect",f))}},Sl=t=>So()||setTimeout(xl,0,t),xl=t=>t.multiple||t.matches(":focus-within")||It(t,t._match,!1),$l=(t,e)=>{const{clientX:o,clientY:n,target:i}=e,{clear:r,control:a,items:l}=t;if(a&&r?.contains(i))return e.preventDefault(),ai(a,"","deleteContentBackward"),a.focus();for(const s of l){const{top:c,right:d,bottom:u,left:f}=s.getBoundingClientRect();if(s.contains(i))return It(t,s);if(n>=c&&n<=u&&o>=f&&o<=d)return s.focus()}i===t&&a?.focus()},Tl=(t,e)=>{var o;const{control:n,options:i,multiple:r}=t,a=n?.value||null,l=e instanceof InputEvent?!e.inputType||e.inputType==="insertReplacementText":!!n?.value;if(l||(t._value=n?.value||""),l){(o=e.stopImmediatePropagation)==null||o.call(e);const s=[...i].find(c=>c.value===a);if(n&&(n.value=t._value),s)return It(t,s,r)}else r||(t._match=di(t));To(t)},Cl=(t,e)=>{e.ctrlKey||e.metaKey||e.shiftKey||e.key==="Alt"||(t.control===e.target?Al(t,e):kl(t,e))},Al=(t,e)=>{var o;const{_match:n,clear:i,control:r,items:a,multiple:l}=t;(e.key==="ArrowLeft"||e.key==="Backspace")&&!r?.selectionEnd&&((o=a[a.length-1])==null||o.focus()),e.key==="Enter"&&r&&(vl(r),It(t,l?di(t):n,l)),e.key==="Tab"&&!e.shiftKey&&i&&!i.hidden&&(e.preventDefault(),$(i,"aria-hidden","false"),$(i,"tabindex","0"),i.focus(),wo(i,"blur",()=>To(t),ii))},kl=(t,e)=>{var o,n,i;const{clear:r,control:a,items:l}=t,{key:s,repeat:c,target:d}=e,u=[...l].indexOf(d);if((s===" "||s==="Enter")&&(l[u]||d===r))return(o=l[u]||r)==null||o.click(),e.preventDefault();if(l[u]){if(s==="ArrowLeft")return(n=l[u-1])==null?void 0:n.focus();if(s==="ArrowRight")return(i=l[u+1]||a)==null?void 0:i.focus();if(s==="Backspace")return e.preventDefault(),c||It(t,l[u]);a?.focus()}},Ll=(t,e)=>{var o,n;if(!t.control)return;const{_texts:i,control:r,items:a,list:l,multiple:s}=t,c=[];for(const{addedNodes:f,removedNodes:h}of e||[]){for(const p of f)p instanceof HTMLDataElement&&c.unshift(p);for(const p of h)p instanceof HTMLDataElement&&c.push(p)}if((s?c.length===1:(o=c[0])==null?void 0:o.matches(":focus"))&&t.matches(":focus-within")){const f=r?$(r,ft):null;t._speak=`${i[c[0].isConnected?"added":"removed"]} ${Lt(c[0])}, `,$(r,ft,`${t._speak}${fl(r)}`),t._focusMoved||setTimeout(()=>xo(t._speak.slice(0,-2))),setTimeout(Il,300,t,f)}if(!s){const f=Lt(a[0]);f!==t._itemSingleVale&&_e(t),t._itemSingleVale=f}ui(t),fi(t),Ml(t);const u=`${a.length?i.found.replace("%d",`${a.length}`):i.empty}`;$(r,"aria-description",s?u:null),$(r,"list",pl(l)),$(t._listbox,ft,i.items),(n=t._umutate)==null||n.takeRecords()},Il=(t,e)=>{t._speak="",t.control&&$(t.control,ft,e),ui(t)},ui=t=>{const{_texts:e,_speak:o,items:n}=t;let i=0;for(const r of n){const a=`${o}${Lt(r)}, ${e.remove}${oi?`, ${++i} ${e.of} ${n.length}`:""}`;$(r,ft,a),$(r,"role","option"),$(r,"slot","items"),$(r,"tabindex","-1"),$(r,"value",r.value||Lt(r))}},Ml=t=>{var e,o;if((e=t._select)!=null&&e.isConnected||(t._select=t.querySelector("select")),!t._select)return;const{_select:n,items:i,multiple:r}=t,a=[];let l=0;$(n,"multiple",r?"":null);for(const s of i){const c=n?.options[l++],d=Lt(s),u=s?.value;c?Object.assign(c,{defaultSelected:!0,selected:!0,text:d,value:u}):a.push(new Option(d,u,!0,!0))}if(a.length)n.append(...a);else for(const s of[...n.options].slice(l))s.remove();(o=t._umutate)==null||o.takeRecords()},To=t=>{if(!t.clear)return;const{clear:e,control:o}=t,n=!o?.value||o?.disabled||o?.readOnly;e.nodeName==="DEL"&&$(e,"role","button"),$(e,ft)||$(e,ft,t._texts.clear),$(e,"aria-hidden",`${oi||ei}`),$(e,"hidden",n?"":null),$(e,"tabindex","-1")},fi=t=>{if(!t.list)return;const{_texts:e,list:o,multiple:n,options:i,values:r}=t;$(o,"data-sr-of",e.of),$(o,ll,`${n}`);for(const a of i)a.selected=r.includes(a.value)},_e=t=>{if(!t.control||t.multiple)return;const{control:e,items:o}=t,n=Lt(o[0]),i=n?"insertText":"deleteContentBackward";n!==e.value&&ai(e,n,i)};ml.define("u-combobox",ci);var Co=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",we=Co(),Ol=we?navigator.userAgent:"",Rl=/android/i.test(Ol),pi;we&&/^Mac/i.test(((pi=navigator.userAgentData)==null?void 0:pi.platform)||navigator.platform);var Dl=we&&window.CSSStyleSheet&&document.adoptedStyleSheets,Ao=":host(:not([hidden])) { display: block }",Pl=`${Rl?"data":"aria"}-labelledby`,Ee=typeof HTMLElement>"u"?class{}:HTMLElement,M=(t,e,o)=>o===void 0?t.getAttribute(e):(o===null?t.removeAttribute(e):t.getAttribute(e)!==o&&t.setAttribute(e,o),null),Hl=(t,...e)=>{const[o,...n]=e;for(const i of o.split(" "))t.addEventListener(i,...n);return()=>mi(t,...e)},mi=(t,...e)=>{const[o,...n]=e;for(const i of o.split(" "))t.removeEventListener(i,...n)},ko=(t,e)=>{const o=t.shadowRoot||t.attachShadow({mode:"open"});if(o.querySelector("slot")||o.append(gi("slot")),!o.querySelector("style"))if(!Dl)o.append(gi("style",null,e));else{const n=new CSSStyleSheet;n.replaceSync(e),o.adoptedStyleSheets=[n]}return o},Nl=(t,e,o)=>{const n=new MutationObserver(r=>{if(!Co()||!t.isConnected)return i();e(t,r)}),i=Object.assign(()=>n.disconnect(),{takeRecords:()=>n.takeRecords()});return e(t),n.observe(t,o),i},hi=t=>{var e;const o=((e=t.getRootNode)==null?void 0:e.call(t))||t.ownerDocument;return o instanceof Document||o instanceof ShadowRoot?o:document},vi=t=>{if(!t||!we)return null;if(window.uElementsId||(window.uElementsId={}),!t.id){const e=t.nodeName.toLowerCase();window.uElementsId[e]||(window.uElementsId[e]=1),t.id=`:${e}${window.uElementsId[e]++}`}return t.id},gi=(t,e,o)=>{const n=document.createElement(t);if(o&&(n.textContent=o),e)for(const[i,r]of Object.entries(e))M(n,i,r);return n},Se={define:(t,e)=>!Co()||window.customElements.get(t)||window.customElements.define(t,e)},Lo=(t,e="<slot></slot>")=>`<template shadowrootmode="open">${e}<style>${t}</style></template>`,Kt="aria-controls",bi="aria-disabled",Xt="aria-selected",Yt="tabindex",Io=Ao,Mo=Ao,Bl="",Oo=`${Ao}
|
|
9
|
+
::slotted([role="tab"]:not([hidden])) { display: inline-block; cursor: pointer }
|
|
10
|
+
::slotted([role="tab"][${bi}="true"]) { cursor: default }`,ql=Lo(Io),Ul=Lo(Oo),Fl="",zl=Lo(Mo),xe=class extends Ee{constructor(){super(),ko(this,Io)}get tabList(){return this.querySelector('[role="tablist"]:not(:scope [role="tabpanel"] [role="tablist"])')}get selectedIndex(){const t=[...this.tabs];return t.indexOf(Ot(t))}set selectedIndex(t){gt(this.tabs[t])}get tabs(){return this.querySelectorAll('[role="tab"]:not(:scope [role="tabpanel"] [role="tab"])')}get panels(){return this.querySelectorAll('[role="tabpanel"]:not(:scope [role="tabpanel"] [role="tabpanel"])')}},$e=class extends Ee{constructor(){super(),ko(this,Oo)}connectedCallback(){M(this,"role","tablist"),Hl(this,"click keydown",this),this._umutate=Nl(this,Vl,{attributeFilter:["id","role",Kt,Xt],attributes:!0,childList:!0,subtree:!0})}disconnectedCallback(){var t;mi(this,"click keydown",this),(t=this._umutate)==null||t.call(this),this._umutate=void 0}handleEvent(t){var e,o,n,i;const{key:r,type:a,target:l}=t,s=Rt(this),c=s.findIndex(f=>f.contains(l)),d=r===" "||r==="Enter";let u=c;if(!(t.defaultPrevented||c===-1)&&(a==="click"&>(s[c]),a==="keydown")){if(d){(e=t.preventDefault)==null||e.call(t);const f={bubbles:!0,cancelable:!0,composed:!0};return s[c].dispatchEvent(new MouseEvent("click",f))}if(r==="ArrowDown"||r==="ArrowRight")u=(c+1)%s.length;else if(r==="ArrowUp"||r==="ArrowLeft")u=(c||s.length)-1;else if(r==="End")u=s.length-1;else if(r==="Home")u=0;else if(r==="Tab"&&!Mt(s[c])){const f=Ot(s);return f&&M(f,Yt,"-1"),f&&setTimeout(()=>M(f,Yt,"0"))}else return;(o=t.preventDefault)==null||o.call(t),(i=(n=s[u]).focus)==null||i.call(n)}}get tabsElement(){return Dt(this)}get tabs(){return this.querySelectorAll(':scope > [role="tab"]')}get selectedIndex(){const t=Rt(this);return t.indexOf(Ot(t))}set selectedIndex(t){gt(this.tabs[t])}},Qt=!1,Ro=class extends Ee{static get observedAttributes(){return["id",Xt,Kt]}connectedCallback(){var t;M(this,"role","tab"),M(this,Xt,`${this.selected}`),M(this,Yt,this.selected?"0":"-1"),Ot((t=this.parentElement)==null?void 0:t.children)||gt(this)}attributeChangedCallback(){!Qt&&this.selected&>(this)}get tabsElement(){return Dt(this)}get tabList(){const t=this.parentElement;return t instanceof $e?t:null}get selected(){return Mt(this)}set selected(t){t&>(this)}get index(){return Math.max(Rt(this.parentElement).indexOf(this),0)}get panel(){var t;const e=(t=Dt(this))==null?void 0:t.panels,o=Rt(this.parentElement).indexOf(this);return Te(this,e?.[o])}},Do=class extends Ee{constructor(){super(),ko(this,Mo)}connectedCallback(){var t,e;Qt=!0,M(this,"role","tabpanel");const o=Dt(this);let n=o?.tabs[[...o.panels].indexOf(this)];(n&&Te(n,this))!==this&&(n=Ot(this.tabs)||this.tabs[0]),yi(this,n,!!n&&Mt(n)),(e=(t=n?.parentElement)==null?void 0:t._umutate)==null||e.takeRecords(),Qt=!1}get tabsElement(){return Dt(this)}get tabs(){return hi(this).querySelectorAll(`[${Kt}="${this.id}"]`)}},Vl=(t,e=[])=>{let o;for(const{target:n}of e)n instanceof Element&&M(n,"role")==="tab"&&Mt(n)&&(o=n);!o&&!Ot(t.children)&&(o=Rt(t).find(_i)),gt(o)},yi=(t,e,o=!1)=>{M(t,"aria-hidden",`${!o}`),M(t,"hidden",o?null:""),M(t,Yt,o?"0":null),e&&M(e,Kt,vi(t)),e&&o&&Mt(e)&&M(t,Pl,vi(e))},_i=t=>M(t,bi)!=="true",Mt=t=>M(t,Xt)==="true",Ot=(t=[])=>{for(const e of t)if(Mt(e))return e},Rt=t=>{const e=[];for(const o of t?.children||[])o.getAttribute("role")==="tab"&&e.push(o);return e},Te=(t,e=null)=>{const o=M(t,Kt);return o?hi(t).getElementById(o):e},Dt=t=>{for(let e=t;e;e=e.parentNode||e.host)if(e instanceof xe)return e;return null},gt=t=>{var e,o,n;if(!t||!_i(t))return;Qt=!0;const i=Rt(t.parentElement),r=((e=Dt(t))==null?void 0:e.panels)||[],a=Te(t,r?.[i.indexOf(t)]);let l=0;for(const s of i){const c=Te(s,r?.[l++]);M(s,Xt,`${s===t}`),M(s,Yt,s===t?"0":"-1"),c&&yi(c,s,c===a)}(n=(o=t.parentElement)==null?void 0:o._umutate)==null||n.takeRecords(),Qt=!1};Se.define("u-tabs",xe),Se.define("u-tablist",$e),Se.define("u-tab",Ro),Se.define("u-tabpanel",Do);var wi=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",Ei=wi(),Si;Ei&&/^Mac/i.test(((Si=navigator.userAgentData)==null?void 0:Si.platform)||navigator.platform);var Wl=Ei&&window.CSSStyleSheet&&document.adoptedStyleSheets,Gl=":host(:not([hidden])) { display: block }",xi=typeof HTMLElement>"u"?class{}:HTMLElement,nt=(t,e,o)=>o===void 0?t.getAttribute(e):(o===null?t.removeAttribute(e):t.getAttribute(e)!==o&&t.setAttribute(e,o),null),$i=(t,...e)=>{const[o,...n]=e;for(const i of o.split(" "))t.addEventListener(i,...n);return()=>Po(t,...e)},Po=(t,...e)=>{const[o,...n]=e;for(const i of o.split(" "))t.removeEventListener(i,...n)},jl=(t,e)=>{const o=t.shadowRoot||t.attachShadow({mode:"open"});if(o.querySelector("slot")||o.append(Ce("slot")),!o.querySelector("style"))if(!Wl)o.append(Ce("style",null,e));else{const n=new CSSStyleSheet;n.replaceSync(e),o.adoptedStyleSheets=[n]}return o},Kl=t=>{var e;const o=((e=t.getRootNode)==null?void 0:e.call(t))||t.ownerDocument;return o instanceof Document||o instanceof ShadowRoot?o:document},Ce=(t,e,o)=>{const n=document.createElement(t);if(o&&(n.textContent=o),e)for(const[i,r]of Object.entries(e))nt(n,i,r);return n},Ti={define:(t,e)=>!wi()||window.customElements.get(t)||window.customElements.define(t,e)},Xl=`${Gl}
|
|
11
|
+
::slotted([slot="summary"]) { cursor: pointer; display: block }
|
|
12
|
+
::slotted([slot="summary"])::before { content: ''; display: inline-block; vertical-align: middle; margin-inline: .05em .3125em; border-block: .3125em solid transparent; border-inline-start: .5em solid }
|
|
13
|
+
::slotted([slot="summary"][aria-expanded="true"])::before { rotate: 90deg }
|
|
14
|
+
:host > [part="details-content"]:not([hidden=""]) { display: block }`,Yl=class extends xi{static get observedAttributes(){return["open"]}constructor(){var t;super(),jl(this,Xl),(t=this.shadowRoot)==null||t.prepend(Ce("slot",{name:"summary"}),Ce("slot",{part:"details-content"})),console.warn(`\x1B[1m<u-details> is deprecated as <details> now has sufficient screen reader support 🎉\x1B[0m
|
|
15
|
+
Please use <details> and <summary>, but import '@u-elements/u-details/polyfill' to polyfill support for Talkback screen reader when used with Firefox on Android.`,this)}connectedCallback(){var t;this._content=(t=this.shadowRoot)==null?void 0:t.children[1],nt(this,"role","group"),$i(this._content,"beforematch",this),$i(this,"click keydown",this),this.attributeChangedCallback()}disconnectedCallback(){this._content&&Po(this._content,"beforematch",this),Po(this,"click keydown",this),this._content=void 0}attributeChangedCallback(t,e,o){const n="onbeforematch"in this?"until-found":!0,i=this.open;for(const r of this.children)r.nodeName==="U-SUMMARY"&&nt(r,"aria-expanded",`${i}`);if(this._content&&(nt(this._content,"aria-hidden",`${!i}`),nt(this._content,"tabindex",i?null:"-1"),this._content.hidden=i?!1:n),i&&this.name){const r=Kl(this).querySelectorAll(`${this.nodeName}[name="${this.name}"]`);for(const a of r)a!==this&&(a.open=!1)}t==="open"&&e===null!=(o===null)&&this.dispatchEvent(new Event("toggle"))}handleEvent(t){var e,o;const n=t.key===" "||t.key==="Enter",i=t.target instanceof Element&&((e=t.target.closest('[slot="summary"]'))==null?void 0:e.parentElement)===this;t.defaultPrevented||(t.type==="beforematch"&&(this.open=!0),i&&t.type==="click"&&(this.open=!this.open),i&&t.type==="keydown"&&n&&((o=t.preventDefault)==null||o.call(t),t.target.dispatchEvent(new MouseEvent("click",t))))}get open(){return this.hasAttribute("open")}set open(t){nt(this,"open",t?"":null)}get name(){return nt(this,"name")||""}set name(t){nt(this,"name",t)}},Ql=class extends xi{connectedCallback(){nt(this,"role","button"),this.slot="summary",this.tabIndex=0}};Ti.define("u-details",Yl),Ti.define("u-summary",Ql);function Jl(){return typeof HTMLButtonElement<"u"&&"command"in HTMLButtonElement.prototype&&"source"in((globalThis.CommandEvent||{}).prototype||{})}function Zl(){document.addEventListener("invoke",p=>{p.type=="invoke"&&p.isTrusted&&(p.stopImmediatePropagation(),p.preventDefault())},!0),document.addEventListener("command",p=>{p.type=="command"&&p.isTrusted&&(p.stopImmediatePropagation(),p.preventDefault())},!0);function t(p,m,v=!0){Object.defineProperty(p,m,{...Object.getOwnPropertyDescriptor(p,m),enumerable:v})}function e(p){return p&&typeof p.getRootNode=="function"?p.getRootNode():p&&p.parentNode?e(p.parentNode):p}let o=new WeakMap,n=new WeakMap;class i extends Event{constructor(m,v={}){super(m,v);let{source:b,command:w}=v;if(b!=null&&!(b instanceof Element))throw TypeError("source must be an element");o.set(this,b||null),n.set(this,w===void 0?"":String(w))}get[Symbol.toStringTag](){return"CommandEvent"}get source(){if(!o.has(this))throw TypeError("illegal invocation");let m=o.get(this);if(!(m instanceof Element))return null;let v=e(m);return v===e(this.target||document)?m:v.host}get command(){if(!n.has(this))throw TypeError("illegal invocation");return n.get(this)}}t(i.prototype,"source"),t(i.prototype,"command");let r=new WeakMap;function a(p){Object.defineProperties(p.prototype,{commandForElement:{enumerable:!0,configurable:!0,set(m){if(m===null)this.removeAttribute("commandfor"),r.delete(this);else if(m instanceof Element){this.setAttribute("commandfor","");let v=e(m);e(this)===v||v===this.ownerDocument?r.set(this,m):r.delete(this)}else throw TypeError("commandForElement must be an element or null")},get(){if(this.localName!=="button"||this.disabled)return null;if(this.form&&this.getAttribute("type")!=="button")return console.warn("Element with `commandFor` is a form participant. It should explicitly set `type=button` in order for `commandFor` to work"),null;let m=r.get(this);if(m)return m.isConnected?m:(r.delete(this),null);let v=e(this),b=this.getAttribute("commandfor");return(v instanceof Document||v instanceof ShadowRoot)&&b&&v.getElementById(b)||null}},command:{enumerable:!0,configurable:!0,get(){let m=this.getAttribute("command")||"";if(m.startsWith("--"))return m;let v=m.toLowerCase();switch(v){case"show-modal":case"request-close":case"close":case"toggle-popover":case"hide-popover":case"show-popover":return v}return""},set(m){this.setAttribute("command",m)}}})}let l=new WeakMap;Object.defineProperties(HTMLElement.prototype,{oncommand:{enumerable:!0,configurable:!0,get(){return c.takeRecords(),l.get(this)||null},set(p){let m=l.get(this)||null;m&&this.removeEventListener("command",m),l.set(this,typeof p=="object"||typeof p=="function"?p:null),typeof p=="function"&&this.addEventListener("command",p)}}});function s(p){for(let m of p)m.oncommand=Function("event",m.getAttribute("oncommand"))}let c=new MutationObserver(p=>{for(let m of p){let{target:v}=m;m.type==="childList"?s(v.querySelectorAll("[oncommand]")):s([v])}});c.observe(document,{subtree:!0,childList:!0,attributeFilter:["oncommand"]}),s(document.querySelectorAll("[oncommand]"));let d=new WeakSet;function u(p){if(d.has(p)||(d.add(p),p.defaultPrevented)||p.type!=="click")return;let m=p.composedPath().find(_=>_.matches?.("button[commandfor], button[command]"));if(!m)return;if(m.form&&m.getAttribute("type")!=="button")throw p.preventDefault(),Error("Element with `commandFor` is a form participant. It should explicitly set `type=button` in order for `commandFor` to work. In order for it to act as a Submit button, it must not have command or commandfor attributes");if(m.hasAttribute("command")!==m.hasAttribute("commandfor")){let _=m.hasAttribute("command")?"command":"commandfor",E=m.hasAttribute("command")?"commandfor":"command";throw Error(`Element with ${_} attribute must also have a ${E} attribute to function.`)}if(m.command!=="show-popover"&&m.command!=="hide-popover"&&m.command!=="toggle-popover"&&m.command!=="show-modal"&&m.command!=="request-close"&&m.command!=="close"&&!m.command.startsWith("--")){console.warn(`"${m.command}" is not a valid command value. Custom commands must begin with --`);return}let v=m.commandForElement;if(!v)return;let b=new i("command",{command:m.command,source:m,cancelable:!0});if(v.dispatchEvent(b),b.defaultPrevented)return;let w=b.command.toLowerCase();if(v.popover){let _=!v.matches(":popover-open");_&&(w==="toggle-popover"||w==="show-popover")?v.showPopover({source:m}):!_&&w==="hide-popover"&&v.hidePopover()}else if(v.localName==="dialog"){let _=!v.hasAttribute("open");_&&w=="show-modal"?v.showModal():!_&&w=="close"?v.close(m.value?m.value:void 0):!_&&w=="request-close"&&(HTMLDialogElement.prototype.requestClose||(HTMLDialogElement.prototype.requestClose=function(){let E=new Event("cancel",{cancelable:!0});this.dispatchEvent(E),E.defaultPrevented||this.close()}),v.requestClose(m.value?m.value:void 0))}}function f(p){p.addEventListener("click",u,!0)}function h(p,m){let v=p.prototype.attachShadow;p.prototype.attachShadow=function(w){let _=v.call(this,w);return m(_),_};let b=p.prototype.attachInternals;p.prototype.attachInternals=function(){let w=b.call(this);return w.shadowRoot&&m(w.shadowRoot),w}}a(HTMLButtonElement),h(HTMLElement,p=>{f(p),c.observe(p,{attributeFilter:["oncommand"]}),s(p.querySelectorAll("[oncommand]"))}),f(document),Object.assign(globalThis,{CommandEvent:i})}const z={passive:!0,capture:!0},Q=()=>typeof window<"u"&&typeof document<"u",tc=()=>Q()&&/^Win/i.test(navigator.userAgentData?.platform||navigator.platform),Ae=typeof HTMLElement>"u"?class{}:HTMLElement;function Ci(t,e){let o;return function(...n){clearTimeout(o),o=setTimeout(()=>t.apply(this,n),e)}}const Pt=(t,...e)=>!Q()||window.dsWarnings===!1||console.log(`\x1B[1mDesignsystemet:\x1B[m ${t}`,...e),y=(t,e,o)=>o===void 0?t.getAttribute(e)??null:(o===null?t.removeAttribute(e):t.getAttribute(e)!==o&&t.setAttribute(e,o),null),Ho=(t,e)=>getComputedStyle(t).getPropertyValue(e).trim(),ec=/^["']|["']$/g,Ht=(t,e)=>{let o=y(t,e);return o||=Ho(t,`--_ds-${e}`).replace(ec,"").trim(),o||Pt(`Missing ${e} on:`,t),o||null},R=(t,...e)=>{let[o,...n]=e;for(let i of o.split(" "))t.addEventListener(i,...n);return()=>No(t,...e)},No=(t,...e)=>{let[o,...n]=e;for(let i of o.split(" "))t.removeEventListener(i,...n)},it=(t,e)=>{Q()&&(window._dsHotReloadCleanup||(window._dsHotReloadCleanup=new Map),window._dsHotReloadCleanup?.get(t)?.map(o=>o()),window._dsHotReloadCleanup?.set(t,e()))},rt=(t,e,o)=>{let n=()=>i.disconnect(),i=new MutationObserver(r=>{if(!Q()||!t.isConnected)return n();e(t,r)});return e(t),i.observe(t,o),n},Ai=(t,e)=>{let o=document.createElement(t);if(e)for(let[n,i]of Object.entries(e))y(o,n,i);return o},at={define:(t,e)=>!Q()||window.customElements.get(t)||window.customElements.define(t,e)};let oc=0;function st(t){return Q()?(window.dsUseId||(window.dsUseId=0),t&&!t.id&&(t.id=`:ds:${++window.dsUseId}`),t?.id||""):`:ds:${++oc}`}let J,nc=0,ki=0;const Bo=t=>{clearTimeout(ki),J&&(J.textContent=`${t}${nc++%2?" ":""}`),t&&(ki=setTimeout(Bo,2e3,""))},ic=()=>{document.readyState==="complete"&&(J||(J=Ai("div",{"aria-live":"assertive"}),J.style.overflow="hidden",J.style.position="fixed",J.style.whiteSpace="nowrap",J.style.width="1px"),J.isConnected||document.body.appendChild(J))};it("announce",()=>[R(document,"focus mouseover",ic,z)]);const Li=":click-delegate-hover",Ii="data-clickdelegatefor",rc=`[${Ii}]`,ac=t=>{let e=t.button===1||t.metaKey||t.ctrlKey,o=t.button<2&&Mi(t);if(!(!o||o.contains(t.target))){if(e&&o instanceof HTMLAnchorElement)return window.open(o.href,void 0,o.rel);t.stopImmediatePropagation(),o.click()}};let ke;const sc=t=>{let e=Mi(t);ke!==e&&(ke&&ke.classList.remove(Li),e&&e.classList.add(Li),ke=e)},Mi=({target:t})=>{let e=(t instanceof Element?t.closest(rc):null)?.getAttribute(Ii),o=e&&document.getElementById(e)||void 0,n=o&&t.closest('a,button,label,input,select,textarea,details,dialog,[role="button"],[popover],[contenteditable]');return(!n||n===o)&&!o?.disabled?o:void 0};it("clickdelegatefor",()=>[R(window,"click auxclick",ac,!0),R(document,"mouseover",sc,z)]);let qo=!1;const lc=({type:t,target:e,clientX:o=0,clientY:n=0})=>{if(t==="pointerdown"){let i=e?.closest?.("dialog")?.getBoundingClientRect();qo=!!(i&&i.top<=n&&n<=i.bottom&&i.left<=o&&o<=i.right)}else{let i=e instanceof HTMLDialogElement&&!qo&&y(e,"closedby")==="any";qo=!1,i&&requestAnimationFrame(()=>e.open&&e.close())}},cc=Q()?document.getElementsByTagName("button"):[],dc=()=>{for(let t of cc)t.getAttribute("command")?.endsWith("-modal")&&t.setAttribute("aria-haspopup","dialog")},uc=({command:t,target:e})=>t==="--show-non-modal"&&e instanceof HTMLDialogElement&&e.show();it("dialog",()=>[R(document,"command",uc,z),R(document,"pointerdown pointerup",lc,z),rt(document,dc,{attributeFilter:["command"],attributes:!0,childList:!0,subtree:!0})]);const fc=Q()?document.getElementsByTagName("fieldset"):[],pc=()=>{for(let t of fc)t.hasAttribute("aria-labelledby")||y(t,"aria-labelledby",`${st(t.querySelector("legend"))} ${st(t.querySelector(':scope > :is([data-field="description"],legend + p)'))}`.trim()||null)};it("fieldset",()=>[rt(document,pc,{childList:!0,subtree:!0})]);const Nt=Math.min,q=Math.max,Le=Math.round,Ie=Math.floor,Z=t=>({x:t,y:t}),mc={left:"right",right:"left",bottom:"top",top:"bottom"};function Oi(t,e,o){return q(t,Nt(e,o))}function bt(t,e){return typeof t=="function"?t(e):t}function lt(t){return t.split("-")[0]}function Jt(t){return t.split("-")[1]}function Uo(t){return t==="x"?"y":"x"}function Ri(t){return t==="y"?"height":"width"}function tt(t){const e=t[0];return e==="t"||e==="b"?"y":"x"}function Di(t){return Uo(tt(t))}function hc(t,e,o){o===void 0&&(o=!1);const n=Jt(t),i=Di(t),r=Ri(i);let a=i==="x"?n===(o?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(a=Me(a)),[a,Me(a)]}function vc(t){const e=Me(t);return[Fo(t),e,Fo(e)]}function Fo(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const Pi=["left","right"],Hi=["right","left"],gc=["top","bottom"],bc=["bottom","top"];function yc(t,e,o){switch(t){case"top":case"bottom":return o?e?Hi:Pi:e?Pi:Hi;case"left":case"right":return e?gc:bc;default:return[]}}function _c(t,e,o,n){const i=Jt(t);let r=yc(lt(t),o==="start",n);return i&&(r=r.map(a=>a+"-"+i),e&&(r=r.concat(r.map(Fo)))),r}function Me(t){const e=lt(t);return mc[e]+t.slice(e.length)}function wc(t){return{top:0,right:0,bottom:0,left:0,...t}}function Ec(t){return typeof t!="number"?wc(t):{top:t,right:t,bottom:t,left:t}}function Oe(t){const{x:e,y:o,width:n,height:i}=t;return{width:n,height:i,top:o,left:e,right:e+n,bottom:o+i,x:e,y:o}}function Ni(t,e,o){let{reference:n,floating:i}=t;const r=tt(e),a=Di(e),l=Ri(a),s=lt(e),c=r==="y",d=n.x+n.width/2-i.width/2,u=n.y+n.height/2-i.height/2,f=n[l]/2-i[l]/2;let h;switch(s){case"top":h={x:d,y:n.y-i.height};break;case"bottom":h={x:d,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:u};break;case"left":h={x:n.x-i.width,y:u};break;default:h={x:n.x,y:n.y}}switch(Jt(e)){case"start":h[a]-=f*(o&&c?-1:1);break;case"end":h[a]+=f*(o&&c?-1:1);break}return h}async function Sc(t,e){var o;e===void 0&&(e={});const{x:n,y:i,platform:r,rects:a,elements:l,strategy:s}=t,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:f=!1,padding:h=0}=bt(e,t),p=Ec(h),v=l[f?u==="floating"?"reference":"floating":u],b=Oe(await r.getClippingRect({element:(o=await(r.isElement==null?void 0:r.isElement(v)))==null||o?v:v.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(l.floating)),boundary:c,rootBoundary:d,strategy:s})),w=u==="floating"?{x:n,y:i,width:a.floating.width,height:a.floating.height}:a.reference,_=await(r.getOffsetParent==null?void 0:r.getOffsetParent(l.floating)),E=await(r.isElement==null?void 0:r.isElement(_))?await(r.getScale==null?void 0:r.getScale(_))||{x:1,y:1}:{x:1,y:1},A=Oe(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:w,offsetParent:_,strategy:s}):w);return{top:(b.top-A.top+p.top)/E.y,bottom:(A.bottom-b.bottom+p.bottom)/E.y,left:(b.left-A.left+p.left)/E.x,right:(A.right-b.right+p.right)/E.x}}const xc=50,$c=async(t,e,o)=>{const{placement:n="bottom",strategy:i="absolute",middleware:r=[],platform:a}=o,l=a.detectOverflow?a:{...a,detectOverflow:Sc},s=await(a.isRTL==null?void 0:a.isRTL(e));let c=await a.getElementRects({reference:t,floating:e,strategy:i}),{x:d,y:u}=Ni(c,n,s),f=n,h=0;const p={};for(let m=0;m<r.length;m++){const v=r[m];if(!v)continue;const{name:b,fn:w}=v,{x:_,y:E,data:A,reset:C}=await w({x:d,y:u,initialPlacement:n,placement:f,strategy:i,middlewareData:p,rects:c,platform:l,elements:{reference:t,floating:e}});d=_??d,u=E??u,p[b]={...p[b],...A},C&&h<xc&&(h++,typeof C=="object"&&(C.placement&&(f=C.placement),C.rects&&(c=C.rects===!0?await a.getElementRects({reference:t,floating:e,strategy:i}):C.rects),{x:d,y:u}=Ni(c,f,s)),m=-1)}return{x:d,y:u,placement:f,strategy:i,middlewareData:p}},Tc=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var o,n;const{placement:i,middlewareData:r,rects:a,initialPlacement:l,platform:s,elements:c}=e,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...v}=bt(t,e);if((o=r.arrow)!=null&&o.alignmentOffset)return{};const b=lt(i),w=tt(l),_=lt(l)===l,E=await(s.isRTL==null?void 0:s.isRTL(c.floating)),A=f||(_||!m?[Me(l)]:vc(l)),C=p!=="none";!f&&C&&A.push(..._c(l,m,p,E));const H=[l,...A],V=await s.detectOverflow(e,v),Ct=[];let ut=((n=r.flip)==null?void 0:n.overflows)||[];if(d&&Ct.push(V[b]),u){const At=hc(i,a,E);Ct.push(V[At[0]],V[At[1]])}if(ut=[...ut,{placement:i,overflows:Ct}],!Ct.every(At=>At<=0)){var pe,me;const At=(((pe=r.flip)==null?void 0:pe.index)||0)+1,Jn=H[At];if(Jn&&(!(u==="alignment"?w!==tt(Jn):!1)||ut.every(X=>tt(X.placement)===w?X.overflows[0]>0:!0)))return{data:{index:At,overflows:ut},reset:{placement:Jn}};let ve=(me=ut.filter(kt=>kt.overflows[0]<=0).sort((kt,X)=>kt.overflows[1]-X.overflows[1])[0])==null?void 0:me.placement;if(!ve)switch(h){case"bestFit":{var he;const kt=(he=ut.filter(X=>{if(C){const vt=tt(X.placement);return vt===w||vt==="y"}return!0}).map(X=>[X.placement,X.overflows.filter(vt=>vt>0).reduce((vt,Fp)=>vt+Fp,0)]).sort((X,vt)=>X[1]-vt[1])[0])==null?void 0:he[0];kt&&(ve=kt);break}case"initialPlacement":ve=l;break}if(i!==ve)return{reset:{placement:ve}}}return{}}}},Bi=new Set(["left","top"]);async function Cc(t,e){const{placement:o,platform:n,elements:i}=t,r=await(n.isRTL==null?void 0:n.isRTL(i.floating)),a=lt(o),l=Jt(o),s=tt(o)==="y",c=Bi.has(a)?-1:1,d=r&&s?-1:1,u=bt(e,t);let{mainAxis:f,crossAxis:h,alignmentAxis:p}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return l&&typeof p=="number"&&(h=l==="end"?p*-1:p),s?{x:h*d,y:f*c}:{x:f*c,y:h*d}}const Ac=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var o,n;const{x:i,y:r,placement:a,middlewareData:l}=e,s=await Cc(e,t);return a===((o=l.offset)==null?void 0:o.placement)&&(n=l.arrow)!=null&&n.alignmentOffset?{}:{x:i+s.x,y:r+s.y,data:{...s,placement:a}}}}},kc=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:o,y:n,placement:i,platform:r}=e,{mainAxis:a=!0,crossAxis:l=!1,limiter:s={fn:b=>{let{x:w,y:_}=b;return{x:w,y:_}}},...c}=bt(t,e),d={x:o,y:n},u=await r.detectOverflow(e,c),f=tt(lt(i)),h=Uo(f);let p=d[h],m=d[f];if(a){const b=h==="y"?"top":"left",w=h==="y"?"bottom":"right",_=p+u[b],E=p-u[w];p=Oi(_,p,E)}if(l){const b=f==="y"?"top":"left",w=f==="y"?"bottom":"right",_=m+u[b],E=m-u[w];m=Oi(_,m,E)}const v=s.fn({...e,[h]:p,[f]:m});return{...v,data:{x:v.x-o,y:v.y-n,enabled:{[h]:a,[f]:l}}}}}},Lc=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:o,y:n,placement:i,rects:r,middlewareData:a}=e,{offset:l=0,mainAxis:s=!0,crossAxis:c=!0}=bt(t,e),d={x:o,y:n},u=tt(i),f=Uo(u);let h=d[f],p=d[u];const m=bt(l,e),v=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(s){const _=f==="y"?"height":"width",E=r.reference[f]-r.floating[_]+v.mainAxis,A=r.reference[f]+r.reference[_]-v.mainAxis;h<E?h=E:h>A&&(h=A)}if(c){var b,w;const _=f==="y"?"width":"height",E=Bi.has(lt(i)),A=r.reference[u]-r.floating[_]+(E&&((b=a.offset)==null?void 0:b[u])||0)+(E?0:v.crossAxis),C=r.reference[u]+r.reference[_]+(E?0:((w=a.offset)==null?void 0:w[u])||0)-(E?v.crossAxis:0);p<A?p=A:p>C&&(p=C)}return{[f]:h,[u]:p}}}},Ic=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var o,n;const{placement:i,rects:r,platform:a,elements:l}=e,{apply:s=()=>{},...c}=bt(t,e),d=await a.detectOverflow(e,c),u=lt(i),f=Jt(i),h=tt(i)==="y",{width:p,height:m}=r.floating;let v,b;u==="top"||u==="bottom"?(v=u,b=f===(await(a.isRTL==null?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(b=u,v=f==="end"?"top":"bottom");const w=m-d.top-d.bottom,_=p-d.left-d.right,E=Nt(m-d[v],w),A=Nt(p-d[b],_),C=!e.middlewareData.shift;let H=E,V=A;if((o=e.middlewareData.shift)!=null&&o.enabled.x&&(V=_),(n=e.middlewareData.shift)!=null&&n.enabled.y&&(H=w),C&&!f){const ut=q(d.left,0),pe=q(d.right,0),me=q(d.top,0),he=q(d.bottom,0);h?V=p-2*(ut!==0||pe!==0?ut+pe:q(d.left,d.right)):H=m-2*(me!==0||he!==0?me+he:q(d.top,d.bottom))}await s({...e,availableWidth:V,availableHeight:H});const Ct=await a.getDimensions(l.floating);return p!==Ct.width||m!==Ct.height?{reset:{rects:!0}}:{}}}};function Re(){return typeof window<"u"}function Bt(t){return qi(t)?(t.nodeName||"").toLowerCase():"#document"}function U(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function et(t){var e;return(e=(qi(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function qi(t){return Re()?t instanceof Node||t instanceof U(t).Node:!1}function W(t){return Re()?t instanceof Element||t instanceof U(t).Element:!1}function ct(t){return Re()?t instanceof HTMLElement||t instanceof U(t).HTMLElement:!1}function Ui(t){return!Re()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof U(t).ShadowRoot}function Zt(t){const{overflow:e,overflowX:o,overflowY:n,display:i}=G(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+o)&&i!=="inline"&&i!=="contents"}function Mc(t){return/^(table|td|th)$/.test(Bt(t))}function De(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const Oc=/transform|translate|scale|rotate|perspective|filter/,Rc=/paint|layout|strict|content/,yt=t=>!!t&&t!=="none";let zo;function Vo(t){const e=W(t)?G(t):t;return yt(e.transform)||yt(e.translate)||yt(e.scale)||yt(e.rotate)||yt(e.perspective)||!Wo()&&(yt(e.backdropFilter)||yt(e.filter))||Oc.test(e.willChange||"")||Rc.test(e.contain||"")}function Dc(t){let e=pt(t);for(;ct(e)&&!qt(e);){if(Vo(e))return e;if(De(e))return null;e=pt(e)}return null}function Wo(){return zo==null&&(zo=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),zo}function qt(t){return/^(html|body|#document)$/.test(Bt(t))}function G(t){return U(t).getComputedStyle(t)}function Pe(t){return W(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function pt(t){if(Bt(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Ui(t)&&t.host||et(t);return Ui(e)?e.host:e}function Fi(t){const e=pt(t);return qt(e)?t.ownerDocument?t.ownerDocument.body:t.body:ct(e)&&Zt(e)?e:Fi(e)}function te(t,e,o){var n;e===void 0&&(e=[]),o===void 0&&(o=!0);const i=Fi(t),r=i===((n=t.ownerDocument)==null?void 0:n.body),a=U(i);if(r){const l=Go(a);return e.concat(a,a.visualViewport||[],Zt(i)?i:[],l&&o?te(l):[])}else return e.concat(i,te(i,[],o))}function Go(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function zi(t){const e=G(t);let o=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const i=ct(t),r=i?t.offsetWidth:o,a=i?t.offsetHeight:n,l=Le(o)!==r||Le(n)!==a;return l&&(o=r,n=a),{width:o,height:n,$:l}}function jo(t){return W(t)?t:t.contextElement}function Ut(t){const e=jo(t);if(!ct(e))return Z(1);const o=e.getBoundingClientRect(),{width:n,height:i,$:r}=zi(e);let a=(r?Le(o.width):o.width)/n,l=(r?Le(o.height):o.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const Pc=Z(0);function Vi(t){const e=U(t);return!Wo()||!e.visualViewport?Pc:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Hc(t,e,o){return e===void 0&&(e=!1),!o||e&&o!==U(t)?!1:e}function _t(t,e,o,n){e===void 0&&(e=!1),o===void 0&&(o=!1);const i=t.getBoundingClientRect(),r=jo(t);let a=Z(1);e&&(n?W(n)&&(a=Ut(n)):a=Ut(t));const l=Hc(r,o,n)?Vi(r):Z(0);let s=(i.left+l.x)/a.x,c=(i.top+l.y)/a.y,d=i.width/a.x,u=i.height/a.y;if(r){const f=U(r),h=n&&W(n)?U(n):n;let p=f,m=Go(p);for(;m&&n&&h!==p;){const v=Ut(m),b=m.getBoundingClientRect(),w=G(m),_=b.left+(m.clientLeft+parseFloat(w.paddingLeft))*v.x,E=b.top+(m.clientTop+parseFloat(w.paddingTop))*v.y;s*=v.x,c*=v.y,d*=v.x,u*=v.y,s+=_,c+=E,p=U(m),m=Go(p)}}return Oe({width:d,height:u,x:s,y:c})}function He(t,e){const o=Pe(t).scrollLeft;return e?e.left+o:_t(et(t)).left+o}function Wi(t,e){const o=t.getBoundingClientRect(),n=o.left+e.scrollLeft-He(t,o),i=o.top+e.scrollTop;return{x:n,y:i}}function Nc(t){let{elements:e,rect:o,offsetParent:n,strategy:i}=t;const r=i==="fixed",a=et(n),l=e?De(e.floating):!1;if(n===a||l&&r)return o;let s={scrollLeft:0,scrollTop:0},c=Z(1);const d=Z(0),u=ct(n);if((u||!u&&!r)&&((Bt(n)!=="body"||Zt(a))&&(s=Pe(n)),u)){const h=_t(n);c=Ut(n),d.x=h.x+n.clientLeft,d.y=h.y+n.clientTop}const f=a&&!u&&!r?Wi(a,s):Z(0);return{width:o.width*c.x,height:o.height*c.y,x:o.x*c.x-s.scrollLeft*c.x+d.x+f.x,y:o.y*c.y-s.scrollTop*c.y+d.y+f.y}}function Bc(t){return Array.from(t.getClientRects())}function qc(t){const e=et(t),o=Pe(t),n=t.ownerDocument.body,i=q(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),r=q(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let a=-o.scrollLeft+He(t);const l=-o.scrollTop;return G(n).direction==="rtl"&&(a+=q(e.clientWidth,n.clientWidth)-i),{width:i,height:r,x:a,y:l}}const Gi=25;function Uc(t,e){const o=U(t),n=et(t),i=o.visualViewport;let r=n.clientWidth,a=n.clientHeight,l=0,s=0;if(i){r=i.width,a=i.height;const d=Wo();(!d||d&&e==="fixed")&&(l=i.offsetLeft,s=i.offsetTop)}const c=He(n);if(c<=0){const d=n.ownerDocument,u=d.body,f=getComputedStyle(u),h=d.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,p=Math.abs(n.clientWidth-u.clientWidth-h);p<=Gi&&(r-=p)}else c<=Gi&&(r+=c);return{width:r,height:a,x:l,y:s}}function Fc(t,e){const o=_t(t,!0,e==="fixed"),n=o.top+t.clientTop,i=o.left+t.clientLeft,r=ct(t)?Ut(t):Z(1),a=t.clientWidth*r.x,l=t.clientHeight*r.y,s=i*r.x,c=n*r.y;return{width:a,height:l,x:s,y:c}}function ji(t,e,o){let n;if(e==="viewport")n=Uc(t,o);else if(e==="document")n=qc(et(t));else if(W(e))n=Fc(e,o);else{const i=Vi(t);n={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return Oe(n)}function Ki(t,e){const o=pt(t);return o===e||!W(o)||qt(o)?!1:G(o).position==="fixed"||Ki(o,e)}function zc(t,e){const o=e.get(t);if(o)return o;let n=te(t,[],!1).filter(l=>W(l)&&Bt(l)!=="body"),i=null;const r=G(t).position==="fixed";let a=r?pt(t):t;for(;W(a)&&!qt(a);){const l=G(a),s=Vo(a);!s&&l.position==="fixed"&&(i=null),(r?!s&&!i:!s&&l.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||Zt(a)&&!s&&Ki(t,a))?n=n.filter(d=>d!==a):i=l,a=pt(a)}return e.set(t,n),n}function Vc(t){let{element:e,boundary:o,rootBoundary:n,strategy:i}=t;const a=[...o==="clippingAncestors"?De(e)?[]:zc(e,this._c):[].concat(o),n],l=ji(e,a[0],i);let s=l.top,c=l.right,d=l.bottom,u=l.left;for(let f=1;f<a.length;f++){const h=ji(e,a[f],i);s=q(h.top,s),c=Nt(h.right,c),d=Nt(h.bottom,d),u=q(h.left,u)}return{width:c-u,height:d-s,x:u,y:s}}function Wc(t){const{width:e,height:o}=zi(t);return{width:e,height:o}}function Gc(t,e,o){const n=ct(e),i=et(e),r=o==="fixed",a=_t(t,!0,r,e);let l={scrollLeft:0,scrollTop:0};const s=Z(0);function c(){s.x=He(i)}if(n||!n&&!r)if((Bt(e)!=="body"||Zt(i))&&(l=Pe(e)),n){const h=_t(e,!0,r,e);s.x=h.x+e.clientLeft,s.y=h.y+e.clientTop}else i&&c();r&&!n&&i&&c();const d=i&&!n&&!r?Wi(i,l):Z(0),u=a.left+l.scrollLeft-s.x-d.x,f=a.top+l.scrollTop-s.y-d.y;return{x:u,y:f,width:a.width,height:a.height}}function Ko(t){return G(t).position==="static"}function Xi(t,e){if(!ct(t)||G(t).position==="fixed")return null;if(e)return e(t);let o=t.offsetParent;return et(t)===o&&(o=o.ownerDocument.body),o}function Yi(t,e){const o=U(t);if(De(t))return o;if(!ct(t)){let i=pt(t);for(;i&&!qt(i);){if(W(i)&&!Ko(i))return i;i=pt(i)}return o}let n=Xi(t,e);for(;n&&Mc(n)&&Ko(n);)n=Xi(n,e);return n&&qt(n)&&Ko(n)&&!Vo(n)?o:n||Dc(t)||o}const jc=async function(t){const e=this.getOffsetParent||Yi,o=this.getDimensions,n=await o(t.floating);return{reference:Gc(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Kc(t){return G(t).direction==="rtl"}const Xc={convertOffsetParentRelativeRectToViewportRelativeRect:Nc,getDocumentElement:et,getClippingRect:Vc,getOffsetParent:Yi,getElementRects:jc,getClientRects:Bc,getDimensions:Wc,getScale:Ut,isElement:W,isRTL:Kc};function Qi(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Yc(t,e){let o=null,n;const i=et(t);function r(){var l;clearTimeout(n),(l=o)==null||l.disconnect(),o=null}function a(l,s){l===void 0&&(l=!1),s===void 0&&(s=1),r();const c=t.getBoundingClientRect(),{left:d,top:u,width:f,height:h}=c;if(l||e(),!f||!h)return;const p=Ie(u),m=Ie(i.clientWidth-(d+f)),v=Ie(i.clientHeight-(u+h)),b=Ie(d),_={rootMargin:-p+"px "+-m+"px "+-v+"px "+-b+"px",threshold:q(0,Nt(1,s))||1};let E=!0;function A(C){const H=C[0].intersectionRatio;if(H!==s){if(!E)return a();H?a(!1,H):n=setTimeout(()=>{a(!1,1e-7)},1e3)}H===1&&!Qi(c,t.getBoundingClientRect())&&a(),E=!1}try{o=new IntersectionObserver(A,{..._,root:i.ownerDocument})}catch{o=new IntersectionObserver(A,_)}o.observe(t)}return a(!0),r}function Qc(t,e,o,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:s=!1}=n,c=jo(t),d=i||r?[...c?te(c):[],...e?te(e):[]]:[];d.forEach(b=>{i&&b.addEventListener("scroll",o,{passive:!0}),r&&b.addEventListener("resize",o)});const u=c&&l?Yc(c,o):null;let f=-1,h=null;a&&(h=new ResizeObserver(b=>{let[w]=b;w&&w.target===c&&h&&e&&(h.unobserve(e),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var _;(_=h)==null||_.observe(e)})),o()}),c&&!s&&h.observe(c),e&&h.observe(e));let p,m=s?_t(t):null;s&&v();function v(){const b=_t(t);m&&!Qi(m,b)&&o(),m=b,p=requestAnimationFrame(v)}return o(),()=>{var b;d.forEach(w=>{i&&w.removeEventListener("scroll",o),r&&w.removeEventListener("resize",o)}),u?.(),(b=h)==null||b.disconnect(),h=null,s&&cancelAnimationFrame(p)}}const Jc=Ac,Zc=kc,td=Tc,ed=Ic,od=Lc,nd=(t,e,o)=>{const n=new Map,i={platform:Xc,...o},r={...i.platform,_c:n};return $c(t,e,{...i,platform:r})},Ji="data-placement",Zi="data-autoplacement",ee=new Map;function id(t){let{newState:e,oldState:o,target:n,source:i=t.detail}=t,r=n instanceof HTMLElement&&y(n,"popover")!==null&&Ho(n,"--_ds-floating");if(!r)return;if(e==="closed")return ee.get(n)?.();if(!i){let p=n.getRootNode(),m=`[popovertarget="${n.id}"],[commandfor="${n.id}"]`;i=n.id&&p?.querySelector?.(m)||void 0}if(!i||i===n||o&&o===e)return;let a=Ho(n,"--_ds-floating-overscroll"),l=y(n,Ji)||y(i,Ji)||r,s=y(n,Zi)||y(i,Zi),c=parseFloat(getComputedStyle(n,"::before").height)||0,d=l.match(/left|right/gi)?"Height":"Width",u=i[`offset${d}`]/2+c;if(l==="none")return;let f={strategy:"absolute",placement:l,middleware:[Jc(c||0),Zc({padding:10,limiter:od({offset:{mainAxis:u}})}),ad(),...s==="false"?[]:[td({padding:10,crossAxis:!1})],...a?[ed({apply({availableHeight:p}){a==="fit"&&(n.style.width=`${i.clientWidth}px`),n.style.maxHeight=`${Math.max(50,p-20)}px`}})]:[]]},h=Qc(i,n,async()=>{if(!i?.isConnected)return ee.get(n)?.();let{x:p,y:m}=await nd(i,n,f);n.style.translate=`${p}px ${m}px`});ee.set(n,()=>ee.delete(n)&&h())}let Ne;const rd=({type:t})=>{if(t==="mousedown"&&(Ne=!1),t==="scroll"&&Ne===!1&&(Ne=!0),t==="mouseup"&&Ne)for(let[e]of ee)e.showPopover()};it("popover",()=>[R(document,"mousedown scroll mouseup",rd,!0),R(document,"toggle ds-toggle-source",id,z)]);const ad=()=>({name:"arrowPseudo",fn(t){let e=t.elements.floating,o=t.rects.reference,n=`${Math.round(o.width/2+o.x-t.x)}px`,i=`${Math.round(o.height/2+o.y-t.y)}px`;return e.style.setProperty("--_ds-floating-arrow-x",n),e.style.setProperty("--_ds-floating-arrow-y",i),y(e,"data-floating",t.placement),t}}),Xo=t=>(t instanceof HTMLSelectElement||t instanceof HTMLInputElement)&&(t.hasAttribute("readonly")||y(t,"aria-readonly")==="true"),sd=t=>{if(t.key!=="Tab"&&Xo(t.target)){let e=t.key?.startsWith("Arrow"),o=t.altKey||t.ctrlKey||t.metaKey;if((e||!o)&&t.preventDefault(),e&&y(t.target,"type")==="radio"){let n=document.querySelectorAll(`input[name="${t.target.name}"]`),i=t.key?.match(/Arrow(Right|Down)/)?1:-1;n[(n.length+[...n].indexOf(t.target)+i)%n.length]?.focus()}}},ld=t=>{let e=t.target?.closest?.("label")?.control||t.target;Xo(e)&&(t.preventDefault(),e.focus())},cd=t=>{t.target instanceof HTMLSelectElement&&Xo(t.target)&&t.preventDefault()};it("readonly",()=>[R(document,"keydown",sd),R(document,"click",ld),R(document,"mousedown",cd)]);const tr="aria-label",Be="data-toggle-group",er=`[${Be}]`,dd=()=>{for(let t of document.querySelectorAll(er))y(t,"aria-label",Ht(t,Be))},ud=t=>{let{key:e,target:o}=t,n=o instanceof HTMLInputElement&&o.closest(er);if(n&&(!y(n,tr)&&!y(n,"aria-labelledby")&&y(n,tr,Ht(n,Be)),e==="Enter"&&o.click(),e?.startsWith("Arrow"))){t.preventDefault?.();let i=[...n.getElementsByTagName("input")],r=i.indexOf(o),a=e.match(/Arrow(Right|Down)/)?1:-1,l=r;for(let s=0;s<i.length;s++)if(l=(i.length+l+a)%i.length,!i[l]?.disabled){i[l]?.focus();break}}};it("toggle-group",()=>[R(document,"keydown",ud),rt(document,dd,{attributeFilter:[Be],attributes:!0,childList:!0,subtree:!0})]);let I,oe,qe=!1,Yo=0,Qo=0;const fd=Q()&&/iPad|iPhone|iPod/.test(navigator.userAgent),Ft="data-tooltip",Jo="data-color",or="aria-label",nr="aria-description",pd=`[${Jo}]`,md=`[${Ft}]`,Zo="data-color-scheme",hd=`[${Zo}]`,ir=t=>{t&&!(t instanceof HTMLElement)&&Pt("setTooltipElement expects an HTMLElement, got: ",t),clearTimeout(Qo),clearTimeout(Yo),oe=void 0,qe=!1,I=t||void 0},vd=()=>{for(let t of document.querySelectorAll(md)){let e=Ht(t,Ft);if(!e)return;if(e!==(t.getAttribute(or)||t.getAttribute(nr))){let i=y(t,"role")!=="img"&&t.textContent?.trim();y(t,Ft,e),y(t,or,i?null:e),y(t,nr,i?e:null),t.matches("a,button,input,label,select,textarea,[tabindex]")||Pt('Missing tabindex="0" attribute on: ',t)}let o=t===oe&&I?.offsetHeight&&I?.offsetWidth,n=o&&e&&I?.textContent!==e;o&&n&&(I&&(I.textContent=e),document.activeElement===t&&Bo(e))}},rr=({type:t,target:e})=>{if(clearTimeout(Yo),e===I)return;if(t==="mouseover"&&!qe&&!fd){Yo=setTimeout(rr,300,{target:e});return}let o=e?.closest?.(`[${Ft}]`);if(o===oe)return;if(!o)return ar();I||=Ai("div",{class:"ds-tooltip"}),I.isConnected||document.body.appendChild(I);let n=o.closest(pd),i=o.closest(hd),r=n!==i&&n?.contains(i);clearTimeout(Qo),y(I,"popover","manual"),y(I,Zo,i?.getAttribute(Zo)||null),y(I,Jo,r&&n?.getAttribute(Jo)||null),I.textContent=y(o,Ft),I.showPopover(),I.dispatchEvent(new CustomEvent("ds-toggle-source",{detail:o})),qe=!0,oe=o},ar=()=>I?.isConnected&&I.popover&&I.hidePopover(),sr=t=>{if(t?.type==="keydown")return t?.key==="Escape"&&ar();t?t.target===I&&t.newState==="closed"&&(oe=void 0,Qo=setTimeout(sr,300)):qe=!1};it("tooltip",()=>[R(document,"blur focus mouseover",rr,z),R(document,"toggle keydown",sr,z),rt(document,vd,{attributeFilter:[Ft],attributes:!0,childList:!0,subtree:!0})]);const tn="aria-label";var lr=class extends Ae{_items;_label=null;_unresize;_unmutate;static get observedAttributes(){return[tn]}connectedCallback(){let e=Ci(()=>en(this),100);this._label=Ht(this,tn),this._items=this.getElementsByTagName("a"),this._unresize=R(window,"resize",e),this._unmutate=rt(this,en,{childList:!0,subtree:!0})}attributeChangedCallback(e,o,n){!this._unmutate||!n||(this._label=n,en(this))}disconnectedCallback(){this._unresize?.(),this._unmutate?.(),this._unresize=this._unmutate=this._items=void 0}};const en=t=>{let e=t._items?.[t._items.length-1],o=e?.parentElement===t?null:e,n=!o?.offsetHeight;y(t,"role",n?null:"navigation"),y(t,tn,n?null:t._label);for(let i of t._items||[])y(i,"aria-current",i===o?"page":null)};at.define("ds-breadcrumbs",lr);var cr=class extends Ae{_unmutate;connectedCallback(){R(this,"animationend",this,z),y(this,"tabindex","-1"),this._unmutate=rt(this,gd,{childList:!0,subtree:!0}),this.focus()}handleEvent({target:e}){e===this&&this.focus()}disconnectedCallback(){No(this,"animationend",this,z),this._unmutate?.(),this._unmutate=void 0}};const gd=t=>{let e=t.querySelector("h2,h3,h4,h5,h6");e&&y(t,"aria-labelledby",st(e))};at.define("ds-error-summary",cr);const on="aria-invalid",dr="aria-describedby",ur="data-indeterminate",bd=tc()?800:200,fr=new WeakMap,ne=new Map,nn=new WeakSet,yd=(t,e=[])=>{for(let{target:o}of e){let n=o instanceof HTMLFieldSetElement;for(let[i]of ne)(n?o.contains(i):i.contains(o))&&pr(i)}},pr=t=>{let e=[],o=[],n=ne.get(t)||[],i,r,a=!1,l=!1;for(let f of t.getElementsByTagName("*"))if(f instanceof HTMLLabelElement&&e.push(f),!f.hidden)if(Ed(f))i?Pt("Fields should only have one input element. Use <fieldset> to group multiple fields:",t):i=f;else{let h=f.getAttribute("data-field");h==="counter"&&(r=f),h==="validation"?(o.unshift(st(f)),a=!0,l||=hr(f)):h&&o.push(st(f))}if(!i)return;r&&fr.set(i,r);for(let f of e)y(f,"for",st(i));let s=t.closest("fieldset")?.querySelector(':scope > [data-field="validation"]');s&&!s?.hidden&&(a=!0,l||=hr(s),o.unshift(st(s)));let c=y(i,ur);c&&(i.indeterminate=c==="true"),(i.type==="radio"||i.type==="checkbox")&&y(t,"data-clickdelegatefor",st(i));let d=y(i,dr)?.trim().split(/\s+/)?.filter(f=>!n.includes(f))||[];y(i,dr,[...o,...d].join(" ")||null),ne.set(t,o);let u=nn.has(i);a&&!u&&!i.hasAttribute(on)?(y(i,on,"true"),nn.add(i)):!a&&u&&(y(i,on,null),nn.delete(i)),mr(i)},_d={over:"%d tegn for mye",under:"%d tegn igjen"},mr=t=>{let e=t.target||t,o=fr.get(e);if(o?.isConnected){let n=(Number(y(o,"data-limit"))||0)-e.value.length,i=n<0?"over":"under",r=(Ht(o,`data-${i}`)||_d[i])?.replace("%d",`${Math.abs(n)}`);y(o,"data-label",r),y(o,"data-state",i),y(o,"data-color",n<0?"danger":null),t.type==="input"&&r&&wd(e,r)}e instanceof HTMLTextAreaElement&&(e.style.setProperty("--_ds-field-sizing","auto"),e.style.setProperty("--_ds-field-sizing",`${e.scrollHeight}px`))},wd=Ci((t,e)=>{document.activeElement===t&&Bo(e)},bd),hr=t=>t.getAttribute("data-color")!=="success",Ed=t=>t instanceof HTMLElement&&"validity"in t&&!(t instanceof HTMLButtonElement)&&t.type!=="hidden";var Ue=class extends Ae{connectedCallback(){ne.set(this,[]),pr(this)}disconnectedCallback(){ne.delete(this)}};at.define("ds-field",Ue),it("field",()=>[R(document,"input",mr,z),rt(document,yd,{attributeFilter:["data-field","data-limit","hidden","id","value",ur],attributes:!0,childList:!0,subtree:!0})]);const rn="aria-label",Fe="data-current",ze="data-total",vr="data-href",gr=({current:t=1,total:e=10,show:o=7})=>({prev:t>1?t-1:0,next:t<e?t+1:0,pages:Sd(t,e,o).map((n,i)=>({current:n===t&&"page",key:`key-${n}-${i}`,page:n}))});var br=class extends Ae{_unmutate;_render;static get observedAttributes(){return[rn,Fe,ze,vr]}connectedCallback(){let t=y(this,ze),e=y(this,Fe);e&&!t&&Pt(`Missing ${ze} attribute on:`,this),t&&!e&&Pt(`Missing ${Fe} attribute on:`,this),y(this,rn,Ht(this,rn)),y(this,"role","navigation"),this._unmutate=rt(this,yr,{childList:!0,subtree:!0})}attributeChangedCallback(){this._unmutate&&yr(this)}disconnectedCallback(){this._unmutate?.(),this._unmutate=this._render=void 0}};const yr=t=>{let e=Number(y(t,Fe)),o=Number(y(t,ze));if(e&&o){let n=t.querySelectorAll("button,a"),i=n.length-2,r=y(t,vr),{next:a,prev:l,pages:s}=gr({current:e,total:o,show:i});n.forEach((c,d)=>{let u=d?n[d+1]?s[d-1]?.page:a:l;y(c,"aria-current",s[d-1]?.current?"true":null),y(c,"aria-label",`${u??"hidden"}`),y(c,"role",u?null:"none"),y(c,"tabindex",u?null:"-1"),c instanceof HTMLButtonElement&&y(c,"value",`${u}`),r&&c instanceof HTMLAnchorElement&&y(c,"href",r.replace("%d",`${u}`))})}},Sd=(t,e,o=1/0)=>{let n=(o-1)/2,i=Math.max(Math.min(t-Math.floor(n),e-o+1),1),r=Math.min(Math.max(t+Math.ceil(n),o),e),a=Array.from({length:r+1-i},(l,s)=>s+i);return o>4&&i>1&&a.splice(0,2,1,0),o>3&&r<e&&a.splice(-2,2,0,e),a};at.define("ds-pagination",br);var xd=Object.defineProperty,_r=Object.getOwnPropertySymbols,$d=Object.prototype.hasOwnProperty,Td=Object.prototype.propertyIsEnumerable,wr=(t,e,o)=>e in t?xd(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,Cd=(t,e)=>{for(var o in e||(e={}))$d.call(e,o)&&wr(t,o,e[o]);if(_r)for(var o of _r(e))Td.call(e,o)&&wr(t,o,e[o]);return t},Ve=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",Ad=Ve&&/android/i.test(navigator.userAgent),Er=Ve&&/iPad|iPhone|iPod/.test(navigator.userAgent),Sr;Ve&&/^Mac/i.test(((Sr=navigator.userAgentData)==null?void 0:Sr.platform)||navigator.platform);var kd="outline: 1px dotted; outline: 5px auto Highlight; outline: 5px auto -webkit-focus-ring-color",Ld=typeof HTMLElement>"u"?class{}:HTMLElement;function x(t,e,o){return o===void 0?t.getAttribute(e):(o===null?t.removeAttribute(e):t.getAttribute(e)!==o&&t.setAttribute(e,o),null)}var xr=(t,e,o)=>{for(const n of o[0].split(","))o[0]=n,Element.prototype[`${t}EventListener`].apply(e,o)},We=(t,...e)=>xr("add",t,e),Id=(t,...e)=>xr("remove",t,e),Ge=new WeakMap,an=(t,e)=>{if(e===void 0)return Ge.get(t);try{Ge.get(t).disconnect(),Ge.delete(t)}catch{}if(e){const o=new MutationObserver(n=>t.handleEvent({type:"mutation",detail:n}));o.observe(t,e),Ge.set(t,o)}},Md=t=>{var e;const o=t.key===" "||t.key==="Enter";return o&&((e=t.preventDefault)==null||e.call(t)),o&&t.target instanceof HTMLElement&&t.target.dispatchEvent(new MouseEvent("click",t)),o},$r=t=>{var e;const o=((e=t.getRootNode)==null?void 0:e.call(t))||t.ownerDocument;return o instanceof Document||o instanceof ShadowRoot?o:document},Od=0,Tr=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++Od).toString(32)}`),t.id):"",zt=(t,e,o)=>{const n=document.createElement(t);if(e&&(n[t==="style"?"textContent":"innerHTML"]=e),o)for(const[i,r]of Object.entries(o))x(n,i,r);return n},Rd={define:(t,e)=>!Ve||window.customElements.get(t)||window.customElements.define(t,e)},Dd=t=>{var e;const o=x(t,"aria-label")||"";return[...(((e=x(t,"aria-labelledby"))==null?void 0:e.trim().split(/\s+/))||[]).map(i=>document.getElementById(i)),...Array.from(t.labels||[])].reduce((i,r)=>{var a;return i||((a=r?.innerText)==null?void 0:a.trim())||""},o)},wt,Pd=0,sn=t=>{wt||(wt=zt("div"),wt.style.cssText="position:fixed;overflow:hidden;width:1px;white-space:nowrap",x(wt,"aria-live","assertive")),wt.isConnected||document.body.append(wt),t&&(wt.textContent=`${t}${Pd++%2?" ":""}`)},Cr=(t,e,o="")=>{var n,i;const r={bubbles:!0,composed:!0,data:e,inputType:o},a=HTMLInputElement.prototype;t.dispatchEvent(new InputEvent("beforeinput",r)),(i=(n=Object.getOwnPropertyDescriptor(a,"value"))==null?void 0:n.set)==null||i.call(t,e),t.dispatchEvent(new InputEvent("input",r)),t.dispatchEvent(new Event("change",{bubbles:!0}))},ln=!1,cn=t=>(t?.type==="mouseup"&&(ln=!1),t?.type==="mousedown"&&(ln=!0,We(document,"mouseup",cn,{once:!0})),ln),Hd=`:host(:not([hidden])) { display: block; -webkit-tap-highlight-color: rgba(0, 0, 0, 0) } /* Must be display block in Safari to allow focus inside */
|
|
2
16
|
:host(:not([data-multiple])) ::slotted(data),
|
|
3
17
|
:host([data-multiple="false"]) ::slotted(data) { display: none } /* Hide data if not multiple */
|
|
4
18
|
[role="listbox"] { position: absolute } /* Avoid affecting CSS like flex on the <u-combobox> */
|
|
@@ -6,27 +20,22 @@ var mtds=(function(E){"use strict";var Ms=Object.defineProperty,rn=Object.getOwn
|
|
|
6
20
|
::slotted(del) { text-decoration: none }
|
|
7
21
|
::slotted(data:not([hidden])) { display: inline-block; pointer-events: none }
|
|
8
22
|
::slotted(data)::after { content: '\\00D7'; content: '\\00D7' / ''; padding-inline: .5ch; pointer-events: auto; cursor: pointer }
|
|
9
|
-
::slotted(data:focus) { ${Ps} }`,Vs=Gs(Ve),hn="beforeinput,blur,focus,click,input,keydown,mousedown",gn={once:!0,capture:!0,passive:!0},ee="false",oe=Ds||cn,bn="".repeat(5),vn="deleteContentBackward",zs="insertText",Xs=" ",ne={added:"Added",empty:"No selected",found:"Navigate left to find %d selected",invalid:"Invalid value",items:"Selected",of:"of",remove:"Press to remove",removed:"Removed"},ze=class extends Hs{constructor(){super(),this._item="",this._speak="",this._texts=Os({},ne),this._value="",this.shadowRoot||this.attachShadow({mode:"open"}).append(Tt("slot",null,{"aria-orientation":"horizontal",tabindex:"-1",role:"listbox",name:"items"}),Tt("slot"),Tt("div",'<div role="option" tabindex="-1"></div>',{"aria-hidden":"true",role:"listbox"}),Tt("style",Ve))}static get observedAttributes(){return Object.keys(ne).map(t=>`data-sr-${t}`)}connectedCallback(){this._root=fn(this),Zt(this,hn,this,!0),Ue(this,{attributeFilter:["value","id","role"],attributes:!0,characterData:!0,childList:!0,subtree:!0}),setTimeout(ie,0,this),setTimeout(ae,0,this)}attributeChangedCallback(t,e,o){const n=t.split("data-sr-")[1];ne[n]&&(this._texts[n]=o||ne[n])}disconnectedCallback(){Ue(this,!1),Ns(this,hn,this,!0),this._items=this._clear=this._focus=this._control=void 0,this._list=this._options=this._root=this._form=void 0}handleEvent(t){const e=t.target;je(this)||(t.type==="beforeinput"&&(this._value=e?.value||""),t.type==="blur"&&Ks(this),t.type==="click"&&Qs(this,t),t.type==="focus"&&js(this,t),t.type==="input"&&Js(this,t),t.type==="keydown"&&Zs(this,t),t.type==="mousedown"&&Ge(t),t.type==="mutation"&&ie(this,t))}get multiple(){var t;return((t=$(this,"data-multiple"))!=null?t:ee)!==ee}set multiple(t){$(this,"data-multiple",t?"":null)}get creatable(){var t;return((t=$(this,"data-creatable"))!=null?t:ee)!==ee}set creatable(t){$(this,"data-creatable",t?"":null)}get control(){var t;return(t=this._control)!=null&&t.isConnected||(this._control=this.querySelector("input")),this._control}get list(){var t;return(t=this._list)!=null&&t.isConnected||(this._list=this.querySelector('datalist,[role="listbox"]')),this._list}get clear(){var t;return(t=this._clear)!=null&&t.isConnected||(this._clear=this.querySelector("del")),this._clear}get items(){return this._items||(this._items=this.getElementsByTagName("data")),this._items}get options(){var t,e;if(!this._options){const o=(e=(t=this.list)==null?void 0:t.querySelector('[role="option"],option'))==null?void 0:e.nodeName;o&&(this._options=this.getElementsByTagName(o))}return this._options}get values(){return[...this.items].map(({value:t})=>t)}},ut=t=>{var e;return((e=t?.textContent)==null?void 0:e.trim())||""},Xe=t=>t instanceof HTMLDataElement,je=({control:t})=>t?.disabled||t?.readOnly||!1,ie=(t,e)=>{var o,n;const{_focus:i,_texts:a,items:s,control:r,list:c,multiple:l}=t;if(!r)return;const d=Fs(r),u=d.endsWith(bn)?$(r,"data-label"):d;$(r,"data-label",u);let m=`${u}${l?`, ${s.length?a.found.replace("%d",`${s.length}`):a.empty}`:""}`;const p=[];for(const{addedNodes:y,removedNodes:T}of e?.detail||[]){for(const S of y)Xe(S)&&p.unshift(S);for(const S of T)Xe(S)&&p.push(S)}const v=l?p.length===1:p[0]===i;if(i&&v){const y=$(r,"aria-expanded"),T=$(r,"inputmode"),S=Xe(i)?r:i,R=!p[0].isConnected;t._speak=`${a[R?"removed":"added"]} ${ut(p[0])}, `,(oe||i===r)&&Fe(t._speak),r!==S&&(oe&&$(r,"aria-expanded",null),oe&&$(r,"inputmode","none"),m=Xs,r.focus()),setTimeout(()=>{var F;$(r,"aria-expanded",y),$(r,"inputmode",R?"none":T),(F=S?.focus)==null||F.call(S),$(r,"inputmode",T),t._speak="",oe?setTimeout(ie,100,t):Zt(t,"blur",()=>ie(t),gn)},100)}let f=0;const g=t.querySelector("select"),h=je(t)?"":a.remove,w=(o=t.shadowRoot)==null?void 0:o.firstElementChild;w&&$(w,"aria-label",a.items);for(const y of s){const T=g?.options[f++],S=ut(y),R=y.value||S,F=`${t._speak}${S}, ${h}`;$(y,"aria-label",F),$(y,"aria-selected","true"),$(y,"role","option"),$(y,"slot","items"),$(y,"tabindex","-1"),$(y,"value",R),T?Object.assign(T,{textContent:S,value:R}):g?.appendChild(new Option(S,R,!0,!0)),cn&&$(y,"title",`${f} ${a.of} ${s.length}`)}g&&$(g,"multiple",l?"":null);for(const y of[...g?.options||[]].slice(f))y.remove();!l&&f>1&&console.warn(t," Multiple <data> found in single mode."),c&&($(c,"aria-multiselectable",`${l}`),$(r,"list",mn(c)),$(r,"aria-label",`${t._speak}${m}${bn}`),c.hasAttribute("popover")&&($(r,"popovertarget",mn(c)),$(c,"popover","manual")),c._of=a.of);const _=ut(s[0]);_!==t._item&&ae(t),t._item=_,wn(t),yn(t),(n=Ue(t))==null||n.takeRecords()},wn=t=>{var e;t.clear&&$(t.clear,"role","button"),t.clear&&(t.clear.hidden=!((e=t.control)!=null&&e.value)||je(t))},yn=t=>{var e;const{_speak:o,options:n=[],values:i}=t;for(const a of n){const s=(e=$(a,"value"))!=null?e:ut(a);$(a,"aria-label",o?`${o}${ut(a)}`:null),$(a,"selected",i.includes(s)?"":null)}},ae=t=>{const{multiple:e,control:o,items:n}=t,i=ut(n[0]);!e&&o&&i!==o.value&&pn(o,i,i?zs:vn)},Ke=(t,e=!0)=>{var o;const{_texts:n,options:i=[],creatable:a,control:s,items:r,multiple:c}=t,l=((o=s?.value)==null?void 0:o.trim())||"",d=l.toLowerCase()||null;let u=[...i].find(p=>($(p,"label")||ut(p)).trim().toLowerCase()===d);const m={bubbles:!0,cancelable:!0,detail:u};if(t.dispatchEvent(new CustomEvent("comboboxbeforematch",m))||(u=[...i].find(p=>p.selected)),e)return yn(t),u?kt(t,u,!1):a&&l?kt(t,{value:l},!1):(!c&&!l&&r[0]?kt(t,r[0]):ae(t),Fe(n.invalid));for(const p of i)p.selected=p===u},kt=(t,e,o=!0)=>{var n,i,a;const{control:s,items:r,multiple:c}=t,l=Tt("data",e.label||e.value,{value:e.value}),d=[...r].find(p=>p.value===e.value),u={bubbles:!0,cancelable:!0,detail:d||l};if(d&&!o)return ae(t);if(d===((n=fn(t))==null?void 0:n.activeElement)&&((a=(i=t.shadowRoot)==null?void 0:i.querySelector('[role="option"]'))==null||a.focus()),t.dispatchEvent(new CustomEvent("comboboxbeforeselect",u))){if(!c)for(const p of[...r])p.remove();d?d.remove():s?.insertAdjacentElement("beforebegin",l),t.dispatchEvent(new CustomEvent("comboboxafterselect",u))}},js=(t,{target:e})=>{const{_form:o,control:n,multiple:i}=t;e instanceof HTMLElement&&(t._focus=e),i&&o===void 0&&n&&e===n&&(t._form=$(n,"form"),$(n,"form","#")),Fe()},Ks=t=>Ge()||setTimeout(Ys,0,t),Ys=t=>{const{_focus:e,_root:o,_form:n,multiple:i,control:a}=t;!e||t.contains(o?.activeElement)||(i||Ke(t),n&&a&&$(a,"form",n),t._focus=t._form=void 0)},Qs=(t,e)=>{const{clientX:o,clientY:n,target:i}=e,{clear:a,control:s,items:r}=t;if(a?.contains(i))return s&&pn(s,"",vn),s?.focus();for(const c of r){const{top:l,right:d,bottom:u,left:m}=c.getBoundingClientRect();if(c.contains(i))return kt(t,c);if(n>=l&&n<=u&&o>=m&&o<=d)return c.focus()}i===t&&s?.focus()},Js=(t,e)=>{var o;const{options:n=[],control:i,multiple:a}=t,s=((o=i?.value)==null?void 0:o.trim())||"";if(e instanceof InputEvent?!e.inputType||e.inputType==="insertReplacementText":!!s){e.stopImmediatePropagation(),i&&(i.value=t._value);for(const c of n)if(c.value&&c.value===s)return kt(t,c,a)}else a||Ke(t,!1);wn(t)},Zs=(t,e)=>{var o;const{clear:n,control:i,items:a}=t,{key:s,repeat:r,target:c}=e,l=i&&i===c,d=l&&i.selectionEnd,u=e.ctrlKey||e.metaKey||e.shiftKey||e.key==="Alt";let m=l?a.length:[...a].indexOf(c);if(l&&s==="Tab"&&!e.shiftKey&&n&&!n.hidden&&(e.preventDefault(),n.tabIndex=0,n.focus(),Zt(n,"blur",()=>$(n,"tabindex",null),gn)),!(!l&&qs(e)||m===-1||u)){if(s==="ArrowRight"&&!l)m+=1;else if(s==="ArrowLeft"&&!d)m-=1;else{if(s==="Enter"&&l)return Ke(t);if(s==="Backspace"&&!d){if(e.preventDefault(),!r&&a[m])return kt(t,a[m]);l&&(m-=1)}else return l||i?.focus()}e.preventDefault(),(o=a[Math.max(0,m)]||i)==null||o.focus()}};Us.define("u-combobox",ze);var Ye=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",tr=Ye&&/android/i.test(navigator.userAgent),_n;Ye&&/^Mac/i.test(((_n=navigator.userAgentData)==null?void 0:_n.platform)||navigator.platform);var er=`${tr?"data":"aria"}-labelledby`,Qe=":host(:not([hidden])) { display: block }",se=typeof HTMLElement>"u"?class{}:HTMLElement;function C(t,e,o){return o===void 0?t.getAttribute(e):(o===null?t.removeAttribute(e):t.getAttribute(e)!==o&&t.setAttribute(e,o),null)}var xn=(t,e,o)=>{for(const n of o[0].split(","))o[0]=n,Element.prototype[`${t}EventListener`].apply(e,o)},or=(t,...e)=>xn("add",t,e),nr=(t,...e)=>xn("remove",t,e),re=(t,e)=>t.shadowRoot||t.attachShadow({mode:"open"}).append(Tn("slot"),Tn("style",e)),le=new WeakMap,En=(t,e)=>{if(e===void 0)return le.get(t);try{le.get(t).disconnect(),le.delete(t)}catch{}if(e){const o=new MutationObserver(n=>t.handleEvent({type:"mutation",detail:n}));o.observe(t,e),le.set(t,o)}},ir=t=>{var e;const o=t.key===" "||t.key==="Enter";return o&&((e=t.preventDefault)==null||e.call(t)),o&&t.target instanceof HTMLElement&&t.target.dispatchEvent(new MouseEvent("click",t)),o},Sn=t=>{var e;const o=((e=t.getRootNode)==null?void 0:e.call(t))||t.ownerDocument;return o instanceof Document||o instanceof ShadowRoot?o:document},ar=0,$n=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++ar).toString(32)}`),t.id):"",Tn=(t,e,o)=>{const n=document.createElement(t);return e&&(n[t==="style"?"textContent":"innerHTML"]=e),n},ce={define:(t,e)=>!Ye||window.customElements.get(t)||window.customElements.define(t,e)},de=(t,e="<slot></slot>")=>`<template shadowrootmode="open">${e}<style>${t}</style></template>`,Je=Qe,Ze=Qe,to=Qe,eo=':host(:not([hidden])) { display: inline-block; cursor: pointer }:host([aria-disabled="true"]) { cursor: default }',sr=de(Je),rr=de(Ze),lr=de(eo),cr=de(to),ue="aria-controls",At="aria-selected",kn="data-utabs",oo=class extends se{constructor(){super(),re(this,Je)}connectedCallback(){C(this,kn,"")}get tabList(){return fe("tablist",this)[0]||null}get selectedIndex(){return me(this.tabs)}set selectedIndex(t){fo(this.tabs[t])}get tabs(){return fe("tab",this)}get panels(){return fe("tabpanel",this)}},no=class extends se{constructor(){super(),re(this,Ze)}connectedCallback(){C(this,"role","tablist"),or(this,"click,keydown",this),En(this,{childList:!0}),requestAnimationFrame(()=>this.handleEvent())}disconnectedCallback(){nr(this,"click,keydown",this),En(this,!1)}handleEvent(t){var e,o;if(!t||t.type==="mutation"){const r=this.tabs[Math.max(this.selectedIndex,0)];return r?.setAttribute(At,"true")}const{key:n}=t,i=[...this.tabs],a=i.findIndex(r=>r.contains(t.target));let s=a;if(!(t.defaultPrevented||a===-1)&&(t.type==="click"&&fo(i[a]),t.type==="keydown"&&!ir(t))){if(n==="ArrowDown"||n==="ArrowRight")s=(a+1)%i.length;else if(n==="ArrowUp"||n==="ArrowLeft")s=(a||i.length)-1;else if(n==="End")s=i.length-1;else if(n==="Home")s=0;else if(n==="Tab")s=me(i);else return;setTimeout(()=>{C(i[a],"tabindex","-1"),C(i[s],"tabindex","0")}),n!=="Tab"&&(t.preventDefault(),(o=(e=i[s]).focus)==null||o.call(e))}}get tabsElement(){return co(this)}get tabs(){return uo(this)}get selectedIndex(){return me(this.tabs)}set selectedIndex(t){fo(this.tabs[t])}},io=!1,ao=class extends se{static get observedAttributes(){return["id",At,ue]}constructor(){super(),re(this,eo)}connectedCallback(){C(this,"role","tab"),C(this,"tabindex",this.selected?"0":"-1")}attributeChangedCallback(){if(!io&&this.selected&&this.tabList){io=!0;const t=this.tabList?uo(this.tabList):[],e=fe("tabpanel",this.tabsElement||this),o=lo(this,e[[...t].indexOf(this)]);o&&C(o,er,$n(this));let n=0;for(const i of t){const a=lo(i,e[n++]);C(i,"tabindex",i===this?"0":"-1"),C(i,At,`${i===this}`),a?.id&&C(i,ue,a.id),a&&(a.hidden=a!==o)}io=!1}}get tabsElement(){return co(this)}get tabList(){const t=this.parentElement;return t?.getAttribute("role")==="tablist"?t:null}get selected(){return C(this,At)==="true"}set selected(t){C(this,At,`${!!t}`)}get index(){const t=this.tabList;return t?[...uo(t)].indexOf(this):0}get panel(){return lo(this)}},so=!1,ro=class extends se{static get observedAttributes(){return["id","hidden"]}constructor(){super(),re(this,to)}connectedCallback(){var t,e;C(this,"role","tabpanel"),(e=(t=this.tabsElement)==null?void 0:t.tabList)==null||e.handleEvent(),this.attributeChangedCallback()}attributeChangedCallback(){if(so)return;so=!0;const t=dr(this.firstChild);this.hidden=me(this.tabs)===-1,C(this,"aria-hidden",`${this.hidden}`),C(this,"tabindex",this.hidden||t?null:"0"),so=!1}get tabsElement(){return co(this)}get tabs(){return Sn(this).querySelectorAll(`[role="tab"][${ue}="${this.id}"]`)}},fe=(t,e)=>e.querySelectorAll(`[role="${t}"]:not(:scope [role="tabpanel"] [role="${t}"])`),lo=(t,e)=>Sn(t).getElementById(C(t,ue)||$n(e)),me=t=>[...t].findIndex(e=>C(e,At)==="true"),co=t=>t.closest(`[${kn}]`),uo=t=>t.querySelectorAll(':scope > [role="tab"]'),fo=t=>t&&C(t,"aria-disabled")!=="true"&&C(t,"aria-selected","true"),dr=t=>t instanceof Element&&!t.matches(':disabled,[tabindex^="-"]')&&t.matches('[contenteditable],[controls],[href],[tabindex],input:not([type="hidden"]),select,textarea,button,summary,iframe');ce.define("u-tabs",oo),ce.define("u-tablist",no),ce.define("u-tab",ao),ce.define("u-tabpanel",ro);var An=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",Cn;An&&/^Mac/i.test(((Cn=navigator.userAgentData)==null?void 0:Cn.platform)||navigator.platform);var ur=":host(:not([hidden])) { display: block }",Ln=typeof HTMLElement>"u"?class{}:HTMLElement;function J(t,e,o){return o===void 0?t.getAttribute(e):(o===null?t.removeAttribute(e):t.getAttribute(e)!==o&&t.setAttribute(e,o),null)}var Mn=(t,e,o)=>{for(const n of o[0].split(","))o[0]=n,Element.prototype[`${t}EventListener`].apply(e,o)},Rn=(t,...e)=>Mn("add",t,e),In=(t,...e)=>Mn("remove",t,e),fr=t=>{var e;const o=t.key===" "||t.key==="Enter";return o&&((e=t.preventDefault)==null||e.call(t)),o&&t.target instanceof HTMLElement&&t.target.dispatchEvent(new MouseEvent("click",t)),o},mr=t=>{var e;const o=((e=t.getRootNode)==null?void 0:e.call(t))||t.ownerDocument;return o instanceof Document||o instanceof ShadowRoot?o:document},mo=(t,e,o)=>{const n=document.createElement(t);if(e&&(n[t==="style"?"textContent":"innerHTML"]=e),o)for(const[i,a]of Object.entries(o))J(n,i,a);return n},On={define:(t,e)=>!An||window.customElements.get(t)||window.customElements.define(t,e)},pr=`${ur}
|
|
10
|
-
::slotted([slot="summary"]) { cursor: pointer; display: block }
|
|
11
|
-
::slotted([slot="summary"])::before { content: ''; display: inline-block; vertical-align: middle; margin-inline: .05em .3125em; border-block: .3125em solid transparent; border-inline-start: .5em solid }
|
|
12
|
-
::slotted([slot="summary"][aria-expanded="true"])::before { rotate: 90deg }
|
|
13
|
-
:host > [part="details-content"]:not([hidden=""]) { display: block }`,hr=class extends Ln{constructor(){super(),this._content=null,this.shadowRoot||this.attachShadow({mode:"open"}).append(mo("slot",null,{name:"summary"}),mo("slot",null,{part:"details-content"}),mo("style",pr)),console.warn(`\x1B[1m<u-details> is deprecated as <details> now has sufficient screen reader support 🎉\x1B[0m
|
|
14
|
-
Please use <details> and <summary>, but import '@u-elements/u-details/polyfill' to polyfill support for Talkback screen reader when used with Firefox on Android.`,this)}static get observedAttributes(){return["open"]}connectedCallback(){var t;this._content=(t=this.shadowRoot)==null?void 0:t.children[1],J(this,"role","group"),Rn(this._content,"beforematch",this),Rn(this,"click,keydown",this),this.attributeChangedCallback()}disconnectedCallback(){this._content&&In(this._content,"beforematch",this),In(this,"click,keydown",this),this._content=null}attributeChangedCallback(t,e,o){const n="onbeforematch"in this?"until-found":!0,i=this.open;for(const a of this.children)a.nodeName==="U-SUMMARY"&&J(a,"aria-expanded",`${i}`);if(this._content&&(J(this._content,"aria-hidden",`${!i}`),J(this._content,"tabindex",i?null:"-1"),this._content.hidden=i?!1:n),i&&this.name){const a=mr(this).querySelectorAll(`${this.nodeName}[name="${this.name}"]`);for(const s of a)s!==this&&(s.open=!1)}t==="open"&&e===null!=(o===null)&&this.dispatchEvent(new Event("toggle"))}handleEvent(t){var e;const o=t.target instanceof Element&&((e=t.target.closest('[slot="summary"]'))==null?void 0:e.parentElement)===this;t.defaultPrevented||(t.type==="beforematch"&&(this.open=!0),o&&t.type==="keydown"&&fr(t),o&&t.type==="click"&&(this.open=!this.open))}get open(){return this.hasAttribute("open")}set open(t){J(this,"open",t?"":null)}get name(){return J(this,"name")||""}set name(t){J(this,"name",t)}},gr=class extends Ln{connectedCallback(){J(this,"role","button"),this.slot="summary",this.tabIndex=0}};On.define("u-details",hr),On.define("u-summary",gr);const B={passive:!0,capture:!0},Z=()=>typeof window<"u"&&typeof document<"u",br=()=>Z()&&/^Win/i.test(navigator.userAgentData?.platform||navigator.platform),pe=typeof HTMLElement>"u"?class{}:HTMLElement;function Ct(t,e){let o;return function(...n){clearTimeout(o),o=setTimeout(()=>t.apply(this,n),e)}}const ft=(t,...e)=>!Z()||window.dsWarnings===!1||console.warn(`Designsystemet: ${t}`,...e),x=(t,e,o)=>o===void 0?t.getAttribute(e)??null:(o===null?t.removeAttribute(e):t.getAttribute(e)!==o&&t.setAttribute(e,o),null),vr=/^["']|["']$/g,Pt=(t,e)=>{let o=x(t,e);return o||=getComputedStyle(t).getPropertyValue(`--_ds-${e}`).replace(vr,"").trim()||null,o||ft(`Missing ${e} on:`,t),o},I=(t,...e)=>{let[o,...n]=e;for(let i of o.split(" "))t.addEventListener(i,...n);return()=>po(t,...e)},po=(t,...e)=>{let[o,...n]=e;for(let i of o.split(" "))t.removeEventListener(i,...n)},at=(t,e)=>{Z()&&(window._dsHotReloadCleanup||(window._dsHotReloadCleanup=new Map),window._dsHotReloadCleanup?.get(t)?.map(o=>o()),window._dsHotReloadCleanup?.set(t,e()))};let ho=!1;const mt=(t,e,o)=>{let n=0,i=()=>{if(!t.isConnected)return a();e(s),s.takeRecords(),n=0},a=()=>s?.disconnect?.(),s=new MutationObserver(()=>{!ho&&!n&&(n=requestAnimationFrame(i))});return s.observe(t,o),requestAnimationFrame(i),a},go=(t,e)=>{ho=!0,t.textContent=e,requestAnimationFrame(wr)},wr=()=>{ho=!1},Dn=(t,e)=>{let o=document.createElement(t);if(e)for(let[n,i]of Object.entries(e))x(o,n,i);return o},tt={define:(t,e)=>!Z()||window.customElements.get(t)||window.customElements.define(t,e)};let yr=0;function pt(t){return Z()?(window.dsUseId||(window.dsUseId=0),t&&!t.id&&(t.id=`:ds:${++window.dsUseId}`),t?.id||""):`:ds:${++yr}`}let j,_r=0,Pn=0;const bo=t=>{clearTimeout(Pn),j&&go(j,`${t}${_r++%2?" ":""}`),t&&(Pn=setTimeout(bo,2e3,""))},xr=()=>{document.readyState==="complete"&&(j||(j=Dn("div",{"aria-live":"assertive"}),j.style.overflow="hidden",j.style.position="fixed",j.style.whiteSpace="nowrap",j.style.width="1px"),j.isConnected||document.body.appendChild(j))};at("announce",()=>[I(document,"focus mouseover",xr,B)]);const Hn=":click-delegate-hover",Nn="data-clickdelegatefor",Er=`[${Nn}]`,Sr=t=>{let e=t.button===1||t.metaKey||t.ctrlKey,o=t.isTrusted&&t.button<2&&qn(t);if(!(!o||o.contains(t.target))){if(e&&o instanceof HTMLAnchorElement)return window.open(o.href,void 0,o.rel);t.stopImmediatePropagation(),o.click()}};let he;const $r=t=>{let e=qn(t);he!==e&&(he&&he.classList.remove(Hn),e&&e.classList.add(Hn),he=e)},qn=({target:t})=>{let e=(t instanceof Element?t.closest(Er):null)?.getAttribute(Nn),o=e&&document.getElementById(e)||void 0,n=o&&t.closest('a,button,label,input,select,textarea,details,dialog,[role="button"],[popover],[contenteditable]');return(!n||n===o)&&!o?.disabled?o:void 0};at("clickdelegatefor",()=>[I(window,"click auxclick",Sr,!0),I(document,"mouseover",$r,B)]);let vo=!1;const Tr=({type:t,target:e,clientX:o=0,clientY:n=0})=>{if(t==="pointerdown"){let i=e?.closest?.("dialog")?.getBoundingClientRect();vo=!!(i&&i.top<=n&&n<=i.bottom&&i.left<=o&&o<=i.right)}else{let i=e instanceof HTMLDialogElement&&!vo&&x(e,"closedby")==="any";vo=!1,i&&requestAnimationFrame(()=>e.open&&e.close())}},kr=()=>{for(let t of document.querySelectorAll('button[command="show-modal"]'))x(t,"aria-haspopup","dialog")},Ar=({command:t,target:e})=>t==="--show-non-modal"&&e instanceof HTMLDialogElement&&e.show();at("dialog",()=>[I(document,"command",Ar,B),I(document,"pointerdown pointerup",Tr,B),mt(document,kr,{attributeFilter:["command"],attributes:!0,childList:!0,subtree:!0})]);const Lt=Math.min,N=Math.max,ge=Math.round,be=Math.floor,K=t=>({x:t,y:t}),Cr={left:"right",right:"left",bottom:"top",top:"bottom"};function Bn(t,e,o){return N(t,Lt(e,o))}function ht(t,e){return typeof t=="function"?t(e):t}function et(t){return t.split("-")[0]}function Ht(t){return t.split("-")[1]}function wo(t){return t==="x"?"y":"x"}function Un(t){return t==="y"?"height":"width"}function Y(t){const e=t[0];return e==="t"||e==="b"?"y":"x"}function Fn(t){return wo(Y(t))}function Lr(t,e,o){o===void 0&&(o=!1);const n=Ht(t),i=Fn(t),a=Un(i);let s=i==="x"?n===(o?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[a]>e.floating[a]&&(s=ve(s)),[s,ve(s)]}function Mr(t){const e=ve(t);return[yo(t),e,yo(e)]}function yo(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const Wn=["left","right"],Gn=["right","left"],Rr=["top","bottom"],Ir=["bottom","top"];function Or(t,e,o){switch(t){case"top":case"bottom":return o?e?Gn:Wn:e?Wn:Gn;case"left":case"right":return e?Rr:Ir;default:return[]}}function Dr(t,e,o,n){const i=Ht(t);let a=Or(et(t),o==="start",n);return i&&(a=a.map(s=>s+"-"+i),e&&(a=a.concat(a.map(yo)))),a}function ve(t){const e=et(t);return Cr[e]+t.slice(e.length)}function Pr(t){return{top:0,right:0,bottom:0,left:0,...t}}function Hr(t){return typeof t!="number"?Pr(t):{top:t,right:t,bottom:t,left:t}}function we(t){const{x:e,y:o,width:n,height:i}=t;return{width:n,height:i,top:o,left:e,right:e+n,bottom:o+i,x:e,y:o}}function Vn(t,e,o){let{reference:n,floating:i}=t;const a=Y(e),s=Fn(e),r=Un(s),c=et(e),l=a==="y",d=n.x+n.width/2-i.width/2,u=n.y+n.height/2-i.height/2,m=n[r]/2-i[r]/2;let p;switch(c){case"top":p={x:d,y:n.y-i.height};break;case"bottom":p={x:d,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:u};break;case"left":p={x:n.x-i.width,y:u};break;default:p={x:n.x,y:n.y}}switch(Ht(e)){case"start":p[s]-=m*(o&&l?-1:1);break;case"end":p[s]+=m*(o&&l?-1:1);break}return p}async function Nr(t,e){var o;e===void 0&&(e={});const{x:n,y:i,platform:a,rects:s,elements:r,strategy:c}=t,{boundary:l="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:m=!1,padding:p=0}=ht(e,t),v=Hr(p),g=r[m?u==="floating"?"reference":"floating":u],h=we(await a.getClippingRect({element:(o=await(a.isElement==null?void 0:a.isElement(g)))==null||o?g:g.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(r.floating)),boundary:l,rootBoundary:d,strategy:c})),w=u==="floating"?{x:n,y:i,width:s.floating.width,height:s.floating.height}:s.reference,_=await(a.getOffsetParent==null?void 0:a.getOffsetParent(r.floating)),y=await(a.isElement==null?void 0:a.isElement(_))?await(a.getScale==null?void 0:a.getScale(_))||{x:1,y:1}:{x:1,y:1},T=we(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:r,rect:w,offsetParent:_,strategy:c}):w);return{top:(h.top-T.top+v.top)/y.y,bottom:(T.bottom-h.bottom+v.bottom)/y.y,left:(h.left-T.left+v.left)/y.x,right:(T.right-h.right+v.right)/y.x}}const qr=50,Br=async(t,e,o)=>{const{placement:n="bottom",strategy:i="absolute",middleware:a=[],platform:s}=o,r=s.detectOverflow?s:{...s,detectOverflow:Nr},c=await(s.isRTL==null?void 0:s.isRTL(e));let l=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:d,y:u}=Vn(l,n,c),m=n,p=0;const v={};for(let f=0;f<a.length;f++){const g=a[f];if(!g)continue;const{name:h,fn:w}=g,{x:_,y,data:T,reset:S}=await w({x:d,y:u,initialPlacement:n,placement:m,strategy:i,middlewareData:v,rects:l,platform:r,elements:{reference:t,floating:e}});d=_??d,u=y??u,v[h]={...v[h],...T},S&&p<qr&&(p++,typeof S=="object"&&(S.placement&&(m=S.placement),S.rects&&(l=S.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:i}):S.rects),{x:d,y:u}=Vn(l,m,c)),f=-1)}return{x:d,y:u,placement:m,strategy:i,middlewareData:v}},Ur=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var o,n;const{placement:i,middlewareData:a,rects:s,initialPlacement:r,platform:c,elements:l}=e,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:m,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:f=!0,...g}=ht(t,e);if((o=a.arrow)!=null&&o.alignmentOffset)return{};const h=et(i),w=Y(r),_=et(r)===r,y=await(c.isRTL==null?void 0:c.isRTL(l.floating)),T=m||(_||!f?[ve(r)]:Mr(r)),S=v!=="none";!m&&S&&T.push(...Dr(r,f,v,y));const R=[r,...T],F=await c.detectOverflow(e,g),Et=[];let it=((n=a.flip)==null?void 0:n.overflows)||[];if(d&&Et.push(F[h]),u){const St=Lr(i,s,y);Et.push(F[St[0]],F[St[1]])}if(it=[...it,{placement:i,overflows:Et}],!Et.every(St=>St<=0)){var jt,Kt;const St=(((jt=a.flip)==null?void 0:jt.index)||0)+1,sn=R[St];if(sn&&(!(u==="alignment"?w!==Y(sn):!1)||it.every(X=>Y(X.placement)===w?X.overflows[0]>0:!0)))return{data:{index:St,overflows:it},reset:{placement:sn}};let Qt=(Kt=it.filter($t=>$t.overflows[0]<=0).sort(($t,X)=>$t.overflows[1]-X.overflows[1])[0])==null?void 0:Kt.placement;if(!Qt)switch(p){case"bestFit":{var Yt;const $t=(Yt=it.filter(X=>{if(S){const ct=Y(X.placement);return ct===w||ct==="y"}return!0}).map(X=>[X.placement,X.overflows.filter(ct=>ct>0).reduce((ct,lu)=>ct+lu,0)]).sort((X,ct)=>X[1]-ct[1])[0])==null?void 0:Yt[0];$t&&(Qt=$t);break}case"initialPlacement":Qt=r;break}if(i!==Qt)return{reset:{placement:Qt}}}return{}}}},zn=new Set(["left","top"]);async function Fr(t,e){const{placement:o,platform:n,elements:i}=t,a=await(n.isRTL==null?void 0:n.isRTL(i.floating)),s=et(o),r=Ht(o),c=Y(o)==="y",l=zn.has(s)?-1:1,d=a&&c?-1:1,u=ht(e,t);let{mainAxis:m,crossAxis:p,alignmentAxis:v}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return r&&typeof v=="number"&&(p=r==="end"?v*-1:v),c?{x:p*d,y:m*l}:{x:m*l,y:p*d}}const Wr=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var o,n;const{x:i,y:a,placement:s,middlewareData:r}=e,c=await Fr(e,t);return s===((o=r.offset)==null?void 0:o.placement)&&(n=r.arrow)!=null&&n.alignmentOffset?{}:{x:i+c.x,y:a+c.y,data:{...c,placement:s}}}}},Gr=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:o,y:n,placement:i,platform:a}=e,{mainAxis:s=!0,crossAxis:r=!1,limiter:c={fn:h=>{let{x:w,y:_}=h;return{x:w,y:_}}},...l}=ht(t,e),d={x:o,y:n},u=await a.detectOverflow(e,l),m=Y(et(i)),p=wo(m);let v=d[p],f=d[m];if(s){const h=p==="y"?"top":"left",w=p==="y"?"bottom":"right",_=v+u[h],y=v-u[w];v=Bn(_,v,y)}if(r){const h=m==="y"?"top":"left",w=m==="y"?"bottom":"right",_=f+u[h],y=f-u[w];f=Bn(_,f,y)}const g=c.fn({...e,[p]:v,[m]:f});return{...g,data:{x:g.x-o,y:g.y-n,enabled:{[p]:s,[m]:r}}}}}},Vr=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:o,y:n,placement:i,rects:a,middlewareData:s}=e,{offset:r=0,mainAxis:c=!0,crossAxis:l=!0}=ht(t,e),d={x:o,y:n},u=Y(i),m=wo(u);let p=d[m],v=d[u];const f=ht(r,e),g=typeof f=="number"?{mainAxis:f,crossAxis:0}:{mainAxis:0,crossAxis:0,...f};if(c){const _=m==="y"?"height":"width",y=a.reference[m]-a.floating[_]+g.mainAxis,T=a.reference[m]+a.reference[_]-g.mainAxis;p<y?p=y:p>T&&(p=T)}if(l){var h,w;const _=m==="y"?"width":"height",y=zn.has(et(i)),T=a.reference[u]-a.floating[_]+(y&&((h=s.offset)==null?void 0:h[u])||0)+(y?0:g.crossAxis),S=a.reference[u]+a.reference[_]+(y?0:((w=s.offset)==null?void 0:w[u])||0)-(y?g.crossAxis:0);v<T?v=T:v>S&&(v=S)}return{[m]:p,[u]:v}}}},zr=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var o,n;const{placement:i,rects:a,platform:s,elements:r}=e,{apply:c=()=>{},...l}=ht(t,e),d=await s.detectOverflow(e,l),u=et(i),m=Ht(i),p=Y(i)==="y",{width:v,height:f}=a.floating;let g,h;u==="top"||u==="bottom"?(g=u,h=m===(await(s.isRTL==null?void 0:s.isRTL(r.floating))?"start":"end")?"left":"right"):(h=u,g=m==="end"?"top":"bottom");const w=f-d.top-d.bottom,_=v-d.left-d.right,y=Lt(f-d[g],w),T=Lt(v-d[h],_),S=!e.middlewareData.shift;let R=y,F=T;if((o=e.middlewareData.shift)!=null&&o.enabled.x&&(F=_),(n=e.middlewareData.shift)!=null&&n.enabled.y&&(R=w),S&&!m){const it=N(d.left,0),jt=N(d.right,0),Kt=N(d.top,0),Yt=N(d.bottom,0);p?F=v-2*(it!==0||jt!==0?it+jt:N(d.left,d.right)):R=f-2*(Kt!==0||Yt!==0?Kt+Yt:N(d.top,d.bottom))}await c({...e,availableWidth:F,availableHeight:R});const Et=await s.getDimensions(r.floating);return v!==Et.width||f!==Et.height?{reset:{rects:!0}}:{}}}};function ye(){return typeof window<"u"}function Mt(t){return Xn(t)?(t.nodeName||"").toLowerCase():"#document"}function q(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Q(t){var e;return(e=(Xn(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Xn(t){return ye()?t instanceof Node||t instanceof q(t).Node:!1}function W(t){return ye()?t instanceof Element||t instanceof q(t).Element:!1}function ot(t){return ye()?t instanceof HTMLElement||t instanceof q(t).HTMLElement:!1}function jn(t){return!ye()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof q(t).ShadowRoot}function Nt(t){const{overflow:e,overflowX:o,overflowY:n,display:i}=G(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+o)&&i!=="inline"&&i!=="contents"}function Xr(t){return/^(table|td|th)$/.test(Mt(t))}function _e(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const jr=/transform|translate|scale|rotate|perspective|filter/,Kr=/paint|layout|strict|content/,gt=t=>!!t&&t!=="none";let _o;function xo(t){const e=W(t)?G(t):t;return gt(e.transform)||gt(e.translate)||gt(e.scale)||gt(e.rotate)||gt(e.perspective)||!Eo()&&(gt(e.backdropFilter)||gt(e.filter))||jr.test(e.willChange||"")||Kr.test(e.contain||"")}function Yr(t){let e=st(t);for(;ot(e)&&!Rt(e);){if(xo(e))return e;if(_e(e))return null;e=st(e)}return null}function Eo(){return _o==null&&(_o=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),_o}function Rt(t){return/^(html|body|#document)$/.test(Mt(t))}function G(t){return q(t).getComputedStyle(t)}function xe(t){return W(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function st(t){if(Mt(t)==="html")return t;const e=t.assignedSlot||t.parentNode||jn(t)&&t.host||Q(t);return jn(e)?e.host:e}function Kn(t){const e=st(t);return Rt(e)?t.ownerDocument?t.ownerDocument.body:t.body:ot(e)&&Nt(e)?e:Kn(e)}function qt(t,e,o){var n;e===void 0&&(e=[]),o===void 0&&(o=!0);const i=Kn(t),a=i===((n=t.ownerDocument)==null?void 0:n.body),s=q(i);if(a){const r=So(s);return e.concat(s,s.visualViewport||[],Nt(i)?i:[],r&&o?qt(r):[])}else return e.concat(i,qt(i,[],o))}function So(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Yn(t){const e=G(t);let o=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const i=ot(t),a=i?t.offsetWidth:o,s=i?t.offsetHeight:n,r=ge(o)!==a||ge(n)!==s;return r&&(o=a,n=s),{width:o,height:n,$:r}}function $o(t){return W(t)?t:t.contextElement}function It(t){const e=$o(t);if(!ot(e))return K(1);const o=e.getBoundingClientRect(),{width:n,height:i,$:a}=Yn(e);let s=(a?ge(o.width):o.width)/n,r=(a?ge(o.height):o.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!r||!Number.isFinite(r))&&(r=1),{x:s,y:r}}const Qr=K(0);function Qn(t){const e=q(t);return!Eo()||!e.visualViewport?Qr:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Jr(t,e,o){return e===void 0&&(e=!1),!o||e&&o!==q(t)?!1:e}function bt(t,e,o,n){e===void 0&&(e=!1),o===void 0&&(o=!1);const i=t.getBoundingClientRect(),a=$o(t);let s=K(1);e&&(n?W(n)&&(s=It(n)):s=It(t));const r=Jr(a,o,n)?Qn(a):K(0);let c=(i.left+r.x)/s.x,l=(i.top+r.y)/s.y,d=i.width/s.x,u=i.height/s.y;if(a){const m=q(a),p=n&&W(n)?q(n):n;let v=m,f=So(v);for(;f&&n&&p!==v;){const g=It(f),h=f.getBoundingClientRect(),w=G(f),_=h.left+(f.clientLeft+parseFloat(w.paddingLeft))*g.x,y=h.top+(f.clientTop+parseFloat(w.paddingTop))*g.y;c*=g.x,l*=g.y,d*=g.x,u*=g.y,c+=_,l+=y,v=q(f),f=So(v)}}return we({width:d,height:u,x:c,y:l})}function Ee(t,e){const o=xe(t).scrollLeft;return e?e.left+o:bt(Q(t)).left+o}function Jn(t,e){const o=t.getBoundingClientRect(),n=o.left+e.scrollLeft-Ee(t,o),i=o.top+e.scrollTop;return{x:n,y:i}}function Zr(t){let{elements:e,rect:o,offsetParent:n,strategy:i}=t;const a=i==="fixed",s=Q(n),r=e?_e(e.floating):!1;if(n===s||r&&a)return o;let c={scrollLeft:0,scrollTop:0},l=K(1);const d=K(0),u=ot(n);if((u||!u&&!a)&&((Mt(n)!=="body"||Nt(s))&&(c=xe(n)),u)){const p=bt(n);l=It(n),d.x=p.x+n.clientLeft,d.y=p.y+n.clientTop}const m=s&&!u&&!a?Jn(s,c):K(0);return{width:o.width*l.x,height:o.height*l.y,x:o.x*l.x-c.scrollLeft*l.x+d.x+m.x,y:o.y*l.y-c.scrollTop*l.y+d.y+m.y}}function tl(t){return Array.from(t.getClientRects())}function el(t){const e=Q(t),o=xe(t),n=t.ownerDocument.body,i=N(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),a=N(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let s=-o.scrollLeft+Ee(t);const r=-o.scrollTop;return G(n).direction==="rtl"&&(s+=N(e.clientWidth,n.clientWidth)-i),{width:i,height:a,x:s,y:r}}const Zn=25;function ol(t,e){const o=q(t),n=Q(t),i=o.visualViewport;let a=n.clientWidth,s=n.clientHeight,r=0,c=0;if(i){a=i.width,s=i.height;const d=Eo();(!d||d&&e==="fixed")&&(r=i.offsetLeft,c=i.offsetTop)}const l=Ee(n);if(l<=0){const d=n.ownerDocument,u=d.body,m=getComputedStyle(u),p=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,v=Math.abs(n.clientWidth-u.clientWidth-p);v<=Zn&&(a-=v)}else l<=Zn&&(a+=l);return{width:a,height:s,x:r,y:c}}function nl(t,e){const o=bt(t,!0,e==="fixed"),n=o.top+t.clientTop,i=o.left+t.clientLeft,a=ot(t)?It(t):K(1),s=t.clientWidth*a.x,r=t.clientHeight*a.y,c=i*a.x,l=n*a.y;return{width:s,height:r,x:c,y:l}}function ti(t,e,o){let n;if(e==="viewport")n=ol(t,o);else if(e==="document")n=el(Q(t));else if(W(e))n=nl(e,o);else{const i=Qn(t);n={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return we(n)}function ei(t,e){const o=st(t);return o===e||!W(o)||Rt(o)?!1:G(o).position==="fixed"||ei(o,e)}function il(t,e){const o=e.get(t);if(o)return o;let n=qt(t,[],!1).filter(r=>W(r)&&Mt(r)!=="body"),i=null;const a=G(t).position==="fixed";let s=a?st(t):t;for(;W(s)&&!Rt(s);){const r=G(s),c=xo(s);!c&&r.position==="fixed"&&(i=null),(a?!c&&!i:!c&&r.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||Nt(s)&&!c&&ei(t,s))?n=n.filter(d=>d!==s):i=r,s=st(s)}return e.set(t,n),n}function al(t){let{element:e,boundary:o,rootBoundary:n,strategy:i}=t;const s=[...o==="clippingAncestors"?_e(e)?[]:il(e,this._c):[].concat(o),n],r=ti(e,s[0],i);let c=r.top,l=r.right,d=r.bottom,u=r.left;for(let m=1;m<s.length;m++){const p=ti(e,s[m],i);c=N(p.top,c),l=Lt(p.right,l),d=Lt(p.bottom,d),u=N(p.left,u)}return{width:l-u,height:d-c,x:u,y:c}}function sl(t){const{width:e,height:o}=Yn(t);return{width:e,height:o}}function rl(t,e,o){const n=ot(e),i=Q(e),a=o==="fixed",s=bt(t,!0,a,e);let r={scrollLeft:0,scrollTop:0};const c=K(0);function l(){c.x=Ee(i)}if(n||!n&&!a)if((Mt(e)!=="body"||Nt(i))&&(r=xe(e)),n){const p=bt(e,!0,a,e);c.x=p.x+e.clientLeft,c.y=p.y+e.clientTop}else i&&l();a&&!n&&i&&l();const d=i&&!n&&!a?Jn(i,r):K(0),u=s.left+r.scrollLeft-c.x-d.x,m=s.top+r.scrollTop-c.y-d.y;return{x:u,y:m,width:s.width,height:s.height}}function To(t){return G(t).position==="static"}function oi(t,e){if(!ot(t)||G(t).position==="fixed")return null;if(e)return e(t);let o=t.offsetParent;return Q(t)===o&&(o=o.ownerDocument.body),o}function ni(t,e){const o=q(t);if(_e(t))return o;if(!ot(t)){let i=st(t);for(;i&&!Rt(i);){if(W(i)&&!To(i))return i;i=st(i)}return o}let n=oi(t,e);for(;n&&Xr(n)&&To(n);)n=oi(n,e);return n&&Rt(n)&&To(n)&&!xo(n)?o:n||Yr(t)||o}const ll=async function(t){const e=this.getOffsetParent||ni,o=this.getDimensions,n=await o(t.floating);return{reference:rl(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function cl(t){return G(t).direction==="rtl"}const dl={convertOffsetParentRelativeRectToViewportRelativeRect:Zr,getDocumentElement:Q,getClippingRect:al,getOffsetParent:ni,getElementRects:ll,getClientRects:tl,getDimensions:sl,getScale:It,isElement:W,isRTL:cl};function ii(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function ul(t,e){let o=null,n;const i=Q(t);function a(){var r;clearTimeout(n),(r=o)==null||r.disconnect(),o=null}function s(r,c){r===void 0&&(r=!1),c===void 0&&(c=1),a();const l=t.getBoundingClientRect(),{left:d,top:u,width:m,height:p}=l;if(r||e(),!m||!p)return;const v=be(u),f=be(i.clientWidth-(d+m)),g=be(i.clientHeight-(u+p)),h=be(d),_={rootMargin:-v+"px "+-f+"px "+-g+"px "+-h+"px",threshold:N(0,Lt(1,c))||1};let y=!0;function T(S){const R=S[0].intersectionRatio;if(R!==c){if(!y)return s();R?s(!1,R):n=setTimeout(()=>{s(!1,1e-7)},1e3)}R===1&&!ii(l,t.getBoundingClientRect())&&s(),y=!1}try{o=new IntersectionObserver(T,{..._,root:i.ownerDocument})}catch{o=new IntersectionObserver(T,_)}o.observe(t)}return s(!0),a}function fl(t,e,o,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:r=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,l=$o(t),d=i||a?[...l?qt(l):[],...e?qt(e):[]]:[];d.forEach(h=>{i&&h.addEventListener("scroll",o,{passive:!0}),a&&h.addEventListener("resize",o)});const u=l&&r?ul(l,o):null;let m=-1,p=null;s&&(p=new ResizeObserver(h=>{let[w]=h;w&&w.target===l&&p&&e&&(p.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var _;(_=p)==null||_.observe(e)})),o()}),l&&!c&&p.observe(l),e&&p.observe(e));let v,f=c?bt(t):null;c&&g();function g(){const h=bt(t);f&&!ii(f,h)&&o(),f=h,v=requestAnimationFrame(g)}return o(),()=>{var h;d.forEach(w=>{i&&w.removeEventListener("scroll",o),a&&w.removeEventListener("resize",o)}),u?.(),(h=p)==null||h.disconnect(),p=null,c&&cancelAnimationFrame(v)}}const ml=Wr,pl=Gr,hl=Ur,gl=zr,bl=Vr,vl=(t,e,o)=>{const n=new Map,i={platform:dl,...o},a={...i.platform,_c:n};return Br(t,e,{...i,platform:a})},ai="data-placement",si="data-autoplacement",Bt=new Map;function wl(t){let{newState:e,oldState:o,target:n,source:i=t.detail}=t,a=n instanceof HTMLElement&&x(n,"popover")!==null&&ri(n,"--_ds-floating");if(!a)return;if(e==="closed")return Bt.get(n)?.();if(!i){let v=n.getRootNode(),f=`[popovertarget="${n.id}"],[commandfor="${n.id}"]`;i=n.id&&v?.querySelector?.(f)||void 0}if(!i||i===n||o&&o===e)return;let s=ri(n,"--_ds-floating-overscroll"),r=x(n,ai)||x(i,ai)||a,c=x(n,si)||x(i,si),l=parseFloat(getComputedStyle(n,"::before").height)||0,d=r.match(/left|right/gi)?"Height":"Width",u=i[`offset${d}`]/2+l;if(r==="none")return;let m={strategy:"absolute",placement:r,middleware:[ml(l||0),pl({padding:10,limiter:bl({offset:{mainAxis:u}})}),_l(),...c==="false"?[]:[hl({padding:10,crossAxis:!1})],...s?[gl({apply({availableHeight:v}){s==="fit"&&(n.style.width=`${i.clientWidth}px`),n.style.maxHeight=`${Math.max(50,v-20)}px`}})]:[]]},p=fl(i,n,async()=>{if(!i?.isConnected)return Bt.get(n)?.();let{x:v,y:f}=await vl(i,n,m);n.style.translate=`${v}px ${f}px`});Bt.set(n,()=>Bt.delete(n)&&p())}let Se;const yl=({type:t})=>{if(t==="mousedown"&&(Se=!1),t==="scroll"&&Se===!1&&(Se=!0),t==="mouseup"&&Se)for(let[e]of Bt)e.showPopover()};at("popover",()=>[I(document,"mousedown scroll mouseup",yl,!0),I(document,"toggle ds-toggle-source",wl,B)]);const ri=(t,e)=>getComputedStyle(t).getPropertyValue(e).trim(),_l=()=>({name:"arrowPseudo",fn(t){let e=t.elements.floating,o=t.rects.reference,n=`${Math.round(o.width/2+o.x-t.x)}px`,i=`${Math.round(o.height/2+o.y-t.y)}px`;return e.style.setProperty("--_ds-floating-arrow-x",n),e.style.setProperty("--_ds-floating-arrow-y",i),x(e,"data-floating",t.placement),t}}),ko=t=>(t instanceof HTMLSelectElement||t instanceof HTMLInputElement)&&(t.hasAttribute("readonly")||x(t,"aria-readonly")==="true"),xl=t=>{if(t.key!=="Tab"&&ko(t.target)&&(t.preventDefault(),t.key?.startsWith("Arrow")&&x(t.target,"type")==="radio")){let e=document.querySelectorAll(`input[name="${t.target.name}"]`),o=t.key?.match(/Arrow(Right|Down)/)?1:-1;e[(e.length+[...e].indexOf(t.target)+o)%e.length]?.focus()}},El=t=>{let e=t.target?.closest?.("label")?.control||t.target;ko(e)&&(t.preventDefault(),e.focus())},Sl=t=>{t.target instanceof HTMLSelectElement&&ko(t.target)&&t.preventDefault()};at("readonly",()=>[I(document,"keydown",xl),I(document,"click",El),I(document,"mousedown",Sl)]);const Ao="data-toggle-group",li=`[${Ao}]`,$l=Ct(()=>{for(let t of document.querySelectorAll(li))x(t,"aria-label",Pt(t,Ao))},0),Tl=t=>{let e=t.target instanceof HTMLInputElement&&t.target.closest(li);if(e&&(t.key==="Enter"&&t.target.click(),t.key?.startsWith("Arrow"))){t.preventDefault?.();let o=[...e.getElementsByTagName("input")],n=o.indexOf(t.target),i=t.key.match(/Arrow(Right|Down)/)?1:-1,a=n;for(let s=0;s<o.length;s++)if(a=(o.length+a+i)%o.length,!o[a]?.disabled){o[a]?.focus();break}}};at("toggle-group",()=>[I(document,"keydown",Tl),mt(document,$l,{attributeFilter:[Ao],attributes:!0,childList:!0,subtree:!0})]);let L,Ut,ci=0,di=0;const kl=Z()&&/iPad|iPhone|iPod/.test(navigator.userAgent),vt="data-tooltip",Co="data-color",ui="aria-label",fi="aria-description",Al=`[${Co}]`,Cl=`[${vt}]`,Lo="data-color-scheme",Ll=`[${Lo}]`,mi=t=>{t&&!(t instanceof HTMLElement)&&ft("setTooltipElement expects an HTMLElement, got: ",t),L=t||void 0},Ml=Ct(()=>{for(let t of document.querySelectorAll(Cl)){let e=t.getAttribute(ui)||t.getAttribute(fi),o=t.getAttribute(vt)||Pt(t,vt);if(e!==o){let a=x(t,"role")!=="img"&&t.textContent?.trim();x(t,vt,o),x(t,ui,a?null:o),x(t,fi,a?o:null),t.matches("a,button,input,label,select,textarea,[tabindex]")||ft('Missing tabindex="0" attribute on: ',t)}let n=t===Ut&&L?.matches(":popover-open"),i=n&&o&&L?.textContent!==o;n&&i&&(L&&go(L,o),document.activeElement===t&&bo(o))}},0),pi=({type:t,target:e})=>{if(clearTimeout(ci),e===L)return;if(t==="mouseover"&&!Ut&&!kl){ci=setTimeout(pi,300,{target:e});return}let o=e?.closest?.(`[${vt}]`);if(o===Ut)return;if(!o)return hi();L||=Dn("div",{class:"ds-tooltip"}),L.isConnected||document.body.appendChild(L);let n=o.closest(Al),i=o.closest(Ll),a=n!==i&&n?.contains(i);clearTimeout(di),x(L,"popover","manual"),x(L,Lo,i?.getAttribute(Lo)||null),x(L,Co,a&&n?.getAttribute(Co)||null),go(L,x(o,vt)),L.showPopover(),L.dispatchEvent(new CustomEvent("ds-toggle-source",{detail:o})),Ut=o},hi=()=>L?.isConnected&&L.popover&&L.hidePopover(),gi=t=>{if(t?.type==="keydown")return t?.key==="Escape"&&hi();t?t.target===L&&t.newState==="closed"&&(di=setTimeout(gi,300)):Ut=void 0};at("tooltip",()=>[I(document,"blur focus mouseover",pi,B),I(document,"toggle keydown",gi,B),mt(document,Ml,{attributeFilter:[vt],attributes:!0,childList:!0,subtree:!0})]);const Mo="aria-label";var bi=class extends pe{_items;_label=null;_render;_unresize;_unmutate;static get observedAttributes(){return[Mo]}connectedCallback(){this._label=Pt(this,Mo),this._items=this.getElementsByTagName("a"),this._render=Ct(()=>Rl(this),100),this._unresize=I(window,"resize",this._render),this._unmutate=mt(this,this._render,{childList:!0,subtree:!0})}attributeChangedCallback(e,o,n){n&&(this._label=n),this._render?.()}disconnectedCallback(){this._unresize?.(),this._unmutate?.(),this._unresize=this._unmutate=this._render=this._items=void 0}};const Rl=t=>{let e=t._items?.[t._items.length-1],o=e?.parentElement===t?null:e,n=!o?.offsetHeight;x(t,"role",n?null:"navigation"),x(t,Mo,n?null:t._label);for(let i of t._items||[])x(i,"aria-current",i===o?"page":null)};tt.define("ds-breadcrumbs",bi);var vi=class extends pe{connectedCallback(){I(this,"animationend",this,B),requestAnimationFrame(()=>this.handleEvent({target:this}))}handleEvent({target:e}){if(e!==this)return;let o=this.querySelector("h2,h3,h4,h5,h6");o&&x(this,"aria-labelledby",pt(o)),x(this,"tabindex","-1"),this.focus()}disconnectedCallback(){po(this,"animationend",this,B)}};tt.define("ds-error-summary",vi);const wi="data-indeterminate",Ro=new Set,yi=new WeakMap,Il=Z()?document.getElementsByTagName("fieldset"):[],Ol=Z()&&CSS.supports("field-sizing","content"),Dl=br()?800:200,_i=new WeakSet,xi=Ct(()=>{for(let t of Il)x(t,"aria-labelledby",`${pt(t.querySelector("legend"))} ${pt(t.querySelector(':scope > :is([data-field="description"],legend + p)'))}`.trim()||null);for(let t of Ro){let e=[],o=[],n,i,a=!1,s=!1;for(let r of t.getElementsByTagName("*"))if(r instanceof HTMLLabelElement&&o.push(r),!r.hidden)if(Hl(r))n?ft("Fields should only have one input element. Use <fieldset> to group multiple fields:",t):n=r;else{let c=r.getAttribute("data-field");c==="counter"&&(i=r),c==="validation"?(e.unshift(r),a=!0,s||=Si(r)):c&&e.push(r)}if(!n)ft("Field is missing input element:",t);else{i&&yi.set(n,i);for(let d of o)x(d,"for",pt(n));let r=n.type==="radio"||n.type==="checkbox",c=t.closest("fieldset")?.querySelector(':scope > [data-field="validation"]');c&&!c?.hidden&&(a=!0,s||=Si(c),e.unshift(c));let l=x(n,wi);l&&(n.indeterminate=l==="true"),x(t,"data-clickdelegatefor",r?pt(n):null),x(n,"aria-describedby",e.map(pt).join(" ")||null),(a||_i.has(n))&&(_i[a?"add":"delete"](n),x(n,"aria-invalid",`${s}`)),Ei(n)}}},0),Ei=t=>{let e=t.target||t,o=yi.get(e);if(o?.isConnected){let n=(Number(x(o,"data-limit"))||0)-e.value.length,i=n<0?"over":"under",a=Pt(o,`data-${i}`)?.replace("%d",`${Math.abs(n)}`);x(o,"data-label",a),x(o,"data-state",i),x(o,"data-color",n<0?"danger":null),t.type==="input"&&a&&Pl(e,a)}!Ol&&e instanceof HTMLTextAreaElement&&(e.style.setProperty("--_ds-field-sizing","auto"),e.style.setProperty("--_ds-field-sizing",`${e.scrollHeight}px`))},Pl=Ct((t,e)=>{document.activeElement===t&&bo(e)},Dl),Si=t=>t.getAttribute("data-color")!=="success",Hl=t=>t instanceof HTMLElement&&"validity"in t&&!(t instanceof HTMLButtonElement)&&t.type!=="hidden";var $e=class extends pe{connectedCallback(){Ro.add(this),xi()}disconnectedCallback(){Ro.delete(this)}};tt.define("ds-field",$e),at("field",()=>[I(document,"input",Ei,B),mt(document,xi,{attributeFilter:["data-field","data-limit","hidden","value",wi],attributes:!0,childList:!0,subtree:!0})]);const Io="aria-label",Te="data-current",ke="data-total",$i="data-href",Ti=({current:t=1,total:e=10,show:o=7})=>({prev:t>1?t-1:0,next:t<e?t+1:0,pages:ql(t,e,o).map((n,i)=>({current:n===t&&"page",key:`key-${n}-${i}`,page:n}))});var ki=class extends pe{_unmutate;_render;static get observedAttributes(){return[Io,Te,ke,$i]}connectedCallback(){let t=x(this,ke),e=x(this,Te);e&&!t&&ft(`Missing ${ke} attribute on:`,this),t&&!e&&ft(`Missing ${Te} attribute on:`,this),x(this,Io,Pt(this,Io)),x(this,"role","navigation"),this._render=Ct(()=>Nl(this),0),this._unmutate=mt(this,this._render,{childList:!0,subtree:!0})}attributeChangedCallback(){this._render?.()}disconnectedCallback(){this._unmutate?.(),this._unmutate=this._render=void 0}};const Nl=t=>{let e=Number(x(t,Te)),o=Number(x(t,ke));if(e&&o){let n=t.querySelectorAll("button,a"),i=n.length-2,a=x(t,$i),{next:s,prev:r,pages:c}=Ti({current:e,total:o,show:i});n.forEach((l,d)=>{let u=d?n[d+1]?c[d-1]?.page:s:r;x(l,"aria-current",c[d-1]?.current?"true":null),x(l,"aria-label",`${u??"hidden"}`),x(l,"role",u?null:"none"),x(l,"tabindex",u?null:"-1"),l instanceof HTMLButtonElement&&x(l,"value",`${u}`),a&&l instanceof HTMLAnchorElement&&x(l,"href",a.replace("%d",`${u}`))})}},ql=(t,e,o=1/0)=>{let n=(o-1)/2,i=Math.max(Math.min(t-Math.floor(n),e-o+1),1),a=Math.min(Math.max(t+Math.ceil(n),o),e),s=Array.from({length:a+1-i},(r,c)=>c+i);return o>4&&i>1&&s.splice(0,2,1,0),o>3&&a<e&&s.splice(-2,2,0,e),s};tt.define("ds-pagination",ki);var Ai=class extends ze{_unmutate;_render;connectedCallback(){super.connectedCallback(),this._render=()=>Bl(this),this._unmutate=mt(this,this._render,{childList:!0}),I(this,"toggle",Ci,B)}disconnectedCallback(){super.disconnectedCallback(),this._unmutate?.(),this._unmutate=this._render=void 0,po(this,"toggle",Ci,B)}};const Bl=({control:t,list:e})=>{t&&!t.placeholder&&x(t,"placeholder"," "),t&&x(t,"popovertarget",pt(e)||null),e&&x(e,"popover","manual")},Ci=t=>{let e=t.currentTarget,o=t.newState==="open"&&e.control;o&&e.list?.dispatchEvent(new CustomEvent("ds-toggle-source",{detail:o}))};tt.define("ds-suggestion",Ai);var Li=class extends oo{},Mi=class extends no{},Ri=class extends ao{},Ii=class extends ro{};tt.define("ds-tabs",Li),tt.define("ds-tablist",Mi),tt.define("ds-tab",Ri),tt.define("ds-tabpanel",Ii);function Ul(){return typeof HTMLButtonElement<"u"&&"command"in HTMLButtonElement.prototype&&"source"in((globalThis.CommandEvent||{}).prototype||{})}function Fl(){document.addEventListener("invoke",f=>{f.type=="invoke"&&f.isTrusted&&(f.stopImmediatePropagation(),f.preventDefault())},!0),document.addEventListener("command",f=>{f.type=="command"&&f.isTrusted&&(f.stopImmediatePropagation(),f.preventDefault())},!0);function t(f,g,h=!0){Object.defineProperty(f,g,{...Object.getOwnPropertyDescriptor(f,g),enumerable:h})}function e(f){return f&&typeof f.getRootNode=="function"?f.getRootNode():f&&f.parentNode?e(f.parentNode):f}const o=new WeakMap,n=new WeakMap;class i extends Event{constructor(g,h={}){super(g,h);const{source:w,command:_}=h;if(w!=null&&!(w instanceof Element))throw new TypeError("source must be an element");o.set(this,w||null),n.set(this,_!==void 0?String(_):"")}get[Symbol.toStringTag](){return"CommandEvent"}get source(){if(!o.has(this))throw new TypeError("illegal invocation");const g=o.get(this);if(!(g instanceof Element))return null;const h=e(g);return h!==e(this.target||document)?h.host:g}get command(){if(!n.has(this))throw new TypeError("illegal invocation");return n.get(this)}get action(){throw new Error("CommandEvent#action was renamed to CommandEvent#command")}get invoker(){throw new Error("CommandEvent#invoker was renamed to CommandEvent#source")}}t(i.prototype,"source"),t(i.prototype,"command");class a extends Event{constructor(g,h={}){throw super(g,h),new Error("InvokeEvent has been deprecated, it has been renamed to `CommandEvent`")}}const s=new WeakMap;function r(f){Object.defineProperties(f.prototype,{commandForElement:{enumerable:!0,configurable:!0,set(g){if(this.hasAttribute("invokeaction"))throw new TypeError("Element has deprecated `invokeaction` attribute, replace with `command`");if(this.hasAttribute("invoketarget"))throw new TypeError("Element has deprecated `invoketarget` attribute, replace with `commandfor`");if(g===null)this.removeAttribute("commandfor"),s.delete(this);else if(g instanceof Element){this.setAttribute("commandfor","");const h=e(g);e(this)===h||h===this.ownerDocument?s.set(this,g):s.delete(this)}else throw new TypeError("commandForElement must be an element or null")},get(){if(this.localName!=="button")return null;if(this.hasAttribute("invokeaction")||this.hasAttribute("invoketarget"))return console.warn("Element has deprecated `invoketarget` or `invokeaction` attribute, use `commandfor` and `command` instead"),null;if(this.disabled)return null;if(this.form&&this.getAttribute("type")!=="button")return console.warn("Element with `commandFor` is a form participant. It should explicitly set `type=button` in order for `commandFor` to work"),null;const g=s.get(this);if(g)return g.isConnected?g:(s.delete(this),null);const h=e(this),w=this.getAttribute("commandfor");return(h instanceof Document||h instanceof ShadowRoot)&&w&&h.getElementById(w)||null}},command:{enumerable:!0,configurable:!0,get(){const g=this.getAttribute("command")||"";if(g.startsWith("--"))return g;const h=g.toLowerCase();switch(h){case"show-modal":case"request-close":case"close":case"toggle-popover":case"hide-popover":case"show-popover":return h}return""},set(g){this.setAttribute("command",g)}},invokeAction:{enumerable:!1,configurable:!0,get(){throw new Error("invokeAction is deprecated. It has been renamed to command")},set(g){throw new Error("invokeAction is deprecated. It has been renamed to command")}},invokeTargetElement:{enumerable:!1,configurable:!0,get(){throw new Error("invokeTargetElement is deprecated. It has been renamed to command")},set(g){throw new Error("invokeTargetElement is deprecated. It has been renamed to command")}}})}const c=new WeakMap;Object.defineProperties(HTMLElement.prototype,{oncommand:{enumerable:!0,configurable:!0,get(){return d.takeRecords(),c.get(this)||null},set(f){const g=c.get(this)||null;g&&this.removeEventListener("command",g),c.set(this,typeof f=="object"||typeof f=="function"?f:null),typeof f=="function"&&this.addEventListener("command",f)}}});function l(f){for(const g of f)g.oncommand=new Function("event",g.getAttribute("oncommand"))}const d=new MutationObserver(f=>{for(const g of f){const{target:h}=g;g.type==="childList"?l(h.querySelectorAll("[oncommand]")):l([h])}});d.observe(document,{subtree:!0,childList:!0,attributeFilter:["oncommand"]}),l(document.querySelectorAll("[oncommand]"));const u=new WeakSet;function m(f){if(u.has(f)||(u.add(f),f.defaultPrevented)||f.type!=="click")return;const g=f.target.closest("button[invoketarget], button[invokeaction], input[invoketarget], input[invokeaction]");if(g&&(console.warn("Elements with `invoketarget` or `invokeaction` are deprecated and should be renamed to use `commandfor` and `command` respectively"),g.matches("input")))throw new Error("Input elements no longer support `commandfor`");const h=f.target.closest("button[commandfor], button[command]");if(!h)return;if(h.form&&h.getAttribute("type")!=="button")throw f.preventDefault(),new Error("Element with `commandFor` is a form participant. It should explicitly set `type=button` in order for `commandFor` to work. In order for it to act as a Submit button, it must not have command or commandfor attributes");if(h.hasAttribute("command")!==h.hasAttribute("commandfor")){const T=h.hasAttribute("command")?"command":"commandfor",S=h.hasAttribute("command")?"commandfor":"command";throw new Error(`Element with ${T} attribute must also have a ${S} attribute to function.`)}if(h.command!=="show-popover"&&h.command!=="hide-popover"&&h.command!=="toggle-popover"&&h.command!=="show-modal"&&h.command!=="request-close"&&h.command!=="close"&&!h.command.startsWith("--")){console.warn(`"${h.command}" is not a valid command value. Custom commands must begin with --`);return}const w=h.commandForElement;if(!w)return;const _=new i("command",{command:h.command,source:h,cancelable:!0});if(w.dispatchEvent(_),_.defaultPrevented)return;const y=_.command.toLowerCase();if(w.popover){const T=!w.matches(":popover-open");T&&(y==="toggle-popover"||y==="show-popover")?w.showPopover({source:h}):!T&&y==="hide-popover"&&w.hidePopover()}else if(w.localName==="dialog"){const T=!w.hasAttribute("open");T&&y=="show-modal"?w.showModal():!T&&y=="close"?w.close(h.value?h.value:void 0):!T&&y=="request-close"&&(HTMLDialogElement.prototype.requestClose||(HTMLDialogElement.prototype.requestClose=function(){const S=new Event("cancel",{cancelable:!0});this.dispatchEvent(S),S.defaultPrevented||this.close()}),w.requestClose(h.value?h.value:void 0))}}function p(f){f.addEventListener("click",m,!0)}function v(f,g){const h=f.prototype.attachShadow;f.prototype.attachShadow=function(_){const y=h.call(this,_);return g(y),y};const w=f.prototype.attachInternals;f.prototype.attachInternals=function(){const _=w.call(this);return _.shadowRoot&&g(_.shadowRoot),_}}r(HTMLButtonElement),v(HTMLElement,f=>{p(f),d.observe(f,{attributeFilter:["oncommand"]}),l(f.querySelectorAll("[oncommand]"))}),p(document),Object.assign(globalThis,{CommandEvent:i,InvokeEvent:a})}var Ae=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",Wl=Ae&&/android/i.test(navigator.userAgent),Gl=Ae&&/firefox/i.test(navigator.userAgent),Oi;Ae&&/^Mac/i.test(((Oi=navigator.userAgentData)==null?void 0:Oi.platform)||navigator.platform);function Di(t,e,o){return o===void 0?t.getAttribute(e):(o===null?t.removeAttribute(e):t.getAttribute(e)!==o&&t.setAttribute(e,o),null)}var Ce="__uDetailsPolyfillSummarys";if(Ae&&Wl&&Gl&&!window[Ce]){window[Ce]=document.getElementsByTagName("summary");const t=()=>{if(window[Ce])for(const e of window[Ce]){const o=e.parentElement;Di(e,"role","button"),Di(e,"aria-expanded",`${!!o&&!!o.open}`)}};requestAnimationFrame(t),new MutationObserver(t).observe(document,{attributeFilter:["open"],attributes:!0,childList:!0,subtree:!0})}var Vl=Object.defineProperty,Pi=Object.getOwnPropertySymbols,zl=Object.prototype.hasOwnProperty,Xl=Object.prototype.propertyIsEnumerable,Hi=(t,e,o)=>e in t?Vl(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,jl=(t,e)=>{for(var o in e||(e={}))zl.call(e,o)&&Hi(t,o,e[o]);if(Pi)for(var o of Pi(e))Xl.call(e,o)&&Hi(t,o,e[o]);return t},Ft=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",Le=Ft&&/android/i.test(navigator.userAgent),Oo=Ft&&/iPad|iPhone|iPod/.test(navigator.userAgent),Ni;Ft&&/^Mac/i.test(((Ni=navigator.userAgentData)==null?void 0:Ni.platform)||navigator.platform);var Kl=`${Le?"data":"aria"}-labelledby`,Yl=":host(:not([hidden])) { display: block }",Ql="outline: 1px dotted; outline: 5px auto Highlight; outline: 5px auto -webkit-focus-ring-color",qi=typeof HTMLElement>"u"?class{}:HTMLElement;function k(t,e,o){return o===void 0?t.getAttribute(e):(o===null?t.removeAttribute(e):t.getAttribute(e)!==o&&t.setAttribute(e,o),null)}var Bi=(t,e,o)=>{for(const n of o[0].split(","))o[0]=n,Element.prototype[`${t}EventListener`].apply(e,o)},Wt=(t,...e)=>Bi("add",t,e),Me=(t,...e)=>Bi("remove",t,e),Jl=(t,e)=>t.shadowRoot||t.attachShadow({mode:"open"}).append(Ho("slot"),Ho("style",e)),Re=new WeakMap,Do=(t,e)=>{if(e===void 0)return Re.get(t);try{Re.get(t).disconnect(),Re.delete(t)}catch{}if(e){const o=new MutationObserver(n=>t.handleEvent({type:"mutation",detail:n}));o.observe(t,e),Re.set(t,o)}},Ui=t=>{var e;const o=((e=t.getRootNode)==null?void 0:e.call(t))||t.ownerDocument;return o instanceof Document||o instanceof ShadowRoot?o:document},Zl=0,Po=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++Zl).toString(32)}`),t.id):"",Ho=(t,e,o)=>{const n=document.createElement(t);return e&&(n[t==="style"?"textContent":"innerHTML"]=e),n},Fi={define:(t,e)=>!Ft||window.customElements.get(t)||window.customElements.define(t,e)},wt,tc=0,Wi=t=>{wt||(wt=Ho("div"),wt.style.cssText="position:fixed;overflow:hidden;width:1px;white-space:nowrap",k(wt,"aria-live","assertive")),wt.isConnected||document.body.append(wt),t&&(wt.textContent=`${t}${tc++%2?" ":""}`)},ec=(t,e,o="")=>{var n,i;const a={bubbles:!0,composed:!0,data:e,inputType:o},s=HTMLInputElement.prototype;t.dispatchEvent(new InputEvent("beforeinput",a)),(i=(n=Object.getOwnPropertyDescriptor(s,"value"))==null?void 0:n.set)==null||i.call(t,e),t.dispatchEvent(new InputEvent("input",a)),t.dispatchEvent(new Event("change",{bubbles:!0}))},No=!1,qo=t=>(t?.type==="mouseup"&&(No=!1),t?.type==="mousedown"&&(No=!0,Wt(document,"mouseup",qo,{once:!0})),No),oc=(t,e="<slot></slot>")=>`<template shadowrootmode="open">${e}<style>${t}</style></template>`,Bo="disabled",Gt="selected",nc=class extends qi{static get observedAttributes(){return[Bo,Gt]}connectedCallback(){Oo||(this.tabIndex=-1),this.hasAttribute("role")||k(this,"role","option"),this.attributeChangedCallback()}attributeChangedCallback(){k(this,"aria-disabled",`${this.disabled}`),k(this,"aria-selected",`${this.selected}`)}get defaultSelected(){return this[Gt]}set defaultSelected(t){this[Gt]=t}get disabled(){return k(this,Bo)!==null}set disabled(t){k(this,Bo,t?"":null)}get form(){return this.closest("form")}get index(){var t;return[...((t=this.parentElement)==null?void 0:t.options)||[this]].indexOf(this)}get label(){var t;return(t=k(this,"label"))!=null?t:this.text}set label(t){k(this,"label",t)}get selected(){return k(this,Gt)!==null}set selected(t){k(this,Gt,t?"":null)}get text(){var t;return((t=this.textContent)==null?void 0:t.trim())||""}set text(t){this.textContent=t}get value(){var t;return(t=k(this,"value"))!=null?t:this.text}set value(t){k(this,"value",t)}};Fi.define("u-option",nc);var Uo=`${Yl}
|
|
23
|
+
::slotted(data:focus) { ${kd} }`,Ar="beforeinput,blur,focus,click,input,keydown,mousedown",kr={once:!0,capture:!0,passive:!0},je="false",Ke=Ad||Er,Lr="".repeat(5),Ir="deleteContentBackward",Nd="insertText",Bd=" ",Xe={added:"Added",empty:"No selected",found:"Navigate left to find %d selected",invalid:"Invalid value",items:"Selected",of:"of",remove:"Press to remove",removed:"Removed"},Mr=class extends Ld{constructor(){super(),this._item="",this._speak="",this._texts=Cd({},Xe),this._value="",this.shadowRoot||this.attachShadow({mode:"open"}).append(zt("slot",null,{"aria-orientation":"horizontal",tabindex:"-1",role:"listbox",name:"items"}),zt("slot"),zt("div",'<div role="option" tabindex="-1"></div>',{"aria-hidden":"true",role:"listbox"}),zt("style",Hd))}static get observedAttributes(){return Object.keys(Xe).map(t=>`data-sr-${t}`)}connectedCallback(){this._root=$r(this),We(this,Ar,this,!0),an(this,{attributeFilter:["value","id","role"],attributes:!0,characterData:!0,childList:!0,subtree:!0}),setTimeout(Ye,0,this),setTimeout(Qe,0,this)}attributeChangedCallback(t,e,o){const n=t.split("data-sr-")[1];Xe[n]&&(this._texts[n]=o||Xe[n])}disconnectedCallback(){an(this,!1),Id(this,Ar,this,!0),this._items=this._clear=this._focus=this._control=void 0,this._list=this._options=this._root=this._form=void 0}handleEvent(t){const e=t.target;un(this)||(t.type==="beforeinput"&&(this._value=e?.value||""),t.type==="blur"&&Ud(this),t.type==="click"&&zd(this,t),t.type==="focus"&&qd(this,t),t.type==="input"&&Vd(this,t),t.type==="keydown"&&Wd(this,t),t.type==="mousedown"&&cn(t),t.type==="mutation"&&Ye(this,t))}get multiple(){var t;return((t=x(this,"data-multiple"))!=null?t:je)!==je}set multiple(t){x(this,"data-multiple",t?"":null)}get creatable(){var t;return((t=x(this,"data-creatable"))!=null?t:je)!==je}set creatable(t){x(this,"data-creatable",t?"":null)}get control(){var t;return(t=this._control)!=null&&t.isConnected||(this._control=this.querySelector("input")),this._control}get list(){var t;return(t=this._list)!=null&&t.isConnected||(this._list=this.querySelector('datalist,[role="listbox"]')),this._list}get clear(){var t;return(t=this._clear)!=null&&t.isConnected||(this._clear=this.querySelector("del")),this._clear}get items(){return this._items||(this._items=this.getElementsByTagName("data")),this._items}get options(){var t,e;if(!this._options){const o=(e=(t=this.list)==null?void 0:t.querySelector('[role="option"],option'))==null?void 0:e.nodeName;o&&(this._options=this.getElementsByTagName(o))}return this._options}get values(){return[...this.items].map(({value:t})=>t)}},Et=t=>{var e;return((e=t?.textContent)==null?void 0:e.trim())||""},dn=t=>t instanceof HTMLDataElement,un=({control:t})=>t?.disabled||t?.readOnly||!1,Ye=(t,e)=>{var o,n;const{_focus:i,_texts:r,items:a,control:l,list:s,multiple:c}=t;if(!l)return;const d=Dd(l),u=d.endsWith(Lr)?x(l,"data-label"):d;x(l,"data-label",u);let f=`${u}${c?`, ${a.length?r.found.replace("%d",`${a.length}`):r.empty}`:""}`;const h=[];for(const{addedNodes:E,removedNodes:A}of e?.detail||[]){for(const C of E)dn(C)&&h.unshift(C);for(const C of A)dn(C)&&h.push(C)}const p=c?h.length===1:h[0]===i;if(i&&p){const E=x(l,"aria-expanded"),A=x(l,"inputmode"),C=dn(i)?l:i,H=!h[0].isConnected;t._speak=`${r[H?"removed":"added"]} ${Et(h[0])}, `,(Ke||i===l)&&sn(t._speak),l!==C&&(Ke&&x(l,"aria-expanded",null),Ke&&x(l,"inputmode","none"),f=Bd,l.focus()),setTimeout(()=>{var V;x(l,"aria-expanded",E),x(l,"inputmode",H?"none":A),(V=C?.focus)==null||V.call(C),x(l,"inputmode",A),t._speak="",Ke?setTimeout(Ye,100,t):We(t,"blur",()=>Ye(t),kr)},100)}let m=0;const v=t.querySelector("select"),b=un(t)?"":r.remove,w=(o=t.shadowRoot)==null?void 0:o.firstElementChild;w&&x(w,"aria-label",r.items);for(const E of a){const A=v?.options[m++],C=Et(E),H=E.value||C,V=`${t._speak}${C}, ${b}`;x(E,"aria-label",V),x(E,"aria-selected","true"),x(E,"role","option"),x(E,"slot","items"),x(E,"tabindex","-1"),x(E,"value",H),A?Object.assign(A,{textContent:C,value:H}):v?.appendChild(new Option(C,H,!0,!0)),Er&&x(E,"title",`${m} ${r.of} ${a.length}`)}v&&x(v,"multiple",c?"":null);for(const E of[...v?.options||[]].slice(m))E.remove();!c&&m>1&&console.warn(t," Multiple <data> found in single mode."),s&&(x(s,"aria-multiselectable",`${c}`),x(l,"list",Tr(s)),x(l,"aria-label",`${t._speak}${f}${Lr}`),s.hasAttribute("popover")&&(x(l,"popovertarget",Tr(s)),x(s,"popover","manual")),s._of=r.of);const _=Et(a[0]);_!==t._item&&Qe(t),t._item=_,Or(t),Rr(t),(n=an(t))==null||n.takeRecords()},Or=t=>{var e;t.clear&&x(t.clear,"role","button"),t.clear&&(t.clear.hidden=!((e=t.control)!=null&&e.value)||un(t))},Rr=t=>{var e;const{_speak:o,options:n=[],values:i}=t;for(const r of n){const a=(e=x(r,"value"))!=null?e:Et(r);x(r,"aria-label",o?`${o}${Et(r)}`:null),x(r,"selected",i.includes(a)?"":null)}},Qe=t=>{const{multiple:e,control:o,items:n}=t,i=Et(n[0]);!e&&o&&i!==o.value&&Cr(o,i,i?Nd:Ir)},fn=(t,e=!0)=>{var o;const{_texts:n,options:i=[],creatable:r,control:a,items:l,multiple:s}=t,c=((o=a?.value)==null?void 0:o.trim())||"",d=c.toLowerCase()||null;let u=[...i].find(h=>(x(h,"label")||Et(h)).trim().toLowerCase()===d);const f={bubbles:!0,cancelable:!0,detail:u};if(t.dispatchEvent(new CustomEvent("comboboxbeforematch",f))||(u=[...i].find(h=>h.selected)),e)return Rr(t),u?Vt(t,u,!1):r&&c?Vt(t,{value:c},!1):(!s&&!c&&l[0]?Vt(t,l[0]):Qe(t),sn(n.invalid));for(const h of i)h.selected=h===u},Vt=(t,e,o=!0)=>{var n,i,r;const{control:a,items:l,multiple:s}=t,c=zt("data",e.label||e.value,{value:e.value}),d=[...l].find(h=>h.value===e.value),u={bubbles:!0,cancelable:!0,detail:d||c};if(d&&!o)return Qe(t);if(d===((n=$r(t))==null?void 0:n.activeElement)&&((r=(i=t.shadowRoot)==null?void 0:i.querySelector('[role="option"]'))==null||r.focus()),t.dispatchEvent(new CustomEvent("comboboxbeforeselect",u))){if(!s)for(const h of[...l])h.remove();d?d.remove():a?.insertAdjacentElement("beforebegin",c),t.dispatchEvent(new CustomEvent("comboboxafterselect",u))}},qd=(t,{target:e})=>{const{_form:o,control:n,multiple:i}=t;e instanceof HTMLElement&&(t._focus=e),i&&o===void 0&&n&&e===n&&(t._form=x(n,"form"),x(n,"form","#")),sn()},Ud=t=>cn()||setTimeout(Fd,0,t),Fd=t=>{const{_focus:e,_root:o,_form:n,multiple:i,control:r}=t;!e||t.contains(o?.activeElement)||(i||fn(t),n&&r&&x(r,"form",n),t._focus=t._form=void 0)},zd=(t,e)=>{const{clientX:o,clientY:n,target:i}=e,{clear:r,control:a,items:l}=t;if(r?.contains(i))return a&&Cr(a,"",Ir),a?.focus();for(const s of l){const{top:c,right:d,bottom:u,left:f}=s.getBoundingClientRect();if(s.contains(i))return Vt(t,s);if(n>=c&&n<=u&&o>=f&&o<=d)return s.focus()}i===t&&a?.focus()},Vd=(t,e)=>{var o;const{options:n=[],control:i,multiple:r}=t,a=((o=i?.value)==null?void 0:o.trim())||"";if(e instanceof InputEvent?!e.inputType||e.inputType==="insertReplacementText":!!a){e.stopImmediatePropagation(),i&&(i.value=t._value);for(const s of n)if(s.value&&s.value===a)return Vt(t,s,r)}else r||fn(t,!1);Or(t)},Wd=(t,e)=>{var o;const{clear:n,control:i,items:r}=t,{key:a,repeat:l,target:s}=e,c=i&&i===s,d=c&&i.selectionEnd,u=e.ctrlKey||e.metaKey||e.shiftKey||e.key==="Alt";let f=c?r.length:[...r].indexOf(s);if(c&&a==="Tab"&&!e.shiftKey&&n&&!n.hidden&&(e.preventDefault(),n.tabIndex=0,n.focus(),We(n,"blur",()=>x(n,"tabindex",null),kr)),!(!c&&Md(e)||f===-1||u)){if(a==="ArrowRight"&&!c)f+=1;else if(a==="ArrowLeft"&&!d)f-=1;else{if(a==="Enter"&&c)return fn(t);if(a==="Backspace"&&!d){if(e.preventDefault(),!l&&r[f])return Vt(t,r[f]);c&&(f-=1)}else return c||i?.focus()}e.preventDefault(),(o=r[Math.max(0,f)]||i)==null||o.focus()}};Rd.define("u-combobox",Mr);var Dr=class extends Mr{_render;_unmutate;connectedCallback(){super.connectedCallback(),this._unmutate=rt(this,Gd,{childList:!0}),R(this,"toggle",Pr,z)}disconnectedCallback(){super.disconnectedCallback(),this._unmutate?.(),this._unmutate=this._render=void 0,No(this,"toggle",Pr,z)}};const Gd=({control:t,list:e})=>{t&&!t.placeholder&&y(t,"placeholder"," "),t&&y(t,"popovertarget",st(e)||null),e&&y(e,"popover","manual")},Pr=t=>{let e=t.currentTarget,o=t.newState==="open"&&e.control;o&&e.list?.dispatchEvent(new CustomEvent("ds-toggle-source",{detail:o}))};at.define("ds-suggestion",Dr);var Hr=class extends xe{},Nr=class extends $e{},Br=class extends Ro{},qr=class extends Do{};at.define("ds-tabs",Hr),at.define("ds-tablist",Nr),at.define("ds-tab",Br),at.define("ds-tabpanel",qr);var pn=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",Ur=pn(),Fr=Ur?navigator.userAgent:"",jd=/android/i.test(Fr),Kd=/firefox/i.test(Fr),zr;Ur&&/^Mac/i.test(((zr=navigator.userAgentData)==null?void 0:zr.platform)||navigator.platform);var Vr=(t,e,o)=>o===void 0?t.getAttribute(e):(o===null?t.removeAttribute(e):t.getAttribute(e)!==o&&t.setAttribute(e,o),null),Xd=(t,e,o)=>{const n=new MutationObserver(r=>{if(!pn()||!t.isConnected)return i();e(t,r)}),i=Object.assign(()=>n.disconnect(),{takeRecords:()=>n.takeRecords()});return e(t),n.observe(t,o),i},Wr="__uDetailsPolyfillSummarys";if(pn()&&jd&&Kd&&!window[Wr]){const t=document.getElementsByTagName("summary"),e=()=>{for(const o of t){const n=o.parentElement;Vr(o,"role","button"),Vr(o,"aria-expanded",`${!!n?.open}`)}};window[Wr]=Xd(document,e,{attributeFilter:["open"],attributes:!0,childList:!0,subtree:!0})}var Yd=Object.defineProperty,Gr=Object.getOwnPropertySymbols,Qd=Object.prototype.hasOwnProperty,Jd=Object.prototype.propertyIsEnumerable,jr=(t,e,o)=>e in t?Yd(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,Zd=(t,e)=>{for(var o in e||(e={}))Qd.call(e,o)&&jr(t,o,e[o]);if(Gr)for(var o of Gr(e))Jd.call(e,o)&&jr(t,o,e[o]);return t},ie=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",Je=ie&&/android/i.test(navigator.userAgent),mn=ie&&/iPad|iPhone|iPod/.test(navigator.userAgent),Kr;ie&&/^Mac/i.test(((Kr=navigator.userAgentData)==null?void 0:Kr.platform)||navigator.platform);var tu=`${Je?"data":"aria"}-labelledby`,eu=":host(:not([hidden])) { display: block }",ou="outline: 1px dotted; outline: 5px auto Highlight; outline: 5px auto -webkit-focus-ring-color",Xr=typeof HTMLElement>"u"?class{}:HTMLElement;function k(t,e,o){return o===void 0?t.getAttribute(e):(o===null?t.removeAttribute(e):t.getAttribute(e)!==o&&t.setAttribute(e,o),null)}var Yr=(t,e,o)=>{for(const n of o[0].split(","))o[0]=n,Element.prototype[`${t}EventListener`].apply(e,o)},re=(t,...e)=>Yr("add",t,e),Ze=(t,...e)=>Yr("remove",t,e),nu=(t,e)=>t.shadowRoot||t.attachShadow({mode:"open"}).append(gn("slot"),gn("style",e)),to=new WeakMap,hn=(t,e)=>{if(e===void 0)return to.get(t);try{to.get(t).disconnect(),to.delete(t)}catch{}if(e){const o=new MutationObserver(n=>t.handleEvent({type:"mutation",detail:n}));o.observe(t,e),to.set(t,o)}},Qr=t=>{var e;const o=((e=t.getRootNode)==null?void 0:e.call(t))||t.ownerDocument;return o instanceof Document||o instanceof ShadowRoot?o:document},iu=0,vn=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++iu).toString(32)}`),t.id):"",gn=(t,e,o)=>{const n=document.createElement(t);return e&&(n[t==="style"?"textContent":"innerHTML"]=e),n},Jr={define:(t,e)=>!ie||window.customElements.get(t)||window.customElements.define(t,e)},St,ru=0,Zr=t=>{St||(St=gn("div"),St.style.cssText="position:fixed;overflow:hidden;width:1px;white-space:nowrap",k(St,"aria-live","assertive")),St.isConnected||document.body.append(St),t&&(St.textContent=`${t}${ru++%2?" ":""}`)},au=(t,e,o="")=>{var n,i;const r={bubbles:!0,composed:!0,data:e,inputType:o},a=HTMLInputElement.prototype;t.dispatchEvent(new InputEvent("beforeinput",r)),(i=(n=Object.getOwnPropertyDescriptor(a,"value"))==null?void 0:n.set)==null||i.call(t,e),t.dispatchEvent(new InputEvent("input",r)),t.dispatchEvent(new Event("change",{bubbles:!0}))},bn=!1,yn=t=>(t?.type==="mouseup"&&(bn=!1),t?.type==="mousedown"&&(bn=!0,re(document,"mouseup",yn,{once:!0})),bn),su=(t,e="<slot></slot>")=>`<template shadowrootmode="open">${e}<style>${t}</style></template>`,_n="disabled",ae="selected",lu=class extends Xr{static get observedAttributes(){return[_n,ae]}connectedCallback(){mn||(this.tabIndex=-1),this.hasAttribute("role")||k(this,"role","option"),this.attributeChangedCallback()}attributeChangedCallback(){k(this,"aria-disabled",`${this.disabled}`),k(this,"aria-selected",`${this.selected}`)}get defaultSelected(){return this[ae]}set defaultSelected(e){this[ae]=e}get disabled(){return k(this,_n)!==null}set disabled(e){k(this,_n,e?"":null)}get form(){return this.closest("form")}get index(){var e;return[...((e=this.parentElement)==null?void 0:e.options)||[this]].indexOf(this)}get label(){var e;return(e=k(this,"label"))!=null?e:this.text}set label(e){k(this,"label",e)}get selected(){return k(this,ae)!==null}set selected(e){k(this,ae,e?"":null)}get text(){var e;return((e=this.textContent)==null?void 0:e.trim())||""}set text(e){this.textContent=e}get value(){var e;return(e=k(this,"value"))!=null?e:this.text}set value(e){k(this,"value",e)}};Jr.define("u-option",lu);var wn=`${eu}
|
|
15
24
|
::slotted([role="option"]) { display: block; cursor: pointer }
|
|
16
|
-
::slotted([role="option"]:focus) { ${
|
|
25
|
+
::slotted([role="option"]:focus) { ${ou} }
|
|
17
26
|
::slotted([role="option"][aria-hidden="true"]),
|
|
18
27
|
::slotted([role="option"][disabled]),
|
|
19
|
-
::slotted([role="option"][hidden]) { display: none !important }`,ic=oc(Uo),Gi,Vi=0,ac=Oo||Le,zi="click,focusout,input,keydown,mousedown,mouseup",Xi="focus,focusin,blur,focusout",Ie={singular:"%d hit",plural:"%d hits"},ji=class extends qi{constructor(){super(),this._texts=jl({},Ie),this._value="",this._of="/",Jl(this,Uo)}static get observedAttributes(){return["id",...Object.keys(Ie).map(t=>`data-sr-${t}`)]}connectedCallback(){this.hidden=!0,this._root=Ui(this),k(this,"role","listbox"),k(this,"tabindex","-1"),Wt(this._root,"focusin",this),Wt(this._root,"focus",this,!0),Do(this,{attributeFilter:["disabled","hidden","label","value"],attributes:!0,characterData:!0,childList:!0,subtree:!0}),setTimeout(()=>this.attributeChangedCallback())}disconnectedCallback(){Me(this._root||this,"focus",this,!0),Me(this._root||this,"focusin",this),Do(this,!1),Fo(this),this._root=void 0}attributeChangedCallback(t,e,o){const n=t?.split("data-sr-")[1],i=`input[list="${this.id}"]`;if(Ie[n])this._texts[n]=o||Ie[n];else if(this._root){this._input&&Wo(this,this._input);for(const a of this._root.querySelectorAll(i))Wo(this,a)}}handleEvent(t){const{target:e,type:o}=t;t.defaultPrevented||(o==="click"&&lc(this,t),(o==="focus"||o==="focusin")&&sc(this,t),(o==="blur"||o==="focusout")&&rc(this,t),o==="keydown"&&cc(this,t),o==="mousedown"&&this.contains(e)&&qo(t),(o==="mutation"||o==="input")&&(clearTimeout(Vi),Vi=setTimeout(Qi,0,this,t)))}get options(){var t;if(!this._options){const e=(t=this.querySelector('[role="option"],option'))==null?void 0:t.nodeName;e&&(this._options=this.getElementsByTagName(e))}return this._options||this.getElementsByTagName("option")}},Ki=t=>t?.disabled||t?.readOnly||!1,Vt=(t,e)=>{var o,n,i;if(t.hidden!==e)return;t.hidden=Ki(t?._input)||!e,(o=Do(t))==null||o.takeRecords();const a=t.isConnected&&t.popover&&((n=t._input)==null?void 0:n.isConnected)&&((i=t._input)==null?void 0:i.popoverTargetElement)===t;t._input&&Wo(t,t._input,e),a&&k(t,"popover","manual"),a&&t.togglePopover(e),e&&Qi(t)},Fo=t=>{t._input&&(Me(t._input||t,Xi,t),Me(t._root||t,zi,t),Vt(t,!1),t._input=void 0)},Wo=(t,e,o=!1)=>{t.popover&&k(e,"popovertarget",Po(t)),Wt(e,Xi,t,!0),k(e,"aria-autocomplete","list"),k(e,"aria-controls",Po(t)),k(e,"aria-expanded",`${!ac||o}`),k(e,"autocomplete","off"),k(e,"role",Ki(e)?null:"combobox")},sc=(t,e)=>{var o;const n=e.target instanceof HTMLInputElement;n&&e.isTrusted&&e.stopImmediatePropagation(),t._input!==e.target&&n&&e.target.list===t&&(t._input&&Fo(t),t._input=e.target,t._input.dispatchEvent(new FocusEvent("focus")),t._input.dispatchEvent(new FocusEvent("focusin",{bubbles:!0})),k(t,Kl,Po((o=t._input.labels)==null?void 0:o[0])),Wt(t._root||t,zi,t),Vt(t,k(t._input,"inputmode")!=="none"),Wi())},rc=(t,e)=>{!Le&&!qo()&&t._input&&setTimeout(Yi,0,t),e.target===t._input&&e.isTrusted&&e.stopImmediatePropagation()},Yi=t=>{var e;const o=((e=t._root)==null?void 0:e.activeElement)||null,n=t._input;n&&n!==o&&!t.contains(o)&&(n.dispatchEvent(new FocusEvent("blur",{relatedTarget:o})),n.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:o})),Fo(t))},lc=(t,{target:e})=>{var o;if(!t._input||t._input===e)return Vt(t,!0);for(const n of t.options)if(n.contains(e))return k(t,"aria-multiselectable")!=="true"&&((o=t._input)==null||o.focus(),Vt(t,!1)),ec(t._input,n.value);Le&&Yi(t)},cc=(t,e)=>{var o;const{key:n,target:i,altKey:a,ctrlKey:s,shiftKey:r,metaKey:c}=e,l=n==="Escape"||n==="Esc";if(a||s||c||r||n==="Tab")return;l&&!t.hidden&&e?.preventDefault(),Vt(t,!l);const d=[...t.options].filter(p=>k(p,"aria-hidden")!=="true"&&p.offsetHeight),u=d.indexOf(i);let m=-1;if(n==="ArrowDown"&&(m=(u+1)%d.length),n==="ArrowUp"&&(m=(~u?u:d.length)-1),~u&&((n==="Home"||n==="PageUp")&&(m=0),(n==="End"||n==="PageDown")&&(m=d.length-1),n==="Enter"))return d[u].click(),e.preventDefault();if(d[m])for(const p of d)p.tabIndex=-1;d[m]&&e.preventDefault(),(o=d[m]||t._input)==null||o.focus(),!d[m]&&n==="ArrowUp"&&setTimeout(()=>{var p;return(p=t._input)==null?void 0:p.setSelectionRange(999,999)})},Qi=(t,e)=>{const{_texts:o,_root:n,_input:i,options:a}=t,s=i?.value.toLowerCase().trim()||"",r=!t.hasAttribute("data-nofilter"),c=[],l=[];for(const m of a)(m.disabled||m.hidden||r&&!m.label.toLowerCase().includes(s)?c:l).push(m);for(const m of c)k(m,"aria-hidden","true");for(const m of l)k(m,"aria-hidden","false");const d=l.length;clearTimeout(Gi),e?.type==="input"&&s!==t._value&&(Gi=setTimeout(()=>{const m=`${!d&&t.innerText.trim()||`${o[d===1?"singular":"plural"]}`.replace("%d",`${d}`)}`;!t.hidden&&n?.activeElement===i&&Wi(m),t._value=s},1e3));let u=0;if(Oo)for(const m of l)k(m,"title",`${++u} ${t._of} ${d}`)};Ft&&Object.defineProperty(HTMLInputElement.prototype,"list",{configurable:!0,enumerable:!0,get(){return Ui(this).getElementById(k(this,"list")||"")}}),Fi.define("u-datalist",ji),Z()&&!Ul()&&Fl();const dc="3.1.19",Ji="_alert_1gd8q_1 _ds-alert_1hobb_3",Zi="_app_1gd8q_1",ta="_sticky_1gd8q_1",ea="_avatar_1gd8q_1 _ds-avatar_1hobb_1",oa="_badge_1gd8q_1",na="_breadcrumbs_1gd8q_1 _ds-breadcrumbs_1hobb_5",ia="_button_1gd8q_1 _ds-button_1hobb_1",aa="_card_1gd8q_1",sa="_group_1gd8q_1",ra="_chip_1gd8q_1 _ds-chip_1hobb_5",la="_details_1gd8q_1 _ds-details_1hobb_3",ca="_dialog_1gd8q_1 _ds-dialog_1hobb_5",da="__drawer_1gd8q_1",ua="_divider_1gd8q_1",fa="_errorsummary_1gd8q_1 _ds-error-summary_1hobb_5",ma="_field_1gd8q_1 _ds-field_1hobb_1",pa="_suggestion_1gd8q_1 _ds-suggestion_1hobb_5",ha="_affixes_1gd8q_1 _ds-field-affixes_1hobb_3",ga="_fieldset_1gd8q_1 _ds-fieldset_1hobb_3",ba="_fileupload_1gd8q_1",va="_helptext_1gd8q_1 _ds-focus_1hobb_1",wa="_input_1gd8q_1 _ds-input_1hobb_1",ya="_law_1gd8q_1",_a="_grid_1gd8q_1",xa="_flex_1gd8q_1",Ea="_link_1gd8q_1",Sa="_logo_1gd8q_1",$a="__logo_1gd8q_1",Ta="_pagination_1gd8q_1 _ds-pagination_1hobb_5",ka="_popover_1gd8q_1 _ds-popover_1hobb_3",Aa="_print_1gd8q_1",Ca="_progress_1gd8q_1",La="__indeterminate_1gd8q_1",Ma="_skeleton_1gd8q_1 _ds-skeleton_1hobb_5",Ra="__skeleton_1gd8q_1",Ia="_spinner_1gd8q_1",Oa="_steps_1gd8q_1",Da="_table_1gd8q_1 _ds-table_1hobb_5",Pa="__scrollShadow_1gd8q_1",Ha="_tabs_1gd8q_1 _ds-tabs_1hobb_5",Na="__scrollMask_1gd8q_1",qa="_tag_1gd8q_1 _ds-tag_1hobb_5",Ba="_toast_1gd8q_1",Ua="__toastClose_1gd8q_1",Fa="__toastOpen_1gd8q_1",Wa="__toastTimeout_1gd8q_1",Ga="_togglegroup_1gd8q_1 _ds-toggle-group_1hobb_5",Va="__tooltip_1gd8q_1 _ds-tooltip_1hobb_5",za="_heading_1gd8q_1 _ds-heading_1hobb_1",Xa="_ingress_1gd8q_1",ja="_muted_1gd8q_1",Ka="_info_1gd8q_1",Ya="_prose_1gd8q_1",Qa="_validation_1gd8q_1 _ds-validation-message_1hobb_1",Ja="_body_1gd8q_162",Za="__checked_1gd8q_1",A={alert:Ji,app:Zi,sticky:ta,avatar:ea,badge:oa,breadcrumbs:na,button:ia,card:aa,group:sa,chip:ra,details:la,dialog:ca,_drawer:da,divider:ua,errorsummary:fa,field:ma,suggestion:pa,affixes:ha,fieldset:ga,fileupload:ba,helptext:va,input:wa,law:ya,grid:_a,flex:xa,link:Ea,logo:Sa,_logo:$a,pagination:Ta,popover:ka,print:Aa,progress:Ca,_indeterminate:La,skeleton:Ma,_skeleton:Ra,spinner:Ia,steps:Oa,table:Da,_scrollShadow:Pa,tabs:Ha,_scrollMask:Na,tag:qa,toast:Ba,_toastClose:Ua,_toastOpen:Fa,_toastTimeout:Wa,togglegroup:Ga,_tooltip:Va,heading:za,ingress:Xa,muted:ja,info:Ka,prose:Ya,validation:Qa,body:Ja,_checked:Za},uc=Object.freeze(Object.defineProperty({__proto__:null,_checked:Za,_drawer:da,_indeterminate:La,_logo:$a,_scrollMask:Na,_scrollShadow:Pa,_skeleton:Ra,_toastClose:Ua,_toastOpen:Fa,_toastTimeout:Wa,_tooltip:Va,affixes:ha,alert:Ji,app:Zi,avatar:ea,badge:oa,body:Ja,breadcrumbs:na,button:ia,card:aa,chip:ra,default:A,details:la,dialog:ca,divider:ua,errorsummary:fa,field:ma,fieldset:ga,fileupload:ba,flex:xa,grid:_a,group:sa,heading:za,helptext:va,info:Ka,ingress:Xa,input:wa,law:ya,link:Ea,logo:Sa,muted:ja,pagination:Ta,popover:ka,print:Aa,progress:Ca,prose:Ya,skeleton:Ma,spinner:Ia,steps:Oa,sticky:ta,suggestion:pa,table:Da,tabs:Ha,tag:qa,toast:Ba,togglegroup:Ga,validation:Qa},Symbol.toStringTag,{value:"Module"}));function ts(t){var e,o,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(o=ts(t[e]))&&(n&&(n+=" "),n+=o)}else for(o in t)t[o]&&(n&&(n+=" "),n+=o);return n}function fc(){for(var t,e,o=0,n="",i=arguments.length;o<i;o++)(t=arguments[o])&&(e=ts(t))&&(n&&(n+=" "),n+=e);return n}const zt={capture:!0,passive:!0},V=()=>typeof window<"u"&&typeof document<"u",yt=t=>V()?document.getElementsByClassName(A[t].split(" ")[0]):[];function Ot(t,e){let o;return function(...n){clearTimeout(o),o=setTimeout(()=>t.apply(this,n),e)}}const b=(t,e,o)=>o===void 0?t.getAttribute(e)??null:(o===null?t.removeAttribute(e):t.getAttribute(e)!==o&&t.setAttribute(e,o),null),O=(t,...e)=>{const[o,...n]=e;for(const i of o.split(" "))t.addEventListener(i,...n);return()=>es(t,...e)},es=(t,...e)=>{const[o,...n]=e;for(const i of o.split(" "))t.removeEventListener(i,...n)},rt=(t,e)=>{if(!V())return;window._mtdsHotReloadCleanup||(window._mtdsHotReloadCleanup=new Map);const o=()=>{window._mtdsHotReloadCleanup?.get(t)?.map(n=>n()),window._mtdsHotReloadCleanup?.set(t,e())};document.readyState!=="complete"?O(window,"load",o):document.fonts?.ready?.then(o)||setTimeout(o,0)},Oe=(t,e,o)=>{let n=0;const i=()=>{if(!t.isConnected)return a();e(s),s.takeRecords(),n=0},a=()=>s?.disconnect?.(),s=new MutationObserver(()=>{n||(n=requestAnimationFrame(i))});return s.observe(t,o),i(),a},M=(t,e,o)=>{const n=document.createElement(t);if(o&&(n.textContent=o),e)for(const[i,a]of Object.entries(e))b(n,i,a);return n},mc=typeof HTMLElement>"u"?class{}:HTMLElement,pc=(t,e)=>!V()||window.customElements.get(t)||window.customElements.define(t,e),hc=typeof window<"u"&&window.CSSStyleSheet&&document.adoptedStyleSheets,gc=(t,e)=>{if(!hc)return;t.shadowRoot||t.attachShadow({mode:"open"}).append(M("slot"));const o=new CSSStyleSheet;o.replaceSync(e),t.shadowRoot.adoptedStyleSheets=[o]},bc=`[data-command="toggle-app-expanded"],.${A.app.split(" ")[0]} > [command="show-modal"]`,vc=`.${A.breadcrumbs.split(" ")[0]}`,wc=`.${A.card.split(" ")[0]}`,os=`.${A.chip.split(" ")[0]}`,yc=`.${A.helptext.split(" ")[0]}`,_c=`.${A.pagination.split(" ")[0]}`,xc='summary,u-summary,a,button,[role="tab"],[role="button"]',Go="mattilsynet.matomo.cloud",Ec=["setCustomUrl","setDocumentTitle","setReferrerUrl"],z="mtds-analytics-banner",Sc="https://www.mattilsynet.no/om-mattilsynet/personvernerklaering/informasjonskapsler";function ns(t,e={}){if(V()){if(window._paq||(window._paq=[],window._paq.push(["HeatmapSessionRecording::disable"]),window._paq.push(["enableLinkTracking"]),window._paq.push(["setTrackerUrl",`https://${Go}/matomo.php`])),window._mtm||(window._mtm=window._mtm||[],window._mtm.push({"mtm.startTime":Date.now(),event:"mtm.Start"})),t==="init"){window._mtdsTracking={enabled:window.location.hostname!=="localhost",...window._mtdsTracking,...e};const{consent:o,enabled:n,matomoId:i,matomoTagManagerId:a}=window._mtdsTracking;if(i&&window._paq.push(["setSiteId",i]),n){o!=="custom"&&$c();const s=a?`https://cdn.matomo.cloud/${Go}/container_${a}.js`:`https://cdn.matomo.cloud/${Go}/matomo.js`;document.querySelector(`script[src="${s}"]`)||document.head.append(M("script",{async:"",src:s}))}}if(window._mtdsTracking?.enabled!==!1){if(window._mtdsTracking?.enabled==="debug")return console.info(`analytics ${t}:`,e);if(t==="pageview"){const{url:o,title:n}=e;window._paq.push(["setCustomUrl",o||location.href]),window._paq.push(["setDocumentTitle",n||document.title]),window._paq.push(["trackPageView"])}else if(t==="event"){const{category:o,action:n,name:i,value:a}=e,s=["trackEvent",o,n,i,a];let r=location.href;window._paq.push([function(){r=this.getCurrentUrl()}]),window._paq.push(["setCustomUrl",r.split("#")[0]]),window._paq.push(s.filter(c=>c!==void 0)),window._paq.push(["setCustomUrl",r])}else if(t==="search"){const{query:o,category:n=!1,results:i=!1}=e;window._paq.push(["trackSiteSearch",o,n,i])}else if(t==="matomo"){const o=e;Ec.includes(o?.[0])&&typeof o[1]!="string"&&(o[1]=`${o[1]??""}`),window._paq.push(o)}}}}function $c(){if(document.getElementById(z)||window.localStorage.getItem(z))return;document.body.insertAdjacentHTML("afterbegin",`<dialog id="${z}" data-analytics="ignore"><style>
|
|
20
|
-
#${
|
|
21
|
-
#${
|
|
22
|
-
#${
|
|
23
|
-
#${
|
|
24
|
-
#${
|
|
25
|
-
#${
|
|
28
|
+
::slotted([role="option"][hidden]) { display: none !important }`,cu=su(wn),ta,ea=0,du=mn||Je,oa="click,focusout,input,keydown,mousedown,mouseup",na="focus,focusin,blur,focusout",eo={singular:"%d hit",plural:"%d hits"},ia=class extends Xr{constructor(){super(),this._texts=Zd({},eo),this._value="",this._of="/",nu(this,wn)}static get observedAttributes(){return["id",...Object.keys(eo).map(e=>`data-sr-${e}`)]}connectedCallback(){this.hidden=!0,this._root=Qr(this),k(this,"role","listbox"),k(this,"tabindex","-1"),re(this._root,"focusin",this),re(this._root,"focus",this,!0),hn(this,{attributeFilter:["disabled","hidden","label","value"],attributes:!0,characterData:!0,childList:!0,subtree:!0}),setTimeout(()=>this.attributeChangedCallback())}disconnectedCallback(){Ze(this._root||this,"focus",this,!0),Ze(this._root||this,"focusin",this),hn(this,!1),En(this),this._root=void 0}attributeChangedCallback(e,o,n){const i=e?.split("data-sr-")[1],r=`input[list="${this.id}"]`;if(eo[i])this._texts[i]=n||eo[i];else if(this._root){this._input&&Sn(this,this._input);for(const a of this._root.querySelectorAll(r))Sn(this,a)}}handleEvent(e){const{target:o,type:n}=e;e.defaultPrevented||(n==="click"&&pu(this,e),(n==="focus"||n==="focusin")&&uu(this,e),(n==="blur"||n==="focusout")&&fu(this,e),n==="keydown"&&mu(this,e),n==="mousedown"&&this.contains(o)&&yn(e),(n==="mutation"||n==="input")&&(clearTimeout(ea),ea=setTimeout(sa,0,this,e)))}get options(){var e;if(!this._options){const o=(e=this.querySelector('[role="option"],option'))==null?void 0:e.nodeName;o&&(this._options=this.getElementsByTagName(o))}return this._options||this.getElementsByTagName("option")}},ra=t=>t?.disabled||t?.readOnly||!1,se=(t,e)=>{var o,n,i;if(t.hidden!==e)return;t.hidden=ra(t?._input)||!e,(o=hn(t))==null||o.takeRecords();const r=t.isConnected&&t.popover&&((n=t._input)==null?void 0:n.isConnected)&&((i=t._input)==null?void 0:i.popoverTargetElement)===t;t._input&&Sn(t,t._input,e),r&&k(t,"popover","manual"),r&&t.togglePopover(e),e&&sa(t)},En=t=>{t._input&&(Ze(t._input||t,na,t),Ze(t._root||t,oa,t),se(t,!1),t._input=void 0)},Sn=(t,e,o=!1)=>{t.popover&&k(e,"popovertarget",vn(t)),re(e,na,t,!0),k(e,"aria-autocomplete","list"),k(e,"aria-controls",vn(t)),k(e,"aria-expanded",`${!du||o}`),k(e,"autocomplete","off"),k(e,"role",ra(e)?null:"combobox")},uu=(t,e)=>{var o;const n=e.target instanceof HTMLInputElement;n&&e.isTrusted&&e.stopImmediatePropagation(),t._input!==e.target&&n&&e.target.list===t&&(t._input&&En(t),t._input=e.target,t._input.dispatchEvent(new FocusEvent("focus")),t._input.dispatchEvent(new FocusEvent("focusin",{bubbles:!0})),k(t,tu,vn((o=t._input.labels)==null?void 0:o[0])),re(t._root||t,oa,t),se(t,k(t._input,"inputmode")!=="none"),Zr())},fu=(t,e)=>{!Je&&!yn()&&t._input&&setTimeout(aa,0,t),e.target===t._input&&e.isTrusted&&e.stopImmediatePropagation()},aa=t=>{var e;const o=((e=t._root)==null?void 0:e.activeElement)||null,n=t._input;n&&n!==o&&!t.contains(o)&&(n.dispatchEvent(new FocusEvent("blur",{relatedTarget:o})),n.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:o})),En(t))},pu=(t,{target:e})=>{var o;if(!t._input||t._input===e)return se(t,!0);for(const n of t.options)if(n.contains(e))return k(t,"aria-multiselectable")!=="true"&&((o=t._input)==null||o.focus(),se(t,!1)),au(t._input,n.value);Je&&aa(t)},mu=(t,e)=>{var o;const{key:n,target:i,altKey:r,ctrlKey:a,shiftKey:l,metaKey:s}=e,c=n==="Escape"||n==="Esc";if(r||a||s||l||n==="Tab")return;c&&!t.hidden&&e?.preventDefault(),se(t,!c);const d=[...t.options].filter(h=>k(h,"aria-hidden")!=="true"&&h.offsetHeight),u=d.indexOf(i);let f=-1;if(n==="ArrowDown"&&(f=(u+1)%d.length),n==="ArrowUp"&&(f=(~u?u:d.length)-1),~u&&((n==="Home"||n==="PageUp")&&(f=0),(n==="End"||n==="PageDown")&&(f=d.length-1),n==="Enter"))return d[u].click(),e.preventDefault();if(d[f])for(const h of d)h.tabIndex=-1;d[f]&&e.preventDefault(),(o=d[f]||t._input)==null||o.focus(),!d[f]&&n==="ArrowUp"&&setTimeout(()=>{var h;return(h=t._input)==null?void 0:h.setSelectionRange(999,999)})},sa=(t,e)=>{const{_texts:o,_root:n,_input:i,options:r}=t,a=i?.value.toLowerCase().trim()||"",l=!t.hasAttribute("data-nofilter"),s=[],c=[];for(const f of r)(f.disabled||f.hidden||l&&!f.label.toLowerCase().includes(a)?s:c).push(f);for(const f of s)k(f,"aria-hidden","true");for(const f of c)k(f,"aria-hidden","false");const d=c.length;clearTimeout(ta),e?.type==="input"&&a!==t._value&&(ta=setTimeout(()=>{const f=`${!d&&t.innerText.trim()||`${o[d===1?"singular":"plural"]}`.replace("%d",`${d}`)}`;!t.hidden&&n?.activeElement===i&&Zr(f),t._value=a},1e3));let u=0;if(mn)for(const f of c)k(f,"title",`${++u} ${t._of} ${d}`)};ie&&Object.defineProperty(HTMLInputElement.prototype,"list",{configurable:!0,enumerable:!0,get(){return Qr(this).getElementById(k(this,"list")||"")}}),Jr.define("u-datalist",ia),Q()&&!Jl()&&Zl();const hu="3.2.0",la="_alert_14zqc_1 _ds-alert_w6yvp_3",ca="_app_14zqc_1",da="_sticky_14zqc_1",ua="_avatar_14zqc_1 _ds-avatar_w6yvp_1",fa="_badge_14zqc_1",pa="_breadcrumbs_14zqc_1 _ds-breadcrumbs_w6yvp_5",ma="_button_14zqc_1 _ds-button_w6yvp_1",ha="_card_14zqc_1",va="_group_14zqc_1",ga="_chip_14zqc_1 _ds-chip_w6yvp_5",ba="_details_14zqc_1 _ds-details_w6yvp_3",ya="_dialog_14zqc_1 _ds-dialog_w6yvp_5",_a="__drawer_14zqc_1",wa="_divider_14zqc_1",Ea="_errorsummary_14zqc_1 _ds-error-summary_w6yvp_5",Sa="_field_14zqc_1 _ds-field_w6yvp_1",xa="_suggestion_14zqc_1 _ds-suggestion_w6yvp_5",$a="_affixes_14zqc_1 _ds-field-affixes_w6yvp_3",Ta="_fieldset_14zqc_1 _ds-fieldset_w6yvp_3",Ca="_fileupload_14zqc_1",Aa="_helptext_14zqc_1 _ds-focus_w6yvp_1",ka="_input_14zqc_1 _ds-input_w6yvp_1",La="_law_14zqc_1",Ia="_grid_14zqc_1",Ma="_flex_14zqc_1",Oa="_link_14zqc_1",Ra="_logo_14zqc_1",Da="__logo_14zqc_1",Pa="_pagination_14zqc_1 _ds-pagination_w6yvp_5",Ha="_popover_14zqc_1 _ds-popover_w6yvp_3",Na="_print_14zqc_1",Ba="_progress_14zqc_1",qa="__indeterminate_14zqc_1",Ua="_skeleton_14zqc_1 _ds-skeleton_w6yvp_5",Fa="__skeleton_14zqc_1",za="_spinner_14zqc_1",Va="_steps_14zqc_1",Wa="_table_14zqc_1 _ds-table_w6yvp_5",Ga="__scrollShadow_14zqc_1",ja="_tabs_14zqc_1 _ds-tabs_w6yvp_5",Ka="__scrollMask_14zqc_1",Xa="_tag_14zqc_1 _ds-tag_w6yvp_5",Ya="_toast_14zqc_1",Qa="__toastClose_14zqc_1",Ja="__toastOpen_14zqc_1",Za="__toastTimeout_14zqc_1",ts="_togglegroup_14zqc_1 _ds-toggle-group_w6yvp_5",es="__tooltip_14zqc_1 _ds-tooltip_w6yvp_5",os="_heading_14zqc_1 _ds-heading_w6yvp_1",ns="_ingress_14zqc_1",is="_muted_14zqc_1",rs="_info_14zqc_1",as="_prose_14zqc_1",ss="_validation_14zqc_1 _ds-validation-message_w6yvp_1",ls="_body_14zqc_162",cs="__checked_14zqc_1",L={alert:la,app:ca,sticky:da,avatar:ua,badge:fa,breadcrumbs:pa,button:ma,card:ha,group:va,chip:ga,details:ba,dialog:ya,_drawer:_a,divider:wa,errorsummary:Ea,field:Sa,suggestion:xa,affixes:$a,fieldset:Ta,fileupload:Ca,helptext:Aa,input:ka,law:La,grid:Ia,flex:Ma,link:Oa,logo:Ra,_logo:Da,pagination:Pa,popover:Ha,print:Na,progress:Ba,_indeterminate:qa,skeleton:Ua,_skeleton:Fa,spinner:za,steps:Va,table:Wa,_scrollShadow:Ga,tabs:ja,_scrollMask:Ka,tag:Xa,toast:Ya,_toastClose:Qa,_toastOpen:Ja,_toastTimeout:Za,togglegroup:ts,_tooltip:es,heading:os,ingress:ns,muted:is,info:rs,prose:as,validation:ss,body:ls,_checked:cs},vu=Object.freeze(Object.defineProperty({__proto__:null,_checked:cs,_drawer:_a,_indeterminate:qa,_logo:Da,_scrollMask:Ka,_scrollShadow:Ga,_skeleton:Fa,_toastClose:Qa,_toastOpen:Ja,_toastTimeout:Za,_tooltip:es,affixes:$a,alert:la,app:ca,avatar:ua,badge:fa,body:ls,breadcrumbs:pa,button:ma,card:ha,chip:ga,default:L,details:ba,dialog:ya,divider:wa,errorsummary:Ea,field:Sa,fieldset:Ta,fileupload:Ca,flex:Ma,grid:Ia,group:va,heading:os,helptext:Aa,info:rs,ingress:ns,input:ka,law:La,link:Oa,logo:Ra,muted:is,pagination:Pa,popover:Ha,print:Na,progress:Ba,prose:as,skeleton:Ua,spinner:za,steps:Va,sticky:da,suggestion:xa,table:Wa,tabs:ja,tag:Xa,toast:Ya,togglegroup:ts,validation:ss},Symbol.toStringTag,{value:"Module"}));function ds(t){var e,o,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(o=ds(t[e]))&&(n&&(n+=" "),n+=o)}else for(o in t)t[o]&&(n&&(n+=" "),n+=o);return n}function gu(){for(var t,e,o=0,n="",i=arguments.length;o<i;o++)(t=arguments[o])&&(e=ds(t))&&(n&&(n+=" "),n+=e);return n}const le={capture:!0,passive:!0},j=()=>typeof window<"u"&&typeof document<"u",xt=t=>j()?document.getElementsByClassName(L[t].split(" ")[0]):[];function Wt(t,e){let o;return function(...n){clearTimeout(o),o=setTimeout(()=>t.apply(this,n),e)}}const g=(t,e,o)=>o===void 0?t.getAttribute(e)??null:(o===null?t.removeAttribute(e):t.getAttribute(e)!==o&&t.setAttribute(e,o),null),D=(t,...e)=>{const[o,...n]=e;for(const i of o.split(" "))t.addEventListener(i,...n);return()=>us(t,...e)},us=(t,...e)=>{const[o,...n]=e;for(const i of o.split(" "))t.removeEventListener(i,...n)},mt=(t,e)=>{if(!j())return;window._mtdsHotReloadCleanup||(window._mtdsHotReloadCleanup=new Map);const o=()=>{window._mtdsHotReloadCleanup?.get(t)?.map(n=>n()),window._mtdsHotReloadCleanup?.set(t,e())};document.readyState!=="complete"?D(window,"load",o):document.fonts?.ready?.then(o)||setTimeout(o,0)},oo=(t,e,o)=>{let n=0;const i=()=>{if(!t.isConnected)return r();e(a),a.takeRecords(),n=0},r=()=>a?.disconnect?.(),a=new MutationObserver(()=>{n||(n=requestAnimationFrame(i))});return a.observe(t,o),i(),r},O=(t,e,o)=>{const n=document.createElement(t);if(o&&(n.textContent=o),e)for(const[i,r]of Object.entries(e))g(n,i,r);return n},bu=typeof HTMLElement>"u"?class{}:HTMLElement,yu=(t,e)=>!j()||window.customElements.get(t)||window.customElements.define(t,e),_u=typeof window<"u"&&window.CSSStyleSheet&&document.adoptedStyleSheets,wu=(t,e)=>{if(!_u)return;t.shadowRoot||t.attachShadow({mode:"open"}).append(O("slot"));const o=new CSSStyleSheet;o.replaceSync(e),t.shadowRoot.adoptedStyleSheets=[o]},Eu=`[data-command="toggle-app-expanded"],.${L.app.split(" ")[0]} > [command="show-modal"]`,Su=`.${L.breadcrumbs.split(" ")[0]}`,xu=`.${L.card.split(" ")[0]}`,fs=`.${L.chip.split(" ")[0]}`,$u=`.${L.helptext.split(" ")[0]}`,Tu=`.${L.pagination.split(" ")[0]}`,Cu='summary,u-summary,a,button,[role="tab"],[role="button"]',xn="mattilsynet.matomo.cloud",Au=["setCustomUrl","setDocumentTitle","setReferrerUrl"],K="mtds-analytics-banner",ku="https://www.mattilsynet.no/om-mattilsynet/personvernerklaering/informasjonskapsler";function ps(t,e={}){if(j()){if(window._paq||(window._paq=[],window._paq.push(["HeatmapSessionRecording::disable"]),window._paq.push(["enableLinkTracking"]),window._paq.push(["setTrackerUrl",`https://${xn}/matomo.php`])),window._mtm||(window._mtm=window._mtm||[],window._mtm.push({"mtm.startTime":Date.now(),event:"mtm.Start"})),t==="init"){window._mtdsTracking={enabled:window.location.hostname!=="localhost",...window._mtdsTracking,...e};const{consent:o,enabled:n,matomoId:i,matomoTagManagerId:r}=window._mtdsTracking;if(i&&window._paq.push(["setSiteId",i]),n){o!=="custom"&&Lu();const a=r?`https://cdn.matomo.cloud/${xn}/container_${r}.js`:`https://cdn.matomo.cloud/${xn}/matomo.js`;document.querySelector(`script[src="${a}"]`)||document.head.append(O("script",{async:"",src:a}))}}if(window._mtdsTracking?.enabled!==!1){if(window._mtdsTracking?.enabled==="debug")return console.info(`analytics ${t}:`,e);if(t==="pageview"){const{url:o,title:n}=e;window._paq.push(["setCustomUrl",o||location.href]),window._paq.push(["setDocumentTitle",n||document.title]),window._paq.push(["trackPageView"])}else if(t==="event"){const{category:o,action:n,name:i,value:r}=e,a=["trackEvent",o,n,i,r];let l=location.href;window._paq.push([function(){l=this.getCurrentUrl()}]),window._paq.push(["setCustomUrl",l.split("#")[0]]),window._paq.push(a.filter(s=>s!==void 0)),window._paq.push(["setCustomUrl",l])}else if(t==="search"){const{query:o,category:n=!1,results:i=!1}=e;window._paq.push(["trackSiteSearch",o,n,i])}else if(t==="matomo"){const o=e;Au.includes(o?.[0])&&typeof o[1]!="string"&&(o[1]=`${o[1]??""}`),window._paq.push(o)}}}}function Lu(){if(document.getElementById(K)||window.localStorage.getItem(K))return;document.body.insertAdjacentHTML("afterbegin",`<dialog id="${K}" data-analytics="ignore"><style>
|
|
29
|
+
#${K}[open] { box-sizing: border-box; display: flex; align-items: center; background: #116e6b; border-radius: .5em; border: 0; box-shadow: 0 .25em .5em rgba(0,0,0,.3); color: #fff; font-size: .875em; inset: auto auto 1em 1em; max-width: calc(100vw - 2em); outline: 0; padding: .5em; position: fixed; z-index: 99999 }
|
|
30
|
+
#${K} button { all: unset; box-sizing: border-box; cursor: pointer; display: flex; width: 1.5em; height: 1.5em; font: 300 1.5em/1.35 sans-serif; border-radius: .25em; place-content: center; transition: .2s; transition-property: background, scale }
|
|
31
|
+
#${K} button:focus-visible { outline: 2px solid }
|
|
32
|
+
#${K} button:hover { background: #0a4e4f }
|
|
33
|
+
#${K} button:active { background: #054449; scale: .9 }
|
|
34
|
+
#${K} p { margin: 0 .25em }
|
|
26
35
|
</style>
|
|
27
|
-
<p>Vi bruker <a href="${
|
|
36
|
+
<p>Vi bruker <a href="${ku}" target="_blank">informasjonskapsler</a> for å forbedre brukeropplevelsen.</p>
|
|
28
37
|
<form method="dialog" data-analytics="ignore"><button type="submit" aria-label="OK">×</button></form>
|
|
29
|
-
</dialog>`);const e=document.getElementById(
|
|
38
|
+
</dialog>`);const e=document.getElementById(K),o=()=>window.localStorage.setItem(K,"seen");e.addEventListener("close",o,{once:!0}),e.show()}function Iu(t){window._mtdsTracking?.enabled&&setTimeout(Mu,0,t)}function Mu({type:t,target:e}){const o=t==="click"?e?.closest?.(Cu):e;if(!(o instanceof Element)||o.closest('[data-analytics="ignore"]'))return;let n="click",i="Button",r=ms(o)||Du(o)||g(o,"data-tooltip")||"";if(t==="submit")i="Form",n="submit",r=r||document.title;else if(t==="toggle"){if(!o.matches("dialog:modal"))return;i="Dialog",n="open"}else if(t==="change"){const a=g(o,"type"),l=a==="checkbox"||a==="radio"?o.closest("fieldset"):null;i=o.closest(fs)?"Chip":"Form",n="change",r=ms(l||o)||ce(l?.querySelector("legend"))||ce(o?.labels?.[0])}else if(g(o,"role")==="tab")i="Tab",n="navigate";else if(g(o,"popovertarget")){if(!Ou(o)?.matches(":popover-open"))return;i=o.closest($u)?"HelpText":"Popover",n="open"}else if(o.nodeName.endsWith("SUMMARY")){if(!o.parentElement.open)return;i="Details",n="open"}else if(o.matches(Eu)){const a=Ru(o,"--mtds-tooltip-position")==="none";i="Sidebar",n=a?"expand":"minimize",r=a&&g(o,"data-tooltip")||ce(o)}else if(o.closest(Su))i="Breadcrumbs",n="navigate";else if(o.closest(Tu))i="Pagination",n="navigate";else if(o.closest(xu))i="Card",n=o instanceof HTMLAnchorElement?"navigate":"click";else if(o.closest(fs))i="Chip",n=o.hasAttribute("data-removable")?"remove":"click";else if(o.closest("th[aria-sort]"))i="Table",n="sort";else if(o instanceof HTMLAnchorElement)i="Link",n=o.protocol==="mailto:"?"email":"navigate",o.hasAttribute("download")?n="download":o.hash&&o.href.startsWith(location.href.split("#")[0])&&(n="anchor");else if(o.hasAttribute("aria-expanded")){if(g(o,"aria-expanded")!=="true")return;i="Expand",n="open"}else o.nodeName.startsWith("MTDS-ATLAS-")&&(i="Map Marker",n="open");ps("event",{category:g(o,"data-analytics-category")??i,action:g(o,"data-analytics-action")??n,name:g(o,"data-analytics-name")??r})}const ce=t=>t?.textContent?.trim()||"",ms=t=>t&&g(t,"aria-label")||"",Ou=t=>document.getElementById(g(t,"popovertarget")||""),Ru=(t,e)=>window.getComputedStyle(t).getPropertyValue(e)?.trim(),Du=t=>{const e=ce(t),o=ce(t.querySelector("h1,h2,h3,h4,h5,h6"));return e.startsWith(o)&&o||e.slice(0,100).trim()};mt("analytics",()=>[D(document,"click toggle submit change",Iu,le)]),typeof window<"u"&&window.CSSStyleSheet&&document.adoptedStyleSheets&&(()=>{const t="--mtds-app-expanded",e=new CSSStyleSheet,o=()=>!window.localStorage.getItem(t)?.includes("false");document.adoptedStyleSheets.push(e),window.mtdsToggleAppExpanded=n=>{try{const i=n??!o();e.replaceSync?.(`:root { ${t}: var(${t}--${i})}`),window.localStorage.setItem(t,i)}catch{}},window.mtdsToggleAppExpanded(o())})();const $n=L.app.split(" ")[0],Pu=`[data-command="toggle-app-expanded"],.${$n} > [command="show-modal"]`,Tn=`.${$n} > dialog,.${$n} dialog ~ main`,hs=xt("sticky"),vs=t=>{document.startViewTransition?document.startViewTransition(t):t()},gs=t=>vs(()=>window.mtdsToggleAppExpanded?.(t));function Hu(t){const{target:e,defaultPrevented:o}=t,n=e?.closest?.("a");if(n?.closest("dialog")&&n?.closest(Tn))return bs();if(o||!(e instanceof HTMLButtonElement)||!e.matches(Pu))return;const i=getComputedStyle(e).position==="sticky";t.preventDefault(),i?gs():vs(()=>{const r=document.querySelector(Tn);r?.setAttribute("closedby","any"),r?.showModal()})}function bs(){document.querySelector(Tn)?.close()}let Cn=0,Gt,dt=0,An=0,no=0,kn=!1,Ln=0,$t=0;function Nu(){if(!hs?.length)return;const t=hs[0],e=window.scrollY,o=e<$t;$t=e,o!==Gt&&(Cn=(t.parentElement?.getBoundingClientRect().top||0)+$t,Gt=o,An=t.offsetHeight,no=t.getBoundingClientRect().top+$t,kn=t.offsetHeight<=window.innerHeight,Ln=window.innerHeight),!(dt===-1&&kn)&&(dt!==-1&&(kn||Gt&&$t<=no)?(t.style.setProperty("--pos","sticky"),t.style.setProperty("--top","0px"),dt=-1):dt===-1&&!Gt?(t.style.setProperty("--pos","relative"),t.style.setProperty("--top",`${Math.max(0,$t-Cn)}px`),dt=0):dt!==1&&!Gt&&$t+Ln>=no+An?(t.style.setProperty("--pos","sticky"),t.style.setProperty("--top",`${Ln-An}px`),dt=1):dt===1&&Gt&&(t.style.setProperty("--pos","relative"),t.style.setProperty("--top",`${no-Cn}px`),dt=0))}mt("app",()=>[D(document,"click",Hu,!0),D(window,"resize",Wt(bs,100),le),D(window,"scroll",Nu,le)]);const Bu=/<[^>]+\bid="([^"]+)[^>]+>/gi,ys=/\([^)]{1,4}\).{1,9}\d+\/\d+/i,qu=/<(h\d|[^>]+role="heading")[^>]*>(.*?)<\/?(h\d|br|div)/i,Uu=/kapittel-\d+-ledd-\d+/,Fu=/<button[^>]+>.*?<\/button>/g,zu=/►m\d+/i,io=/<[^>]+>/g,Vu=/<dt([^>]*class="([^"]+)")?[^>]*>(.*?)<\/dt><dd[^>]*>(.*?)<\/dd>/gis,Wu=/<(\/?)(article|footer|section)/gi,Gu=/(src|href)="([^"]+)"/gi,ju=/(<li[^>]*)>\s*<div([^>]*>)|<\/div>(<\/li>)/gi,Ku=/(<li[^>]+data-name="([^"]+)[^>]+>)(\s*<(ul|ol|div)[^>]+>)/gis,Xu=/(<[^>]+class="[^"]*\bnumberedLegalP\b[^>]+>\s*)(\d+\.)(.*?)(?=<\/?(ul|ol|div)|$)/gis,_s="https://lovdata.no/",Yu="https://www.mattilsynet.no/regelveiledning/?regelverk=",Qu={dokid:{label:"DokumentID",value:""},legacyid:{label:"Datokode",value:""},refid:{label:"RefID",value:""},title:{label:"Tittel",value:""},titleshort:{label:"Korttittel",value:""},url:{label:"Url",value:""}},In=t=>Array.from(Array.isArray(t)?t:[t],e=>e instanceof HTMLButtonElement?e.value:e),Ju=t=>Array.from(t?.querySelectorAll('button[aria-checked="true"]')||[],e=>e.value),Zu=(t,e)=>{const o=In(t);e?.querySelectorAll("button").forEach(n=>{o.includes(n.value)&&g(n,"aria-checked",`${g(n,"aria-checked")!=="true"}`)})},tf=(t,e)=>{const o=In(t);e?.querySelectorAll("button").forEach(n=>{g(n,"aria-checked",`${o.includes(n.value)||!1}`)})},ef=(t,e)=>{const o=ws(e);return In(t).map(n=>nf(n,o)).filter(n=>!!n)},of=t=>{const e=t.slice(0,t.indexOf("</dl>")),o={...Qu};for(const n of e.matchAll(Vu)){const i=n[2].replace(/-/g,"").toLowerCase();o[i]={label:n[3],value:n[4]}}return o},ws=t=>t.includes("<main")?(t.split(/<\/?main[^>]*>/)[1]||"").replace(Wu,"<$1div").replace(ju,"$1$2$3").replace(Gu,(e,o,n)=>`${o}="${n.includes(":")?"":_s}${n}" ${o==="href"?'rel="noopener noreferrer" target="_blank"':""}`).replace(Xu,(e,o,n,i)=>`${o}<span class="data-originalId">${n}</span><div class="legalP" id="${Tt("id",o)}-ledd-0">${i}</div>`).replace(Ku,(e,o,n,i)=>`${o}<span class="data-originalId">${n}</span>${i}`).replace(Bu,(e,o,n,i)=>{const r=Es(e,o,n,i);return`${e}${r?`<button type="button" role="checkbox" aria-label="${r}" value="${o}"></button>`:""}`}):t,nf=(t,e)=>{const o=Uu.test(t),n=t.split("-").map((c,d,u)=>d%2?rf(u.slice(0,d+1).join("-"),e,o):null).filter(c=>!!c);if(!n.length)return null;const i=n.filter(({guideUrl:c})=>c).pop()?.guideUrl,r=n.filter(({url:c})=>c).pop(),a=n.filter(c=>c.className==="section"&&ys.test(c.label)).pop(),l=r?`${_s}${r.url}`:"",s=n.slice(n.indexOf(a||n[0])).map(({label:c})=>c).join(", ");return{...n.slice(-1)[0],path:n,label:s,url:l,guideUrl:i}},rf=(t,e,o)=>{const n=e.lastIndexOf("<",e.indexOf(` id="${t}"`)),i=e.slice(n,e.indexOf(">",n)+1),r=Tt("class",i),a=Tt("data-lovdata-url",i),l=Es(i,t,n,e),[s,c,d]=a.match(/(lov|forskrift)\/([^/]+)/)||[],u=`${c?.slice(0,3).toUpperCase()}-${d}`;return{id:t,className:r,guideUrl:a&&`${Yu}${u}_${t}`,html:af(t,e),url:a,label:!o&&r==="section"&&l?.match(ys)?.[0]||l}},Tt=(t,e)=>{const o=` ${t.toLowerCase()}="`,n=e.toLowerCase().indexOf(o),i=n+o.length;return n===-1?"":e.slice(i,e.indexOf('"',i))},af=(t,e)=>{const o=e.lastIndexOf("<",e.indexOf(` id="${t}"`)),n=e.length;let i=o+1,r=0;for(;i&&i<n;)if(i=e.indexOf("<",i)+1,e[i]!=="/")r++;else if(--r<0)break;const a=e.indexOf(">",i)+1;return i?e.slice(o,a).replace(Fu,""):""},Es=(t,e,o,n)=>sf[Tt("class",t)]?.(t,e,o,n)||"",sf={numberedLegalP:t=>`nr. ${Tt("data-numerator",t)}.`,section:(t,e,o,n)=>n.slice(o).match(qu)?.[2]?.replace(io,"")?.replace(zu,"").trim()||"",legalArticle:(t,e,o,n)=>{const i=n.indexOf(">",n.indexOf("legalArticleValue",o));return n.slice(i+1,n.indexOf("</span>",i)).replace(io,"").replace("Artikkel","artikkel")},legalP:(t,e)=>{const[o,n,i,r]=e.split("-").reverse();return`avsnitt ${(n==="nummer"?1:Number(o))+(r==="nummer"?1:0)}`},listArticle:(t,e,o,n)=>{const i=e.split("-"),r=` id="${i.slice(0,-2).join("-")}"`,a=n.lastIndexOf(r,o),l=n.slice(n.indexOf("<ol",a),o),s=Tt("data-name",t)||"-",c=Tt("type",l)||"-";let d="punkt";return c==="1"&&(d="tall"),c==="a"&&(d="bokstav"),c==="i"&&(d="romtertall"),`${d} ${s==="-"?i.pop():s.replace(io,"")}`},marginIdArticle:(t,e,o,n)=>{const i=n.indexOf(">",n.indexOf("data-marginOriginalId",o));return`nr. ${n.slice(i+1,n.indexOf("</span>",i)).replace(io,"")}`}};function N(t,e={}){const o=document.getElementById(e.id||"")||O("dialog");return g(o,"aria-busy",e.busy?"true":null),g(o,"class",gu(L.toast,e.className)),g(o,"closedby",e.closedby||null),g(o,"data-color",e.color||null),g(o,"data-icon",`${e.icon??""}`||null),g(o,"data-timeout",`${e.timeout??""}`||null),g(o,"id",e.id||`${Date.now()}`),g(o,"open",e.open===!1?null:""),o.innerHTML=t,D(o,"animationend",lf,{once:!0}),document.body.appendChild(o),o.id}function lf({animationName:t,target:e}){t===L._toastClose&&e.remove()}N.success=(t,e)=>N(t,{color:"success",...e}),N.danger=(t,e)=>N(t,{color:"danger",...e}),N.info=(t,e)=>N(t,{color:"info",...e}),N.warning=(t,e)=>N(t,{color:"warning",...e}),N.neutral=(t,e)=>N(t,{color:"neutral",...e}),N.promise=async function(e,o){const{loading:n,success:i,error:r,...a}=o,l=N(n,{busy:!0,...a});try{const s=await e();return N.success(i,{id:l,busy:!1}),s}catch(s){throw N.danger(r,{id:l,busy:!1}),s}};const cf=`/* NOTE: Using --mtds- not --mtds- since we're inside shadow dom */
|
|
30
39
|
:host(:not([hidden])) { display: grid; gap: var(--mtds-6) }
|
|
31
40
|
[data-event] { cursor: pointer } /* Used to forward clicks from Chart ShaowDOM to relevant cell in child table */
|
|
32
41
|
|
|
@@ -193,8 +202,11 @@ Please use <details> and <summary>, but import '@u-elements/u-details/polyfill'
|
|
|
193
202
|
vertical-align: middle;
|
|
194
203
|
width: var(--mtds-5);
|
|
195
204
|
}
|
|
196
|
-
`,id=[.1,.2,.25,.5,1];function ad(t,{aspect:e,type:o}){const i=o==="stacked",a=t[0].reduce((v,f,g)=>{const h=t.map(_=>_[g].number),w=h.reduce((_,y)=>_+y,0);return Math.max(v,...i?[w]:h)},0),s=a/10,r=10**`${Math.round(s)}`.length,c=s/r,l=(id.find(v=>v>c)||1)*r,d=Math.ceil(a/l)*l,u=M("div",{"aria-label":t[0][0].value||null,class:"axis",role:"figure"});e&&u.style.setProperty("--mtdsc-chart-aspect",e),u.style.setProperty("--bars",`${t[0]?.length-1}`),u.style.setProperty("--groups",`${t.length-1}`),u.style.setProperty("--total",`${d}`);const m=u.appendChild(M("div",{class:"axisSteps"})),p=u.appendChild(M("div",{class:"axisGroups"}));return Array.from({length:d/l+1},(v,f)=>sd(l*f)).reverse().map(v=>m.append(M("div",{class:"axisStep","data-label":v}))),{total:d,groups:p,axis:u}}const sd=new Intl.NumberFormat().format;function rd(t){return t[0].slice(1).map(({value:e,event:o},n)=>{const i=M("div",{class:"axisGroup","data-label":e}),a=i.appendChild(M("div",{class:"axisGroupContent"}));return t.slice(1).map(s=>s[n+1]).map(({tooltip:s,color:r,number:c})=>{const l=M("div",{"aria-label":s,"data-event":o,class:"bar",role:"img",tabindex:"0"});return l.style.setProperty("--color",r),l.style.setProperty("--value",`${c}`),a.appendChild(l)}),i})}function ld(t,{total:e,type:o,variant:n}){const i=Number.parseFloat(o||"0")||0,a=M("div",{class:"axisGroup"});return t.slice(1).forEach(([,...s])=>{const r=M("div",{class:"lineContainer",role:"list"});r.style.setProperty("--color",s[0].color);const c=cd(s.map(({number:u},m,{length:p})=>[100/(p-1)*m,100-u/e*100]),i/100),l=document.createElementNS("http://www.w3.org/2000/svg","svg");b(l,"aria-hidden","true"),b(l,"preserveAspectRatio","none"),b(l,"viewBox","0 0 100 100");const d=document.createElementNS("http://www.w3.org/2000/svg","path");if(b(d,"class","line"),b(d,"d",c),b(d,"fill","none"),b(d,"stroke","currentColor"),n==="area"){const u=d.cloneNode(!0);b(u,"d",`M-100,100 L${c.slice(1)}L200,100`),b(u,"class","lineShade"),l.append(u)}s.forEach(({number:u,tooltip:m,event:p})=>{const v=M("div",{role:"listitem"}),f=M("div",{"aria-label":m,"data-event":p,tabindex:"0",class:"linePoint",role:"img"});f.style.setProperty("--value",`${u}`),v.appendChild(f),r.append(v)}),r.appendChild(l).append(d),a.append(r)}),a}const cd=(t,e)=>t.map(([o,n],i,a)=>i?dd(i,a,e):`M${o},${n}`).join(" "),ms=([t,e],[o,n])=>[t+o,e+n],ps=([t,e],[o,n])=>[t-o,e-n],hs=(t,[e,o])=>[t*e,t*o],dd=(t,e,o)=>{const n=e[t-1],i=e[t],[a,s]=ms(n,hs(o,ps(i,e[t-2]||n))),[r,c]=ms(i,hs(o,ps(n,e[t+1]||i)));return`C ${a},${s} ${r},${c} ${i[0]},${i[1]}`};function ud(t,{aspect:e,variant:o}){const n=document.createElementNS("http://www.w3.org/2000/svg","svg");e&&n.style.setProperty("--mtdsc-chart-aspect",e),b(n,"class","pie"),b(n,"viewBox","0 0 100 100");let i=0;const a=50,s=o==="doughnut"?25:0,r=t.slice(1).reduce((c,[,l])=>c+l.number,0);return t.slice(1).forEach(([,{tooltip:c,number:l,event:d,color:u}])=>{if(!l)return;const m=document.createElementNS("http://www.w3.org/2000/svg","path"),p=i/r;i+=l;const v=Math.min(i/r,.99999),f=v-p>.5?1:0,g=2*Math.PI*(p-.25),h=2*Math.PI*(v-.25),w=Math.cos(g),_=Math.sin(g),y=Math.cos(h),T=Math.sin(h),S=`M ${a+s*w} ${a+s*_} L ${a+a*w} ${a+a*_} A ${a} ${a} 0 ${f} 1 ${a+a*y} ${a+a*T} L ${a+s*y} ${a+s*T} A ${s} ${s} 0 ${f} 0 ${a+s*w} ${a+s*_}`;m.style.setProperty("--color",u),b(m,"aria-label",c),b(m,"data-event",d),b(m,"d",S),b(m,"role","img"),b(m,"tabindex","0"),n.appendChild(m)}),n}const gs="click keydown mousemove mouseout",bs="mtds-chart-tooltip",lt=V()?document.getElementById(bs)||M("div",{"aria-hidden":"true",class:A._tooltip,hidden:"",id:bs}):null;class fd extends mc{#t;#e;static get observedAttributes(){return["data-variant","data-aspect"]}constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const e=Ot(()=>this.attributeChangedCallback(),100),o=new ResizeObserver(()=>this.handleResize());o.observe(this),this.#e=()=>o.disconnect(),this.#t=Oe(this,e,{attributeFilter:["data-tooltip"],attributes:!0,characterData:!0,childList:!0,subtree:!0}),requestAnimationFrame(()=>this.attributeChangedCallback()),O(this,gs,this)}disconnectedCallback(){lt&&(lt.hidden=!0),es(this,gs,this),this.#e?.(),this.#t?.(),this.#t=this.#e=void 0}attributeChangedCallback(){const e=hd(this.querySelector("table"));if(!e[0])return;Array.from(this.shadowRoot?.children||[]).map(l=>l.remove());const[o,n]=(b(this,"data-variant")||"column").split("-"),i=b(this,"data-aspect")||void 0,a=M("div",{"aria-hidden":"hidden",class:"legends",role:"group"});e.slice(1).forEach(([{value:l,color:d}])=>{const u=M("div",{class:"legend"},l);a.appendChild(u).style.setProperty("--color",d)});const{axis:s,groups:r,total:c}=ad(e,{aspect:i,type:n});(o==="column"||o==="bar")&&r.append(...rd(e)),(o==="line"||o==="area")&&r.append(ld(e,{total:c,variant:o,type:n})),(o==="doughnut"||o==="pie")&&this.shadowRoot?.append(ud(e,{aspect:i,variant:o})),this.shadowRoot?.append(s,a),gc(this,nd)}handleEvent(e){e.type==="click"||e.type==="keydown"?md(e,this):pd(e)}handleResize(){const e=this.shadowRoot?.firstElementChild,o=e?.firstElementChild;e?.classList.toggle("axisStepsYHalf",(o?.offsetHeight||0)<400),e?.classList.toggle("axisStepsXHalf",(o?.offsetWidth||0)<500)}}function md(t,e){if(t instanceof KeyboardEvent&&t.key!=="Enter")return;const o=t.composedPath()[0],n=e.querySelector("table"),[i,a]=o instanceof Element&&b(o,"data-event")?.split("-").map(Number)||[];n?.rows[i]?.cells[a]?.querySelector("a,button")?.click?.()}let vs="";function pd(t){if(!lt)return;lt?.isConnected||document.body.append(lt);const e=t.composedPath()[0],o=e instanceof Element&&e.getAttribute("aria-label")||"";o&&(lt.style.transform=`translate(${Math.min(t.clientX,window.innerWidth)}px, ${t.clientY}px)`),o!==vs&&(o&&(lt.textContent=o),vs=o,lt.hidden=!o)}const Jo=t=>t?.textContent?.trim()||"",hd=t=>Array.from(t?.rows||[]).map((e,o,{length:n})=>Array.from(e.cells,(i,a)=>{const s=Jo(e.cells[0]),r=Jo(t?.rows[0].cells[a]),c=Jo(i),l=n===2?`${r}: ${c}`:`${s}: ${c}${r?` (${r})`:""}`;return b(i,"tabindex","-1"),{number:a&&o&&Number.parseFloat(c)||0,event:i.querySelector("a,button")&&`${o}-${a}`,color:`var(--mtdsc-chart-color-${o}-${a}, var(--mtdsc-chart-color-${o}, var(--mtdsc-chart-color-base)))`,value:c,tooltip:b(i,"data-tooltip")||l}}));pc("mtds-chart",fd);const ws=new WeakSet,H=t=>!ws.has(t)&&ws.add(t),D=(t,e,o)=>window.dsWarnings===!1||console.warn(`\x1B[1m@mattilsynet/design:\x1B[m ${t} is deprecated, please use ${e}:`,o),gd=yt("togglegroup"),ys=A.button.split(" "),bd=()=>{for(const t of gd){H(t)&&!t.hasAttribute("data-toggle-group")&&(b(t,"data-toggle-group","Valgknapper"),D('Only setting class="styles.togglegroup"','data-toggle-group="LABEL-HERE" attribute also for better accessibility',t));for(const e of t.getElementsByTagName("label"))H(e)&&!e.classList.contains(ys[0])&&(e.classList.add(...ys),D('Only setting class="styles.button"','<label class="styles.button">',e))}},vd=yt("breadcrumbs"),wd=()=>{for(const t of vd)H(t)&&t.nodeName!=="DS-BREADCRUMBS"&&(t.classList.add(...A.breadcrumbs.split(" ")),D('Only setting class="styles.breadcrumbs"','<ds-breadcrumbs class="styles.breadcrumbs">',t))},yd=yt("errorsummary"),_d=()=>{for(const t of yd)H(t)&&t.nodeName!=="DS-ERROR-SUMMARY"&&D('Only setting class="styles.errorsummary"','<ds-error-summary class="styles.errorsummary">',t)},xd=yt("dialog"),_s=()=>{for(const t of xd){if(H(t)){const e=b(t,"data-closedby");e&&(b(t,"closedby",e),D(`<dialog data-closedby="${e}">`,`<dialog closedby="${e}">`,t)),t.hasAttribute("data-variant")&&D('<dialog data-variant="drawer">','<dialog data-placement="center|left|right|top|bottom">',t)}t.isConnected&&t.showModal&&t.close&&(t.matches('[open][data-modal]:not([data-modal="false"]):not(:modal)')?(D('<dialog data-modal="true">','.showModal() or <button command="show-modal" commandfor="DIALOG-ID"></button>',t),b(t,"open",null),t.showModal()):t.matches(":modal:not([open])")&&(b(t,"open",""),t.close()))}},Ed=()=>{for(const t of document.querySelectorAll("[data-count]"))if(H(t)){const e=b(t,"data-count");t.classList.add(...A.validation.split(" ")),b(t,"data-limit",e),D(`data-count="${e}"`,`class="styles.validation" data-field="counter" data-limit="${e}"`,t)}},Sd=()=>{for(const t of document.querySelectorAll("[data-command]"))if(H(t)){const e=b(t,"data-command");e==="row"?D(`<${t.nodeName.toLowerCase()} data-command="${e}">`,`<tr data-clickdelegatefor="${t.nodeName}-ID">`,t):D(`<button data-command="${e}">`,`<button command="${e?.replace("toggle-app-expanded","show-modal")}" commandfor="TARGET-ID">`,t)}},$d=V()?document.getElementsByTagName("u-tabs"):[],Td=()=>{for(const t of $d)H(t)&&D("u-tabs","ds-tabs",t)},Zo=A.suggestion.split(" "),kd=V()?document.getElementsByTagName("u-combobox"):[],Ad=V()?document.getElementsByTagName("ds-suggestion"):[],Cd=()=>{for(const t of kd)H(t)&&(t.classList.add(...Zo),D("<u-combobox>",'<ds-suggestion class="styles.suggestion">',t));for(const t of Ad)H(t)&&!t.classList.contains(Zo[0])&&(t.classList.add(...Zo),D("Only using <ds-suggestion>",'<ds-suggestion class="styles.suggestion">',t))},Ld=({target:t})=>{if(!(t instanceof Element))return;const e=t?.closest("tr")?.querySelector('[data-command="row"]');e&&!t?.closest('a,button,label,input,select,textarea,[role="button"]')&&e.click();const n=t?.closest("dialog");n&&t?.closest('[data-command="close"]')&&n.close()},Md=yt("field"),He=new Set,Rd=()=>{for(const t of Md)t.nodeName!=="DS-FIELD"&&(H(t)||D('Only setting class="styles.field"','<ds-field class="styles.field">',t),!He.has(t)&&He.add(t)&&$e.prototype.connectedCallback.call(t))},Id=()=>{for(const t of He)$e.prototype.disconnectedCallback.call(t),He.delete(t)},Od=`[data-description], .${A.field.split(" ")[0]} label + p`,Dd=()=>{for(const t of document.querySelectorAll(Od))H(t)&&t.getAttribute("data-field")!=="description"&&(b(t,"data-field","description"),D("Descriptions created by data-description of <p> only",'data-field="data-description"',t))},Pd=yt("validation"),Hd=()=>{for(const t of Pd)H(t)&&!t.hasAttribute("data-field")&&(b(t,"data-field","validation"),D('Only setting class="styles.validation"','class="styles.validation" data-field="validation"',t))},Nd=()=>{for(const t of document.querySelectorAll("[popover][data-position]"))H(t)&&(b(t,"data-placement",b(t,"data-position")),D("data-position","data-placement",t))},qd=Ot(()=>{Ed(),Sd(),wd(),_s(),_d(),Dd(),Hd(),Nd(),Rd(),bd(),Cd(),Td()},200);rt("deprecations",()=>[Id,O(document,"click",Ld,zt),O(document,"toggle",_s,!0),Oe(document,qd,{attributeFilter:["class","data-command","data-count","data-description","data-variant","open"],attributes:!0,childList:!0,subtree:!0})]);const Bd=Ot(t=>{if(t.animationName!==A._logo)return;const e=t.target.closest?.(`.${A.logo.split(" ")[0]}`),o=e?.firstElementChild;if(o instanceof SVGSVGElement){for(const c of document.head.querySelectorAll("link[rel~='icon']"))c.setAttribute("rel","disabled");const n=e?.hasAttribute("data-env"),i=window.getComputedStyle(o),a=i.getPropertyValue("color"),s=i.getPropertyValue("--mtdsc-logo-background"),r=o.outerHTML.replace(/\n+/g," ").replace(/(fill|width|height|xmlns)="[^"]+"/gi,"").replace("<svg",`<svg width="40" height="40" fill="${a}"`);document.head.appendChild(M("link",{href:`data:image/svg+xml,${encodeURIComponent(`<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 55 55'><rect fill='${n?"none":s}' width='51' height='51' x='2' y='2' stroke='${a}' 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)">${r}</g></svg>`)}`,rel:"icon"}))}},200);rt("logo",()=>[O(document,"animationend",Bd)]);const Ud=A.popover.split(" ")[0];function Fd({target:t}){const e=t?.closest?.('a,button,[role="button"]'),o=e instanceof HTMLButtonElement,n=e&&b(e,"popovertarget"),i=n?document.getElementById(n):e?.closest("[popover]");if(!(n&&o)&&i?.classList.contains(Ud)&&e){const a=b(e,"popovertargetaction"),s=a==="show"||(a==="hide"?!1:void 0);if(o&&!a&&i.contains(e))return;i instanceof HTMLElement&&i.popover&&i.togglePopover(s)}}rt("popover",()=>[O(document,"click",Fd)]);const Wd=V()?document.getElementsByTagName("table"):[],Gd=()=>{for(const t of Wd){const e=Array.from(t.tHead?.rows[0]?.cells||[],o=>o.innerText.trim());for(const o of t.tBodies)for(const n of o.rows)for(const i of n.cells)b(i,"data-th",e[i.cellIndex]||":empty")}};rt("table",()=>[Oe(document,Ot(Gd,200),{attributeFilter:["data-mobile"],attributes:!0,childList:!0,subtree:!0})]);const xs=A.toast.split(" ")[0],Ne="data-sort";function Vd({animationName:t,target:e}){const o=e;if(t===A._toastTimeout&&o.close(),t!==A._toastOpen)return;const n=Number(b(o,"data-timeout"));o.style.setProperty("--mtdsc-toast-timeout",n?`${n}ms`:null),o.hasAttribute(Ne)||b(o,Ne,`${Date.now()}`),b(o,"tabindex","0"),[...document.querySelectorAll(`.${xs}[open]`)].sort((i,a)=>Number(b(a,Ne))-Number(b(i,Ne))).reduce((i,a)=>(a.style.translate=`0 ${a===e?0:i}px`,i+a.offsetHeight+5),0)}function zd({target:t,clientX:e,clientY:o}){if(t instanceof HTMLDialogElement&&t.classList.contains(xs)&&b(t,"data-closedby")!=="none"){const n=t.getBoundingClientRect(),i=window.getComputedStyle(t),a=window.getComputedStyle(t,"::after"),s=n.top+Number.parseInt(i.paddingTop,10),r=s+Number.parseInt(a.height,10),c=n.right-Number.parseInt(i.paddingRight,10),l=c-Number.parseInt(a.width,10);s<=o&&o<=r&&l<=e&&e<=c&&t.close()}}rt("toast",()=>[O(document,"animationstart",Vd),O(document,"click",zd)]),V()&&mi(document.getElementById("mtds-tooltip")||M("div",{class:A._tooltip,id:"mtds-tooltip",popover:"manual"}));const tn=`.${A.field.split(" ")[0]}`,Xd=`${tn} :is(input,textarea,select)`,jd="ds-suggestion,u-combobox",Kd=A.validation.split(" ")[0],qe=t=>t instanceof HTMLFormElement&&b(t,"data-validation")==="form",en=t=>t.closest(tn),on=t=>t?.querySelectorAll(Xd)||[],Be=t=>t?.getElementsByClassName(Kd)||[],Es=t=>{const e=!t.clientHeight||t.disabled||t.readOnly||b(t,"aria-readonly")==="true"||b(t,"aria-disabled")==="true",o=t.closest(jd)?.items,n=b(t,"aria-required")!=="true"||!!o?.length;return o&&t.setCustomValidity(e||n?"":"Required"),e?!1:t.matches(":user-invalid")},Ss=t=>{const e=t.target?.form||t.target;let o;if(qe(e)){for(const n of e.querySelectorAll(tn)){const i=[...on(n)].find(Es);!o&&i&&(o=i);for(const a of Be(n))b(a,"hidden",i?null:"")}for(const n of e.querySelectorAll("fieldset")){const i=[...on(n)].some(Es);for(const a of Be(n))en(a)||b(a,"hidden",i?null:"")}o&&(t.preventDefault(),o.focus())}},Yd=({target:t})=>{const e=t;if(!qe(e.form))for(const o of Be(e.closest("fieldset")||en(e)))b(o,"hidden","")},Qd=t=>qe(t.target.form)&&t?.preventDefault(),Jd=V()?Be(document):[],Zd=()=>{for(const t of Jd)if(!t.hasAttribute("data-validation")){const e=on(en(t))[0];b(t,"data-validation","form"),qe(e?.form)&&b(t,"hidden","")}};rt("validations",()=>[O(document,"input comboboxbeforeselect",Yd,!0),O(document,"invalid",Qd,!0),O(document,"invalid",Ot(Ss,10),zt),O(document,"submit",Ss,!0),Oe(document,Zd,{childList:!0,subtree:!0})]);var nn=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",$s=nn&&/iPad|iPhone|iPod/.test(navigator.userAgent),Ts;nn&&/^Mac/i.test(((Ts=navigator.userAgentData)==null?void 0:Ts.platform)||navigator.platform);var tu=typeof HTMLElement>"u"?class{}:HTMLElement;function U(t,e,o){return o===void 0?t.getAttribute(e):(o===null?t.removeAttribute(e):t.getAttribute(e)!==o&&t.setAttribute(e,o),null)}var eu=t=>{var e;const o=((e=t.getRootNode)==null?void 0:e.call(t))||t.ownerDocument;return o instanceof Document||o instanceof ShadowRoot?o:document},ou=0,nu=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++ou).toString(32)}`),t.id):"",iu=(t,e,o)=>{const n=document.createElement(t);return n.textContent=e,n},au={define:(t,e)=>!nn||window.customElements.get(t)||window.customElements.define(t,e)},su=t=>{var e;const o=U(t,"aria-label")||"";return[...(((e=U(t,"aria-labelledby"))==null?void 0:e.trim().split(/\s+/))||[]).map(i=>document.getElementById(i)),...Array.from(t.labels||[])].reduce((i,a)=>{var s;return i||((s=a?.innerText)==null?void 0:s.trim())||""},o)},ru=`:host(:not([hidden])) { box-sizing: border-box; border: 1px solid; display: inline-block; height: .5em; width: 10em; overflow: hidden }
|
|
205
|
+
`,df=[.1,.2,.25,.5,1];function uf(t,{aspect:e,type:o}){const i=o==="stacked",r=t[0].reduce((p,m,v)=>{const b=t.map(_=>_[v].number),w=b.reduce((_,E)=>_+E,0);return Math.max(p,...i?[w]:b)},0),a=r/10,l=10**`${Math.round(a)}`.length,s=a/l,c=(df.find(p=>p>s)||1)*l,d=Math.ceil(r/c)*c,u=O("div",{"aria-label":t[0][0].value||null,class:"axis",role:"figure"});e&&u.style.setProperty("--mtdsc-chart-aspect",e),u.style.setProperty("--bars",`${t[0]?.length-1}`),u.style.setProperty("--groups",`${t.length-1}`),u.style.setProperty("--total",`${d}`);const f=u.appendChild(O("div",{class:"axisSteps"})),h=u.appendChild(O("div",{class:"axisGroups"}));return Array.from({length:d/c+1},(p,m)=>ff(c*m)).reverse().map(p=>f.append(O("div",{class:"axisStep","data-label":p}))),{total:d,groups:h,axis:u}}const ff=new Intl.NumberFormat().format;function pf(t){return t[0].slice(1).map(({value:e,event:o},n)=>{const i=O("div",{class:"axisGroup","data-label":e}),r=i.appendChild(O("div",{class:"axisGroupContent"}));return t.slice(1).map(a=>a[n+1]).map(({tooltip:a,color:l,number:s})=>{const c=O("div",{"aria-label":a,"data-event":o,class:"bar",role:"img",tabindex:"0"});return c.style.setProperty("--color",l),c.style.setProperty("--value",`${s}`),r.appendChild(c)}),i})}function mf(t,{total:e,type:o,variant:n}){const i=Number.parseFloat(o||"0")||0,r=O("div",{class:"axisGroup"});return t.slice(1).forEach(([,...a])=>{const l=O("div",{class:"lineContainer",role:"list"});l.style.setProperty("--color",a[0].color);const s=hf(a.map(({number:u},f,{length:h})=>[100/(h-1)*f,100-u/e*100]),i/100),c=document.createElementNS("http://www.w3.org/2000/svg","svg");g(c,"aria-hidden","true"),g(c,"preserveAspectRatio","none"),g(c,"viewBox","0 0 100 100");const d=document.createElementNS("http://www.w3.org/2000/svg","path");if(g(d,"class","line"),g(d,"d",s),g(d,"fill","none"),g(d,"stroke","currentColor"),n==="area"){const u=d.cloneNode(!0);g(u,"d",`M-100,100 L${s.slice(1)}L200,100`),g(u,"class","lineShade"),c.append(u)}a.forEach(({number:u,tooltip:f,event:h})=>{const p=O("div",{role:"listitem"}),m=O("div",{"aria-label":f,"data-event":h,tabindex:"0",class:"linePoint",role:"img"});m.style.setProperty("--value",`${u}`),p.appendChild(m),l.append(p)}),l.appendChild(c).append(d),r.append(l)}),r}const hf=(t,e)=>t.map(([o,n],i,r)=>i?vf(i,r,e):`M${o},${n}`).join(" "),Ss=([t,e],[o,n])=>[t+o,e+n],xs=([t,e],[o,n])=>[t-o,e-n],$s=(t,[e,o])=>[t*e,t*o],vf=(t,e,o)=>{const n=e[t-1],i=e[t],[r,a]=Ss(n,$s(o,xs(i,e[t-2]||n))),[l,s]=Ss(i,$s(o,xs(n,e[t+1]||i)));return`C ${r},${a} ${l},${s} ${i[0]},${i[1]}`};function gf(t,{aspect:e,variant:o}){const n=document.createElementNS("http://www.w3.org/2000/svg","svg");e&&n.style.setProperty("--mtdsc-chart-aspect",e),g(n,"class","pie"),g(n,"viewBox","0 0 100 100");let i=0;const r=50,a=o==="doughnut"?25:0,l=t.slice(1).reduce((s,[,c])=>s+c.number,0);return t.slice(1).forEach(([,{tooltip:s,number:c,event:d,color:u}])=>{if(!c)return;const f=document.createElementNS("http://www.w3.org/2000/svg","path"),h=i/l;i+=c;const p=Math.min(i/l,.99999),m=p-h>.5?1:0,v=2*Math.PI*(h-.25),b=2*Math.PI*(p-.25),w=Math.cos(v),_=Math.sin(v),E=Math.cos(b),A=Math.sin(b),C=`M ${r+a*w} ${r+a*_} L ${r+r*w} ${r+r*_} A ${r} ${r} 0 ${m} 1 ${r+r*E} ${r+r*A} L ${r+a*E} ${r+a*A} A ${a} ${a} 0 ${m} 0 ${r+a*w} ${r+a*_}`;f.style.setProperty("--color",u),g(f,"aria-label",s),g(f,"data-event",d),g(f,"d",C),g(f,"role","img"),g(f,"tabindex","0"),n.appendChild(f)}),n}const Ts="click keydown mousemove mouseout",Cs="mtds-chart-tooltip",ht=j()?document.getElementById(Cs)||O("div",{"aria-hidden":"true",class:L._tooltip,hidden:"",id:Cs}):null;class bf extends bu{#t;#e;static get observedAttributes(){return["data-variant","data-aspect"]}constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const e=Wt(()=>this.attributeChangedCallback(),100),o=new ResizeObserver(()=>this.handleResize());o.observe(this),this.#e=()=>o.disconnect(),this.#t=oo(this,e,{attributeFilter:["data-tooltip"],attributes:!0,characterData:!0,childList:!0,subtree:!0}),requestAnimationFrame(()=>this.attributeChangedCallback()),D(this,Ts,this)}disconnectedCallback(){ht&&(ht.hidden=!0),us(this,Ts,this),this.#e?.(),this.#t?.(),this.#t=this.#e=void 0}attributeChangedCallback(){const e=wf(this.querySelector("table"));if(!e[0])return;Array.from(this.shadowRoot?.children||[]).map(c=>c.remove());const[o,n]=(g(this,"data-variant")||"column").split("-"),i=g(this,"data-aspect")||void 0,r=O("div",{"aria-hidden":"hidden",class:"legends",role:"group"});e.slice(1).forEach(([{value:c,color:d}])=>{const u=O("div",{class:"legend"},c);r.appendChild(u).style.setProperty("--color",d)});const{axis:a,groups:l,total:s}=uf(e,{aspect:i,type:n});(o==="column"||o==="bar")&&l.append(...pf(e)),(o==="line"||o==="area")&&l.append(mf(e,{total:s,variant:o,type:n})),(o==="doughnut"||o==="pie")&&this.shadowRoot?.append(gf(e,{aspect:i,variant:o})),this.shadowRoot?.append(a,r),wu(this,cf)}handleEvent(e){e.type==="click"||e.type==="keydown"?yf(e,this):_f(e)}handleResize(){const e=this.shadowRoot?.firstElementChild,o=e?.firstElementChild;e?.classList.toggle("axisStepsYHalf",(o?.offsetHeight||0)<400),e?.classList.toggle("axisStepsXHalf",(o?.offsetWidth||0)<500)}}function yf(t,e){if(t instanceof KeyboardEvent&&t.key!=="Enter")return;const o=t.composedPath()[0],n=e.querySelector("table"),[i,r]=o instanceof Element&&g(o,"data-event")?.split("-").map(Number)||[];n?.rows[i]?.cells[r]?.querySelector("a,button")?.click?.()}let As="";function _f(t){if(!ht)return;ht?.isConnected||document.body.append(ht);const e=t.composedPath()[0],o=e instanceof Element&&e.getAttribute("aria-label")||"";o&&(ht.style.transform=`translate(${Math.min(t.clientX,window.innerWidth)}px, ${t.clientY}px)`),o!==As&&(o&&(ht.textContent=o),As=o,ht.hidden=!o)}const Mn=t=>t?.textContent?.trim()||"",wf=t=>Array.from(t?.rows||[]).map((e,o,{length:n})=>Array.from(e.cells,(i,r)=>{const a=Mn(e.cells[0]),l=Mn(t?.rows[0].cells[r]),s=Mn(i),c=n===2?`${l}: ${s}`:`${a}: ${s}${l?` (${l})`:""}`;return g(i,"tabindex","-1"),{number:r&&o&&Number.parseFloat(s)||0,event:i.querySelector("a,button")&&`${o}-${r}`,color:`var(--mtdsc-chart-color-${o}-${r}, var(--mtdsc-chart-color-${o}, var(--mtdsc-chart-color-base)))`,value:s,tooltip:g(i,"data-tooltip")||c}}));yu("mtds-chart",bf);const ks=new WeakSet,B=t=>!ks.has(t)&&ks.add(t),P=(t,e,o)=>window.dsWarnings===!1||console.warn(`\x1B[1m@mattilsynet/design:\x1B[m ${t} is deprecated, please use ${e}:`,o),Ef=xt("togglegroup"),Ls=L.button.split(" "),Sf=()=>{for(const t of Ef){B(t)&&!t.hasAttribute("data-toggle-group")&&(g(t,"data-toggle-group","Valgknapper"),P('Only setting class="styles.togglegroup"','data-toggle-group="LABEL-HERE" attribute also for better accessibility',t));for(const e of t.getElementsByTagName("label"))B(e)&&!e.classList.contains(Ls[0])&&(e.classList.add(...Ls),P('Only setting class="styles.button"','<label class="styles.button">',e))}},xf=xt("breadcrumbs"),$f=()=>{for(const t of xf)B(t)&&t.nodeName!=="DS-BREADCRUMBS"&&(t.classList.add(...L.breadcrumbs.split(" ")),P('Only setting class="styles.breadcrumbs"','<ds-breadcrumbs class="styles.breadcrumbs">',t))},Tf=xt("errorsummary"),Cf=()=>{for(const t of Tf)B(t)&&t.nodeName!=="DS-ERROR-SUMMARY"&&P('Only setting class="styles.errorsummary"','<ds-error-summary class="styles.errorsummary">',t)},Af=xt("dialog"),Is=()=>{for(const t of Af){if(B(t)){const e=g(t,"data-closedby");e&&(g(t,"closedby",e),P(`<dialog data-closedby="${e}">`,`<dialog closedby="${e}">`,t)),t.hasAttribute("data-variant")&&P('<dialog data-variant="drawer">','<dialog data-placement="center|left|right|top|bottom">',t)}t.isConnected&&t.showModal&&t.close&&(t.matches('[open][data-modal]:not([data-modal="false"]):not(:modal)')?(P('<dialog data-modal="true">','.showModal() or <button command="show-modal" commandfor="DIALOG-ID"></button>',t),g(t,"open",null),t.showModal()):t.matches(":modal:not([open])")&&(g(t,"open",""),t.close()))}},kf=()=>{for(const t of document.querySelectorAll("[data-count]"))if(B(t)){const e=g(t,"data-count");t.classList.add(...L.validation.split(" ")),g(t,"data-limit",e),P(`data-count="${e}"`,`class="styles.validation" data-field="counter" data-limit="${e}"`,t)}},Lf=()=>{for(const t of document.querySelectorAll("[data-command]"))if(B(t)){const e=g(t,"data-command");e==="row"?P(`<${t.nodeName.toLowerCase()} data-command="${e}">`,`<tr data-clickdelegatefor="${t.nodeName}-ID">`,t):P(`<button data-command="${e}">`,`<button command="${e?.replace("toggle-app-expanded","show-modal")}" commandfor="TARGET-ID">`,t)}},If=j()?document.getElementsByTagName("u-tabs"):[],Mf=()=>{for(const t of If)B(t)&&P("u-tabs","ds-tabs",t)},On=L.suggestion.split(" "),Of=j()?document.getElementsByTagName("u-combobox"):[],Rf=j()?document.getElementsByTagName("ds-suggestion"):[],Df=()=>{for(const t of Of)B(t)&&(t.classList.add(...On),P("<u-combobox>",'<ds-suggestion class="styles.suggestion">',t));for(const t of Rf)B(t)&&!t.classList.contains(On[0])&&(t.classList.add(...On),P("Only using <ds-suggestion>",'<ds-suggestion class="styles.suggestion">',t))},Pf=({target:t})=>{if(!(t instanceof Element))return;const e=t?.closest("tr")?.querySelector('[data-command="row"]');e&&!t?.closest('a,button,label,input,select,textarea,[role="button"]')&&e.click();const n=t?.closest("dialog");n&&t?.closest('[data-command="close"]')&&n.close()},Hf=xt("field"),ro=new Set,Nf=()=>{for(const t of Hf)t.nodeName!=="DS-FIELD"&&(B(t)||P('Only setting class="styles.field"','<ds-field class="styles.field">',t),!ro.has(t)&&ro.add(t)&&Ue.prototype.connectedCallback.call(t))},Bf=()=>{for(const t of ro)Ue.prototype.disconnectedCallback.call(t),ro.delete(t)},qf=`[data-description], .${L.field.split(" ")[0]} label + p`,Uf=()=>{for(const t of document.querySelectorAll(qf))B(t)&&t.getAttribute("data-field")!=="description"&&(g(t,"data-field","description"),P("Descriptions created by data-description of <p> only",'data-field="data-description"',t))},Ff=xt("validation"),zf=()=>{for(const t of Ff)B(t)&&!t.hasAttribute("data-field")&&(g(t,"data-field","validation"),P('Only setting class="styles.validation"','class="styles.validation" data-field="validation"',t))},Vf=()=>{for(const t of document.querySelectorAll("[popover][data-position]"))B(t)&&(g(t,"data-placement",g(t,"data-position")),P("data-position","data-placement",t))},Wf=Wt(()=>{kf(),Lf(),$f(),Is(),Cf(),Uf(),zf(),Vf(),Nf(),Sf(),Df(),Mf()},200);mt("deprecations",()=>[Bf,D(document,"click",Pf,le),D(document,"toggle",Is,!0),oo(document,Wf,{attributeFilter:["class","data-command","data-count","data-description","data-variant","open"],attributes:!0,childList:!0,subtree:!0})]);const Gf=Wt(t=>{if(t.animationName!==L._logo)return;const e=t.target.closest?.(`.${L.logo.split(" ")[0]}`),o=e?.firstElementChild;if(o instanceof SVGSVGElement){for(const s of document.head.querySelectorAll("link[rel~='icon']"))s.setAttribute("rel","disabled");const n=e?.hasAttribute("data-env"),i=window.getComputedStyle(o),r=i.getPropertyValue("color"),a=i.getPropertyValue("--mtdsc-logo-background"),l=o.outerHTML.replace(/\n+/g," ").replace(/(fill|width|height|xmlns)="[^"]+"/gi,"").replace("<svg",`<svg width="40" height="40" fill="${r}"`);document.head.appendChild(O("link",{href:`data:image/svg+xml,${encodeURIComponent(`<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 55 55'><rect fill='${n?"none":a}' width='51' height='51' x='2' y='2' stroke='${r}' 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)">${l}</g></svg>`)}`,rel:"icon"}))}},200);mt("logo",()=>[D(document,"animationend",Gf)]);const jf=L.popover.split(" ")[0];function Kf({target:t}){const e=t?.closest?.('a,button,[role="button"]'),o=e instanceof HTMLButtonElement,n=e&&g(e,"popovertarget"),i=n?document.getElementById(n):e?.closest("[popover]");if(!(n&&o)&&i?.classList.contains(jf)&&e){const r=g(e,"popovertargetaction"),a=r==="show"||(r==="hide"?!1:void 0);if(o&&!r&&i.contains(e))return;i instanceof HTMLElement&&i.popover&&i.togglePopover(a)}}mt("popover",()=>[D(document,"click",Kf)]);const Xf=j()?document.getElementsByTagName("table"):[],Yf=()=>{for(const t of Xf){const e=Array.from(t.tHead?.rows[0]?.cells||[],o=>o.innerText.trim());for(const o of t.tBodies)for(const n of o.rows)for(const i of n.cells)g(i,"data-th",e[i.cellIndex]||":empty")}};mt("table",()=>[oo(document,Wt(Yf,200),{attributeFilter:["data-mobile"],attributes:!0,childList:!0,subtree:!0})]);const Ms=L.toast.split(" ")[0],ao="data-sort";function Qf({animationName:t,target:e}){const o=e;if(t===L._toastTimeout&&o.close(),t!==L._toastOpen)return;const n=Number(g(o,"data-timeout"));o.style.setProperty("--mtdsc-toast-timeout",n?`${n}ms`:null),o.hasAttribute(ao)||g(o,ao,`${Date.now()}`),g(o,"tabindex","0"),[...document.querySelectorAll(`.${Ms}[open]`)].sort((i,r)=>Number(g(r,ao))-Number(g(i,ao))).reduce((i,r)=>(r.style.translate=`0 ${r===e?0:i}px`,i+r.offsetHeight+5),0)}function Jf({target:t,clientX:e,clientY:o}){if(t instanceof HTMLDialogElement&&t.classList.contains(Ms)&&g(t,"data-closedby")!=="none"){const n=t.getBoundingClientRect(),i=window.getComputedStyle(t),r=window.getComputedStyle(t,"::after"),a=n.top+Number.parseInt(i.paddingTop,10),l=a+Number.parseInt(r.height,10),s=n.right-Number.parseInt(i.paddingRight,10),c=s-Number.parseInt(r.width,10);a<=o&&o<=l&&c<=e&&e<=s&&t.close()}}mt("toast",()=>[D(document,"animationstart",Qf),D(document,"click",Jf)]),j()&&ir(document.getElementById("mtds-tooltip")||O("div",{class:L._tooltip,id:"mtds-tooltip",popover:"manual"}));const Rn=`.${L.field.split(" ")[0]}`,Zf=`${Rn} :is(input,textarea,select)`,tp="ds-suggestion,u-combobox",ep=L.validation.split(" ")[0],so=t=>t instanceof HTMLFormElement&&g(t,"data-validation")==="form",Dn=t=>t.closest(Rn),Pn=t=>t?.querySelectorAll(Zf)||[],lo=t=>t?.getElementsByClassName(ep)||[],Os=t=>{const e=!t.clientHeight||t.disabled||t.readOnly||g(t,"aria-readonly")==="true"||g(t,"aria-disabled")==="true",o=t.closest(tp)?.items,n=g(t,"aria-required")!=="true"||!!o?.length;return o&&t.setCustomValidity(e||n?"":"Required"),e?!1:t.matches(":user-invalid")},Rs=t=>{const e=t.target?.form||t.target;let o;if(so(e)){for(const n of e.querySelectorAll(Rn)){const i=[...Pn(n)].find(Os);!o&&i&&(o=i);for(const r of lo(n))g(r,"hidden",i?null:"")}for(const n of e.querySelectorAll("fieldset")){const i=[...Pn(n)].some(Os);for(const r of lo(n))Dn(r)||g(r,"hidden",i?null:"")}o&&(t.preventDefault(),o.focus())}},op=({target:t})=>{const e=t;if(!so(e.form))for(const o of lo(e.closest("fieldset")||Dn(e)))g(o,"hidden","")},np=t=>so(t.target.form)&&t?.preventDefault(),ip=j()?lo(document):[],rp=()=>{for(const t of ip)if(!t.hasAttribute("data-validation")){const e=Pn(Dn(t))[0];g(t,"data-validation","form"),so(e?.form)&&g(t,"hidden","")}};mt("validations",()=>[D(document,"input comboboxbeforeselect",op,!0),D(document,"invalid",np,!0),D(document,"invalid",Wt(Rs,10),le),D(document,"submit",Rs,!0),oo(document,rp,{childList:!0,subtree:!0})]);var ap=Object.defineProperty,Ds=Object.getOwnPropertySymbols,sp=Object.prototype.hasOwnProperty,lp=Object.prototype.propertyIsEnumerable,Ps=(t,e,o)=>e in t?ap(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,cp=(t,e)=>{for(var o in e||(e={}))sp.call(e,o)&&Ps(t,o,e[o]);if(Ds)for(var o of Ds(e))lp.call(e,o)&&Ps(t,o,e[o]);return t},co=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",uo=co(),Hn=uo?navigator.userAgent:"",fo=/android/i.test(Hn),dp=/firefox/i.test(Hn),up=/iPad|iPhone|iPod/.test(Hn),Hs,fp=uo&&/^Mac/i.test(((Hs=navigator.userAgentData)==null?void 0:Hs.platform)||navigator.platform),pp=uo&&window.CSSStyleSheet&&document.adoptedStyleSheets,mp={once:!0,capture:!0,passive:!0},hp=":host(:not([hidden])) { display: block }",vp="outline: 1px dotted; outline: 5px auto Highlight; outline: 5px auto -webkit-focus-ring-color",gp=`${fo?"data":"aria"}-multiselectable`,Ns=typeof HTMLElement>"u"?class{}:HTMLElement,T=(t,e,o)=>o===void 0?t.getAttribute(e):(o===null?t.removeAttribute(e):t.getAttribute(e)!==o&&t.setAttribute(e,o),null),Nn=(t,...e)=>{const[o,...n]=e;for(const i of o.split(" "))t.addEventListener(i,...n);return()=>po(t,...e)},po=(t,...e)=>{const[o,...n]=e;for(const i of o.split(" "))t.removeEventListener(i,...n)},bp=(t,e)=>{const o=t.shadowRoot||t.attachShadow({mode:"open"});if(o.querySelector("slot")||o.append(qn("slot")),!o.querySelector("style"))if(!pp)o.append(qn("style",null,e));else{const n=new CSSStyleSheet;n.replaceSync(e),o.adoptedStyleSheets=[n]}return o},yp=(t,e,o)=>{const n=new MutationObserver(r=>{if(!co()||!t.isConnected)return i();e(t,r)}),i=Object.assign(()=>n.disconnect(),{takeRecords:()=>n.takeRecords()});return e(t),n.observe(t,o),i},Bn=t=>{var e;const o=((e=t.getRootNode)==null?void 0:e.call(t))||t.ownerDocument;return o instanceof Document||o instanceof ShadowRoot?o:document},de=t=>{if(!t||!uo)return null;if(window.uElementsId||(window.uElementsId={}),!t.id){const e=t.nodeName.toLowerCase();window.uElementsId[e]||(window.uElementsId[e]=1),t.id=`:${e}${window.uElementsId[e]++}`}return t.id},qn=(t,e,o)=>{const n=document.createElement(t);if(o&&(n.textContent=o),e)for(const[i,r]of Object.entries(e))T(n,i,r);return n},Bs={define:(t,e)=>!co()||window.customElements.get(t)||window.customElements.define(t,e)},_p=(t,e,o="")=>{var n,i;const r={bubbles:!0,composed:!0,data:e,inputType:o},a=HTMLInputElement.prototype;t.dispatchEvent(new InputEvent("beforeinput",r)),(i=(n=Object.getOwnPropertyDescriptor(a,"value"))==null?void 0:n.set)==null||i.call(t,e),t.dispatchEvent(new InputEvent("input",r)),t.dispatchEvent(new Event("change",{bubbles:!0}))},Un=!1,Fn=t=>(t?.type==="pointerup"&&(Un=!1),t?.type==="pointerdown"&&(Un=!0,Nn(document,"pointerup",Fn,mp)),Un),wp=t=>{const e=T(t,"form");T(t,"form","#"),setTimeout(Ep,0,t,e)},Ep=(t,e)=>T(t,"form",e),ot,Sp=0,qs=0,zn=t=>{clearTimeout(qs),ot||(ot=qn("div",{"aria-live":"assertive"}),ot.style.overflow="hidden",ot.style.position="fixed",ot.style.whiteSpace="nowrap",ot.style.width="1px"),ot.isConnected||document.body.append(ot),t===""&&(ot.textContent=""),t&&(ot.textContent=`${t}${Sp++%2?" ":""}`,qs=setTimeout(zn,!fp&&dp?2e3:300,""))},Vn="disabled",ue="selected",Wn=!1,xp=class extends Ns{static get observedAttributes(){return["id",Vn,ue]}connectedCallback(){fo&&(this.tabIndex=-1),this.hasAttribute("role")||T(this,"role","option"),T(this,"aria-disabled",`${this.disabled}`),T(this,"aria-selected",`${this.selected}`),de(this)}attributeChangedCallback(t){Wn||(Wn=!0,t==="id"?de(this):T(this,`aria-${t}`,`${this[t]}`),Wn=!1)}get defaultSelected(){return this[ue]}set defaultSelected(t){this[ue]=t}get disabled(){return T(this,Vn)!==null}set disabled(t){T(this,Vn,t?"":null)}get form(){return this.closest("form")}get index(){var t;return[...((t=this.parentElement)==null?void 0:t.options)||[this]].indexOf(this)}get label(){var t;return(t=T(this,"label"))!=null?t:this.text}set label(t){T(this,"label",t)}get selected(){return T(this,ue)!==null}set selected(t){T(this,ue,t?"":null)}get text(){var t;return((t=this.textContent)==null?void 0:t.trim())||""}set text(t){this.textContent=t}get value(){var t;return(t=T(this,"value"))!=null?t:this.text}set value(t){T(this,"value",t)}};Bs.define("u-option",xp);var Us="data-activedescendant",mo="aria-hidden",$p=`${hp}
|
|
206
|
+
::slotted([role="option"]) { display: block; cursor: pointer }
|
|
207
|
+
::slotted([role="option"][${Us}]) { ${vp} }
|
|
208
|
+
::slotted([role="option"]:is([${mo}="true"], [disabled], [hidden])) { display: none !important }`,Gn,Fs="focus click keydown",jn="focusout input pointerdown",ho={of:"of",plural:"%d hits",singular:"%d hit"},Tp=class extends Ns{constructor(){super(),this._texts=cp({},ho),bp(this,$p)}static get observedAttributes(){return["id",...Object.keys(ho).map(t=>`data-sr-${t}`)]}connectedCallback(){this._root=Bn(this),T(this,"hidden",""),T(this,"role","listbox"),T(this,"tabindex","-1"),Nn(this._root,Fs,this,!0),this._umutate=yp(this,Ws,{attributeFilter:["disabled","hidden","label","value"],attributes:!0,characterData:!0,childList:!0,subtree:!0})}disconnectedCallback(){var t;this._root&&po(this._root,Fs,this,!0),this._root&&po(this._root,jn,this),vo(this,null),(t=this._umutate)==null||t.call(this),this._umutate=this._root=this._input=void 0}attributeChangedCallback(t,e,o){const n=t?.split("data-sr-")[1];if(ho[n])this._texts[n]=o||ho[n];else if(this.id){const i=`input[list="${this.id}"]`,r=Bn(this).querySelector(i);r&&vo(this,r)}}handleEvent(t){t.defaultPrevented||(t.type==="focus"&&Xn(this,t),t.type==="focusout"&&Ap(this,t),t.type==="click"&&Lp(this,t),t.type==="input"&&Ws(this),t.type==="keydown"&&Ip(this,t),t.type==="pointerdown"&&kp(this,t))}get options(){const t=!this._options&&this.querySelector('[role="option"],option');return t&&(this._options=this.getElementsByTagName(t?.nodeName)),this._options||this.getElementsByTagName("option")}},zs=t=>t.disabled||t.readOnly,Kn=t=>t instanceof HTMLInputElement,Cp=t=>T(t,mo)!=="true"&&t.clientHeight,fe=(t,e)=>{t._input&&T(t._input,"aria-expanded",`${e}`),!(!e===t.hidden||!t.isConnected)&&(e||Vs(t),t.popover&&t.togglePopover(e),e&&setTimeout(()=>clearTimeout(Gn)),t.hidden=!e)},Vs=(t,e)=>{t._input&&T(t._input,"aria-activedescendant",de(e));for(const o of t.options)T(o,Us,o===e?"":null);e?.scrollIntoView({block:"nearest"})},vo=(t,e)=>{const o=e||t._input;o&&(t.popover&&(T(t,"popover","manual"),T(o,"popovertarget",e&&de(t))),T(o,"aria-autocomplete",e&&"list"),T(o,"aria-controls",e&&de(t)),T(o,"autocomplete",e&&"off"),T(o,"enterkeyhint","done"),T(o,"role",e&&!zs(o)?"combobox":null))},Xn=(t,{target:e})=>{var o,n;if(t._input!==e)if(Kn(e)&&e.getAttribute("list")===t.id){if(vo(t,null),vo(t,e),zs(e))return;t._root&&Nn(t._root,jn,t),T(t,"aria-label",((n=(o=e.labels)==null?void 0:o[0])==null?void 0:n.textContent.trim())||null),zn(),t._input=e,fo&&fe(t,!0)}else Yn(t)},Ap=(t,e)=>{Fn()?e.stopImmediatePropagation():fo||setTimeout(Yn,0,t,e)},Yn=t=>{var e;(e=t._input)!=null&&e.matches(":focus")||t.matches(":focus-within")||(t._root&&po(t._root,jn,t),fe(t,!1),t._input=void 0)},kp=(t,e)=>t.contains(e.target)&&Fn(e),Lp=(t,e)=>{var o;if(Kn(e.target)&&Xn(t,e),t._input===e.target)return fe(t,!0);if(!t.contains(e.target))return Yn(t);for(const n of t.options)if(n.contains(e.target))return(o=t._input)==null||o.focus(),t._input&&_p(t._input,n.value),fe(t,T(t,gp)==="true")},Ip=(t,e)=>{if(Kn(e.target)&&Xn(t,e),t._input!==e.target)return;const{key:o,ctrlKey:n,metaKey:i,shiftKey:r,altKey:a}=e;if(n||i||r||o==="Tab"||a&&!o.startsWith("Arrow"))return;o==="Escape"&&!t.hidden&&e.preventDefault(),fe(t,o!=="Escape");const l=T(t._input,"aria-activedescendant"),s=[...t.options].filter(Cp),c=s.findIndex(f=>f.id===l),d=o==="Enter";let u=-1;!a&&o==="ArrowDown"&&(u=(c+1)%s.length),!a&&o==="ArrowUp"&&(u=(c||s.length)-1),~c&&((o==="Home"||o==="PageUp")&&(u=0),(o==="End"||o==="PageDown")&&(u=s.length-1),d&&(u=c)),s[u]&&(e.preventDefault(),t._input.focus()),d&&s[u]?(e.stopImmediatePropagation(),wp(t._input),s[u].click()):Vs(t,s[u])},Ws=t=>{var e;if(!t._input||t.hidden)return;const o=t._input.value.toLowerCase().trim()||"",n=!t.hasAttribute("data-nofilter"),i=[],r=[];for(const a of t.options)(a.disabled||a.hidden||n&&!a.label.toLowerCase().includes(o)?i:r).push(a);for(const a of i)T(a,mo,"true");for(const a of r)T(a,mo,"false");clearTimeout(Gn),Gn=setTimeout(Mp,500,t,r),up&&r.forEach((a,l,{length:s})=>{T(a,"title",`${l+1} ${t._texts.of} ${s}`)}),(e=t._umutate)==null||e.takeRecords()},Mp=(t,e)=>{var o;return!t.hidden&&((o=t._input)==null?void 0:o.matches(":focus"))&&zn(`${e.some(({value:n})=>n)?`${t._texts[e[1]?"plural":"singular"]}`.replace("%d",`${e.length}`):t.innerText}`)};co()&&Object.defineProperty(HTMLInputElement.prototype,"list",{configurable:!0,enumerable:!0,get(){const t=T(this,"list");return t&&Bn(this).getElementById(t)}}),Bs.define("u-datalist",Tp);var Gs=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",go=Gs(),Op=go?navigator.userAgent:"",js=/iPad|iPhone|iPod/.test(Op),Ks;go&&/^Mac/i.test(((Ks=navigator.userAgentData)==null?void 0:Ks.platform)||navigator.platform);var Rp=go&&window.CSSStyleSheet&&document.adoptedStyleSheets,Dp=typeof HTMLElement>"u"?class{}:HTMLElement,F=(t,e,o)=>o===void 0?t.getAttribute(e):(o===null?t.removeAttribute(e):t.getAttribute(e)!==o&&t.setAttribute(e,o),null),Pp=(t,e)=>{const o=t.shadowRoot||t.attachShadow({mode:"open"});if(o.querySelector("slot")||o.append(Xs("slot")),!o.querySelector("style"))if(!Rp)o.append(Xs("style",null,e));else{const n=new CSSStyleSheet;n.replaceSync(e),o.adoptedStyleSheets=[n]}return o},Hp=t=>{var e;const o=((e=t.getRootNode)==null?void 0:e.call(t))||t.ownerDocument;return o instanceof Document||o instanceof ShadowRoot?o:document},Np=t=>{var e;const o=F(t,"aria-label")||"";return[...(((e=F(t,"aria-labelledby"))==null?void 0:e.split(" "))||[]).map(i=>document.getElementById(i.trim()||"-")),...Array.from(t.labels||[])].reduce((i,r)=>{var a;return i||((a=r?.innerText)==null?void 0:a.trim())||""},o).trim()},Bp=t=>{if(!t||!go)return null;if(window.uElementsId||(window.uElementsId={}),!t.id){const e=t.nodeName.toLowerCase();window.uElementsId[e]||(window.uElementsId[e]=1),t.id=`:${e}${window.uElementsId[e]++}`}return t.id},Xs=(t,e,o)=>{const n=document.createElement(t);if(o&&(n.textContent=o),e)for(const[i,r]of Object.entries(e))F(n,i,r);return n},qp={define:(t,e)=>!Gs()||window.customElements.get(t)||window.customElements.define(t,e)},bo="value",Qn="max",Up=`:host(:not([hidden])) { box-sizing: border-box; border: 1px solid; display: inline-block; height: .5em; width: 10em; overflow: hidden }
|
|
197
209
|
:host::before { content: ''; display: block; height: 100%; background: currentColor; width: var(--percentage, 0%); transition: width .2s }
|
|
198
210
|
:host(:not([value])) { background: linear-gradient(90deg,currentColor 25%, transparent 50%, currentColor 75%) 50%/400% }
|
|
199
211
|
@media (prefers-reduced-motion: no-preference) { :host { animation: indeterminate 2s linear infinite } }
|
|
200
|
-
@keyframes indeterminate { from { background-position-x: 100% } to { background-position-x: 0 } }`,
|
|
212
|
+
@keyframes indeterminate { from { background-position-x: 100% } to { background-position-x: 0 } }`,Ys=class extends Dp{constructor(){var t;super(),this._skipAttrChange=!1,Pp(this,Up),this._internals=(t=this.attachInternals)==null?void 0:t.call(this)}static get observedAttributes(){return["aria-label","aria-labelledby",bo,Qn]}connectedCallback(){F(this,"aria-valuemin","0"),F(this,"aria-valuemax","100"),F(this,"role",js?"img":"progressbar"),this.attributeChangedCallback()}attributeChangedCallback(){if(this._skipAttrChange||!this.hasAttribute("role"))return;this._skipAttrChange=!0;const t=this.position,e=Math.max(0,Math.round(t*100));this.style.setProperty("--percentage",`${e}%`);let o=Np(this);js&&(o=`${o.replace(/\(\d+%\)$/,"")} (${e}%)`.trim()),F(this,"aria-busy",`${t===-1}`),F(this,"aria-label",o),F(this,"aria-labelledby",null),F(this,"aria-valuenow",t===-1?null:`${e}`),this._skipAttrChange=!1}get labels(){var t;const e=(t=this._internals)==null?void 0:t.labels;if(e)return e;const o=Bp(this),n=this.closest("label:not([for])");return n&&F(n,"for",o),Hp(this).querySelectorAll(`label[for="${o}"]`)}get position(){return this.hasAttribute(bo)?Math.min(this.value/this.max,1):-1}get value(){return Math.min(Qs(this,bo),this.max)}set value(t){Js(this,bo,t)}get max(){return Qs(this,Qn,1)}set max(t){Js(this,Qn,t,1)}};Ys.formAssociated=!0;var Qs=(t,e,o=0)=>{const n=F(t,e),i=Number(n);return n===null?o:Number.isFinite(i)&&Math.max(o,i)||o},Js=(t,e,o,n=0)=>{const i=Number(o);if(Number.isFinite(i))return F(t,e,`${Math.max(n,i)||n}`);throw new Error(`Failed to set the '${e}' property on 'UHTMLProgressElement': The provided double value is non-finite.`)};return qp.define("u-progress",Ys),S.DSBreadcrumbsElement=lr,S.DSErrorSummaryElement=cr,S.DSFieldElement=Ue,S.DSPaginationElement=br,S.DSSuggestionElement=Dr,S.DSTabElement=Br,S.DSTabListElement=Nr,S.DSTabPanelElement=qr,S.DSTabsElement=Hr,S.UHTMLComboboxElement=ci,S.UHTMLComboboxShadowRoot=yl,S.UHTMLComboboxStyle=$o,S.UHTMLDataListElement=ia,S.UHTMLDataListShadowRoot=cu,S.UHTMLDataListStyle=wn,S.UHTMLTabElement=Ro,S.UHTMLTabListElement=$e,S.UHTMLTabListShadowRoot=Ul,S.UHTMLTabListStyle=Oo,S.UHTMLTabPanelElement=Do,S.UHTMLTabPanelShadowRoot=zl,S.UHTMLTabPanelStyle=Mo,S.UHTMLTabShadowRoot=Fl,S.UHTMLTabStyle=Bl,S.UHTMLTabsElement=xe,S.UHTMLTabsShadowRoot=ql,S.UHTMLTabsStyle=Io,S.analytics=ps,S.fixLawHtml=ws,S.getLawChecked=Ju,S.pagination=gr,S.parseLawIds=ef,S.parseLawMeta=of,S.setLawChecked=tf,S.setTooltipElement=ir,S.styles=vu,S.toast=N,S.toggleAppExpanded=gs,S.toggleLawChecked=Zu,S.version=hu,Object.defineProperty(S,Symbol.toStringTag,{value:"Module"}),S})({});
|